@libretexts/cxone-expert-node 1.3.1 → 1.5.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.
package/README.md CHANGED
@@ -29,7 +29,8 @@ const expert = new Expert({
29
29
  secret: process.env.SERVER_SECRET,
30
30
  user: process.env.SERVER_USER,
31
31
  }
32
- }
32
+ },
33
+ debug: false, // Optional debug logging
33
34
  });
34
35
 
35
36
  // Now you can start making API calls!
@@ -50,5 +51,8 @@ const customAuth = { 'X-Deki-Token': 'different-token' };
50
51
  const page2 = await expert.pages.getPage(456, { auth: customAuth });
51
52
  ```
52
53
 
54
+ ## Dependencies
55
+ This package is designed to be lightweight and has only two dependencies: `axios` for making HTTP requests and `debug` for logging/troubleshooting.
56
+
53
57
  ## License
54
58
  This package is open-source and free to use under the [MIT License](http://opensource.org/licenses/MIT).
package/dist/index.cjs CHANGED
@@ -1,6 +1,9 @@
1
- "use strict";const bt=require("crypto");class We{token=null;BrowserToken({key:e}){return this.token=e,this}ServerToken({key:e,secret:t,user:s}){if(!e||!t||!s)throw new Error("Missing required parameters: key, secret, user");const n=Math.floor(Date.now()/1e3),a=bt.createHmac("sha256",t);a.update(`${e}${n}=${s}`);const o=a.digest("hex");return this.token=`${e}_${n}_=${s}_${o}`,this}getToken(){return this.token}getHeader(){return{"X-Deki-Token":this.token}}}function h(r,e){if(!e&&!r.tld)throw new Error("TLD is required");return e??r.tld}function p(r,e){if(e)return e;if(r.auth){const t=new We;if(r.auth.type==="server")return t.ServerToken(r.auth.params).getHeader();if(r.auth.type==="browser")return t.BrowserToken(r.auth.params).getHeader()}throw new Error("Authentication is required. Configure auth in Expert constructor or pass auth to method call.")}function Ve(r,e){return function(){return r.apply(e,arguments)}}const{toString:wt}=Object.prototype,{getPrototypeOf:Ie}=Object,{iterator:oe,toStringTag:Ge}=Symbol,ie=(r=>e=>{const t=wt.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),U=r=>(r=r.toLowerCase(),e=>ie(e)===r),le=r=>e=>typeof e===r,{isArray:K}=Array,H=le("undefined");function W(r){return r!==null&&!H(r)&&r.constructor!==null&&!H(r.constructor)&&O(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Xe=U("ArrayBuffer");function yt(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&Xe(r.buffer),e}const It=le("string"),O=le("function"),Qe=le("number"),V=r=>r!==null&&typeof r=="object",qt=r=>r===!0||r===!1,se=r=>{if(ie(r)!=="object")return!1;const e=Ie(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ge in r)&&!(oe in r)},Rt=r=>{if(!V(r)||W(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Pt=U("Date"),Et=U("File"),St=U("Blob"),Tt=U("FileList"),$t=r=>V(r)&&O(r.pipe),Ot=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||O(r.append)&&((e=ie(r))==="formdata"||e==="object"&&O(r.toString)&&r.toString()==="[object FormData]"))},_t=U("URLSearchParams"),[Ft,Ct,xt,Nt]=["ReadableStream","Request","Response","Headers"].map(U),Ut=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let s,n;if(typeof r!="object"&&(r=[r]),K(r))for(s=0,n=r.length;s<n;s++)e.call(null,r[s],s,r);else{if(W(r))return;const a=t?Object.getOwnPropertyNames(r):Object.keys(r),o=a.length;let i;for(s=0;s<o;s++)i=a[s],e.call(null,r[i],i,r)}}function Ze(r,e){if(W(r))return null;e=e.toLowerCase();const t=Object.keys(r);let s=t.length,n;for(;s-- >0;)if(n=t[s],e===n.toLowerCase())return n;return null}const v=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ye=r=>!H(r)&&r!==v;function me(){const{caseless:r,skipUndefined:e}=Ye(this)&&this||{},t={},s=(n,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const o=r&&Ze(t,a)||a;se(t[o])&&se(n)?t[o]=me(t[o],n):se(n)?t[o]=me({},n):K(n)?t[o]=n.slice():(!e||!H(n))&&(t[o]=n)};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&G(arguments[n],s);return t}const Dt=(r,e,t,{allOwnKeys:s}={})=>(G(e,(n,a)=>{t&&O(n)?Object.defineProperty(r,a,{value:Ve(n,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,a,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),r),kt=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Lt=(r,e,t,s)=>{r.prototype=Object.create(e.prototype,s),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},Bt=(r,e,t,s)=>{let n,a,o;const i={};if(e=e||{},r==null)return e;do{for(n=Object.getOwnPropertyNames(r),a=n.length;a-- >0;)o=n[a],(!s||s(o,r,e))&&!i[o]&&(e[o]=r[o],i[o]=!0);r=t!==!1&&Ie(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},vt=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const s=r.indexOf(e,t);return s!==-1&&s===t},jt=r=>{if(!r)return null;if(K(r))return r;let e=r.length;if(!Qe(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},At=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Ie(Uint8Array)),Mt=(r,e)=>{const s=(r&&r[oe]).call(r);let n;for(;(n=s.next())&&!n.done;){const a=n.value;e.call(r,a[0],a[1])}},Ht=(r,e)=>{let t;const s=[];for(;(t=r.exec(e))!==null;)s.push(t);return s},Kt=U("HTMLFormElement"),zt=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,s,n){return s.toUpperCase()+n}),Ce=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),Jt=U("RegExp"),et=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),s={};G(t,(n,a)=>{let o;(o=e(n,a,r))!==!1&&(s[a]=o||n)}),Object.defineProperties(r,s)},Wt=r=>{et(r,(e,t)=>{if(O(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const s=r[t];if(O(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Vt=(r,e)=>{const t={},s=n=>{n.forEach(a=>{t[a]=!0})};return K(r)?s(r):s(String(r).split(e)),t},Gt=()=>{},Xt=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function Qt(r){return!!(r&&O(r.append)&&r[Ge]==="FormData"&&r[oe])}const Zt=r=>{const e=new Array(10),t=(s,n)=>{if(V(s)){if(e.indexOf(s)>=0)return;if(W(s))return s;if(!("toJSON"in s)){e[n]=s;const a=K(s)?[]:{};return G(s,(o,i)=>{const l=t(o,n+1);!H(l)&&(a[i]=l)}),e[n]=void 0,a}}return s};return t(r,0)},Yt=U("AsyncFunction"),es=r=>r&&(V(r)||O(r))&&O(r.then)&&O(r.catch),tt=((r,e)=>r?setImmediate:e?((t,s)=>(v.addEventListener("message",({source:n,data:a})=>{n===v&&a===t&&s.length&&s.shift()()},!1),n=>{s.push(n),v.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",O(v.postMessage)),ts=typeof queueMicrotask<"u"?queueMicrotask.bind(v):typeof process<"u"&&process.nextTick||tt,ss=r=>r!=null&&O(r[oe]),c={isArray:K,isArrayBuffer:Xe,isBuffer:W,isFormData:Ot,isArrayBufferView:yt,isString:It,isNumber:Qe,isBoolean:qt,isObject:V,isPlainObject:se,isEmptyObject:Rt,isReadableStream:Ft,isRequest:Ct,isResponse:xt,isHeaders:Nt,isUndefined:H,isDate:Pt,isFile:Et,isBlob:St,isRegExp:Jt,isFunction:O,isStream:$t,isURLSearchParams:_t,isTypedArray:At,isFileList:Tt,forEach:G,merge:me,extend:Dt,trim:Ut,stripBOM:kt,inherits:Lt,toFlatObject:Bt,kindOf:ie,kindOfTest:U,endsWith:vt,toArray:jt,forEachEntry:Mt,matchAll:Ht,isHTMLForm:Kt,hasOwnProperty:Ce,hasOwnProp:Ce,reduceDescriptors:et,freezeMethods:Wt,toObjectSet:Vt,toCamelCase:zt,noop:Gt,toFiniteNumber:Xt,findKey:Ze,global:v,isContextDefined:Ye,isSpecCompliantForm:Qt,toJSONObject:Zt,isAsyncFn:Yt,isThenable:es,setImmediate:tt,asap:ts,isIterable:ss};let y=class st extends Error{static from(e,t,s,n,a,o){const i=new st(e.message,t||e.code,s,n,a);return i.cause=e,i.name=e.name,o&&Object.assign(i,o),i}constructor(e,t,s,n,a){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),s&&(this.config=s),n&&(this.request=n),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";const ns=null;function be(r){return c.isPlainObject(r)||c.isArray(r)}function nt(r){return c.endsWith(r,"[]")?r.slice(0,-2):r}function xe(r,e,t){return r?r.concat(e).map(function(n,a){return n=nt(n),!t&&a?"["+n+"]":n}).join(t?".":""):e}function rs(r){return c.isArray(r)&&!r.some(be)}const as=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function ce(r,e,t){if(!c.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=c.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,m){return!c.isUndefined(m[w])});const s=t.metaTokens,n=t.visitor||u,a=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(n))throw new TypeError("visitor must be a function");function d(f){if(f===null)return"";if(c.isDate(f))return f.toISOString();if(c.isBoolean(f))return f.toString();if(!l&&c.isBlob(f))throw new y("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(f)||c.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,w,m){let R=f;if(f&&!m&&typeof f=="object"){if(c.endsWith(w,"{}"))w=s?w:w.slice(0,-2),f=JSON.stringify(f);else if(c.isArray(f)&&rs(f)||(c.isFileList(f)||c.endsWith(w,"[]"))&&(R=c.toArray(f)))return w=nt(w),R.forEach(function(P,T){!(c.isUndefined(P)||P===null)&&e.append(o===!0?xe([w],T,a):o===null?w:w+"[]",d(P))}),!1}return be(f)?!0:(e.append(xe(m,w,a),d(f)),!1)}const b=[],I=Object.assign(as,{defaultVisitor:u,convertValue:d,isVisitable:be});function E(f,w){if(!c.isUndefined(f)){if(b.indexOf(f)!==-1)throw Error("Circular reference detected in "+w.join("."));b.push(f),c.forEach(f,function(R,F){(!(c.isUndefined(R)||R===null)&&n.call(e,R,c.isString(F)?F.trim():F,w,I))===!0&&E(R,w?w.concat(F):[F])}),b.pop()}}if(!c.isObject(r))throw new TypeError("data must be an object");return E(r),e}function Ne(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function qe(r,e){this._pairs=[],r&&ce(r,this,e)}const rt=qe.prototype;rt.append=function(e,t){this._pairs.push([e,t])};rt.toString=function(e){const t=e?function(s){return e.call(this,s,Ne)}:Ne;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function os(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function at(r,e,t){if(!e)return r;const s=t&&t.encode||os,n=c.isFunction(t)?{serialize:t}:t,a=n&&n.serialize;let o;if(a?o=a(e,n):o=c.isURLSearchParams(e)?e.toString():new qe(e,n).toString(s),o){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+o}return r}class Ue{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},is=typeof URLSearchParams<"u"?URLSearchParams:qe,ls=typeof FormData<"u"?FormData:null,cs=typeof Blob<"u"?Blob:null,us={isBrowser:!0,classes:{URLSearchParams:is,FormData:ls,Blob:cs},protocols:["http","https","file","blob","url","data"]},Pe=typeof window<"u"&&typeof document<"u",we=typeof navigator=="object"&&navigator||void 0,ds=Pe&&(!we||["ReactNative","NativeScript","NS"].indexOf(we.product)<0),hs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ps=Pe&&window.location.href||"http://localhost",gs=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pe,hasStandardBrowserEnv:ds,hasStandardBrowserWebWorkerEnv:hs,navigator:we,origin:ps},Symbol.toStringTag,{value:"Module"})),S={...gs,...us};function fs(r,e){return ce(r,new S.classes.URLSearchParams,{visitor:function(t,s,n,a){return S.isNode&&c.isBuffer(t)?(this.append(s,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function ms(r){return c.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function bs(r){const e={},t=Object.keys(r);let s;const n=t.length;let a;for(s=0;s<n;s++)a=t[s],e[a]=r[a];return e}function ot(r){function e(t,s,n,a){let o=t[a++];if(o==="__proto__")return!0;const i=Number.isFinite(+o),l=a>=t.length;return o=!o&&c.isArray(n)?n.length:o,l?(c.hasOwnProp(n,o)?n[o]=[n[o],s]:n[o]=s,!i):((!n[o]||!c.isObject(n[o]))&&(n[o]=[]),e(t,s,n[o],a)&&c.isArray(n[o])&&(n[o]=bs(n[o])),!i)}if(c.isFormData(r)&&c.isFunction(r.entries)){const t={};return c.forEachEntry(r,(s,n)=>{e(ms(s),n,t,0)}),t}return null}function ws(r,e,t){if(c.isString(r))try{return(e||JSON.parse)(r),c.trim(r)}catch(s){if(s.name!=="SyntaxError")throw s}return(t||JSON.stringify)(r)}const X={transitional:Re,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const s=t.getContentType()||"",n=s.indexOf("application/json")>-1,a=c.isObject(e);if(a&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return n?JSON.stringify(ot(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return fs(e,this.formSerializer).toString();if((i=c.isFileList(e))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ce(i?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||n?(t.setContentType("application/json",!1),ws(e)):e}],transformResponse:[function(e){const t=this.transitional||X.transitional,s=t&&t.forcedJSONParsing,n=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(s&&!this.responseType||n)){const o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(i){if(o)throw i.name==="SyntaxError"?y.from(i,y.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],r=>{X.headers[r]={}});const ys=c.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"]),Is=r=>{const e={};let t,s,n;return r&&r.split(`
2
- `).forEach(function(o){n=o.indexOf(":"),t=o.substring(0,n).trim().toLowerCase(),s=o.substring(n+1).trim(),!(!t||e[t]&&ys[t])&&(t==="set-cookie"?e[t]?e[t].push(s):e[t]=[s]:e[t]=e[t]?e[t]+", "+s:s)}),e},De=Symbol("internals");function J(r){return r&&String(r).trim().toLowerCase()}function ne(r){return r===!1||r==null?r:c.isArray(r)?r.map(ne):String(r)}function qs(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=t.exec(r);)e[s[1]]=s[2];return e}const Rs=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function pe(r,e,t,s,n){if(c.isFunction(s))return s.call(this,e,t);if(n&&(e=t),!!c.isString(e)){if(c.isString(s))return e.indexOf(s)!==-1;if(c.isRegExp(s))return s.test(e)}}function Ps(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function Es(r,e){const t=c.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(r,s+t,{value:function(n,a,o){return this[s].call(this,e,n,a,o)},configurable:!0})})}let _=class{constructor(e){e&&this.set(e)}set(e,t,s){const n=this;function a(i,l,d){const u=J(l);if(!u)throw new Error("header name must be a non-empty string");const b=c.findKey(n,u);(!b||n[b]===void 0||d===!0||d===void 0&&n[b]!==!1)&&(n[b||l]=ne(i))}const o=(i,l)=>c.forEach(i,(d,u)=>a(d,u,l));if(c.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(c.isString(e)&&(e=e.trim())&&!Rs(e))o(Is(e),t);else if(c.isObject(e)&&c.isIterable(e)){let i={},l,d;for(const u of e){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[d=u[0]]=(l=i[d])?c.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(i,t)}else e!=null&&a(t,e,s);return this}get(e,t){if(e=J(e),e){const s=c.findKey(this,e);if(s){const n=this[s];if(!t)return n;if(t===!0)return qs(n);if(c.isFunction(t))return t.call(this,n,s);if(c.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=J(e),e){const s=c.findKey(this,e);return!!(s&&this[s]!==void 0&&(!t||pe(this,this[s],s,t)))}return!1}delete(e,t){const s=this;let n=!1;function a(o){if(o=J(o),o){const i=c.findKey(s,o);i&&(!t||pe(s,s[i],i,t))&&(delete s[i],n=!0)}}return c.isArray(e)?e.forEach(a):a(e),n}clear(e){const t=Object.keys(this);let s=t.length,n=!1;for(;s--;){const a=t[s];(!e||pe(this,this[a],a,e,!0))&&(delete this[a],n=!0)}return n}normalize(e){const t=this,s={};return c.forEach(this,(n,a)=>{const o=c.findKey(s,a);if(o){t[o]=ne(n),delete t[a];return}const i=e?Ps(a):String(a).trim();i!==a&&delete t[a],t[i]=ne(n),s[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return c.forEach(this,(s,n)=>{s!=null&&s!==!1&&(t[n]=e&&c.isArray(s)?s.join(", "):s)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach(n=>s.set(n)),s}static accessor(e){const s=(this[De]=this[De]={accessors:{}}).accessors,n=this.prototype;function a(o){const i=J(o);s[i]||(Es(n,o),s[i]=!0)}return c.isArray(e)?e.forEach(a):a(e),this}};_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(_.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(s){this[t]=s}}});c.freezeMethods(_);function ge(r,e){const t=this||X,s=e||t,n=_.from(s.headers);let a=s.data;return c.forEach(r,function(i){a=i.call(t,a,n.normalize(),e?e.status:void 0)}),n.normalize(),a}function it(r){return!!(r&&r.__CANCEL__)}let Q=class extends y{constructor(e,t,s){super(e??"canceled",y.ERR_CANCELED,t,s),this.name="CanceledError",this.__CANCEL__=!0}};function lt(r,e,t){const s=t.config.validateStatus;!t.status||!s||s(t.status)?r(t):e(new y("Request failed with status code "+t.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Ss(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function Ts(r,e){r=r||10;const t=new Array(r),s=new Array(r);let n=0,a=0,o;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),u=s[a];o||(o=d),t[n]=l,s[n]=d;let b=a,I=0;for(;b!==n;)I+=t[b++],b=b%r;if(n=(n+1)%r,n===a&&(a=(a+1)%r),d-o<e)return;const E=u&&d-u;return E?Math.round(I*1e3/E):void 0}}function $s(r,e){let t=0,s=1e3/e,n,a;const o=(d,u=Date.now())=>{t=u,n=null,a&&(clearTimeout(a),a=null),r(...d)};return[(...d)=>{const u=Date.now(),b=u-t;b>=s?o(d,u):(n=d,a||(a=setTimeout(()=>{a=null,o(n)},s-b)))},()=>n&&o(n)]}const ae=(r,e,t=3)=>{let s=0;const n=Ts(50,250);return $s(a=>{const o=a.loaded,i=a.lengthComputable?a.total:void 0,l=o-s,d=n(l),u=o<=i;s=o;const b={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:d||void 0,estimated:d&&i&&u?(i-o)/d:void 0,event:a,lengthComputable:i!=null,[e?"download":"upload"]:!0};r(b)},t)},ke=(r,e)=>{const t=r!=null;return[s=>e[0]({lengthComputable:t,total:r,loaded:s}),e[1]]},Le=r=>(...e)=>c.asap(()=>r(...e)),Os=S.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,S.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,_s=S.hasStandardBrowserEnv?{write(r,e,t,s,n,a,o){if(typeof document>"u")return;const i=[`${r}=${encodeURIComponent(e)}`];c.isNumber(t)&&i.push(`expires=${new Date(t).toUTCString()}`),c.isString(s)&&i.push(`path=${s}`),c.isString(n)&&i.push(`domain=${n}`),a===!0&&i.push("secure"),c.isString(o)&&i.push(`SameSite=${o}`),document.cookie=i.join("; ")},read(r){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Fs(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Cs(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function ct(r,e,t){let s=!Fs(e);return r&&(s||t==!1)?Cs(r,e):e}const Be=r=>r instanceof _?{...r}:r;function A(r,e){e=e||{};const t={};function s(d,u,b,I){return c.isPlainObject(d)&&c.isPlainObject(u)?c.merge.call({caseless:I},d,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function n(d,u,b,I){if(c.isUndefined(u)){if(!c.isUndefined(d))return s(void 0,d,b,I)}else return s(d,u,b,I)}function a(d,u){if(!c.isUndefined(u))return s(void 0,u)}function o(d,u){if(c.isUndefined(u)){if(!c.isUndefined(d))return s(void 0,d)}else return s(void 0,u)}function i(d,u,b){if(b in e)return s(d,u);if(b in r)return s(void 0,d)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(d,u,b)=>n(Be(d),Be(u),b,!0)};return c.forEach(Object.keys({...r,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const b=c.hasOwnProp(l,u)?l[u]:n,I=b(r[u],e[u],u);c.isUndefined(I)&&b!==i||(t[u]=I)}),t}const ut=r=>{const e=A({},r);let{data:t,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:a,headers:o,auth:i}=e;if(e.headers=o=_.from(o),e.url=at(ct(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),i&&o.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),c.isFormData(t)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(c.isFunction(t.getHeaders)){const l=t.getHeaders(),d=["content-type","content-length"];Object.entries(l).forEach(([u,b])=>{d.includes(u.toLowerCase())&&o.set(u,b)})}}if(S.hasStandardBrowserEnv&&(s&&c.isFunction(s)&&(s=s(e)),s||s!==!1&&Os(e.url))){const l=n&&a&&_s.read(a);l&&o.set(n,l)}return e},xs=typeof XMLHttpRequest<"u",Ns=xs&&function(r){return new Promise(function(t,s){const n=ut(r);let a=n.data;const o=_.from(n.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:d}=n,u,b,I,E,f;function w(){E&&E(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout;function R(){if(!m)return;const P=_.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),N={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:P,config:r,request:m};lt(function(C){t(C),w()},function(C){s(C),w()},N),m=null}"onloadend"in m?m.onloadend=R:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(R)},m.onabort=function(){m&&(s(new y("Request aborted",y.ECONNABORTED,r,m)),m=null)},m.onerror=function(T){const N=T&&T.message?T.message:"Network Error",L=new y(N,y.ERR_NETWORK,r,m);L.event=T||null,s(L),m=null},m.ontimeout=function(){let T=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const N=n.transitional||Re;n.timeoutErrorMessage&&(T=n.timeoutErrorMessage),s(new y(T,N.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,r,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&c.forEach(o.toJSON(),function(T,N){m.setRequestHeader(N,T)}),c.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),i&&i!=="json"&&(m.responseType=n.responseType),d&&([I,f]=ae(d,!0),m.addEventListener("progress",I)),l&&m.upload&&([b,E]=ae(l),m.upload.addEventListener("progress",b),m.upload.addEventListener("loadend",E)),(n.cancelToken||n.signal)&&(u=P=>{m&&(s(!P||P.type?new Q(null,r,m):P),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const F=Ss(n.url);if(F&&S.protocols.indexOf(F)===-1){s(new y("Unsupported protocol "+F+":",y.ERR_BAD_REQUEST,r));return}m.send(a||null)})},Us=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let s=new AbortController,n;const a=function(d){if(!n){n=!0,i();const u=d instanceof Error?d:this.reason;s.abort(u instanceof y?u:new Q(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,a(new y(`timeout of ${e}ms exceeded`,y.ETIMEDOUT))},e);const i=()=>{r&&(o&&clearTimeout(o),o=null,r.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),r=null)};r.forEach(d=>d.addEventListener("abort",a));const{signal:l}=s;return l.unsubscribe=()=>c.asap(i),l}},Ds=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let s=0,n;for(;s<t;)n=s+e,yield r.slice(s,n),s=n},ks=async function*(r,e){for await(const t of Ls(r))yield*Ds(t,e)},Ls=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:s}=await e.read();if(t)break;yield s}}finally{await e.cancel()}},ve=(r,e,t,s)=>{const n=ks(r,e);let a=0,o,i=l=>{o||(o=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:d,value:u}=await n.next();if(d){i(),l.close();return}let b=u.byteLength;if(t){let I=a+=b;t(I)}l.enqueue(new Uint8Array(u))}catch(d){throw i(d),d}},cancel(l){return i(l),n.return()}},{highWaterMark:2})},je=64*1024,{isFunction:te}=c,Bs=(({Request:r,Response:e})=>({Request:r,Response:e}))(c.global),{ReadableStream:Ae,TextEncoder:Me}=c.global,He=(r,...e)=>{try{return!!r(...e)}catch{return!1}},vs=r=>{r=c.merge.call({skipUndefined:!0},Bs,r);const{fetch:e,Request:t,Response:s}=r,n=e?te(e):typeof fetch=="function",a=te(t),o=te(s);if(!n)return!1;const i=n&&te(Ae),l=n&&(typeof Me=="function"?(f=>w=>f.encode(w))(new Me):async f=>new Uint8Array(await new t(f).arrayBuffer())),d=a&&i&&He(()=>{let f=!1;const w=new t(S.origin,{body:new Ae,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!w}),u=o&&i&&He(()=>c.isReadableStream(new s("").body)),b={stream:u&&(f=>f.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!b[f]&&(b[f]=(w,m)=>{let R=w&&w[f];if(R)return R.call(w);throw new y(`Response type '${f}' is not supported`,y.ERR_NOT_SUPPORT,m)})});const I=async f=>{if(f==null)return 0;if(c.isBlob(f))return f.size;if(c.isSpecCompliantForm(f))return(await new t(S.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(c.isArrayBufferView(f)||c.isArrayBuffer(f))return f.byteLength;if(c.isURLSearchParams(f)&&(f=f+""),c.isString(f))return(await l(f)).byteLength},E=async(f,w)=>{const m=c.toFiniteNumber(f.getContentLength());return m??I(w)};return async f=>{let{url:w,method:m,data:R,signal:F,cancelToken:P,timeout:T,onDownloadProgress:N,onUploadProgress:L,responseType:C,headers:de,withCredentials:Z="same-origin",fetchOptions:Se}=ut(f),Te=e||fetch;C=C?(C+"").toLowerCase():"text";let Y=Us([F,P&&P.toAbortSignal()],T),z=null;const B=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let $e;try{if(L&&d&&m!=="get"&&m!=="head"&&($e=await E(de,R))!==0){let k=new t(w,{method:"POST",body:R,duplex:"half"}),M;if(c.isFormData(R)&&(M=k.headers.get("content-type"))&&de.setContentType(M),k.body){const[he,ee]=ke($e,ae(Le(L)));R=ve(k.body,je,he,ee)}}c.isString(Z)||(Z=Z?"include":"omit");const $=a&&"credentials"in t.prototype,Oe={...Se,signal:Y,method:m.toUpperCase(),headers:de.normalize().toJSON(),body:R,duplex:"half",credentials:$?Z:void 0};z=a&&new t(w,Oe);let D=await(a?Te(z,Se):Te(w,Oe));const _e=u&&(C==="stream"||C==="response");if(u&&(N||_e&&B)){const k={};["status","statusText","headers"].forEach(Fe=>{k[Fe]=D[Fe]});const M=c.toFiniteNumber(D.headers.get("content-length")),[he,ee]=N&&ke(M,ae(Le(N),!0))||[];D=new s(ve(D.body,je,he,()=>{ee&&ee(),B&&B()}),k)}C=C||"text";let mt=await b[c.findKey(b,C)||"text"](D,f);return!_e&&B&&B(),await new Promise((k,M)=>{lt(k,M,{data:mt,headers:_.from(D.headers),status:D.status,statusText:D.statusText,config:f,request:z})})}catch($){throw B&&B(),$&&$.name==="TypeError"&&/Load failed|fetch/i.test($.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,f,z,$&&$.response),{cause:$.cause||$}):y.from($,$&&$.code,f,z,$&&$.response)}}},js=new Map,dt=r=>{let e=r&&r.env||{};const{fetch:t,Request:s,Response:n}=e,a=[s,n,t];let o=a.length,i=o,l,d,u=js;for(;i--;)l=a[i],d=u.get(l),d===void 0&&u.set(l,d=i?new Map:vs(e)),u=d;return d};dt();const Ee={http:ns,xhr:Ns,fetch:{get:dt}};c.forEach(Ee,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Ke=r=>`- ${r}`,As=r=>c.isFunction(r)||r===null||r===!1;function Ms(r,e){r=c.isArray(r)?r:[r];const{length:t}=r;let s,n;const a={};for(let o=0;o<t;o++){s=r[o];let i;if(n=s,!As(s)&&(n=Ee[(i=String(s)).toLowerCase()],n===void 0))throw new y(`Unknown adapter '${i}'`);if(n&&(c.isFunction(n)||(n=n.get(e))))break;a[i||"#"+o]=n}if(!n){const o=Object.entries(a).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
4
- `+o.map(Ke).join(`
5
- `):" "+Ke(o[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n}const ht={getAdapter:Ms,adapters:Ee};function fe(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Q(null,r)}function ze(r){return fe(r),r.headers=_.from(r.headers),r.data=ge.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),ht.getAdapter(r.adapter||X.adapter,r)(r).then(function(s){return fe(r),s.data=ge.call(r,r.transformResponse,s),s.headers=_.from(s.headers),s},function(s){return it(s)||(fe(r),s&&s.response&&(s.response.data=ge.call(r,r.transformResponse,s.response),s.response.headers=_.from(s.response.headers))),Promise.reject(s)})}const pt="1.13.5",ue={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{ue[r]=function(s){return typeof s===r||"a"+(e<1?"n ":" ")+r}});const Je={};ue.transitional=function(e,t,s){function n(a,o){return"[Axios v"+pt+"] Transitional option '"+a+"'"+o+(s?". "+s:"")}return(a,o,i)=>{if(e===!1)throw new y(n(o," has been removed"+(t?" in "+t:"")),y.ERR_DEPRECATED);return t&&!Je[o]&&(Je[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,o,i):!0}};ue.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Hs(r,e,t){if(typeof r!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const s=Object.keys(r);let n=s.length;for(;n-- >0;){const a=s[n],o=e[a];if(o){const i=r[a],l=i===void 0||o(i,a,r);if(l!==!0)throw new y("option "+a+" must be "+l,y.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new y("Unknown option "+a,y.ERR_BAD_OPTION)}}const re={assertOptions:Hs,validators:ue},x=re.validators;let j=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ue,response:new Ue}}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const a=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=`
6
- `+a):s.stack=a}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=A(this.defaults,t);const{transitional:s,paramsSerializer:n,headers:a}=t;s!==void 0&&re.assertOptions(s,{silentJSONParsing:x.transitional(x.boolean),forcedJSONParsing:x.transitional(x.boolean),clarifyTimeoutError:x.transitional(x.boolean),legacyInterceptorReqResOrdering:x.transitional(x.boolean)},!1),n!=null&&(c.isFunction(n)?t.paramsSerializer={serialize:n}:re.assertOptions(n,{encode:x.function,serialize:x.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),re.assertOptions(t,{baseUrl:x.spelling("baseURL"),withXsrfToken:x.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&c.merge(a.common,a[t.method]);a&&c.forEach(["delete","get","head","post","put","patch","common"],f=>{delete a[f]}),t.headers=_.concat(o,a);const i=[];let l=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(t)===!1)return;l=l&&w.synchronous;const m=t.transitional||Re;m&&m.legacyInterceptorReqResOrdering?i.unshift(w.fulfilled,w.rejected):i.push(w.fulfilled,w.rejected)});const d=[];this.interceptors.response.forEach(function(w){d.push(w.fulfilled,w.rejected)});let u,b=0,I;if(!l){const f=[ze.bind(this),void 0];for(f.unshift(...i),f.push(...d),I=f.length,u=Promise.resolve(t);b<I;)u=u.then(f[b++],f[b++]);return u}I=i.length;let E=t;for(;b<I;){const f=i[b++],w=i[b++];try{E=f(E)}catch(m){w.call(this,m);break}}try{u=ze.call(this,E)}catch(f){return Promise.reject(f)}for(b=0,I=d.length;b<I;)u=u.then(d[b++],d[b++]);return u}getUri(e){e=A(this.defaults,e);const t=ct(e.baseURL,e.url,e.allowAbsoluteUrls);return at(t,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){j.prototype[e]=function(t,s){return this.request(A(s||{},{method:e,url:t,data:(s||{}).data}))}});c.forEach(["post","put","patch"],function(e){function t(s){return function(a,o,i){return this.request(A(i||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}j.prototype[e]=t(),j.prototype[e+"Form"]=t(!0)});let Ks=class gt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const s=this;this.promise.then(n=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](n);s._listeners=null}),this.promise.then=n=>{let a;const o=new Promise(i=>{s.subscribe(i),a=i}).then(n);return o.cancel=function(){s.unsubscribe(a)},o},e(function(a,o,i){s.reason||(s.reason=new Q(a,o,i),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new gt(function(n){e=n}),cancel:e}}};function zs(r){return function(t){return r.apply(null,t)}}function Js(r){return c.isObject(r)&&r.isAxiosError===!0}const ye={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(ye).forEach(([r,e])=>{ye[e]=r});function ft(r){const e=new j(r),t=Ve(j.prototype.request,e);return c.extend(t,j.prototype,e,{allOwnKeys:!0}),c.extend(t,e,null,{allOwnKeys:!0}),t.create=function(n){return ft(A(r,n))},t}const q=ft(X);q.Axios=j;q.CanceledError=Q;q.CancelToken=Ks;q.isCancel=it;q.VERSION=pt;q.toFormData=ce;q.AxiosError=y;q.Cancel=q.CanceledError;q.all=function(e){return Promise.all(e)};q.spread=zs;q.isAxiosError=Js;q.mergeConfig=A;q.AxiosHeaders=_;q.formToJSON=r=>ot(c.isHTMLForm(r)?new FormData(r):r);q.getAdapter=ht.getAdapter;q.HttpStatusCode=ye;q.default=q;const{Axios:on,AxiosError:ln,CanceledError:cn,isCancel:un,CancelToken:dn,VERSION:hn,all:pn,Cancel:gn,isAxiosError:fn,spread:mn,toFormData:bn,AxiosHeaders:wn,HttpStatusCode:yn,formToJSON:In,getAdapter:qn,mergeConfig:Rn}=q,Ws="/@api/deki";class g{axiosInstance=q.create();format="json";constructor(e,t,s="json"){if(!e)throw new Error("TLD is required");if(!t)throw new Error("Auth object is required");let n=e;!n.startsWith("http://")&&!n.startsWith("https://")&&(n=`https://${n}`),n.endsWith("/")&&(n=n.slice(0,n.length-1)),this.format=s,this.axiosInstance=q.create({baseURL:`${n}${Ws}`,headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",...t}})}getFormatParam(){return{"dream.out.format":this.format}}async get(e,t){return await this.axiosInstance.get(e,{...t,params:{...t?.params,...this.getFormatParam()}})}async post(e,t,s){return await this.axiosInstance.post(e,t,{...s})}async put(e,t,s){return await this.axiosInstance.put(e,t,{...s})}async patch(e,t,s){return await this.axiosInstance.patch(e,t,{...s})}async del(e,t){return await this.axiosInstance.delete(e,{...t})}async head(e,t){return await this.axiosInstance.head(e,{...t})}}class Vs{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parsePageId(e){return typeof e=="number"?e.toString():e==="home"?e:`=${encodeURIComponent(encodeURIComponent(e))}`}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return`${encodeURIComponent(encodeURIComponent(e))}`}async getPages(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/pages",{params:{...e}})).data}async getPage(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}`,{params:{...t}})).data}async getPageContents(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/contents`,{params:{...t}})).data}async getPageContentsExplain(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/contents/explain`,{params:{...t}})).data}async getPageDiff(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/diff`,{params:{...t}})).data}async getPageExplain(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/explain`,{params:{...t}})).data}async getPageExportToken(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).get(`/pages/${a}/export/${t}`,{params:{...s},responseType:"stream"})).data}async getPageExportTokenFilename(e,t,s,n,a){const o=this.parsePageId(e),i=this.parseFileName(s),l=h(this.globals,a?.tld),d=p(this.globals,a?.auth);return(await new g(l,d).get(`/pages/${o}/export/${t}/${i}`,{params:{...n},responseType:"stream"})).data}async getPageFilesSubpages(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/explain`,{params:{...t}})).data}async getPageFiles(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/explain`,{params:{...t}})).data}async getPageFile(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/files/${o}`,{params:{...s},responseType:"stream"})).data}async getPageFileDescription(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/files/${o}/description`,{params:{...s},responseType:"stream"})).data}async getPageFileInfo(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/files/${o}/info`,{params:{...s}})).data}async getPageFileRevisions(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/files/${o}/revisions`,{params:{...s}})).data}async getPageFind(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/find`,{params:{...t}})).data}async getPageInfo(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/info`,{params:{...t}})).data}async getPageLinks(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/links`,{params:{...t}})).data}async getPagePDF(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/pdf`,{params:{...t},responseType:"stream"})).data}async getPagePDFFilename(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/pdf/${o}`,{params:{...s},responseType:"stream"})).data}async getPageProperties(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/properties`,{params:{...t}})).data}async getPagePropertiesKey(e,t,s,n){const a=this.parsePageId(e),o=this.parseKey(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/properties/${o}`,{params:{...s}})).data}async getPagePropertiesKeyInfo(e,t,s,n){const a=this.parsePageId(e),o=this.parseKey(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/pages/${a}/properties/${o}/info`,{params:{...s}})).data}async getPageRatings(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/ratings`,{params:{...t}})).data}async getPageRevisions(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/revisions`,{params:{...t}})).data}async getPageSubpages(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/subpages`,{params:{...t}})).data}async getPageTags(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/tags`,{params:{...t}})).data}async getPageTree(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/pages/${n}/tree`,{params:{...t}})).data}async getPageBook(e,t,s){this.parsePageId(e);const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get("/pages/book",{params:{...t},responseType:"stream"})).data}async getPageBookFilename(e,t,s,n){this.parsePageId(e),this.parseFileName(t);const a=h(this.globals,n?.tld),o=p(this.globals,n?.auth);return(await new g(a,o).get(`/pages/book/${t}`,{params:{...s},responseType:"stream"})).data}async getPagesCsv(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/pages/csv",{params:{...e},responseType:"stream"})).data}async getPagesPopular(e,t,s){this.parsePageId(e);const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get("/pages/popular",{params:{...t}})).data}async postPageContents(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).post(`/pages/${a}/contents`,t??"",{headers:{"Content-Type":"text/plain"},params:{...s}})).data}async putPageUnorder(e,t){const s=this.parsePageId(e),n=h(this.globals,t?.tld),a=p(this.globals,t?.auth);return(await new g(n,a).put(`/pages/${s}/unorder`,"")).data}async delPageDelete(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).del(`/pages/${n}`,{params:{...t}})).data}async delPageAllowed(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).del(`/pages/${n}/allowed`,{params:{...t}})).data}async postPageCopied(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).post(`/pages/${n}/copy`,"",{params:{...t}})).data}async postPageExport(e,t){const s=this.parsePageId(e),n=h(this.globals,t?.tld),a=p(this.globals,t?.auth);return(await new g(n,a).post(`/pages/${s}/export`,"")).data}async delPageFileName(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).del(`/pages/${a}/files/${o}`,{params:{...s}})).data}async headPageFileName(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).head(`/pages/${a}/files/${o}`,{params:{...s}})).data}async putPageFileName(e,t,s,n,a){const o=this.parsePageId(e),i=this.parseFileName(t),l=h(this.globals,a?.tld),d=p(this.globals,a?.auth);return(await new g(l,d).put(`/pages/${o}/files/${i}`,s,{headers:{"Content-Type":"application/octet-stream"},params:{...n}})).data}async delPageFileNameDescription(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).del(`/pages/${a}/files/${o}/description`,{params:{...s}})).data}async putPageFileNameDescription(e,t,s,n){const a=this.parsePageId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).put(`/pages/${a}/files/${o}/description`,{params:{...s}})).data}async putPageFileNamePropertiesKey(e,t,s,n,a){const o=this.parsePageId(e),i=this.parseFileName(t),l=this.parseKey(s),d=h(this.globals,a?.tld),u=p(this.globals,a?.auth);return(await new g(d,u).put(`/pages/${o}/files/${i}/properties/${l}`,"",{params:{...n}})).data}async putPageImport(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).put(`/pages/${n}/import`,"",{params:{...t}})).data}async putPageMove(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).put(`/pages/${n}/move`,"",{params:{...t}})).data}async putPageOrder(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).put(`/pages/${n}/order`,"",{params:{...t}})).data}async postPageProperties(e,t,s,n,a){const o=this.parsePageId(e),i=h(this.globals,a?.tld),l=p(this.globals,a?.auth);return(await new g(i,l).post(`/pages/${o}/properties`,s,{headers:{Slug:t},params:{...n}})).data}async putPageProperties(e,t,s,n,a){const o=this.parsePageId(e),i=h(this.globals,a?.tld),l=p(this.globals,a?.auth);return(await new g(i,l).put(`/pages/${o}/properties`,s,{headers:{Slug:t},params:{...n}})).data}async deletePagePropertiesKey(e,t,s,n){const a=this.parsePageId(e),o=this.parseKey(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).del(`/pages/${a}/properties/${o}`,{params:{...s}})).data}async putPagePropertiesKey(e,t,s,n){const a=this.parsePageId(e),o=this.parseKey(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).put(`/pages/${a}/properties/${o}`,"",{params:{...s}})).data}async postPageRatings(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).post(`/pages/${n}/ratings`,"",{params:{...t}})).data}async postPageRevert(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).post(`/pages/${n}/revert`,"",{params:{...t}})).data}async deletePageSecurity(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).del(`/pages/${n}/security`,{params:{...t}})).data}async postPageSecurity(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).post(`/pages/${a}/security`,t,{params:{...s}})).data}async putPageSecurity(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).put(`/pages/${a}/security`,t,{params:{...s}})).data}async putPageTags(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).put(`/pages/${a}/tags`,t,{params:{...s}})).data}}class Gs{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parseGroupId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(e)}`}async getGroups(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/groups",{params:{...e}})).data}async getGroup(e,t,s){const n=this.parseGroupId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/groups/${n}`,{params:{...t}})).data}async getGroupUser(e,t,s){const n=this.parseGroupId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/groups/${n}/users`,{params:{...t}})).data}}class Xs{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parsePageId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseUserId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}async getPageHierarchyById(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`events/page-hierarchy/${n}`,{params:{...t}})).data}async getPageHierarchyDetailById(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).get(`events/page-hierarchy/${a}/${t}`,{params:{...s}})).data}async getEventPage(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`events/page/${n}`,{params:{...t}})).data}async getEventPageDetail(e,t,s,n){const a=this.parsePageId(e),o=h(this.globals,n?.tld),i=p(this.globals,n?.auth);return(await new g(o,i).get(`/events/page/${a}/${t}`,{params:{...s}})).data}async getEventUserPage(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/events/user-page/${this.parseUserId(e)}`,{params:{...t}})).data}async getEventUserDetailPage(e,t,s,n){const a=h(this.globals,n?.tld),o=p(this.globals,n?.auth);return(await new g(a,o).get(`/events/user-page/${this.parseUserId(e)}/${t}`,{params:{...s}})).data}}class Qs{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}async getArchive(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/archive",{params:{...e}})).data}async getArchiveFiles(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/archive/files",{params:{...e}})).data}async getArchiveFile(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/archive/files/${e}`,{params:{...t},responseType:"stream"})).data}async getArchiveFileByName(e,t,s,n){const a=h(this.globals,n?.tld),o=this.parseFileName(t),i=p(this.globals,n?.auth);return(await new g(a,i).get(`/archive/files/${e}/${o}`,{params:{...s},responseType:"stream"})).data}async getArchiveFileInfo(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/archive/files/${e}/info`,{params:{...t}})).data}async getArchivePages(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/archive/pages",{params:{...e}})).data}async getArchivePage(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/archive/page/${e}`,{params:{...t}})).data}async getArchivePageContents(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/archive/page/${e}/contents`,{params:{...t}})).data}async getArchivePageInfo(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/archive/page/${e}/info`,{params:{...t}})).data}async getArchivePageSubPages(e,t,s){const n=h(this.globals,s?.tld),a=p(this.globals,s?.auth);return(await new g(n,a).get(`/archive/page/${e}/subpages`,{params:{...t}})).data}}class Zs{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parsePageId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return encodeURIComponent(encodeURIComponent(e))}async getSiteActivity(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/site/activity",{params:{...e}})).data}async getSiteExportGroups(e){const t=h(this.globals,e?.tld),s=p(this.globals,e?.auth);return(await new g(t,s).get("/site/export/groups")).data}async getSiteExportUsers(e){const t=h(this.globals,e?.tld),s=p(this.globals,e?.auth);return(await new g(t,s).get("/site/export/users")).data}async getSiteSubPagesTags(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/site/nav/${n}/children`,{params:{...t}})).data}async getSiteFullNavTreeTags(e,t,s){const n=this.parsePageId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/site/nav/${n}/full`,{params:{...t}})).data}async getSiteOperations(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/site/operations",{params:{...e}})).data}async getSiteProperties(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/site/properties",{params:{...e}})).data}async GetSiteKeyProperties(e,t,s){const n=this.parseKey(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/site/properties/${n}`,{params:{...t}})).data}async GetSiteKeyPropertiesInfo(e,t,s){const n=this.parseKey(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/site/properties/${n}/info`,{params:{...t}})).data}async GetSiteQuery(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/site/query",{params:{...e}})).data}async GetSiteStatus(e){const t=h(this.globals,e?.tld),s=p(this.globals,e?.auth);return(await new g(t,s).get("/site/status")).data}async GetSiteTags(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/site/tags",{params:{...e}})).data}async GetSiteTag(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/site/tag",{params:{...e}})).data}}class Ys{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}async getContextMaps(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/contextmaps",{params:{...e}})).data}async getContextMapsById(e,t,s,n){const a=h(this.globals,n?.tld),o=p(this.globals,n?.auth);return(await new g(a,o).get(`/contextmaps/${e}/${t}`,{params:{...s}})).data}}class en{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parseUserId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return encodeURIComponent(encodeURIComponent(e))}async getUsers(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/users",{params:{...e}})).data}async getUser(e,t,s){const n=this.parseUserId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/users/${n}`,{params:{...t}})).data}async getUserMetrics(e,t,s){const n=this.parseUserId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/users/${n}/metrics`,{params:{...t}})).data}async getUserProperties(e,t,s){const n=this.parseUserId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`/users/${n}/properties`,{params:{...t}})).data}async getUserPropertiesKey(e,t,s,n){const a=this.parseUserId(e),o=this.parseKey(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/users/${a}/properties/${o}`,{params:{...s}})).data}async getUserPropertiesKeyInfo(e,t,s,n){const a=this.parseUserId(e),o=this.parseKey(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`/users/${a}/properties/${o}/info`,{params:{...s}})).data}async getUsersSearch(e,t){const s=h(this.globals,t?.tld),n=p(this.globals,t?.auth);return(await new g(s,n).get("/users/search",{params:{...e}})).data}}class tn{globals;_auth;constructor(e,t){this.globals=e,this._auth=t}parseFileId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return encodeURIComponent(encodeURIComponent(e))}async getFile(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`files/${n}`,{params:{...t},responseType:"stream"})).data}async getFileName(e,t,s,n){const a=this.parseFileId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).get(`files/${a}/${o}`,{params:{...s},responseType:"stream"})).data}async getFileDescription(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`files/${n}/description`,{params:{...t},responseType:"stream"})).data}async getFileInfo(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`files/${n}/info`,{params:{...t}})).data}async getFileRevisions(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).get(`files/${n}/revisions`,{params:{...t}})).data}async deleteFile(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).del(`files/${n}`,{params:{...t}})).data}async headFile(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).head(`files/${n}`,{params:{...t}})).data}async putFile(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).put(`files/${n}`,"",{params:{...t}})).data}async deleteFileName(e,t,s,n){const a=this.parseFileId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).del(`files/${a}/${o}`,{params:{...s}})).data}async headFileName(e,t,s,n){const a=this.parseFileId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).head(`files/${a}/${o}`,{params:{...s}})).data}async putFileName(e,t,s,n){const a=this.parseFileId(e),o=this.parseFileName(t),i=h(this.globals,n?.tld),l=p(this.globals,n?.auth);return(await new g(i,l).put(`files/${a}/${o}`,"",{params:{...s}})).data}async postFileCopy(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).post(`files/${n}/copy`,"",{params:{...t}})).data}async delDescriptionFile(e,t,s){const n=this.parseFileId(e),a=h(this.globals,s?.tld),o=p(this.globals,s?.auth);return(await new g(a,o).del(`files/${n}/description`,{params:{...t}})).data}}class sn{globals={};_pages;_groups;_site;_auth;_archive;_events;_contextMaps;_users;_files;constructor(e){e&&(e.tld&&(this.globals.tld=e.tld),e.auth&&(this.globals.auth=e.auth))}setAuth(e){return this.globals.auth=e,this}configureServerAuth(e){return this.globals.auth={type:"server",params:e},this}configureBrowserAuth(e){return this.globals.auth={type:"browser",params:e},this}get pages(){return this._pages||(this._pages=new Vs(this.globals)),this._pages}get auth(){return this._auth||(this._auth=new We),this._auth}get site(){return this._site||(this._site=new Zs(this.globals)),this._site}get archive(){return this._archive||(this._archive=new Qs(this.globals)),this._archive}get groups(){return this._groups||(this._groups=new Gs(this.globals)),this._groups}get events(){return this._events||(this._events=new Xs(this.globals)),this._events}get contextMaps(){return this._contextMaps||(this._contextMaps=new Ys(this.globals)),this._contextMaps}get users(){return this._users||(this._users=new en(this.globals)),this._users}get files(){return this._files||(this._files=new tn(this.globals)),this._files}}module.exports=sn;
1
+ "use strict";const kt=require("crypto");class ht{token=null;BrowserToken({key:e}){return this.token=e,this}ServerToken({key:e,secret:s,user:t}){if(!e||!s||!t)throw new Error("Missing required parameters: key, secret, user");const a=Math.floor(Date.now()/1e3),n=kt.createHmac("sha256",s);n.update(`${e}${a}=${t}`);const o=n.digest("hex");return this.token=`${e}_${a}_=${t}_${o}`,this}getToken(){return this.token}getHeader(){return{"X-Deki-Token":this.token}}}function Lt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var pe={exports:{}},Se,Ge;function Bt(){if(Ge)return Se;Ge=1;var r=1e3,e=r*60,s=e*60,t=s*24,a=t*7,n=t*365.25;Se=function(u,h){h=h||{};var m=typeof u;if(m==="string"&&u.length>0)return o(u);if(m==="number"&&isFinite(u))return h.long?l(u):i(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function o(u){if(u=String(u),!(u.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(h){var m=parseFloat(h[1]),P=(h[2]||"ms").toLowerCase();switch(P){case"years":case"year":case"yrs":case"yr":case"y":return m*n;case"weeks":case"week":case"w":return m*a;case"days":case"day":case"d":return m*t;case"hours":case"hour":case"hrs":case"hr":case"h":return m*s;case"minutes":case"minute":case"mins":case"min":case"m":return m*e;case"seconds":case"second":case"secs":case"sec":case"s":return m*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}function i(u){var h=Math.abs(u);return h>=t?Math.round(u/t)+"d":h>=s?Math.round(u/s)+"h":h>=e?Math.round(u/e)+"m":h>=r?Math.round(u/r)+"s":u+"ms"}function l(u){var h=Math.abs(u);return h>=t?c(u,h,t,"day"):h>=s?c(u,h,s,"hour"):h>=e?c(u,h,e,"minute"):h>=r?c(u,h,r,"second"):u+" ms"}function c(u,h,m,P){var C=h>=m*1.5;return Math.round(u/m)+" "+P+(C?"s":"")}return Se}var _e,Xe;function jt(){if(Xe)return _e;Xe=1;function r(e){t.debug=t,t.default=t,t.coerce=c,t.disable=i,t.enable=n,t.enabled=l,t.humanize=Bt(),t.destroy=u,Object.keys(e).forEach(h=>{t[h]=e[h]}),t.names=[],t.skips=[],t.formatters={};function s(h){let m=0;for(let P=0;P<h.length;P++)m=(m<<5)-m+h.charCodeAt(P),m|=0;return t.colors[Math.abs(m)%t.colors.length]}t.selectColor=s;function t(h){let m,P=null,C,w;function b(...y){if(!b.enabled)return;const I=b,E=Number(new Date),F=E-(m||E);I.diff=F,I.prev=m,I.curr=E,m=E,y[0]=t.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let v=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(j,ee)=>{if(j==="%%")return"%";v++;const te=t.formatters[ee];if(typeof te=="function"){const k=y[v];j=te.call(I,k),y.splice(v,1),v--}return j}),t.formatArgs.call(I,y),(I.log||t.log).apply(I,y)}return b.namespace=h,b.useColors=t.useColors(),b.color=t.selectColor(h),b.extend=a,b.destroy=t.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>P!==null?P:(C!==t.namespaces&&(C=t.namespaces,w=t.enabled(h)),w),set:y=>{P=y}}),typeof t.init=="function"&&t.init(b),b}function a(h,m){const P=t(this.namespace+(typeof m>"u"?":":m)+h);return P.log=this.log,P}function n(h){t.save(h),t.namespaces=h,t.names=[],t.skips=[];const m=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const P of m)P[0]==="-"?t.skips.push(P.slice(1)):t.names.push(P)}function o(h,m){let P=0,C=0,w=-1,b=0;for(;P<h.length;)if(C<m.length&&(m[C]===h[P]||m[C]==="*"))m[C]==="*"?(w=C,b=P,C++):(P++,C++);else if(w!==-1)C=w+1,b++,P=b;else return!1;for(;C<m.length&&m[C]==="*";)C++;return C===m.length}function i(){const h=[...t.names,...t.skips.map(m=>"-"+m)].join(",");return t.enable(""),h}function l(h){for(const m of t.skips)if(o(h,m))return!1;for(const m of t.names)if(o(h,m))return!0;return!1}function c(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}return _e=r,_e}var Qe;function Mt(){return Qe||(Qe=1,(function(r,e){e.formatArgs=t,e.save=a,e.load=n,e.useColors=s,e.storage=o(),e.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function t(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let u=0,h=0;l[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(u++,m==="%c"&&(h=u))}),l.splice(h,0,c)}e.log=console.debug||console.log||(()=>{});function a(l){try{l?e.storage.setItem("debug",l):e.storage.removeItem("debug")}catch{}}function n(){let l;try{l=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function o(){try{return localStorage}catch{}}r.exports=jt()(e);const{formatters:i}=r.exports;i.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(pe,pe.exports)),pe.exports}var Ht=Mt();const zt=Lt(Ht);function Le(r,e){const s=zt(r);return e!==void 0&&(s.enabled=e),s}function p(r,e){if(!e&&!r.tld)throw new Error("TLD is required");return e??r.tld}function g(r,e){if(e)return e;if(r.auth){const s=new ht;if(r.auth.type==="server")return s.ServerToken(r.auth.params).getHeader();if(r.auth.type==="browser")return s.BrowserToken(r.auth.params).getHeader()}throw new Error("Authentication is required. Configure auth in Expert constructor or pass auth to method call.")}function f(r,e){if(!(!r.headers&&!e))return{...r.headers,...e}}function pt(r,e){return function(){return r.apply(e,arguments)}}const{toString:Kt}=Object.prototype,{getPrototypeOf:we}=Object,{iterator:Pe,toStringTag:gt}=Symbol,Re=(r=>e=>{const s=Kt.call(e);return r[s]||(r[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),D=r=>(r=r.toLowerCase(),e=>Re(e)===r),qe=r=>e=>typeof e===r,{isArray:Y}=Array,Z=qe("undefined");function ne(r){return r!==null&&!Z(r)&&r.constructor!==null&&!Z(r.constructor)&&N(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const ft=D("ArrayBuffer");function Jt(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&ft(r.buffer),e}const Vt=qe("string"),N=qe("function"),bt=qe("number"),oe=r=>r!==null&&typeof r=="object",At=r=>r===!0||r===!1,fe=r=>{if(Re(r)!=="object")return!1;const e=we(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(gt in r)&&!(Pe in r)},Wt=r=>{if(!oe(r)||ne(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Gt=D("Date"),Xt=D("File"),Qt=r=>!!(r&&typeof r.uri<"u"),Zt=r=>r&&typeof r.getParts<"u",Yt=D("Blob"),es=D("FileList"),ts=r=>oe(r)&&N(r.pipe);function ss(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ze=ss(),Ye=typeof Ze.FormData<"u"?Ze.FormData:void 0,as=r=>{if(!r)return!1;if(Ye&&r instanceof Ye)return!0;const e=we(r);if(!e||e===Object.prototype||!N(r.append))return!1;const s=Re(r);return s==="formdata"||s==="object"&&N(r.toString)&&r.toString()==="[object FormData]"},rs=D("URLSearchParams"),[ns,os,is,ls]=["ReadableStream","Request","Response","Headers"].map(D),cs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(r,e,{allOwnKeys:s=!1}={}){if(r===null||typeof r>"u")return;let t,a;if(typeof r!="object"&&(r=[r]),Y(r))for(t=0,a=r.length;t<a;t++)e.call(null,r[t],t,r);else{if(ne(r))return;const n=s?Object.getOwnPropertyNames(r):Object.keys(r),o=n.length;let i;for(t=0;t<o;t++)i=n[t],e.call(null,r[i],i,r)}}function mt(r,e){if(ne(r))return null;e=e.toLowerCase();const s=Object.keys(r);let t=s.length,a;for(;t-- >0;)if(a=s[t],e===a.toLowerCase())return a;return null}const A=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yt=r=>!Z(r)&&r!==A;function Ne(...r){const{caseless:e,skipUndefined:s}=yt(this)&&this||{},t={},a=(n,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&mt(t,o)||o,l=$e(t,i)?t[i]:void 0;fe(l)&&fe(n)?t[i]=Ne(l,n):fe(n)?t[i]=Ne({},n):Y(n)?t[i]=n.slice():(!s||!Z(n))&&(t[i]=n)};for(let n=0,o=r.length;n<o;n++)r[n]&&ie(r[n],a);return t}const us=(r,e,s,{allOwnKeys:t}={})=>(ie(e,(a,n)=>{s&&N(a)?Object.defineProperty(r,n,{__proto__:null,value:pt(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,n,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:t}),r),ds=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),hs=(r,e,s,t)=>{r.prototype=Object.create(e.prototype,t),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:e.prototype}),s&&Object.assign(r.prototype,s)},ps=(r,e,s,t)=>{let a,n,o;const i={};if(e=e||{},r==null)return e;do{for(a=Object.getOwnPropertyNames(r),n=a.length;n-- >0;)o=a[n],(!t||t(o,r,e))&&!i[o]&&(e[o]=r[o],i[o]=!0);r=s!==!1&&we(r)}while(r&&(!s||s(r,e))&&r!==Object.prototype);return e},gs=(r,e,s)=>{r=String(r),(s===void 0||s>r.length)&&(s=r.length),s-=e.length;const t=r.indexOf(e,s);return t!==-1&&t===s},fs=r=>{if(!r)return null;if(Y(r))return r;let e=r.length;if(!bt(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=r[e];return s},bs=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&we(Uint8Array)),ms=(r,e)=>{const t=(r&&r[Pe]).call(r);let a;for(;(a=t.next())&&!a.done;){const n=a.value;e.call(r,n[0],n[1])}},ys=(r,e)=>{let s;const t=[];for(;(s=r.exec(e))!==null;)t.push(s);return t},ws=D("HTMLFormElement"),Ps=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,t,a){return t.toUpperCase()+a}),$e=(({hasOwnProperty:r})=>(e,s)=>r.call(e,s))(Object.prototype),Rs=D("RegExp"),wt=(r,e)=>{const s=Object.getOwnPropertyDescriptors(r),t={};ie(s,(a,n)=>{let o;(o=e(a,n,r))!==!1&&(t[n]=o||a)}),Object.defineProperties(r,t)},qs=r=>{wt(r,(e,s)=>{if(N(r)&&["arguments","caller","callee"].includes(s))return!1;const t=r[s];if(N(t)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Cs=(r,e)=>{const s={},t=a=>{a.forEach(n=>{s[n]=!0})};return Y(r)?t(r):t(String(r).split(e)),s},Is=()=>{},Es=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function Fs(r){return!!(r&&N(r.append)&&r[gt]==="FormData"&&r[Pe])}const Ss=r=>{const e=new WeakSet,s=t=>{if(oe(t)){if(e.has(t))return;if(ne(t))return t;if(!("toJSON"in t)){e.add(t);const a=Y(t)?[]:{};return ie(t,(n,o)=>{const i=s(n);!Z(i)&&(a[o]=i)}),e.delete(t),a}}return t};return s(r)},_s=D("AsyncFunction"),vs=r=>r&&(oe(r)||N(r))&&N(r.then)&&N(r.catch),Pt=((r,e)=>r?setImmediate:e?((s,t)=>(A.addEventListener("message",({source:a,data:n})=>{a===A&&n===s&&t.length&&t.shift()()},!1),a=>{t.push(a),A.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",N(A.postMessage)),Os=typeof queueMicrotask<"u"?queueMicrotask.bind(A):typeof process<"u"&&process.nextTick||Pt,xs=r=>r!=null&&N(r[Pe]),d={isArray:Y,isArrayBuffer:ft,isBuffer:ne,isFormData:as,isArrayBufferView:Jt,isString:Vt,isNumber:bt,isBoolean:At,isObject:oe,isPlainObject:fe,isEmptyObject:Wt,isReadableStream:ns,isRequest:os,isResponse:is,isHeaders:ls,isUndefined:Z,isDate:Gt,isFile:Xt,isReactNativeBlob:Qt,isReactNative:Zt,isBlob:Yt,isRegExp:Rs,isFunction:N,isStream:ts,isURLSearchParams:rs,isTypedArray:bs,isFileList:es,forEach:ie,merge:Ne,extend:us,trim:cs,stripBOM:ds,inherits:hs,toFlatObject:ps,kindOf:Re,kindOfTest:D,endsWith:gs,toArray:fs,forEachEntry:ms,matchAll:ys,isHTMLForm:ws,hasOwnProperty:$e,hasOwnProp:$e,reduceDescriptors:wt,freezeMethods:qs,toObjectSet:Cs,toCamelCase:Ps,noop:Is,toFiniteNumber:Es,findKey:mt,global:A,isContextDefined:yt,isSpecCompliantForm:Fs,toJSONObject:Ss,isAsyncFn:_s,isThenable:vs,setImmediate:Pt,asap:Os,isIterable:xs},Ts=d.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"]),Ns=r=>{const e={};let s,t,a;return r&&r.split(`
2
+ `).forEach(function(o){a=o.indexOf(":"),s=o.substring(0,a).trim().toLowerCase(),t=o.substring(a+1).trim(),!(!s||e[s]&&Ts[s])&&(s==="set-cookie"?e[s]?e[s].push(t):e[s]=[t]:e[s]=e[s]?e[s]+", "+t:t)}),e};function $s(r){let e=0,s=r.length;for(;e<s;){const t=r.charCodeAt(e);if(t!==9&&t!==32)break;e+=1}for(;s>e;){const t=r.charCodeAt(s-1);if(t!==9&&t!==32)break;s-=1}return e===0&&s===r.length?r:r.slice(e,s)}const Us=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ds=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Be(r,e){return d.isArray(r)?r.map(s=>Be(s,e)):$s(String(r).replace(e,""))}const ks=r=>Be(r,Us),Ls=r=>Be(r,Ds);function Rt(r){const e=Object.create(null);return d.forEach(r.toJSON(),(s,t)=>{e[t]=Ls(s)}),e}const et=Symbol("internals");function re(r){return r&&String(r).trim().toLowerCase()}function be(r){return r===!1||r==null?r:d.isArray(r)?r.map(be):ks(String(r))}function Bs(r){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let t;for(;t=s.exec(r);)e[t[1]]=t[2];return e}const js=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ve(r,e,s,t,a){if(d.isFunction(t))return t.call(this,e,s);if(a&&(e=s),!!d.isString(e)){if(d.isString(t))return e.indexOf(t)!==-1;if(d.isRegExp(t))return t.test(e)}}function Ms(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,t)=>s.toUpperCase()+t)}function Hs(r,e){const s=d.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(r,t+s,{__proto__:null,value:function(a,n,o){return this[t].call(this,e,a,n,o)},configurable:!0})})}let T=class{constructor(e){e&&this.set(e)}set(e,s,t){const a=this;function n(i,l,c){const u=re(l);if(!u)throw new Error("header name must be a non-empty string");const h=d.findKey(a,u);(!h||a[h]===void 0||c===!0||c===void 0&&a[h]!==!1)&&(a[h||l]=be(i))}const o=(i,l)=>d.forEach(i,(c,u)=>n(c,u,l));if(d.isPlainObject(e)||e instanceof this.constructor)o(e,s);else if(d.isString(e)&&(e=e.trim())&&!js(e))o(Ns(e),s);else if(d.isObject(e)&&d.isIterable(e)){let i={},l,c;for(const u of e){if(!d.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[c=u[0]]=(l=i[c])?d.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(i,s)}else e!=null&&n(s,e,t);return this}get(e,s){if(e=re(e),e){const t=d.findKey(this,e);if(t){const a=this[t];if(!s)return a;if(s===!0)return Bs(a);if(d.isFunction(s))return s.call(this,a,t);if(d.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,s){if(e=re(e),e){const t=d.findKey(this,e);return!!(t&&this[t]!==void 0&&(!s||ve(this,this[t],t,s)))}return!1}delete(e,s){const t=this;let a=!1;function n(o){if(o=re(o),o){const i=d.findKey(t,o);i&&(!s||ve(t,t[i],i,s))&&(delete t[i],a=!0)}}return d.isArray(e)?e.forEach(n):n(e),a}clear(e){const s=Object.keys(this);let t=s.length,a=!1;for(;t--;){const n=s[t];(!e||ve(this,this[n],n,e,!0))&&(delete this[n],a=!0)}return a}normalize(e){const s=this,t={};return d.forEach(this,(a,n)=>{const o=d.findKey(t,n);if(o){s[o]=be(a),delete s[n];return}const i=e?Ms(n):String(n).trim();i!==n&&delete s[n],s[i]=be(a),t[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const s=Object.create(null);return d.forEach(this,(t,a)=>{t!=null&&t!==!1&&(s[a]=e&&d.isArray(t)?t.join(", "):t)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,s])=>e+": "+s).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...s){const t=new this(e);return s.forEach(a=>t.set(a)),t}static accessor(e){const t=(this[et]=this[et]={accessors:{}}).accessors,a=this.prototype;function n(o){const i=re(o);t[i]||(Hs(a,o),t[i]=!0)}return d.isArray(e)?e.forEach(n):n(e),this}};T.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(T.prototype,({value:r},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(t){this[s]=t}}});d.freezeMethods(T);const zs="[REDACTED ****]";function Ks(r){if(d.hasOwnProp(r,"toJSON"))return!0;let e=Object.getPrototypeOf(r);for(;e&&e!==Object.prototype;){if(d.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function Js(r,e){const s=new Set(e.map(n=>String(n).toLowerCase())),t=[],a=n=>{if(n===null||typeof n!="object"||d.isBuffer(n))return n;if(t.indexOf(n)!==-1)return;n instanceof T&&(n=n.toJSON()),t.push(n);let o;if(d.isArray(n))o=[],n.forEach((i,l)=>{const c=a(i);d.isUndefined(c)||(o[l]=c)});else{if(!d.isPlainObject(n)&&Ks(n))return t.pop(),n;o=Object.create(null);for(const[i,l]of Object.entries(n)){const c=s.has(i.toLowerCase())?zs:a(l);d.isUndefined(c)||(o[i]=c)}}return t.pop(),o};return a(r)}let R=class qt extends Error{static from(e,s,t,a,n,o){const i=new qt(e.message,s||e.code,t,a,n);return i.cause=e,i.name=e.name,e.status!=null&&i.status==null&&(i.status=e.status),o&&Object.assign(i,o),i}constructor(e,s,t,a,n){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),t&&(this.config=t),a&&(this.request=a),n&&(this.response=n,this.status=n.status)}toJSON(){const e=this.config,s=e&&d.hasOwnProp(e,"redact")?e.redact:void 0,t=d.isArray(s)&&s.length>0?Js(e,s):d.toJSONObject(e);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:t,code:this.code,status:this.status}}};R.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";R.ERR_BAD_OPTION="ERR_BAD_OPTION";R.ECONNABORTED="ECONNABORTED";R.ETIMEDOUT="ETIMEDOUT";R.ECONNREFUSED="ECONNREFUSED";R.ERR_NETWORK="ERR_NETWORK";R.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";R.ERR_DEPRECATED="ERR_DEPRECATED";R.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";R.ERR_BAD_REQUEST="ERR_BAD_REQUEST";R.ERR_CANCELED="ERR_CANCELED";R.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";R.ERR_INVALID_URL="ERR_INVALID_URL";R.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Vs=null;function Ue(r){return d.isPlainObject(r)||d.isArray(r)}function Ct(r){return d.endsWith(r,"[]")?r.slice(0,-2):r}function Oe(r,e,s){return r?r.concat(e).map(function(a,n){return a=Ct(a),!s&&n?"["+a+"]":a}).join(s?".":""):e}function As(r){return d.isArray(r)&&!r.some(Ue)}const Ws=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Ce(r,e,s){if(!d.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,s=d.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!d.isUndefined(y[b])});const t=s.metaTokens,a=s.visitor||h,n=s.dots,o=s.indexes,i=s.Blob||typeof Blob<"u"&&Blob,l=s.maxDepth===void 0?100:s.maxDepth,c=i&&d.isSpecCompliantForm(e);if(!d.isFunction(a))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(d.isDate(w))return w.toISOString();if(d.isBoolean(w))return w.toString();if(!c&&d.isBlob(w))throw new R("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(w)||d.isTypedArray(w)?c&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,b,y){let I=w;if(d.isReactNative(e)&&d.isReactNativeBlob(w))return e.append(Oe(y,b,n),u(w)),!1;if(w&&!y&&typeof w=="object"){if(d.endsWith(b,"{}"))b=t?b:b.slice(0,-2),w=JSON.stringify(w);else if(d.isArray(w)&&As(w)||(d.isFileList(w)||d.endsWith(b,"[]"))&&(I=d.toArray(w)))return b=Ct(b),I.forEach(function(F,v){!(d.isUndefined(F)||F===null)&&e.append(o===!0?Oe([b],v,n):o===null?b:b+"[]",u(F))}),!1}return Ue(w)?!0:(e.append(Oe(y,b,n),u(w)),!1)}const m=[],P=Object.assign(Ws,{defaultVisitor:h,convertValue:u,isVisitable:Ue});function C(w,b,y=0){if(!d.isUndefined(w)){if(y>l)throw new R("Object is too deeply nested ("+y+" levels). Max depth: "+l,R.ERR_FORM_DATA_DEPTH_EXCEEDED);if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+b.join("."));m.push(w),d.forEach(w,function(E,F){(!(d.isUndefined(E)||E===null)&&a.call(e,E,d.isString(F)?F.trim():F,b,P))===!0&&C(E,b?b.concat(F):[F],y+1)}),m.pop()}}if(!d.isObject(r))throw new TypeError("data must be an object");return C(r),e}function tt(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(r).replace(/[!'()~]|%20/g,function(t){return e[t]})}function je(r,e){this._pairs=[],r&&Ce(r,this,e)}const It=je.prototype;It.append=function(e,s){this._pairs.push([e,s])};It.toString=function(e){const s=e?function(t){return e.call(this,t,tt)}:tt;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function Gs(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Et(r,e,s){if(!e)return r;const t=s&&s.encode||Gs,a=d.isFunction(s)?{serialize:s}:s,n=a&&a.serialize;let o;if(n?o=n(e,a):o=d.isURLSearchParams(e)?e.toString():new je(e,a).toString(t),o){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+o}return r}class st{constructor(){this.handlers=[]}use(e,s,t){return this.handlers.push({fulfilled:e,rejected:s,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(t){t!==null&&e(t)})}}const Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Xs=typeof URLSearchParams<"u"?URLSearchParams:je,Qs=typeof FormData<"u"?FormData:null,Zs=typeof Blob<"u"?Blob:null,Ys={isBrowser:!0,classes:{URLSearchParams:Xs,FormData:Qs,Blob:Zs},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",De=typeof navigator=="object"&&navigator||void 0,ea=He&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),ta=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sa=He&&window.location.href||"http://localhost",aa=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:ea,hasStandardBrowserWebWorkerEnv:ta,navigator:De,origin:sa},Symbol.toStringTag,{value:"Module"})),x={...aa,...Ys};function ra(r,e){return Ce(r,new x.classes.URLSearchParams,{visitor:function(s,t,a,n){return x.isNode&&d.isBuffer(s)?(this.append(t,s.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...e})}function na(r){return d.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function oa(r){const e={},s=Object.keys(r);let t;const a=s.length;let n;for(t=0;t<a;t++)n=s[t],e[n]=r[n];return e}function Ft(r){function e(s,t,a,n){let o=s[n++];if(o==="__proto__")return!0;const i=Number.isFinite(+o),l=n>=s.length;return o=!o&&d.isArray(a)?a.length:o,l?(d.hasOwnProp(a,o)?a[o]=d.isArray(a[o])?a[o].concat(t):[a[o],t]:a[o]=t,!i):((!d.hasOwnProp(a,o)||!d.isObject(a[o]))&&(a[o]=[]),e(s,t,a[o],n)&&d.isArray(a[o])&&(a[o]=oa(a[o])),!i)}if(d.isFormData(r)&&d.isFunction(r.entries)){const s={};return d.forEachEntry(r,(t,a)=>{e(na(t),a,s,0)}),s}return null}const Q=(r,e)=>r!=null&&d.hasOwnProp(r,e)?r[e]:void 0;function ia(r,e,s){if(d.isString(r))try{return(e||JSON.parse)(r),d.trim(r)}catch(t){if(t.name!=="SyntaxError")throw t}return(s||JSON.stringify)(r)}const le={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(e,s){const t=s.getContentType()||"",a=t.indexOf("application/json")>-1,n=d.isObject(e);if(n&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return a?JSON.stringify(Ft(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(n){const l=Q(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return ra(e,l).toString();if((i=d.isFileList(e))||t.indexOf("multipart/form-data")>-1){const c=Q(this,"env"),u=c&&c.FormData;return Ce(i?{"files[]":e}:e,u&&new u,l)}}return n||a?(s.setContentType("application/json",!1),ia(e)):e}],transformResponse:[function(e){const s=Q(this,"transitional")||le.transitional,t=s&&s.forcedJSONParsing,a=Q(this,"responseType"),n=a==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(t&&!a||n)){const i=!(s&&s.silentJSONParsing)&&n;try{return JSON.parse(e,Q(this,"parseReviver"))}catch(l){if(i)throw l.name==="SyntaxError"?R.from(l,R.ERR_BAD_RESPONSE,this,null,Q(this,"response")):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch","query"],r=>{le.headers[r]={}});function xe(r,e){const s=this||le,t=e||s,a=T.from(t.headers);let n=t.data;return d.forEach(r,function(i){n=i.call(s,n,a.normalize(),e?e.status:void 0)}),a.normalize(),n}function St(r){return!!(r&&r.__CANCEL__)}let ce=class extends R{constructor(e,s,t){super(e??"canceled",R.ERR_CANCELED,s,t),this.name="CanceledError",this.__CANCEL__=!0}};function _t(r,e,s){const t=s.config.validateStatus;!s.status||!t||t(s.status)?r(s):e(new R("Request failed with status code "+s.status,s.status>=400&&s.status<500?R.ERR_BAD_REQUEST:R.ERR_BAD_RESPONSE,s.config,s.request,s))}function la(r){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(r);return e&&e[1]||""}function ca(r,e){r=r||10;const s=new Array(r),t=new Array(r);let a=0,n=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=t[n];o||(o=c),s[a]=l,t[a]=c;let h=n,m=0;for(;h!==a;)m+=s[h++],h=h%r;if(a=(a+1)%r,a===n&&(n=(n+1)%r),c-o<e)return;const P=u&&c-u;return P?Math.round(m*1e3/P):void 0}}function ua(r,e){let s=0,t=1e3/e,a,n;const o=(c,u=Date.now())=>{s=u,a=null,n&&(clearTimeout(n),n=null),r(...c)};return[(...c)=>{const u=Date.now(),h=u-s;h>=t?o(c,u):(a=c,n||(n=setTimeout(()=>{n=null,o(a)},t-h)))},()=>a&&o(a)]}const ye=(r,e,s=3)=>{let t=0;const a=ca(50,250);return ua(n=>{if(!n||typeof n.loaded!="number")return;const o=n.loaded,i=n.lengthComputable?n.total:void 0,l=i!=null?Math.min(o,i):o,c=Math.max(0,l-t),u=a(c);t=Math.max(t,l);const h={loaded:l,total:i,progress:i?l/i:void 0,bytes:c,rate:u||void 0,estimated:u&&i?(i-l)/u:void 0,event:n,lengthComputable:i!=null,[e?"download":"upload"]:!0};r(h)},s)},at=(r,e)=>{const s=r!=null;return[t=>e[0]({lengthComputable:s,total:r,loaded:t}),e[1]]},rt=r=>(...e)=>d.asap(()=>r(...e)),da=x.hasStandardBrowserEnv?((r,e)=>s=>(s=new URL(s,x.origin),r.protocol===s.protocol&&r.host===s.host&&(e||r.port===s.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0,ha=x.hasStandardBrowserEnv?{write(r,e,s,t,a,n,o){if(typeof document>"u")return;const i=[`${r}=${encodeURIComponent(e)}`];d.isNumber(s)&&i.push(`expires=${new Date(s).toUTCString()}`),d.isString(t)&&i.push(`path=${t}`),d.isString(a)&&i.push(`domain=${a}`),n===!0&&i.push("secure"),d.isString(o)&&i.push(`SameSite=${o}`),document.cookie=i.join("; ")},read(r){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let s=0;s<e.length;s++){const t=e[s].replace(/^\s+/,""),a=t.indexOf("=");if(a!==-1&&t.slice(0,a)===r)return decodeURIComponent(t.slice(a+1))}return null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pa(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function ga(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function vt(r,e,s){let t=!pa(e);return r&&(t||s===!1)?ga(r,e):e}const nt=r=>r instanceof T?{...r}:r;function G(r,e){e=e||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function t(c,u,h,m){return d.isPlainObject(c)&&d.isPlainObject(u)?d.merge.call({caseless:m},c,u):d.isPlainObject(u)?d.merge({},u):d.isArray(u)?u.slice():u}function a(c,u,h,m){if(d.isUndefined(u)){if(!d.isUndefined(c))return t(void 0,c,h,m)}else return t(c,u,h,m)}function n(c,u){if(!d.isUndefined(u))return t(void 0,u)}function o(c,u){if(d.isUndefined(u)){if(!d.isUndefined(c))return t(void 0,c)}else return t(void 0,u)}function i(c,u,h){if(d.hasOwnProp(e,h))return t(c,u);if(d.hasOwnProp(r,h))return t(void 0,c)}const l={url:n,method:n,data:n,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:i,headers:(c,u,h)=>a(nt(c),nt(u),h,!0)};return d.forEach(Object.keys({...r,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=d.hasOwnProp(l,u)?l[u]:a,m=d.hasOwnProp(r,u)?r[u]:void 0,P=d.hasOwnProp(e,u)?e[u]:void 0,C=h(m,P,u);d.isUndefined(C)&&h!==i||(s[u]=C)}),s}const fa=["content-type","content-length"];function ba(r,e,s){if(s!=="content-only"){r.set(e);return}Object.entries(e).forEach(([t,a])=>{fa.includes(t.toLowerCase())&&r.set(t,a)})}const ma=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(e,s)=>String.fromCharCode(parseInt(s,16))),Ot=r=>{const e=G({},r),s=m=>d.hasOwnProp(e,m)?e[m]:void 0,t=s("data");let a=s("withXSRFToken");const n=s("xsrfHeaderName"),o=s("xsrfCookieName");let i=s("headers");const l=s("auth"),c=s("baseURL"),u=s("allowAbsoluteUrls"),h=s("url");if(e.headers=i=T.from(i),e.url=Et(vt(c,h,u),r.params,r.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?ma(l.password):""))),d.isFormData(t)&&(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv?i.setContentType(void 0):d.isFunction(t.getHeaders)&&ba(i,t.getHeaders(),s("formDataHeaderPolicy"))),x.hasStandardBrowserEnv&&(d.isFunction(a)&&(a=a(e)),a===!0||a==null&&da(e.url))){const P=n&&o&&ha.read(o);P&&i.set(n,P)}return e},ya=typeof XMLHttpRequest<"u",wa=ya&&function(r){return new Promise(function(s,t){const a=Ot(r);let n=a.data;const o=T.from(a.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=a,u,h,m,P,C;function w(){P&&P(),C&&C(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function y(){if(!b)return;const E=T.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),v={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:r,request:b};_t(function(j){s(j),w()},function(j){t(j),w()},v),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(t(new R("Request aborted",R.ECONNABORTED,r,b)),w(),b=null)},b.onerror=function(F){const v=F&&F.message?F.message:"Network Error",H=new R(v,R.ERR_NETWORK,r,b);H.event=F||null,t(H),w(),b=null},b.ontimeout=function(){let F=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const v=a.transitional||Me;a.timeoutErrorMessage&&(F=a.timeoutErrorMessage),t(new R(F,v.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,r,b)),w(),b=null},n===void 0&&o.setContentType(null),"setRequestHeader"in b&&d.forEach(Rt(o),function(F,v){b.setRequestHeader(v,F)}),d.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),i&&i!=="json"&&(b.responseType=a.responseType),c&&([m,C]=ye(c,!0),b.addEventListener("progress",m)),l&&b.upload&&([h,P]=ye(l),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",P)),(a.cancelToken||a.signal)&&(u=E=>{b&&(t(!E||E.type?new ce(null,r,b):E),b.abort(),w(),b=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const I=la(a.url);if(I&&!x.protocols.includes(I)){t(new R("Unsupported protocol "+I+":",R.ERR_BAD_REQUEST,r));return}b.send(n||null)})},Pa=(r,e)=>{if(r=r?r.filter(Boolean):[],!e&&!r.length)return;const s=new AbortController;let t=!1;const a=function(l){if(!t){t=!0,o();const c=l instanceof Error?l:this.reason;s.abort(c instanceof R?c:new ce(c instanceof Error?c.message:c))}};let n=e&&setTimeout(()=>{n=null,a(new R(`timeout of ${e}ms exceeded`,R.ETIMEDOUT))},e);const o=()=>{r&&(n&&clearTimeout(n),n=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),r=null)};r.forEach(l=>l.addEventListener("abort",a));const{signal:i}=s;return i.unsubscribe=()=>d.asap(o),i},Ra=function*(r,e){let s=r.byteLength;if(s<e){yield r;return}let t=0,a;for(;t<s;)a=t+e,yield r.slice(t,a),t=a},qa=async function*(r,e){for await(const s of Ca(r))yield*Ra(s,e)},Ca=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:s,value:t}=await e.read();if(s)break;yield t}}finally{await e.cancel()}},ot=(r,e,s,t)=>{const a=qa(r,e);let n=0,o,i=l=>{o||(o=!0,t&&t(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){i(),l.close();return}let h=u.byteLength;if(s){let m=n+=h;s(m)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),a.return()}},{highWaterMark:2})};function Ia(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;const e=r.indexOf(",");if(e<0)return 0;const s=r.slice(5,e),t=r.slice(e+1);if(/;base64/i.test(s)){let o=t.length;const i=t.length;for(let P=0;P<i;P++)if(t.charCodeAt(P)===37&&P+2<i){const C=t.charCodeAt(P+1),w=t.charCodeAt(P+2);(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102)&&(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102)&&(o-=2,P+=2)}let l=0,c=i-1;const u=P=>P>=2&&t.charCodeAt(P-2)===37&&t.charCodeAt(P-1)===51&&(t.charCodeAt(P)===68||t.charCodeAt(P)===100);c>=0&&(t.charCodeAt(c)===61?(l++,c--):u(c)&&(l++,c-=3)),l===1&&c>=0&&(t.charCodeAt(c)===61||u(c))&&l++;const m=Math.floor(o/4)*3-(l||0);return m>0?m:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(t,"utf8");let n=0;for(let o=0,i=t.length;o<i;o++){const l=t.charCodeAt(o);if(l<128)n+=1;else if(l<2048)n+=2;else if(l>=55296&&l<=56319&&o+1<i){const c=t.charCodeAt(o+1);c>=56320&&c<=57343?(n+=4,o++):n+=3}else n+=3}return n}const ze="1.16.1",it=64*1024,{isFunction:ge}=d,lt=(r,...e)=>{try{return!!r(...e)}catch{return!1}},Ea=r=>{const e=d.global!==void 0&&d.global!==null?d.global:globalThis,{ReadableStream:s,TextEncoder:t}=e;r=d.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},r);const{fetch:a,Request:n,Response:o}=r,i=a?ge(a):typeof fetch=="function",l=ge(n),c=ge(o);if(!i)return!1;const u=i&&ge(s),h=i&&(typeof t=="function"?(y=>I=>y.encode(I))(new t):async y=>new Uint8Array(await new n(y).arrayBuffer())),m=l&&u&&lt(()=>{let y=!1;const I=new n(x.origin,{body:new s,method:"POST",get duplex(){return y=!0,"half"}}),E=I.headers.has("Content-Type");return I.body!=null&&I.body.cancel(),y&&!E}),P=c&&u&&lt(()=>d.isReadableStream(new o("").body)),C={stream:P&&(y=>y.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!C[y]&&(C[y]=(I,E)=>{let F=I&&I[y];if(F)return F.call(I);throw new R(`Response type '${y}' is not supported`,R.ERR_NOT_SUPPORT,E)})});const w=async y=>{if(y==null)return 0;if(d.isBlob(y))return y.size;if(d.isSpecCompliantForm(y))return(await new n(x.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(d.isArrayBufferView(y)||d.isArrayBuffer(y))return y.byteLength;if(d.isURLSearchParams(y)&&(y=y+""),d.isString(y))return(await h(y)).byteLength},b=async(y,I)=>{const E=d.toFiniteNumber(y.getContentLength());return E??w(I)};return async y=>{let{url:I,method:E,data:F,signal:v,cancelToken:H,timeout:j,onDownloadProgress:ee,onUploadProgress:te,responseType:k,headers:J,withCredentials:ue="same-origin",fetchOptions:Je,maxContentLength:L,maxBodyLength:Ee}=Ot(y);const se=d.isNumber(L)&&L>-1,Ut=d.isNumber(Ee)&&Ee>-1;let Ve=a||fetch;k=k?(k+"").toLowerCase():"text";let z=Pa([v,H&&H.toAbortSignal()],j),$=null;const V=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let Ae;try{if(se&&typeof I=="string"&&I.startsWith("data:")&&Ia(I)>L)throw new R("maxContentLength size of "+L+" exceeded",R.ERR_BAD_RESPONSE,y,$);if(Ut&&E!=="get"&&E!=="head"){const S=await b(J,F);if(typeof S=="number"&&isFinite(S)&&S>Ee)throw new R("Request body larger than maxBodyLength limit",R.ERR_BAD_REQUEST,y,$)}if(te&&m&&E!=="get"&&E!=="head"&&(Ae=await b(J,F))!==0){let S=new n(I,{method:"POST",body:F,duplex:"half"}),X;if(d.isFormData(F)&&(X=S.headers.get("content-type"))&&J.setContentType(X),S.body){const[de,he]=at(Ae,ye(rt(te)));F=ot(S.body,it,de,he)}}d.isString(ue)||(ue=ue?"include":"omit");const O=l&&"credentials"in n.prototype;if(d.isFormData(F)){const S=J.getContentType();S&&/^multipart\/form-data/i.test(S)&&!/boundary=/i.test(S)&&J.delete("content-type")}J.set("User-Agent","axios/"+ze,!1);const K={...Je,signal:z,method:E.toUpperCase(),headers:Rt(J.normalize()),body:F,duplex:"half",credentials:O?ue:void 0};$=l&&new n(I,K);let B=await(l?Ve($,Je):Ve(I,K));if(se){const S=d.toFiniteNumber(B.headers.get("content-length"));if(S!=null&&S>L)throw new R("maxContentLength size of "+L+" exceeded",R.ERR_BAD_RESPONSE,y,$)}const Fe=P&&(k==="stream"||k==="response");if(P&&B.body&&(ee||se||Fe&&V)){const S={};["status","statusText","headers"].forEach(ae=>{S[ae]=B[ae]});const X=d.toFiniteNumber(B.headers.get("content-length")),[de,he]=ee&&at(X,ye(rt(ee),!0))||[];let We=0;const Dt=ae=>{if(se&&(We=ae,We>L))throw new R("maxContentLength size of "+L+" exceeded",R.ERR_BAD_RESPONSE,y,$);de&&de(ae)};B=new o(ot(B.body,it,Dt,()=>{he&&he(),V&&V()}),S)}k=k||"text";let M=await C[d.findKey(C,k)||"text"](B,y);if(se&&!P&&!Fe){let S;if(M!=null&&(typeof M.byteLength=="number"?S=M.byteLength:typeof M.size=="number"?S=M.size:typeof M=="string"&&(S=typeof t=="function"?new t().encode(M).byteLength:M.length)),typeof S=="number"&&S>L)throw new R("maxContentLength size of "+L+" exceeded",R.ERR_BAD_RESPONSE,y,$)}return!Fe&&V&&V(),await new Promise((S,X)=>{_t(S,X,{data:M,headers:T.from(B.headers),status:B.status,statusText:B.statusText,config:y,request:$})})}catch(O){if(V&&V(),z&&z.aborted&&z.reason instanceof R){const K=z.reason;throw K.config=y,$&&(K.request=$),O!==K&&(K.cause=O),K}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,y,$,O&&O.response),{cause:O.cause||O}):R.from(O,O&&O.code,y,$,O&&O.response)}}},Fa=new Map,xt=r=>{let e=r&&r.env||{};const{fetch:s,Request:t,Response:a}=e,n=[t,a,s];let o=n.length,i=o,l,c,u=Fa;for(;i--;)l=n[i],c=u.get(l),c===void 0&&u.set(l,c=i?new Map:Ea(e)),u=c;return c};xt();const Ke={http:Vs,xhr:wa,fetch:{get:xt}};d.forEach(Ke,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(r,"adapterName",{__proto__:null,value:e})}});const ct=r=>`- ${r}`,Sa=r=>d.isFunction(r)||r===null||r===!1;function _a(r,e){r=d.isArray(r)?r:[r];const{length:s}=r;let t,a;const n={};for(let o=0;o<s;o++){t=r[o];let i;if(a=t,!Sa(t)&&(a=Ke[(i=String(t)).toLowerCase()],a===void 0))throw new R(`Unknown adapter '${i}'`);if(a&&(d.isFunction(a)||(a=a.get(e))))break;n[i||"#"+o]=a}if(!a){const o=Object.entries(n).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=s?o.length>1?`since :
4
+ `+o.map(ct).join(`
5
+ `):" "+ct(o[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return a}const Tt={getAdapter:_a,adapters:Ke};function Te(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ce(null,r)}function ut(r){return Te(r),r.headers=T.from(r.headers),r.data=xe.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Tt.getAdapter(r.adapter||le.adapter,r)(r).then(function(t){Te(r),r.response=t;try{t.data=xe.call(r,r.transformResponse,t)}finally{delete r.response}return t.headers=T.from(t.headers),t},function(t){if(!St(t)&&(Te(r),t&&t.response)){r.response=t.response;try{t.response.data=xe.call(r,r.transformResponse,t.response)}finally{delete r.response}t.response.headers=T.from(t.response.headers)}return Promise.reject(t)})}const Ie={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{Ie[r]=function(t){return typeof t===r||"a"+(e<1?"n ":" ")+r}});const dt={};Ie.transitional=function(e,s,t){function a(n,o){return"[Axios v"+ze+"] Transitional option '"+n+"'"+o+(t?". "+t:"")}return(n,o,i)=>{if(e===!1)throw new R(a(o," has been removed"+(s?" in "+s:"")),R.ERR_DEPRECATED);return s&&!dt[o]&&(dt[o]=!0,console.warn(a(o," has been deprecated since v"+s+" and will be removed in the near future"))),e?e(n,o,i):!0}};Ie.spelling=function(e){return(s,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function va(r,e,s){if(typeof r!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const t=Object.keys(r);let a=t.length;for(;a-- >0;){const n=t[a],o=Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;if(o){const i=r[n],l=i===void 0||o(i,n,r);if(l!==!0)throw new R("option "+n+" must be "+l,R.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new R("Unknown option "+n,R.ERR_BAD_OPTION)}}const me={assertOptions:va,validators:Ie},U=me.validators;let W=class{constructor(e){this.defaults=e||{},this.interceptors={request:new st,response:new st}}async request(e,s){try{return await this._request(e,s)}catch(t){if(t instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const n=(()=>{if(!a.stack)return"";const o=a.stack.indexOf(`
6
+ `);return o===-1?"":a.stack.slice(o+1)})();try{if(!t.stack)t.stack=n;else if(n){const o=n.indexOf(`
7
+ `),i=o===-1?-1:n.indexOf(`
8
+ `,o+1),l=i===-1?"":n.slice(i+1);String(t.stack).endsWith(l)||(t.stack+=`
9
+ `+n)}}catch{}}throw t}}_request(e,s){typeof e=="string"?(s=s||{},s.url=e):s=e||{},s=G(this.defaults,s);const{transitional:t,paramsSerializer:a,headers:n}=s;t!==void 0&&me.assertOptions(t,{silentJSONParsing:U.transitional(U.boolean),forcedJSONParsing:U.transitional(U.boolean),clarifyTimeoutError:U.transitional(U.boolean),legacyInterceptorReqResOrdering:U.transitional(U.boolean)},!1),a!=null&&(d.isFunction(a)?s.paramsSerializer={serialize:a}:me.assertOptions(a,{encode:U.function,serialize:U.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),me.assertOptions(s,{baseUrl:U.spelling("baseURL"),withXsrfToken:U.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let o=n&&d.merge(n.common,n[s.method]);n&&d.forEach(["delete","get","head","post","put","patch","query","common"],C=>{delete n[C]}),s.headers=T.concat(o,n);const i=[];let l=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(s)===!1)return;l=l&&w.synchronous;const b=s.transitional||Me;b&&b.legacyInterceptorReqResOrdering?i.unshift(w.fulfilled,w.rejected):i.push(w.fulfilled,w.rejected)});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let u,h=0,m;if(!l){const C=[ut.bind(this),void 0];for(C.unshift(...i),C.push(...c),m=C.length,u=Promise.resolve(s);h<m;)u=u.then(C[h++],C[h++]);return u}m=i.length;let P=s;for(;h<m;){const C=i[h++],w=i[h++];try{P=C(P)}catch(b){w.call(this,b);break}}try{u=ut.call(this,P)}catch(C){return Promise.reject(C)}for(h=0,m=c.length;h<m;)u=u.then(c[h++],c[h++]);return u}getUri(e){e=G(this.defaults,e);const s=vt(e.baseURL,e.url,e.allowAbsoluteUrls);return Et(s,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){W.prototype[e]=function(s,t){return this.request(G(t||{},{method:e,url:s,data:(t||{}).data}))}});d.forEach(["post","put","patch","query"],function(e){function s(t){return function(n,o,i){return this.request(G(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}W.prototype[e]=s(),e!=="query"&&(W.prototype[e+"Form"]=s(!0))});let Oa=class Nt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(n){s=n});const t=this;this.promise.then(a=>{if(!t._listeners)return;let n=t._listeners.length;for(;n-- >0;)t._listeners[n](a);t._listeners=null}),this.promise.then=a=>{let n;const o=new Promise(i=>{t.subscribe(i),n=i}).then(a);return o.cancel=function(){t.unsubscribe(n)},o},e(function(n,o,i){t.reason||(t.reason=new ce(n,o,i),s(t.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=t=>{e.abort(t)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new Nt(function(a){e=a}),cancel:e}}};function xa(r){return function(s){return r.apply(null,s)}}function Ta(r){return d.isObject(r)&&r.isAxiosError===!0}const ke={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(ke).forEach(([r,e])=>{ke[e]=r});function $t(r){const e=new W(r),s=pt(W.prototype.request,e);return d.extend(s,W.prototype,e,{allOwnKeys:!0}),d.extend(s,e,null,{allOwnKeys:!0}),s.create=function(a){return $t(G(r,a))},s}const _=$t(le);_.Axios=W;_.CanceledError=ce;_.CancelToken=Oa;_.isCancel=St;_.VERSION=ze;_.toFormData=Ce;_.AxiosError=R;_.Cancel=_.CanceledError;_.all=function(e){return Promise.all(e)};_.spread=xa;_.isAxiosError=Ta;_.mergeConfig=G;_.AxiosHeaders=T;_.formToJSON=r=>Ft(d.isHTMLForm(r)?new FormData(r):r);_.getAdapter=Tt.getAdapter;_.HttpStatusCode=ke;_.default=_;const{Axios:Va,AxiosError:Aa,CanceledError:Wa,isCancel:Ga,CancelToken:Xa,VERSION:Qa,all:Za,Cancel:Ya,isAxiosError:er,spread:tr,toFormData:sr,AxiosHeaders:ar,HttpStatusCode:rr,formToJSON:nr,getAdapter:or,mergeConfig:ir,create:lr}=_,Na="/@api/deki";class q{axiosInstance=_.create();format="json";debug;constructor(e,s,t="json",a,n){if(this.debug=Le("cxone-expert:requests",a),!e)throw this.debug("TLD is required to initialize Requests module"),new Error("TLD is required");if(!s)throw this.debug("Auth object is required to initialize Requests module"),new Error("Auth object is required");let o=e;!o.startsWith("http://")&&!o.startsWith("https://")&&(o=`https://${o}`),o.endsWith("/")&&(o=o.slice(0,o.length-1)),this.format=t,this.axiosInstance=_.create({baseURL:`${o}${Na}`,headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",...n,...s}}),this.setupInterceptors()}setupInterceptors(){this.axiosInstance.interceptors.request.use(e=>{if(this.debug(`→ ${e.method?.toUpperCase()} ${e.baseURL}${e.url}`),e.params&&Object.keys(e.params).length>0&&this.debug(" Query params:",JSON.stringify(e.params)),e.data&&e.headers?.["Content-Type"]!=="application/octet-stream"){const s=typeof e.data=="string"?e.data:JSON.stringify(e.data);s.length>200?this.debug(" Body:",s.substring(0,200)+"... (truncated)"):s.length>0&&this.debug(" Body:",s)}return e},e=>(this.debug("✗ Request error:",e.message),Promise.reject(e))),this.axiosInstance.interceptors.response.use(e=>{if(this.debug(`← ${e.status} ${e.config.method?.toUpperCase()} ${e.config.url}`),e.data&&e.headers["content-type"]?.includes("application/json")){const s=JSON.stringify(e.data);s.length>200?this.debug(" Response:",s.substring(0,200)+"... (truncated)"):this.debug(" Response:",s)}else e.headers["content-type"]?.includes("text/")?this.debug(" Response: [text content]"):e.data&&this.debug(" Response: [binary content]");return e},e=>{if(e.response){if(this.debug(`✗ ${e.response.status} ${e.config?.method?.toUpperCase()} ${e.config?.url}`),this.debug(" Error:",e.response.statusText),e.response.data){const s=typeof e.response.data=="string"?e.response.data:JSON.stringify(e.response.data);s.length>200?this.debug(" Error details:",s.substring(0,200)+"... (truncated)"):this.debug(" Error details:",s)}}else e.request?this.debug("✗ No response received:",e.message):this.debug("✗ Request setup error:",e.message);return Promise.reject(e)})}getFormatParam(){return{"dream.out.format":this.format}}async get(e,s){return await this.axiosInstance.get(e,{...s,params:{...s?.params,...this.getFormatParam()}})}async post(e,s,t){return await this.axiosInstance.post(e,s,{...t})}async put(e,s,t){return await this.axiosInstance.put(e,s,{...t})}async patch(e,s,t){return await this.axiosInstance.patch(e,s,{...t})}async del(e,s){return await this.axiosInstance.delete(e,{...s})}async head(e,s){return await this.axiosInstance.head(e,{...s})}}class $a{globals;_auth;debug;constructor(e,s){this.globals=e,this._auth=s,this.debug=Le("cxone-expert-node:pages",e.debug),this.debug("Pages module initialized")}parsePageId(e){return typeof e=="number"?e.toString():e==="home"?e:`=${encodeURIComponent(encodeURIComponent(e))}`}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return`${encodeURIComponent(encodeURIComponent(e))}`}createRequests(e,s,t){return new q(e,s,"json",this.globals.debug,t)}async getPages(e,s){this.debug("getPages called");const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers),i=await this.createRequests(t,a,n).get("/pages",{params:{...e}});return this.debug("getPages completed successfully"),i.data}async getPage(e,s,t){this.debug("getPage called for:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}`,{params:{...s}});return this.debug("getPage completed successfully"),c.data}async getPageContents(e,s,t){this.debug("getPageContents called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/contents`,{params:{...s}});return this.debug("getPageContents retrieved contents for page:",e),c.data}async getPageContentsExplain(e,s,t){this.debug("getPageContentsExplain called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/contents/explain`,{params:{...s}});return this.debug("getPageContentsExplain retrieved contents for page:",e),c.data}async getPageDiff(e,s,t){this.debug("getPageDiff called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/diff`,{params:{...s}});return this.debug("getPageDiff retrieved diff for page:",e),c.data}async getPageExplain(e,s,t){this.debug("getPageExplain called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/explain`,{params:{...s}});return this.debug("getPageExplain retrieved explanation for page:",e),c.data}async getPageExportToken(e,s,t,a){this.debug("getPageExportToken called for page:",e);const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers),u=await this.createRequests(o,i,l).get(`/pages/${n}/export/${s}`,{params:{...t},responseType:"stream"});return this.debug("getPageExportToken successfully retrieved export for page:",e),u.data}async getPageExportTokenFilename(e,s,t,a,n){this.debug("getPageExportTokenFilename called for page:",e);const o=this.parsePageId(e),i=this.parseFileName(t),l=p(this.globals,n?.tld),c=g(this.globals,n?.auth),u=f(this.globals,n?.headers),m=await this.createRequests(l,c,u).get(`/pages/${o}/export/${s}/${i}`,{params:{...a},responseType:"stream"});return this.debug("getPageExportTokenFilename successfully retrieved export for page:",e),m.data}async getPageFilesSubpages(e,s,t){this.debug("getPageFilesSubpages called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/explain`,{params:{...s}});return this.debug("getPageFilesSubpages retrieved file and subpage info for page:",e),c.data}async getPageFiles(e,s,t){this.debug("getPageFiles called");const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/explain`,{params:{...s}});return this.debug("getPageFiles retrieved file info for page:",e),c.data}async getPageFile(e,s,t,a){this.debug("getPageFile called for page:",e);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/files/${o}`,{params:{...t},responseType:"stream"});return this.debug("getPageFile successfully retrieved file for page:",e),h.data}async getPageFileDescription(e,s,t,a){this.debug("getPageFileDescription called for page:",e);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/files/${o}/description`,{params:{...t},responseType:"stream"});return this.debug("getPageFileDescription successfully retrieved description for page:",e),h.data}async getPageFileInfo(e,s,t,a){this.debug("getPageFileInfo called for page:",e);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/files/${o}/info`,{params:{...t}});return this.debug("getPageFileInfo successfully retrieved info for file on page:",e),h.data}async getPageFileRevisions(e,s,t,a){this.debug("getPageFileRevisions called for page:",e);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/files/${o}/revisions`,{params:{...t}});return this.debug("getPageFileRevisions successfully retrieved revisions for file on page:",e),h.data}async getPageFind(e,s,t){this.debug("getPageFind called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/find`,{params:{...s}});return this.debug("getPageFind successfully retrieved find results for page:",e),c.data}async getPageInfo(e,s,t){this.debug("getPageInfo called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/info`,{params:{...s}});return this.debug("getPageInfo successfully retrieved info for page:",e),c.data}async getPageLinks(e,s,t){this.debug("getPageLinks called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/links`,{params:{...s}});return this.debug("getPageLinks successfully retrieved links for page:",e),c.data}async getPagePDF(e,s,t){this.debug("getPagePDF called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/pdf`,{params:{...s},responseType:"stream"});return this.debug("getPagePDF successfully retrieved PDF for page:",e),c.data}async getPagePDFFilename(e,s,t,a){this.debug("getPagePDFFilename called for page:",e);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/pdf/${o}`,{params:{...t},responseType:"stream"});return this.debug("getPagePDFFilename successfully retrieved PDF for page:",e),h.data}async getPageProperties(e,s,t){this.debug("getPageProperties called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/properties`,{params:{...s}});return this.debug("getPageProperties successfully retrieved properties for page:",e),c.data}async getPagePropertiesKey(e,s,t,a){this.debug("getPagePropertiesKey called for page:",e);const n=this.parsePageId(e),o=this.parseKey(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/properties/${o}`,{params:{...t}});return this.debug("getPagePropertiesKey successfully retrieved property key for page:",e),h.data}async getPagePropertiesKeyInfo(e,s,t,a){this.debug("getPagePropertiesKeyInfo called for page:",e);const n=this.parsePageId(e),o=this.parseKey(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).get(`/pages/${n}/properties/${o}/info`,{params:{...t}});return this.debug("getPagePropertiesKeyInfo successfully retrieved property key info for page:",e),h.data}async getPageRatings(e,s,t){this.debug("getPageRatings called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/ratings`,{params:{...s}});return this.debug("getPageRatings successfully retrieved ratings for page:",e),c.data}async getPageRevisions(e,s,t){this.debug("getPageRevisions called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/revisions`,{params:{...s}});return this.debug("getPageRevisions successfully retrieved revisions for page:",e),c.data}async getPageSubpages(e,s,t){this.debug("getPageSubpages called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/subpages`,{params:{...s}});return this.debug("getPageSubpages successfully retrieved subpages for page:",e),c.data}async getPageTags(e,s,t){this.debug("getPageTags called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/tags`,{params:{...s}});return this.debug("getPageTags successfully retrieved tags for page:",e),c.data}async getPageTree(e,s,t){this.debug("getPageTree called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).get(`/pages/${a}/tree`,{params:{...s}});return this.debug("getPageTree successfully retrieved tree for page:",e),c.data}async getPageBook(e,s){this.debug("getPageBook called");const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers),i=await this.createRequests(t,a,n).get("/pages/book",{params:{...e},responseType:"stream"});return this.debug("getPageBook successfully retrieved book"),i.data}async getPageBookFilename(e,s,t,a){this.debug("getPageBookFilename called for page:",e),this.parsePageId(e),this.parseFileName(s);const n=p(this.globals,a?.tld),o=g(this.globals,a?.auth),i=f(this.globals,a?.headers),c=await this.createRequests(n,o,i).get(`/pages/book/${s}`,{params:{...t},responseType:"stream"});return this.debug("getPageBookFilename successfully retrieved book for page:",e),c.data}async getPagesCsv(e,s){this.debug("getPagesCsv called with params");const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers),i=await this.createRequests(t,a,n).get("/pages/csv",{params:{...e},responseType:"stream"});return this.debug("getPagesCsv successfully retrieved CSV data"),i.data}async getPagesPopular(e,s){this.debug("getPagesPopular called for page.");const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers),i=await this.createRequests(t,a,n).get("/pages/popular",{params:{...e}});return this.debug("getPagesPopular successfully retrieved popular pages."),i.data}async postPageContents(e,s,t,a){this.debug("postPageContents called for page:",e);const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers),u=await this.createRequests(o,i,l).post(`/pages/${n}/contents`,s??"",{headers:{"Content-Type":"text/plain"},params:{...t}});return this.debug("postPageContents successfully updated page:",e),u.data}async putPageUnorder(e,s){this.debug("putPageUnorder called for page:",e);const t=this.parsePageId(e),a=p(this.globals,s?.tld),n=g(this.globals,s?.auth),o=f(this.globals,s?.headers);return(await this.createRequests(a,n,o).put(`/pages/${t}/unorder`,"")).data}async delPageDelete(e,s,t){this.debug("delPageDelete called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).del(`/pages/${a}`,{params:{...s}});return this.debug("delPageDelete successfully deleted page:",e),c.data}async delPageAllowed(e,s,t){this.debug("delPageAllowed called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).del(`/pages/${a}/allowed`,{params:{...s}});return this.debug("delPageAllowed successfully changed permissions for page:",e),c.data}async postPageCopied(e,s,t){this.debug("postPageCopied called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).post(`/pages/${a}/copy`,"",{params:{...s}});return this.debug("postPageCopied successfully copied page:",e),c.data}async postPageExport(e,s){this.debug("postPageExport called for page:",e);const t=this.parsePageId(e),a=p(this.globals,s?.tld),n=g(this.globals,s?.auth),o=f(this.globals,s?.headers),l=await this.createRequests(a,n,o).post(`/pages/${t}/export`,"");return this.debug("postPageExport successfully exported page:",e),l.data}async delPageFileName(e,s,t,a){this.debug("delPageFileName called for page:",e,"filename:",s);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).del(`/pages/${n}/files/${o}`,{params:{...t}});return this.debug("delPageFileName successfully deleted file:",s,"from page:",e),h.data}async headPageFileName(e,s,t,a){this.debug("headPageFileName called for page:",e,"filename:",s);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).head(`/pages/${n}/files/${o}`,{params:{...t}});return this.debug("headPageFileName successfully checked existence of file:",s,"on page:",e),h.data}async putPageFileName(e,s,t,a,n){this.debug("putPageFileName called for page:",e,"filename:",s);const o=this.parsePageId(e),i=this.parseFileName(s),l=p(this.globals,n?.tld),c=g(this.globals,n?.auth),u=f(this.globals,n?.headers),m=await this.createRequests(l,c,u).put(`/pages/${o}/files/${i}`,t,{headers:{"Content-Type":"application/octet-stream"},params:{...a}});return this.debug("putPageFileName successfully uploaded file:",s,"to page:",e),m.data}async delPageFileNameDescription(e,s,t,a){this.debug("delPageFileNameDescription called for page:",e,"filename:",s);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).del(`/pages/${n}/files/${o}/description`,{params:{...t}});return this.debug("delPageFileNameDescription successfully deleted description for file:",s,"on page:",e),h.data}async putPageFileNameDescription(e,s,t,a){this.debug("putPageFileNameDescription called for page:",e,"filename:",s);const n=this.parsePageId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).put(`/pages/${n}/files/${o}/description`,{params:{...t}});return this.debug("putPageFileNameDescription successfully updated description for file:",s,"on page:",e),h.data}async putPageFileNamePropertiesKey(e,s,t,a,n){this.debug("putPageFileNamePropertiesKey called for page:",e,"filename:",s,"key:",t);const o=this.parsePageId(e),i=this.parseFileName(s),l=this.parseKey(t),c=p(this.globals,n?.tld),u=g(this.globals,n?.auth),h=f(this.globals,n?.headers),P=await this.createRequests(c,u,h).put(`/pages/${o}/files/${i}/properties/${l}`,"",{params:{...a}});return this.debug("putPageFileNamePropertiesKey successfully updated property key:",t,"for file:",s,"on page:",e),P.data}async putPageImport(e,s,t){this.debug("putPageImport called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).put(`/pages/${a}/import`,"",{params:{...s}});return this.debug("putPageImport successfully imported content to page:",e),c.data}async putPageMove(e,s,t){this.debug("putPageMove called for page:",e,"to:",s?.to);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).put(`/pages/${a}/move`,"",{params:{...s}});return this.debug("putPageMove successfully moved page:",e),c.data}async putPageOrder(e,s,t){this.debug("putPageOrder called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).put(`/pages/${a}/order`,"",{params:{...s}});return this.debug("putPageOrder successfully updated order for page:",e),c.data}async postPageProperties(e,s,t,a,n){this.debug("postPageProperties called for page:",e,"property:",s);const o=this.parsePageId(e),i=p(this.globals,n?.tld),l=g(this.globals,n?.auth),c=f(this.globals,n?.headers),h=await this.createRequests(i,l,c).post(`/pages/${o}/properties`,t,{headers:{Slug:s},params:{...a}});return this.debug("postPageProperties successfully created property:",s,"for page:",e),h.data}async putPageProperties(e,s,t,a,n){this.debug("putPageProperties called for page:",e,"property:",s);const o=this.parsePageId(e),i=p(this.globals,n?.tld),l=g(this.globals,n?.auth),c=f(this.globals,n?.headers),h=await this.createRequests(i,l,c).put(`/pages/${o}/properties`,t,{headers:{Slug:s},params:{...a}});return this.debug("putPageProperties successfully updated property:",s,"for page:",e),h.data}async deletePagePropertiesKey(e,s,t,a){this.debug("deletePagePropertiesKey called for page:",e,"key:",s);const n=this.parsePageId(e),o=this.parseKey(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).del(`/pages/${n}/properties/${o}`,{params:{...t}});return this.debug("deletePagePropertiesKey successfully deleted property key:",s,"for page:",e),h.data}async putPagePropertiesKey(e,s,t,a){this.debug("putPagePropertiesKey called for page:",e,"key:",s);const n=this.parsePageId(e),o=this.parseKey(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers),h=await this.createRequests(i,l,c).put(`/pages/${n}/properties/${o}`,"",{params:{...t}});return this.debug("putPagePropertiesKey successfully updated property key:",s,"for page:",e),h.data}async postPageRatings(e,s,t){this.debug("postPageRatings called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).post(`/pages/${a}/ratings`,"",{params:{...s}});return this.debug("postPageRatings successfully submitted rating for page:",e),c.data}async postPageRevert(e,s,t){this.debug("postPageRevert called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).post(`/pages/${a}/revert`,"",{params:{...s}});return this.debug("postPageRevert successfully reverted page:",e),c.data}async deletePageSecurity(e,s,t){this.debug("deletePageSecurity called for page:",e);const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers),c=await this.createRequests(n,o,i).del(`/pages/${a}/security`,{params:{...s}});return this.debug("deletePageSecurity successfully deleted security settings for page:",e),c.data}async postPageSecurity(e,s,t,a){this.debug("postPageSecurity called for page:",e);const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers),u=await this.createRequests(o,i,l).post(`/pages/${n}/security`,s,{params:{...t}});return this.debug("postPageSecurity successfully created security settings for page:",e),u.data}async putPageSecurity(e,s,t,a){this.debug("putPageSecurity called for page:",e);const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers),u=await this.createRequests(o,i,l).put(`/pages/${n}/security`,s,{params:{...t}});return this.debug("putPageSecurity successfully updated security settings for page:",e),u.data}async putPageTags(e,s,t,a){this.debug("putPageTags called for page:",e);const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers),u=await this.createRequests(o,i,l).put(`/pages/${n}/tags`,s,{params:{...t}});return this.debug("putPageTags successfully updated tags for page:",e),u.data}}class Ua{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parseGroupId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(e)}`}async getGroups(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/groups",{params:{...e}})).data}async getGroup(e,s,t){const a=this.parseGroupId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/groups/${a}`,{params:{...s}})).data}async getGroupUser(e,s,t){const a=this.parseGroupId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).get(`/groups/${a}/users`,{params:{...s}})).data}}class Da{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parsePageId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseUserId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}async getPageHierarchyById(e,s,t){const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`events/page-hierarchy/${a}`,{params:{...s}})).data}async getPageHierarchyDetailById(e,s,t,a){const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers);return(await new q(o,i,void 0,void 0,l).get(`events/page-hierarchy/${n}/${s}`,{params:{...t}})).data}async getEventPage(e,s,t){const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`events/page/${a}`,{params:{...s}})).data}async getEventPageDetail(e,s,t,a){const n=this.parsePageId(e),o=p(this.globals,a?.tld),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers);return(await new q(o,i,void 0,void 0,l).get(`/events/page/${n}/${s}`,{params:{...t}})).data}async getEventUserPage(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/events/user-page/${this.parseUserId(e)}`,{params:{...s}})).data}async getEventUserDetailPage(e,s,t,a){const n=p(this.globals,a?.tld),o=g(this.globals,a?.auth),i=f(this.globals,a?.headers);return(await new q(n,o,void 0,void 0,i).get(`/events/user-page/${this.parseUserId(e)}/${s}`,{params:{...t}})).data}}class ka{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}async getArchive(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/archive",{params:{...e}})).data}async getArchiveFiles(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/archive/files",{params:{...e}})).data}async getArchiveFile(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/archive/files/${e}`,{params:{...s},responseType:"stream"})).data}async getArchiveFileByName(e,s,t,a){const n=p(this.globals,a?.tld),o=this.parseFileName(s),i=g(this.globals,a?.auth),l=f(this.globals,a?.headers);return(await new q(n,i,void 0,void 0,l).get(`/archive/files/${e}/${o}`,{params:{...t},responseType:"stream"})).data}async getArchiveFileInfo(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/archive/files/${e}/info`,{params:{...s}})).data}async getArchivePages(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/archive/pages",{params:{...e}})).data}async getArchivePage(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/archive/page/${e}`,{params:{...s}})).data}async getArchivePageContents(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/archive/page/${e}/contents`,{params:{...s}})).data}async getArchivePageInfo(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/archive/page/${e}/info`,{params:{...s}})).data}async getArchivePageSubPages(e,s,t){const a=p(this.globals,t?.tld),n=g(this.globals,t?.auth),o=f(this.globals,t?.headers);return(await new q(a,n,void 0,void 0,o).get(`/archive/page/${e}/subpages`,{params:{...s}})).data}}class La{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parsePageId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return encodeURIComponent(encodeURIComponent(e))}async getSiteActivity(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/site/activity",{params:{...e}})).data}async getSiteExportGroups(e){const s=p(this.globals,e?.tld),t=g(this.globals,e?.auth),a=f(this.globals,e?.headers);return(await new q(s,t,void 0,void 0,a).get("/site/export/groups")).data}async getSiteExportUsers(e){const s=p(this.globals,e?.tld),t=g(this.globals,e?.auth),a=f(this.globals,e?.headers);return(await new q(s,t,void 0,void 0,a).get("/site/export/users")).data}async getSiteSubPagesTags(e,s,t){const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/site/nav/${a}/children`,{params:{...s}})).data}async getSiteFullNavTreeTags(e,s,t){const a=this.parsePageId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/site/nav/${a}/full`,{params:{...s}})).data}async getSiteOperations(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/site/operations",{params:{...e}})).data}async getSiteProperties(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/site/properties",{params:{...e}})).data}async GetSiteKeyProperties(e,s,t){const a=this.parseKey(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/site/properties/${a}`,{params:{...s}})).data}async GetSiteKeyPropertiesInfo(e,s,t){const a=this.parseKey(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/site/properties/${a}/info`,{params:{...s}})).data}async GetSiteQuery(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/site/query",{params:{...e}})).data}async GetSiteStatus(e){const s=p(this.globals,e?.tld),t=g(this.globals,e?.auth),a=f(this.globals,e?.headers);return(await new q(s,t,void 0,void 0,a).get("/site/status")).data}async GetSiteTags(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/site/tags",{params:{...e}})).data}async GetSiteTag(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/site/tag",{params:{...e}})).data}}class Ba{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}async getContextMaps(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/contextmaps",{params:{...e}})).data}async getContextMapsById(e,s,t,a){const n=p(this.globals,a?.tld),o=g(this.globals,a?.auth),i=f(this.globals,a?.headers);return(await new q(n,o,void 0,void 0,i).get(`/contextmaps/${e}/${s}`,{params:{...t}})).data}}class ja{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parseUserId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return encodeURIComponent(encodeURIComponent(e))}async getUsers(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/users",{params:{...e}})).data}async getUser(e,s,t){const a=this.parseUserId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/users/${a}`,{params:{...s}})).data}async getUserMetrics(e,s,t){const a=this.parseUserId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/users/${a}/metrics`,{params:{...s}})).data}async getUserProperties(e,s,t){const a=this.parseUserId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`/users/${a}/properties`,{params:{...s}})).data}async getUserPropertiesKey(e,s,t,a){const n=this.parseUserId(e),o=this.parseKey(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers);return(await new q(i,l,void 0,void 0,c).get(`/users/${n}/properties/${o}`,{params:{...t}})).data}async getUserPropertiesKeyInfo(e,s,t,a){const n=this.parseUserId(e),o=this.parseKey(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth),c=f(this.globals,a?.headers);return(await new q(i,l,void 0,void 0,c).get(`/users/${n}/properties/${o}/info`,{params:{...t}})).data}async getUsersSearch(e,s){const t=p(this.globals,s?.tld),a=g(this.globals,s?.auth),n=f(this.globals,s?.headers);return(await new q(t,a,void 0,void 0,n).get("/users/search",{params:{...e}})).data}}class Ma{globals;_auth;constructor(e,s){this.globals=e,this._auth=s}parseFileId(e){return typeof e=="number"?e.toString():`=${encodeURIComponent(encodeURIComponent(e))}`}parseFileName(e){return`=${encodeURIComponent(encodeURIComponent(e))}`}parseKey(e){return encodeURIComponent(encodeURIComponent(e))}async getFile(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth),i=f(this.globals,t?.headers);return(await new q(n,o,void 0,void 0,i).get(`files/${a}`,{params:{...s},responseType:"stream"})).data}async getFileName(e,s,t,a){const n=this.parseFileId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth);return(await new q(i,l).get(`files/${n}/${o}`,{params:{...t},responseType:"stream"})).data}async getFileDescription(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).get(`files/${a}/description`,{params:{...s},responseType:"stream"})).data}async getFileInfo(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).get(`files/${a}/info`,{params:{...s}})).data}async getFileRevisions(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).get(`files/${a}/revisions`,{params:{...s}})).data}async deleteFile(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).del(`files/${a}`,{params:{...s}})).data}async headFile(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).head(`files/${a}`,{params:{...s}})).data}async putFile(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).put(`files/${a}`,"",{params:{...s}})).data}async deleteFileName(e,s,t,a){const n=this.parseFileId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth);return(await new q(i,l).del(`files/${n}/${o}`,{params:{...t}})).data}async headFileName(e,s,t,a){const n=this.parseFileId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth);return(await new q(i,l).head(`files/${n}/${o}`,{params:{...t}})).data}async putFileName(e,s,t,a){const n=this.parseFileId(e),o=this.parseFileName(s),i=p(this.globals,a?.tld),l=g(this.globals,a?.auth);return(await new q(i,l).put(`files/${n}/${o}`,"",{params:{...t}})).data}async postFileCopy(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).post(`files/${a}/copy`,"",{params:{...s}})).data}async delDescriptionFile(e,s,t){const a=this.parseFileId(e),n=p(this.globals,t?.tld),o=g(this.globals,t?.auth);return(await new q(n,o).del(`files/${a}/description`,{params:{...s}})).data}}class Ha{globals={};debug;_pages;_groups;_site;_auth;_archive;_events;_contextMaps;_users;_files;constructor(e){e&&(e.tld&&(this.globals.tld=e.tld),e.auth&&(this.globals.auth=e.auth),e.debug!==void 0&&(this.globals.debug=e.debug),e.headers&&(this.globals.headers=e.headers)),this.debug=Le("cxone-expert-node",this.globals.debug),this.debug("Debug logging enabled for cxone-expert-node. This is not recommended for production use as credentials may be exposed in log files!"),this.debug("Expert instance created with options:",e)}setAuth(e){return this.globals.auth=e,this.debug("Authentication configured:",e),this}configureServerAuth(e){return this.globals.auth={type:"server",params:e},this.debug("Server authentication configured:",e),this}configureBrowserAuth(e){return this.globals.auth={type:"browser",params:e},this.debug("Browser authentication configured:",e),this}get pages(){return this._pages||(this.debug("Initializing Pages module"),this._pages=new $a(this.globals)),this._pages}get auth(){return this._auth||(this.debug("Initializing Auth module"),this._auth=new ht),this._auth}get site(){return this._site||(this.debug("Initializing Site module"),this._site=new La(this.globals)),this._site}get archive(){return this._archive||(this.debug("Initializing Archive module"),this._archive=new ka(this.globals)),this._archive}get groups(){return this._groups||(this.debug("Initializing Groups module"),this._groups=new Ua(this.globals)),this._groups}get events(){return this._events||(this.debug("Initializing Events module"),this._events=new Da(this.globals)),this._events}get contextMaps(){return this._contextMaps||(this.debug("Initializing Context Maps module"),this._contextMaps=new Ba(this.globals)),this._contextMaps}get users(){return this._users||(this.debug("Initializing Users module"),this._users=new ja(this.globals)),this._users}get files(){return this._files||(this.debug("Initializing Files module"),this._files=new Ma(this.globals)),this._files}}module.exports=Ha;
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { default as Files } from './modules/files';
11
11
  export * from './types/index';
12
12
  export default class Expert {
13
13
  private globals;
14
+ private debug;
14
15
  private _pages?;
15
16
  private _groups?;
16
17
  private _site?;
@@ -23,6 +24,8 @@ export default class Expert {
23
24
  constructor(options?: {
24
25
  tld?: string;
25
26
  auth?: AuthConfig;
27
+ debug?: boolean;
28
+ headers?: Record<string, string>;
26
29
  });
27
30
  setAuth(authConfig: AuthConfig): this;
28
31
  configureServerAuth(params: ServerTokenParams): this;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAE,UAAU,EAAwB,kBAAkB,EAAuB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACvH,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,KAAK,MAAM,iBAAiB,CAAC;AAEpC,cAAc,eAAe,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,MAAM;IACvB,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,MAAM,CAAC,CAAQ;gBAEX,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,CAAA;KAAE;IAOlD,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAKrC,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAKpD,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAK7D,IAAW,KAAK,IAAI,KAAK,CAMxB;IAED,IAAW,IAAI,IAAI,IAAI,CAMtB;IAED,IAAW,IAAI,IAAI,IAAI,CAMtB;IAED,IAAW,OAAO,IAAI,OAAO,CAM5B;IAED,IAAW,MAAM,IAAI,MAAM,CAM1B;IAED,IAAW,MAAM,IAAI,MAAM,CAM1B;IAED,IAAW,WAAW,IAAI,WAAW,CAKpC;IAED,IAAW,KAAK,IAAI,KAAK,CAMxB;IAED,IAAW,KAAK,IAAI,KAAK,CAMxB;CAEJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAuB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjG,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,KAAK,MAAM,iBAAiB,CAAC;AAIpC,cAAc,eAAe,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,MAAM;IACvB,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,MAAM,CAAC,CAAQ;IACvB,OAAO,CAAC,MAAM,CAAC,CAAQ;gBAEX,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE;IAarG,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAMrC,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAMpD,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAM7D,IAAW,KAAK,IAAI,KAAK,CAOxB;IAED,IAAW,IAAI,IAAI,IAAI,CAOtB;IAED,IAAW,IAAI,IAAI,IAAI,CAOtB;IAED,IAAW,OAAO,IAAI,OAAO,CAO5B;IAED,IAAW,MAAM,IAAI,MAAM,CAO1B;IAED,IAAW,MAAM,IAAI,MAAM,CAO1B;IAED,IAAW,WAAW,IAAI,WAAW,CAMpC;IAED,IAAW,KAAK,IAAI,KAAK,CAOxB;IAED,IAAW,KAAK,IAAI,KAAK,CAOxB;CACJ"}