garm/webapp/assets/_app/immutable/chunks/CiE1LlKV.js
Gabriel Adrian Samfira eec158b32c Add SPA UI for GARM
This change adds a single page application front-end to GARM. It uses
a generated REST client, built from the swagger definitions, the websocket
interface for live updates of entities and eager loading of everything
except runners, as users may have many runners and we don't want to load
hundreds of runners in memory.

Proper pagination should be implemented in the API, in future commits,
to avoid loading lots of elements for no reason.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-08-16 09:09:13 +00:00

7 lines
132 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import"./DsnmJJEf.js";import{i as Tr}from"./B3Pzt0F_.js";import{t as Ie,K as Y,L as Ke,aj as Br,aW as Dr,T as ht,a3 as Lr,af as jr,aX as kr,aY as zr,aZ as ut,Y as Fr,a_ as Gr,Z as we,M as Jt,ae as Xe,P as Kt,F as ot,a8 as _r,a$ as qr,b0 as Hr,aw as $r,W as Nr,b1 as Wr,b2 as Qr,b3 as Mr,g as k,b4 as Jr,b5 as Kr,a2 as Ot,b6 as Xr,b7 as Yr,b8 as Zr,b9 as es,ba as ts,at as rs,bb as ss,bc as as,bd as os,be as ns,p as ls,E as is,l as ee,a as cs,f as ps,e as ds,c as ue,d as hs,n as oe,m as te,s as re,j as qe,k as Pt,r as He,C as nt,B as us,b as Os}from"./D8EpLgQ1.js";import{l as bt,p as se,i as $e}from"./5WA7h8uK.js";function mt(t,e,r=!1,s=!1,o=!1){var a=t,n="";Ie(()=>{var l=Br;if(n===(n=e()??"")){Y&&Ke();return}if(l.nodes_start!==null&&(Dr(l.nodes_start,l.nodes_end),l.nodes_start=l.nodes_end=null),n!==""){if(Y){ht.data;for(var i=Ke(),c=i;i!==null&&(i.nodeType!==Lr||i.data!=="");)c=i,i=jr(i);if(i===null)throw kr(),zr;ut(ht,c),a=Fr(i);return}var p=n+"";r?p=`<svg>${p}</svg>`:s&&(p=`<math>${p}</math>`);var R=Gr(p);if((r||s)&&(R=we(R)),ut(we(R),R.lastChild),r||s)for(;we(R);)a.before(we(R));else a.before(R)}})}function Ps(t,e,r,s,o){Y&&Ke();var a=e.$$slots?.[r],n=!1;a===!0&&(a=e[r==="default"?"children":r],n=!0),a===void 0||a(t,n?()=>s:s)}function bs(t,e){var r=void 0,s;Jt(()=>{r!==(r=e())&&(s&&(Xe(s),s=null),r&&(s=Kt(()=>{ot(()=>r(t))})))})}function Xt(t){var e,r,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Xt(t[e]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}function ms(){for(var t,e,r=0,s="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Xt(t))&&(s&&(s+=" "),s+=e);return s}function Vs(t){return typeof t=="object"?ms(t):t??""}const Vt=[...`
\r\f \v\uFEFF`];function Ss(t,e,r){var s=t==null?"":""+t;if(e&&(s=s?s+" "+e:e),r){for(var o in r)if(r[o])s=s?s+" "+o:o;else if(s.length)for(var a=o.length,n=0;(n=s.indexOf(o,n))>=0;){var l=n+a;(n===0||Vt.includes(s[n-1]))&&(l===s.length||Vt.includes(s[l]))?s=(n===0?"":s.substring(0,n))+s.substring(l+1):n=l}}return s===""?null:s}function St(t,e=!1){var r=e?" !important;":";",s="";for(var o in t){var a=t[o];a!=null&&a!==""&&(s+=" "+o+": "+a+r)}return s}function Ne(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function As(t,e){if(e){var r="",s,o;if(Array.isArray(e)?(s=e[0],o=e[1]):s=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,n=0,l=!1,i=[];s&&i.push(...Object.keys(s).map(Ne)),o&&i.push(...Object.keys(o).map(Ne));var c=0,p=-1;const y=t.length;for(var R=0;R<y;R++){var I=t[R];if(l?I==="/"&&t[R-1]==="*"&&(l=!1):a?a===I&&(a=!1):I==="/"&&t[R+1]==="*"?l=!0:I==='"'||I==="'"?a=I:I==="("?n++:I===")"&&n--,!l&&a===!1&&n===0){if(I===":"&&p===-1)p=R;else if(I===";"||R===y-1){if(p!==-1){var T=Ne(t.substring(c,p).trim());if(!i.includes(T)){I!==";"&&R++;var f=t.substring(c,R).trim();r+=" "+f+";"}}c=R+1,p=-1}}}}return s&&(r+=St(s)),o&&(r+=St(o,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Ee(t,e,r,s,o,a){var n=t.__className;if(Y||n!==r||n===void 0){var l=Ss(r,s,a);(!Y||l!==t.getAttribute("class"))&&(l==null?t.removeAttribute("class"):e?t.className=l:t.setAttribute("class",l)),t.__className=r}else if(a&&o!==a)for(var i in a){var c=!!a[i];(o==null||c!==!!o[i])&&t.classList.toggle(i,c)}return a}function We(t,e={},r,s){for(var o in r){var a=r[o];e[o]!==a&&(r[o]==null?t.style.removeProperty(o):t.style.setProperty(o,a,s))}}function Rs(t,e,r,s){var o=t.__style;if(Y||o!==e){var a=As(e,s);(!Y||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else s&&(Array.isArray(s)?(We(t,r?.[0],s[0]),We(t,r?.[1],s[1],"important")):We(t,r,s));return s}function Ce(t,e,r=!1){if(t.multiple){if(e==null)return;if(!_r(e))return qr();for(var s of t.options)s.selected=e.includes(me(s));return}for(s of t.options){var o=me(s);if(Hr(o,e)){s.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Yt(t){var e=new MutationObserver(()=>{Ce(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),$r(()=>{e.disconnect()})}function Uo(t,e,r=e){var s=!0;Nr(t,"change",o=>{var a=o?"[selected]":":checked",n;if(t.multiple)n=[].map.call(t.querySelectorAll(a),me);else{var l=t.querySelector(a)??t.querySelector("option:not([disabled])");n=l&&me(l)}r(n)}),ot(()=>{var o=e();if(Ce(t,o,s),s&&o===void 0){var a=t.querySelector(":checked");a!==null&&(o=me(a),r(o))}t.__value=o,s=!1}),Yt(t)}function me(t){return"__value"in t?t.__value:t.value}const Oe=Symbol("class"),Pe=Symbol("style"),Zt=Symbol("is custom element"),er=Symbol("is html");function To(t){if(Y){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var s=t.value;Ue(t,"value",null),t.value=s}if(t.hasAttribute("checked")){var o=t.checked;Ue(t,"checked",null),t.checked=o}}};t.__on_r=r,ss(r),as()}}function Bo(t,e){var r=lt(t);r.value===(r.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function fs(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ue(t,e,r,s){var o=lt(t);Y&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="loading"&&(t[os]=r),r==null?t.removeAttribute(e):typeof r!="string"&&tr(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function ys(t,e,r,s,o=!1){var a=lt(t),n=a[Zt],l=!a[er];let i=Y&&n;i&&Ot(!1);var c=e||{},p=t.tagName==="OPTION";for(var R in e)R in r||(r[R]=null);r.class?r.class=Vs(r.class):r[Oe]&&(r.class=null),r[Pe]&&(r.style??=null);var I=tr(t);for(const E in r){let v=r[E];if(p&&E==="value"&&v==null){t.value=t.__value="",c[E]=v;continue}if(E==="class"){var T=t.namespaceURI==="http://www.w3.org/1999/xhtml";Ee(t,T,v,s,e?.[Oe],r[Oe]),c[E]=v,c[Oe]=r[Oe];continue}if(E==="style"){Rs(t,v,e?.[Pe],r[Pe]),c[E]=v,c[Pe]=r[Pe];continue}var f=c[E];if(!(v===f&&!(v===void 0&&t.hasAttribute(E)))){c[E]=v;var y=E[0]+E[1];if(y!=="$$")if(y==="on"){const U={},L="$$"+E;let B=E.slice(2);var w=ns(B);if(Xr(B)&&(B=B.slice(0,-7),U.capture=!0),!w&&f){if(v!=null)continue;t.removeEventListener(B,c[L],U),c[L]=null}if(v!=null)if(w)t[`__${B}`]=v,Zr([B]);else{let Z=function(ce){c[E].call(this,ce)};c[L]=Yr(B,t,Z,U)}else w&&(t[`__${B}`]=void 0)}else if(E==="style")Ue(t,E,v);else if(E==="autofocus")es(t,!!v);else if(!n&&(E==="__value"||E==="value"&&v!=null))t.value=t.__value=v;else if(E==="selected"&&p)fs(t,v);else{var C=E;l||(C=ts(C));var D=C==="defaultValue"||C==="defaultChecked";if(v==null&&!n&&!D)if(a[E]=null,C==="value"||C==="checked"){let U=t;const L=e===void 0;if(C==="value"){let B=U.defaultValue;U.removeAttribute(C),U.defaultValue=B,U.value=U.__value=L?B:null}else{let B=U.defaultChecked;U.removeAttribute(C),U.defaultChecked=B,U.checked=L?B:!1}}else t.removeAttribute(E);else D||I.includes(C)&&(n||typeof v!="string")?(t[C]=v,C in a&&(a[C]=rs)):typeof v!="function"&&Ue(t,C,v)}}}return i&&Ot(!0),c}function ws(t,e,r=[],s=[],o,a=!1){Wr(r,s,n=>{var l=void 0,i={},c=t.nodeName==="SELECT",p=!1;if(Jt(()=>{var I=e(...n.map(k)),T=ys(t,l,I,o,a);p&&c&&"value"in I&&Ce(t,I.value);for(let y of Object.getOwnPropertySymbols(i))I[y]||Xe(i[y]);for(let y of Object.getOwnPropertySymbols(I)){var f=I[y];y.description===Jr&&(!l||f!==l[y])&&(i[y]&&Xe(i[y]),i[y]=Kt(()=>bs(t,()=>f))),T[y]=f}l=T}),c){var R=t;ot(()=>{Ce(R,l.value,!0),Yt(R)})}p=!0})}function lt(t){return t.__attributes??={[Zt]:t.nodeName.includes("-"),[er]:t.namespaceURI===Qr}}var At=new Map;function tr(t){var e=At.get(t.nodeName);if(e)return e;At.set(t.nodeName,e=[]);for(var r,s=t,o=Element.prototype;o!==s;){r=Kr(s);for(var a in r)r[a].set&&e.push(a);s=Mr(s)}return e}function rr(t,e){return function(){return t.apply(e,arguments)}}const{toString:Is}=Object.prototype,{getPrototypeOf:it}=Object,{iterator:De,toStringTag:sr}=Symbol,Le=(t=>e=>{const r=Is.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),N=t=>(t=t.toLowerCase(),e=>Le(e)===t),je=t=>e=>typeof e===t,{isArray:de}=Array,Ve=je("undefined");function Se(t){return t!==null&&!Ve(t)&&t.constructor!==null&&!Ve(t.constructor)&&_(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ar=N("ArrayBuffer");function Es(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ar(t.buffer),e}const gs=je("string"),_=je("function"),or=je("number"),Ae=t=>t!==null&&typeof t=="object",xs=t=>t===!0||t===!1,ge=t=>{if(Le(t)!=="object")return!1;const e=it(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(sr in t)&&!(De in t)},vs=t=>{if(!Ae(t)||Se(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Cs=N("Date"),Us=N("File"),Ts=N("Blob"),Bs=N("FileList"),Ds=t=>Ae(t)&&_(t.pipe),Ls=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_(t.append)&&((e=Le(t))==="formdata"||e==="object"&&_(t.toString)&&t.toString()==="[object FormData]"))},js=N("URLSearchParams"),[ks,zs,Fs,Gs]=["ReadableStream","Request","Response","Headers"].map(N),_s=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Re(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,o;if(typeof t!="object"&&(t=[t]),de(t))for(s=0,o=t.length;s<o;s++)e.call(null,t[s],s,t);else{if(Se(t))return;const a=r?Object.getOwnPropertyNames(t):Object.keys(t),n=a.length;let l;for(s=0;s<n;s++)l=a[s],e.call(null,t[l],l,t)}}function nr(t,e){if(Se(t))return null;e=e.toLowerCase();const r=Object.keys(t);let s=r.length,o;for(;s-- >0;)if(o=r[s],e===o.toLowerCase())return o;return null}const ne=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lr=t=>!Ve(t)&&t!==ne;function Ye(){const{caseless:t}=lr(this)&&this||{},e={},r=(s,o)=>{const a=t&&nr(e,o)||o;ge(e[a])&&ge(s)?e[a]=Ye(e[a],s):ge(s)?e[a]=Ye({},s):de(s)?e[a]=s.slice():e[a]=s};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Re(arguments[s],r);return e}const qs=(t,e,r,{allOwnKeys:s}={})=>(Re(e,(o,a)=>{r&&_(o)?t[a]=rr(o,r):t[a]=o},{allOwnKeys:s}),t),Hs=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),$s=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Ns=(t,e,r,s)=>{let o,a,n;const l={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)n=o[a],(!s||s(n,t,e))&&!l[n]&&(e[n]=t[n],l[n]=!0);t=r!==!1&&it(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Ws=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},Qs=t=>{if(!t)return null;if(de(t))return t;let e=t.length;if(!or(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Ms=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&it(Uint8Array)),Js=(t,e)=>{const s=(t&&t[De]).call(t);let o;for(;(o=s.next())&&!o.done;){const a=o.value;e.call(t,a[0],a[1])}},Ks=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},Xs=N("HTMLFormElement"),Ys=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),Rt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Zs=N("RegExp"),ir=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};Re(r,(o,a)=>{let n;(n=e(o,a,t))!==!1&&(s[a]=n||o)}),Object.defineProperties(t,s)},ea=t=>{ir(t,(e,r)=>{if(_(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=t[r];if(_(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ta=(t,e)=>{const r={},s=o=>{o.forEach(a=>{r[a]=!0})};return de(t)?s(t):s(String(t).split(e)),r},ra=()=>{},sa=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function aa(t){return!!(t&&_(t.append)&&t[sr]==="FormData"&&t[De])}const oa=t=>{const e=new Array(10),r=(s,o)=>{if(Ae(s)){if(e.indexOf(s)>=0)return;if(Se(s))return s;if(!("toJSON"in s)){e[o]=s;const a=de(s)?[]:{};return Re(s,(n,l)=>{const i=r(n,o+1);!Ve(i)&&(a[l]=i)}),e[o]=void 0,a}}return s};return r(t,0)},na=N("AsyncFunction"),la=t=>t&&(Ae(t)||_(t))&&_(t.then)&&_(t.catch),cr=((t,e)=>t?setImmediate:e?((r,s)=>(ne.addEventListener("message",({source:o,data:a})=>{o===ne&&a===r&&s.length&&s.shift()()},!1),o=>{s.push(o),ne.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_(ne.postMessage)),ia=typeof queueMicrotask<"u"?queueMicrotask.bind(ne):typeof process<"u"&&process.nextTick||cr,ca=t=>t!=null&&_(t[De]),h={isArray:de,isArrayBuffer:ar,isBuffer:Se,isFormData:Ls,isArrayBufferView:Es,isString:gs,isNumber:or,isBoolean:xs,isObject:Ae,isPlainObject:ge,isEmptyObject:vs,isReadableStream:ks,isRequest:zs,isResponse:Fs,isHeaders:Gs,isUndefined:Ve,isDate:Cs,isFile:Us,isBlob:Ts,isRegExp:Zs,isFunction:_,isStream:Ds,isURLSearchParams:js,isTypedArray:Ms,isFileList:Bs,forEach:Re,merge:Ye,extend:qs,trim:_s,stripBOM:Hs,inherits:$s,toFlatObject:Ns,kindOf:Le,kindOfTest:N,endsWith:Ws,toArray:Qs,forEachEntry:Js,matchAll:Ks,isHTMLForm:Xs,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:ir,freezeMethods:ea,toObjectSet:ta,toCamelCase:Ys,noop:ra,toFiniteNumber:sa,findKey:nr,global:ne,isContextDefined:lr,isSpecCompliantForm:aa,toJSONObject:oa,isAsyncFn:na,isThenable:la,setImmediate:cr,asap:ia,isIterable:ca};function g(t,e,r,s,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status?o.status:null)}h.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.status}}});const pr=g.prototype,dr={};["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(t=>{dr[t]={value:t}});Object.defineProperties(g,dr);Object.defineProperty(pr,"isAxiosError",{value:!0});g.from=(t,e,r,s,o,a)=>{const n=Object.create(pr);return h.toFlatObject(t,n,function(i){return i!==Error.prototype},l=>l!=="isAxiosError"),g.call(n,t.message,e,r,s,o),n.cause=t,n.name=t.name,a&&Object.assign(n,a),n};const pa=null;function Ze(t){return h.isPlainObject(t)||h.isArray(t)}function hr(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function ft(t,e,r){return t?t.concat(e).map(function(o,a){return o=hr(o),!r&&a?"["+o+"]":o}).join(r?".":""):e}function da(t){return h.isArray(t)&&!t.some(Ze)}const ha=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function ke(t,e,r){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=h.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,w){return!h.isUndefined(w[y])});const s=r.metaTokens,o=r.visitor||p,a=r.dots,n=r.indexes,i=(r.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(o))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(h.isDate(f))return f.toISOString();if(h.isBoolean(f))return f.toString();if(!i&&h.isBlob(f))throw new g("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(f)||h.isTypedArray(f)?i&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function p(f,y,w){let C=f;if(f&&!w&&typeof f=="object"){if(h.endsWith(y,"{}"))y=s?y:y.slice(0,-2),f=JSON.stringify(f);else if(h.isArray(f)&&da(f)||(h.isFileList(f)||h.endsWith(y,"[]"))&&(C=h.toArray(f)))return y=hr(y),C.forEach(function(E,v){!(h.isUndefined(E)||E===null)&&e.append(n===!0?ft([y],v,a):n===null?y:y+"[]",c(E))}),!1}return Ze(f)?!0:(e.append(ft(w,y,a),c(f)),!1)}const R=[],I=Object.assign(ha,{defaultVisitor:p,convertValue:c,isVisitable:Ze});function T(f,y){if(!h.isUndefined(f)){if(R.indexOf(f)!==-1)throw Error("Circular reference detected in "+y.join("."));R.push(f),h.forEach(f,function(C,D){(!(h.isUndefined(C)||C===null)&&o.call(e,C,h.isString(D)?D.trim():D,y,I))===!0&&T(C,y?y.concat(D):[D])}),R.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return T(t),e}function yt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function ct(t,e){this._pairs=[],t&&ke(t,this,e)}const ur=ct.prototype;ur.append=function(e,r){this._pairs.push([e,r])};ur.toString=function(e){const r=e?function(s){return e.call(this,s,yt)}:yt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ua(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Or(t,e,r){if(!e)return t;const s=r&&r.encode||ua;h.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let a;if(o?a=o(e,r):a=h.isURLSearchParams(e)?e.toString():new ct(e,r).toString(s),a){const n=t.indexOf("#");n!==-1&&(t=t.slice(0,n)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class wt{constructor(){this.handlers=[]}use(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(s){s!==null&&e(s)})}}const Pr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oa=typeof URLSearchParams<"u"?URLSearchParams:ct,Pa=typeof FormData<"u"?FormData:null,ba=typeof Blob<"u"?Blob:null,ma={isBrowser:!0,classes:{URLSearchParams:Oa,FormData:Pa,Blob:ba},protocols:["http","https","file","blob","url","data"]},pt=typeof window<"u"&&typeof document<"u",et=typeof navigator=="object"&&navigator||void 0,Va=pt&&(!et||["ReactNative","NativeScript","NS"].indexOf(et.product)<0),Sa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Aa=pt&&window.location.href||"http://localhost",Ra=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pt,hasStandardBrowserEnv:Va,hasStandardBrowserWebWorkerEnv:Sa,navigator:et,origin:Aa},Symbol.toStringTag,{value:"Module"})),G={...Ra,...ma};function fa(t,e){return ke(t,new G.classes.URLSearchParams,{visitor:function(r,s,o,a){return G.isNode&&h.isBuffer(r)?(this.append(s,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function ya(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wa(t){const e={},r=Object.keys(t);let s;const o=r.length;let a;for(s=0;s<o;s++)a=r[s],e[a]=t[a];return e}function br(t){function e(r,s,o,a){let n=r[a++];if(n==="__proto__")return!0;const l=Number.isFinite(+n),i=a>=r.length;return n=!n&&h.isArray(o)?o.length:n,i?(h.hasOwnProp(o,n)?o[n]=[o[n],s]:o[n]=s,!l):((!o[n]||!h.isObject(o[n]))&&(o[n]=[]),e(r,s,o[n],a)&&h.isArray(o[n])&&(o[n]=wa(o[n])),!l)}if(h.isFormData(t)&&h.isFunction(t.entries)){const r={};return h.forEachEntry(t,(s,o)=>{e(ya(s),o,r,0)}),r}return null}function Ia(t,e,r){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const fe={transitional:Pr,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const s=r.getContentType()||"",o=s.indexOf("application/json")>-1,a=h.isObject(e);if(a&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return o?JSON.stringify(br(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e)||h.isReadableStream(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return fa(e,this.formSerializer).toString();if((l=h.isFileList(e))||s.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return ke(l?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),Ia(e)):e}],transformResponse:[function(e){const r=this.transitional||fe.transitional,s=r&&r.forcedJSONParsing,o=this.responseType==="json";if(h.isResponse(e)||h.isReadableStream(e))return e;if(e&&h.isString(e)&&(s&&!this.responseType||o)){const n=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(l){if(n)throw l.name==="SyntaxError"?g.from(l,g.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:G.classes.FormData,Blob:G.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],t=>{fe.headers[t]={}});const Ea=h.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"]),ga=t=>{const e={};let r,s,o;return t&&t.split(`
`).forEach(function(n){o=n.indexOf(":"),r=n.substring(0,o).trim().toLowerCase(),s=n.substring(o+1).trim(),!(!r||e[r]&&Ea[r])&&(r==="set-cookie"?e[r]?e[r].push(s):e[r]=[s]:e[r]=e[r]?e[r]+", "+s:s)}),e},It=Symbol("internals");function be(t){return t&&String(t).trim().toLowerCase()}function xe(t){return t===!1||t==null?t:h.isArray(t)?t.map(xe):String(t)}function xa(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const va=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qe(t,e,r,s,o){if(h.isFunction(s))return s.call(this,e,r);if(o&&(e=r),!!h.isString(e)){if(h.isString(s))return e.indexOf(s)!==-1;if(h.isRegExp(s))return s.test(e)}}function Ca(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function Ua(t,e){const r=h.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(o,a,n){return this[s].call(this,e,o,a,n)},configurable:!0})})}let q=class{constructor(e){e&&this.set(e)}set(e,r,s){const o=this;function a(l,i,c){const p=be(i);if(!p)throw new Error("header name must be a non-empty string");const R=h.findKey(o,p);(!R||o[R]===void 0||c===!0||c===void 0&&o[R]!==!1)&&(o[R||i]=xe(l))}const n=(l,i)=>h.forEach(l,(c,p)=>a(c,p,i));if(h.isPlainObject(e)||e instanceof this.constructor)n(e,r);else if(h.isString(e)&&(e=e.trim())&&!va(e))n(ga(e),r);else if(h.isObject(e)&&h.isIterable(e)){let l={},i,c;for(const p of e){if(!h.isArray(p))throw TypeError("Object iterator must return a key-value pair");l[c=p[0]]=(i=l[c])?h.isArray(i)?[...i,p[1]]:[i,p[1]]:p[1]}n(l,r)}else e!=null&&a(r,e,s);return this}get(e,r){if(e=be(e),e){const s=h.findKey(this,e);if(s){const o=this[s];if(!r)return o;if(r===!0)return xa(o);if(h.isFunction(r))return r.call(this,o,s);if(h.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=be(e),e){const s=h.findKey(this,e);return!!(s&&this[s]!==void 0&&(!r||Qe(this,this[s],s,r)))}return!1}delete(e,r){const s=this;let o=!1;function a(n){if(n=be(n),n){const l=h.findKey(s,n);l&&(!r||Qe(s,s[l],l,r))&&(delete s[l],o=!0)}}return h.isArray(e)?e.forEach(a):a(e),o}clear(e){const r=Object.keys(this);let s=r.length,o=!1;for(;s--;){const a=r[s];(!e||Qe(this,this[a],a,e,!0))&&(delete this[a],o=!0)}return o}normalize(e){const r=this,s={};return h.forEach(this,(o,a)=>{const n=h.findKey(s,a);if(n){r[n]=xe(o),delete r[a];return}const l=e?Ca(a):String(a).trim();l!==a&&delete r[a],r[l]=xe(o),s[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return h.forEach(this,(s,o)=>{s!=null&&s!==!1&&(r[o]=e&&h.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}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,...r){const s=new this(e);return r.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[It]=this[It]={accessors:{}}).accessors,o=this.prototype;function a(n){const l=be(n);s[l]||(Ua(o,n),s[l]=!0)}return h.isArray(e)?e.forEach(a):a(e),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);h.reduceDescriptors(q.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}});h.freezeMethods(q);function Me(t,e){const r=this||fe,s=e||r,o=q.from(s.headers);let a=s.data;return h.forEach(t,function(l){a=l.call(r,a,o.normalize(),e?e.status:void 0)}),o.normalize(),a}function mr(t){return!!(t&&t.__CANCEL__)}function he(t,e,r){g.call(this,t??"canceled",g.ERR_CANCELED,e,r),this.name="CanceledError"}h.inherits(he,g,{__CANCEL__:!0});function Vr(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ta(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ba(t,e){t=t||10;const r=new Array(t),s=new Array(t);let o=0,a=0,n;return e=e!==void 0?e:1e3,function(i){const c=Date.now(),p=s[a];n||(n=c),r[o]=i,s[o]=c;let R=a,I=0;for(;R!==o;)I+=r[R++],R=R%t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),c-n<e)return;const T=p&&c-p;return T?Math.round(I*1e3/T):void 0}}function Da(t,e){let r=0,s=1e3/e,o,a;const n=(c,p=Date.now())=>{r=p,o=null,a&&(clearTimeout(a),a=null),t(...c)};return[(...c)=>{const p=Date.now(),R=p-r;R>=s?n(c,p):(o=c,a||(a=setTimeout(()=>{a=null,n(o)},s-R)))},()=>o&&n(o)]}const Te=(t,e,r=3)=>{let s=0;const o=Ba(50,250);return Da(a=>{const n=a.loaded,l=a.lengthComputable?a.total:void 0,i=n-s,c=o(i),p=n<=l;s=n;const R={loaded:n,total:l,progress:l?n/l:void 0,bytes:i,rate:c||void 0,estimated:c&&l&&p?(l-n)/c:void 0,event:a,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(R)},r)},Et=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},gt=t=>(...e)=>h.asap(()=>t(...e)),La=G.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,G.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(G.origin),G.navigator&&/(msie|trident)/i.test(G.navigator.userAgent)):()=>!0,ja=G.hasStandardBrowserEnv?{write(t,e,r,s,o,a){const n=[t+"="+encodeURIComponent(e)];h.isNumber(r)&&n.push("expires="+new Date(r).toGMTString()),h.isString(s)&&n.push("path="+s),h.isString(o)&&n.push("domain="+o),a===!0&&n.push("secure"),document.cookie=n.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ka(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function za(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Sr(t,e,r){let s=!ka(e);return t&&(s||r==!1)?za(t,e):e}const xt=t=>t instanceof q?{...t}:t;function ie(t,e){e=e||{};const r={};function s(c,p,R,I){return h.isPlainObject(c)&&h.isPlainObject(p)?h.merge.call({caseless:I},c,p):h.isPlainObject(p)?h.merge({},p):h.isArray(p)?p.slice():p}function o(c,p,R,I){if(h.isUndefined(p)){if(!h.isUndefined(c))return s(void 0,c,R,I)}else return s(c,p,R,I)}function a(c,p){if(!h.isUndefined(p))return s(void 0,p)}function n(c,p){if(h.isUndefined(p)){if(!h.isUndefined(c))return s(void 0,c)}else return s(void 0,p)}function l(c,p,R){if(R in e)return s(c,p);if(R in t)return s(void 0,c)}const i={url:a,method:a,data:a,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:l,headers:(c,p,R)=>o(xt(c),xt(p),R,!0)};return h.forEach(Object.keys({...t,...e}),function(p){const R=i[p]||o,I=R(t[p],e[p],p);h.isUndefined(I)&&R!==l||(r[p]=I)}),r}const Ar=t=>{const e=ie({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:a,headers:n,auth:l}=e;e.headers=n=q.from(n),e.url=Or(Sr(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&n.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let i;if(h.isFormData(r)){if(G.hasStandardBrowserEnv||G.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if((i=n.getContentType())!==!1){const[c,...p]=i?i.split(";").map(R=>R.trim()).filter(Boolean):[];n.setContentType([c||"multipart/form-data",...p].join("; "))}}if(G.hasStandardBrowserEnv&&(s&&h.isFunction(s)&&(s=s(e)),s||s!==!1&&La(e.url))){const c=o&&a&&ja.read(a);c&&n.set(o,c)}return e},Fa=typeof XMLHttpRequest<"u",Ga=Fa&&function(t){return new Promise(function(r,s){const o=Ar(t);let a=o.data;const n=q.from(o.headers).normalize();let{responseType:l,onUploadProgress:i,onDownloadProgress:c}=o,p,R,I,T,f;function y(){T&&T(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function C(){if(!w)return;const E=q.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),U={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:E,config:t,request:w};Vr(function(B){r(B),y()},function(B){s(B),y()},U),w=null}"onloadend"in w?w.onloadend=C:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(C)},w.onabort=function(){w&&(s(new g("Request aborted",g.ECONNABORTED,t,w)),w=null)},w.onerror=function(){s(new g("Network Error",g.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const U=o.transitional||Pr;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),s(new g(v,U.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,w)),w=null},a===void 0&&n.setContentType(null),"setRequestHeader"in w&&h.forEach(n.toJSON(),function(v,U){w.setRequestHeader(U,v)}),h.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),l&&l!=="json"&&(w.responseType=o.responseType),c&&([I,f]=Te(c,!0),w.addEventListener("progress",I)),i&&w.upload&&([R,T]=Te(i),w.upload.addEventListener("progress",R),w.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(p=E=>{w&&(s(!E||E.type?new he(null,t,w):E),w.abort(),w=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const D=Ta(o.url);if(D&&G.protocols.indexOf(D)===-1){s(new g("Unsupported protocol "+D+":",g.ERR_BAD_REQUEST,t));return}w.send(a||null)})},_a=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,o;const a=function(c){if(!o){o=!0,l();const p=c instanceof Error?c:this.reason;s.abort(p instanceof g?p:new he(p instanceof Error?p.message:p))}};let n=e&&setTimeout(()=>{n=null,a(new g(`timeout ${e} of ms exceeded`,g.ETIMEDOUT))},e);const l=()=>{t&&(n&&clearTimeout(n),n=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),t=null)};t.forEach(c=>c.addEventListener("abort",a));const{signal:i}=s;return i.unsubscribe=()=>h.asap(l),i}},qa=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let s=0,o;for(;s<r;)o=s+e,yield t.slice(s,o),s=o},Ha=async function*(t,e){for await(const r of $a(t))yield*qa(r,e)},$a=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:s}=await e.read();if(r)break;yield s}}finally{await e.cancel()}},vt=(t,e,r,s)=>{const o=Ha(t,e);let a=0,n,l=i=>{n||(n=!0,s&&s(i))};return new ReadableStream({async pull(i){try{const{done:c,value:p}=await o.next();if(c){l(),i.close();return}let R=p.byteLength;if(r){let I=a+=R;r(I)}i.enqueue(new Uint8Array(p))}catch(c){throw l(c),c}},cancel(i){return l(i),o.return()}},{highWaterMark:2})},ze=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rr=ze&&typeof ReadableStream=="function",Na=ze&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),fr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Wa=Rr&&fr(()=>{let t=!1;const e=new Request(G.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ct=64*1024,tt=Rr&&fr(()=>h.isReadableStream(new Response("").body)),Be={stream:tt&&(t=>t.body)};ze&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Be[e]&&(Be[e]=h.isFunction(t[e])?r=>r[e]():(r,s)=>{throw new g(`Response type '${e}' is not supported`,g.ERR_NOT_SUPPORT,s)})})})(new Response);const Qa=async t=>{if(t==null)return 0;if(h.isBlob(t))return t.size;if(h.isSpecCompliantForm(t))return(await new Request(G.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(h.isArrayBufferView(t)||h.isArrayBuffer(t))return t.byteLength;if(h.isURLSearchParams(t)&&(t=t+""),h.isString(t))return(await Na(t)).byteLength},Ma=async(t,e)=>{const r=h.toFiniteNumber(t.getContentLength());return r??Qa(e)},Ja=ze&&(async t=>{let{url:e,method:r,data:s,signal:o,cancelToken:a,timeout:n,onDownloadProgress:l,onUploadProgress:i,responseType:c,headers:p,withCredentials:R="same-origin",fetchOptions:I}=Ar(t);c=c?(c+"").toLowerCase():"text";let T=_a([o,a&&a.toAbortSignal()],n),f;const y=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let w;try{if(i&&Wa&&r!=="get"&&r!=="head"&&(w=await Ma(p,s))!==0){let U=new Request(e,{method:"POST",body:s,duplex:"half"}),L;if(h.isFormData(s)&&(L=U.headers.get("content-type"))&&p.setContentType(L),U.body){const[B,Z]=Et(w,Te(gt(i)));s=vt(U.body,Ct,B,Z)}}h.isString(R)||(R=R?"include":"omit");const C="credentials"in Request.prototype;f=new Request(e,{...I,signal:T,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:s,duplex:"half",credentials:C?R:void 0});let D=await fetch(f,I);const E=tt&&(c==="stream"||c==="response");if(tt&&(l||E&&y)){const U={};["status","statusText","headers"].forEach(ce=>{U[ce]=D[ce]});const L=h.toFiniteNumber(D.headers.get("content-length")),[B,Z]=l&&Et(L,Te(gt(l),!0))||[];D=new Response(vt(D.body,Ct,B,()=>{Z&&Z(),y&&y()}),U)}c=c||"text";let v=await Be[h.findKey(Be,c)||"text"](D,t);return!E&&y&&y(),await new Promise((U,L)=>{Vr(U,L,{data:v,headers:q.from(D.headers),status:D.status,statusText:D.statusText,config:t,request:f})})}catch(C){throw y&&y(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,t,f),{cause:C.cause||C}):g.from(C,C&&C.code,t,f)}}),rt={http:pa,xhr:Ga,fetch:Ja};h.forEach(rt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ut=t=>`- ${t}`,Ka=t=>h.isFunction(t)||t===null||t===!1,yr={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let r,s;const o={};for(let a=0;a<e;a++){r=t[a];let n;if(s=r,!Ka(r)&&(s=rt[(n=String(r)).toLowerCase()],s===void 0))throw new g(`Unknown adapter '${n}'`);if(s)break;o[n||"#"+a]=s}if(!s){const a=Object.entries(o).map(([l,i])=>`adapter ${l} `+(i===!1?"is not supported by the environment":"is not available in the build"));let n=e?a.length>1?`since :
`+a.map(Ut).join(`
`):" "+Ut(a[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return s},adapters:rt};function Je(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new he(null,t)}function Tt(t){return Je(t),t.headers=q.from(t.headers),t.data=Me.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),yr.getAdapter(t.adapter||fe.adapter)(t).then(function(s){return Je(t),s.data=Me.call(t,t.transformResponse,s),s.headers=q.from(s.headers),s},function(s){return mr(s)||(Je(t),s&&s.response&&(s.response.data=Me.call(t,t.transformResponse,s.response),s.response.headers=q.from(s.response.headers))),Promise.reject(s)})}const wr="1.11.0",Fe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Fe[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Bt={};Fe.transitional=function(e,r,s){function o(a,n){return"[Axios v"+wr+"] Transitional option '"+a+"'"+n+(s?". "+s:"")}return(a,n,l)=>{if(e===!1)throw new g(o(n," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!Bt[n]&&(Bt[n]=!0,console.warn(o(n," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,n,l):!0}};Fe.spelling=function(e){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Xa(t,e,r){if(typeof t!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let o=s.length;for(;o-- >0;){const a=s[o],n=e[a];if(n){const l=t[a],i=l===void 0||n(l,a,t);if(i!==!0)throw new g("option "+a+" must be "+i,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+a,g.ERR_BAD_OPTION)}}const ve={assertOptions:Xa,validators:Fe},M=ve.validators;let le=class{constructor(e){this.defaults=e||{},this.interceptors={request:new wt,response:new wt}}async request(e,r){try{return await this._request(e,r)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=`
`+a):s.stack=a}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=ie(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:a}=r;s!==void 0&&ve.assertOptions(s,{silentJSONParsing:M.transitional(M.boolean),forcedJSONParsing:M.transitional(M.boolean),clarifyTimeoutError:M.transitional(M.boolean)},!1),o!=null&&(h.isFunction(o)?r.paramsSerializer={serialize:o}:ve.assertOptions(o,{encode:M.function,serialize:M.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ve.assertOptions(r,{baseUrl:M.spelling("baseURL"),withXsrfToken:M.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let n=a&&h.merge(a.common,a[r.method]);a&&h.forEach(["delete","get","head","post","put","patch","common"],f=>{delete a[f]}),r.headers=q.concat(n,a);const l=[];let i=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(i=i&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let p,R=0,I;if(!i){const f=[Tt.bind(this),void 0];for(f.unshift(...l),f.push(...c),I=f.length,p=Promise.resolve(r);R<I;)p=p.then(f[R++],f[R++]);return p}I=l.length;let T=r;for(R=0;R<I;){const f=l[R++],y=l[R++];try{T=f(T)}catch(w){y.call(this,w);break}}try{p=Tt.call(this,T)}catch(f){return Promise.reject(f)}for(R=0,I=c.length;R<I;)p=p.then(c[R++],c[R++]);return p}getUri(e){e=ie(this.defaults,e);const r=Sr(e.baseURL,e.url,e.allowAbsoluteUrls);return Or(r,e.params,e.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(e){le.prototype[e]=function(r,s){return this.request(ie(s||{},{method:e,url:r,data:(s||{}).data}))}});h.forEach(["post","put","patch"],function(e){function r(s){return function(a,n,l){return this.request(ie(l||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:a,data:n}))}}le.prototype[e]=r(),le.prototype[e+"Form"]=r(!0)});let Ya=class Ir{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const s=this;this.promise.then(o=>{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](o);s._listeners=null}),this.promise.then=o=>{let a;const n=new Promise(l=>{s.subscribe(l),a=l}).then(o);return n.cancel=function(){s.unsubscribe(a)},n},e(function(a,n,l){s.reason||(s.reason=new he(a,n,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Ir(function(o){e=o}),cancel:e}}};function Za(t){return function(r){return t.apply(null,r)}}function eo(t){return h.isObject(t)&&t.isAxiosError===!0}const st={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(st).forEach(([t,e])=>{st[e]=t});function Er(t){const e=new le(t),r=rr(le.prototype.request,e);return h.extend(r,le.prototype,e,{allOwnKeys:!0}),h.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Er(ie(t,o))},r}const u=Er(fe);u.Axios=le;u.CanceledError=he;u.CancelToken=Ya;u.isCancel=mr;u.VERSION=wr;u.toFormData=ke;u.AxiosError=g;u.Cancel=u.CanceledError;u.all=function(e){return Promise.all(e)};u.spread=Za;u.isAxiosError=eo;u.mergeConfig=ie;u.AxiosHeaders=q;u.formToJSON=t=>br(h.isHTMLForm(t)?new FormData(t):t);u.getAdapter=yr.getAdapter;u.HttpStatusCode=st;u.default=u;const{Axios:jo,AxiosError:ko,CanceledError:zo,isCancel:Fo,CancelToken:Go,VERSION:_o,all:qo,Cancel:Ho,isAxiosError:$o,spread:No,toFormData:Wo,AxiosHeaders:Qo,HttpStatusCode:Mo,formToJSON:Jo,getAdapter:Ko,mergeConfig:Xo}=u,O="/api/v1".replace(/\/+$/,"");class H{constructor(e,r=O,s=u){this.basePath=r,this.axios=s,e&&(this.configuration=e,this.basePath=e.basePath??r)}configuration}class to extends Error{constructor(e,r){super(r),this.field=e,this.name="RequiredError"}}const P={},b="https://example.com",d=function(t,e,r){if(r==null)throw new to(e,`Required parameter ${e} was null or undefined when calling ${t}.`)},m=async function(t,e,r){if(r&&r.apiKey){const s=typeof r.apiKey=="function"?await r.apiKey(e):await r.apiKey;t[e]=s}};function at(t,e,r=""){e!=null&&(typeof e=="object"?Array.isArray(e)?e.forEach(s=>at(t,s,r)):Object.keys(e).forEach(s=>at(t,e[s],`${r}${r!==""?".":""}${s}`)):t.has(r)?t.append(r,e):t.set(r,e))}const V=function(t,...e){const r=new URLSearchParams(t.search);at(r,e),t.search=r.toString()},x=function(t,e,r){const s=typeof t!="string";return(s&&r&&r.isJsonMime?r.isJsonMime(e.headers["Content-Type"]):s)?JSON.stringify(t!==void 0?t:{}):t||""},S=function(t){return t.pathname+t.search+t.hash},A=function(t,e,r,s){return(o=e,a=r)=>{const n={...t.options,url:(o.defaults.baseURL?"":s?.basePath??a)+t.url};return o.request(n)}},ro=function(t){return{updateController:async(e,r={})=>{d("updateController","body",e);const s="/controller",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"PUT",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}}}},so=function(t){const e=ro(t);return{async updateController(r,s){const o=await e.updateController(r,s),a=t?.serverIndex??0,n=P["ControllerApi.updateController"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)}}};class Dt extends H{updateController(e,r){return so(this.configuration).updateController(e,r).then(s=>s(this.axios,this.basePath))}}const ao=function(t){return{controllerInfo:async(e={})=>{const r="/controller-info",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}}}},oo=function(t){const e=ao(t);return{async controllerInfo(r){const s=await e.controllerInfo(r),o=t?.serverIndex??0,a=P["ControllerInfoApi.controllerInfo"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)}}};class Lt extends H{controllerInfo(e){return oo(this.configuration).controllerInfo(e).then(r=>r(this.axios,this.basePath))}}const no=function(t){return{createCredentials:async(e,r={})=>{d("createCredentials","body",e);const s="/github/credentials",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},createGiteaCredentials:async(e,r={})=>{d("createGiteaCredentials","body",e);const s="/gitea/credentials",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},deleteCredentials:async(e,r={})=>{d("deleteCredentials","id",e);const s="/github/credentials/{id}".replace("{id}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},deleteGiteaCredentials:async(e,r={})=>{d("deleteGiteaCredentials","id",e);const s="/gitea/credentials/{id}".replace("{id}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getCredentials:async(e,r={})=>{d("getCredentials","id",e);const s="/github/credentials/{id}".replace("{id}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getGiteaCredentials:async(e,r={})=>{d("getGiteaCredentials","id",e);const s="/gitea/credentials/{id}".replace("{id}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listCredentials:async(e={})=>{const r="/github/credentials",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},listGiteaCredentials:async(e={})=>{const r="/gitea/credentials",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},updateCredentials:async(e,r,s={})=>{d("updateCredentials","id",e),d("updateCredentials","body",r);const o="/github/credentials/{id}".replace("{id}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},updateGiteaCredentials:async(e,r,s={})=>{d("updateGiteaCredentials","id",e),d("updateGiteaCredentials","body",r);const o="/gitea/credentials/{id}".replace("{id}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}}}},J=function(t){const e=no(t);return{async createCredentials(r,s){const o=await e.createCredentials(r,s),a=t?.serverIndex??0,n=P["CredentialsApi.createCredentials"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async createGiteaCredentials(r,s){const o=await e.createGiteaCredentials(r,s),a=t?.serverIndex??0,n=P["CredentialsApi.createGiteaCredentials"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async deleteCredentials(r,s){const o=await e.deleteCredentials(r,s),a=t?.serverIndex??0,n=P["CredentialsApi.deleteCredentials"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async deleteGiteaCredentials(r,s){const o=await e.deleteGiteaCredentials(r,s),a=t?.serverIndex??0,n=P["CredentialsApi.deleteGiteaCredentials"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getCredentials(r,s){const o=await e.getCredentials(r,s),a=t?.serverIndex??0,n=P["CredentialsApi.getCredentials"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getGiteaCredentials(r,s){const o=await e.getGiteaCredentials(r,s),a=t?.serverIndex??0,n=P["CredentialsApi.getGiteaCredentials"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listCredentials(r){const s=await e.listCredentials(r),o=t?.serverIndex??0,a=P["CredentialsApi.listCredentials"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async listGiteaCredentials(r){const s=await e.listGiteaCredentials(r),o=t?.serverIndex??0,a=P["CredentialsApi.listGiteaCredentials"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async updateCredentials(r,s,o){const a=await e.updateCredentials(r,s,o),n=t?.serverIndex??0,l=P["CredentialsApi.updateCredentials"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateGiteaCredentials(r,s,o){const a=await e.updateGiteaCredentials(r,s,o),n=t?.serverIndex??0,l=P["CredentialsApi.updateGiteaCredentials"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)}}};class jt extends H{createCredentials(e,r){return J(this.configuration).createCredentials(e,r).then(s=>s(this.axios,this.basePath))}createGiteaCredentials(e,r){return J(this.configuration).createGiteaCredentials(e,r).then(s=>s(this.axios,this.basePath))}deleteCredentials(e,r){return J(this.configuration).deleteCredentials(e,r).then(s=>s(this.axios,this.basePath))}deleteGiteaCredentials(e,r){return J(this.configuration).deleteGiteaCredentials(e,r).then(s=>s(this.axios,this.basePath))}getCredentials(e,r){return J(this.configuration).getCredentials(e,r).then(s=>s(this.axios,this.basePath))}getGiteaCredentials(e,r){return J(this.configuration).getGiteaCredentials(e,r).then(s=>s(this.axios,this.basePath))}listCredentials(e){return J(this.configuration).listCredentials(e).then(r=>r(this.axios,this.basePath))}listGiteaCredentials(e){return J(this.configuration).listGiteaCredentials(e).then(r=>r(this.axios,this.basePath))}updateCredentials(e,r,s){return J(this.configuration).updateCredentials(e,r,s).then(o=>o(this.axios,this.basePath))}updateGiteaCredentials(e,r,s){return J(this.configuration).updateGiteaCredentials(e,r,s).then(o=>o(this.axios,this.basePath))}}const lo=function(t){return{createGiteaEndpoint:async(e,r={})=>{d("createGiteaEndpoint","body",e);const s="/gitea/endpoints",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},createGithubEndpoint:async(e,r={})=>{d("createGithubEndpoint","body",e);const s="/github/endpoints",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},deleteGiteaEndpoint:async(e,r={})=>{d("deleteGiteaEndpoint","name",e);const s="/gitea/endpoints/{name}".replace("{name}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},deleteGithubEndpoint:async(e,r={})=>{d("deleteGithubEndpoint","name",e);const s="/github/endpoints/{name}".replace("{name}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getGiteaEndpoint:async(e,r={})=>{d("getGiteaEndpoint","name",e);const s="/gitea/endpoints/{name}".replace("{name}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getGithubEndpoint:async(e,r={})=>{d("getGithubEndpoint","name",e);const s="/github/endpoints/{name}".replace("{name}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listGiteaEndpoints:async(e={})=>{const r="/gitea/endpoints",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},listGithubEndpoints:async(e={})=>{const r="/github/endpoints",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},updateGiteaEndpoint:async(e,r,s={})=>{d("updateGiteaEndpoint","name",e),d("updateGiteaEndpoint","body",r);const o="/gitea/endpoints/{name}".replace("{name}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},updateGithubEndpoint:async(e,r,s={})=>{d("updateGithubEndpoint","name",e),d("updateGithubEndpoint","body",r);const o="/github/endpoints/{name}".replace("{name}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}}}},K=function(t){const e=lo(t);return{async createGiteaEndpoint(r,s){const o=await e.createGiteaEndpoint(r,s),a=t?.serverIndex??0,n=P["EndpointsApi.createGiteaEndpoint"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async createGithubEndpoint(r,s){const o=await e.createGithubEndpoint(r,s),a=t?.serverIndex??0,n=P["EndpointsApi.createGithubEndpoint"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async deleteGiteaEndpoint(r,s){const o=await e.deleteGiteaEndpoint(r,s),a=t?.serverIndex??0,n=P["EndpointsApi.deleteGiteaEndpoint"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async deleteGithubEndpoint(r,s){const o=await e.deleteGithubEndpoint(r,s),a=t?.serverIndex??0,n=P["EndpointsApi.deleteGithubEndpoint"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getGiteaEndpoint(r,s){const o=await e.getGiteaEndpoint(r,s),a=t?.serverIndex??0,n=P["EndpointsApi.getGiteaEndpoint"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getGithubEndpoint(r,s){const o=await e.getGithubEndpoint(r,s),a=t?.serverIndex??0,n=P["EndpointsApi.getGithubEndpoint"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listGiteaEndpoints(r){const s=await e.listGiteaEndpoints(r),o=t?.serverIndex??0,a=P["EndpointsApi.listGiteaEndpoints"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async listGithubEndpoints(r){const s=await e.listGithubEndpoints(r),o=t?.serverIndex??0,a=P["EndpointsApi.listGithubEndpoints"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async updateGiteaEndpoint(r,s,o){const a=await e.updateGiteaEndpoint(r,s,o),n=t?.serverIndex??0,l=P["EndpointsApi.updateGiteaEndpoint"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateGithubEndpoint(r,s,o){const a=await e.updateGithubEndpoint(r,s,o),n=t?.serverIndex??0,l=P["EndpointsApi.updateGithubEndpoint"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)}}};class kt extends H{createGiteaEndpoint(e,r){return K(this.configuration).createGiteaEndpoint(e,r).then(s=>s(this.axios,this.basePath))}createGithubEndpoint(e,r){return K(this.configuration).createGithubEndpoint(e,r).then(s=>s(this.axios,this.basePath))}deleteGiteaEndpoint(e,r){return K(this.configuration).deleteGiteaEndpoint(e,r).then(s=>s(this.axios,this.basePath))}deleteGithubEndpoint(e,r){return K(this.configuration).deleteGithubEndpoint(e,r).then(s=>s(this.axios,this.basePath))}getGiteaEndpoint(e,r){return K(this.configuration).getGiteaEndpoint(e,r).then(s=>s(this.axios,this.basePath))}getGithubEndpoint(e,r){return K(this.configuration).getGithubEndpoint(e,r).then(s=>s(this.axios,this.basePath))}listGiteaEndpoints(e){return K(this.configuration).listGiteaEndpoints(e).then(r=>r(this.axios,this.basePath))}listGithubEndpoints(e){return K(this.configuration).listGithubEndpoints(e).then(r=>r(this.axios,this.basePath))}updateGiteaEndpoint(e,r,s){return K(this.configuration).updateGiteaEndpoint(e,r,s).then(o=>o(this.axios,this.basePath))}updateGithubEndpoint(e,r,s){return K(this.configuration).updateGithubEndpoint(e,r,s).then(o=>o(this.axios,this.basePath))}}const io=function(t){return{createEnterprise:async(e,r={})=>{d("createEnterprise","body",e);const s="/enterprises",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},createEnterprisePool:async(e,r,s={})=>{d("createEnterprisePool","enterpriseID",e),d("createEnterprisePool","body",r);const o="/enterprises/{enterpriseID}/pools".replace("{enterpriseID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createEnterpriseScaleSet:async(e,r,s={})=>{d("createEnterpriseScaleSet","enterpriseID",e),d("createEnterpriseScaleSet","body",r);const o="/enterprises/{enterpriseID}/scalesets".replace("{enterpriseID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},deleteEnterprise:async(e,r={})=>{d("deleteEnterprise","enterpriseID",e);const s="/enterprises/{enterpriseID}".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},deleteEnterprisePool:async(e,r,s={})=>{d("deleteEnterprisePool","enterpriseID",e),d("deleteEnterprisePool","poolID",r);const o="/enterprises/{enterpriseID}/pools/{poolID}".replace("{enterpriseID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getEnterprise:async(e,r={})=>{d("getEnterprise","enterpriseID",e);const s="/enterprises/{enterpriseID}".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getEnterprisePool:async(e,r,s={})=>{d("getEnterprisePool","enterpriseID",e),d("getEnterprisePool","poolID",r);const o="/enterprises/{enterpriseID}/pools/{poolID}".replace("{enterpriseID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},listEnterpriseInstances:async(e,r={})=>{d("listEnterpriseInstances","enterpriseID",e);const s="/enterprises/{enterpriseID}/instances".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listEnterprisePools:async(e,r={})=>{d("listEnterprisePools","enterpriseID",e);const s="/enterprises/{enterpriseID}/pools".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listEnterpriseScaleSets:async(e,r={})=>{d("listEnterpriseScaleSets","enterpriseID",e);const s="/enterprises/{enterpriseID}/scalesets".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listEnterprises:async(e,r,s={})=>{const o="/enterprises",a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),e!==void 0&&(c.name=e),r!==void 0&&(c.endpoint=r),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},updateEnterprise:async(e,r,s={})=>{d("updateEnterprise","enterpriseID",e),d("updateEnterprise","body",r);const o="/enterprises/{enterpriseID}".replace("{enterpriseID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},updateEnterprisePool:async(e,r,s,o={})=>{d("updateEnterprisePool","enterpriseID",e),d("updateEnterprisePool","poolID",r),d("updateEnterprisePool","body",s);const a="/enterprises/{enterpriseID}/pools/{poolID}".replace("{enterpriseID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"PUT",...l,...o},c={},p={};await m(c,"Authorization",t),c["Content-Type"]="application/json",V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},i.data=x(s,i,t),{url:S(n),options:i}}}},$=function(t){const e=io(t);return{async createEnterprise(r,s){const o=await e.createEnterprise(r,s),a=t?.serverIndex??0,n=P["EnterprisesApi.createEnterprise"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async createEnterprisePool(r,s,o){const a=await e.createEnterprisePool(r,s,o),n=t?.serverIndex??0,l=P["EnterprisesApi.createEnterprisePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createEnterpriseScaleSet(r,s,o){const a=await e.createEnterpriseScaleSet(r,s,o),n=t?.serverIndex??0,l=P["EnterprisesApi.createEnterpriseScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteEnterprise(r,s){const o=await e.deleteEnterprise(r,s),a=t?.serverIndex??0,n=P["EnterprisesApi.deleteEnterprise"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async deleteEnterprisePool(r,s,o){const a=await e.deleteEnterprisePool(r,s,o),n=t?.serverIndex??0,l=P["EnterprisesApi.deleteEnterprisePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getEnterprise(r,s){const o=await e.getEnterprise(r,s),a=t?.serverIndex??0,n=P["EnterprisesApi.getEnterprise"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getEnterprisePool(r,s,o){const a=await e.getEnterprisePool(r,s,o),n=t?.serverIndex??0,l=P["EnterprisesApi.getEnterprisePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async listEnterpriseInstances(r,s){const o=await e.listEnterpriseInstances(r,s),a=t?.serverIndex??0,n=P["EnterprisesApi.listEnterpriseInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listEnterprisePools(r,s){const o=await e.listEnterprisePools(r,s),a=t?.serverIndex??0,n=P["EnterprisesApi.listEnterprisePools"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listEnterpriseScaleSets(r,s){const o=await e.listEnterpriseScaleSets(r,s),a=t?.serverIndex??0,n=P["EnterprisesApi.listEnterpriseScaleSets"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listEnterprises(r,s,o){const a=await e.listEnterprises(r,s,o),n=t?.serverIndex??0,l=P["EnterprisesApi.listEnterprises"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateEnterprise(r,s,o){const a=await e.updateEnterprise(r,s,o),n=t?.serverIndex??0,l=P["EnterprisesApi.updateEnterprise"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateEnterprisePool(r,s,o,a){const n=await e.updateEnterprisePool(r,s,o,a),l=t?.serverIndex??0,i=P["EnterprisesApi.updateEnterprisePool"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)}}};class zt extends H{createEnterprise(e,r){return $(this.configuration).createEnterprise(e,r).then(s=>s(this.axios,this.basePath))}createEnterprisePool(e,r,s){return $(this.configuration).createEnterprisePool(e,r,s).then(o=>o(this.axios,this.basePath))}createEnterpriseScaleSet(e,r,s){return $(this.configuration).createEnterpriseScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}deleteEnterprise(e,r){return $(this.configuration).deleteEnterprise(e,r).then(s=>s(this.axios,this.basePath))}deleteEnterprisePool(e,r,s){return $(this.configuration).deleteEnterprisePool(e,r,s).then(o=>o(this.axios,this.basePath))}getEnterprise(e,r){return $(this.configuration).getEnterprise(e,r).then(s=>s(this.axios,this.basePath))}getEnterprisePool(e,r,s){return $(this.configuration).getEnterprisePool(e,r,s).then(o=>o(this.axios,this.basePath))}listEnterpriseInstances(e,r){return $(this.configuration).listEnterpriseInstances(e,r).then(s=>s(this.axios,this.basePath))}listEnterprisePools(e,r){return $(this.configuration).listEnterprisePools(e,r).then(s=>s(this.axios,this.basePath))}listEnterpriseScaleSets(e,r){return $(this.configuration).listEnterpriseScaleSets(e,r).then(s=>s(this.axios,this.basePath))}listEnterprises(e,r,s){return $(this.configuration).listEnterprises(e,r,s).then(o=>o(this.axios,this.basePath))}updateEnterprise(e,r,s){return $(this.configuration).updateEnterprise(e,r,s).then(o=>o(this.axios,this.basePath))}updateEnterprisePool(e,r,s,o){return $(this.configuration).updateEnterprisePool(e,r,s,o).then(a=>a(this.axios,this.basePath))}}const co=function(t){return{firstRun:async(e,r={})=>{d("firstRun","body",e);const s="/first-run",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}}}},po=function(t){const e=co(t);return{async firstRun(r,s){const o=await e.firstRun(r,s),a=t?.serverIndex??0,n=P["FirstRunApi.firstRun"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)}}};class Ft extends H{firstRun(e,r){return po(this.configuration).firstRun(e,r).then(s=>s(this.axios,this.basePath))}}const ho=function(t){return{getOrgWebhookInfo:async(e,r={})=>{d("getOrgWebhookInfo","orgID",e);const s="/organizations/{orgID}/webhook".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getRepoWebhookInfo:async(e,r={})=>{d("getRepoWebhookInfo","repoID",e);const s="/repositories/{repoID}/webhook".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},installOrgWebhook:async(e,r,s={})=>{d("installOrgWebhook","orgID",e),d("installOrgWebhook","body",r);const o="/organizations/{orgID}/webhook".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},installRepoWebhook:async(e,r,s={})=>{d("installRepoWebhook","repoID",e),d("installRepoWebhook","body",r);const o="/repositories/{repoID}/webhook".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},uninstallOrgWebhook:async(e,r={})=>{d("uninstallOrgWebhook","orgID",e);const s="/organizations/{orgID}/webhook".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},uninstallRepoWebhook:async(e,r={})=>{d("uninstallRepoWebhook","repoID",e);const s="/repositories/{repoID}/webhook".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}}}},pe=function(t){const e=ho(t);return{async getOrgWebhookInfo(r,s){const o=await e.getOrgWebhookInfo(r,s),a=t?.serverIndex??0,n=P["HooksApi.getOrgWebhookInfo"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getRepoWebhookInfo(r,s){const o=await e.getRepoWebhookInfo(r,s),a=t?.serverIndex??0,n=P["HooksApi.getRepoWebhookInfo"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async installOrgWebhook(r,s,o){const a=await e.installOrgWebhook(r,s,o),n=t?.serverIndex??0,l=P["HooksApi.installOrgWebhook"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async installRepoWebhook(r,s,o){const a=await e.installRepoWebhook(r,s,o),n=t?.serverIndex??0,l=P["HooksApi.installRepoWebhook"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async uninstallOrgWebhook(r,s){const o=await e.uninstallOrgWebhook(r,s),a=t?.serverIndex??0,n=P["HooksApi.uninstallOrgWebhook"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async uninstallRepoWebhook(r,s){const o=await e.uninstallRepoWebhook(r,s),a=t?.serverIndex??0,n=P["HooksApi.uninstallRepoWebhook"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)}}};class Gt extends H{getOrgWebhookInfo(e,r){return pe(this.configuration).getOrgWebhookInfo(e,r).then(s=>s(this.axios,this.basePath))}getRepoWebhookInfo(e,r){return pe(this.configuration).getRepoWebhookInfo(e,r).then(s=>s(this.axios,this.basePath))}installOrgWebhook(e,r,s){return pe(this.configuration).installOrgWebhook(e,r,s).then(o=>o(this.axios,this.basePath))}installRepoWebhook(e,r,s){return pe(this.configuration).installRepoWebhook(e,r,s).then(o=>o(this.axios,this.basePath))}uninstallOrgWebhook(e,r){return pe(this.configuration).uninstallOrgWebhook(e,r).then(s=>s(this.axios,this.basePath))}uninstallRepoWebhook(e,r){return pe(this.configuration).uninstallRepoWebhook(e,r).then(s=>s(this.axios,this.basePath))}}const uo=function(t){return{deleteInstance:async(e,r,s,o={})=>{d("deleteInstance","instanceName",e);const a="/instances/{instanceName}".replace("{instanceName}",encodeURIComponent(String(e))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"DELETE",...l,...o},c={},p={};await m(c,"Authorization",t),r!==void 0&&(p.forceRemove=r),s!==void 0&&(p.bypassGHUnauthorized=s),V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},{url:S(n),options:i}},getInstance:async(e,r={})=>{d("getInstance","instanceName",e);const s="/instances/{instanceName}".replace("{instanceName}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listEnterpriseInstances:async(e,r={})=>{d("listEnterpriseInstances","enterpriseID",e);const s="/enterprises/{enterpriseID}/instances".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listInstances:async(e={})=>{const r="/instances",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},listOrgInstances:async(e,r={})=>{d("listOrgInstances","orgID",e);const s="/organizations/{orgID}/instances".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listPoolInstances:async(e,r={})=>{d("listPoolInstances","poolID",e);const s="/pools/{poolID}/instances".replace("{poolID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listRepoInstances:async(e,r={})=>{d("listRepoInstances","repoID",e);const s="/repositories/{repoID}/instances".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listScaleSetInstances:async(e,r={})=>{d("listScaleSetInstances","scalesetID",e);const s="/scalesets/{scalesetID}/instances".replace("{scalesetID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}}}},ae=function(t){const e=uo(t);return{async deleteInstance(r,s,o,a){const n=await e.deleteInstance(r,s,o,a),l=t?.serverIndex??0,i=P["InstancesApi.deleteInstance"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)},async getInstance(r,s){const o=await e.getInstance(r,s),a=t?.serverIndex??0,n=P["InstancesApi.getInstance"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listEnterpriseInstances(r,s){const o=await e.listEnterpriseInstances(r,s),a=t?.serverIndex??0,n=P["InstancesApi.listEnterpriseInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listInstances(r){const s=await e.listInstances(r),o=t?.serverIndex??0,a=P["InstancesApi.listInstances"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async listOrgInstances(r,s){const o=await e.listOrgInstances(r,s),a=t?.serverIndex??0,n=P["InstancesApi.listOrgInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listPoolInstances(r,s){const o=await e.listPoolInstances(r,s),a=t?.serverIndex??0,n=P["InstancesApi.listPoolInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listRepoInstances(r,s){const o=await e.listRepoInstances(r,s),a=t?.serverIndex??0,n=P["InstancesApi.listRepoInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listScaleSetInstances(r,s){const o=await e.listScaleSetInstances(r,s),a=t?.serverIndex??0,n=P["InstancesApi.listScaleSetInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)}}};class _t extends H{deleteInstance(e,r,s,o){return ae(this.configuration).deleteInstance(e,r,s,o).then(a=>a(this.axios,this.basePath))}getInstance(e,r){return ae(this.configuration).getInstance(e,r).then(s=>s(this.axios,this.basePath))}listEnterpriseInstances(e,r){return ae(this.configuration).listEnterpriseInstances(e,r).then(s=>s(this.axios,this.basePath))}listInstances(e){return ae(this.configuration).listInstances(e).then(r=>r(this.axios,this.basePath))}listOrgInstances(e,r){return ae(this.configuration).listOrgInstances(e,r).then(s=>s(this.axios,this.basePath))}listPoolInstances(e,r){return ae(this.configuration).listPoolInstances(e,r).then(s=>s(this.axios,this.basePath))}listRepoInstances(e,r){return ae(this.configuration).listRepoInstances(e,r).then(s=>s(this.axios,this.basePath))}listScaleSetInstances(e,r){return ae(this.configuration).listScaleSetInstances(e,r).then(s=>s(this.axios,this.basePath))}}const Oo=function(t){return{login:async(e,r={})=>{d("login","body",e);const s="/auth/login",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}}}},Po=function(t){const e=Oo(t);return{async login(r,s){const o=await e.login(r,s),a=t?.serverIndex??0,n=P["LoginApi.login"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)}}};class qt extends H{login(e,r){return Po(this.configuration).login(e,r).then(s=>s(this.axios,this.basePath))}}const bo=function(t){return{createOrg:async(e,r={})=>{d("createOrg","body",e);const s="/organizations",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},createOrgPool:async(e,r,s={})=>{d("createOrgPool","orgID",e),d("createOrgPool","body",r);const o="/organizations/{orgID}/pools".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createOrgScaleSet:async(e,r,s={})=>{d("createOrgScaleSet","orgID",e),d("createOrgScaleSet","body",r);const o="/organizations/{orgID}/scalesets".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},deleteOrg:async(e,r,s={})=>{d("deleteOrg","orgID",e);const o="/organizations/{orgID}".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),r!==void 0&&(c.keepWebhook=r),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},deleteOrgPool:async(e,r,s={})=>{d("deleteOrgPool","orgID",e),d("deleteOrgPool","poolID",r);const o="/organizations/{orgID}/pools/{poolID}".replace("{orgID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getOrg:async(e,r={})=>{d("getOrg","orgID",e);const s="/organizations/{orgID}".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getOrgPool:async(e,r,s={})=>{d("getOrgPool","orgID",e),d("getOrgPool","poolID",r);const o="/organizations/{orgID}/pools/{poolID}".replace("{orgID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getOrgWebhookInfo:async(e,r={})=>{d("getOrgWebhookInfo","orgID",e);const s="/organizations/{orgID}/webhook".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},installOrgWebhook:async(e,r,s={})=>{d("installOrgWebhook","orgID",e),d("installOrgWebhook","body",r);const o="/organizations/{orgID}/webhook".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},listOrgInstances:async(e,r={})=>{d("listOrgInstances","orgID",e);const s="/organizations/{orgID}/instances".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listOrgPools:async(e,r={})=>{d("listOrgPools","orgID",e);const s="/organizations/{orgID}/pools".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listOrgScaleSets:async(e,r={})=>{d("listOrgScaleSets","orgID",e);const s="/organizations/{orgID}/scalesets".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listOrgs:async(e,r,s={})=>{const o="/organizations",a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),e!==void 0&&(c.name=e),r!==void 0&&(c.endpoint=r),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},uninstallOrgWebhook:async(e,r={})=>{d("uninstallOrgWebhook","orgID",e);const s="/organizations/{orgID}/webhook".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},updateOrg:async(e,r,s={})=>{d("updateOrg","orgID",e),d("updateOrg","body",r);const o="/organizations/{orgID}".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},updateOrgPool:async(e,r,s,o={})=>{d("updateOrgPool","orgID",e),d("updateOrgPool","poolID",r),d("updateOrgPool","body",s);const a="/organizations/{orgID}/pools/{poolID}".replace("{orgID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"PUT",...l,...o},c={},p={};await m(c,"Authorization",t),c["Content-Type"]="application/json",V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},i.data=x(s,i,t),{url:S(n),options:i}}}},z=function(t){const e=bo(t);return{async createOrg(r,s){const o=await e.createOrg(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.createOrg"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async createOrgPool(r,s,o){const a=await e.createOrgPool(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.createOrgPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createOrgScaleSet(r,s,o){const a=await e.createOrgScaleSet(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.createOrgScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteOrg(r,s,o){const a=await e.deleteOrg(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.deleteOrg"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteOrgPool(r,s,o){const a=await e.deleteOrgPool(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.deleteOrgPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getOrg(r,s){const o=await e.getOrg(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.getOrg"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getOrgPool(r,s,o){const a=await e.getOrgPool(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.getOrgPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getOrgWebhookInfo(r,s){const o=await e.getOrgWebhookInfo(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.getOrgWebhookInfo"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async installOrgWebhook(r,s,o){const a=await e.installOrgWebhook(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.installOrgWebhook"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async listOrgInstances(r,s){const o=await e.listOrgInstances(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.listOrgInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listOrgPools(r,s){const o=await e.listOrgPools(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.listOrgPools"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listOrgScaleSets(r,s){const o=await e.listOrgScaleSets(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.listOrgScaleSets"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listOrgs(r,s,o){const a=await e.listOrgs(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.listOrgs"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async uninstallOrgWebhook(r,s){const o=await e.uninstallOrgWebhook(r,s),a=t?.serverIndex??0,n=P["OrganizationsApi.uninstallOrgWebhook"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async updateOrg(r,s,o){const a=await e.updateOrg(r,s,o),n=t?.serverIndex??0,l=P["OrganizationsApi.updateOrg"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateOrgPool(r,s,o,a){const n=await e.updateOrgPool(r,s,o,a),l=t?.serverIndex??0,i=P["OrganizationsApi.updateOrgPool"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)}}};class Ht extends H{createOrg(e,r){return z(this.configuration).createOrg(e,r).then(s=>s(this.axios,this.basePath))}createOrgPool(e,r,s){return z(this.configuration).createOrgPool(e,r,s).then(o=>o(this.axios,this.basePath))}createOrgScaleSet(e,r,s){return z(this.configuration).createOrgScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}deleteOrg(e,r,s){return z(this.configuration).deleteOrg(e,r,s).then(o=>o(this.axios,this.basePath))}deleteOrgPool(e,r,s){return z(this.configuration).deleteOrgPool(e,r,s).then(o=>o(this.axios,this.basePath))}getOrg(e,r){return z(this.configuration).getOrg(e,r).then(s=>s(this.axios,this.basePath))}getOrgPool(e,r,s){return z(this.configuration).getOrgPool(e,r,s).then(o=>o(this.axios,this.basePath))}getOrgWebhookInfo(e,r){return z(this.configuration).getOrgWebhookInfo(e,r).then(s=>s(this.axios,this.basePath))}installOrgWebhook(e,r,s){return z(this.configuration).installOrgWebhook(e,r,s).then(o=>o(this.axios,this.basePath))}listOrgInstances(e,r){return z(this.configuration).listOrgInstances(e,r).then(s=>s(this.axios,this.basePath))}listOrgPools(e,r){return z(this.configuration).listOrgPools(e,r).then(s=>s(this.axios,this.basePath))}listOrgScaleSets(e,r){return z(this.configuration).listOrgScaleSets(e,r).then(s=>s(this.axios,this.basePath))}listOrgs(e,r,s){return z(this.configuration).listOrgs(e,r,s).then(o=>o(this.axios,this.basePath))}uninstallOrgWebhook(e,r){return z(this.configuration).uninstallOrgWebhook(e,r).then(s=>s(this.axios,this.basePath))}updateOrg(e,r,s){return z(this.configuration).updateOrg(e,r,s).then(o=>o(this.axios,this.basePath))}updateOrgPool(e,r,s,o){return z(this.configuration).updateOrgPool(e,r,s,o).then(a=>a(this.axios,this.basePath))}}const mo=function(t){return{createEnterprisePool:async(e,r,s={})=>{d("createEnterprisePool","enterpriseID",e),d("createEnterprisePool","body",r);const o="/enterprises/{enterpriseID}/pools".replace("{enterpriseID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createOrgPool:async(e,r,s={})=>{d("createOrgPool","orgID",e),d("createOrgPool","body",r);const o="/organizations/{orgID}/pools".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createRepoPool:async(e,r,s={})=>{d("createRepoPool","repoID",e),d("createRepoPool","body",r);const o="/repositories/{repoID}/pools".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},deleteEnterprisePool:async(e,r,s={})=>{d("deleteEnterprisePool","enterpriseID",e),d("deleteEnterprisePool","poolID",r);const o="/enterprises/{enterpriseID}/pools/{poolID}".replace("{enterpriseID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},deleteOrgPool:async(e,r,s={})=>{d("deleteOrgPool","orgID",e),d("deleteOrgPool","poolID",r);const o="/organizations/{orgID}/pools/{poolID}".replace("{orgID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},deletePool:async(e,r={})=>{d("deletePool","poolID",e);const s="/pools/{poolID}".replace("{poolID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},deleteRepoPool:async(e,r,s={})=>{d("deleteRepoPool","repoID",e),d("deleteRepoPool","poolID",r);const o="/repositories/{repoID}/pools/{poolID}".replace("{repoID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getEnterprisePool:async(e,r,s={})=>{d("getEnterprisePool","enterpriseID",e),d("getEnterprisePool","poolID",r);const o="/enterprises/{enterpriseID}/pools/{poolID}".replace("{enterpriseID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getOrgPool:async(e,r,s={})=>{d("getOrgPool","orgID",e),d("getOrgPool","poolID",r);const o="/organizations/{orgID}/pools/{poolID}".replace("{orgID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getPool:async(e,r={})=>{d("getPool","poolID",e);const s="/pools/{poolID}".replace("{poolID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getRepoPool:async(e,r,s={})=>{d("getRepoPool","repoID",e),d("getRepoPool","poolID",r);const o="/repositories/{repoID}/pools/{poolID}".replace("{repoID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},listEnterprisePools:async(e,r={})=>{d("listEnterprisePools","enterpriseID",e);const s="/enterprises/{enterpriseID}/pools".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listOrgPools:async(e,r={})=>{d("listOrgPools","orgID",e);const s="/organizations/{orgID}/pools".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listPools:async(e={})=>{const r="/pools",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},listRepoPools:async(e,r={})=>{d("listRepoPools","repoID",e);const s="/repositories/{repoID}/pools".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},updateEnterprisePool:async(e,r,s,o={})=>{d("updateEnterprisePool","enterpriseID",e),d("updateEnterprisePool","poolID",r),d("updateEnterprisePool","body",s);const a="/enterprises/{enterpriseID}/pools/{poolID}".replace("{enterpriseID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"PUT",...l,...o},c={},p={};await m(c,"Authorization",t),c["Content-Type"]="application/json",V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},i.data=x(s,i,t),{url:S(n),options:i}},updateOrgPool:async(e,r,s,o={})=>{d("updateOrgPool","orgID",e),d("updateOrgPool","poolID",r),d("updateOrgPool","body",s);const a="/organizations/{orgID}/pools/{poolID}".replace("{orgID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"PUT",...l,...o},c={},p={};await m(c,"Authorization",t),c["Content-Type"]="application/json",V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},i.data=x(s,i,t),{url:S(n),options:i}},updatePool:async(e,r,s={})=>{d("updatePool","poolID",e),d("updatePool","body",r);const o="/pools/{poolID}".replace("{poolID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},updateRepoPool:async(e,r,s,o={})=>{d("updateRepoPool","repoID",e),d("updateRepoPool","poolID",r),d("updateRepoPool","body",s);const a="/repositories/{repoID}/pools/{poolID}".replace("{repoID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"PUT",...l,...o},c={},p={};await m(c,"Authorization",t),c["Content-Type"]="application/json",V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},i.data=x(s,i,t),{url:S(n),options:i}}}},j=function(t){const e=mo(t);return{async createEnterprisePool(r,s,o){const a=await e.createEnterprisePool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.createEnterprisePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createOrgPool(r,s,o){const a=await e.createOrgPool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.createOrgPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createRepoPool(r,s,o){const a=await e.createRepoPool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.createRepoPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteEnterprisePool(r,s,o){const a=await e.deleteEnterprisePool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.deleteEnterprisePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteOrgPool(r,s,o){const a=await e.deleteOrgPool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.deleteOrgPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deletePool(r,s){const o=await e.deletePool(r,s),a=t?.serverIndex??0,n=P["PoolsApi.deletePool"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async deleteRepoPool(r,s,o){const a=await e.deleteRepoPool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.deleteRepoPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getEnterprisePool(r,s,o){const a=await e.getEnterprisePool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.getEnterprisePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getOrgPool(r,s,o){const a=await e.getOrgPool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.getOrgPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getPool(r,s){const o=await e.getPool(r,s),a=t?.serverIndex??0,n=P["PoolsApi.getPool"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getRepoPool(r,s,o){const a=await e.getRepoPool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.getRepoPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async listEnterprisePools(r,s){const o=await e.listEnterprisePools(r,s),a=t?.serverIndex??0,n=P["PoolsApi.listEnterprisePools"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listOrgPools(r,s){const o=await e.listOrgPools(r,s),a=t?.serverIndex??0,n=P["PoolsApi.listOrgPools"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listPools(r){const s=await e.listPools(r),o=t?.serverIndex??0,a=P["PoolsApi.listPools"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async listRepoPools(r,s){const o=await e.listRepoPools(r,s),a=t?.serverIndex??0,n=P["PoolsApi.listRepoPools"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async updateEnterprisePool(r,s,o,a){const n=await e.updateEnterprisePool(r,s,o,a),l=t?.serverIndex??0,i=P["PoolsApi.updateEnterprisePool"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)},async updateOrgPool(r,s,o,a){const n=await e.updateOrgPool(r,s,o,a),l=t?.serverIndex??0,i=P["PoolsApi.updateOrgPool"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)},async updatePool(r,s,o){const a=await e.updatePool(r,s,o),n=t?.serverIndex??0,l=P["PoolsApi.updatePool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateRepoPool(r,s,o,a){const n=await e.updateRepoPool(r,s,o,a),l=t?.serverIndex??0,i=P["PoolsApi.updateRepoPool"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)}}};class $t extends H{createEnterprisePool(e,r,s){return j(this.configuration).createEnterprisePool(e,r,s).then(o=>o(this.axios,this.basePath))}createOrgPool(e,r,s){return j(this.configuration).createOrgPool(e,r,s).then(o=>o(this.axios,this.basePath))}createRepoPool(e,r,s){return j(this.configuration).createRepoPool(e,r,s).then(o=>o(this.axios,this.basePath))}deleteEnterprisePool(e,r,s){return j(this.configuration).deleteEnterprisePool(e,r,s).then(o=>o(this.axios,this.basePath))}deleteOrgPool(e,r,s){return j(this.configuration).deleteOrgPool(e,r,s).then(o=>o(this.axios,this.basePath))}deletePool(e,r){return j(this.configuration).deletePool(e,r).then(s=>s(this.axios,this.basePath))}deleteRepoPool(e,r,s){return j(this.configuration).deleteRepoPool(e,r,s).then(o=>o(this.axios,this.basePath))}getEnterprisePool(e,r,s){return j(this.configuration).getEnterprisePool(e,r,s).then(o=>o(this.axios,this.basePath))}getOrgPool(e,r,s){return j(this.configuration).getOrgPool(e,r,s).then(o=>o(this.axios,this.basePath))}getPool(e,r){return j(this.configuration).getPool(e,r).then(s=>s(this.axios,this.basePath))}getRepoPool(e,r,s){return j(this.configuration).getRepoPool(e,r,s).then(o=>o(this.axios,this.basePath))}listEnterprisePools(e,r){return j(this.configuration).listEnterprisePools(e,r).then(s=>s(this.axios,this.basePath))}listOrgPools(e,r){return j(this.configuration).listOrgPools(e,r).then(s=>s(this.axios,this.basePath))}listPools(e){return j(this.configuration).listPools(e).then(r=>r(this.axios,this.basePath))}listRepoPools(e,r){return j(this.configuration).listRepoPools(e,r).then(s=>s(this.axios,this.basePath))}updateEnterprisePool(e,r,s,o){return j(this.configuration).updateEnterprisePool(e,r,s,o).then(a=>a(this.axios,this.basePath))}updateOrgPool(e,r,s,o){return j(this.configuration).updateOrgPool(e,r,s,o).then(a=>a(this.axios,this.basePath))}updatePool(e,r,s){return j(this.configuration).updatePool(e,r,s).then(o=>o(this.axios,this.basePath))}updateRepoPool(e,r,s,o){return j(this.configuration).updateRepoPool(e,r,s,o).then(a=>a(this.axios,this.basePath))}}const Vo=function(t){return{listProviders:async(e={})=>{const r="/providers",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}}}},So=function(t){const e=Vo(t);return{async listProviders(r){const s=await e.listProviders(r),o=t?.serverIndex??0,a=P["ProvidersApi.listProviders"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)}}};class Nt extends H{listProviders(e){return So(this.configuration).listProviders(e).then(r=>r(this.axios,this.basePath))}}const Ao=function(t){return{createRepo:async(e,r={})=>{d("createRepo","body",e);const s="/repositories",o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"POST",...a,...r},l={},i={};await m(l,"Authorization",t),l["Content-Type"]="application/json",V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},n.data=x(e,n,t),{url:S(o),options:n}},createRepoPool:async(e,r,s={})=>{d("createRepoPool","repoID",e),d("createRepoPool","body",r);const o="/repositories/{repoID}/pools".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createRepoScaleSet:async(e,r,s={})=>{d("createRepoScaleSet","repoID",e),d("createRepoScaleSet","body",r);const o="/repositories/{repoID}/scalesets".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},deleteRepo:async(e,r,s={})=>{d("deleteRepo","repoID",e);const o="/repositories/{repoID}".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),r!==void 0&&(c.keepWebhook=r),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},deleteRepoPool:async(e,r,s={})=>{d("deleteRepoPool","repoID",e),d("deleteRepoPool","poolID",r);const o="/repositories/{repoID}/pools/{poolID}".replace("{repoID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"DELETE",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getRepo:async(e,r={})=>{d("getRepo","repoID",e);const s="/repositories/{repoID}".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getRepoPool:async(e,r,s={})=>{d("getRepoPool","repoID",e),d("getRepoPool","poolID",r);const o="/repositories/{repoID}/pools/{poolID}".replace("{repoID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"GET",...n,...s},i={},c={};await m(i,"Authorization",t),V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},{url:S(a),options:l}},getRepoWebhookInfo:async(e,r={})=>{d("getRepoWebhookInfo","repoID",e);const s="/repositories/{repoID}/webhook".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},installRepoWebhook:async(e,r,s={})=>{d("installRepoWebhook","repoID",e),d("installRepoWebhook","body",r);const o="/repositories/{repoID}/webhook".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},listRepoInstances:async(e,r={})=>{d("listRepoInstances","repoID",e);const s="/repositories/{repoID}/instances".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listRepoPools:async(e,r={})=>{d("listRepoPools","repoID",e);const s="/repositories/{repoID}/pools".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listRepoScaleSets:async(e,r={})=>{d("listRepoScaleSets","repoID",e);const s="/repositories/{repoID}/scalesets".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listRepos:async(e,r,s,o={})=>{const a="/repositories",n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"GET",...l,...o},c={},p={};await m(c,"Authorization",t),e!==void 0&&(p.owner=e),r!==void 0&&(p.name=r),s!==void 0&&(p.endpoint=s),V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},{url:S(n),options:i}},uninstallRepoWebhook:async(e,r={})=>{d("uninstallRepoWebhook","repoID",e);const s="/repositories/{repoID}/webhook".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},updateRepo:async(e,r,s={})=>{d("updateRepo","repoID",e),d("updateRepo","body",r);const o="/repositories/{repoID}".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},updateRepoPool:async(e,r,s,o={})=>{d("updateRepoPool","repoID",e),d("updateRepoPool","poolID",r),d("updateRepoPool","body",s);const a="/repositories/{repoID}/pools/{poolID}".replace("{repoID}",encodeURIComponent(String(e))).replace("{poolID}",encodeURIComponent(String(r))),n=new URL(a,b);let l;t&&(l=t.baseOptions);const i={method:"PUT",...l,...o},c={},p={};await m(c,"Authorization",t),c["Content-Type"]="application/json",V(n,p);let R=l&&l.headers?l.headers:{};return i.headers={...c,...R,...o.headers},i.data=x(s,i,t),{url:S(n),options:i}}}},F=function(t){const e=Ao(t);return{async createRepo(r,s){const o=await e.createRepo(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.createRepo"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async createRepoPool(r,s,o){const a=await e.createRepoPool(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.createRepoPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createRepoScaleSet(r,s,o){const a=await e.createRepoScaleSet(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.createRepoScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteRepo(r,s,o){const a=await e.deleteRepo(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.deleteRepo"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteRepoPool(r,s,o){const a=await e.deleteRepoPool(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.deleteRepoPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getRepo(r,s){const o=await e.getRepo(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.getRepo"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getRepoPool(r,s,o){const a=await e.getRepoPool(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.getRepoPool"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async getRepoWebhookInfo(r,s){const o=await e.getRepoWebhookInfo(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.getRepoWebhookInfo"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async installRepoWebhook(r,s,o){const a=await e.installRepoWebhook(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.installRepoWebhook"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async listRepoInstances(r,s){const o=await e.listRepoInstances(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.listRepoInstances"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listRepoPools(r,s){const o=await e.listRepoPools(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.listRepoPools"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listRepoScaleSets(r,s){const o=await e.listRepoScaleSets(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.listRepoScaleSets"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listRepos(r,s,o,a){const n=await e.listRepos(r,s,o,a),l=t?.serverIndex??0,i=P["RepositoriesApi.listRepos"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)},async uninstallRepoWebhook(r,s){const o=await e.uninstallRepoWebhook(r,s),a=t?.serverIndex??0,n=P["RepositoriesApi.uninstallRepoWebhook"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async updateRepo(r,s,o){const a=await e.updateRepo(r,s,o),n=t?.serverIndex??0,l=P["RepositoriesApi.updateRepo"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async updateRepoPool(r,s,o,a){const n=await e.updateRepoPool(r,s,o,a),l=t?.serverIndex??0,i=P["RepositoriesApi.updateRepoPool"]?.[l]?.url;return(c,p)=>A(n,u,O,t)(c,i||p)}}};class Wt extends H{createRepo(e,r){return F(this.configuration).createRepo(e,r).then(s=>s(this.axios,this.basePath))}createRepoPool(e,r,s){return F(this.configuration).createRepoPool(e,r,s).then(o=>o(this.axios,this.basePath))}createRepoScaleSet(e,r,s){return F(this.configuration).createRepoScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}deleteRepo(e,r,s){return F(this.configuration).deleteRepo(e,r,s).then(o=>o(this.axios,this.basePath))}deleteRepoPool(e,r,s){return F(this.configuration).deleteRepoPool(e,r,s).then(o=>o(this.axios,this.basePath))}getRepo(e,r){return F(this.configuration).getRepo(e,r).then(s=>s(this.axios,this.basePath))}getRepoPool(e,r,s){return F(this.configuration).getRepoPool(e,r,s).then(o=>o(this.axios,this.basePath))}getRepoWebhookInfo(e,r){return F(this.configuration).getRepoWebhookInfo(e,r).then(s=>s(this.axios,this.basePath))}installRepoWebhook(e,r,s){return F(this.configuration).installRepoWebhook(e,r,s).then(o=>o(this.axios,this.basePath))}listRepoInstances(e,r){return F(this.configuration).listRepoInstances(e,r).then(s=>s(this.axios,this.basePath))}listRepoPools(e,r){return F(this.configuration).listRepoPools(e,r).then(s=>s(this.axios,this.basePath))}listRepoScaleSets(e,r){return F(this.configuration).listRepoScaleSets(e,r).then(s=>s(this.axios,this.basePath))}listRepos(e,r,s,o){return F(this.configuration).listRepos(e,r,s,o).then(a=>a(this.axios,this.basePath))}uninstallRepoWebhook(e,r){return F(this.configuration).uninstallRepoWebhook(e,r).then(s=>s(this.axios,this.basePath))}updateRepo(e,r,s){return F(this.configuration).updateRepo(e,r,s).then(o=>o(this.axios,this.basePath))}updateRepoPool(e,r,s,o){return F(this.configuration).updateRepoPool(e,r,s,o).then(a=>a(this.axios,this.basePath))}}const Ro=function(t){return{createEnterpriseScaleSet:async(e,r,s={})=>{d("createEnterpriseScaleSet","enterpriseID",e),d("createEnterpriseScaleSet","body",r);const o="/enterprises/{enterpriseID}/scalesets".replace("{enterpriseID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createOrgScaleSet:async(e,r,s={})=>{d("createOrgScaleSet","orgID",e),d("createOrgScaleSet","body",r);const o="/organizations/{orgID}/scalesets".replace("{orgID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},createRepoScaleSet:async(e,r,s={})=>{d("createRepoScaleSet","repoID",e),d("createRepoScaleSet","body",r);const o="/repositories/{repoID}/scalesets".replace("{repoID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"POST",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}},deleteScaleSet:async(e,r={})=>{d("deleteScaleSet","scalesetID",e);const s="/scalesets/{scalesetID}".replace("{scalesetID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"DELETE",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},getScaleSet:async(e,r={})=>{d("getScaleSet","scalesetID",e);const s="/scalesets/{scalesetID}".replace("{scalesetID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listEnterpriseScaleSets:async(e,r={})=>{d("listEnterpriseScaleSets","enterpriseID",e);const s="/enterprises/{enterpriseID}/scalesets".replace("{enterpriseID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listOrgScaleSets:async(e,r={})=>{d("listOrgScaleSets","orgID",e);const s="/organizations/{orgID}/scalesets".replace("{orgID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listRepoScaleSets:async(e,r={})=>{d("listRepoScaleSets","repoID",e);const s="/repositories/{repoID}/scalesets".replace("{repoID}",encodeURIComponent(String(e))),o=new URL(s,b);let a;t&&(a=t.baseOptions);const n={method:"GET",...a,...r},l={},i={};await m(l,"Authorization",t),V(o,i);let c=a&&a.headers?a.headers:{};return n.headers={...l,...c,...r.headers},{url:S(o),options:n}},listScalesets:async(e={})=>{const r="/scalesets",s=new URL(r,b);let o;t&&(o=t.baseOptions);const a={method:"GET",...o,...e},n={},l={};await m(n,"Authorization",t),V(s,l);let i=o&&o.headers?o.headers:{};return a.headers={...n,...i,...e.headers},{url:S(s),options:a}},updateScaleSet:async(e,r,s={})=>{d("updateScaleSet","scalesetID",e),d("updateScaleSet","body",r);const o="/scalesets/{scalesetID}".replace("{scalesetID}",encodeURIComponent(String(e))),a=new URL(o,b);let n;t&&(n=t.baseOptions);const l={method:"PUT",...n,...s},i={},c={};await m(i,"Authorization",t),i["Content-Type"]="application/json",V(a,c);let p=n&&n.headers?n.headers:{};return l.headers={...i,...p,...s.headers},l.data=x(r,l,t),{url:S(a),options:l}}}},X=function(t){const e=Ro(t);return{async createEnterpriseScaleSet(r,s,o){const a=await e.createEnterpriseScaleSet(r,s,o),n=t?.serverIndex??0,l=P["ScalesetsApi.createEnterpriseScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createOrgScaleSet(r,s,o){const a=await e.createOrgScaleSet(r,s,o),n=t?.serverIndex??0,l=P["ScalesetsApi.createOrgScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async createRepoScaleSet(r,s,o){const a=await e.createRepoScaleSet(r,s,o),n=t?.serverIndex??0,l=P["ScalesetsApi.createRepoScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)},async deleteScaleSet(r,s){const o=await e.deleteScaleSet(r,s),a=t?.serverIndex??0,n=P["ScalesetsApi.deleteScaleSet"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async getScaleSet(r,s){const o=await e.getScaleSet(r,s),a=t?.serverIndex??0,n=P["ScalesetsApi.getScaleSet"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listEnterpriseScaleSets(r,s){const o=await e.listEnterpriseScaleSets(r,s),a=t?.serverIndex??0,n=P["ScalesetsApi.listEnterpriseScaleSets"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listOrgScaleSets(r,s){const o=await e.listOrgScaleSets(r,s),a=t?.serverIndex??0,n=P["ScalesetsApi.listOrgScaleSets"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listRepoScaleSets(r,s){const o=await e.listRepoScaleSets(r,s),a=t?.serverIndex??0,n=P["ScalesetsApi.listRepoScaleSets"]?.[a]?.url;return(l,i)=>A(o,u,O,t)(l,n||i)},async listScalesets(r){const s=await e.listScalesets(r),o=t?.serverIndex??0,a=P["ScalesetsApi.listScalesets"]?.[o]?.url;return(n,l)=>A(s,u,O,t)(n,a||l)},async updateScaleSet(r,s,o){const a=await e.updateScaleSet(r,s,o),n=t?.serverIndex??0,l=P["ScalesetsApi.updateScaleSet"]?.[n]?.url;return(i,c)=>A(a,u,O,t)(i,l||c)}}};class Qt extends H{createEnterpriseScaleSet(e,r,s){return X(this.configuration).createEnterpriseScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}createOrgScaleSet(e,r,s){return X(this.configuration).createOrgScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}createRepoScaleSet(e,r,s){return X(this.configuration).createRepoScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}deleteScaleSet(e,r){return X(this.configuration).deleteScaleSet(e,r).then(s=>s(this.axios,this.basePath))}getScaleSet(e,r){return X(this.configuration).getScaleSet(e,r).then(s=>s(this.axios,this.basePath))}listEnterpriseScaleSets(e,r){return X(this.configuration).listEnterpriseScaleSets(e,r).then(s=>s(this.axios,this.basePath))}listOrgScaleSets(e,r){return X(this.configuration).listOrgScaleSets(e,r).then(s=>s(this.axios,this.basePath))}listRepoScaleSets(e,r){return X(this.configuration).listRepoScaleSets(e,r).then(s=>s(this.axios,this.basePath))}listScalesets(e){return X(this.configuration).listScalesets(e).then(r=>r(this.axios,this.basePath))}updateScaleSet(e,r,s){return X(this.configuration).updateScaleSet(e,r,s).then(o=>o(this.axios,this.basePath))}}class Mt{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.serverIndex=e.serverIndex,this.baseOptions={...e.baseOptions,headers:{...e.baseOptions?.headers}},this.formDataCtor=e.formDataCtor}isJsonMime(e){const r=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(r.test(e)||e.toLowerCase()==="application/json-patch+json")}}class gr{baseUrl;token;config;isDevelopmentMode(){return typeof window>"u"?!1:window.location.port==="5173"}loginApi;controllerInfoApi;controllerApi;endpointsApi;credentialsApi;repositoriesApi;organizationsApi;enterprisesApi;poolsApi;scaleSetsApi;instancesApi;providersApi;firstRunApi;hooksApi;constructor(e=""){this.baseUrl=e||window.location.origin;const r=this.isDevelopmentMode();this.config=new Mt({basePath:`${this.baseUrl}/api/v1`,accessToken:()=>this.token||"",baseOptions:{withCredentials:!r}}),this.loginApi=new qt(this.config),this.controllerInfoApi=new Lt(this.config),this.controllerApi=new Dt(this.config),this.endpointsApi=new kt(this.config),this.credentialsApi=new jt(this.config),this.repositoriesApi=new Wt(this.config),this.organizationsApi=new Ht(this.config),this.enterprisesApi=new zt(this.config),this.poolsApi=new $t(this.config),this.scaleSetsApi=new Qt(this.config),this.instancesApi=new _t(this.config),this.providersApi=new Nt(this.config),this.firstRunApi=new Ft(this.config),this.hooksApi=new Gt(this.config)}setToken(e){this.token=e;const r=this.isDevelopmentMode();this.config=new Mt({basePath:`${this.baseUrl}/api/v1`,accessToken:()=>e,baseOptions:{withCredentials:!r}}),this.loginApi=new qt(this.config),this.controllerInfoApi=new Lt(this.config),this.controllerApi=new Dt(this.config),this.endpointsApi=new kt(this.config),this.credentialsApi=new jt(this.config),this.repositoriesApi=new Wt(this.config),this.organizationsApi=new Ht(this.config),this.enterprisesApi=new zt(this.config),this.poolsApi=new $t(this.config),this.scaleSetsApi=new Qt(this.config),this.instancesApi=new _t(this.config),this.providersApi=new Nt(this.config),this.firstRunApi=new Ft(this.config),this.hooksApi=new Gt(this.config)}async login(e){const r={username:e.username,password:e.password},o=(await this.loginApi.login(r)).data.token;if(o)return this.setToken(o),{token:o};throw new Error("Login failed")}async getControllerInfo(){return(await this.controllerInfoApi.controllerInfo()).data}async listGithubEndpoints(){return(await this.endpointsApi.listGithubEndpoints()).data||[]}async getGithubEndpoint(e){return(await this.endpointsApi.getGithubEndpoint(e)).data}async createGithubEndpoint(e){return(await this.endpointsApi.createGithubEndpoint(e)).data}async updateGithubEndpoint(e,r){return(await this.endpointsApi.updateGithubEndpoint(e,r)).data}async deleteGithubEndpoint(e){await this.endpointsApi.deleteGithubEndpoint(e)}async listGiteaEndpoints(){return(await this.endpointsApi.listGiteaEndpoints()).data||[]}async getGiteaEndpoint(e){return(await this.endpointsApi.getGiteaEndpoint(e)).data}async createGiteaEndpoint(e){return(await this.endpointsApi.createGiteaEndpoint(e)).data}async updateGiteaEndpoint(e,r){return(await this.endpointsApi.updateGiteaEndpoint(e,r)).data}async deleteGiteaEndpoint(e){await this.endpointsApi.deleteGiteaEndpoint(e)}async listAllEndpoints(){const[e,r]=await Promise.all([this.listGithubEndpoints().catch(()=>[]),this.listGiteaEndpoints().catch(()=>[])]);return[...e.map(s=>({...s,endpoint_type:"github"})),...r.map(s=>({...s,endpoint_type:"gitea"}))]}async listGithubCredentials(){return(await this.credentialsApi.listCredentials()).data||[]}async getGithubCredentials(e){return(await this.credentialsApi.getCredentials(e)).data}async createGithubCredentials(e){return(await this.credentialsApi.createCredentials(e)).data}async updateGithubCredentials(e,r){return(await this.credentialsApi.updateCredentials(e,r)).data}async deleteGithubCredentials(e){await this.credentialsApi.deleteCredentials(e)}async listGiteaCredentials(){return(await this.credentialsApi.listGiteaCredentials()).data||[]}async getGiteaCredentials(e){return(await this.credentialsApi.getGiteaCredentials(e)).data}async createGiteaCredentials(e){return(await this.credentialsApi.createGiteaCredentials(e)).data}async updateGiteaCredentials(e,r){return(await this.credentialsApi.updateGiteaCredentials(e,r)).data}async deleteGiteaCredentials(e){await this.credentialsApi.deleteGiteaCredentials(e)}async listAllCredentials(){const[e,r]=await Promise.all([this.listGithubCredentials().catch(()=>[]),this.listGiteaCredentials().catch(()=>[])]);return[...e,...r]}async installRepositoryWebhook(e,r={}){await this.repositoriesApi.installRepoWebhook(e,r)}async uninstallRepositoryWebhook(e){await this.hooksApi.uninstallRepoWebhook(e)}async getRepositoryWebhookInfo(e){return(await this.hooksApi.getRepoWebhookInfo(e)).data}async listRepositories(){return(await this.repositoriesApi.listRepos()).data||[]}async getRepository(e){return(await this.repositoriesApi.getRepo(e)).data}async createRepository(e){return(await this.repositoriesApi.createRepo(e)).data}async updateRepository(e,r){return(await this.repositoriesApi.updateRepo(e,r)).data}async deleteRepository(e){await this.repositoriesApi.deleteRepo(e)}async installRepoWebhook(e){await this.repositoriesApi.installRepoWebhook(e,{})}async listRepositoryPools(e){return(await this.repositoriesApi.listRepoPools(e)).data||[]}async listRepositoryInstances(e){return(await this.repositoriesApi.listRepoInstances(e)).data||[]}async createRepositoryPool(e,r){return(await this.repositoriesApi.createRepoPool(e,r)).data}async installOrganizationWebhook(e,r={}){await this.organizationsApi.installOrgWebhook(e,r)}async uninstallOrganizationWebhook(e){await this.hooksApi.uninstallOrgWebhook(e)}async getOrganizationWebhookInfo(e){return(await this.hooksApi.getOrgWebhookInfo(e)).data}async listOrganizations(){return(await this.organizationsApi.listOrgs()).data||[]}async getOrganization(e){return(await this.organizationsApi.getOrg(e)).data}async createOrganization(e){return(await this.organizationsApi.createOrg(e)).data}async updateOrganization(e,r){return(await this.organizationsApi.updateOrg(e,r)).data}async deleteOrganization(e){await this.organizationsApi.deleteOrg(e)}async listOrganizationPools(e){return(await this.organizationsApi.listOrgPools(e)).data||[]}async listOrganizationInstances(e){return(await this.organizationsApi.listOrgInstances(e)).data||[]}async createOrganizationPool(e,r){return(await this.organizationsApi.createOrgPool(e,r)).data}async listEnterprises(){return(await this.enterprisesApi.listEnterprises()).data||[]}async getEnterprise(e){return(await this.enterprisesApi.getEnterprise(e)).data}async createEnterprise(e){return(await this.enterprisesApi.createEnterprise(e)).data}async updateEnterprise(e,r){return(await this.enterprisesApi.updateEnterprise(e,r)).data}async deleteEnterprise(e){await this.enterprisesApi.deleteEnterprise(e)}async listEnterprisePools(e){return(await this.enterprisesApi.listEnterprisePools(e)).data||[]}async listEnterpriseInstances(e){return(await this.enterprisesApi.listEnterpriseInstances(e)).data||[]}async createEnterprisePool(e,r){return(await this.enterprisesApi.createEnterprisePool(e,r)).data}async createRepositoryScaleSet(e,r){return(await this.repositoriesApi.createRepoScaleSet(e,r)).data}async listRepositoryScaleSets(e){return(await this.repositoriesApi.listRepoScaleSets(e)).data||[]}async createOrganizationScaleSet(e,r){return(await this.organizationsApi.createOrgScaleSet(e,r)).data}async listOrganizationScaleSets(e){return(await this.organizationsApi.listOrgScaleSets(e)).data||[]}async createEnterpriseScaleSet(e,r){return(await this.enterprisesApi.createEnterpriseScaleSet(e,r)).data}async listEnterpriseScaleSets(e){return(await this.enterprisesApi.listEnterpriseScaleSets(e)).data||[]}async listPools(){return(await this.poolsApi.listPools()).data||[]}async listAllPools(){return this.listPools()}async getPool(e){return(await this.poolsApi.getPool(e)).data}async updatePool(e,r){return(await this.poolsApi.updatePool(e,r)).data}async deletePool(e){await this.poolsApi.deletePool(e)}async listScaleSets(){return(await this.scaleSetsApi.listScalesets()).data||[]}async getScaleSet(e){return(await this.scaleSetsApi.getScaleSet(e.toString())).data}async updateScaleSet(e,r){return(await this.scaleSetsApi.updateScaleSet(e.toString(),r)).data}async deleteScaleSet(e){await this.scaleSetsApi.deleteScaleSet(e.toString())}async listInstances(){return(await this.instancesApi.listInstances()).data||[]}async getInstance(e){return(await this.instancesApi.getInstance(e)).data}async deleteInstance(e){await this.instancesApi.deleteInstance(e)}async listProviders(){return(await this.providersApi.listProviders()).data||[]}async listCredentials(){return this.listAllCredentials()}async listEndpoints(){return this.listAllEndpoints()}async firstRun(e){return(await this.firstRunApi.firstRun(e)).data}async updateController(e){return(await this.controllerApi.updateController(e)).data}}new gr;class fo extends gr{constructor(e=""){super(e)}}const Yo=new fo;var yo=nt('<svg fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>'),wo=nt('<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg>'),Io=nt('<svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg>'),Eo=ps("<button><!> <!> <!></button>");function Zo(t,e){const r=bt(e,["children","$$slots","$$events","$$legacy"]),s=bt(r,["variant","size","disabled","loading","type","fullWidth","icon","iconPosition"]);ls(e,!1);const o=te(),a=te(),n=te(),l=te(),i=te(),c=te(),p=te(),R=te(),I=is();let T=se(e,"variant",8,"primary"),f=se(e,"size",8,"md"),y=se(e,"disabled",8,!1),w=se(e,"loading",8,!1),C=se(e,"type",8,"button"),D=se(e,"fullWidth",8,!1),E=se(e,"icon",8,null),v=se(e,"iconPosition",8,"left");function U(){!y()&&!w()&&I("click")}ee(()=>{},()=>{re(o,"inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed")}),ee(()=>oe(f()),()=>{re(a,{sm:"px-3 py-2 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"}[f()])}),ee(()=>oe(T()),()=>{re(n,{primary:"text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500 disabled:bg-gray-400 disabled:hover:bg-gray-400",secondary:"text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600 focus:ring-blue-500",danger:"text-white bg-red-600 hover:bg-red-700 focus:ring-red-500 disabled:bg-gray-400 disabled:hover:bg-gray-400",ghost:"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-800 focus:ring-blue-500"}[T()])}),ee(()=>oe(D()),()=>{re(l,D()?"w-full":"")}),ee(()=>oe(y()),()=>{re(i,y()?"opacity-50":"")}),ee(()=>(k(o),k(a),k(n),k(l),k(i)),()=>{re(c,[k(o),k(a),k(n),k(l),k(i)].filter(Boolean).join(" "))}),ee(()=>oe(f()),()=>{re(p,{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[f()])}),ee(()=>(oe(v()),oe(f())),()=>{re(R,{sm:v()==="left"?"-ml-0.5 mr-2":"ml-2 -mr-0.5",md:v()==="left"?"-ml-1 mr-2":"ml-2 -mr-1",lg:v()==="left"?"-ml-1 mr-3":"ml-3 -mr-1"}[f()])}),cs(),Tr();var L=Eo();ws(L,()=>({type:C(),disabled:y(),class:k(c),...s}));var B=qe(L);{var Z=W=>{var Q=yo();Ie(()=>Ee(Q,0,`animate-spin ${k(p)??""} ${v()==="left"?"-ml-1 mr-2":"ml-2 -mr-1"}`)),ue(W,Q)},ce=W=>{var Q=us(),Ge=Os(Q);{var Cr=_e=>{var ye=wo(),Ur=qe(ye);mt(Ur,E,!0),He(ye),Ie(()=>Ee(ye,0,`${k(p)??""} ${k(R)??""}`)),ue(_e,ye)};$e(Ge,_e=>{E()&&v()==="left"&&_e(Cr)},!0)}ue(W,Q)};$e(B,W=>{w()?W(Z):W(ce,!1)})}var dt=Pt(B,2);Ps(dt,e,"default",{});var xr=Pt(dt,2);{var vr=W=>{var Q=Io(),Ge=qe(Q);mt(Ge,E,!0),He(Q),Ie(()=>Ee(Q,0,`${k(p)??""} ${k(R)??""}`)),ue(W,Q)};$e(xr,W=>{E()&&v()==="right"&&!w()&&W(vr)})}He(L),ds("click",L,U),ue(t,L),hs()}export{Zo as B,Bo as a,Uo as b,Ue as c,Ps as d,Vs as e,ws as f,Yo as g,mt as h,Rs as i,To as r,Ee as s};