@enviabybus/react-utility-belt 2.2.2 → 2.3.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,10 +1,10 @@
1
- "use strict";var It=e=>{throw TypeError(e)};var ct=(e,t,r)=>t.has(e)||It("Cannot "+r);var d=(e,t,r)=>(ct(e,t,"read from private field"),r?r.call(e):t.get(e)),T=(e,t,r)=>t.has(e)?It("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),S=(e,t,r,n)=>(ct(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),x=(e,t,r)=>(ct(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("./chunks/http.helper.DIOQCl86.js"),ge=require("react"),mr=require("react/jsx-runtime"),z=require("./errors.cjs.js");function Gr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=Gr(ge),Xr=e=>({...t})=>e(t),Zr=({useAdapter:e,LoggerService:t})=>$e("ERROR_SERVICE",Xr(e),[t.ServiceProvider]),Yr=()=>({LoggerService:e})=>{const t=De(e),r=ge.useRef({}),n=(a,f)=>{const u=r.current;r.current={...u,[a]:[...u[a]||[],f]}},s=(a,f)=>{const u=r.current;r.current={...u,[a]:u[a].filter(c=>c!==f)}};return{raiseError:a=>{var f;t.error(a),(f=r.current[a.code])==null||f.forEach(u=>u(a))},useErrorHandler:(a,f)=>{const u=ee.compilerRuntimeExports.c(4);let c,h;u[0]!==f||u[1]!==a?(c=()=>(n(a,f),()=>{s(a,f)}),h=[a,f],u[0]=f,u[1]=a,u[2]=c,u[3]=h):(c=u[2],h=u[3]),ge.useEffect(c,h)}}},en=e=>({ErrorService:t,LoggerService:r})=>{const n=e(),s=De(r),o=De(t),i=E=>{const w=ee.lodashExports.omitBy(E,ee.lodashExports.isNil);s.info(`HTTP request: ${JSON.stringify(w)}`)},a=E=>{const{body:w,status:O}=E;s.info(`HTTP response: ${JSON.stringify({body:w,status:O})}`)},f=E=>E>=400&&E<600,u=E=>{const{details:w,message:O}=E;return o.raiseError(new z.HttpServiceError({code:z.HttpServiceErrorCode.Unauthorized,details:w,message:O}))},c=E=>{const{status:w}=E.details||{};if(!w||w>=500){const O=JSON.stringify(E);s.error(O)}else{if(w===401)return u(E);s.warn(E)}return o.raiseError(E)},h=async(E,w,O={})=>{i({method:E,...w});let A,F;const N=L=>{if(L instanceof z.HttpServiceError){F=L;return}A=L};switch(E){case"GET":{N(await n.get(w,O));break}case"DELETE":{N(await n.delete(w,O));break}case"PATCH":{N(await n.patch(w,O));break}case"POST":{N(await n.post(w,O));break}case"PUT":{N(await n.put(w,O));break}default:throw Error(`Unknown method HTTP method '${E}'`)}if(F)throw c(F),F;return A?(a(A),f(A.status)&&c(new z.HttpServiceError({details:{body:JSON.stringify(A.body),method:E,status:A.status,url:w.url}})),A):void 0};return{delete:(E,w={})=>h("DELETE",E,w),get:(E,w={})=>h("GET",E,w),patch:(E,w={})=>h("PATCH",E,w),post:async(E,w={})=>await h("POST",E,w),put:(E,w={})=>h("PUT",E,w)}},tn=({useAdapter:e,ErrorService:t,LoggerService:r})=>$e("HTTP_SERVICE",en(e),[t.ServiceProvider,r.ServiceProvider]);function yr(e,t){return function(){return e.apply(t,arguments)}}const{toString:rn}=Object.prototype,{getPrototypeOf:At}=Object,{iterator:et,toStringTag:br}=Symbol,tt=(e=>t=>{const r=rn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),V=e=>(e=e.toLowerCase(),t=>tt(t)===e),rt=e=>t=>typeof t===e,{isArray:Fe}=Array,Pe=rt("undefined");function Be(e){return e!==null&&!Pe(e)&&e.constructor!==null&&!Pe(e.constructor)&&j(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gr=V("ArrayBuffer");function nn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&gr(e.buffer),t}const sn=rt("string"),j=rt("function"),Er=rt("number"),je=e=>e!==null&&typeof e=="object",on=e=>e===!0||e===!1,Qe=e=>{if(tt(e)!=="object")return!1;const t=At(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(br in e)&&!(et in e)},an=e=>{if(!je(e)||Be(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},cn=V("Date"),un=V("File"),ln=V("Blob"),fn=V("FileList"),hn=e=>je(e)&&j(e.pipe),dn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||j(e.append)&&((t=tt(e))==="formdata"||t==="object"&&j(e.toString)&&e.toString()==="[object FormData]"))},pn=V("URLSearchParams"),[mn,yn,bn,gn]=["ReadableStream","Request","Response","Headers"].map(V),En=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function He(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Fe(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Be(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function wr(e,t){if(Be(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sr=e=>!Pe(e)&&e!==fe;function ht(){const{caseless:e,skipUndefined:t}=Sr(this)&&this||{},r={},n=(s,o)=>{const i=e&&wr(r,o)||o;Qe(r[i])&&Qe(s)?r[i]=ht(r[i],s):Qe(s)?r[i]=ht({},s):Fe(s)?r[i]=s.slice():(!t||!Pe(s))&&(r[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&He(arguments[s],n);return r}const wn=(e,t,r,{allOwnKeys:n}={})=>(He(t,(s,o)=>{r&&j(s)?e[o]=yr(s,r):e[o]=s},{allOwnKeys:n}),e),Sn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rn=(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)},On=(e,t,r,n)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&At(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},vn=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Tn=e=>{if(!e)return null;if(Fe(e))return e;let t=e.length;if(!Er(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Cn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&At(Uint8Array)),An=(e,t)=>{const n=(e&&e[et]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xn=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Pn=V("HTMLFormElement"),Fn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Bt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ln=V("RegExp"),Rr=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};He(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},Nn=e=>{Rr(e,(t,r)=>{if(j(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(j(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},_n=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return Fe(e)?n(e):n(String(e).split(t)),r},Un=()=>{},kn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Dn(e){return!!(e&&j(e.append)&&e[br]==="FormData"&&e[et])}const Mn=e=>{const t=new Array(10),r=(n,s)=>{if(je(n)){if(t.indexOf(n)>=0)return;if(Be(n))return n;if(!("toJSON"in n)){t[s]=n;const o=Fe(n)?[]:{};return He(n,(i,a)=>{const f=r(i,s+1);!Pe(f)&&(o[a]=f)}),t[s]=void 0,o}}return n};return r(e,0)},In=V("AsyncFunction"),Bn=e=>e&&(je(e)||j(e))&&j(e.then)&&j(e.catch),Or=((e,t)=>e?setImmediate:t?((r,n)=>(fe.addEventListener("message",({source:s,data:o})=>{s===fe&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),fe.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",j(fe.postMessage)),jn=typeof queueMicrotask<"u"?queueMicrotask.bind(fe):typeof process<"u"&&process.nextTick||Or,Hn=e=>e!=null&&j(e[et]),l={isArray:Fe,isArrayBuffer:gr,isBuffer:Be,isFormData:dn,isArrayBufferView:nn,isString:sn,isNumber:Er,isBoolean:on,isObject:je,isPlainObject:Qe,isEmptyObject:an,isReadableStream:mn,isRequest:yn,isResponse:bn,isHeaders:gn,isUndefined:Pe,isDate:cn,isFile:un,isBlob:ln,isRegExp:Ln,isFunction:j,isStream:hn,isURLSearchParams:pn,isTypedArray:Cn,isFileList:fn,forEach:He,merge:ht,extend:wn,trim:En,stripBOM:Sn,inherits:Rn,toFlatObject:On,kindOf:tt,kindOfTest:V,endsWith:vn,toArray:Tn,forEachEntry:An,matchAll:xn,isHTMLForm:Pn,hasOwnProperty:Bt,hasOwnProp:Bt,reduceDescriptors:Rr,freezeMethods:Nn,toObjectSet:_n,toCamelCase:Fn,noop:Un,toFiniteNumber:kn,findKey:wr,global:fe,isContextDefined:Sr,isSpecCompliantForm:Dn,toJSONObject:Mn,isAsyncFn:In,isThenable:Bn,setImmediate:Or,asap:jn,isIterable:Hn};function R(e,t,r,n,s){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),s&&(this.response=s,this.status=s.status?s.status:null)}l.inherits(R,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 vr=R.prototype,Tr={};["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=>{Tr[e]={value:e}});Object.defineProperties(R,Tr);Object.defineProperty(vr,"isAxiosError",{value:!0});R.from=(e,t,r,n,s,o)=>{const i=Object.create(vr);l.toFlatObject(e,i,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return R.call(i,a,f,r,n,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const qn=null;function dt(e){return l.isPlainObject(e)||l.isArray(e)}function Cr(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function jt(e,t,r){return e?e.concat(t).map(function(s,o){return s=Cr(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function $n(e){return l.isArray(e)&&!e.some(dt)}const zn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function nt(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,m){return!l.isUndefined(m[b])});const n=r.metaTokens,s=r.visitor||c,o=r.dots,i=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(l.isDate(p))return p.toISOString();if(l.isBoolean(p))return p.toString();if(!f&&l.isBlob(p))throw new R("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(p)||l.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,b,m){let E=p;if(p&&!m&&typeof p=="object"){if(l.endsWith(b,"{}"))b=n?b:b.slice(0,-2),p=JSON.stringify(p);else if(l.isArray(p)&&$n(p)||(l.isFileList(p)||l.endsWith(b,"[]"))&&(E=l.toArray(p)))return b=Cr(b),E.forEach(function(O,A){!(l.isUndefined(O)||O===null)&&t.append(i===!0?jt([b],A,o):i===null?b:b+"[]",u(O))}),!1}return dt(p)?!0:(t.append(jt(m,b,o),u(p)),!1)}const h=[],y=Object.assign(zn,{defaultVisitor:c,convertValue:u,isVisitable:dt});function g(p,b){if(!l.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));h.push(p),l.forEach(p,function(E,w){(!(l.isUndefined(E)||E===null)&&s.call(t,E,l.isString(w)?w.trim():w,b,y))===!0&&g(E,b?b.concat(w):[w])}),h.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Ht(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function xt(e,t){this._pairs=[],e&&nt(e,this,t)}const Ar=xt.prototype;Ar.append=function(t,r){this._pairs.push([t,r])};Ar.toString=function(t){const r=t?function(n){return t.call(this,n,Ht)}:Ht;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Vn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xr(e,t,r){if(!t)return e;const n=r&&r.encode||Vn;l.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let o;if(s?o=s(t,r):o=l.isURLSearchParams(t)?t.toString():new xt(t,r).toString(n),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class qt{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.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(n){n!==null&&t(n)})}}const Pr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jn=typeof URLSearchParams<"u"?URLSearchParams:xt,Qn=typeof FormData<"u"?FormData:null,Wn=typeof Blob<"u"?Blob:null,Kn={isBrowser:!0,classes:{URLSearchParams:Jn,FormData:Qn,Blob:Wn},protocols:["http","https","file","blob","url","data"]},Pt=typeof window<"u"&&typeof document<"u",pt=typeof navigator=="object"&&navigator||void 0,Gn=Pt&&(!pt||["ReactNative","NativeScript","NS"].indexOf(pt.product)<0),Xn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zn=Pt&&window.location.href||"http://localhost",Yn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pt,hasStandardBrowserEnv:Gn,hasStandardBrowserWebWorkerEnv:Xn,navigator:pt,origin:Zn},Symbol.toStringTag,{value:"Module"})),U={...Yn,...Kn};function es(e,t){return nt(e,new U.classes.URLSearchParams,{visitor:function(r,n,s,o){return U.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function ts(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rs(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Fr(e){function t(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=o>=r.length;return i=!i&&l.isArray(s)?s.length:i,f?(l.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!a):((!s[i]||!l.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&l.isArray(s[i])&&(s[i]=rs(s[i])),!a)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(n,s)=>{t(ts(n),s,r,0)}),r}return null}function ns(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const qe={transitional:Pr,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=l.isObject(t);if(o&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(Fr(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 r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return es(t,this.formSerializer).toString();if((a=l.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return nt(a?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),ns(t)):t}],transformResponse:[function(t){const r=this.transitional||qe.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?R.from(a,R.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.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=>{qe.headers[e]={}});const ss=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"]),os=e=>{const t={};let r,n,s;return e&&e.split(`
2
- `).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&ss[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},$t=Symbol("internals");function Ne(e){return e&&String(e).trim().toLowerCase()}function We(e){return e===!1||e==null?e:l.isArray(e)?e.map(We):String(e)}function is(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}const as=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ut(e,t,r,n,s){if(l.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!l.isString(t)){if(l.isString(n))return t.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(t)}}function cs(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function us(e,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}let H=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(a,f,u){const c=Ne(f);if(!c)throw new Error("header name must be a non-empty string");const h=l.findKey(s,c);(!h||s[h]===void 0||u===!0||u===void 0&&s[h]!==!1)&&(s[h||f]=We(a))}const i=(a,f)=>l.forEach(a,(u,c)=>o(u,c,f));if(l.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(l.isString(t)&&(t=t.trim())&&!as(t))i(os(t),r);else if(l.isObject(t)&&l.isIterable(t)){let a={},f,u;for(const c of t){if(!l.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(f=a[u])?l.isArray(f)?[...f,c[1]]:[f,c[1]]:c[1]}i(a,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=Ne(t),t){const n=l.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return is(s);if(l.isFunction(r))return r.call(this,s,n);if(l.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ne(t),t){const n=l.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ut(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=Ne(i),i){const a=l.findKey(n,i);a&&(!r||ut(n,n[a],a,r))&&(delete n[a],s=!0)}}return l.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||ut(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return l.forEach(this,(s,o)=>{const i=l.findKey(n,o);if(i){r[i]=We(s),delete r[o];return}const a=t?cs(o):String(o).trim();a!==o&&delete r[o],r[a]=We(s),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return l.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&l.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).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,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[$t]=this[$t]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Ne(i);n[a]||(us(s,i),n[a]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors(H.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});l.freezeMethods(H);function lt(e,t){const r=this||qe,n=t||r,s=H.from(n.headers);let o=n.data;return l.forEach(e,function(a){o=a.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Lr(e){return!!(e&&e.__CANCEL__)}function Le(e,t,r){R.call(this,e??"canceled",R.ERR_CANCELED,t,r),this.name="CanceledError"}l.inherits(Le,R,{__CANCEL__:!0});function Nr(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new R("Request failed with status code "+r.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ls(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fs(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const u=Date.now(),c=n[o];i||(i=u),r[s]=f,n[s]=u;let h=o,y=0;for(;h!==s;)y+=r[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const g=c&&u-c;return g?Math.round(y*1e3/g):void 0}}function hs(e,t){let r=0,n=1e3/t,s,o;const i=(u,c=Date.now())=>{r=c,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),h=c-r;h>=n?i(u,c):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},n-h)))},()=>s&&i(s)]}const Xe=(e,t,r=3)=>{let n=0;const s=fs(50,250);return hs(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,f=i-n,u=s(f),c=i<=a;n=i;const h={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(h)},r)},zt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Vt=e=>(...t)=>l.asap(()=>e(...t)),ds=U.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,U.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,ps=U.hasStandardBrowserEnv?{write(e,t,r,n,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];l.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),l.isString(n)&&a.push(`path=${n}`),l.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),l.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ms(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ys(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _r(e,t,r){let n=!ms(t);return e&&(n||r==!1)?ys(e,t):t}const Jt=e=>e instanceof H?{...e}:e;function Ee(e,t){t=t||{};const r={};function n(u,c,h,y){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:y},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function s(u,c,h,y){if(l.isUndefined(c)){if(!l.isUndefined(u))return n(void 0,u,h,y)}else return n(u,c,h,y)}function o(u,c){if(!l.isUndefined(c))return n(void 0,c)}function i(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,h){if(h in t)return n(u,c);if(h in e)return n(void 0,u)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,h)=>s(Jt(u),Jt(c),h,!0)};return l.forEach(Object.keys({...e,...t}),function(c){const h=f[c]||s,y=h(e[c],t[c],c);l.isUndefined(y)&&h!==a||(r[c]=y)}),r}const Ur=e=>{const t=Ee({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=H.from(i),t.url=xr(_r(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),l.isFormData(r)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(l.isFunction(r.getHeaders)){const f=r.getHeaders(),u=["content-type","content-length"];Object.entries(f).forEach(([c,h])=>{u.includes(c.toLowerCase())&&i.set(c,h)})}}if(U.hasStandardBrowserEnv&&(n&&l.isFunction(n)&&(n=n(t)),n||n!==!1&&ds(t.url))){const f=s&&o&&ps.read(o);f&&i.set(s,f)}return t},bs=typeof XMLHttpRequest<"u",gs=bs&&function(e){return new Promise(function(r,n){const s=Ur(e);let o=s.data;const i=H.from(s.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:u}=s,c,h,y,g,p;function b(){g&&g(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function E(){if(!m)return;const O=H.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),F={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:O,config:e,request:m};Nr(function(L){r(L),b()},function(L){n(L),b()},F),m=null}"onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(E)},m.onabort=function(){m&&(n(new R("Request aborted",R.ECONNABORTED,e,m)),m=null)},m.onerror=function(A){const F=A&&A.message?A.message:"Network Error",N=new R(F,R.ERR_NETWORK,e,m);N.event=A||null,n(N),m=null},m.ontimeout=function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const F=s.transitional||Pr;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new R(A,F.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,m)),m=null},o===void 0&&i.setContentType(null),"setRequestHeader"in m&&l.forEach(i.toJSON(),function(A,F){m.setRequestHeader(F,A)}),l.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),a&&a!=="json"&&(m.responseType=s.responseType),u&&([y,p]=Xe(u,!0),m.addEventListener("progress",y)),f&&m.upload&&([h,g]=Xe(f),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(c=O=>{m&&(n(!O||O.type?new Le(null,e,m):O),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const w=ls(s.url);if(w&&U.protocols.indexOf(w)===-1){n(new R("Unsupported protocol "+w+":",R.ERR_BAD_REQUEST,e));return}m.send(o||null)})},Es=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;n.abort(c instanceof R?c:new Le(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,o(new R(`timeout ${t} of ms exceeded`,R.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:f}=n;return f.unsubscribe=()=>l.asap(a),f}},ws=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Ss=async function*(e,t){for await(const r of Rs(e))yield*ws(r,t)},Rs=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Qt=(e,t,r,n)=>{const s=Ss(e,t);let o=0,i,a=f=>{i||(i=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:u,value:c}=await s.next();if(u){a(),f.close();return}let h=c.byteLength;if(r){let y=o+=h;r(y)}f.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(f){return a(f),s.return()}},{highWaterMark:2})},Wt=64*1024,{isFunction:Ve}=l,Os=(({Request:e,Response:t})=>({Request:e,Response:t}))(l.global),{ReadableStream:Kt,TextEncoder:Gt}=l.global,Xt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vs=e=>{e=l.merge.call({skipUndefined:!0},Os,e);const{fetch:t,Request:r,Response:n}=e,s=t?Ve(t):typeof fetch=="function",o=Ve(r),i=Ve(n);if(!s)return!1;const a=s&&Ve(Kt),f=s&&(typeof Gt=="function"?(p=>b=>p.encode(b))(new Gt):async p=>new Uint8Array(await new r(p).arrayBuffer())),u=o&&a&&Xt(()=>{let p=!1;const b=new r(U.origin,{body:new Kt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!b}),c=i&&a&&Xt(()=>l.isReadableStream(new n("").body)),h={stream:c&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(b,m)=>{let E=b&&b[p];if(E)return E.call(b);throw new R(`Response type '${p}' is not supported`,R.ERR_NOT_SUPPORT,m)})});const y=async p=>{if(p==null)return 0;if(l.isBlob(p))return p.size;if(l.isSpecCompliantForm(p))return(await new r(U.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(l.isArrayBufferView(p)||l.isArrayBuffer(p))return p.byteLength;if(l.isURLSearchParams(p)&&(p=p+""),l.isString(p))return(await f(p)).byteLength},g=async(p,b)=>{const m=l.toFiniteNumber(p.getContentLength());return m??y(b)};return async p=>{let{url:b,method:m,data:E,signal:w,cancelToken:O,timeout:A,onDownloadProgress:F,onUploadProgress:N,responseType:L,headers:M,withCredentials:ce="same-origin",fetchOptions:k}=Ur(p),ue=t||fetch;L=L?(L+"").toLowerCase():"text";let q=Es([w,O&&O.toAbortSignal()],A),J=null;const le=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let Ut;try{if(N&&u&&m!=="get"&&m!=="head"&&(Ut=await g(M,E))!==0){let re=new r(b,{method:"POST",body:E,duplex:"half"}),Se;if(l.isFormData(E)&&(Se=re.headers.get("content-type"))&&M.setContentType(Se),re.body){const[at,ze]=zt(Ut,Xe(Vt(N)));E=Qt(re.body,Wt,at,ze)}}l.isString(ce)||(ce=ce?"include":"omit");const Q=o&&"credentials"in r.prototype,kt={...k,signal:q,method:m.toUpperCase(),headers:M.normalize().toJSON(),body:E,duplex:"half",credentials:Q?ce:void 0};J=o&&new r(b,kt);let te=await(o?ue(J,k):ue(b,kt));const Dt=c&&(L==="stream"||L==="response");if(c&&(F||Dt&&le)){const re={};["status","statusText","headers"].forEach(Mt=>{re[Mt]=te[Mt]});const Se=l.toFiniteNumber(te.headers.get("content-length")),[at,ze]=F&&zt(Se,Xe(Vt(F),!0))||[];te=new n(Qt(te.body,Wt,at,()=>{ze&&ze(),le&&le()}),re)}L=L||"text";let Kr=await h[l.findKey(h,L)||"text"](te,p);return!Dt&&le&&le(),await new Promise((re,Se)=>{Nr(re,Se,{data:Kr,headers:H.from(te.headers),status:te.status,statusText:te.statusText,config:p,request:J})})}catch(Q){throw le&&le(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,p,J),{cause:Q.cause||Q}):R.from(Q,Q&&Q.code,p,J)}}},Ts=new Map,kr=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let i=o.length,a=i,f,u,c=Ts;for(;a--;)f=o[a],u=c.get(f),u===void 0&&c.set(f,u=a?new Map:vs(t)),c=u;return u};kr();const Ft={http:qn,xhr:gs,fetch:{get:kr}};l.forEach(Ft,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Zt=e=>`- ${e}`,Cs=e=>l.isFunction(e)||e===null||e===!1;function As(e,t){e=l.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let i=0;i<r;i++){n=e[i];let a;if(s=n,!Cs(n)&&(s=Ft[(a=String(n)).toLowerCase()],s===void 0))throw new R(`Unknown adapter '${a}'`);if(s&&(l.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=r?i.length>1?`since :
4
- `+i.map(Zt).join(`
5
- `):" "+Zt(i[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const Dr={getAdapter:As,adapters:Ft};function ft(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Le(null,e)}function Yt(e){return ft(e),e.headers=H.from(e.headers),e.data=lt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dr.getAdapter(e.adapter||qe.adapter,e)(e).then(function(n){return ft(e),n.data=lt.call(e,e.transformResponse,n),n.headers=H.from(n.headers),n},function(n){return Lr(n)||(ft(e),n&&n.response&&(n.response.data=lt.call(e,e.transformResponse,n.response),n.response.headers=H.from(n.response.headers))),Promise.reject(n)})}const Mr="1.13.2",st={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{st[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const er={};st.transitional=function(t,r,n){function s(o,i){return"[Axios v"+Mr+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,a)=>{if(t===!1)throw new R(s(i," has been removed"+(r?" in "+r:"")),R.ERR_DEPRECATED);return r&&!er[i]&&(er[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,a):!0}};st.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function xs(e,t,r){if(typeof e!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=t[o];if(i){const a=e[o],f=a===void 0||i(a,o,e);if(f!==!0)throw new R("option "+o+" must be "+f,R.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}const Ke={assertOptions:xs,validators:st},W=Ke.validators;let be=class{constructor(t){this.defaults=t||{},this.interceptors={request:new qt,response:new qt}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ee(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&Ke.assertOptions(n,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean)},!1),s!=null&&(l.isFunction(s)?r.paramsSerializer={serialize:s}:Ke.assertOptions(s,{encode:W.function,serialize:W.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ke.assertOptions(r,{baseUrl:W.spelling("baseURL"),withXsrfToken:W.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&l.merge(o.common,o[r.method]);o&&l.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),r.headers=H.concat(i,o);const a=[];let f=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(f=f&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let c,h=0,y;if(!f){const p=[Yt.bind(this),void 0];for(p.unshift(...a),p.push(...u),y=p.length,c=Promise.resolve(r);h<y;)c=c.then(p[h++],p[h++]);return c}y=a.length;let g=r;for(;h<y;){const p=a[h++],b=a[h++];try{g=p(g)}catch(m){b.call(this,m);break}}try{c=Yt.call(this,g)}catch(p){return Promise.reject(p)}for(h=0,y=u.length;h<y;)c=c.then(u[h++],u[h++]);return c}getUri(t){t=Ee(this.defaults,t);const r=_r(t.baseURL,t.url,t.allowAbsoluteUrls);return xr(r,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){be.prototype[t]=function(r,n){return this.request(Ee(n||{},{method:t,url:r,data:(n||{}).data}))}});l.forEach(["post","put","patch"],function(t){function r(n){return function(o,i,a){return this.request(Ee(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}be.prototype[t]=r(),be.prototype[t+"Form"]=r(!0)});let Ps=class Ir{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{n.subscribe(a),o=a}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,a){n.reason||(n.reason=new Le(o,i,a),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ir(function(s){t=s}),cancel:t}}};function Fs(e){return function(r){return e.apply(null,r)}}function Ls(e){return l.isObject(e)&&e.isAxiosError===!0}const mt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(mt).forEach(([e,t])=>{mt[t]=e});function Br(e){const t=new be(e),r=yr(be.prototype.request,t);return l.extend(r,be.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Br(Ee(e,s))},r}const P=Br(qe);P.Axios=be;P.CanceledError=Le;P.CancelToken=Ps;P.isCancel=Lr;P.VERSION=Mr;P.toFormData=nt;P.AxiosError=R;P.Cancel=P.CanceledError;P.all=function(t){return Promise.all(t)};P.spread=Fs;P.isAxiosError=Ls;P.mergeConfig=Ee;P.AxiosHeaders=H;P.formToJSON=e=>Fr(l.isHTMLForm(e)?new FormData(e):e);P.getAdapter=Dr.getAdapter;P.HttpStatusCode=mt;P.default=P;const{Axios:Bo,AxiosError:Ns,CanceledError:jo,isCancel:Ho,CancelToken:qo,VERSION:$o,all:zo,Cancel:Vo,isAxiosError:_s,spread:Jo,toFormData:Qo,AxiosHeaders:Wo,HttpStatusCode:Ko,formToJSON:Go,getAdapter:Xo,mergeConfig:Zo}=P,Us=e=>({PATCH:P.patch,POST:P.post,PUT:P.put})[e],ks=e=>({DELETE:P.delete,GET:P.get})[e],Ds=e=>{const{data:t,headers:r,status:n}=e;return{body:t,header:r,status:n}},Ms=e=>{if(!_s(e))return new z.HttpServiceError({message:"An unknown error occured"});const{message:t,response:r}=e;if(!r)return new z.HttpServiceError({message:t});const{config:{url:n,method:s},status:o,data:i}=r,a={method:s,status:o,url:n};if(!i)return new z.HttpServiceError({details:a,message:t});try{return new z.HttpServiceError({details:{...a,body:i},message:t})}catch{return new z.HttpServiceError({details:a,message:t})}},jr=async e=>{try{const t=await e;return Ds(t)}catch(t){return t instanceof Ns?Ms(t):new z.HttpServiceError({code:z.HttpServiceErrorCode.Generic,message:"An unknown error occured"})}},Hr=(e,{headers:t={},query:r={},timeout:n,url:s},o)=>{const i=ks(e),a={headers:t},f=ee.addQueryParams(s,r);return o.buffer&&(a.responseType="arraybuffer"),n&&(a.timeout=n),jr(i(f,a))},Lt=(e,{headers:t={},body:r=null,query:n={},timeout:s,url:o,attachments:i},a)=>{const f=Us(e),u=i&&i.length>0,c=new FormData,h=u?c:r,y={headers:t},g=ee.addQueryParams(o,n);return u&&i.forEach(p=>{c.append(p.name,p.filePath)}),a.buffer&&(y.responseType="arraybuffer"),s&&(y.timeout=s),jr(f(g,h,y))},Is=(e,t)=>Hr("DELETE",e,t),Bs=(e,t)=>Hr("GET",e,t),js=(e,t)=>Lt("PATCH",e,t),Hs=(e,t)=>Lt("POST",e,t),qs=(e,t)=>Lt("PUT",e,t),$s=()=>()=>({delete:Is,get:Bs,patch:js,post:Hs,put:qs}),qr=e=>()=>e(),zs=({useAdapter:e})=>$e("LOGGER_SERVICE",qr(e),[]);var $r={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./chunks/services.helper.DlU_zXxQ.js"),$=require("react"),Xe=require("react/jsx-runtime"),Ze=require("@tanstack/react-query"),N=require("./errors.cjs.js"),Nt=e=>({...t})=>e(t),Ft=({useAdapter:e,LoggerService:t})=>ee("ERROR_SERVICE",Nt(e),[t.ServiceProvider]),Ut=()=>({LoggerService:e})=>{const t=G(e),r=$.useRef({}),n=(c,f)=>{const l=r.current;r.current={...l,[c]:[...l[c]||[],f]}},s=(c,f)=>{const l=r.current;r.current={...l,[c]:l[c].filter(a=>a!==f)}};return{raiseError:c=>{var f;t.error(c),(f=r.current[c.code])==null||f.forEach(l=>l(c))},useErrorHandler:(c,f)=>{const l=L.compilerRuntimeExports.c(4);let a,p;l[0]!==f||l[1]!==c?(a=()=>(n(c,f),()=>{s(c,f)}),p=[c,f],l[0]=f,l[1]=c,l[2]=a,l[3]=p):(a=l[2],p=l[3]),$.useEffect(a,p)}}},kt=e=>({ErrorService:t,LoggerService:r})=>{const n=e(),s=G(r),o=G(t),i=E=>{const b=L.lodashExports.omitBy(E,L.lodashExports.isNil);s.info(`HTTP request: ${JSON.stringify(b)}`)},c=E=>{const{body:b,status:S}=E;s.info(`HTTP response: ${JSON.stringify({body:b,status:S})}`)},f=E=>E>=400&&E<600,l=E=>{const{details:b,message:S}=E;return o.raiseError(new N.HttpServiceError({code:N.HttpServiceErrorCode.Unauthorized,details:b,message:S}))},a=E=>{const{status:b}=E.details||{};if(!b||b>=500){const S=JSON.stringify(E);s.error(S)}else{if(b===401)return l(E);s.warn(E)}return o.raiseError(E)},p=async(E,b,S={})=>{i({method:E,...b});let T,O;const P=A=>{if(A instanceof N.HttpServiceError){O=A;return}T=A};switch(E){case"GET":{P(await n.get(b,S));break}case"DELETE":{P(await n.delete(b,S));break}case"PATCH":{P(await n.patch(b,S));break}case"POST":{P(await n.post(b,S));break}case"PUT":{P(await n.put(b,S));break}default:throw Error(`Unknown method HTTP method '${E}'`)}if(O)throw a(O),O;return T?(c(T),f(T.status)&&a(new N.HttpServiceError({details:{body:JSON.stringify(T.body),method:E,status:T.status,url:b.url}})),T):void 0};return{delete:(E,b={})=>p("DELETE",E,b),get:(E,b={})=>p("GET",E,b),patch:(E,b={})=>p("PATCH",E,b),post:async(E,b={})=>await p("POST",E,b),put:(E,b={})=>p("PUT",E,b)}},Bt=({useAdapter:e,ErrorService:t,LoggerService:r})=>ee("HTTP_SERVICE",kt(e),[t.ServiceProvider,r.ServiceProvider]);function Ye(e,t){return function(){return e.apply(t,arguments)}}const{toString:Dt}=Object.prototype,{getPrototypeOf:Te}=Object,{iterator:ue,toStringTag:et}=Symbol,le=(e=>t=>{const r=Dt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),F=e=>(e=e.toLowerCase(),t=>le(t)===e),fe=e=>t=>typeof t===e,{isArray:J}=Array,z=fe("undefined");function Q(e){return e!==null&&!z(e)&&e.constructor!==null&&!z(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tt=F("ArrayBuffer");function _t(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tt(e.buffer),t}const Mt=fe("string"),x=fe("function"),rt=fe("number"),X=e=>e!==null&&typeof e=="object",Ht=e=>e===!0||e===!1,oe=e=>{if(le(e)!=="object")return!1;const t=Te(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(et in e)&&!(ue in e)},qt=e=>{if(!X(e)||Q(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},jt=F("Date"),It=F("File"),$t=F("Blob"),zt=F("FileList"),Jt=e=>X(e)&&x(e.pipe),Kt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||x(e.append)&&((t=le(e))==="formdata"||t==="object"&&x(e.toString)&&e.toString()==="[object FormData]"))},Wt=F("URLSearchParams"),[Vt,Gt,Qt,Xt]=["ReadableStream","Request","Response","Headers"].map(F),Zt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Z(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),J(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Q(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(n=0;n<i;n++)c=o[n],t.call(null,e[c],c,e)}}function nt(e,t){if(Q(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const M=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,st=e=>!z(e)&&e!==M;function be(){const{caseless:e,skipUndefined:t}=st(this)&&this||{},r={},n=(s,o)=>{const i=e&&nt(r,o)||o;oe(r[i])&&oe(s)?r[i]=be(r[i],s):oe(s)?r[i]=be({},s):J(s)?r[i]=s.slice():(!t||!z(s))&&(r[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Z(arguments[s],n);return r}const Yt=(e,t,r,{allOwnKeys:n}={})=>(Z(t,(s,o)=>{r&&x(s)?e[o]=Ye(s,r):e[o]=s},{allOwnKeys:n}),e),er=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tr=(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)},rr=(e,t,r,n)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Te(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},nr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},sr=e=>{if(!e)return null;if(J(e))return e;let t=e.length;if(!rt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},or=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Te(Uint8Array)),ir=(e,t)=>{const n=(e&&e[ue]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},ar=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},cr=F("HTMLFormElement"),ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Be=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),lr=F("RegExp"),ot=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Z(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},fr=e=>{ot(e,(t,r)=>{if(x(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(x(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},dr=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return J(e)?n(e):n(String(e).split(t)),r},pr=()=>{},hr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mr(e){return!!(e&&x(e.append)&&e[et]==="FormData"&&e[ue])}const yr=e=>{const t=new Array(10),r=(n,s)=>{if(X(n)){if(t.indexOf(n)>=0)return;if(Q(n))return n;if(!("toJSON"in n)){t[s]=n;const o=J(n)?[]:{};return Z(n,(i,c)=>{const f=r(i,s+1);!z(f)&&(o[c]=f)}),t[s]=void 0,o}}return n};return r(e,0)},Er=F("AsyncFunction"),gr=e=>e&&(X(e)||x(e))&&x(e.then)&&x(e.catch),it=((e,t)=>e?setImmediate:t?((r,n)=>(M.addEventListener("message",({source:s,data:o})=>{s===M&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),M.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",x(M.postMessage)),br=typeof queueMicrotask<"u"?queueMicrotask.bind(M):typeof process<"u"&&process.nextTick||it,wr=e=>e!=null&&x(e[ue]),u={isArray:J,isArrayBuffer:tt,isBuffer:Q,isFormData:Kt,isArrayBufferView:_t,isString:Mt,isNumber:rt,isBoolean:Ht,isObject:X,isPlainObject:oe,isEmptyObject:qt,isReadableStream:Vt,isRequest:Gt,isResponse:Qt,isHeaders:Xt,isUndefined:z,isDate:jt,isFile:It,isBlob:$t,isRegExp:lr,isFunction:x,isStream:Jt,isURLSearchParams:Wt,isTypedArray:or,isFileList:zt,forEach:Z,merge:be,extend:Yt,trim:Zt,stripBOM:er,inherits:tr,toFlatObject:rr,kindOf:le,kindOfTest:F,endsWith:nr,toArray:sr,forEachEntry:ir,matchAll:ar,isHTMLForm:cr,hasOwnProperty:Be,hasOwnProp:Be,reduceDescriptors:ot,freezeMethods:fr,toObjectSet:dr,toCamelCase:ur,noop:pr,toFiniteNumber:hr,findKey:nt,global:M,isContextDefined:st,isSpecCompliantForm:mr,toJSONObject:yr,isAsyncFn:Er,isThenable:gr,setImmediate:it,asap:br,isIterable:wr};function g(e,t,r,n,s){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),s&&(this.response=s,this.status=s.status?s.status:null)}u.inherits(g,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:u.toJSONObject(this.config),code:this.code,status:this.status}}});const at=g.prototype,ct={};["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=>{ct[e]={value:e}});Object.defineProperties(g,ct);Object.defineProperty(at,"isAxiosError",{value:!0});g.from=(e,t,r,n,s,o)=>{const i=Object.create(at);u.toFlatObject(e,i,function(a){return a!==Error.prototype},l=>l!=="isAxiosError");const c=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return g.call(i,c,f,r,n,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const Sr=null;function we(e){return u.isPlainObject(e)||u.isArray(e)}function ut(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function De(e,t,r){return e?e.concat(t).map(function(s,o){return s=ut(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function Rr(e){return u.isArray(e)&&!e.some(we)}const Tr=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function de(e,t,r){if(!u.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=u.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!u.isUndefined(h[m])});const n=r.metaTokens,s=r.visitor||a,o=r.dots,i=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(t);if(!u.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(u.isDate(d))return d.toISOString();if(u.isBoolean(d))return d.toString();if(!f&&u.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(d)||u.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function a(d,m,h){let E=d;if(d&&!h&&typeof d=="object"){if(u.endsWith(m,"{}"))m=n?m:m.slice(0,-2),d=JSON.stringify(d);else if(u.isArray(d)&&Rr(d)||(u.isFileList(d)||u.endsWith(m,"[]"))&&(E=u.toArray(d)))return m=ut(m),E.forEach(function(S,T){!(u.isUndefined(S)||S===null)&&t.append(i===!0?De([m],T,o):i===null?m:m+"[]",l(S))}),!1}return we(d)?!0:(t.append(De(h,m,o),l(d)),!1)}const p=[],y=Object.assign(Tr,{defaultVisitor:a,convertValue:l,isVisitable:we});function w(d,m){if(!u.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(d),u.forEach(d,function(E,b){(!(u.isUndefined(E)||E===null)&&s.call(t,E,u.isString(b)?b.trim():b,m,y))===!0&&w(E,m?m.concat(b):[b])}),p.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return w(e),t}function _e(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Oe(e,t){this._pairs=[],e&&de(e,this,t)}const lt=Oe.prototype;lt.append=function(t,r){this._pairs.push([t,r])};lt.toString=function(t){const r=t?function(n){return t.call(this,n,_e)}:_e;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Or(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ft(e,t,r){if(!t)return e;const n=r&&r.encode||Or;u.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let o;if(s?o=s(t,r):o=u.isURLSearchParams(t)?t.toString():new Oe(t,r).toString(n),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Me{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){u.forEach(this.handlers,function(n){n!==null&&t(n)})}}const dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ar=typeof URLSearchParams<"u"?URLSearchParams:Oe,vr=typeof FormData<"u"?FormData:null,xr=typeof Blob<"u"?Blob:null,Cr={isBrowser:!0,classes:{URLSearchParams:Ar,FormData:vr,Blob:xr},protocols:["http","https","file","blob","url","data"]},Ae=typeof window<"u"&&typeof document<"u",Se=typeof navigator=="object"&&navigator||void 0,Pr=Ae&&(!Se||["ReactNative","NativeScript","NS"].indexOf(Se.product)<0),Lr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nr=Ae&&window.location.href||"http://localhost",Fr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ae,hasStandardBrowserEnv:Pr,hasStandardBrowserWebWorkerEnv:Lr,navigator:Se,origin:Nr},Symbol.toStringTag,{value:"Module"})),v={...Fr,...Cr};function Ur(e,t){return de(e,new v.classes.URLSearchParams,{visitor:function(r,n,s,o){return v.isNode&&u.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function kr(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Br(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function pt(e){function t(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=r.length;return i=!i&&u.isArray(s)?s.length:i,f?(u.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!c):((!s[i]||!u.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&u.isArray(s[i])&&(s[i]=Br(s[i])),!c)}if(u.isFormData(e)&&u.isFunction(e.entries)){const r={};return u.forEachEntry(e,(n,s)=>{t(kr(n),s,r,0)}),r}return null}function Dr(e,t,r){if(u.isString(e))try{return(t||JSON.parse)(e),u.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Y={transitional:dt,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=u.isObject(t);if(o&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return s?JSON.stringify(pt(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ur(t,this.formSerializer).toString();if((c=u.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return de(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Dr(t)):t}],transformResponse:[function(t){const r=this.transitional||Y.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:v.classes.FormData,Blob:v.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],e=>{Y.headers[e]={}});const _r=u.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"]),Mr=e=>{const t={};let r,n,s;return e&&e.split(`
2
+ `).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&_r[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},He=Symbol("internals");function V(e){return e&&String(e).trim().toLowerCase()}function ie(e){return e===!1||e==null?e:u.isArray(e)?e.map(ie):String(e)}function Hr(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}const qr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ye(e,t,r,n,s){if(u.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!u.isString(t)){if(u.isString(n))return t.indexOf(n)!==-1;if(u.isRegExp(n))return n.test(t)}}function jr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Ir(e,t){const r=u.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}let C=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(c,f,l){const a=V(f);if(!a)throw new Error("header name must be a non-empty string");const p=u.findKey(s,a);(!p||s[p]===void 0||l===!0||l===void 0&&s[p]!==!1)&&(s[p||f]=ie(c))}const i=(c,f)=>u.forEach(c,(l,a)=>o(l,a,f));if(u.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(u.isString(t)&&(t=t.trim())&&!qr(t))i(Mr(t),r);else if(u.isObject(t)&&u.isIterable(t)){let c={},f,l;for(const a of t){if(!u.isArray(a))throw TypeError("Object iterator must return a key-value pair");c[l=a[0]]=(f=c[l])?u.isArray(f)?[...f,a[1]]:[f,a[1]]:a[1]}i(c,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=V(t),t){const n=u.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return Hr(s);if(u.isFunction(r))return r.call(this,s,n);if(u.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=V(t),t){const n=u.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ye(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=V(i),i){const c=u.findKey(n,i);c&&(!r||ye(n,n[c],c,r))&&(delete n[c],s=!0)}}return u.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||ye(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return u.forEach(this,(s,o)=>{const i=u.findKey(n,o);if(i){r[i]=ie(s),delete r[o];return}const c=t?jr(o):String(o).trim();c!==o&&delete r[o],r[c]=ie(s),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return u.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&u.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).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,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[He]=this[He]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=V(i);n[c]||(Ir(s,i),n[c]=!0)}return u.isArray(t)?t.forEach(o):o(t),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(C.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});u.freezeMethods(C);function Ee(e,t){const r=this||Y,n=t||r,s=C.from(n.headers);let o=n.data;return u.forEach(e,function(c){o=c.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ht(e){return!!(e&&e.__CANCEL__)}function K(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}u.inherits(K,g,{__CANCEL__:!0});function mt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $r(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zr(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),a=n[o];i||(i=l),r[s]=f,n[s]=l;let p=o,y=0;for(;p!==s;)y+=r[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const w=a&&l-a;return w?Math.round(y*1e3/w):void 0}}function Jr(e,t){let r=0,n=1e3/t,s,o;const i=(l,a=Date.now())=>{r=a,s=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const a=Date.now(),p=a-r;p>=n?i(l,a):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},n-p)))},()=>s&&i(s)]}const ce=(e,t,r=3)=>{let n=0;const s=zr(50,250);return Jr(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-n,l=s(f),a=i<=c;n=i;const p={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&a?(c-i)/l:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},r)},qe=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},je=e=>(...t)=>u.asap(()=>e(...t)),Kr=v.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,v.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(v.origin),v.navigator&&/(msie|trident)/i.test(v.navigator.userAgent)):()=>!0,Wr=v.hasStandardBrowserEnv?{write(e,t,r,n,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];u.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),u.isString(n)&&c.push(`path=${n}`),u.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),u.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function yt(e,t,r){let n=!Vr(t);return e&&(n||r==!1)?Gr(e,t):t}const Ie=e=>e instanceof C?{...e}:e;function q(e,t){t=t||{};const r={};function n(l,a,p,y){return u.isPlainObject(l)&&u.isPlainObject(a)?u.merge.call({caseless:y},l,a):u.isPlainObject(a)?u.merge({},a):u.isArray(a)?a.slice():a}function s(l,a,p,y){if(u.isUndefined(a)){if(!u.isUndefined(l))return n(void 0,l,p,y)}else return n(l,a,p,y)}function o(l,a){if(!u.isUndefined(a))return n(void 0,a)}function i(l,a){if(u.isUndefined(a)){if(!u.isUndefined(l))return n(void 0,l)}else return n(void 0,a)}function c(l,a,p){if(p in t)return n(l,a);if(p in e)return n(void 0,l)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,a,p)=>s(Ie(l),Ie(a),p,!0)};return u.forEach(Object.keys({...e,...t}),function(a){const p=f[a]||s,y=p(e[a],t[a],a);u.isUndefined(y)&&p!==c||(r[a]=y)}),r}const Et=e=>{const t=q({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=C.from(i),t.url=ft(yt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),u.isFormData(r)){if(v.hasStandardBrowserEnv||v.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(u.isFunction(r.getHeaders)){const f=r.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([a,p])=>{l.includes(a.toLowerCase())&&i.set(a,p)})}}if(v.hasStandardBrowserEnv&&(n&&u.isFunction(n)&&(n=n(t)),n||n!==!1&&Kr(t.url))){const f=s&&o&&Wr.read(o);f&&i.set(s,f)}return t},Qr=typeof XMLHttpRequest<"u",Xr=Qr&&function(e){return new Promise(function(r,n){const s=Et(e);let o=s.data;const i=C.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,a,p,y,w,d;function m(){w&&w(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(a),s.signal&&s.signal.removeEventListener("abort",a)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function E(){if(!h)return;const S=C.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),O={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};mt(function(A){r(A),m()},function(A){n(A),m()},O),h=null}"onloadend"in h?h.onloadend=E:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(E)},h.onabort=function(){h&&(n(new g("Request aborted",g.ECONNABORTED,e,h)),h=null)},h.onerror=function(T){const O=T&&T.message?T.message:"Network Error",P=new g(O,g.ERR_NETWORK,e,h);P.event=T||null,n(P),h=null},h.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const O=s.transitional||dt;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),n(new g(T,O.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&u.forEach(i.toJSON(),function(T,O){h.setRequestHeader(O,T)}),u.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),l&&([y,d]=ce(l,!0),h.addEventListener("progress",y)),f&&h.upload&&([p,w]=ce(f),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(a=S=>{h&&(n(!S||S.type?new K(null,e,h):S),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(a),s.signal&&(s.signal.aborted?a():s.signal.addEventListener("abort",a)));const b=$r(s.url);if(b&&v.protocols.indexOf(b)===-1){n(new g("Unsupported protocol "+b+":",g.ERR_BAD_REQUEST,e));return}h.send(o||null)})},Zr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(l){if(!s){s=!0,c();const a=l instanceof Error?l:this.reason;n.abort(a instanceof g?a:new K(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{i=null,o(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:f}=n;return f.unsubscribe=()=>u.asap(c),f}},Yr=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},en=async function*(e,t){for await(const r of tn(e))yield*Yr(r,t)},tn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},$e=(e,t,r,n)=>{const s=en(e,t);let o=0,i,c=f=>{i||(i=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:l,value:a}=await s.next();if(l){c(),f.close();return}let p=a.byteLength;if(r){let y=o+=p;r(y)}f.enqueue(new Uint8Array(a))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},ze=64*1024,{isFunction:se}=u,rn=(({Request:e,Response:t})=>({Request:e,Response:t}))(u.global),{ReadableStream:Je,TextEncoder:Ke}=u.global,We=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nn=e=>{e=u.merge.call({skipUndefined:!0},rn,e);const{fetch:t,Request:r,Response:n}=e,s=t?se(t):typeof fetch=="function",o=se(r),i=se(n);if(!s)return!1;const c=s&&se(Je),f=s&&(typeof Ke=="function"?(d=>m=>d.encode(m))(new Ke):async d=>new Uint8Array(await new r(d).arrayBuffer())),l=o&&c&&We(()=>{let d=!1;const m=new r(v.origin,{body:new Je,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!m}),a=i&&c&&We(()=>u.isReadableStream(new n("").body)),p={stream:a&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!p[d]&&(p[d]=(m,h)=>{let E=m&&m[d];if(E)return E.call(m);throw new g(`Response type '${d}' is not supported`,g.ERR_NOT_SUPPORT,h)})});const y=async d=>{if(d==null)return 0;if(u.isBlob(d))return d.size;if(u.isSpecCompliantForm(d))return(await new r(v.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(u.isArrayBufferView(d)||u.isArrayBuffer(d))return d.byteLength;if(u.isURLSearchParams(d)&&(d=d+""),u.isString(d))return(await f(d)).byteLength},w=async(d,m)=>{const h=u.toFiniteNumber(d.getContentLength());return h??y(m)};return async d=>{let{url:m,method:h,data:E,signal:b,cancelToken:S,timeout:T,onDownloadProgress:O,onUploadProgress:P,responseType:A,headers:he,withCredentials:te="same-origin",fetchOptions:Pe}=Et(d),Le=t||fetch;A=A?(A+"").toLowerCase():"text";let re=Zr([b,S&&S.toAbortSignal()],T),W=null;const _=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let Ne;try{if(P&&l&&h!=="get"&&h!=="head"&&(Ne=await w(he,E))!==0){let D=new r(m,{method:"POST",body:E,duplex:"half"}),I;if(u.isFormData(E)&&(I=D.headers.get("content-type"))&&he.setContentType(I),D.body){const[me,ne]=qe(Ne,ce(je(P)));E=$e(D.body,ze,me,ne)}}u.isString(te)||(te=te?"include":"omit");const U=o&&"credentials"in r.prototype,Fe={...Pe,signal:re,method:h.toUpperCase(),headers:he.normalize().toJSON(),body:E,duplex:"half",credentials:U?te:void 0};W=o&&new r(m,Fe);let B=await(o?Le(W,Pe):Le(m,Fe));const Ue=a&&(A==="stream"||A==="response");if(a&&(O||Ue&&_)){const D={};["status","statusText","headers"].forEach(ke=>{D[ke]=B[ke]});const I=u.toFiniteNumber(B.headers.get("content-length")),[me,ne]=O&&qe(I,ce(je(O),!0))||[];B=new n($e(B.body,ze,me,()=>{ne&&ne(),_&&_()}),D)}A=A||"text";let Lt=await p[u.findKey(p,A)||"text"](B,d);return!Ue&&_&&_(),await new Promise((D,I)=>{mt(D,I,{data:Lt,headers:C.from(B.headers),status:B.status,statusText:B.statusText,config:d,request:W})})}catch(U){throw _&&_(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,W),{cause:U.cause||U}):g.from(U,U&&U.code,d,W)}}},sn=new Map,gt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let i=o.length,c=i,f,l,a=sn;for(;c--;)f=o[c],l=a.get(f),l===void 0&&a.set(f,l=c?new Map:nn(t)),a=l;return l};gt();const ve={http:Sr,xhr:Xr,fetch:{get:gt}};u.forEach(ve,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ve=e=>`- ${e}`,on=e=>u.isFunction(e)||e===null||e===!1;function an(e,t){e=u.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let i=0;i<r;i++){n=e[i];let c;if(s=n,!on(n)&&(s=ve[(c=String(n)).toLowerCase()],s===void 0))throw new g(`Unknown adapter '${c}'`);if(s&&(u.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=r?i.length>1?`since :
4
+ `+i.map(Ve).join(`
5
+ `):" "+Ve(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const bt={getAdapter:an,adapters:ve};function ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new K(null,e)}function Ge(e){return ge(e),e.headers=C.from(e.headers),e.data=Ee.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bt.getAdapter(e.adapter||Y.adapter,e)(e).then(function(n){return ge(e),n.data=Ee.call(e,e.transformResponse,n),n.headers=C.from(n.headers),n},function(n){return ht(n)||(ge(e),n&&n.response&&(n.response.data=Ee.call(e,e.transformResponse,n.response),n.response.headers=C.from(n.response.headers))),Promise.reject(n)})}const wt="1.13.2",pe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Qe={};pe.transitional=function(t,r,n){function s(o,i){return"[Axios v"+wt+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,c)=>{if(t===!1)throw new g(s(i," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!Qe[i]&&(Qe[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,c):!0}};pe.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function cn(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new g("option "+o+" must be "+f,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+o,g.ERR_BAD_OPTION)}}const ae={assertOptions:cn,validators:pe},k=ae.validators;let H=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Me,response:new Me}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=q(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&ae.assertOptions(n,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),s!=null&&(u.isFunction(s)?r.paramsSerializer={serialize:s}:ae.assertOptions(s,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ae.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=o&&u.merge(o.common,o[r.method]);o&&u.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),r.headers=C.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(f=f&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let a,p=0,y;if(!f){const d=[Ge.bind(this),void 0];for(d.unshift(...c),d.push(...l),y=d.length,a=Promise.resolve(r);p<y;)a=a.then(d[p++],d[p++]);return a}y=c.length;let w=r;for(;p<y;){const d=c[p++],m=c[p++];try{w=d(w)}catch(h){m.call(this,h);break}}try{a=Ge.call(this,w)}catch(d){return Promise.reject(d)}for(p=0,y=l.length;p<y;)a=a.then(l[p++],l[p++]);return a}getUri(t){t=q(this.defaults,t);const r=yt(t.baseURL,t.url,t.allowAbsoluteUrls);return ft(r,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){H.prototype[t]=function(r,n){return this.request(q(n||{},{method:t,url:r,data:(n||{}).data}))}});u.forEach(["post","put","patch"],function(t){function r(n){return function(o,i,c){return this.request(q(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}H.prototype[t]=r(),H.prototype[t+"Form"]=r(!0)});let un=class St{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{n.subscribe(c),o=c}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,c){n.reason||(n.reason=new K(o,i,c),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new St(function(s){t=s}),cancel:t}}};function ln(e){return function(r){return e.apply(null,r)}}function fn(e){return u.isObject(e)&&e.isAxiosError===!0}const Re={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Re).forEach(([e,t])=>{Re[t]=e});function Rt(e){const t=new H(e),r=Ye(H.prototype.request,t);return u.extend(r,H.prototype,t,{allOwnKeys:!0}),u.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Rt(q(e,s))},r}const R=Rt(Y);R.Axios=H;R.CanceledError=K;R.CancelToken=un;R.isCancel=ht;R.VERSION=wt;R.toFormData=de;R.AxiosError=g;R.Cancel=R.CanceledError;R.all=function(t){return Promise.all(t)};R.spread=ln;R.isAxiosError=fn;R.mergeConfig=q;R.AxiosHeaders=C;R.formToJSON=e=>pt(u.isHTMLForm(e)?new FormData(e):e);R.getAdapter=bt.getAdapter;R.HttpStatusCode=Re;R.default=R;const{Axios:jn,AxiosError:dn,CanceledError:In,isCancel:$n,CancelToken:zn,VERSION:Jn,all:Kn,Cancel:Wn,isAxiosError:pn,spread:Vn,toFormData:Gn,AxiosHeaders:Qn,HttpStatusCode:Xn,formToJSON:Zn,getAdapter:Yn,mergeConfig:es}=R,hn=e=>({PATCH:R.patch,POST:R.post,PUT:R.put})[e],mn=e=>({DELETE:R.delete,GET:R.get})[e],yn=e=>{const{data:t,headers:r,status:n}=e;return{body:t,header:r,status:n}},En=e=>{if(!pn(e))return new N.HttpServiceError({message:"An unknown error occurred"});const{message:t,response:r}=e;if(!r)return new N.HttpServiceError({message:t});const{config:{url:n,method:s},status:o,data:i}=r,c={method:s,status:o,url:n};if(!i)return new N.HttpServiceError({details:c,message:t});try{return new N.HttpServiceError({details:{...c,body:i},message:t})}catch{return new N.HttpServiceError({details:c,message:t})}},Tt=async e=>{try{const t=await e;return yn(t)}catch(t){return t instanceof dn?En(t):new N.HttpServiceError({code:N.HttpServiceErrorCode.Generic,message:"An unknown error occurred"})}},Ot=(e,{headers:t={},query:r={},timeout:n,url:s},o)=>{const i=mn(e),c={headers:t},f=L.addQueryParams(s,r);return o.buffer&&(c.responseType="arraybuffer"),n&&(c.timeout=n),Tt(i(f,c))},xe=(e,{headers:t={},body:r=null,query:n={},timeout:s,url:o,attachments:i},c)=>{const f=hn(e),l=i&&i.length>0,a=new FormData,p=l?a:r,y={headers:t},w=L.addQueryParams(o,n);return l&&i.forEach(d=>{a.append(d.name,d.filePath)}),c.buffer&&(y.responseType="arraybuffer"),s&&(y.timeout=s),Tt(f(w,p,y))},gn=(e,t)=>Ot("DELETE",e,t),bn=(e,t)=>Ot("GET",e,t),wn=(e,t)=>xe("PATCH",e,t),Sn=(e,t)=>xe("POST",e,t),Rn=(e,t)=>xe("PUT",e,t),Tn=()=>()=>({delete:gn,get:bn,patch:wn,post:Sn,put:Rn}),At=e=>()=>e(),On=({useAdapter:e})=>ee("LOGGER_SERVICE",At(e),[]);var vt={exports:{}};/*!
7
7
  * js-logger - http://github.com/jonnyreeves/js-logger
8
8
  * Jonny Reeves, http://jonnyreeves.co.uk/
9
9
  * js-logger may be freely distributed under the MIT license.
10
- */(function(e){(function(t){var r={};r.VERSION="1.6.1";var n,s={},o=function(c,h){return function(){return h.apply(c,arguments)}},i=function(){var c=arguments,h=c[0],y,g;for(g=1;g<c.length;g++)for(y in c[g])!(y in h)&&c[g].hasOwnProperty(y)&&(h[y]=c[g][y]);return h},a=function(c,h){return{value:c,name:h}};r.TRACE=a(1,"TRACE"),r.DEBUG=a(2,"DEBUG"),r.INFO=a(3,"INFO"),r.TIME=a(4,"TIME"),r.WARN=a(5,"WARN"),r.ERROR=a(8,"ERROR"),r.OFF=a(99,"OFF");var f=function(c){this.context=c,this.setLevel(c.filterLevel),this.log=this.info};f.prototype={setLevel:function(c){c&&"value"in c&&(this.context.filterLevel=c)},getLevel:function(){return this.context.filterLevel},enabledFor:function(c){var h=this.context.filterLevel;return c.value>=h.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(c){typeof c=="string"&&c.length>0&&this.invoke(r.TIME,[c,"start"])},timeEnd:function(c){typeof c=="string"&&c.length>0&&this.invoke(r.TIME,[c,"end"])},invoke:function(c,h){n&&this.enabledFor(c)&&n(h,i({level:c},this.context))}};var u=new f({filterLevel:r.OFF});(function(){var c=r;c.enabledFor=o(u,u.enabledFor),c.trace=o(u,u.trace),c.debug=o(u,u.debug),c.time=o(u,u.time),c.timeEnd=o(u,u.timeEnd),c.info=o(u,u.info),c.warn=o(u,u.warn),c.error=o(u,u.error),c.log=c.info})(),r.setHandler=function(c){n=c},r.setLevel=function(c){u.setLevel(c);for(var h in s)s.hasOwnProperty(h)&&s[h].setLevel(c)},r.getLevel=function(){return u.getLevel()},r.get=function(c){return s[c]||(s[c]=new f(i({name:c},u.context)))},r.createDefaultHandler=function(c){c=c||{},c.formatter=c.formatter||function(p,b){b.name&&p.unshift("["+b.name+"]")};var h={},y=function(g,p){Function.prototype.apply.call(g,console,p)};return typeof console>"u"?function(){}:function(g,p){g=Array.prototype.slice.call(g);var b=console.log,m;p.level===r.TIME?(m=(p.name?"["+p.name+"] ":"")+g[0],g[1]==="start"?console.time?console.time(m):h[m]=new Date().getTime():console.timeEnd?console.timeEnd(m):y(b,[m+": "+(new Date().getTime()-h[m])+"ms"])):(p.level===r.WARN&&console.warn?b=console.warn:p.level===r.ERROR&&console.error?b=console.error:p.level===r.INFO&&console.info?b=console.info:p.level===r.DEBUG&&console.debug?b=console.debug:p.level===r.TRACE&&console.trace&&(b=console.trace),c.formatter(g,p),y(b,g))}},r.useDefaults=function(c){r.setLevel(c&&c.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(c))},r.setDefaults=r.useDefaults,e.exports?e.exports=r:(r._prevLogger=t.Logger,r.noConflict=function(){return t.Logger=r._prevLogger,r},t.Logger=r)})(ee.commonjsGlobal)})($r);var Vs=$r.exports;const we=ee.getDefaultExportFromCjs(Vs),Nt=e=>typeof e=="string"?e:e.stack||e.toString(),Js=e=>{we.debug("💡",e)},Qs=e=>{we.error("❌",Nt(e))},Ws=e=>{we.error("❌",Nt(e))},Ks=e=>{we.info("✅",Nt(e))},Gs=e=>{we.warn("⚠️",e.toString())},Xs=()=>()=>(ge.useEffect(()=>{we.useDefaults({defaultLevel:we.INFO})},[]),{debug:Js,error:Qs,fatal:Ws,info:Ks,warn:Gs}),Zs=e=>({...t})=>{const r=e(t),[n,s]=r.captureEvent;return{captureEvent:n,useCaptureEvent:s}},Ys=({useAdapter:e,HttpService:t})=>$e("TRACKER_SERVICE",Zs(e),[t.ServiceProvider]),eo=({getDistinctId:e,getTimestamp:t,getHeaders:r,transformProperties:n,config:s})=>({HttpService:o})=>{const i=De(o),a=()=>({Authorization:`Bearer ${s.apiKey}`,...r==null?void 0:r()}),f=h=>[s.host,h].filter(Boolean).join("/"),u=(h,y)=>i.post({body:y,headers:a(),url:f(h)});return{captureEvent:Wr("posthog-capture-event",async({event:h,properties:y})=>{const g=s.paths.event,p=e(h,y),b=t==null?void 0:t(h,y),m=n(h,y);await u(g,{api_key:s.apiKey,distinct_id:p,event:h,properties:m,timestamp:b})})}};var ot=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},to={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},K,he,lr,ro=(lr=class{constructor(){T(this,K,to);T(this,he,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&d(this,he)&&e!==d(this,K)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:d(this,K),provider:e}),S(this,K,e),process.env.NODE_ENV!=="production"&&S(this,he,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&S(this,he,!0),d(this,K).setTimeout(e,t)}clearTimeout(e){d(this,K).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&S(this,he,!0),d(this,K).setInterval(e,t)}clearInterval(e){d(this,K).clearInterval(e)}},K=new WeakMap,he=new WeakMap,lr),Je=new ro;function no(e){setTimeout(e,0)}var ke=typeof window>"u"||"Deno"in globalThis;function Ze(){}function tr(e){return typeof e=="number"&&e>=0&&e!==1/0}function so(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ue(e,t){return typeof e=="function"?e(t):e}function $(e,t){return typeof e=="function"?e(t):e}function rr(e){return JSON.stringify(e,(t,r)=>bt(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}var oo=Object.prototype.hasOwnProperty;function yt(e,t){if(e===t)return e;const r=nr(e)&&nr(t);if(!r&&!(bt(e)&&bt(t)))return t;const s=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),i=o.length,a=r?new Array(i):{};let f=0;for(let u=0;u<i;u++){const c=r?u:o[u],h=e[c],y=t[c];if(h===y){a[c]=h,(r?u<s:oo.call(e,c))&&f++;continue}if(h===null||y===null||typeof h!="object"||typeof y!="object"){a[c]=y;continue}const g=yt(h,y);a[c]=g,g===h&&f++}return s===i&&f===s?e:a}function Ye(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function nr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function bt(e){if(!sr(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!sr(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sr(e){return Object.prototype.toString.call(e)==="[object Object]"}function or(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return yt(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return yt(e,t)}return t}function zr(e,t){return typeof e=="function"?e(...t):!!e}var de,ne,Re,fr,io=(fr=class extends ot{constructor(){super();T(this,de);T(this,ne);T(this,Re);S(this,Re,t=>{if(!ke&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){d(this,ne)||this.setEventListener(d(this,Re))}onUnsubscribe(){var t;this.hasListeners()||((t=d(this,ne))==null||t.call(this),S(this,ne,void 0))}setEventListener(t){var r;S(this,Re,t),(r=d(this,ne))==null||r.call(this),S(this,ne,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){d(this,de)!==t&&(S(this,de,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof d(this,de)=="boolean"?d(this,de):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},de=new WeakMap,ne=new WeakMap,Re=new WeakMap,fr),ao=new io;function ir(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var co=no;function uo(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=co;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(f=>{r(f)})})})};return{batch:a=>{let f;t++;try{f=a()}finally{t--,t||i()}return f},batchCalls:a=>(...f)=>{o(()=>{a(...f)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var it=uo(),Oe,se,ve,hr,lo=(hr=class extends ot{constructor(){super();T(this,Oe,!0);T(this,se);T(this,ve);S(this,ve,t=>{if(!ke&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){d(this,se)||this.setEventListener(d(this,ve))}onUnsubscribe(){var t;this.hasListeners()||((t=d(this,se))==null||t.call(this),S(this,se,void 0))}setEventListener(t){var r;S(this,ve,t),(r=d(this,se))==null||r.call(this),S(this,se,t(this.setOnline.bind(this)))}setOnline(t){d(this,Oe)!==t&&(S(this,Oe,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return d(this,Oe)}},Oe=new WeakMap,se=new WeakMap,ve=new WeakMap,hr),fo=new lo;function ho(e){return(e??"online")==="online"?fo.isOnline():!0}function po(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ho(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}var I,v,Me,D,pe,Te,G,oe,Ie,Ce,Ae,me,ye,ie,xe,C,_e,gt,Et,wt,St,Rt,Ot,vt,Vr,dr,mo=(dr=class extends ot{constructor(t,r){super();T(this,C);T(this,I);T(this,v);T(this,Me);T(this,D);T(this,pe);T(this,Te);T(this,G);T(this,oe);T(this,Ie);T(this,Ce);T(this,Ae);T(this,me);T(this,ye);T(this,ie);T(this,xe,new Set);this.options=r,S(this,I,t),S(this,oe,null),S(this,G,ir()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(d(this,v).addObserver(this),ar(d(this,v),this.options)?x(this,C,_e).call(this):this.updateResult(),x(this,C,St).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tt(d(this,v),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tt(d(this,v),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,x(this,C,Rt).call(this),x(this,C,Ot).call(this),d(this,v).removeObserver(this)}setOptions(t){const r=this.options,n=d(this,v);if(this.options=d(this,I).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $(this.options.enabled,d(this,v))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");x(this,C,vt).call(this),d(this,v).setOptions(this.options),r._defaulted&&!Ye(this.options,r)&&d(this,I).getQueryCache().notify({type:"observerOptionsUpdated",query:d(this,v),observer:this});const s=this.hasListeners();s&&cr(d(this,v),n,this.options,r)&&x(this,C,_e).call(this),this.updateResult(),s&&(d(this,v)!==n||$(this.options.enabled,d(this,v))!==$(r.enabled,d(this,v))||Ue(this.options.staleTime,d(this,v))!==Ue(r.staleTime,d(this,v)))&&x(this,C,gt).call(this);const o=x(this,C,Et).call(this);s&&(d(this,v)!==n||$(this.options.enabled,d(this,v))!==$(r.enabled,d(this,v))||o!==d(this,ie))&&x(this,C,wt).call(this,o)}getOptimisticResult(t){const r=d(this,I).getQueryCache().build(d(this,I),t),n=this.createResult(r,t);return bo(this,n)&&(S(this,D,n),S(this,Te,this.options),S(this,pe,d(this,v).state)),n}getCurrentResult(){return d(this,D)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&d(this,G).status==="pending"&&d(this,G).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){d(this,xe).add(t)}getCurrentQuery(){return d(this,v)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=d(this,I).defaultQueryOptions(t),n=d(this,I).getQueryCache().build(d(this,I),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return x(this,C,_e).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),d(this,D)))}createResult(t,r){var ce;const n=d(this,v),s=this.options,o=d(this,D),i=d(this,pe),a=d(this,Te),u=t!==n?t.state:d(this,Me),{state:c}=t;let h={...c},y=!1,g;if(r._optimisticResults){const k=this.hasListeners(),ue=!k&&ar(t,r),q=k&&cr(t,n,r,s);(ue||q)&&(h={...h,...po(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:b,status:m}=h;g=h.data;let E=!1;if(r.placeholderData!==void 0&&g===void 0&&m==="pending"){let k;o!=null&&o.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(k=o.data,E=!0):k=typeof r.placeholderData=="function"?r.placeholderData((ce=d(this,Ae))==null?void 0:ce.state.data,d(this,Ae)):r.placeholderData,k!==void 0&&(m="success",g=or(o==null?void 0:o.data,k,r),y=!0)}if(r.select&&g!==void 0&&!E)if(o&&g===(i==null?void 0:i.data)&&r.select===d(this,Ie))g=d(this,Ce);else try{S(this,Ie,r.select),g=r.select(g),g=or(o==null?void 0:o.data,g,r),S(this,Ce,g),S(this,oe,null)}catch(k){S(this,oe,k)}d(this,oe)&&(p=d(this,oe),g=d(this,Ce),b=Date.now(),m="error");const w=h.fetchStatus==="fetching",O=m==="pending",A=m==="error",F=O&&w,N=g!==void 0,M={status:m,fetchStatus:h.fetchStatus,isPending:O,isSuccess:m==="success",isError:A,isInitialLoading:F,isLoading:F,data:g,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:b,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!O,isLoadingError:A&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:A&&N,isStale:_t(t,r),refetch:this.refetch,promise:d(this,G),isEnabled:$(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=J=>{M.status==="error"?J.reject(M.error):M.data!==void 0&&J.resolve(M.data)},ue=()=>{const J=S(this,G,M.promise=ir());k(J)},q=d(this,G);switch(q.status){case"pending":t.queryHash===n.queryHash&&k(q);break;case"fulfilled":(M.status==="error"||M.data!==q.value)&&ue();break;case"rejected":(M.status!=="error"||M.error!==q.reason)&&ue();break}}return M}updateResult(){const t=d(this,D),r=this.createResult(d(this,v),this.options);if(S(this,pe,d(this,v).state),S(this,Te,this.options),d(this,pe).data!==void 0&&S(this,Ae,d(this,v)),Ye(r,t))return;S(this,D,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!d(this,xe).size)return!0;const i=new Set(o??d(this,xe));return this.options.throwOnError&&i.add("error"),Object.keys(d(this,D)).some(a=>{const f=a;return d(this,D)[f]!==t[f]&&i.has(f)})};x(this,C,Vr).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&x(this,C,St).call(this)}},I=new WeakMap,v=new WeakMap,Me=new WeakMap,D=new WeakMap,pe=new WeakMap,Te=new WeakMap,G=new WeakMap,oe=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,Ae=new WeakMap,me=new WeakMap,ye=new WeakMap,ie=new WeakMap,xe=new WeakMap,C=new WeakSet,_e=function(t){x(this,C,vt).call(this);let r=d(this,v).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ze)),r},gt=function(){x(this,C,Rt).call(this);const t=Ue(this.options.staleTime,d(this,v));if(ke||d(this,D).isStale||!tr(t))return;const n=so(d(this,D).dataUpdatedAt,t)+1;S(this,me,Je.setTimeout(()=>{d(this,D).isStale||this.updateResult()},n))},Et=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(d(this,v)):this.options.refetchInterval)??!1},wt=function(t){x(this,C,Ot).call(this),S(this,ie,t),!(ke||$(this.options.enabled,d(this,v))===!1||!tr(d(this,ie))||d(this,ie)===0)&&S(this,ye,Je.setInterval(()=>{(this.options.refetchIntervalInBackground||ao.isFocused())&&x(this,C,_e).call(this)},d(this,ie)))},St=function(){x(this,C,gt).call(this),x(this,C,wt).call(this,x(this,C,Et).call(this))},Rt=function(){d(this,me)&&(Je.clearTimeout(d(this,me)),S(this,me,void 0))},Ot=function(){d(this,ye)&&(Je.clearInterval(d(this,ye)),S(this,ye,void 0))},vt=function(){const t=d(this,I).getQueryCache().build(d(this,I),this.options);if(t===d(this,v))return;const r=d(this,v);S(this,v,t),S(this,Me,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Vr=function(t){it.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(d(this,D))}),d(this,I).getQueryCache().notify({query:d(this,v),type:"observerResultsUpdated"})})},dr);function yo(e,t){return $(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ar(e,t){return yo(e,t)||e.state.data!==void 0&&Tt(e,t,t.refetchOnMount)}function Tt(e,t,r){if($(t.enabled,e)!==!1&&Ue(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&_t(e,t)}return!1}function cr(e,t,r,n){return(e!==t||$(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&_t(e,r)}function _t(e,t){return $(t.enabled,e)!==!1&&e.isStaleByTime(Ue(t.staleTime,e))}function bo(e,t){return!Ye(e.getCurrentResult(),t)}function go(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var X,ae,B,Z,Y,Ge,Ct,pr,Eo=(pr=class extends ot{constructor(t,r){super();T(this,Y);T(this,X);T(this,ae);T(this,B);T(this,Z);S(this,X,t),this.setOptions(r),this.bindMethods(),x(this,Y,Ge).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=d(this,X).defaultMutationOptions(t),Ye(this.options,r)||d(this,X).getMutationCache().notify({type:"observerOptionsUpdated",mutation:d(this,B),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&rr(r.mutationKey)!==rr(this.options.mutationKey)?this.reset():((n=d(this,B))==null?void 0:n.state.status)==="pending"&&d(this,B).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=d(this,B))==null||t.removeObserver(this)}onMutationUpdate(t){x(this,Y,Ge).call(this),x(this,Y,Ct).call(this,t)}getCurrentResult(){return d(this,ae)}reset(){var t;(t=d(this,B))==null||t.removeObserver(this),S(this,B,void 0),x(this,Y,Ge).call(this),x(this,Y,Ct).call(this)}mutate(t,r){var n;return S(this,Z,r),(n=d(this,B))==null||n.removeObserver(this),S(this,B,d(this,X).getMutationCache().build(d(this,X),this.options)),d(this,B).addObserver(this),d(this,B).execute(t)}},X=new WeakMap,ae=new WeakMap,B=new WeakMap,Z=new WeakMap,Y=new WeakSet,Ge=function(){var r;const t=((r=d(this,B))==null?void 0:r.state)??go();S(this,ae,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ct=function(t){it.batch(()=>{var r,n,s,o,i,a,f,u;if(d(this,Z)&&this.hasListeners()){const c=d(this,ae).variables,h=d(this,ae).context,y={client:d(this,X),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=d(this,Z)).onSuccess)==null||n.call(r,t.data,c,h,y),(o=(s=d(this,Z)).onSettled)==null||o.call(s,t.data,null,c,h,y)):(t==null?void 0:t.type)==="error"&&((a=(i=d(this,Z)).onError)==null||a.call(i,t.error,c,h,y),(u=(f=d(this,Z)).onSettled)==null||u.call(f,void 0,t.error,c,h,y))}this.listeners.forEach(c=>{c(d(this,ae))})})},pr),wo=_.createContext(void 0),Jr=e=>{const t=_.useContext(wo);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Qr=_.createContext(!1),So=()=>_.useContext(Qr);Qr.Provider;function Ro(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Oo=_.createContext(Ro()),vo=()=>_.useContext(Oo),To=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Co=e=>{_.useEffect(()=>{e.clearReset()},[e])},Ao=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||zr(r,[e.error,n])),xo=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Po=(e,t)=>e.isLoading&&e.isFetching&&!t,Fo=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ur=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Lo(e,t,r){var h,y,g,p,b;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=So(),s=vo(),o=Jr(),i=o.defaultQueryOptions(e);(y=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||y.call(h,i),process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),i._optimisticResults=n?"isRestoring":"optimistic",xo(i),To(i,s),Co(s);const a=!o.getQueryCache().get(i.queryHash),[f]=_.useState(()=>new t(o,i)),u=f.getOptimisticResult(i),c=!n&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(m=>{const E=c?f.subscribe(it.batchCalls(m)):Ze;return f.updateResult(),E},[f,c]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),_.useEffect(()=>{f.setOptions(i)},[i,f]),Fo(i,u))throw ur(i,f,s);if(Ao({result:u,errorResetBoundary:s,throwOnError:i.throwOnError,query:o.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((p=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||p.call(g,i,u),i.experimental_prefetchInRender&&!ke&&Po(u,n)){const m=a?ur(i,f,s):(b=o.getQueryCache().get(i.queryHash))==null?void 0:b.promise;m==null||m.catch(Ze).finally(()=>{f.updateResult()})}return i.notifyOnChangeProps?u:f.trackResult(u)}function No(e,t){return Lo(e,mo)}function _o(e,t){const r=Jr(),[n]=_.useState(()=>new Eo(r,e));_.useEffect(()=>{n.setOptions(e)},[n,e]);const s=_.useSyncExternalStore(_.useCallback(i=>n.subscribe(it.batchCalls(i)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=_.useCallback((i,a)=>{n.mutate(i,a).catch(Ze)},[n]);if(s.error&&zr(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const Uo=()=>{const e=ge.createContext(void 0);return{Provider:n=>{const s=ee.compilerRuntimeExports.c(3),{children:o,value:i}=n;let a;return s[0]!==o||s[1]!==i?(a=mr.jsx(e.Provider,{value:i,children:o}),s[0]=o,s[1]=i,s[2]=a):a=s[2],a},useContext:()=>{const n=ge.useContext(e);if(n===void 0)throw new Error("Context is missing a provider");return n}}},ko=(e,t)=>[t,({initialVariables:n,...s})=>{const[o,i]=ge.useState(n);return{...No({queryFn:()=>t(o),queryKey:[e,t,o,...s.queryKey]}),setVariables:i,variables:o}}],Wr=(e,t)=>[t,n=>_o({...n,mutationFn:t,mutationKey:[e,t,...n.mutationKey??[]]})],$e=(e,t,r)=>{const{useContext:n,Provider:s}=Uo(),o=a=>{const f=ee.compilerRuntimeExports.c(6);let u,c;f[0]!==a?({children:u,...c}=a,f[0]=a,f[1]=u,f[2]=c):(u=f[1],c=f[2]);const h=t(c);let y;return f[3]!==u||f[4]!==h?(y=mr.jsx(s,{value:h,children:u}),f[3]=u,f[4]=h,f[5]=y):y=f[5],y};return o.serviceName=Symbol(e),o.serviceDependencies=r,{ServiceProvider:o,useService:n}},De=e=>e.useService();exports.createAxiosHttpAdapter=$s;exports.createErrorService=Zr;exports.createEventBasedErrorAdapter=Yr;exports.createHttpService=tn;exports.createJsLogLoggerAdapter=Xs;exports.createLoggerBuilder=qr;exports.createLoggerService=zs;exports.createPosthogTrackerAdapter=eo;exports.createService=$e;exports.createTrackerService=Ys;exports.useBuildMutation=Wr;exports.useBuildQuery=ko;exports.useService=De;
10
+ */(function(e){(function(t){var r={};r.VERSION="1.6.1";var n,s={},o=function(a,p){return function(){return p.apply(a,arguments)}},i=function(){var a=arguments,p=a[0],y,w;for(w=1;w<a.length;w++)for(y in a[w])!(y in p)&&a[w].hasOwnProperty(y)&&(p[y]=a[w][y]);return p},c=function(a,p){return{value:a,name:p}};r.TRACE=c(1,"TRACE"),r.DEBUG=c(2,"DEBUG"),r.INFO=c(3,"INFO"),r.TIME=c(4,"TIME"),r.WARN=c(5,"WARN"),r.ERROR=c(8,"ERROR"),r.OFF=c(99,"OFF");var f=function(a){this.context=a,this.setLevel(a.filterLevel),this.log=this.info};f.prototype={setLevel:function(a){a&&"value"in a&&(this.context.filterLevel=a)},getLevel:function(){return this.context.filterLevel},enabledFor:function(a){var p=this.context.filterLevel;return a.value>=p.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(a){typeof a=="string"&&a.length>0&&this.invoke(r.TIME,[a,"start"])},timeEnd:function(a){typeof a=="string"&&a.length>0&&this.invoke(r.TIME,[a,"end"])},invoke:function(a,p){n&&this.enabledFor(a)&&n(p,i({level:a},this.context))}};var l=new f({filterLevel:r.OFF});(function(){var a=r;a.enabledFor=o(l,l.enabledFor),a.trace=o(l,l.trace),a.debug=o(l,l.debug),a.time=o(l,l.time),a.timeEnd=o(l,l.timeEnd),a.info=o(l,l.info),a.warn=o(l,l.warn),a.error=o(l,l.error),a.log=a.info})(),r.setHandler=function(a){n=a},r.setLevel=function(a){l.setLevel(a);for(var p in s)s.hasOwnProperty(p)&&s[p].setLevel(a)},r.getLevel=function(){return l.getLevel()},r.get=function(a){return s[a]||(s[a]=new f(i({name:a},l.context)))},r.createDefaultHandler=function(a){a=a||{},a.formatter=a.formatter||function(d,m){m.name&&d.unshift("["+m.name+"]")};var p={},y=function(w,d){Function.prototype.apply.call(w,console,d)};return typeof console>"u"?function(){}:function(w,d){w=Array.prototype.slice.call(w);var m=console.log,h;d.level===r.TIME?(h=(d.name?"["+d.name+"] ":"")+w[0],w[1]==="start"?console.time?console.time(h):p[h]=new Date().getTime():console.timeEnd?console.timeEnd(h):y(m,[h+": "+(new Date().getTime()-p[h])+"ms"])):(d.level===r.WARN&&console.warn?m=console.warn:d.level===r.ERROR&&console.error?m=console.error:d.level===r.INFO&&console.info?m=console.info:d.level===r.DEBUG&&console.debug?m=console.debug:d.level===r.TRACE&&console.trace&&(m=console.trace),a.formatter(w,d),y(m,w))}},r.useDefaults=function(a){r.setLevel(a&&a.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(a))},r.setDefaults=r.useDefaults,e.exports?e.exports=r:(r._prevLogger=t.Logger,r.noConflict=function(){return t.Logger=r._prevLogger,r},t.Logger=r)})(L.commonjsGlobal)})(vt);var An=vt.exports;const j=L.getDefaultExportFromCjs(An),Ce=e=>typeof e=="string"?e:e.stack||e.toString(),vn=e=>{j.debug("💡",e)},xn=e=>{j.error("❌",Ce(e))},Cn=e=>{j.error("❌",Ce(e))},Pn=e=>{j.info("✅",Ce(e))},Ln=e=>{j.warn("⚠️",e.toString())},Nn=()=>()=>($.useEffect(()=>{j.useDefaults({defaultLevel:j.INFO})},[]),{debug:vn,error:xn,fatal:Cn,info:Pn,warn:Ln}),Fn=e=>({...t})=>({captureEvent:e(t).captureEvent}),Un=({useAdapter:e,HttpService:t})=>ee("TRACKER_SERVICE",Fn(e),[t.ServiceProvider]),kn=({getDistinctId:e,getTimestamp:t,getHeaders:r,transformProperties:n,config:s})=>({HttpService:o})=>{const i=G(o),c=()=>({Authorization:`Bearer ${s.apiKey}`,...r==null?void 0:r()}),f=p=>[s.host,p].filter(Boolean).join("/"),l=(p,y)=>i.post({body:y,headers:c(),url:f(p)});return{captureEvent:Pt("posthog-capture-event",async({event:p,properties:y})=>{const w=s.paths.event,d=e(p,y),m=t==null?void 0:t(p,y),h=n(p,y);await l(w,{api_key:s.apiKey,distinct_id:d,event:p,properties:h,timestamp:m})})}};var xt=(e=>(e.MUTATION="mutation",e.QUERY="query",e))(xt||{});const Bn=()=>{const e=$.createContext(void 0);return{Provider:n=>{const s=L.compilerRuntimeExports.c(3),{children:o,value:i}=n;let c;return s[0]!==o||s[1]!==i?(c=Xe.jsx(e.Provider,{value:i,children:o}),s[0]=o,s[1]=i,s[2]=c):c=s[2],c},useContext:()=>{const n=$.useContext(e);if(n===void 0)throw new Error("Context is missing a provider");return n}}},Ct=(e,t,r)=>{const n=r;return n.serviceMethodKey=t,n.serviceMethodType=e,n},Pt=(e,t)=>Ct("mutation",e,t),Dn=(e,t)=>Ct("query",e,t),ee=(e,t,r)=>{const{useContext:n,Provider:s}=Bn(),o=c=>{const f=L.compilerRuntimeExports.c(6);let l,a;f[0]!==c?({children:l,...a}=c,f[0]=c,f[1]=l,f[2]=a):(l=f[1],a=f[2]);const p=t(a);let y;return f[3]!==l||f[4]!==p?(y=Xe.jsx(s,{value:p,children:l}),f[3]=l,f[4]=p,f[5]=y):y=f[5],y};return o.serviceName=Symbol(e),o.serviceDependencies=r,{ServiceProvider:o,useService:n}},G=e=>e.useService(),_n=(e,t)=>{const r=L.compilerRuntimeExports.c(7);let n;r[0]!==e||r[1]!==t.mutationKey?(n=L.buildSafeQueryKeys([e.serviceMethodKey,e,...t.mutationKey??[]]),r[0]=e,r[1]=t.mutationKey,r[2]=n):n=r[2];let s;return r[3]!==e||r[4]!==t||r[5]!==n?(s={...t,mutationFn:e,mutationKey:n},r[3]=e,r[4]=t,r[5]=n,r[6]=s):s=r[6],Ze.useMutation(s)},Mn=(e,t)=>{const r=L.compilerRuntimeExports.c(9),{initialVariables:n,...s}=t,[o,i]=$.useState(n);let c;r[0]!==e||r[1]!==o?(c=()=>e(o),r[0]=e,r[1]=o,r[2]=c):c=r[2];const f=L.buildSafeQueryKeys([e.serviceMethodKey,e,o,...s.queryKey]);let l;r[3]!==c||r[4]!==f?(l={queryFn:c,queryKey:f},r[3]=c,r[4]=f,r[5]=l):l=r[5];const a=Ze.useQuery(l);let p;return r[6]!==a||r[7]!==o?(p={...a,setVariables:i,variables:o},r[6]=a,r[7]=o,r[8]=p):p=r[8],p};exports.ServiceMethodType=xt;exports.createAxiosHttpAdapter=Tn;exports.createErrorService=Ft;exports.createEventBasedErrorAdapter=Ut;exports.createHttpService=Bt;exports.createJsLogLoggerAdapter=Nn;exports.createLoggerBuilder=At;exports.createLoggerService=On;exports.createPosthogTrackerAdapter=kn;exports.createService=ee;exports.createTrackerService=Un;exports.useBuildMutation=Pt;exports.useBuildQuery=Dn;exports.useService=G;exports.useServiceMutation=_n;exports.useServiceQuery=Mn;