@leancodepl/axios-cqrs-client 9.7.4 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1 @@
1
- (function(me,we){typeof exports=="object"&&typeof module<"u"?we(exports):typeof define=="function"&&define.amd?define(["exports"],we):(me=typeof globalThis<"u"?globalThis:me||self,we(me["@leancodepl/axios-cqrs-client"]={}))})(this,(function(me){"use strict";function we(e,t){return function(){return e.apply(t,arguments)}}const{toString:gr}=Object.prototype,{getPrototypeOf:Ke}=Object,{iterator:xe,toStringTag:lt}=Symbol,Le=(e=>t=>{const n=gr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ie=e=>(e=e.toLowerCase(),t=>Le(t)===e),Ue=e=>t=>typeof t===e,{isArray:ge}=Array,_e=Ue("undefined");function Se(e){return e!==null&&!_e(e)&&e.constructor!==null&&!_e(e.constructor)&&Z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ft=ie("ArrayBuffer");function _r(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ft(e.buffer),t}const Rr=Ue("string"),Z=Ue("function"),dt=Ue("number"),Oe=e=>e!==null&&typeof e=="object",Tr=e=>e===!0||e===!1,De=e=>{if(Le(e)!=="object")return!1;const t=Ke(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(lt in e)&&!(xe in e)},Sr=e=>{if(!Oe(e)||Se(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Or=ie("Date"),Ar=ie("File"),vr=ie("Blob"),Cr=ie("FileList"),kr=e=>Oe(e)&&Z(e.pipe),Pr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Z(e.append)&&((t=Le(e))==="formdata"||t==="object"&&Z(e.toString)&&e.toString()==="[object FormData]"))},Nr=ie("URLSearchParams"),[jr,xr,Lr,Ur]=["ReadableStream","Request","Response","Headers"].map(ie),Dr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,i;if(typeof e!="object"&&(e=[e]),ge(e))for(o=0,i=e.length;o<i;o++)t.call(null,e[o],o,e);else{if(Se(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let f;for(o=0;o<u;o++)f=a[o],t.call(null,e[f],f,e)}}function pt(e,t){if(Se(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,i;for(;o-- >0;)if(i=n[o],t===i.toLowerCase())return i;return null}const ye=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ht=e=>!_e(e)&&e!==ye;function Ge(){const{caseless:e,skipUndefined:t}=ht(this)&&this||{},n={},o=(i,a)=>{const u=e&&pt(n,a)||a;De(n[u])&&De(i)?n[u]=Ge(n[u],i):De(i)?n[u]=Ge({},i):ge(i)?n[u]=i.slice():(!t||!_e(i))&&(n[u]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Ae(arguments[i],o);return n}const Mr=(e,t,n,{allOwnKeys:o}={})=>(Ae(t,(i,a)=>{n&&Z(i)?e[a]=we(i,n):e[a]=i},{allOwnKeys:o}),e),Fr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$r=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},qr=(e,t,n,o)=>{let i,a,u;const f={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)u=i[a],(!o||o(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=n!==!1&&Ke(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ir=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Br=e=>{if(!e)return null;if(ge(e))return e;let t=e.length;if(!dt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Hr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ke(Uint8Array)),zr=(e,t)=>{const o=(e&&e[xe]).call(e);let i;for(;(i=o.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Yr=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Wr=ie("HTMLFormElement"),Vr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,i){return o.toUpperCase()+i}),mt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jr=ie("RegExp"),yt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Ae(n,(i,a)=>{let u;(u=t(i,a,e))!==!1&&(o[a]=u||i)}),Object.defineProperties(e,o)},Kr=e=>{yt(e,(t,n)=>{if(Z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(Z(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Gr=(e,t)=>{const n={},o=i=>{i.forEach(a=>{n[a]=!0})};return ge(e)?o(e):o(String(e).split(t)),n},Xr=()=>{},Qr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Zr(e){return!!(e&&Z(e.append)&&e[lt]==="FormData"&&e[xe])}const en=e=>{const t=new Array(10),n=(o,i)=>{if(Oe(o)){if(t.indexOf(o)>=0)return;if(Se(o))return o;if(!("toJSON"in o)){t[i]=o;const a=ge(o)?[]:{};return Ae(o,(u,f)=>{const E=n(u,i+1);!_e(E)&&(a[f]=E)}),t[i]=void 0,a}}return o};return n(e,0)},tn=ie("AsyncFunction"),rn=e=>e&&(Oe(e)||Z(e))&&Z(e.then)&&Z(e.catch),Et=((e,t)=>e?setImmediate:t?((n,o)=>(ye.addEventListener("message",({source:i,data:a})=>{i===ye&&a===n&&o.length&&o.shift()()},!1),i=>{o.push(i),ye.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Z(ye.postMessage)),nn=typeof queueMicrotask<"u"?queueMicrotask.bind(ye):typeof process<"u"&&process.nextTick||Et,l={isArray:ge,isArrayBuffer:ft,isBuffer:Se,isFormData:Pr,isArrayBufferView:_r,isString:Rr,isNumber:dt,isBoolean:Tr,isObject:Oe,isPlainObject:De,isEmptyObject:Sr,isReadableStream:jr,isRequest:xr,isResponse:Lr,isHeaders:Ur,isUndefined:_e,isDate:Or,isFile:Ar,isBlob:vr,isRegExp:Jr,isFunction:Z,isStream:kr,isURLSearchParams:Nr,isTypedArray:Hr,isFileList:Cr,forEach:Ae,merge:Ge,extend:Mr,trim:Dr,stripBOM:Fr,inherits:$r,toFlatObject:qr,kindOf:Le,kindOfTest:ie,endsWith:Ir,toArray:Br,forEachEntry:zr,matchAll:Yr,isHTMLForm:Wr,hasOwnProperty:mt,hasOwnProp:mt,reduceDescriptors:yt,freezeMethods:Kr,toObjectSet:Gr,toCamelCase:Vr,noop:Xr,toFiniteNumber:Qr,findKey:pt,global:ye,isContextDefined:ht,isSpecCompliantForm:Zr,toJSONObject:en,isAsyncFn:tn,isThenable:rn,setImmediate:Et,asap:nn,isIterable:e=>e!=null&&Z(e[xe])};function C(e,t,n,o,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),o&&(this.request=o),i&&(this.response=i,this.status=i.status?i.status:null)}l.inherits(C,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.status}}});const bt=C.prototype,wt={};["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=>{wt[e]={value:e}}),Object.defineProperties(C,wt),Object.defineProperty(bt,"isAxiosError",{value:!0}),C.from=(e,t,n,o,i,a)=>{const u=Object.create(bt);l.toFlatObject(e,u,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const f=e&&e.message?e.message:"Error",E=t==null&&e?e.code:t;return C.call(u,f,E,n,o,i),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",a&&Object.assign(u,a),u};const on=null;function Xe(e){return l.isPlainObject(e)||l.isArray(e)}function gt(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function _t(e,t,n){return e?e.concat(t).map(function(i,a){return i=gt(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function sn(e){return l.isArray(e)&&!e.some(Xe)}const an=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function Me(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,_){return!l.isUndefined(_[S])});const o=n.metaTokens,i=n.visitor||p,a=n.dots,u=n.indexes,E=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(i))throw new TypeError("visitor must be a function");function h(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(l.isBoolean(m))return m.toString();if(!E&&l.isBlob(m))throw new C("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?E&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,S,_){let M=m;if(m&&!_&&typeof m=="object"){if(l.endsWith(S,"{}"))S=o?S:S.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&sn(m)||(l.isFileList(m)||l.endsWith(S,"[]"))&&(M=l.toArray(m)))return S=gt(S),M.forEach(function(q,B){!(l.isUndefined(q)||q===null)&&t.append(u===!0?_t([S],B,a):u===null?S:S+"[]",h(q))}),!1}return Xe(m)?!0:(t.append(_t(_,S,a),h(m)),!1)}const R=[],L=Object.assign(an,{defaultVisitor:p,convertValue:h,isVisitable:Xe});function $(m,S){if(!l.isUndefined(m)){if(R.indexOf(m)!==-1)throw Error("Circular reference detected in "+S.join("."));R.push(m),l.forEach(m,function(M,W){(!(l.isUndefined(M)||M===null)&&i.call(t,M,l.isString(W)?W.trim():W,S,L))===!0&&$(M,S?S.concat(W):[W])}),R.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return $(e),t}function Rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Qe(e,t){this._pairs=[],e&&Me(e,this,t)}const Tt=Qe.prototype;Tt.append=function(t,n){this._pairs.push([t,n])},Tt.toString=function(t){const n=t?function(o){return t.call(this,o,Rt)}:Rt;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function St(e,t,n){if(!t)return e;const o=n&&n.encode||un;l.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(i?a=i(t,n):a=l.isURLSearchParams(t)?t.toString():new Qe(t,n).toString(o),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Ot{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(o){o!==null&&t(o)})}}const At={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Qe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ze=typeof window<"u"&&typeof document<"u",et=typeof navigator=="object"&&navigator||void 0,ln=Ze&&(!et||["ReactNative","NativeScript","NS"].indexOf(et.product)<0),fn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dn=Ze&&window.location.href||"http://localhost",X={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:ln,hasStandardBrowserWebWorkerEnv:fn,navigator:et,origin:dn},Symbol.toStringTag,{value:"Module"})),...cn};function pn(e,t){return Me(e,new X.classes.URLSearchParams,{visitor:function(n,o,i,a){return X.isNode&&l.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function hn(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mn(e){const t={},n=Object.keys(e);let o;const i=n.length;let a;for(o=0;o<i;o++)a=n[o],t[a]=e[a];return t}function vt(e){function t(n,o,i,a){let u=n[a++];if(u==="__proto__")return!0;const f=Number.isFinite(+u),E=a>=n.length;return u=!u&&l.isArray(i)?i.length:u,E?(l.hasOwnProp(i,u)?i[u]=[i[u],o]:i[u]=o,!f):((!i[u]||!l.isObject(i[u]))&&(i[u]=[]),t(n,o,i[u],a)&&l.isArray(i[u])&&(i[u]=mn(i[u])),!f)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(o,i)=>{t(hn(o),i,n,0)}),n}return null}function yn(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const ve={transitional:At,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",i=o.indexOf("application/json")>-1,a=l.isObject(t);if(a&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return i?JSON.stringify(vt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return pn(t,this.formSerializer).toString();if((f=l.isFileList(t))||o.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return Me(f?{"files[]":t}:t,E&&new E,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),yn(t)):t}],transformResponse:[function(t){const n=this.transitional||ve.transitional,o=n&&n.forcedJSONParsing,i=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(o&&!this.responseType||i)){const u=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(f){if(u)throw f.name==="SyntaxError"?C.from(f,C.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:X.classes.FormData,Blob:X.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{ve.headers[e]={}});const En=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"]),bn=e=>{const t={};let n,o,i;return e&&e.split(`
2
- `).forEach(function(u){i=u.indexOf(":"),n=u.substring(0,i).trim().toLowerCase(),o=u.substring(i+1).trim(),!(!n||t[n]&&En[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Ct=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function Fe(e){return e===!1||e==null?e:l.isArray(e)?e.map(Fe):String(e)}function wn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const gn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function tt(e,t,n,o,i){if(l.isFunction(o))return o.call(this,t,n);if(i&&(t=n),!!l.isString(t)){if(l.isString(o))return t.indexOf(o)!==-1;if(l.isRegExp(o))return o.test(t)}}function _n(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Rn(e,t){const n=l.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(i,a,u){return this[o].call(this,t,i,a,u)},configurable:!0})})}let ee=class{constructor(t){t&&this.set(t)}set(t,n,o){const i=this;function a(f,E,h){const p=Ce(E);if(!p)throw new Error("header name must be a non-empty string");const R=l.findKey(i,p);(!R||i[R]===void 0||h===!0||h===void 0&&i[R]!==!1)&&(i[R||E]=Fe(f))}const u=(f,E)=>l.forEach(f,(h,p)=>a(h,p,E));if(l.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(l.isString(t)&&(t=t.trim())&&!gn(t))u(bn(t),n);else if(l.isObject(t)&&l.isIterable(t)){let f={},E,h;for(const p of t){if(!l.isArray(p))throw TypeError("Object iterator must return a key-value pair");f[h=p[0]]=(E=f[h])?l.isArray(E)?[...E,p[1]]:[E,p[1]]:p[1]}u(f,n)}else t!=null&&a(n,t,o);return this}get(t,n){if(t=Ce(t),t){const o=l.findKey(this,t);if(o){const i=this[o];if(!n)return i;if(n===!0)return wn(i);if(l.isFunction(n))return n.call(this,i,o);if(l.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ce(t),t){const o=l.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||tt(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let i=!1;function a(u){if(u=Ce(u),u){const f=l.findKey(o,u);f&&(!n||tt(o,o[f],f,n))&&(delete o[f],i=!0)}}return l.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let o=n.length,i=!1;for(;o--;){const a=n[o];(!t||tt(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,o={};return l.forEach(this,(i,a)=>{const u=l.findKey(o,a);if(u){n[u]=Fe(i),delete n[a];return}const f=t?_n(a):String(a).trim();f!==a&&delete n[a],n[f]=Fe(i),o[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return l.forEach(this,(o,i)=>{o!=null&&o!==!1&&(n[i]=t&&l.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(i=>o.set(i)),o}static accessor(t){const o=(this[Ct]=this[Ct]={accessors:{}}).accessors,i=this.prototype;function a(u){const f=Ce(u);o[f]||(Rn(i,u),o[f]=!0)}return l.isArray(t)?t.forEach(a):a(t),this}};ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(ee.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),l.freezeMethods(ee);function rt(e,t){const n=this||ve,o=t||n,i=ee.from(o.headers);let a=o.data;return l.forEach(e,function(f){a=f.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function kt(e){return!!(e&&e.__CANCEL__)}function Re(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(Re,C,{__CANCEL__:!0});function Pt(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Sn(e,t){e=e||10;const n=new Array(e),o=new Array(e);let i=0,a=0,u;return t=t!==void 0?t:1e3,function(E){const h=Date.now(),p=o[a];u||(u=h),n[i]=E,o[i]=h;let R=a,L=0;for(;R!==i;)L+=n[R++],R=R%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),h-u<t)return;const $=p&&h-p;return $?Math.round(L*1e3/$):void 0}}function On(e,t){let n=0,o=1e3/t,i,a;const u=(h,p=Date.now())=>{n=p,i=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),R=p-n;R>=o?u(h,p):(i=h,a||(a=setTimeout(()=>{a=null,u(i)},o-R)))},()=>i&&u(i)]}const $e=(e,t,n=3)=>{let o=0;const i=Sn(50,250);return On(a=>{const u=a.loaded,f=a.lengthComputable?a.total:void 0,E=u-o,h=i(E),p=u<=f;o=u;const R={loaded:u,total:f,progress:f?u/f:void 0,bytes:E,rate:h||void 0,estimated:h&&f&&p?(f-u)/h:void 0,event:a,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(R)},n)},Nt=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},jt=e=>(...t)=>l.asap(()=>e(...t)),An=X.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,X.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(X.origin),X.navigator&&/(msie|trident)/i.test(X.navigator.userAgent)):()=>!0,vn=X.hasStandardBrowserEnv?{write(e,t,n,o,i,a){const u=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),l.isString(o)&&u.push("path="+o),l.isString(i)&&u.push("domain="+i),a===!0&&u.push("secure"),document.cookie=u.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(){return null},remove(){}};function Cn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xt(e,t,n){let o=!Cn(t);return e&&(o||n==!1)?kn(e,t):t}const Lt=e=>e instanceof ee?{...e}:e;function Ee(e,t){t=t||{};const n={};function o(h,p,R,L){return l.isPlainObject(h)&&l.isPlainObject(p)?l.merge.call({caseless:L},h,p):l.isPlainObject(p)?l.merge({},p):l.isArray(p)?p.slice():p}function i(h,p,R,L){if(l.isUndefined(p)){if(!l.isUndefined(h))return o(void 0,h,R,L)}else return o(h,p,R,L)}function a(h,p){if(!l.isUndefined(p))return o(void 0,p)}function u(h,p){if(l.isUndefined(p)){if(!l.isUndefined(h))return o(void 0,h)}else return o(void 0,p)}function f(h,p,R){if(R in t)return o(h,p);if(R in e)return o(void 0,h)}const E={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(h,p,R)=>i(Lt(h),Lt(p),R,!0)};return l.forEach(Object.keys({...e,...t}),function(p){const R=E[p]||i,L=R(e[p],t[p],p);l.isUndefined(L)&&R!==f||(n[p]=L)}),n}const Ut=e=>{const t=Ee({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:u,auth:f}=t;if(t.headers=u=ee.from(u),t.url=St(xt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),l.isFormData(n)){if(X.hasStandardBrowserEnv||X.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(l.isFunction(n.getHeaders)){const E=n.getHeaders(),h=["content-type","content-length"];Object.entries(E).forEach(([p,R])=>{h.includes(p.toLowerCase())&&u.set(p,R)})}}if(X.hasStandardBrowserEnv&&(o&&l.isFunction(o)&&(o=o(t)),o||o!==!1&&An(t.url))){const E=i&&a&&vn.read(a);E&&u.set(i,E)}return t},Pn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const i=Ut(e);let a=i.data;const u=ee.from(i.headers).normalize();let{responseType:f,onUploadProgress:E,onDownloadProgress:h}=i,p,R,L,$,m;function S(){$&&$(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let _=new XMLHttpRequest;_.open(i.method.toUpperCase(),i.url,!0),_.timeout=i.timeout;function M(){if(!_)return;const q=ee.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),H={data:!f||f==="text"||f==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:q,config:e,request:_};Pt(function(v){n(v),S()},function(v){o(v),S()},H),_=null}"onloadend"in _?_.onloadend=M:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(M)},_.onabort=function(){_&&(o(new C("Request aborted",C.ECONNABORTED,e,_)),_=null)},_.onerror=function(B){const H=B&&B.message?B.message:"Network Error",Q=new C(H,C.ERR_NETWORK,e,_);Q.event=B||null,o(Q),_=null},_.ontimeout=function(){let B=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const H=i.transitional||At;i.timeoutErrorMessage&&(B=i.timeoutErrorMessage),o(new C(B,H.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,_)),_=null},a===void 0&&u.setContentType(null),"setRequestHeader"in _&&l.forEach(u.toJSON(),function(B,H){_.setRequestHeader(H,B)}),l.isUndefined(i.withCredentials)||(_.withCredentials=!!i.withCredentials),f&&f!=="json"&&(_.responseType=i.responseType),h&&([L,m]=$e(h,!0),_.addEventListener("progress",L)),E&&_.upload&&([R,$]=$e(E),_.upload.addEventListener("progress",R),_.upload.addEventListener("loadend",$)),(i.cancelToken||i.signal)&&(p=q=>{_&&(o(!q||q.type?new Re(null,e,_):q),_.abort(),_=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const W=Tn(i.url);if(W&&X.protocols.indexOf(W)===-1){o(new C("Unsupported protocol "+W+":",C.ERR_BAD_REQUEST,e));return}_.send(a||null)})},Nn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,i;const a=function(h){if(!i){i=!0,f();const p=h instanceof Error?h:this.reason;o.abort(p instanceof C?p:new Re(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,a(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const f=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),e=null)};e.forEach(h=>h.addEventListener("abort",a));const{signal:E}=o;return E.unsubscribe=()=>l.asap(f),E}},jn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,i;for(;o<n;)i=o+t,yield e.slice(o,i),o=i},xn=async function*(e,t){for await(const n of Ln(e))yield*jn(n,t)},Ln=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},Dt=(e,t,n,o)=>{const i=xn(e,t);let a=0,u,f=E=>{u||(u=!0,o&&o(E))};return new ReadableStream({async pull(E){try{const{done:h,value:p}=await i.next();if(h){f(),E.close();return}let R=p.byteLength;if(n){let L=a+=R;n(L)}E.enqueue(new Uint8Array(p))}catch(h){throw f(h),h}},cancel(E){return f(E),i.return()}},{highWaterMark:2})},Mt=64*1024,{isFunction:qe}=l,Un=(({Request:e,Response:t})=>({Request:e,Response:t}))(l.global),{ReadableStream:Ft,TextEncoder:$t}=l.global,qt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dn=e=>{e=l.merge.call({skipUndefined:!0},Un,e);const{fetch:t,Request:n,Response:o}=e,i=t?qe(t):typeof fetch=="function",a=qe(n),u=qe(o);if(!i)return!1;const f=i&&qe(Ft),E=i&&(typeof $t=="function"?(m=>S=>m.encode(S))(new $t):async m=>new Uint8Array(await new n(m).arrayBuffer())),h=a&&f&&qt(()=>{let m=!1;const S=new n(X.origin,{body:new Ft,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!S}),p=u&&f&&qt(()=>l.isReadableStream(new o("").body)),R={stream:p&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!R[m]&&(R[m]=(S,_)=>{let M=S&&S[m];if(M)return M.call(S);throw new C(`Response type '${m}' is not supported`,C.ERR_NOT_SUPPORT,_)})});const L=async m=>{if(m==null)return 0;if(l.isBlob(m))return m.size;if(l.isSpecCompliantForm(m))return(await new n(X.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(l.isArrayBufferView(m)||l.isArrayBuffer(m))return m.byteLength;if(l.isURLSearchParams(m)&&(m=m+""),l.isString(m))return(await E(m)).byteLength},$=async(m,S)=>{const _=l.toFiniteNumber(m.getContentLength());return _??L(S)};return async m=>{let{url:S,method:_,data:M,signal:W,cancelToken:q,timeout:B,onDownloadProgress:H,onUploadProgress:Q,responseType:v,headers:le,withCredentials:V="same-origin",fetchOptions:ae}=Ut(m),fe=t||fetch;v=v?(v+"").toLowerCase():"text";let D=Nn([W,q&&q.toAbortSignal()],B),te=null;const K=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let re;try{if(Q&&h&&_!=="get"&&_!=="head"&&(re=await $(le,M))!==0){let s=new n(S,{method:"POST",body:M,duplex:"half"}),d;if(l.isFormData(M)&&(d=s.headers.get("content-type"))&&le.setContentType(d),s.body){const[w,g]=Nt(re,$e(jt(Q)));M=Dt(s.body,Mt,w,g)}}l.isString(V)||(V=V?"include":"omit");const I=a&&"credentials"in n.prototype,ne={...ae,signal:D,method:_.toUpperCase(),headers:le.normalize().toJSON(),body:M,duplex:"half",credentials:I?V:void 0};te=a&&new n(S,ne);let G=await(a?fe(te,ae):fe(S,ne));const oe=p&&(v==="stream"||v==="response");if(p&&(H||oe&&K)){const s={};["status","statusText","headers"].forEach(k=>{s[k]=G[k]});const d=l.toFiniteNumber(G.headers.get("content-length")),[w,g]=H&&Nt(d,$e(jt(H),!0))||[];G=new o(Dt(G.body,Mt,w,()=>{g&&g(),K&&K()}),s)}v=v||"text";let de=await R[l.findKey(R,v)||"text"](G,m);return!oe&&K&&K(),await new Promise((s,d)=>{Pt(s,d,{data:de,headers:ee.from(G.headers),status:G.status,statusText:G.statusText,config:m,request:te})})}catch(I){throw K&&K(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,m,te),{cause:I.cause||I}):C.from(I,I&&I.code,m,te)}}},Mn=new Map,It=e=>{let t=e?e.env:{};const{fetch:n,Request:o,Response:i}=t,a=[o,i,n];let u=a.length,f=u,E,h,p=Mn;for(;f--;)E=a[f],h=p.get(E),h===void 0&&p.set(E,h=f?new Map:Dn(t)),p=h;return h};It();const nt={http:on,xhr:Pn,fetch:{get:It}};l.forEach(nt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bt=e=>`- ${e}`,Fn=e=>l.isFunction(e)||e===null||e===!1,Ht={getAdapter:(e,t)=>{e=l.isArray(e)?e:[e];const{length:n}=e;let o,i;const a={};for(let u=0;u<n;u++){o=e[u];let f;if(i=o,!Fn(o)&&(i=nt[(f=String(o)).toLowerCase()],i===void 0))throw new C(`Unknown adapter '${f}'`);if(i&&(l.isFunction(i)||(i=i.get(t))))break;a[f||"#"+u]=i}if(!i){const u=Object.entries(a).map(([E,h])=>`adapter ${E} `+(h===!1?"is not supported by the environment":"is not available in the build"));let f=n?u.length>1?`since :
4
- `+u.map(Bt).join(`
5
- `):" "+Bt(u[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return i},adapters:nt};function ot(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function zt(e){return ot(e),e.headers=ee.from(e.headers),e.data=rt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ht.getAdapter(e.adapter||ve.adapter,e)(e).then(function(o){return ot(e),o.data=rt.call(e,e.transformResponse,o),o.headers=ee.from(o.headers),o},function(o){return kt(o)||(ot(e),o&&o.response&&(o.response.data=rt.call(e,e.transformResponse,o.response),o.response.headers=ee.from(o.response.headers))),Promise.reject(o)})}const Yt="1.12.2",Ie={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ie[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const Wt={};Ie.transitional=function(t,n,o){function i(a,u){return"[Axios v"+Yt+"] Transitional option '"+a+"'"+u+(o?". "+o:"")}return(a,u,f)=>{if(t===!1)throw new C(i(u," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!Wt[u]&&(Wt[u]=!0,console.warn(i(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,f):!0}},Ie.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function $n(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let i=o.length;for(;i-- >0;){const a=o[i],u=t[a];if(u){const f=e[a],E=f===void 0||u(f,a,e);if(E!==!0)throw new C("option "+a+" must be "+E,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+a,C.ERR_BAD_OPTION)}}const Be={assertOptions:$n,validators:Ie},ue=Be.validators;let be=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ot,response:new Ot}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
- `+a):o.stack=a}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ee(this.defaults,n);const{transitional:o,paramsSerializer:i,headers:a}=n;o!==void 0&&Be.assertOptions(o,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),i!=null&&(l.isFunction(i)?n.paramsSerializer={serialize:i}:Be.assertOptions(i,{encode:ue.function,serialize:ue.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Be.assertOptions(n,{baseUrl:ue.spelling("baseURL"),withXsrfToken:ue.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&l.merge(a.common,a[n.method]);a&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=ee.concat(u,a);const f=[];let E=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(E=E&&S.synchronous,f.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let p,R=0,L;if(!E){const m=[zt.bind(this),void 0];for(m.unshift(...f),m.push(...h),L=m.length,p=Promise.resolve(n);R<L;)p=p.then(m[R++],m[R++]);return p}L=f.length;let $=n;for(;R<L;){const m=f[R++],S=f[R++];try{$=m($)}catch(_){S.call(this,_);break}}try{p=zt.call(this,$)}catch(m){return Promise.reject(m)}for(R=0,L=h.length;R<L;)p=p.then(h[R++],h[R++]);return p}getUri(t){t=Ee(this.defaults,t);const n=xt(t.baseURL,t.url,t.allowAbsoluteUrls);return St(n,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){be.prototype[t]=function(n,o){return this.request(Ee(o||{},{method:t,url:n,data:(o||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function n(o){return function(a,u,f){return this.request(Ee(f||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}be.prototype[t]=n(),be.prototype[t+"Form"]=n(!0)});let qn=class wr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const o=this;this.promise.then(i=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](i);o._listeners=null}),this.promise.then=i=>{let a;const u=new Promise(f=>{o.subscribe(f),a=f}).then(i);return u.cancel=function(){o.unsubscribe(a)},u},t(function(a,u,f){o.reason||(o.reason=new Re(a,u,f),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new wr(function(i){t=i}),cancel:t}}};function In(e){return function(n){return e.apply(null,n)}}function Bn(e){return l.isObject(e)&&e.isAxiosError===!0}const st={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(st).forEach(([e,t])=>{st[t]=e});function Vt(e){const t=new be(e),n=we(be.prototype.request,t);return l.extend(n,be.prototype,t,{allOwnKeys:!0}),l.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Vt(Ee(e,i))},n}const Y=Vt(ve);Y.Axios=be,Y.CanceledError=Re,Y.CancelToken=qn,Y.isCancel=kt,Y.VERSION=Yt,Y.toFormData=Me,Y.AxiosError=C,Y.Cancel=Y.CanceledError,Y.all=function(t){return Promise.all(t)},Y.spread=In,Y.isAxiosError=Bn,Y.mergeConfig=Ee,Y.AxiosHeaders=ee,Y.formToJSON=e=>vt(l.isHTMLForm(e)?new FormData(e):e),Y.getAdapter=Ht.getAdapter,Y.HttpStatusCode=st,Y.default=Y;const{Axios:po,AxiosError:Hn,CanceledError:ho,isCancel:mo,CancelToken:yo,VERSION:Eo,all:bo,Cancel:wo,isAxiosError:go,spread:_o,toFormData:Ro,AxiosHeaders:zn,HttpStatusCode:To,formToJSON:So,getAdapter:Oo,mergeConfig:Ao}=Y;function it(e,t,n=[]){return{handle:(o,i)=>{let a;for(const f of Array.isArray(o)?o:[o]){const E=e.find(h=>h.ErrorCode===t[f]);if(E){a=i(f,E);break}}let u=n;return a!==void 0&&(u=[...u,a]),it(e,t,u)},handleAll:(o,i)=>{let a;const u=(Array.isArray(o)?o:[o]).reduce((E,h)=>{const p=e.filter(R=>R.ErrorCode===t[h]);return p.length===0?E:[...E,{errorName:h,errors:p}]},[]);u.length>0&&(a=i(u));let f=n;return a!==void 0&&(f=[...f,a]),it(e,t,f)},check:(o=>{if(o)return n.reduce(o.reducer,o.initialValue)})}}function Yn(e,t){const n={...t,success:-1,failure:-2},o=e.isSuccess?e.result.WasSuccessful?[{ErrorMessage:"",PropertyName:"",ErrorCode:-1}]:e.result.ValidationErrors:[{ErrorMessage:"",PropertyName:"",ErrorCode:-2}];return it(o,n)}function Jt(e){return{isSuccess:!0,result:e}}function ce(e,t){return{isSuccess:!1,isAborted:!!t?.isAborted,error:e}}function Kt({cqrsEndpoint:e,tokenProvider:t,axiosOptions:n,tokenHeader:o="Authorization"}){const i=Y.create({baseURL:e,...n});return i.interceptors.request.use(async a=>{const u=await t?.getToken();return u&&a.headers?.set(o,`Bearer ${u}`),a}),i.interceptors.response.use(a=>(a.data=Jt(a.data),a),async a=>{if(!(a instanceof Hn))return{data:ce(`Unknown error ${a}`)};if(a.code==="ERR_CANCELED")return{data:ce(a,{isAborted:!0})};if(!a.response)return{data:ce(a)};const u=a.response;switch(a.response.status){case 401:{let f=a.config;if(f?.params?.isRetry){u.data=ce("The request has not been authorized and token refresh did not help");break}if(!t?.invalidateToken){u.data=ce("User needs to be authenticated to execute the command/query/operation");break}if(!await t.invalidateToken()){u.data=ce("Cannot refresh access token after the server returned 401 Unauthorized");break}return f??={headers:new zn},f.params??={},f.params.isRetry=!0,await i.request(f)}case 400:u.data=ce("The request was malformed");break;case 403:u.data=ce("User is not authorized to execute the command/query/operation");break;case 404:u.data=ce("Command/query/operation not found");break;case 422:u.data=Jt(a.response.data);break;default:u.data=ce(`Cannot execute command/query/operation, server returned a ${a.response.status} code`);break}return u}),{createQuery(a){return u=>{const f=new AbortController,E=i.post("query/"+a,u,{signal:f.signal}).then(h=>h.data);return E.abort=f.abort.bind(f),E}},createOperation(a){return u=>i.post("operation/"+a,u).then(f=>f.data)},createCommand(a,u){async function f(E){return(await i.post("command/"+a,E)).data}return f.handle=E=>f(E).then(h=>Yn(h,u)),f}}}var He={exports:{}},ke={};var Gt;function Wn(){if(Gt)return ke;Gt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,i,a){var u=null;if(a!==void 0&&(u=""+a),i.key!==void 0&&(u=""+i.key),"key"in i){a={};for(var f in i)f!=="key"&&(a[f]=i[f])}else a=i;return i=a.ref,{$$typeof:e,type:o,key:u,ref:i!==void 0?i:null,props:a}}return ke.Fragment=t,ke.jsx=n,ke.jsxs=n,ke}var Pe={},ze={exports:{}},A={};var Xt;function Vn(){if(Xt)return A;Xt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),L=Symbol.iterator;function $(s){return s===null||typeof s!="object"?null:(s=L&&s[L]||s["@@iterator"],typeof s=="function"?s:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function M(s,d,w){this.props=s,this.context=d,this.refs=_,this.updater=w||m}M.prototype.isReactComponent={},M.prototype.setState=function(s,d){if(typeof s!="object"&&typeof s!="function"&&s!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,s,d,"setState")},M.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function W(){}W.prototype=M.prototype;function q(s,d,w){this.props=s,this.context=d,this.refs=_,this.updater=w||m}var B=q.prototype=new W;B.constructor=q,S(B,M.prototype),B.isPureReactComponent=!0;var H=Array.isArray;function Q(){}var v={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function V(s,d,w){var g=w.ref;return{$$typeof:e,type:s,key:d,ref:g!==void 0?g:null,props:w}}function ae(s,d){return V(s.type,d,s.props)}function fe(s){return typeof s=="object"&&s!==null&&s.$$typeof===e}function D(s){var d={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(w){return d[w]})}var te=/\/+/g;function K(s,d){return typeof s=="object"&&s!==null&&s.key!=null?D(""+s.key):d.toString(36)}function re(s){switch(s.status){case"fulfilled":return s.value;case"rejected":throw s.reason;default:switch(typeof s.status=="string"?s.then(Q,Q):(s.status="pending",s.then(function(d){s.status==="pending"&&(s.status="fulfilled",s.value=d)},function(d){s.status==="pending"&&(s.status="rejected",s.reason=d)})),s.status){case"fulfilled":return s.value;case"rejected":throw s.reason}}throw s}function I(s,d,w,g,k){var U=typeof s;(U==="undefined"||U==="boolean")&&(s=null);var O=!1;if(s===null)O=!0;else switch(U){case"bigint":case"string":case"number":O=!0;break;case"object":switch(s.$$typeof){case e:case t:O=!0;break;case p:return O=s._init,I(O(s._payload),d,w,g,k)}}if(O)return k=k(s),O=g===""?"."+K(s,0):g,H(k)?(w="",O!=null&&(w=O.replace(te,"$&/")+"/"),I(k,d,w,"",function(pe){return pe})):k!=null&&(fe(k)&&(k=ae(k,w+(k.key==null||s&&s.key===k.key?"":(""+k.key).replace(te,"$&/")+"/")+O)),d.push(k)),1;O=0;var J=g===""?".":g+":";if(H(s))for(var z=0;z<s.length;z++)g=s[z],U=J+K(g,z),O+=I(g,d,w,U,k);else if(z=$(s),typeof z=="function")for(s=z.call(s),z=0;!(g=s.next()).done;)g=g.value,U=J+K(g,z++),O+=I(g,d,w,U,k);else if(U==="object"){if(typeof s.then=="function")return I(re(s),d,w,g,k);throw d=String(s),Error("Objects are not valid as a React child (found: "+(d==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":d)+"). If you meant to render a collection of children, use an array instead.")}return O}function ne(s,d,w){if(s==null)return s;var g=[],k=0;return I(s,g,"","",function(U){return d.call(w,U,k++)}),g}function G(s){if(s._status===-1){var d=s._result;d=d(),d.then(function(w){(s._status===0||s._status===-1)&&(s._status=1,s._result=w)},function(w){(s._status===0||s._status===-1)&&(s._status=2,s._result=w)}),s._status===-1&&(s._status=0,s._result=d)}if(s._status===1)return s._result.default;throw s._result}var oe=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},de={map:ne,forEach:function(s,d,w){ne(s,function(){d.apply(this,arguments)},w)},count:function(s){var d=0;return ne(s,function(){d++}),d},toArray:function(s){return ne(s,function(d){return d})||[]},only:function(s){if(!fe(s))throw Error("React.Children.only expected to receive a single React element child.");return s}};return A.Activity=R,A.Children=de,A.Component=M,A.Fragment=n,A.Profiler=i,A.PureComponent=q,A.StrictMode=o,A.Suspense=E,A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=v,A.__COMPILER_RUNTIME={__proto__:null,c:function(s){return v.H.useMemoCache(s)}},A.cache=function(s){return function(){return s.apply(null,arguments)}},A.cacheSignal=function(){return null},A.cloneElement=function(s,d,w){if(s==null)throw Error("The argument must be a React element, but you passed "+s+".");var g=S({},s.props),k=s.key;if(d!=null)for(U in d.key!==void 0&&(k=""+d.key),d)!le.call(d,U)||U==="key"||U==="__self"||U==="__source"||U==="ref"&&d.ref===void 0||(g[U]=d[U]);var U=arguments.length-2;if(U===1)g.children=w;else if(1<U){for(var O=Array(U),J=0;J<U;J++)O[J]=arguments[J+2];g.children=O}return V(s.type,k,g)},A.createContext=function(s){return s={$$typeof:u,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null},s.Provider=s,s.Consumer={$$typeof:a,_context:s},s},A.createElement=function(s,d,w){var g,k={},U=null;if(d!=null)for(g in d.key!==void 0&&(U=""+d.key),d)le.call(d,g)&&g!=="key"&&g!=="__self"&&g!=="__source"&&(k[g]=d[g]);var O=arguments.length-2;if(O===1)k.children=w;else if(1<O){for(var J=Array(O),z=0;z<O;z++)J[z]=arguments[z+2];k.children=J}if(s&&s.defaultProps)for(g in O=s.defaultProps,O)k[g]===void 0&&(k[g]=O[g]);return V(s,U,k)},A.createRef=function(){return{current:null}},A.forwardRef=function(s){return{$$typeof:f,render:s}},A.isValidElement=fe,A.lazy=function(s){return{$$typeof:p,_payload:{_status:-1,_result:s},_init:G}},A.memo=function(s,d){return{$$typeof:h,type:s,compare:d===void 0?null:d}},A.startTransition=function(s){var d=v.T,w={};v.T=w;try{var g=s(),k=v.S;k!==null&&k(w,g),typeof g=="object"&&g!==null&&typeof g.then=="function"&&g.then(Q,oe)}catch(U){oe(U)}finally{d!==null&&w.types!==null&&(d.types=w.types),v.T=d}},A.unstable_useCacheRefresh=function(){return v.H.useCacheRefresh()},A.use=function(s){return v.H.use(s)},A.useActionState=function(s,d,w){return v.H.useActionState(s,d,w)},A.useCallback=function(s,d){return v.H.useCallback(s,d)},A.useContext=function(s){return v.H.useContext(s)},A.useDebugValue=function(){},A.useDeferredValue=function(s,d){return v.H.useDeferredValue(s,d)},A.useEffect=function(s,d){return v.H.useEffect(s,d)},A.useEffectEvent=function(s){return v.H.useEffectEvent(s)},A.useId=function(){return v.H.useId()},A.useImperativeHandle=function(s,d,w){return v.H.useImperativeHandle(s,d,w)},A.useInsertionEffect=function(s,d){return v.H.useInsertionEffect(s,d)},A.useLayoutEffect=function(s,d){return v.H.useLayoutEffect(s,d)},A.useMemo=function(s,d){return v.H.useMemo(s,d)},A.useOptimistic=function(s,d){return v.H.useOptimistic(s,d)},A.useReducer=function(s,d,w){return v.H.useReducer(s,d,w)},A.useRef=function(s){return v.H.useRef(s)},A.useState=function(s){return v.H.useState(s)},A.useSyncExternalStore=function(s,d,w){return v.H.useSyncExternalStore(s,d,w)},A.useTransition=function(){return v.H.useTransition()},A.version="19.2.0",A}var Ne={exports:{}};Ne.exports;var Qt;function Jn(){return Qt||(Qt=1,(function(e,t){process.env.NODE_ENV!=="production"&&(function(){function n(r,c){Object.defineProperty(a.prototype,r,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",c[0],c[1])}})}function o(r){return r===null||typeof r!="object"?null:(r=sr&&r[sr]||r["@@iterator"],typeof r=="function"?r:null)}function i(r,c){r=(r=r.constructor)&&(r.displayName||r.name)||"ReactClass";var y=r+"."+c;ir[y]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",c,r),ir[y]=!0)}function a(r,c,y){this.props=r,this.context=c,this.refs=ut,this.updater=y||ar}function u(){}function f(r,c,y){this.props=r,this.context=c,this.refs=ut,this.updater=y||ar}function E(){}function h(r){return""+r}function p(r){try{h(r);var c=!1}catch{c=!0}if(c){c=console;var y=c.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return y.call(c,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),h(r)}}function R(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===to?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case s:return"Fragment";case w:return"Profiler";case d:return"StrictMode";case O:return"Suspense";case J:return"SuspenseList";case or:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case de:return"Portal";case k:return r.displayName||"Context";case g:return(r._context.displayName||"Context")+".Consumer";case U:var c=r.render;return r=r.displayName,r||(r=c.displayName||c.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case z:return c=r.displayName||null,c!==null?c:R(r.type)||"Memo";case pe:c=r._payload,r=r._init;try{return R(r(c))}catch{}}return null}function L(r){if(r===s)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===pe)return"<...>";try{var c=R(r);return c?"<"+c+">":"<...>"}catch{return"<...>"}}function $(){var r=N.A;return r===null?null:r.getOwner()}function m(){return Error("react-stack-top-frame")}function S(r){if(Ye.call(r,"key")){var c=Object.getOwnPropertyDescriptor(r,"key").get;if(c&&c.isReactWarning)return!1}return r.key!==void 0}function _(r,c){function y(){fr||(fr=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",c))}y.isReactWarning=!0,Object.defineProperty(r,"key",{get:y,configurable:!0})}function M(){var r=R(this.type);return pr[r]||(pr[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function W(r,c,y,b,T,j){var P=y.ref;return r={$$typeof:oe,type:r,key:c,props:y,_owner:b},(P!==void 0?P:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:M}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:j}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function q(r,c){return c=W(r.type,c,r.props,r._owner,r._debugStack,r._debugTask),r._store&&(c._store.validated=r._store.validated),c}function B(r){H(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===pe&&(r._payload.status==="fulfilled"?H(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function H(r){return typeof r=="object"&&r!==null&&r.$$typeof===oe}function Q(r){var c={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(y){return c[y]})}function v(r,c){return typeof r=="object"&&r!==null&&r.key!=null?(p(r.key),Q(""+r.key)):c.toString(36)}function le(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(E,E):(r.status="pending",r.then(function(c){r.status==="pending"&&(r.status="fulfilled",r.value=c)},function(c){r.status==="pending"&&(r.status="rejected",r.reason=c)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function V(r,c,y,b,T){var j=typeof r;(j==="undefined"||j==="boolean")&&(r=null);var P=!1;if(r===null)P=!0;else switch(j){case"bigint":case"string":case"number":P=!0;break;case"object":switch(r.$$typeof){case oe:case de:P=!0;break;case pe:return P=r._init,V(P(r._payload),c,y,b,T)}}if(P){P=r,T=T(P);var F=b===""?"."+v(P,0):b;return cr(T)?(y="",F!=null&&(y=F.replace(mr,"$&/")+"/"),V(T,c,y,"",function(he){return he})):T!=null&&(H(T)&&(T.key!=null&&(P&&P.key===T.key||p(T.key)),y=q(T,y+(T.key==null||P&&P.key===T.key?"":(""+T.key).replace(mr,"$&/")+"/")+F),b!==""&&P!=null&&H(P)&&P.key==null&&P._store&&!P._store.validated&&(y._store.validated=2),T=y),c.push(T)),1}if(P=0,F=b===""?".":b+":",cr(r))for(var x=0;x<r.length;x++)b=r[x],j=F+v(b,x),P+=V(b,c,y,j,T);else if(x=o(r),typeof x=="function")for(x===r.entries&&(hr||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),hr=!0),r=x.call(r),x=0;!(b=r.next()).done;)b=b.value,j=F+v(b,x++),P+=V(b,c,y,j,T);else if(j==="object"){if(typeof r.then=="function")return V(le(r),c,y,b,T);throw c=String(r),Error("Objects are not valid as a React child (found: "+(c==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":c)+"). If you meant to render a collection of children, use an array instead.")}return P}function ae(r,c,y){if(r==null)return r;var b=[],T=0;return V(r,b,"","",function(j){return c.call(y,j,T++)}),b}function fe(r){if(r._status===-1){var c=r._ioInfo;c!=null&&(c.start=c.end=performance.now()),c=r._result;var y=c();if(y.then(function(T){if(r._status===0||r._status===-1){r._status=1,r._result=T;var j=r._ioInfo;j!=null&&(j.end=performance.now()),y.status===void 0&&(y.status="fulfilled",y.value=T)}},function(T){if(r._status===0||r._status===-1){r._status=2,r._result=T;var j=r._ioInfo;j!=null&&(j.end=performance.now()),y.status===void 0&&(y.status="rejected",y.reason=T)}}),c=r._ioInfo,c!=null){c.value=y;var b=y.displayName;typeof b=="string"&&(c.name=b)}r._status===-1&&(r._status=0,r._result=y)}if(r._status===1)return c=r._result,c===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
-
8
- Your code should look like:
9
- const MyComponent = lazy(() => import('./MyComponent'))
10
-
11
- Did you accidentally put curly braces around the import?`,c),"default"in c||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
12
-
13
- Your code should look like:
14
- const MyComponent = lazy(() => import('./MyComponent'))`,c),c.default;throw r._result}function D(){var r=N.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
15
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
16
- 2. You might be breaking the Rules of Hooks
17
- 3. You might have more than one copy of React in the same app
18
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r}function te(){N.asyncTransitions--}function K(r){if(We===null)try{var c=("require"+Math.random()).slice(0,7);We=(e&&e[c]).call(e,"timers").setImmediate}catch{We=function(b){Er===!1&&(Er=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var T=new MessageChannel;T.port1.onmessage=b,T.port2.postMessage(void 0)}}return We(r)}function re(r){return 1<r.length&&typeof AggregateError=="function"?new AggregateError(r):r[0]}function I(r,c){c!==Ve-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Ve=c}function ne(r,c,y){var b=N.actQueue;if(b!==null)if(b.length!==0)try{G(b),K(function(){return ne(r,c,y)});return}catch(T){N.thrownErrors.push(T)}else N.actQueue=null;0<N.thrownErrors.length?(b=re(N.thrownErrors),N.thrownErrors.length=0,y(b)):c(r)}function G(r){if(!ct){ct=!0;var c=0;try{for(;c<r.length;c++){var y=r[c];do{N.didUsePromise=!1;var b=y(!1);if(b!==null){if(N.didUsePromise){r[c]=y,r.splice(0,c);return}y=b}else break}while(!0)}r.length=0}catch(T){r.splice(0,c+1),N.thrownErrors.push(T)}finally{ct=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var oe=Symbol.for("react.transitional.element"),de=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),k=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),or=Symbol.for("react.activity"),sr=Symbol.iterator,ir={},ar={isMounted:function(){return!1},enqueueForceUpdate:function(r){i(r,"forceUpdate")},enqueueReplaceState:function(r){i(r,"replaceState")},enqueueSetState:function(r){i(r,"setState")}},ur=Object.assign,ut={};Object.freeze(ut),a.prototype.isReactComponent={},a.prototype.setState=function(r,c){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,c,"setState")},a.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};var se={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(je in se)se.hasOwnProperty(je)&&n(je,se[je]);u.prototype=a.prototype,se=f.prototype=new u,se.constructor=f,ur(se,a.prototype),se.isPureReactComponent=!0;var cr=Array.isArray,to=Symbol.for("react.client.reference"),N={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Ye=Object.prototype.hasOwnProperty,lr=console.createTask?console.createTask:function(){return null};se={react_stack_bottom_frame:function(r){return r()}};var fr,dr,pr={},ro=se.react_stack_bottom_frame.bind(se,m)(),no=lr(L(m)),hr=!1,mr=/\/+/g,yr=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Er=!1,We=null,Ve=0,Je=!1,ct=!1,br=typeof queueMicrotask=="function"?function(r){queueMicrotask(function(){return queueMicrotask(r)})}:K;se=Object.freeze({__proto__:null,c:function(r){return D().useMemoCache(r)}});var je={map:ae,forEach:function(r,c,y){ae(r,function(){c.apply(this,arguments)},y)},count:function(r){var c=0;return ae(r,function(){c++}),c},toArray:function(r){return ae(r,function(c){return c})||[]},only:function(r){if(!H(r))throw Error("React.Children.only expected to receive a single React element child.");return r}};t.Activity=or,t.Children=je,t.Component=a,t.Fragment=s,t.Profiler=w,t.PureComponent=f,t.StrictMode=d,t.Suspense=O,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,t.__COMPILER_RUNTIME=se,t.act=function(r){var c=N.actQueue,y=Ve;Ve++;var b=N.actQueue=c!==null?c:[],T=!1;try{var j=r()}catch(x){N.thrownErrors.push(x)}if(0<N.thrownErrors.length)throw I(c,y),r=re(N.thrownErrors),N.thrownErrors.length=0,r;if(j!==null&&typeof j=="object"&&typeof j.then=="function"){var P=j;return br(function(){T||Je||(Je=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(x,he){T=!0,P.then(function(Te){if(I(c,y),y===0){try{G(b),K(function(){return ne(Te,x,he)})}catch(so){N.thrownErrors.push(so)}if(0<N.thrownErrors.length){var oo=re(N.thrownErrors);N.thrownErrors.length=0,he(oo)}}else x(Te)},function(Te){I(c,y),0<N.thrownErrors.length&&(Te=re(N.thrownErrors),N.thrownErrors.length=0),he(Te)})}}}var F=j;if(I(c,y),y===0&&(G(b),b.length!==0&&br(function(){T||Je||(Je=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),N.actQueue=null),0<N.thrownErrors.length)throw r=re(N.thrownErrors),N.thrownErrors.length=0,r;return{then:function(x,he){T=!0,y===0?(N.actQueue=b,K(function(){return ne(F,x,he)})):x(F)}}},t.cache=function(r){return function(){return r.apply(null,arguments)}},t.cacheSignal=function(){return null},t.captureOwnerStack=function(){var r=N.getCurrentStack;return r===null?null:r()},t.cloneElement=function(r,c,y){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var b=ur({},r.props),T=r.key,j=r._owner;if(c!=null){var P;e:{if(Ye.call(c,"ref")&&(P=Object.getOwnPropertyDescriptor(c,"ref").get)&&P.isReactWarning){P=!1;break e}P=c.ref!==void 0}P&&(j=$()),S(c)&&(p(c.key),T=""+c.key);for(F in c)!Ye.call(c,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&c.ref===void 0||(b[F]=c[F])}var F=arguments.length-2;if(F===1)b.children=y;else if(1<F){P=Array(F);for(var x=0;x<F;x++)P[x]=arguments[x+2];b.children=P}for(b=W(r.type,T,b,j,r._debugStack,r._debugTask),T=2;T<arguments.length;T++)B(arguments[T]);return b},t.createContext=function(r){return r={$$typeof:k,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:g,_context:r},r._currentRenderer=null,r._currentRenderer2=null,r},t.createElement=function(r,c,y){for(var b=2;b<arguments.length;b++)B(arguments[b]);b={};var T=null;if(c!=null)for(x in dr||!("__self"in c)||"key"in c||(dr=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),S(c)&&(p(c.key),T=""+c.key),c)Ye.call(c,x)&&x!=="key"&&x!=="__self"&&x!=="__source"&&(b[x]=c[x]);var j=arguments.length-2;if(j===1)b.children=y;else if(1<j){for(var P=Array(j),F=0;F<j;F++)P[F]=arguments[F+2];Object.freeze&&Object.freeze(P),b.children=P}if(r&&r.defaultProps)for(x in j=r.defaultProps,j)b[x]===void 0&&(b[x]=j[x]);T&&_(b,typeof r=="function"?r.displayName||r.name||"Unknown":r);var x=1e4>N.recentlyCreatedOwnerStacks++;return W(r,T,b,$(),x?Error("react-stack-top-frame"):ro,x?lr(L(r)):no)},t.createRef=function(){var r={current:null};return Object.seal(r),r},t.forwardRef=function(r){r!=null&&r.$$typeof===z?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof r!="function"?console.error("forwardRef requires a render function but was given %s.",r===null?"null":typeof r):r.length!==0&&r.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",r.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),r!=null&&r.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var c={$$typeof:U,render:r},y;return Object.defineProperty(c,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(b){y=b,r.name||r.displayName||(Object.defineProperty(r,"name",{value:b}),r.displayName=b)}}),c},t.isValidElement=H,t.lazy=function(r){r={_status:-1,_result:r};var c={$$typeof:pe,_payload:r,_init:fe},y={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return r._ioInfo=y,c._debugInfo=[{awaited:y}],c},t.memo=function(r,c){r==null&&console.error("memo: The first argument must be a component. Instead received: %s",r===null?"null":typeof r),c={$$typeof:z,type:r,compare:c===void 0?null:c};var y;return Object.defineProperty(c,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(b){y=b,r.name||r.displayName||(Object.defineProperty(r,"name",{value:b}),r.displayName=b)}}),c},t.startTransition=function(r){var c=N.T,y={};y._updatedFibers=new Set,N.T=y;try{var b=r(),T=N.S;T!==null&&T(y,b),typeof b=="object"&&b!==null&&typeof b.then=="function"&&(N.asyncTransitions++,b.then(te,te),b.then(E,yr))}catch(j){yr(j)}finally{c===null&&y._updatedFibers&&(r=y._updatedFibers.size,y._updatedFibers.clear(),10<r&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),c!==null&&y.types!==null&&(c.types!==null&&c.types!==y.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),c.types=y.types),N.T=c}},t.unstable_useCacheRefresh=function(){return D().useCacheRefresh()},t.use=function(r){return D().use(r)},t.useActionState=function(r,c,y){return D().useActionState(r,c,y)},t.useCallback=function(r,c){return D().useCallback(r,c)},t.useContext=function(r){var c=D();return r.$$typeof===g&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),c.useContext(r)},t.useDebugValue=function(r,c){return D().useDebugValue(r,c)},t.useDeferredValue=function(r,c){return D().useDeferredValue(r,c)},t.useEffect=function(r,c){return r==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),D().useEffect(r,c)},t.useEffectEvent=function(r){return D().useEffectEvent(r)},t.useId=function(){return D().useId()},t.useImperativeHandle=function(r,c,y){return D().useImperativeHandle(r,c,y)},t.useInsertionEffect=function(r,c){return r==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),D().useInsertionEffect(r,c)},t.useLayoutEffect=function(r,c){return r==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),D().useLayoutEffect(r,c)},t.useMemo=function(r,c){return D().useMemo(r,c)},t.useOptimistic=function(r,c){return D().useOptimistic(r,c)},t.useReducer=function(r,c,y){return D().useReducer(r,c,y)},t.useRef=function(r){return D().useRef(r)},t.useState=function(r){return D().useState(r)},t.useSyncExternalStore=function(r,c,y){return D().useSyncExternalStore(r,c,y)},t.useTransition=function(){return D().useTransition()},t.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Ne,Ne.exports)),Ne.exports}var Zt;function er(){return Zt||(Zt=1,process.env.NODE_ENV==="production"?ze.exports=Vn():ze.exports=Jn()),ze.exports}var tr;function Kn(){return tr||(tr=1,process.env.NODE_ENV!=="production"&&(function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===fe?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case W:return"Profiler";case M:return"StrictMode";case Q:return"Suspense";case v:return"SuspenseList";case ae:return"Activity"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case S:return"Portal";case B:return s.displayName||"Context";case q:return(s._context.displayName||"Context")+".Consumer";case H:var d=s.render;return s=s.displayName,s||(s=d.displayName||d.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case le:return d=s.displayName||null,d!==null?d:e(s.type)||"Memo";case V:d=s._payload,s=s._init;try{return e(s(d))}catch{}}return null}function t(s){return""+s}function n(s){try{t(s);var d=!1}catch{d=!0}if(d){d=console;var w=d.error,g=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return w.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",g),t(s)}}function o(s){if(s===_)return"<>";if(typeof s=="object"&&s!==null&&s.$$typeof===V)return"<...>";try{var d=e(s);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function i(){var s=D.A;return s===null?null:s.getOwner()}function a(){return Error("react-stack-top-frame")}function u(s){if(te.call(s,"key")){var d=Object.getOwnPropertyDescriptor(s,"key").get;if(d&&d.isReactWarning)return!1}return s.key!==void 0}function f(s,d){function w(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}w.isReactWarning=!0,Object.defineProperty(s,"key",{get:w,configurable:!0})}function E(){var s=e(this.type);return ne[s]||(ne[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function h(s,d,w,g,k,U){var O=w.ref;return s={$$typeof:m,type:s,key:d,props:w,_owner:g},(O!==void 0?O:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:E}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(s,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.defineProperty(s,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function p(s,d,w,g,k,U){var O=d.children;if(O!==void 0)if(g)if(K(O)){for(g=0;g<O.length;g++)R(O[g]);Object.freeze&&Object.freeze(O)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(O);if(te.call(d,"key")){O=e(s);var J=Object.keys(d).filter(function(pe){return pe!=="key"});g=0<J.length?"{key: someKey, "+J.join(": ..., ")+": ...}":"{key: someKey}",de[O+g]||(J=0<J.length?"{"+J.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
19
- let props = %s;
20
- <%s {...props} />
21
- React keys must be passed directly to JSX without using spread:
22
- let props = %s;
23
- <%s key={someKey} {...props} />`,g,O,J,O),de[O+g]=!0)}if(O=null,w!==void 0&&(n(w),O=""+w),u(d)&&(n(d.key),O=""+d.key),"key"in d){w={};for(var z in d)z!=="key"&&(w[z]=d[z])}else w=d;return O&&f(w,typeof s=="function"?s.displayName||s.name||"Unknown":s),h(s,O,w,i(),k,U)}function R(s){L(s)?s._store&&(s._store.validated=1):typeof s=="object"&&s!==null&&s.$$typeof===V&&(s._payload.status==="fulfilled"?L(s._payload.value)&&s._payload.value._store&&(s._payload.value._store.validated=1):s._store&&(s._store.validated=1))}function L(s){return typeof s=="object"&&s!==null&&s.$$typeof===m}var $=er(),m=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),B=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),fe=Symbol.for("react.client.reference"),D=$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,K=Array.isArray,re=console.createTask?console.createTask:function(){return null};$={react_stack_bottom_frame:function(s){return s()}};var I,ne={},G=$.react_stack_bottom_frame.bind($,a)(),oe=re(o(a)),de={};Pe.Fragment=_,Pe.jsx=function(s,d,w){var g=1e4>D.recentlyCreatedOwnerStacks++;return p(s,d,w,!1,g?Error("react-stack-top-frame"):G,g?re(o(s)):oe)},Pe.jsxs=function(s,d,w){var g=1e4>D.recentlyCreatedOwnerStacks++;return p(s,d,w,!0,g?Error("react-stack-top-frame"):G,g?re(o(s)):oe)}})()),Pe}var rr;function Gn(){return rr||(rr=1,process.env.NODE_ENV==="production"?He.exports=Wn():He.exports=Kn()),He.exports}Gn(),er(),process.env.NODE_ENV;function Xn(e,t){return e.length===0?"":t(e[0])+e.slice(1)}function Qn(e){return Xn(e,t=>t.toLowerCase())}function at(e,t){if(e!=null){if(Array.isArray(e))return e.map(n=>at(n));if(typeof e=="object"){const n=Qn;return Object.entries(e).reduce((o,[i,a])=>({...o,[n(i)]:at(a)}),{})}return e}}function Zn(e){return at(e)}function nr(e){return e.isSuccess?{...e,result:Zn(e.result)}:e}function eo(e){const t=Kt(e);return{...t,createQuery(n){const o=t.createQuery(n);return i=>o(i).then(nr)},createOperation(n){const o=t.createOperation(n);return i=>o(i).then(nr)}}}me.mkCqrsClient=Kt,me.mkUncapitalizedCqrsClient=eo,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(r,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("axios"),require("@leancodepl/validation"),require("@leancodepl/utils")):typeof define=="function"&&define.amd?define(["exports","axios","@leancodepl/validation","@leancodepl/utils"],u):(r=typeof globalThis<"u"?globalThis:r||self,u(r["@leancodepl/axios-cqrs-client"]={},r.axios,r.validation,r.utils))})(this,(function(r,u,b,q){"use strict";function f(n){return{isSuccess:!0,result:n}}function s(n,o){return{isSuccess:!1,isAborted:!!o?.isAborted,error:n}}function h({cqrsEndpoint:n,tokenProvider:o,axiosOptions:d,tokenHeader:l="Authorization"}){const i=u.create({baseURL:n,...d});return i.interceptors.request.use(async e=>{const t=await o?.getToken();return t&&e.headers?.set(l,`Bearer ${t}`),e}),i.interceptors.response.use(e=>(e.data=f(e.data),e),async e=>{if(!(e instanceof u.AxiosError))return{data:s(`Unknown error ${e}`)};if(e.code==="ERR_CANCELED")return{data:s(e,{isAborted:!0})};if(!e.response)return{data:s(e)};const t=e.response;switch(e.response.status){case 401:{let a=e.config;if(a?.params?.isRetry){t.data=s("The request has not been authorized and token refresh did not help");break}if(!o?.invalidateToken){t.data=s("User needs to be authenticated to execute the command/query/operation");break}if(!await o.invalidateToken()){t.data=s("Cannot refresh access token after the server returned 401 Unauthorized");break}return a??={headers:new u.AxiosHeaders},a.params??={},a.params.isRetry=!0,await i.request(a)}case 400:t.data=s("The request was malformed");break;case 403:t.data=s("User is not authorized to execute the command/query/operation");break;case 404:t.data=s("Command/query/operation not found");break;case 422:t.data=f(e.response.data);break;default:t.data=s(`Cannot execute command/query/operation, server returned a ${e.response.status} code`);break}return t}),{createQuery(e){return t=>{const a=new AbortController,c=i.post("query/"+e,t,{signal:a.signal}).then(p=>p.data);return c.abort=a.abort.bind(a),c}},createOperation(e){return t=>i.post("operation/"+e,t).then(a=>a.data)},createCommand(e,t){async function a(c){return(await i.post("command/"+e,c)).data}return a.handle=c=>a(c).then(p=>b.handleResponse(p,t)),a}}}function m(n){return n.isSuccess?{...n,result:q.uncapitalizeDeep(n.result)}:n}function y(n){const o=h(n);return{...o,createQuery(d){const l=o.createQuery(d);return i=>l(i).then(m)},createOperation(d){const l=o.createOperation(d);return i=>l(i).then(m)}}}r.mkCqrsClient=h,r.mkUncapitalizedCqrsClient=y,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/axios-cqrs-client",
3
- "version": "9.7.4",
3
+ "version": "10.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,9 +22,9 @@
22
22
  "node": ">=22.0.0"
23
23
  },
24
24
  "dependencies": {
25
- "@leancodepl/cqrs-client-base": "9.7.4",
26
- "@leancodepl/utils": "9.7.4",
27
- "@leancodepl/validation": "9.7.4",
25
+ "@leancodepl/cqrs-client-base": "10.0.0",
26
+ "@leancodepl/utils": "10.0.0",
27
+ "@leancodepl/validation": "10.0.0",
28
28
  "axios": ">=1.6.0"
29
29
  },
30
30
  "repository": {