@solidtime/api 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,22 @@
1
- (function(ne,de){typeof exports=="object"&&typeof module<"u"?de(exports):typeof define=="function"&&define.amd?define(["exports"],de):(ne=typeof globalThis<"u"?globalThis:ne||self,de(ne.SolidtimeApi={}))})(this,function(ne){"use strict";function de(s,t){return function(){return s.apply(t,arguments)}}const{toString:nr}=Object.prototype,{getPrototypeOf:dt}=Object,Me=(s=>t=>{const r=nr.call(t);return s[r]||(s[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),M=s=>(s=s.toLowerCase(),t=>Me(t)===s),Le=s=>t=>typeof t===s,{isArray:he}=Array,je=Le("undefined");function ar(s){return s!==null&&!je(s)&&s.constructor!==null&&!je(s.constructor)&&q(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Ht=M("ArrayBuffer");function ir(s){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(s):t=s&&s.buffer&&Ht(s.buffer),t}const or=Le("string"),q=Le("function"),Wt=Le("number"),$e=s=>s!==null&&typeof s=="object",ur=s=>s===!0||s===!1,Ve=s=>{if(Me(s)!=="object")return!1;const t=dt(s);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},cr=M("Date"),lr=M("File"),dr=M("Blob"),hr=M("FileList"),pr=s=>$e(s)&&q(s.pipe),mr=s=>{let t;return s&&(typeof FormData=="function"&&s instanceof FormData||q(s.append)&&((t=Me(s))==="formdata"||t==="object"&&q(s.toString)&&s.toString()==="[object FormData]"))},gr=M("URLSearchParams"),[fr,yr,br,_r]=["ReadableStream","Request","Response","Headers"].map(M),vr=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function we(s,t,{allOwnKeys:r=!1}={}){if(s===null||typeof s>"u")return;let n,a;if(typeof s!="object"&&(s=[s]),he(s))for(n=0,a=s.length;n<a;n++)t.call(null,s[n],n,s);else{const i=r?Object.getOwnPropertyNames(s):Object.keys(s),o=i.length;let u;for(n=0;n<o;n++)u=i[n],t.call(null,s[u],u,s)}}function Jt(s,t){t=t.toLowerCase();const r=Object.keys(s);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kt=s=>!je(s)&&s!==ae;function ht(){const{caseless:s}=Kt(this)&&this||{},t={},r=(n,a)=>{const i=s&&Jt(t,a)||a;Ve(t[i])&&Ve(n)?t[i]=ht(t[i],n):Ve(n)?t[i]=ht({},n):he(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&we(arguments[n],r);return t}const jr=(s,t,r,{allOwnKeys:n}={})=>(we(t,(a,i)=>{r&&q(a)?s[i]=de(a,r):s[i]=a},{allOwnKeys:n}),s),wr=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),xr=(s,t,r,n)=>{s.prototype=Object.create(t.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:t.prototype}),r&&Object.assign(s.prototype,r)},kr=(s,t,r,n)=>{let a,i,o;const u={};if(t=t||{},s==null)return t;do{for(a=Object.getOwnPropertyNames(s),i=a.length;i-- >0;)o=a[i],(!n||n(o,s,t))&&!u[o]&&(t[o]=s[o],u[o]=!0);s=r!==!1&&dt(s)}while(s&&(!r||r(s,t))&&s!==Object.prototype);return t},Tr=(s,t,r)=>{s=String(s),(r===void 0||r>s.length)&&(r=s.length),r-=t.length;const n=s.indexOf(t,r);return n!==-1&&n===r},Er=s=>{if(!s)return null;if(he(s))return s;let t=s.length;if(!Wt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=s[t];return r},zr=(s=>t=>s&&t instanceof s)(typeof Uint8Array<"u"&&dt(Uint8Array)),Ar=(s,t)=>{const n=(s&&s[Symbol.iterator]).call(s);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(s,i[0],i[1])}},Rr=(s,t)=>{let r;const n=[];for(;(r=s.exec(t))!==null;)n.push(r);return n},Pr=M("HTMLFormElement"),Sr=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Gt=(({hasOwnProperty:s})=>(t,r)=>s.call(t,r))(Object.prototype),Nr=M("RegExp"),Xt=(s,t)=>{const r=Object.getOwnPropertyDescriptors(s),n={};we(r,(a,i)=>{let o;(o=t(a,i,s))!==!1&&(n[i]=o||a)}),Object.defineProperties(s,n)},Or=s=>{Xt(s,(t,r)=>{if(q(s)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=s[r];if(q(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Cr=(s,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return he(s)?n(s):n(String(s).split(t)),r},Ir=()=>{},Ur=(s,t)=>s!=null&&Number.isFinite(s=+s)?s:t,pt="abcdefghijklmnopqrstuvwxyz",Yt="0123456789",es={DIGIT:Yt,ALPHA:pt,ALPHA_DIGIT:pt+pt.toUpperCase()+Yt},qr=(s=16,t=es.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;s--;)r+=t[Math.random()*n|0];return r};function Fr(s){return!!(s&&q(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const Zr=s=>{const t=new Array(10),r=(n,a)=>{if($e(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=he(n)?[]:{};return we(n,(o,u)=>{const l=r(o,a+1);!je(l)&&(i[u]=l)}),t[a]=void 0,i}}return n};return r(s,0)},Dr=M("AsyncFunction"),Br=s=>s&&($e(s)||q(s))&&q(s.then)&&q(s.catch),ts=((s,t)=>s?setImmediate:t?((r,n)=>(ae.addEventListener("message",({source:a,data:i})=>{a===ae&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),ae.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",q(ae.postMessage)),Mr=typeof queueMicrotask<"u"?queueMicrotask.bind(ae):typeof process<"u"&&process.nextTick||ts,d={isArray:he,isArrayBuffer:Ht,isBuffer:ar,isFormData:mr,isArrayBufferView:ir,isString:or,isNumber:Wt,isBoolean:ur,isObject:$e,isPlainObject:Ve,isReadableStream:fr,isRequest:yr,isResponse:br,isHeaders:_r,isUndefined:je,isDate:cr,isFile:lr,isBlob:dr,isRegExp:Nr,isFunction:q,isStream:pr,isURLSearchParams:gr,isTypedArray:zr,isFileList:hr,forEach:we,merge:ht,extend:jr,trim:vr,stripBOM:wr,inherits:xr,toFlatObject:kr,kindOf:Me,kindOfTest:M,endsWith:Tr,toArray:Er,forEachEntry:Ar,matchAll:Rr,isHTMLForm:Pr,hasOwnProperty:Gt,hasOwnProp:Gt,reduceDescriptors:Xt,freezeMethods:Or,toObjectSet:Cr,toCamelCase:Sr,noop:Ir,toFiniteNumber:Ur,findKey:Jt,global:ae,isContextDefined:Kt,ALPHABET:es,generateString:qr,isSpecCompliantForm:Fr,toJSONObject:Zr,isAsyncFn:Dr,isThenable:Br,setImmediate:ts,asap:Mr};function x(s,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}d.inherits(x,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const ss=x.prototype,rs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{rs[s]={value:s}}),Object.defineProperties(x,rs),Object.defineProperty(ss,"isAxiosError",{value:!0}),x.from=(s,t,r,n,a,i)=>{const o=Object.create(ss);return d.toFlatObject(s,o,function(l){return l!==Error.prototype},u=>u!=="isAxiosError"),x.call(o,s.message,t,r,n,a),o.cause=s,o.name=s.name,i&&Object.assign(o,i),o};const Lr=null;function mt(s){return d.isPlainObject(s)||d.isArray(s)}function ns(s){return d.endsWith(s,"[]")?s.slice(0,-2):s}function as(s,t,r){return s?s.concat(t).map(function(a,i){return a=ns(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function $r(s){return d.isArray(s)&&!s.some(mt)}const Vr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Qe(s,t,r){if(!d.isObject(s))throw new TypeError("target must be an object");t=t||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!d.isUndefined(y[E])});const n=r.metaTokens,a=r.visitor||h,i=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(a))throw new TypeError("visitor must be a function");function c(_){if(_===null)return"";if(d.isDate(_))return _.toISOString();if(!l&&d.isBlob(_))throw new x("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(_)||d.isTypedArray(_)?l&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function h(_,E,y){let U=_;if(_&&!y&&typeof _=="object"){if(d.endsWith(E,"{}"))E=n?E:E.slice(0,-2),_=JSON.stringify(_);else if(d.isArray(_)&&$r(_)||(d.isFileList(_)||d.endsWith(E,"[]"))&&(U=d.toArray(_)))return E=ns(E),U.forEach(function(R,O){!(d.isUndefined(R)||R===null)&&t.append(o===!0?as([E],O,i):o===null?E:E+"[]",c(R))}),!1}return mt(_)?!0:(t.append(as(y,E,i),c(_)),!1)}const m=[],w=Object.assign(Vr,{defaultVisitor:h,convertValue:c,isVisitable:mt});function A(_,E){if(!d.isUndefined(_)){if(m.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(_),d.forEach(_,function(U,D){(!(d.isUndefined(U)||U===null)&&a.call(t,U,d.isString(D)?D.trim():D,E,w))===!0&&A(U,E?E.concat(D):[D])}),m.pop()}}if(!d.isObject(s))throw new TypeError("data must be an object");return A(s),t}function is(s){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function gt(s,t){this._pairs=[],s&&Qe(s,this,t)}const os=gt.prototype;os.append=function(t,r){this._pairs.push([t,r])},os.toString=function(t){const r=t?function(n){return t.call(this,n,is)}:is;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function Qr(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function us(s,t,r){if(!t)return s;const n=r&&r.encode||Qr,a=r&&r.serialize;let i;if(a?i=a(t,r):i=d.isURLSearchParams(t)?t.toString():new gt(t,r).toString(n),i){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+i}return s}class cs{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(n){n!==null&&t(n)})}}const ls={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:gt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ft=typeof window<"u"&&typeof document<"u",yt=typeof navigator=="object"&&navigator||void 0,Wr=ft&&(!yt||["ReactNative","NativeScript","NS"].indexOf(yt.product)<0),Jr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kr=ft&&window.location.href||"http://localhost",F={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ft,hasStandardBrowserEnv:Wr,hasStandardBrowserWebWorkerEnv:Jr,navigator:yt,origin:Kr},Symbol.toStringTag,{value:"Module"})),...Hr};function Gr(s,t){return Qe(s,new F.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return F.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Xr(s){return d.matchAll(/\w+|\[(\w*)]/g,s).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Yr(s){const t={},r=Object.keys(s);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=s[i];return t}function ds(s){function t(r,n,a,i){let o=r[i++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),l=i>=r.length;return o=!o&&d.isArray(a)?a.length:o,l?(d.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!u):((!a[o]||!d.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&d.isArray(a[o])&&(a[o]=Yr(a[o])),!u)}if(d.isFormData(s)&&d.isFunction(s.entries)){const r={};return d.forEachEntry(s,(n,a)=>{t(Xr(n),a,r,0)}),r}return null}function en(s,t,r){if(d.isString(s))try{return(t||JSON.parse)(s),d.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(s)}const xe={transitional:ls,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return a?JSON.stringify(ds(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Gr(t,this.formSerializer).toString();if((u=d.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Qe(u?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),en(t)):t}],transformResponse:[function(t){const r=this.transitional||xe.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(u){if(o)throw u.name==="SyntaxError"?x.from(u,x.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],s=>{xe.headers[s]={}});const tn=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"]),sn=s=>{const t={};let r,n,a;return s&&s.split(`
2
- `).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&tn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},hs=Symbol("internals");function ke(s){return s&&String(s).trim().toLowerCase()}function He(s){return s===!1||s==null?s:d.isArray(s)?s.map(He):String(s)}function rn(s){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(s);)t[n[1]]=n[2];return t}const nn=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function bt(s,t,r,n,a){if(d.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!d.isString(t)){if(d.isString(n))return t.indexOf(n)!==-1;if(d.isRegExp(n))return n.test(t)}}function an(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function on(s,t){const r=d.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class I{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(u,l,c){const h=ke(l);if(!h)throw new Error("header name must be a non-empty string");const m=d.findKey(a,h);(!m||a[m]===void 0||c===!0||c===void 0&&a[m]!==!1)&&(a[m||l]=He(u))}const o=(u,l)=>d.forEach(u,(c,h)=>i(c,h,l));if(d.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(d.isString(t)&&(t=t.trim())&&!nn(t))o(sn(t),r);else if(d.isHeaders(t))for(const[u,l]of t.entries())i(l,u,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=ke(t),t){const n=d.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return rn(a);if(d.isFunction(r))return r.call(this,a,n);if(d.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ke(t),t){const n=d.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||bt(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=ke(o),o){const u=d.findKey(n,o);u&&(!r||bt(n,n[u],u,r))&&(delete n[u],a=!0)}}return d.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||bt(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return d.forEach(this,(a,i)=>{const o=d.findKey(n,i);if(o){r[o]=He(a),delete r[i];return}const u=t?an(i):String(i).trim();u!==i&&delete r[i],r[u]=He(a),n[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return d.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&d.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[hs]=this[hs]={accessors:{}}).accessors,a=this.prototype;function i(o){const u=ke(o);n[u]||(on(a,o),n[u]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}}I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),d.reduceDescriptors(I.prototype,({value:s},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>s,set(n){this[r]=n}}}),d.freezeMethods(I);function _t(s,t){const r=this||xe,n=t||r,a=I.from(n.headers);let i=n.data;return d.forEach(s,function(u){i=u.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function ps(s){return!!(s&&s.__CANCEL__)}function pe(s,t,r){x.call(this,s??"canceled",x.ERR_CANCELED,t,r),this.name="CanceledError"}d.inherits(pe,x,{__CANCEL__:!0});function ms(s,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?s(r):t(new x("Request failed with status code "+r.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function un(s){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return t&&t[1]||""}function cn(s,t){s=s||10;const r=new Array(s),n=new Array(s);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),h=n[i];o||(o=c),r[a]=l,n[a]=c;let m=i,w=0;for(;m!==a;)w+=r[m++],m=m%s;if(a=(a+1)%s,a===i&&(i=(i+1)%s),c-o<t)return;const A=h&&c-h;return A?Math.round(w*1e3/A):void 0}}function ln(s,t){let r=0,n=1e3/t,a,i;const o=(c,h=Date.now())=>{r=h,a=null,i&&(clearTimeout(i),i=null),s.apply(null,c)};return[(...c)=>{const h=Date.now(),m=h-r;m>=n?o(c,h):(a=c,i||(i=setTimeout(()=>{i=null,o(a)},n-m)))},()=>a&&o(a)]}const We=(s,t,r=3)=>{let n=0;const a=cn(50,250);return ln(i=>{const o=i.loaded,u=i.lengthComputable?i.total:void 0,l=o-n,c=a(l),h=o<=u;n=o;const m={loaded:o,total:u,progress:u?o/u:void 0,bytes:l,rate:c||void 0,estimated:c&&u&&h?(u-o)/c:void 0,event:i,lengthComputable:u!=null,[t?"download":"upload"]:!0};s(m)},r)},gs=(s,t)=>{const r=s!=null;return[n=>t[0]({lengthComputable:r,total:s,loaded:n}),t[1]]},fs=s=>(...t)=>d.asap(()=>s(...t)),dn=F.hasStandardBrowserEnv?function(){const t=F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const u=d.isString(o)?a(o):o;return u.protocol===n.protocol&&u.host===n.host}}():function(){return function(){return!0}}(),hn=F.hasStandardBrowserEnv?{write(s,t,r,n,a,i){const o=[s+"="+encodeURIComponent(t)];d.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),d.isString(n)&&o.push("path="+n),d.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const t=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pn(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function mn(s,t){return t?s.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):s}function ys(s,t){return s&&!pn(t)?mn(s,t):t}const bs=s=>s instanceof I?{...s}:s;function ie(s,t){t=t||{};const r={};function n(c,h,m){return d.isPlainObject(c)&&d.isPlainObject(h)?d.merge.call({caseless:m},c,h):d.isPlainObject(h)?d.merge({},h):d.isArray(h)?h.slice():h}function a(c,h,m){if(d.isUndefined(h)){if(!d.isUndefined(c))return n(void 0,c,m)}else return n(c,h,m)}function i(c,h){if(!d.isUndefined(h))return n(void 0,h)}function o(c,h){if(d.isUndefined(h)){if(!d.isUndefined(c))return n(void 0,c)}else return n(void 0,h)}function u(c,h,m){if(m in t)return n(c,h);if(m in s)return n(void 0,c)}const l={url:i,method:i,data:i,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:u,headers:(c,h)=>a(bs(c),bs(h),!0)};return d.forEach(Object.keys(Object.assign({},s,t)),function(h){const m=l[h]||a,w=m(s[h],t[h],h);d.isUndefined(w)&&m!==u||(r[h]=w)}),r}const _s=s=>{const t=ie({},s);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:u}=t;t.headers=o=I.from(o),t.url=us(ys(t.baseURL,t.url),s.params,s.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let l;if(d.isFormData(r)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...h]=l?l.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...h].join("; "))}}if(F.hasStandardBrowserEnv&&(n&&d.isFunction(n)&&(n=n(t)),n||n!==!1&&dn(t.url))){const c=a&&i&&hn.read(i);c&&o.set(a,c)}return t},gn=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(r,n){const a=_s(s);let i=a.data;const o=I.from(a.headers).normalize();let{responseType:u,onUploadProgress:l,onDownloadProgress:c}=a,h,m,w,A,_;function E(){A&&A(),_&&_(),a.cancelToken&&a.cancelToken.unsubscribe(h),a.signal&&a.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function U(){if(!y)return;const R=I.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),G={data:!u||u==="text"||u==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:R,config:s,request:y};ms(function(B){r(B),E()},function(B){n(B),E()},G),y=null}"onloadend"in y?y.onloadend=U:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(U)},y.onabort=function(){y&&(n(new x("Request aborted",x.ECONNABORTED,s,y)),y=null)},y.onerror=function(){n(new x("Network Error",x.ERR_NETWORK,s,y)),y=null},y.ontimeout=function(){let O=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const G=a.transitional||ls;a.timeoutErrorMessage&&(O=a.timeoutErrorMessage),n(new x(O,G.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,s,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&d.forEach(o.toJSON(),function(O,G){y.setRequestHeader(G,O)}),d.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),u&&u!=="json"&&(y.responseType=a.responseType),c&&([w,_]=We(c,!0),y.addEventListener("progress",w)),l&&y.upload&&([m,A]=We(l),y.upload.addEventListener("progress",m),y.upload.addEventListener("loadend",A)),(a.cancelToken||a.signal)&&(h=R=>{y&&(n(!R||R.type?new pe(null,s,y):R),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(h),a.signal&&(a.signal.aborted?h():a.signal.addEventListener("abort",h)));const D=un(a.url);if(D&&F.protocols.indexOf(D)===-1){n(new x("Unsupported protocol "+D+":",x.ERR_BAD_REQUEST,s));return}y.send(i||null)})},fn=(s,t)=>{let r=new AbortController,n;const a=function(l){if(!n){n=!0,o();const c=l instanceof Error?l:this.reason;r.abort(c instanceof x?c:new pe(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{a(new x(`timeout ${t} of ms exceeded`,x.ETIMEDOUT))},t);const o=()=>{s&&(i&&clearTimeout(i),i=null,s.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",a):l.unsubscribe(a))}),s=null)};s.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",a));const{signal:u}=r;return u.unsubscribe=o,[u,()=>{i&&clearTimeout(i),i=null}]},yn=function*(s,t){let r=s.byteLength;if(!t||r<t){yield s;return}let n=0,a;for(;n<r;)a=n+t,yield s.slice(n,a),n=a},bn=async function*(s,t,r){for await(const n of s)yield*yn(ArrayBuffer.isView(n)?n:await r(String(n)),t)},vs=(s,t,r,n,a)=>{const i=bn(s,t,a);let o=0,u,l=c=>{u||(u=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:h,value:m}=await i.next();if(h){l(),c.close();return}let w=m.byteLength;if(r){let A=o+=w;r(A)}c.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},Je=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",js=Je&&typeof ReadableStream=="function",vt=Je&&(typeof TextEncoder=="function"?(s=>t=>s.encode(t))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),ws=(s,...t)=>{try{return!!s(...t)}catch{return!1}},_n=js&&ws(()=>{let s=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!t}),xs=64*1024,jt=js&&ws(()=>d.isReadableStream(new Response("").body)),Ke={stream:jt&&(s=>s.body)};Je&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ke[t]&&(Ke[t]=d.isFunction(s[t])?r=>r[t]():(r,n)=>{throw new x(`Response type '${t}' is not supported`,x.ERR_NOT_SUPPORT,n)})})})(new Response);const vn=async s=>{if(s==null)return 0;if(d.isBlob(s))return s.size;if(d.isSpecCompliantForm(s))return(await new Request(s).arrayBuffer()).byteLength;if(d.isArrayBufferView(s)||d.isArrayBuffer(s))return s.byteLength;if(d.isURLSearchParams(s)&&(s=s+""),d.isString(s))return(await vt(s)).byteLength},jn=async(s,t)=>{const r=d.toFiniteNumber(s.getContentLength());return r??vn(t)},wt={http:Lr,xhr:gn,fetch:Je&&(async s=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:o,onDownloadProgress:u,onUploadProgress:l,responseType:c,headers:h,withCredentials:m="same-origin",fetchOptions:w}=_s(s);c=c?(c+"").toLowerCase():"text";let[A,_]=a||i||o?fn([a,i],o):[],E,y;const U=()=>{!E&&setTimeout(()=>{A&&A.unsubscribe()}),E=!0};let D;try{if(l&&_n&&r!=="get"&&r!=="head"&&(D=await jn(h,n))!==0){let B=new Request(t,{method:"POST",body:n,duplex:"half"}),ve;if(d.isFormData(n)&&(ve=B.headers.get("content-type"))&&h.setContentType(ve),B.body){const[Qt,lt]=gs(D,We(fs(l)));n=vs(B.body,xs,Qt,lt,vt)}}d.isString(m)||(m=m?"include":"omit");const R="credentials"in Request.prototype;y=new Request(t,{...w,signal:A,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:n,duplex:"half",credentials:R?m:void 0});let O=await fetch(y);const G=jt&&(c==="stream"||c==="response");if(jt&&(u||G)){const B={};["status","statusText","headers"].forEach(rr=>{B[rr]=O[rr]});const ve=d.toFiniteNumber(O.headers.get("content-length")),[Qt,lt]=u&&gs(ve,We(fs(u),!0))||[];O=new Response(vs(O.body,xs,Qt,()=>{lt&&lt(),G&&U()},vt),B)}c=c||"text";let Vt=await Ke[d.findKey(Ke,c)||"text"](O,s);return!G&&U(),_&&_(),await new Promise((B,ve)=>{ms(B,ve,{data:Vt,headers:I.from(O.headers),status:O.status,statusText:O.statusText,config:s,request:y})})}catch(R){throw U(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,s,y),{cause:R.cause||R}):x.from(R,R&&R.code,s,y)}})};d.forEach(wt,(s,t)=>{if(s){try{Object.defineProperty(s,"name",{value:t})}catch{}Object.defineProperty(s,"adapterName",{value:t})}});const ks=s=>`- ${s}`,wn=s=>d.isFunction(s)||s===null||s===!1,Ts={getAdapter:s=>{s=d.isArray(s)?s:[s];const{length:t}=s;let r,n;const a={};for(let i=0;i<t;i++){r=s[i];let o;if(n=r,!wn(r)&&(n=wt[(o=String(r)).toLowerCase()],n===void 0))throw new x(`Unknown adapter '${o}'`);if(n)break;a[o||"#"+i]=n}if(!n){const i=Object.entries(a).map(([u,l])=>`adapter ${u} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
4
- `+i.map(ks).join(`
5
- `):" "+ks(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:wt};function xt(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new pe(null,s)}function Es(s){return xt(s),s.headers=I.from(s.headers),s.data=_t.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Ts.getAdapter(s.adapter||xe.adapter)(s).then(function(n){return xt(s),n.data=_t.call(s,s.transformResponse,n),n.headers=I.from(n.headers),n},function(n){return ps(n)||(xt(s),n&&n.response&&(n.response.data=_t.call(s,s.transformResponse,n.response),n.response.headers=I.from(n.response.headers))),Promise.reject(n)})}const zs="1.7.5",kt={};["object","boolean","number","function","string","symbol"].forEach((s,t)=>{kt[s]=function(n){return typeof n===s||"a"+(t<1?"n ":" ")+s}});const As={};kt.transitional=function(t,r,n){function a(i,o){return"[Axios v"+zs+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,u)=>{if(t===!1)throw new x(a(o," has been removed"+(r?" in "+r:"")),x.ERR_DEPRECATED);return r&&!As[o]&&(As[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,u):!0}};function xn(s,t,r){if(typeof s!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const n=Object.keys(s);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const u=s[i],l=u===void 0||o(u,i,s);if(l!==!0)throw new x("option "+i+" must be "+l,x.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new x("Unknown option "+i,x.ERR_BAD_OPTION)}}const Tt={assertOptions:xn,validators:kt},X=Tt.validators;class oe{constructor(t){this.defaults=t,this.interceptors={request:new cs,response:new cs}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ie(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&Tt.assertOptions(n,{silentJSONParsing:X.transitional(X.boolean),forcedJSONParsing:X.transitional(X.boolean),clarifyTimeoutError:X.transitional(X.boolean)},!1),a!=null&&(d.isFunction(a)?r.paramsSerializer={serialize:a}:Tt.assertOptions(a,{encode:X.function,serialize:X.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&d.merge(i.common,i[r.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],_=>{delete i[_]}),r.headers=I.concat(o,i);const u=[];let l=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(l=l&&E.synchronous,u.unshift(E.fulfilled,E.rejected))});const c=[];this.interceptors.response.forEach(function(E){c.push(E.fulfilled,E.rejected)});let h,m=0,w;if(!l){const _=[Es.bind(this),void 0];for(_.unshift.apply(_,u),_.push.apply(_,c),w=_.length,h=Promise.resolve(r);m<w;)h=h.then(_[m++],_[m++]);return h}w=u.length;let A=r;for(m=0;m<w;){const _=u[m++],E=u[m++];try{A=_(A)}catch(y){E.call(this,y);break}}try{h=Es.call(this,A)}catch(_){return Promise.reject(_)}for(m=0,w=c.length;m<w;)h=h.then(c[m++],c[m++]);return h}getUri(t){t=ie(this.defaults,t);const r=ys(t.baseURL,t.url);return us(r,t.params,t.paramsSerializer)}}d.forEach(["delete","get","head","options"],function(t){oe.prototype[t]=function(r,n){return this.request(ie(n||{},{method:t,url:r,data:(n||{}).data}))}}),d.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,u){return this.request(ie(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}oe.prototype[t]=r(),oe.prototype[t+"Form"]=r(!0)});class Et{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(u=>{n.subscribe(u),i=u}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,u){n.reason||(n.reason=new pe(i,o,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Et(function(a){t=a}),cancel:t}}}function kn(s){return function(r){return s.apply(null,r)}}function Tn(s){return d.isObject(s)&&s.isAxiosError===!0}const zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zt).forEach(([s,t])=>{zt[t]=s});function Rs(s){const t=new oe(s),r=de(oe.prototype.request,t);return d.extend(r,oe.prototype,t,{allOwnKeys:!0}),d.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return Rs(ie(s,a))},r}const S=Rs(xe);S.Axios=oe,S.CanceledError=pe,S.CancelToken=Et,S.isCancel=ps,S.VERSION=zs,S.toFormData=Qe,S.AxiosError=x,S.Cancel=S.CanceledError,S.all=function(t){return Promise.all(t)},S.spread=kn,S.isAxiosError=Tn,S.mergeConfig=ie,S.AxiosHeaders=I,S.formToJSON=s=>ds(d.isHTMLForm(s)?new FormData(s):s),S.getAdapter=Ts.getAdapter,S.HttpStatusCode=zt,S.default=S;var z;(function(s){s.assertEqual=a=>a;function t(a){}s.assertIs=t;function r(a){throw new Error}s.assertNever=r,s.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},s.getValidEnumValues=a=>{const i=s.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),o={};for(const u of i)o[u]=a[u];return s.objectValues(o)},s.objectValues=a=>s.objectKeys(a).map(function(i){return a[i]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},s.find=(a,i)=>{for(const o of a)if(i(o))return o},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}s.joinValues=n,s.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(z||(z={}));var At;(function(s){s.mergeShapes=(t,r)=>({...t,...r})})(At||(At={}));const f=z.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Y=s=>{switch(typeof s){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(s)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(s)?f.array:s===null?f.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?f.promise:typeof Map<"u"&&s instanceof Map?f.map:typeof Set<"u"&&s instanceof Set?f.set:typeof Date<"u"&&s instanceof Date?f.date:f.object;default:return f.unknown}},p=z.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),En=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class Z extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let u=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(u[c]=u[c]||{_errors:[]},u[c]._errors.push(r(o))):u[c]=u[c]||{_errors:[]},u=u[c],l++}}};return a(this),n}static assert(t){if(!(t instanceof Z))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):n.push(t(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Z.create=s=>new Z(s);const me=(s,t)=>{let r;switch(s.code){case p.invalid_type:s.received===f.undefined?r="Required":r=`Expected ${s.expected}, received ${s.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(s.expected,z.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${z.joinValues(s.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${z.joinValues(s.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${z.joinValues(s.options)}, received '${s.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(r=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?r=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?r=`Invalid input: must end with "${s.validation.endsWith}"`:z.assertNever(s.validation):s.validation!=="regex"?r=`Invalid ${s.validation}`:r="Invalid";break;case p.too_small:s.type==="array"?r=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?r=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?r=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?r=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:r="Invalid input";break;case p.too_big:s.type==="array"?r=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?r=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?r=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?r=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?r=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${s.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=t.defaultError,z.assertNever(s)}return{message:r}};let Ps=me;function zn(s){Ps=s}function Ge(){return Ps}const Xe=s=>{const{data:t,path:r,errorMaps:n,issueData:a}=s,i=[...r,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)u=c(o,{data:t,defaultError:u}).message;return{...a,path:i,message:u}},An=[];function g(s,t){const r=Ge(),n=Xe({issueData:t,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,r,r===me?void 0:me].filter(a=>!!a)});s.common.issues.push(n)}class N{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const a of r){if(a.status==="aborted")return j;a.status==="dirty"&&t.dirty(),n.push(a.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const a of r){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return N.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const a of r){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return j;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const j=Object.freeze({status:"aborted"}),ge=s=>({status:"dirty",value:s}),C=s=>({status:"valid",value:s}),Rt=s=>s.status==="aborted",Pt=s=>s.status==="dirty",Te=s=>s.status==="valid",Ee=s=>typeof Promise<"u"&&s instanceof Promise;function Ye(s,t,r,n){if(typeof t=="function"?s!==t||!n:!t.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(s)}function Ss(s,t,r,n,a){if(typeof t=="function"?s!==t||!a:!t.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(s,r),r}typeof SuppressedError=="function"&&SuppressedError;var b;(function(s){s.errToObj=t=>typeof t=="string"?{message:t}:t||{},s.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(b||(b={}));var ze,Ae;class Q{constructor(t,r,n,a){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ns=(s,t)=>{if(Te(t))return{success:!0,data:t.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Z(s.common.issues);return this._error=r,this._error}}};function k(s){if(!s)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=s;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(o,u)=>{var l,c;const{message:h}=s;return o.code==="invalid_enum_value"?{message:h??u.defaultError}:typeof u.data>"u"?{message:(l=h??n)!==null&&l!==void 0?l:u.defaultError}:o.code!=="invalid_type"?{message:u.defaultError}:{message:(c=h??r)!==null&&c!==void 0?c:u.defaultError}},description:a}}class T{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Y(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Y(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new N,ctx:{common:t.parent.common,data:t.data,parsedType:Y(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Ee(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const a={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Y(t)},i=this._parseSync({data:t,path:a.path,parent:a});return Ns(a,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Y(t)},a=this._parse({data:t,path:n.path,parent:n}),i=await(Ee(a)?a:Promise.resolve(a));return Ns(n,i)}refine(t,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const o=t(a),u=()=>i.addIssue({code:p.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(u(),!1)):o?!0:(u(),!1)})}refinement(t,r){return this._refinement((n,a)=>t(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(t){return new V({schema:this,typeName:v.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return W.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $.create(this,this._def)}promise(){return _e.create(this,this._def)}or(t){return Ne.create([this,t],this._def)}and(t){return Oe.create(this,t,this._def)}transform(t){return new V({...k(this._def),schema:this,typeName:v.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Fe({...k(this._def),innerType:this,defaultValue:r,typeName:v.ZodDefault})}brand(){return new Ot({typeName:v.ZodBranded,type:this,...k(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Ze({...k(this._def),innerType:this,catchValue:r,typeName:v.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return De.create(this,t)}readonly(){return Be.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Rn=/^c[^\s-]{8,}$/i,Pn=/^[0-9a-z]+$/,Sn=/^[0-9A-HJKMNP-TV-Z]{26}$/,Nn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,On=/^[a-z0-9_-]{21}$/i,Cn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,In=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Un="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let St;const qn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Fn=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Zn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Os="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Dn=new RegExp(`^${Os}$`);function Cs(s){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return s.precision?t=`${t}\\.\\d{${s.precision}}`:s.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Bn(s){return new RegExp(`^${Cs(s)}$`)}function Is(s){let t=`${Os}T${Cs(s)}`;const r=[];return r.push(s.local?"Z?":"Z"),s.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Mn(s,t){return!!((t==="v4"||!t)&&qn.test(s)||(t==="v6"||!t)&&Fn.test(s))}class L extends T{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==f.string){const i=this._getOrReturnCtx(t);return g(i,{code:p.invalid_type,expected:f.string,received:i.parsedType}),j}const n=new N;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),g(a,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),g(a,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,u=t.data.length<i.value;(o||u)&&(a=this._getOrReturnCtx(t,a),o?g(a,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&g(a,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")In.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"email",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")St||(St=new RegExp(Un,"u")),St.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"emoji",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Nn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"uuid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")On.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"nanoid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Rn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"cuid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Pn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"cuid2",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Sn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"ulid",code:p.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),g(a,{validation:"url",code:p.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"regex",code:p.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),g(a,{code:p.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),g(a,{code:p.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),g(a,{code:p.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Is(i).test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{code:p.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Dn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{code:p.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Bn(i).test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{code:p.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Cn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"duration",code:p.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Mn(t.data,i.version)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"ip",code:p.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Zn.test(t.data)||(a=this._getOrReturnCtx(t,a),g(a,{validation:"base64",code:p.invalid_string,message:i.message}),n.dirty()):z.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(a=>t.test(a),{validation:r,code:p.invalid_string,...b.errToObj(n)})}_addCheck(t){return new L({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...b.errToObj(t)})}url(t){return this._addCheck({kind:"url",...b.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...b.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...b.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...b.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...b.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...b.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...b.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...b.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...b.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...b.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...b.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...b.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...b.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...b.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...b.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...b.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...b.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...b.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...b.errToObj(r)})}nonempty(t){return this.min(1,b.errToObj(t))}trim(){return new L({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}L.create=s=>{var t;return new L({checks:[],typeName:v.ZodString,coerce:(t=s==null?void 0:s.coerce)!==null&&t!==void 0?t:!1,...k(s)})};function Ln(s,t){const r=(s.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n,i=parseInt(s.toFixed(a).replace(".","")),o=parseInt(t.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}class ee extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==f.number){const i=this._getOrReturnCtx(t);return g(i,{code:p.invalid_type,expected:f.number,received:i.parsedType}),j}let n;const a=new N;for(const i of this._def.checks)i.kind==="int"?z.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),g(n,{code:p.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:p.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:p.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Ln(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),g(n,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),g(n,{code:p.not_finite,message:i.message}),a.dirty()):z.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,b.toString(r))}gt(t,r){return this.setLimit("min",t,!1,b.toString(r))}lte(t,r){return this.setLimit("max",t,!0,b.toString(r))}lt(t,r){return this.setLimit("max",t,!1,b.toString(r))}setLimit(t,r,n,a){return new ee({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:b.toString(a)}]})}_addCheck(t){return new ee({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:b.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:b.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:b.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&z.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}ee.create=s=>new ee({checks:[],typeName:v.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...k(s)});class te extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==f.bigint){const i=this._getOrReturnCtx(t);return g(i,{code:p.invalid_type,expected:f.bigint,received:i.parsedType}),j}let n;const a=new N;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:p.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:p.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),g(n,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):z.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,b.toString(r))}gt(t,r){return this.setLimit("min",t,!1,b.toString(r))}lte(t,r){return this.setLimit("max",t,!0,b.toString(r))}lt(t,r){return this.setLimit("max",t,!1,b.toString(r))}setLimit(t,r,n,a){return new te({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:b.toString(a)}]})}_addCheck(t){return new te({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:b.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}te.create=s=>{var t;return new te({checks:[],typeName:v.ZodBigInt,coerce:(t=s==null?void 0:s.coerce)!==null&&t!==void 0?t:!1,...k(s)})};class Re extends T{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==f.boolean){const n=this._getOrReturnCtx(t);return g(n,{code:p.invalid_type,expected:f.boolean,received:n.parsedType}),j}return C(t.data)}}Re.create=s=>new Re({typeName:v.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...k(s)});class ue extends T{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==f.date){const i=this._getOrReturnCtx(t);return g(i,{code:p.invalid_type,expected:f.date,received:i.parsedType}),j}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return g(i,{code:p.invalid_date}),j}const n=new N;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),g(a,{code:p.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),g(a,{code:p.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):z.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ue({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:b.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:b.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}ue.create=s=>new ue({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:v.ZodDate,...k(s)});class et extends T{_parse(t){if(this._getType(t)!==f.symbol){const n=this._getOrReturnCtx(t);return g(n,{code:p.invalid_type,expected:f.symbol,received:n.parsedType}),j}return C(t.data)}}et.create=s=>new et({typeName:v.ZodSymbol,...k(s)});class Pe extends T{_parse(t){if(this._getType(t)!==f.undefined){const n=this._getOrReturnCtx(t);return g(n,{code:p.invalid_type,expected:f.undefined,received:n.parsedType}),j}return C(t.data)}}Pe.create=s=>new Pe({typeName:v.ZodUndefined,...k(s)});class Se extends T{_parse(t){if(this._getType(t)!==f.null){const n=this._getOrReturnCtx(t);return g(n,{code:p.invalid_type,expected:f.null,received:n.parsedType}),j}return C(t.data)}}Se.create=s=>new Se({typeName:v.ZodNull,...k(s)});class fe extends T{constructor(){super(...arguments),this._any=!0}_parse(t){return C(t.data)}}fe.create=s=>new fe({typeName:v.ZodAny,...k(s)});class ce extends T{constructor(){super(...arguments),this._unknown=!0}_parse(t){return C(t.data)}}ce.create=s=>new ce({typeName:v.ZodUnknown,...k(s)});class J extends T{_parse(t){const r=this._getOrReturnCtx(t);return g(r,{code:p.invalid_type,expected:f.never,received:r.parsedType}),j}}J.create=s=>new J({typeName:v.ZodNever,...k(s)});class tt extends T{_parse(t){if(this._getType(t)!==f.undefined){const n=this._getOrReturnCtx(t);return g(n,{code:p.invalid_type,expected:f.void,received:n.parsedType}),j}return C(t.data)}}tt.create=s=>new tt({typeName:v.ZodVoid,...k(s)});class $ extends T{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),a=this._def;if(r.parsedType!==f.array)return g(r,{code:p.invalid_type,expected:f.array,received:r.parsedType}),j;if(a.exactLength!==null){const o=r.data.length>a.exactLength.value,u=r.data.length<a.exactLength.value;(o||u)&&(g(r,{code:o?p.too_big:p.too_small,minimum:u?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(g(r,{code:p.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(g(r,{code:p.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,u)=>a.type._parseAsync(new Q(r,o,r.path,u)))).then(o=>N.mergeArray(n,o));const i=[...r.data].map((o,u)=>a.type._parseSync(new Q(r,o,r.path,u)));return N.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new $({...this._def,minLength:{value:t,message:b.toString(r)}})}max(t,r){return new $({...this._def,maxLength:{value:t,message:b.toString(r)}})}length(t,r){return new $({...this._def,exactLength:{value:t,message:b.toString(r)}})}nonempty(t){return this.min(1,t)}}$.create=(s,t)=>new $({type:s,minLength:null,maxLength:null,exactLength:null,typeName:v.ZodArray,...k(t)});function ye(s){if(s instanceof P){const t={};for(const r in s.shape){const n=s.shape[r];t[r]=W.create(ye(n))}return new P({...s._def,shape:()=>t})}else return s instanceof $?new $({...s._def,type:ye(s.element)}):s instanceof W?W.create(ye(s.unwrap())):s instanceof re?re.create(ye(s.unwrap())):s instanceof H?H.create(s.items.map(t=>ye(t))):s}class P extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=z.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==f.object){const c=this._getOrReturnCtx(t);return g(c,{code:p.invalid_type,expected:f.object,received:c.parsedType}),j}const{status:n,ctx:a}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),u=[];if(!(this._def.catchall instanceof J&&this._def.unknownKeys==="strip"))for(const c in a.data)o.includes(c)||u.push(c);const l=[];for(const c of o){const h=i[c],m=a.data[c];l.push({key:{status:"valid",value:c},value:h._parse(new Q(a,m,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof J){const c=this._def.unknownKeys;if(c==="passthrough")for(const h of u)l.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(c==="strict")u.length>0&&(g(a,{code:p.unrecognized_keys,keys:u}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const h of u){const m=a.data[h];l.push({key:{status:"valid",value:h},value:c._parse(new Q(a,m,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const h of l){const m=await h.key,w=await h.value;c.push({key:m,value:w,alwaysSet:h.alwaysSet})}return c}).then(c=>N.mergeObjectSync(n,c)):N.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return b.errToObj,new P({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,i,o,u;const l=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(u=b.errToObj(t).message)!==null&&u!==void 0?u:l}:{message:l}}}:{}})}strip(){return new P({...this._def,unknownKeys:"strip"})}passthrough(){return new P({...this._def,unknownKeys:"passthrough"})}extend(t){return new P({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new P({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:v.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new P({...this._def,catchall:t})}pick(t){const r={};return z.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new P({...this._def,shape:()=>r})}omit(t){const r={};return z.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new P({...this._def,shape:()=>r})}deepPartial(){return ye(this)}partial(t){const r={};return z.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];t&&!t[n]?r[n]=a:r[n]=a.optional()}),new P({...this._def,shape:()=>r})}required(t){const r={};return z.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof W;)i=i._def.innerType;r[n]=i}}),new P({...this._def,shape:()=>r})}keyof(){return Us(z.objectKeys(this.shape))}}P.create=(s,t)=>new P({shape:()=>s,unknownKeys:"strip",catchall:J.create(),typeName:v.ZodObject,...k(t)}),P.strictCreate=(s,t)=>new P({shape:()=>s,unknownKeys:"strict",catchall:J.create(),typeName:v.ZodObject,...k(t)}),P.lazycreate=(s,t)=>new P({shape:s,unknownKeys:"strip",catchall:J.create(),typeName:v.ZodObject,...k(t)});class Ne extends T{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;const o=i.map(u=>new Z(u.ctx.common.issues));return g(r,{code:p.invalid_union,unionErrors:o}),j}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},h=l._parseSync({data:r.data,path:r.path,parent:c});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const u=o.map(l=>new Z(l));return g(r,{code:p.invalid_union,unionErrors:u}),j}}get options(){return this._def.options}}Ne.create=(s,t)=>new Ne({options:s,typeName:v.ZodUnion,...k(t)});const K=s=>s instanceof Ie?K(s.schema):s instanceof V?K(s.innerType()):s instanceof Ue?[s.value]:s instanceof se?s.options:s instanceof qe?z.objectValues(s.enum):s instanceof Fe?K(s._def.innerType):s instanceof Pe?[void 0]:s instanceof Se?[null]:s instanceof W?[void 0,...K(s.unwrap())]:s instanceof re?[null,...K(s.unwrap())]:s instanceof Ot||s instanceof Be?K(s.unwrap()):s instanceof Ze?K(s._def.innerType):[];class st extends T{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==f.object)return g(r,{code:p.invalid_type,expected:f.object,received:r.parsedType}),j;const n=this.discriminator,a=r.data[n],i=this.optionsMap.get(a);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(g(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),j)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const a=new Map;for(const i of r){const o=K(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of o){if(a.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);a.set(u,i)}}return new st({typeName:v.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:a,...k(n)})}}function Nt(s,t){const r=Y(s),n=Y(t);if(s===t)return{valid:!0,data:s};if(r===f.object&&n===f.object){const a=z.objectKeys(t),i=z.objectKeys(s).filter(u=>a.indexOf(u)!==-1),o={...s,...t};for(const u of i){const l=Nt(s[u],t[u]);if(!l.valid)return{valid:!1};o[u]=l.data}return{valid:!0,data:o}}else if(r===f.array&&n===f.array){if(s.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<s.length;i++){const o=s[i],u=t[i],l=Nt(o,u);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return r===f.date&&n===f.date&&+s==+t?{valid:!0,data:s}:{valid:!1}}class Oe extends T{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=(i,o)=>{if(Rt(i)||Rt(o))return j;const u=Nt(i.value,o.value);return u.valid?((Pt(i)||Pt(o))&&r.dirty(),{status:r.value,value:u.data}):(g(n,{code:p.invalid_intersection_types}),j)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Oe.create=(s,t,r)=>new Oe({left:s,right:t,typeName:v.ZodIntersection,...k(r)});class H extends T{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==f.array)return g(n,{code:p.invalid_type,expected:f.array,received:n.parsedType}),j;if(n.data.length<this._def.items.length)return g(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),j;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,u)=>{const l=this._def.items[u]||this._def.rest;return l?l._parse(new Q(n,o,n.path,u)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>N.mergeArray(r,o)):N.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new H({...this._def,rest:t})}}H.create=(s,t)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new H({items:s,typeName:v.ZodTuple,rest:null,...k(t)})};class Ce extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==f.object)return g(n,{code:p.invalid_type,expected:f.object,received:n.parsedType}),j;const a=[],i=this._def.keyType,o=this._def.valueType;for(const u in n.data)a.push({key:i._parse(new Q(n,u,n.path,u)),value:o._parse(new Q(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?N.mergeObjectAsync(r,a):N.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof T?new Ce({keyType:t,valueType:r,typeName:v.ZodRecord,...k(n)}):new Ce({keyType:L.create(),valueType:t,typeName:v.ZodRecord,...k(r)})}}class rt extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==f.map)return g(n,{code:p.invalid_type,expected:f.map,received:n.parsedType}),j;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([u,l],c)=>({key:a._parse(new Q(n,u,n.path,[c,"key"])),value:i._parse(new Q(n,l,n.path,[c,"value"]))}));if(n.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,h=await l.value;if(c.status==="aborted"||h.status==="aborted")return j;(c.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(c.value,h.value)}return{status:r.value,value:u}})}else{const u=new Map;for(const l of o){const c=l.key,h=l.value;if(c.status==="aborted"||h.status==="aborted")return j;(c.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(c.value,h.value)}return{status:r.value,value:u}}}}rt.create=(s,t,r)=>new rt({valueType:t,keyType:s,typeName:v.ZodMap,...k(r)});class le extends T{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==f.set)return g(n,{code:p.invalid_type,expected:f.set,received:n.parsedType}),j;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(g(n,{code:p.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(g(n,{code:p.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const h of l){if(h.status==="aborted")return j;h.status==="dirty"&&r.dirty(),c.add(h.value)}return{status:r.value,value:c}}const u=[...n.data.values()].map((l,c)=>i._parse(new Q(n,l,n.path,c)));return n.common.async?Promise.all(u).then(l=>o(l)):o(u)}min(t,r){return new le({...this._def,minSize:{value:t,message:b.toString(r)}})}max(t,r){return new le({...this._def,maxSize:{value:t,message:b.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}le.create=(s,t)=>new le({valueType:s,minSize:null,maxSize:null,typeName:v.ZodSet,...k(t)});class be extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==f.function)return g(r,{code:p.invalid_type,expected:f.function,received:r.parsedType}),j;function n(u,l){return Xe({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ge(),me].filter(c=>!!c),issueData:{code:p.invalid_arguments,argumentsError:l}})}function a(u,l){return Xe({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ge(),me].filter(c=>!!c),issueData:{code:p.invalid_return_type,returnTypeError:l}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof _e){const u=this;return C(async function(...l){const c=new Z([]),h=await u._def.args.parseAsync(l,i).catch(A=>{throw c.addIssue(n(l,A)),c}),m=await Reflect.apply(o,this,h);return await u._def.returns._def.type.parseAsync(m,i).catch(A=>{throw c.addIssue(a(m,A)),c})})}else{const u=this;return C(function(...l){const c=u._def.args.safeParse(l,i);if(!c.success)throw new Z([n(l,c.error)]);const h=Reflect.apply(o,this,c.data),m=u._def.returns.safeParse(h,i);if(!m.success)throw new Z([a(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new be({...this._def,args:H.create(t).rest(ce.create())})}returns(t){return new be({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new be({args:t||H.create([]).rest(ce.create()),returns:r||ce.create(),typeName:v.ZodFunction,...k(n)})}}class Ie extends T{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ie.create=(s,t)=>new Ie({getter:s,typeName:v.ZodLazy,...k(t)});class Ue extends T{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return g(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),j}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ue.create=(s,t)=>new Ue({value:s,typeName:v.ZodLiteral,...k(t)});function Us(s,t){return new se({values:s,typeName:v.ZodEnum,...k(t)})}class se extends T{constructor(){super(...arguments),ze.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return g(r,{expected:z.joinValues(n),received:r.parsedType,code:p.invalid_type}),j}if(Ye(this,ze)||Ss(this,ze,new Set(this._def.values)),!Ye(this,ze).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return g(r,{received:r.data,code:p.invalid_enum_value,options:n}),j}return C(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return se.create(t,{...this._def,...r})}exclude(t,r=this._def){return se.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}ze=new WeakMap,se.create=Us;class qe extends T{constructor(){super(...arguments),Ae.set(this,void 0)}_parse(t){const r=z.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==f.string&&n.parsedType!==f.number){const a=z.objectValues(r);return g(n,{expected:z.joinValues(a),received:n.parsedType,code:p.invalid_type}),j}if(Ye(this,Ae)||Ss(this,Ae,new Set(z.getValidEnumValues(this._def.values))),!Ye(this,Ae).has(t.data)){const a=z.objectValues(r);return g(n,{received:n.data,code:p.invalid_enum_value,options:a}),j}return C(t.data)}get enum(){return this._def.values}}Ae=new WeakMap,qe.create=(s,t)=>new qe({values:s,typeName:v.ZodNativeEnum,...k(t)});class _e extends T{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==f.promise&&r.common.async===!1)return g(r,{code:p.invalid_type,expected:f.promise,received:r.parsedType}),j;const n=r.parsedType===f.promise?r.data:Promise.resolve(r.data);return C(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}_e.create=(s,t)=>new _e({type:s,typeName:v.ZodPromise,...k(t)});class V extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===v.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{g(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async u=>{if(r.value==="aborted")return j;const l=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return l.status==="aborted"?j:l.status==="dirty"||r.value==="dirty"?ge(l.value):l});{if(r.value==="aborted")return j;const u=this._def.schema._parseSync({data:o,path:n.path,parent:n});return u.status==="aborted"?j:u.status==="dirty"||r.value==="dirty"?ge(u.value):u}}if(a.type==="refinement"){const o=u=>{const l=a.refinement(u,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){const u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?j:(u.status==="dirty"&&r.dirty(),o(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?j:(u.status==="dirty"&&r.dirty(),o(u.value).then(()=>({status:r.value,value:u.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Te(o))return o;const u=a.transform(o.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Te(o)?Promise.resolve(a.transform(o.value,i)).then(u=>({status:r.value,value:u})):o);z.assertNever(a)}}V.create=(s,t,r)=>new V({schema:s,typeName:v.ZodEffects,effect:t,...k(r)}),V.createWithPreprocess=(s,t,r)=>new V({schema:t,effect:{type:"preprocess",transform:s},typeName:v.ZodEffects,...k(r)});class W extends T{_parse(t){return this._getType(t)===f.undefined?C(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}W.create=(s,t)=>new W({innerType:s,typeName:v.ZodOptional,...k(t)});class re extends T{_parse(t){return this._getType(t)===f.null?C(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}re.create=(s,t)=>new re({innerType:s,typeName:v.ZodNullable,...k(t)});class Fe extends T{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Fe.create=(s,t)=>new Fe({innerType:s,typeName:v.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...k(t)});class Ze extends T{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ee(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Z(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Z(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ze.create=(s,t)=>new Ze({innerType:s,typeName:v.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...k(t)});class nt extends T{_parse(t){if(this._getType(t)!==f.nan){const n=this._getOrReturnCtx(t);return g(n,{code:p.invalid_type,expected:f.nan,received:n.parsedType}),j}return{status:"valid",value:t.data}}}nt.create=s=>new nt({typeName:v.ZodNaN,...k(s)});const $n=Symbol("zod_brand");class Ot extends T{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class De extends T{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?j:i.status==="dirty"?(r.dirty(),ge(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?j:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(t,r){return new De({in:t,out:r,typeName:v.ZodPipeline})}}class Be extends T{_parse(t){const r=this._def.innerType._parse(t),n=a=>(Te(a)&&(a.value=Object.freeze(a.value)),a);return Ee(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}Be.create=(s,t)=>new Be({innerType:s,typeName:v.ZodReadonly,...k(t)});function qs(s,t={},r){return s?fe.create().superRefine((n,a)=>{var i,o;if(!s(n)){const u=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(i=u.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,c=typeof u=="string"?{message:u}:u;a.addIssue({code:"custom",...c,fatal:l})}}):fe.create()}const Vn={object:P.lazycreate};var v;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(v||(v={}));const Qn=(s,t={message:`Input not instance of ${s.name}`})=>qs(r=>r instanceof s,t),Fs=L.create,Zs=ee.create,Hn=nt.create,Wn=te.create,Ds=Re.create,Jn=ue.create,Kn=et.create,Gn=Pe.create,Xn=Se.create,Yn=fe.create,ea=ce.create,ta=J.create,sa=tt.create,ra=$.create,na=P.create,aa=P.strictCreate,ia=Ne.create,oa=st.create,ua=Oe.create,ca=H.create,la=Ce.create,da=rt.create,ha=le.create,pa=be.create,ma=Ie.create,ga=Ue.create,fa=se.create,ya=qe.create,ba=_e.create,Bs=V.create,_a=W.create,va=re.create,ja=V.createWithPreprocess,wa=De.create;var e=Object.freeze({__proto__:null,defaultErrorMap:me,setErrorMap:zn,getErrorMap:Ge,makeIssue:Xe,EMPTY_PATH:An,addIssueToContext:g,ParseStatus:N,INVALID:j,DIRTY:ge,OK:C,isAborted:Rt,isDirty:Pt,isValid:Te,isAsync:Ee,get util(){return z},get objectUtil(){return At},ZodParsedType:f,getParsedType:Y,ZodType:T,datetimeRegex:Is,ZodString:L,ZodNumber:ee,ZodBigInt:te,ZodBoolean:Re,ZodDate:ue,ZodSymbol:et,ZodUndefined:Pe,ZodNull:Se,ZodAny:fe,ZodUnknown:ce,ZodNever:J,ZodVoid:tt,ZodArray:$,ZodObject:P,ZodUnion:Ne,ZodDiscriminatedUnion:st,ZodIntersection:Oe,ZodTuple:H,ZodRecord:Ce,ZodMap:rt,ZodSet:le,ZodFunction:be,ZodLazy:Ie,ZodLiteral:Ue,ZodEnum:se,ZodNativeEnum:qe,ZodPromise:_e,ZodEffects:V,ZodTransformer:V,ZodOptional:W,ZodNullable:re,ZodDefault:Fe,ZodCatch:Ze,ZodNaN:nt,BRAND:$n,ZodBranded:Ot,ZodPipeline:De,ZodReadonly:Be,custom:qs,Schema:T,ZodSchema:T,late:Vn,get ZodFirstPartyTypeKind(){return v},coerce:{string:s=>L.create({...s,coerce:!0}),number:s=>ee.create({...s,coerce:!0}),boolean:s=>Re.create({...s,coerce:!0}),bigint:s=>te.create({...s,coerce:!0}),date:s=>ue.create({...s,coerce:!0})},any:Yn,array:ra,bigint:Wn,boolean:Ds,date:Jn,discriminatedUnion:oa,effect:Bs,enum:fa,function:pa,instanceof:Qn,intersection:ua,lazy:ma,literal:ga,map:da,nan:Hn,nativeEnum:ya,never:ta,null:Xn,nullable:va,number:Zs,object:na,oboolean:()=>Ds().optional(),onumber:()=>Zs().optional(),optional:_a,ostring:()=>Fs().optional(),pipeline:wa,preprocess:ja,promise:ba,record:la,set:ha,strictObject:aa,string:Fs,symbol:Kn,transformer:Bs,tuple:ca,undefined:Gn,union:ia,unknown:ea,void:sa,NEVER:j,ZodIssueCode:p,quotelessJson:En,ZodError:Z});function xa(s,t){let r={...s};for(let n of t)delete r[n];return r}var ka=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;function Ta(s){let t=s.url,r=s.params;return r&&(t=t.replace(ka,(n,a)=>a in r?`${r[a]}`:n)),t}function Ms(s,t,r){return s.find(n=>n.method===t&&n.path===r)}function Ea(s){let t=new FormData;for(let r in s)t.append(r,s[r]);return{data:t}}var at=class extends Error{constructor(s,t,r,n){super(s),this.config=t,this.data=r,this.cause=n}},za={name:"form-data",request:async(s,t)=>{if(typeof t.data!="object"||Array.isArray(t.data))throw new at("Zodios: multipart/form-data body must be an object",t);let r=Ea(t.data);return{...t,data:r.data,headers:{...t.headers,...r.headers}}}};function Aa(){return za}var Ra={name:"form-url",request:async(s,t)=>{if(typeof t.data!="object"||Array.isArray(t.data))throw new at("Zodios: application/x-www-form-urlencoded body must be an object",t);return{...t,data:new URLSearchParams(t.data).toString(),headers:{...t.headers,"Content-Type":"application/x-www-form-urlencoded"}}}};function Pa(){return Ra}function Ls(s,t){return{request:async(r,n)=>({...n,headers:{...n.headers,[s]:t}})}}function $s(s){return[!0,"response","all"].includes(s)}function Vs(s){return[!0,"request","all"].includes(s)}function Sa({validate:s,transform:t,sendDefaults:r}){return{name:"zod-validation",request:Vs(s)?async(n,a)=>{let i=Ms(n,a.method,a.url);if(!i)throw new Error(`No endpoint found for ${a.method} ${a.url}`);let{parameters:o}=i;if(!o)return a;let u={...a,queries:{...a.queries},headers:{...a.headers},params:{...a.params}},l={Query:m=>{var w;return(w=u.queries)==null?void 0:w[m]},Body:m=>u.data,Header:m=>{var w;return(w=u.headers)==null?void 0:w[m]},Path:m=>{var w;return(w=u.params)==null?void 0:w[m]}},c={Query:(m,w)=>u.queries[m]=w,Body:(m,w)=>u.data=w,Header:(m,w)=>u.headers[m]=w,Path:(m,w)=>u.params[m]=w},h=Vs(t);for(let m of o){let{name:w,schema:A,type:_}=m,E=l[_](w);if(r||E!==void 0){let y=await A.safeParseAsync(E);if(!y.success)throw new at(`Zodios: Invalid ${_} parameter '${w}'`,a,E,y.error);h&&c[_](w,y.data)}}return u}:void 0,response:$s(s)?async(n,a,i)=>{var o,u,l,c;let h=Ms(n,a.method,a.url);if(!h)throw new Error(`No endpoint found for ${a.method} ${a.url}`);if((u=(o=i.headers)==null?void 0:o["content-type"])!=null&&u.includes("application/json")||(c=(l=i.headers)==null?void 0:l["content-type"])!=null&&c.includes("application/vnd.api+json")){let m=await h.response.safeParseAsync(i.data);if(!m.success)throw new at(`Zodios: Invalid response from endpoint '${h.method} ${h.path}'
1
+ (function(fe,ke){typeof exports=="object"&&typeof module<"u"?ke(exports):typeof define=="function"&&define.amd?define(["exports"],ke):(fe=typeof globalThis<"u"?globalThis:fe||self,ke(fe.SolidtimeApi={}))})(this,(function(fe){"use strict";function ke(s,e){return function(){return s.apply(e,arguments)}}const{toString:ba}=Object.prototype,{getPrototypeOf:Qe}=Object,{iterator:He,toStringTag:ns}=Symbol,We=(s=>e=>{const a=ba.call(e);return s[a]||(s[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),ee=s=>(s=s.toLowerCase(),e=>We(e)===s),Je=s=>e=>typeof e===s,{isArray:Ae}=Array,Re=Je("undefined");function Ce(s){return s!==null&&!Re(s)&&s.constructor!==null&&!Re(s.constructor)&&J(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const os=ee("ArrayBuffer");function va(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&os(s.buffer),e}const wa=Je("string"),J=Je("function"),is=Je("number"),Ue=s=>s!==null&&typeof s=="object",xa=s=>s===!0||s===!1,Ke=s=>{if(We(s)!=="object")return!1;const e=Qe(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ns in s)&&!(He in s)},ka=s=>{if(!Ue(s)||Ce(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},Aa=ee("Date"),Ra=ee("File"),Ea=s=>!!(s&&typeof s.uri<"u"),za=s=>s&&typeof s.getParts<"u",Ta=ee("Blob"),Pa=ee("FileList"),Oa=s=>Ue(s)&&J(s.pipe);function Sa(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const us=Sa(),cs=typeof us.FormData<"u"?us.FormData:void 0,Na=s=>{if(!s)return!1;if(cs&&s instanceof cs)return!0;const e=Qe(s);if(!e||e===Object.prototype||!J(s.append))return!1;const a=We(s);return a==="formdata"||a==="object"&&J(s.toString)&&s.toString()==="[object FormData]"},ja=ee("URLSearchParams"),[Ca,Ua,Fa,Ia]=["ReadableStream","Request","Response","Headers"].map(ee),qa=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(s,e,{allOwnKeys:a=!1}={}){if(s===null||typeof s>"u")return;let r,n;if(typeof s!="object"&&(s=[s]),Ae(s))for(r=0,n=s.length;r<n;r++)e.call(null,s[r],r,s);else{if(Ce(s))return;const i=a?Object.getOwnPropertyNames(s):Object.keys(s),u=i.length;let c;for(r=0;r<u;r++)c=i[r],e.call(null,s[c],c,s)}}function ds(s,e){if(Ce(s))return null;e=e.toLowerCase();const a=Object.keys(s);let r=a.length,n;for(;r-- >0;)if(n=a[r],e===n.toLowerCase())return n;return null}const ge=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hs=s=>!Re(s)&&s!==ge;function _t(...s){const{caseless:e,skipUndefined:a}=hs(this)&&this||{},r={},n=(i,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=e&&ds(r,u)||u,m=bt(r,c)?r[c]:void 0;Ke(m)&&Ke(i)?r[c]=_t(m,i):Ke(i)?r[c]=_t({},i):Ae(i)?r[c]=i.slice():(!a||!Re(i))&&(r[c]=i)};for(let i=0,u=s.length;i<u;i++)s[i]&&Fe(s[i],n);return r}const Da=(s,e,a,{allOwnKeys:r}={})=>(Fe(e,(n,i)=>{a&&J(n)?Object.defineProperty(s,i,{__proto__:null,value:ke(n,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(s,i,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),s),La=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Ba=(s,e,a,r)=>{s.prototype=Object.create(e.prototype,r),Object.defineProperty(s.prototype,"constructor",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(s,"super",{__proto__:null,value:e.prototype}),a&&Object.assign(s.prototype,a)},$a=(s,e,a,r)=>{let n,i,u;const c={};if(e=e||{},s==null)return e;do{for(n=Object.getOwnPropertyNames(s),i=n.length;i-- >0;)u=n[i],(!r||r(u,s,e))&&!c[u]&&(e[u]=s[u],c[u]=!0);s=a!==!1&&Qe(s)}while(s&&(!a||a(s,e))&&s!==Object.prototype);return e},Ma=(s,e,a)=>{s=String(s),(a===void 0||a>s.length)&&(a=s.length),a-=e.length;const r=s.indexOf(e,a);return r!==-1&&r===a},Va=s=>{if(!s)return null;if(Ae(s))return s;let e=s.length;if(!is(e))return null;const a=new Array(e);for(;e-- >0;)a[e]=s[e];return a},Za=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Qe(Uint8Array)),Qa=(s,e)=>{const r=(s&&s[He]).call(s);let n;for(;(n=r.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},Ha=(s,e)=>{let a;const r=[];for(;(a=s.exec(e))!==null;)r.push(a);return r},Wa=ee("HTMLFormElement"),Ja=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,r,n){return r.toUpperCase()+n}),bt=(({hasOwnProperty:s})=>(e,a)=>s.call(e,a))(Object.prototype),Ka=ee("RegExp"),ls=(s,e)=>{const a=Object.getOwnPropertyDescriptors(s),r={};Fe(a,(n,i)=>{let u;(u=e(n,i,s))!==!1&&(r[i]=u||n)}),Object.defineProperties(s,r)},Xa=s=>{ls(s,(e,a)=>{if(J(s)&&["arguments","caller","callee"].includes(a))return!1;const r=s[a];if(J(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Ga=(s,e)=>{const a={},r=n=>{n.forEach(i=>{a[i]=!0})};return Ae(s)?r(s):r(String(s).split(e)),a},Ya=()=>{},er=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e;function tr(s){return!!(s&&J(s.append)&&s[ns]==="FormData"&&s[He])}const sr=s=>{const e=new Array(10),a=(r,n)=>{if(Ue(r)){if(e.indexOf(r)>=0)return;if(Ce(r))return r;if(!("toJSON"in r)){e[n]=r;const i=Ae(r)?[]:{};return Fe(r,(u,c)=>{const m=a(u,n+1);!Re(m)&&(i[c]=m)}),e[n]=void 0,i}}return r};return a(s,0)},ar=ee("AsyncFunction"),rr=s=>s&&(Ue(s)||J(s))&&J(s.then)&&J(s.catch),ps=((s,e)=>s?setImmediate:e?((a,r)=>(ge.addEventListener("message",({source:n,data:i})=>{n===ge&&i===a&&r.length&&r.shift()()},!1),n=>{r.push(n),ge.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",J(ge.postMessage)),nr=typeof queueMicrotask<"u"?queueMicrotask.bind(ge):typeof process<"u"&&process.nextTick||ps,l={isArray:Ae,isArrayBuffer:os,isBuffer:Ce,isFormData:Na,isArrayBufferView:va,isString:wa,isNumber:is,isBoolean:xa,isObject:Ue,isPlainObject:Ke,isEmptyObject:ka,isReadableStream:Ca,isRequest:Ua,isResponse:Fa,isHeaders:Ia,isUndefined:Re,isDate:Aa,isFile:Ra,isReactNativeBlob:Ea,isReactNative:za,isBlob:Ta,isRegExp:Ka,isFunction:J,isStream:Oa,isURLSearchParams:ja,isTypedArray:Za,isFileList:Pa,forEach:Fe,merge:_t,extend:Da,trim:qa,stripBOM:La,inherits:Ba,toFlatObject:$a,kindOf:We,kindOfTest:ee,endsWith:Ma,toArray:Va,forEachEntry:Qa,matchAll:Ha,isHTMLForm:Wa,hasOwnProperty:bt,hasOwnProp:bt,reduceDescriptors:ls,freezeMethods:Xa,toObjectSet:Ga,toCamelCase:Ja,noop:Ya,toFiniteNumber:er,findKey:ds,global:ge,isContextDefined:hs,isSpecCompliantForm:tr,toJSONObject:sr,isAsyncFn:ar,isThenable:rr,setImmediate:ps,asap:nr,isIterable:s=>s!=null&&J(s[He])},or=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ir=s=>{const e={};let a,r,n;return s&&s.split(`
2
+ `).forEach(function(u){n=u.indexOf(":"),a=u.substring(0,n).trim().toLowerCase(),r=u.substring(n+1).trim(),!(!a||e[a]&&or[a])&&(a==="set-cookie"?e[a]?e[a].push(r):e[a]=[r]:e[a]=e[a]?e[a]+", "+r:r)}),e},ms=Symbol("internals"),ur=/[^\x09\x20-\x7E\x80-\xFF]/g;function cr(s){let e=0,a=s.length;for(;e<a;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;a>e;){const r=s.charCodeAt(a-1);if(r!==9&&r!==32)break;a-=1}return e===0&&a===s.length?s:s.slice(e,a)}function Ie(s){return s&&String(s).trim().toLowerCase()}function dr(s){return cr(s.replace(ur,""))}function Xe(s){return s===!1||s==null?s:l.isArray(s)?s.map(Xe):dr(String(s))}function hr(s){const e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=a.exec(s);)e[r[1]]=r[2];return e}const lr=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function vt(s,e,a,r,n){if(l.isFunction(r))return r.call(this,e,a);if(n&&(e=a),!!l.isString(e)){if(l.isString(r))return e.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(e)}}function pr(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,r)=>a.toUpperCase()+r)}function mr(s,e){const a=l.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(s,r+a,{__proto__:null,value:function(n,i,u){return this[r].call(this,e,n,i,u)},configurable:!0})})}let H=class{constructor(e){e&&this.set(e)}set(e,a,r){const n=this;function i(c,m,p){const f=Ie(m);if(!f)throw new Error("header name must be a non-empty string");const b=l.findKey(n,f);(!b||n[b]===void 0||p===!0||p===void 0&&n[b]!==!1)&&(n[b||m]=Xe(c))}const u=(c,m)=>l.forEach(c,(p,f)=>i(p,f,m));if(l.isPlainObject(e)||e instanceof this.constructor)u(e,a);else if(l.isString(e)&&(e=e.trim())&&!lr(e))u(ir(e),a);else if(l.isObject(e)&&l.isIterable(e)){let c={},m,p;for(const f of e){if(!l.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[p=f[0]]=(m=c[p])?l.isArray(m)?[...m,f[1]]:[m,f[1]]:f[1]}u(c,a)}else e!=null&&i(a,e,r);return this}get(e,a){if(e=Ie(e),e){const r=l.findKey(this,e);if(r){const n=this[r];if(!a)return n;if(a===!0)return hr(n);if(l.isFunction(a))return a.call(this,n,r);if(l.isRegExp(a))return a.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=Ie(e),e){const r=l.findKey(this,e);return!!(r&&this[r]!==void 0&&(!a||vt(this,this[r],r,a)))}return!1}delete(e,a){const r=this;let n=!1;function i(u){if(u=Ie(u),u){const c=l.findKey(r,u);c&&(!a||vt(r,r[c],c,a))&&(delete r[c],n=!0)}}return l.isArray(e)?e.forEach(i):i(e),n}clear(e){const a=Object.keys(this);let r=a.length,n=!1;for(;r--;){const i=a[r];(!e||vt(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){const a=this,r={};return l.forEach(this,(n,i)=>{const u=l.findKey(r,i);if(u){a[u]=Xe(n),delete a[i];return}const c=e?pr(i):String(i).trim();c!==i&&delete a[i],a[c]=Xe(n),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const a=Object.create(null);return l.forEach(this,(r,n)=>{r!=null&&r!==!1&&(a[n]=e&&l.isArray(r)?r.join(", "):r)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).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,...a){const r=new this(e);return a.forEach(n=>r.set(n)),r}static accessor(e){const r=(this[ms]=this[ms]={accessors:{}}).accessors,n=this.prototype;function i(u){const c=Ie(u);r[c]||(mr(n,u),r[c]=!0)}return l.isArray(e)?e.forEach(i):i(e),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(H.prototype,({value:s},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[a]=r}}}),l.freezeMethods(H);const fr="[REDACTED ****]";function gr(s){if(l.hasOwnProp(s,"toJSON"))return!0;let e=Object.getPrototypeOf(s);for(;e&&e!==Object.prototype;){if(l.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function yr(s,e){const a=new Set(e.map(i=>String(i).toLowerCase())),r=[],n=i=>{if(i===null||typeof i!="object"||l.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof H&&(i=i.toJSON()),r.push(i);let u;if(l.isArray(i))u=[],i.forEach((c,m)=>{const p=n(c);l.isUndefined(p)||(u[m]=p)});else{if(!l.isPlainObject(i)&&gr(i))return r.pop(),i;u=Object.create(null);for(const[c,m]of Object.entries(i)){const p=a.has(c.toLowerCase())?fr:n(m);l.isUndefined(p)||(u[c]=p)}}return r.pop(),u};return n(s)}let R=class ya extends Error{static from(e,a,r,n,i,u){const c=new ya(e.message,a||e.code,r,n,i);return c.cause=e,c.name=e.name,e.status!=null&&c.status==null&&(c.status=e.status),u&&Object.assign(c,u),c}constructor(e,a,r,n,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){const e=this.config,a=e&&l.hasOwnProp(e,"redact")?e.redact:void 0,r=l.isArray(a)&&a.length>0?yr(e,a):l.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:r,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 _r=null;function wt(s){return l.isPlainObject(s)||l.isArray(s)}function fs(s){return l.endsWith(s,"[]")?s.slice(0,-2):s}function xt(s,e,a){return s?s.concat(e).map(function(n,i){return n=fs(n),!a&&i?"["+n+"]":n}).join(a?".":""):e}function br(s){return l.isArray(s)&&!s.some(wt)}const vr=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function Ge(s,e,a){if(!l.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,a=l.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,T){return!l.isUndefined(T[w])});const r=a.metaTokens,n=a.visitor||b,i=a.dots,u=a.indexes,c=a.Blob||typeof Blob<"u"&&Blob,m=a.maxDepth===void 0?100:a.maxDepth,p=c&&l.isSpecCompliantForm(e);if(!l.isFunction(n))throw new TypeError("visitor must be a function");function f(A){if(A===null)return"";if(l.isDate(A))return A.toISOString();if(l.isBoolean(A))return A.toString();if(!p&&l.isBlob(A))throw new R("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(A)||l.isTypedArray(A)?p&&typeof Blob=="function"?new Blob([A]):Buffer.from(A):A}function b(A,w,T){let L=A;if(l.isReactNative(e)&&l.isReactNativeBlob(A))return e.append(xt(T,w,i),f(A)),!1;if(A&&!T&&typeof A=="object"){if(l.endsWith(w,"{}"))w=r?w:w.slice(0,-2),A=JSON.stringify(A);else if(l.isArray(A)&&br(A)||(l.isFileList(A)||l.endsWith(w,"[]"))&&(L=l.toArray(A)))return w=fs(w),L.forEach(function(q,G){!(l.isUndefined(q)||q===null)&&e.append(u===!0?xt([w],G,i):u===null?w:w+"[]",f(q))}),!1}return wt(A)?!0:(e.append(xt(T,w,i),f(A)),!1)}const z=[],C=Object.assign(vr,{defaultVisitor:b,convertValue:f,isVisitable:wt});function U(A,w,T=0){if(!l.isUndefined(A)){if(T>m)throw new R("Object is too deeply nested ("+T+" levels). Max depth: "+m,R.ERR_FORM_DATA_DEPTH_EXCEEDED);if(z.indexOf(A)!==-1)throw Error("Circular reference detected in "+w.join("."));z.push(A),l.forEach(A,function(D,q){(!(l.isUndefined(D)||D===null)&&n.call(e,D,l.isString(q)?q.trim():q,w,C))===!0&&U(D,w?w.concat(q):[q],T+1)}),z.pop()}}if(!l.isObject(s))throw new TypeError("data must be an object");return U(s),e}function gs(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(s).replace(/[!'()~]|%20/g,function(r){return e[r]})}function kt(s,e){this._pairs=[],s&&Ge(s,this,e)}const ys=kt.prototype;ys.append=function(e,a){this._pairs.push([e,a])},ys.toString=function(e){const a=e?function(r){return e.call(this,r,gs)}:gs;return this._pairs.map(function(n){return a(n[0])+"="+a(n[1])},"").join("&")};function wr(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _s(s,e,a){if(!e)return s;const r=a&&a.encode||wr,n=l.isFunction(a)?{serialize:a}:a,i=n&&n.serialize;let u;if(i?u=i(e,n):u=l.isURLSearchParams(e)?e.toString():new kt(e,n).toString(r),u){const c=s.indexOf("#");c!==-1&&(s=s.slice(0,c)),s+=(s.indexOf("?")===-1?"?":"&")+u}return s}class bs{constructor(){this.handlers=[]}use(e,a,r){return this.handlers.push({fulfilled:e,rejected:a,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){l.forEach(this.handlers,function(r){r!==null&&e(r)})}}const At={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},xr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:kt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Rt=typeof window<"u"&&typeof document<"u",Et=typeof navigator=="object"&&navigator||void 0,kr=Rt&&(!Et||["ReactNative","NativeScript","NS"].indexOf(Et.product)<0),Ar=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rr=Rt&&window.location.href||"http://localhost",Z={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rt,hasStandardBrowserEnv:kr,hasStandardBrowserWebWorkerEnv:Ar,navigator:Et,origin:Rr},Symbol.toStringTag,{value:"Module"})),...xr};function Er(s,e){return Ge(s,new Z.classes.URLSearchParams,{visitor:function(a,r,n,i){return Z.isNode&&l.isBuffer(a)?(this.append(r,a.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function zr(s){return l.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Tr(s){const e={},a=Object.keys(s);let r;const n=a.length;let i;for(r=0;r<n;r++)i=a[r],e[i]=s[i];return e}function vs(s){function e(a,r,n,i){let u=a[i++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),m=i>=a.length;return u=!u&&l.isArray(n)?n.length:u,m?(l.hasOwnProp(n,u)?n[u]=l.isArray(n[u])?n[u].concat(r):[n[u],r]:n[u]=r,!c):((!n[u]||!l.isObject(n[u]))&&(n[u]=[]),e(a,r,n[u],i)&&l.isArray(n[u])&&(n[u]=Tr(n[u])),!c)}if(l.isFormData(s)&&l.isFunction(s.entries)){const a={};return l.forEachEntry(s,(r,n)=>{e(zr(r),n,a,0)}),a}return null}const Ee=(s,e)=>s!=null&&l.hasOwnProp(s,e)?s[e]:void 0;function Pr(s,e,a){if(l.isString(s))try{return(e||JSON.parse)(s),l.trim(s)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(s)}const qe={transitional:At,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){const r=a.getContentType()||"",n=r.indexOf("application/json")>-1,i=l.isObject(e);if(i&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return n?JSON.stringify(vs(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){const m=Ee(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Er(e,m).toString();if((c=l.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=Ee(this,"env"),f=p&&p.FormData;return Ge(c?{"files[]":e}:e,f&&new f,m)}}return i||n?(a.setContentType("application/json",!1),Pr(e)):e}],transformResponse:[function(e){const a=Ee(this,"transitional")||qe.transitional,r=a&&a.forcedJSONParsing,n=Ee(this,"responseType"),i=n==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(r&&!n||i)){const c=!(a&&a.silentJSONParsing)&&i;try{return JSON.parse(e,Ee(this,"parseReviver"))}catch(m){if(c)throw m.name==="SyntaxError"?R.from(m,R.ERR_BAD_RESPONSE,this,null,Ee(this,"response")):m}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch","query"],s=>{qe.headers[s]={}});function zt(s,e){const a=this||qe,r=e||a,n=H.from(r.headers);let i=r.data;return l.forEach(s,function(c){i=c.call(a,i,n.normalize(),e?e.status:void 0)}),n.normalize(),i}function ws(s){return!!(s&&s.__CANCEL__)}let De=class extends R{constructor(e,a,r){super(e??"canceled",R.ERR_CANCELED,a,r),this.name="CanceledError",this.__CANCEL__=!0}};function xs(s,e,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?s(a):e(new R("Request failed with status code "+a.status,a.status>=400&&a.status<500?R.ERR_BAD_REQUEST:R.ERR_BAD_RESPONSE,a.config,a.request,a))}function Or(s){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(s);return e&&e[1]||""}function Sr(s,e){s=s||10;const a=new Array(s),r=new Array(s);let n=0,i=0,u;return e=e!==void 0?e:1e3,function(m){const p=Date.now(),f=r[i];u||(u=p),a[n]=m,r[n]=p;let b=i,z=0;for(;b!==n;)z+=a[b++],b=b%s;if(n=(n+1)%s,n===i&&(i=(i+1)%s),p-u<e)return;const C=f&&p-f;return C?Math.round(z*1e3/C):void 0}}function Nr(s,e){let a=0,r=1e3/e,n,i;const u=(p,f=Date.now())=>{a=f,n=null,i&&(clearTimeout(i),i=null),s(...p)};return[(...p)=>{const f=Date.now(),b=f-a;b>=r?u(p,f):(n=p,i||(i=setTimeout(()=>{i=null,u(n)},r-b)))},()=>n&&u(n)]}const Ye=(s,e,a=3)=>{let r=0;const n=Sr(50,250);return Nr(i=>{const u=i.loaded,c=i.lengthComputable?i.total:void 0,m=c!=null?Math.min(u,c):u,p=Math.max(0,m-r),f=n(p);r=Math.max(r,m);const b={loaded:m,total:c,progress:c?m/c:void 0,bytes:p,rate:f||void 0,estimated:f&&c?(c-m)/f:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};s(b)},a)},ks=(s,e)=>{const a=s!=null;return[r=>e[0]({lengthComputable:a,total:s,loaded:r}),e[1]]},As=s=>(...e)=>l.asap(()=>s(...e)),jr=Z.hasStandardBrowserEnv?((s,e)=>a=>(a=new URL(a,Z.origin),s.protocol===a.protocol&&s.host===a.host&&(e||s.port===a.port)))(new URL(Z.origin),Z.navigator&&/(msie|trident)/i.test(Z.navigator.userAgent)):()=>!0,Cr=Z.hasStandardBrowserEnv?{write(s,e,a,r,n,i,u){if(typeof document>"u")return;const c=[`${s}=${encodeURIComponent(e)}`];l.isNumber(a)&&c.push(`expires=${new Date(a).toUTCString()}`),l.isString(r)&&c.push(`path=${r}`),l.isString(n)&&c.push(`domain=${n}`),i===!0&&c.push("secure"),l.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(s){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let a=0;a<e.length;a++){const r=e[a].replace(/^\s+/,""),n=r.indexOf("=");if(n!==-1&&r.slice(0,n)===s)return decodeURIComponent(r.slice(n+1))}return null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ur(s){return typeof s!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Fr(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Rs(s,e,a){let r=!Ur(e);return s&&(r||a===!1)?Fr(s,e):e}const Es=s=>s instanceof H?{...s}:s;function ye(s,e){e=e||{};const a=Object.create(null);Object.defineProperty(a,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,f,b,z){return l.isPlainObject(p)&&l.isPlainObject(f)?l.merge.call({caseless:z},p,f):l.isPlainObject(f)?l.merge({},f):l.isArray(f)?f.slice():f}function n(p,f,b,z){if(l.isUndefined(f)){if(!l.isUndefined(p))return r(void 0,p,b,z)}else return r(p,f,b,z)}function i(p,f){if(!l.isUndefined(f))return r(void 0,f)}function u(p,f){if(l.isUndefined(f)){if(!l.isUndefined(p))return r(void 0,p)}else return r(void 0,f)}function c(p,f,b){if(l.hasOwnProp(e,b))return r(p,f);if(l.hasOwnProp(s,b))return r(void 0,p)}const m={url:i,method:i,data:i,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c,headers:(p,f,b)=>n(Es(p),Es(f),b,!0)};return l.forEach(Object.keys({...s,...e}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const b=l.hasOwnProp(m,f)?m[f]:n,z=l.hasOwnProp(s,f)?s[f]:void 0,C=l.hasOwnProp(e,f)?e[f]:void 0,U=b(z,C,f);l.isUndefined(U)&&b!==c||(a[f]=U)}),a}const Ir=["content-type","content-length"];function qr(s,e,a){if(a!=="content-only"){s.set(e);return}Object.entries(e).forEach(([r,n])=>{Ir.includes(r.toLowerCase())&&s.set(r,n)})}const Dr=s=>encodeURIComponent(s).replace(/%([0-9A-F]{2})/gi,(e,a)=>String.fromCharCode(parseInt(a,16))),zs=s=>{const e=ye({},s),a=z=>l.hasOwnProp(e,z)?e[z]:void 0,r=a("data");let n=a("withXSRFToken");const i=a("xsrfHeaderName"),u=a("xsrfCookieName");let c=a("headers");const m=a("auth"),p=a("baseURL"),f=a("allowAbsoluteUrls"),b=a("url");if(e.headers=c=H.from(c),e.url=_s(Rs(p,b,f),s.params,s.paramsSerializer),m&&c.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?Dr(m.password):""))),l.isFormData(r)&&(Z.hasStandardBrowserEnv||Z.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):l.isFunction(r.getHeaders)&&qr(c,r.getHeaders(),a("formDataHeaderPolicy"))),Z.hasStandardBrowserEnv&&(l.isFunction(n)&&(n=n(e)),n===!0||n==null&&jr(e.url))){const C=i&&u&&Cr.read(u);C&&c.set(i,C)}return e},Lr=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(a,r){const n=zs(s);let i=n.data;const u=H.from(n.headers).normalize();let{responseType:c,onUploadProgress:m,onDownloadProgress:p}=n,f,b,z,C,U;function A(){C&&C(),U&&U(),n.cancelToken&&n.cancelToken.unsubscribe(f),n.signal&&n.signal.removeEventListener("abort",f)}let w=new XMLHttpRequest;w.open(n.method.toUpperCase(),n.url,!0),w.timeout=n.timeout;function T(){if(!w)return;const D=H.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),G={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:D,config:s,request:w};xs(function(Me){a(Me),A()},function(Me){r(Me),A()},G),w=null}"onloadend"in w?w.onloadend=T:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(T)},w.onabort=function(){w&&(r(new R("Request aborted",R.ECONNABORTED,s,w)),A(),w=null)},w.onerror=function(q){const G=q&&q.message?q.message:"Network Error",ve=new R(G,R.ERR_NETWORK,s,w);ve.event=q||null,r(ve),A(),w=null},w.ontimeout=function(){let q=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const G=n.transitional||At;n.timeoutErrorMessage&&(q=n.timeoutErrorMessage),r(new R(q,G.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,s,w)),A(),w=null},i===void 0&&u.setContentType(null),"setRequestHeader"in w&&l.forEach(u.toJSON(),function(q,G){w.setRequestHeader(G,q)}),l.isUndefined(n.withCredentials)||(w.withCredentials=!!n.withCredentials),c&&c!=="json"&&(w.responseType=n.responseType),p&&([z,U]=Ye(p,!0),w.addEventListener("progress",z)),m&&w.upload&&([b,C]=Ye(m),w.upload.addEventListener("progress",b),w.upload.addEventListener("loadend",C)),(n.cancelToken||n.signal)&&(f=D=>{w&&(r(!D||D.type?new De(null,s,w):D),w.abort(),A(),w=null)},n.cancelToken&&n.cancelToken.subscribe(f),n.signal&&(n.signal.aborted?f():n.signal.addEventListener("abort",f)));const L=Or(n.url);if(L&&!Z.protocols.includes(L)){r(new R("Unsupported protocol "+L+":",R.ERR_BAD_REQUEST,s));return}w.send(i||null)})},Br=(s,e)=>{const{length:a}=s=s?s.filter(Boolean):[];if(e||a){let r=new AbortController,n;const i=function(p){if(!n){n=!0,c();const f=p instanceof Error?p:this.reason;r.abort(f instanceof R?f:new De(f instanceof Error?f.message:f))}};let u=e&&setTimeout(()=>{u=null,i(new R(`timeout of ${e}ms exceeded`,R.ETIMEDOUT))},e);const c=()=>{s&&(u&&clearTimeout(u),u=null,s.forEach(p=>{p.unsubscribe?p.unsubscribe(i):p.removeEventListener("abort",i)}),s=null)};s.forEach(p=>p.addEventListener("abort",i));const{signal:m}=r;return m.unsubscribe=()=>l.asap(c),m}},$r=function*(s,e){let a=s.byteLength;if(a<e){yield s;return}let r=0,n;for(;r<a;)n=r+e,yield s.slice(r,n),r=n},Mr=async function*(s,e){for await(const a of Vr(s))yield*$r(a,e)},Vr=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:a,value:r}=await e.read();if(a)break;yield r}}finally{await e.cancel()}},Ts=(s,e,a,r)=>{const n=Mr(s,e);let i=0,u,c=m=>{u||(u=!0,r&&r(m))};return new ReadableStream({async pull(m){try{const{done:p,value:f}=await n.next();if(p){c(),m.close();return}let b=f.byteLength;if(a){let z=i+=b;a(z)}m.enqueue(new Uint8Array(f))}catch(p){throw c(p),p}},cancel(m){return c(m),n.return()}},{highWaterMark:2})};function Zr(s){if(!s||typeof s!="string"||!s.startsWith("data:"))return 0;const e=s.indexOf(",");if(e<0)return 0;const a=s.slice(5,e),r=s.slice(e+1);if(/;base64/i.test(a)){let u=r.length;const c=r.length;for(let C=0;C<c;C++)if(r.charCodeAt(C)===37&&C+2<c){const U=r.charCodeAt(C+1),A=r.charCodeAt(C+2);(U>=48&&U<=57||U>=65&&U<=70||U>=97&&U<=102)&&(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)&&(u-=2,C+=2)}let m=0,p=c-1;const f=C=>C>=2&&r.charCodeAt(C-2)===37&&r.charCodeAt(C-1)===51&&(r.charCodeAt(C)===68||r.charCodeAt(C)===100);p>=0&&(r.charCodeAt(p)===61?(m++,p--):f(p)&&(m++,p-=3)),m===1&&p>=0&&(r.charCodeAt(p)===61||f(p))&&m++;const z=Math.floor(u/4)*3-(m||0);return z>0?z:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let u=0,c=r.length;u<c;u++){const m=r.charCodeAt(u);if(m<128)i+=1;else if(m<2048)i+=2;else if(m>=55296&&m<=56319&&u+1<c){const p=r.charCodeAt(u+1);p>=56320&&p<=57343?(i+=4,u++):i+=3}else i+=3}return i}const Tt="1.16.0",Ps=64*1024,{isFunction:et}=l,Os=(s,...e)=>{try{return!!s(...e)}catch{return!1}},Qr=s=>{const e=l.global??globalThis,{ReadableStream:a,TextEncoder:r}=e;s=l.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},s);const{fetch:n,Request:i,Response:u}=s,c=n?et(n):typeof fetch=="function",m=et(i),p=et(u);if(!c)return!1;const f=c&&et(a),b=c&&(typeof r=="function"?(T=>L=>T.encode(L))(new r):async T=>new Uint8Array(await new i(T).arrayBuffer())),z=m&&f&&Os(()=>{let T=!1;const L=new i(Z.origin,{body:new a,method:"POST",get duplex(){return T=!0,"half"}}),D=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),T&&!D}),C=p&&f&&Os(()=>l.isReadableStream(new u("").body)),U={stream:C&&(T=>T.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(T=>{!U[T]&&(U[T]=(L,D)=>{let q=L&&L[T];if(q)return q.call(L);throw new R(`Response type '${T}' is not supported`,R.ERR_NOT_SUPPORT,D)})});const A=async T=>{if(T==null)return 0;if(l.isBlob(T))return T.size;if(l.isSpecCompliantForm(T))return(await new i(Z.origin,{method:"POST",body:T}).arrayBuffer()).byteLength;if(l.isArrayBufferView(T)||l.isArrayBuffer(T))return T.byteLength;if(l.isURLSearchParams(T)&&(T=T+""),l.isString(T))return(await b(T)).byteLength},w=async(T,L)=>{const D=l.toFiniteNumber(T.getContentLength());return D??A(L)};return async T=>{let{url:L,method:D,data:q,signal:G,cancelToken:ve,timeout:Me,onDownloadProgress:ss,onUploadProgress:la,responseType:le,headers:we,withCredentials:ft="same-origin",fetchOptions:pa,maxContentLength:ae,maxBodyLength:as}=zs(T);const Ve=l.isNumber(ae)&&ae>-1,wo=l.isNumber(as)&&as>-1;let ma=n||fetch;le=le?(le+"").toLowerCase():"text";let pe=Br([G,ve&&ve.toAbortSignal()],Me),Y=null;const xe=pe&&pe.unsubscribe&&(()=>{pe.unsubscribe()});let fa;try{if(Ve&&typeof L=="string"&&L.startsWith("data:")&&Zr(L)>ae)throw new R("maxContentLength size of "+ae+" exceeded",R.ERR_BAD_RESPONSE,T,Y);if(wo&&D!=="get"&&D!=="head"){const B=await w(we,q);if(typeof B=="number"&&isFinite(B)&&B>as)throw new R("Request body larger than maxBodyLength limit",R.ERR_BAD_REQUEST,T,Y)}if(la&&z&&D!=="get"&&D!=="head"&&(fa=await w(we,q))!==0){let B=new i(L,{method:"POST",body:q,duplex:"half"}),je;if(l.isFormData(q)&&(je=B.headers.get("content-type"))&&we.setContentType(je),B.body){const[gt,yt]=ks(fa,Ye(As(la)));q=Ts(B.body,Ps,gt,yt)}}l.isString(ft)||(ft=ft?"include":"omit");const Q=m&&"credentials"in i.prototype;if(l.isFormData(q)){const B=we.getContentType();B&&/^multipart\/form-data/i.test(B)&&!/boundary=/i.test(B)&&we.delete("content-type")}we.set("User-Agent","axios/"+Tt,!1);const me={...pa,signal:pe,method:D.toUpperCase(),headers:we.normalize().toJSON(),body:q,duplex:"half",credentials:Q?ft:void 0};Y=m&&new i(L,me);let re=await(m?ma(Y,pa):ma(L,me));if(Ve){const B=l.toFiniteNumber(re.headers.get("content-length"));if(B!=null&&B>ae)throw new R("maxContentLength size of "+ae+" exceeded",R.ERR_BAD_RESPONSE,T,Y)}const rs=C&&(le==="stream"||le==="response");if(C&&re.body&&(ss||Ve||rs&&xe)){const B={};["status","statusText","headers"].forEach(Ze=>{B[Ze]=re[Ze]});const je=l.toFiniteNumber(re.headers.get("content-length")),[gt,yt]=ss&&ks(je,Ye(As(ss),!0))||[];let ga=0;const xo=Ze=>{if(Ve&&(ga=Ze,ga>ae))throw new R("maxContentLength size of "+ae+" exceeded",R.ERR_BAD_RESPONSE,T,Y);gt&&gt(Ze)};re=new u(Ts(re.body,Ps,xo,()=>{yt&&yt(),xe&&xe()}),B)}le=le||"text";let ie=await U[l.findKey(U,le)||"text"](re,T);if(Ve&&!C&&!rs){let B;if(ie!=null&&(typeof ie.byteLength=="number"?B=ie.byteLength:typeof ie.size=="number"?B=ie.size:typeof ie=="string"&&(B=typeof r=="function"?new r().encode(ie).byteLength:ie.length)),typeof B=="number"&&B>ae)throw new R("maxContentLength size of "+ae+" exceeded",R.ERR_BAD_RESPONSE,T,Y)}return!rs&&xe&&xe(),await new Promise((B,je)=>{xs(B,je,{data:ie,headers:H.from(re.headers),status:re.status,statusText:re.statusText,config:T,request:Y})})}catch(Q){if(xe&&xe(),pe&&pe.aborted&&pe.reason instanceof R){const me=pe.reason;throw me.config=T,Y&&(me.request=Y),Q!==me&&(me.cause=Q),me}throw Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,T,Y,Q&&Q.response),{cause:Q.cause||Q}):R.from(Q,Q&&Q.code,T,Y,Q&&Q.response)}}},Hr=new Map,Ss=s=>{let e=s&&s.env||{};const{fetch:a,Request:r,Response:n}=e,i=[r,n,a];let u=i.length,c=u,m,p,f=Hr;for(;c--;)m=i[c],p=f.get(m),p===void 0&&f.set(m,p=c?new Map:Qr(e)),f=p;return p};Ss();const Pt={http:_r,xhr:Lr,fetch:{get:Ss}};l.forEach(Pt,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(s,"adapterName",{__proto__:null,value:e})}});const Ns=s=>`- ${s}`,Wr=s=>l.isFunction(s)||s===null||s===!1;function Jr(s,e){s=l.isArray(s)?s:[s];const{length:a}=s;let r,n;const i={};for(let u=0;u<a;u++){r=s[u];let c;if(n=r,!Wr(r)&&(n=Pt[(c=String(r)).toLowerCase()],n===void 0))throw new R(`Unknown adapter '${c}'`);if(n&&(l.isFunction(n)||(n=n.get(e))))break;i[c||"#"+u]=n}if(!n){const u=Object.entries(i).map(([m,p])=>`adapter ${m} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=a?u.length>1?`since :
4
+ `+u.map(Ns).join(`
5
+ `):" "+Ns(u[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n}const js={getAdapter:Jr,adapters:Pt};function Ot(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new De(null,s)}function Cs(s){return Ot(s),s.headers=H.from(s.headers),s.data=zt.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),js.getAdapter(s.adapter||qe.adapter,s)(s).then(function(r){Ot(s),s.response=r;try{r.data=zt.call(s,s.transformResponse,r)}finally{delete s.response}return r.headers=H.from(r.headers),r},function(r){if(!ws(r)&&(Ot(s),r&&r.response)){s.response=r.response;try{r.response.data=zt.call(s,s.transformResponse,r.response)}finally{delete s.response}r.response.headers=H.from(r.response.headers)}return Promise.reject(r)})}const tt={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{tt[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});const Us={};tt.transitional=function(e,a,r){function n(i,u){return"[Axios v"+Tt+"] Transitional option '"+i+"'"+u+(r?". "+r:"")}return(i,u,c)=>{if(e===!1)throw new R(n(u," has been removed"+(a?" in "+a:"")),R.ERR_DEPRECATED);return a&&!Us[u]&&(Us[u]=!0,console.warn(n(u," has been deprecated since v"+a+" and will be removed in the near future"))),e?e(i,u,c):!0}},tt.spelling=function(e){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Kr(s,e,a){if(typeof s!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const r=Object.keys(s);let n=r.length;for(;n-- >0;){const i=r[n],u=Object.prototype.hasOwnProperty.call(e,i)?e[i]:void 0;if(u){const c=s[i],m=c===void 0||u(c,i,s);if(m!==!0)throw new R("option "+i+" must be "+m,R.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new R("Unknown option "+i,R.ERR_BAD_OPTION)}}const st={assertOptions:Kr,validators:tt},K=st.validators;let _e=class{constructor(e){this.defaults=e||{},this.interceptors={request:new bs,response:new bs}}async request(e,a){try{return await this._request(e,a)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=(()=>{if(!n.stack)return"";const u=n.stack.indexOf(`
6
+ `);return u===-1?"":n.stack.slice(u+1)})();try{if(!r.stack)r.stack=i;else if(i){const u=i.indexOf(`
7
+ `),c=u===-1?-1:i.indexOf(`
8
+ `,u+1),m=c===-1?"":i.slice(c+1);String(r.stack).endsWith(m)||(r.stack+=`
9
+ `+i)}}catch{}}throw r}}_request(e,a){typeof e=="string"?(a=a||{},a.url=e):a=e||{},a=ye(this.defaults,a);const{transitional:r,paramsSerializer:n,headers:i}=a;r!==void 0&&st.assertOptions(r,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean),legacyInterceptorReqResOrdering:K.transitional(K.boolean)},!1),n!=null&&(l.isFunction(n)?a.paramsSerializer={serialize:n}:st.assertOptions(n,{encode:K.function,serialize:K.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),st.assertOptions(a,{baseUrl:K.spelling("baseURL"),withXsrfToken:K.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let u=i&&l.merge(i.common,i[a.method]);i&&l.forEach(["delete","get","head","post","put","patch","query","common"],U=>{delete i[U]}),a.headers=H.concat(u,i);const c=[];let m=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(a)===!1)return;m=m&&A.synchronous;const w=a.transitional||At;w&&w.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const p=[];this.interceptors.response.forEach(function(A){p.push(A.fulfilled,A.rejected)});let f,b=0,z;if(!m){const U=[Cs.bind(this),void 0];for(U.unshift(...c),U.push(...p),z=U.length,f=Promise.resolve(a);b<z;)f=f.then(U[b++],U[b++]);return f}z=c.length;let C=a;for(;b<z;){const U=c[b++],A=c[b++];try{C=U(C)}catch(w){A.call(this,w);break}}try{f=Cs.call(this,C)}catch(U){return Promise.reject(U)}for(b=0,z=p.length;b<z;)f=f.then(p[b++],p[b++]);return f}getUri(e){e=ye(this.defaults,e);const a=Rs(e.baseURL,e.url,e.allowAbsoluteUrls);return _s(a,e.params,e.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(e){_e.prototype[e]=function(a,r){return this.request(ye(r||{},{method:e,url:a,data:(r||{}).data}))}}),l.forEach(["post","put","patch","query"],function(e){function a(r){return function(i,u,c){return this.request(ye(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:u}))}}_e.prototype[e]=a(),e!=="query"&&(_e.prototype[e+"Form"]=a(!0))});let Xr=class _a{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(i){a=i});const r=this;this.promise.then(n=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](n);r._listeners=null}),this.promise.then=n=>{let i;const u=new Promise(c=>{r.subscribe(c),i=c}).then(n);return u.cancel=function(){r.unsubscribe(i)},u},e(function(i,u,c){r.reason||(r.reason=new De(i,u,c),a(r.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 a=this._listeners.indexOf(e);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const e=new AbortController,a=r=>{e.abort(r)};return this.subscribe(a),e.signal.unsubscribe=()=>this.unsubscribe(a),e.signal}static source(){let e;return{token:new _a(function(n){e=n}),cancel:e}}};function Gr(s){return function(a){return s.apply(null,a)}}function Yr(s){return l.isObject(s)&&s.isAxiosError===!0}const St={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(St).forEach(([s,e])=>{St[e]=s});function Fs(s){const e=new _e(s),a=ke(_e.prototype.request,e);return l.extend(a,_e.prototype,e,{allOwnKeys:!0}),l.extend(a,e,null,{allOwnKeys:!0}),a.create=function(n){return Fs(ye(s,n))},a}const $=Fs(qe);$.Axios=_e,$.CanceledError=De,$.CancelToken=Xr,$.isCancel=ws,$.VERSION=Tt,$.toFormData=Ge,$.AxiosError=R,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=Gr,$.isAxiosError=Yr,$.mergeConfig=ye,$.AxiosHeaders=H,$.formToJSON=s=>vs(l.isHTMLForm(s)?new FormData(s):s),$.getAdapter=js.getAdapter,$.HttpStatusCode=St,$.default=$;const{Axios:Po,AxiosError:Oo,CanceledError:So,isCancel:No,CancelToken:jo,VERSION:Co,all:Uo,Cancel:Fo,isAxiosError:Io,spread:qo,toFormData:Do,AxiosHeaders:Lo,HttpStatusCode:Bo,formToJSON:$o,getAdapter:Mo,mergeConfig:Vo,create:Zo}=$;var I;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function a(n){throw new Error}s.assertNever=a,s.arrayToEnum=n=>{const i={};for(const u of n)i[u]=u;return i},s.getValidEnumValues=n=>{const i=s.objectKeys(n).filter(c=>typeof n[n[c]]!="number"),u={};for(const c of i)u[c]=n[c];return s.objectValues(u)},s.objectValues=n=>s.objectKeys(n).map(function(i){return n[i]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const u in n)Object.prototype.hasOwnProperty.call(n,u)&&i.push(u);return i},s.find=(n,i)=>{for(const u of n)if(i(u))return u},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,i=" | "){return n.map(u=>typeof u=="string"?`'${u}'`:u).join(i)}s.joinValues=r,s.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(I||(I={}));var Is;(function(s){s.mergeShapes=(e,a)=>({...e,...a})})(Is||(Is={}));const k=I.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ue=s=>{switch(typeof s){case"undefined":return k.undefined;case"string":return k.string;case"number":return Number.isNaN(s)?k.nan:k.number;case"boolean":return k.boolean;case"function":return k.function;case"bigint":return k.bigint;case"symbol":return k.symbol;case"object":return Array.isArray(s)?k.array:s===null?k.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?k.promise:typeof Map<"u"&&s instanceof Map?k.map:typeof Set<"u"&&s instanceof Set?k.set:typeof Date<"u"&&s instanceof Date?k.date:k.object;default:return k.unknown}},_=I.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ne extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(i){return i.message},r={_errors:[]},n=i=>{for(const u of i.issues)if(u.code==="invalid_union")u.unionErrors.map(n);else if(u.code==="invalid_return_type")n(u.returnTypeError);else if(u.code==="invalid_arguments")n(u.argumentsError);else if(u.path.length===0)r._errors.push(a(u));else{let c=r,m=0;for(;m<u.path.length;){const p=u.path[m];m===u.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(a(u))):c[p]=c[p]||{_errors:[]},c=c[p],m++}}};return n(this),r}static assert(e){if(!(e instanceof ne))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,I.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a={},r=[];for(const n of this.issues)if(n.path.length>0){const i=n.path[0];a[i]=a[i]||[],a[i].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ne.create=s=>new ne(s);const Nt=(s,e)=>{let a;switch(s.code){case _.invalid_type:s.received===k.undefined?a="Required":a=`Expected ${s.expected}, received ${s.received}`;break;case _.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(s.expected,I.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:a=`Unrecognized key(s) in object: ${I.joinValues(s.keys,", ")}`;break;case _.invalid_union:a="Invalid input";break;case _.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${I.joinValues(s.options)}`;break;case _.invalid_enum_value:a=`Invalid enum value. Expected ${I.joinValues(s.options)}, received '${s.received}'`;break;case _.invalid_arguments:a="Invalid function arguments";break;case _.invalid_return_type:a="Invalid function return type";break;case _.invalid_date:a="Invalid date";break;case _.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(a=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?a=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?a=`Invalid input: must end with "${s.validation.endsWith}"`:I.assertNever(s.validation):s.validation!=="regex"?a=`Invalid ${s.validation}`:a="Invalid";break;case _.too_small:s.type==="array"?a=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?a=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?a=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?a=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?a=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:a="Invalid input";break;case _.too_big:s.type==="array"?a=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?a=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?a=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?a=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?a=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:a="Invalid input";break;case _.custom:a="Invalid input";break;case _.invalid_intersection_types:a="Intersection results could not be merged";break;case _.not_multiple_of:a=`Number must be a multiple of ${s.multipleOf}`;break;case _.not_finite:a="Number must be finite";break;default:a=e.defaultError,I.assertNever(s)}return{message:a}};let en=Nt;function tn(){return en}const sn=s=>{const{data:e,path:a,errorMaps:r,issueData:n}=s,i=[...a,...n.path||[]],u={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let c="";const m=r.filter(p=>!!p).slice().reverse();for(const p of m)c=p(u,{data:e,defaultError:c}).message;return{...n,path:i,message:c}};function x(s,e){const a=tn(),r=sn({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,a,a===Nt?void 0:Nt].filter(n=>!!n)});s.common.issues.push(r)}class W{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,a){const r=[];for(const n of a){if(n.status==="aborted")return S;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,a){const r=[];for(const n of a){const i=await n.key,u=await n.value;r.push({key:i,value:u})}return W.mergeObjectSync(e,r)}static mergeObjectSync(e,a){const r={};for(const n of a){const{key:i,value:u}=n;if(i.status==="aborted"||u.status==="aborted")return S;i.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof u.value<"u"||n.alwaysSet)&&(r[i.value]=u.value)}return{status:e.value,value:r}}}const S=Object.freeze({status:"aborted"}),Le=s=>({status:"dirty",value:s}),X=s=>({status:"valid",value:s}),qs=s=>s.status==="aborted",Ds=s=>s.status==="dirty",ze=s=>s.status==="valid",at=s=>typeof Promise<"u"&&s instanceof Promise;var E;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(E||(E={}));class te{constructor(e,a,r,n){this._cachedPath=[],this.parent=e,this.data=a,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ls=(s,e)=>{if(ze(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new ne(s.common.issues);return this._error=a,this._error}}};function j(s){if(!s)return{};const{errorMap:e,invalid_type_error:a,required_error:r,description:n}=s;if(e&&(a||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(u,c)=>{const{message:m}=s;return u.code==="invalid_enum_value"?{message:m??c.defaultError}:typeof c.data>"u"?{message:m??r??c.defaultError}:u.code!=="invalid_type"?{message:c.defaultError}:{message:m??a??c.defaultError}},description:n}}class F{get description(){return this._def.description}_getType(e){return ue(e.data)}_getOrReturnCtx(e,a){return a||{common:e.parent.common,data:e.data,parsedType:ue(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new W,ctx:{common:e.parent.common,data:e.data,parsedType:ue(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const a=this._parse(e);if(at(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(e){const a=this._parse(e);return Promise.resolve(a)}parse(e,a){const r=this.safeParse(e,a);if(r.success)return r.data;throw r.error}safeParse(e,a){const r={common:{issues:[],async:a?.async??!1,contextualErrorMap:a?.errorMap},path:a?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ue(e)},n=this._parseSync({data:e,path:r.path,parent:r});return Ls(r,n)}"~validate"(e){const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ue(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:a});return ze(r)?{value:r.value}:{issues:a.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:a}).then(r=>ze(r)?{value:r.value}:{issues:a.common.issues})}async parseAsync(e,a){const r=await this.safeParseAsync(e,a);if(r.success)return r.data;throw r.error}async safeParseAsync(e,a){const r={common:{issues:[],contextualErrorMap:a?.errorMap,async:!0},path:a?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ue(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(at(n)?n:Promise.resolve(n));return Ls(r,i)}refine(e,a){const r=n=>typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(n):a;return this._refinement((n,i)=>{const u=e(n),c=()=>i.addIssue({code:_.custom,...r(n)});return typeof Promise<"u"&&u instanceof Promise?u.then(m=>m?!0:(c(),!1)):u?!0:(c(),!1)})}refinement(e,a){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof a=="function"?a(r,n):a),!1))}_refinement(e){return new Se({schema:this,typeName:O.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:a=>this["~validate"](a)}}optional(){return de.create(this,this._def)}nullable(){return Ne.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return se.create(this)}promise(){return ut.create(this,this._def)}or(e){return nt.create([this,e],this._def)}and(e){return ot.create(this,e,this._def)}transform(e){return new Se({...j(this._def),schema:this,typeName:O.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const a=typeof e=="function"?e:()=>e;return new Dt({...j(this._def),innerType:this,defaultValue:a,typeName:O.ZodDefault})}brand(){return new En({typeName:O.ZodBranded,type:this,...j(this._def)})}catch(e){const a=typeof e=="function"?e:()=>e;return new Lt({...j(this._def),innerType:this,catchValue:a,typeName:O.ZodCatch})}describe(e){const a=this.constructor;return new a({...this._def,description:e})}pipe(e){return Bt.create(this,e)}readonly(){return $t.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const an=/^c[^\s-]{8,}$/i,rn=/^[0-9a-z]+$/,nn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,on=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,un=/^[a-z0-9_-]{21}$/i,cn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ln="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jt;const pn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,gn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_n=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Bs="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",bn=new RegExp(`^${Bs}$`);function $s(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const a=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${a}`}function vn(s){return new RegExp(`^${$s(s)}$`)}function wn(s){let e=`${Bs}T${$s(s)}`;const a=[];return a.push(s.local?"Z?":"Z"),s.offset&&a.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${a.join("|")})`,new RegExp(`^${e}$`)}function xn(s,e){return!!((e==="v4"||!e)&&pn.test(s)||(e==="v6"||!e)&&fn.test(s))}function kn(s,e){if(!cn.test(s))return!1;try{const[a]=s.split(".");if(!a)return!1;const r=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function An(s,e){return!!((e==="v4"||!e)&&mn.test(s)||(e==="v6"||!e)&&gn.test(s))}class oe extends F{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==k.string){const i=this._getOrReturnCtx(e);return x(i,{code:_.invalid_type,expected:k.string,received:i.parsedType}),S}const r=new W;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const u=e.data.length>i.value,c=e.data.length<i.value;(u||c)&&(n=this._getOrReturnCtx(e,n),u?x(n,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&x(n,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")hn.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"email",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")jt||(jt=new RegExp(ln,"u")),jt.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"emoji",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")on.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"uuid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")un.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"nanoid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")an.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"cuid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")rn.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"cuid2",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")nn.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"ulid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),x(n,{validation:"url",code:_.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"regex",code:_.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),x(n,{code:_.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),x(n,{code:_.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),x(n,{code:_.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?wn(i).test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:_.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?bn.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:_.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?vn(i).test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{code:_.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?dn.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"duration",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?xn(e.data,i.version)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"ip",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?kn(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"jwt",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?An(e.data,i.version)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"cidr",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?yn.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"base64",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?_n.test(e.data)||(n=this._getOrReturnCtx(e,n),x(n,{validation:"base64url",code:_.invalid_string,message:i.message}),r.dirty()):I.assertNever(i);return{status:r.value,value:e.data}}_regex(e,a,r){return this.refinement(n=>e.test(n),{validation:a,code:_.invalid_string,...E.errToObj(r)})}_addCheck(e){return new oe({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...E.errToObj(e)})}url(e){return this._addCheck({kind:"url",...E.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...E.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...E.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...E.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...E.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...E.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...E.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...E.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...E.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...E.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...E.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...E.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...E.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...E.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...E.errToObj(e)})}regex(e,a){return this._addCheck({kind:"regex",regex:e,...E.errToObj(a)})}includes(e,a){return this._addCheck({kind:"includes",value:e,position:a?.position,...E.errToObj(a?.message)})}startsWith(e,a){return this._addCheck({kind:"startsWith",value:e,...E.errToObj(a)})}endsWith(e,a){return this._addCheck({kind:"endsWith",value:e,...E.errToObj(a)})}min(e,a){return this._addCheck({kind:"min",value:e,...E.errToObj(a)})}max(e,a){return this._addCheck({kind:"max",value:e,...E.errToObj(a)})}length(e,a){return this._addCheck({kind:"length",value:e,...E.errToObj(a)})}nonempty(e){return this.min(1,E.errToObj(e))}trim(){return new oe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new oe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new oe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const a of this._def.checks)a.kind==="min"&&(e===null||a.value>e)&&(e=a.value);return e}get maxLength(){let e=null;for(const a of this._def.checks)a.kind==="max"&&(e===null||a.value<e)&&(e=a.value);return e}}oe.create=s=>new oe({checks:[],typeName:O.ZodString,coerce:s?.coerce??!1,...j(s)});function Rn(s,e){const a=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=a>r?a:r,i=Number.parseInt(s.toFixed(n).replace(".","")),u=Number.parseInt(e.toFixed(n).replace(".",""));return i%u/10**n}class Te extends F{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==k.number){const i=this._getOrReturnCtx(e);return x(i,{code:_.invalid_type,expected:k.number,received:i.parsedType}),S}let r;const n=new W;for(const i of this._def.checks)i.kind==="int"?I.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),x(r,{code:_.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),x(r,{code:_.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),x(r,{code:_.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Rn(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),x(r,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),x(r,{code:_.not_finite,message:i.message}),n.dirty()):I.assertNever(i);return{status:n.value,value:e.data}}gte(e,a){return this.setLimit("min",e,!0,E.toString(a))}gt(e,a){return this.setLimit("min",e,!1,E.toString(a))}lte(e,a){return this.setLimit("max",e,!0,E.toString(a))}lt(e,a){return this.setLimit("max",e,!1,E.toString(a))}setLimit(e,a,r,n){return new Te({...this._def,checks:[...this._def.checks,{kind:e,value:a,inclusive:r,message:E.toString(n)}]})}_addCheck(e){return new Te({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:E.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:E.toString(e)})}multipleOf(e,a){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(a)})}finite(e){return this._addCheck({kind:"finite",message:E.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:E.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:E.toString(e)})}get minValue(){let e=null;for(const a of this._def.checks)a.kind==="min"&&(e===null||a.value>e)&&(e=a.value);return e}get maxValue(){let e=null;for(const a of this._def.checks)a.kind==="max"&&(e===null||a.value<e)&&(e=a.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&I.isInteger(e.value))}get isFinite(){let e=null,a=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(a===null||r.value>a)&&(a=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(a)&&Number.isFinite(e)}}Te.create=s=>new Te({checks:[],typeName:O.ZodNumber,coerce:s?.coerce||!1,...j(s)});class Be extends F{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==k.bigint)return this._getInvalidInput(e);let r;const n=new W;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),x(r,{code:_.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),x(r,{code:_.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),x(r,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):I.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const a=this._getOrReturnCtx(e);return x(a,{code:_.invalid_type,expected:k.bigint,received:a.parsedType}),S}gte(e,a){return this.setLimit("min",e,!0,E.toString(a))}gt(e,a){return this.setLimit("min",e,!1,E.toString(a))}lte(e,a){return this.setLimit("max",e,!0,E.toString(a))}lt(e,a){return this.setLimit("max",e,!1,E.toString(a))}setLimit(e,a,r,n){return new Be({...this._def,checks:[...this._def.checks,{kind:e,value:a,inclusive:r,message:E.toString(n)}]})}_addCheck(e){return new Be({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:E.toString(e)})}multipleOf(e,a){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(a)})}get minValue(){let e=null;for(const a of this._def.checks)a.kind==="min"&&(e===null||a.value>e)&&(e=a.value);return e}get maxValue(){let e=null;for(const a of this._def.checks)a.kind==="max"&&(e===null||a.value<e)&&(e=a.value);return e}}Be.create=s=>new Be({checks:[],typeName:O.ZodBigInt,coerce:s?.coerce??!1,...j(s)});class Ct extends F{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==k.boolean){const r=this._getOrReturnCtx(e);return x(r,{code:_.invalid_type,expected:k.boolean,received:r.parsedType}),S}return X(e.data)}}Ct.create=s=>new Ct({typeName:O.ZodBoolean,coerce:s?.coerce||!1,...j(s)});class rt extends F{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==k.date){const i=this._getOrReturnCtx(e);return x(i,{code:_.invalid_type,expected:k.date,received:i.parsedType}),S}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return x(i,{code:_.invalid_date}),S}const r=new W;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:_.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),x(n,{code:_.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):I.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new rt({...this._def,checks:[...this._def.checks,e]})}min(e,a){return this._addCheck({kind:"min",value:e.getTime(),message:E.toString(a)})}max(e,a){return this._addCheck({kind:"max",value:e.getTime(),message:E.toString(a)})}get minDate(){let e=null;for(const a of this._def.checks)a.kind==="min"&&(e===null||a.value>e)&&(e=a.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const a of this._def.checks)a.kind==="max"&&(e===null||a.value<e)&&(e=a.value);return e!=null?new Date(e):null}}rt.create=s=>new rt({checks:[],coerce:s?.coerce||!1,typeName:O.ZodDate,...j(s)});class Ms extends F{_parse(e){if(this._getType(e)!==k.symbol){const r=this._getOrReturnCtx(e);return x(r,{code:_.invalid_type,expected:k.symbol,received:r.parsedType}),S}return X(e.data)}}Ms.create=s=>new Ms({typeName:O.ZodSymbol,...j(s)});class Vs extends F{_parse(e){if(this._getType(e)!==k.undefined){const r=this._getOrReturnCtx(e);return x(r,{code:_.invalid_type,expected:k.undefined,received:r.parsedType}),S}return X(e.data)}}Vs.create=s=>new Vs({typeName:O.ZodUndefined,...j(s)});class Ut extends F{_parse(e){if(this._getType(e)!==k.null){const r=this._getOrReturnCtx(e);return x(r,{code:_.invalid_type,expected:k.null,received:r.parsedType}),S}return X(e.data)}}Ut.create=s=>new Ut({typeName:O.ZodNull,...j(s)});class Zs extends F{constructor(){super(...arguments),this._any=!0}_parse(e){return X(e.data)}}Zs.create=s=>new Zs({typeName:O.ZodAny,...j(s)});class Qs extends F{constructor(){super(...arguments),this._unknown=!0}_parse(e){return X(e.data)}}Qs.create=s=>new Qs({typeName:O.ZodUnknown,...j(s)});class ce extends F{_parse(e){const a=this._getOrReturnCtx(e);return x(a,{code:_.invalid_type,expected:k.never,received:a.parsedType}),S}}ce.create=s=>new ce({typeName:O.ZodNever,...j(s)});class Ft extends F{_parse(e){if(this._getType(e)!==k.undefined){const r=this._getOrReturnCtx(e);return x(r,{code:_.invalid_type,expected:k.void,received:r.parsedType}),S}return X(e.data)}}Ft.create=s=>new Ft({typeName:O.ZodVoid,...j(s)});class se extends F{_parse(e){const{ctx:a,status:r}=this._processInputParams(e),n=this._def;if(a.parsedType!==k.array)return x(a,{code:_.invalid_type,expected:k.array,received:a.parsedType}),S;if(n.exactLength!==null){const u=a.data.length>n.exactLength.value,c=a.data.length<n.exactLength.value;(u||c)&&(x(a,{code:u?_.too_big:_.too_small,minimum:c?n.exactLength.value:void 0,maximum:u?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&a.data.length<n.minLength.value&&(x(a,{code:_.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&a.data.length>n.maxLength.value&&(x(a,{code:_.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),a.common.async)return Promise.all([...a.data].map((u,c)=>n.type._parseAsync(new te(a,u,a.path,c)))).then(u=>W.mergeArray(r,u));const i=[...a.data].map((u,c)=>n.type._parseSync(new te(a,u,a.path,c)));return W.mergeArray(r,i)}get element(){return this._def.type}min(e,a){return new se({...this._def,minLength:{value:e,message:E.toString(a)}})}max(e,a){return new se({...this._def,maxLength:{value:e,message:E.toString(a)}})}length(e,a){return new se({...this._def,exactLength:{value:e,message:E.toString(a)}})}nonempty(e){return this.min(1,e)}}se.create=(s,e)=>new se({type:s,minLength:null,maxLength:null,exactLength:null,typeName:O.ZodArray,...j(e)});function Pe(s){if(s instanceof V){const e={};for(const a in s.shape){const r=s.shape[a];e[a]=de.create(Pe(r))}return new V({...s._def,shape:()=>e})}else return s instanceof se?new se({...s._def,type:Pe(s.element)}):s instanceof de?de.create(Pe(s.unwrap())):s instanceof Ne?Ne.create(Pe(s.unwrap())):s instanceof be?be.create(s.items.map(e=>Pe(e))):s}class V extends F{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),a=I.objectKeys(e);return this._cached={shape:e,keys:a},this._cached}_parse(e){if(this._getType(e)!==k.object){const p=this._getOrReturnCtx(e);return x(p,{code:_.invalid_type,expected:k.object,received:p.parsedType}),S}const{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:u}=this._getCached(),c=[];if(!(this._def.catchall instanceof ce&&this._def.unknownKeys==="strip"))for(const p in n.data)u.includes(p)||c.push(p);const m=[];for(const p of u){const f=i[p],b=n.data[p];m.push({key:{status:"valid",value:p},value:f._parse(new te(n,b,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof ce){const p=this._def.unknownKeys;if(p==="passthrough")for(const f of c)m.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(p==="strict")c.length>0&&(x(n,{code:_.unrecognized_keys,keys:c}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const f of c){const b=n.data[f];m.push({key:{status:"valid",value:f},value:p._parse(new te(n,b,n.path,f)),alwaysSet:f in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const f of m){const b=await f.key,z=await f.value;p.push({key:b,value:z,alwaysSet:f.alwaysSet})}return p}).then(p=>W.mergeObjectSync(r,p)):W.mergeObjectSync(r,m)}get shape(){return this._def.shape()}strict(e){return E.errToObj,new V({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(a,r)=>{const n=this._def.errorMap?.(a,r).message??r.defaultError;return a.code==="unrecognized_keys"?{message:E.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new V({...this._def,unknownKeys:"strip"})}passthrough(){return new V({...this._def,unknownKeys:"passthrough"})}extend(e){return new V({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new V({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:O.ZodObject})}setKey(e,a){return this.augment({[e]:a})}catchall(e){return new V({...this._def,catchall:e})}pick(e){const a={};for(const r of I.objectKeys(e))e[r]&&this.shape[r]&&(a[r]=this.shape[r]);return new V({...this._def,shape:()=>a})}omit(e){const a={};for(const r of I.objectKeys(this.shape))e[r]||(a[r]=this.shape[r]);return new V({...this._def,shape:()=>a})}deepPartial(){return Pe(this)}partial(e){const a={};for(const r of I.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?a[r]=n:a[r]=n.optional()}return new V({...this._def,shape:()=>a})}required(e){const a={};for(const r of I.objectKeys(this.shape))if(e&&!e[r])a[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof de;)i=i._def.innerType;a[r]=i}return new V({...this._def,shape:()=>a})}keyof(){return Js(I.objectKeys(this.shape))}}V.create=(s,e)=>new V({shape:()=>s,unknownKeys:"strip",catchall:ce.create(),typeName:O.ZodObject,...j(e)}),V.strictCreate=(s,e)=>new V({shape:()=>s,unknownKeys:"strict",catchall:ce.create(),typeName:O.ZodObject,...j(e)}),V.lazycreate=(s,e)=>new V({shape:s,unknownKeys:"strip",catchall:ce.create(),typeName:O.ZodObject,...j(e)});class nt extends F{_parse(e){const{ctx:a}=this._processInputParams(e),r=this._def.options;function n(i){for(const c of i)if(c.result.status==="valid")return c.result;for(const c of i)if(c.result.status==="dirty")return a.common.issues.push(...c.ctx.common.issues),c.result;const u=i.map(c=>new ne(c.ctx.common.issues));return x(a,{code:_.invalid_union,unionErrors:u}),S}if(a.common.async)return Promise.all(r.map(async i=>{const u={...a,common:{...a.common,issues:[]},parent:null};return{result:await i._parseAsync({data:a.data,path:a.path,parent:u}),ctx:u}})).then(n);{let i;const u=[];for(const m of r){const p={...a,common:{...a.common,issues:[]},parent:null},f=m._parseSync({data:a.data,path:a.path,parent:p});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:p}),p.common.issues.length&&u.push(p.common.issues)}if(i)return a.common.issues.push(...i.ctx.common.issues),i.result;const c=u.map(m=>new ne(m));return x(a,{code:_.invalid_union,unionErrors:c}),S}}get options(){return this._def.options}}nt.create=(s,e)=>new nt({options:s,typeName:O.ZodUnion,...j(e)});function It(s,e){const a=ue(s),r=ue(e);if(s===e)return{valid:!0,data:s};if(a===k.object&&r===k.object){const n=I.objectKeys(e),i=I.objectKeys(s).filter(c=>n.indexOf(c)!==-1),u={...s,...e};for(const c of i){const m=It(s[c],e[c]);if(!m.valid)return{valid:!1};u[c]=m.data}return{valid:!0,data:u}}else if(a===k.array&&r===k.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<s.length;i++){const u=s[i],c=e[i],m=It(u,c);if(!m.valid)return{valid:!1};n.push(m.data)}return{valid:!0,data:n}}else return a===k.date&&r===k.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class ot extends F{_parse(e){const{status:a,ctx:r}=this._processInputParams(e),n=(i,u)=>{if(qs(i)||qs(u))return S;const c=It(i.value,u.value);return c.valid?((Ds(i)||Ds(u))&&a.dirty(),{status:a.value,value:c.data}):(x(r,{code:_.invalid_intersection_types}),S)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,u])=>n(i,u)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ot.create=(s,e,a)=>new ot({left:s,right:e,typeName:O.ZodIntersection,...j(a)});class be extends F{_parse(e){const{status:a,ctx:r}=this._processInputParams(e);if(r.parsedType!==k.array)return x(r,{code:_.invalid_type,expected:k.array,received:r.parsedType}),S;if(r.data.length<this._def.items.length)return x(r,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),S;!this._def.rest&&r.data.length>this._def.items.length&&(x(r,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const i=[...r.data].map((u,c)=>{const m=this._def.items[c]||this._def.rest;return m?m._parse(new te(r,u,r.path,c)):null}).filter(u=>!!u);return r.common.async?Promise.all(i).then(u=>W.mergeArray(a,u)):W.mergeArray(a,i)}get items(){return this._def.items}rest(e){return new be({...this._def,rest:e})}}be.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new be({items:s,typeName:O.ZodTuple,rest:null,...j(e)})};class it extends F{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:a,ctx:r}=this._processInputParams(e);if(r.parsedType!==k.object)return x(r,{code:_.invalid_type,expected:k.object,received:r.parsedType}),S;const n=[],i=this._def.keyType,u=this._def.valueType;for(const c in r.data)n.push({key:i._parse(new te(r,c,r.path,c)),value:u._parse(new te(r,r.data[c],r.path,c)),alwaysSet:c in r.data});return r.common.async?W.mergeObjectAsync(a,n):W.mergeObjectSync(a,n)}get element(){return this._def.valueType}static create(e,a,r){return a instanceof F?new it({keyType:e,valueType:a,typeName:O.ZodRecord,...j(r)}):new it({keyType:oe.create(),valueType:e,typeName:O.ZodRecord,...j(a)})}}class Hs extends F{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:a,ctx:r}=this._processInputParams(e);if(r.parsedType!==k.map)return x(r,{code:_.invalid_type,expected:k.map,received:r.parsedType}),S;const n=this._def.keyType,i=this._def.valueType,u=[...r.data.entries()].map(([c,m],p)=>({key:n._parse(new te(r,c,r.path,[p,"key"])),value:i._parse(new te(r,m,r.path,[p,"value"]))}));if(r.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const m of u){const p=await m.key,f=await m.value;if(p.status==="aborted"||f.status==="aborted")return S;(p.status==="dirty"||f.status==="dirty")&&a.dirty(),c.set(p.value,f.value)}return{status:a.value,value:c}})}else{const c=new Map;for(const m of u){const p=m.key,f=m.value;if(p.status==="aborted"||f.status==="aborted")return S;(p.status==="dirty"||f.status==="dirty")&&a.dirty(),c.set(p.value,f.value)}return{status:a.value,value:c}}}}Hs.create=(s,e,a)=>new Hs({valueType:e,keyType:s,typeName:O.ZodMap,...j(a)});class $e extends F{_parse(e){const{status:a,ctx:r}=this._processInputParams(e);if(r.parsedType!==k.set)return x(r,{code:_.invalid_type,expected:k.set,received:r.parsedType}),S;const n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(x(r,{code:_.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),a.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(x(r,{code:_.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),a.dirty());const i=this._def.valueType;function u(m){const p=new Set;for(const f of m){if(f.status==="aborted")return S;f.status==="dirty"&&a.dirty(),p.add(f.value)}return{status:a.value,value:p}}const c=[...r.data.values()].map((m,p)=>i._parse(new te(r,m,r.path,p)));return r.common.async?Promise.all(c).then(m=>u(m)):u(c)}min(e,a){return new $e({...this._def,minSize:{value:e,message:E.toString(a)}})}max(e,a){return new $e({...this._def,maxSize:{value:e,message:E.toString(a)}})}size(e,a){return this.min(e,a).max(e,a)}nonempty(e){return this.min(1,e)}}$e.create=(s,e)=>new $e({valueType:s,minSize:null,maxSize:null,typeName:O.ZodSet,...j(e)});class Ws extends F{get schema(){return this._def.getter()}_parse(e){const{ctx:a}=this._processInputParams(e);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Ws.create=(s,e)=>new Ws({getter:s,typeName:O.ZodLazy,...j(e)});class qt extends F{_parse(e){if(e.data!==this._def.value){const a=this._getOrReturnCtx(e);return x(a,{received:a.data,code:_.invalid_literal,expected:this._def.value}),S}return{status:"valid",value:e.data}}get value(){return this._def.value}}qt.create=(s,e)=>new qt({value:s,typeName:O.ZodLiteral,...j(e)});function Js(s,e){return new Oe({values:s,typeName:O.ZodEnum,...j(e)})}class Oe extends F{_parse(e){if(typeof e.data!="string"){const a=this._getOrReturnCtx(e),r=this._def.values;return x(a,{expected:I.joinValues(r),received:a.parsedType,code:_.invalid_type}),S}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const a=this._getOrReturnCtx(e),r=this._def.values;return x(a,{received:a.data,code:_.invalid_enum_value,options:r}),S}return X(e.data)}get options(){return this._def.values}get enum(){const e={};for(const a of this._def.values)e[a]=a;return e}get Values(){const e={};for(const a of this._def.values)e[a]=a;return e}get Enum(){const e={};for(const a of this._def.values)e[a]=a;return e}extract(e,a=this._def){return Oe.create(e,{...this._def,...a})}exclude(e,a=this._def){return Oe.create(this.options.filter(r=>!e.includes(r)),{...this._def,...a})}}Oe.create=Js;class Ks extends F{_parse(e){const a=I.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==k.string&&r.parsedType!==k.number){const n=I.objectValues(a);return x(r,{expected:I.joinValues(n),received:r.parsedType,code:_.invalid_type}),S}if(this._cache||(this._cache=new Set(I.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=I.objectValues(a);return x(r,{received:r.data,code:_.invalid_enum_value,options:n}),S}return X(e.data)}get enum(){return this._def.values}}Ks.create=(s,e)=>new Ks({values:s,typeName:O.ZodNativeEnum,...j(e)});class ut extends F{unwrap(){return this._def.type}_parse(e){const{ctx:a}=this._processInputParams(e);if(a.parsedType!==k.promise&&a.common.async===!1)return x(a,{code:_.invalid_type,expected:k.promise,received:a.parsedType}),S;const r=a.parsedType===k.promise?a.data:Promise.resolve(a.data);return X(r.then(n=>this._def.type.parseAsync(n,{path:a.path,errorMap:a.common.contextualErrorMap})))}}ut.create=(s,e)=>new ut({type:s,typeName:O.ZodPromise,...j(e)});class Se extends F{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===O.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:a,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:u=>{x(r,u),u.fatal?a.abort():a.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const u=n.transform(r.data,i);if(r.common.async)return Promise.resolve(u).then(async c=>{if(a.value==="aborted")return S;const m=await this._def.schema._parseAsync({data:c,path:r.path,parent:r});return m.status==="aborted"?S:m.status==="dirty"||a.value==="dirty"?Le(m.value):m});{if(a.value==="aborted")return S;const c=this._def.schema._parseSync({data:u,path:r.path,parent:r});return c.status==="aborted"?S:c.status==="dirty"||a.value==="dirty"?Le(c.value):c}}if(n.type==="refinement"){const u=c=>{const m=n.refinement(c,i);if(r.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?S:(c.status==="dirty"&&a.dirty(),u(c.value),{status:a.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?S:(c.status==="dirty"&&a.dirty(),u(c.value).then(()=>({status:a.value,value:c.value}))))}if(n.type==="transform")if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ze(u))return S;const c=n.transform(u.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>ze(u)?Promise.resolve(n.transform(u.value,i)).then(c=>({status:a.value,value:c})):S);I.assertNever(n)}}Se.create=(s,e,a)=>new Se({schema:s,typeName:O.ZodEffects,effect:e,...j(a)}),Se.createWithPreprocess=(s,e,a)=>new Se({schema:e,effect:{type:"preprocess",transform:s},typeName:O.ZodEffects,...j(a)});class de extends F{_parse(e){return this._getType(e)===k.undefined?X(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}de.create=(s,e)=>new de({innerType:s,typeName:O.ZodOptional,...j(e)});class Ne extends F{_parse(e){return this._getType(e)===k.null?X(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ne.create=(s,e)=>new Ne({innerType:s,typeName:O.ZodNullable,...j(e)});class Dt extends F{_parse(e){const{ctx:a}=this._processInputParams(e);let r=a.data;return a.parsedType===k.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}Dt.create=(s,e)=>new Dt({innerType:s,typeName:O.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});class Lt extends F{_parse(e){const{ctx:a}=this._processInputParams(e),r={...a,common:{...a.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return at(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ne(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ne(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Lt.create=(s,e)=>new Lt({innerType:s,typeName:O.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});class Xs extends F{_parse(e){if(this._getType(e)!==k.nan){const r=this._getOrReturnCtx(e);return x(r,{code:_.invalid_type,expected:k.nan,received:r.parsedType}),S}return{status:"valid",value:e.data}}}Xs.create=s=>new Xs({typeName:O.ZodNaN,...j(s)});class En extends F{_parse(e){const{ctx:a}=this._processInputParams(e),r=a.data;return this._def.type._parse({data:r,path:a.path,parent:a})}unwrap(){return this._def.type}}class Bt extends F{_parse(e){const{status:a,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?S:i.status==="dirty"?(a.dirty(),Le(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?S:n.status==="dirty"?(a.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,a){return new Bt({in:e,out:a,typeName:O.ZodPipeline})}}class $t extends F{_parse(e){const a=this._def.innerType._parse(e),r=n=>(ze(n)&&(n.value=Object.freeze(n.value)),n);return at(a)?a.then(n=>r(n)):r(a)}unwrap(){return this._def.innerType}}$t.create=(s,e)=>new $t({innerType:s,typeName:O.ZodReadonly,...j(e)});var O;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(O||(O={}));const t=oe.create,g=Te.create,v=Ct.create,d=Ut.create;ce.create;const M=Ft.create,y=se.create,o=V.create,h=nt.create;ot.create,be.create;const N=it.create,zn=qt.create,P=Oe.create;ut.create,de.create,Ne.create;function Tn(s,e){let a={...s};for(let r of e)delete a[r];return a}var Pn=/:([a-zA-Z_][a-zA-Z0-9_]*)/g;function On(s){let e=s.url,a=s.params;return a&&(e=e.replace(Pn,(r,n)=>n in a?`${a[n]}`:r)),e}function Gs(s,e,a){return s.find(r=>r.method===e&&r.path===a)}function Sn(s){let e=new FormData;for(let a in s)e.append(a,s[a]);return{data:e}}var ct=class extends Error{constructor(s,e,a,r){super(s),this.config=e,this.data=a,this.cause=r}},Nn={name:"form-data",request:async(s,e)=>{if(typeof e.data!="object"||Array.isArray(e.data))throw new ct("Zodios: multipart/form-data body must be an object",e);let a=Sn(e.data);return{...e,data:a.data,headers:{...e.headers,...a.headers}}}};function jn(){return Nn}var Cn={name:"form-url",request:async(s,e)=>{if(typeof e.data!="object"||Array.isArray(e.data))throw new ct("Zodios: application/x-www-form-urlencoded body must be an object",e);return{...e,data:new URLSearchParams(e.data).toString(),headers:{...e.headers,"Content-Type":"application/x-www-form-urlencoded"}}}};function Un(){return Cn}function Ys(s,e){return{request:async(a,r)=>({...r,headers:{...r.headers,[s]:e}})}}function ea(s){return[!0,"response","all"].includes(s)}function ta(s){return[!0,"request","all"].includes(s)}function Fn({validate:s,transform:e,sendDefaults:a}){return{name:"zod-validation",request:ta(s)?async(r,n)=>{let i=Gs(r,n.method,n.url);if(!i)throw new Error(`No endpoint found for ${n.method} ${n.url}`);let{parameters:u}=i;if(!u)return n;let c={...n,queries:{...n.queries},headers:{...n.headers},params:{...n.params}},m={Query:b=>{var z;return(z=c.queries)==null?void 0:z[b]},Body:b=>c.data,Header:b=>{var z;return(z=c.headers)==null?void 0:z[b]},Path:b=>{var z;return(z=c.params)==null?void 0:z[b]}},p={Query:(b,z)=>c.queries[b]=z,Body:(b,z)=>c.data=z,Header:(b,z)=>c.headers[b]=z,Path:(b,z)=>c.params[b]=z},f=ta(e);for(let b of u){let{name:z,schema:C,type:U}=b,A=m[U](z);if(a||A!==void 0){let w=await C.safeParseAsync(A);if(!w.success)throw new ct(`Zodios: Invalid ${U} parameter '${z}'`,n,A,w.error);f&&p[U](z,w.data)}}return c}:void 0,response:ea(s)?async(r,n,i)=>{var u,c,m,p;let f=Gs(r,n.method,n.url);if(!f)throw new Error(`No endpoint found for ${n.method} ${n.url}`);if((c=(u=i.headers)==null?void 0:u["content-type"])!=null&&c.includes("application/json")||(p=(m=i.headers)==null?void 0:m["content-type"])!=null&&p.includes("application/vnd.api+json")){let b=await f.response.safeParseAsync(i.data);if(!b.success)throw new ct(`Zodios: Invalid response from endpoint '${f.method} ${f.path}'
7
10
  status: ${i.status} ${i.statusText}
8
11
  cause:
9
- ${m.error.message}
12
+ ${b.error.message}
10
13
  received:
11
- ${JSON.stringify(i.data,null,2)}`,a,i.data,m.error);$s(t)&&(i.data=m.data)}return i}:void 0}}var Qs=class{constructor(s,t){this.plugins=[],this.key=`${s}-${t}`}indexOf(s){return this.plugins.findIndex(t=>(t==null?void 0:t.name)===s)}use(s){if(s.name){let t=this.indexOf(s.name);if(t!==-1)return this.plugins[t]=s,{key:this.key,value:t}}return this.plugins.push(s),{key:this.key,value:this.plugins.length-1}}eject(s){if(typeof s=="string"){let t=this.indexOf(s);if(t===-1)throw new Error(`Plugin with name '${s}' not found`);this.plugins[t]=void 0}else{if(s.key!==this.key)throw new Error(`Plugin with key '${s.key}' is not registered for endpoint '${this.key}'`);this.plugins[s.value]=void 0}}async interceptRequest(s,t){let r=t;for(let n of this.plugins)n!=null&&n.request&&(r=await n.request(s,r));return r}async interceptResponse(s,t,r){let n=r;for(let a=this.plugins.length-1;a>=0;a--){let i=this.plugins[a];i&&(n=n.then(i!=null&&i.response?o=>i.response(s,t,o):void 0,i!=null&&i.error?o=>i.error(s,t,o):void 0))}return n}count(){return this.plugins.reduce((s,t)=>t?s+1:s,0)}};function Hs(s){let t=new Set;for(let n of s){let a=`${n.method} ${n.path}`;if(t.has(a))throw new Error(`Zodios: Duplicate path '${a}'`);t.add(a)}let r=new Set;for(let n of s)if(n.alias){if(r.has(n.alias))throw new Error(`Zodios: Duplicate alias '${n.alias}'`);r.add(n.alias)}for(let n of s)if(n.parameters&&n.parameters.filter(a=>a.type==="Body").length>1)throw new Error(`Zodios: Multiple body parameters in endpoint '${n.path}'`)}function Na(s){return Hs(s),s}var Oa=class{constructor(s,t,r){this.endpointPlugins=new Map;let n;if(!s)throw Array.isArray(t)?new Error("Zodios: missing base url"):new Error("Zodios: missing api description");let a;if(typeof s=="string"&&Array.isArray(t))a=s,this.api=t,n=r||{};else if(Array.isArray(s)&&!Array.isArray(t))this.api=s,n=t||{};else throw new Error("Zodios: api must be an array");Hs(this.api),this.options={validate:!0,transform:!0,sendDefaults:!1,...n},this.options.axiosInstance?this.axiosInstance=this.options.axiosInstance:this.axiosInstance=S.create({...this.options.axiosConfig}),a&&(this.axiosInstance.defaults.baseURL=a),this.injectAliasEndpoints(),this.initPlugins(),[!0,"all","request","response"].includes(this.options.validate)&&this.use(Sa(this.options))}initPlugins(){this.endpointPlugins.set("any-any",new Qs("any","any")),this.api.forEach(s=>{let t=new Qs(s.method,s.path);switch(s.requestFormat){case"binary":t.use(Ls("Content-Type","application/octet-stream"));break;case"form-data":t.use(Aa());break;case"form-url":t.use(Pa());break;case"text":t.use(Ls("Content-Type","text/plain"));break}this.endpointPlugins.set(`${s.method}-${s.path}`,t)})}getAnyEndpointPlugins(){return this.endpointPlugins.get("any-any")}findAliasEndpointPlugins(s){let t=this.api.find(r=>r.alias===s);if(t)return this.endpointPlugins.get(`${t.method}-${t.path}`)}findEnpointPlugins(s,t){return this.endpointPlugins.get(`${s}-${t}`)}get baseURL(){return this.axiosInstance.defaults.baseURL}get axios(){return this.axiosInstance}use(...s){if(typeof s[0]=="object")return this.getAnyEndpointPlugins().use(s[0]);if(typeof s[0]=="string"&&typeof s[1]=="object"){let t=this.findAliasEndpointPlugins(s[0]);if(!t)throw new Error(`Zodios: no alias '${s[0]}' found to register plugin`);return t.use(s[1])}else if(typeof s[0]=="string"&&typeof s[1]=="string"&&typeof s[2]=="object"){let t=this.findEnpointPlugins(s[0],s[1]);if(!t)throw new Error(`Zodios: no endpoint '${s[0]} ${s[1]}' found to register plugin`);return t.use(s[2])}throw new Error("Zodios: invalid plugin registration")}eject(s){var t;if(typeof s=="string"){this.getAnyEndpointPlugins().eject(s);return}(t=this.endpointPlugins.get(s.key))==null||t.eject(s)}injectAliasEndpoints(){this.api.forEach(s=>{s.alias&&(["post","put","patch","delete"].includes(s.method)?this[s.alias]=(t,r)=>this.request({...r,method:s.method,url:s.path,data:t}):this[s.alias]=t=>this.request({...t,method:s.method,url:s.path}))})}async request(s){let t=s,r=this.getAnyEndpointPlugins(),n=this.findEnpointPlugins(t.method,t.url);t=await r.interceptRequest(this.api,t),n&&(t=await n.interceptRequest(this.api,t));let a=this.axiosInstance.request({...xa(t,["params","queries"]),url:Ta(t),params:t.queries});return n&&(a=n.interceptResponse(this.api,t,a)),a=r.interceptResponse(this.api,t,a),(await a).data}async get(s,...[t]){return this.request({...t,method:"get",url:s})}async post(s,t,...[r]){return this.request({...r,method:"post",url:s,data:t})}async put(s,t,...[r]){return this.request({...r,method:"put",url:s,data:t})}async patch(s,t,...[r]){return this.request({...r,method:"patch",url:s,data:t})}async delete(s,t,...[r]){return this.request({...r,method:"delete",url:s,data:t})}},Ws=Oa;const Ca=e.object({id:e.string(),name:e.string(),revoked:e.boolean(),scopes:e.array(e.string()),created_at:e.string(),expires_at:e.union([e.string(),e.null()])}).passthrough(),Ia=e.array(Ca);e.object({name:e.string().min(1).max(255)}).passthrough();const Ua=e.object({id:e.string(),name:e.string(),revoked:e.boolean(),scopes:e.array(e.string()),created_at:e.string(),expires_at:e.union([e.string(),e.null()]),access_token:e.string()}).passthrough(),Ct=e.object({id:e.string(),name:e.string(),is_archived:e.boolean(),created_at:e.string(),updated_at:e.string()}).passthrough(),qa=e.array(Ct);e.object({name:e.string().min(1).max(255)}).passthrough();const Fa=e.object({name:e.string().min(1).max(255),is_archived:e.boolean().optional()}).passthrough(),Za=e.object({type:e.string(),data:e.string()}).passthrough(),Da=e.object({id:e.string(),email:e.string(),role:e.string()}).passthrough(),Ba=e.object({email:e.string().email(),role:e.enum(["admin","manager","employee"])}).passthrough(),Ma=e.object({id:e.string(),organization_id:e.string(),reference:e.string(),seller_name:e.string(),buyer_name:e.string(),status:e.string(),date:e.string(),due_at:e.string(),paid_date:e.string(),created_at:e.union([e.string(),e.null()]),updated_at:e.union([e.string(),e.null()])}).passthrough(),La=e.array(Ma),Js=e.enum(["percentage","fixed"]),$a=e.object({due_at:e.union([e.string(),e.null()]).optional(),paid_date:e.union([e.string(),e.null()]).optional(),seller_name:e.string(),seller_vatin:e.union([e.string(),e.null()]).optional(),seller_address_line_1:e.union([e.string(),e.null()]).optional(),seller_address_line_2:e.union([e.string(),e.null()]).optional(),seller_address_line_3:e.union([e.string(),e.null()]).optional(),seller_address_post_code:e.union([e.string(),e.null()]).optional(),seller_address_city:e.union([e.string(),e.null()]).optional(),seller_address_country:e.union([e.string(),e.null()]).optional(),seller_phone:e.union([e.string(),e.null()]).optional(),seller_email:e.union([e.string(),e.null()]).optional(),buyer_name:e.string(),buyer_vatin:e.union([e.string(),e.null()]).optional(),buyer_address_line_1:e.union([e.string(),e.null()]).optional(),buyer_address_line_2:e.union([e.string(),e.null()]).optional(),buyer_address_line_3:e.union([e.string(),e.null()]).optional(),buyer_address_post_code:e.union([e.string(),e.null()]).optional(),buyer_address_city:e.union([e.string(),e.null()]).optional(),buyer_address_country:e.union([e.string(),e.null()]).optional(),buyer_phone:e.union([e.string(),e.null()]).optional(),buyer_email:e.union([e.string(),e.null()]).optional(),date:e.string(),billing_period_start:e.union([e.string(),e.null()]).optional(),billing_period_end:e.union([e.string(),e.null()]).optional(),reference:e.string(),currency:e.string(),payment_iban:e.union([e.string(),e.null()]).optional(),tax_rate:e.number().int().gte(0).lte(2147483647).optional(),discount_amount:e.number().int().gte(0).lte(9223372036854776e3).optional(),discount_type:Js.optional(),footer:e.union([e.string(),e.null()]).optional(),notes:e.union([e.string(),e.null()]).optional(),payment_terms:e.union([e.string(),e.null()]).optional(),is_eu_reverse_charge:e.boolean().optional(),entries:e.array(e.object({name:e.string(),description:e.union([e.string(),e.null()]).optional(),unit_price:e.number().int().gte(0).lte(9223372036854776e3),quantity:e.number().gte(0).lte(99999999)}).passthrough()).optional()}).passthrough(),Va=e.object({id:e.string(),invoice_id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),unit_price:e.number().int(),quantity:e.number(),order_index:e.number().int(),created_at:e.union([e.string(),e.null()]),updated_at:e.union([e.string(),e.null()])}).passthrough(),It=e.object({id:e.string(),organization_id:e.string(),reference:e.string(),seller_name:e.string(),seller_vatin:e.string(),seller_address_line_1:e.string(),seller_address_line_2:e.string(),seller_address_line_3:e.string(),seller_address_post_code:e.string(),seller_address_city:e.string(),seller_address_country:e.string(),seller_phone:e.string(),seller_email:e.string(),buyer_name:e.string(),buyer_vatin:e.string(),buyer_address_line_1:e.string(),buyer_address_line_2:e.string(),buyer_address_line_3:e.string(),buyer_address_post_code:e.string(),buyer_address_city:e.string(),buyer_address_country:e.string(),buyer_phone:e.string(),buyer_email:e.string(),paid_date:e.string(),due_at:e.string(),discount_type:e.string(),discount_amount:e.number().int(),tax_rate:e.number().int(),payment_iban:e.string(),status:e.string(),currency:e.string(),date:e.string(),footer:e.string(),notes:e.string(),payment_terms:e.string(),is_eu_reverse_charge:e.string(),billing_period_start:e.string(),billing_period_end:e.string(),created_at:e.union([e.string(),e.null()]),updated_at:e.union([e.string(),e.null()]),entries:e.array(Va)}).passthrough(),Qa=e.enum(["draft","sent","cancelled"]),Ha=e.object({status:Qa,due_at:e.union([e.string(),e.null()]),paid_date:e.union([e.string(),e.null()]),seller_name:e.string(),seller_vatin:e.union([e.string(),e.null()]),seller_address_line_1:e.union([e.string(),e.null()]),seller_address_line_2:e.union([e.string(),e.null()]),seller_address_line_3:e.union([e.string(),e.null()]),seller_address_post_code:e.union([e.string(),e.null()]),seller_address_city:e.union([e.string(),e.null()]),seller_address_country:e.union([e.string(),e.null()]),seller_phone:e.union([e.string(),e.null()]),seller_email:e.union([e.string(),e.null()]),buyer_name:e.string(),buyer_vatin:e.union([e.string(),e.null()]),buyer_address_line_1:e.union([e.string(),e.null()]),buyer_address_line_2:e.union([e.string(),e.null()]),buyer_address_line_3:e.union([e.string(),e.null()]),buyer_address_post_code:e.union([e.string(),e.null()]),buyer_address_city:e.union([e.string(),e.null()]),buyer_address_country:e.union([e.string(),e.null()]),buyer_phone:e.union([e.string(),e.null()]),buyer_email:e.union([e.string(),e.null()]),date:e.string(),billing_period_start:e.union([e.string(),e.null()]),billing_period_end:e.union([e.string(),e.null()]),reference:e.string(),currency:e.string(),payment_iban:e.union([e.string(),e.null()]),tax_rate:e.number().int().gte(0).lte(2147483647),discount_amount:e.number().int().gte(0).lte(9223372036854776e3),discount_type:Js,footer:e.union([e.string(),e.null()]),notes:e.union([e.string(),e.null()]),payment_terms:e.union([e.string(),e.null()]),is_eu_reverse_charge:e.boolean(),entries:e.array(e.object({id:e.union([e.string(),e.null()]).optional(),name:e.string(),description:e.union([e.string(),e.null()]).optional(),unit_price:e.number().int().gte(0).lte(9223372036854776e3),quantity:e.number().gte(0).lte(99999999)}).passthrough())}).partial().passthrough();e.object({with_e_invoice:e.boolean()}).passthrough();const Ks=e.object({seller_name:e.union([e.string(),e.null()]),seller_vatin:e.union([e.string(),e.null()]),seller_address_line_1:e.union([e.string(),e.null()]),seller_address_line_2:e.union([e.string(),e.null()]),seller_address_line_3:e.union([e.string(),e.null()]),seller_address_post_code:e.union([e.string(),e.null()]),seller_address_city:e.union([e.string(),e.null()]),seller_address_country:e.union([e.string(),e.null()]),seller_phone:e.union([e.string(),e.null()]),seller_email:e.union([e.string(),e.null()]),footer_default:e.union([e.string(),e.null()]),notes_default:e.union([e.string(),e.null()]),tax_rate_default:e.union([e.number(),e.null()]),e_invoicing_enabled:e.boolean(),organization_id:e.string()}).passthrough(),Wa=e.object({seller_name:e.union([e.string(),e.null()]),seller_vatin:e.union([e.string(),e.null()]),seller_address_line_1:e.union([e.string(),e.null()]),seller_address_line_2:e.union([e.string(),e.null()]),seller_address_line_3:e.union([e.string(),e.null()]),seller_address_post_code:e.union([e.string(),e.null()]),seller_address_city:e.union([e.string(),e.null()]),seller_address_country:e.union([e.string(),e.null()]),seller_phone:e.union([e.string(),e.null()]),seller_email:e.union([e.string(),e.null()]),footer_default:e.union([e.string(),e.null()]),notes_default:e.union([e.string(),e.null()]),tax_rate_default:e.union([e.number(),e.null()]),e_invoicing_enabled:e.boolean()}).partial().passthrough(),Gs=e.object({id:e.string(),user_id:e.string(),name:e.string(),email:e.string(),role:e.string(),is_placeholder:e.boolean(),billable_rate:e.union([e.number(),e.null()])}).passthrough(),Ja=e.enum(["owner","admin","manager","employee","placeholder"]),Ka=e.object({role:Ja,billable_rate:e.union([e.number(),e.null()])}).partial().passthrough();e.object({member_id:e.string()}).partial().passthrough();const Ut=e.enum(["point-comma","comma-point","space-comma","space-point","apostrophe-point"]),qt=e.enum(["iso-code-before-with-space","iso-code-after-with-space","symbol-before","symbol-after","symbol-before-with-space","symbol-after-with-space"]),Ft=e.enum(["point-separated-d-m-yyyy","slash-separated-mm-dd-yyyy","slash-separated-dd-mm-yyyy","hyphen-separated-dd-mm-yyyy","hyphen-separated-mm-dd-yyyy","hyphen-separated-yyyy-mm-dd"]),Zt=e.enum(["decimal","hours-minutes","hours-minutes-colon-separated","hours-minutes-seconds-colon-separated"]),Dt=e.enum(["12-hours","24-hours"]),Xs=e.object({id:e.string(),name:e.string(),is_personal:e.boolean(),billable_rate:e.union([e.number(),e.null()]),employees_can_see_billable_rates:e.boolean(),prevent_overlapping_time_entries:e.boolean(),currency:e.string(),currency_symbol:e.string(),number_format:Ut,currency_format:qt,date_format:Ft,interval_format:Zt,time_format:Dt}).passthrough(),Ga=e.object({name:e.string().max(255),billable_rate:e.union([e.number(),e.null()]),employees_can_see_billable_rates:e.boolean(),prevent_overlapping_time_entries:e.boolean(),number_format:Ut,currency_format:qt,date_format:Ft,interval_format:Zt,time_format:Dt}).partial().passthrough(),it=e.object({id:e.string(),name:e.string(),color:e.string(),client_id:e.union([e.string(),e.null()]),is_archived:e.boolean(),billable_rate:e.union([e.number(),e.null()]),is_billable:e.boolean(),estimated_time:e.union([e.number(),e.null()]),spent_time:e.number().int(),is_public:e.boolean()}).passthrough(),Xa=e.object({name:e.string().min(1).max(255),color:e.string().max(255),is_billable:e.boolean(),billable_rate:e.union([e.number(),e.null()]).optional(),client_id:e.union([e.string(),e.null()]).optional(),estimated_time:e.union([e.number(),e.null()]).optional(),is_public:e.boolean().optional()}).passthrough(),Ya=e.object({name:e.string().max(255),color:e.string().max(255),is_billable:e.boolean(),is_archived:e.boolean().optional(),is_public:e.boolean().optional(),client_id:e.union([e.string(),e.null()]).optional(),billable_rate:e.union([e.number(),e.null()]).optional(),estimated_time:e.union([e.number(),e.null()]).optional()}).passthrough(),Bt=e.object({id:e.string(),billable_rate:e.union([e.number(),e.null()]),member_id:e.string(),project_id:e.string()}).passthrough(),ei=e.object({member_id:e.string(),billable_rate:e.union([e.number(),e.null()]).optional()}).passthrough(),ti=e.object({billable_rate:e.union([e.number(),e.null()])}).partial().passthrough(),si=e.object({id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),is_public:e.boolean(),public_until:e.union([e.string(),e.null()]),shareable_link:e.union([e.string(),e.null()]),created_at:e.string(),updated_at:e.string()}).passthrough(),Ys=e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"]),ri=e.enum(["day","week","month","year"]),er=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),ni=e.enum(["up","down","nearest"]),ai=e.object({name:e.string().max(255),description:e.union([e.string(),e.null()]).optional(),is_public:e.boolean(),public_until:e.union([e.string(),e.null()]).optional(),properties:e.object({start:e.string(),end:e.string(),active:e.union([e.boolean(),e.null()]).optional(),member_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),billable:e.union([e.boolean(),e.null()]).optional(),client_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),project_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),tag_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),task_ids:e.union([e.array(e.string().uuid()),e.null()]).optional(),group:Ys,sub_group:Ys,history_group:ri,week_start:er.optional(),timezone:e.union([e.string(),e.null()]).optional(),rounding_type:ni.optional(),rounding_minutes:e.union([e.number(),e.null()]).optional()}).passthrough()}).passthrough(),Mt=e.object({id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),is_public:e.boolean(),public_until:e.union([e.string(),e.null()]),shareable_link:e.union([e.string(),e.null()]),properties:e.object({group:e.string(),sub_group:e.string(),history_group:e.string(),start:e.string(),end:e.string(),active:e.union([e.boolean(),e.null()]),member_ids:e.union([e.array(e.string()),e.null()]),billable:e.union([e.boolean(),e.null()]),client_ids:e.union([e.array(e.string()),e.null()]),project_ids:e.union([e.array(e.string()),e.null()]),tag_ids:e.union([e.array(e.string()),e.null()]),task_ids:e.union([e.array(e.string()),e.null()]),rounding_type:e.union([e.string(),e.null()]),rounding_minutes:e.union([e.number(),e.null()])}).passthrough(),created_at:e.string(),updated_at:e.string()}).passthrough(),ii=e.object({name:e.string().max(255),description:e.union([e.string(),e.null()]),is_public:e.boolean(),public_until:e.union([e.string(),e.null()])}).partial().passthrough(),oi=e.object({name:e.string(),description:e.union([e.string(),e.null()]),public_until:e.union([e.string(),e.null()]),currency:e.string(),number_format:Ut,currency_format:qt,currency_symbol:e.string(),date_format:Ft,interval_format:Zt,time_format:Dt,properties:e.object({group:e.string(),sub_group:e.string(),history_group:e.string(),start:e.string(),end:e.string()}).passthrough(),data:e.object({grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),color:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),color:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.null(),grouped_data:e.null()}).passthrough()),e.null()])}).passthrough()),e.null()]),seconds:e.number().int(),cost:e.number().int()}).passthrough(),history_data:e.object({grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.number().int(),grouped_type:e.null(),grouped_data:e.null()}).passthrough()),e.null()])}).passthrough()),e.null()]),seconds:e.number().int(),cost:e.number().int()}).passthrough()}).passthrough(),Lt=e.object({id:e.string(),name:e.string(),created_at:e.string(),updated_at:e.string()}).passthrough(),ui=e.array(Lt);e.object({name:e.string().min(1).max(255)}).passthrough(),e.object({name:e.string().min(1).max(255)}).passthrough();const $t=e.object({id:e.string(),name:e.string(),is_done:e.boolean(),project_id:e.string(),estimated_time:e.union([e.number(),e.null()]),spent_time:e.number().int(),created_at:e.string(),updated_at:e.string()}).passthrough(),ci=e.object({name:e.string().min(1).max(255),project_id:e.string(),estimated_time:e.union([e.number(),e.null()]).optional()}).passthrough(),li=e.object({name:e.string().min(1).max(255),is_done:e.boolean().optional(),estimated_time:e.union([e.number(),e.null()]).optional()}).passthrough(),ot=e.union([e.string(),e.null()]).optional(),ut=e.union([e.number(),e.null()]).optional(),ct=e.object({id:e.string(),start:e.string(),end:e.union([e.string(),e.null()]),duration:e.union([e.number(),e.null()]),description:e.union([e.string(),e.null()]),task_id:e.union([e.string(),e.null()]),project_id:e.union([e.string(),e.null()]),organization_id:e.string(),user_id:e.string(),tags:e.array(e.string()),billable:e.boolean()}).passthrough(),di=e.object({member_id:e.string(),project_id:e.union([e.string(),e.null()]).optional(),task_id:e.union([e.string(),e.null()]).optional(),start:e.string(),end:e.union([e.string(),e.null()]).optional(),billable:e.boolean(),description:e.union([e.string(),e.null()]).optional(),tags:e.union([e.array(e.string()),e.null()]).optional()}).passthrough(),hi=e.object({ids:e.array(e.string().uuid()),changes:e.object({member_id:e.string(),project_id:e.union([e.string(),e.null()]),task_id:e.union([e.string(),e.null()]),billable:e.boolean(),description:e.union([e.string(),e.null()]),tags:e.union([e.array(e.string()),e.null()])}).partial().passthrough()}).passthrough(),pi=e.object({member_id:e.string(),project_id:e.union([e.string(),e.null()]),task_id:e.union([e.string(),e.null()]),start:e.string(),end:e.union([e.string(),e.null()]),billable:e.boolean(),description:e.union([e.string(),e.null()]),tags:e.union([e.array(e.string()),e.null()])}).partial().passthrough(),mi=e.object({id:e.string(),name:e.string(),email:e.string(),profile_photo_url:e.string(),timezone:e.string(),week_start:er}).passthrough(),gi=e.object({id:e.string(),organization:e.object({id:e.string(),name:e.string(),currency:e.string()}).passthrough(),role:e.string()}).passthrough(),tr=Na([{method:"get",path:"/v1/countries",alias:"getCountries",requestFormat:"json",response:e.array(e.object({code:e.string(),name:e.string()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/currencies",alias:"getCurrencies",requestFormat:"json",response:e.array(e.object({code:e.string(),name:e.string(),symbol:e.string()}).passthrough())},{method:"get",path:"/v1/organizations/:organization",alias:"getOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Xs}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization",alias:"updateOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ga},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Xs}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/daily-tracked-hours",alias:"dailyTrackedHours",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({date:e.string(),duration:e.number().int()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/last-seven-days",alias:"lastSevenDays",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({date:e.string(),duration:e.number().int(),history:e.array(e.number().int())}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/latest-tasks",alias:"latestTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({task_id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),status:e.boolean(),time_entry_id:e.union([e.string(),e.null()])}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/latest-team-activity",alias:"latestTeamActivity",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({member_id:e.string(),name:e.string(),description:e.union([e.string(),e.null()]),time_entry_id:e.string(),task_id:e.union([e.string(),e.null()]),status:e.boolean()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-billable-amount",alias:"totalWeeklyBillableAmount",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({value:e.number().int(),currency:e.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-billable-time",alias:"totalWeeklyBillableTime",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.number().int(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-time",alias:"totalWeeklyTime",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.number().int(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/weekly-history",alias:"weeklyHistory",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({date:e.string(),duration:e.number().int()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/weekly-project-overview",alias:"weeklyProjectOverview",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.array(e.object({value:e.number().int(),name:e.string(),color:e.string()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/clients",alias:"getClients",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"page",type:"Query",schema:e.number().int().gte(1).lte(2147483647).optional()},{name:"archived",type:"Query",schema:e.enum(["true","false","all"]).optional()}],response:e.object({data:qa}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/clients",alias:"createClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Ct}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/clients/:client",alias:"updateClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Fa},{name:"organization",type:"Path",schema:e.string()},{name:"client",type:"Path",schema:e.string()}],response:e.object({data:Ct}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/clients/:client",alias:"deleteClient",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"client",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/export",alias:"exportOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({success:e.boolean(),download_url:e.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/import",alias:"importData",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Za},{name:"organization",type:"Path",schema:e.string()}],response:e.object({report:e.object({clients:e.object({created:e.number().int()}).passthrough(),projects:e.object({created:e.number().int()}).passthrough(),tasks:e.object({created:e.number().int()}).passthrough(),time_entries:e.object({created:e.number().int()}).passthrough(),tags:e.object({created:e.number().int()}).passthrough(),users:e.object({created:e.number().int()}).passthrough()}).passthrough()}).passthrough(),errors:[{status:400,schema:e.union([e.object({message:e.string()}).passthrough(),e.object({message:e.literal("Invalid base64 encoded data")}).passthrough()])},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/importers",alias:"getImporters",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(e.object({key:e.string(),name:e.string(),description:e.string()}).passthrough())}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invitations",alias:"getInvitations",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(Da),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations",alias:"invite",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ba},{name:"organization",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invitations/:invitation",alias:"removeInvitation",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invitation",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations/:invitation/resend",alias:"resendInvitationEmail",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invitation",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoice-settings",alias:"getInvoiceSettings",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Ks}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/invoice-settings",alias:"updateInvoiceSettings",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Wa},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Ks}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoices",alias:"getInvoices",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"page",type:"Query",schema:e.number().int().gte(1).lte(2147483647).optional()}],response:e.object({data:La}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices",alias:"createInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:$a},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:It}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoices/:invoice",alias:"getInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({data:It}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/invoices/:invoice",alias:"updateInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ha},{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({data:It}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invoices/:invoice",alias:"deleteInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/download",alias:"downloadInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({with_e_invoice:e.boolean()}).passthrough()},{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({download_link:e.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/download-e-invoice",alias:"downloadEInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"invoice",type:"Path",schema:e.string()}],response:e.object({download_link:e.string()}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/member/:member/merge-into",alias:"mergeMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({member_id:e.string()}).partial().passthrough()},{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/members",alias:"getMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(Gs),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/members/:member",alias:"updateMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ka},{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.object({data:Gs}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/members/:member",alias:"removeMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()},{name:"delete_related",type:"Query",schema:e.enum(["true","false"]).optional()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/invite-placeholder",alias:"invitePlaceholder",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/make-placeholder",alias:"makePlaceholder",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"updateProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ti},{name:"organization",type:"Path",schema:e.string()},{name:"projectMember",type:"Path",schema:e.string()}],response:e.object({data:Bt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"deleteProjectMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"projectMember",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects",alias:"getProjects",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"page",type:"Query",schema:e.number().int().gte(1).lte(2147483647).optional()},{name:"archived",type:"Query",schema:e.enum(["true","false","all"]).optional()}],response:e.object({data:e.array(it),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects",alias:"createProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Xa},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:it}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project",alias:"getProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:it}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/projects/:project",alias:"updateProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Ya},{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:it}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/projects/:project",alias:"deleteProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"getProjectMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:e.array(Bt),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"createProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ei},{name:"organization",type:"Path",schema:e.string()},{name:"project",type:"Path",schema:e.string()}],response:e.object({data:Bt}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/reports",alias:"getReports",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:e.array(si),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/reports",alias:"createReport",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ai},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/reports/:report",alias:"getReport",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"report",type:"Path",schema:e.string()}],response:e.object({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/reports/:report",alias:"updateReport",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ii},{name:"organization",type:"Path",schema:e.string()},{name:"report",type:"Path",schema:e.string()}],response:e.object({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/reports/:report",alias:"deleteReport",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"report",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tags",alias:"getTags",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:ui}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tags",alias:"createTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:Lt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tags/:tag",alias:"updateTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:e.string()},{name:"tag",type:"Path",schema:e.string()}],response:e.object({data:Lt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tags/:tag",alias:"deleteTag",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"tag",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tasks",alias:"getTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"project_id",type:"Query",schema:e.string().optional()},{name:"done",type:"Query",schema:e.enum(["true","false","all"]).optional()}],response:e.object({data:e.array($t),links:e.object({first:e.union([e.string(),e.null()]),last:e.union([e.string(),e.null()]),prev:e.union([e.string(),e.null()]),next:e.union([e.string(),e.null()])}).passthrough(),meta:e.object({current_page:e.number().int(),from:e.union([e.number(),e.null()]),last_page:e.number().int(),links:e.array(e.object({url:e.union([e.string(),e.null()]),label:e.string(),active:e.boolean()}).passthrough()),path:e.union([e.string(),e.null()]),per_page:e.number().int(),to:e.union([e.number(),e.null()]),total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tasks",alias:"createTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ci},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:$t}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tasks/:task",alias:"updateTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:li},{name:"organization",type:"Path",schema:e.string()},{name:"task",type:"Path",schema:e.string()}],response:e.object({data:$t}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tasks/:task",alias:"deleteTask",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"task",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries",alias:"getTimeEntries",description:`If you only need time entries for a specific user, you can filter by &#x60;user_id&#x60;.
12
- Users with the permission &#x60;time-entries:view:own&#x60; can only use this endpoint with their own user ID in the user_id filter.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"member_id",type:"Query",schema:e.string().optional()},{name:"start",type:"Query",schema:ot},{name:"end",type:"Query",schema:ot},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"limit",type:"Query",schema:e.number().int().gte(1).lte(500).optional()},{name:"offset",type:"Query",schema:e.number().int().gte(0).lte(2147483647).optional()},{name:"only_full_dates",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:ut},{name:"user_id",type:"Query",schema:e.string().optional()},{name:"member_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"client_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string()).min(1).optional()}],response:e.object({data:e.array(ct),meta:e.object({total:e.number().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/time-entries",alias:"createTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:di},{name:"organization",type:"Path",schema:e.string()}],response:e.object({data:ct}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"patch",path:"/v1/organizations/:organization/time-entries",alias:"updateMultipleTimeEntries",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:hi},{name:"organization",type:"Path",schema:e.string()}],response:e.object({success:e.string(),error:e.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries",alias:"deleteTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"ids",type:"Query",schema:e.array(e.string().uuid())}],response:e.object({success:e.string(),error:e.string()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"updateTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:pi},{name:"organization",type:"Path",schema:e.string()},{name:"timeEntry",type:"Path",schema:e.string()}],response:e.object({data:ct}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"deleteTimeEntry",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"timeEntry",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate",alias:"getAggregatedTimeEntries",description:`This endpoint allows you to filter time entries and aggregate them by different criteria.
14
+ ${JSON.stringify(i.data,null,2)}`,n,i.data,b.error);ea(e)&&(i.data=b.data)}return i}:void 0}}var sa=class{constructor(s,e){this.plugins=[],this.key=`${s}-${e}`}indexOf(s){return this.plugins.findIndex(e=>e?.name===s)}use(s){if(s.name){let e=this.indexOf(s.name);if(e!==-1)return this.plugins[e]=s,{key:this.key,value:e}}return this.plugins.push(s),{key:this.key,value:this.plugins.length-1}}eject(s){if(typeof s=="string"){let e=this.indexOf(s);if(e===-1)throw new Error(`Plugin with name '${s}' not found`);this.plugins[e]=void 0}else{if(s.key!==this.key)throw new Error(`Plugin with key '${s.key}' is not registered for endpoint '${this.key}'`);this.plugins[s.value]=void 0}}async interceptRequest(s,e){let a=e;for(let r of this.plugins)r!=null&&r.request&&(a=await r.request(s,a));return a}async interceptResponse(s,e,a){let r=a;for(let n=this.plugins.length-1;n>=0;n--){let i=this.plugins[n];i&&(r=r.then(i!=null&&i.response?u=>i.response(s,e,u):void 0,i!=null&&i.error?u=>i.error(s,e,u):void 0))}return r}count(){return this.plugins.reduce((s,e)=>e?s+1:s,0)}};function aa(s){let e=new Set;for(let r of s){let n=`${r.method} ${r.path}`;if(e.has(n))throw new Error(`Zodios: Duplicate path '${n}'`);e.add(n)}let a=new Set;for(let r of s)if(r.alias){if(a.has(r.alias))throw new Error(`Zodios: Duplicate alias '${r.alias}'`);a.add(r.alias)}for(let r of s)if(r.parameters&&r.parameters.filter(n=>n.type==="Body").length>1)throw new Error(`Zodios: Multiple body parameters in endpoint '${r.path}'`)}function In(s){return aa(s),s}var qn=class{constructor(s,e,a){this.endpointPlugins=new Map;let r;if(!s)throw Array.isArray(e)?new Error("Zodios: missing base url"):new Error("Zodios: missing api description");let n;if(typeof s=="string"&&Array.isArray(e))n=s,this.api=e,r=a||{};else if(Array.isArray(s)&&!Array.isArray(e))this.api=s,r=e||{};else throw new Error("Zodios: api must be an array");aa(this.api),this.options={validate:!0,transform:!0,sendDefaults:!1,...r},this.options.axiosInstance?this.axiosInstance=this.options.axiosInstance:this.axiosInstance=$.create({...this.options.axiosConfig}),n&&(this.axiosInstance.defaults.baseURL=n),this.injectAliasEndpoints(),this.initPlugins(),[!0,"all","request","response"].includes(this.options.validate)&&this.use(Fn(this.options))}initPlugins(){this.endpointPlugins.set("any-any",new sa("any","any")),this.api.forEach(s=>{let e=new sa(s.method,s.path);switch(s.requestFormat){case"binary":e.use(Ys("Content-Type","application/octet-stream"));break;case"form-data":e.use(jn());break;case"form-url":e.use(Un());break;case"text":e.use(Ys("Content-Type","text/plain"));break}this.endpointPlugins.set(`${s.method}-${s.path}`,e)})}getAnyEndpointPlugins(){return this.endpointPlugins.get("any-any")}findAliasEndpointPlugins(s){let e=this.api.find(a=>a.alias===s);if(e)return this.endpointPlugins.get(`${e.method}-${e.path}`)}findEnpointPlugins(s,e){return this.endpointPlugins.get(`${s}-${e}`)}get baseURL(){return this.axiosInstance.defaults.baseURL}get axios(){return this.axiosInstance}use(...s){if(typeof s[0]=="object")return this.getAnyEndpointPlugins().use(s[0]);if(typeof s[0]=="string"&&typeof s[1]=="object"){let e=this.findAliasEndpointPlugins(s[0]);if(!e)throw new Error(`Zodios: no alias '${s[0]}' found to register plugin`);return e.use(s[1])}else if(typeof s[0]=="string"&&typeof s[1]=="string"&&typeof s[2]=="object"){let e=this.findEnpointPlugins(s[0],s[1]);if(!e)throw new Error(`Zodios: no endpoint '${s[0]} ${s[1]}' found to register plugin`);return e.use(s[2])}throw new Error("Zodios: invalid plugin registration")}eject(s){var e;if(typeof s=="string"){this.getAnyEndpointPlugins().eject(s);return}(e=this.endpointPlugins.get(s.key))==null||e.eject(s)}injectAliasEndpoints(){this.api.forEach(s=>{s.alias&&(["post","put","patch","delete"].includes(s.method)?this[s.alias]=(e,a)=>this.request({...a,method:s.method,url:s.path,data:e}):this[s.alias]=e=>this.request({...e,method:s.method,url:s.path}))})}async request(s){let e=s,a=this.getAnyEndpointPlugins(),r=this.findEnpointPlugins(e.method,e.url);e=await a.interceptRequest(this.api,e),r&&(e=await r.interceptRequest(this.api,e));let n=this.axiosInstance.request({...Tn(e,["params","queries"]),url:On(e),params:e.queries});return r&&(n=r.interceptResponse(this.api,e,n)),n=a.interceptResponse(this.api,e,n),(await n).data}async get(s,...[e]){return this.request({...e,method:"get",url:s})}async post(s,e,...[a]){return this.request({...a,method:"post",url:s,data:e})}async put(s,e,...[a]){return this.request({...a,method:"put",url:s,data:e})}async patch(s,e,...[a]){return this.request({...a,method:"patch",url:s,data:e})}async delete(s,e,...[a]){return this.request({...a,method:"delete",url:s,data:e})}},ra=qn;const Dn=o({id:t(),name:t(),revoked:v(),scopes:y(t()),created_at:t(),expires_at:h([t(),d()])}).passthrough(),Ln=y(Dn);o({name:t().min(1).max(255)}).passthrough();const Bn=o({id:t(),name:t(),revoked:v(),scopes:y(t()),created_at:t(),expires_at:h([t(),d()]),access_token:t()}).passthrough(),Mt=o({id:t(),name:t(),is_archived:v(),created_at:t(),updated_at:t()}).passthrough();o({name:t().min(1).max(255)}).passthrough();const $n=o({name:t().min(1).max(255),is_archived:v().optional()}).passthrough(),na=o({password:t()}).passthrough(),Mn=o({type:t(),data:t()}).passthrough(),Vn=o({id:t(),email:t(),role:t()}).passthrough(),Zn=o({email:t().email(),role:P(["admin","manager","employee"])}).passthrough(),Qn=o({id:t(),organization_id:t(),reference:t(),seller_name:t(),buyer_name:t(),status:t(),date:t(),due_at:t(),paid_date:t(),created_at:h([t(),d()]),updated_at:h([t(),d()])}).passthrough(),Hn=y(Qn),oa=P(["percentage","fixed"]),Wn=o({due_at:h([t(),d()]).optional(),paid_date:h([t(),d()]).optional(),seller_name:t(),seller_vatin:h([t(),d()]).optional(),seller_address_line_1:h([t(),d()]).optional(),seller_address_line_2:h([t(),d()]).optional(),seller_address_line_3:h([t(),d()]).optional(),seller_address_post_code:h([t(),d()]).optional(),seller_address_city:h([t(),d()]).optional(),seller_address_country:h([t(),d()]).optional(),seller_phone:h([t(),d()]).optional(),seller_email:h([t(),d()]).optional(),buyer_name:t(),buyer_vatin:h([t(),d()]).optional(),buyer_address_line_1:h([t(),d()]).optional(),buyer_address_line_2:h([t(),d()]).optional(),buyer_address_line_3:h([t(),d()]).optional(),buyer_address_post_code:h([t(),d()]).optional(),buyer_address_city:h([t(),d()]).optional(),buyer_address_country:h([t(),d()]).optional(),buyer_phone:h([t(),d()]).optional(),buyer_email:h([t(),d()]).optional(),date:t(),billing_period_start:h([t(),d()]).optional(),billing_period_end:h([t(),d()]).optional(),reference:t(),currency:t(),payment_iban:h([t(),d()]).optional(),tax_rate:g().int().gte(0).lte(2147483647).optional(),discount_amount:g().int().gte(0).lte(9223372036854776e3).optional(),discount_type:oa.optional(),footer:h([t(),d()]).optional(),notes:h([t(),d()]).optional(),payment_terms:h([t(),d()]).optional(),is_eu_reverse_charge:v().optional(),entries:y(o({name:t(),description:h([t(),d()]).optional(),unit_price:g().int().gte(0).lte(9223372036854776e3),quantity:g().gte(0).lte(99999999)}).passthrough()).optional()}).passthrough(),Jn=o({id:t(),invoice_id:t(),name:t(),description:h([t(),d()]),unit_price:g().int(),quantity:g(),order_index:g().int(),created_at:h([t(),d()]),updated_at:h([t(),d()])}).passthrough(),dt=o({id:t(),organization_id:t(),reference:t(),seller_name:t(),seller_vatin:t(),seller_address_line_1:t(),seller_address_line_2:t(),seller_address_line_3:t(),seller_address_post_code:t(),seller_address_city:t(),seller_address_country:t(),seller_phone:t(),seller_email:t(),buyer_name:t(),buyer_vatin:t(),buyer_address_line_1:t(),buyer_address_line_2:t(),buyer_address_line_3:t(),buyer_address_post_code:t(),buyer_address_city:t(),buyer_address_country:t(),buyer_phone:t(),buyer_email:t(),paid_date:t(),due_at:t(),discount_type:t(),discount_amount:g().int(),tax_rate:g().int(),payment_iban:t(),status:t(),currency:t(),date:t(),footer:t(),notes:t(),payment_terms:t(),is_eu_reverse_charge:t(),billing_period_start:t(),billing_period_end:t(),created_at:h([t(),d()]),updated_at:h([t(),d()]),entries:y(Jn)}).passthrough(),Kn=P(["draft","sent","cancelled"]),Xn=o({status:Kn,due_at:h([t(),d()]),paid_date:h([t(),d()]),seller_name:t(),seller_vatin:h([t(),d()]),seller_address_line_1:h([t(),d()]),seller_address_line_2:h([t(),d()]),seller_address_line_3:h([t(),d()]),seller_address_post_code:h([t(),d()]),seller_address_city:h([t(),d()]),seller_address_country:h([t(),d()]),seller_phone:h([t(),d()]),seller_email:h([t(),d()]),buyer_name:t(),buyer_vatin:h([t(),d()]),buyer_address_line_1:h([t(),d()]),buyer_address_line_2:h([t(),d()]),buyer_address_line_3:h([t(),d()]),buyer_address_post_code:h([t(),d()]),buyer_address_city:h([t(),d()]),buyer_address_country:h([t(),d()]),buyer_phone:h([t(),d()]),buyer_email:h([t(),d()]),date:t(),billing_period_start:h([t(),d()]),billing_period_end:h([t(),d()]),reference:t(),currency:t(),payment_iban:h([t(),d()]),tax_rate:g().int().gte(0).lte(2147483647),discount_amount:g().int().gte(0).lte(9223372036854776e3),discount_type:oa,footer:h([t(),d()]),notes:h([t(),d()]),payment_terms:h([t(),d()]),is_eu_reverse_charge:v(),entries:y(o({id:h([t(),d()]).optional(),name:t(),description:h([t(),d()]).optional(),unit_price:g().int().gte(0).lte(9223372036854776e3),quantity:g().gte(0).lte(99999999)}).passthrough())}).partial().passthrough();o({with_e_invoice:v()}).passthrough();const ia=o({seller_name:h([t(),d()]),seller_vatin:h([t(),d()]),seller_address_line_1:h([t(),d()]),seller_address_line_2:h([t(),d()]),seller_address_line_3:h([t(),d()]),seller_address_post_code:h([t(),d()]),seller_address_city:h([t(),d()]),seller_address_country:h([t(),d()]),seller_phone:h([t(),d()]),seller_email:h([t(),d()]),footer_default:h([t(),d()]),notes_default:h([t(),d()]),tax_rate_default:h([g(),d()]),e_invoicing_enabled:v(),organization_id:t()}).passthrough(),Gn=o({seller_name:h([t(),d()]),seller_vatin:h([t(),d()]),seller_address_line_1:h([t(),d()]),seller_address_line_2:h([t(),d()]),seller_address_line_3:h([t(),d()]),seller_address_post_code:h([t(),d()]),seller_address_city:h([t(),d()]),seller_address_country:h([t(),d()]),seller_phone:h([t(),d()]),seller_email:h([t(),d()]),footer_default:h([t(),d()]),notes_default:h([t(),d()]),tax_rate_default:h([g(),d()]),e_invoicing_enabled:v()}).partial().passthrough(),ua=o({id:t(),user_id:t(),name:t(),email:t(),role:t(),is_placeholder:v(),billable_rate:h([g(),d()])}).passthrough(),Yn=P(["owner","admin","manager","employee","placeholder"]),eo=o({role:Yn,billable_rate:h([g(),d()])}).partial().passthrough();o({member_id:t()}).partial().passthrough();const Vt=P(["point-comma","comma-point","space-comma","space-point","apostrophe-point"]),Zt=P(["iso-code-before-with-space","iso-code-after-with-space","symbol-before","symbol-after","symbol-before-with-space","symbol-after-with-space"]),Qt=P(["point-separated-d-m-yyyy","slash-separated-mm-dd-yyyy","slash-separated-dd-mm-yyyy","hyphen-separated-dd-mm-yyyy","hyphen-separated-mm-dd-yyyy","hyphen-separated-yyyy-mm-dd"]),Ht=P(["decimal","hours-minutes","hours-minutes-colon-separated","hours-minutes-seconds-colon-separated"]),Wt=P(["12-hours","24-hours"]),Jt=o({id:t(),name:t(),is_personal:v(),billable_rate:h([g(),d()]),employees_can_see_billable_rates:v(),employees_can_manage_tasks:v(),prevent_overlapping_time_entries:v(),breaks_enabled:v(),currency:t(),currency_symbol:t(),number_format:Vt,currency_format:Zt,date_format:Qt,interval_format:Ht,time_format:Wt}).passthrough(),to=o({name:t().max(255),currency:t(),billable_rate:h([g(),d()]),employees_can_see_billable_rates:v(),employees_can_manage_tasks:v(),prevent_overlapping_time_entries:v(),breaks_enabled:v(),number_format:Vt,currency_format:Zt,date_format:Qt,interval_format:Ht,time_format:Wt}).partial().passthrough(),ht=o({id:t(),name:t(),color:t(),client_id:h([t(),d()]),is_archived:v(),billable_rate:h([g(),d()]),is_billable:v(),estimated_time:h([g(),d()]),spent_time:g().int(),is_public:v()}).passthrough(),so=o({name:t().min(1).max(255),color:t().max(255),is_billable:v(),billable_rate:h([g(),d()]).optional(),client_id:h([t(),d()]).optional(),estimated_time:h([g(),d()]).optional(),is_public:v().optional()}).passthrough(),ao=o({name:t().max(255),color:t().max(255),is_billable:v(),is_archived:v().optional(),is_public:v().optional(),client_id:h([t(),d()]).optional(),billable_rate:h([g(),d()]).optional(),estimated_time:h([g(),d()]).optional()}).passthrough(),Kt=o({id:t(),billable_rate:h([g(),d()]),member_id:t(),project_id:t()}).passthrough(),ro=o({member_id:t(),billable_rate:h([g(),d()]).optional()}).passthrough(),no=o({billable_rate:h([g(),d()])}).partial().passthrough(),oo=o({id:t(),name:t(),description:h([t(),d()]),is_public:v(),public_until:h([t(),d()]),shareable_link:h([t(),d()]),created_at:t(),updated_at:t()}).passthrough(),ca=P(["day","week","month","year","user","project","task","client","billable","description","tag","type"]),io=P(["day","week","month","year"]),Xt=P(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),uo=P(["up","down","nearest"]),co=o({name:t().max(255),description:h([t(),d()]).optional(),is_public:v(),public_until:h([t(),d()]).optional(),properties:o({start:t(),end:t(),active:h([v(),d()]).optional(),member_ids:h([y(t().uuid()),d()]).optional(),billable:h([v(),d()]).optional(),client_ids:h([y(t()),d()]).optional(),project_ids:h([y(t()),d()]).optional(),tag_ids:h([y(t()),d()]).optional(),tag_match_type:P(["contains","not_contains"]).optional(),task_ids:h([y(t()),d()]).optional(),group:ca,sub_group:ca,history_group:io,week_start:Xt.optional(),timezone:h([t(),d()]).optional(),rounding_type:uo.optional(),rounding_minutes:h([g(),d()]).optional()}).passthrough()}).passthrough(),Gt=o({id:t(),name:t(),description:h([t(),d()]),is_public:v(),public_until:h([t(),d()]),shareable_link:h([t(),d()]),properties:o({group:t(),sub_group:t(),history_group:t(),start:t(),end:t(),active:h([v(),d()]),member_ids:h([y(t()),d()]),billable:h([v(),d()]),time_entry_type:h([P(["work","break"]),d()]),client_ids:h([y(t()),d()]),project_ids:h([y(t()),d()]),tag_ids:h([y(t()),d()]),tag_match_type:h([P(["contains","not_contains"]),d()]),task_ids:h([y(t()),d()]),rounding_type:h([t(),d()]),rounding_minutes:h([g(),d()])}).passthrough(),created_at:t(),updated_at:t()}).passthrough(),ho=o({name:t().max(255),description:h([t(),d()]),is_public:v(),public_until:h([t(),d()])}).partial().passthrough(),lo=o({name:t(),description:h([t(),d()]),public_until:h([t(),d()]),currency:t(),number_format:Vt,currency_format:Zt,currency_symbol:t(),date_format:Qt,interval_format:Ht,time_format:Wt,properties:o({group:t(),sub_group:t(),history_group:t(),start:t(),end:t()}).passthrough(),data:o({grouped_type:h([t(),d()]),grouped_data:h([y(o({key:h([t(),d()]),description:h([t(),d()]),color:h([t(),d()]),seconds:g().int(),cost:g().int(),grouped_type:h([t(),d()]),grouped_data:h([y(o({key:h([t(),d()]),description:h([t(),d()]),color:h([t(),d()]),seconds:g().int(),cost:g().int(),grouped_type:d(),grouped_data:d()}).passthrough()),d()])}).passthrough()),d()]),seconds:g().int(),cost:g().int()}).passthrough(),history_data:o({grouped_type:h([t(),d()]),grouped_data:h([y(o({key:h([t(),d()]),description:h([t(),d()]),seconds:g().int(),cost:g().int(),grouped_type:h([t(),d()]),grouped_data:h([y(o({key:h([t(),d()]),description:h([t(),d()]),seconds:g().int(),cost:g().int(),grouped_type:d(),grouped_data:d()}).passthrough()),d()])}).passthrough()),d()]),seconds:g().int(),cost:g().int()}).passthrough()}).passthrough(),Yt=o({id:t(),name:t(),created_at:t(),updated_at:t()}).passthrough();o({name:t().min(1).max(255)}).passthrough(),o({name:t().min(1).max(255)}).passthrough();const es=o({id:t(),name:t(),is_done:v(),project_id:t(),estimated_time:h([g(),d()]),spent_time:g().int(),created_at:t(),updated_at:t()}).passthrough(),po=o({name:t().min(1).max(255),project_id:t(),estimated_time:h([g(),d()]).optional()}).passthrough(),mo=o({name:t().min(1).max(255),is_done:v().optional(),estimated_time:h([g(),d()]).optional()}).passthrough(),lt=h([t(),d()]).optional(),pt=h([g(),d()]).optional(),he=P(["work","break"]),mt=o({id:t(),start:t(),end:h([t(),d()]),duration:h([g(),d()]),description:h([t(),d()]),task_id:h([t(),d()]),project_id:h([t(),d()]),organization_id:t(),user_id:t(),tags:y(t()),billable:v(),type:he}).passthrough(),fo=o({member_id:t(),project_id:h([t(),d()]).optional(),task_id:h([t(),d()]).optional(),start:t(),end:h([t(),d()]).optional(),billable:v(),type:he.optional(),description:h([t(),d()]).optional(),tags:h([y(t()),d()]).optional()}).passthrough(),go=o({ids:y(t().uuid()),changes:o({member_id:t(),project_id:h([t(),d()]),task_id:h([t(),d()]),billable:v(),type:he,description:h([t(),d()]),tags:h([y(t()),d()])}).partial().passthrough()}).passthrough(),yo=o({member_id:t(),project_id:h([t(),d()]),task_id:h([t(),d()]),start:t(),end:h([t(),d()]),billable:v(),type:he,description:h([t(),d()]),tags:h([y(t()),d()])}).partial().passthrough(),ts=o({id:t(),name:t(),email:t(),pending_email:h([t(),d()]),profile_photo_url:t(),timezone:t(),week_start:Xt}).passthrough(),_o=o({name:t(),email:t(),photo:h([t(),d()]),timezone:t(),week_start:Xt}).partial().passthrough(),bo=o({id:t(),organization:o({id:t(),name:t(),currency:t()}).passthrough(),role:t()}).passthrough(),da=In([{method:"get",path:"/v1/countries",alias:"getCountries",requestFormat:"json",response:y(o({code:t(),name:t()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/currencies",alias:"getCurrencies",requestFormat:"json",response:y(o({code:t(),name:t(),symbol:t()}).passthrough())},{method:"post",path:"/v1/organizations",alias:"createOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({name:t().max(255)}).passthrough()}],response:o({data:Jt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization",alias:"getOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:o({data:Jt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization",alias:"updateOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:to},{name:"organization",type:"Path",schema:t()}],response:o({data:Jt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization",alias:"deleteOrganization",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:na},{name:"organization",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/daily-tracked-hours",alias:"dailyTrackedHours",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:y(o({date:t(),duration:g().int()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/last-seven-days",alias:"lastSevenDays",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:y(o({date:t(),duration:g().int(),history:y(g().int())}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/latest-tasks",alias:"latestTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:y(o({task_id:t(),name:t(),description:h([t(),d()]),status:v(),time_entry_id:h([t(),d()])}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/latest-team-activity",alias:"latestTeamActivity",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:y(o({member_id:t(),name:t(),description:h([t(),d()]),time_entry_id:t(),task_id:h([t(),d()]),status:v()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-billable-amount",alias:"totalWeeklyBillableAmount",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:o({value:g().int(),currency:t()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-billable-time",alias:"totalWeeklyBillableTime",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:g().int(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/total-weekly-time",alias:"totalWeeklyTime",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:g().int(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/weekly-history",alias:"weeklyHistory",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:y(o({date:t(),duration:g().int()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/charts/weekly-project-overview",alias:"weeklyProjectOverview",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:y(o({value:g().int(),name:t(),color:t()}).passthrough()),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/clients",alias:"getClients",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()},{name:"archived",type:"Query",schema:P(["true","false","all"]).optional()}],response:o({data:y(Mt),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/clients",alias:"createClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({name:t().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:t()}],response:o({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/clients/:client",alias:"updateClient",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:$n},{name:"organization",type:"Path",schema:t()},{name:"client",type:"Path",schema:t()}],response:o({data:Mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/clients/:client",alias:"deleteClient",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"client",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/export",alias:"exportOrganization",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:o({success:v(),download_url:t()}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/import",alias:"importData",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Mn},{name:"organization",type:"Path",schema:t()}],response:o({report:o({clients:o({created:g().int()}).passthrough(),projects:o({created:g().int()}).passthrough(),tasks:o({created:g().int()}).passthrough(),time_entries:o({created:g().int()}).passthrough(),tags:o({created:g().int()}).passthrough(),users:o({created:g().int()}).passthrough()}).passthrough()}).passthrough(),errors:[{status:400,schema:h([o({message:t()}).passthrough(),o({message:zn("Invalid base64 encoded data")}).passthrough()])},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/importers",alias:"getImporters",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:o({data:y(o({key:t(),name:t(),description:t()}).passthrough())}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invitations",alias:"getInvitations",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()}],response:o({data:y(Vn),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations",alias:"invite",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Zn},{name:"organization",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invitations/:invitation",alias:"removeInvitation",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"invitation",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invitations/:invitation/resend",alias:"resendInvitationEmail",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"invitation",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoice-settings",alias:"getInvoiceSettings",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()}],response:o({data:ia}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/invoice-settings",alias:"updateInvoiceSettings",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Gn},{name:"organization",type:"Path",schema:t()}],response:o({data:ia}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoices",alias:"getInvoices",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()}],response:o({data:Hn}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices",alias:"createInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Wn},{name:"organization",type:"Path",schema:t()}],response:o({data:dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/copy",alias:"copyInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({reference:t()}).passthrough()},{name:"organization",type:"Path",schema:t()},{name:"invoice",type:"Path",schema:t()}],response:o({data:dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/invoices/:invoice",alias:"getInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"invoice",type:"Path",schema:t()}],response:o({data:dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/invoices/:invoice",alias:"updateInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:Xn},{name:"organization",type:"Path",schema:t()},{name:"invoice",type:"Path",schema:t()}],response:o({data:dt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/invoices/:invoice",alias:"deleteInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"invoice",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/download",alias:"downloadInvoice",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({with_e_invoice:v()}).passthrough()},{name:"organization",type:"Path",schema:t()},{name:"invoice",type:"Path",schema:t()}],response:o({download_link:t()}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/invoices/:invoice/download-e-invoice",alias:"downloadEInvoice",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"invoice",type:"Path",schema:t()}],response:o({download_link:t()}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/member/:member/merge-into",alias:"mergeMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({member_id:t()}).partial().passthrough()},{name:"organization",type:"Path",schema:t()},{name:"member",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/members",alias:"getMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()}],response:o({data:y(ua),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/members/:member",alias:"updateMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:eo},{name:"organization",type:"Path",schema:t()},{name:"member",type:"Path",schema:t()}],response:o({data:ua}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/members/:member",alias:"removeMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"member",type:"Path",schema:t()},{name:"delete_related",type:"Query",schema:P(["true","false"]).optional()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/invite-placeholder",alias:"invitePlaceholder",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"member",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/members/:member/make-placeholder",alias:"makePlaceholder",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"member",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"updateProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:no},{name:"organization",type:"Path",schema:t()},{name:"projectMember",type:"Path",schema:t()}],response:o({data:Kt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/project-members/:projectMember",alias:"deleteProjectMember",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"projectMember",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects",alias:"getProjects",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()},{name:"archived",type:"Query",schema:P(["true","false","all"]).optional()}],response:o({data:y(ht),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects",alias:"createProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:so},{name:"organization",type:"Path",schema:t()}],response:o({data:ht}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project",alias:"getProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"project",type:"Path",schema:t()}],response:o({data:ht}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/projects/:project",alias:"updateProject",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ao},{name:"organization",type:"Path",schema:t()},{name:"project",type:"Path",schema:t()}],response:o({data:ht}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/projects/:project",alias:"deleteProject",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"project",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"getProjectMembers",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"project",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()}],response:o({data:y(Kt),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/projects/:project/project-members",alias:"createProjectMember",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ro},{name:"organization",type:"Path",schema:t()},{name:"project",type:"Path",schema:t()}],response:o({data:Kt}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/reports",alias:"getReports",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()}],response:o({data:y(oo),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/reports",alias:"createReport",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:co},{name:"organization",type:"Path",schema:t()}],response:o({data:Gt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/reports/:report",alias:"getReport",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"report",type:"Path",schema:t()}],response:o({data:Gt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/reports/:report",alias:"updateReport",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:ho},{name:"organization",type:"Path",schema:t()},{name:"report",type:"Path",schema:t()}],response:o({data:Gt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/reports/:report",alias:"deleteReport",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"report",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tags",alias:"getTags",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()}],response:o({data:y(Yt),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tags",alias:"createTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({name:t().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:t()}],response:o({data:Yt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tags/:tag",alias:"updateTag",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({name:t().min(1).max(255)}).passthrough()},{name:"organization",type:"Path",schema:t()},{name:"tag",type:"Path",schema:t()}],response:o({data:Yt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tags/:tag",alias:"deleteTag",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"tag",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/tasks",alias:"getTasks",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"page",type:"Query",schema:g().int().gte(1).lte(2147483647).optional()},{name:"project_id",type:"Query",schema:t().optional()},{name:"done",type:"Query",schema:P(["true","false","all"]).optional()}],response:o({data:y(es),links:o({first:h([t(),d()]),last:h([t(),d()]),prev:h([t(),d()]),next:h([t(),d()])}).passthrough(),meta:o({current_page:g().int(),from:h([g(),d()]),last_page:g().int(),links:y(o({url:h([t(),d()]),label:t(),active:v()}).passthrough()),path:h([t(),d()]),per_page:g().int(),to:h([g(),d()]),total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/tasks",alias:"createTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:po},{name:"organization",type:"Path",schema:t()}],response:o({data:es}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/tasks/:task",alias:"updateTask",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:mo},{name:"organization",type:"Path",schema:t()},{name:"task",type:"Path",schema:t()}],response:o({data:es}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/tasks/:task",alias:"deleteTask",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"task",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries",alias:"getTimeEntries",description:`If you only need time entries for a specific user, you can filter by &#x60;user_id&#x60;.
15
+ Users with the permission &#x60;time-entries:view:own&#x60; can only use this endpoint with their own user ID in the user_id filter.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"member_id",type:"Query",schema:t().optional()},{name:"start",type:"Query",schema:lt},{name:"end",type:"Query",schema:lt},{name:"active",type:"Query",schema:P(["true","false"]).optional()},{name:"billable",type:"Query",schema:P(["true","false"]).optional()},{name:"type",type:"Query",schema:he.optional()},{name:"limit",type:"Query",schema:g().int().gte(1).lte(500).optional()},{name:"offset",type:"Query",schema:g().int().gte(0).lte(2147483647).optional()},{name:"only_full_dates",type:"Query",schema:P(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:P(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:pt},{name:"user_id",type:"Query",schema:t().optional()},{name:"member_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"client_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"project_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_match_type",type:"Query",schema:P(["contains","not_contains"]).optional()},{name:"task_ids",type:"Query",schema:y(t()).min(1).optional()}],response:o({data:y(mt),meta:o({total:g().int()}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"post",path:"/v1/organizations/:organization/time-entries",alias:"createTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:fo},{name:"organization",type:"Path",schema:t()}],response:o({data:mt}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"patch",path:"/v1/organizations/:organization/time-entries",alias:"updateMultipleTimeEntries",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:go},{name:"organization",type:"Path",schema:t()}],response:o({success:y(t()),error:y(t())}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries",alias:"deleteTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"ids",type:"Query",schema:y(t().uuid())}],response:o({success:t(),error:t()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"put",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"updateTimeEntry",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:yo},{name:"organization",type:"Path",schema:t()},{name:"timeEntry",type:"Path",schema:t()}],response:o({data:mt}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/organizations/:organization/time-entries/:timeEntry",alias:"deleteTimeEntry",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"timeEntry",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate",alias:"getAggregatedTimeEntries",description:`This endpoint allows you to filter time entries and aggregate them by different criteria.
13
16
  The parameters &#x60;group&#x60; and &#x60;sub_group&#x60; allow you to group the time entries by different criteria.
14
- If the group parameters are all set to &#x60;null&#x60; or are all missing, the endpoint will aggregate all filtered time entries.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"]).optional()},{name:"sub_group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"]).optional()},{name:"member_id",type:"Query",schema:e.string().optional()},{name:"user_id",type:"Query",schema:e.string().optional()},{name:"start",type:"Query",schema:ot},{name:"end",type:"Query",schema:ot},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:ut},{name:"member_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"client_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string()).min(1).optional()}],response:e.object({data:e.object({grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.union([e.number(),e.null()]),grouped_type:e.union([e.string(),e.null()]),grouped_data:e.union([e.array(e.object({key:e.union([e.string(),e.null()]),seconds:e.number().int(),cost:e.union([e.number(),e.null()]),grouped_type:e.null(),grouped_data:e.null()}).passthrough()),e.null()])}).passthrough()),e.null()]),seconds:e.number().int(),cost:e.union([e.number(),e.null()])}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate/export",alias:"exportAggregatedTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"format",type:"Query",schema:e.enum(["csv","pdf","xlsx","ods"])},{name:"group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"])},{name:"sub_group",type:"Query",schema:e.enum(["day","week","month","year","user","project","task","client","billable","description","tag"])},{name:"history_group",type:"Query",schema:e.enum(["day","week","month","year"])},{name:"member_id",type:"Query",schema:e.string().optional()},{name:"user_id",type:"Query",schema:e.string().optional()},{name:"start",type:"Query",schema:e.string()},{name:"end",type:"Query",schema:e.string()},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"debug",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:ut},{name:"member_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"client_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string()).min(1).optional()}],response:e.union([e.object({download_url:e.string()}).passthrough(),e.object({html:e.string(),footer_html:e.string()}).passthrough()]),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/export",alias:"exportTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:e.string()},{name:"format",type:"Query",schema:e.enum(["csv","pdf","xlsx","ods"])},{name:"member_id",type:"Query",schema:e.string().uuid().optional()},{name:"start",type:"Query",schema:e.string()},{name:"end",type:"Query",schema:e.string()},{name:"active",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"billable",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"limit",type:"Query",schema:e.number().int().gte(1).lte(500).optional()},{name:"only_full_dates",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"debug",type:"Query",schema:e.enum(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:e.enum(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:ut},{name:"member_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()},{name:"project_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()},{name:"tag_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()},{name:"task_ids",type:"Query",schema:e.array(e.string().uuid()).min(1).optional()}],response:e.union([e.object({download_url:e.string()}).passthrough(),e.object({html:e.string(),footer_html:e.string()}).passthrough()]),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"get",path:"/v1/public/reports",alias:"getPublicReport",description:`This endpoint is public and does not require authentication. The report must be public and not expired.
17
+ If the group parameters are all set to &#x60;null&#x60; or are all missing, the endpoint will aggregate all filtered time entries.`,requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"group",type:"Query",schema:P(["day","week","month","year","user","project","task","client","billable","description","tag","type"]).optional()},{name:"sub_group",type:"Query",schema:P(["day","week","month","year","user","project","task","client","billable","description","tag","type"]).optional()},{name:"member_id",type:"Query",schema:t().optional()},{name:"user_id",type:"Query",schema:t().optional()},{name:"start",type:"Query",schema:lt},{name:"end",type:"Query",schema:lt},{name:"active",type:"Query",schema:P(["true","false"]).optional()},{name:"billable",type:"Query",schema:P(["true","false"]).optional()},{name:"type",type:"Query",schema:he.optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:P(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:P(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:pt},{name:"member_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"project_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"client_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_match_type",type:"Query",schema:P(["contains","not_contains"]).optional()},{name:"task_ids",type:"Query",schema:y(t()).min(1).optional()}],response:o({data:o({grouped_type:h([t(),d()]),grouped_data:h([y(o({key:h([t(),d()]),seconds:g().int(),cost:h([g(),d()]),grouped_type:h([t(),d()]),grouped_data:h([y(o({key:h([t(),d()]),seconds:g().int(),cost:h([g(),d()]),grouped_type:d(),grouped_data:d()}).passthrough()),d()])}).passthrough()),d()]),seconds:g().int(),cost:h([g(),d()])}).passthrough()}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/aggregate/export",alias:"exportAggregatedTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"format",type:"Query",schema:P(["csv","pdf","xlsx","ods"])},{name:"group",type:"Query",schema:P(["day","week","month","year","user","project","task","client","billable","description","tag","type"])},{name:"sub_group",type:"Query",schema:P(["day","week","month","year","user","project","task","client","billable","description","tag","type"])},{name:"history_group",type:"Query",schema:P(["day","week","month","year"])},{name:"member_id",type:"Query",schema:t().optional()},{name:"user_id",type:"Query",schema:t().optional()},{name:"start",type:"Query",schema:t()},{name:"end",type:"Query",schema:t()},{name:"active",type:"Query",schema:P(["true","false"]).optional()},{name:"billable",type:"Query",schema:P(["true","false"]).optional()},{name:"type",type:"Query",schema:he.optional()},{name:"fill_gaps_in_time_groups",type:"Query",schema:P(["true","false"]).optional()},{name:"debug",type:"Query",schema:P(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:P(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:pt},{name:"member_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"project_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"client_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_match_type",type:"Query",schema:P(["contains","not_contains"]).optional()},{name:"task_ids",type:"Query",schema:y(t()).min(1).optional()}],response:h([o({download_url:t()}).passthrough(),o({html:t(),footer_html:t()}).passthrough()]),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/organizations/:organization/time-entries/export",alias:"exportTimeEntries",requestFormat:"json",parameters:[{name:"organization",type:"Path",schema:t()},{name:"format",type:"Query",schema:P(["csv","pdf","xlsx","ods"])},{name:"member_id",type:"Query",schema:t().uuid().optional()},{name:"start",type:"Query",schema:t()},{name:"end",type:"Query",schema:t()},{name:"active",type:"Query",schema:P(["true","false"]).optional()},{name:"billable",type:"Query",schema:P(["true","false"]).optional()},{name:"type",type:"Query",schema:he.optional()},{name:"limit",type:"Query",schema:g().int().gte(1).lte(500).optional()},{name:"only_full_dates",type:"Query",schema:P(["true","false"]).optional()},{name:"debug",type:"Query",schema:P(["true","false"]).optional()},{name:"rounding_type",type:"Query",schema:P(["up","down","nearest"]).optional()},{name:"rounding_minutes",type:"Query",schema:pt},{name:"member_ids",type:"Query",schema:y(t().uuid()).min(1).optional()},{name:"client_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"project_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_ids",type:"Query",schema:y(t()).min(1).optional()},{name:"tag_match_type",type:"Query",schema:P(["contains","not_contains"]).optional()},{name:"task_ids",type:"Query",schema:y(t()).min(1).optional()}],response:h([o({download_url:t()}).passthrough(),o({html:t(),footer_html:t()}).passthrough()]),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"get",path:"/v1/public/reports",alias:"getPublicReport",description:`This endpoint is public and does not require authentication. The report must be public and not expired.
15
18
  The report is considered expired if the &#x60;public_until&#x60; field is set and the date is in the past.
16
- The report is considered public if the &#x60;is_public&#x60; field is set to &#x60;true&#x60;.`,requestFormat:"json",response:oi,errors:[{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me",alias:"getMe",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:mi}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/api-tokens",alias:"getApiTokens",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:Ia}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/users/me/api-tokens",alias:"createApiToken",description:`The response will contain the access token that can be used to send authenticated API requests.
17
- Please note that the access token is only shown in this response and cannot be retrieved later.`,requestFormat:"json",parameters:[{name:"body",type:"Body",schema:e.object({name:e.string().min(1).max(255)}).passthrough()}],response:e.object({data:Ua}).passthrough(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:422,description:"Validation error",schema:e.object({message:e.string(),errors:e.record(e.array(e.string()))}).passthrough()}]},{method:"delete",path:"/v1/users/me/api-tokens/:apiToken",alias:"deleteApiToken",requestFormat:"json",parameters:[{name:"apiToken",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"post",path:"/v1/users/me/api-tokens/:apiToken/revoke",alias:"revokeApiToken",requestFormat:"json",parameters:[{name:"apiToken",type:"Path",schema:e.string()}],response:e.void(),errors:[{status:400,description:"API exception",schema:e.object({error:e.boolean(),key:e.string(),message:e.string()}).passthrough()},{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/memberships",alias:"getMyMemberships",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:e.array(gi)}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()}]},{method:"get",path:"/v1/users/me/time-entries/active",alias:"getMyActiveTimeEntry",description:"This endpoint is independent of organization.",requestFormat:"json",response:e.object({data:ct}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:e.object({message:e.string()}).passthrough()},{status:403,description:"Authorization error",schema:e.object({message:e.string()}).passthrough()},{status:404,description:"Not found",schema:e.object({message:e.string()}).passthrough()}]}]);new Ws("/api",tr);function sr(s,t){return new Ws(s,tr,t)}const fi=sr("/api",{validate:"none"});ne.api=fi,ne.createApiClient=sr,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
19
+ The report is considered public if the &#x60;is_public&#x60; field is set to &#x60;true&#x60;.`,requestFormat:"json",response:lo,errors:[{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/users/me",alias:"getMe",description:"This endpoint is independent of the organization.",requestFormat:"json",response:o({data:ts}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()}]},{method:"put",path:"/v1/users/me/current-organization",alias:"updateMyCurrentOrganization",description:`Switches the organization that the user is currently working in. The user
20
+ must be a member of the given organization. This endpoint is independent of
21
+ the organization.`,requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({organization_id:t().uuid()}).passthrough()}],response:o({data:ts}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"put",path:"/v1/users/:user",alias:"updateUser",description:"This endpoint is independent of the organization.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:_o},{name:"user",type:"Path",schema:t()}],response:o({data:ts}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/users/:user",alias:"deleteUser",description:"This endpoint is independent of the organization.",requestFormat:"json",parameters:[{name:"body",type:"Body",schema:na},{name:"user",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/users/:user/reset-pending-email",alias:"resetUserPendingEmail",description:"This endpoint is independent of the organization.",requestFormat:"json",parameters:[{name:"user",type:"Path",schema:t()}],response:M(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/users/:user/resend-email-verification",alias:"resendUserEmailVerification",description:"This endpoint is independent of the organization.",requestFormat:"json",parameters:[{name:"user",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/users/me/api-tokens",alias:"getApiTokens",description:"This endpoint is independent of organization.",requestFormat:"json",response:o({data:Ln}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/users/me/api-tokens",alias:"createApiToken",description:`The response will contain the access token that can be used to send authenticated API requests.
22
+ Please note that the access token is only shown in this response and cannot be retrieved later.`,requestFormat:"json",parameters:[{name:"body",type:"Body",schema:o({name:t().min(1).max(255)}).passthrough()}],response:o({data:Bn}).passthrough(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:422,description:"Validation error",schema:o({message:t(),errors:N(y(t()))}).passthrough()}]},{method:"delete",path:"/v1/users/me/api-tokens/:apiToken",alias:"deleteApiToken",requestFormat:"json",parameters:[{name:"apiToken",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"post",path:"/v1/users/me/api-tokens/:apiToken/revoke",alias:"revokeApiToken",requestFormat:"json",parameters:[{name:"apiToken",type:"Path",schema:t()}],response:M(),errors:[{status:400,description:"API exception",schema:o({error:v(),key:t(),message:t()}).passthrough()},{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/users/me/memberships",alias:"getMyMemberships",description:"This endpoint is independent of organization.",requestFormat:"json",response:o({data:y(bo)}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()}]},{method:"get",path:"/v1/users/me/time-entries/active",alias:"getMyActiveTimeEntry",description:"This endpoint is independent of organization.",requestFormat:"json",response:o({data:mt}).passthrough(),errors:[{status:401,description:"Unauthenticated",schema:o({message:t()}).passthrough()},{status:403,description:"Authorization error",schema:o({message:t()}).passthrough()},{status:404,description:"Not found",schema:o({message:t()}).passthrough()}]}]);new ra("/api",da);function ha(s,e){return new ra(s,da,e)}const vo=ha("/api",{validate:"none"});fe.api=vo,fe.createApiClient=ha,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));