diff --git a/webapp/assets/_app/immutable/chunks/qB7B8uiS.js b/webapp/assets/_app/immutable/chunks/-99ewtnX.js similarity index 73% rename from webapp/assets/_app/immutable/chunks/qB7B8uiS.js rename to webapp/assets/_app/immutable/chunks/-99ewtnX.js index b4282e10..8914d088 100644 --- a/webapp/assets/_app/immutable/chunks/qB7B8uiS.js +++ b/webapp/assets/_app/immutable/chunks/-99ewtnX.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as u}from"./B3Pzt0F_.js";import{p as v,E as m,f as h,j as r,r as d,e as t,c as k,d as g}from"./D8EpLgQ1.js";import{d as b}from"./CiE1LlKV.js";var w=h('');function j(s,i){v(i,!1);const l=m();function n(){l("close")}function c(o){o.stopPropagation()}function f(o){o.key==="Escape"&&l("close")}u();var a=w(),e=r(a),p=r(e);b(p,i,"default",{}),d(e),d(a),t("click",e,c),t("click",a,n),t("keydown",a,f),k(s,a),g()}export{j as M}; +import"./DsnmJJEf.js";import{i as u}from"./zNh6Oe5P.js";import{p as v,E as m,f as h,j as r,r as d,e as t,c as k,d as g}from"./sWNKMed7.js";import{e as b}from"./t8NOL8UT.js";var w=h('');function j(s,i){v(i,!1);const l=m();function n(){l("close")}function c(o){o.stopPropagation()}function f(o){o.key==="Escape"&&l("close")}u();var a=w(),e=r(a),p=r(e);b(p,i,"default",{}),d(e),d(a),t("click",e,c),t("click",a,n),t("keydown",a,f),k(s,a),g()}export{j as M}; diff --git a/webapp/assets/_app/immutable/chunks/-1rkm990.js b/webapp/assets/_app/immutable/chunks/-DWf2IZZ.js similarity index 71% rename from webapp/assets/_app/immutable/chunks/-1rkm990.js rename to webapp/assets/_app/immutable/chunks/-DWf2IZZ.js index 3ce69222..7f789f7d 100644 --- a/webapp/assets/_app/immutable/chunks/-1rkm990.js +++ b/webapp/assets/_app/immutable/chunks/-DWf2IZZ.js @@ -1 +1 @@ -import{s as e}from"./DsX4H4sg.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; +import{s as e}from"./CaJ57PEy.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; diff --git a/webapp/assets/_app/immutable/chunks/DZblzgqm.js b/webapp/assets/_app/immutable/chunks/5NDOgLBG.js similarity index 83% rename from webapp/assets/_app/immutable/chunks/DZblzgqm.js rename to webapp/assets/_app/immutable/chunks/5NDOgLBG.js index 3b77c940..75424eab 100644 --- a/webapp/assets/_app/immutable/chunks/DZblzgqm.js +++ b/webapp/assets/_app/immutable/chunks/5NDOgLBG.js @@ -1,4 +1,4 @@ -import"./DsnmJJEf.js";import{i as g}from"./B3Pzt0F_.js";import{p as k,l as x,s as d,m as w,n as y,a as J,f as m,j as z,w as j,k as L,g as c,r as B,t as C,c as n,d as E}from"./D8EpLgQ1.js";import{p as o,i as M}from"./5WA7h8uK.js";import{c as f,s as N}from"./CiE1LlKV.js";import{b as O}from"./C6k1Q4We.js";var S=m('
'),V=m('
');function I(p,r){k(r,!1);let t=o(r,"value",12,""),u=o(r,"placeholder",8,"{}"),b=o(r,"rows",8,4),i=o(r,"disabled",8,!1),a=w(!0);x(()=>y(t()),()=>{if(t().trim())try{JSON.parse(t()),d(a,!0)}catch{d(a,!1)}else d(a,!0)}),J(),g();var l=V(),e=z(l);j(e);var v=L(e,2);{var h=s=>{var _=S();n(s,_)};M(v,s=>{c(a)||s(h)})}B(l),C(()=>{f(e,"placeholder",u()),f(e,"rows",b()),e.disabled=i(),N(e,1,`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 font-mono text-sm resize-none +import"./DsnmJJEf.js";import{i as g}from"./zNh6Oe5P.js";import{p as k,l as x,s as d,m as w,n as y,a as J,f as m,j as z,w as j,k as L,g as c,r as B,t as C,c as n,d as E}from"./sWNKMed7.js";import{p as o,i as M}from"./Ccl3fNd2.js";import{c as f,s as N}from"./t8NOL8UT.js";import{b as O}from"./CLagxtgo.js";var S=m('
'),V=m('
');function I(p,r){k(r,!1);let t=o(r,"value",12,""),u=o(r,"placeholder",8,"{}"),b=o(r,"rows",8,4),i=o(r,"disabled",8,!1),a=w(!0);x(()=>y(t()),()=>{if(t().trim())try{JSON.parse(t()),d(a,!0)}catch{d(a,!1)}else d(a,!0)}),J(),g();var l=V(),e=z(l);j(e);var v=L(e,2);{var h=s=>{var _=S();n(s,_)};M(v,s=>{c(a)||s(h)})}B(l),C(()=>{f(e,"placeholder",u()),f(e,"rows",b()),e.disabled=i(),N(e,1,`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 font-mono text-sm resize-none ${c(a)?"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white":"border-red-300 dark:border-red-600 bg-red-50 dark:bg-red-900/20 text-red-900 dark:text-red-100"} ${i()?"opacity-50 cursor-not-allowed":""} `)}),O(e,t),n(p,l),E()}export{I as J}; diff --git a/webapp/assets/_app/immutable/chunks/6_PqUCmb.js b/webapp/assets/_app/immutable/chunks/6_PqUCmb.js deleted file mode 100644 index c0a4acbe..00000000 --- a/webapp/assets/_app/immutable/chunks/6_PqUCmb.js +++ /dev/null @@ -1 +0,0 @@ -const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function v(t){const i=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${m(t).map(a=>{const s=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(s)return i.push({name:s[1],matcher:s[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const c=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(c)return i.push({name:c[1],matcher:c[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const n=a.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,u)=>{if(u%2){if(e.startsWith("x+"))return h(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith("u+"))return h(String.fromCharCode(...e.slice(2).split("-").map(g=>parseInt(g,16))));const o=w.exec(e),[,l,p,_,d]=o;return i.push({name:_,matcher:d,optional:!!l,rest:!!p,chained:p?u===1&&n[0]==="":!1}),p?"([^]*?)":l?"([^/]*)?":"([^/]+?)"}return h(e)}).join("")}).join("")}/?$`),params:i}}function $(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function m(t){return t.slice(1).split("/").filter($)}function j(t,i,f){const a={},s=t.slice(1),c=s.filter(r=>r!==void 0);let n=0;for(let r=0;ro).join("/"),n=0),u===void 0){e.rest&&(a[e.name]="");continue}if(!e.matcher||f[e.matcher](u)){a[e.name]=u;const o=i[r+1],l=s[r+1];o&&!o.rest&&o.optional&&l&&e.chained&&(n=0),!o&&!l&&Object.keys(a).length===c.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return a}function h(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const x=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function b(t,i){return"/"+m(t).map(a=>a.replace(x,(s,c,n,r)=>{const e=i[r];if(!e){if(c||n&&e!==void 0)return"";throw new Error(`Missing parameter '${r}' in route ${t}`)}if(e.startsWith("/")||e.endsWith("/"))throw new Error(`Parameter '${r}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return e})).filter(Boolean).join("/")}export{j as e,v as p,b as r}; diff --git a/webapp/assets/_app/immutable/chunks/BFThZs5w.js b/webapp/assets/_app/immutable/chunks/BFThZs5w.js new file mode 100644 index 00000000..a5ebc971 --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/BFThZs5w.js @@ -0,0 +1 @@ +const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function x(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(a=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(i)return s.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const c=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(c)return s.push({name:c[1],matcher:c[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const n=a.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,l)=>{if(l%2){if(e.startsWith("x+"))return h(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith("u+"))return h(String.fromCharCode(...e.slice(2).split("-").map(g=>parseInt(g,16))));const o=w.exec(e),[,u,p,m,d]=o;return s.push({name:m,matcher:d,optional:!!u,rest:!!p,chained:p?l===1&&n[0]==="":!1}),p?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return h(e)}).join("")}).join("")}/?$`),params:s}}function $(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function _(t){return t.slice(1).split("/").filter($)}function j(t,s,f){const a={},i=t.slice(1),c=i.filter(r=>r!==void 0);let n=0;for(let r=0;ro).join("/"),n=0),l===void 0){e.rest&&(a[e.name]="");continue}if(!e.matcher||f[e.matcher](l)){a[e.name]=l;const o=s[r+1],u=i[r+1];o&&!o.rest&&o.optional&&u&&e.chained&&(n=0),!o&&!u&&Object.keys(a).length===c.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return a}function h(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const b=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function k(t,s){return"/"+_(t).map(a=>a.replace(b,(i,c,n,r)=>{const e=s[r];if(!e){if(c||n&&e!==void 0)return"";throw new Error(`Missing parameter '${r}' in route ${t}`)}if(e.startsWith("/")||e.endsWith("/"))throw new Error(`Parameter '${r}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return e})).filter(Boolean).join("/")}const v=globalThis.__sveltekit_rl0ihc?.base??"/ui",C=globalThis.__sveltekit_rl0ihc?.assets??v;export{C as a,v as b,j as e,x as p,k as r}; diff --git a/webapp/assets/_app/immutable/chunks/BWbwsSb6.js b/webapp/assets/_app/immutable/chunks/BYXzcXZj.js similarity index 84% rename from webapp/assets/_app/immutable/chunks/BWbwsSb6.js rename to webapp/assets/_app/immutable/chunks/BYXzcXZj.js index 0ac47fc7..3f35f25a 100644 --- a/webapp/assets/_app/immutable/chunks/BWbwsSb6.js +++ b/webapp/assets/_app/immutable/chunks/BYXzcXZj.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as j}from"./B3Pzt0F_.js";import{p as E,E as G,f as S,j as t,r,k as g,u,n as p,z as m,t as z,v as D,e as f,c as H,d as I}from"./D8EpLgQ1.js";import{h as y,s as v}from"./CiE1LlKV.js";import{p as h}from"./5WA7h8uK.js";import{g as o}from"./D5ucq3Gx.js";var q=S('
');function M(x,s){E(s,!1);const k=G();let d=h(s,"selectedForgeType",12,""),_=h(s,"label",8,"Select Forge Type");function n(c){d(c),k("select",c)}j();var i=q(),l=t(i),F=t(l,!0);r(l);var b=g(l,2),e=t(b),w=t(e);y(w,()=>(p(o),u(()=>o("github","w-8 h-8")))),m(2),r(e);var a=g(e,2),T=t(a);y(T,()=>(p(o),u(()=>o("gitea","w-8 h-8")))),m(2),r(a),r(b),r(i),z(()=>{D(F,_()),v(e,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${d()==="github"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),v(a,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${d()==="gitea"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`)}),f("click",e,()=>n("github")),f("click",a,()=>n("gitea")),H(x,i),I()}export{M as F}; +import"./DsnmJJEf.js";import{i as j}from"./zNh6Oe5P.js";import{p as E,E as G,f as S,j as t,r,k as g,u,n as p,z as m,t as z,v as D,e as f,c as H,d as I}from"./sWNKMed7.js";import{h as y,s as v}from"./t8NOL8UT.js";import{p as h}from"./Ccl3fNd2.js";import{g as o}from"./Cbkm53HO.js";var q=S('
');function M(x,s){E(s,!1);const k=G();let d=h(s,"selectedForgeType",12,""),_=h(s,"label",8,"Select Forge Type");function n(c){d(c),k("select",c)}j();var i=q(),l=t(i),F=t(l,!0);r(l);var b=g(l,2),e=t(b),w=t(e);y(w,()=>(p(o),u(()=>o("github","w-8 h-8")))),m(2),r(e);var a=g(e,2),T=t(a);y(T,()=>(p(o),u(()=>o("gitea","w-8 h-8")))),m(2),r(a),r(b),r(i),z(()=>{D(F,_()),v(e,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${d()==="github"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),v(a,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${d()==="gitea"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`)}),f("click",e,()=>n("github")),f("click",a,()=>n("gitea")),H(x,i),I()}export{M as F}; diff --git a/webapp/assets/_app/immutable/chunks/BEkVdVE1.js b/webapp/assets/_app/immutable/chunks/BZUCTtPY.js similarity index 90% rename from webapp/assets/_app/immutable/chunks/BEkVdVE1.js rename to webapp/assets/_app/immutable/chunks/BZUCTtPY.js index 1eb2c1f7..ff78735d 100644 --- a/webapp/assets/_app/immutable/chunks/BEkVdVE1.js +++ b/webapp/assets/_app/immutable/chunks/BZUCTtPY.js @@ -1 +1 @@ -import{I as u}from"./D8EpLgQ1.js";function c(){const{subscribe:s,set:i,update:o}=u([]),n={subscribe:s,add:e=>{const t=Math.random().toString(36).substr(2,9),r={...e,id:t,duration:e.duration??5e3};return o(a=>[...a,r]),r.duration&&r.duration>0&&setTimeout(()=>{o(a=>a.filter(d=>d.id!==t))},r.duration),t},remove:e=>{o(t=>t.filter(r=>r.id!==e))},clear:()=>{i([])},success:(e,t="",r)=>n.add({type:"success",title:e,message:t,duration:r}),error:(e,t="",r)=>n.add({type:"error",title:e,message:t,duration:r}),info:(e,t="",r)=>n.add({type:"info",title:e,message:t,duration:r}),warning:(e,t="",r)=>n.add({type:"warning",title:e,message:t,duration:r})};return n}const p=c();export{p as t}; +import{I as u}from"./sWNKMed7.js";function c(){const{subscribe:s,set:i,update:o}=u([]),n={subscribe:s,add:e=>{const t=Math.random().toString(36).substr(2,9),r={...e,id:t,duration:e.duration??5e3};return o(a=>[...a,r]),r.duration&&r.duration>0&&setTimeout(()=>{o(a=>a.filter(d=>d.id!==t))},r.duration),t},remove:e=>{o(t=>t.filter(r=>r.id!==e))},clear:()=>{i([])},success:(e,t="",r)=>n.add({type:"success",title:e,message:t,duration:r}),error:(e,t="",r)=>n.add({type:"error",title:e,message:t,duration:r}),info:(e,t="",r)=>n.add({type:"info",title:e,message:t,duration:r}),warning:(e,t="",r)=>n.add({type:"warning",title:e,message:t,duration:r})};return n}const p=c();export{p as t}; diff --git a/webapp/assets/_app/immutable/chunks/B_CZMFLe.js b/webapp/assets/_app/immutable/chunks/B_CZMFLe.js deleted file mode 100644 index 5bea83e1..00000000 --- a/webapp/assets/_app/immutable/chunks/B_CZMFLe.js +++ /dev/null @@ -1 +0,0 @@ -import"./DsnmJJEf.js";import{i as ke}from"./B3Pzt0F_.js";import{V as ut,aU as gt,aV as ft,M as ht,O as mt,P as pt,Q as kt,R as xt,at as _t,K as Xe,L as yt,U as bt,T as wt,a8 as Mt,p as fe,l as $,s as ee,m as te,n as u,a as Le,C as ye,j as s,g as e,r as n,t as R,c as i,d as he,E as be,f as L,e as Ge,u as v,k as j,v as O,z as Se,D as Te,B as Q,b as q,x as Pt,q as X}from"./D8EpLgQ1.js";import{p as o,l as Ye,i as I,b as Ct}from"./5WA7h8uK.js";import{e as de,i as ge}from"./u94nIB4-.js";import{h as Ae,s as pe,f as jt,e as zt,B as Ce,r as Tt,c as Be,b as Lt,d as $e,i as Ht}from"./CiE1LlKV.js";import{c as It}from"./CCSWcuVN.js";import{b as St}from"./C6k1Q4We.js";import{b as At}from"./D3_ugSUS.js";import{B as Bt,g as et,b as Et}from"./D5ucq3Gx.js";function tt(S,r,g){Xe&&yt();var a=S,t=_t,p,h,m=null,f=ut()?gt:ft;function M(){p&&bt(p),m!==null&&(m.lastChild.remove(),a.before(m),m=null),p=h}ht(()=>{if(f(t,t=r())){var k=a,A=xt();A&&(m=document.createDocumentFragment(),m.append(k=mt())),h=pt(()=>g(k)),A?kt.add_callback(M):M()}}),Xe&&(a=wt)}function Fe(S,r){var g=S.$$events?.[r.type],a=Mt(g)?g.slice():g==null?[]:[g];for(var t of a)t.call(this,r)}var Dt=ye('');function Vt(S,r){fe(r,!1);const g=te();let a=o(r,"name",8),t=o(r,"class",8,"h-5 w-5");const p={plus:'',edit:'',delete:'',view:'',close:'',check:'',x:'',"chevron-left":'',"chevron-right":'',"chevron-down":'',"chevron-up":'',search:'',refresh:'',menu:'',settings:'',"check-circle":'',"x-circle":'',"exclamation-circle":'',"information-circle":'',loading:'',sun:'',moon:'',document:'',folder:''};$(()=>u(a()),()=>{ee(g,p[a()]||"")}),Le();var h=Dt(),m=s(h);Ae(m,()=>e(g),!0),n(h),R(()=>pe(h,0,`${t()}`)),i(S,h),he()}var Nt=L('');function rt(S,r){const g=Ye(r,["children","$$slots","$$events","$$legacy"]),a=Ye(g,["action","disabled","title","ariaLabel","size"]);fe(r,!1);const t=te(),p=te(),h=te(),m=te(),f=te(),M=te(),k=te(),A=te(),U=te(),V=be();let P=o(r,"action",8,"edit"),Z=o(r,"disabled",8,!1),B=o(r,"title",8,""),x=o(r,"ariaLabel",8,""),H=o(r,"size",8,"md");function D(){Z()||V("click")}$(()=>{},()=>{ee(t,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),$(()=>u(H()),()=>{ee(p,{sm:"p-1",md:"p-2"}[H()])}),$(()=>u(P()),()=>{ee(h,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500"}[P()])}),$(()=>u(H()),()=>{ee(m,H()==="sm"?"h-4 w-4":"h-5 w-5")}),$(()=>(e(t),e(p),e(h)),()=>{ee(f,[e(t),e(p),e(h)].join(" "))}),$(()=>{},()=>{ee(M,{edit:'',delete:'',view:'',add:''})}),$(()=>{},()=>{ee(k,{edit:"Edit",delete:"Delete",view:"View",add:"Add"})}),$(()=>(u(B()),e(k),u(P())),()=>{ee(A,B()||e(k)[P()])}),$(()=>(u(x()),e(k),u(P())),()=>{ee(U,x()||`${e(k)[P()]} item`)}),Le(),ke();var F=Nt();jt(F,()=>({type:"button",class:e(f),disabled:Z(),title:e(A),"aria-label":e(U),...a}));var J=s(F),l=s(J);Ae(l,()=>(e(M),u(P()),v(()=>e(M)[P()])),!0),n(J),n(F),R(()=>pe(J,0,zt(e(m)))),Ge("click",F,D),i(S,F),he()}var Rt=L('

');function Ut(S,r){let g=o(r,"message",8,"Loading...");var a=Rt(),t=j(s(a),2),p=s(t,!0);n(t),n(a),R(()=>O(p,g())),i(S,a)}var qt=L('
'),Ot=L('

');function Ft(S,r){let g=o(r,"title",8,"Error"),a=o(r,"message",8),t=o(r,"showRetry",8,!1),p=o(r,"onRetry",8,void 0);var h=Ot(),m=s(h),f=s(m),M=j(s(f),2),k=s(M),A=s(k,!0);n(k);var U=j(k,2),V=s(U,!0);n(U);var P=j(U,2);{var Z=B=>{var x=qt(),H=s(x);Ce(H,{variant:"secondary",size:"sm",icon:"",class:"text-red-700 dark:text-red-200 bg-red-100 dark:bg-red-800 hover:bg-red-200 dark:hover:bg-red-700 focus:outline-none focus:bg-red-200 dark:focus:bg-red-700",$$events:{click(...D){p()?.apply(this,D)}},children:(D,F)=>{Se();var J=Te("Retry");i(D,J)},$$slots:{default:!0}}),n(x),i(B,x)};I(P,B=>{t()&&p()&&B(Z)})}n(M),n(f),n(m),n(h),R(()=>{O(A,g()),O(V,a())}),i(S,h)}var Gt=ye(''),Kt=ye(''),Qt=ye(''),Zt=ye(''),Jt=ye(''),Wt=ye(''),Xt=L('

');function Yt(S,r){let g=o(r,"title",8),a=o(r,"message",8),t=o(r,"iconType",8,"document");var p=Xt(),h=s(p);{var m=V=>{var P=Gt();i(V,P)},f=V=>{var P=Q(),Z=q(P);{var B=H=>{var D=Kt();i(H,D)},x=H=>{var D=Q(),F=q(D);{var J=d=>{var c=Qt();i(d,c)},l=d=>{var c=Q(),y=q(c);{var N=w=>{var E=Zt();i(w,E)},W=w=>{var E=Q(),z=q(E);{var C=T=>{var G=Jt();i(T,G)},_=T=>{var G=Q(),Y=q(G);{var re=ae=>{var ce=Wt();i(ae,ce)};I(Y,ae=>{t()==="settings"&&ae(re)},!0)}i(T,G)};I(z,T=>{t()==="key"?T(C):T(_,!1)},!0)}i(w,E)};I(y,w=>{t()==="cog"?w(N):w(W,!1)},!0)}i(d,c)};I(F,d=>{t()==="users"?d(J):d(l,!1)},!0)}i(H,D)};I(Z,H=>{t()==="building"?H(B):H(x,!1)},!0)}i(V,P)};I(h,V=>{t()==="document"?V(m):V(f,!1)})}var M=j(h,2),k=s(M,!0);n(M);var A=j(M,2),U=s(A,!0);n(A),n(p),R(()=>{O(k,g()),O(U,a())}),i(S,p)}var $t=L('
');function er(S,r){fe(r,!1);let g=o(r,"value",12,""),a=o(r,"placeholder",8,"Search..."),t=o(r,"disabled",8,!1);const p=be();function h(){p("input",g())}ke();var m=$t(),f=s(m),M=s(f);Vt(M,{name:"search",class:"h-5 w-5 text-gray-400"}),n(f);var k=j(f,2);Tt(k),n(m),R(()=>{Be(k,"placeholder",a()),k.disabled=t()}),St(k,g),Ge("input",k,h),i(S,m),he()}var tr=L(""),rr=L('
'),ar=L('
');function nr(S,r){fe(r,!1);let g=o(r,"searchTerm",12,""),a=o(r,"perPage",12,25),t=o(r,"placeholder",8,"Search..."),p=o(r,"showPerPageSelector",8,!0),h=o(r,"perPageOptions",24,()=>[25,50,100]);const m=be();function f(){m("search",{term:g()})}function M(){m("perPageChange",{perPage:a()})}ke();var k=ar(),A=s(k),U=s(A),V=s(U),P=j(s(V),2);er(P,{get placeholder(){return t()},get value(){return g()},set value(x){g(x)},$$events:{input:f},$$legacy:!0}),n(V),n(U);var Z=j(U,2);{var B=x=>{var H=rr(),D=s(H),F=j(s(D),2);R(()=>{a(),Pt(()=>{h()})}),de(F,5,h,ge,(J,l)=>{var d=tr(),c=s(d,!0);n(d);var y={};R(()=>{O(c,e(l)),y!==(y=e(l))&&(d.value=(d.__value=e(l))??"")}),i(J,d)}),n(F),n(D),n(H),Lt(F,a),Ge("change",F,M),i(x,H)};I(Z,x=>{p()&&x(B)})}n(A),n(k),i(S,k),he()}var ir=L('Showing to of ',1),or=L('
');function sr(S,r){fe(r,!1);const g=te(),a=te();let t=o(r,"currentPage",8,1),p=o(r,"totalPages",8,1),h=o(r,"perPage",8,25),m=o(r,"totalItems",8,0),f=o(r,"itemName",8,"results");const M=be();function k(P){P>=1&&P<=p()&&P!==t()&&M("pageChange",{page:P})}$(()=>(u(m()),u(t()),u(h())),()=>{ee(g,m()===0?0:(t()-1)*h()+1)}),$(()=>(u(t()),u(h()),u(m())),()=>{ee(a,Math.min(t()*h(),m()))}),Le(),ke();var A=Q(),U=q(A);{var V=P=>{var Z=or(),B=s(Z),x=s(B);{let z=X(()=>t()===1);Ce(x,{variant:"secondary",get disabled(){return e(z)},$$events:{click:()=>k(t()-1)},children:(C,_)=>{Se();var T=Te("Previous");i(C,T)},$$slots:{default:!0}})}var H=j(x,2);{let z=X(()=>t()===p());Ce(H,{variant:"secondary",get disabled(){return e(z)},class:"ml-3",$$events:{click:()=>k(t()+1)},children:(C,_)=>{Se();var T=Te("Next");i(C,T)},$$slots:{default:!0}})}n(B);var D=j(B,2),F=s(D),J=s(F),l=s(J);{var d=z=>{var C=Te();R(()=>O(C,`No ${f()??""}`)),i(z,C)},c=z=>{var C=ir(),_=j(q(C)),T=s(_,!0);n(_);var G=j(_,2),Y=s(G,!0);n(G);var re=j(G,2),ae=s(re,!0);n(re);var ce=j(re);R(()=>{O(T,e(g)),O(Y,e(a)),O(ae,m()),O(ce,` ${f()??""}`)}),i(z,C)};I(l,z=>{m()===0?z(d):z(c,!1)})}n(J),n(F);var y=j(F,2),N=s(y),W=s(N);{let z=X(()=>t()===1);Ce(W,{variant:"secondary",size:"sm",get disabled(){return e(z)},class:"rounded-r-none","aria-label":"Previous page",icon:"",$$events:{click:()=>k(t()-1)}})}var w=j(W,2);de(w,1,()=>(u(p()),v(()=>Array(p()))),ge,(z,C,_)=>{const T=X(()=>_+1);{let G=X(()=>e(T)===t()?"primary":"secondary");Ce(z,{get variant(){return e(G)},size:"sm",class:"rounded-none border-l-0 first:border-l first:rounded-l-md",$$events:{click:()=>k(e(T))},children:(Y,re)=>{Se();var ae=Te();R(()=>O(ae,e(T))),i(Y,ae)},$$slots:{default:!0}})}});var E=j(w,2);{let z=X(()=>t()===p());Ce(E,{variant:"secondary",size:"sm",get disabled(){return e(z)},class:"rounded-l-none","aria-label":"Next page",icon:"",$$events:{click:()=>k(t()+1)}})}n(N),n(y),n(D),n(Z),i(P,Z)};I(U,P=>{p()>1&&P(V)})}i(S,A),he()}var lr=L('

'),dr=L('

'),cr=L('

'),vr=L('

'),ur=L('
'),gr=L('
'),fr=L('
'),hr=L(" "),mr=L('
'),pr=L('
');function kr(S,r){fe(r,!1);const g=be();let a=o(r,"item",8),t=o(r,"config",8);function p(){if(!a())return"Unknown";const{field:l,useId:d,showOwner:c}=t().primaryText,y=a()[l];return d&&y?`${y.slice(0,8)}...`:c&&a().owner&&a().name?`${a().owner}/${a().name}`:y||"Unknown"}function h(){if(!t().secondaryText)return"";const{field:l,computedValue:d}=t().secondaryText;return d!==void 0?typeof d=="function"?d(a()):d:a()?.[l]||""}function m(){if(!t().primaryText.href||!a())return"#";let l=t().primaryText.href;return l=l.replace("{id}",a().id||""),l=l.replace("{name}",encodeURIComponent(a().name||"")),`${At}${l}`}function f(l){if(!a())return;const d=t().actions?.find(c=>c.type===l);d&&d.handler(a()),l==="edit"?g("edit",{item:a()}):l==="delete"?g("delete",{item:a()}):g("action",{type:l,item:a()})}function M(l){switch(l.type){case"status":if(t().entityType==="instance"){const c=a()?.[l.field]||"unknown";let y="neutral",N=c.charAt(0).toUpperCase()+c.slice(1);return l.field==="status"?y=c==="running"?"success":c==="pending"||c==="creating"?"info":c==="failed"||c==="error"?"error":"neutral":l.field==="runner_status"&&(y=c==="idle"?"info":c==="active"||c==="running"?"success":c==="failed"||c==="error"?"error":"neutral"),{variant:y,text:N}}return{variant:"neutral",text:a()?.[l.field]||"Unknown"};case"forge":return{variant:"neutral",text:a()?.[l.field]||"unknown"};case"auth":const d=a()?.[l.field]||"pat";return{variant:d==="pat"?"success":"info",text:d.toUpperCase()};case"custom":if(typeof l.value=="function"){const c=l.value(a());return{variant:c?.variant||"neutral",text:c?.text||""}}return{variant:l.value?.variant||"neutral",text:l.value?.text||""};default:return{variant:"neutral",text:""}}}ke();var k=pr(),A=s(k),U=s(A);{var V=l=>{var d=dr(),c=s(d),y=s(c,!0);n(c);var N=j(c,2);{var W=w=>{var E=lr(),z=s(E,!0);n(E),R(C=>O(z,C),[()=>v(h)]),i(w,E)};I(N,w=>{u(t()),v(()=>t().secondaryText)&&w(W)})}n(d),R((w,E)=>{Be(d,"href",w),pe(c,1,`text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 truncate ${u(t()),v(()=>t().primaryText.isMonospace?"font-mono":"")??""}`),O(y,E)},[()=>v(m),()=>v(p)]),i(l,d)},P=l=>{var d=vr(),c=s(d),y=s(c,!0);n(c);var N=j(c,2);{var W=w=>{var E=cr(),z=s(E,!0);n(E),R(C=>O(z,C),[()=>v(h)]),i(w,E)};I(N,w=>{u(t()),v(()=>t().secondaryText)&&w(W)})}n(d),R(w=>O(y,w),[()=>v(p)]),i(l,d)};I(U,l=>{u(t()),v(()=>t().primaryText.isClickable)?l(V):l(P,!1)})}var Z=j(U,2);{var B=l=>{var d=fr(),c=s(d);{var y=w=>{var E=Q(),z=q(E);de(z,1,()=>(u(t()),v(()=>t().customInfo)),ge,(C,_)=>{const T=X(()=>(e(_),u(a()),v(()=>typeof e(_).icon=="function"?e(_).icon(a()):e(_).icon))),G=X(()=>(e(_),u(a()),v(()=>typeof e(_).text=="function"?e(_).text(a()):e(_).text)));var Y=ur(),re=s(Y);{var ae=je=>{var He=Q(),De=q(He);Ae(De,()=>e(T)),i(je,He)};I(re,je=>{e(T)&&je(ae)})}var ce=j(re,2),Ee=s(ce,!0);n(ce),n(Y),R(()=>O(Ee,e(G))),i(C,Y)}),i(w,E)};I(c,w=>{u(t()),v(()=>t().customInfo)&&w(y)})}var N=j(c,2);{var W=w=>{var E=Q(),z=q(E);de(z,1,()=>(u(t()),v(()=>t().badges.filter(C=>C.type==="forge"))),ge,(C,_)=>{var T=gr(),G=s(T);Ae(G,()=>(u(et),e(_),u(a()),v(()=>et(e(_).field?a()?.[e(_).field]||"unknown":a()?.endpoint?.endpoint_type||"unknown"))));var Y=j(G,2),re=s(Y,!0);n(Y),n(T),R(()=>O(re,(u(a()),v(()=>a()?.endpoint?.name||"Unknown")))),i(C,T)}),i(w,E)};I(N,w=>{u(t()),v(()=>t().badges)&&w(W)})}n(d),i(l,d)};I(Z,l=>{u(t()),v(()=>t().customInfo||t().badges?.some(d=>d.type==="forge"))&&l(B)})}n(A);var x=j(A,2),H=s(x);{var D=l=>{var d=Q(),c=q(d);de(c,1,()=>(u(t()),v(()=>t().badges.filter(y=>y.type!=="forge"))),ge,(y,N)=>{var W=Q(),w=q(W);{var E=C=>{const _=X(()=>(e(N),v(()=>M(e(N)))));var T=hr(),G=s(T,!0);n(T),R(()=>{pe(T,1,`inline-flex items-center rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ${u(e(_)),v(()=>e(_).variant==="success"?"bg-green-50 text-green-700 ring-green-600/20 dark:bg-green-900/50 dark:text-green-300 dark:ring-green-400/20":e(_).variant==="info"?"bg-blue-50 text-blue-700 ring-blue-600/20 dark:bg-blue-900/50 dark:text-blue-300 dark:ring-blue-400/20":e(_).variant==="error"?"bg-red-50 text-red-700 ring-red-600/20 dark:bg-red-900/50 dark:text-red-300 dark:ring-red-400/20":"bg-gray-50 text-gray-700 ring-gray-600/20 dark:bg-gray-900/50 dark:text-gray-300 dark:ring-gray-400/20")??""}`),O(G,(u(e(_)),v(()=>e(_).text)))}),i(C,T)},z=C=>{const _=X(()=>(e(N),v(()=>M(e(N)))));Bt(C,{get variant(){return u(e(_)),v(()=>e(_).variant)},get text(){return u(e(_)),v(()=>e(_).text)}})};I(w,C=>{e(N),v(()=>e(N).type==="status")?C(E):C(z,!1)})}i(y,W)}),i(l,d)};I(H,l=>{u(t()),v(()=>t().badges)&&l(D)})}var F=j(H,2);{var J=l=>{var d=mr();de(d,5,()=>(u(t()),v(()=>t().actions)),ge,(c,y)=>{{let N=X(()=>(e(y),u(t()),v(()=>e(y).type==="edit"?`Edit ${t().entityType}`:`Delete ${t().entityType}`))),W=X(()=>(e(y),u(t()),v(()=>e(y).type==="edit"?`Edit ${t().entityType}`:`Delete ${t().entityType}`)));rt(c,{get action(){return e(y),v(()=>e(y).type)},size:"sm",get title(){return e(N)},get ariaLabel(){return e(W)},$$events:{click:()=>f(e(y).type)}})}}),n(d),i(l,d)};I(F,l=>{u(t()),v(()=>t().actions)&&l(J)})}n(x),n(k),i(S,k),he()}var xr=L('
'),_r=L('
'),yr=L("
"),br=L("
"),wr=L(' ',1),Mr=L('
');function Vr(S,r){fe(r,!1);const g=te();let a=o(r,"columns",24,()=>[]),t=o(r,"data",24,()=>[]),p=o(r,"loading",8,!1),h=o(r,"error",8,""),m=o(r,"totalItems",8,0),f=o(r,"itemName",8,"results"),M=o(r,"searchTerm",12,""),k=o(r,"searchPlaceholder",8,"Search..."),A=o(r,"showSearch",8,!0),U=o(r,"currentPage",8,1),V=o(r,"perPage",12,25),P=o(r,"totalPages",8,1),Z=o(r,"showPagination",8,!0),B=o(r,"showPerPageSelector",8,!0),x=o(r,"emptyTitle",8,"No items found"),H=o(r,"emptyMessage",8,""),D=o(r,"emptyIconType",8,"document"),F=o(r,"errorTitle",8,"Error loading data"),J=o(r,"showRetry",8,!1),l=o(r,"showMobileCards",8,!0),d=o(r,"mobileCardConfig",8,null);const c=be();function y(b){c("search",b.detail)}function N(b){c("pageChange",b.detail)}function W(b){c("perPageChange",b.detail)}function w(){c("retry")}function E(b){c("edit",b.detail)}function z(b){c("delete",b.detail)}function C(b){c("action",b.detail)}function _(b){const ve="px-6 py-4 text-sm",Ve=b.align==="right"?"text-right":b.align==="center"?"text-center":"text-left",Ne=b.key==="actions"?"font-medium":"text-gray-900 dark:text-white",Re=b.flexible?"min-w-0":"";return`${ve} ${Ve} ${Ne} ${Re}`.trim()}function T(){return a().map(b=>b.flexible?`${b.flexRatio||1}fr`:"auto").join(" ")}$(()=>(u(H()),u(M()),u(f())),()=>{ee(g,H()||(M()?`No items found matching "${M()}"`:`No ${f()} found`))}),Le(),ke();var G=Mr(),Y=s(G);{var re=b=>{nr(b,{get placeholder(){return k()},get showPerPageSelector(){return B()},get searchTerm(){return M()},set searchTerm(ve){M(ve)},get perPage(){return V()},set perPage(ve){V(ve)},$$events:{search:y,perPageChange:W},$$legacy:!0})};I(Y,b=>{A()&&b(re)})}var ae=j(Y,2),ce=s(ae);{var Ee=b=>{Ut(b,{get message(){return`Loading ${f()??""}...`}})},je=b=>{var ve=Q(),Ve=q(ve);{var Ne=we=>{{let Ie=X(()=>J()?w:void 0);Ft(we,{get title(){return F()},get message(){return h()},get showRetry(){return J()},get onRetry(){return e(Ie)}})}},Re=we=>{var Ie=Q(),at=q(Ie);{var nt=Me=>{Yt(Me,{get title(){return x()},get message(){return e(g)},get iconType(){return D()}})},it=Me=>{var Ke=wr(),Qe=q(Ke);{var ot=oe=>{var K=_r();de(K,7,t,(le,ne)=>le.id||le.name||ne,(le,ne,qe)=>{var ze=xr(),ie=s(ze);{var Pe=me=>{var xe=Q(),se=q(xe);tt(se,()=>(e(ne),v(()=>`${e(ne).id||e(ne).name}-${e(ne).updated_at}-mobile`)),_e=>{kr(_e,{get item(){return e(ne)},get config(){return d()},$$events:{edit(ue){Fe.call(this,r,ue)},delete(ue){Fe.call(this,r,ue)},action(ue){Fe.call(this,r,ue)}}})}),i(me,xe)},Oe=me=>{var xe=Q(),se=q(xe);$e(se,r,"mobile-card",{get item(){return e(ne)},get index(){return e(qe)}}),i(me,xe)};I(ie,me=>{d()?me(Pe):me(Oe,!1)})}n(ze),i(le,ze)}),n(K),i(oe,K)};I(Qe,oe=>{l()&&oe(ot)})}var Ze=j(Qe,2),Ue=s(Ze),Je=s(Ue);de(Je,1,a,ge,(oe,K)=>{var le=yr(),ne=s(le,!0);n(le),R(()=>{pe(le,1,`px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600 ${e(K),v(()=>e(K).align==="right"?"text-right":e(K).align==="center"?"text-center":"text-left")??""}`),O(ne,(e(K),v(()=>e(K).title)))}),i(oe,le)});var st=j(Je,2);de(st,3,t,(oe,K)=>oe.id||oe.name||K,(oe,K,le)=>{var ne=Q(),qe=q(ne);de(qe,1,a,ge,(ze,ie)=>{var Pe=br(),Oe=s(Pe);{var me=se=>{var _e=Q(),ue=q(_e);tt(ue,()=>(e(K),e(ie),v(()=>`${e(K).id||e(K).name}-${e(K).updated_at}-${e(ie).key}`)),lt=>{var We=Q(),dt=q(We);It(dt,()=>e(ie).cellComponent,(ct,vt)=>{vt(ct,Ct({get item(){return e(K)}},()=>e(ie).cellProps,{$$events:{edit:E,delete:z,action:C}}))}),i(lt,We)}),i(se,_e)},xe=se=>{var _e=Q(),ue=q(_e);$e(ue,r,"cell",{get item(){return e(K)},get column(){return e(ie)},get index(){return e(le)},get value(){return e(K),e(ie),v(()=>e(K)[e(ie).key])}}),i(se,_e)};I(Oe,se=>{e(ie),v(()=>e(ie).cellComponent)?se(me):se(xe,!1)})}n(Pe),R(se=>pe(Pe,1,`${se??""} border-b border-gray-200 dark:border-gray-700`),[()=>(e(ie),v(()=>_(e(ie))))]),i(ze,Pe)}),i(oe,ne)}),n(Ue),n(Ze),R(oe=>Ht(Ue,`grid-template-columns: ${oe??""}`),[()=>v(T)]),i(Me,Ke)};I(at,Me=>{u(t()),v(()=>t().length===0)?Me(nt):Me(it,!1)},!0)}i(we,Ie)};I(Ve,we=>{h()?we(Ne):we(Re,!1)},!0)}i(b,ve)};I(ce,b=>{p()?b(Ee):b(je,!1)})}var He=j(ce,2);{var De=b=>{sr(b,{get currentPage(){return U()},get totalPages(){return P()},get perPage(){return V()},get totalItems(){return m()},get itemName(){return f()},$$events:{pageChange:N}})};I(He,b=>{u(Z()),u(p()),u(h()),u(t()),v(()=>Z()&&!p()&&!h()&&t().length>0)&&b(De)})}n(ae),n(G),i(S,G),he()}var Pr=L('
');function Nr(S,r){fe(r,!1);const g=be();let a=o(r,"item",8),t=o(r,"actions",24,()=>[{type:"edit",title:"Edit",ariaLabel:"Edit item",action:"edit"},{type:"delete",title:"Delete",ariaLabel:"Delete item",action:"delete"}]);function p(m){a()&&(m==="edit"?g("edit",{item:a()}):m==="delete"?g("delete",{item:a()}):g("action",{type:m,item:a()}))}ke();var h=Pr();de(h,5,t,ge,(m,f)=>{{let M=X(()=>(e(f),v(()=>e(f).action||(e(f).type==="edit"?"edit":e(f).type==="delete"?"delete":"view")))),k=X(()=>(e(f),v(()=>e(f).title||(e(f).type==="edit"?"Edit":e(f).type==="delete"?"Delete":e(f).label)))),A=X(()=>(e(f),v(()=>e(f).ariaLabel||(e(f).type==="edit"?"Edit item":e(f).type==="delete"?"Delete item":e(f).label))));rt(m,{get action(){return e(M)},get title(){return e(k)},get ariaLabel(){return e(A)},$$events:{click:()=>p(e(f).type)}})}}),n(h),i(S,h),he()}var Cr=L(" "),jr=L(" ");function Rr(S,r){fe(r,!1);const g=te(),a=te();let t=o(r,"item",8),p=o(r,"field",8),h=o(r,"type",8,"text"),m=o(r,"truncateLength",8,50),f=o(r,"showTitle",8,!1);function M(){return t()&&p().split(".").reduce((B,x)=>B?.[x],t())||""}function k(){return h()==="date"?Et(e(g)):h()==="truncated"&&e(g).length>m()?`${e(g).slice(0,m())}...`:e(g)}function A(){switch(h()){case"code":return"inline-block max-w-full truncate bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded text-xs font-mono";case"description":return"block w-full truncate text-sm text-gray-500 dark:text-gray-300";case"date":return"block w-full truncate text-sm text-gray-900 dark:text-white font-mono";default:return"block w-full truncate text-sm text-gray-900 dark:text-white"}}$(()=>{},()=>{ee(g,M())}),$(()=>{},()=>{ee(a,k())}),Le(),ke();var U=Q(),V=q(U);{var P=B=>{var x=Cr(),H=s(x,!0);n(x),R(D=>{pe(x,1,`${D??""} ${f()?"cursor-default":""}`),Be(x,"title",f()?e(g):""),O(H,e(a))},[()=>v(A)]),i(B,x)},Z=B=>{var x=jr(),H=s(x,!0);n(x),R(D=>{pe(x,1,`${D??""} ${f()?"cursor-default":""}`),Be(x,"title",f()?e(g):""),O(H,e(a))},[()=>v(A)]),i(B,x)};I(V,B=>{h()==="code"?B(P):B(Z,!1)})}i(S,U),he()}export{rt as A,Vr as D,Rr as G,Nr as a,tt as k}; diff --git a/webapp/assets/_app/immutable/chunks/u94nIB4-.js b/webapp/assets/_app/immutable/chunks/BuuPrWMc.js similarity index 99% rename from webapp/assets/_app/immutable/chunks/u94nIB4-.js rename to webapp/assets/_app/immutable/chunks/BuuPrWMc.js index 0d15509c..72f1fd13 100644 --- a/webapp/assets/_app/immutable/chunks/u94nIB4-.js +++ b/webapp/assets/_app/immutable/chunks/BuuPrWMc.js @@ -1 +1 @@ -import{O as K,M as te,Y as F,K as M,Z as ae,L as re,g as $,q as oe,_ as ie,a0 as se,a1 as J,a2 as G,T as L,a3 as le,a4 as ce,P as q,R as fe,Q as ue,a5 as V,m as de,a6 as B,a7 as Q,a8 as ve,a9 as D,aa as X,U as he,ab as R,ac as Se,ad as P,ae as Z,af as me,ag as _e,ah as we,ai as Ee,aj as pe,ak as z,H as be,al as ge,I as Ie}from"./D8EpLgQ1.js";function Te(c,o){return o}function Ne(c,o,n){for(var t=c.items,u=[],S=o.length,s=0;s0&&u.length===0&&n!==null;if(d){var N=n.parentNode;we(N),N.append(n),t.clear(),T(c,o[0].prev,o[S-1].next)}Ee(u,()=>{for(var m=0;m{var _=n();return ve(_)?_:_==null?[]:Q(_)}),r,v;function f(){ke(v,r,d,E,s,u,o,t,n),S!==null&&(r.length===0?i?X(i):i=q(()=>S(s)):i!==null&&he(i,()=>{i=null}))}te(()=>{v??=pe,r=$(x);var _=r.length;if(g&&_===0)return;g=_===0;let p=!1;if(M){var k=ie(s)===se;k!==(_===0)&&(s=J(),F(s),G(!1),p=!0)}if(M){for(var C=null,b,e=0;e<_;e++){if(L.nodeType===le&&L.data===ce){s=L,p=!0,G(!1);break}var a=r[e],l=t(a,e);b=Y(L,d,C,null,a,l,e,u,o,n),d.items.set(l,b),C=b}_>0&&F(J())}if(M)_===0&&S&&(i=q(()=>S(s)));else if(fe()){var w=new Set,O=ue;for(e=0;e<_;e+=1){a=r[e],l=t(a,e);var h=d.items.get(l)??E.get(l);h?(o&(R|D))!==0&&j(h,a,e,o):(b=Y(null,d,null,null,a,l,e,u,o,n,!0),E.set(l,b)),w.add(l)}for(const[I,W]of d.items)w.has(I)||O.skipped_effects.add(W.e);O.add_callback(f)}else f();p&&G(!0),$(x)}),M&&(s=L)}function ke(c,o,n,t,u,S,s,d,N){var m=(s&ge)!==0,i=(s&(R|D))!==0,g=o.length,E=n.items,x=n.first,r=x,v,f=null,_,p=[],k=[],C,b,e,a;if(m)for(a=0;a0){var ee=(s&z)!==0&&g===0?u:null;if(m){for(a=0;a{if(_!==void 0)for(e of _)e.a?.apply()}),c.first=n.first&&n.first.e,c.last=f&&f.e;for(var ne of t.values())Z(ne.e);t.clear()}function j(c,o,n,t){(t&R)!==0&&V(c.v,o),(t&D)!==0?V(c.i,n):c.i=n}function Y(c,o,n,t,u,S,s,d,N,m,i){var g=(N&R)!==0,E=(N&Se)===0,x=g?E?de(u,!1,!1):B(u):u,r=(N&D)===0?s:B(s),v={i:r,v:x,k:S,a:null,e:null,prev:n,next:t};try{if(c===null){var f=document.createDocumentFragment();f.append(c=K())}return v.e=q(()=>d(c,x,r,m),M),v.e.prev=n&&n.e,v.e.next=t&&t.e,n===null?i||(o.first=v):(n.next=v,n.e.next=v.e),t!==null&&(t.prev=v,t.e.prev=v.e),v}finally{}}function U(c,o,n){for(var t=c.next?c.next.e.nodes_start:n,u=o?o.e.nodes_start:n,S=c.e.nodes_start;S!==null&&S!==t;){var s=me(S);u.before(S),S=s}}function T(c,o,n){o===null?c.first=n:(o.next=n,o.e.next=n&&n.e),n!==null&&(n.prev=o,n.e.prev=o&&o.e)}function Ce(){const{subscribe:c,set:o,update:n}=Ie({connected:!1,connecting:!1,error:null,lastEvent:null});let t=null,u=0,S=50,s=1e3,d=1e3,N=3e4,m=null,i=[],g=!1;const E=new Map;function x(){const e=window.location.protocol==="https:"?"wss:":"ws:",a=window.location.host;return`${e}//${a}/api/v1/ws/events`}function r(){if(!(t&&(t.readyState===WebSocket.CONNECTING||t.readyState===WebSocket.OPEN))){g=!1,n(e=>({...e,connecting:!0,error:null}));try{const e=x();t=new WebSocket(e);const a=setTimeout(()=>{t&&t.readyState===WebSocket.CONNECTING&&t.close()},1e4);t.onopen=()=>{clearTimeout(a),u=0,d=s,n(l=>({...l,connected:!0,connecting:!1,error:null})),i.length>0&&p(i)},t.onmessage=l=>{try{const w=JSON.parse(l.data);n(h=>({...h,lastEvent:w})),(E.get(w["entity-type"])||[]).forEach(h=>{try{h(w)}catch(I){console.error("[WebSocket] Error in event callback:",I)}})}catch(w){console.error("[WebSocket] Error parsing message:",w)}},t.onclose=l=>{clearTimeout(a);const w=l.code===1e3&&g,O=l.code!==1e3?`Connection closed: ${l.reason||"Unknown reason"}`:null;n(h=>({...h,connected:!1,connecting:!1,error:O})),w||_()},t.onerror=l=>{clearTimeout(a),n(w=>({...w,connected:!1,connecting:!1,error:"WebSocket connection error"})),g||_()}}catch(e){n(a=>({...a,connected:!1,connecting:!1,error:e instanceof Error?e.message:"Failed to connect"}))}}}function v(){}function f(){}function _(){if(g)return;m&&clearTimeout(m),u++,u>S&&(u=1,d=s);const e=Math.min(d,N);m=window.setTimeout(()=>{if(!g){r();const a=Math.random()*1e3;d=Math.min(d*1.5+a,N)}},e)}function p(e){if(t&&t.readyState===WebSocket.OPEN){const a={"send-everything":!1,filters:e};t.send(JSON.stringify(a)),i=[...e]}}function k(){g=!0,m&&(clearTimeout(m),m=null),t&&(t.close(1e3,"Manual disconnect"),t=null),E.clear(),i=[],n(e=>({...e,connected:!1,connecting:!1,error:null,lastEvent:null}))}function C(){navigator.onLine&&!g&&setTimeout(()=>{(!t||t.readyState===WebSocket.CLOSED||t.readyState===WebSocket.CLOSING)&&(u=0,d=s,r())},2e3)}typeof window<"u"&&(window.addEventListener("online",C),window.addEventListener("offline",()=>{n(e=>({...e,error:"Network offline"}))}),setInterval(()=>{g||(!t||t.readyState===WebSocket.CLOSED||t.readyState===WebSocket.CLOSING)&&r()},1e4));function b(e,a,l){E.has(e)||E.set(e,[]),E.get(e).push(l);const w=i.findIndex(h=>h["entity-type"]===e),O={"entity-type":e,operations:a};if(w>=0){const h=i[w].operations;O.operations=Array.from(new Set([...h,...a])),i[w]=O}else i.push(O);return t&&t.readyState===WebSocket.OPEN&&p(i),(!t||t.readyState===WebSocket.CLOSED||t.readyState===WebSocket.CLOSING)&&r(),()=>{const h=E.get(e);if(h){const I=h.indexOf(l);if(I>-1&&h.splice(I,1),h.length===0){E.delete(e);const W=i.findIndex(A=>A["entity-type"]===e);W>-1&&(i.splice(W,1),t&&t.readyState===WebSocket.OPEN&&p(i))}}}}return typeof window<"u"&&r(),{subscribe:c,connect:r,disconnect:k,subscribeToEntity:b}}const We=Ce();export{xe as e,Te as i,We as w}; +import{O as K,M as te,Y as F,K as M,Z as ae,L as re,g as $,q as oe,_ as ie,a0 as se,a1 as J,a2 as G,T as L,a3 as le,a4 as ce,P as q,R as fe,Q as ue,a5 as V,m as de,a6 as B,a7 as Q,a8 as ve,a9 as D,aa as X,U as he,ab as R,ac as Se,ad as P,ae as Z,af as me,ag as _e,ah as we,ai as Ee,aj as pe,ak as z,H as be,al as ge,I as Ie}from"./sWNKMed7.js";function Te(c,o){return o}function Ne(c,o,n){for(var t=c.items,u=[],S=o.length,s=0;s0&&u.length===0&&n!==null;if(d){var N=n.parentNode;we(N),N.append(n),t.clear(),T(c,o[0].prev,o[S-1].next)}Ee(u,()=>{for(var m=0;m{var _=n();return ve(_)?_:_==null?[]:Q(_)}),r,v;function f(){ke(v,r,d,E,s,u,o,t,n),S!==null&&(r.length===0?i?X(i):i=q(()=>S(s)):i!==null&&he(i,()=>{i=null}))}te(()=>{v??=pe,r=$(x);var _=r.length;if(g&&_===0)return;g=_===0;let p=!1;if(M){var k=ie(s)===se;k!==(_===0)&&(s=J(),F(s),G(!1),p=!0)}if(M){for(var C=null,b,e=0;e<_;e++){if(L.nodeType===le&&L.data===ce){s=L,p=!0,G(!1);break}var a=r[e],l=t(a,e);b=Y(L,d,C,null,a,l,e,u,o,n),d.items.set(l,b),C=b}_>0&&F(J())}if(M)_===0&&S&&(i=q(()=>S(s)));else if(fe()){var w=new Set,O=ue;for(e=0;e<_;e+=1){a=r[e],l=t(a,e);var h=d.items.get(l)??E.get(l);h?(o&(R|D))!==0&&j(h,a,e,o):(b=Y(null,d,null,null,a,l,e,u,o,n,!0),E.set(l,b)),w.add(l)}for(const[I,W]of d.items)w.has(I)||O.skipped_effects.add(W.e);O.add_callback(f)}else f();p&&G(!0),$(x)}),M&&(s=L)}function ke(c,o,n,t,u,S,s,d,N){var m=(s&ge)!==0,i=(s&(R|D))!==0,g=o.length,E=n.items,x=n.first,r=x,v,f=null,_,p=[],k=[],C,b,e,a;if(m)for(a=0;a0){var ee=(s&z)!==0&&g===0?u:null;if(m){for(a=0;a{if(_!==void 0)for(e of _)e.a?.apply()}),c.first=n.first&&n.first.e,c.last=f&&f.e;for(var ne of t.values())Z(ne.e);t.clear()}function j(c,o,n,t){(t&R)!==0&&V(c.v,o),(t&D)!==0?V(c.i,n):c.i=n}function Y(c,o,n,t,u,S,s,d,N,m,i){var g=(N&R)!==0,E=(N&Se)===0,x=g?E?de(u,!1,!1):B(u):u,r=(N&D)===0?s:B(s),v={i:r,v:x,k:S,a:null,e:null,prev:n,next:t};try{if(c===null){var f=document.createDocumentFragment();f.append(c=K())}return v.e=q(()=>d(c,x,r,m),M),v.e.prev=n&&n.e,v.e.next=t&&t.e,n===null?i||(o.first=v):(n.next=v,n.e.next=v.e),t!==null&&(t.prev=v,t.e.prev=v.e),v}finally{}}function U(c,o,n){for(var t=c.next?c.next.e.nodes_start:n,u=o?o.e.nodes_start:n,S=c.e.nodes_start;S!==null&&S!==t;){var s=me(S);u.before(S),S=s}}function T(c,o,n){o===null?c.first=n:(o.next=n,o.e.next=n&&n.e),n!==null&&(n.prev=o,n.e.prev=o&&o.e)}function Ce(){const{subscribe:c,set:o,update:n}=Ie({connected:!1,connecting:!1,error:null,lastEvent:null});let t=null,u=0,S=50,s=1e3,d=1e3,N=3e4,m=null,i=[],g=!1;const E=new Map;function x(){const e=window.location.protocol==="https:"?"wss:":"ws:",a=window.location.host;return`${e}//${a}/api/v1/ws/events`}function r(){if(!(t&&(t.readyState===WebSocket.CONNECTING||t.readyState===WebSocket.OPEN))){g=!1,n(e=>({...e,connecting:!0,error:null}));try{const e=x();t=new WebSocket(e);const a=setTimeout(()=>{t&&t.readyState===WebSocket.CONNECTING&&t.close()},1e4);t.onopen=()=>{clearTimeout(a),u=0,d=s,n(l=>({...l,connected:!0,connecting:!1,error:null})),i.length>0&&p(i)},t.onmessage=l=>{try{const w=JSON.parse(l.data);n(h=>({...h,lastEvent:w})),(E.get(w["entity-type"])||[]).forEach(h=>{try{h(w)}catch(I){console.error("[WebSocket] Error in event callback:",I)}})}catch(w){console.error("[WebSocket] Error parsing message:",w)}},t.onclose=l=>{clearTimeout(a);const w=l.code===1e3&&g,O=l.code!==1e3?`Connection closed: ${l.reason||"Unknown reason"}`:null;n(h=>({...h,connected:!1,connecting:!1,error:O})),w||_()},t.onerror=l=>{clearTimeout(a),n(w=>({...w,connected:!1,connecting:!1,error:"WebSocket connection error"})),g||_()}}catch(e){n(a=>({...a,connected:!1,connecting:!1,error:e instanceof Error?e.message:"Failed to connect"}))}}}function v(){}function f(){}function _(){if(g)return;m&&clearTimeout(m),u++,u>S&&(u=1,d=s);const e=Math.min(d,N);m=window.setTimeout(()=>{if(!g){r();const a=Math.random()*1e3;d=Math.min(d*1.5+a,N)}},e)}function p(e){if(t&&t.readyState===WebSocket.OPEN){const a={"send-everything":!1,filters:e};t.send(JSON.stringify(a)),i=[...e]}}function k(){g=!0,m&&(clearTimeout(m),m=null),t&&(t.close(1e3,"Manual disconnect"),t=null),E.clear(),i=[],n(e=>({...e,connected:!1,connecting:!1,error:null,lastEvent:null}))}function C(){navigator.onLine&&!g&&setTimeout(()=>{(!t||t.readyState===WebSocket.CLOSED||t.readyState===WebSocket.CLOSING)&&(u=0,d=s,r())},2e3)}typeof window<"u"&&(window.addEventListener("online",C),window.addEventListener("offline",()=>{n(e=>({...e,error:"Network offline"}))}),setInterval(()=>{g||(!t||t.readyState===WebSocket.CLOSED||t.readyState===WebSocket.CLOSING)&&r()},1e4));function b(e,a,l){E.has(e)||E.set(e,[]),E.get(e).push(l);const w=i.findIndex(h=>h["entity-type"]===e),O={"entity-type":e,operations:a};if(w>=0){const h=i[w].operations;O.operations=Array.from(new Set([...h,...a])),i[w]=O}else i.push(O);return t&&t.readyState===WebSocket.OPEN&&p(i),(!t||t.readyState===WebSocket.CLOSED||t.readyState===WebSocket.CLOSING)&&r(),()=>{const h=E.get(e);if(h){const I=h.indexOf(l);if(I>-1&&h.splice(I,1),h.length===0){E.delete(e);const W=i.findIndex(A=>A["entity-type"]===e);W>-1&&(i.splice(W,1),t&&t.readyState===WebSocket.OPEN&&p(i))}}}}return typeof window<"u"&&r(),{subscribe:c,connect:r,disconnect:k,subscribeToEntity:b}}const We=Ce();export{xe as e,Te as i,We as w}; diff --git a/webapp/assets/_app/immutable/chunks/dB1NgJWc.js b/webapp/assets/_app/immutable/chunks/C7WQ-JBG.js similarity index 85% rename from webapp/assets/_app/immutable/chunks/dB1NgJWc.js rename to webapp/assets/_app/immutable/chunks/C7WQ-JBG.js index 49e9e342..87570319 100644 --- a/webapp/assets/_app/immutable/chunks/dB1NgJWc.js +++ b/webapp/assets/_app/immutable/chunks/C7WQ-JBG.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as v}from"./B3Pzt0F_.js";import{p as w,l as m,n as s,g as r,m as g,a as x,B as h,b as T,c as B,d as S,s as k,u}from"./D8EpLgQ1.js";import{k as A}from"./B_CZMFLe.js";import{p as d}from"./5WA7h8uK.js";import{k as b,B as C}from"./D5ucq3Gx.js";import{f as E}from"./ow_oMtSd.js";function q(_,i){w(i,!1);const c=g(),n=g();let e=d(i,"item",8),l=d(i,"statusType",8,"entity"),a=d(i,"statusField",8,"status");m(()=>(s(e()),s(a())),()=>{k(c,e()?.[a()]||"unknown")}),m(()=>(s(e()),s(l()),r(c),s(a())),()=>{k(n,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(l()){case"entity":return b(e());case"instance":let t="secondary";switch(r(c).toLowerCase()){case"running":t="success";break;case"stopped":t="info";break;case"creating":case"pending_create":t="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":t="warning";break;case"error":case"deleted":t="error";break;case"active":case"online":t="success";break;case"idle":t="info";break;case"pending":case"installing":t="warning";break;case"failed":case"terminated":case"offline":t="error";break;case"unknown":default:t="secondary";break}return{variant:t,text:E(r(c))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"custom":const o=e()[a()]||"Unknown";if(a()==="auth-type"){const f=o==="pat"||!o?"pat":"app";return{variant:f==="pat"?"success":"info",text:f==="pat"?"PAT":"App"}}return{variant:"info",text:o};default:return b(e())}})())}),x(),v();var p=h(),y=T(p);A(y,()=>(s(e()),s(a()),u(()=>`${e()?.name||"item"}-${e()?.[a()]||"status"}-${e()?.updated_at||"time"}`)),t=>{C(t,{get variant(){return r(n),u(()=>r(n).variant)},get text(){return r(n),u(()=>r(n).text)}})}),B(_,p),S()}export{q as S}; +import"./DsnmJJEf.js";import{i as v}from"./zNh6Oe5P.js";import{p as w,l as m,n as s,g as r,m as g,a as x,B as h,b as T,c as B,d as S,s as k,u}from"./sWNKMed7.js";import{k as A}from"./WvS03pW2.js";import{p as d}from"./Ccl3fNd2.js";import{k as b,B as C}from"./Cbkm53HO.js";import{f as E}from"./ow_oMtSd.js";function q(_,i){w(i,!1);const c=g(),n=g();let e=d(i,"item",8),l=d(i,"statusType",8,"entity"),a=d(i,"statusField",8,"status");m(()=>(s(e()),s(a())),()=>{k(c,e()?.[a()]||"unknown")}),m(()=>(s(e()),s(l()),r(c),s(a())),()=>{k(n,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(l()){case"entity":return b(e());case"instance":let t="secondary";switch(r(c).toLowerCase()){case"running":t="success";break;case"stopped":t="info";break;case"creating":case"pending_create":t="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":t="warning";break;case"error":case"deleted":t="error";break;case"active":case"online":t="success";break;case"idle":t="info";break;case"pending":case"installing":t="warning";break;case"failed":case"terminated":case"offline":t="error";break;case"unknown":default:t="secondary";break}return{variant:t,text:E(r(c))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"custom":const o=e()[a()]||"Unknown";if(a()==="auth-type"){const f=o==="pat"||!o?"pat":"app";return{variant:f==="pat"?"success":"info",text:f==="pat"?"PAT":"App"}}return{variant:"info",text:o};default:return b(e())}})())}),x(),v();var p=h(),y=T(p);A(y,()=>(s(e()),s(a()),u(()=>`${e()?.name||"item"}-${e()?.[a()]||"status"}-${e()?.updated_at||"time"}`)),t=>{C(t,{get variant(){return r(n),u(()=>r(n).variant)},get text(){return r(n),u(()=>r(n).text)}})}),B(_,p),S()}export{q as S}; diff --git a/webapp/assets/_app/immutable/chunks/C9H3KoyH.js b/webapp/assets/_app/immutable/chunks/C9H3KoyH.js deleted file mode 100644 index 597c97f4..00000000 --- a/webapp/assets/_app/immutable/chunks/C9H3KoyH.js +++ /dev/null @@ -1 +0,0 @@ -import"./DsnmJJEf.js";import{i as j}from"./B3Pzt0F_.js";import{p as R,l as w,a as q,f as g,t as v,c as k,d as A,k as B,j as u,s as _,m as y,r as m,n as f,u as b,g as d,v as h}from"./D8EpLgQ1.js";import{p as o,i as D}from"./5WA7h8uK.js";import{c as U,s as F}from"./CiE1LlKV.js";import{b as r}from"./D3_ugSUS.js";var G=g('
'),H=g('');function V(x,n){R(n,!1);const i=y(),p=y();let e=o(n,"item",8),s=o(n,"entityType",8,"repository"),$=o(n,"showOwner",8,!1),E=o(n,"showId",8,!1),I=o(n,"fontMono",8,!1);function z(){if(!e())return"Unknown";switch(s()){case"repository":return $()?`${e().owner||"Unknown"}/${e().name||"Unknown"}`:e().name||"Unknown";case"organization":case"enterprise":return e().name||"Unknown";case"pool":return E()?e().id||"Unknown":e().name||"Unknown";case"scaleset":return e().name||"Unknown";case"instance":return e().name||"Unknown";default:return e().name||e().id||"Unknown"}}function C(){if(!e())return"#";let t;switch(s()){case"instance":t=e().name;break;default:t=e().id||e().name;break}if(!t)return"#";switch(s()){case"repository":return`${r}/repositories/${t}`;case"organization":return`${r}/organizations/${t}`;case"enterprise":return`${r}/enterprises/${t}`;case"pool":return`${r}/pools/${t}`;case"scaleset":return`${r}/scalesets/${t}`;case"instance":return`${r}/instances/${encodeURIComponent(t)}`;default:return"#"}}w(()=>{},()=>{_(i,z())}),w(()=>{},()=>{_(p,C())}),q(),j();var c=H(),a=u(c),M=u(a,!0);m(a);var N=B(a,2);{var O=t=>{var l=G(),T=u(l,!0);m(l),v(()=>h(T,(f(e()),b(()=>e().provider_id)))),k(t,l)};D(N,t=>{f(s()),f(e()),b(()=>s()==="instance"&&e()?.provider_id)&&t(O)})}m(c),v(()=>{U(a,"href",d(p)),F(a,1,`block w-full truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${I()?"font-mono":""}`),U(a,"title",d(i)),h(M,d(i))}),k(x,c),A()}export{V as E}; diff --git a/webapp/assets/_app/immutable/chunks/DMCMHBOH.js b/webapp/assets/_app/immutable/chunks/CC0e8UY8.js similarity index 75% rename from webapp/assets/_app/immutable/chunks/DMCMHBOH.js rename to webapp/assets/_app/immutable/chunks/CC0e8UY8.js index 3e7cb91c..98df1d06 100644 --- a/webapp/assets/_app/immutable/chunks/DMCMHBOH.js +++ b/webapp/assets/_app/immutable/chunks/CC0e8UY8.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as _}from"./B3Pzt0F_.js";import{p as h,f as x,t as k,c as u,d as g,k as w,j as o,u as d,n as e,r,v as y}from"./D8EpLgQ1.js";import{h as z}from"./CiE1LlKV.js";import{p as m}from"./5WA7h8uK.js";import{g as v}from"./D5ucq3Gx.js";var E=x('
');function U(l,i){h(i,!1);let t=m(i,"item",8),s=m(i,"iconSize",8,"w-5 h-5");_();var a=E(),n=o(a),f=o(n);z(f,()=>(e(v),e(t()),e(s()),d(()=>v(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=w(n,2),c=o(p,!0);r(p),r(a),k(()=>y(c,(e(t()),d(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),u(l,a),g()}export{U as E}; +import"./DsnmJJEf.js";import{i as _}from"./zNh6Oe5P.js";import{p as h,f as x,t as k,c as u,d as g,k as w,j as o,u as d,n as e,r,v as y}from"./sWNKMed7.js";import{h as z}from"./t8NOL8UT.js";import{p as m}from"./Ccl3fNd2.js";import{g as v}from"./Cbkm53HO.js";var E=x('
');function U(l,i){h(i,!1);let t=m(i,"item",8),s=m(i,"iconSize",8,"w-5 h-5");_();var a=E(),n=o(a),f=o(n);z(f,()=>(e(v),e(t()),e(s()),d(()=>v(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=w(n,2),c=o(p,!0);r(p),r(a),k(()=>y(c,(e(t()),d(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),u(l,a),g()}export{U as E}; diff --git a/webapp/assets/_app/immutable/chunks/CCSWcuVN.js b/webapp/assets/_app/immutable/chunks/CCYOsezl.js similarity index 84% rename from webapp/assets/_app/immutable/chunks/CCSWcuVN.js rename to webapp/assets/_app/immutable/chunks/CCYOsezl.js index 2c651009..5f546d50 100644 --- a/webapp/assets/_app/immutable/chunks/CCSWcuVN.js +++ b/webapp/assets/_app/immutable/chunks/CCYOsezl.js @@ -1 +1 @@ -import{K as l,L as u,M as m,N as _,O as p,P as h,Q as v,R as b,T,U as g}from"./D8EpLgQ1.js";function y(s,i,d){l&&u();var r=s,a,n,e=null,t=null;function f(){n&&(g(n),n=null),e&&(e.lastChild.remove(),r.before(e),e=null),n=t,t=null}m(()=>{if(a!==(a=i())){var c=b();if(a){var o=r;c&&(e=document.createDocumentFragment(),e.append(o=p())),t=h(()=>d(o,a))}c?v.add_callback(f):f()}},_),l&&(r=T)}export{y as c}; +import{K as l,L as u,M as m,N as _,O as p,P as h,Q as v,R as b,T,U as g}from"./sWNKMed7.js";function y(s,i,d){l&&u();var r=s,a,n,e=null,t=null;function f(){n&&(g(n),n=null),e&&(e.lastChild.remove(),r.before(e),e=null),n=t,t=null}m(()=>{if(a!==(a=i())){var c=b();if(a){var o=r;c&&(e=document.createDocumentFragment(),e.append(o=p())),t=h(()=>d(o,a))}c?v.add_callback(f):f()}},_),l&&(r=T)}export{y as c}; diff --git a/webapp/assets/_app/immutable/chunks/CI9532zv.js b/webapp/assets/_app/immutable/chunks/CI9532zv.js deleted file mode 100644 index 6712c5b0..00000000 --- a/webapp/assets/_app/immutable/chunks/CI9532zv.js +++ /dev/null @@ -1 +0,0 @@ -import"./DsnmJJEf.js";import{i as b}from"./B3Pzt0F_.js";import{p as k,f as E,t as C,u as i,n as t,v as n,c as j,d as P,k as z,j as l,r as o}from"./D8EpLgQ1.js";import{c as N}from"./CiE1LlKV.js";import{p as f}from"./5WA7h8uK.js";import"./D3_ugSUS.js";import{j as x,e as c,i as u}from"./D5ucq3Gx.js";var T=E('');function G(d,r){k(r,!1);let e=f(r,"item",8),m=f(r,"eagerCache",8,null);b();var s=T(),a=l(s),v=l(a,!0);o(a);var p=z(a,2),g=l(p,!0);o(p),o(s),C((h,y,_)=>{N(a,"href",h),n(v,y),n(g,_)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),j(d,s),P()}export{G as P}; diff --git a/webapp/assets/_app/immutable/chunks/C6k1Q4We.js b/webapp/assets/_app/immutable/chunks/CLagxtgo.js similarity index 85% rename from webapp/assets/_app/immutable/chunks/C6k1Q4We.js rename to webapp/assets/_app/immutable/chunks/CLagxtgo.js index 8d095aaf..af862710 100644 --- a/webapp/assets/_app/immutable/chunks/C6k1Q4We.js +++ b/webapp/assets/_app/immutable/chunks/CLagxtgo.js @@ -1 +1 @@ -import{V as b,W as o,u as h,G as _,K as t,Q as f,X as m}from"./D8EpLgQ1.js";function y(e,a,c=a){var v=b(),d=new WeakSet;o(e,"input",r=>{var l=r?e.defaultValue:e.value;if(l=n(e)?s(l):l,c(l),f!==null&&d.add(f),v&&l!==(l=a())){var k=e.selectionStart,u=e.selectionEnd;e.value=l??"",u!==null&&(e.selectionStart=k,e.selectionEnd=Math.min(u,e.value.length))}}),(t&&e.defaultValue!==e.value||h(a)==null&&e.value)&&(c(n(e)?s(e.value):e.value),f!==null&&d.add(f)),_(()=>{var r=a();if(e===document.activeElement){var l=m??f;if(d.has(l))return}n(e)&&r===s(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function E(e,a,c=a){o(e,"change",v=>{var d=v?e.defaultChecked:e.checked;c(d)}),(t&&e.defaultChecked!==e.checked||h(a)==null)&&c(e.checked),_(()=>{var v=a();e.checked=!!v})}function n(e){var a=e.type;return a==="number"||a==="range"}function s(e){return e===""?null:+e}export{E as a,y as b}; +import{V as b,W as o,u as h,G as _,K as t,Q as f,X as m}from"./sWNKMed7.js";function y(e,a,c=a){var v=b(),d=new WeakSet;o(e,"input",r=>{var l=r?e.defaultValue:e.value;if(l=n(e)?s(l):l,c(l),f!==null&&d.add(f),v&&l!==(l=a())){var k=e.selectionStart,u=e.selectionEnd;e.value=l??"",u!==null&&(e.selectionStart=k,e.selectionEnd=Math.min(u,e.value.length))}}),(t&&e.defaultValue!==e.value||h(a)==null&&e.value)&&(c(n(e)?s(e.value):e.value),f!==null&&d.add(f)),_(()=>{var r=a();if(e===document.activeElement){var l=m??f;if(d.has(l))return}n(e)&&r===s(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function E(e,a,c=a){o(e,"change",v=>{var d=v?e.defaultChecked:e.checked;c(d)}),(t&&e.defaultChecked!==e.checked||h(a)==null)&&c(e.checked),_(()=>{var v=a();e.checked=!!v})}function n(e){var a=e.type;return a==="number"||a==="range"}function s(e){return e===""?null:+e}export{E as a,y as b}; diff --git a/webapp/assets/_app/immutable/chunks/CMejw1Yi.js b/webapp/assets/_app/immutable/chunks/CMejw1Yi.js new file mode 100644 index 00000000..cde5c5eb --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/CMejw1Yi.js @@ -0,0 +1 @@ +import"./DsnmJJEf.js";import{i as W}from"./zNh6Oe5P.js";import{f as S,j as t,k as p,r as a,t as L,v as _,c as u,z as N,D as A,p as X,u as T,n as P,d as Y}from"./sWNKMed7.js";import{p as s,i as I}from"./Ccl3fNd2.js";import{s as Z,h as $,B as F,d as B,c as ee}from"./t8NOL8UT.js";import{D as te,G as ae,a as se}from"./WvS03pW2.js";import{E as le}from"./CfvU88k5.js";import{S as G}from"./C7WQ-JBG.js";var ne=S('
'),ie=S('
'),re=S('

');function ge(j,e){let n=s(e,"title",8),E=s(e,"subtitle",8),b=s(e,"forgeIcon",8,""),f=s(e,"onEdit",8,null),h=s(e,"onDelete",8,null),k=s(e,"editLabel",8,"Edit"),z=s(e,"deleteLabel",8,"Delete"),g=s(e,"titleClass",8,"");var c=re(),v=t(c),m=t(v),y=t(m),C=t(y);{var H=i=>{var r=ne(),w=t(r);$(w,b),a(r),u(i,r)};I(C,i=>{b()&&i(H)})}var l=p(C,2),D=t(l),V=t(D,!0);a(D);var M=p(D,2),R=t(M,!0);a(M),a(l),a(y);var q=p(y,2);{var J=i=>{var r=ie(),w=t(r);{var K=o=>{F(o,{variant:"secondary",size:"md",icon:"",$$events:{click(...d){f()?.apply(this,d)}},children:(d,U)=>{N();var x=A();L(()=>_(x,k())),u(d,x)},$$slots:{default:!0}})};I(w,o=>{f()&&o(K)})}var O=p(w,2);{var Q=o=>{F(o,{variant:"danger",size:"md",icon:"",$$events:{click(...d){h()?.apply(this,d)}},children:(d,U)=>{N();var x=A();L(()=>_(x,z())),u(d,x)},$$slots:{default:!0}})};I(O,o=>{h()&&o(Q)})}a(r),u(i,r)};I(q,i=>{(f()||h())&&i(J)})}a(m),a(v),a(c),L(()=>{Z(D,1,`text-2xl font-bold text-gray-900 dark:text-white ${g()??""}`),_(V,n()),_(R,E())}),u(j,c)}var oe=S('');function ye(j,e){X(e,!1);let n=s(e,"instances",8),E=s(e,"entityType",8),b=s(e,"onDeleteInstance",8);const f=[{key:"name",title:"Name",cellComponent:le,cellProps:{entityType:"instance",nameField:"name"}},{key:"status",title:"Status",cellComponent:G,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:G,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"created",title:"Created",cellComponent:ae,cellProps:{field:"created_at",type:"date"}},{key:"actions",title:"Actions",align:"right",cellComponent:se,cellProps:{actions:[{type:"delete",label:"Delete",title:"Delete instance",ariaLabel:"Delete instance",action:"delete"}]}}],h={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"}],actions:[{type:"delete",handler:l=>k(l)}]};function k(l){b()(l)}function z(l){k(l.detail.item)}W();var g=oe(),c=t(g),v=t(c),m=t(v),y=t(m);a(m);var C=p(m,2);a(v);var H=p(v,2);te(H,{get columns(){return f},get data(){return n()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return P(n()),T(()=>n().length)},totalPages:1,get totalItems(){return P(n()),T(()=>n().length)},itemName:"instances",emptyTitle:"No instances running",get emptyMessage(){return`No instances running for this ${E()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return h},$$events:{delete:z}}),a(c),a(g),L(l=>{_(y,`Instances (${P(n()),T(()=>n().length)??""})`),ee(C,"href",l)},[()=>(P(B),T(()=>B("/instances")))]),u(j,g),Y()}export{ge as D,ye as I}; diff --git a/webapp/assets/_app/immutable/chunks/CaJ57PEy.js b/webapp/assets/_app/immutable/chunks/CaJ57PEy.js new file mode 100644 index 00000000..a58dbfc2 --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/CaJ57PEy.js @@ -0,0 +1,3 @@ +import{I as ke,o as De,aR as T,g as P,s as x,bf as mt,aS as $e}from"./sWNKMed7.js";import{p as yt,e as wt,a as vt,b as L}from"./BFThZs5w.js";class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ee{constructor(t,n){this.status=t,this.location=n}}class Se extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function bt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function At(e){return e.split("%25").map(decodeURI).join("%25")}function kt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function _e({href:e}){return e.split("#")[0]}function Et(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const l=Reflect.get(i,o);return typeof l=="function"?l.bind(i):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function St(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Rt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Re(e)),It(e,t));const G=new Map;function Ut(e,t){const n=Re(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&G.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Rt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Re(e,n),a=G.get(r);if(a){if(performance.now(){const{pattern:g,params:u}=yt(o),c={id:o,exec:h=>{const m=g.exec(h);if(m)return wt(m,u,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...f||[]].map(i),leaf:s(l)};return c.errors.length=c.layouts.length=Math.max(c.errors.length,c.layouts.length),c});function s(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function We(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const Pt="1755522486509",ze="sveltekit:snapshot",Xe="sveltekit:scroll",Ze="sveltekit:states",xt="sveltekit:pageurl",V="sveltekit:history",J="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=Qe(o);function l(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(s),replace_state:l(i)}}function Fe(e){const t=ke(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&i(o=l)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=ke(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${vt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Pt;return i&&(e(!0),tt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function yn(e){}function qe(e){const t=Ct(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const jt=-1,Dt=-2,$t=-3,Bt=-4,Vt=-5,Ft=-6;function qt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===jt)return;if(s===$t)return NaN;if(s===Bt)return 1/0;if(s===Vt)return-1/0;if(s===Ft)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const l=o[0],f=t?.[l];if(f)return r[s]=f(a(o[1]));switch(l){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let c=1;ct!=null)}const Ht="x-sveltekit-invalidated",Kt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Se?e.status:500}function Yt(e){return e instanceof Se?e.text:"Internal Error"}let E,W,me;const Jt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());Jt?(E={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},me={current:!1}):(E=new class{#e=T({});get data(){return P(this.#e)}set data(t){x(this.#e,t)}#t=T(null);get form(){return P(this.#t)}set form(t){x(this.#t,t)}#n=T(null);get error(){return P(this.#n)}set error(t){x(this.#n,t)}#r=T({});get params(){return P(this.#r)}set params(t){x(this.#r,t)}#a=T({id:null});get route(){return P(this.#a)}set route(t){x(this.#a,t)}#o=T({});get state(){return P(this.#o)}set state(t){x(this.#o,t)}#s=T(-1);get status(){return P(this.#s)}set status(t){x(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return P(this.#i)}set url(t){x(this.#i,t)}},W=new class{#e=T(null);get current(){return P(this.#e)}set current(t){x(this.#e,t)}},me=new class{#e=T(!1);get current(){return P(this.#e)}set current(t){x(this.#e,t)}},tt.v=()=>me.current=!0);function Wt(e){Object.assign(E,e)}const zt="/__data.json",Xt=".html__data.json";function Zt(e){return e.endsWith(".html")?e.replace(/\.html$/,Xt):e.replace(/\/$/,"")+zt}const{tick:Qt}=mt,en=new Set(["icon","shortcut icon","apple-touch-icon"]),$=We(Xe)??{},z=We(ze)??{},C={url:Fe({}),page:Fe({}),navigating:ke(null),updated:Nt()};function Ue(e){$[e]=fe()}function tn(e,t){let n=e+1;for(;$[n];)delete $[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function q(e){return location.href=e.href,new Promise(()=>{})}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Me(){}let Le,ve,re,N,be,v;globalThis.__sveltekit_rl0ihc.data;const ae=[],oe=[];let O=null;const ee=new Map,at=new Set,nn=new Set,H=new Set;let w={branch:[],error:null,url:null},Te=!1,se=!1,Ge=!0,X=!1,M=!1,ot=!1,Pe=!1,st,A,I,D;const K=new Set,He=new Map;async function An(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Le=Tt(e),N=document.documentElement,be=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),A=history.state?.[V],I=history.state?.[J],A||(A=I=Date.now(),history.replaceState({...history.state,[V]:A,[J]:I},""));const r=$[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await hn(be,n)):(await Y({type:"enter",url:Ie(v.hash?gn(new URL(location.href)):location.href),replace_state:!0}),a()),dn()}function rn(){ae.length=0,Pe=!1}function it(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function ct(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Ke(){Ue(A),Be(Xe,$),it(I),Be(ze,z)}async function xe(e,t,n,r){let a;const s=await Y({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...He.keys()]),t.invalidate&&t.invalidate.forEach(un)}});return t.invalidateAll&&$e().then($e).then(()=>{He.forEach(({resource:i},o)=>{a?.includes(o)&&i.refresh?.()})}),s}async function an(e){if(e.id!==O?.id){const t={};K.add(t),O={id:e.id,token:t,promise:ut({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.promise}async function ye(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function lt(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(E,e.props.page),st=new v.root({target:t,props:{...e.props,stores:C,components:oe},hydrate:n,sync:!1}),ct(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(L&&(e.pathname===L||e.pathname===L+"/"))o="always";else for(const c of n)c?.slash!==void 0&&(o=c.slash);e.pathname=bt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Gt(n).map(c=>c.node.component),page:je(E)}};i!==void 0&&(l.props.form=i);let f={},d=!E,g=0;for(let c=0;c(o&&(l.route=!0),u[c])}),params:new Proxy(r,{get:(u,c)=>(o&&l.params.add(c),u[c])}),data:s?.data??null,url:Et(n,()=>{o&&(l.url=!0)},u=>{o&&l.search_params.add(u)},v.hash),async fetch(u,c){u instanceof Request&&(c={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...c});const{resolved:h,promise:m}=ft(u,c,n);return o&&d(h.href),m},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,g)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:l}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function ft(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?Lt(r,a.href,t):Ut(r,t);return{resolved:a,promise:s}}function Ye(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Oe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function on(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(E),constructors:[]}}}async function ut({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return K.delete(O.token),O.promise;const{errors:i,layouts:o,leaf:l}=a,f=[...o,l];i.forEach(p=>p?.().catch(()=>{})),f.forEach(p=>p?.[1]().catch(()=>{}));let d=null;const g=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,c=on(w.url,n);let h=!1;const m=f.map((p,y)=>{const b=w.branch[y],k=!!p?.[0]&&(b?.loader!==p[1]||Ye(h,u,g,c,b.server?.uses,r));return k&&(h=!0),k});if(m.some(Boolean)){try{d=await pt(n,m)}catch(p){const y=await F(p,{url:n,params:r,route:{id:e}});return K.has(s)?Je({error:y,url:n,params:r,route:a}):de({status:ne(p),error:y,url:n,route:a})}if(d.type==="redirect")return d}const _=d?.nodes;let R=!1;const S=f.map(async(p,y)=>{if(!p)return;const b=w.branch[y],k=_?.[y];if((!k||k.type==="skip")&&p[1]===b?.loader&&!Ye(R,u,g,c,b.universal?.uses,r))return b;if(R=!0,k?.type==="error")throw k;return Ne({loader:p[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge{});const U=[];for(let p=0;pPromise.resolve({}),server_data_node:Oe(s)}),l={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,l],status:e,error:t,route:null})}catch(o){if(o instanceof Ee)return xe(new URL(o.location,location.href),{},0);throw o}}async function cn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ft(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,L,v.hash)){const n=await cn(e);if(!n)return;const r=ln(n);for(const a of Le){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:kt(s),url:e}}}}function ln(e){return At(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r}){let a=!1;const s=Ce(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return X||at.forEach(o=>o(i)),a?null:s}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:l={},accept:f=Me,block:d=Me}){const g=D;D=l;const u=await he(t,!1),c=e==="enter"?Ce(w,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u});if(!c){d(),D===l&&(D=g);return}const h=A,m=I;f(),X=!0,se&&c.navigation.type!=="enter"&&C.navigating.set(W.current=c.navigation);let _=u&&await ut(u);if(!_){if(ue(t,L,v.hash))return await q(t);_=await ht(t,{id:null},await F(new Se(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,D!==l)return c.reject(new Error("navigation aborted")),!1;if(_.type==="redirect")if(o>=20)_=await de({status:500,error:await F(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await xe(new URL(_.location,t).href,{},o+1,l),!1;else _.props.page.status>=400&&await C.updated.check()&&(await rt(),await q(t));if(rn(),Ue(h),it(m),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const p=s?0:1,y={[V]:A+=p,[J]:I+=p,[Ze]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||tn(A,I)}if(O=null,_.props.page.state=i,se){const p=(await Promise.all(Array.from(nn,y=>y(c.navigation)))).filter(y=>typeof y=="function");if(p.length>0){let y=function(){p.forEach(b=>{H.delete(b)})};p.push(y),p.forEach(b=>{H.add(b)})}w=_.state,_.props.page&&(_.props.page.url=t),st.$set(_.props),Wt(_.props.page),ot=!0}else lt(_,be,!1);const{activeElement:R}=document;await Qt();const S=n?n.scroll:a?fe():null;if(Ge){const p=t.hash&&document.getElementById(_t(t));S?scrollTo(S.x,S.y):p?p.scrollIntoView():scrollTo(0,0)}const U=document.activeElement!==R&&document.activeElement!==document.body;!r&&!U&&pn(t),Ge=!0,_.props.page&&Object.assign(E,_.props.page),X=!1,e==="popstate"&&ct(I),c.fulfil(void 0),H.forEach(p=>p(c.navigation)),C.navigating.set(W.current=null)}async function ht(e,t,n,r){return e.origin===Z&&e.pathname===location.pathname&&!Te?await de({status:r,error:n,url:e,route:t}):await q(e)}function fn(){let e,t,n;N.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{s(l,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}N.addEventListener("mousedown",r),N.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function s(o,l){const f=et(o,N),d=f===t&&l>=n;if(!f||d)return;const{url:g,external:u,download:c}=we(f,L,v.hash);if(u||c)return;const h=te(f),m=g&&ce(w.url)===ce(g);if(!(h.reload||m))if(l<=h.preload_data){t=f,n=j.tap;const _=await he(g,!1);if(!_)return;an(_)}else l<=h.preload_code&&(t=f,n=l,ye(g))}function i(){a.disconnect();for(const o of N.querySelectorAll("a")){const{url:l,external:f,download:d}=we(o,L,v.hash);if(f||d)continue;const g=te(o);g.reload||(g.preload_code===j.viewport&&a.observe(o),g.preload_code===j.eager&&ye(l))}}H.add(i),i()}function F(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Yt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function kn(e,t={}){return e=new URL(Ie(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):xe(e,t,0)}function un(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function dn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ke(),!X){const r=Ce(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ke()}),navigator.connection?.saveData||fn(),N.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],N);if(!n)return;const{url:r,external:a,target:s,download:i}=we(n,L,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),g=f===_e(location);if(a||o.reload&&(!g||!d)){dt({url:r,type:"link"})?X=!0:t.preventDefault();return}if(d!==void 0&&g){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const c=n.ownerDocument.getElementById(decodeURIComponent(d));c&&(c.scrollIntoView(),c.focus())}return}if(M=!0,Ue(A),e(r),!o.replace_state)return;M=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await Y({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),N.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,L,!1))return;const o=t.target,l=te(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o),d=r?.getAttribute("name");d&&f.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(f).toString(),Y({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Ae){if(t.state?.[V]){const n=t.state[V];if(D={},n===A)return;const r=$[n],a=t.state[Ze]??{},s=new URL(t.state[xt]??location.href),i=t.state[J],o=w.url?_e(location)===_e(w.url):!1;if(i===I&&(ot||o)){a!==E.state&&(E.state=a),e(s),$[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,I=i},block:()=>{history.go(-f)},nav_token:D})}else if(!M){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[V]:++A,[J]:I},"",location.href))});for(const t of document.querySelectorAll("link"))en.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(W.current=null)});function e(t){w.url=E.url=t,C.page.set(je(E)),C.page.notify()}}async function hn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:l}){Te=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Le.find(({id:c})=>c===s.id);let g,u=!0;try{const c=r.map(async(m,_)=>{const R=o[_];return R?.uses&&(R.uses=gt(R.uses)),Ne({loader:v.nodes[m],url:f,params:a,route:s,parent:async()=>{const S={};for(let U=0;U<_;U+=1)Object.assign(S,(await c[U]).data);return S},server_data_node:Oe(R)})}),h=await Promise.all(c);if(d){const m=d.layouts;for(let _=0;_s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),l=new TextDecoder;function f(g){return qt(g,{...v.decoders,Promise:u=>new Promise((c,h)=>{i.set(u,{fulfil:c,reject:h})})})}let d="";for(;;){const{done:g,value:u}=await o.read();if(g&&!d)break;for(d+=!u&&d?` +`:l.decode(u,{stream:!0});;){const c=d.indexOf(` +`);if(c===-1)break;const h=JSON.parse(d.slice(0,c));if(d=d.slice(c+1),h.type==="redirect")return s(h);if(h.type==="data")h.nodes?.forEach(m=>{m?.type==="data"&&(m.uses=gt(m.uses),m.data=f(m.data))}),s(h);else if(h.type==="chunk"){const{id:m,data:_,error:R}=h,S=i.get(m);i.delete(m),R?S.reject(f(R)):S.fulfil(f(_))}}}})}function gt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ae=!1;function pn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=_t(e);if(n&&document.getElementById(n)){const{x:a,y:s}=fe();setTimeout(()=>{const i=history.state;Ae=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ae=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s{if(r.rangeCount===a.length){for(let s=0;s{a=l,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function gn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function _t(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{An as a,kn as g,yn as l,E as p,C as s}; diff --git a/webapp/assets/_app/immutable/chunks/Cbkm53HO.js b/webapp/assets/_app/immutable/chunks/Cbkm53HO.js new file mode 100644 index 00000000..2ea6e1c8 --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/Cbkm53HO.js @@ -0,0 +1,4 @@ +import{d,s as w,f as x}from"./t8NOL8UT.js";import"./DsnmJJEf.js";import{i as k}from"./zNh6Oe5P.js";import{p as b,l as v,n as c,a as _,f as y,t as h,c as E,d as B,s as z,m as L,j as M,r as j,g as T,v as U}from"./sWNKMed7.js";import{p as o}from"./Ccl3fNd2.js";function A(e){if(!e)return"N/A";try{return(typeof e=="string"?new Date(e):e).toLocaleString()}catch{return"Invalid Date"}}function C(e,r="w-4 h-4"){return e==="gitea"?``:e==="github"?`
`:` + + + `}function H(e,r){if(e.repo_name)return e.repo_name;if(e.org_name)return e.org_name;if(e.enterprise_name)return e.enterprise_name;if(e.repo_id&&!e.repo_name&&r?.repositories){const n=r.repositories.find(t=>t.id===e.repo_id);return n?`${n.owner}/${n.name}`:"Unknown Entity"}if(e.org_id&&!e.org_name&&r?.organizations){const n=r.organizations.find(t=>t.id===e.org_id);return n&&n.name?n.name:"Unknown Entity"}if(e.enterprise_id&&!e.enterprise_name&&r?.enterprises){const n=r.enterprises.find(t=>t.id===e.enterprise_id);return n&&n.name?n.name:"Unknown Entity"}return"Unknown Entity"}function P(e){return e.repo_id?"repository":e.org_id?"organization":e.enterprise_id?"enterprise":"unknown"}function V(e){return e.repo_id?d(`/repositories/${e.repo_id}`):e.org_id?d(`/organizations/${e.org_id}`):e.enterprise_id?d(`/enterprises/${e.enterprise_id}`):"#"}function W(e){e&&(e.scrollTop=e.scrollHeight)}function q(e){return{newPerPage:e,newCurrentPage:1}}function G(e){return e.pool_manager_status?.running?{text:"Running",variant:"success"}:{text:"Stopped",variant:"error"}}function J(e){switch(e.toLowerCase()){case"error":return{text:"Error",variant:"error"};case"warning":return{text:"Warning",variant:"warning"};case"info":return{text:"Info",variant:"info"};default:return{text:e,variant:"info"}}}function l(e,r,n){if(!r.trim())return e;const t=r.toLowerCase();return e.filter(a=>typeof n=="function"?n(a).toLowerCase().includes(t):n.some(i=>a[i]?.toString().toLowerCase().includes(t)))}function K(e,r){return l(e,r,["name","owner"])}function O(e,r){return l(e,r,["name"])}function Q(e,r){return l(e,r,n=>[n.name||"",n.description||"",n.endpoint?.name||""].join(" "))}function X(e,r){return l(e,r,["name","description","base_url","api_base_url"])}function Y(e,r,n){return e.slice((r-1)*n,r*n)}var I=y(" ");function Z(e,r){b(r,!1);const n=L();let t=o(r,"variant",8,"gray"),a=o(r,"size",8,"sm"),i=o(r,"text",8),g=o(r,"ring",8,!1);const u={success:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",error:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",warning:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",info:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",gray:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",blue:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",red:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",yellow:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200"},f={success:"ring-green-600/20 dark:ring-green-400/30",error:"ring-red-600/20 dark:ring-red-400/30",warning:"ring-yellow-600/20 dark:ring-yellow-400/30",info:"ring-blue-600/20 dark:ring-blue-400/30",gray:"ring-gray-500/20 dark:ring-gray-400/30",blue:"ring-blue-600/20 dark:ring-blue-400/30",green:"ring-green-600/20 dark:ring-green-400/30",red:"ring-red-600/20 dark:ring-red-400/30",yellow:"ring-yellow-600/20 dark:ring-yellow-400/30",secondary:"ring-gray-500/20 dark:ring-gray-400/30"},p={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};v(()=>(c(t()),c(a()),c(g())),()=>{z(n,["inline-flex items-center rounded-full font-semibold",u[t()],p[a()],g()?`ring-1 ring-inset ${f[t()]}`:""].filter(Boolean).join(" "))}),_(),k();var s=I(),m=M(s,!0);j(s),h(()=>{w(s,1,x(T(n))),U(m,i())}),E(e,s),B()}export{Z as B,X as a,A as b,q as c,J as d,H as e,Q as f,C as g,l as h,P as i,V as j,G as k,O as l,K as m,Y as p,W as s}; diff --git a/webapp/assets/_app/immutable/chunks/5WA7h8uK.js b/webapp/assets/_app/immutable/chunks/Ccl3fNd2.js similarity index 96% rename from webapp/assets/_app/immutable/chunks/5WA7h8uK.js rename to webapp/assets/_app/immutable/chunks/Ccl3fNd2.js index 04989407..ae407549 100644 --- a/webapp/assets/_app/immutable/chunks/5WA7h8uK.js +++ b/webapp/assets/_app/immutable/chunks/Ccl3fNd2.js @@ -1 +1 @@ -import{M as K,K as T,L as j,N as C,_ as F,a0 as q,a1 as $,Y as z,a2 as x,O as G,P as A,Q as H,at as J,R as Z,aa as Q,U as V,T as W,au as D,m as X,av as k,s as U,J as ee,g as m,aw as re,ax as ne,ay as w,az as se,aA as M,ar as ae,q as ie,aB as te,aj as R,aC as ue,a6 as fe,aD as le,u as oe,aE as ce,aF as de,aG as _e,aH as N,aI as L,aJ as pe,aK as ve,S as Y,aL as B,aM as S}from"./D8EpLgQ1.js";function Ie(e,r,s=!1){T&&j();var n=e,a=null,i=null,l=J,d=s?C:0,p=!1;const P=(o,u=!0)=>{p=!0,_(u,o)};var f=null;function I(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var o=l?a:i,u=l?i:a;o&&Q(o),u&&V(u,()=>{l?i=null:a=null})}const _=(o,u)=>{if(l===(l=o))return;let g=!1;if(T){const E=F(n)===q;!!l===E&&(n=$(),z(n),x(!1),g=!0)}var b=Z(),c=n;if(b&&(f=document.createDocumentFragment(),f.append(c=G())),l?a??=u&&A(()=>u(c)):i??=u&&A(()=>u(c)),b){var h=H,t=l?a:i,v=l?i:a;t&&h.skipped_effects.delete(t),v&&h.skipped_effects.add(v),h.add_callback(I)}else I();g&&x(!0)};K(()=>{p=!1,r(P),p||_(null,null)},d),T&&(n=W)}let O=!1,y=Symbol();function ge(e,r,s){const n=s[r]??={store:null,source:X(void 0),unsubscribe:D};if(n.store!==e&&!(y in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=D;else{var a=!0;n.unsubscribe=k(e,i=>{a?n.source.v=i:U(n.source,i)}),a=!1}return e&&y in s?ee(e):m(n.source)}function Ee(){const e={};function r(){re(()=>{for(var s in e)e[s].unsubscribe();ne(e,y,{enumerable:!1,value:!0})})}return[e,r]}function be(e){var r=O;try{return O=!1,[e(),O]}finally{O=r}}const he={get(e,r){if(!e.exclude.includes(r))return m(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=R;try{L(e.parent_effect),e.special[r]=me({get[r](){return e.props[r]}},r,M)}finally{L(n)}}return e.special[r](s),N(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),N(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Oe(e,r){return new Proxy({props:e,exclude:r,special:{},version:fe(0),parent_effect:R},he)}const Se={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(S(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let a=e.props[n];S(a)&&(a=a());const i=w(a,r);if(i&&i.set)return i.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(S(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const a=w(n,r);return a&&!a.configurable&&(a.configurable=!0),a}}},has(e,r){if(r===Y||r===B)return!1;for(let s of e.props)if(S(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(S(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Te(...e){return new Proxy({props:e},Se)}function me(e,r,s,n){var a=!ce||(s&de)!==0,i=(s&le)!==0,l=(s&pe)!==0,d=n,p=!0,P=()=>(p&&(p=!1,d=l?oe(n):n),d),f;if(i){var I=Y in e||B in e;f=w(e,r)?.set??(I&&r in e?t=>e[r]=t:void 0)}var _,o=!1;i?[_,o]=be(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=P(),f&&(a&&se(),f(_)));var u;if(a?u=()=>{var t=e[r];return t===void 0?P():(p=!0,t)}:u=()=>{var t=e[r];return t!==void 0&&(d=void 0),t===void 0?d:t},a&&(s&M)===0)return u;if(f){var g=e.$$legacy;return function(t,v){return arguments.length>0?((!a||!v||g||o)&&f(v?u():t),t):u()}}var b=!1,c=((s&_e)!==0?ae:ie)(()=>(b=!1,u()));i&&m(c);var h=R;return function(t,v){if(arguments.length>0){const E=v?m(c):a&&i?te(t):t;return U(c,E),b=!0,d!==void 0&&(d=E),t}return ve&&b||(h.f&ue)!==0?c.v:m(c)}}export{ge as a,Te as b,Ie as i,Oe as l,me as p,Ee as s}; +import{M as K,K as T,L as j,N as C,_ as F,a0 as q,a1 as $,Y as z,a2 as x,O as G,P as A,Q as H,at as J,R as Z,aa as Q,U as V,T as W,au as D,m as X,av as k,s as U,J as ee,g as m,aw as re,ax as ne,ay as w,az as se,aA as M,ar as ae,q as ie,aB as te,aj as R,aC as ue,a6 as fe,aD as le,u as oe,aE as ce,aF as de,aG as _e,aH as N,aI as L,aJ as pe,aK as ve,S as Y,aL as B,aM as S}from"./sWNKMed7.js";function Ie(e,r,s=!1){T&&j();var n=e,a=null,i=null,l=J,d=s?C:0,p=!1;const P=(o,u=!0)=>{p=!0,_(u,o)};var f=null;function I(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var o=l?a:i,u=l?i:a;o&&Q(o),u&&V(u,()=>{l?i=null:a=null})}const _=(o,u)=>{if(l===(l=o))return;let g=!1;if(T){const E=F(n)===q;!!l===E&&(n=$(),z(n),x(!1),g=!0)}var b=Z(),c=n;if(b&&(f=document.createDocumentFragment(),f.append(c=G())),l?a??=u&&A(()=>u(c)):i??=u&&A(()=>u(c)),b){var h=H,t=l?a:i,v=l?i:a;t&&h.skipped_effects.delete(t),v&&h.skipped_effects.add(v),h.add_callback(I)}else I();g&&x(!0)};K(()=>{p=!1,r(P),p||_(null,null)},d),T&&(n=W)}let O=!1,y=Symbol();function ge(e,r,s){const n=s[r]??={store:null,source:X(void 0),unsubscribe:D};if(n.store!==e&&!(y in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=D;else{var a=!0;n.unsubscribe=k(e,i=>{a?n.source.v=i:U(n.source,i)}),a=!1}return e&&y in s?ee(e):m(n.source)}function Ee(){const e={};function r(){re(()=>{for(var s in e)e[s].unsubscribe();ne(e,y,{enumerable:!1,value:!0})})}return[e,r]}function be(e){var r=O;try{return O=!1,[e(),O]}finally{O=r}}const he={get(e,r){if(!e.exclude.includes(r))return m(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=R;try{L(e.parent_effect),e.special[r]=me({get[r](){return e.props[r]}},r,M)}finally{L(n)}}return e.special[r](s),N(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),N(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Oe(e,r){return new Proxy({props:e,exclude:r,special:{},version:fe(0),parent_effect:R},he)}const Se={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(S(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let a=e.props[n];S(a)&&(a=a());const i=w(a,r);if(i&&i.set)return i.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(S(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const a=w(n,r);return a&&!a.configurable&&(a.configurable=!0),a}}},has(e,r){if(r===Y||r===B)return!1;for(let s of e.props)if(S(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(S(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Te(...e){return new Proxy({props:e},Se)}function me(e,r,s,n){var a=!ce||(s&de)!==0,i=(s&le)!==0,l=(s&pe)!==0,d=n,p=!0,P=()=>(p&&(p=!1,d=l?oe(n):n),d),f;if(i){var I=Y in e||B in e;f=w(e,r)?.set??(I&&r in e?t=>e[r]=t:void 0)}var _,o=!1;i?[_,o]=be(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=P(),f&&(a&&se(),f(_)));var u;if(a?u=()=>{var t=e[r];return t===void 0?P():(p=!0,t)}:u=()=>{var t=e[r];return t!==void 0&&(d=void 0),t===void 0?d:t},a&&(s&M)===0)return u;if(f){var g=e.$$legacy;return function(t,v){return arguments.length>0?((!a||!v||g||o)&&f(v?u():t),t):u()}}var b=!1,c=((s&_e)!==0?ae:ie)(()=>(b=!1,u()));i&&m(c);var h=R;return function(t,v){if(arguments.length>0){const E=v?m(c):a&&i?te(t):t;return U(c,E),b=!0,d!==void 0&&(d=E),t}return ve&&b||(h.f&ue)!==0?c.v:m(c)}}export{ge as a,Te as b,Ie as i,Oe as l,me as p,Ee as s}; diff --git a/webapp/assets/_app/immutable/chunks/CfvU88k5.js b/webapp/assets/_app/immutable/chunks/CfvU88k5.js new file mode 100644 index 00000000..6331659a --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/CfvU88k5.js @@ -0,0 +1 @@ +import"./DsnmJJEf.js";import{i as R}from"./zNh6Oe5P.js";import{p as q,l as w,a as A,f as x,t as v,c as k,d as B,k as D,j as u,s as _,m as y,r as f,n as m,u as h,g as d,v as U}from"./sWNKMed7.js";import{p as o,i as F}from"./Ccl3fNd2.js";import{c as g,s as G,d as r}from"./t8NOL8UT.js";var H=x('
'),J=x('');function V(b,n){q(n,!1);const i=y(),p=y();let e=o(n,"item",8),s=o(n,"entityType",8,"repository"),E=o(n,"showOwner",8,!1),I=o(n,"showId",8,!1),z=o(n,"fontMono",8,!1);function C(){if(!e())return"Unknown";switch(s()){case"repository":return E()?`${e().owner||"Unknown"}/${e().name||"Unknown"}`:e().name||"Unknown";case"organization":case"enterprise":return e().name||"Unknown";case"pool":return I()?e().id||"Unknown":e().name||"Unknown";case"scaleset":return e().name||"Unknown";case"instance":return e().name||"Unknown";default:return e().name||e().id||"Unknown"}}function M(){if(!e())return"#";let t;switch(s()){case"instance":t=e().name;break;default:t=e().id||e().name;break}if(!t)return"#";switch(s()){case"repository":return r(`/repositories/${t}`);case"organization":return r(`/organizations/${t}`);case"enterprise":return r(`/enterprises/${t}`);case"pool":return r(`/pools/${t}`);case"scaleset":return r(`/scalesets/${t}`);case"instance":return r(`/instances/${encodeURIComponent(t)}`);default:return"#"}}w(()=>{},()=>{_(i,C())}),w(()=>{},()=>{_(p,M())}),A(),R();var c=J(),a=u(c),N=u(a,!0);f(a);var O=D(a,2);{var T=t=>{var l=H(),j=u(l,!0);f(l),v(()=>U(j,(m(e()),h(()=>e().provider_id)))),k(t,l)};F(O,t=>{m(s()),m(e()),h(()=>s()==="instance"&&e()?.provider_id)&&t(T)})}f(c),v(()=>{g(a,"href",d(p)),G(a,1,`block w-full truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${z()?"font-mono":""}`),g(a,"title",d(i)),U(N,d(i))}),k(b,c),B()}export{V as E}; diff --git a/webapp/assets/_app/immutable/chunks/CRD55Dyg.js b/webapp/assets/_app/immutable/chunks/Csic5lDL.js similarity index 97% rename from webapp/assets/_app/immutable/chunks/CRD55Dyg.js rename to webapp/assets/_app/immutable/chunks/Csic5lDL.js index 0388dfa1..2f4ecf9a 100644 --- a/webapp/assets/_app/immutable/chunks/CRD55Dyg.js +++ b/webapp/assets/_app/immutable/chunks/Csic5lDL.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as Lr}from"./B3Pzt0F_.js";import{p as qr,E as Gr,m as s,o as Jr,f as m,k as r,j as o,g as e,r as a,t as v,e as M,c as b,v as T,b as Nr,z as vr,x as W,u as p,s as d,D as je,d as Vr}from"./D8EpLgQ1.js";import{p as pr,i as z}from"./5WA7h8uK.js";import{e as Ae,i as Oe}from"./u94nIB4-.js";import{s as $e,r as h,b as Q,g as C,c as Fr}from"./CiE1LlKV.js";import{b as E,a as Kr}from"./C6k1Q4We.js";import{p as Ur}from"./D4Caz1gY.js";import{M as Wr}from"./qB7B8uiS.js";import{e as He}from"./BZiHL9L3.js";import{J as Qr}from"./DZblzgqm.js";var Xr=m('

'),Yr=m('
'),Zr=m(""),et=m(''),rt=m('
'),tt=m(""),at=m(''),ot=m(' '),dt=m('
'),it=m('

Entity & Provider Configuration

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Extra Specs (JSON)
',1),st=m('
Creating...
'),lt=m('

Create New Pool

Entity Level *
');function ht(mr,X){qr(X,!1);const Y=Gr();let Be=pr(X,"initialEntityType",8,""),fr=pr(X,"initialEntityId",8,""),G=s(!1),P=s(""),n=s(Be()),I=s([]),Z=s([]),ee=s(!1),re=s(!1),k=s(fr()),S=s(""),B=s(""),D=s(""),te=s(void 0),ae=s(void 0),oe=s(void 0),de=s(100),ie=s("garm"),J=s("linux"),N=s("amd64"),se=s(""),le=s(!0),_=s([]),j=s(""),L=s("{}");async function yr(){try{d(re,!0),d(Z,await C.listProviders())}catch(l){d(P,He(l))}finally{d(re,!1)}}async function De(){if(e(n))try{switch(d(ee,!0),d(I,[]),e(n)){case"repository":d(I,await C.listRepositories());break;case"organization":d(I,await C.listOrganizations());break;case"enterprise":d(I,await C.listEnterprises());break}}catch(l){d(P,He(l))}finally{d(ee,!1)}}function ne(l){e(n)!==l&&(d(n,l),d(k,""),De())}function Le(){e(j).trim()&&!e(_).includes(e(j).trim())&&(d(_,[...e(_),e(j).trim()]),d(j,""))}function xr(l){d(_,e(_).filter((A,w)=>w!==l))}function hr(l){l.key==="Enter"&&(l.preventDefault(),Le())}async function kr(){if(!e(n)||!e(k)||!e(S)||!e(B)||!e(D)){d(P,"Please fill in all required fields");return}try{d(G,!0),d(P,"");let l={};if(e(L).trim())try{l=JSON.parse(e(L))}catch{throw new Error("Invalid JSON in extra specs")}const A={provider_name:e(S),image:e(B),flavor:e(D),max_runners:e(te)||10,min_idle_runners:e(ae)||0,runner_bootstrap_timeout:e(oe)||20,priority:e(de),runner_prefix:e(ie),os_type:e(J),os_arch:e(N),"github-runner-group":e(se)||void 0,enabled:e(le),tags:e(_),extra_specs:e(L).trim()?l:void 0};let w;switch(e(n)){case"repository":w=await C.createRepositoryPool(e(k),A);break;case"organization":w=await C.createOrganizationPool(e(k),A);break;case"enterprise":w=await C.createEnterprisePool(e(k),A);break;default:throw new Error("Invalid entity level")}Y("submit",A)}catch(l){d(P,He(l))}finally{d(G,!1)}}Jr(()=>{yr(),Be()&&De()}),Lr(),Wr(mr,{$$events:{close:()=>Y("close")},children:(l,A)=>{var w=lt(),V=r(o(w),2),qe=o(V);{var _r=c=>{var y=Xr(),O=o(y),F=o(O,!0);a(O),a(y),v(()=>T(F,e(P))),b(c,y)};z(qe,c=>{e(P)&&c(_r)})}var ue=r(qe,2),Ge=r(o(ue),2),be=o(Ge),ce=r(be,2),Je=r(ce,2);a(Ge),a(ue);var Ne=r(ue,2);{var wr=c=>{var y=it(),O=Nr(y),F=r(o(O),2),ve=o(F),pe=o(ve),Rr=o(pe);vr(),a(pe);var Tr=r(pe,2);{var zr=t=>{var u=Yr();b(t,u)},Cr=t=>{var u=et();v(()=>{e(k),W(()=>{e(n),e(I)})});var f=o(u),$=o(f);a(f),f.value=f.__value="";var R=r(f);Ae(R,1,()=>e(I),Oe,(g,i)=>{var x=Zr(),U=o(x);{var Br=H=>{var q=je();v(()=>T(q,`${e(i),p(()=>e(i).owner)??""}/${e(i),p(()=>e(i).name)??""} (${e(i),p(()=>e(i).endpoint?.name)??""})`)),b(H,q)},Dr=H=>{var q=je();v(()=>T(q,`${e(i),p(()=>e(i).name)??""} (${e(i),p(()=>e(i).endpoint?.name)??""})`)),b(H,q)};z(U,H=>{e(n)==="repository"?H(Br):H(Dr,!1)})}a(x);var gr={};v(()=>{gr!==(gr=(e(i),p(()=>e(i).id)))&&(x.value=(x.__value=(e(i),p(()=>e(i).id)))??"")}),b(g,x)}),a(u),v(()=>T($,`Select a ${e(n)??""}`)),Q(u,()=>e(k),g=>d(k,g)),b(t,u)};z(Tr,t=>{e(ee)?t(zr):t(Cr,!1)})}a(ve);var Ke=r(ve,2),Ir=r(o(Ke),2);{var Sr=t=>{var u=rt();b(t,u)},jr=t=>{var u=at();v(()=>{e(S),W(()=>{e(Z)})});var f=o(u);f.value=f.__value="";var $=r(f);Ae($,1,()=>e(Z),Oe,(R,g)=>{var i=tt(),x=o(i,!0);a(i);var U={};v(()=>{T(x,(e(g),p(()=>e(g).name))),U!==(U=(e(g),p(()=>e(g).name)))&&(i.value=(i.__value=(e(g),p(()=>e(g).name)))??"")}),b(R,i)}),a(u),Q(u,()=>e(S),R=>d(S,R)),b(t,u)};z(Ir,t=>{e(re)?t(Sr):t(jr,!1)})}a(Ke),a(F),a(O);var me=r(O,2),Ue=r(o(me),2),fe=o(Ue),We=r(o(fe),2);h(We),a(fe);var ye=r(fe,2),Qe=r(o(ye),2);h(Qe),a(ye);var xe=r(ye,2),he=r(o(xe),2);v(()=>{e(J),W(()=>{})});var ke=o(he);ke.value=ke.__value="linux";var Xe=r(ke);Xe.value=Xe.__value="windows",a(he),a(xe);var Ye=r(xe,2),_e=r(o(Ye),2);v(()=>{e(N),W(()=>{})});var we=o(_e);we.value=we.__value="amd64";var Ze=r(we);Ze.value=Ze.__value="arm64",a(_e),a(Ye),a(Ue),a(me);var Ee=r(me,2),er=r(o(Ee),2),Me=o(er),rr=r(o(Me),2);h(rr),a(Me);var Pe=r(Me,2),tr=r(o(Pe),2);h(tr),a(Pe);var ar=r(Pe,2),or=r(o(ar),2);h(or),a(ar),a(er),a(Ee);var dr=r(Ee,2),Re=r(o(dr),2),Te=o(Re),ir=r(o(Te),2);h(ir),a(Te);var ze=r(Te,2),sr=r(o(ze),2);h(sr),a(ze);var lr=r(ze,2),nr=r(o(lr),2);h(nr),a(lr),a(Re);var Ce=r(Re,2),ur=r(o(Ce),2),Ie=o(ur),K=o(Ie);h(K);var Ar=r(K,2);a(Ie);var Or=r(Ie,2);{var $r=t=>{var u=dt();Ae(u,5,()=>e(_),Oe,(f,$,R)=>{var g=ot(),i=o(g),x=r(i);a(g),v(()=>{T(i,`${e($)??""} `),Fr(x,"aria-label",`Remove tag ${e($)}`)}),M("click",x,()=>xr(R)),b(f,g)}),a(u),b(t,u)};z(Or,t=>{e(_),p(()=>e(_).length>0)&&t($r)})}a(ur),a(Ce);var Se=r(Ce,2),Hr=r(o(Se),2);Qr(Hr,{rows:4,placeholder:"{}",get value(){return e(L)},set value(t){d(L,t)},$$legacy:!0}),a(Se);var br=r(Se,2),cr=o(br);h(cr),vr(2),a(br),a(dr),v(t=>T(Rr,`${t??""} `),[()=>(e(n),p(()=>e(n).charAt(0).toUpperCase()+e(n).slice(1)))]),E(We,()=>e(B),t=>d(B,t)),E(Qe,()=>e(D),t=>d(D,t)),Q(he,()=>e(J),t=>d(J,t)),Q(_e,()=>e(N),t=>d(N,t)),E(rr,()=>e(ae),t=>d(ae,t)),E(tr,()=>e(te),t=>d(te,t)),E(or,()=>e(oe),t=>d(oe,t)),E(ir,()=>e(ie),t=>d(ie,t)),E(sr,()=>e(de),t=>d(de,t)),E(nr,()=>e(se),t=>d(se,t)),E(K,()=>e(j),t=>d(j,t)),M("keydown",K,hr),M("click",Ar,Le),Kr(cr,()=>e(le),t=>d(le,t)),b(c,y)};z(Ne,c=>{e(n)&&c(wr)})}var Ve=r(Ne,2),Fe=o(Ve),ge=r(Fe,2),Er=o(ge);{var Mr=c=>{var y=st();b(c,y)},Pr=c=>{var y=je("Create Pool");b(c,y)};z(Er,c=>{e(G)?c(Mr):c(Pr,!1)})}a(ge),a(Ve),a(V),a(w),v(()=>{$e(be,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="repository"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),$e(ce,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="organization"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),$e(Je,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="enterprise"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),ge.disabled=e(G)||!e(n)||!e(k)||!e(S)||!e(B)||!e(D)}),M("click",be,()=>ne("repository")),M("click",ce,()=>ne("organization")),M("click",Je,()=>ne("enterprise")),M("click",Fe,()=>Y("close")),M("submit",V,Ur(kr)),b(l,w)},$$slots:{default:!0}}),Vr()}export{ht as C}; +import"./DsnmJJEf.js";import{i as Lr}from"./zNh6Oe5P.js";import{p as qr,E as Gr,m as s,o as Jr,f as m,k as r,j as o,g as e,r as a,t as v,e as M,c as b,v as T,b as Nr,z as vr,x as W,u as p,s as d,D as je,d as Vr}from"./sWNKMed7.js";import{p as pr,i as z}from"./Ccl3fNd2.js";import{e as Ae,i as Oe}from"./BuuPrWMc.js";import{s as $e,r as h,b as Q,g as C,c as Fr}from"./t8NOL8UT.js";import{b as E,a as Kr}from"./CLagxtgo.js";import{p as Ur}from"./D4Caz1gY.js";import{M as Wr}from"./-99ewtnX.js";import{e as He}from"./BZiHL9L3.js";import{J as Qr}from"./5NDOgLBG.js";var Xr=m('

'),Yr=m('
'),Zr=m(""),et=m(''),rt=m('
'),tt=m(""),at=m(''),ot=m(' '),dt=m('
'),it=m('

Entity & Provider Configuration

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Extra Specs (JSON)
',1),st=m('
Creating...
'),lt=m('

Create New Pool

Entity Level *
');function ht(mr,X){qr(X,!1);const Y=Gr();let Be=pr(X,"initialEntityType",8,""),fr=pr(X,"initialEntityId",8,""),G=s(!1),P=s(""),n=s(Be()),I=s([]),Z=s([]),ee=s(!1),re=s(!1),k=s(fr()),S=s(""),B=s(""),D=s(""),te=s(void 0),ae=s(void 0),oe=s(void 0),de=s(100),ie=s("garm"),J=s("linux"),N=s("amd64"),se=s(""),le=s(!0),_=s([]),j=s(""),L=s("{}");async function yr(){try{d(re,!0),d(Z,await C.listProviders())}catch(l){d(P,He(l))}finally{d(re,!1)}}async function De(){if(e(n))try{switch(d(ee,!0),d(I,[]),e(n)){case"repository":d(I,await C.listRepositories());break;case"organization":d(I,await C.listOrganizations());break;case"enterprise":d(I,await C.listEnterprises());break}}catch(l){d(P,He(l))}finally{d(ee,!1)}}function ne(l){e(n)!==l&&(d(n,l),d(k,""),De())}function Le(){e(j).trim()&&!e(_).includes(e(j).trim())&&(d(_,[...e(_),e(j).trim()]),d(j,""))}function xr(l){d(_,e(_).filter((A,w)=>w!==l))}function hr(l){l.key==="Enter"&&(l.preventDefault(),Le())}async function kr(){if(!e(n)||!e(k)||!e(S)||!e(B)||!e(D)){d(P,"Please fill in all required fields");return}try{d(G,!0),d(P,"");let l={};if(e(L).trim())try{l=JSON.parse(e(L))}catch{throw new Error("Invalid JSON in extra specs")}const A={provider_name:e(S),image:e(B),flavor:e(D),max_runners:e(te)||10,min_idle_runners:e(ae)||0,runner_bootstrap_timeout:e(oe)||20,priority:e(de),runner_prefix:e(ie),os_type:e(J),os_arch:e(N),"github-runner-group":e(se)||void 0,enabled:e(le),tags:e(_),extra_specs:e(L).trim()?l:void 0};let w;switch(e(n)){case"repository":w=await C.createRepositoryPool(e(k),A);break;case"organization":w=await C.createOrganizationPool(e(k),A);break;case"enterprise":w=await C.createEnterprisePool(e(k),A);break;default:throw new Error("Invalid entity level")}Y("submit",A)}catch(l){d(P,He(l))}finally{d(G,!1)}}Jr(()=>{yr(),Be()&&De()}),Lr(),Wr(mr,{$$events:{close:()=>Y("close")},children:(l,A)=>{var w=lt(),V=r(o(w),2),qe=o(V);{var _r=c=>{var y=Xr(),O=o(y),F=o(O,!0);a(O),a(y),v(()=>T(F,e(P))),b(c,y)};z(qe,c=>{e(P)&&c(_r)})}var ue=r(qe,2),Ge=r(o(ue),2),be=o(Ge),ce=r(be,2),Je=r(ce,2);a(Ge),a(ue);var Ne=r(ue,2);{var wr=c=>{var y=it(),O=Nr(y),F=r(o(O),2),ve=o(F),pe=o(ve),Rr=o(pe);vr(),a(pe);var Tr=r(pe,2);{var zr=t=>{var u=Yr();b(t,u)},Cr=t=>{var u=et();v(()=>{e(k),W(()=>{e(n),e(I)})});var f=o(u),$=o(f);a(f),f.value=f.__value="";var R=r(f);Ae(R,1,()=>e(I),Oe,(g,i)=>{var x=Zr(),U=o(x);{var Br=H=>{var q=je();v(()=>T(q,`${e(i),p(()=>e(i).owner)??""}/${e(i),p(()=>e(i).name)??""} (${e(i),p(()=>e(i).endpoint?.name)??""})`)),b(H,q)},Dr=H=>{var q=je();v(()=>T(q,`${e(i),p(()=>e(i).name)??""} (${e(i),p(()=>e(i).endpoint?.name)??""})`)),b(H,q)};z(U,H=>{e(n)==="repository"?H(Br):H(Dr,!1)})}a(x);var gr={};v(()=>{gr!==(gr=(e(i),p(()=>e(i).id)))&&(x.value=(x.__value=(e(i),p(()=>e(i).id)))??"")}),b(g,x)}),a(u),v(()=>T($,`Select a ${e(n)??""}`)),Q(u,()=>e(k),g=>d(k,g)),b(t,u)};z(Tr,t=>{e(ee)?t(zr):t(Cr,!1)})}a(ve);var Ke=r(ve,2),Ir=r(o(Ke),2);{var Sr=t=>{var u=rt();b(t,u)},jr=t=>{var u=at();v(()=>{e(S),W(()=>{e(Z)})});var f=o(u);f.value=f.__value="";var $=r(f);Ae($,1,()=>e(Z),Oe,(R,g)=>{var i=tt(),x=o(i,!0);a(i);var U={};v(()=>{T(x,(e(g),p(()=>e(g).name))),U!==(U=(e(g),p(()=>e(g).name)))&&(i.value=(i.__value=(e(g),p(()=>e(g).name)))??"")}),b(R,i)}),a(u),Q(u,()=>e(S),R=>d(S,R)),b(t,u)};z(Ir,t=>{e(re)?t(Sr):t(jr,!1)})}a(Ke),a(F),a(O);var me=r(O,2),Ue=r(o(me),2),fe=o(Ue),We=r(o(fe),2);h(We),a(fe);var ye=r(fe,2),Qe=r(o(ye),2);h(Qe),a(ye);var xe=r(ye,2),he=r(o(xe),2);v(()=>{e(J),W(()=>{})});var ke=o(he);ke.value=ke.__value="linux";var Xe=r(ke);Xe.value=Xe.__value="windows",a(he),a(xe);var Ye=r(xe,2),_e=r(o(Ye),2);v(()=>{e(N),W(()=>{})});var we=o(_e);we.value=we.__value="amd64";var Ze=r(we);Ze.value=Ze.__value="arm64",a(_e),a(Ye),a(Ue),a(me);var Ee=r(me,2),er=r(o(Ee),2),Me=o(er),rr=r(o(Me),2);h(rr),a(Me);var Pe=r(Me,2),tr=r(o(Pe),2);h(tr),a(Pe);var ar=r(Pe,2),or=r(o(ar),2);h(or),a(ar),a(er),a(Ee);var dr=r(Ee,2),Re=r(o(dr),2),Te=o(Re),ir=r(o(Te),2);h(ir),a(Te);var ze=r(Te,2),sr=r(o(ze),2);h(sr),a(ze);var lr=r(ze,2),nr=r(o(lr),2);h(nr),a(lr),a(Re);var Ce=r(Re,2),ur=r(o(Ce),2),Ie=o(ur),K=o(Ie);h(K);var Ar=r(K,2);a(Ie);var Or=r(Ie,2);{var $r=t=>{var u=dt();Ae(u,5,()=>e(_),Oe,(f,$,R)=>{var g=ot(),i=o(g),x=r(i);a(g),v(()=>{T(i,`${e($)??""} `),Fr(x,"aria-label",`Remove tag ${e($)}`)}),M("click",x,()=>xr(R)),b(f,g)}),a(u),b(t,u)};z(Or,t=>{e(_),p(()=>e(_).length>0)&&t($r)})}a(ur),a(Ce);var Se=r(Ce,2),Hr=r(o(Se),2);Qr(Hr,{rows:4,placeholder:"{}",get value(){return e(L)},set value(t){d(L,t)},$$legacy:!0}),a(Se);var br=r(Se,2),cr=o(br);h(cr),vr(2),a(br),a(dr),v(t=>T(Rr,`${t??""} `),[()=>(e(n),p(()=>e(n).charAt(0).toUpperCase()+e(n).slice(1)))]),E(We,()=>e(B),t=>d(B,t)),E(Qe,()=>e(D),t=>d(D,t)),Q(he,()=>e(J),t=>d(J,t)),Q(_e,()=>e(N),t=>d(N,t)),E(rr,()=>e(ae),t=>d(ae,t)),E(tr,()=>e(te),t=>d(te,t)),E(or,()=>e(oe),t=>d(oe,t)),E(ir,()=>e(ie),t=>d(ie,t)),E(sr,()=>e(de),t=>d(de,t)),E(nr,()=>e(se),t=>d(se,t)),E(K,()=>e(j),t=>d(j,t)),M("keydown",K,hr),M("click",Ar,Le),Kr(cr,()=>e(le),t=>d(le,t)),b(c,y)};z(Ne,c=>{e(n)&&c(wr)})}var Ve=r(Ne,2),Fe=o(Ve),ge=r(Fe,2),Er=o(ge);{var Mr=c=>{var y=st();b(c,y)},Pr=c=>{var y=je("Create Pool");b(c,y)};z(Er,c=>{e(G)?c(Mr):c(Pr,!1)})}a(ge),a(Ve),a(V),a(w),v(()=>{$e(be,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="repository"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),$e(ce,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="organization"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),$e(Je,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="enterprise"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),ge.disabled=e(G)||!e(n)||!e(k)||!e(S)||!e(B)||!e(D)}),M("click",be,()=>ne("repository")),M("click",ce,()=>ne("organization")),M("click",Je,()=>ne("enterprise")),M("click",Fe,()=>Y("close")),M("submit",V,Ur(kr)),b(l,w)},$$slots:{default:!0}}),Vr()}export{ht as C}; diff --git a/webapp/assets/_app/immutable/chunks/2p_hWkLJ.js b/webapp/assets/_app/immutable/chunks/D-gZnIAg.js similarity index 96% rename from webapp/assets/_app/immutable/chunks/2p_hWkLJ.js rename to webapp/assets/_app/immutable/chunks/D-gZnIAg.js index 02a9bb5c..89fb0c9d 100644 --- a/webapp/assets/_app/immutable/chunks/2p_hWkLJ.js +++ b/webapp/assets/_app/immutable/chunks/D-gZnIAg.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as dr}from"./B3Pzt0F_.js";import{p as or,E as sr,m as i,o as ir,s,f as le,j as d,r as o,k as t,g as r,n as c,u as m,t as f,x as Ge,z as nr,v as _,e as je,c as l,D as R,B as Be,b as $e,d as lr}from"./D8EpLgQ1.js";import{p as ur,i as E}from"./5WA7h8uK.js";import{r as b,b as ze}from"./CiE1LlKV.js";import{b as v,a as br}from"./C6k1Q4We.js";import{p as gr}from"./D4Caz1gY.js";import{M as cr}from"./qB7B8uiS.js";import{e as mr}from"./BZiHL9L3.js";import{J as vr}from"./DZblzgqm.js";var pr=le('

'),fr=le('
Updating...
'),xr=le('

Scale Set Information

Provider:
Entity:

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Extra Specs (JSON)
');function Jr(Ce,ue){or(ue,!1);let e=ur(ue,"scaleSet",8);const $=sr();let O=i(!1),I=i(""),J=i(e().name||""),T=i(e().image||""),A=i(e().flavor||""),M=i(e().max_runners),N=i(e().min_idle_runners),P=i(e().runner_bootstrap_timeout),U=i(e().runner_prefix||""),h=i(e().os_type||"linux"),k=i(e().os_arch||"amd64"),D=i(e()["github-runner-group"]||""),G=i(e().enabled),g=i("{}");ir(()=>{if(e().extra_specs)try{if(typeof e().extra_specs=="object")s(g,JSON.stringify(e().extra_specs,null,2));else{const u=JSON.parse(e().extra_specs);s(g,JSON.stringify(u,null,2))}}catch{s(g,e().extra_specs||"{}")}});async function Le(){try{s(O,!0),s(I,"");let u={};if(r(g).trim())try{u=JSON.parse(r(g))}catch{throw new Error("Invalid JSON in extra specs")}const w={name:r(J)!==e().name?r(J):void 0,image:r(T)!==e().image?r(T):void 0,flavor:r(A)!==e().flavor?r(A):void 0,max_runners:r(M)!==e().max_runners?r(M):void 0,min_idle_runners:r(N)!==e().min_idle_runners?r(N):void 0,runner_bootstrap_timeout:r(P)!==e().runner_bootstrap_timeout?r(P):void 0,runner_prefix:r(U)!==e().runner_prefix?r(U):void 0,os_type:r(h)!==e().os_type?r(h):void 0,os_arch:r(k)!==e().os_arch?r(k):void 0,"github-runner-group":r(D)!==e()["github-runner-group"]&&r(D)||void 0,enabled:r(G)!==e().enabled?r(G):void 0,extra_specs:r(g).trim()!==JSON.stringify(e().extra_specs||{},null,2).trim()?u:void 0};Object.keys(w).forEach(p=>{w[p]===void 0&&delete w[p]}),$("submit",w)}catch(u){s(I,mr(u))}finally{s(O,!1)}}dr(),cr(Ce,{$$events:{close:()=>$("close")},children:(u,w)=>{var p=xr(),z=d(p),be=d(z),Fe=d(be);o(be),o(z);var C=t(z,2),ge=d(C);{var He=a=>{var n=pr(),j=d(n),ne=d(j,!0);o(j),o(n),f(()=>_(ne,r(I))),l(a,n)};E(ge,a=>{r(I)&&a(He)})}var L=t(ge,2),ce=t(d(L),2),F=d(ce),me=t(d(F),2),We=d(me,!0);o(me),o(F);var ve=t(F,2),pe=t(d(ve),2),qe=d(pe);{var Ke=a=>{var n=R();f(()=>_(n,`Repository: ${c(e()),m(()=>e().repo_name)??""}`)),l(a,n)},Qe=a=>{var n=Be(),j=$e(n);{var ne=x=>{var S=R();f(()=>_(S,`Organization: ${c(e()),m(()=>e().org_name)??""}`)),l(x,S)},er=x=>{var S=Be(),rr=$e(S);{var ar=y=>{var B=R();f(()=>_(B,`Enterprise: ${c(e()),m(()=>e().enterprise_name)??""}`)),l(y,B)},tr=y=>{var B=R("Unknown Entity");l(y,B)};E(rr,y=>{c(e()),m(()=>e().enterprise_name)?y(ar):y(tr,!1)},!0)}l(x,S)};E(j,x=>{c(e()),m(()=>e().org_name)?x(ne):x(er,!1)},!0)}l(a,n)};E(qe,a=>{c(e()),m(()=>e().repo_name)?a(Ke):a(Qe,!1)})}o(pe),o(ve),o(ce),o(L);var H=t(L,2),fe=t(d(H),2);b(fe),o(H);var W=t(H,2),xe=t(d(W),2),q=d(xe),ye=t(d(q),2);b(ye),o(q);var K=t(q,2),_e=t(d(K),2);b(_e),o(K);var Q=t(K,2),V=t(d(Q),2);f(()=>{r(h),Ge(()=>{})});var X=d(V);X.value=X.__value="linux";var he=t(X);he.value=he.__value="windows",o(V),o(Q);var ke=t(Q,2),Y=t(d(ke),2);f(()=>{r(k),Ge(()=>{})});var Z=d(Y);Z.value=Z.__value="amd64";var we=t(Z);we.value=we.__value="arm64",o(Y),o(ke),o(xe),o(W);var ee=t(W,2),Se=t(d(ee),2),re=d(Se),Re=t(d(re),2);b(Re),o(re);var ae=t(re,2),Ee=t(d(ae),2);b(Ee),o(ae);var Oe=t(ae,2),Ie=t(d(Oe),2);b(Ie),o(Oe),o(Se),o(ee);var te=t(ee,2),de=t(d(te),2),oe=d(de),Je=t(d(oe),2);b(Je),o(oe);var Te=t(oe,2),Ae=t(d(Te),2);b(Ae),o(Te),o(de);var se=t(de,2),Me=d(se),Ve=t(d(Me),2);vr(Ve,{rows:4,placeholder:"{}",get value(){return r(g)},set value(a){s(g,a)},$$legacy:!0}),o(Me),o(se);var Ne=t(se,2),Pe=d(Ne);b(Pe),nr(2),o(Ne),o(te);var Ue=t(te,2),De=d(Ue),ie=t(De,2),Xe=d(ie);{var Ye=a=>{var n=fr();l(a,n)},Ze=a=>{var n=R("Update Scale Set");l(a,n)};E(Xe,a=>{r(O)?a(Ye):a(Ze,!1)})}o(ie),o(Ue),o(C),o(p),f(()=>{_(Fe,`Update Scale Set ${c(e()),m(()=>e().name)??""}`),_(We,(c(e()),m(()=>e().provider_name))),ie.disabled=r(O)}),v(fe,()=>r(J),a=>s(J,a)),v(ye,()=>r(T),a=>s(T,a)),v(_e,()=>r(A),a=>s(A,a)),ze(V,()=>r(h),a=>s(h,a)),ze(Y,()=>r(k),a=>s(k,a)),v(Re,()=>r(N),a=>s(N,a)),v(Ee,()=>r(M),a=>s(M,a)),v(Ie,()=>r(P),a=>s(P,a)),v(Je,()=>r(U),a=>s(U,a)),v(Ae,()=>r(D),a=>s(D,a)),br(Pe,()=>r(G),a=>s(G,a)),je("click",De,()=>$("close")),je("submit",C,gr(Le)),l(u,p)},$$slots:{default:!0}}),lr()}export{Jr as U}; +import"./DsnmJJEf.js";import{i as dr}from"./zNh6Oe5P.js";import{p as or,E as sr,m as i,o as ir,s,f as le,j as d,r as o,k as t,g as r,n as c,u as m,t as f,x as Ge,z as nr,v as _,e as je,c as l,D as R,B as Be,b as $e,d as lr}from"./sWNKMed7.js";import{p as ur,i as E}from"./Ccl3fNd2.js";import{r as b,b as ze}from"./t8NOL8UT.js";import{b as v,a as br}from"./CLagxtgo.js";import{p as gr}from"./D4Caz1gY.js";import{M as cr}from"./-99ewtnX.js";import{e as mr}from"./BZiHL9L3.js";import{J as vr}from"./5NDOgLBG.js";var pr=le('

'),fr=le('
Updating...
'),xr=le('

Scale Set Information

Provider:
Entity:

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Extra Specs (JSON)
');function Jr(Ce,ue){or(ue,!1);let e=ur(ue,"scaleSet",8);const $=sr();let O=i(!1),I=i(""),J=i(e().name||""),T=i(e().image||""),A=i(e().flavor||""),M=i(e().max_runners),N=i(e().min_idle_runners),P=i(e().runner_bootstrap_timeout),U=i(e().runner_prefix||""),h=i(e().os_type||"linux"),k=i(e().os_arch||"amd64"),D=i(e()["github-runner-group"]||""),G=i(e().enabled),g=i("{}");ir(()=>{if(e().extra_specs)try{if(typeof e().extra_specs=="object")s(g,JSON.stringify(e().extra_specs,null,2));else{const u=JSON.parse(e().extra_specs);s(g,JSON.stringify(u,null,2))}}catch{s(g,e().extra_specs||"{}")}});async function Le(){try{s(O,!0),s(I,"");let u={};if(r(g).trim())try{u=JSON.parse(r(g))}catch{throw new Error("Invalid JSON in extra specs")}const w={name:r(J)!==e().name?r(J):void 0,image:r(T)!==e().image?r(T):void 0,flavor:r(A)!==e().flavor?r(A):void 0,max_runners:r(M)!==e().max_runners?r(M):void 0,min_idle_runners:r(N)!==e().min_idle_runners?r(N):void 0,runner_bootstrap_timeout:r(P)!==e().runner_bootstrap_timeout?r(P):void 0,runner_prefix:r(U)!==e().runner_prefix?r(U):void 0,os_type:r(h)!==e().os_type?r(h):void 0,os_arch:r(k)!==e().os_arch?r(k):void 0,"github-runner-group":r(D)!==e()["github-runner-group"]&&r(D)||void 0,enabled:r(G)!==e().enabled?r(G):void 0,extra_specs:r(g).trim()!==JSON.stringify(e().extra_specs||{},null,2).trim()?u:void 0};Object.keys(w).forEach(p=>{w[p]===void 0&&delete w[p]}),$("submit",w)}catch(u){s(I,mr(u))}finally{s(O,!1)}}dr(),cr(Ce,{$$events:{close:()=>$("close")},children:(u,w)=>{var p=xr(),z=d(p),be=d(z),Fe=d(be);o(be),o(z);var C=t(z,2),ge=d(C);{var He=a=>{var n=pr(),j=d(n),ne=d(j,!0);o(j),o(n),f(()=>_(ne,r(I))),l(a,n)};E(ge,a=>{r(I)&&a(He)})}var L=t(ge,2),ce=t(d(L),2),F=d(ce),me=t(d(F),2),We=d(me,!0);o(me),o(F);var ve=t(F,2),pe=t(d(ve),2),qe=d(pe);{var Ke=a=>{var n=R();f(()=>_(n,`Repository: ${c(e()),m(()=>e().repo_name)??""}`)),l(a,n)},Qe=a=>{var n=Be(),j=$e(n);{var ne=x=>{var S=R();f(()=>_(S,`Organization: ${c(e()),m(()=>e().org_name)??""}`)),l(x,S)},er=x=>{var S=Be(),rr=$e(S);{var ar=y=>{var B=R();f(()=>_(B,`Enterprise: ${c(e()),m(()=>e().enterprise_name)??""}`)),l(y,B)},tr=y=>{var B=R("Unknown Entity");l(y,B)};E(rr,y=>{c(e()),m(()=>e().enterprise_name)?y(ar):y(tr,!1)},!0)}l(x,S)};E(j,x=>{c(e()),m(()=>e().org_name)?x(ne):x(er,!1)},!0)}l(a,n)};E(qe,a=>{c(e()),m(()=>e().repo_name)?a(Ke):a(Qe,!1)})}o(pe),o(ve),o(ce),o(L);var H=t(L,2),fe=t(d(H),2);b(fe),o(H);var W=t(H,2),xe=t(d(W),2),q=d(xe),ye=t(d(q),2);b(ye),o(q);var K=t(q,2),_e=t(d(K),2);b(_e),o(K);var Q=t(K,2),V=t(d(Q),2);f(()=>{r(h),Ge(()=>{})});var X=d(V);X.value=X.__value="linux";var he=t(X);he.value=he.__value="windows",o(V),o(Q);var ke=t(Q,2),Y=t(d(ke),2);f(()=>{r(k),Ge(()=>{})});var Z=d(Y);Z.value=Z.__value="amd64";var we=t(Z);we.value=we.__value="arm64",o(Y),o(ke),o(xe),o(W);var ee=t(W,2),Se=t(d(ee),2),re=d(Se),Re=t(d(re),2);b(Re),o(re);var ae=t(re,2),Ee=t(d(ae),2);b(Ee),o(ae);var Oe=t(ae,2),Ie=t(d(Oe),2);b(Ie),o(Oe),o(Se),o(ee);var te=t(ee,2),de=t(d(te),2),oe=d(de),Je=t(d(oe),2);b(Je),o(oe);var Te=t(oe,2),Ae=t(d(Te),2);b(Ae),o(Te),o(de);var se=t(de,2),Me=d(se),Ve=t(d(Me),2);vr(Ve,{rows:4,placeholder:"{}",get value(){return r(g)},set value(a){s(g,a)},$$legacy:!0}),o(Me),o(se);var Ne=t(se,2),Pe=d(Ne);b(Pe),nr(2),o(Ne),o(te);var Ue=t(te,2),De=d(Ue),ie=t(De,2),Xe=d(ie);{var Ye=a=>{var n=fr();l(a,n)},Ze=a=>{var n=R("Update Scale Set");l(a,n)};E(Xe,a=>{r(O)?a(Ye):a(Ze,!1)})}o(ie),o(Ue),o(C),o(p),f(()=>{_(Fe,`Update Scale Set ${c(e()),m(()=>e().name)??""}`),_(We,(c(e()),m(()=>e().provider_name))),ie.disabled=r(O)}),v(fe,()=>r(J),a=>s(J,a)),v(ye,()=>r(T),a=>s(T,a)),v(_e,()=>r(A),a=>s(A,a)),ze(V,()=>r(h),a=>s(h,a)),ze(Y,()=>r(k),a=>s(k,a)),v(Re,()=>r(N),a=>s(N,a)),v(Ee,()=>r(M),a=>s(M,a)),v(Ie,()=>r(P),a=>s(P,a)),v(Je,()=>r(U),a=>s(U,a)),v(Ae,()=>r(D),a=>s(D,a)),br(Pe,()=>r(G),a=>s(G,a)),je("click",De,()=>$("close")),je("submit",C,gr(Le)),l(u,p)},$$slots:{default:!0}}),lr()}export{Jr as U}; diff --git a/webapp/assets/_app/immutable/chunks/D3_ugSUS.js b/webapp/assets/_app/immutable/chunks/D3_ugSUS.js deleted file mode 100644 index 90579cb0..00000000 --- a/webapp/assets/_app/immutable/chunks/D3_ugSUS.js +++ /dev/null @@ -1 +0,0 @@ -const s=globalThis.__sveltekit_1rdr8fy?.base??"/ui",a=globalThis.__sveltekit_1rdr8fy?.assets??s;export{a,s as b}; diff --git a/webapp/assets/_app/immutable/chunks/D5ucq3Gx.js b/webapp/assets/_app/immutable/chunks/D5ucq3Gx.js deleted file mode 100644 index 4ac800eb..00000000 --- a/webapp/assets/_app/immutable/chunks/D5ucq3Gx.js +++ /dev/null @@ -1,4 +0,0 @@ -import{b as w}from"./D3_ugSUS.js";import{r as x}from"./6_PqUCmb.js";import"./DsnmJJEf.js";import{i as k}from"./B3Pzt0F_.js";import{p as b,l as v,n as d,a as _,f as y,t as h,c as E,d as B,s as z,m as L,j as M,r as j,g as T,v as U}from"./D8EpLgQ1.js";import{s as I,e as D}from"./CiE1LlKV.js";import{p as s}from"./5WA7h8uK.js";function c(r,e){return w+x(r,e)}function V(r){if(!r)return"N/A";try{return(typeof r=="string"?new Date(r):r).toLocaleString()}catch{return"Invalid Date"}}function W(r,e="w-4 h-4"){return r==="gitea"?``:r==="github"?`
`:` - - - `}function q(r,e){if(r.repo_name)return r.repo_name;if(r.org_name)return r.org_name;if(r.enterprise_name)return r.enterprise_name;if(r.repo_id&&!r.repo_name&&e?.repositories){const n=e.repositories.find(t=>t.id===r.repo_id);return n?`${n.owner}/${n.name}`:"Unknown Entity"}if(r.org_id&&!r.org_name&&e?.organizations){const n=e.organizations.find(t=>t.id===r.org_id);return n&&n.name?n.name:"Unknown Entity"}if(r.enterprise_id&&!r.enterprise_name&&e?.enterprises){const n=e.enterprises.find(t=>t.id===r.enterprise_id);return n&&n.name?n.name:"Unknown Entity"}return"Unknown Entity"}function G(r){return r.repo_id?"repository":r.org_id?"organization":r.enterprise_id?"enterprise":"unknown"}function J(r){return r.repo_id?c(`/repositories/${r.repo_id}`):r.org_id?c(`/organizations/${r.org_id}`):r.enterprise_id?c(`/enterprises/${r.enterprise_id}`):"#"}function K(r){r&&(r.scrollTop=r.scrollHeight)}function O(r){return{newPerPage:r,newCurrentPage:1}}function Q(r){return r.pool_manager_status?.running?{text:"Running",variant:"success"}:{text:"Stopped",variant:"error"}}function X(r){switch(r.toLowerCase()){case"error":return{text:"Error",variant:"error"};case"warning":return{text:"Warning",variant:"warning"};case"info":return{text:"Info",variant:"info"};default:return{text:r,variant:"info"}}}function l(r,e,n){if(!e.trim())return r;const t=e.toLowerCase();return r.filter(a=>typeof n=="function"?n(a).toLowerCase().includes(t):n.some(i=>a[i]?.toString().toLowerCase().includes(t)))}function Y(r,e){return l(r,e,["name","owner"])}function Z(r,e){return l(r,e,["name"])}function F(r,e){return l(r,e,n=>[n.name||"",n.description||"",n.endpoint?.name||""].join(" "))}function r1(r,e){return l(r,e,["name","description","base_url","api_base_url"])}function e1(r,e,n){return r.slice((e-1)*n,e*n)}var N=y(" ");function n1(r,e){b(e,!1);const n=L();let t=s(e,"variant",8,"gray"),a=s(e,"size",8,"sm"),i=s(e,"text",8),g=s(e,"ring",8,!1);const u={success:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",error:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",warning:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",info:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",gray:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",blue:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",red:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",yellow:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200"},f={success:"ring-green-600/20 dark:ring-green-400/30",error:"ring-red-600/20 dark:ring-red-400/30",warning:"ring-yellow-600/20 dark:ring-yellow-400/30",info:"ring-blue-600/20 dark:ring-blue-400/30",gray:"ring-gray-500/20 dark:ring-gray-400/30",blue:"ring-blue-600/20 dark:ring-blue-400/30",green:"ring-green-600/20 dark:ring-green-400/30",red:"ring-red-600/20 dark:ring-red-400/30",yellow:"ring-yellow-600/20 dark:ring-yellow-400/30",secondary:"ring-gray-500/20 dark:ring-gray-400/30"},p={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};v(()=>(d(t()),d(a()),d(g())),()=>{z(n,["inline-flex items-center rounded-full font-semibold",u[t()],p[a()],g()?`ring-1 ring-inset ${f[t()]}`:""].filter(Boolean).join(" "))}),_(),k();var o=N(),m=M(o,!0);j(o),h(()=>{I(o,1,D(T(n))),U(m,i())}),E(r,o),B()}export{n1 as B,r1 as a,V as b,O as c,X as d,q as e,F as f,W as g,l as h,G as i,J as j,Q as k,Z as l,Y as m,e1 as p,K as s}; diff --git a/webapp/assets/_app/immutable/chunks/DJF9YLeI.js b/webapp/assets/_app/immutable/chunks/DJF9YLeI.js new file mode 100644 index 00000000..32289fd4 --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/DJF9YLeI.js @@ -0,0 +1 @@ +import"./DsnmJJEf.js";import{i as K}from"./zNh6Oe5P.js";import{p as O,f as U,j as e,r as t,k as s,n as c,u as o,z as at,t as q,v as g,c as h,d as Q,E as mt,D as ut,B as Y,b as Z,g as P}from"./sWNKMed7.js";import{p as T,i as H,s as gt,a as pt}from"./Ccl3fNd2.js";import{c as rt,d as tt,B as xt}from"./t8NOL8UT.js";import{b as R,B as $,e as ft}from"./Cbkm53HO.js";import{e as yt}from"./UPGsoYWO.js";import{D as ht,G as et}from"./WvS03pW2.js";import{E as _t}from"./CfvU88k5.js";import{S as kt}from"./C7WQ-JBG.js";import{e as bt,i as wt}from"./BuuPrWMc.js";import{b as Ct}from"./_gFYyMUN.js";var Pt=U('

ID
Created At
Updated At
Status
Pool Balancer Type
');function $t(L,v){O(v,!1);let a=T(v,"entity",8),p=T(v,"entityType",8);function N(){return`${p().charAt(0).toUpperCase()+p().slice(1)} Information`}function n(){if(!a().endpoint?.base_url)return"#";switch(p()){case"repository":const d=a();return`${a().endpoint.base_url}/${d.owner}/${a().name}`;case"organization":return`${a().endpoint.base_url}/${a().name}`;case"enterprise":return`${a().endpoint.base_url}/enterprises/${a().name}`;default:return"#"}}function E(){return`${p().charAt(0).toUpperCase()+p().slice(1)} URL`}function V(){const d=a().pool_balancing_type;if(!d||d===""||d==="none")return"Round Robin (default)";switch(d){case"roundrobin":return"Round Robin";case"pack":return"Pack";default:return d}}K();var m=Pt(),x=e(m),_=e(x),I=e(_,!0);t(_);var k=s(_,2),i=e(k),f=s(e(i),2),b=e(f,!0);t(f),t(i);var u=s(i,2),D=s(e(u),2),M=e(D,!0);t(D),t(u);var w=s(u,2),S=s(e(w),2),G=e(S,!0);t(S),t(w);var r=s(w,2),C=s(e(r),2),l=e(C);{var j=d=>{$(d,{variant:"success",text:"Running"})},z=d=>{$(d,{variant:"error",text:"Stopped"})};H(l,d=>{c(a()),o(()=>a().pool_manager_status?.running)?d(j):d(z,!1)})}t(C),t(r);var B=s(r,2),A=s(e(B),2),y=e(A,!0);t(A),t(B);var W=s(B,2),F=e(W),st=e(F,!0);t(F);var X=s(F,2),J=e(X),ot=e(J);at(),t(J),t(X),t(W),t(k),t(x),t(m),q((d,it,dt,nt,lt,vt,ct)=>{g(I,d),g(b,(c(a()),o(()=>a().id))),g(M,it),g(G,dt),g(y,nt),g(st,lt),rt(J,"href",vt),g(ot,`${ct??""} `)},[()=>o(N),()=>(c(R),c(a()),o(()=>R(a().created_at))),()=>(c(R),c(a()),o(()=>R(a().updated_at))),()=>o(V),()=>o(E),()=>o(n),()=>o(n)]),h(L,m),Q()}var Tt=U('

No pools configured

'),Et=U('');function Wt(L,v){O(v,!1);const[a,p]=gt(),N=()=>pt(yt,"$eagerCache",a);let n=T(v,"pools",8),E=T(v,"entityType",8),V=T(v,"entityId",8,""),m=T(v,"entityName",8,"");const x=mt();function _(){x("addPool",{entityType:E(),entityId:V(),entityName:m()})}const I=[{key:"id",title:"ID",flexible:!0,cellComponent:_t,cellProps:{entityType:"pool",showId:!0,fontMono:!0}},{key:"image",title:"Image",flexible:!0,cellComponent:et,cellProps:{field:"image",type:"code",showTitle:!0}},{key:"provider",title:"Provider",cellComponent:et,cellProps:{field:"provider_name"}},{key:"status",title:"Status",cellComponent:kt,cellProps:{statusType:"enabled"}}],k={entityType:"pool",primaryText:{field:"id",isClickable:!0,href:"/pools/{id}",useId:!0,isMonospace:!0},secondaryText:{field:"entity_name",computedValue:r=>ft(r,N())},badges:[{type:"custom",value:r=>({variant:r.enabled?"success":"error",text:r.enabled?"Enabled":"Disabled"})}]};K();var i=Et(),f=e(i),b=e(f),u=e(b),D=e(u);t(u);var M=s(u,2);t(b);var w=s(b,2);{var S=r=>{var C=Tt(),l=s(e(C),4),j=e(l);t(l);var z=s(l,2),B=e(z);xt(B,{variant:"primary",size:"sm",$$events:{click:_},children:(A,y)=>{at();var W=ut("Add Pool");h(A,W)},$$slots:{default:!0}}),t(z),t(C),q(()=>g(j,`No pools configured for this ${E()??""}.`)),h(r,C)},G=r=>{ht(r,{get columns(){return I},get data(){return n()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return c(n()),o(()=>n().length)},totalPages:1,get totalItems(){return c(n()),o(()=>n().length)},itemName:"pools",emptyTitle:"No pools configured",get emptyMessage(){return`No pools configured for this ${E()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return k}})};H(w,r=>{c(n()),o(()=>n().length===0)?r(S):r(G,!1)})}t(f),t(i),q(r=>{g(D,`Pools (${c(n()),o(()=>n().length)??""})`),rt(M,"href",r)},[()=>(c(tt),o(()=>tt("/pools")))]),h(L,i),Q(),p()}var It=U('

'),Bt=U('

Events

'),Nt=U('

Events

No events available

');function qt(L,v){O(v,!1);let a=T(v,"events",8),p=T(v,"eventsContainer",12,void 0);K();var N=Y(),n=Z(N);{var E=m=>{var x=Bt(),_=e(x),I=s(e(_),2);bt(I,5,a,wt,(k,i)=>{var f=It(),b=e(f),u=e(b),D=e(u,!0);t(u);var M=s(u,2),w=e(M);{var S=l=>{$(l,{variant:"error",text:"Error"})},G=l=>{var j=Y(),z=Z(j);{var B=y=>{$(y,{variant:"warning",text:"Warning"})},A=y=>{$(y,{variant:"info",text:"Info"})};H(z,y=>{P(i),o(()=>(P(i).event_level||"info").toLowerCase()==="warning")?y(B):y(A,!1)},!0)}h(l,j)};H(w,l=>{P(i),o(()=>(P(i).event_level||"info").toLowerCase()==="error")?l(S):l(G,!1)})}var r=s(w,2),C=e(r,!0);t(r),t(M),t(b),t(f),q(l=>{g(D,(P(i),o(()=>P(i).message))),g(C,l)},[()=>(c(R),P(i),o(()=>R(P(i).created_at)))]),h(k,f)}),t(I),Ct(I,k=>p(k),()=>p()),t(_),t(x),h(m,x)},V=m=>{var x=Nt();h(m,x)};H(n,m=>{c(a()),o(()=>a()&&a().length>0)?m(E):m(V,!1)})}h(L,N),Q()}export{$t as E,Wt as P,qt as a}; diff --git a/webapp/assets/_app/immutable/chunks/duD3WMbl.js b/webapp/assets/_app/immutable/chunks/DKD3N1EI.js similarity index 97% rename from webapp/assets/_app/immutable/chunks/duD3WMbl.js rename to webapp/assets/_app/immutable/chunks/DKD3N1EI.js index 50fdf414..4b6c37a0 100644 --- a/webapp/assets/_app/immutable/chunks/duD3WMbl.js +++ b/webapp/assets/_app/immutable/chunks/DKD3N1EI.js @@ -1 +1 @@ -import{I as w}from"./D8EpLgQ1.js";import{g as r}from"./CiE1LlKV.js";const m=!0,z=m,I=()=>window.location.port==="5173",b={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},n=w(b);function f(t,a,e=7){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3),document.cookie=`${t}=${a};expires=${i.toUTCString()};path=/;SameSite=Lax`}function d(t){const a=t+"=",e=document.cookie.split(";");for(let i=0;i({...i,loading:!0}));const e=await r.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),r.setToken(e.token),n.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw n.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),n.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{n.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(r.setToken(t),await c.checkAuth())){n.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}n.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{n.update(a=>({...a,loading:!1}))}},async checkInitializationStatus(){try{const t={Accept:"application/json"},a=d("garm_token"),e=I();e&&a&&(t.Authorization=`Bearer ${a}`);const i=await fetch("/api/v1/login",{method:"GET",headers:t,credentials:e?"omit":"include"});if(!i.ok){if(i.status===409&&(await i.json()).error==="init_required")throw n.update(s=>({...s,needsInitialization:!0,loading:!1})),new Error("Initialization required");return}return}catch(t){if(t instanceof Error&&t.message==="Initialization required")throw t;return}},async checkAuth(){try{return await c.checkInitializationStatus(),await r.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(n.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,o){try{n.update(u=>({...u,loading:!0}));const s=await r.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const l=window.location.origin,h=o?.metadataUrl||`${l}/api/v1/metadata`,p=o?.callbackUrl||`${l}/api/v1/callbacks`,k=o?.webhookUrl||`${l}/webhooks`;await r.updateController({metadata_url:h,callback_url:p,webhook_url:k}),n.update(u=>({...u,needsInitialization:!1}))}catch(s){throw n.update(l=>({...l,loading:!1})),s}}};export{n as a,c as b}; +import{I as w}from"./sWNKMed7.js";import{g as r}from"./t8NOL8UT.js";const m=!0,z=m,I=()=>window.location.port==="5173",b={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},n=w(b);function f(t,a,e=7){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3),document.cookie=`${t}=${a};expires=${i.toUTCString()};path=/;SameSite=Lax`}function d(t){const a=t+"=",e=document.cookie.split(";");for(let i=0;i({...i,loading:!0}));const e=await r.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),r.setToken(e.token),n.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw n.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),n.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{n.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(r.setToken(t),await c.checkAuth())){n.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}n.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{n.update(a=>({...a,loading:!1}))}},async checkInitializationStatus(){try{const t={Accept:"application/json"},a=d("garm_token"),e=I();e&&a&&(t.Authorization=`Bearer ${a}`);const i=await fetch("/api/v1/login",{method:"GET",headers:t,credentials:e?"omit":"include"});if(!i.ok){if(i.status===409&&(await i.json()).error==="init_required")throw n.update(s=>({...s,needsInitialization:!0,loading:!1})),new Error("Initialization required");return}return}catch(t){if(t instanceof Error&&t.message==="Initialization required")throw t;return}},async checkAuth(){try{return await c.checkInitializationStatus(),await r.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(n.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,o){try{n.update(u=>({...u,loading:!0}));const s=await r.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const l=window.location.origin,h=o?.metadataUrl||`${l}/api/v1/metadata`,p=o?.callbackUrl||`${l}/api/v1/callbacks`,k=o?.webhookUrl||`${l}/webhooks`;await r.updateController({metadata_url:h,callback_url:p,webhook_url:k}),n.update(u=>({...u,needsInitialization:!1}))}catch(s){throw n.update(l=>({...l,loading:!1})),s}}};export{n as a,c as b}; diff --git a/webapp/assets/_app/immutable/chunks/Bgb-frqW.js b/webapp/assets/_app/immutable/chunks/DLiuxLBn.js similarity index 96% rename from webapp/assets/_app/immutable/chunks/Bgb-frqW.js rename to webapp/assets/_app/immutable/chunks/DLiuxLBn.js index 1d4c8b61..a9317cfc 100644 --- a/webapp/assets/_app/immutable/chunks/Bgb-frqW.js +++ b/webapp/assets/_app/immutable/chunks/DLiuxLBn.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as cr}from"./B3Pzt0F_.js";import{p as pr,E as vr,m as u,o as fr,s as n,f as E,j as d,r as t,k as a,g as e,t as _,x as He,u as h,z as mr,n as D,v as k,e as w,c as m,D as xr,d as yr}from"./D8EpLgQ1.js";import{p as _r,i as ge,s as hr,a as kr}from"./5WA7h8uK.js";import{e as wr,i as Er}from"./u94nIB4-.js";import{r as c,b as Ke,c as Rr}from"./CiE1LlKV.js";import{b as p,a as $r}from"./C6k1Q4We.js";import{p as Sr}from"./D4Caz1gY.js";import{M as Tr}from"./qB7B8uiS.js";import{J as Or}from"./DZblzgqm.js";import{e as Pr}from"./BZiHL9L3.js";import{e as Jr}from"./wyaP0EDu.js";var Mr=E('

'),Nr=E(' '),Ur=E('
'),Ar=E('
Updating...
'),Ir=E('

Pool Information (Read-only)

Provider:
Entity:

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Tags
Extra Specs (JSON)
');function Qr(We,ce){pr(ce,!1);const[qe,Qe]=hr(),B=()=>kr(Jr,"$eagerCache",qe);let o=_r(ce,"pool",8);const G=vr();let R=u(!1),$=u(""),S=u(o().image||""),T=u(o().flavor||""),O=u(o().max_runners),P=u(o().min_idle_runners),J=u(o().runner_bootstrap_timeout),M=u(o().priority),N=u(o().runner_prefix||""),x=u(o().os_type||"linux"),y=u(o().os_arch||"amd64"),U=u(o()["github-runner-group"]||""),A=u(o().enabled),g=u((o().tags||[]).map(i=>i.name||"").filter(Boolean)),f=u(""),v=u("{}");function Ve(i){if(i.repo_id){const s=B().repositories.find(l=>l.id===i.repo_id);return s?`${s.owner}/${s.name}`:"Unknown Entity"}if(i.org_id){const s=B().organizations.find(l=>l.id===i.org_id);return s&&s.name?s.name:"Unknown Entity"}if(i.enterprise_id){const s=B().enterprises.find(l=>l.id===i.enterprise_id);return s&&s.name?s.name:"Unknown Entity"}return"Unknown Entity"}function Xe(i){return i.repo_id?"Repository":i.org_id?"Organization":i.enterprise_id?"Enterprise":"Unknown"}fr(()=>{if(o().extra_specs)try{if(typeof o().extra_specs=="object")n(v,JSON.stringify(o().extra_specs,null,2));else{const i=JSON.parse(o().extra_specs);n(v,JSON.stringify(i,null,2))}}catch{n(v,o().extra_specs||"{}")}});function pe(){e(f).trim()&&!e(g).includes(e(f).trim())&&(n(g,[...e(g),e(f).trim()]),n(f,""))}function Ye(i){n(g,e(g).filter((s,l)=>l!==i))}function Ze(i){i.key==="Enter"&&(i.preventDefault(),pe())}async function er(){try{n(R,!0),n($,"");let i={};if(e(v).trim())try{i=JSON.parse(e(v))}catch{throw new Error("Invalid JSON in extra specs")}const s={image:e(S)!==o().image?e(S):void 0,flavor:e(T)!==o().flavor?e(T):void 0,max_runners:e(O)!==o().max_runners?e(O):void 0,min_idle_runners:e(P)!==o().min_idle_runners?e(P):void 0,runner_bootstrap_timeout:e(J)!==o().runner_bootstrap_timeout?e(J):void 0,priority:e(M)!==o().priority?e(M):void 0,runner_prefix:e(N)!==o().runner_prefix?e(N):void 0,os_type:e(x)!==o().os_type?e(x):void 0,os_arch:e(y)!==o().os_arch?e(y):void 0,"github-runner-group":e(U)!==o()["github-runner-group"]&&e(U)||void 0,enabled:e(A)!==o().enabled?e(A):void 0,tags:JSON.stringify(e(g))!==JSON.stringify((o().tags||[]).map(l=>l.name||"").filter(Boolean))?e(g):void 0,extra_specs:e(v).trim()!==JSON.stringify(o().extra_specs||{},null,2).trim()?i:void 0};Object.keys(s).forEach(l=>{s[l]===void 0&&delete s[l]}),G("submit",s)}catch(i){n($,Pr(i))}finally{n(R,!1)}}cr(),Tr(We,{$$events:{close:()=>G("close")},children:(i,s)=>{var l=Ir(),z=d(l),ve=d(z),rr=d(ve);t(ve),t(z);var L=a(z,2),fe=d(L);{var tr=r=>{var b=Mr(),j=d(b),C=d(j,!0);t(j),t(b),_(()=>k(C,e($))),m(r,b)};ge(fe,r=>{e($)&&r(tr)})}var F=a(fe,2),me=a(d(F),2),H=d(me),xe=a(d(H),2),ar=d(xe,!0);t(xe),t(H);var ye=a(H,2),_e=a(d(ye),2),dr=d(_e);t(_e),t(ye),t(me),t(F);var K=a(F,2),he=a(d(K),2),W=d(he),ke=a(d(W),2);c(ke),t(W);var q=a(W,2),we=a(d(q),2);c(we),t(q);var Q=a(q,2),V=a(d(Q),2);_(()=>{e(x),He(()=>{})});var X=d(V);X.value=X.__value="linux";var Ee=a(X);Ee.value=Ee.__value="windows",t(V),t(Q);var Re=a(Q,2),Y=a(d(Re),2);_(()=>{e(y),He(()=>{})});var Z=d(Y);Z.value=Z.__value="amd64";var $e=a(Z);$e.value=$e.__value="arm64",t(Y),t(Re),t(he),t(K);var ee=a(K,2),Se=a(d(ee),2),re=d(Se),Te=a(d(re),2);c(Te),t(re);var te=a(re,2),Oe=a(d(te),2);c(Oe),t(te);var Pe=a(te,2),Je=a(d(Pe),2);c(Je),t(Pe),t(Se),t(ee);var ae=a(ee,2),de=a(d(ae),2),oe=d(de),Me=a(d(oe),2);c(Me),t(oe);var ie=a(oe,2),Ne=a(d(ie),2);c(Ne),t(ie);var Ue=a(ie,2),Ae=a(d(Ue),2);c(Ae),t(Ue),t(de);var ne=a(de,2),Ie=d(ne),je=a(d(Ie),2),se=d(je),I=d(se);c(I);var or=a(I,2);t(se);var ir=a(se,2);{var nr=r=>{var b=Ur();wr(b,5,()=>e(g),Er,(j,C,gr)=>{var be=Nr(),Le=d(be),Fe=a(Le);t(be),_(()=>{k(Le,`${e(C)??""} `),Rr(Fe,"aria-label",`Remove tag ${e(C)??""}`)}),w("click",Fe,()=>Ye(gr)),m(j,be)}),t(b),m(r,b)};ge(ir,r=>{e(g),h(()=>e(g).length>0)&&r(nr)})}t(je),t(Ie),t(ne);var le=a(ne,2),Ce=d(le),sr=a(d(Ce),2);Or(sr,{rows:4,placeholder:"{}",get value(){return e(v)},set value(r){n(v,r)},$$legacy:!0}),t(Ce),t(le);var De=a(le,2),Be=d(De);c(Be),mr(2),t(De),t(ae);var Ge=a(ae,2),ze=d(Ge),ue=a(ze,2),lr=d(ue);{var ur=r=>{var b=Ar();m(r,b)},br=r=>{var b=xr("Update Pool");m(r,b)};ge(lr,r=>{e(R)?r(ur):r(br,!1)})}t(ue),t(Ge),t(L),t(l),_((r,b)=>{k(rr,`Update Pool ${D(o()),h(()=>o().id)??""}`),k(ar,(D(o()),h(()=>o().provider_name))),k(dr,`${r??""}: ${b??""}`),ue.disabled=e(R)},[()=>(D(o()),h(()=>Xe(o()))),()=>(D(o()),h(()=>Ve(o())))]),p(ke,()=>e(S),r=>n(S,r)),p(we,()=>e(T),r=>n(T,r)),Ke(V,()=>e(x),r=>n(x,r)),Ke(Y,()=>e(y),r=>n(y,r)),p(Te,()=>e(P),r=>n(P,r)),p(Oe,()=>e(O),r=>n(O,r)),p(Je,()=>e(J),r=>n(J,r)),p(Me,()=>e(N),r=>n(N,r)),p(Ne,()=>e(M),r=>n(M,r)),p(Ae,()=>e(U),r=>n(U,r)),p(I,()=>e(f),r=>n(f,r)),w("keydown",I,Ze),w("click",or,pe),$r(Be,()=>e(A),r=>n(A,r)),w("click",ze,()=>G("close")),w("submit",L,Sr(er)),m(i,l)},$$slots:{default:!0}}),yr(),Qe()}export{Qr as U}; +import"./DsnmJJEf.js";import{i as cr}from"./zNh6Oe5P.js";import{p as pr,E as vr,m as u,o as fr,s as n,f as E,j as d,r as t,k as a,g as e,t as _,x as He,u as h,z as mr,n as D,v as k,e as w,c as m,D as xr,d as yr}from"./sWNKMed7.js";import{p as _r,i as ge,s as hr,a as kr}from"./Ccl3fNd2.js";import{e as wr,i as Er}from"./BuuPrWMc.js";import{r as c,b as Ke,c as Rr}from"./t8NOL8UT.js";import{b as p,a as $r}from"./CLagxtgo.js";import{p as Sr}from"./D4Caz1gY.js";import{M as Tr}from"./-99ewtnX.js";import{J as Or}from"./5NDOgLBG.js";import{e as Pr}from"./BZiHL9L3.js";import{e as Jr}from"./UPGsoYWO.js";var Mr=E('

'),Nr=E(' '),Ur=E('
'),Ar=E('
Updating...
'),Ir=E('

Pool Information (Read-only)

Provider:
Entity:

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Tags
Extra Specs (JSON)
');function Qr(We,ce){pr(ce,!1);const[qe,Qe]=hr(),B=()=>kr(Jr,"$eagerCache",qe);let o=_r(ce,"pool",8);const G=vr();let R=u(!1),$=u(""),S=u(o().image||""),T=u(o().flavor||""),O=u(o().max_runners),P=u(o().min_idle_runners),J=u(o().runner_bootstrap_timeout),M=u(o().priority),N=u(o().runner_prefix||""),x=u(o().os_type||"linux"),y=u(o().os_arch||"amd64"),U=u(o()["github-runner-group"]||""),A=u(o().enabled),g=u((o().tags||[]).map(i=>i.name||"").filter(Boolean)),f=u(""),v=u("{}");function Ve(i){if(i.repo_id){const s=B().repositories.find(l=>l.id===i.repo_id);return s?`${s.owner}/${s.name}`:"Unknown Entity"}if(i.org_id){const s=B().organizations.find(l=>l.id===i.org_id);return s&&s.name?s.name:"Unknown Entity"}if(i.enterprise_id){const s=B().enterprises.find(l=>l.id===i.enterprise_id);return s&&s.name?s.name:"Unknown Entity"}return"Unknown Entity"}function Xe(i){return i.repo_id?"Repository":i.org_id?"Organization":i.enterprise_id?"Enterprise":"Unknown"}fr(()=>{if(o().extra_specs)try{if(typeof o().extra_specs=="object")n(v,JSON.stringify(o().extra_specs,null,2));else{const i=JSON.parse(o().extra_specs);n(v,JSON.stringify(i,null,2))}}catch{n(v,o().extra_specs||"{}")}});function pe(){e(f).trim()&&!e(g).includes(e(f).trim())&&(n(g,[...e(g),e(f).trim()]),n(f,""))}function Ye(i){n(g,e(g).filter((s,l)=>l!==i))}function Ze(i){i.key==="Enter"&&(i.preventDefault(),pe())}async function er(){try{n(R,!0),n($,"");let i={};if(e(v).trim())try{i=JSON.parse(e(v))}catch{throw new Error("Invalid JSON in extra specs")}const s={image:e(S)!==o().image?e(S):void 0,flavor:e(T)!==o().flavor?e(T):void 0,max_runners:e(O)!==o().max_runners?e(O):void 0,min_idle_runners:e(P)!==o().min_idle_runners?e(P):void 0,runner_bootstrap_timeout:e(J)!==o().runner_bootstrap_timeout?e(J):void 0,priority:e(M)!==o().priority?e(M):void 0,runner_prefix:e(N)!==o().runner_prefix?e(N):void 0,os_type:e(x)!==o().os_type?e(x):void 0,os_arch:e(y)!==o().os_arch?e(y):void 0,"github-runner-group":e(U)!==o()["github-runner-group"]&&e(U)||void 0,enabled:e(A)!==o().enabled?e(A):void 0,tags:JSON.stringify(e(g))!==JSON.stringify((o().tags||[]).map(l=>l.name||"").filter(Boolean))?e(g):void 0,extra_specs:e(v).trim()!==JSON.stringify(o().extra_specs||{},null,2).trim()?i:void 0};Object.keys(s).forEach(l=>{s[l]===void 0&&delete s[l]}),G("submit",s)}catch(i){n($,Pr(i))}finally{n(R,!1)}}cr(),Tr(We,{$$events:{close:()=>G("close")},children:(i,s)=>{var l=Ir(),z=d(l),ve=d(z),rr=d(ve);t(ve),t(z);var L=a(z,2),fe=d(L);{var tr=r=>{var b=Mr(),j=d(b),C=d(j,!0);t(j),t(b),_(()=>k(C,e($))),m(r,b)};ge(fe,r=>{e($)&&r(tr)})}var F=a(fe,2),me=a(d(F),2),H=d(me),xe=a(d(H),2),ar=d(xe,!0);t(xe),t(H);var ye=a(H,2),_e=a(d(ye),2),dr=d(_e);t(_e),t(ye),t(me),t(F);var K=a(F,2),he=a(d(K),2),W=d(he),ke=a(d(W),2);c(ke),t(W);var q=a(W,2),we=a(d(q),2);c(we),t(q);var Q=a(q,2),V=a(d(Q),2);_(()=>{e(x),He(()=>{})});var X=d(V);X.value=X.__value="linux";var Ee=a(X);Ee.value=Ee.__value="windows",t(V),t(Q);var Re=a(Q,2),Y=a(d(Re),2);_(()=>{e(y),He(()=>{})});var Z=d(Y);Z.value=Z.__value="amd64";var $e=a(Z);$e.value=$e.__value="arm64",t(Y),t(Re),t(he),t(K);var ee=a(K,2),Se=a(d(ee),2),re=d(Se),Te=a(d(re),2);c(Te),t(re);var te=a(re,2),Oe=a(d(te),2);c(Oe),t(te);var Pe=a(te,2),Je=a(d(Pe),2);c(Je),t(Pe),t(Se),t(ee);var ae=a(ee,2),de=a(d(ae),2),oe=d(de),Me=a(d(oe),2);c(Me),t(oe);var ie=a(oe,2),Ne=a(d(ie),2);c(Ne),t(ie);var Ue=a(ie,2),Ae=a(d(Ue),2);c(Ae),t(Ue),t(de);var ne=a(de,2),Ie=d(ne),je=a(d(Ie),2),se=d(je),I=d(se);c(I);var or=a(I,2);t(se);var ir=a(se,2);{var nr=r=>{var b=Ur();wr(b,5,()=>e(g),Er,(j,C,gr)=>{var be=Nr(),Le=d(be),Fe=a(Le);t(be),_(()=>{k(Le,`${e(C)??""} `),Rr(Fe,"aria-label",`Remove tag ${e(C)??""}`)}),w("click",Fe,()=>Ye(gr)),m(j,be)}),t(b),m(r,b)};ge(ir,r=>{e(g),h(()=>e(g).length>0)&&r(nr)})}t(je),t(Ie),t(ne);var le=a(ne,2),Ce=d(le),sr=a(d(Ce),2);Or(sr,{rows:4,placeholder:"{}",get value(){return e(v)},set value(r){n(v,r)},$$legacy:!0}),t(Ce),t(le);var De=a(le,2),Be=d(De);c(Be),mr(2),t(De),t(ae);var Ge=a(ae,2),ze=d(Ge),ue=a(ze,2),lr=d(ue);{var ur=r=>{var b=Ar();m(r,b)},br=r=>{var b=xr("Update Pool");m(r,b)};ge(lr,r=>{e(R)?r(ur):r(br,!1)})}t(ue),t(Ge),t(L),t(l),_((r,b)=>{k(rr,`Update Pool ${D(o()),h(()=>o().id)??""}`),k(ar,(D(o()),h(()=>o().provider_name))),k(dr,`${r??""}: ${b??""}`),ue.disabled=e(R)},[()=>(D(o()),h(()=>Xe(o()))),()=>(D(o()),h(()=>Ve(o())))]),p(ke,()=>e(S),r=>n(S,r)),p(we,()=>e(T),r=>n(T,r)),Ke(V,()=>e(x),r=>n(x,r)),Ke(Y,()=>e(y),r=>n(y,r)),p(Te,()=>e(P),r=>n(P,r)),p(Oe,()=>e(O),r=>n(O,r)),p(Je,()=>e(J),r=>n(J,r)),p(Me,()=>e(N),r=>n(N,r)),p(Ne,()=>e(M),r=>n(M,r)),p(Ae,()=>e(U),r=>n(U,r)),p(I,()=>e(f),r=>n(f,r)),w("keydown",I,Ze),w("click",or,pe),$r(Be,()=>e(A),r=>n(A,r)),w("click",ze,()=>G("close")),w("submit",L,Sr(er)),m(i,l)},$$slots:{default:!0}}),yr(),Qe()}export{Qr as U}; diff --git a/webapp/assets/_app/immutable/chunks/DsX4H4sg.js b/webapp/assets/_app/immutable/chunks/DsX4H4sg.js deleted file mode 100644 index 2a6ba788..00000000 --- a/webapp/assets/_app/immutable/chunks/DsX4H4sg.js +++ /dev/null @@ -1,3 +0,0 @@ -import{I as ke,o as De,aR as T,g as P,s as x,bf as mt,aS as $e}from"./D8EpLgQ1.js";import{p as yt,e as wt}from"./6_PqUCmb.js";import{a as vt,b as L}from"./D3_ugSUS.js";class le{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ee{constructor(t,n){this.status=t,this.location=n}}class Se extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function bt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function At(e){return e.split("%25").map(decodeURI).join("%25")}function kt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function _e({href:e}){return e.split("#")[0]}function Et(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const l=Reflect.get(i,o);return typeof l=="function"?l.bind(i):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function St(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Rt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Re(e)),It(e,t));const G=new Map;function Ut(e,t){const n=Re(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&G.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Rt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Re(e,n),a=G.get(r);if(a){if(performance.now(){const{pattern:g,params:u}=yt(o),c={id:o,exec:h=>{const m=g.exec(h);if(m)return wt(m,u,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...f||[]].map(i),leaf:s(l)};return c.errors.length=c.layouts.length=Math.max(c.errors.length,c.layouts.length),c});function s(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function We(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Be(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const Pt="1755518451537",ze="sveltekit:snapshot",Xe="sveltekit:scroll",Ze="sveltekit:states",xt="sveltekit:pageurl",V="sveltekit:history",J="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Z=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Z&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function te(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=Qe(o);function l(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(s),replace_state:l(i)}}function Fe(e){const t=ke(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&i(o=l)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=ke(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${vt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Pt;return i&&(e(!0),tt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Z||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function wn(e){}function qe(e){const t=Ct(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const jt=-1,Dt=-2,$t=-3,Bt=-4,Vt=-5,Ft=-6;function qt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===jt)return;if(s===$t)return NaN;if(s===Bt)return 1/0;if(s===Vt)return-1/0;if(s===Ft)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const l=o[0],f=t?.[l];if(f)return r[s]=f(a(o[1]));switch(l){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let c=1;ct!=null)}const Ht="x-sveltekit-invalidated",Kt="x-sveltekit-trailing-slash";function ne(e){return e instanceof le||e instanceof Se?e.status:500}function Yt(e){return e instanceof Se?e.text:"Internal Error"}let E,W,me;const Jt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString());Jt?(E={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},me={current:!1}):(E=new class{#e=T({});get data(){return P(this.#e)}set data(t){x(this.#e,t)}#t=T(null);get form(){return P(this.#t)}set form(t){x(this.#t,t)}#n=T(null);get error(){return P(this.#n)}set error(t){x(this.#n,t)}#r=T({});get params(){return P(this.#r)}set params(t){x(this.#r,t)}#a=T({id:null});get route(){return P(this.#a)}set route(t){x(this.#a,t)}#o=T({});get state(){return P(this.#o)}set state(t){x(this.#o,t)}#s=T(-1);get status(){return P(this.#s)}set status(t){x(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return P(this.#i)}set url(t){x(this.#i,t)}},W=new class{#e=T(null);get current(){return P(this.#e)}set current(t){x(this.#e,t)}},me=new class{#e=T(!1);get current(){return P(this.#e)}set current(t){x(this.#e,t)}},tt.v=()=>me.current=!0);function Wt(e){Object.assign(E,e)}const zt="/__data.json",Xt=".html__data.json";function Zt(e){return e.endsWith(".html")?e.replace(/\.html$/,Xt):e.replace(/\/$/,"")+zt}const{tick:Qt}=mt,en=new Set(["icon","shortcut icon","apple-touch-icon"]),$=We(Xe)??{},z=We(ze)??{},C={url:Fe({}),page:Fe({}),navigating:ke(null),updated:Nt()};function Ue(e){$[e]=fe()}function tn(e,t){let n=e+1;for(;$[n];)delete $[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function q(e){return location.href=e.href,new Promise(()=>{})}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Me(){}let Le,ve,re,N,be,v;globalThis.__sveltekit_1rdr8fy.data;const ae=[],oe=[];let O=null;const ee=new Map,at=new Set,nn=new Set,H=new Set;let w={branch:[],error:null,url:null},Te=!1,se=!1,Ge=!0,X=!1,M=!1,ot=!1,Pe=!1,st,A,I,D;const K=new Set,He=new Map;async function kn(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Le=Tt(e),N=document.documentElement,be=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),A=history.state?.[V],I=history.state?.[J],A||(A=I=Date.now(),history.replaceState({...history.state,[V]:A,[J]:I},""));const r=$[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await hn(be,n)):(await Y({type:"enter",url:Ie(v.hash?gn(new URL(location.href)):location.href),replace_state:!0}),a()),dn()}function rn(){ae.length=0,Pe=!1}function it(e){oe.some(t=>t?.snapshot)&&(z[e]=oe.map(t=>t?.snapshot?.capture()))}function ct(e){z[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function Ke(){Ue(A),Be(Xe,$),it(I),Be(ze,z)}async function xe(e,t,n,r){let a;const s=await Y({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...He.keys()]),t.invalidate&&t.invalidate.forEach(un)}});return t.invalidateAll&&$e().then($e).then(()=>{He.forEach(({resource:i},o)=>{a?.includes(o)&&i.refresh?.()})}),s}async function an(e){if(e.id!==O?.id){const t={};K.add(t),O={id:e.id,token:t,promise:ut({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(O=null),n))}}return O.promise}async function ye(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function lt(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(E,e.props.page),st=new v.root({target:t,props:{...e.props,stores:C,components:oe},hydrate:n,sync:!1}),ct(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(s=>s(a))}se=!0}function ie({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(L&&(e.pathname===L||e.pathname===L+"/"))o="always";else for(const c of n)c?.slash!==void 0&&(o=c.slash);e.pathname=bt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Gt(n).map(c=>c.node.component),page:je(E)}};i!==void 0&&(l.props.form=i);let f={},d=!E,g=0;for(let c=0;c(o&&(l.route=!0),u[c])}),params:new Proxy(r,{get:(u,c)=>(o&&l.params.add(c),u[c])}),data:s?.data??null,url:Et(n,()=>{o&&(l.url=!0)},u=>{o&&l.search_params.add(u)},v.hash),async fetch(u,c){u instanceof Request&&(c={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...c});const{resolved:h,promise:m}=ft(u,c,n);return o&&d(h.href),m},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,g)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:l}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function ft(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=se?Lt(r,a.href,t):Ut(r,t);return{resolved:a,promise:s}}function Ye(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(ae.some(o=>o(new URL(i))))return!0;return!1}function Oe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function on(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function Je({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(E),constructors:[]}}}async function ut({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(O?.id===e)return K.delete(O.token),O.promise;const{errors:i,layouts:o,leaf:l}=a,f=[...o,l];i.forEach(p=>p?.().catch(()=>{})),f.forEach(p=>p?.[1]().catch(()=>{}));let d=null;const g=w.url?e!==ce(w.url):!1,u=w.route?a.id!==w.route.id:!1,c=on(w.url,n);let h=!1;const m=f.map((p,y)=>{const b=w.branch[y],k=!!p?.[0]&&(b?.loader!==p[1]||Ye(h,u,g,c,b.server?.uses,r));return k&&(h=!0),k});if(m.some(Boolean)){try{d=await pt(n,m)}catch(p){const y=await F(p,{url:n,params:r,route:{id:e}});return K.has(s)?Je({error:y,url:n,params:r,route:a}):de({status:ne(p),error:y,url:n,route:a})}if(d.type==="redirect")return d}const _=d?.nodes;let R=!1;const S=f.map(async(p,y)=>{if(!p)return;const b=w.branch[y],k=_?.[y];if((!k||k.type==="skip")&&p[1]===b?.loader&&!Ye(R,u,g,c,b.universal?.uses,r))return b;if(R=!0,k?.type==="error")throw k;return Ne({loader:p[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge{});const U=[];for(let p=0;pPromise.resolve({}),server_data_node:Oe(s)}),l={node:await re(),loader:re,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,l],status:e,error:t,route:null})}catch(o){if(o instanceof Ee)return xe(new URL(o.location,location.href),{},0);throw o}}async function cn(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ft(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,L,v.hash)){const n=await cn(e);if(!n)return;const r=ln(n);for(const a of Le){const s=a.exec(r);if(s)return{id:ce(e),invalidating:t,route:a,params:kt(s),url:e}}}}function ln(e){return At(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r}){let a=!1;const s=Ce(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return X||at.forEach(o=>o(i)),a?null:s}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:l={},accept:f=Me,block:d=Me}){const g=D;D=l;const u=await he(t,!1),c=e==="enter"?Ce(w,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u});if(!c){d(),D===l&&(D=g);return}const h=A,m=I;f(),X=!0,se&&c.navigation.type!=="enter"&&C.navigating.set(W.current=c.navigation);let _=u&&await ut(u);if(!_){if(ue(t,L,v.hash))return await q(t);_=await ht(t,{id:null},await F(new Se(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,D!==l)return c.reject(new Error("navigation aborted")),!1;if(_.type==="redirect")if(o>=20)_=await de({status:500,error:await F(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await xe(new URL(_.location,t).href,{},o+1,l),!1;else _.props.page.status>=400&&await C.updated.check()&&(await rt(),await q(t));if(rn(),Ue(h),it(m),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const p=s?0:1,y={[V]:A+=p,[J]:I+=p,[Ze]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||tn(A,I)}if(O=null,_.props.page.state=i,se){const p=(await Promise.all(Array.from(nn,y=>y(c.navigation)))).filter(y=>typeof y=="function");if(p.length>0){let y=function(){p.forEach(b=>{H.delete(b)})};p.push(y),p.forEach(b=>{H.add(b)})}w=_.state,_.props.page&&(_.props.page.url=t),st.$set(_.props),Wt(_.props.page),ot=!0}else lt(_,be,!1);const{activeElement:R}=document;await Qt();const S=n?n.scroll:a?fe():null;if(Ge){const p=t.hash&&document.getElementById(_t(t));S?scrollTo(S.x,S.y):p?p.scrollIntoView():scrollTo(0,0)}const U=document.activeElement!==R&&document.activeElement!==document.body;!r&&!U&&pn(t),Ge=!0,_.props.page&&Object.assign(E,_.props.page),X=!1,e==="popstate"&&ct(I),c.fulfil(void 0),H.forEach(p=>p(c.navigation)),C.navigating.set(W.current=null)}async function ht(e,t,n,r){return e.origin===Z&&e.pathname===location.pathname&&!Te?await de({status:r,error:n,url:e,route:t}):await q(e)}function fn(){let e,t,n;N.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{s(l,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}N.addEventListener("mousedown",r),N.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function s(o,l){const f=et(o,N),d=f===t&&l>=n;if(!f||d)return;const{url:g,external:u,download:c}=we(f,L,v.hash);if(u||c)return;const h=te(f),m=g&&ce(w.url)===ce(g);if(!(h.reload||m))if(l<=h.preload_data){t=f,n=j.tap;const _=await he(g,!1);if(!_)return;an(_)}else l<=h.preload_code&&(t=f,n=l,ye(g))}function i(){a.disconnect();for(const o of N.querySelectorAll("a")){const{url:l,external:f,download:d}=we(o,L,v.hash);if(f||d)continue;const g=te(o);g.reload||(g.preload_code===j.viewport&&a.observe(o),g.preload_code===j.eager&&ye(l))}}H.add(i),i()}function F(e,t){if(e instanceof le)return e.body;const n=ne(e),r=Yt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function En(e,t={}){return e=new URL(Ie(e)),e.origin!==Z?Promise.reject(new Error("goto: invalid URL")):xe(e,t,0)}function un(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function dn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ke(),!X){const r=Ce(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ke()}),navigator.connection?.saveData||fn(),N.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],N);if(!n)return;const{url:r,external:a,target:s,download:i}=we(n,L,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=te(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),g=f===_e(location);if(a||o.reload&&(!g||!d)){dt({url:r,type:"link"})?X=!0:t.preventDefault();return}if(d!==void 0&&g){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const c=n.ownerDocument.getElementById(decodeURIComponent(d));c&&(c.scrollIntoView(),c.focus())}return}if(M=!0,Ue(A),e(r),!o.replace_state)return;M=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await Y({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),N.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,L,!1))return;const o=t.target,l=te(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o),d=r?.getAttribute("name");d&&f.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(f).toString(),Y({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Ae){if(t.state?.[V]){const n=t.state[V];if(D={},n===A)return;const r=$[n],a=t.state[Ze]??{},s=new URL(t.state[xt]??location.href),i=t.state[J],o=w.url?_e(location)===_e(w.url):!1;if(i===I&&(ot||o)){a!==E.state&&(E.state=a),e(s),$[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,I=i},block:()=>{history.go(-f)},nav_token:D})}else if(!M){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[V]:++A,[J]:I},"",location.href))});for(const t of document.querySelectorAll("link"))en.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(W.current=null)});function e(t){w.url=E.url=t,C.page.set(je(E)),C.page.notify()}}async function hn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:l}){Te=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Le.find(({id:c})=>c===s.id);let g,u=!0;try{const c=r.map(async(m,_)=>{const R=o[_];return R?.uses&&(R.uses=gt(R.uses)),Ne({loader:v.nodes[m],url:f,params:a,route:s,parent:async()=>{const S={};for(let U=0;U<_;U+=1)Object.assign(S,(await c[U]).data);return S},server_data_node:Oe(R)})}),h=await Promise.all(c);if(d){const m=d.layouts;for(let _=0;_s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new le(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),l=new TextDecoder;function f(g){return qt(g,{...v.decoders,Promise:u=>new Promise((c,h)=>{i.set(u,{fulfil:c,reject:h})})})}let d="";for(;;){const{done:g,value:u}=await o.read();if(g&&!d)break;for(d+=!u&&d?` -`:l.decode(u,{stream:!0});;){const c=d.indexOf(` -`);if(c===-1)break;const h=JSON.parse(d.slice(0,c));if(d=d.slice(c+1),h.type==="redirect")return s(h);if(h.type==="data")h.nodes?.forEach(m=>{m?.type==="data"&&(m.uses=gt(m.uses),m.data=f(m.data))}),s(h);else if(h.type==="chunk"){const{id:m,data:_,error:R}=h,S=i.get(m);i.delete(m),R?S.reject(f(R)):S.fulfil(f(_))}}}})}function gt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ae=!1;function pn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=_t(e);if(n&&document.getElementById(n)){const{x:a,y:s}=fe();setTimeout(()=>{const i=history.state;Ae=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ae=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s{if(r.rangeCount===a.length){for(let s=0;s{a=l,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function gn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function _t(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{kn as a,En as g,wn as l,E as p,C as s}; diff --git a/webapp/assets/_app/immutable/chunks/DxQgLoe9.js b/webapp/assets/_app/immutable/chunks/DxQgLoe9.js deleted file mode 100644 index c51d027b..00000000 --- a/webapp/assets/_app/immutable/chunks/DxQgLoe9.js +++ /dev/null @@ -1 +0,0 @@ -import"./DsnmJJEf.js";import{i as K}from"./B3Pzt0F_.js";import{p as O,f as U,j as e,r as t,k as r,n as m,u as o,z as et,t as q,v as p,c as h,d as Q,E as ct,D as mt,B as Y,b as Z,g as P}from"./D8EpLgQ1.js";import{p as T,i as G,s as ut,a as pt}from"./5WA7h8uK.js";import{c as at,B as gt}from"./CiE1LlKV.js";import{b as R,B as H,e as xt}from"./D5ucq3Gx.js";import{b as ft}from"./D3_ugSUS.js";import{e as yt}from"./wyaP0EDu.js";import{D as ht,G as tt}from"./B_CZMFLe.js";import{E as _t}from"./C9H3KoyH.js";import{S as bt}from"./dB1NgJWc.js";import{e as kt,i as wt}from"./u94nIB4-.js";import{b as Ct}from"./BAg1iRPq.js";var Pt=U('

ID
Created At
Updated At
Status
Pool Balancer Type
');function Wt(L,v){O(v,!1);let a=T(v,"entity",8),g=T(v,"entityType",8);function N(){return`${g().charAt(0).toUpperCase()+g().slice(1)} Information`}function n(){if(!a().endpoint?.base_url)return"#";switch(g()){case"repository":const d=a();return`${a().endpoint.base_url}/${d.owner}/${a().name}`;case"organization":return`${a().endpoint.base_url}/${a().name}`;case"enterprise":return`${a().endpoint.base_url}/enterprises/${a().name}`;default:return"#"}}function E(){return`${g().charAt(0).toUpperCase()+g().slice(1)} URL`}function V(){const d=a().pool_balancing_type;if(!d||d===""||d==="none")return"Round Robin (default)";switch(d){case"roundrobin":return"Round Robin";case"pack":return"Pack";default:return d}}K();var c=Pt(),x=e(c),_=e(x),I=e(_,!0);t(_);var b=r(_,2),i=e(b),f=r(e(i),2),k=e(f,!0);t(f),t(i);var u=r(i,2),D=r(e(u),2),M=e(D,!0);t(D),t(u);var w=r(u,2),S=r(e(w),2),$=e(S,!0);t(S),t(w);var s=r(w,2),C=r(e(s),2),l=e(C);{var j=d=>{H(d,{variant:"success",text:"Running"})},z=d=>{H(d,{variant:"error",text:"Stopped"})};G(l,d=>{m(a()),o(()=>a().pool_manager_status?.running)?d(j):d(z,!1)})}t(C),t(s);var B=r(s,2),A=r(e(B),2),y=e(A,!0);t(A),t(B);var W=r(B,2),F=e(W),rt=e(F,!0);t(F);var X=r(F,2),J=e(X),st=e(J);et(),t(J),t(X),t(W),t(b),t(x),t(c),q((d,ot,it,dt,nt,lt,vt)=>{p(I,d),p(k,(m(a()),o(()=>a().id))),p(M,ot),p($,it),p(y,dt),p(rt,nt),at(J,"href",lt),p(st,`${vt??""} `)},[()=>o(N),()=>(m(R),m(a()),o(()=>R(a().created_at))),()=>(m(R),m(a()),o(()=>R(a().updated_at))),()=>o(V),()=>o(E),()=>o(n),()=>o(n)]),h(L,c),Q()}var Tt=U('

No pools configured

'),Et=U('');function qt(L,v){O(v,!1);const[a,g]=ut(),N=()=>pt(yt,"$eagerCache",a);let n=T(v,"pools",8),E=T(v,"entityType",8),V=T(v,"entityId",8,""),c=T(v,"entityName",8,"");const x=ct();function _(){x("addPool",{entityType:E(),entityId:V(),entityName:c()})}const I=[{key:"id",title:"ID",flexible:!0,cellComponent:_t,cellProps:{entityType:"pool",showId:!0,fontMono:!0}},{key:"image",title:"Image",flexible:!0,cellComponent:tt,cellProps:{field:"image",type:"code",showTitle:!0}},{key:"provider",title:"Provider",cellComponent:tt,cellProps:{field:"provider_name"}},{key:"status",title:"Status",cellComponent:bt,cellProps:{statusType:"enabled"}}],b={entityType:"pool",primaryText:{field:"id",isClickable:!0,href:"/pools/{id}",useId:!0,isMonospace:!0},secondaryText:{field:"entity_name",computedValue:s=>xt(s,N())},badges:[{type:"custom",value:s=>({variant:s.enabled?"success":"error",text:s.enabled?"Enabled":"Disabled"})}]};K();var i=Et(),f=e(i),k=e(f),u=e(k),D=e(u);t(u);var M=r(u,2);t(k);var w=r(k,2);{var S=s=>{var C=Tt(),l=r(e(C),4),j=e(l);t(l);var z=r(l,2),B=e(z);gt(B,{variant:"primary",size:"sm",$$events:{click:_},children:(A,y)=>{et();var W=mt("Add Pool");h(A,W)},$$slots:{default:!0}}),t(z),t(C),q(()=>p(j,`No pools configured for this ${E()??""}.`)),h(s,C)},$=s=>{ht(s,{get columns(){return I},get data(){return n()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return m(n()),o(()=>n().length)},totalPages:1,get totalItems(){return m(n()),o(()=>n().length)},itemName:"pools",emptyTitle:"No pools configured",get emptyMessage(){return`No pools configured for this ${E()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return b}})};G(w,s=>{m(n()),o(()=>n().length===0)?s(S):s($,!1)})}t(f),t(i),q(()=>{p(D,`Pools (${m(n()),o(()=>n().length)??""})`),at(M,"href",`${ft}/pools`)}),h(L,i),Q(),g()}var It=U('

'),Bt=U('

Events

'),Nt=U('

Events

No events available

');function Ft(L,v){O(v,!1);let a=T(v,"events",8),g=T(v,"eventsContainer",12,void 0);K();var N=Y(),n=Z(N);{var E=c=>{var x=Bt(),_=e(x),I=r(e(_),2);kt(I,5,a,wt,(b,i)=>{var f=It(),k=e(f),u=e(k),D=e(u,!0);t(u);var M=r(u,2),w=e(M);{var S=l=>{H(l,{variant:"error",text:"Error"})},$=l=>{var j=Y(),z=Z(j);{var B=y=>{H(y,{variant:"warning",text:"Warning"})},A=y=>{H(y,{variant:"info",text:"Info"})};G(z,y=>{P(i),o(()=>(P(i).event_level||"info").toLowerCase()==="warning")?y(B):y(A,!1)},!0)}h(l,j)};G(w,l=>{P(i),o(()=>(P(i).event_level||"info").toLowerCase()==="error")?l(S):l($,!1)})}var s=r(w,2),C=e(s,!0);t(s),t(M),t(k),t(f),q(l=>{p(D,(P(i),o(()=>P(i).message))),p(C,l)},[()=>(m(R),P(i),o(()=>R(P(i).created_at)))]),h(b,f)}),t(I),Ct(I,b=>g(b),()=>g()),t(_),t(x),h(c,x)},V=c=>{var x=Nt();h(c,x)};G(n,c=>{m(a()),o(()=>a()&&a().length>0)?c(E):c(V,!1)})}h(L,N),Q()}export{Wt as E,qt as P,Ft as a}; diff --git a/webapp/assets/_app/immutable/chunks/KQ2xQpA3.js b/webapp/assets/_app/immutable/chunks/Dxyf9P7U.js similarity index 86% rename from webapp/assets/_app/immutable/chunks/KQ2xQpA3.js rename to webapp/assets/_app/immutable/chunks/Dxyf9P7U.js index c94aef62..2c48dc7a 100644 --- a/webapp/assets/_app/immutable/chunks/KQ2xQpA3.js +++ b/webapp/assets/_app/immutable/chunks/Dxyf9P7U.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as q}from"./B3Pzt0F_.js";import{p as A,E as F,f as y,k as l,j as e,r as a,z as $,D as b,c as o,t as p,v as n,d as G}from"./D8EpLgQ1.js";import{p as v,i as H}from"./5WA7h8uK.js";import{M as I}from"./qB7B8uiS.js";import{B as w}from"./CiE1LlKV.js";var J=y('

'),K=y('

');function W(D,s){A(s,!1);let j=v(s,"title",8),M=v(s,"message",8),g=v(s,"itemName",8,""),d=v(s,"loading",8,!1);const c=F();function B(){c("confirm")}q(),I(D,{$$events:{close:()=>c("close")},children:(C,O)=>{var m=K(),f=l(e(m),2),u=e(f),P=e(u,!0);a(u);var h=l(u,2),x=e(h),z=e(x,!0);a(x);var E=l(x,2);{var L=t=>{var i=J(),r=e(i,!0);a(i),p(()=>n(r,g())),o(t,i)};H(E,t=>{g()&&t(L)})}a(h),a(f);var _=l(f,2),k=e(_);w(k,{variant:"secondary",get disabled(){return d()},$$events:{click:()=>c("close")},children:(t,i)=>{$();var r=b("Cancel");o(t,r)},$$slots:{default:!0}});var N=l(k,2);w(N,{variant:"danger",get disabled(){return d()},get loading(){return d()},$$events:{click:B},children:(t,i)=>{$();var r=b();p(()=>n(r,d()?"Deleting...":"Delete")),o(t,r)},$$slots:{default:!0}}),a(_),a(m),p(()=>{n(P,j()),n(z,M())}),o(C,m)},$$slots:{default:!0}}),G()}export{W as D}; +import"./DsnmJJEf.js";import{i as q}from"./zNh6Oe5P.js";import{p as A,E as F,f as y,k as l,j as e,r as a,z as $,D as b,c as o,t as p,v as n,d as G}from"./sWNKMed7.js";import{p as v,i as H}from"./Ccl3fNd2.js";import{M as I}from"./-99ewtnX.js";import{B as w}from"./t8NOL8UT.js";var J=y('

'),K=y('

');function W(D,s){A(s,!1);let j=v(s,"title",8),M=v(s,"message",8),g=v(s,"itemName",8,""),d=v(s,"loading",8,!1);const c=F();function B(){c("confirm")}q(),I(D,{$$events:{close:()=>c("close")},children:(C,O)=>{var m=K(),f=l(e(m),2),u=e(f),P=e(u,!0);a(u);var h=l(u,2),x=e(h),z=e(x,!0);a(x);var E=l(x,2);{var L=t=>{var i=J(),r=e(i,!0);a(i),p(()=>n(r,g())),o(t,i)};H(E,t=>{g()&&t(L)})}a(h),a(f);var _=l(f,2),k=e(_);w(k,{variant:"secondary",get disabled(){return d()},$$events:{click:()=>c("close")},children:(t,i)=>{$();var r=b("Cancel");o(t,r)},$$slots:{default:!0}});var N=l(k,2);w(N,{variant:"danger",get disabled(){return d()},get loading(){return d()},$$events:{click:B},children:(t,i)=>{$();var r=b();p(()=>n(r,d()?"Deleting...":"Delete")),o(t,r)},$$slots:{default:!0}}),a(_),a(m),p(()=>{n(P,j()),n(z,M())}),o(C,m)},$$slots:{default:!0}}),G()}export{W as D}; diff --git a/webapp/assets/_app/immutable/chunks/G-ddPbA8.js b/webapp/assets/_app/immutable/chunks/G-ddPbA8.js deleted file mode 100644 index 546e4c12..00000000 --- a/webapp/assets/_app/immutable/chunks/G-ddPbA8.js +++ /dev/null @@ -1 +0,0 @@ -import"./DsnmJJEf.js";import{i as U}from"./B3Pzt0F_.js";import{f as I,j as t,k as p,r as a,t as P,v as b,c as u,z as N,D as A,p as W,u as z,n as H,d as X}from"./D8EpLgQ1.js";import{p as s,i as T}from"./5WA7h8uK.js";import{s as Y,h as Z,B as F,c as $}from"./CiE1LlKV.js";import{b as ee}from"./D3_ugSUS.js";import{D as te,G as ae,a as se}from"./B_CZMFLe.js";import{E as ne}from"./C9H3KoyH.js";import{S as B}from"./dB1NgJWc.js";var le=I('
'),ie=I('
'),re=I('

');function ye(L,e){let n=s(e,"title",8),S=s(e,"subtitle",8),_=s(e,"forgeIcon",8,""),f=s(e,"onEdit",8,null),h=s(e,"onDelete",8,null),k=s(e,"editLabel",8,"Edit"),j=s(e,"deleteLabel",8,"Delete"),g=s(e,"titleClass",8,"");var c=re(),v=t(c),m=t(v),y=t(m),C=t(y);{var E=i=>{var r=le(),w=t(r);Z(w,_),a(r),u(i,r)};T(C,i=>{_()&&i(E)})}var l=p(C,2),D=t(l),G=t(D,!0);a(D);var M=p(D,2),V=t(M,!0);a(M),a(l),a(y);var R=p(y,2);{var q=i=>{var r=ie(),w=t(r);{var J=o=>{F(o,{variant:"secondary",size:"md",icon:"",$$events:{click(...d){f()?.apply(this,d)}},children:(d,Q)=>{N();var x=A();P(()=>b(x,k())),u(d,x)},$$slots:{default:!0}})};T(w,o=>{f()&&o(J)})}var K=p(w,2);{var O=o=>{F(o,{variant:"danger",size:"md",icon:"",$$events:{click(...d){h()?.apply(this,d)}},children:(d,Q)=>{N();var x=A();P(()=>b(x,j())),u(d,x)},$$slots:{default:!0}})};T(K,o=>{h()&&o(O)})}a(r),u(i,r)};T(R,i=>{(f()||h())&&i(q)})}a(m),a(v),a(c),P(()=>{Y(D,1,`text-2xl font-bold text-gray-900 dark:text-white ${g()??""}`),b(G,n()),b(V,S())}),u(L,c)}var oe=I('');function xe(L,e){W(e,!1);let n=s(e,"instances",8),S=s(e,"entityType",8),_=s(e,"onDeleteInstance",8);const f=[{key:"name",title:"Name",cellComponent:ne,cellProps:{entityType:"instance",nameField:"name"}},{key:"status",title:"Status",cellComponent:B,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:B,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"created",title:"Created",cellComponent:ae,cellProps:{field:"created_at",type:"date"}},{key:"actions",title:"Actions",align:"right",cellComponent:se,cellProps:{actions:[{type:"delete",label:"Delete",title:"Delete instance",ariaLabel:"Delete instance",action:"delete"}]}}],h={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"}],actions:[{type:"delete",handler:l=>k(l)}]};function k(l){_()(l)}function j(l){k(l.detail.item)}U();var g=oe(),c=t(g),v=t(c),m=t(v),y=t(m);a(m);var C=p(m,2);a(v);var E=p(v,2);te(E,{get columns(){return f},get data(){return n()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return H(n()),z(()=>n().length)},totalPages:1,get totalItems(){return H(n()),z(()=>n().length)},itemName:"instances",emptyTitle:"No instances running",get emptyMessage(){return`No instances running for this ${S()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return h},$$events:{delete:j}}),a(c),a(g),P(()=>{b(y,`Instances (${H(n()),z(()=>n().length)??""})`),$(C,"href",`${ee}/instances`)}),u(L,g),X()}export{ye as D,xe as I}; diff --git a/webapp/assets/_app/immutable/chunks/MfZe8e4a.js b/webapp/assets/_app/immutable/chunks/MfZe8e4a.js new file mode 100644 index 00000000..ddfe2ed1 --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/MfZe8e4a.js @@ -0,0 +1 @@ +import"./DsnmJJEf.js";import{i as b}from"./zNh6Oe5P.js";import{p as k,f as E,t as C,u as i,n as t,v as n,c as j,d as P,k as z,j as l,r as o}from"./sWNKMed7.js";import{c as N}from"./t8NOL8UT.js";import{p as f}from"./Ccl3fNd2.js";import{j as x,e as c,i as u}from"./Cbkm53HO.js";var T=E('');function F(d,r){k(r,!1);let e=f(r,"item",8),m=f(r,"eagerCache",8,null);b();var s=T(),a=l(s),v=l(a,!0);o(a);var p=z(a,2),g=l(p,!0);o(p),o(s),C((h,y,_)=>{N(a,"href",h),n(v,y),n(g,_)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),j(d,s),P()}export{F as P}; diff --git a/webapp/assets/_app/immutable/chunks/wyaP0EDu.js b/webapp/assets/_app/immutable/chunks/UPGsoYWO.js similarity index 98% rename from webapp/assets/_app/immutable/chunks/wyaP0EDu.js rename to webapp/assets/_app/immutable/chunks/UPGsoYWO.js index 7650f5b9..66e52932 100644 --- a/webapp/assets/_app/immutable/chunks/wyaP0EDu.js +++ b/webapp/assets/_app/immutable/chunks/UPGsoYWO.js @@ -1 +1 @@ -import{I as p,J as l}from"./D8EpLgQ1.js";import{g as d}from"./CiE1LlKV.js";import{w as r}from"./u94nIB4-.js";const f={repositories:[],organizations:[],enterprises:[],pools:[],scalesets:[],credentials:[],endpoints:[],controllerInfo:null,loading:{repositories:!1,organizations:!1,enterprises:!1,pools:!1,scalesets:!1,credentials:!1,endpoints:!1,controllerInfo:!1},loaded:{repositories:!1,organizations:!1,enterprises:!1,pools:!1,scalesets:!1,credentials:!1,endpoints:!1,controllerInfo:!1},errorMessages:{repositories:"",organizations:"",enterprises:"",pools:"",scalesets:"",credentials:"",endpoints:"",controllerInfo:""}},a=p(f);class u{unsubscribers=[];loadingPromises=new Map;retryAttempts=new Map;MAX_RETRIES=3;RETRY_DELAY_MS=1e3;websocketStatusUnsubscriber=null;async loadResource(e,t=!1){if(this.loadingPromises.has(e))return this.loadingPromises.get(e);a.update(o=>({...o,loading:{...o.loading,[e]:!0},errorMessages:{...o.errorMessages,[e]:""}}));const s=this.attemptLoad(e);this.loadingPromises.set(e,s);try{const o=await s;return a.update(n=>({...n,[e]:o,loading:{...n.loading,[e]:!1},loaded:{...n.loaded,[e]:!0},errorMessages:{...n.errorMessages,[e]:""}})),this.retryAttempts.delete(e),t&&this.startBackgroundLoading(e),o}catch(o){const n=o instanceof Error?o.message:"Failed to load data";throw a.update(i=>({...i,loading:{...i.loading,[e]:!1},errorMessages:{...i.errorMessages,[e]:n}})),console.error(`Failed to load ${e}:`,o),o}finally{this.loadingPromises.delete(e)}}async attemptLoad(e){const t=(this.retryAttempts.get(e)||0)+1;this.retryAttempts.set(e,t);try{let s;switch(e){case"repositories":s=d.listRepositories();break;case"organizations":s=d.listOrganizations();break;case"enterprises":s=d.listEnterprises();break;case"pools":s=d.listAllPools();break;case"scalesets":s=d.listScaleSets();break;case"credentials":s=d.listAllCredentials();break;case"endpoints":s=d.listAllEndpoints();break;case"controllerInfo":s=d.getControllerInfo();break;default:throw new Error(`Unknown resource type: ${e}`)}return await s}catch(s){if(tsetTimeout(n,o)),this.attemptLoad(e)}else throw console.error(`All ${this.MAX_RETRIES} attempts failed for ${e}:`,s),s}}async startBackgroundLoading(e){const s=["repositories","organizations","enterprises","pools","scalesets","credentials","endpoints"].filter(o=>o!==e);for(const o of s)setTimeout(()=>{this.loadResource(o,!1).catch(n=>{console.warn(`Background loading failed for ${o}:`,n)})},100*s.indexOf(o))}retryResource(e){return this.retryAttempts.delete(e),this.loadResource(e,!0)}setupWebSocketSubscriptions(){this.cleanup();const e=[r.subscribeToEntity("repository",["create","update","delete"],this.handleRepositoryEvent.bind(this)),r.subscribeToEntity("organization",["create","update","delete"],this.handleOrganizationEvent.bind(this)),r.subscribeToEntity("enterprise",["create","update","delete"],this.handleEnterpriseEvent.bind(this)),r.subscribeToEntity("pool",["create","update","delete"],this.handlePoolEvent.bind(this)),r.subscribeToEntity("scaleset",["create","update","delete"],this.handleScaleSetEvent.bind(this)),r.subscribeToEntity("controller",["update"],this.handleControllerEvent.bind(this)),r.subscribeToEntity("github_credentials",["create","update","delete"],this.handleCredentialsEvent.bind(this)),r.subscribeToEntity("gitea_credentials",["create","update","delete"],this.handleCredentialsEvent.bind(this)),r.subscribeToEntity("github_endpoint",["create","update","delete"],this.handleEndpointEvent.bind(this))];this.unsubscribers=e,this.setupWebSocketStatusMonitoring()}setupWebSocketStatusMonitoring(){this.websocketStatusUnsubscriber&&this.websocketStatusUnsubscriber();let e=!1;this.websocketStatusUnsubscriber=r.subscribe(t=>{t.connected&&!e&&(console.log("[EagerCache] WebSocket connected - reinitializing cache"),this.initializeAllResources()),e=t.connected})}async initializeAllResources(){const t=["repositories","organizations","enterprises","pools","scalesets","credentials","endpoints","controllerInfo"].map(s=>this.loadResource(s,!0).catch(o=>{console.warn(`Failed to reload ${s} on WebSocket reconnect:`,o)}));await Promise.allSettled(t)}handleRepositoryEvent(e){a.update(t=>{if(!t.loaded.repositories)return t;const s=[...t.repositories],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,repositories:s}})}handleOrganizationEvent(e){a.update(t=>{if(!t.loaded.organizations)return t;const s=[...t.organizations],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,organizations:s}})}handleEnterpriseEvent(e){a.update(t=>{if(!t.loaded.enterprises)return t;const s=[...t.enterprises],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,enterprises:s}})}handlePoolEvent(e){a.update(t=>{if(!t.loaded.pools)return t;const s=[...t.pools],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,pools:s}})}handleScaleSetEvent(e){a.update(t=>{if(!t.loaded.scalesets)return t;const s=[...t.scalesets],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,scalesets:s}})}handleCredentialsEvent(e){a.update(t=>{if(!t.loaded.credentials)return t;const s=[...t.credentials],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,credentials:s}})}handleEndpointEvent(e){a.update(t=>{if(!t.loaded.endpoints)return t;const s=[...t.endpoints],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.name===o.name);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.name:o,i=s.findIndex(c=>c.name===n);i!==-1&&s.splice(i,1)}return{...t,endpoints:s}})}cleanup(){this.unsubscribers.forEach(e=>e()),this.unsubscribers=[],this.websocketStatusUnsubscriber&&(this.websocketStatusUnsubscriber(),this.websocketStatusUnsubscriber=null)}shouldUseCache(){return l(r).connected}async getRepositories(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching repositories directly from API"),await d.listRepositories();const t=l(a);return t.loaded.repositories?t.repositories:this.loadResource("repositories",!0)}async getOrganizations(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching organizations directly from API"),await d.listOrganizations();const t=l(a);return t.loaded.organizations?t.organizations:this.loadResource("organizations",!0)}async getEnterprises(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching enterprises directly from API"),await d.listEnterprises();const t=l(a);return t.loaded.enterprises?t.enterprises:this.loadResource("enterprises",!0)}async getPools(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching pools directly from API"),await d.listAllPools();const t=l(a);return t.loaded.pools?t.pools:this.loadResource("pools",!0)}async getScaleSets(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching scalesets directly from API"),await d.listScaleSets();const t=l(a);return t.loaded.scalesets?t.scalesets:this.loadResource("scalesets",!0)}async getCredentials(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching credentials directly from API"),await d.listAllCredentials();const t=l(a);return t.loaded.credentials?t.credentials:this.loadResource("credentials",!0)}async getEndpoints(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching endpoints directly from API"),await d.listAllEndpoints();const t=l(a);return t.loaded.endpoints?t.endpoints:this.loadResource("endpoints",!0)}async getControllerInfo(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching controller info directly from API"),await d.getControllerInfo();const t=l(a);return t.loaded.controllerInfo?t.controllerInfo:this.loadResource("controllerInfo",!0)}handleControllerEvent(e){a.update(t=>{if(!t.loaded.controllerInfo)return t;const s=e.payload;return e.operation==="update"?{...t,controllerInfo:s}:t})}}const h=new u;typeof window<"u"&&h.setupWebSocketSubscriptions();export{h as a,a as e}; +import{I as p,J as l}from"./sWNKMed7.js";import{g as d}from"./t8NOL8UT.js";import{w as r}from"./BuuPrWMc.js";const f={repositories:[],organizations:[],enterprises:[],pools:[],scalesets:[],credentials:[],endpoints:[],controllerInfo:null,loading:{repositories:!1,organizations:!1,enterprises:!1,pools:!1,scalesets:!1,credentials:!1,endpoints:!1,controllerInfo:!1},loaded:{repositories:!1,organizations:!1,enterprises:!1,pools:!1,scalesets:!1,credentials:!1,endpoints:!1,controllerInfo:!1},errorMessages:{repositories:"",organizations:"",enterprises:"",pools:"",scalesets:"",credentials:"",endpoints:"",controllerInfo:""}},a=p(f);class u{unsubscribers=[];loadingPromises=new Map;retryAttempts=new Map;MAX_RETRIES=3;RETRY_DELAY_MS=1e3;websocketStatusUnsubscriber=null;async loadResource(e,t=!1){if(this.loadingPromises.has(e))return this.loadingPromises.get(e);a.update(o=>({...o,loading:{...o.loading,[e]:!0},errorMessages:{...o.errorMessages,[e]:""}}));const s=this.attemptLoad(e);this.loadingPromises.set(e,s);try{const o=await s;return a.update(n=>({...n,[e]:o,loading:{...n.loading,[e]:!1},loaded:{...n.loaded,[e]:!0},errorMessages:{...n.errorMessages,[e]:""}})),this.retryAttempts.delete(e),t&&this.startBackgroundLoading(e),o}catch(o){const n=o instanceof Error?o.message:"Failed to load data";throw a.update(i=>({...i,loading:{...i.loading,[e]:!1},errorMessages:{...i.errorMessages,[e]:n}})),console.error(`Failed to load ${e}:`,o),o}finally{this.loadingPromises.delete(e)}}async attemptLoad(e){const t=(this.retryAttempts.get(e)||0)+1;this.retryAttempts.set(e,t);try{let s;switch(e){case"repositories":s=d.listRepositories();break;case"organizations":s=d.listOrganizations();break;case"enterprises":s=d.listEnterprises();break;case"pools":s=d.listAllPools();break;case"scalesets":s=d.listScaleSets();break;case"credentials":s=d.listAllCredentials();break;case"endpoints":s=d.listAllEndpoints();break;case"controllerInfo":s=d.getControllerInfo();break;default:throw new Error(`Unknown resource type: ${e}`)}return await s}catch(s){if(tsetTimeout(n,o)),this.attemptLoad(e)}else throw console.error(`All ${this.MAX_RETRIES} attempts failed for ${e}:`,s),s}}async startBackgroundLoading(e){const s=["repositories","organizations","enterprises","pools","scalesets","credentials","endpoints"].filter(o=>o!==e);for(const o of s)setTimeout(()=>{this.loadResource(o,!1).catch(n=>{console.warn(`Background loading failed for ${o}:`,n)})},100*s.indexOf(o))}retryResource(e){return this.retryAttempts.delete(e),this.loadResource(e,!0)}setupWebSocketSubscriptions(){this.cleanup();const e=[r.subscribeToEntity("repository",["create","update","delete"],this.handleRepositoryEvent.bind(this)),r.subscribeToEntity("organization",["create","update","delete"],this.handleOrganizationEvent.bind(this)),r.subscribeToEntity("enterprise",["create","update","delete"],this.handleEnterpriseEvent.bind(this)),r.subscribeToEntity("pool",["create","update","delete"],this.handlePoolEvent.bind(this)),r.subscribeToEntity("scaleset",["create","update","delete"],this.handleScaleSetEvent.bind(this)),r.subscribeToEntity("controller",["update"],this.handleControllerEvent.bind(this)),r.subscribeToEntity("github_credentials",["create","update","delete"],this.handleCredentialsEvent.bind(this)),r.subscribeToEntity("gitea_credentials",["create","update","delete"],this.handleCredentialsEvent.bind(this)),r.subscribeToEntity("github_endpoint",["create","update","delete"],this.handleEndpointEvent.bind(this))];this.unsubscribers=e,this.setupWebSocketStatusMonitoring()}setupWebSocketStatusMonitoring(){this.websocketStatusUnsubscriber&&this.websocketStatusUnsubscriber();let e=!1;this.websocketStatusUnsubscriber=r.subscribe(t=>{t.connected&&!e&&(console.log("[EagerCache] WebSocket connected - reinitializing cache"),this.initializeAllResources()),e=t.connected})}async initializeAllResources(){const t=["repositories","organizations","enterprises","pools","scalesets","credentials","endpoints","controllerInfo"].map(s=>this.loadResource(s,!0).catch(o=>{console.warn(`Failed to reload ${s} on WebSocket reconnect:`,o)}));await Promise.allSettled(t)}handleRepositoryEvent(e){a.update(t=>{if(!t.loaded.repositories)return t;const s=[...t.repositories],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,repositories:s}})}handleOrganizationEvent(e){a.update(t=>{if(!t.loaded.organizations)return t;const s=[...t.organizations],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,organizations:s}})}handleEnterpriseEvent(e){a.update(t=>{if(!t.loaded.enterprises)return t;const s=[...t.enterprises],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,enterprises:s}})}handlePoolEvent(e){a.update(t=>{if(!t.loaded.pools)return t;const s=[...t.pools],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,pools:s}})}handleScaleSetEvent(e){a.update(t=>{if(!t.loaded.scalesets)return t;const s=[...t.scalesets],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,scalesets:s}})}handleCredentialsEvent(e){a.update(t=>{if(!t.loaded.credentials)return t;const s=[...t.credentials],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.id===o.id);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.id:o,i=s.findIndex(c=>c.id===n);i!==-1&&s.splice(i,1)}return{...t,credentials:s}})}handleEndpointEvent(e){a.update(t=>{if(!t.loaded.endpoints)return t;const s=[...t.endpoints],o=e.payload;if(e.operation==="create")s.push(o);else if(e.operation==="update"){const n=s.findIndex(i=>i.name===o.name);n!==-1&&(s[n]=o)}else if(e.operation==="delete"){const n=typeof o=="object"?o.name:o,i=s.findIndex(c=>c.name===n);i!==-1&&s.splice(i,1)}return{...t,endpoints:s}})}cleanup(){this.unsubscribers.forEach(e=>e()),this.unsubscribers=[],this.websocketStatusUnsubscriber&&(this.websocketStatusUnsubscriber(),this.websocketStatusUnsubscriber=null)}shouldUseCache(){return l(r).connected}async getRepositories(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching repositories directly from API"),await d.listRepositories();const t=l(a);return t.loaded.repositories?t.repositories:this.loadResource("repositories",!0)}async getOrganizations(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching organizations directly from API"),await d.listOrganizations();const t=l(a);return t.loaded.organizations?t.organizations:this.loadResource("organizations",!0)}async getEnterprises(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching enterprises directly from API"),await d.listEnterprises();const t=l(a);return t.loaded.enterprises?t.enterprises:this.loadResource("enterprises",!0)}async getPools(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching pools directly from API"),await d.listAllPools();const t=l(a);return t.loaded.pools?t.pools:this.loadResource("pools",!0)}async getScaleSets(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching scalesets directly from API"),await d.listScaleSets();const t=l(a);return t.loaded.scalesets?t.scalesets:this.loadResource("scalesets",!0)}async getCredentials(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching credentials directly from API"),await d.listAllCredentials();const t=l(a);return t.loaded.credentials?t.credentials:this.loadResource("credentials",!0)}async getEndpoints(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching endpoints directly from API"),await d.listAllEndpoints();const t=l(a);return t.loaded.endpoints?t.endpoints:this.loadResource("endpoints",!0)}async getControllerInfo(){if(!l(r).connected)return console.log("[EagerCache] WebSocket disconnected - fetching controller info directly from API"),await d.getControllerInfo();const t=l(a);return t.loaded.controllerInfo?t.controllerInfo:this.loadResource("controllerInfo",!0)}handleControllerEvent(e){a.update(t=>{if(!t.loaded.controllerInfo)return t;const s=e.payload;return e.operation==="update"?{...t,controllerInfo:s}:t})}}const h=new u;typeof window<"u"&&h.setupWebSocketSubscriptions();export{h as a,a as e}; diff --git a/webapp/assets/_app/immutable/chunks/WvS03pW2.js b/webapp/assets/_app/immutable/chunks/WvS03pW2.js new file mode 100644 index 00000000..3844401a --- /dev/null +++ b/webapp/assets/_app/immutable/chunks/WvS03pW2.js @@ -0,0 +1 @@ +import"./DsnmJJEf.js";import{i as ke}from"./zNh6Oe5P.js";import{V as ut,aU as gt,aV as ft,M as ht,O as mt,P as pt,Q as kt,R as xt,at as _t,K as Xe,L as yt,U as bt,T as wt,a8 as Mt,p as fe,l as $,s as ee,m as te,n as u,a as Le,C as ye,j as s,g as e,r as n,t as R,c as i,d as he,E as be,f as L,e as Ge,u as v,k as j,v as O,z as Se,D as Te,B as Q,b as q,x as Pt,q as X}from"./sWNKMed7.js";import{p as o,l as Ye,i as I,b as Ct}from"./Ccl3fNd2.js";import{e as de,i as ge}from"./BuuPrWMc.js";import{h as Ae,s as pe,i as jt,f as zt,B as Ce,r as Tt,c as Be,b as Lt,d as Ht,e as $e,j as It}from"./t8NOL8UT.js";import{c as St}from"./CCYOsezl.js";import{b as At}from"./CLagxtgo.js";import{B as Bt,g as et,b as Et}from"./Cbkm53HO.js";function tt(S,r,g){Xe&&yt();var a=S,t=_t,p,h,m=null,f=ut()?gt:ft;function M(){p&&bt(p),m!==null&&(m.lastChild.remove(),a.before(m),m=null),p=h}ht(()=>{if(f(t,t=r())){var k=a,A=xt();A&&(m=document.createDocumentFragment(),m.append(k=mt())),h=pt(()=>g(k)),A?kt.add_callback(M):M()}}),Xe&&(a=wt)}function Fe(S,r){var g=S.$$events?.[r.type],a=Mt(g)?g.slice():g==null?[]:[g];for(var t of a)t.call(this,r)}var Dt=ye('');function Vt(S,r){fe(r,!1);const g=te();let a=o(r,"name",8),t=o(r,"class",8,"h-5 w-5");const p={plus:'',edit:'',delete:'',view:'',close:'',check:'',x:'',"chevron-left":'',"chevron-right":'',"chevron-down":'',"chevron-up":'',search:'',refresh:'',menu:'',settings:'',"check-circle":'',"x-circle":'',"exclamation-circle":'',"information-circle":'',loading:'',sun:'',moon:'',document:'',folder:''};$(()=>u(a()),()=>{ee(g,p[a()]||"")}),Le();var h=Dt(),m=s(h);Ae(m,()=>e(g),!0),n(h),R(()=>pe(h,0,`${t()}`)),i(S,h),he()}var Nt=L('');function rt(S,r){const g=Ye(r,["children","$$slots","$$events","$$legacy"]),a=Ye(g,["action","disabled","title","ariaLabel","size"]);fe(r,!1);const t=te(),p=te(),h=te(),m=te(),f=te(),M=te(),k=te(),A=te(),U=te(),V=be();let P=o(r,"action",8,"edit"),Z=o(r,"disabled",8,!1),B=o(r,"title",8,""),x=o(r,"ariaLabel",8,""),H=o(r,"size",8,"md");function D(){Z()||V("click")}$(()=>{},()=>{ee(t,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),$(()=>u(H()),()=>{ee(p,{sm:"p-1",md:"p-2"}[H()])}),$(()=>u(P()),()=>{ee(h,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500"}[P()])}),$(()=>u(H()),()=>{ee(m,H()==="sm"?"h-4 w-4":"h-5 w-5")}),$(()=>(e(t),e(p),e(h)),()=>{ee(f,[e(t),e(p),e(h)].join(" "))}),$(()=>{},()=>{ee(M,{edit:'',delete:'',view:'',add:''})}),$(()=>{},()=>{ee(k,{edit:"Edit",delete:"Delete",view:"View",add:"Add"})}),$(()=>(u(B()),e(k),u(P())),()=>{ee(A,B()||e(k)[P()])}),$(()=>(u(x()),e(k),u(P())),()=>{ee(U,x()||`${e(k)[P()]} item`)}),Le(),ke();var F=Nt();jt(F,()=>({type:"button",class:e(f),disabled:Z(),title:e(A),"aria-label":e(U),...a}));var J=s(F),l=s(J);Ae(l,()=>(e(M),u(P()),v(()=>e(M)[P()])),!0),n(J),n(F),R(()=>pe(J,0,zt(e(m)))),Ge("click",F,D),i(S,F),he()}var Rt=L('

');function Ut(S,r){let g=o(r,"message",8,"Loading...");var a=Rt(),t=j(s(a),2),p=s(t,!0);n(t),n(a),R(()=>O(p,g())),i(S,a)}var qt=L('
'),Ot=L('

');function Ft(S,r){let g=o(r,"title",8,"Error"),a=o(r,"message",8),t=o(r,"showRetry",8,!1),p=o(r,"onRetry",8,void 0);var h=Ot(),m=s(h),f=s(m),M=j(s(f),2),k=s(M),A=s(k,!0);n(k);var U=j(k,2),V=s(U,!0);n(U);var P=j(U,2);{var Z=B=>{var x=qt(),H=s(x);Ce(H,{variant:"secondary",size:"sm",icon:"",class:"text-red-700 dark:text-red-200 bg-red-100 dark:bg-red-800 hover:bg-red-200 dark:hover:bg-red-700 focus:outline-none focus:bg-red-200 dark:focus:bg-red-700",$$events:{click(...D){p()?.apply(this,D)}},children:(D,F)=>{Se();var J=Te("Retry");i(D,J)},$$slots:{default:!0}}),n(x),i(B,x)};I(P,B=>{t()&&p()&&B(Z)})}n(M),n(f),n(m),n(h),R(()=>{O(A,g()),O(V,a())}),i(S,h)}var Gt=ye(''),Kt=ye(''),Qt=ye(''),Zt=ye(''),Jt=ye(''),Wt=ye(''),Xt=L('

');function Yt(S,r){let g=o(r,"title",8),a=o(r,"message",8),t=o(r,"iconType",8,"document");var p=Xt(),h=s(p);{var m=V=>{var P=Gt();i(V,P)},f=V=>{var P=Q(),Z=q(P);{var B=H=>{var D=Kt();i(H,D)},x=H=>{var D=Q(),F=q(D);{var J=d=>{var c=Qt();i(d,c)},l=d=>{var c=Q(),y=q(c);{var N=w=>{var E=Zt();i(w,E)},W=w=>{var E=Q(),z=q(E);{var C=T=>{var G=Jt();i(T,G)},_=T=>{var G=Q(),Y=q(G);{var re=ae=>{var ce=Wt();i(ae,ce)};I(Y,ae=>{t()==="settings"&&ae(re)},!0)}i(T,G)};I(z,T=>{t()==="key"?T(C):T(_,!1)},!0)}i(w,E)};I(y,w=>{t()==="cog"?w(N):w(W,!1)},!0)}i(d,c)};I(F,d=>{t()==="users"?d(J):d(l,!1)},!0)}i(H,D)};I(Z,H=>{t()==="building"?H(B):H(x,!1)},!0)}i(V,P)};I(h,V=>{t()==="document"?V(m):V(f,!1)})}var M=j(h,2),k=s(M,!0);n(M);var A=j(M,2),U=s(A,!0);n(A),n(p),R(()=>{O(k,g()),O(U,a())}),i(S,p)}var $t=L('
');function er(S,r){fe(r,!1);let g=o(r,"value",12,""),a=o(r,"placeholder",8,"Search..."),t=o(r,"disabled",8,!1);const p=be();function h(){p("input",g())}ke();var m=$t(),f=s(m),M=s(f);Vt(M,{name:"search",class:"h-5 w-5 text-gray-400"}),n(f);var k=j(f,2);Tt(k),n(m),R(()=>{Be(k,"placeholder",a()),k.disabled=t()}),At(k,g),Ge("input",k,h),i(S,m),he()}var tr=L(""),rr=L('
'),ar=L('
');function nr(S,r){fe(r,!1);let g=o(r,"searchTerm",12,""),a=o(r,"perPage",12,25),t=o(r,"placeholder",8,"Search..."),p=o(r,"showPerPageSelector",8,!0),h=o(r,"perPageOptions",24,()=>[25,50,100]);const m=be();function f(){m("search",{term:g()})}function M(){m("perPageChange",{perPage:a()})}ke();var k=ar(),A=s(k),U=s(A),V=s(U),P=j(s(V),2);er(P,{get placeholder(){return t()},get value(){return g()},set value(x){g(x)},$$events:{input:f},$$legacy:!0}),n(V),n(U);var Z=j(U,2);{var B=x=>{var H=rr(),D=s(H),F=j(s(D),2);R(()=>{a(),Pt(()=>{h()})}),de(F,5,h,ge,(J,l)=>{var d=tr(),c=s(d,!0);n(d);var y={};R(()=>{O(c,e(l)),y!==(y=e(l))&&(d.value=(d.__value=e(l))??"")}),i(J,d)}),n(F),n(D),n(H),Lt(F,a),Ge("change",F,M),i(x,H)};I(Z,x=>{p()&&x(B)})}n(A),n(k),i(S,k),he()}var ir=L('Showing to of ',1),or=L('
');function sr(S,r){fe(r,!1);const g=te(),a=te();let t=o(r,"currentPage",8,1),p=o(r,"totalPages",8,1),h=o(r,"perPage",8,25),m=o(r,"totalItems",8,0),f=o(r,"itemName",8,"results");const M=be();function k(P){P>=1&&P<=p()&&P!==t()&&M("pageChange",{page:P})}$(()=>(u(m()),u(t()),u(h())),()=>{ee(g,m()===0?0:(t()-1)*h()+1)}),$(()=>(u(t()),u(h()),u(m())),()=>{ee(a,Math.min(t()*h(),m()))}),Le(),ke();var A=Q(),U=q(A);{var V=P=>{var Z=or(),B=s(Z),x=s(B);{let z=X(()=>t()===1);Ce(x,{variant:"secondary",get disabled(){return e(z)},$$events:{click:()=>k(t()-1)},children:(C,_)=>{Se();var T=Te("Previous");i(C,T)},$$slots:{default:!0}})}var H=j(x,2);{let z=X(()=>t()===p());Ce(H,{variant:"secondary",get disabled(){return e(z)},class:"ml-3",$$events:{click:()=>k(t()+1)},children:(C,_)=>{Se();var T=Te("Next");i(C,T)},$$slots:{default:!0}})}n(B);var D=j(B,2),F=s(D),J=s(F),l=s(J);{var d=z=>{var C=Te();R(()=>O(C,`No ${f()??""}`)),i(z,C)},c=z=>{var C=ir(),_=j(q(C)),T=s(_,!0);n(_);var G=j(_,2),Y=s(G,!0);n(G);var re=j(G,2),ae=s(re,!0);n(re);var ce=j(re);R(()=>{O(T,e(g)),O(Y,e(a)),O(ae,m()),O(ce,` ${f()??""}`)}),i(z,C)};I(l,z=>{m()===0?z(d):z(c,!1)})}n(J),n(F);var y=j(F,2),N=s(y),W=s(N);{let z=X(()=>t()===1);Ce(W,{variant:"secondary",size:"sm",get disabled(){return e(z)},class:"rounded-r-none","aria-label":"Previous page",icon:"",$$events:{click:()=>k(t()-1)}})}var w=j(W,2);de(w,1,()=>(u(p()),v(()=>Array(p()))),ge,(z,C,_)=>{const T=X(()=>_+1);{let G=X(()=>e(T)===t()?"primary":"secondary");Ce(z,{get variant(){return e(G)},size:"sm",class:"rounded-none border-l-0 first:border-l first:rounded-l-md",$$events:{click:()=>k(e(T))},children:(Y,re)=>{Se();var ae=Te();R(()=>O(ae,e(T))),i(Y,ae)},$$slots:{default:!0}})}});var E=j(w,2);{let z=X(()=>t()===p());Ce(E,{variant:"secondary",size:"sm",get disabled(){return e(z)},class:"rounded-l-none","aria-label":"Next page",icon:"",$$events:{click:()=>k(t()+1)}})}n(N),n(y),n(D),n(Z),i(P,Z)};I(U,P=>{p()>1&&P(V)})}i(S,A),he()}var lr=L('

'),dr=L('

'),cr=L('

'),vr=L('

'),ur=L('
'),gr=L('
'),fr=L('
'),hr=L(" "),mr=L('
'),pr=L('
');function kr(S,r){fe(r,!1);const g=be();let a=o(r,"item",8),t=o(r,"config",8);function p(){if(!a())return"Unknown";const{field:l,useId:d,showOwner:c}=t().primaryText,y=a()[l];return d&&y?`${y.slice(0,8)}...`:c&&a().owner&&a().name?`${a().owner}/${a().name}`:y||"Unknown"}function h(){if(!t().secondaryText)return"";const{field:l,computedValue:d}=t().secondaryText;return d!==void 0?typeof d=="function"?d(a()):d:a()?.[l]||""}function m(){if(!t().primaryText.href||!a())return"#";let l=t().primaryText.href;return l=l.replace("{id}",a().id||""),l=l.replace("{name}",encodeURIComponent(a().name||"")),Ht(l)}function f(l){if(!a())return;const d=t().actions?.find(c=>c.type===l);d&&d.handler(a()),l==="edit"?g("edit",{item:a()}):l==="delete"?g("delete",{item:a()}):g("action",{type:l,item:a()})}function M(l){switch(l.type){case"status":if(t().entityType==="instance"){const c=a()?.[l.field]||"unknown";let y="neutral",N=c.charAt(0).toUpperCase()+c.slice(1);return l.field==="status"?y=c==="running"?"success":c==="pending"||c==="creating"?"info":c==="failed"||c==="error"?"error":"neutral":l.field==="runner_status"&&(y=c==="idle"?"info":c==="active"||c==="running"?"success":c==="failed"||c==="error"?"error":"neutral"),{variant:y,text:N}}return{variant:"neutral",text:a()?.[l.field]||"Unknown"};case"forge":return{variant:"neutral",text:a()?.[l.field]||"unknown"};case"auth":const d=a()?.[l.field]||"pat";return{variant:d==="pat"?"success":"info",text:d.toUpperCase()};case"custom":if(typeof l.value=="function"){const c=l.value(a());return{variant:c?.variant||"neutral",text:c?.text||""}}return{variant:l.value?.variant||"neutral",text:l.value?.text||""};default:return{variant:"neutral",text:""}}}ke();var k=pr(),A=s(k),U=s(A);{var V=l=>{var d=dr(),c=s(d),y=s(c,!0);n(c);var N=j(c,2);{var W=w=>{var E=lr(),z=s(E,!0);n(E),R(C=>O(z,C),[()=>v(h)]),i(w,E)};I(N,w=>{u(t()),v(()=>t().secondaryText)&&w(W)})}n(d),R((w,E)=>{Be(d,"href",w),pe(c,1,`text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 truncate ${u(t()),v(()=>t().primaryText.isMonospace?"font-mono":"")??""}`),O(y,E)},[()=>v(m),()=>v(p)]),i(l,d)},P=l=>{var d=vr(),c=s(d),y=s(c,!0);n(c);var N=j(c,2);{var W=w=>{var E=cr(),z=s(E,!0);n(E),R(C=>O(z,C),[()=>v(h)]),i(w,E)};I(N,w=>{u(t()),v(()=>t().secondaryText)&&w(W)})}n(d),R(w=>O(y,w),[()=>v(p)]),i(l,d)};I(U,l=>{u(t()),v(()=>t().primaryText.isClickable)?l(V):l(P,!1)})}var Z=j(U,2);{var B=l=>{var d=fr(),c=s(d);{var y=w=>{var E=Q(),z=q(E);de(z,1,()=>(u(t()),v(()=>t().customInfo)),ge,(C,_)=>{const T=X(()=>(e(_),u(a()),v(()=>typeof e(_).icon=="function"?e(_).icon(a()):e(_).icon))),G=X(()=>(e(_),u(a()),v(()=>typeof e(_).text=="function"?e(_).text(a()):e(_).text)));var Y=ur(),re=s(Y);{var ae=je=>{var He=Q(),De=q(He);Ae(De,()=>e(T)),i(je,He)};I(re,je=>{e(T)&&je(ae)})}var ce=j(re,2),Ee=s(ce,!0);n(ce),n(Y),R(()=>O(Ee,e(G))),i(C,Y)}),i(w,E)};I(c,w=>{u(t()),v(()=>t().customInfo)&&w(y)})}var N=j(c,2);{var W=w=>{var E=Q(),z=q(E);de(z,1,()=>(u(t()),v(()=>t().badges.filter(C=>C.type==="forge"))),ge,(C,_)=>{var T=gr(),G=s(T);Ae(G,()=>(u(et),e(_),u(a()),v(()=>et(e(_).field?a()?.[e(_).field]||"unknown":a()?.endpoint?.endpoint_type||"unknown"))));var Y=j(G,2),re=s(Y,!0);n(Y),n(T),R(()=>O(re,(u(a()),v(()=>a()?.endpoint?.name||"Unknown")))),i(C,T)}),i(w,E)};I(N,w=>{u(t()),v(()=>t().badges)&&w(W)})}n(d),i(l,d)};I(Z,l=>{u(t()),v(()=>t().customInfo||t().badges?.some(d=>d.type==="forge"))&&l(B)})}n(A);var x=j(A,2),H=s(x);{var D=l=>{var d=Q(),c=q(d);de(c,1,()=>(u(t()),v(()=>t().badges.filter(y=>y.type!=="forge"))),ge,(y,N)=>{var W=Q(),w=q(W);{var E=C=>{const _=X(()=>(e(N),v(()=>M(e(N)))));var T=hr(),G=s(T,!0);n(T),R(()=>{pe(T,1,`inline-flex items-center rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ${u(e(_)),v(()=>e(_).variant==="success"?"bg-green-50 text-green-700 ring-green-600/20 dark:bg-green-900/50 dark:text-green-300 dark:ring-green-400/20":e(_).variant==="info"?"bg-blue-50 text-blue-700 ring-blue-600/20 dark:bg-blue-900/50 dark:text-blue-300 dark:ring-blue-400/20":e(_).variant==="error"?"bg-red-50 text-red-700 ring-red-600/20 dark:bg-red-900/50 dark:text-red-300 dark:ring-red-400/20":"bg-gray-50 text-gray-700 ring-gray-600/20 dark:bg-gray-900/50 dark:text-gray-300 dark:ring-gray-400/20")??""}`),O(G,(u(e(_)),v(()=>e(_).text)))}),i(C,T)},z=C=>{const _=X(()=>(e(N),v(()=>M(e(N)))));Bt(C,{get variant(){return u(e(_)),v(()=>e(_).variant)},get text(){return u(e(_)),v(()=>e(_).text)}})};I(w,C=>{e(N),v(()=>e(N).type==="status")?C(E):C(z,!1)})}i(y,W)}),i(l,d)};I(H,l=>{u(t()),v(()=>t().badges)&&l(D)})}var F=j(H,2);{var J=l=>{var d=mr();de(d,5,()=>(u(t()),v(()=>t().actions)),ge,(c,y)=>{{let N=X(()=>(e(y),u(t()),v(()=>e(y).type==="edit"?`Edit ${t().entityType}`:`Delete ${t().entityType}`))),W=X(()=>(e(y),u(t()),v(()=>e(y).type==="edit"?`Edit ${t().entityType}`:`Delete ${t().entityType}`)));rt(c,{get action(){return e(y),v(()=>e(y).type)},size:"sm",get title(){return e(N)},get ariaLabel(){return e(W)},$$events:{click:()=>f(e(y).type)}})}}),n(d),i(l,d)};I(F,l=>{u(t()),v(()=>t().actions)&&l(J)})}n(x),n(k),i(S,k),he()}var xr=L('
'),_r=L('
'),yr=L("
"),br=L("
"),wr=L(' ',1),Mr=L('
');function Dr(S,r){fe(r,!1);const g=te();let a=o(r,"columns",24,()=>[]),t=o(r,"data",24,()=>[]),p=o(r,"loading",8,!1),h=o(r,"error",8,""),m=o(r,"totalItems",8,0),f=o(r,"itemName",8,"results"),M=o(r,"searchTerm",12,""),k=o(r,"searchPlaceholder",8,"Search..."),A=o(r,"showSearch",8,!0),U=o(r,"currentPage",8,1),V=o(r,"perPage",12,25),P=o(r,"totalPages",8,1),Z=o(r,"showPagination",8,!0),B=o(r,"showPerPageSelector",8,!0),x=o(r,"emptyTitle",8,"No items found"),H=o(r,"emptyMessage",8,""),D=o(r,"emptyIconType",8,"document"),F=o(r,"errorTitle",8,"Error loading data"),J=o(r,"showRetry",8,!1),l=o(r,"showMobileCards",8,!0),d=o(r,"mobileCardConfig",8,null);const c=be();function y(b){c("search",b.detail)}function N(b){c("pageChange",b.detail)}function W(b){c("perPageChange",b.detail)}function w(){c("retry")}function E(b){c("edit",b.detail)}function z(b){c("delete",b.detail)}function C(b){c("action",b.detail)}function _(b){const ve="px-6 py-4 text-sm",Ve=b.align==="right"?"text-right":b.align==="center"?"text-center":"text-left",Ne=b.key==="actions"?"font-medium":"text-gray-900 dark:text-white",Re=b.flexible?"min-w-0":"";return`${ve} ${Ve} ${Ne} ${Re}`.trim()}function T(){return a().map(b=>b.flexible?`${b.flexRatio||1}fr`:"auto").join(" ")}$(()=>(u(H()),u(M()),u(f())),()=>{ee(g,H()||(M()?`No items found matching "${M()}"`:`No ${f()} found`))}),Le(),ke();var G=Mr(),Y=s(G);{var re=b=>{nr(b,{get placeholder(){return k()},get showPerPageSelector(){return B()},get searchTerm(){return M()},set searchTerm(ve){M(ve)},get perPage(){return V()},set perPage(ve){V(ve)},$$events:{search:y,perPageChange:W},$$legacy:!0})};I(Y,b=>{A()&&b(re)})}var ae=j(Y,2),ce=s(ae);{var Ee=b=>{Ut(b,{get message(){return`Loading ${f()??""}...`}})},je=b=>{var ve=Q(),Ve=q(ve);{var Ne=we=>{{let Ie=X(()=>J()?w:void 0);Ft(we,{get title(){return F()},get message(){return h()},get showRetry(){return J()},get onRetry(){return e(Ie)}})}},Re=we=>{var Ie=Q(),at=q(Ie);{var nt=Me=>{Yt(Me,{get title(){return x()},get message(){return e(g)},get iconType(){return D()}})},it=Me=>{var Ke=wr(),Qe=q(Ke);{var ot=oe=>{var K=_r();de(K,7,t,(le,ne)=>le.id||le.name||ne,(le,ne,qe)=>{var ze=xr(),ie=s(ze);{var Pe=me=>{var xe=Q(),se=q(xe);tt(se,()=>(e(ne),v(()=>`${e(ne).id||e(ne).name}-${e(ne).updated_at}-mobile`)),_e=>{kr(_e,{get item(){return e(ne)},get config(){return d()},$$events:{edit(ue){Fe.call(this,r,ue)},delete(ue){Fe.call(this,r,ue)},action(ue){Fe.call(this,r,ue)}}})}),i(me,xe)},Oe=me=>{var xe=Q(),se=q(xe);$e(se,r,"mobile-card",{get item(){return e(ne)},get index(){return e(qe)}}),i(me,xe)};I(ie,me=>{d()?me(Pe):me(Oe,!1)})}n(ze),i(le,ze)}),n(K),i(oe,K)};I(Qe,oe=>{l()&&oe(ot)})}var Ze=j(Qe,2),Ue=s(Ze),Je=s(Ue);de(Je,1,a,ge,(oe,K)=>{var le=yr(),ne=s(le,!0);n(le),R(()=>{pe(le,1,`px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600 ${e(K),v(()=>e(K).align==="right"?"text-right":e(K).align==="center"?"text-center":"text-left")??""}`),O(ne,(e(K),v(()=>e(K).title)))}),i(oe,le)});var st=j(Je,2);de(st,3,t,(oe,K)=>oe.id||oe.name||K,(oe,K,le)=>{var ne=Q(),qe=q(ne);de(qe,1,a,ge,(ze,ie)=>{var Pe=br(),Oe=s(Pe);{var me=se=>{var _e=Q(),ue=q(_e);tt(ue,()=>(e(K),e(ie),v(()=>`${e(K).id||e(K).name}-${e(K).updated_at}-${e(ie).key}`)),lt=>{var We=Q(),dt=q(We);St(dt,()=>e(ie).cellComponent,(ct,vt)=>{vt(ct,Ct({get item(){return e(K)}},()=>e(ie).cellProps,{$$events:{edit:E,delete:z,action:C}}))}),i(lt,We)}),i(se,_e)},xe=se=>{var _e=Q(),ue=q(_e);$e(ue,r,"cell",{get item(){return e(K)},get column(){return e(ie)},get index(){return e(le)},get value(){return e(K),e(ie),v(()=>e(K)[e(ie).key])}}),i(se,_e)};I(Oe,se=>{e(ie),v(()=>e(ie).cellComponent)?se(me):se(xe,!1)})}n(Pe),R(se=>pe(Pe,1,`${se??""} border-b border-gray-200 dark:border-gray-700`),[()=>(e(ie),v(()=>_(e(ie))))]),i(ze,Pe)}),i(oe,ne)}),n(Ue),n(Ze),R(oe=>It(Ue,`grid-template-columns: ${oe??""}`),[()=>v(T)]),i(Me,Ke)};I(at,Me=>{u(t()),v(()=>t().length===0)?Me(nt):Me(it,!1)},!0)}i(we,Ie)};I(Ve,we=>{h()?we(Ne):we(Re,!1)},!0)}i(b,ve)};I(ce,b=>{p()?b(Ee):b(je,!1)})}var He=j(ce,2);{var De=b=>{sr(b,{get currentPage(){return U()},get totalPages(){return P()},get perPage(){return V()},get totalItems(){return m()},get itemName(){return f()},$$events:{pageChange:N}})};I(He,b=>{u(Z()),u(p()),u(h()),u(t()),v(()=>Z()&&!p()&&!h()&&t().length>0)&&b(De)})}n(ae),n(G),i(S,G),he()}var Pr=L('
');function Vr(S,r){fe(r,!1);const g=be();let a=o(r,"item",8),t=o(r,"actions",24,()=>[{type:"edit",title:"Edit",ariaLabel:"Edit item",action:"edit"},{type:"delete",title:"Delete",ariaLabel:"Delete item",action:"delete"}]);function p(m){a()&&(m==="edit"?g("edit",{item:a()}):m==="delete"?g("delete",{item:a()}):g("action",{type:m,item:a()}))}ke();var h=Pr();de(h,5,t,ge,(m,f)=>{{let M=X(()=>(e(f),v(()=>e(f).action||(e(f).type==="edit"?"edit":e(f).type==="delete"?"delete":"view")))),k=X(()=>(e(f),v(()=>e(f).title||(e(f).type==="edit"?"Edit":e(f).type==="delete"?"Delete":e(f).label)))),A=X(()=>(e(f),v(()=>e(f).ariaLabel||(e(f).type==="edit"?"Edit item":e(f).type==="delete"?"Delete item":e(f).label))));rt(m,{get action(){return e(M)},get title(){return e(k)},get ariaLabel(){return e(A)},$$events:{click:()=>p(e(f).type)}})}}),n(h),i(S,h),he()}var Cr=L(" "),jr=L(" ");function Nr(S,r){fe(r,!1);const g=te(),a=te();let t=o(r,"item",8),p=o(r,"field",8),h=o(r,"type",8,"text"),m=o(r,"truncateLength",8,50),f=o(r,"showTitle",8,!1);function M(){return t()&&p().split(".").reduce((B,x)=>B?.[x],t())||""}function k(){return h()==="date"?Et(e(g)):h()==="truncated"&&e(g).length>m()?`${e(g).slice(0,m())}...`:e(g)}function A(){switch(h()){case"code":return"inline-block max-w-full truncate bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded text-xs font-mono";case"description":return"block w-full truncate text-sm text-gray-500 dark:text-gray-300";case"date":return"block w-full truncate text-sm text-gray-900 dark:text-white font-mono";default:return"block w-full truncate text-sm text-gray-900 dark:text-white"}}$(()=>{},()=>{ee(g,M())}),$(()=>{},()=>{ee(a,k())}),Le(),ke();var U=Q(),V=q(U);{var P=B=>{var x=Cr(),H=s(x,!0);n(x),R(D=>{pe(x,1,`${D??""} ${f()?"cursor-default":""}`),Be(x,"title",f()?e(g):""),O(H,e(a))},[()=>v(A)]),i(B,x)},Z=B=>{var x=jr(),H=s(x,!0);n(x),R(D=>{pe(x,1,`${D??""} ${f()?"cursor-default":""}`),Be(x,"title",f()?e(g):""),O(H,e(a))},[()=>v(A)]),i(B,x)};I(V,B=>{h()==="code"?B(P):B(Z,!1)})}i(S,U),he()}export{rt as A,Dr as D,Nr as G,Vr as a,tt as k}; diff --git a/webapp/assets/_app/immutable/chunks/BAg1iRPq.js b/webapp/assets/_app/immutable/chunks/_gFYyMUN.js similarity index 78% rename from webapp/assets/_app/immutable/chunks/BAg1iRPq.js rename to webapp/assets/_app/immutable/chunks/_gFYyMUN.js index 9bf97768..a6eb6026 100644 --- a/webapp/assets/_app/immutable/chunks/BAg1iRPq.js +++ b/webapp/assets/_app/immutable/chunks/_gFYyMUN.js @@ -1 +1 @@ -import{F as t,G as S,u as b,H as h,S as k}from"./D8EpLgQ1.js";function u(r,i){return r===i||r?.[k]===i}function d(r={},i,a,T){return t(()=>{var f,s;return S(()=>{f=s,s=[],b(()=>{r!==a(...s)&&(i(r,...s),f&&u(a(...f),r)&&i(null,...f))})}),()=>{h(()=>{s&&u(a(...s),r)&&i(null,...s)})}}),r}export{d as b}; +import{F as t,G as S,u as b,H as h,S as k}from"./sWNKMed7.js";function u(r,i){return r===i||r?.[k]===i}function d(r={},i,a,T){return t(()=>{var f,s;return S(()=>{f=s,s=[],b(()=>{r!==a(...s)&&(i(r,...s),f&&u(a(...f),r)&&i(null,...f))})}),()=>{h(()=>{s&&u(a(...s),r)&&i(null,...s)})}}),r}export{d as b}; diff --git a/webapp/assets/_app/immutable/chunks/CIBm3n2u.js b/webapp/assets/_app/immutable/chunks/nqMQkPXF.js similarity index 95% rename from webapp/assets/_app/immutable/chunks/CIBm3n2u.js rename to webapp/assets/_app/immutable/chunks/nqMQkPXF.js index ec528019..d74052ed 100644 --- a/webapp/assets/_app/immutable/chunks/CIBm3n2u.js +++ b/webapp/assets/_app/immutable/chunks/nqMQkPXF.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as qe}from"./B3Pzt0F_.js";import{p as Fe,E as Ke,o as Ge,f as x,j as t,r,k as s,g as e,m,z as B,t as y,x as ue,u as l,v,n as T,s as i,e as be,c as u,D as He,d as Je}from"./D8EpLgQ1.js";import{p as ge,i as U}from"./5WA7h8uK.js";import{e as Qe,i as Ve}from"./u94nIB4-.js";import{r as me,b as ye,g as Xe}from"./CiE1LlKV.js";import{a as Ye,b as Ze}from"./C6k1Q4We.js";import{p as ea}from"./D4Caz1gY.js";import{e as xe}from"./BZiHL9L3.js";import{M as aa}from"./qB7B8uiS.js";var ta=x('

'),ra=x('
Owner:
'),oa=x('
'),sa=x(""),na=x(''),ia=x('

Leave empty to auto-generate a new secret

'),da=x('
Updating...
'),la=x('

Name:
Endpoint:
Current Credentials:
Current Pool Balancer:

Leave unchanged to keep current credentials

Round Robin distributes jobs evenly across pools, Pack fills pools in order

');function _a(fe,D){Fe(D,!1);let d=ge(D,"entity",8),w=ge(D,"entityType",8);const $=Ke();let C=m(!1),k=m(""),M=m([]),R=m(!1),f=m(""),_=m(""),h=m(""),b=m(!1);function _e(){if(w()==="repository"){const c=d();return`${c.owner}/${c.name}`}return d().name||""}function W(){return w().charAt(0).toUpperCase()+w().slice(1)}function he(){return w()==="repository"&&d().owner||""}async function ke(){try{i(R,!0),i(M,await Xe.listCredentials())}catch(c){i(k,xe(c))}finally{i(R,!1)}}function we(){i(f,d().credentials_name||""),i(_,d().pool_balancing_type||"roundrobin"),i(h,""),i(b,!1)}async function Ce(){try{i(C,!0),i(k,"");const c={};let E=!1;if(e(f)&&e(f)!==d().credentials_name&&(c.credentials_name=e(f),E=!0),e(_)&&e(_)!==d().pool_balancing_type&&(c.pool_balancer_type=e(_),E=!0),e(b)){if(!e(h).trim()){i(k,"Please enter a webhook secret or uncheck the option to change it");return}c.webhook_secret=e(h),E=!0}if(!E){$("close");return}$("submit",c)}catch(c){i(k,xe(c))}finally{i(C,!1)}}Ge(()=>{ke(),we()}),qe(),aa(fe,{$$events:{close:()=>$("close")},children:(c,E)=>{var j=la(),A=t(j),N=t(A),Ee=t(N);r(N);var Y=s(N,2),Se=t(Y,!0);r(Y),r(A);var z=s(A,2),Z=t(z);{var Pe=a=>{var o=ta(),n=t(o),p=t(n,!0);r(n),r(o),y(()=>v(p,e(k))),u(a,o)};U(Z,a=>{e(k)&&a(Pe)})}var I=s(Z,2),L=t(I),Ue=t(L);r(L);var ee=s(L,2),ae=t(ee);{var $e=a=>{var o=ra(),n=s(t(o),2),p=t(n,!0);r(n),r(o),y(S=>v(p,S),[()=>l(he)]),u(a,o)};U(ae,a=>{w()==="repository"&&a($e)})}var O=s(ae,2),te=s(t(O),2),Be=t(te,!0);r(te),r(O);var q=s(O,2),re=s(t(q),2),Te=t(re,!0);r(re),r(q);var F=s(q,2),oe=s(t(F),2),De=t(oe,!0);r(oe),r(F);var se=s(F,2),ne=s(t(se),2),Me=t(ne,!0);r(ne),r(se),r(ee),r(I);var K=s(I,2),G=t(K),Re=s(t(G),2);{var We=a=>{var o=oa();u(a,o)},je=a=>{var o=na();y(()=>{e(f),ue(()=>{e(M)})});var n=t(o);n.value=n.__value="";var p=s(n);Qe(p,1,()=>e(M),Ve,(S,g)=>{var P=sa(),Oe=t(P);r(P);var pe={};y(()=>{v(Oe,`${e(g),l(()=>e(g).name)??""} (${e(g),l(()=>e(g).endpoint?.name||"Unknown")??""})`),pe!==(pe=(e(g),l(()=>e(g).name)))&&(P.value=(P.__value=(e(g),l(()=>e(g).name)))??"")}),u(S,P)}),r(o),ye(o,()=>e(f),S=>i(f,S)),u(a,o)};U(Re,a=>{e(R)?a(We):a(je,!1)})}B(2),r(G);var H=s(G,2),J=s(t(H),2);y(()=>{e(_),ue(()=>{})});var Q=t(J);Q.value=Q.__value="roundrobin";var ie=s(Q);ie.value=ie.__value="pack",r(J),B(2),r(H);var de=s(H,2),V=t(de),le=t(V);me(le),B(2),r(V);var Ae=s(V,2);{var Ne=a=>{var o=ia(),n=s(t(o),2);me(n),B(2),r(o),y(()=>n.required=e(b)),Ze(n,()=>e(h),p=>i(h,p)),u(a,o)};U(Ae,a=>{e(b)&&a(Ne)})}r(de),r(K);var ce=s(K,2),ve=t(ce),X=s(ve,2),ze=t(X);{var Ie=a=>{var o=da();u(a,o)},Le=a=>{var o=He();y(n=>v(o,`Update ${n??""}`),[()=>l(W)]),u(a,o)};U(ze,a=>{e(C)?a(Ie):a(Le,!1)})}r(X),r(ce),r(z),r(j),y((a,o,n,p)=>{v(Ee,`Update ${a??""}`),v(Se,o),v(Ue,`${n??""} Information`),v(Be,(T(d()),l(()=>d().name))),v(Te,(T(d()),l(()=>d().endpoint?.name))),v(De,(T(d()),l(()=>d().credentials_name))),v(Me,(T(d()),l(()=>d().pool_balancing_type||"roundrobin"))),X.disabled=p},[()=>l(W),()=>l(_e),()=>l(W),()=>(e(C),e(b),e(h),l(()=>e(C)||e(b)&&!e(h).trim()))]),ye(J,()=>e(_),a=>i(_,a)),Ye(le,()=>e(b),a=>i(b,a)),be("click",ve,()=>$("close")),be("submit",z,ea(Ce)),u(c,j)},$$slots:{default:!0}}),Je()}export{_a as U}; +import"./DsnmJJEf.js";import{i as qe}from"./zNh6Oe5P.js";import{p as Fe,E as Ke,o as Ge,f as x,j as t,r,k as s,g as e,m,z as B,t as y,x as ue,u as l,v,n as T,s as i,e as be,c as u,D as He,d as Je}from"./sWNKMed7.js";import{p as ge,i as U}from"./Ccl3fNd2.js";import{e as Qe,i as Ve}from"./BuuPrWMc.js";import{r as me,b as ye,g as Xe}from"./t8NOL8UT.js";import{a as Ye,b as Ze}from"./CLagxtgo.js";import{p as ea}from"./D4Caz1gY.js";import{e as xe}from"./BZiHL9L3.js";import{M as aa}from"./-99ewtnX.js";var ta=x('

'),ra=x('
Owner:
'),oa=x('
'),sa=x(""),na=x(''),ia=x('

Leave empty to auto-generate a new secret

'),da=x('
Updating...
'),la=x('

Name:
Endpoint:
Current Credentials:
Current Pool Balancer:

Leave unchanged to keep current credentials

Round Robin distributes jobs evenly across pools, Pack fills pools in order

');function _a(fe,D){Fe(D,!1);let d=ge(D,"entity",8),w=ge(D,"entityType",8);const $=Ke();let C=m(!1),k=m(""),M=m([]),R=m(!1),f=m(""),_=m(""),h=m(""),b=m(!1);function _e(){if(w()==="repository"){const c=d();return`${c.owner}/${c.name}`}return d().name||""}function W(){return w().charAt(0).toUpperCase()+w().slice(1)}function he(){return w()==="repository"&&d().owner||""}async function ke(){try{i(R,!0),i(M,await Xe.listCredentials())}catch(c){i(k,xe(c))}finally{i(R,!1)}}function we(){i(f,d().credentials_name||""),i(_,d().pool_balancing_type||"roundrobin"),i(h,""),i(b,!1)}async function Ce(){try{i(C,!0),i(k,"");const c={};let E=!1;if(e(f)&&e(f)!==d().credentials_name&&(c.credentials_name=e(f),E=!0),e(_)&&e(_)!==d().pool_balancing_type&&(c.pool_balancer_type=e(_),E=!0),e(b)){if(!e(h).trim()){i(k,"Please enter a webhook secret or uncheck the option to change it");return}c.webhook_secret=e(h),E=!0}if(!E){$("close");return}$("submit",c)}catch(c){i(k,xe(c))}finally{i(C,!1)}}Ge(()=>{ke(),we()}),qe(),aa(fe,{$$events:{close:()=>$("close")},children:(c,E)=>{var j=la(),A=t(j),N=t(A),Ee=t(N);r(N);var Y=s(N,2),Se=t(Y,!0);r(Y),r(A);var z=s(A,2),Z=t(z);{var Pe=a=>{var o=ta(),n=t(o),p=t(n,!0);r(n),r(o),y(()=>v(p,e(k))),u(a,o)};U(Z,a=>{e(k)&&a(Pe)})}var I=s(Z,2),L=t(I),Ue=t(L);r(L);var ee=s(L,2),ae=t(ee);{var $e=a=>{var o=ra(),n=s(t(o),2),p=t(n,!0);r(n),r(o),y(S=>v(p,S),[()=>l(he)]),u(a,o)};U(ae,a=>{w()==="repository"&&a($e)})}var O=s(ae,2),te=s(t(O),2),Be=t(te,!0);r(te),r(O);var q=s(O,2),re=s(t(q),2),Te=t(re,!0);r(re),r(q);var F=s(q,2),oe=s(t(F),2),De=t(oe,!0);r(oe),r(F);var se=s(F,2),ne=s(t(se),2),Me=t(ne,!0);r(ne),r(se),r(ee),r(I);var K=s(I,2),G=t(K),Re=s(t(G),2);{var We=a=>{var o=oa();u(a,o)},je=a=>{var o=na();y(()=>{e(f),ue(()=>{e(M)})});var n=t(o);n.value=n.__value="";var p=s(n);Qe(p,1,()=>e(M),Ve,(S,g)=>{var P=sa(),Oe=t(P);r(P);var pe={};y(()=>{v(Oe,`${e(g),l(()=>e(g).name)??""} (${e(g),l(()=>e(g).endpoint?.name||"Unknown")??""})`),pe!==(pe=(e(g),l(()=>e(g).name)))&&(P.value=(P.__value=(e(g),l(()=>e(g).name)))??"")}),u(S,P)}),r(o),ye(o,()=>e(f),S=>i(f,S)),u(a,o)};U(Re,a=>{e(R)?a(We):a(je,!1)})}B(2),r(G);var H=s(G,2),J=s(t(H),2);y(()=>{e(_),ue(()=>{})});var Q=t(J);Q.value=Q.__value="roundrobin";var ie=s(Q);ie.value=ie.__value="pack",r(J),B(2),r(H);var de=s(H,2),V=t(de),le=t(V);me(le),B(2),r(V);var Ae=s(V,2);{var Ne=a=>{var o=ia(),n=s(t(o),2);me(n),B(2),r(o),y(()=>n.required=e(b)),Ze(n,()=>e(h),p=>i(h,p)),u(a,o)};U(Ae,a=>{e(b)&&a(Ne)})}r(de),r(K);var ce=s(K,2),ve=t(ce),X=s(ve,2),ze=t(X);{var Ie=a=>{var o=da();u(a,o)},Le=a=>{var o=He();y(n=>v(o,`Update ${n??""}`),[()=>l(W)]),u(a,o)};U(ze,a=>{e(C)?a(Ie):a(Le,!1)})}r(X),r(ce),r(z),r(j),y((a,o,n,p)=>{v(Ee,`Update ${a??""}`),v(Se,o),v(Ue,`${n??""} Information`),v(Be,(T(d()),l(()=>d().name))),v(Te,(T(d()),l(()=>d().endpoint?.name))),v(De,(T(d()),l(()=>d().credentials_name))),v(Me,(T(d()),l(()=>d().pool_balancing_type||"roundrobin"))),X.disabled=p},[()=>l(W),()=>l(_e),()=>l(W),()=>(e(C),e(b),e(h),l(()=>e(C)||e(b)&&!e(h).trim()))]),ye(J,()=>e(_),a=>i(_,a)),Ye(le,()=>e(b),a=>i(b,a)),be("click",ve,()=>$("close")),be("submit",z,ea(Ce)),u(c,j)},$$slots:{default:!0}}),Je()}export{_a as U}; diff --git a/webapp/assets/_app/immutable/chunks/BsqC4UA1.js b/webapp/assets/_app/immutable/chunks/otv9vQQV.js similarity index 93% rename from webapp/assets/_app/immutable/chunks/BsqC4UA1.js rename to webapp/assets/_app/immutable/chunks/otv9vQQV.js index 706e99fa..44fcbc03 100644 --- a/webapp/assets/_app/immutable/chunks/BsqC4UA1.js +++ b/webapp/assets/_app/immutable/chunks/otv9vQQV.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as ae}from"./B3Pzt0F_.js";import{p as se,E as re,l as M,n as ie,s as r,g as t,m as k,a as le,f as p,j as v,k as $,r as f,c as l,d as oe,B as T,b as E,z as V,D as q,t as F,v as N,u as ne}from"./D8EpLgQ1.js";import{p as R,i as m}from"./5WA7h8uK.js";import{g as u,B as G}from"./CiE1LlKV.js";import{t as y}from"./BEkVdVE1.js";import{e as de}from"./BZiHL9L3.js";var ce=p('
Checking...
'),ve=p('
'),fe=p('
Webhook installed
',1),ue=p('
No webhook installed
'),he=p('

Webhook Status

');function _e(H,g){se(g,!1);const x=k();let h=R(g,"entityType",8),s=R(g,"entityId",8),j=R(g,"entityName",8),i=k(null),o=k(!1),b=k(!0);const A=re();async function _(){if(s())try{r(b,!0),h()==="repository"?r(i,await u.getRepositoryWebhookInfo(s())):r(i,await u.getOrganizationWebhookInfo(s()))}catch(e){e&&typeof e=="object"&&"response"in e&&e.response?.status===404?r(i,null):(console.warn("Failed to check webhook status:",e),r(i,null))}finally{r(b,!1)}}async function J(){if(s())try{r(o,!0),h()==="repository"?await u.installRepositoryWebhook(s()):await u.installOrganizationWebhook(s()),y.success("Webhook Installed",`Webhook for ${h()} ${j()} has been installed successfully.`),await _(),A("webhookStatusChanged",{installed:!0})}catch(e){y.error("Webhook Installation Failed",e instanceof Error?e.message:"Failed to install webhook.")}finally{r(o,!1)}}async function K(){if(s())try{r(o,!0),h()==="repository"?await u.uninstallRepositoryWebhook(s()):await u.uninstallOrganizationWebhook(s()),y.success("Webhook Uninstalled",`Webhook for ${h()} ${j()} has been uninstalled successfully.`),await _(),A("webhookStatusChanged",{installed:!1})}catch(e){y.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}M(()=>ie(s()),()=>{s()&&_()}),M(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=he(),O=v(w),P=v(O),W=v(P),D=$(v(W),2),Q=v(D);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),z=E(d);{var I=a=>{var n=fe(),B=$(E(n),2);{var c=C=>{var U=ve(),te=v(U);f(U),F(()=>N(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(C,U)};m(B,C=>{t(i)&&C(c)})}l(a,n)},S=a=>{var n=ue();l(a,n)};m(z,a=>{t(x)?a(I):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(D),f(W);var L=$(W,2),Z=v(L);{var ee=e=>{var d=T(),z=E(d);{var I=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,B)=>{V();var c=q();F(()=>N(c,t(o)?"Uninstalling...":"Uninstall")),l(n,c)},$$slots:{default:!0}})},S=a=>{G(a,{variant:"primary",size:"sm",get disabled(){return t(o)},$$events:{click:J},children:(n,B)=>{V();var c=q();F(()=>N(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(z,a=>{t(x)?a(I):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(L),f(P),f(O),f(w),l(H,w),oe()}export{_e as W}; +import"./DsnmJJEf.js";import{i as ae}from"./zNh6Oe5P.js";import{p as se,E as re,l as M,n as ie,s as r,g as t,m as k,a as le,f as p,j as v,k as $,r as f,c as l,d as oe,B as T,b as E,z as V,D as q,t as F,v as N,u as ne}from"./sWNKMed7.js";import{p as R,i as m}from"./Ccl3fNd2.js";import{g as u,B as G}from"./t8NOL8UT.js";import{t as y}from"./BZUCTtPY.js";import{e as de}from"./BZiHL9L3.js";var ce=p('
Checking...
'),ve=p('
'),fe=p('
Webhook installed
',1),ue=p('
No webhook installed
'),he=p('

Webhook Status

');function _e(H,g){se(g,!1);const x=k();let h=R(g,"entityType",8),s=R(g,"entityId",8),j=R(g,"entityName",8),i=k(null),o=k(!1),b=k(!0);const A=re();async function _(){if(s())try{r(b,!0),h()==="repository"?r(i,await u.getRepositoryWebhookInfo(s())):r(i,await u.getOrganizationWebhookInfo(s()))}catch(e){e&&typeof e=="object"&&"response"in e&&e.response?.status===404?r(i,null):(console.warn("Failed to check webhook status:",e),r(i,null))}finally{r(b,!1)}}async function J(){if(s())try{r(o,!0),h()==="repository"?await u.installRepositoryWebhook(s()):await u.installOrganizationWebhook(s()),y.success("Webhook Installed",`Webhook for ${h()} ${j()} has been installed successfully.`),await _(),A("webhookStatusChanged",{installed:!0})}catch(e){y.error("Webhook Installation Failed",e instanceof Error?e.message:"Failed to install webhook.")}finally{r(o,!1)}}async function K(){if(s())try{r(o,!0),h()==="repository"?await u.uninstallRepositoryWebhook(s()):await u.uninstallOrganizationWebhook(s()),y.success("Webhook Uninstalled",`Webhook for ${h()} ${j()} has been uninstalled successfully.`),await _(),A("webhookStatusChanged",{installed:!1})}catch(e){y.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}M(()=>ie(s()),()=>{s()&&_()}),M(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=he(),O=v(w),P=v(O),W=v(P),D=$(v(W),2),Q=v(D);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),z=E(d);{var I=a=>{var n=fe(),B=$(E(n),2);{var c=C=>{var U=ve(),te=v(U);f(U),F(()=>N(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(C,U)};m(B,C=>{t(i)&&C(c)})}l(a,n)},S=a=>{var n=ue();l(a,n)};m(z,a=>{t(x)?a(I):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(D),f(W);var L=$(W,2),Z=v(L);{var ee=e=>{var d=T(),z=E(d);{var I=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,B)=>{V();var c=q();F(()=>N(c,t(o)?"Uninstalling...":"Uninstall")),l(n,c)},$$slots:{default:!0}})},S=a=>{G(a,{variant:"primary",size:"sm",get disabled(){return t(o)},$$events:{click:J},children:(n,B)=>{V();var c=q();F(()=>N(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(z,a=>{t(x)?a(I):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(L),f(P),f(O),f(w),l(H,w),oe()}export{_e as W}; diff --git a/webapp/assets/_app/immutable/chunks/D8EpLgQ1.js b/webapp/assets/_app/immutable/chunks/sWNKMed7.js similarity index 99% rename from webapp/assets/_app/immutable/chunks/D8EpLgQ1.js rename to webapp/assets/_app/immutable/chunks/sWNKMed7.js index b9d9b59c..545a4b36 100644 --- a/webapp/assets/_app/immutable/chunks/D8EpLgQ1.js +++ b/webapp/assets/_app/immutable/chunks/sWNKMed7.js @@ -1,2 +1,2 @@ var Je=Array.isArray,wn=Array.prototype.indexOf,yn=Array.from,$e=Object.defineProperty,be=Object.getOwnPropertyDescriptor,gn=Object.getOwnPropertyDescriptors,bn=Object.prototype,mn=Array.prototype,At=Object.getPrototypeOf,dt=Object.isExtensible;function Mr(e){return typeof e=="function"}const Ne=()=>{};function Lr(e){return e()}function St(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const k=2,Qe=4,qe=8,Ae=16,Y=32,ae=64,kt=128,O=256,De=512,m=1024,P=2048,H=4096,W=8192,de=16384,et=32768,Ct=65536,ht=1<<17,Rt=1<<18,tt=1<<19,nt=1<<20,Be=1<<21,rt=1<<22,X=1<<23,Z=Symbol("$state"),Fr=Symbol("legacy props"),qr=Symbol(""),at=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},st=3,me=8;function Tn(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function he(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function xn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function kn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Cn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Rn(){throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction")}function On(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ot(e){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function Vr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Nn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const Yr=1,Hr=2,Ur=4,$r=8,Br=16,Wr=1,zr=2,Gr=4,Kr=8,Xr=16,Nt=1,In=2,it="[",Mn="[!",Pt="]",oe={},E=Symbol(),Zr="http://www.w3.org/1999/xhtml",Jr="@attach";function je(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Qr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let g=!1;function fe(e){g=e}let w;function I(e){if(e===null)throw je(),oe;return w=e}function ut(){return I(M(w))}function ea(e){if(g){if(M(w)!==null)throw je(),oe;w=e}}function ta(e=1){if(g){for(var t=e,n=w;t--;)n=M(n);w=n}}function na(){for(var e=0,t=w;;){if(t.nodeType===me){var n=t.data;if(n===Pt){if(e===0)return t;e-=1}else(n===it||n===Mn)&&(e+=1)}var r=M(t);t.remove(),t=r}}function ra(e){if(!e||e.nodeType!==me)throw je(),oe;return e.data}function Dt(e){return e===this.v}function It(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function aa(e,t){return e!==t}function Mt(e){return!It(e,this.v)}let Se=!1;function sa(){Se=!0}let p=null;function Ie(e){p=e}function Ln(e){return Ve().get(e)}function Fn(e,t){return Ve().set(e,t),t}function qn(e){return Ve().has(e)}function jn(){return Ve()}function Vn(e,t=!1,n){p={p,c:null,e:null,s:e,x:null,l:Se&&!t?{s:null,u:null,$:[]}:null}}function Yn(e){var t=p,n=t.e;if(n!==null){t.e=null;for(var r of n)Jt(r)}return p=t.p,{}}function ke(){return!Se||p!==null&&p.l===null}function Ve(e){return p===null&&he(),p.c??=new Map(Hn(p)||void 0)}function Hn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}const Un=new WeakMap;function $n(e){var t=h;if(t===null)return d.f|=X,e;if((t.f&et)===0){if((t.f&kt)===0)throw!t.parent&&e instanceof Error&&Lt(e),e;t.b.error(e)}else lt(e,t)}function lt(e,t){for(;t!==null;){if((t.f&kt)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&Lt(e),e}function Lt(e){const t=Un.get(e);t&&($e(e,"message",{value:t.message}),$e(e,"stack",{value:t.stack}))}const Bn=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let Ee=[],Te=[];function Ft(){var e=Ee;Ee=[],St(e)}function qt(){var e=Te;Te=[],St(e)}function jt(e){Ee.length===0&&queueMicrotask(Ft),Ee.push(e)}function ia(e){Te.length===0&&Bn(qt),Te.push(e)}function Wn(){Ee.length>0&&Ft(),Te.length>0&&qt()}function zn(){for(var e=h.b;e!==null&&!e.has_pending_snippet();)e=e.parent;return e===null&&Tn(),e}function ft(e){var t=k|P,n=d!==null&&(d.f&k)!==0?d:null;return h===null||n!==null&&(n.f&O)!==0?t|=O:h.f|=tt,{ctx:p,deps:null,effects:null,equals:Dt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??h,ac:null}}function Gn(e,t){let n=h;n===null&&xn();var r=n.b,s=void 0,a=ct(E),i=null,f=!d;return ar(()=>{try{var u=e()}catch(_){u=Promise.reject(_)}var l=()=>u;s=i?.then(l,l)??Promise.resolve(u),i=s;var o=y,v=r.pending;f&&(r.update_pending_count(1),v||o.increment());const c=(_,b=void 0)=>{i=null,v||o.activate(),b?b!==at&&(a.f|=X,Le(a,b)):((a.f&X)!==0&&(a.f^=X),Le(a,_)),f&&(r.update_pending_count(-1),v||o.decrement()),Ht()};if(s.then(c,_=>c(null,_||"unknown")),o)return()=>{queueMicrotask(()=>o.neuter())}}),new Promise(u=>{function l(o){function v(){o===s?u(a):l(s)}o.then(v,v)}l(s)})}function ua(e){const t=ft(e);return sn(t),t}function Kn(e){const t=ft(e);return t.equals=Mt,t}function Vt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;nGn(u))).then(u=>{s?.activate(),i();try{n([...e.map(r),...u])}catch(l){(a.f&de)===0&<(l,a)}s?.deactivate(),Ht()}).catch(u=>{f.error(u)})}function Jn(){var e=h,t=d,n=p;return function(){G(e),L(t),Ie(n)}}function Ht(){G(null),L(null),Ie(null)}const we=new Set;let y=null,He=null,ve=null,pt=new Set,Me=[];function Ut(){const e=Me.shift();Me.length>0&&queueMicrotask(Ut),e()}let ee=[],Ye=null,We=!1,Pe=!1;class te{current=new Map;#a=new Map;#s=new Set;#e=0;#f=null;#o=!1;#n=[];#i=[];#r=[];#t=[];#u=[];#c=[];#_=[];skipped_effects=new Set;process(t){ee=[],He=null;var n=null;if(we.size>1){n=new Map,ve=new Map;for(const[a,i]of this.current)n.set(a,{v:a.v,wv:a.wv}),a.v=i;for(const a of we)if(a!==this)for(const[i,f]of a.#a)n.has(i)||(n.set(i,{v:i.v,wv:i.wv}),i.v=f)}for(const a of t)this.#d(a);if(this.#n.length===0&&this.#e===0){this.#v();var r=this.#r,s=this.#t;this.#r=[],this.#t=[],this.#u=[],He=y,y=null,wt(r),wt(s),y===null?y=this:we.delete(this),this.#f?.resolve()}else this.#l(this.#r),this.#l(this.#t),this.#l(this.#u);if(n){for(const[a,{v:i,wv:f}]of n)a.wv<=f&&(a.v=i);ve=null}for(const a of this.#n)_e(a);for(const a of this.#i)_e(a);this.#n=[],this.#i=[]}#d(t){t.f^=m;for(var n=t.first;n!==null;){var r=n.f,s=(r&(Y|ae))!==0,a=s&&(r&m)!==0,i=a||(r&W)!==0||this.skipped_effects.has(n);if(!i&&n.fn!==null){if(s)n.f^=m;else if((r&m)===0)if((r&Qe)!==0)this.#t.push(n);else if((r&rt)!==0){var f=n.b?.pending?this.#i:this.#n;f.push(n)}else Ce(n)&&((n.f&Ae)!==0&&this.#u.push(n),_e(n));var u=n.first;if(u!==null){n=u;continue}}var l=n.parent;for(n=n.next;n===null&&l!==null;)n=l.next,l=l.parent}}#l(t){for(const n of t)((n.f&P)!==0?this.#c:this.#_).push(n),x(n,m);t.length=0}capture(t,n){this.#a.has(t)||this.#a.set(t,n),this.current.set(t,t.v)}activate(){y=this}deactivate(){y=null,He=null;for(const t of pt)if(pt.delete(t),t(),y!==null)break}neuter(){this.#o=!0}flush(){ee.length>0?ze():this.#v(),y===this&&(this.#e===0&&we.delete(this),this.deactivate())}#v(){if(!this.#o)for(const t of this.#s)t();this.#s.clear()}increment(){this.#e+=1}decrement(){if(this.#e-=1,this.#e===0){for(const t of this.#c)x(t,P),ne(t);for(const t of this.#_)x(t,H),ne(t);this.#r=[],this.#t=[],this.flush()}else this.deactivate()}add_callback(t){this.#s.add(t)}settled(){return(this.#f??=En()).promise}static ensure(){if(y===null){const t=y=new te;we.add(y),Pe||te.enqueue(()=>{y===t&&t.flush()})}return y}static enqueue(t){Me.length===0&&queueMicrotask(Ut),Me.unshift(t)}}function $t(e){var t=Pe;Pe=!0;try{var n;for(e&&(ze(),n=e());;){if(Wn(),ee.length===0&&(y?.flush(),ee.length===0))return Ye=null,n;ze()}}finally{Pe=t}}function ze(){var e=ce;We=!0;try{var t=0;for(bt(!0);ee.length>0;){var n=te.ensure();if(t++>1e3){var r,s;Qn()}n.process(ee),J.clear()}}finally{We=!1,bt(e),Ye=null}}function Qn(){try{Cn()}catch(e){lt(e,Ye)}}function wt(e){var t=e.length;if(t!==0){for(var n=0;ns&&(r.f&nt)!==0)break}}for(;nK(e))),t}function j(e,t,n=!1){d!==null&&(!D||(d.f&ht)!==0)&&ke()&&(d.f&(k|Ae|rt|ht))!==0&&!V?.includes(e)&&Dn();let r=n?ye(t):t;return Le(e,r)}function Le(e,t){if(!e.equals(t)){var n=e.v;pe?J.set(e,t):J.set(e,n),e.v=t;var r=te.ensure();r.capture(e,n),(e.f&k)!==0&&((e.f&P)!==0&&ot(e),x(e,(e.f&O)===0?m:H)),e.wv=ln(),Bt(e,P),ke()&&h!==null&&(h.f&m)!==0&&(h.f&(Y|ae))===0&&(R===null?_r([e]):R.push(e))}return t}function oa(e,t=1){var n=K(e),r=t===1?n++:n--;return j(e,n),r}function Ue(e){j(e,e.v+1)}function Bt(e,t){var n=e.reactions;if(n!==null)for(var r=ke(),s=n.length,a=0;a{if(Q===a)return f();var u=d,l=Q;L(null),Et(a);var o=f();return L(u),Et(l),o};return r&&n.set("length",$(e.length)),new Proxy(e,{defineProperty(f,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Nn();var o=n.get(u);return o===void 0?o=i(()=>{var v=$(l.value);return n.set(u,v),v}):j(o,l.value,!0),!0},deleteProperty(f,u){var l=n.get(u);if(l===void 0){if(u in f){const o=i(()=>$(E));n.set(u,o),Ue(s)}}else j(l,E),Ue(s);return!0},get(f,u,l){if(u===Z)return e;var o=n.get(u),v=u in f;if(o===void 0&&(!v||be(f,u)?.writable)&&(o=i(()=>{var _=ye(v?f[u]:E),b=$(_);return b}),n.set(u,o)),o!==void 0){var c=K(o);return c===E?void 0:c}return Reflect.get(f,u,l)},getOwnPropertyDescriptor(f,u){var l=Reflect.getOwnPropertyDescriptor(f,u);if(l&&"value"in l){var o=n.get(u);o&&(l.value=K(o))}else if(l===void 0){var v=n.get(u),c=v?.v;if(v!==void 0&&c!==E)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return l},has(f,u){if(u===Z)return!0;var l=n.get(u),o=l!==void 0&&l.v!==E||Reflect.has(f,u);if(l!==void 0||h!==null&&(!o||be(f,u)?.writable)){l===void 0&&(l=i(()=>{var c=o?ye(f[u]):E,_=$(c);return _}),n.set(u,l));var v=K(l);if(v===E)return!1}return o},set(f,u,l,o){var v=n.get(u),c=u in f;if(r&&u==="length")for(var _=l;_$(E)),n.set(_+"",b))}if(v===void 0)(!c||be(f,u)?.writable)&&(v=i(()=>$(void 0)),j(v,ye(l)),n.set(u,v));else{c=v.v!==E;var q=i(()=>ye(l));j(v,q)}var Re=Reflect.getOwnPropertyDescriptor(f,u);if(Re?.set&&Re.set.call(o,l),!c){if(r&&typeof u=="string"){var Oe=n.get("length"),U=Number(u);Number.isInteger(U)&&U>=Oe.v&&j(Oe,U+1)}Ue(s)}return!0},ownKeys(f){K(s);var u=Reflect.ownKeys(f).filter(v=>{var c=n.get(v);return c===void 0||c.v!==E});for(var[l,o]of n)o.v!==E&&!(l in f)&&u.push(l);return u},setPrototypeOf(){Pn()}})}function yt(e){try{if(e!==null&&typeof e=="object"&&Z in e)return e[Z]}catch{}return e}function ca(e,t){return Object.is(yt(e),yt(t))}var gt,er,Wt,zt,Gt;function Ge(){if(gt===void 0){gt=window,er=document,Wt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;zt=be(t,"firstChild").get,Gt=be(t,"nextSibling").get,dt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),dt(n)&&(n.__t=void 0)}}function z(e=""){return document.createTextNode(e)}function A(e){return zt.call(e)}function M(e){return Gt.call(e)}function _a(e,t){if(!g)return A(e);var n=A(w);if(n===null)n=w.appendChild(z());else if(t&&n.nodeType!==st){var r=z();return n?.before(r),I(r),r}return I(n),n}function va(e,t){if(!g){var n=A(e);return n instanceof Comment&&n.data===""?M(n):n}return w}function da(e,t=1,n=!1){let r=g?w:e;for(var s;t--;)s=r,r=M(r);if(!g)return r;if(n&&r?.nodeType!==st){var a=z();return r===null?s?.after(a):r.before(a),I(a),a}return I(r),r}function Kt(e){e.textContent=""}function ha(){return!1}function Xt(e){h===null&&d===null&&kn(),d!==null&&(d.f&O)!==0&&h===null&&Sn(),pe&&An()}function tr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function F(e,t,n,r=!0){var s=h;s!==null&&(s.f&W)!==0&&(e|=W);var a={ctx:p,deps:null,nodes_start:null,nodes_end:null,f:e|P,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{_e(a),a.f|=et}catch(u){throw re(a),u}else t!==null&&ne(a);var i=n&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&tt)===0;if(!i&&r&&(s!==null&&tr(a,s),d!==null&&(d.f&k)!==0&&(e&ae)===0)){var f=d;(f.effects??=[]).push(a)}return a}function Zt(e){const t=F(qe,null,!1);return x(t,m),t.teardown=e,t}function nr(e){Xt();var t=h.f,n=!d&&(t&Y)!==0&&(t&et)===0;if(n){var r=p;(r.e??=[]).push(e)}else return Jt(e)}function Jt(e){return F(Qe|nt,e,!1)}function pa(e){return Xt(),F(qe|nt,e,!0)}function rr(e){te.ensure();const t=F(ae,e,!0);return(n={})=>new Promise(r=>{n.outro?fr(t,()=>{re(t),r(void 0)}):(re(t),r(void 0))})}function wa(e){return F(Qe,e,!1)}function ya(e,t){var n=p,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Qt(()=>{e(),!r.ran&&(r.ran=!0,se(t))})}function ga(){var e=p;Qt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&m)!==0&&x(n,H),Ce(n)&&_e(n),t.ran=!1}})}function ar(e){return F(rt|tt,e,!0)}function Qt(e,t=0){return F(qe|t,e,!0)}function ba(e,t=[],n=[]){Zn(t,n,r=>{F(qe,()=>e(...r.map(K)),!0)})}function sr(e,t=0){var n=F(Ae|t,e,!0);return n}function ir(e,t=!0){return F(Y,e,!0,t)}function en(e){var t=e.teardown;if(t!==null){const n=pe,r=d;mt(!0),L(null);try{t.call(null)}finally{mt(n),L(r)}}}function tn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){n.ac?.abort(at);var r=n.next;(n.f&ae)!==0?n.parent=null:re(n,t),n=r}}function ur(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Y)===0&&re(t),t=n}}function re(e,t=!0){var n=!1;(t||(e.f&Rt)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(lr(e.nodes_start,e.nodes_end),n=!0),tn(e,t&&!n),Fe(e,0),x(e,de);var r=e.transitions;if(r!==null)for(const a of r)a.stop();en(e);var s=e.parent;s!==null&&s.first!==null&&nn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function lr(e,t){for(;e!==null;){var n=e===t?null:M(e);e.remove(),e=n}}function nn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function fr(e,t){var n=[];rn(e,n,!0),or(n,()=>{re(e),t&&t()})}function or(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function rn(e,t,n){if((e.f&W)===0){if(e.f^=W,e.transitions!==null)for(const i of e.transitions)(i.is_global||n)&&t.push(i);for(var r=e.first;r!==null;){var s=r.next,a=(r.f&Ct)!==0||(r.f&Y)!==0;rn(r,t,a?n:!1),r=s}}}function ma(e){an(e,!0)}function an(e,t){if((e.f&W)!==0){e.f^=W,(e.f&m)===0&&(x(e,P),ne(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Ct)!==0||(n.f&Y)!==0;an(n,s?t:!1),n=r}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let le=null;function cr(e){var t=le;try{if(le=new Set,se(e),t!==null)for(var n of le)t.add(n);return le}finally{le=t}}function Ea(e){for(var t of cr(e))Le(t,t.v)}let ce=!1;function bt(e){ce=e}let pe=!1;function mt(e){pe=e}let d=null,D=!1;function L(e){d=e}let h=null;function G(e){h=e}let V=null;function sn(e){d!==null&&(V===null?V=[e]:V.push(e))}let T=null,S=0,R=null;function _r(e){R=e}let un=1,xe=0,Q=xe;function Et(e){Q=e}let B=!1;function ln(){return++un}function Ce(e){var t=e.f;if((t&P)!==0)return!0;if((t&H)!==0){var n=e.deps,r=(t&O)!==0;if(n!==null){var s,a,i=(t&De)!==0,f=r&&h!==null&&!B,u=n.length;if((i||f)&&(h===null||(h.f&de)===0)){var l=e,o=l.parent;for(s=0;se.wv)return!0}(!r||h!==null&&!B)&&x(e,m)}return!1}function fn(e,t,n=!0){var r=e.reactions;if(r!==null&&!V?.includes(e))for(var s=0;s0)for(c.length=S+T.length,_=0;_{document.activeElement===n&&e.focus()})}}function Ca(e){g&&A(e)!==null&&Kt(e)}let Tt=!1;function mr(){Tt||(Tt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function _n(e){var t=d,n=h;L(null),G(null);try{return e()}finally{L(t),G(n)}}function Ra(e,t,n,r=n){e.addEventListener(t,()=>_n(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),mr()}const vn=new Set,Xe=new Set;function Er(e,t,n,r={}){function s(a){if(r.capture||ge.call(t,a),!a.cancelBubble)return _n(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?jt(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Oa(e,t,n,r,s){var a={capture:r,passive:s},i=Er(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Zt(()=>{t.removeEventListener(e,i,a)})}function Na(e){for(var t=0;t{throw U});throw c}}finally{e.__root=t,delete e.currentTarget,L(o),G(v)}}}let C;function Tr(){C=void 0}function Pa(e){let t=null,n=g;var r;if(g){for(t=w,C===void 0&&(C=A(document.head));C!==null&&(C.nodeType!==me||C.data!==it);)C=M(C);C===null?fe(!1):C=I(M(C))}g||(r=document.head.appendChild(z()));try{sr(()=>e(r),Rt)}finally{n&&(fe(!0),C=w,I(t))}}function _t(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("",""),t.content}function N(e,t){var n=h;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function Da(e,t){var n=(t&Nt)!==0,r=(t&In)!==0,s,a=!e.startsWith("");return()=>{if(g)return N(w,null),w;s===void 0&&(s=_t(a?e:""+e),n||(s=A(s)));var i=r||Wt?document.importNode(s,!0):s.cloneNode(!0);if(n){var f=A(i),u=i.lastChild;N(f,u)}else N(i,i);return i}}function xr(e,t,n="svg"){var r=!e.startsWith(""),s=(t&Nt)!==0,a=`<${n}>${r?e:""+e}`,i;return()=>{if(g)return N(w,null),w;if(!i){var f=_t(a),u=A(f);if(s)for(i=document.createDocumentFragment();A(u);)i.appendChild(A(u));else i=A(u)}var l=i.cloneNode(!0);if(s){var o=A(l),v=l.lastChild;N(o,v)}else N(l,l);return l}}function Ia(e,t){return xr(e,t,"svg")}function Ma(e=""){if(!g){var t=z(e+"");return N(t,t),t}var n=w;return n.nodeType!==st&&(n.before(n=z()),I(n)),N(n,n),n}function La(){if(g)return N(w,null),w;var e=document.createDocumentFragment(),t=document.createComment(""),n=z();return e.append(t,n),N(t,n),e}function Fa(e,t){if(g){h.nodes_end=w,ut();return}e!==null&&e.before(t)}function qa(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function dn(e,t){return hn(e,t)}function Ar(e,t){Ge(),t.intro=t.intro??!1;const n=t.target,r=g,s=w;try{for(var a=A(n);a&&(a.nodeType!==me||a.data!==it);)a=M(a);if(!a)throw oe;fe(!0),I(a),ut();const i=hn(e,{...t,anchor:a});if(w===null||w.nodeType!==me||w.data!==Pt)throw je(),oe;return fe(!1),i}catch(i){if(i instanceof Error&&i.message.split(` -`).some(f=>f.startsWith("https://svelte.dev/e/")))throw i;return i!==oe&&console.warn("Failed to hydrate: ",i),t.recover===!1&&On(),Ge(),Kt(n),fe(!1),dn(e,t)}finally{fe(r),I(s),Tr()}}const ie=new Map;function hn(e,{target:t,anchor:n,props:r={},events:s,context:a,intro:i=!0}){Ge();var f=new Set,u=v=>{for(var c=0;c{var v=n??t.appendChild(z());return ir(()=>{if(a){Vn({});var c=p;c.c=a}s&&(r.$$events=s),g&&N(v,null),l=e(v,r)||{},g&&(h.nodes_end=w),a&&Yn()}),()=>{for(var c of f){t.removeEventListener(c,ge);var _=ie.get(c);--_===0?(document.removeEventListener(c,ge),ie.delete(c)):ie.set(c,_)}Xe.delete(u),v!==n&&v.parentNode?.removeChild(v)}});return Ze.set(l,o),l}let Ze=new WeakMap;function Sr(e,t){const n=Ze.get(e);return n?(Ze.delete(e),n(t)):Promise.resolve()}function kr(e){return(t,...n)=>{var r=e(...n),s;if(g)s=w,ut();else{var a=r.render().trim(),i=_t(a);s=A(i),t.before(s)}const f=r.setup?.(s);N(s,s),typeof f=="function"&&Zt(f)}}function Cr(e,t,n){if(e==null)return t(void 0),Ne;const r=se(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const ue=[];function ja(e,t=Ne){let n=null;const r=new Set;function s(f){if(It(e,f)&&(e=f,n)){const u=!ue.length;for(const l of r)l[1](),ue.push(l,e);if(u){for(let l=0;l{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:s,update:a,subscribe:i}}function Va(e){let t;return Cr(e,n=>t=n)(),t}function Rr(){return d===null&&Rn(),(d.ac??=new AbortController).signal}function pn(e){p===null&&he(),Se&&p.l!==null?vt(p).m.push(e):nr(()=>{const t=se(e);if(typeof t=="function")return t})}function Or(e){p===null&&he(),pn(()=>()=>se(e))}function Nr(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function Pr(){const e=p;return e===null&&he(),(t,n,r)=>{const s=e.s.$$events?.[t];if(s){const a=Je(s)?s.slice():[s],i=Nr(t,n,r);for(const f of a)f.call(e.x,i);return!i.defaultPrevented}return!0}}function Dr(e){p===null&&he(),p.l===null&&Ot(),vt(p).b.push(e)}function Ir(e){p===null&&he(),p.l===null&&Ot(),vt(p).a.push(e)}function vt(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Ya=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:Ir,beforeUpdate:Dr,createEventDispatcher:Pr,createRawSnippet:kr,flushSync:$t,getAbortSignal:Rr,getAllContexts:jn,getContext:Ln,hasContext:qn,hydrate:Ar,mount:dn,onDestroy:Or,onMount:pn,setContext:Fn,settled:hr,tick:dr,unmount:Sr,untrack:se},Symbol.toStringTag,{value:"Module"}));export{er as $,Or as A,La as B,Ia as C,Ma as D,Pr as E,wa as F,Qt as G,jt as H,ja as I,Va as J,g as K,ut as L,sr as M,Ct as N,z as O,ir as P,y as Q,ha as R,Z as S,w as T,fr as U,ke as V,Ra as W,He as X,I as Y,A as Z,ra as _,ga as a,Qr as a$,Mn as a0,na as a1,fe as a2,me as a3,Pt as a4,Le as a5,ct as a6,yn as a7,Je as a8,Hr as a9,Gr as aA,ye as aB,de as aC,Kr as aD,Se as aE,zr as aF,Wr as aG,oa as aH,G as aI,Xr as aJ,pe as aK,Fr as aL,Mr as aM,Ar as aN,dn as aO,$t as aP,Sr as aQ,$ as aR,dr as aS,ua as aT,aa as aU,It as aV,lr as aW,je as aX,oe as aY,N as aZ,_t as a_,ma as aa,Yr as ab,Br as ac,W as ad,re as ae,M as af,rn as ag,Kt as ah,or as ai,h as aj,Ur as ak,$r as al,p as am,pa as an,nr as ao,Lr as ap,St as aq,ft as ar,sa as as,E as at,Ne as au,Cr as av,Zt as aw,$e as ax,be as ay,Vr as az,va as b,ca as b0,Zn as b1,Zr as b2,At as b3,Jr as b4,gn as b5,xa as b6,Er as b7,Na as b8,ka as b9,Sa as ba,ia as bb,mr as bc,qr as bd,Aa as be,Ya as bf,Fa as c,Yn as d,Oa as e,Da as f,K as g,Pa as h,gt as i,_a as j,da as k,ya as l,la as m,Ta as n,pn as o,Vn as p,Kn as q,ea as r,j as s,ba as t,se as u,qa as v,Ca as w,Ea as x,fa as y,ta as z}; +`).some(f=>f.startsWith("https://svelte.dev/e/")))throw i;return i!==oe&&console.warn("Failed to hydrate: ",i),t.recover===!1&&On(),Ge(),Kt(n),fe(!1),dn(e,t)}finally{fe(r),I(s),Tr()}}const ie=new Map;function hn(e,{target:t,anchor:n,props:r={},events:s,context:a,intro:i=!0}){Ge();var f=new Set,u=v=>{for(var c=0;c{var v=n??t.appendChild(z());return ir(()=>{if(a){Vn({});var c=p;c.c=a}s&&(r.$$events=s),g&&N(v,null),l=e(v,r)||{},g&&(h.nodes_end=w),a&&Yn()}),()=>{for(var c of f){t.removeEventListener(c,ge);var _=ie.get(c);--_===0?(document.removeEventListener(c,ge),ie.delete(c)):ie.set(c,_)}Xe.delete(u),v!==n&&v.parentNode?.removeChild(v)}});return Ze.set(l,o),l}let Ze=new WeakMap;function Sr(e,t){const n=Ze.get(e);return n?(Ze.delete(e),n(t)):Promise.resolve()}function kr(e){return(t,...n)=>{var r=e(...n),s;if(g)s=w,ut();else{var a=r.render().trim(),i=_t(a);s=A(i),t.before(s)}const f=r.setup?.(s);N(s,s),typeof f=="function"&&Zt(f)}}function Cr(e,t,n){if(e==null)return t(void 0),Ne;const r=se(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const ue=[];function ja(e,t=Ne){let n=null;const r=new Set;function s(f){if(It(e,f)&&(e=f,n)){const u=!ue.length;for(const l of r)l[1](),ue.push(l,e);if(u){for(let l=0;l{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:s,update:a,subscribe:i}}function Va(e){let t;return Cr(e,n=>t=n)(),t}function Rr(){return d===null&&Rn(),(d.ac??=new AbortController).signal}function pn(e){p===null&&he(),Se&&p.l!==null?vt(p).m.push(e):nr(()=>{const t=se(e);if(typeof t=="function")return t})}function Or(e){p===null&&he(),pn(()=>()=>se(e))}function Nr(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function Pr(){const e=p;return e===null&&he(),(t,n,r)=>{const s=e.s.$$events?.[t];if(s){const a=Je(s)?s.slice():[s],i=Nr(t,n,r);for(const f of a)f.call(e.x,i);return!i.defaultPrevented}return!0}}function Dr(e){p===null&&he(),p.l===null&&Ot(),vt(p).b.push(e)}function Ir(e){p===null&&he(),p.l===null&&Ot(),vt(p).a.push(e)}function vt(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Ya=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:Ir,beforeUpdate:Dr,createEventDispatcher:Pr,createRawSnippet:kr,flushSync:$t,getAbortSignal:Rr,getAllContexts:jn,getContext:Ln,hasContext:qn,hydrate:Ar,mount:dn,onDestroy:Or,onMount:pn,setContext:Fn,settled:hr,tick:dr,unmount:Sr,untrack:se},Symbol.toStringTag,{value:"Module"}));export{er as $,Or as A,La as B,Ia as C,Ma as D,Pr as E,wa as F,Qt as G,jt as H,ja as I,Va as J,g as K,ut as L,sr as M,Ct as N,z as O,ir as P,y as Q,ha as R,Z as S,w as T,fr as U,ke as V,Ra as W,He as X,I as Y,A as Z,ra as _,ga as a,Qr as a$,Mn as a0,na as a1,fe as a2,me as a3,Pt as a4,Le as a5,ct as a6,yn as a7,Je as a8,Hr as a9,Gr as aA,ye as aB,de as aC,Kr as aD,Se as aE,zr as aF,Wr as aG,oa as aH,G as aI,Xr as aJ,pe as aK,Fr as aL,Mr as aM,Ar as aN,dn as aO,$t as aP,Sr as aQ,$ as aR,dr as aS,ua as aT,aa as aU,It as aV,lr as aW,je as aX,oe as aY,N as aZ,_t as a_,ma as aa,Yr as ab,Br as ac,W as ad,re as ae,M as af,rn as ag,Kt as ah,or as ai,h as aj,Ur as ak,$r as al,p as am,pa as an,nr as ao,Lr as ap,St as aq,ft as ar,sa as as,E as at,Ne as au,Cr as av,Zt as aw,$e as ax,be as ay,Vr as az,va as b,ca as b0,Zn as b1,qr as b2,Zr as b3,At as b4,Jr as b5,gn as b6,xa as b7,Er as b8,Na as b9,ka as ba,Sa as bb,ia as bc,mr as bd,Aa as be,Ya as bf,Fa as c,Yn as d,Oa as e,Da as f,K as g,Pa as h,gt as i,_a as j,da as k,ya as l,la as m,Ta as n,pn as o,Vn as p,Kn as q,ea as r,j as s,ba as t,se as u,qa as v,Ca as w,Ea as x,fa as y,ta as z}; diff --git a/webapp/assets/_app/immutable/chunks/CO4LUyTP.js b/webapp/assets/_app/immutable/chunks/sdr-JCKi.js similarity index 83% rename from webapp/assets/_app/immutable/chunks/CO4LUyTP.js rename to webapp/assets/_app/immutable/chunks/sdr-JCKi.js index 8559a85a..798ff9aa 100644 --- a/webapp/assets/_app/immutable/chunks/CO4LUyTP.js +++ b/webapp/assets/_app/immutable/chunks/sdr-JCKi.js @@ -1 +1 @@ -import"./DsnmJJEf.js";import{i as E}from"./B3Pzt0F_.js";import{p as H,E as L,f as h,t as f,c,d as z,j as e,r as a,k as x,v as d,z as M,D as q}from"./D8EpLgQ1.js";import{p as i,i as C}from"./5WA7h8uK.js";import{B as F}from"./CiE1LlKV.js";var G=h('
'),I=h('

');function S(u,t){H(t,!1);const _=L();let k=i(t,"title",8),b=i(t,"description",8),v=i(t,"actionLabel",8,null),g=i(t,"showAction",8,!0);function w(){_("action")}E();var r=I(),s=e(r),o=e(s),y=e(o,!0);a(o);var m=x(o,2),j=e(m,!0);a(m),a(s);var A=x(s,2);{var P=n=>{var l=G(),B=e(l);F(B,{variant:"primary",icon:'',$$events:{click:w},children:(D,J)=>{M();var p=q();f(()=>d(p,v())),c(D,p)},$$slots:{default:!0}}),a(l),c(n,l)};C(A,n=>{g()&&v()&&n(P)})}a(r),f(()=>{d(y,k()),d(j,b())}),c(u,r),z()}export{S as P}; +import"./DsnmJJEf.js";import{i as E}from"./zNh6Oe5P.js";import{p as H,E as L,f as h,t as f,c,d as z,j as e,r as a,k as x,v as d,z as M,D as q}from"./sWNKMed7.js";import{p as i,i as C}from"./Ccl3fNd2.js";import{B as F}from"./t8NOL8UT.js";var G=h('
'),I=h('

');function S(u,t){H(t,!1);const _=L();let k=i(t,"title",8),b=i(t,"description",8),v=i(t,"actionLabel",8,null),g=i(t,"showAction",8,!0);function w(){_("action")}E();var r=I(),s=e(r),o=e(s),y=e(o,!0);a(o);var m=x(o,2),j=e(m,!0);a(m),a(s);var A=x(s,2);{var P=n=>{var l=G(),B=e(l);F(B,{variant:"primary",icon:'',$$events:{click:w},children:(D,J)=>{M();var p=q();f(()=>d(p,v())),c(D,p)},$$slots:{default:!0}}),a(l),c(n,l)};C(A,n=>{g()&&v()&&n(P)})}a(r),f(()=>{d(y,k()),d(j,b())}),c(u,r),z()}export{S as P}; diff --git a/webapp/assets/_app/immutable/chunks/CiE1LlKV.js b/webapp/assets/_app/immutable/chunks/t8NOL8UT.js similarity index 82% rename from webapp/assets/_app/immutable/chunks/CiE1LlKV.js rename to webapp/assets/_app/immutable/chunks/t8NOL8UT.js index 89e2bf89..8ec41845 100644 --- a/webapp/assets/_app/immutable/chunks/CiE1LlKV.js +++ b/webapp/assets/_app/immutable/chunks/t8NOL8UT.js @@ -1,7 +1,7 @@ -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=`${p}`:s&&(p=`${p}`);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=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{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;s0;)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(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=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{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{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`adapter ${l} `+(i===!1?"is not supported by the environment":"is not available in the build"));let n=e?a.length>1?`since : +import{b as Tr,r as Br}from"./BFThZs5w.js";import"./DsnmJJEf.js";import{i as Dr}from"./zNh6Oe5P.js";import{t as Ie,K as Y,L as Ke,aj as Lr,aW as jr,T as ht,a3 as kr,af as zr,aX as Fr,aY as Gr,aZ as ut,Y as _r,a_ as qr,Z as we,M as Jt,ae as Xe,P as Kt,F as ot,a8 as Hr,a$ as $r,b0 as Nr,aw as Wr,W as Qr,b1 as Mr,b2 as Jr,b3 as Kr,b4 as Xr,g as k,b5 as Yr,b6 as Zr,a2 as Ot,b7 as es,b8 as ts,b9 as rs,ba as ss,bb as as,at as os,bc as ns,bd as ls,be as is,p as cs,E as ps,l as ee,a as ds,f as hs,e as us,c as ue,d as Os,n as oe,m as te,s as re,j as qe,k as Pt,r as He,C as nt,B as Ps,b as bs}from"./sWNKMed7.js";import{l as bt,p as se,i as $e}from"./Ccl3fNd2.js";function mt(t,e,r=!1,s=!1,o=!1){var a=t,n="";Ie(()=>{var l=Lr;if(n===(n=e()??"")){Y&&Ke();return}if(l.nodes_start!==null&&(jr(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!==kr||i.data!=="");)c=i,i=zr(i);if(i===null)throw Fr(),Gr;ut(ht,c),a=_r(i);return}var p=n+"";r?p=`${p}`:s&&(p=`${p}`);var R=qr(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 ms(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 Vs(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=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 fs(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{Ce(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Wr(()=>{e.disconnect()})}function Do(t,e,r=e){var s=!0;Qr(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 Lo(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,ns(r),ls()}}function jo(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 ws(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[Jr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&tr(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Is(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=As(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"){ys(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=is(B);if(es(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,rs([B]);else{let Z=function(ce){c[E].call(this,ce)};c[L]=ts(B,t,Z,U)}else w&&(t[`__${B}`]=void 0)}else if(E==="style")Ue(t,E,v);else if(E==="autofocus")ss(t,!!v);else if(!n&&(E==="__value"||E==="value"&&v!=null))t.value=t.__value=v;else if(E==="selected"&&p)ws(t,v);else{var C=E;l||(C=as(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]=os)):typeof v!="function"&&Ue(t,C,v)}}}return i&&Ot(!0),c}function Es(t,e,r=[],s=[],o,a=!1){Mr(r,s,n=>{var l=void 0,i={},c=t.nodeName==="SELECT",p=!1;if(Jt(()=>{var I=e(...n.map(k)),T=Is(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===Yr&&(!l||f!==l[y])&&(i[y]&&Xe(i[y]),i[y]=Kt(()=>Vs(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===Kr}}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=Zr(s);for(var a in r)r[a].set&&e.push(a);s=Xr(s)}return e}function ko(t,e){return Tr+Br(t,e)}function rr(t,e){return function(){return t.apply(e,arguments)}}const{toString:gs}=Object.prototype,{getPrototypeOf:it}=Object,{iterator:De,toStringTag:sr}=Symbol,Le=(t=>e=>{const r=gs.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 xs(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ar(t.buffer),e}const vs=je("string"),_=je("function"),or=je("number"),Ae=t=>t!==null&&typeof t=="object",Cs=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)},Us=t=>{if(!Ae(t)||Se(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ts=N("Date"),Bs=N("File"),Ds=N("Blob"),Ls=N("FileList"),js=t=>Ae(t)&&_(t.pipe),ks=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]"))},zs=N("URLSearchParams"),[Fs,Gs,_s,qs]=["ReadableStream","Request","Response","Headers"].map(N),Hs=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;s0;)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(Re(e,(o,a)=>{r&&_(o)?t[a]=rr(o,r):t[a]=o},{allOwnKeys:s}),t),Ns=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Ws=(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)},Qs=(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},Ms=(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},Js=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},Ks=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&it(Uint8Array)),Xs=(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])}},Ys=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},Zs=N("HTMLFormElement"),ea=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),ta=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)},ra=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+"'")})}})},sa=(t,e)=>{const r={},s=o=>{o.forEach(a=>{r[a]=!0})};return de(t)?s(t):s(String(t).split(e)),r},aa=()=>{},oa=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function na(t){return!!(t&&_(t.append)&&t[sr]==="FormData"&&t[De])}const la=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)},ia=N("AsyncFunction"),ca=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)),pa=typeof queueMicrotask<"u"?queueMicrotask.bind(ne):typeof process<"u"&&process.nextTick||cr,da=t=>t!=null&&_(t[De]),h={isArray:de,isArrayBuffer:ar,isBuffer:Se,isFormData:ks,isArrayBufferView:xs,isString:vs,isNumber:or,isBoolean:Cs,isObject:Ae,isPlainObject:ge,isEmptyObject:Us,isReadableStream:Fs,isRequest:Gs,isResponse:_s,isHeaders:qs,isUndefined:Ve,isDate:Ts,isFile:Bs,isBlob:Ds,isRegExp:ta,isFunction:_,isStream:js,isURLSearchParams:zs,isTypedArray:Ks,isFileList:Ls,forEach:Re,merge:Ye,extend:$s,trim:Hs,stripBOM:Ns,inherits:Ws,toFlatObject:Qs,kindOf:Le,kindOfTest:N,endsWith:Ms,toArray:Js,forEachEntry:Xs,matchAll:Ys,isHTMLForm:Zs,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:ir,freezeMethods:ra,toObjectSet:sa,toCamelCase:ea,noop:aa,toFiniteNumber:oa,findKey:nr,global:ne,isContextDefined:lr,isSpecCompliantForm:na,toJSONObject:la,isAsyncFn:ia,isThenable:ca,setImmediate:cr,asap:pa,isIterable:da};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 ha=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 ua(t){return h.isArray(t)&&!t.some(Ze)}const Oa=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)&&ua(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(Oa,{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 Pa(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||Pa;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},ba=typeof URLSearchParams<"u"?URLSearchParams:ct,ma=typeof FormData<"u"?FormData:null,Va=typeof Blob<"u"?Blob:null,Sa={isBrowser:!0,classes:{URLSearchParams:ba,FormData:ma,Blob:Va},protocols:["http","https","file","blob","url","data"]},pt=typeof window<"u"&&typeof document<"u",et=typeof navigator=="object"&&navigator||void 0,Aa=pt&&(!et||["ReactNative","NativeScript","NS"].indexOf(et.product)<0),Ra=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fa=pt&&window.location.href||"http://localhost",ya=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pt,hasStandardBrowserEnv:Aa,hasStandardBrowserWebWorkerEnv:Ra,navigator:et,origin:fa},Symbol.toStringTag,{value:"Module"})),G={...ya,...Sa};function wa(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 Ia(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ea(t){const e={},r=Object.keys(t);let s;const o=r.length;let a;for(s=0;s=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]=Ea(o[n])),!l)}if(h.isFormData(t)&&h.isFunction(t.entries)){const r={};return h.forEachEntry(t,(s,o)=>{e(Ia(s),o,r,0)}),r}return null}function ga(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 wa(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),ga(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 xa=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"]),va=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]&&xa[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 Ca(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 Ua=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 Ta(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function Ba(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())&&!Ua(e))n(va(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 Ca(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?Ta(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]||(Ba(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 Da(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function La(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{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=La(50,250);return ja(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)),ka=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,za=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 Fa(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ga(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Sr(t,e,r){let s=!Fa(e);return t&&(s||r==!1)?Ga(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&&ka(e.url))){const c=o&&a&&za.read(a);c&&n.set(o,c)}return e},_a=typeof XMLHttpRequest<"u",qa=_a&&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=Da(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)})},Ha=(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}},$a=function*(t,e){let r=t.byteLength;if(r{const o=Na(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",Qa=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}},Ma=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 Ja=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 Qa(t)).byteLength},Ka=async(t,e)=>{const r=h.toFiniteNumber(t.getContentLength());return r??Ja(e)},Xa=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=Ha([o,a&&a.toAbortSignal()],n),f;const y=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let w;try{if(i&&Ma&&r!=="get"&&r!=="head"&&(w=await Ka(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:ha,xhr:qa,fetch:Xa};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}`,Ya=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`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{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(''),wo=nt(''),Io=nt(''),Eo=ps("");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}; +`):" "+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 Za(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:Za,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{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 to(t){return function(r){return t.apply(null,r)}}function ro(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=eo;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=to;u.isAxiosError=ro;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:Go,AxiosError:_o,CanceledError:qo,isCancel:Ho,CancelToken:$o,VERSION:No,all:Wo,Cancel:Qo,isAxiosError:Mo,spread:Jo,toFormData:Ko,AxiosHeaders:Xo,HttpStatusCode:Yo,formToJSON:Zo,getAdapter:en,mergeConfig:tn}=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 so 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 so(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)}},ao=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}}}},oo=function(t){const e=ao(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 oo(this.configuration).updateController(e,r).then(s=>s(this.axios,this.basePath))}}const no=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}}}},lo=function(t){const e=no(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 lo(this.configuration).controllerInfo(e).then(r=>r(this.axios,this.basePath))}}const io=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=io(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 co=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=co(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 po=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=po(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 ho=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}}}},uo=function(t){const e=ho(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 uo(this.configuration).firstRun(e,r).then(s=>s(this.axios,this.basePath))}}const Oo=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=Oo(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 Po=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=Po(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 bo=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}}}},mo=function(t){const e=bo(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 mo(this.configuration).login(e,r).then(s=>s(this.axios,this.basePath))}}const Vo=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=Vo(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 So=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=So(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 Ao=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}}}},Ro=function(t){const e=Ao(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 Ro(this.configuration).listProviders(e).then(r=>r(this.axios,this.basePath))}}const fo=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=fo(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 yo=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=yo(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 wo extends gr{constructor(e=""){super(e)}}const rn=new wo;var Io=nt(''),Eo=nt(''),go=nt(''),xo=hs("");function sn(t,e){const r=bt(e,["children","$$slots","$$events","$$legacy"]),s=bt(r,["variant","size","disabled","loading","type","fullWidth","icon","iconPosition"]);cs(e,!1);const o=te(),a=te(),n=te(),l=te(),i=te(),c=te(),p=te(),R=te(),I=ps();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()])}),ds(),Dr();var L=xo();Es(L,()=>({type:C(),disabled:y(),class:k(c),...s}));var B=qe(L);{var Z=W=>{var Q=Io();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=Ps(),Ge=bs(Q);{var Cr=_e=>{var ye=Eo(),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);ms(dt,e,"default",{});var xr=Pt(dt,2);{var vr=W=>{var Q=go(),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),us("click",L,U),ue(t,L),Os()}export{sn as B,jo as a,Do as b,Ue as c,ko as d,ms as e,As as f,rn as g,mt as h,Es as i,ys as j,Lo as r,Ee as s}; diff --git a/webapp/assets/_app/immutable/chunks/B3Pzt0F_.js b/webapp/assets/_app/immutable/chunks/zNh6Oe5P.js similarity index 88% rename from webapp/assets/_app/immutable/chunks/B3Pzt0F_.js rename to webapp/assets/_app/immutable/chunks/zNh6Oe5P.js index dd5dc33f..20c6cf21 100644 --- a/webapp/assets/_app/immutable/chunks/B3Pzt0F_.js +++ b/webapp/assets/_app/immutable/chunks/zNh6Oe5P.js @@ -1 +1 @@ -import{am as g,an as d,ao as c,u as m,ap as b,aq as i,g as p,n as v,ar as h,as as k}from"./D8EpLgQ1.js";function x(n=!1){const s=g,e=s.l.u;if(!e)return;let f=()=>v(s.s);if(n){let t=0,a={};const _=h(()=>{let l=!1;const r=s.s;for(const o in r)r[o]!==a[o]&&(a[o]=r[o],l=!0);return l&&t++,t});f=()=>p(_)}e.b.length&&d(()=>{u(s,f),i(e.b)}),c(()=>{const t=m(()=>e.m.map(b));return()=>{for(const a of t)typeof a=="function"&&a()}}),e.a.length&&c(()=>{u(s,f),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}k();export{x as i}; +import{am as g,an as d,ao as c,u as m,ap as b,aq as i,g as p,n as v,ar as h,as as k}from"./sWNKMed7.js";function x(n=!1){const s=g,e=s.l.u;if(!e)return;let f=()=>v(s.s);if(n){let t=0,a={};const _=h(()=>{let l=!1;const r=s.s;for(const o in r)r[o]!==a[o]&&(a[o]=r[o],l=!0);return l&&t++,t});f=()=>p(_)}e.b.length&&d(()=>{u(s,f),i(e.b)}),c(()=>{const t=m(()=>e.m.map(b));return()=>{for(const a of t)typeof a=="function"&&a()}}),e.a.length&&c(()=>{u(s,f),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}k();export{x as i}; diff --git a/webapp/assets/_app/immutable/entry/app.BjSh0gZa.js b/webapp/assets/_app/immutable/entry/app.BjSh0gZa.js new file mode 100644 index 00000000..aa134e2d --- /dev/null +++ b/webapp/assets/_app/immutable/entry/app.BjSh0gZa.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.RAHMfiHk.js","../chunks/DsnmJJEf.js","../chunks/zNh6Oe5P.js","../chunks/sWNKMed7.js","../chunks/Ccl3fNd2.js","../chunks/t8NOL8UT.js","../chunks/BFThZs5w.js","../chunks/-DWf2IZZ.js","../chunks/CaJ57PEy.js","../chunks/DKD3N1EI.js","../chunks/BuuPrWMc.js","../chunks/BZUCTtPY.js","../assets/0.BPrCR_r7.css","../nodes/1.CiDsH6oh.js","../nodes/2.Bp-DXhN-.js","../chunks/UPGsoYWO.js","../chunks/CLagxtgo.js","../chunks/D4Caz1gY.js","../chunks/-99ewtnX.js","../chunks/BZiHL9L3.js","../nodes/3.D-NNlPQY.js","../chunks/sdr-JCKi.js","../chunks/BYXzcXZj.js","../chunks/Cbkm53HO.js","../chunks/WvS03pW2.js","../chunks/CCYOsezl.js","../chunks/CC0e8UY8.js","../chunks/C7WQ-JBG.js","../chunks/ow_oMtSd.js","../nodes/4.Cla5k8cS.js","../nodes/5.BtwOyDJ_.js","../chunks/nqMQkPXF.js","../chunks/Dxyf9P7U.js","../chunks/CfvU88k5.js","../nodes/6.DeLLudQb.js","../chunks/DJF9YLeI.js","../chunks/_gFYyMUN.js","../chunks/CMejw1Yi.js","../chunks/Csic5lDL.js","../chunks/5NDOgLBG.js","../nodes/7.BZbwCFB-.js","../nodes/8.DZSdTfWG.js","../nodes/9.ziBiiJGk.js","../nodes/10.DAa-Msp2.js","../nodes/11.OesU6xRf.js","../nodes/12.BfFdd_FP.js","../chunks/otv9vQQV.js","../nodes/13.Bzfe-m2N.js","../chunks/DLiuxLBn.js","../chunks/MfZe8e4a.js","../nodes/14.Dtnjxn9q.js","../nodes/15.DkZbKsXF.js","../nodes/16.Cp868v_U.js","../nodes/17.Bv2P0ej3.js","../chunks/D-gZnIAg.js","../nodes/18.JK9WAXrb.js"])))=>i.map(i=>d[i]); +import{s as A,aL as z,g as f,aN as U,aO as G,aP as Q,ax as W,aQ as Y,m as F,p as H,an as J,ao as K,o as X,aR as b,aS as Z,f as C,b as L,k as $,c as g,d as tt,B as T,j as et,r as rt,aT as D,D as st,t as ot,v as at}from"../chunks/sWNKMed7.js";import"../chunks/DsnmJJEf.js";import{p as I,i as V}from"../chunks/Ccl3fNd2.js";import{c as w}from"../chunks/CCYOsezl.js";import{b as k}from"../chunks/_gFYyMUN.js";function nt(c){return class extends it{constructor(t){super({component:c,...t})}}}class it{#e;#t;constructor(t){var a=new Map,u=(r,e)=>{var s=F(e,!1,!1);return a.set(r,s),s};const l=new Proxy({...t.props||{},$$events:{}},{get(r,e){return f(a.get(e)??u(e,Reflect.get(r,e)))},has(r,e){return e===z?!0:(f(a.get(e)??u(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,s){return A(a.get(e)??u(e,s),s),Reflect.set(r,e,s)}});this.#t=(t.hydrate?U:G)(t.component,{target:t.target,anchor:t.anchor,props:l,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&Q(),this.#e=l.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||W(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(l,r)},this.#t.$destroy=()=>{Y(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const u=(...l)=>a.call(this,...l);return this.#e[t].push(u),()=>{this.#e[t]=this.#e[t].filter(l=>l!==u)}}$destroy(){this.#t.$destroy()}}const ct="modulepreload",ut=function(c,t){return new URL(c,t).href},j={},o=function(t,a,u){let l=Promise.resolve();if(a&&a.length>0){let O=function(i){return Promise.all(i.map(d=>Promise.resolve(d).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const e=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),y=s?.nonce||s?.getAttribute("nonce");l=O(a.map(i=>{if(i=ut(i,u),i in j)return;j[i]=!0;const d=i.endsWith(".css"),v=d?'[rel="stylesheet"]':"";if(!!u)for(let n=e.length-1;n>=0;n--){const _=e[n];if(_.href===i&&(!d||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${v}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":ct,d||(m.as="script"),m.crossOrigin="",m.href=i,y&&m.setAttribute("nonce",y),document.head.appendChild(m),d)return new Promise((n,_)=>{m.addEventListener("load",n),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${i}`)))})}))}function r(e){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=e,window.dispatchEvent(s),!s.defaultPrevented)throw e}return l.then(e=>{for(const s of e||[])s.status==="rejected"&&r(s.reason);return t().catch(r)})},Rt={};var lt=C('
'),_t=C(" ",1);function mt(c,t){H(t,!0);let a=I(t,"components",23,()=>[]),u=I(t,"data_0",3,null),l=I(t,"data_1",3,null);J(()=>t.stores.page.set(t.page)),K(()=>{t.stores,t.page,t.constructors,a(),t.form,u(),l(),t.stores.page.notify()});let r=b(!1),e=b(!1),s=b(null);X(()=>{const n=t.stores.page.subscribe(()=>{f(r)&&(A(e,!0),Z().then(()=>{A(s,document.title||"untitled page",!0)}))});return A(r,!0),n});const y=D(()=>t.constructors[1]);var O=_t(),i=L(O);{var d=n=>{const _=D(()=>t.constructors[0]);var h=T(),P=L(h);w(P,()=>f(_),(E,p)=>{k(p(E,{get data(){return u()},get form(){return t.form},get params(){return t.page.params},children:(R,vt)=>{var S=T(),B=L(S);w(B,()=>f(y),(N,M)=>{k(M(N,{get data(){return l()},get form(){return t.form},get params(){return t.page.params}}),q=>a()[1]=q,()=>a()?.[1])}),g(R,S)},$$slots:{default:!0}}),R=>a()[0]=R,()=>a()?.[0])}),g(n,h)},v=n=>{const _=D(()=>t.constructors[0]);var h=T(),P=L(h);w(P,()=>f(_),(E,p)=>{k(p(E,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),R=>a()[0]=R,()=>a()?.[0])}),g(n,h)};V(i,n=>{t.constructors[1]?n(d):n(v,!1)})}var x=$(i,2);{var m=n=>{var _=lt(),h=et(_);{var P=E=>{var p=st();ot(()=>at(p,f(s))),g(E,p)};V(h,E=>{f(e)&&E(P)})}rt(_),g(n,_)};V(x,n=>{f(r)&&n(m)})}g(c,O),tt()}const yt=nt(mt),Ot=[()=>o(()=>import("../nodes/0.RAHMfiHk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url),()=>o(()=>import("../nodes/1.CiDsH6oh.js"),__vite__mapDeps([13,1,2,3,8,6]),import.meta.url),()=>o(()=>import("../nodes/2.Bp-DXhN-.js"),__vite__mapDeps([14,1,2,3,4,10,5,6,15,16,17,18,11,19]),import.meta.url),()=>o(()=>import("../nodes/3.D-NNlPQY.js"),__vite__mapDeps([20,1,2,3,4,10,5,6,16,17,21,22,23,24,25,15,11,19,26,27,28]),import.meta.url),()=>o(()=>import("../nodes/4.Cla5k8cS.js"),__vite__mapDeps([29,1,2,3,4,5,6,16,17,21,22,23,24,10,25,15,11,19,26]),import.meta.url),()=>o(()=>import("../nodes/5.BtwOyDJ_.js"),__vite__mapDeps([30,1,2,3,4,5,6,21,10,16,17,18,19,15,31,32,11,23,24,25,33,26,27,28]),import.meta.url),()=>o(()=>import("../nodes/6.DeLLudQb.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,8,31,10,16,17,19,18,32,35,23,15,24,25,33,27,28,36,37,11,38,39]),import.meta.url),()=>o(()=>import("../nodes/7.BZbwCFB-.js"),__vite__mapDeps([40,1,2,3,4,5,6,16,17,8,9,11,19]),import.meta.url),()=>o(()=>import("../nodes/8.DZSdTfWG.js"),__vite__mapDeps([41,1,2,3,4,5,6,32,18,21,10,11,24,25,16,23,19,33,27,28]),import.meta.url),()=>o(()=>import("../nodes/9.ziBiiJGk.js"),__vite__mapDeps([42,1,2,3,4,10,5,6,36,7,8,32,18,28,23,19]),import.meta.url),()=>o(()=>import("../nodes/10.DAa-Msp2.js"),__vite__mapDeps([43,1,2,3,4,5,6,16,17,8,9,19]),import.meta.url),()=>o(()=>import("../nodes/11.OesU6xRf.js"),__vite__mapDeps([44,1,2,3,4,5,6,10,16,17,18,22,23,19,15,31,32,21,11,24,25,33,26,27,28]),import.meta.url),()=>o(()=>import("../nodes/12.BfFdd_FP.js"),__vite__mapDeps([45,1,2,3,4,5,6,7,8,31,10,16,17,19,18,32,35,23,15,24,25,33,27,28,36,37,46,11,38,39]),import.meta.url),()=>o(()=>import("../nodes/13.Bzfe-m2N.js"),__vite__mapDeps([47,1,2,3,4,5,6,21,38,10,16,17,18,19,39,48,15,32,11,23,24,25,33,26,27,28,49]),import.meta.url),()=>o(()=>import("../nodes/14.Dtnjxn9q.js"),__vite__mapDeps([50,1,2,3,4,10,5,6,7,8,48,16,17,18,39,19,15,32,37,24,25,23,33,27,28,11]),import.meta.url),()=>o(()=>import("../nodes/15.DkZbKsXF.js"),__vite__mapDeps([51,1,2,3,4,5,6,10,16,17,18,19,22,23,15,31,32,21,11,24,25,33,26,27,28]),import.meta.url),()=>o(()=>import("../nodes/16.Cp868v_U.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,8,31,10,16,17,19,18,32,35,23,15,24,25,33,27,28,36,37,46,11,38,39]),import.meta.url),()=>o(()=>import("../nodes/17.Bv2P0ej3.js"),__vite__mapDeps([53,1,2,3,4,5,6,21,10,16,17,18,39,19,54,32,15,11,23,24,25,33,26,27,28,49]),import.meta.url),()=>o(()=>import("../nodes/18.JK9WAXrb.js"),__vite__mapDeps([55,1,2,3,4,5,6,7,8,54,16,17,18,19,39,32,37,24,10,25,23,33,27,28,11]),import.meta.url)],Lt=[],At={"/":[2],"/credentials":[3],"/endpoints":[4],"/enterprises":[5],"/enterprises/[id]":[6],"/init":[7],"/instances":[8],"/instances/[id]":[9],"/login":[10],"/organizations":[11],"/organizations/[id]":[12],"/pools":[13],"/pools/[id]":[14],"/repositories":[15],"/repositories/[id]":[16],"/scalesets":[17],"/scalesets/[id]":[18]},dt={handleError:({error:c})=>{console.error(c)},reroute:()=>{},transport:{}},ft=Object.fromEntries(Object.entries(dt.transport).map(([c,t])=>[c,t.decode])),bt=!1,Tt=(c,t)=>ft[c](t);export{Tt as decode,ft as decoders,At as dictionary,bt as hash,dt as hooks,Rt as matchers,Ot as nodes,yt as root,Lt as server_loads}; diff --git a/webapp/assets/_app/immutable/entry/app.Ch2aUjPl.js b/webapp/assets/_app/immutable/entry/app.Ch2aUjPl.js deleted file mode 100644 index d2f576ee..00000000 --- a/webapp/assets/_app/immutable/entry/app.Ch2aUjPl.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.zxLtRFn8.js","../chunks/DsnmJJEf.js","../chunks/B3Pzt0F_.js","../chunks/D8EpLgQ1.js","../chunks/5WA7h8uK.js","../chunks/CiE1LlKV.js","../chunks/-1rkm990.js","../chunks/DsX4H4sg.js","../chunks/6_PqUCmb.js","../chunks/D3_ugSUS.js","../chunks/duD3WMbl.js","../chunks/u94nIB4-.js","../chunks/BEkVdVE1.js","../assets/0.BPrCR_r7.css","../nodes/1.DrojM4Si.js","../nodes/2.C5UFHsji.js","../chunks/wyaP0EDu.js","../chunks/C6k1Q4We.js","../chunks/D4Caz1gY.js","../chunks/qB7B8uiS.js","../chunks/BZiHL9L3.js","../nodes/3.CptFbYi9.js","../chunks/CO4LUyTP.js","../chunks/BWbwsSb6.js","../chunks/D5ucq3Gx.js","../chunks/B_CZMFLe.js","../chunks/CCSWcuVN.js","../chunks/DMCMHBOH.js","../chunks/dB1NgJWc.js","../chunks/ow_oMtSd.js","../nodes/4.eyQ5jFz4.js","../nodes/5.BtWUgRCe.js","../chunks/CIBm3n2u.js","../chunks/KQ2xQpA3.js","../chunks/C9H3KoyH.js","../nodes/6.Bl8qEs3v.js","../chunks/DxQgLoe9.js","../chunks/BAg1iRPq.js","../chunks/G-ddPbA8.js","../chunks/CRD55Dyg.js","../chunks/DZblzgqm.js","../nodes/7.DEMe5MWU.js","../nodes/8.Cbgd9-Vo.js","../nodes/9.C4zA79ZC.js","../nodes/10.BdmiGMi5.js","../nodes/11.CITuM6w_.js","../nodes/12.CtZLJ4UU.js","../chunks/BsqC4UA1.js","../nodes/13.BzU_kqxx.js","../chunks/Bgb-frqW.js","../chunks/CI9532zv.js","../nodes/14.BBGzJxG3.js","../nodes/15.BuyWsqOS.js","../nodes/16.I1lJm_Y4.js","../nodes/17.BGDT0O3r.js","../chunks/2p_hWkLJ.js","../nodes/18.DtLK893b.js"])))=>i.map(i=>d[i]); -import{s as A,aL as z,g as f,aN as U,aO as G,aP as Q,ax as W,aQ as Y,m as F,p as H,an as J,ao as K,o as X,aR as b,aS as Z,f as C,b as L,k as $,c as g,d as tt,B as T,j as et,r as rt,aT as D,D as st,t as ot,v as at}from"../chunks/D8EpLgQ1.js";import"../chunks/DsnmJJEf.js";import{p as I,i as V}from"../chunks/5WA7h8uK.js";import{c as w}from"../chunks/CCSWcuVN.js";import{b as k}from"../chunks/BAg1iRPq.js";function nt(c){return class extends it{constructor(t){super({component:c,...t})}}}class it{#e;#t;constructor(t){var a=new Map,u=(r,e)=>{var s=F(e,!1,!1);return a.set(r,s),s};const l=new Proxy({...t.props||{},$$events:{}},{get(r,e){return f(a.get(e)??u(e,Reflect.get(r,e)))},has(r,e){return e===z?!0:(f(a.get(e)??u(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,s){return A(a.get(e)??u(e,s),s),Reflect.set(r,e,s)}});this.#t=(t.hydrate?U:G)(t.component,{target:t.target,anchor:t.anchor,props:l,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&Q(),this.#e=l.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||W(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(l,r)},this.#t.$destroy=()=>{Y(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const u=(...l)=>a.call(this,...l);return this.#e[t].push(u),()=>{this.#e[t]=this.#e[t].filter(l=>l!==u)}}$destroy(){this.#t.$destroy()}}const ct="modulepreload",ut=function(c,t){return new URL(c,t).href},j={},o=function(t,a,u){let l=Promise.resolve();if(a&&a.length>0){let O=function(i){return Promise.all(i.map(d=>Promise.resolve(d).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const e=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),y=s?.nonce||s?.getAttribute("nonce");l=O(a.map(i=>{if(i=ut(i,u),i in j)return;j[i]=!0;const d=i.endsWith(".css"),v=d?'[rel="stylesheet"]':"";if(!!u)for(let n=e.length-1;n>=0;n--){const _=e[n];if(_.href===i&&(!d||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${v}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":ct,d||(m.as="script"),m.crossOrigin="",m.href=i,y&&m.setAttribute("nonce",y),document.head.appendChild(m),d)return new Promise((n,_)=>{m.addEventListener("load",n),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${i}`)))})}))}function r(e){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=e,window.dispatchEvent(s),!s.defaultPrevented)throw e}return l.then(e=>{for(const s of e||[])s.status==="rejected"&&r(s.reason);return t().catch(r)})},Rt={};var lt=C('
'),_t=C(" ",1);function mt(c,t){H(t,!0);let a=I(t,"components",23,()=>[]),u=I(t,"data_0",3,null),l=I(t,"data_1",3,null);J(()=>t.stores.page.set(t.page)),K(()=>{t.stores,t.page,t.constructors,a(),t.form,u(),l(),t.stores.page.notify()});let r=b(!1),e=b(!1),s=b(null);X(()=>{const n=t.stores.page.subscribe(()=>{f(r)&&(A(e,!0),Z().then(()=>{A(s,document.title||"untitled page",!0)}))});return A(r,!0),n});const y=D(()=>t.constructors[1]);var O=_t(),i=L(O);{var d=n=>{const _=D(()=>t.constructors[0]);var h=T(),P=L(h);w(P,()=>f(_),(E,p)=>{k(p(E,{get data(){return u()},get form(){return t.form},get params(){return t.page.params},children:(R,vt)=>{var S=T(),B=L(S);w(B,()=>f(y),(N,M)=>{k(M(N,{get data(){return l()},get form(){return t.form},get params(){return t.page.params}}),q=>a()[1]=q,()=>a()?.[1])}),g(R,S)},$$slots:{default:!0}}),R=>a()[0]=R,()=>a()?.[0])}),g(n,h)},v=n=>{const _=D(()=>t.constructors[0]);var h=T(),P=L(h);w(P,()=>f(_),(E,p)=>{k(p(E,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),R=>a()[0]=R,()=>a()?.[0])}),g(n,h)};V(i,n=>{t.constructors[1]?n(d):n(v,!1)})}var x=$(i,2);{var m=n=>{var _=lt(),h=et(_);{var P=E=>{var p=st();ot(()=>at(p,f(s))),g(E,p)};V(h,E=>{f(e)&&E(P)})}rt(_),g(n,_)};V(x,n=>{f(r)&&n(m)})}g(c,O),tt()}const yt=nt(mt),Ot=[()=>o(()=>import("../nodes/0.zxLtRFn8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),()=>o(()=>import("../nodes/1.DrojM4Si.js"),__vite__mapDeps([14,1,2,3,7,8,9]),import.meta.url),()=>o(()=>import("../nodes/2.C5UFHsji.js"),__vite__mapDeps([15,1,2,3,4,11,5,9,16,17,18,19,12,20]),import.meta.url),()=>o(()=>import("../nodes/3.CptFbYi9.js"),__vite__mapDeps([21,1,2,3,4,11,5,17,18,22,23,24,9,8,25,26,16,12,20,27,28,29]),import.meta.url),()=>o(()=>import("../nodes/4.eyQ5jFz4.js"),__vite__mapDeps([30,1,2,3,4,5,17,18,22,23,24,9,8,25,11,26,16,12,20,27]),import.meta.url),()=>o(()=>import("../nodes/5.BtWUgRCe.js"),__vite__mapDeps([31,1,2,3,4,5,9,22,11,17,18,19,20,16,32,33,12,24,8,25,26,34,27,28,29]),import.meta.url),()=>o(()=>import("../nodes/6.Bl8qEs3v.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,32,11,17,18,20,19,33,36,24,16,25,26,34,28,29,37,38,12,39,40]),import.meta.url),()=>o(()=>import("../nodes/7.DEMe5MWU.js"),__vite__mapDeps([41,1,2,3,4,5,17,18,7,8,9,10,12,20]),import.meta.url),()=>o(()=>import("../nodes/8.Cbgd9-Vo.js"),__vite__mapDeps([42,1,2,3,4,5,33,19,22,11,12,25,26,17,9,24,8,20,34,28,29]),import.meta.url),()=>o(()=>import("../nodes/9.C4zA79ZC.js"),__vite__mapDeps([43,1,2,3,4,11,5,37,6,7,8,9,33,19,29,24,20]),import.meta.url),()=>o(()=>import("../nodes/10.BdmiGMi5.js"),__vite__mapDeps([44,1,2,3,4,5,17,18,7,8,9,10,20]),import.meta.url),()=>o(()=>import("../nodes/11.CITuM6w_.js"),__vite__mapDeps([45,1,2,3,4,5,9,11,17,18,19,23,24,8,20,16,32,33,22,12,25,26,34,27,28,29]),import.meta.url),()=>o(()=>import("../nodes/12.CtZLJ4UU.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,8,9,32,11,17,18,20,19,33,36,24,16,25,26,34,28,29,37,38,47,12,39,40]),import.meta.url),()=>o(()=>import("../nodes/13.BzU_kqxx.js"),__vite__mapDeps([48,1,2,3,4,5,22,39,11,17,18,19,20,40,49,16,33,12,24,9,8,25,26,34,27,28,29,50]),import.meta.url),()=>o(()=>import("../nodes/14.BBGzJxG3.js"),__vite__mapDeps([51,1,2,3,4,11,5,6,7,8,9,49,17,18,19,40,20,16,33,38,25,26,24,34,28,29,12]),import.meta.url),()=>o(()=>import("../nodes/15.BuyWsqOS.js"),__vite__mapDeps([52,1,2,3,4,5,11,17,18,19,20,23,24,9,8,16,32,33,22,12,25,26,34,27,28,29]),import.meta.url),()=>o(()=>import("../nodes/16.I1lJm_Y4.js"),__vite__mapDeps([53,1,2,3,4,5,6,7,8,9,32,11,17,18,20,19,33,36,24,16,25,26,34,28,29,37,38,47,12,39,40]),import.meta.url),()=>o(()=>import("../nodes/17.BGDT0O3r.js"),__vite__mapDeps([54,1,2,3,4,5,9,22,11,17,18,19,40,20,55,33,16,12,24,8,25,26,34,27,28,29,50]),import.meta.url),()=>o(()=>import("../nodes/18.DtLK893b.js"),__vite__mapDeps([56,1,2,3,4,5,6,7,8,9,55,17,18,19,20,40,33,38,25,11,26,24,34,28,29,12]),import.meta.url)],Lt=[],At={"/":[2],"/credentials":[3],"/endpoints":[4],"/enterprises":[5],"/enterprises/[id]":[6],"/init":[7],"/instances":[8],"/instances/[id]":[9],"/login":[10],"/organizations":[11],"/organizations/[id]":[12],"/pools":[13],"/pools/[id]":[14],"/repositories":[15],"/repositories/[id]":[16],"/scalesets":[17],"/scalesets/[id]":[18]},dt={handleError:({error:c})=>{console.error(c)},reroute:()=>{},transport:{}},ft=Object.fromEntries(Object.entries(dt.transport).map(([c,t])=>[c,t.decode])),bt=!1,Tt=(c,t)=>ft[c](t);export{Tt as decode,ft as decoders,At as dictionary,bt as hash,dt as hooks,Rt as matchers,Ot as nodes,yt as root,Lt as server_loads}; diff --git a/webapp/assets/_app/immutable/entry/start.Bwky8Qmf.js b/webapp/assets/_app/immutable/entry/start.Bwky8Qmf.js deleted file mode 100644 index eced87ba..00000000 --- a/webapp/assets/_app/immutable/entry/start.Bwky8Qmf.js +++ /dev/null @@ -1 +0,0 @@ -import{l as o,a as r}from"../chunks/DsX4H4sg.js";export{o as load_css,r as start}; diff --git a/webapp/assets/_app/immutable/entry/start.fygskHvK.js b/webapp/assets/_app/immutable/entry/start.fygskHvK.js new file mode 100644 index 00000000..43a8c1f3 --- /dev/null +++ b/webapp/assets/_app/immutable/entry/start.fygskHvK.js @@ -0,0 +1 @@ +import{l as o,a as r}from"../chunks/CaJ57PEy.js";export{o as load_css,r as start}; diff --git a/webapp/assets/_app/immutable/nodes/0.RAHMfiHk.js b/webapp/assets/_app/immutable/nodes/0.RAHMfiHk.js new file mode 100644 index 00000000..15ad138e --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/0.RAHMfiHk.js @@ -0,0 +1,13 @@ +import"../chunks/DsnmJJEf.js";import{i as Le}from"../chunks/zNh6Oe5P.js";import{p as Be,o as qe,s as h,m as F,g as e,l as X,a as Ae,f as g,b as E,j as s,k as l,r as t,u as o,t as P,v as ge,c as i,B as U,C as Y,n as fe,e as R,d as $e,q as gr,h as hr,$ as ur}from"../chunks/sWNKMed7.js";import{a as xe,i as M,s as Ve}from"../chunks/Ccl3fNd2.js";import{d as n,c as w,s as Q,h as fr,B as mr,e as Oe}from"../chunks/t8NOL8UT.js";import{p as Ne}from"../chunks/-DWf2IZZ.js";import{g as me}from"../chunks/CaJ57PEy.js";import{b as Ue,a as xr}from"../chunks/DKD3N1EI.js";import{e as ne,i as ce,w as pr}from"../chunks/BuuPrWMc.js";import{t as De}from"../chunks/BZUCTtPY.js";const kr=async({url:Z})=>({url:Z.pathname}),br=!1,yr=!1,va=Object.freeze(Object.defineProperty({__proto__:null,load:kr,prerender:br,ssr:yr},Symbol.toStringTag,{value:"Module"}));var _r=g('
Live Updates
'),wr=g('
Connecting
'),Mr=g('
Updates Unavailable
'),jr=g('
Manual Refresh
'),zr=Y(''),Cr=Y(''),Hr=Y(''),Sr=Y(''),Lr=g(' '),Br=g(' '),Ar=g('
'),$r=g('
'),Vr=g('
'),Ir=g('
'),Rr=Y(''),Tr=Y(''),Pr=Y(''),Er=Y(''),Gr=g(' '),Or=g(' '),Dr=g('
'),qr=g('
'),Nr=g('
GARM GARM

GARM

',1);function Ur(Z,ee){Be(ee,!1);const[re,he]=Ve(),j=()=>xe(pr,"$websocketStore",re),m=()=>xe(Ne,"$page",re),u=F(),y=F();let z=F(!1),G=F(!1),f=F(!1);qe(()=>{C(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",v)});function C(){const a=localStorage.getItem("theme");a==="dark"?h(f,!0):a==="light"?h(f,!1):h(f,window.matchMedia("(prefers-color-scheme: dark)").matches),p()}function v(a){(!localStorage.getItem("theme")||localStorage.getItem("theme")==="system")&&(h(f,a.matches),p())}function O(){h(f,!e(f)),localStorage.setItem("theme",e(f)?"dark":"light"),p()}function p(){e(f)?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}function H(){Ue.logout(),h(G,!1)}const le=[{href:n("/"),label:"Dashboard",icon:["M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z","M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"]},{href:n("/repositories"),label:"Repositories",icon:["M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z","M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"]},{href:n("/organizations"),label:"Organizations",icon:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"},{href:n("/enterprises"),label:"Enterprises",icon:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"},{href:n("/pools"),label:"Pools",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:n("/scalesets"),label:"Scale Sets",icon:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},{href:n("/instances"),label:"Runners",icon:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"}],J=[{href:n("/credentials"),label:"Credentials",icon:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},{href:n("/endpoints"),label:"Endpoints",icon:"M13 10V3L4 14h7v7l9-11h-7z"}];X(()=>j(),()=>{h(u,j())}),X(()=>m(),()=>{m().url.pathname&&h(z,!1)}),X(()=>m(),()=>{h(y,m().url.pathname)}),Ae(),Le();var D=Nr(),I=E(D),q=s(I),ae=s(q),K=s(ae),te=s(K),b=s(te),S=l(b,2);t(te),t(K);var N=l(K,2),oe=s(N),de=s(oe),pe=s(de);{var be=a=>{var r=_r();i(a,r)},Qe=a=>{var r=U(),c=E(r);{var _=x=>{var L=wr();i(x,L)},B=x=>{var L=U(),W=E(L);{var A=k=>{var T=Mr();i(k,T)},$=k=>{var T=jr();i(k,T)};M(W,k=>{e(u),o(()=>e(u).error)?k(A):k($,!1)},!0)}i(x,L)};M(c,x=>{e(u),o(()=>e(u).connecting)?x(_):x(B,!1)},!0)}i(a,r)};M(pe,a=>{e(u),o(()=>e(u).connected)?a(be):a(Qe,!1)})}t(de);var ke=l(de,2),Fe=s(ke);{var Je=a=>{var r=zr();i(a,r)},Ke=a=>{var r=Cr();i(a,r)};M(Fe,a=>{e(f)?a(Je):a(Ke,!1)})}t(ke),t(oe),t(N),t(ae);var Ie=l(ae,2),Re=s(Ie);ne(Re,1,()=>le,ce,(a,r)=>{var c=Lr(),_=s(c),B=s(_);{var x=A=>{var $=U(),k=E($);ne(k,1,()=>(e(r),o(()=>e(r).icon)),ce,(T,se)=>{var d=Hr();P(()=>w(d,"d",e(se))),i(T,d)}),i(A,$)},L=A=>{var $=Sr();P(()=>w($,"d",(e(r),o(()=>e(r).icon)))),i(A,$)};M(B,A=>{e(r),o(()=>Array.isArray(e(r).icon))?A(x):A(L,!1)})}t(_);var W=l(_);t(c),P(()=>{w(c,"href",(e(r),o(()=>e(r).href))),Q(c,1,`group flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors duration-200 + ${e(y),e(r),o(()=>e(y)===e(r).href?"bg-gray-100 text-gray-900 dark:bg-gray-700 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),ge(W,` ${e(r),o(()=>e(r).label)??""}`)}),i(a,c)});var ye=l(Re,2);ne(ye,5,()=>J,ce,(a,r)=>{var c=Br(),_=s(c),B=s(_);t(_);var x=l(_);t(c),P(()=>{w(c,"href",(e(r),o(()=>e(r).href))),Q(c,1,`group flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors duration-200 + ${e(y),e(r),o(()=>e(y)===e(r).href?"bg-gray-100 text-gray-900 dark:bg-gray-700 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),w(B,"d",(e(r),o(()=>e(r).icon))),ge(x,` ${e(r),o(()=>e(r).label)??""}`)}),i(a,c)}),t(ye);var Te=l(ye,2),We=s(Te);t(Te),t(Ie),t(q),t(I);var _e=l(I,2),we=s(_e),Pe=s(we),Me=l(Pe,2),je=s(Me),ze=l(je,2),Ee=l(ze,4),Xe=s(Ee);{var Ye=a=>{var r=Ar();i(a,r)},Ze=a=>{var r=U(),c=E(r);{var _=x=>{var L=$r();i(x,L)},B=x=>{var L=U(),W=E(L);{var A=k=>{var T=Vr();i(k,T)},$=k=>{var T=Ir();i(k,T)};M(W,k=>{e(u),o(()=>e(u).error)?k(A):k($,!1)},!0)}i(x,L)};M(c,x=>{e(u),o(()=>e(u).connecting)?x(_):x(B,!1)},!0)}i(a,r)};M(Xe,a=>{e(u),o(()=>e(u).connected)?a(Ye):a(Ze,!1)})}t(Ee),t(Me);var Ce=l(Me,2),er=s(Ce);{var rr=a=>{var r=Rr();i(a,r)},ar=a=>{var r=Tr();i(a,r)};M(er,a=>{e(f)?a(rr):a(ar,!1)})}t(Ce),t(we);var tr=l(we,2);{var or=a=>{var r=Dr(),c=s(r),_=l(c,2),B=s(_),x=s(B);t(B);var L=l(B,2),W=s(L),A=s(W);ne(A,1,()=>le,ce,(se,d)=>{var V=Gr(),ie=s(V),He=s(ie);{var Se=ve=>{var ue=U(),dr=E(ue);ne(dr,1,()=>(e(d),o(()=>e(d).icon)),ce,(vr,cr)=>{var Ge=Pr();P(()=>w(Ge,"d",e(cr))),i(vr,Ge)}),i(ve,ue)},nr=ve=>{var ue=Er();P(()=>w(ue,"d",(e(d),o(()=>e(d).icon)))),i(ve,ue)};M(He,ve=>{e(d),o(()=>Array.isArray(e(d).icon))?ve(Se):ve(nr,!1)})}t(ie);var lr=l(ie);t(V),P(()=>{w(V,"href",(e(d),o(()=>e(d).href))),Q(V,1,`group flex items-center px-2 py-2 text-base font-medium rounded-md transition-colors duration-200 + ${e(y),e(d),o(()=>e(y)===e(d).href?"bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),ge(lr,` ${e(d),o(()=>e(d).label)??""}`)}),R("click",V,()=>h(z,!1)),i(se,V)});var $=l(A,2);ne($,5,()=>J,ce,(se,d)=>{var V=Or(),ie=s(V),He=s(ie);t(ie);var Se=l(ie);t(V),P(()=>{w(V,"href",(e(d),o(()=>e(d).href))),Q(V,1,`group flex items-center px-2 py-2 text-base font-medium rounded-md transition-colors duration-200 + ${e(y),e(d),o(()=>e(y)===e(d).href?"bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),w(He,"d",(e(d),o(()=>e(d).icon))),ge(Se,` ${e(d),o(()=>e(d).label)??""}`)}),R("click",V,()=>h(z,!1)),i(se,V)}),t($);var k=l($,2),T=s(k);t(k),t(W),t(L),t(_),t(r),R("click",c,()=>h(z,!1)),R("keydown",c,se=>{se.key==="Escape"&&h(z,!1)}),R("click",x,()=>h(z,!1)),R("click",T,H),i(a,r)};M(tr,a=>{e(z)&&a(or)})}t(_e);var sr=l(_e,2);{var ir=a=>{var r=qr();R("click",r,()=>h(G,!1)),R("keydown",r,c=>{c.key==="Escape"&&h(G,!1)}),i(a,r)};M(sr,a=>{e(G)&&a(ir)})}P((a,r,c,_,B)=>{w(te,"href",a),w(b,"src",r),w(S,"src",c),w(ke,"title",e(f)?"Switch to Light Mode":"Switch to Dark Mode"),w(je,"src",_),Q(je,1,`${e(f)?"hidden":"block"} h-8 w-8`),w(ze,"src",B),Q(ze,1,`${e(f)?"block":"hidden"} h-8 w-8`)},[()=>(fe(n),o(()=>n("/"))),()=>(fe(n),o(()=>n("/assets/garm-light.svg"))),()=>(fe(n),o(()=>n("/assets/garm-dark.svg"))),()=>(fe(n),o(()=>n("/assets/garm-light.svg"))),()=>(fe(n),o(()=>n("/assets/garm-dark.svg")))]),R("click",ke,O),R("click",We,H),R("click",Pe,()=>h(z,!e(z))),R("click",Ce,O),i(Z,D),$e(),he()}var Qr=g("
"),Fr=g('

'),Jr=g('
');function Kr(Z,ee){Be(ee,!1);const[re,he]=Ve(),j=()=>xe(De,"$toastStore",re),m=F();function u(C){switch(C){case"success":return` + + `;case"error":return` + + `;case"warning":return` + + `;case"info":default:return` + + `}}function y(C){switch(C){case"success":return"bg-green-50 dark:bg-green-900 border-green-200 dark:border-green-700";case"error":return"bg-red-50 dark:bg-red-900 border-red-200 dark:border-red-700";case"warning":return"bg-yellow-50 dark:bg-yellow-900 border-yellow-200 dark:border-yellow-700";case"info":default:return"bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700"}}function z(C){switch(C){case"success":return"text-green-800 dark:text-green-200";case"error":return"text-red-800 dark:text-red-200";case"warning":return"text-yellow-800 dark:text-yellow-200";case"info":default:return"text-blue-800 dark:text-blue-200"}}function G(C){switch(C){case"success":return"text-green-700 dark:text-green-300";case"error":return"text-red-700 dark:text-red-300";case"warning":return"text-yellow-700 dark:text-yellow-300";case"info":default:return"text-blue-700 dark:text-blue-300"}}X(()=>j(),()=>{h(m,j())}),Ae(),Le();var f=Jr();ne(f,5,()=>e(m),C=>C.id,(C,v)=>{var O=Fr(),p=s(O),H=s(p),le=s(H);fr(le,()=>(e(v),o(()=>u(e(v).type)))),t(H);var J=l(H,2),D=s(J),I=s(D,!0);t(D);var q=l(D,2);{var ae=b=>{var S=Qr(),N=s(S,!0);t(S),P(oe=>{Q(S,1,`mt-1 text-sm ${oe??""}`),ge(N,(e(v),o(()=>e(v).message)))},[()=>(e(v),o(()=>G(e(v).type)))]),i(b,S)};M(q,b=>{e(v),o(()=>e(v).message)&&b(ae)})}t(J);var K=l(J,2),te=s(K);{let b=gr(()=>(e(v),o(()=>e(v).type==="success"?"text-green-400 hover:text-green-500 focus:ring-green-500":e(v).type==="error"?"text-red-400 hover:text-red-500 focus:ring-red-500":e(v).type==="warning"?"text-yellow-400 hover:text-yellow-500 focus:ring-yellow-500":"text-blue-400 hover:text-blue-500 focus:ring-blue-500")));mr(te,{variant:"ghost",size:"sm","aria-label":"Dismiss notification",icon:"",get class(){return e(b)},$$events:{click:()=>De.remove(e(v).id)}})}t(K),t(p),t(O),P((b,S)=>{Q(O,1,`relative rounded-lg border p-4 shadow-lg transition-all duration-300 ease-in-out ${b??""}`),Q(D,1,`text-sm font-medium ${S??""}`),ge(I,(e(v),o(()=>e(v).title)))},[()=>(e(v),o(()=>y(e(v).type))),()=>(e(v),o(()=>z(e(v).type)))]),i(C,O)}),t(f),i(Z,f),$e(),he()}var Wr=g('

Loading...

'),Xr=g('

Redirecting to login...

'),Yr=g('
'),Zr=g(" ",1);function ca(Z,ee){Be(ee,!1);const[re,he]=Ve(),j=()=>xe(Ne,"$page",re),m=()=>xe(xr,"$authStore",re),u=F(),y=F(),z=F();qe(()=>{Ue.init(),setTimeout(()=>{const p=j().url.pathname===n("/login"),H=j().url.pathname===n("/init");!p&&!H&&!m().isAuthenticated&&!m().loading&&(m().needsInitialization?me(n("/init")):me(n("/login")))},200)}),X(()=>(m(),j(),me),()=>{if(!m().loading){const p=j().url.pathname===n("/login"),H=j().url.pathname===n("/init");!p&&!H&&!m().isAuthenticated&&(m().needsInitialization?me(n("/init")):me(n("/login")))}}),X(()=>(j(),n),()=>{h(u,j().url.pathname===n("/login"))}),X(()=>(j(),n),()=>{h(y,j().url.pathname===n("/init"))}),X(()=>(e(u),e(y)),()=>{h(z,!e(u)&&!e(y))}),Ae(),Le();var G=Zr();hr(p=>{ur.title="GARM - GitHub Actions Runner Manager"});var f=E(G);{var C=p=>{var H=Wr();i(p,H)},v=p=>{var H=U(),le=E(H);{var J=I=>{var q=Xr();i(I,q)},D=I=>{var q=U(),ae=E(q);{var K=b=>{var S=U(),N=E(S);Oe(N,ee,"default",{}),i(b,S)},te=b=>{var S=Yr(),N=s(S);Ur(N,{});var oe=l(N,2),de=s(oe),pe=s(de),be=s(pe);Oe(be,ee,"default",{}),t(pe),t(de),t(oe),t(S),i(b,S)};M(ae,b=>{e(u)||e(y)?b(K):b(te,!1)},!0)}i(I,q)};M(le,I=>{e(z),m(),o(()=>e(z)&&!m().isAuthenticated)?I(J):I(D,!1)},!0)}i(p,H)};M(f,p=>{m(),o(()=>m().loading)?p(C):p(v,!1)})}var O=l(f,2);Kr(O,{}),i(Z,G),$e(),he()}export{ca as component,va as universal}; diff --git a/webapp/assets/_app/immutable/nodes/0.zxLtRFn8.js b/webapp/assets/_app/immutable/nodes/0.zxLtRFn8.js deleted file mode 100644 index 9f8835ec..00000000 --- a/webapp/assets/_app/immutable/nodes/0.zxLtRFn8.js +++ /dev/null @@ -1,13 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as He}from"../chunks/B3Pzt0F_.js";import{p as Se,o as De,s as h,m as F,g as e,l as X,a as Le,f as c,b as E,j as o,k as n,r as t,u as i,t as P,v as ge,c as s,B as U,C as Y,e as I,d as Be,q as cr,h as gr,$ as hr}from"../chunks/D8EpLgQ1.js";import{a as me,i as w,s as Ae}from"../chunks/5WA7h8uK.js";import{c as _,s as Q,h as ur,B as fr,d as Ge}from"../chunks/CiE1LlKV.js";import{p as qe}from"../chunks/-1rkm990.js";import{g as fe}from"../chunks/DsX4H4sg.js";import{b as l}from"../chunks/D3_ugSUS.js";import{b as Ne,a as mr}from"../chunks/duD3WMbl.js";import{e as ne,i as ce,w as xr}from"../chunks/u94nIB4-.js";import{t as Oe}from"../chunks/BEkVdVE1.js";const pr=async({url:Z})=>({url:Z.pathname}),kr=!1,br=!1,va=Object.freeze(Object.defineProperty({__proto__:null,load:pr,prerender:kr,ssr:br},Symbol.toStringTag,{value:"Module"}));var yr=c('
Live Updates
'),_r=c('
Connecting
'),wr=c('
Updates Unavailable
'),Mr=c('
Manual Refresh
'),$r=Y(''),jr=Y(''),zr=Y(''),Cr=Y(''),Hr=c(' '),Sr=c(' '),Lr=c('
'),Br=c('
'),Ar=c('
'),Vr=c('
'),Ir=Y(''),Rr=Y(''),Tr=Y(''),Pr=Y(''),Er=c(' '),Gr=c(' '),Or=c('
'),Dr=c('
'),qr=c('
GARM GARM

GARM

',1);function Nr(Z,ee){Se(ee,!1);const[re,he]=Ae(),M=()=>me(xr,"$websocketStore",re),m=()=>me(qe,"$page",re),u=F(),y=F();let $=F(!1),G=F(!1),f=F(!1);De(()=>{j(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",v)});function j(){const a=localStorage.getItem("theme");a==="dark"?h(f,!0):a==="light"?h(f,!1):h(f,window.matchMedia("(prefers-color-scheme: dark)").matches),p()}function v(a){(!localStorage.getItem("theme")||localStorage.getItem("theme")==="system")&&(h(f,a.matches),p())}function O(){h(f,!e(f)),localStorage.setItem("theme",e(f)?"dark":"light"),p()}function p(){e(f)?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}function z(){Ne.logout(),h(G,!1)}const le=[{href:`${l}/`,label:"Dashboard",icon:["M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z","M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"]},{href:`${l}/repositories`,label:"Repositories",icon:["M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z","M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"]},{href:`${l}/organizations`,label:"Organizations",icon:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"},{href:`${l}/enterprises`,label:"Enterprises",icon:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"},{href:`${l}/pools`,label:"Pools",icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"},{href:`${l}/scalesets`,label:"Scale Sets",icon:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},{href:`${l}/instances`,label:"Runners",icon:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"}],J=[{href:`${l}/credentials`,label:"Credentials",icon:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},{href:`${l}/endpoints`,label:"Endpoints",icon:"M13 10V3L4 14h7v7l9-11h-7z"}];X(()=>M(),()=>{h(u,M())}),X(()=>m(),()=>{m().url.pathname&&h($,!1)}),X(()=>m(),()=>{h(y,m().url.pathname)}),Le(),He();var D=qr(),V=E(D),q=o(V),ae=o(q),K=o(ae),te=o(K),b=o(te),C=n(b,2);t(te),t(K);var N=n(K,2),oe=o(N),de=o(oe),xe=o(de);{var ke=a=>{var r=yr();s(a,r)},Ue=a=>{var r=U(),g=E(r);{var H=x=>{var S=_r();s(x,S)},R=x=>{var S=U(),W=E(S);{var L=k=>{var T=wr();s(k,T)},B=k=>{var T=Mr();s(k,T)};w(W,k=>{e(u),i(()=>e(u).error)?k(L):k(B,!1)},!0)}s(x,S)};w(g,x=>{e(u),i(()=>e(u).connecting)?x(H):x(R,!1)},!0)}s(a,r)};w(xe,a=>{e(u),i(()=>e(u).connected)?a(ke):a(Ue,!1)})}t(de);var pe=n(de,2),Qe=o(pe);{var Fe=a=>{var r=$r();s(a,r)},Je=a=>{var r=jr();s(a,r)};w(Qe,a=>{e(f)?a(Fe):a(Je,!1)})}t(pe),t(oe),t(N),t(ae);var Ve=n(ae,2),Ie=o(Ve);ne(Ie,1,()=>le,ce,(a,r)=>{var g=Hr(),H=o(g),R=o(H);{var x=L=>{var B=U(),k=E(B);ne(k,1,()=>(e(r),i(()=>e(r).icon)),ce,(T,se)=>{var d=zr();P(()=>_(d,"d",e(se))),s(T,d)}),s(L,B)},S=L=>{var B=Cr();P(()=>_(B,"d",(e(r),i(()=>e(r).icon)))),s(L,B)};w(R,L=>{e(r),i(()=>Array.isArray(e(r).icon))?L(x):L(S,!1)})}t(H);var W=n(H);t(g),P(()=>{_(g,"href",(e(r),i(()=>e(r).href))),Q(g,1,`group flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors duration-200 - ${e(y),e(r),i(()=>e(y)===e(r).href?"bg-gray-100 text-gray-900 dark:bg-gray-700 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),ge(W,` ${e(r),i(()=>e(r).label)??""}`)}),s(a,g)});var be=n(Ie,2);ne(be,5,()=>J,ce,(a,r)=>{var g=Sr(),H=o(g),R=o(H);t(H);var x=n(H);t(g),P(()=>{_(g,"href",(e(r),i(()=>e(r).href))),Q(g,1,`group flex items-center px-2 py-2 text-sm font-medium rounded-md transition-colors duration-200 - ${e(y),e(r),i(()=>e(y)===e(r).href?"bg-gray-100 text-gray-900 dark:bg-gray-700 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),_(R,"d",(e(r),i(()=>e(r).icon))),ge(x,` ${e(r),i(()=>e(r).label)??""}`)}),s(a,g)}),t(be);var Re=n(be,2),Ke=o(Re);t(Re),t(Ve),t(q),t(V);var ye=n(V,2),_e=o(ye),Te=o(_e),we=n(Te,2),Me=o(we),$e=n(Me,2),Pe=n($e,4),We=o(Pe);{var Xe=a=>{var r=Lr();s(a,r)},Ye=a=>{var r=U(),g=E(r);{var H=x=>{var S=Br();s(x,S)},R=x=>{var S=U(),W=E(S);{var L=k=>{var T=Ar();s(k,T)},B=k=>{var T=Vr();s(k,T)};w(W,k=>{e(u),i(()=>e(u).error)?k(L):k(B,!1)},!0)}s(x,S)};w(g,x=>{e(u),i(()=>e(u).connecting)?x(H):x(R,!1)},!0)}s(a,r)};w(We,a=>{e(u),i(()=>e(u).connected)?a(Xe):a(Ye,!1)})}t(Pe),t(we);var je=n(we,2),Ze=o(je);{var er=a=>{var r=Ir();s(a,r)},rr=a=>{var r=Rr();s(a,r)};w(Ze,a=>{e(f)?a(er):a(rr,!1)})}t(je),t(_e);var ar=n(_e,2);{var tr=a=>{var r=Or(),g=o(r),H=n(g,2),R=o(H),x=o(R);t(R);var S=n(R,2),W=o(S),L=o(W);ne(L,1,()=>le,ce,(se,d)=>{var A=Er(),ie=o(A),ze=o(ie);{var Ce=ve=>{var ue=U(),lr=E(ue);ne(lr,1,()=>(e(d),i(()=>e(d).icon)),ce,(dr,vr)=>{var Ee=Tr();P(()=>_(Ee,"d",e(vr))),s(dr,Ee)}),s(ve,ue)},ir=ve=>{var ue=Pr();P(()=>_(ue,"d",(e(d),i(()=>e(d).icon)))),s(ve,ue)};w(ze,ve=>{e(d),i(()=>Array.isArray(e(d).icon))?ve(Ce):ve(ir,!1)})}t(ie);var nr=n(ie);t(A),P(()=>{_(A,"href",(e(d),i(()=>e(d).href))),Q(A,1,`group flex items-center px-2 py-2 text-base font-medium rounded-md transition-colors duration-200 - ${e(y),e(d),i(()=>e(y)===e(d).href?"bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),ge(nr,` ${e(d),i(()=>e(d).label)??""}`)}),I("click",A,()=>h($,!1)),s(se,A)});var B=n(L,2);ne(B,5,()=>J,ce,(se,d)=>{var A=Gr(),ie=o(A),ze=o(ie);t(ie);var Ce=n(ie);t(A),P(()=>{_(A,"href",(e(d),i(()=>e(d).href))),Q(A,1,`group flex items-center px-2 py-2 text-base font-medium rounded-md transition-colors duration-200 - ${e(y),e(d),i(()=>e(y)===e(d).href?"bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white":"text-gray-600 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-white")??""}`),_(ze,"d",(e(d),i(()=>e(d).icon))),ge(Ce,` ${e(d),i(()=>e(d).label)??""}`)}),I("click",A,()=>h($,!1)),s(se,A)}),t(B);var k=n(B,2),T=o(k);t(k),t(W),t(S),t(H),t(r),I("click",g,()=>h($,!1)),I("keydown",g,se=>{se.key==="Escape"&&h($,!1)}),I("click",x,()=>h($,!1)),I("click",T,z),s(a,r)};w(ar,a=>{e($)&&a(tr)})}t(ye);var or=n(ye,2);{var sr=a=>{var r=Dr();I("click",r,()=>h(G,!1)),I("keydown",r,g=>{g.key==="Escape"&&h(G,!1)}),s(a,r)};w(or,a=>{e(G)&&a(sr)})}P(()=>{_(te,"href",`${l}/`),_(b,"src",`${l??""}/assets/garm-light.svg`),_(C,"src",`${l??""}/assets/garm-dark.svg`),_(pe,"title",e(f)?"Switch to Light Mode":"Switch to Dark Mode"),_(Me,"src",`${l??""}/assets/garm-light.svg`),Q(Me,1,`${e(f)?"hidden":"block"} h-8 w-8`),_($e,"src",`${l??""}/assets/garm-dark.svg`),Q($e,1,`${e(f)?"block":"hidden"} h-8 w-8`)}),I("click",pe,O),I("click",Ke,z),I("click",Te,()=>h($,!e($))),I("click",je,O),s(Z,D),Be(),he()}var Ur=c("
"),Qr=c('

'),Fr=c('
');function Jr(Z,ee){Se(ee,!1);const[re,he]=Ae(),M=()=>me(Oe,"$toastStore",re),m=F();function u(j){switch(j){case"success":return` - - `;case"error":return` - - `;case"warning":return` - - `;case"info":default:return` - - `}}function y(j){switch(j){case"success":return"bg-green-50 dark:bg-green-900 border-green-200 dark:border-green-700";case"error":return"bg-red-50 dark:bg-red-900 border-red-200 dark:border-red-700";case"warning":return"bg-yellow-50 dark:bg-yellow-900 border-yellow-200 dark:border-yellow-700";case"info":default:return"bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700"}}function $(j){switch(j){case"success":return"text-green-800 dark:text-green-200";case"error":return"text-red-800 dark:text-red-200";case"warning":return"text-yellow-800 dark:text-yellow-200";case"info":default:return"text-blue-800 dark:text-blue-200"}}function G(j){switch(j){case"success":return"text-green-700 dark:text-green-300";case"error":return"text-red-700 dark:text-red-300";case"warning":return"text-yellow-700 dark:text-yellow-300";case"info":default:return"text-blue-700 dark:text-blue-300"}}X(()=>M(),()=>{h(m,M())}),Le(),He();var f=Fr();ne(f,5,()=>e(m),j=>j.id,(j,v)=>{var O=Qr(),p=o(O),z=o(p),le=o(z);ur(le,()=>(e(v),i(()=>u(e(v).type)))),t(z);var J=n(z,2),D=o(J),V=o(D,!0);t(D);var q=n(D,2);{var ae=b=>{var C=Ur(),N=o(C,!0);t(C),P(oe=>{Q(C,1,`mt-1 text-sm ${oe??""}`),ge(N,(e(v),i(()=>e(v).message)))},[()=>(e(v),i(()=>G(e(v).type)))]),s(b,C)};w(q,b=>{e(v),i(()=>e(v).message)&&b(ae)})}t(J);var K=n(J,2),te=o(K);{let b=cr(()=>(e(v),i(()=>e(v).type==="success"?"text-green-400 hover:text-green-500 focus:ring-green-500":e(v).type==="error"?"text-red-400 hover:text-red-500 focus:ring-red-500":e(v).type==="warning"?"text-yellow-400 hover:text-yellow-500 focus:ring-yellow-500":"text-blue-400 hover:text-blue-500 focus:ring-blue-500")));fr(te,{variant:"ghost",size:"sm","aria-label":"Dismiss notification",icon:"",get class(){return e(b)},$$events:{click:()=>Oe.remove(e(v).id)}})}t(K),t(p),t(O),P((b,C)=>{Q(O,1,`relative rounded-lg border p-4 shadow-lg transition-all duration-300 ease-in-out ${b??""}`),Q(D,1,`text-sm font-medium ${C??""}`),ge(V,(e(v),i(()=>e(v).title)))},[()=>(e(v),i(()=>y(e(v).type))),()=>(e(v),i(()=>$(e(v).type)))]),s(j,O)}),t(f),s(Z,f),Be(),he()}var Kr=c('

Loading...

'),Wr=c('

Redirecting to login...

'),Xr=c('
'),Yr=c(" ",1);function ca(Z,ee){Se(ee,!1);const[re,he]=Ae(),M=()=>me(qe,"$page",re),m=()=>me(mr,"$authStore",re),u=F(),y=F(),$=F();De(()=>{Ne.init(),setTimeout(()=>{const p=M().url.pathname===`${l}/login`,z=M().url.pathname===`${l}/init`;!p&&!z&&!m().isAuthenticated&&!m().loading&&(m().needsInitialization?fe(`${l}/init`):fe(`${l}/login`))},200)}),X(()=>(m(),M(),fe),()=>{if(!m().loading){const p=M().url.pathname===`${l}/login`,z=M().url.pathname===`${l}/init`;!p&&!z&&!m().isAuthenticated&&(m().needsInitialization?fe(`${l}/init`):fe(`${l}/login`))}}),X(()=>(M(),l),()=>{h(u,M().url.pathname===`${l}/login`)}),X(()=>(M(),l),()=>{h(y,M().url.pathname===`${l}/init`)}),X(()=>(e(u),e(y)),()=>{h($,!e(u)&&!e(y))}),Le(),He();var G=Yr();gr(p=>{hr.title="GARM - GitHub Actions Runner Manager"});var f=E(G);{var j=p=>{var z=Kr();s(p,z)},v=p=>{var z=U(),le=E(z);{var J=V=>{var q=Wr();s(V,q)},D=V=>{var q=U(),ae=E(q);{var K=b=>{var C=U(),N=E(C);Ge(N,ee,"default",{}),s(b,C)},te=b=>{var C=Xr(),N=o(C);Nr(N,{});var oe=n(N,2),de=o(oe),xe=o(de),ke=o(xe);Ge(ke,ee,"default",{}),t(xe),t(de),t(oe),t(C),s(b,C)};w(ae,b=>{e(u)||e(y)?b(K):b(te,!1)},!0)}s(V,q)};w(le,V=>{e($),m(),i(()=>e($)&&!m().isAuthenticated)?V(J):V(D,!1)},!0)}s(p,z)};w(f,p=>{m(),i(()=>m().loading)?p(j):p(v,!1)})}var O=n(f,2);Jr(O,{}),s(Z,G),Be(),he()}export{ca as component,va as universal}; diff --git a/webapp/assets/_app/immutable/nodes/1.DrojM4Si.js b/webapp/assets/_app/immutable/nodes/1.CiDsH6oh.js similarity index 50% rename from webapp/assets/_app/immutable/nodes/1.DrojM4Si.js rename to webapp/assets/_app/immutable/nodes/1.CiDsH6oh.js index 6e375419..d7d2611b 100644 --- a/webapp/assets/_app/immutable/nodes/1.DrojM4Si.js +++ b/webapp/assets/_app/immutable/nodes/1.CiDsH6oh.js @@ -1 +1 @@ -import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/B3Pzt0F_.js";import{p as h,f as g,b as v,t as d,c as l,d as _,j as s,r as a,k as x,v as o}from"../chunks/D8EpLgQ1.js";import{s as k,p}from"../chunks/DsX4H4sg.js";const $={get error(){return p.error},get status(){return p.status}};k.updated.check;const i=$;var b=g("

",1);function y(m,c){h(c,!1),u();var r=b(),t=v(r),n=s(t,!0);a(t);var e=x(t,2),f=s(e,!0);a(e),d(()=>{o(n,i.status),o(f,i.error?.message)}),l(m,r),_()}export{y as component}; +import"../chunks/DsnmJJEf.js";import{i as u}from"../chunks/zNh6Oe5P.js";import{p as h,f as g,b as v,t as d,c as l,d as _,j as s,r as a,k as x,v as o}from"../chunks/sWNKMed7.js";import{s as k,p}from"../chunks/CaJ57PEy.js";const $={get error(){return p.error},get status(){return p.status}};k.updated.check;const i=$;var b=g("

",1);function y(m,c){h(c,!1),u();var r=b(),t=v(r),n=s(t,!0);a(t);var e=x(t,2),f=s(e,!0);a(e),d(()=>{o(n,i.status),o(f,i.error?.message)}),l(m,r),_()}export{y as component}; diff --git a/webapp/assets/_app/immutable/nodes/10.BdmiGMi5.js b/webapp/assets/_app/immutable/nodes/10.BdmiGMi5.js deleted file mode 100644 index d4c07939..00000000 --- a/webapp/assets/_app/immutable/nodes/10.BdmiGMi5.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as X}from"../chunks/B3Pzt0F_.js";import{p as Y,o as Z,l as ee,a as ae,f as C,h as re,t as _,g as a,e as k,c as w,d as te,$ as se,k as d,D as de,m as f,j as r,s as i,r as t,z as B,v as D}from"../chunks/D8EpLgQ1.js";import{i as oe,s as ie,a as le}from"../chunks/5WA7h8uK.js";import{B as ne,r as q,c as I}from"../chunks/CiE1LlKV.js";import{b as T}from"../chunks/C6k1Q4We.js";import{p as ce}from"../chunks/D4Caz1gY.js";import{g as U}from"../chunks/DsX4H4sg.js";import{b as c}from"../chunks/D3_ugSUS.js";import{a as me,b as ue}from"../chunks/duD3WMbl.js";import{e as pe}from"../chunks/BZiHL9L3.js";var ve=C('

'),fe=C('
GARM

Sign in to GARM

GitHub Actions Runner Manager

');function ze(H,K){Y(K,!1);const[W,F]=ie(),$=()=>le(me,"$authStore",W);let m=f(""),u=f(""),o=f(!1),l=f("");Z(()=>{J()});function J(){const e=localStorage.getItem("theme");let s=!1;e==="dark"?s=!0:e==="light"?s=!1:s=window.matchMedia("(prefers-color-scheme: dark)").matches,s?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}async function M(){if(!a(m)||!a(u)){i(l,"Please enter both username and password");return}i(o,!0),i(l,"");try{await ue.login(a(m),a(u)),U(`${c}/`)}catch(e){i(l,pe(e))}finally{i(o,!1)}}function L(e){e.key==="Enter"&&M()}ee(()=>($(),c),()=>{$().isAuthenticated&&U(`${c}/`)}),ae(),X();var g=fe();re(e=>{se.title="Login - GARM"});var z=r(g),h=r(z),A=r(h),S=r(A),N=d(S,2);t(A),B(4),t(h);var b=d(h,2),x=r(b),y=r(x),p=d(r(y),2);q(p),t(y);var P=d(y,2),v=d(r(P),2);q(v),t(P),t(x);var G=d(x,2);{var O=e=>{var s=ve(),n=r(s),E=d(r(n),2),j=r(E),V=r(j,!0);t(j),t(E),t(n),t(s),_(()=>D(V,a(l))),w(e,s)};oe(G,e=>{a(l)&&e(O)})}var R=d(G,2),Q=r(R);ne(Q,{type:"submit",variant:"primary",size:"md",fullWidth:!0,get disabled(){return a(o)},get loading(){return a(o)},children:(e,s)=>{B();var n=de();_(()=>D(n,a(o)?"Signing in...":"Sign in")),w(e,n)},$$slots:{default:!0}}),t(R),t(b),t(z),t(g),_(()=>{I(S,"src",`${c??""}/assets/garm-light.svg`),I(N,"src",`${c??""}/assets/garm-dark.svg`),p.disabled=a(o),v.disabled=a(o)}),T(p,()=>a(m),e=>i(m,e)),k("keypress",p,L),T(v,()=>a(u),e=>i(u,e)),k("keypress",v,L),k("submit",b,ce(M)),w(H,g),te(),F()}export{ze as component}; diff --git a/webapp/assets/_app/immutable/nodes/10.DAa-Msp2.js b/webapp/assets/_app/immutable/nodes/10.DAa-Msp2.js new file mode 100644 index 00000000..269dae7f --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/10.DAa-Msp2.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as Z}from"../chunks/zNh6Oe5P.js";import{p as ee,o as ae,l as re,a as te,f as K,h as se,t as _,g as a,e as k,c as w,d as de,$ as oe,k as d,D as ie,m as f,j as r,u as B,n as D,s as i,r as t,z as q,v as I}from"../chunks/sWNKMed7.js";import{i as le,s as ne,a as ce}from"../chunks/Ccl3fNd2.js";import{B as me,d as l,c as T,r as U}from"../chunks/t8NOL8UT.js";import{b as C}from"../chunks/CLagxtgo.js";import{p as ue}from"../chunks/D4Caz1gY.js";import{g as H}from"../chunks/CaJ57PEy.js";import{a as pe,b as ve}from"../chunks/DKD3N1EI.js";import{e as fe}from"../chunks/BZiHL9L3.js";var ge=K('

'),he=K('
GARM

Sign in to GARM

GitHub Actions Runner Manager

');function Ae(W,F){ee(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");ae(()=>{O()});function O(){const e=localStorage.getItem("theme");let s=!1;e==="dark"?s=!0:e==="light"?s=!1:s=window.matchMedia("(prefers-color-scheme: dark)").matches,s?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}async function M(){if(!a(m)||!a(u)){i(n,"Please enter both username and password");return}i(o,!0),i(n,"");try{await ve.login(a(m),a(u)),H(l("/"))}catch(e){i(n,fe(e))}finally{i(o,!1)}}function L(e){e.key==="Enter"&&M()}re(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),te(),Z();var g=he();se(e=>{oe.title="Login - GARM"});var z=r(g),h=r(z),A=r(h),S=r(A),Q=d(S,2);t(A),q(4),t(h);var b=d(h,2),x=r(b),y=r(x),p=d(r(y),2);U(p),t(y);var P=d(y,2),v=d(r(P),2);U(v),t(P),t(x);var G=d(x,2);{var V=e=>{var s=ge(),c=r(s),E=d(r(c),2),j=r(E),Y=r(j,!0);t(j),t(E),t(c),t(s),_(()=>I(Y,a(n))),w(e,s)};le(G,e=>{a(n)&&e(V)})}var R=d(G,2),X=r(R);me(X,{type:"submit",variant:"primary",size:"md",fullWidth:!0,get disabled(){return a(o)},get loading(){return a(o)},children:(e,s)=>{q();var c=ie();_(()=>I(c,a(o)?"Signing in...":"Sign in")),w(e,c)},$$slots:{default:!0}}),t(R),t(b),t(z),t(g),_((e,s)=>{T(S,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(D(l),B(()=>l("/assets/garm-light.svg"))),()=>(D(l),B(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),k("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),k("keypress",v,L),k("submit",b,ue(M)),w(W,g),de(),N()}export{Ae as component}; diff --git a/webapp/assets/_app/immutable/nodes/11.CITuM6w_.js b/webapp/assets/_app/immutable/nodes/11.CITuM6w_.js deleted file mode 100644 index ed869e02..00000000 --- a/webapp/assets/_app/immutable/nodes/11.CITuM6w_.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Le}from"../chunks/B3Pzt0F_.js";import{p as Ne,E as Ke,o as je,l as x,s as a,m as s,g as e,y as W,a as qe,f as T,k as i,j as o,r as n,c as E,t as Q,v as ie,x as Ae,u as v,z as Fe,e as $e,d as Ge,h as Qe,b as Xe,$ as Ze,n as P,q as ue}from"../chunks/D8EpLgQ1.js";import{a as He,i as X,s as Je}from"../chunks/5WA7h8uK.js";import{r as ge,b as Ue,h as et,c as tt,g as me}from"../chunks/CiE1LlKV.js";import{b as Ie}from"../chunks/D3_ugSUS.js";import{e as at,i as rt}from"../chunks/u94nIB4-.js";import{b as Re,a as We}from"../chunks/C6k1Q4We.js";import{p as ot}from"../chunks/D4Caz1gY.js";import{M as nt}from"../chunks/qB7B8uiS.js";import{F as it}from"../chunks/BWbwsSb6.js";import{e as Pe}from"../chunks/BZiHL9L3.js";import{e as Ve,a as Me}from"../chunks/wyaP0EDu.js";import{U as st}from"../chunks/CIBm3n2u.js";import{D as lt}from"../chunks/KQ2xQpA3.js";import{P as dt}from"../chunks/CO4LUyTP.js";import{t as K}from"../chunks/BEkVdVE1.js";import{B as ct,k as Ce,g as Oe,l as ut}from"../chunks/D5ucq3Gx.js";import{D as gt,A as Be,G as mt,a as pt}from"../chunks/B_CZMFLe.js";import{E as ft}from"../chunks/C9H3KoyH.js";import{E as bt}from"../chunks/DMCMHBOH.js";import{S as vt}from"../chunks/dB1NgJWc.js";var yt=T('

'),ht=T('

Loading...

'),_t=T(""),xt=T(''),kt=T('

Webhook secret will be automatically generated

'),wt=T('
'),zt=T('

Create Organization

');function $t(pe,fe){Ne(fe,!1);const[be,ve]=Je(),f=()=>He(Ve,"$eagerCache",be),D=s(),w=s(),z=s(),Z=s(),$=Ke();let C=s(!1),b=s(""),y=s("github"),r=s({name:"",credentials_name:"",webhook_secret:"",pool_balancer_type:"roundrobin"}),k=s(!0),p=s(!0);async function A(){if(!f().loaded.credentials&&!f().loading.credentials)try{await Me.getCredentials()}catch(d){a(b,Pe(d))}}function B(d){a(y,d.detail),W(r,e(r).credentials_name="")}function c(){if(e(r).credentials_name){const d=e(D).find(L=>L.name===e(r).credentials_name);d&&d.forge_type&&a(y,d.forge_type)}}function ye(){const d=new Uint8Array(32);return crypto.getRandomValues(d),Array.from(d,L=>L.toString(16).padStart(2,"0")).join("")}async function he(){if(!e(r).name?.trim()){a(b,"Organization name is required");return}if(!e(r).credentials_name){a(b,"Please select credentials");return}try{a(C,!0),a(b,"");const d={...e(r),install_webhook:e(k),auto_generate_secret:e(p)};$("submit",d)}catch(d){a(b,d instanceof Error?d.message:"Failed to create organization"),a(C,!1)}}je(()=>{A()}),x(()=>f(),()=>{a(D,f().credentials)}),x(()=>f(),()=>{a(w,f().loading.credentials)}),x(()=>(e(D),e(y)),()=>{a(z,e(D).filter(d=>e(y)?d.forge_type===e(y):!0))}),x(()=>e(p),()=>{e(p)?W(r,e(r).webhook_secret=ye()):e(p)||W(r,e(r).webhook_secret="")}),x(()=>(e(r),e(p)),()=>{a(Z,e(r).name?.trim()!==""&&e(r).credentials_name!==""&&(e(p)||e(r).webhook_secret&&e(r).webhook_secret.trim()!==""))}),qe(),Le(),nt(pe,{$$events:{close:()=>$("close")},children:(d,L)=>{var ee=zt(),N=i(o(ee),2);{var te=h=>{var _=yt(),F=o(_),U=o(F,!0);n(F),n(_),Q(()=>ie(U,e(b))),E(h,_)};X(N,h=>{e(b)&&h(te)})}var _e=i(N,2);{var xe=h=>{var _=ht();E(h,_)},ke=h=>{var _=wt(),F=o(_);it(F,{get selectedForgeType(){return e(y)},set selectedForgeType(l){a(y,l)},$$events:{select:B},$$legacy:!0});var U=i(F,2),se=i(o(U),2);ge(se),n(U);var j=i(U,2),S=i(o(j),2);Q(()=>{e(r),Ae(()=>{e(z)})});var q=o(S);q.value=q.__value="";var we=i(q);at(we,1,()=>e(z),rt,(l,m)=>{var O=_t(),de=o(O);n(O);var ce={};Q(()=>{ie(de,`${e(m),v(()=>e(m).name)??""} (${e(m),v(()=>e(m).endpoint?.name||"Unknown endpoint")??""})`),ce!==(ce=(e(m),v(()=>e(m).name)))&&(O.value=(O.__value=(e(m),v(()=>e(m).name)))??"")}),E(l,O)}),n(S),n(j);var G=i(j,2),ae=i(o(G),2);Q(()=>{e(r),Ae(()=>{})});var H=o(ae);H.value=H.__value="roundrobin";var le=i(H);le.value=le.__value="pack",n(ae),n(G);var re=i(G,2),oe=o(re),t=o(oe);ge(t),Fe(2),n(oe);var u=i(oe,2),I=o(u),M=o(I);ge(M),Fe(2),n(I);var g=i(I,2);{var J=l=>{var m=xt();ge(m),Re(m,()=>e(r).webhook_secret,O=>W(r,e(r).webhook_secret=O)),E(l,m)},ne=l=>{var m=kt();E(l,m)};X(g,l=>{e(p)?l(ne,!1):l(J)})}n(u),n(re);var V=i(re,2),Y=o(V),R=i(Y,2),ze=o(R,!0);n(R),n(V),n(_),Q(()=>{R.disabled=e(C)||e(w)||!e(Z),ie(ze,e(C)?"Creating...":"Create Organization")}),Re(se,()=>e(r).name,l=>W(r,e(r).name=l)),Ue(S,()=>e(r).credentials_name,l=>W(r,e(r).credentials_name=l)),$e("change",S,c),Ue(ae,()=>e(r).pool_balancer_type,l=>W(r,e(r).pool_balancer_type=l)),We(t,()=>e(k),l=>a(k,l)),We(M,()=>e(p),l=>a(p,l)),$e("click",Y,()=>$("close")),$e("submit",_,ot(he)),E(h,_)};X(_e,h=>{e(C)?h(xe):h(ke,!1)})}n(ee),E(d,ee)},$$slots:{default:!0}}),Ge(),ve()}var Ct=T(''),Ot=T('
',1);function Kt(pe,fe){Ne(fe,!1);const[be,ve]=Je(),f=()=>He(Ve,"$eagerCache",be),D=s(),w=s(),z=s(),Z=s();let $=s([]),C=s(!0),b=s(""),y=s(""),r=s(1),k=s(25),p=s(!1),A=s(!1),B=s(!1),c=s(null);function ye(){a(p,!1),a(B,!1),a(A,!1)}async function he(t){try{a(b,"");const u=t.detail,I={name:u.name,credentials_name:u.credentials_name,webhook_secret:u.webhook_secret,pool_balancer_type:u.pool_balancer_type},M=await me.createOrganization(I);if(u.install_webhook&&M.id)try{await me.installOrganizationWebhook(M.id),K.success("Webhook Installed",`Webhook for organization ${M.name} has been installed successfully.`)}catch(g){console.warn("Organization created but webhook installation failed:",g),K.error("Webhook Installation Failed",g instanceof Error?g.message:"Failed to install webhook. You can try installing it manually from the organization details page.")}K.success("Organization Created",`Organization ${M.name} has been created successfully.`),a(p,!1)}catch(u){throw a(b,Pe(u)),u}}async function d(t){if(e(c))try{await me.updateOrganization(e(c).id,t),K.success("Organization Updated",`Organization ${e(c).name} has been updated successfully.`),a(A,!1),a(c,null)}catch(u){throw u}}async function L(){if(e(c))try{a(b,""),await me.deleteOrganization(e(c).id),K.success("Organization Deleted",`Organization ${e(c).name} has been deleted successfully.`),a(c,null)}catch(t){const u=Pe(t);K.error("Delete Failed",u)}finally{ye()}}function ee(){a(p,!0)}function N(t){a(c,t),a(A,!0)}function te(t){a(c,t),a(B,!0)}je(async()=>{try{a(C,!0);const t=await Me.getOrganizations();t&&Array.isArray(t)&&a($,t)}catch(t){console.error("Failed to load organizations:",t),a(b,t instanceof Error?t.message:"Failed to load organizations")}finally{a(C,!1)}});async function _e(){try{await Me.retryResource("organizations")}catch(t){console.error("Retry failed:",t)}}const xe=[{key:"name",title:"Name",cellComponent:ft,cellProps:{entityType:"organization"}},{key:"endpoint",title:"Endpoint",cellComponent:bt},{key:"credentials",title:"Credentials",cellComponent:mt,cellProps:{field:"credentials_name"}},{key:"status",title:"Status",cellComponent:vt,cellProps:{statusType:"entity"}},{key:"actions",title:"Actions",align:"right",cellComponent:pt}],ke={entityType:"organization",primaryText:{field:"name",isClickable:!0,href:"/organizations/{id}"},customInfo:[{icon:t=>Oe(t?.endpoint?.endpoint_type||"unknown"),text:t=>t?.endpoint?.name||"Unknown"}],badges:[{type:"custom",value:t=>Ce(t)}],actions:[{type:"edit",handler:t=>N(t)},{type:"delete",handler:t=>te(t)}]};function h(t){a(y,t.detail.term),a(r,1)}function _(t){a(r,t.detail.page)}function F(t){a(k,t.detail.perPage),a(r,1)}function U(t){N(t.detail.item)}function se(t){te(t.detail.item)}x(()=>(e($),f()),()=>{(!e($).length||f().loaded.organizations)&&a($,f().organizations)}),x(()=>f(),()=>{a(C,f().loading.organizations)}),x(()=>f(),()=>{a(D,f().errorMessages.organizations)}),x(()=>(e($),e(y)),()=>{a(w,ut(e($),e(y)))}),x(()=>(e(w),e(k)),()=>{a(z,Math.ceil(e(w).length/e(k)))}),x(()=>(e(r),e(z)),()=>{e(r)>e(z)&&e(z)>0&&a(r,e(z))}),x(()=>(e(w),e(r),e(k)),()=>{a(Z,e(w).slice((e(r)-1)*e(k),e(r)*e(k)))}),qe(),Le();var j=Ot();Qe(t=>{Ze.title="Organizations - GARM"});var S=Xe(j),q=o(S);dt(q,{title:"Organizations",description:"Manage GitHub and Gitea organizations",actionLabel:"Add Organization",$$events:{action:ee}});var we=i(q,2);{let t=ue(()=>e(D)||e(b)),u=ue(()=>!!e(D));gt(we,{get columns(){return xe},get data(){return e(Z)},get loading(){return e(C)},get error(){return e(t)},get searchTerm(){return e(y)},searchPlaceholder:"Search organizations...",get currentPage(){return e(r)},get perPage(){return e(k)},get totalPages(){return e(z)},get totalItems(){return e(w),v(()=>e(w).length)},itemName:"organizations",emptyIconType:"building",get showRetry(){return e(u)},get mobileCardConfig(){return ke},$$events:{search:h,pageChange:_,perPageChange:F,retry:_e,edit:U,delete:se},$$slots:{"mobile-card":(I,M)=>{const g=ue(()=>M.item),J=ue(()=>(P(Ce),P(e(g)),v(()=>Ce(e(g)))));var ne=Ct(),V=o(ne),Y=o(V),R=o(Y),ze=o(R,!0);n(R);var l=i(R,2),m=o(l),O=o(m);et(O,()=>(P(Oe),P(e(g)),v(()=>Oe(e(g).endpoint?.endpoint_type||"unknown"))));var de=i(O,2),ce=o(de,!0);n(de),n(m),n(l),n(Y),n(V);var Ee=i(V,2),Te=o(Ee);ct(Te,{get variant(){return P(e(J)),v(()=>e(J).variant)},get text(){return P(e(J)),v(()=>e(J).text)}});var De=i(Te,2),Se=o(De);Be(Se,{action:"edit",size:"sm",title:"Edit organization",ariaLabel:"Edit organization",$$events:{click:()=>N(e(g))}});var Ye=i(Se,2);Be(Ye,{action:"delete",size:"sm",title:"Delete organization",ariaLabel:"Delete organization",$$events:{click:()=>te(e(g))}}),n(De),n(Ee),n(ne),Q(()=>{tt(Y,"href",(P(Ie),P(e(g)),v(()=>`${Ie}/organizations/${e(g).id}`))),ie(ze,(P(e(g)),v(()=>e(g).name))),ie(ce,(P(e(g)),v(()=>e(g).endpoint?.name||"Unknown")))}),E(I,ne)}}})}n(S);var G=i(S,2);{var ae=t=>{$t(t,{$$events:{close:()=>a(p,!1),submit:he}})};X(G,t=>{e(p)&&t(ae)})}var H=i(G,2);{var le=t=>{st(t,{get entity(){return e(c)},entityType:"organization",$$events:{close:()=>{a(A,!1),a(c,null)},submit:u=>d(u.detail)}})};X(H,t=>{e(A)&&e(c)&&t(le)})}var re=i(H,2);{var oe=t=>{lt(t,{title:"Delete Organization",message:"Are you sure you want to delete this organization? This action cannot be undone.",get itemName(){return e(c),v(()=>e(c).name)},$$events:{close:()=>{a(B,!1),a(c,null)},confirm:L}})};X(re,t=>{e(B)&&e(c)&&t(oe)})}E(pe,j),Ge(),ve()}export{Kt as component}; diff --git a/webapp/assets/_app/immutable/nodes/11.OesU6xRf.js b/webapp/assets/_app/immutable/nodes/11.OesU6xRf.js new file mode 100644 index 00000000..c8b93ca3 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/11.OesU6xRf.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as Le}from"../chunks/zNh6Oe5P.js";import{p as Ne,E as Qe,o as je,l as x,s as a,m as s,g as e,y as W,a as qe,f as T,k as i,j as o,r as n,c as E,t as Q,v as ie,x as Ae,u as v,z as Fe,e as $e,d as Ge,h as Xe,b as Ze,$ as et,n as P,q as ue}from"../chunks/sWNKMed7.js";import{a as He,i as X,s as Je}from"../chunks/Ccl3fNd2.js";import{r as ge,b as Ue,h as tt,d as Ie,c as at,g as me}from"../chunks/t8NOL8UT.js";import{e as rt,i as ot}from"../chunks/BuuPrWMc.js";import{b as Re,a as We}from"../chunks/CLagxtgo.js";import{p as nt}from"../chunks/D4Caz1gY.js";import{M as it}from"../chunks/-99ewtnX.js";import{F as st}from"../chunks/BYXzcXZj.js";import{e as Pe}from"../chunks/BZiHL9L3.js";import{e as Ve,a as Me}from"../chunks/UPGsoYWO.js";import{U as lt}from"../chunks/nqMQkPXF.js";import{D as dt}from"../chunks/Dxyf9P7U.js";import{P as ct}from"../chunks/sdr-JCKi.js";import{t as K}from"../chunks/BZUCTtPY.js";import{B as ut,k as Ce,g as Oe,l as gt}from"../chunks/Cbkm53HO.js";import{D as mt,A as Be,G as pt,a as ft}from"../chunks/WvS03pW2.js";import{E as bt}from"../chunks/CfvU88k5.js";import{E as vt}from"../chunks/CC0e8UY8.js";import{S as yt}from"../chunks/C7WQ-JBG.js";var ht=T('

'),_t=T('

Loading...

'),xt=T(""),kt=T(''),wt=T('

Webhook secret will be automatically generated

'),zt=T('
'),$t=T('

Create Organization

');function Ct(pe,fe){Ne(fe,!1);const[be,ve]=Je(),f=()=>He(Ve,"$eagerCache",be),D=s(),w=s(),z=s(),Z=s(),$=Qe();let C=s(!1),b=s(""),y=s("github"),r=s({name:"",credentials_name:"",webhook_secret:"",pool_balancer_type:"roundrobin"}),k=s(!0),p=s(!0);async function A(){if(!f().loaded.credentials&&!f().loading.credentials)try{await Me.getCredentials()}catch(d){a(b,Pe(d))}}function B(d){a(y,d.detail),W(r,e(r).credentials_name="")}function c(){if(e(r).credentials_name){const d=e(D).find(L=>L.name===e(r).credentials_name);d&&d.forge_type&&a(y,d.forge_type)}}function ye(){const d=new Uint8Array(32);return crypto.getRandomValues(d),Array.from(d,L=>L.toString(16).padStart(2,"0")).join("")}async function he(){if(!e(r).name?.trim()){a(b,"Organization name is required");return}if(!e(r).credentials_name){a(b,"Please select credentials");return}try{a(C,!0),a(b,"");const d={...e(r),install_webhook:e(k),auto_generate_secret:e(p)};$("submit",d)}catch(d){a(b,d instanceof Error?d.message:"Failed to create organization"),a(C,!1)}}je(()=>{A()}),x(()=>f(),()=>{a(D,f().credentials)}),x(()=>f(),()=>{a(w,f().loading.credentials)}),x(()=>(e(D),e(y)),()=>{a(z,e(D).filter(d=>e(y)?d.forge_type===e(y):!0))}),x(()=>e(p),()=>{e(p)?W(r,e(r).webhook_secret=ye()):e(p)||W(r,e(r).webhook_secret="")}),x(()=>(e(r),e(p)),()=>{a(Z,e(r).name?.trim()!==""&&e(r).credentials_name!==""&&(e(p)||e(r).webhook_secret&&e(r).webhook_secret.trim()!==""))}),qe(),Le(),it(pe,{$$events:{close:()=>$("close")},children:(d,L)=>{var ee=$t(),N=i(o(ee),2);{var te=h=>{var _=ht(),F=o(_),U=o(F,!0);n(F),n(_),Q(()=>ie(U,e(b))),E(h,_)};X(N,h=>{e(b)&&h(te)})}var _e=i(N,2);{var xe=h=>{var _=_t();E(h,_)},ke=h=>{var _=zt(),F=o(_);st(F,{get selectedForgeType(){return e(y)},set selectedForgeType(l){a(y,l)},$$events:{select:B},$$legacy:!0});var U=i(F,2),se=i(o(U),2);ge(se),n(U);var j=i(U,2),S=i(o(j),2);Q(()=>{e(r),Ae(()=>{e(z)})});var q=o(S);q.value=q.__value="";var we=i(q);rt(we,1,()=>e(z),ot,(l,m)=>{var O=xt(),de=o(O);n(O);var ce={};Q(()=>{ie(de,`${e(m),v(()=>e(m).name)??""} (${e(m),v(()=>e(m).endpoint?.name||"Unknown endpoint")??""})`),ce!==(ce=(e(m),v(()=>e(m).name)))&&(O.value=(O.__value=(e(m),v(()=>e(m).name)))??"")}),E(l,O)}),n(S),n(j);var G=i(j,2),ae=i(o(G),2);Q(()=>{e(r),Ae(()=>{})});var H=o(ae);H.value=H.__value="roundrobin";var le=i(H);le.value=le.__value="pack",n(ae),n(G);var re=i(G,2),oe=o(re),t=o(oe);ge(t),Fe(2),n(oe);var u=i(oe,2),I=o(u),M=o(I);ge(M),Fe(2),n(I);var g=i(I,2);{var J=l=>{var m=kt();ge(m),Re(m,()=>e(r).webhook_secret,O=>W(r,e(r).webhook_secret=O)),E(l,m)},ne=l=>{var m=wt();E(l,m)};X(g,l=>{e(p)?l(ne,!1):l(J)})}n(u),n(re);var V=i(re,2),Y=o(V),R=i(Y,2),ze=o(R,!0);n(R),n(V),n(_),Q(()=>{R.disabled=e(C)||e(w)||!e(Z),ie(ze,e(C)?"Creating...":"Create Organization")}),Re(se,()=>e(r).name,l=>W(r,e(r).name=l)),Ue(S,()=>e(r).credentials_name,l=>W(r,e(r).credentials_name=l)),$e("change",S,c),Ue(ae,()=>e(r).pool_balancer_type,l=>W(r,e(r).pool_balancer_type=l)),We(t,()=>e(k),l=>a(k,l)),We(M,()=>e(p),l=>a(p,l)),$e("click",Y,()=>$("close")),$e("submit",_,nt(he)),E(h,_)};X(_e,h=>{e(C)?h(xe):h(ke,!1)})}n(ee),E(d,ee)},$$slots:{default:!0}}),Ge(),ve()}var Ot=T(''),Pt=T('
',1);function Kt(pe,fe){Ne(fe,!1);const[be,ve]=Je(),f=()=>He(Ve,"$eagerCache",be),D=s(),w=s(),z=s(),Z=s();let $=s([]),C=s(!0),b=s(""),y=s(""),r=s(1),k=s(25),p=s(!1),A=s(!1),B=s(!1),c=s(null);function ye(){a(p,!1),a(B,!1),a(A,!1)}async function he(t){try{a(b,"");const u=t.detail,I={name:u.name,credentials_name:u.credentials_name,webhook_secret:u.webhook_secret,pool_balancer_type:u.pool_balancer_type},M=await me.createOrganization(I);if(u.install_webhook&&M.id)try{await me.installOrganizationWebhook(M.id),K.success("Webhook Installed",`Webhook for organization ${M.name} has been installed successfully.`)}catch(g){console.warn("Organization created but webhook installation failed:",g),K.error("Webhook Installation Failed",g instanceof Error?g.message:"Failed to install webhook. You can try installing it manually from the organization details page.")}K.success("Organization Created",`Organization ${M.name} has been created successfully.`),a(p,!1)}catch(u){throw a(b,Pe(u)),u}}async function d(t){if(e(c))try{await me.updateOrganization(e(c).id,t),K.success("Organization Updated",`Organization ${e(c).name} has been updated successfully.`),a(A,!1),a(c,null)}catch(u){throw u}}async function L(){if(e(c))try{a(b,""),await me.deleteOrganization(e(c).id),K.success("Organization Deleted",`Organization ${e(c).name} has been deleted successfully.`),a(c,null)}catch(t){const u=Pe(t);K.error("Delete Failed",u)}finally{ye()}}function ee(){a(p,!0)}function N(t){a(c,t),a(A,!0)}function te(t){a(c,t),a(B,!0)}je(async()=>{try{a(C,!0);const t=await Me.getOrganizations();t&&Array.isArray(t)&&a($,t)}catch(t){console.error("Failed to load organizations:",t),a(b,t instanceof Error?t.message:"Failed to load organizations")}finally{a(C,!1)}});async function _e(){try{await Me.retryResource("organizations")}catch(t){console.error("Retry failed:",t)}}const xe=[{key:"name",title:"Name",cellComponent:bt,cellProps:{entityType:"organization"}},{key:"endpoint",title:"Endpoint",cellComponent:vt},{key:"credentials",title:"Credentials",cellComponent:pt,cellProps:{field:"credentials_name"}},{key:"status",title:"Status",cellComponent:yt,cellProps:{statusType:"entity"}},{key:"actions",title:"Actions",align:"right",cellComponent:ft}],ke={entityType:"organization",primaryText:{field:"name",isClickable:!0,href:"/organizations/{id}"},customInfo:[{icon:t=>Oe(t?.endpoint?.endpoint_type||"unknown"),text:t=>t?.endpoint?.name||"Unknown"}],badges:[{type:"custom",value:t=>Ce(t)}],actions:[{type:"edit",handler:t=>N(t)},{type:"delete",handler:t=>te(t)}]};function h(t){a(y,t.detail.term),a(r,1)}function _(t){a(r,t.detail.page)}function F(t){a(k,t.detail.perPage),a(r,1)}function U(t){N(t.detail.item)}function se(t){te(t.detail.item)}x(()=>(e($),f()),()=>{(!e($).length||f().loaded.organizations)&&a($,f().organizations)}),x(()=>f(),()=>{a(C,f().loading.organizations)}),x(()=>f(),()=>{a(D,f().errorMessages.organizations)}),x(()=>(e($),e(y)),()=>{a(w,gt(e($),e(y)))}),x(()=>(e(w),e(k)),()=>{a(z,Math.ceil(e(w).length/e(k)))}),x(()=>(e(r),e(z)),()=>{e(r)>e(z)&&e(z)>0&&a(r,e(z))}),x(()=>(e(w),e(r),e(k)),()=>{a(Z,e(w).slice((e(r)-1)*e(k),e(r)*e(k)))}),qe(),Le();var j=Pt();Xe(t=>{et.title="Organizations - GARM"});var S=Ze(j),q=o(S);ct(q,{title:"Organizations",description:"Manage GitHub and Gitea organizations",actionLabel:"Add Organization",$$events:{action:ee}});var we=i(q,2);{let t=ue(()=>e(D)||e(b)),u=ue(()=>!!e(D));mt(we,{get columns(){return xe},get data(){return e(Z)},get loading(){return e(C)},get error(){return e(t)},get searchTerm(){return e(y)},searchPlaceholder:"Search organizations...",get currentPage(){return e(r)},get perPage(){return e(k)},get totalPages(){return e(z)},get totalItems(){return e(w),v(()=>e(w).length)},itemName:"organizations",emptyIconType:"building",get showRetry(){return e(u)},get mobileCardConfig(){return ke},$$events:{search:h,pageChange:_,perPageChange:F,retry:_e,edit:U,delete:se},$$slots:{"mobile-card":(I,M)=>{const g=ue(()=>M.item),J=ue(()=>(P(Ce),P(e(g)),v(()=>Ce(e(g)))));var ne=Ot(),V=o(ne),Y=o(V),R=o(Y),ze=o(R,!0);n(R);var l=i(R,2),m=o(l),O=o(m);tt(O,()=>(P(Oe),P(e(g)),v(()=>Oe(e(g).endpoint?.endpoint_type||"unknown"))));var de=i(O,2),ce=o(de,!0);n(de),n(m),n(l),n(Y),n(V);var Ee=i(V,2),Te=o(Ee);ut(Te,{get variant(){return P(e(J)),v(()=>e(J).variant)},get text(){return P(e(J)),v(()=>e(J).text)}});var De=i(Te,2),Se=o(De);Be(Se,{action:"edit",size:"sm",title:"Edit organization",ariaLabel:"Edit organization",$$events:{click:()=>N(e(g))}});var Ye=i(Se,2);Be(Ye,{action:"delete",size:"sm",title:"Delete organization",ariaLabel:"Delete organization",$$events:{click:()=>te(e(g))}}),n(De),n(Ee),n(ne),Q(Ke=>{at(Y,"href",Ke),ie(ze,(P(e(g)),v(()=>e(g).name))),ie(ce,(P(e(g)),v(()=>e(g).endpoint?.name||"Unknown")))},[()=>(P(Ie),P(e(g)),v(()=>Ie(`/organizations/${e(g).id}`)))]),E(I,ne)}}})}n(S);var G=i(S,2);{var ae=t=>{Ct(t,{$$events:{close:()=>a(p,!1),submit:he}})};X(G,t=>{e(p)&&t(ae)})}var H=i(G,2);{var le=t=>{lt(t,{get entity(){return e(c)},entityType:"organization",$$events:{close:()=>{a(A,!1),a(c,null)},submit:u=>d(u.detail)}})};X(H,t=>{e(A)&&e(c)&&t(le)})}var re=i(H,2);{var oe=t=>{dt(t,{title:"Delete Organization",message:"Are you sure you want to delete this organization? This action cannot be undone.",get itemName(){return e(c),v(()=>e(c).name)},$$events:{close:()=>{a(B,!1),a(c,null)},confirm:L}})};X(re,t=>{e(B)&&e(c)&&t(oe)})}E(pe,j),Ge(),ve()}export{Kt as component}; diff --git a/webapp/assets/_app/immutable/nodes/12.BfFdd_FP.js b/webapp/assets/_app/immutable/nodes/12.BfFdd_FP.js new file mode 100644 index 00000000..63813e4d --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/12.BfFdd_FP.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as We}from"../chunks/zNh6Oe5P.js";import{p as qe,o as He,A as je,l as Ge,a as Re,f as S,h as Ve,b as C,t as H,c as x,d as Je,u as i,n as de,v as ce,g as e,m as l,j as f,k as d,s as o,$ as Ke,r as m,y as Qe,B as ue,q as g}from"../chunks/sWNKMed7.js";import{i as h,s as Xe,a as Ye}from"../chunks/Ccl3fNd2.js";import{d as A,c as Ze,g as _}from"../chunks/t8NOL8UT.js";import{p as et}from"../chunks/-DWf2IZZ.js";import{g as fe}from"../chunks/CaJ57PEy.js";import{U as tt}from"../chunks/nqMQkPXF.js";import{D as me}from"../chunks/Dxyf9P7U.js";import{E as at,P as nt,a as ot}from"../chunks/DJF9YLeI.js";import{D as rt,I as it}from"../chunks/CMejw1Yi.js";import{g as ge}from"../chunks/Cbkm53HO.js";import{e as j}from"../chunks/BZiHL9L3.js";import{W as st}from"../chunks/otv9vQQV.js";import{C as lt}from"../chunks/Csic5lDL.js";import{w as G}from"../chunks/BuuPrWMc.js";import{t as E}from"../chunks/BZUCTtPY.js";var dt=S('

Loading organization...

'),ct=S('

'),ut=S(" ",1),ft=S(' ',1);function Pt(pe,ve){qe(ve,!1);const[ye,he]=Xe(),R=()=>Ye(et,"$page",ye),I=l();let a=l(null),c=l([]),p=l([]),B=l(!0),O=l(""),D=l(!1),T=l(!1),w=l(!1),P=l(!1),u=l(null),M=null,b=l();async function V(){if(e(I))try{o(B,!0),o(O,"");const[t,n,r]=await Promise.all([_.getOrganization(e(I)),_.listOrganizationPools(e(I)).catch(()=>[]),_.listOrganizationInstances(e(I)).catch(()=>[])]);o(a,t),o(c,n),o(p,r)}catch(t){o(O,j(t))}finally{o(B,!1)}}function _e(t,n){const{events:r}=t;return{...n,events:r}}async function be(t){if(e(a))try{await _.updateOrganization(e(a).id,t),await V(),E.success("Organization Updated",`Organization ${e(a).name} has been updated successfully.`),o(D,!1)}catch(n){throw n}}async function ze(){if(e(a)){try{await _.deleteOrganization(e(a).id),fe(A("/organizations"))}catch(t){const n=j(t);E.error("Delete Failed",n)}o(T,!1)}}async function $e(){if(e(u))try{await _.deleteInstance(e(u).name),E.success("Instance Deleted",`Instance ${e(u).name} has been deleted successfully.`),o(w,!1),o(u,null)}catch(t){const n=j(t);E.error("Delete Failed",n),o(w,!1),o(u,null)}}function xe(t){o(u,t),o(w,!0)}function Ie(){o(P,!0)}async function we(t){try{if(!e(a))return;await _.createOrganizationPool(e(a).id,t.detail),E.success("Pool Created",`Pool has been created successfully for organization ${e(a).name}.`),o(P,!1)}catch(n){throw n}}function J(){e(b)&&Qe(b,e(b).scrollTop=e(b).scrollHeight)}function Ee(t){if(t.operation==="update"){const n=t.payload;if(e(a)&&n.id===e(a).id){const r=e(a).events?.length||0,s=n.events?.length||0;o(a,_e(e(a),n)),s>r&&setTimeout(()=>{J()},100)}}else if(t.operation==="delete"){const n=t.payload.id||t.payload;e(a)&&e(a).id===n&&fe(A("/organizations"))}}function Oe(t){if(!e(a))return;const n=t.payload;if(n.org_id===e(a).id){if(t.operation==="create")o(c,[...e(c),n]);else if(t.operation==="update")o(c,e(c).map(r=>r.id===n.id?n:r));else if(t.operation==="delete"){const r=n.id||n;o(c,e(c).filter(s=>s.id!==r))}}}function De(t){if(!e(a)||!e(c))return;const n=t.payload;if(e(c).some(s=>s.id===n.pool_id)){if(t.operation==="create")o(p,[...e(p),n]);else if(t.operation==="update")o(p,e(p).map(s=>s.id===n.id?n:s));else if(t.operation==="delete"){const s=n.id||n;o(p,e(p).filter(N=>N.id!==s))}}}He(()=>{V().then(()=>{e(a)?.events?.length&&setTimeout(()=>{J()},100)});const t=G.subscribeToEntity("organization",["update","delete"],Ee),n=G.subscribeToEntity("pool",["create","update","delete"],Oe),r=G.subscribeToEntity("instance",["create","update","delete"],De);M=()=>{t(),n(),r()}}),je(()=>{M&&(M(),M=null)}),Ge(()=>R(),()=>{o(I,R().params.id)}),Re(),We();var K=ft();Ve(t=>{H(()=>Ke.title=`${e(a),i(()=>e(a)?`${e(a).name} - Organization Details`:"Organization Details")??""} - GARM`)});var U=C(K),F=f(U),Q=f(F),L=f(Q),Te=f(L);m(L);var X=d(L,2),Y=f(X),Z=d(f(Y),2),Pe=f(Z,!0);m(Z),m(Y),m(X),m(Q),m(F);var Me=d(F,2);{var ke=t=>{var n=dt();x(t,n)},Ce=t=>{var n=ue(),r=C(n);{var s=z=>{var $=ct(),k=f($),W=f(k,!0);m(k),m($),H(()=>ce(W,e(O))),x(z,$)},N=z=>{var $=ue(),k=C($);{var W=q=>{var ne=ut(),oe=C(ne);{let v=g(()=>(e(a),i(()=>e(a).name||"Organization"))),y=g(()=>(e(a),i(()=>e(a).endpoint?.name))),Ne=g(()=>(de(ge),e(a),i(()=>ge(e(a).endpoint?.endpoint_type||"unknown"))));rt(oe,{get title(){return e(v)},get subtitle(){return`Endpoint: ${e(y)??""}`},get forgeIcon(){return e(Ne)},onEdit:()=>o(D,!0),onDelete:()=>o(T,!0)})}var re=d(oe,2);at(re,{get entity(){return e(a)},entityType:"organization"});var ie=d(re,2);{let v=g(()=>(e(a),i(()=>e(a).id||""))),y=g(()=>(e(a),i(()=>e(a).name||"")));st(ie,{entityType:"organization",get entityId(){return e(v)},get entityName(){return e(y)}})}var se=d(ie,2);{let v=g(()=>(e(a),i(()=>e(a).id||""))),y=g(()=>(e(a),i(()=>e(a).name||"")));nt(se,{get pools(){return e(c)},entityType:"organization",get entityId(){return e(v)},get entityName(){return e(y)},$$events:{addPool:Ie}})}var le=d(se,2);it(le,{get instances(){return e(p)},entityType:"organization",onDeleteInstance:xe});var Le=d(le,2);{let v=g(()=>(e(a),i(()=>e(a)?.events)));ot(Le,{get events(){return e(v)},get eventsContainer(){return e(b)},set eventsContainer(y){o(b,y)},$$legacy:!0})}x(q,ne)};h(k,q=>{e(a)&&q(W)},!0)}x(z,$)};h(r,z=>{e(O)?z(s):z(N,!1)},!0)}x(t,n)};h(Me,t=>{e(B)?t(ke):t(Ce,!1)})}m(U);var ee=d(U,2);{var Ae=t=>{tt(t,{get entity(){return e(a)},entityType:"organization",$$events:{close:()=>o(D,!1),submit:n=>be(n.detail)}})};h(ee,t=>{e(D)&&e(a)&&t(Ae)})}var te=d(ee,2);{var Se=t=>{me(t,{title:"Delete Organization",message:"Are you sure you want to delete this organization? This action cannot be undone and will remove all associated pools and instances.",get itemName(){return e(a),i(()=>e(a).name)},$$events:{close:()=>o(T,!1),confirm:ze}})};h(te,t=>{e(T)&&e(a)&&t(Se)})}var ae=d(te,2);{var Be=t=>{me(t,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(u),i(()=>e(u).name)},$$events:{close:()=>{o(w,!1),o(u,null)},confirm:$e}})};h(ae,t=>{e(w)&&e(u)&&t(Be)})}var Ue=d(ae,2);{var Fe=t=>{{let n=g(()=>(e(a),i(()=>e(a).id||"")));lt(t,{initialEntityType:"organization",get initialEntityId(){return e(n)},$$events:{close:()=>o(P,!1),submit:we}})}};h(Ue,t=>{e(P)&&e(a)&&t(Fe)})}H(t=>{Ze(Te,"href",t),ce(Pe,(e(a),i(()=>e(a)?e(a).name:"Loading...")))},[()=>(de(A),i(()=>A("/organizations")))]),x(pe,K),Je(),he()}export{Pt as component}; diff --git a/webapp/assets/_app/immutable/nodes/12.CtZLJ4UU.js b/webapp/assets/_app/immutable/nodes/12.CtZLJ4UU.js deleted file mode 100644 index 5642a25c..00000000 --- a/webapp/assets/_app/immutable/nodes/12.CtZLJ4UU.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Ne}from"../chunks/B3Pzt0F_.js";import{p as We,o as qe,A as He,l as je,a as Ge,f as A,h as Re,b as C,t as q,c as x,d as Ve,g as e,m as l,s as o,u as s,$ as Je,j as f,r as m,k as d,v as de,y as Ke,B as ce,q as g,n as Qe}from"../chunks/D8EpLgQ1.js";import{i as h,s as Xe,a as Ye}from"../chunks/5WA7h8uK.js";import{c as Ze,g as _}from"../chunks/CiE1LlKV.js";import{p as et}from"../chunks/-1rkm990.js";import{g as ue}from"../chunks/DsX4H4sg.js";import{b as H}from"../chunks/D3_ugSUS.js";import{U as tt}from"../chunks/CIBm3n2u.js";import{D as fe}from"../chunks/KQ2xQpA3.js";import{E as at,P as nt,a as ot}from"../chunks/DxQgLoe9.js";import{D as rt,I as it}from"../chunks/G-ddPbA8.js";import{g as me}from"../chunks/D5ucq3Gx.js";import{e as j}from"../chunks/BZiHL9L3.js";import{W as st}from"../chunks/BsqC4UA1.js";import{C as lt}from"../chunks/CRD55Dyg.js";import{w as G}from"../chunks/u94nIB4-.js";import{t as E}from"../chunks/BEkVdVE1.js";var dt=A('

Loading organization...

'),ct=A('

'),ut=A(" ",1),ft=A(' ',1);function Mt(ge,pe){We(pe,!1);const[ve,ye]=Xe(),R=()=>Ye(et,"$page",ve),I=l();let a=l(null),c=l([]),p=l([]),S=l(!0),O=l(""),D=l(!1),T=l(!1),w=l(!1),P=l(!1),u=l(null),M=null,b=l();async function V(){if(e(I))try{o(S,!0),o(O,"");const[t,n,r]=await Promise.all([_.getOrganization(e(I)),_.listOrganizationPools(e(I)).catch(()=>[]),_.listOrganizationInstances(e(I)).catch(()=>[])]);o(a,t),o(c,n),o(p,r)}catch(t){o(O,j(t))}finally{o(S,!1)}}function he(t,n){const{events:r}=t;return{...n,events:r}}async function _e(t){if(e(a))try{await _.updateOrganization(e(a).id,t),await V(),E.success("Organization Updated",`Organization ${e(a).name} has been updated successfully.`),o(D,!1)}catch(n){throw n}}async function be(){if(e(a)){try{await _.deleteOrganization(e(a).id),ue(`${H}/organizations`)}catch(t){const n=j(t);E.error("Delete Failed",n)}o(T,!1)}}async function ze(){if(e(u))try{await _.deleteInstance(e(u).name),E.success("Instance Deleted",`Instance ${e(u).name} has been deleted successfully.`),o(w,!1),o(u,null)}catch(t){const n=j(t);E.error("Delete Failed",n),o(w,!1),o(u,null)}}function $e(t){o(u,t),o(w,!0)}function xe(){o(P,!0)}async function Ie(t){try{if(!e(a))return;await _.createOrganizationPool(e(a).id,t.detail),E.success("Pool Created",`Pool has been created successfully for organization ${e(a).name}.`),o(P,!1)}catch(n){throw n}}function J(){e(b)&&Ke(b,e(b).scrollTop=e(b).scrollHeight)}function we(t){if(t.operation==="update"){const n=t.payload;if(e(a)&&n.id===e(a).id){const r=e(a).events?.length||0,i=n.events?.length||0;o(a,he(e(a),n)),i>r&&setTimeout(()=>{J()},100)}}else if(t.operation==="delete"){const n=t.payload.id||t.payload;e(a)&&e(a).id===n&&ue(`${H}/organizations`)}}function Ee(t){if(!e(a))return;const n=t.payload;if(n.org_id===e(a).id){if(t.operation==="create")o(c,[...e(c),n]);else if(t.operation==="update")o(c,e(c).map(r=>r.id===n.id?n:r));else if(t.operation==="delete"){const r=n.id||n;o(c,e(c).filter(i=>i.id!==r))}}}function Oe(t){if(!e(a)||!e(c))return;const n=t.payload;if(e(c).some(i=>i.id===n.pool_id)){if(t.operation==="create")o(p,[...e(p),n]);else if(t.operation==="update")o(p,e(p).map(i=>i.id===n.id?n:i));else if(t.operation==="delete"){const i=n.id||n;o(p,e(p).filter(L=>L.id!==i))}}}qe(()=>{V().then(()=>{e(a)?.events?.length&&setTimeout(()=>{J()},100)});const t=G.subscribeToEntity("organization",["update","delete"],we),n=G.subscribeToEntity("pool",["create","update","delete"],Ee),r=G.subscribeToEntity("instance",["create","update","delete"],Oe);M=()=>{t(),n(),r()}}),He(()=>{M&&(M(),M=null)}),je(()=>R(),()=>{o(I,R().params.id)}),Ge(),Ne();var K=ft();Re(t=>{q(()=>Je.title=`${e(a),s(()=>e(a)?`${e(a).name} - Organization Details`:"Organization Details")??""} - GARM`)});var B=C(K),U=f(B),Q=f(U),F=f(Q),De=f(F);m(F);var X=d(F,2),Y=f(X),Z=d(f(Y),2),Te=f(Z,!0);m(Z),m(Y),m(X),m(Q),m(U);var Pe=d(U,2);{var Me=t=>{var n=dt();x(t,n)},ke=t=>{var n=ce(),r=C(n);{var i=z=>{var $=ct(),k=f($),N=f(k,!0);m(k),m($),q(()=>de(N,e(O))),x(z,$)},L=z=>{var $=ce(),k=C($);{var N=W=>{var ne=ut(),oe=C(ne);{let v=g(()=>(e(a),s(()=>e(a).name||"Organization"))),y=g(()=>(e(a),s(()=>e(a).endpoint?.name))),Le=g(()=>(Qe(me),e(a),s(()=>me(e(a).endpoint?.endpoint_type||"unknown"))));rt(oe,{get title(){return e(v)},get subtitle(){return`Endpoint: ${e(y)??""}`},get forgeIcon(){return e(Le)},onEdit:()=>o(D,!0),onDelete:()=>o(T,!0)})}var re=d(oe,2);at(re,{get entity(){return e(a)},entityType:"organization"});var ie=d(re,2);{let v=g(()=>(e(a),s(()=>e(a).id||""))),y=g(()=>(e(a),s(()=>e(a).name||"")));st(ie,{entityType:"organization",get entityId(){return e(v)},get entityName(){return e(y)}})}var se=d(ie,2);{let v=g(()=>(e(a),s(()=>e(a).id||""))),y=g(()=>(e(a),s(()=>e(a).name||"")));nt(se,{get pools(){return e(c)},entityType:"organization",get entityId(){return e(v)},get entityName(){return e(y)},$$events:{addPool:xe}})}var le=d(se,2);it(le,{get instances(){return e(p)},entityType:"organization",onDeleteInstance:$e});var Fe=d(le,2);{let v=g(()=>(e(a),s(()=>e(a)?.events)));ot(Fe,{get events(){return e(v)},get eventsContainer(){return e(b)},set eventsContainer(y){o(b,y)},$$legacy:!0})}x(W,ne)};h(k,W=>{e(a)&&W(N)},!0)}x(z,$)};h(r,z=>{e(O)?z(i):z(L,!1)},!0)}x(t,n)};h(Pe,t=>{e(S)?t(Me):t(ke,!1)})}m(B);var ee=d(B,2);{var Ce=t=>{tt(t,{get entity(){return e(a)},entityType:"organization",$$events:{close:()=>o(D,!1),submit:n=>_e(n.detail)}})};h(ee,t=>{e(D)&&e(a)&&t(Ce)})}var te=d(ee,2);{var Ae=t=>{fe(t,{title:"Delete Organization",message:"Are you sure you want to delete this organization? This action cannot be undone and will remove all associated pools and instances.",get itemName(){return e(a),s(()=>e(a).name)},$$events:{close:()=>o(T,!1),confirm:be}})};h(te,t=>{e(T)&&e(a)&&t(Ae)})}var ae=d(te,2);{var Se=t=>{fe(t,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(u),s(()=>e(u).name)},$$events:{close:()=>{o(w,!1),o(u,null)},confirm:ze}})};h(ae,t=>{e(w)&&e(u)&&t(Se)})}var Be=d(ae,2);{var Ue=t=>{{let n=g(()=>(e(a),s(()=>e(a).id||"")));lt(t,{initialEntityType:"organization",get initialEntityId(){return e(n)},$$events:{close:()=>o(P,!1),submit:Ie}})}};h(Be,t=>{e(P)&&e(a)&&t(Ue)})}q(()=>{Ze(De,"href",`${H}/organizations`),de(Te,(e(a),s(()=>e(a)?e(a).name:"Loading...")))}),x(ge,K),Ve(),ye()}export{Mt as component}; diff --git a/webapp/assets/_app/immutable/nodes/13.BzU_kqxx.js b/webapp/assets/_app/immutable/nodes/13.Bzfe-m2N.js similarity index 81% rename from webapp/assets/_app/immutable/nodes/13.BzU_kqxx.js rename to webapp/assets/_app/immutable/nodes/13.Bzfe-m2N.js index 25cc4885..34445dd1 100644 --- a/webapp/assets/_app/immutable/nodes/13.BzU_kqxx.js +++ b/webapp/assets/_app/immutable/nodes/13.Bzfe-m2N.js @@ -1 +1 @@ -import"../chunks/DsnmJJEf.js";import{i as se}from"../chunks/B3Pzt0F_.js";import{p as ne,o as ie,l as d,a as ce,f as de,h as pe,b as ue,c as me,d as fe,g as t,m as l,$ as ge,j as ye,q as M,u as F,k as C,s as o,r as he,n as Pe}from"../chunks/D8EpLgQ1.js";import{i as D,s as Ce,a as ve}from"../chunks/5WA7h8uK.js";import{g as N}from"../chunks/CiE1LlKV.js";import{P as $e}from"../chunks/CO4LUyTP.js";import{C as be}from"../chunks/CRD55Dyg.js";import{U as _e}from"../chunks/Bgb-frqW.js";import{D as Me}from"../chunks/KQ2xQpA3.js";import{e as De,a as R}from"../chunks/wyaP0EDu.js";import{t as f}from"../chunks/BEkVdVE1.js";import{e as v,h as Ee}from"../chunks/D5ucq3Gx.js";import{e as G}from"../chunks/BZiHL9L3.js";import{D as Te,G as E,a as we}from"../chunks/B_CZMFLe.js";import{E as ke}from"../chunks/C9H3KoyH.js";import{E as Ae}from"../chunks/DMCMHBOH.js";import{S as xe}from"../chunks/dB1NgJWc.js";import{P as Ie}from"../chunks/CI9532zv.js";import"../chunks/D3_ugSUS.js";var Ue=de('
',1);function Ze(q,L){ne(L,!1);const[j,H]=Ce(),r=()=>ve(De,"$eagerCache",j),$=l(),i=l(),p=l(),T=l();let u=l([]),g=l(!0),w=l(""),y=l(""),s=l(1),c=l(25),h=l(!1),P=l(!1),m=l(!1),a=l(null);async function V(){f.success("Pool Created","Pool has been created successfully."),o(h,!1)}async function z(e){if(t(a))try{await N.updatePool(t(a).id,e),o(P,!1),f.add({type:"success",title:"Pool Updated",message:`Pool ${t(a).id.slice(0,8)}... has been updated successfully.`}),o(a,null)}catch(n){const _=G(n);throw f.add({type:"error",title:"Update Failed",message:_}),n}}async function B(){if(!t(a))return;const e=`Pool ${t(a).id.slice(0,8)}...`;try{await N.deletePool(t(a).id),o(m,!1),f.add({type:"success",title:"Pool Deleted",message:`${e} has been deleted successfully.`}),o(a,null)}catch(n){const _=G(n);f.add({type:"error",title:"Delete Failed",message:_})}o(m,!1),o(a,null)}function J(){o(h,!0)}function k(e){o(a,e),o(P,!0)}function A(e){o(a,e),o(m,!0)}ie(async()=>{try{o(g,!0);const e=await R.getPools();e&&Array.isArray(e)&&o(u,e)}catch(e){console.error("Failed to load pools:",e),o(w,e instanceof Error?e.message:"Failed to load pools")}finally{o(g,!1)}});async function K(){try{await R.retryResource("pools")}catch(e){console.error("Retry failed:",e)}}const O=[{key:"id",title:"ID",flexible:!0,cellComponent:ke,cellProps:{entityType:"pool",showId:!0,fontMono:!0}},{key:"image",title:"Image",flexible:!0,cellComponent:E,cellProps:{field:"image",type:"code",showTitle:!0}},{key:"provider",title:"Provider",cellComponent:E,cellProps:{field:"provider_name"}},{key:"flavor",title:"Flavor",cellComponent:E,cellProps:{field:"flavor"}},{key:"entity",title:"Entity",cellComponent:Ie},{key:"endpoint",title:"Endpoint",cellComponent:Ae},{key:"status",title:"Status",cellComponent:xe,cellProps:{statusType:"enabled"}},{key:"actions",title:"Actions",align:"right",cellComponent:we}],Q={entityType:"pool",primaryText:{field:"id",isClickable:!0,href:"/pools/{id}",useId:!0,isMonospace:!0},secondaryText:{field:"entity_name",computedValue:e=>v(e,r())},badges:[{type:"custom",value:e=>({variant:e.enabled?"success":"error",text:e.enabled?"Enabled":"Disabled"})}],actions:[{type:"edit",handler:e=>k(e)},{type:"delete",handler:e=>A(e)}]};function W(e){o(y,e.detail.term),o(s,1)}function X(e){o(s,e.detail.page)}function Y(e){o(c,e.detail.perPage),o(s,1)}function Z(e){k(e.detail.item)}function ee(e){A(e.detail.item)}d(()=>(t(u),r()),()=>{(!t(u).length||r().loaded.pools)&&o(u,r().pools)}),d(()=>r(),()=>{o(g,r().loading.pools)}),d(()=>r(),()=>{o($,r().errorMessages.pools)}),d(()=>(t(u),t(y),r()),()=>{o(i,Ee(t(u),t(y),e=>v(e,r())))}),d(()=>(t(i),t(c)),()=>{o(p,Math.ceil(t(i).length/t(c)))}),d(()=>(t(s),t(p)),()=>{t(s)>t(p)&&t(p)>0&&o(s,t(p))}),d(()=>(t(i),t(s),t(c)),()=>{o(T,t(i).slice((t(s)-1)*t(c),t(s)*t(c)))}),ce(),se();var x=Ue();pe(e=>{ge.title="Pools - GARM"});var b=ue(x),I=ye(b);$e(I,{title:"Pools",description:"Manage runner pools across all entities",actionLabel:"Add Pool",$$events:{action:J}});var te=C(I,2);{let e=M(()=>t($)||t(w)),n=M(()=>!!t($));Te(te,{get columns(){return O},get data(){return t(T)},get loading(){return t(g)},get error(){return t(e)},get searchTerm(){return t(y)},searchPlaceholder:"Search by entity name...",get currentPage(){return t(s)},get perPage(){return t(c)},get totalPages(){return t(p)},get totalItems(){return t(i),F(()=>t(i).length)},itemName:"pools",emptyIconType:"cog",get showRetry(){return t(n)},get mobileCardConfig(){return Q},$$events:{search:W,pageChange:X,perPageChange:Y,retry:K,edit:Z,delete:ee}})}he(b);var U=C(b,2);{var oe=e=>{be(e,{$$events:{close:()=>o(h,!1),submit:()=>V()}})};D(U,e=>{t(h)&&e(oe)})}var S=C(U,2);{var ae=e=>{_e(e,{get pool(){return t(a)},$$events:{close:()=>{o(P,!1),o(a,null)},submit:n=>z(n.detail)}})};D(S,e=>{t(P)&&t(a)&&e(ae)})}var le=C(S,2);{var re=e=>{{let n=M(()=>(t(a),Pe(v),r(),F(()=>`Pool ${t(a).id.slice(0,8)}... (${v(t(a),r())})`)));Me(e,{title:"Delete Pool",message:"Are you sure you want to delete this pool? This action cannot be undone and will remove all associated runners.",get itemName(){return t(n)},$$events:{close:()=>{o(m,!1),o(a,null)},confirm:B}})}};D(le,e=>{t(m)&&t(a)&&e(re)})}me(q,x),fe(),H()}export{Ze as component}; +import"../chunks/DsnmJJEf.js";import{i as se}from"../chunks/zNh6Oe5P.js";import{p as ne,o as ie,l as d,a as ce,f as de,h as pe,b as ue,c as me,d as fe,g as t,m as l,$ as ge,j as ye,q as M,u as F,k as C,s as o,r as he,n as Pe}from"../chunks/sWNKMed7.js";import{i as D,s as Ce,a as ve}from"../chunks/Ccl3fNd2.js";import{g as N}from"../chunks/t8NOL8UT.js";import{P as $e}from"../chunks/sdr-JCKi.js";import{C as be}from"../chunks/Csic5lDL.js";import{U as _e}from"../chunks/DLiuxLBn.js";import{D as Me}from"../chunks/Dxyf9P7U.js";import{e as De,a as R}from"../chunks/UPGsoYWO.js";import{t as f}from"../chunks/BZUCTtPY.js";import{e as v,h as Ee}from"../chunks/Cbkm53HO.js";import{e as G}from"../chunks/BZiHL9L3.js";import{D as Te,G as E,a as we}from"../chunks/WvS03pW2.js";import{E as ke}from"../chunks/CfvU88k5.js";import{E as Ae}from"../chunks/CC0e8UY8.js";import{S as xe}from"../chunks/C7WQ-JBG.js";import{P as Ie}from"../chunks/MfZe8e4a.js";import"../chunks/BFThZs5w.js";var Ue=de('
',1);function Ze(q,L){ne(L,!1);const[j,H]=Ce(),r=()=>ve(De,"$eagerCache",j),$=l(),i=l(),p=l(),T=l();let u=l([]),g=l(!0),w=l(""),y=l(""),s=l(1),c=l(25),h=l(!1),P=l(!1),m=l(!1),a=l(null);async function V(){f.success("Pool Created","Pool has been created successfully."),o(h,!1)}async function z(e){if(t(a))try{await N.updatePool(t(a).id,e),o(P,!1),f.add({type:"success",title:"Pool Updated",message:`Pool ${t(a).id.slice(0,8)}... has been updated successfully.`}),o(a,null)}catch(n){const _=G(n);throw f.add({type:"error",title:"Update Failed",message:_}),n}}async function B(){if(!t(a))return;const e=`Pool ${t(a).id.slice(0,8)}...`;try{await N.deletePool(t(a).id),o(m,!1),f.add({type:"success",title:"Pool Deleted",message:`${e} has been deleted successfully.`}),o(a,null)}catch(n){const _=G(n);f.add({type:"error",title:"Delete Failed",message:_})}o(m,!1),o(a,null)}function J(){o(h,!0)}function k(e){o(a,e),o(P,!0)}function A(e){o(a,e),o(m,!0)}ie(async()=>{try{o(g,!0);const e=await R.getPools();e&&Array.isArray(e)&&o(u,e)}catch(e){console.error("Failed to load pools:",e),o(w,e instanceof Error?e.message:"Failed to load pools")}finally{o(g,!1)}});async function K(){try{await R.retryResource("pools")}catch(e){console.error("Retry failed:",e)}}const O=[{key:"id",title:"ID",flexible:!0,cellComponent:ke,cellProps:{entityType:"pool",showId:!0,fontMono:!0}},{key:"image",title:"Image",flexible:!0,cellComponent:E,cellProps:{field:"image",type:"code",showTitle:!0}},{key:"provider",title:"Provider",cellComponent:E,cellProps:{field:"provider_name"}},{key:"flavor",title:"Flavor",cellComponent:E,cellProps:{field:"flavor"}},{key:"entity",title:"Entity",cellComponent:Ie},{key:"endpoint",title:"Endpoint",cellComponent:Ae},{key:"status",title:"Status",cellComponent:xe,cellProps:{statusType:"enabled"}},{key:"actions",title:"Actions",align:"right",cellComponent:we}],Q={entityType:"pool",primaryText:{field:"id",isClickable:!0,href:"/pools/{id}",useId:!0,isMonospace:!0},secondaryText:{field:"entity_name",computedValue:e=>v(e,r())},badges:[{type:"custom",value:e=>({variant:e.enabled?"success":"error",text:e.enabled?"Enabled":"Disabled"})}],actions:[{type:"edit",handler:e=>k(e)},{type:"delete",handler:e=>A(e)}]};function W(e){o(y,e.detail.term),o(s,1)}function X(e){o(s,e.detail.page)}function Y(e){o(c,e.detail.perPage),o(s,1)}function Z(e){k(e.detail.item)}function ee(e){A(e.detail.item)}d(()=>(t(u),r()),()=>{(!t(u).length||r().loaded.pools)&&o(u,r().pools)}),d(()=>r(),()=>{o(g,r().loading.pools)}),d(()=>r(),()=>{o($,r().errorMessages.pools)}),d(()=>(t(u),t(y),r()),()=>{o(i,Ee(t(u),t(y),e=>v(e,r())))}),d(()=>(t(i),t(c)),()=>{o(p,Math.ceil(t(i).length/t(c)))}),d(()=>(t(s),t(p)),()=>{t(s)>t(p)&&t(p)>0&&o(s,t(p))}),d(()=>(t(i),t(s),t(c)),()=>{o(T,t(i).slice((t(s)-1)*t(c),t(s)*t(c)))}),ce(),se();var x=Ue();pe(e=>{ge.title="Pools - GARM"});var b=ue(x),I=ye(b);$e(I,{title:"Pools",description:"Manage runner pools across all entities",actionLabel:"Add Pool",$$events:{action:J}});var te=C(I,2);{let e=M(()=>t($)||t(w)),n=M(()=>!!t($));Te(te,{get columns(){return O},get data(){return t(T)},get loading(){return t(g)},get error(){return t(e)},get searchTerm(){return t(y)},searchPlaceholder:"Search by entity name...",get currentPage(){return t(s)},get perPage(){return t(c)},get totalPages(){return t(p)},get totalItems(){return t(i),F(()=>t(i).length)},itemName:"pools",emptyIconType:"cog",get showRetry(){return t(n)},get mobileCardConfig(){return Q},$$events:{search:W,pageChange:X,perPageChange:Y,retry:K,edit:Z,delete:ee}})}he(b);var U=C(b,2);{var oe=e=>{be(e,{$$events:{close:()=>o(h,!1),submit:()=>V()}})};D(U,e=>{t(h)&&e(oe)})}var S=C(U,2);{var ae=e=>{_e(e,{get pool(){return t(a)},$$events:{close:()=>{o(P,!1),o(a,null)},submit:n=>z(n.detail)}})};D(S,e=>{t(P)&&t(a)&&e(ae)})}var le=C(S,2);{var re=e=>{{let n=M(()=>(t(a),Pe(v),r(),F(()=>`Pool ${t(a).id.slice(0,8)}... (${v(t(a),r())})`)));Me(e,{title:"Delete Pool",message:"Are you sure you want to delete this pool? This action cannot be undone and will remove all associated runners.",get itemName(){return t(n)},$$events:{close:()=>{o(m,!1),o(a,null)},confirm:B}})}};D(le,e=>{t(m)&&t(a)&&e(re)})}me(q,x),fe(),H()}export{Ze as component}; diff --git a/webapp/assets/_app/immutable/nodes/14.BBGzJxG3.js b/webapp/assets/_app/immutable/nodes/14.BBGzJxG3.js deleted file mode 100644 index 9aea1465..00000000 --- a/webapp/assets/_app/immutable/nodes/14.BBGzJxG3.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as He}from"../chunks/B3Pzt0F_.js";import{p as Ve,o as We,A as Ke,l as Qe,a as Xe,f as h,h as Ye,b as B,t as b,c as x,d as Ze,s as n,m as y,u as i,$ as ta,g as t,j as r,r as a,k as s,v as l,y as xt,B as Kt,q as N,n as f}from"../chunks/D8EpLgQ1.js";import{i as u,s as ea,a as aa}from"../chunks/5WA7h8uK.js";import{w as Qt,e as ra,i as da}from"../chunks/u94nIB4-.js";import{c as Xt,g as F,s as sa}from"../chunks/CiE1LlKV.js";import{p as ia}from"../chunks/-1rkm990.js";import{g as Yt}from"../chunks/DsX4H4sg.js";import{b as ut}from"../chunks/D3_ugSUS.js";import{U as oa}from"../chunks/Bgb-frqW.js";import{D as Zt}from"../chunks/KQ2xQpA3.js";import{D as na,I as la}from"../chunks/G-ddPbA8.js";import{t as D}from"../chunks/BEkVdVE1.js";import{e as P,i as R,j as te,b as C,g as ee}from"../chunks/D5ucq3Gx.js";import{e as L}from"../chunks/BZiHL9L3.js";var va=h('

Loading pool...

'),ca=h('

'),ma=h('
GitHub Runner Group
'),xa=h(' '),ua=h('
Tags
'),ga=h('

Extra Specifications

 
'),pa=h('

Basic Information

Pool ID
Provider
Image
Flavor
Status
Entity
Created At
Updated At

Configuration

Max Runners
Min Idle Runners
Bootstrap Timeout
Priority
Runner Prefix
OS Type / Architecture
',1),fa=h(' ',1);function Sa(ae,re){Ve(re,!1);const[de,se]=ea(),gt=()=>aa(ia,"$page",de),O=y();let e=y(null),G=y(!0),M=y(""),E=y(!1),A=y(!1),T=y(!1),g=y(null),U=null;async function ie(){if(t(O))try{n(G,!0),n(M,""),n(e,await F.getPool(t(O)))}catch(d){n(M,L(d))}finally{n(G,!1)}}async function oe(d){if(t(e))try{const o=await F.updatePool(t(e).id,d);n(e,o),n(E,!1),D.success("Pool Updated",`Pool ${t(e).id} has been updated successfully.`)}catch(o){const _=L(o);D.error("Update Failed",_)}}async function ne(){if(t(e)){try{await F.deletePool(t(e).id),Yt(`${ut}/pools`)}catch(d){const o=L(d);D.error("Delete Failed",o)}n(A,!1)}}async function le(){if(t(g)){try{await F.deleteInstance(t(g).name),D.success("Instance Deleted",`Instance ${t(g).name} has been deleted successfully.`)}catch(d){const o=L(d);D.error("Delete Failed",o)}n(T,!1),n(g,null)}}function ve(d){n(g,d),n(T,!0)}function ce(d){if(!d)return"{}";try{if(typeof d=="string"){const o=JSON.parse(d);return JSON.stringify(o,null,2)}return JSON.stringify(d,null,2)}catch{return d.toString()}}function me(d){if(d.operation==="update"){const o=d.payload;t(e)&&o.id===t(e).id&&n(e,o)}else if(d.operation==="delete"){const o=d.payload.id||d.payload;t(e)&&t(e).id===o&&Yt(`${ut}/pools`)}}function xe(d){if(!t(e)||!t(e).instances)return;const o=d.payload;if(o.pool_id===t(e).id){if(d.operation==="create")xt(e,t(e).instances=[...t(e).instances,o]);else if(d.operation==="update")xt(e,t(e).instances=t(e).instances.map(_=>_.id===o.id?o:_));else if(d.operation==="delete"){const _=o.id||o;xt(e,t(e).instances=t(e).instances.filter(z=>z.id!==_))}n(e,t(e))}}We(()=>{ie();const d=Qt.subscribeToEntity("pool",["update","delete"],me),o=Qt.subscribeToEntity("instance",["create","update","delete"],xe);U=()=>{d(),o()}}),Ke(()=>{U&&(U(),U=null)}),Qe(()=>gt(),()=>{n(O,gt().params.id)}),Xe(),He();var pt=fa();Ye(d=>{b(()=>ta.title=`${t(e),i(()=>t(e)?`Pool ${t(e).id} - Pool Details`:"Pool Details")??""} - GARM`)});var J=B(pt),j=r(J),ft=r(j),q=r(ft),ue=r(q);a(q);var _t=s(q,2),yt=r(_t),ht=s(r(yt),2),ge=r(ht,!0);a(ht),a(yt),a(_t),a(ft),a(j);var pe=s(j,2);{var fe=d=>{var o=va();x(d,o)},_e=d=>{var o=Kt(),_=B(o);{var z=k=>{var w=ca(),S=r(w),H=r(S,!0);a(S),a(w),b(()=>l(H,t(M))),x(k,w)},we=k=>{var w=Kt(),S=B(w);{var H=V=>{var wt=pa(),$t=B(wt);{let v=N(()=>(f(P),t(e),i(()=>P(t(e))))),c=N(()=>(f(R),t(e),i(()=>R(t(e))))),m=N(()=>(f(ee),t(e),i(()=>ee(t(e).endpoint?.endpoint_type||"unknown"))));na($t,{get title(){return t(e),i(()=>t(e).id)},get subtitle(){return`Pool for ${t(v)??""} (${t(c)??""})`},get forgeIcon(){return t(m)},onEdit:()=>n(E,!0),onDelete:()=>n(A,!0)})}var W=s($t,2),K=r(W),Pt=r(K),It=s(r(Pt),2),Q=r(It),Dt=s(r(Q),2),$e=r(Dt,!0);a(Dt),a(Q);var X=s(Q,2),Mt=s(r(X),2),Pe=r(Mt,!0);a(Mt),a(X);var Y=s(X,2),Et=s(r(Y),2),At=r(Et),Ie=r(At,!0);a(At),a(Et),a(Y);var Z=s(Y,2),Tt=s(r(Z),2),De=r(Tt,!0);a(Tt),a(Z);var tt=s(Z,2),Ut=s(r(tt),2),et=r(Ut),Me=r(et,!0);a(et),a(Ut),a(tt);var at=s(tt,2),St=s(r(at),2),Bt=r(St),rt=r(Bt),Ee=r(rt,!0);a(rt);var dt=s(rt,2),Ae=r(dt,!0);a(dt),a(Bt),a(St),a(at);var st=s(at,2),Nt=s(r(st),2),Te=r(Nt,!0);a(Nt),a(st);var Ft=s(st,2),Rt=s(r(Ft),2),Ue=r(Rt,!0);a(Rt),a(Ft),a(It),a(Pt),a(K);var Ct=s(K,2),Lt=r(Ct),Ot=s(r(Lt),2),it=r(Ot),Gt=s(r(it),2),Se=r(Gt,!0);a(Gt),a(it);var ot=s(it,2),Jt=s(r(ot),2),Be=r(Jt,!0);a(Jt),a(ot);var nt=s(ot,2),jt=s(r(nt),2),Ne=r(jt);a(jt),a(nt);var lt=s(nt,2),qt=s(r(lt),2),Fe=r(qt,!0);a(qt),a(lt);var vt=s(lt,2),zt=s(r(vt),2),Re=r(zt,!0);a(zt),a(vt);var ct=s(vt,2),Ht=s(r(ct),2),Ce=r(Ht);a(Ht),a(ct);var Vt=s(ct,2);{var Le=v=>{var c=ma(),m=s(r(c),2),p=r(m,!0);a(m),a(c),b(()=>l(p,(t(e),i(()=>t(e)["github-runner-group"])))),x(v,c)};u(Vt,v=>{t(e),i(()=>t(e)["github-runner-group"])&&v(Le)})}var Oe=s(Vt,2);{var Ge=v=>{var c=ua(),m=s(r(c),2),p=r(m);ra(p,5,()=>(t(e),i(()=>t(e).tags)),da,(I,$)=>{var mt=xa(),ze=r(mt,!0);a(mt),b(()=>l(ze,(t($),i(()=>typeof t($)=="string"?t($):t($).name)))),x(I,mt)}),a(p),a(m),a(c),x(v,c)};u(Oe,v=>{t(e),i(()=>t(e).tags&&t(e).tags.length>0)&&v(Ge)})}a(Ot),a(Lt),a(Ct),a(W);var Wt=s(W,2);{var Je=v=>{var c=ga(),m=r(c),p=s(r(m),2),I=r(p,!0);a(p),a(m),a(c),b($=>l(I,$),[()=>(t(e),i(()=>ce(t(e).extra_specs)))]),x(v,c)};u(Wt,v=>{t(e),i(()=>t(e).extra_specs)&&v(Je)})}var je=s(Wt,2);{var qe=v=>{la(v,{get instances(){return t(e),i(()=>t(e).instances)},entityType:"repository",onDeleteInstance:ve})};u(je,v=>{t(e),i(()=>t(e).instances)&&v(qe)})}b((v,c,m,p,I)=>{l($e,(t(e),i(()=>t(e).id))),l(Pe,(t(e),i(()=>t(e).provider_name))),l(Ie,(t(e),i(()=>t(e).image))),l(De,(t(e),i(()=>t(e).flavor))),sa(et,1,`inline-flex px-2 py-1 text-xs font-medium rounded-full ${t(e),i(()=>t(e).enabled?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200")??""}`),l(Me,(t(e),i(()=>t(e).enabled?"Enabled":"Disabled"))),l(Ee,v),Xt(dt,"href",c),l(Ae,m),l(Te,p),l(Ue,I),l(Se,(t(e),i(()=>t(e).max_runners))),l(Be,(t(e),i(()=>t(e).min_idle_runners))),l(Ne,`${t(e),i(()=>t(e).runner_bootstrap_timeout)??""} minutes`),l(Fe,(t(e),i(()=>t(e).priority))),l(Re,(t(e),i(()=>t(e).runner_prefix||"garm"))),l(Ce,`${t(e),i(()=>t(e).os_type)??""} / ${t(e),i(()=>t(e).os_arch)??""}`)},[()=>(f(R),t(e),i(()=>R(t(e)))),()=>(f(te),t(e),i(()=>te(t(e)))),()=>(f(P),t(e),i(()=>P(t(e)))),()=>(f(C),t(e),i(()=>C(t(e).created_at||""))),()=>(f(C),t(e),i(()=>C(t(e).updated_at||"")))]),x(V,wt)};u(S,V=>{t(e)&&V(H)},!0)}x(k,w)};u(_,k=>{t(M)?k(z):k(we,!1)},!0)}x(d,o)};u(pe,d=>{t(G)?d(fe):d(_e,!1)})}a(J);var bt=s(J,2);{var ye=d=>{oa(d,{get pool(){return t(e)},$$events:{close:()=>n(E,!1),submit:o=>oe(o.detail)}})};u(bt,d=>{t(E)&&t(e)&&d(ye)})}var kt=s(bt,2);{var he=d=>{{let o=N(()=>(t(e),f(P),i(()=>`Pool ${t(e).id} (${P(t(e))})`)));Zt(d,{title:"Delete Pool",message:"Are you sure you want to delete this pool? This action cannot be undone and will remove all associated runners.",get itemName(){return t(o)},$$events:{close:()=>n(A,!1),confirm:ne}})}};u(kt,d=>{t(A)&&t(e)&&d(he)})}var be=s(kt,2);{var ke=d=>{Zt(d,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return t(g),i(()=>t(g).name)},$$events:{close:()=>{n(T,!1),n(g,null)},confirm:le}})};u(be,d=>{t(T)&&t(g)&&d(ke)})}b(()=>{Xt(ue,"href",`${ut}/pools`),l(ge,(t(e),i(()=>t(e)?t(e).id:"Loading...")))}),x(ae,pt),Ze(),se()}export{Sa as component}; diff --git a/webapp/assets/_app/immutable/nodes/14.Dtnjxn9q.js b/webapp/assets/_app/immutable/nodes/14.Dtnjxn9q.js new file mode 100644 index 00000000..78dfdc46 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/14.Dtnjxn9q.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as He}from"../chunks/zNh6Oe5P.js";import{p as Ve,o as We,A as Ke,l as Qe,a as Xe,f as h,h as Ye,b as B,t as b,c as x,d as Ze,u as i,n as u,v as l,g as t,m as y,j as r,k as s,s as n,$ as ta,r as a,y as ut,B as Kt,q as N}from"../chunks/sWNKMed7.js";import{i as g,s as ea,a as aa}from"../chunks/Ccl3fNd2.js";import{w as Qt,e as ra,i as da}from"../chunks/BuuPrWMc.js";import{d as F,c as Xt,g as R,s as sa}from"../chunks/t8NOL8UT.js";import{p as ia}from"../chunks/-DWf2IZZ.js";import{g as Yt}from"../chunks/CaJ57PEy.js";import{U as oa}from"../chunks/DLiuxLBn.js";import{D as Zt}from"../chunks/Dxyf9P7U.js";import{D as na,I as la}from"../chunks/CMejw1Yi.js";import{t as D}from"../chunks/BZUCTtPY.js";import{e as P,i as C,j as te,b as L,g as ee}from"../chunks/Cbkm53HO.js";import{e as O}from"../chunks/BZiHL9L3.js";var va=h('

Loading pool...

'),ca=h('

'),ma=h('
GitHub Runner Group
'),xa=h(' '),ua=h('
Tags
'),ga=h('

Extra Specifications

 
'),pa=h('

Basic Information

Pool ID
Provider
Image
Flavor
Status
Entity
Created At
Updated At

Configuration

Max Runners
Min Idle Runners
Bootstrap Timeout
Priority
Runner Prefix
OS Type / Architecture
',1),fa=h(' ',1);function Ua(ae,re){Ve(re,!1);const[de,se]=ea(),gt=()=>aa(ia,"$page",de),G=y();let e=y(null),J=y(!0),M=y(""),E=y(!1),A=y(!1),T=y(!1),p=y(null),U=null;async function ie(){if(t(G))try{n(J,!0),n(M,""),n(e,await R.getPool(t(G)))}catch(d){n(M,O(d))}finally{n(J,!1)}}async function oe(d){if(t(e))try{const o=await R.updatePool(t(e).id,d);n(e,o),n(E,!1),D.success("Pool Updated",`Pool ${t(e).id} has been updated successfully.`)}catch(o){const _=O(o);D.error("Update Failed",_)}}async function ne(){if(t(e)){try{await R.deletePool(t(e).id),Yt(F("/pools"))}catch(d){const o=O(d);D.error("Delete Failed",o)}n(A,!1)}}async function le(){if(t(p)){try{await R.deleteInstance(t(p).name),D.success("Instance Deleted",`Instance ${t(p).name} has been deleted successfully.`)}catch(d){const o=O(d);D.error("Delete Failed",o)}n(T,!1),n(p,null)}}function ve(d){n(p,d),n(T,!0)}function ce(d){if(!d)return"{}";try{if(typeof d=="string"){const o=JSON.parse(d);return JSON.stringify(o,null,2)}return JSON.stringify(d,null,2)}catch{return d.toString()}}function me(d){if(d.operation==="update"){const o=d.payload;t(e)&&o.id===t(e).id&&n(e,o)}else if(d.operation==="delete"){const o=d.payload.id||d.payload;t(e)&&t(e).id===o&&Yt(F("/pools"))}}function xe(d){if(!t(e)||!t(e).instances)return;const o=d.payload;if(o.pool_id===t(e).id){if(d.operation==="create")ut(e,t(e).instances=[...t(e).instances,o]);else if(d.operation==="update")ut(e,t(e).instances=t(e).instances.map(_=>_.id===o.id?o:_));else if(d.operation==="delete"){const _=o.id||o;ut(e,t(e).instances=t(e).instances.filter(H=>H.id!==_))}n(e,t(e))}}We(()=>{ie();const d=Qt.subscribeToEntity("pool",["update","delete"],me),o=Qt.subscribeToEntity("instance",["create","update","delete"],xe);U=()=>{d(),o()}}),Ke(()=>{U&&(U(),U=null)}),Qe(()=>gt(),()=>{n(G,gt().params.id)}),Xe(),He();var pt=fa();Ye(d=>{b(()=>ta.title=`${t(e),i(()=>t(e)?`Pool ${t(e).id} - Pool Details`:"Pool Details")??""} - GARM`)});var j=B(pt),q=r(j),ft=r(q),z=r(ft),ue=r(z);a(z);var _t=s(z,2),yt=r(_t),ht=s(r(yt),2),ge=r(ht,!0);a(ht),a(yt),a(_t),a(ft),a(q);var pe=s(q,2);{var fe=d=>{var o=va();x(d,o)},_e=d=>{var o=Kt(),_=B(o);{var H=k=>{var w=ca(),S=r(w),V=r(S,!0);a(S),a(w),b(()=>l(V,t(M))),x(k,w)},we=k=>{var w=Kt(),S=B(w);{var V=W=>{var wt=pa(),$t=B(wt);{let v=N(()=>(u(P),t(e),i(()=>P(t(e))))),c=N(()=>(u(C),t(e),i(()=>C(t(e))))),m=N(()=>(u(ee),t(e),i(()=>ee(t(e).endpoint?.endpoint_type||"unknown"))));na($t,{get title(){return t(e),i(()=>t(e).id)},get subtitle(){return`Pool for ${t(v)??""} (${t(c)??""})`},get forgeIcon(){return t(m)},onEdit:()=>n(E,!0),onDelete:()=>n(A,!0)})}var K=s($t,2),Q=r(K),Pt=r(Q),It=s(r(Pt),2),X=r(It),Dt=s(r(X),2),$e=r(Dt,!0);a(Dt),a(X);var Y=s(X,2),Mt=s(r(Y),2),Pe=r(Mt,!0);a(Mt),a(Y);var Z=s(Y,2),Et=s(r(Z),2),At=r(Et),Ie=r(At,!0);a(At),a(Et),a(Z);var tt=s(Z,2),Tt=s(r(tt),2),De=r(Tt,!0);a(Tt),a(tt);var et=s(tt,2),Ut=s(r(et),2),at=r(Ut),Me=r(at,!0);a(at),a(Ut),a(et);var rt=s(et,2),St=s(r(rt),2),Bt=r(St),dt=r(Bt),Ee=r(dt,!0);a(dt);var st=s(dt,2),Ae=r(st,!0);a(st),a(Bt),a(St),a(rt);var it=s(rt,2),Nt=s(r(it),2),Te=r(Nt,!0);a(Nt),a(it);var Ft=s(it,2),Rt=s(r(Ft),2),Ue=r(Rt,!0);a(Rt),a(Ft),a(It),a(Pt),a(Q);var Ct=s(Q,2),Lt=r(Ct),Ot=s(r(Lt),2),ot=r(Ot),Gt=s(r(ot),2),Se=r(Gt,!0);a(Gt),a(ot);var nt=s(ot,2),Jt=s(r(nt),2),Be=r(Jt,!0);a(Jt),a(nt);var lt=s(nt,2),jt=s(r(lt),2),Ne=r(jt);a(jt),a(lt);var vt=s(lt,2),qt=s(r(vt),2),Fe=r(qt,!0);a(qt),a(vt);var ct=s(vt,2),zt=s(r(ct),2),Re=r(zt,!0);a(zt),a(ct);var mt=s(ct,2),Ht=s(r(mt),2),Ce=r(Ht);a(Ht),a(mt);var Vt=s(mt,2);{var Le=v=>{var c=ma(),m=s(r(c),2),f=r(m,!0);a(m),a(c),b(()=>l(f,(t(e),i(()=>t(e)["github-runner-group"])))),x(v,c)};g(Vt,v=>{t(e),i(()=>t(e)["github-runner-group"])&&v(Le)})}var Oe=s(Vt,2);{var Ge=v=>{var c=ua(),m=s(r(c),2),f=r(m);ra(f,5,()=>(t(e),i(()=>t(e).tags)),da,(I,$)=>{var xt=xa(),ze=r(xt,!0);a(xt),b(()=>l(ze,(t($),i(()=>typeof t($)=="string"?t($):t($).name)))),x(I,xt)}),a(f),a(m),a(c),x(v,c)};g(Oe,v=>{t(e),i(()=>t(e).tags&&t(e).tags.length>0)&&v(Ge)})}a(Ot),a(Lt),a(Ct),a(K);var Wt=s(K,2);{var Je=v=>{var c=ga(),m=r(c),f=s(r(m),2),I=r(f,!0);a(f),a(m),a(c),b($=>l(I,$),[()=>(t(e),i(()=>ce(t(e).extra_specs)))]),x(v,c)};g(Wt,v=>{t(e),i(()=>t(e).extra_specs)&&v(Je)})}var je=s(Wt,2);{var qe=v=>{la(v,{get instances(){return t(e),i(()=>t(e).instances)},entityType:"repository",onDeleteInstance:ve})};g(je,v=>{t(e),i(()=>t(e).instances)&&v(qe)})}b((v,c,m,f,I)=>{l($e,(t(e),i(()=>t(e).id))),l(Pe,(t(e),i(()=>t(e).provider_name))),l(Ie,(t(e),i(()=>t(e).image))),l(De,(t(e),i(()=>t(e).flavor))),sa(at,1,`inline-flex px-2 py-1 text-xs font-medium rounded-full ${t(e),i(()=>t(e).enabled?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200")??""}`),l(Me,(t(e),i(()=>t(e).enabled?"Enabled":"Disabled"))),l(Ee,v),Xt(st,"href",c),l(Ae,m),l(Te,f),l(Ue,I),l(Se,(t(e),i(()=>t(e).max_runners))),l(Be,(t(e),i(()=>t(e).min_idle_runners))),l(Ne,`${t(e),i(()=>t(e).runner_bootstrap_timeout)??""} minutes`),l(Fe,(t(e),i(()=>t(e).priority))),l(Re,(t(e),i(()=>t(e).runner_prefix||"garm"))),l(Ce,`${t(e),i(()=>t(e).os_type)??""} / ${t(e),i(()=>t(e).os_arch)??""}`)},[()=>(u(C),t(e),i(()=>C(t(e)))),()=>(u(te),t(e),i(()=>te(t(e)))),()=>(u(P),t(e),i(()=>P(t(e)))),()=>(u(L),t(e),i(()=>L(t(e).created_at||""))),()=>(u(L),t(e),i(()=>L(t(e).updated_at||"")))]),x(W,wt)};g(S,W=>{t(e)&&W(V)},!0)}x(k,w)};g(_,k=>{t(M)?k(H):k(we,!1)},!0)}x(d,o)};g(pe,d=>{t(J)?d(fe):d(_e,!1)})}a(j);var bt=s(j,2);{var ye=d=>{oa(d,{get pool(){return t(e)},$$events:{close:()=>n(E,!1),submit:o=>oe(o.detail)}})};g(bt,d=>{t(E)&&t(e)&&d(ye)})}var kt=s(bt,2);{var he=d=>{{let o=N(()=>(t(e),u(P),i(()=>`Pool ${t(e).id} (${P(t(e))})`)));Zt(d,{title:"Delete Pool",message:"Are you sure you want to delete this pool? This action cannot be undone and will remove all associated runners.",get itemName(){return t(o)},$$events:{close:()=>n(A,!1),confirm:ne}})}};g(kt,d=>{t(A)&&t(e)&&d(he)})}var be=s(kt,2);{var ke=d=>{Zt(d,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return t(p),i(()=>t(p).name)},$$events:{close:()=>{n(T,!1),n(p,null)},confirm:le}})};g(be,d=>{t(T)&&t(p)&&d(ke)})}b(d=>{Xt(ue,"href",d),l(ge,(t(e),i(()=>t(e)?t(e).id:"Loading...")))},[()=>(u(F),i(()=>F("/pools")))]),x(ae,pt),Ze(),se()}export{Ua as component}; diff --git a/webapp/assets/_app/immutable/nodes/15.BuyWsqOS.js b/webapp/assets/_app/immutable/nodes/15.DkZbKsXF.js similarity index 92% rename from webapp/assets/_app/immutable/nodes/15.BuyWsqOS.js rename to webapp/assets/_app/immutable/nodes/15.DkZbKsXF.js index a81c0b11..4a62d1a8 100644 --- a/webapp/assets/_app/immutable/nodes/15.BuyWsqOS.js +++ b/webapp/assets/_app/immutable/nodes/15.DkZbKsXF.js @@ -1 +1 @@ -import"../chunks/DsnmJJEf.js";import{i as Me}from"../chunks/B3Pzt0F_.js";import{p as Te,E as Ne,o as De,l as w,s as r,m as a,g as e,y as T,a as Se,f as S,k as l,j as c,r as u,c as D,t as Q,v as fe,x as $e,u as j,z as Re,e as ye,d as Fe,h as ze,b as Be,$ as Oe,q as Ce}from"../chunks/D8EpLgQ1.js";import{a as Ae,i as V,s as Ie}from"../chunks/5WA7h8uK.js";import{r as X,b as Pe,g as oe}from"../chunks/CiE1LlKV.js";import{e as He,i as Je}from"../chunks/u94nIB4-.js";import{b as ve,a as Ee}from"../chunks/C6k1Q4We.js";import{p as Ve}from"../chunks/D4Caz1gY.js";import{M as Ye}from"../chunks/qB7B8uiS.js";import{e as ae}from"../chunks/BZiHL9L3.js";import{F as Ke}from"../chunks/BWbwsSb6.js";import{e as We,a as he}from"../chunks/wyaP0EDu.js";import{U as Qe}from"../chunks/CIBm3n2u.js";import{D as Xe}from"../chunks/KQ2xQpA3.js";import{P as Ze}from"../chunks/CO4LUyTP.js";import{t as J}from"../chunks/BEkVdVE1.js";import{k as et,g as tt,c as rt,m as ot,p as at}from"../chunks/D5ucq3Gx.js";import{D as st,G as nt,a as it}from"../chunks/B_CZMFLe.js";import{E as lt}from"../chunks/C9H3KoyH.js";import{E as dt}from"../chunks/DMCMHBOH.js";import{S as ct}from"../chunks/dB1NgJWc.js";import"../chunks/D3_ugSUS.js";var ut=S('

'),pt=S('

Loading...

'),mt=S(""),gt=S(''),bt=S('

Webhook secret will be automatically generated

'),ft=S('
'),yt=S('

Create Repository

');function vt(se,ne){Te(ne,!1);const[ie,le]=Ie(),p=()=>Ae(We,"$eagerCache",ie),R=a(),k=a(),G=a(),x=a(),C=Ne();let y=a(!1),g=a(""),b=a("github"),o=a({name:"",owner:"",credentials_name:"",webhook_secret:"",pool_balancer_type:"roundrobin"}),F=a(!0),d=a(!0);async function f(){if(!p().loaded.credentials&&!p().loading.credentials)try{await he.getCredentials()}catch(i){r(g,ae(i))}}function _(i){r(b,i.detail),T(o,e(o).credentials_name="")}function P(){if(e(o).credentials_name){const i=e(R).find(A=>A.name===e(o).credentials_name);i&&i.forge_type&&r(b,i.forge_type)}}function E(){const i=new Uint8Array(32);return crypto.getRandomValues(i),Array.from(i,A=>A.toString(16).padStart(2,"0")).join("")}De(()=>{f()});async function de(){if(!e(o).name?.trim()){r(g,"Repository name is required");return}if(!e(o).owner?.trim()){r(g,"Repository owner is required");return}if(!e(o).credentials_name){r(g,"Please select credentials");return}try{r(y,!0),r(g,"");const i={...e(o),install_webhook:e(F),auto_generate_secret:e(d)};C("submit",i)}catch(i){r(g,ae(i)),r(y,!1)}}w(()=>p(),()=>{r(R,p().credentials)}),w(()=>p(),()=>{r(k,p().loading.credentials)}),w(()=>(e(R),e(b)),()=>{r(G,e(R).filter(i=>e(b)?i.forge_type===e(b):!0))}),w(()=>e(d),()=>{e(d)?T(o,e(o).webhook_secret=E()):e(d)||T(o,e(o).webhook_secret="")}),w(()=>(e(o),e(d)),()=>{r(x,e(o).name?.trim()!==""&&e(o).owner?.trim()!==""&&e(o).credentials_name!==""&&(e(d)||e(o).webhook_secret?.trim()!==""))}),Se(),Me(),Ye(se,{$$events:{close:()=>C("close")},children:(i,A)=>{var M=yt(),Z=l(c(M),2);{var ce=v=>{var h=ut(),I=c(h),W=c(I,!0);u(I),u(h),Q(()=>fe(W,e(g))),D(v,h)};V(Z,v=>{e(g)&&v(ce)})}var ue=l(Z,2);{var pe=v=>{var h=pt();D(v,h)},me=v=>{var h=ft(),I=c(h);Ke(I,{get selectedForgeType(){return e(b)},set selectedForgeType(n){r(b,n)},$$events:{select:_},$$legacy:!0});var W=l(I,2),ee=l(c(W),2);X(ee),u(W);var L=l(W,2),N=l(c(L),2);X(N),u(L);var z=l(L,2),B=l(c(z),2);Q(()=>{e(o),$e(()=>{e(G)})});var O=c(B);O.value=O.__value="";var ge=l(O);He(ge,1,()=>e(G),Je,(n,m)=>{var U=mt(),Le=c(U);u(U);var xe={};Q(()=>{fe(Le,`${e(m),j(()=>e(m).name)??""} (${e(m),j(()=>e(m).endpoint?.name)??""})`),xe!==(xe=(e(m),j(()=>e(m).name)))&&(U.value=(U.__value=(e(m),j(()=>e(m).name)))??"")}),D(n,U)}),u(B),u(z);var H=l(z,2),Y=l(c(H),2);Q(()=>{e(o),$e(()=>{})});var K=c(Y);K.value=K.__value="roundrobin";var te=l(K);te.value=te.__value="pack",u(Y),u(H);var t=l(H,2),s=c(t),re=c(s);X(re),Re(2),u(s);var $=l(s,2),q=c($),_e=c(q);X(_e),Re(2),u(q);var qe=l(q,2);{var Ue=n=>{var m=gt();X(m),ve(m,()=>e(o).webhook_secret,U=>T(o,e(o).webhook_secret=U)),D(n,m)},je=n=>{var m=bt();D(n,m)};V(qe,n=>{e(d)?n(je,!1):n(Ue)})}u($),u(t);var we=l(t,2),ke=c(we),be=l(ke,2),Ge=c(be,!0);u(be),u(we),u(h),Q(()=>{be.disabled=e(y)||e(k)||!e(x),fe(Ge,e(y)?"Creating...":"Create Repository")}),ve(ee,()=>e(o).name,n=>T(o,e(o).name=n)),ve(N,()=>e(o).owner,n=>T(o,e(o).owner=n)),Pe(B,()=>e(o).credentials_name,n=>T(o,e(o).credentials_name=n)),ye("change",B,P),Pe(Y,()=>e(o).pool_balancer_type,n=>T(o,e(o).pool_balancer_type=n)),Ee(re,()=>e(F),n=>r(F,n)),Ee(_e,()=>e(d),n=>r(d,n)),ye("click",ke,()=>C("close")),ye("submit",h,Ve(de)),D(v,h)};V(ue,v=>{e(y)?v(pe):v(me,!1)})}u(M),D(i,M)},$$slots:{default:!0}}),Fe(),le()}var ht=S('
',1);function Nt(se,ne){Te(ne,!1);const[ie,le]=Ie(),p=()=>Ae(We,"$eagerCache",ie),R=a(),k=a(),G=a();let x=a([]),C=a(!0),y=a(""),g=a(""),b=a(!1),o=a(!1),F=a(!1),d=a(null),f=a(null),_=a(1),P=a(25),E=a(1);De(async()=>{try{r(C,!0);const t=await he.getRepositories();t&&Array.isArray(t)&&r(x,t)}catch(t){console.error("Failed to load repositories:",t),r(y,t instanceof Error?t.message:"Failed to load repositories")}finally{r(C,!1)}});async function de(){try{await he.retryResource("repositories")}catch(t){console.error("Retry failed:",t)}}function i(t){r(d,t),r(o,!0)}function A(t){r(f,t),r(F,!0)}function M(){r(b,!1),r(o,!1),r(F,!1),r(d,null),r(f,null),r(y,"")}async function Z(t){try{r(y,"");const s=t.detail,re={name:s.name,owner:s.owner,credentials_name:s.credentials_name,webhook_secret:s.webhook_secret},$=await oe.createRepository(re);if(s.install_webhook&&$.id)try{await oe.installRepoWebhook($.id),J.success("Webhook Installed",`Webhook for repository ${$.owner}/${$.name} has been installed successfully.`)}catch(q){console.warn("Repository created but webhook installation failed:",q),J.error("Webhook Installation Failed",q instanceof Error?q.message:"Failed to install webhook. You can try installing it manually from the repository details page.")}r(b,!1),J.success("Repository Created",`Repository ${$.owner}/${$.name} has been created successfully.`)}catch(s){throw r(y,ae(s)),s}}async function ce(t){if(e(d))try{await oe.updateRepository(e(d).id,t),J.success("Repository Updated",`Repository ${e(d).owner}/${e(d).name} has been updated successfully.`),M()}catch(s){throw s}}async function ue(){if(e(f))try{r(y,""),await oe.deleteRepository(e(f).id),J.success("Repository Deleted",`Repository ${e(f).owner}/${e(f).name} has been deleted successfully.`)}catch(t){const s=ae(t);J.error("Delete Failed",s)}finally{M()}}const pe=[{key:"repository",title:"Repository",cellComponent:lt,cellProps:{entityType:"repository",showOwner:!0}},{key:"endpoint",title:"Endpoint",cellComponent:dt},{key:"credentials",title:"Credentials",cellComponent:nt,cellProps:{field:"credentials_name"}},{key:"status",title:"Status",cellComponent:ct,cellProps:{statusType:"entity"}},{key:"actions",title:"Actions",align:"right",cellComponent:it}],me={entityType:"repository",primaryText:{field:"name",isClickable:!0,href:"/repositories/{id}",showOwner:!0},customInfo:[{icon:t=>tt(t?.endpoint?.endpoint_type||"unknown"),text:t=>t?.endpoint?.name||"Unknown"}],badges:[{type:"custom",value:t=>et(t)}],actions:[{type:"edit",handler:t=>i(t)},{type:"delete",handler:t=>A(t)}]};function v(t){r(g,t.detail.term),r(_,1)}function h(t){r(_,t.detail.page)}function I(t){const s=rt(t.detail.perPage);r(P,s.newPerPage),r(_,s.newCurrentPage)}function W(t){i(t.detail.item)}function ee(t){A(t.detail.item)}w(()=>(e(x),p()),()=>{(!e(x).length||p().loaded.repositories)&&r(x,p().repositories)}),w(()=>p(),()=>{r(C,p().loading.repositories)}),w(()=>p(),()=>{r(R,p().errorMessages.repositories)}),w(()=>(e(x),e(g)),()=>{r(k,ot(e(x),e(g)))}),w(()=>(e(E),e(k),e(P),e(_)),()=>{r(E,Math.ceil(e(k).length/e(P))),e(_)>e(E)&&e(E)>0&&r(_,e(E))}),w(()=>(e(k),e(_),e(P)),()=>{r(G,at(e(k),e(_),e(P)))}),Se(),Me();var L=ht();ze(t=>{Oe.title="Repositories - GARM"});var N=Be(L),z=c(N);Ze(z,{title:"Repositories",description:"Manage your GitHub repositories and their runners",actionLabel:"Add Repository",$$events:{action:()=>{r(b,!0)}}});var B=l(z,2);{let t=Ce(()=>e(R)||e(y)),s=Ce(()=>!!e(R));st(B,{get columns(){return pe},get data(){return e(G)},get loading(){return e(C)},get error(){return e(t)},get searchTerm(){return e(g)},searchPlaceholder:"Search repositories by name or owner...",get currentPage(){return e(_)},get perPage(){return e(P)},get totalPages(){return e(E)},get totalItems(){return e(k),j(()=>e(k).length)},itemName:"repositories",emptyIconType:"building",get showRetry(){return e(s)},get mobileCardConfig(){return me},$$events:{search:v,pageChange:h,perPageChange:I,retry:de,edit:W,delete:ee}})}u(N);var O=l(N,2);{var ge=t=>{vt(t,{$$events:{close:()=>r(b,!1),submit:Z}})};V(O,t=>{e(b)&&t(ge)})}var H=l(O,2);{var Y=t=>{Qe(t,{get entity(){return e(d)},entityType:"repository",$$events:{close:M,submit:s=>ce(s.detail)}})};V(H,t=>{e(o)&&e(d)&&t(Y)})}var K=l(H,2);{var te=t=>{Xe(t,{title:"Delete Repository",message:"Are you sure you want to delete this repository? This action cannot be undone and will remove all associated pools and runners.",get itemName(){return`${e(f),j(()=>e(f).owner)??""}/${e(f),j(()=>e(f).name)??""}`},$$events:{close:M,confirm:ue}})};V(K,t=>{e(F)&&e(f)&&t(te)})}D(se,L),Fe(),le()}export{Nt as component}; +import"../chunks/DsnmJJEf.js";import{i as Me}from"../chunks/zNh6Oe5P.js";import{p as Te,E as Ne,o as De,l as w,s as r,m as a,g as e,y as T,a as Se,f as S,k as l,j as c,r as u,c as D,t as Q,v as fe,x as $e,u as j,z as Re,e as ye,d as Fe,h as ze,b as Be,$ as Oe,q as Ce}from"../chunks/sWNKMed7.js";import{a as Ae,i as V,s as Ie}from"../chunks/Ccl3fNd2.js";import{r as X,b as Pe,g as oe}from"../chunks/t8NOL8UT.js";import{e as He,i as Je}from"../chunks/BuuPrWMc.js";import{b as ve,a as Ee}from"../chunks/CLagxtgo.js";import{p as Ve}from"../chunks/D4Caz1gY.js";import{M as Ye}from"../chunks/-99ewtnX.js";import{e as ae}from"../chunks/BZiHL9L3.js";import{F as Ke}from"../chunks/BYXzcXZj.js";import{e as We,a as he}from"../chunks/UPGsoYWO.js";import{U as Qe}from"../chunks/nqMQkPXF.js";import{D as Xe}from"../chunks/Dxyf9P7U.js";import{P as Ze}from"../chunks/sdr-JCKi.js";import{t as J}from"../chunks/BZUCTtPY.js";import{k as et,g as tt,c as rt,m as ot,p as at}from"../chunks/Cbkm53HO.js";import{D as st,G as nt,a as it}from"../chunks/WvS03pW2.js";import{E as lt}from"../chunks/CfvU88k5.js";import{E as dt}from"../chunks/CC0e8UY8.js";import{S as ct}from"../chunks/C7WQ-JBG.js";import"../chunks/BFThZs5w.js";var ut=S('

'),pt=S('

Loading...

'),mt=S(""),gt=S(''),bt=S('

Webhook secret will be automatically generated

'),ft=S('
'),yt=S('

Create Repository

');function vt(se,ne){Te(ne,!1);const[ie,le]=Ie(),p=()=>Ae(We,"$eagerCache",ie),R=a(),k=a(),G=a(),x=a(),C=Ne();let y=a(!1),g=a(""),b=a("github"),o=a({name:"",owner:"",credentials_name:"",webhook_secret:"",pool_balancer_type:"roundrobin"}),F=a(!0),d=a(!0);async function f(){if(!p().loaded.credentials&&!p().loading.credentials)try{await he.getCredentials()}catch(i){r(g,ae(i))}}function _(i){r(b,i.detail),T(o,e(o).credentials_name="")}function P(){if(e(o).credentials_name){const i=e(R).find(A=>A.name===e(o).credentials_name);i&&i.forge_type&&r(b,i.forge_type)}}function E(){const i=new Uint8Array(32);return crypto.getRandomValues(i),Array.from(i,A=>A.toString(16).padStart(2,"0")).join("")}De(()=>{f()});async function de(){if(!e(o).name?.trim()){r(g,"Repository name is required");return}if(!e(o).owner?.trim()){r(g,"Repository owner is required");return}if(!e(o).credentials_name){r(g,"Please select credentials");return}try{r(y,!0),r(g,"");const i={...e(o),install_webhook:e(F),auto_generate_secret:e(d)};C("submit",i)}catch(i){r(g,ae(i)),r(y,!1)}}w(()=>p(),()=>{r(R,p().credentials)}),w(()=>p(),()=>{r(k,p().loading.credentials)}),w(()=>(e(R),e(b)),()=>{r(G,e(R).filter(i=>e(b)?i.forge_type===e(b):!0))}),w(()=>e(d),()=>{e(d)?T(o,e(o).webhook_secret=E()):e(d)||T(o,e(o).webhook_secret="")}),w(()=>(e(o),e(d)),()=>{r(x,e(o).name?.trim()!==""&&e(o).owner?.trim()!==""&&e(o).credentials_name!==""&&(e(d)||e(o).webhook_secret?.trim()!==""))}),Se(),Me(),Ye(se,{$$events:{close:()=>C("close")},children:(i,A)=>{var M=yt(),Z=l(c(M),2);{var ce=v=>{var h=ut(),I=c(h),W=c(I,!0);u(I),u(h),Q(()=>fe(W,e(g))),D(v,h)};V(Z,v=>{e(g)&&v(ce)})}var ue=l(Z,2);{var pe=v=>{var h=pt();D(v,h)},me=v=>{var h=ft(),I=c(h);Ke(I,{get selectedForgeType(){return e(b)},set selectedForgeType(n){r(b,n)},$$events:{select:_},$$legacy:!0});var W=l(I,2),ee=l(c(W),2);X(ee),u(W);var L=l(W,2),N=l(c(L),2);X(N),u(L);var z=l(L,2),B=l(c(z),2);Q(()=>{e(o),$e(()=>{e(G)})});var O=c(B);O.value=O.__value="";var ge=l(O);He(ge,1,()=>e(G),Je,(n,m)=>{var U=mt(),Le=c(U);u(U);var xe={};Q(()=>{fe(Le,`${e(m),j(()=>e(m).name)??""} (${e(m),j(()=>e(m).endpoint?.name)??""})`),xe!==(xe=(e(m),j(()=>e(m).name)))&&(U.value=(U.__value=(e(m),j(()=>e(m).name)))??"")}),D(n,U)}),u(B),u(z);var H=l(z,2),Y=l(c(H),2);Q(()=>{e(o),$e(()=>{})});var K=c(Y);K.value=K.__value="roundrobin";var te=l(K);te.value=te.__value="pack",u(Y),u(H);var t=l(H,2),s=c(t),re=c(s);X(re),Re(2),u(s);var $=l(s,2),q=c($),_e=c(q);X(_e),Re(2),u(q);var qe=l(q,2);{var Ue=n=>{var m=gt();X(m),ve(m,()=>e(o).webhook_secret,U=>T(o,e(o).webhook_secret=U)),D(n,m)},je=n=>{var m=bt();D(n,m)};V(qe,n=>{e(d)?n(je,!1):n(Ue)})}u($),u(t);var we=l(t,2),ke=c(we),be=l(ke,2),Ge=c(be,!0);u(be),u(we),u(h),Q(()=>{be.disabled=e(y)||e(k)||!e(x),fe(Ge,e(y)?"Creating...":"Create Repository")}),ve(ee,()=>e(o).name,n=>T(o,e(o).name=n)),ve(N,()=>e(o).owner,n=>T(o,e(o).owner=n)),Pe(B,()=>e(o).credentials_name,n=>T(o,e(o).credentials_name=n)),ye("change",B,P),Pe(Y,()=>e(o).pool_balancer_type,n=>T(o,e(o).pool_balancer_type=n)),Ee(re,()=>e(F),n=>r(F,n)),Ee(_e,()=>e(d),n=>r(d,n)),ye("click",ke,()=>C("close")),ye("submit",h,Ve(de)),D(v,h)};V(ue,v=>{e(y)?v(pe):v(me,!1)})}u(M),D(i,M)},$$slots:{default:!0}}),Fe(),le()}var ht=S('
',1);function Nt(se,ne){Te(ne,!1);const[ie,le]=Ie(),p=()=>Ae(We,"$eagerCache",ie),R=a(),k=a(),G=a();let x=a([]),C=a(!0),y=a(""),g=a(""),b=a(!1),o=a(!1),F=a(!1),d=a(null),f=a(null),_=a(1),P=a(25),E=a(1);De(async()=>{try{r(C,!0);const t=await he.getRepositories();t&&Array.isArray(t)&&r(x,t)}catch(t){console.error("Failed to load repositories:",t),r(y,t instanceof Error?t.message:"Failed to load repositories")}finally{r(C,!1)}});async function de(){try{await he.retryResource("repositories")}catch(t){console.error("Retry failed:",t)}}function i(t){r(d,t),r(o,!0)}function A(t){r(f,t),r(F,!0)}function M(){r(b,!1),r(o,!1),r(F,!1),r(d,null),r(f,null),r(y,"")}async function Z(t){try{r(y,"");const s=t.detail,re={name:s.name,owner:s.owner,credentials_name:s.credentials_name,webhook_secret:s.webhook_secret},$=await oe.createRepository(re);if(s.install_webhook&&$.id)try{await oe.installRepoWebhook($.id),J.success("Webhook Installed",`Webhook for repository ${$.owner}/${$.name} has been installed successfully.`)}catch(q){console.warn("Repository created but webhook installation failed:",q),J.error("Webhook Installation Failed",q instanceof Error?q.message:"Failed to install webhook. You can try installing it manually from the repository details page.")}r(b,!1),J.success("Repository Created",`Repository ${$.owner}/${$.name} has been created successfully.`)}catch(s){throw r(y,ae(s)),s}}async function ce(t){if(e(d))try{await oe.updateRepository(e(d).id,t),J.success("Repository Updated",`Repository ${e(d).owner}/${e(d).name} has been updated successfully.`),M()}catch(s){throw s}}async function ue(){if(e(f))try{r(y,""),await oe.deleteRepository(e(f).id),J.success("Repository Deleted",`Repository ${e(f).owner}/${e(f).name} has been deleted successfully.`)}catch(t){const s=ae(t);J.error("Delete Failed",s)}finally{M()}}const pe=[{key:"repository",title:"Repository",cellComponent:lt,cellProps:{entityType:"repository",showOwner:!0}},{key:"endpoint",title:"Endpoint",cellComponent:dt},{key:"credentials",title:"Credentials",cellComponent:nt,cellProps:{field:"credentials_name"}},{key:"status",title:"Status",cellComponent:ct,cellProps:{statusType:"entity"}},{key:"actions",title:"Actions",align:"right",cellComponent:it}],me={entityType:"repository",primaryText:{field:"name",isClickable:!0,href:"/repositories/{id}",showOwner:!0},customInfo:[{icon:t=>tt(t?.endpoint?.endpoint_type||"unknown"),text:t=>t?.endpoint?.name||"Unknown"}],badges:[{type:"custom",value:t=>et(t)}],actions:[{type:"edit",handler:t=>i(t)},{type:"delete",handler:t=>A(t)}]};function v(t){r(g,t.detail.term),r(_,1)}function h(t){r(_,t.detail.page)}function I(t){const s=rt(t.detail.perPage);r(P,s.newPerPage),r(_,s.newCurrentPage)}function W(t){i(t.detail.item)}function ee(t){A(t.detail.item)}w(()=>(e(x),p()),()=>{(!e(x).length||p().loaded.repositories)&&r(x,p().repositories)}),w(()=>p(),()=>{r(C,p().loading.repositories)}),w(()=>p(),()=>{r(R,p().errorMessages.repositories)}),w(()=>(e(x),e(g)),()=>{r(k,ot(e(x),e(g)))}),w(()=>(e(E),e(k),e(P),e(_)),()=>{r(E,Math.ceil(e(k).length/e(P))),e(_)>e(E)&&e(E)>0&&r(_,e(E))}),w(()=>(e(k),e(_),e(P)),()=>{r(G,at(e(k),e(_),e(P)))}),Se(),Me();var L=ht();ze(t=>{Oe.title="Repositories - GARM"});var N=Be(L),z=c(N);Ze(z,{title:"Repositories",description:"Manage your GitHub repositories and their runners",actionLabel:"Add Repository",$$events:{action:()=>{r(b,!0)}}});var B=l(z,2);{let t=Ce(()=>e(R)||e(y)),s=Ce(()=>!!e(R));st(B,{get columns(){return pe},get data(){return e(G)},get loading(){return e(C)},get error(){return e(t)},get searchTerm(){return e(g)},searchPlaceholder:"Search repositories by name or owner...",get currentPage(){return e(_)},get perPage(){return e(P)},get totalPages(){return e(E)},get totalItems(){return e(k),j(()=>e(k).length)},itemName:"repositories",emptyIconType:"building",get showRetry(){return e(s)},get mobileCardConfig(){return me},$$events:{search:v,pageChange:h,perPageChange:I,retry:de,edit:W,delete:ee}})}u(N);var O=l(N,2);{var ge=t=>{vt(t,{$$events:{close:()=>r(b,!1),submit:Z}})};V(O,t=>{e(b)&&t(ge)})}var H=l(O,2);{var Y=t=>{Qe(t,{get entity(){return e(d)},entityType:"repository",$$events:{close:M,submit:s=>ce(s.detail)}})};V(H,t=>{e(o)&&e(d)&&t(Y)})}var K=l(H,2);{var te=t=>{Xe(t,{title:"Delete Repository",message:"Are you sure you want to delete this repository? This action cannot be undone and will remove all associated pools and runners.",get itemName(){return`${e(f),j(()=>e(f).owner)??""}/${e(f),j(()=>e(f).name)??""}`},$$events:{close:M,confirm:ue}})};V(K,t=>{e(F)&&e(f)&&t(te)})}D(se,L),Fe(),le()}export{Nt as component}; diff --git a/webapp/assets/_app/immutable/nodes/16.Cp868v_U.js b/webapp/assets/_app/immutable/nodes/16.Cp868v_U.js new file mode 100644 index 00000000..f82d226e --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/16.Cp868v_U.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as ze}from"../chunks/zNh6Oe5P.js";import{p as He,o as je,A as Ge,l as Oe,a as Ve,f as S,h as Je,b as C,t as H,c as w,d as Ke,u as s,n as de,v as ce,g as e,m as l,j as u,k as d,s as r,$ as Qe,r as f,y as Xe,B as pe,q as m}from"../chunks/sWNKMed7.js";import{i as g,s as Ye,a as Ze}from"../chunks/Ccl3fNd2.js";import{d as A,c as et,g as h}from"../chunks/t8NOL8UT.js";import{p as tt}from"../chunks/-DWf2IZZ.js";import{g as ue}from"../chunks/CaJ57PEy.js";import{U as ot}from"../chunks/nqMQkPXF.js";import{D as fe}from"../chunks/Dxyf9P7U.js";import{E as at,P as rt,a as st}from"../chunks/DJF9YLeI.js";import{D as nt,I as it}from"../chunks/CMejw1Yi.js";import{g as me}from"../chunks/Cbkm53HO.js";import{e as j}from"../chunks/BZiHL9L3.js";import{W as lt}from"../chunks/otv9vQQV.js";import{C as dt}from"../chunks/Csic5lDL.js";import{w as G}from"../chunks/BuuPrWMc.js";import{t as R}from"../chunks/BZUCTtPY.js";var ct=S('

Loading repository...

'),pt=S('

'),ut=S(" ",1),ft=S(' ',1);function kt(ye,ve){He(ve,!1);const[ge,he]=Ye(),O=()=>Ze(tt,"$page",ge),x=l();let t=l(null),c=l([]),y=l([]),B=l(!0),E=l(""),D=l(!1),T=l(!1),I=l(!1),P=l(!1),p=l(null),M=null,_=l();async function V(){if(e(x))try{r(B,!0),r(E,"");const[o,a,n]=await Promise.all([h.getRepository(e(x)),h.listRepositoryPools(e(x)).catch(()=>[]),h.listRepositoryInstances(e(x)).catch(()=>[])]);r(t,o),r(c,a),r(y,n)}catch(o){r(E,j(o))}finally{r(B,!1)}}function _e(o,a){const{events:n}=o;return{...a,events:n}}async function $e(o){if(e(t))try{await h.updateRepository(e(t).id,o),await V(),R.success("Repository Updated",`Repository ${e(t).owner}/${e(t).name} has been updated successfully.`),r(D,!1)}catch(a){throw a}}async function be(){if(e(t)){try{await h.deleteRepository(e(t).id),ue(A("/repositories"))}catch(o){const a=j(o);R.error("Delete Failed",a)}r(T,!1)}}async function we(){if(e(p))try{await h.deleteInstance(e(p).name),R.success("Instance Deleted",`Instance ${e(p).name} has been deleted successfully.`),r(I,!1),r(p,null)}catch(o){const a=j(o);R.error("Delete Failed",a),r(I,!1),r(p,null)}}function xe(o){r(p,o),r(I,!0)}function Ie(){r(P,!0)}async function Re(o){try{if(!e(t))return;await h.createRepositoryPool(e(t).id,o.detail),R.success("Pool Created",`Pool has been created successfully for repository ${e(t).owner}/${e(t).name}.`),r(P,!1)}catch(a){throw a}}function J(){e(_)&&Xe(_,e(_).scrollTop=e(_).scrollHeight)}function Ee(o){if(o.operation==="update"){const a=o.payload;if(e(t)&&a.id===e(t).id){const n=e(t).events?.length||0,i=a.events?.length||0;r(t,_e(e(t),a)),i>n&&setTimeout(()=>{J()},100)}}else if(o.operation==="delete"){const a=o.payload.id||o.payload;e(t)&&e(t).id===a&&ue(A("/repositories"))}}function De(o){if(!e(t))return;const a=o.payload;if(a.repo_id===e(t).id){if(o.operation==="create")r(c,[...e(c),a]);else if(o.operation==="update")r(c,e(c).map(n=>n.id===a.id?a:n));else if(o.operation==="delete"){const n=a.id||a;r(c,e(c).filter(i=>i.id!==n))}}}function Te(o){if(!e(t)||!e(c))return;const a=o.payload;if(e(c).some(i=>i.id===a.pool_id)){if(o.operation==="create")r(y,[...e(y),a]);else if(o.operation==="update")r(y,e(y).map(i=>i.id===a.id?a:i));else if(o.operation==="delete"){const i=a.id||a;r(y,e(y).filter(N=>N.id!==i))}}}je(()=>{V().then(()=>{e(t)?.events?.length&&setTimeout(()=>{J()},100)});const o=G.subscribeToEntity("repository",["update","delete"],Ee),a=G.subscribeToEntity("pool",["create","update","delete"],De),n=G.subscribeToEntity("instance",["create","update","delete"],Te);M=()=>{o(),a(),n()}}),Ge(()=>{M&&(M(),M=null)}),Oe(()=>O(),()=>{r(x,O().params.id)}),Ve(),ze();var K=ft();Je(o=>{H(()=>Qe.title=`${e(t),s(()=>e(t)?`${e(t).name} - Repository Details`:"Repository Details")??""} - GARM`)});var U=C(K),F=u(U),Q=u(F),L=u(Q),Pe=u(L);f(L);var X=d(L,2),Y=u(X),Z=d(u(Y),2),Me=u(Z,!0);f(Z),f(Y),f(X),f(Q),f(F);var ke=d(F,2);{var Ce=o=>{var a=ct();w(o,a)},Ae=o=>{var a=pe(),n=C(a);{var i=$=>{var b=pt(),k=u(b),W=u(k,!0);f(k),f(b),H(()=>ce(W,e(E))),w($,b)},N=$=>{var b=pe(),k=C(b);{var W=q=>{var ae=ut(),re=C(ae);{let v=m(()=>(e(t),s(()=>e(t).name||"Repository"))),z=m(()=>(e(t),s(()=>e(t).owner))),We=m(()=>(e(t),s(()=>e(t).endpoint?.name))),qe=m(()=>(de(me),e(t),s(()=>me(e(t).endpoint?.endpoint_type||"unknown"))));nt(re,{get title(){return e(v)},get subtitle(){return`Owner: ${e(z)??""} • Endpoint: ${e(We)??""}`},get forgeIcon(){return e(qe)},onEdit:()=>r(D,!0),onDelete:()=>r(T,!0)})}var se=d(re,2);at(se,{get entity(){return e(t)},entityType:"repository"});var ne=d(se,2);{let v=m(()=>(e(t),s(()=>e(t).id||"")));lt(ne,{entityType:"repository",get entityId(){return e(v)},get entityName(){return`${e(t),s(()=>e(t).owner)??""}/${e(t),s(()=>e(t).name)??""}`}})}var ie=d(ne,2);{let v=m(()=>(e(t),s(()=>e(t).id||"")));rt(ie,{get pools(){return e(c)},entityType:"repository",get entityId(){return e(v)},get entityName(){return`${e(t),s(()=>e(t).owner)??""}/${e(t),s(()=>e(t).name)??""}`},$$events:{addPool:Ie}})}var le=d(ie,2);it(le,{get instances(){return e(y)},entityType:"repository",onDeleteInstance:xe});var Ne=d(le,2);{let v=m(()=>(e(t),s(()=>e(t)?.events)));st(Ne,{get events(){return e(v)},get eventsContainer(){return e(_)},set eventsContainer(z){r(_,z)},$$legacy:!0})}w(q,ae)};g(k,q=>{e(t)&&q(W)},!0)}w($,b)};g(n,$=>{e(E)?$(i):$(N,!1)},!0)}w(o,a)};g(ke,o=>{e(B)?o(Ce):o(Ae,!1)})}f(U);var ee=d(U,2);{var Se=o=>{ot(o,{get entity(){return e(t)},entityType:"repository",$$events:{close:()=>r(D,!1),submit:a=>$e(a.detail)}})};g(ee,o=>{e(D)&&e(t)&&o(Se)})}var te=d(ee,2);{var Be=o=>{{let a=m(()=>(e(t),s(()=>`${e(t).owner}/${e(t).name}`)));fe(o,{title:"Delete Repository",message:"Are you sure you want to delete this repository? This action cannot be undone and will remove all associated pools and instances.",get itemName(){return e(a)},$$events:{close:()=>r(T,!1),confirm:be}})}};g(te,o=>{e(T)&&e(t)&&o(Be)})}var oe=d(te,2);{var Ue=o=>{fe(o,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(p),s(()=>e(p).name)},$$events:{close:()=>{r(I,!1),r(p,null)},confirm:we}})};g(oe,o=>{e(I)&&e(p)&&o(Ue)})}var Fe=d(oe,2);{var Le=o=>{{let a=m(()=>(e(t),s(()=>e(t).id||"")));dt(o,{initialEntityType:"repository",get initialEntityId(){return e(a)},$$events:{close:()=>r(P,!1),submit:Re}})}};g(Fe,o=>{e(P)&&e(t)&&o(Le)})}H(o=>{et(Pe,"href",o),ce(Me,(e(t),s(()=>e(t)?e(t).name:"Loading...")))},[()=>(de(A),s(()=>A("/repositories")))]),w(ye,K),Ke(),he()}export{kt as component}; diff --git a/webapp/assets/_app/immutable/nodes/16.I1lJm_Y4.js b/webapp/assets/_app/immutable/nodes/16.I1lJm_Y4.js deleted file mode 100644 index 84243e2e..00000000 --- a/webapp/assets/_app/immutable/nodes/16.I1lJm_Y4.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as qe}from"../chunks/B3Pzt0F_.js";import{p as ze,o as He,A as je,l as Ge,a as Oe,f as A,h as Ve,b as C,t as z,c as w,d as Je,g as e,m as l,s as r,u as s,$ as Ke,j as u,r as f,k as d,v as de,y as Qe,B as ce,q as m,n as Xe}from"../chunks/D8EpLgQ1.js";import{i as g,s as Ye,a as Ze}from"../chunks/5WA7h8uK.js";import{c as et,g as h}from"../chunks/CiE1LlKV.js";import{p as tt}from"../chunks/-1rkm990.js";import{g as pe}from"../chunks/DsX4H4sg.js";import{b as H}from"../chunks/D3_ugSUS.js";import{U as ot}from"../chunks/CIBm3n2u.js";import{D as ue}from"../chunks/KQ2xQpA3.js";import{E as at,P as rt,a as st}from"../chunks/DxQgLoe9.js";import{D as nt,I as it}from"../chunks/G-ddPbA8.js";import{g as fe}from"../chunks/D5ucq3Gx.js";import{e as j}from"../chunks/BZiHL9L3.js";import{W as lt}from"../chunks/BsqC4UA1.js";import{C as dt}from"../chunks/CRD55Dyg.js";import{w as G}from"../chunks/u94nIB4-.js";import{t as R}from"../chunks/BEkVdVE1.js";var ct=A('

Loading repository...

'),pt=A('

'),ut=A(" ",1),ft=A(' ',1);function Ct(me,ye){ze(ye,!1);const[ve,ge]=Ye(),O=()=>Ze(tt,"$page",ve),x=l();let t=l(null),c=l([]),y=l([]),S=l(!0),E=l(""),D=l(!1),T=l(!1),I=l(!1),P=l(!1),p=l(null),M=null,_=l();async function V(){if(e(x))try{r(S,!0),r(E,"");const[o,a,n]=await Promise.all([h.getRepository(e(x)),h.listRepositoryPools(e(x)).catch(()=>[]),h.listRepositoryInstances(e(x)).catch(()=>[])]);r(t,o),r(c,a),r(y,n)}catch(o){r(E,j(o))}finally{r(S,!1)}}function he(o,a){const{events:n}=o;return{...a,events:n}}async function _e(o){if(e(t))try{await h.updateRepository(e(t).id,o),await V(),R.success("Repository Updated",`Repository ${e(t).owner}/${e(t).name} has been updated successfully.`),r(D,!1)}catch(a){throw a}}async function $e(){if(e(t)){try{await h.deleteRepository(e(t).id),pe(`${H}/repositories`)}catch(o){const a=j(o);R.error("Delete Failed",a)}r(T,!1)}}async function be(){if(e(p))try{await h.deleteInstance(e(p).name),R.success("Instance Deleted",`Instance ${e(p).name} has been deleted successfully.`),r(I,!1),r(p,null)}catch(o){const a=j(o);R.error("Delete Failed",a),r(I,!1),r(p,null)}}function we(o){r(p,o),r(I,!0)}function xe(){r(P,!0)}async function Ie(o){try{if(!e(t))return;await h.createRepositoryPool(e(t).id,o.detail),R.success("Pool Created",`Pool has been created successfully for repository ${e(t).owner}/${e(t).name}.`),r(P,!1)}catch(a){throw a}}function J(){e(_)&&Qe(_,e(_).scrollTop=e(_).scrollHeight)}function Re(o){if(o.operation==="update"){const a=o.payload;if(e(t)&&a.id===e(t).id){const n=e(t).events?.length||0,i=a.events?.length||0;r(t,he(e(t),a)),i>n&&setTimeout(()=>{J()},100)}}else if(o.operation==="delete"){const a=o.payload.id||o.payload;e(t)&&e(t).id===a&&pe(`${H}/repositories`)}}function Ee(o){if(!e(t))return;const a=o.payload;if(a.repo_id===e(t).id){if(o.operation==="create")r(c,[...e(c),a]);else if(o.operation==="update")r(c,e(c).map(n=>n.id===a.id?a:n));else if(o.operation==="delete"){const n=a.id||a;r(c,e(c).filter(i=>i.id!==n))}}}function De(o){if(!e(t)||!e(c))return;const a=o.payload;if(e(c).some(i=>i.id===a.pool_id)){if(o.operation==="create")r(y,[...e(y),a]);else if(o.operation==="update")r(y,e(y).map(i=>i.id===a.id?a:i));else if(o.operation==="delete"){const i=a.id||a;r(y,e(y).filter(L=>L.id!==i))}}}He(()=>{V().then(()=>{e(t)?.events?.length&&setTimeout(()=>{J()},100)});const o=G.subscribeToEntity("repository",["update","delete"],Re),a=G.subscribeToEntity("pool",["create","update","delete"],Ee),n=G.subscribeToEntity("instance",["create","update","delete"],De);M=()=>{o(),a(),n()}}),je(()=>{M&&(M(),M=null)}),Ge(()=>O(),()=>{r(x,O().params.id)}),Oe(),qe();var K=ft();Ve(o=>{z(()=>Ke.title=`${e(t),s(()=>e(t)?`${e(t).name} - Repository Details`:"Repository Details")??""} - GARM`)});var B=C(K),U=u(B),Q=u(U),F=u(Q),Te=u(F);f(F);var X=d(F,2),Y=u(X),Z=d(u(Y),2),Pe=u(Z,!0);f(Z),f(Y),f(X),f(Q),f(U);var Me=d(U,2);{var ke=o=>{var a=ct();w(o,a)},Ce=o=>{var a=ce(),n=C(a);{var i=$=>{var b=pt(),k=u(b),N=u(k,!0);f(k),f(b),z(()=>de(N,e(E))),w($,b)},L=$=>{var b=ce(),k=C(b);{var N=W=>{var ae=ut(),re=C(ae);{let v=m(()=>(e(t),s(()=>e(t).name||"Repository"))),q=m(()=>(e(t),s(()=>e(t).owner))),Ne=m(()=>(e(t),s(()=>e(t).endpoint?.name))),We=m(()=>(Xe(fe),e(t),s(()=>fe(e(t).endpoint?.endpoint_type||"unknown"))));nt(re,{get title(){return e(v)},get subtitle(){return`Owner: ${e(q)??""} • Endpoint: ${e(Ne)??""}`},get forgeIcon(){return e(We)},onEdit:()=>r(D,!0),onDelete:()=>r(T,!0)})}var se=d(re,2);at(se,{get entity(){return e(t)},entityType:"repository"});var ne=d(se,2);{let v=m(()=>(e(t),s(()=>e(t).id||"")));lt(ne,{entityType:"repository",get entityId(){return e(v)},get entityName(){return`${e(t),s(()=>e(t).owner)??""}/${e(t),s(()=>e(t).name)??""}`}})}var ie=d(ne,2);{let v=m(()=>(e(t),s(()=>e(t).id||"")));rt(ie,{get pools(){return e(c)},entityType:"repository",get entityId(){return e(v)},get entityName(){return`${e(t),s(()=>e(t).owner)??""}/${e(t),s(()=>e(t).name)??""}`},$$events:{addPool:xe}})}var le=d(ie,2);it(le,{get instances(){return e(y)},entityType:"repository",onDeleteInstance:we});var Le=d(le,2);{let v=m(()=>(e(t),s(()=>e(t)?.events)));st(Le,{get events(){return e(v)},get eventsContainer(){return e(_)},set eventsContainer(q){r(_,q)},$$legacy:!0})}w(W,ae)};g(k,W=>{e(t)&&W(N)},!0)}w($,b)};g(n,$=>{e(E)?$(i):$(L,!1)},!0)}w(o,a)};g(Me,o=>{e(S)?o(ke):o(Ce,!1)})}f(B);var ee=d(B,2);{var Ae=o=>{ot(o,{get entity(){return e(t)},entityType:"repository",$$events:{close:()=>r(D,!1),submit:a=>_e(a.detail)}})};g(ee,o=>{e(D)&&e(t)&&o(Ae)})}var te=d(ee,2);{var Se=o=>{{let a=m(()=>(e(t),s(()=>`${e(t).owner}/${e(t).name}`)));ue(o,{title:"Delete Repository",message:"Are you sure you want to delete this repository? This action cannot be undone and will remove all associated pools and instances.",get itemName(){return e(a)},$$events:{close:()=>r(T,!1),confirm:$e}})}};g(te,o=>{e(T)&&e(t)&&o(Se)})}var oe=d(te,2);{var Be=o=>{ue(o,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(p),s(()=>e(p).name)},$$events:{close:()=>{r(I,!1),r(p,null)},confirm:be}})};g(oe,o=>{e(I)&&e(p)&&o(Be)})}var Ue=d(oe,2);{var Fe=o=>{{let a=m(()=>(e(t),s(()=>e(t).id||"")));dt(o,{initialEntityType:"repository",get initialEntityId(){return e(a)},$$events:{close:()=>r(P,!1),submit:Ie}})}};g(Ue,o=>{e(P)&&e(t)&&o(Fe)})}z(()=>{et(Te,"href",`${H}/repositories`),de(Pe,(e(t),s(()=>e(t)?e(t).name:"Loading...")))}),w(me,K),Je(),ge()}export{Ct as component}; diff --git a/webapp/assets/_app/immutable/nodes/17.BGDT0O3r.js b/webapp/assets/_app/immutable/nodes/17.Bv2P0ej3.js similarity index 94% rename from webapp/assets/_app/immutable/nodes/17.BGDT0O3r.js rename to webapp/assets/_app/immutable/nodes/17.Bv2P0ej3.js index 22d9741e..d23f8ca1 100644 --- a/webapp/assets/_app/immutable/nodes/17.BGDT0O3r.js +++ b/webapp/assets/_app/immutable/nodes/17.Bv2P0ej3.js @@ -1 +1 @@ -import"../chunks/DsnmJJEf.js";import{i as hr}from"../chunks/B3Pzt0F_.js";import{p as xr,E as Hr,o as kr,f as w,k as a,j as o,g as e,m as i,r as s,t as k,s as r,e as ne,c as f,v as X,b as _r,z as pr,x as he,D as Be,d as wr,l as q,a as jr,h as Nr,$ as Ur,q as Je,u as mr,n as qr}from"../chunks/D8EpLgQ1.js";import{i as D,s as Or,a as Lr}from"../chunks/5WA7h8uK.js";import{r as T,s as Fe,b as xe,g as R}from"../chunks/CiE1LlKV.js";import"../chunks/D3_ugSUS.js";import{P as Br}from"../chunks/CO4LUyTP.js";import{e as vr,i as fr}from"../chunks/u94nIB4-.js";import{b as H,a as Jr}from"../chunks/C6k1Q4We.js";import{p as Fr}from"../chunks/D4Caz1gY.js";import{M as Vr}from"../chunks/qB7B8uiS.js";import{J as Wr}from"../chunks/DZblzgqm.js";import{e as Y}from"../chunks/BZiHL9L3.js";import{U as Kr}from"../chunks/2p_hWkLJ.js";import{D as Qr}from"../chunks/KQ2xQpA3.js";import{e as Xr,a as yr}from"../chunks/wyaP0EDu.js";import{t as ke}from"../chunks/BEkVdVE1.js";import{e as ce,h as Yr}from"../chunks/D5ucq3Gx.js";import{D as Zr,G as Ve,a as et}from"../chunks/B_CZMFLe.js";import{E as rt}from"../chunks/C9H3KoyH.js";import{E as tt}from"../chunks/DMCMHBOH.js";import{S as at}from"../chunks/dB1NgJWc.js";import{P as ot}from"../chunks/CI9532zv.js";var st=w('

'),lt=w('
'),it=w(""),dt=w(''),nt=w('
'),ct=w(""),ut=w(''),gt=w('

Entity & Provider Configuration

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Extra Specs (JSON)
',1),bt=w('
Creating...
'),pt=w('

Create New Scale Set

Scale sets are only available for GitHub endpoints

Entity Level *
');function mt(_e,we){xr(we,!1);const Z=Hr();let O=i(!1),b=i(""),n=i(""),m=i([]),S=i([]),L=i(!1),C=i(!1),$=i(""),v=i(""),_=i(""),u=i(""),y=i(""),A=i(void 0),z=i(void 0),I=i(void 0),d=i("garm"),B=i("linux"),J=i("amd64"),ee=i(""),re=i(!0),G=i("{}");async function ue(){try{r(C,!0),r(S,await R.listProviders())}catch(p){r(b,Y(p))}finally{r(C,!1)}}async function Se(){if(e(n))try{switch(r(L,!0),r(m,[]),e(n)){case"repository":r(m,await R.listRepositories());break;case"organization":r(m,await R.listOrganizations());break;case"enterprise":r(m,await R.listEnterprises());break}}catch(p){r(b,Y(p))}finally{r(L,!1)}}function te(p){e(n)!==p&&(r(n,p),r(v,""),Se())}async function Ce(){if(!e($)||!e(n)||!e(v)||!e(_)||!e(u)||!e(y)){r(b,"Please fill in all required fields");return}try{r(O,!0),r(b,"");let p={};if(e(G).trim())try{p=JSON.parse(e(G))}catch{throw new Error("Invalid JSON in extra specs")}const F={name:e($),provider_name:e(_),image:e(u),flavor:e(y),max_runners:e(A)||10,min_idle_runners:e(z)||0,runner_bootstrap_timeout:e(I)||20,runner_prefix:e(d),os_type:e(B),os_arch:e(J),"github-runner-group":e(ee)||void 0,enabled:e(re),extra_specs:e(G).trim()?p:void 0};let P;switch(e(n)){case"repository":P=await R.createRepositoryScaleSet(e(v),F);break;case"organization":P=await R.createOrganizationScaleSet(e(v),F);break;case"enterprise":P=await R.createEnterpriseScaleSet(e(v),F);break;default:throw new Error("Invalid entity level selected")}Z("submit",P)}catch(p){r(b,Y(p))}finally{r(O,!1)}}kr(()=>{ue()}),hr(),Vr(_e,{$$events:{close:()=>Z("close")},children:(p,F)=>{var P=pt(),V=a(o(P),2),ge=o(V);{var be=g=>{var M=st(),K=o(M),fe=o(K,!0);s(K),s(M),k(()=>X(fe,e(b))),f(g,M)};D(ge,g=>{e(b)&&g(be)})}var j=a(ge,2),ae=a(o(j),2);T(ae),s(j);var oe=a(j,2),se=o(oe),pe=a(o(se),2),W=o(pe),le=a(W,2),me=a(le,2);s(pe),s(se),s(oe);var ve=a(oe,2);{var t=g=>{var M=gt(),K=_r(M),fe=a(o(K),2),Pe=o(fe),Me=o(Pe),Pr=o(Me);pr(),s(Me);var Mr=a(Me,2);{var Er=l=>{var h=lt();f(l,h)},Tr=l=>{var h=dt();k(()=>{e(v),he(()=>{e(n),e(m)})});var E=o(h),Le=o(E);s(E),E.value=E.__value="";var ie=a(E);vr(ie,1,()=>e(m),fr,(N,x)=>{var U=it(),ye=o(U);{var Ir=Q=>{var de=Be();k(()=>X(de,`${e(x).owner??""}/${e(x).name??""} (${e(x).endpoint?.name||"Unknown endpoint"})`)),f(Q,de)},Gr=Q=>{var de=Be();k(()=>X(de,`${e(x).name??""} (${e(x).endpoint?.name||"Unknown endpoint"})`)),f(Q,de)};D(ye,Q=>{e(n)==="repository"?Q(Ir):Q(Gr,!1)})}s(U);var br={};k(()=>{br!==(br=e(x).id)&&(U.value=(U.__value=e(x).id)??"")}),f(N,U)}),s(h),k(()=>X(Le,`Select a ${e(n)??""}`)),xe(h,()=>e(v),N=>r(v,N)),f(l,h)};D(Mr,l=>{e(L)?l(Er):l(Tr,!1)})}s(Pe);var Ke=a(Pe,2),Rr=a(o(Ke),2);{var Dr=l=>{var h=nt();f(l,h)},Ar=l=>{var h=ut();k(()=>{e(_),he(()=>{e(S)})});var E=o(h);E.value=E.__value="";var Le=a(E);vr(Le,1,()=>e(S),fr,(ie,N)=>{var x=ct(),U=o(x,!0);s(x);var ye={};k(()=>{X(U,e(N).name),ye!==(ye=e(N).name)&&(x.value=(x.__value=e(N).name)??"")}),f(ie,x)}),s(h),xe(h,()=>e(_),ie=>r(_,ie)),f(l,h)};D(Rr,l=>{e(C)?l(Dr):l(Ar,!1)})}s(Ke),s(fe),s(K);var Ee=a(K,2),Qe=a(o(Ee),2),Te=o(Qe),Xe=a(o(Te),2);T(Xe),s(Te);var Re=a(Te,2),Ye=a(o(Re),2);T(Ye),s(Re);var De=a(Re,2),Ae=a(o(De),2);k(()=>{e(B),he(()=>{})});var ze=o(Ae);ze.value=ze.__value="linux";var Ze=a(ze);Ze.value=Ze.__value="windows",s(Ae),s(De);var er=a(De,2),Ie=a(o(er),2);k(()=>{e(J),he(()=>{})});var Ge=o(Ie);Ge.value=Ge.__value="amd64";var rr=a(Ge);rr.value=rr.__value="arm64",s(Ie),s(er),s(Qe),s(Ee);var He=a(Ee,2),tr=a(o(He),2),je=o(tr),ar=a(o(je),2);T(ar),s(je);var Ne=a(je,2),or=a(o(Ne),2);T(or),s(Ne);var sr=a(Ne,2),lr=a(o(sr),2);T(lr),s(sr),s(tr),s(He);var ir=a(He,2),Ue=a(o(ir),2),qe=o(Ue),dr=a(o(qe),2);T(dr),s(qe);var nr=a(qe,2),cr=a(o(nr),2);T(cr),s(nr),s(Ue);var Oe=a(Ue,2),zr=a(o(Oe),2);Wr(zr,{rows:4,placeholder:"{}",get value(){return e(G)},set value(l){r(G,l)},$$legacy:!0}),s(Oe);var ur=a(Oe,2),gr=o(ur);T(gr),pr(2),s(ur),s(ir),k(l=>X(Pr,`${l??""} `),[()=>e(n).charAt(0).toUpperCase()+e(n).slice(1)]),H(Xe,()=>e(u),l=>r(u,l)),H(Ye,()=>e(y),l=>r(y,l)),xe(Ae,()=>e(B),l=>r(B,l)),xe(Ie,()=>e(J),l=>r(J,l)),H(ar,()=>e(z),l=>r(z,l)),H(or,()=>e(A),l=>r(A,l)),H(lr,()=>e(I),l=>r(I,l)),H(dr,()=>e(d),l=>r(d,l)),H(cr,()=>e(ee),l=>r(ee,l)),Jr(gr,()=>e(re),l=>r(re,l)),f(g,M)};D(ve,g=>{e(n)&&g(t)})}var c=a(ve,2),We=o(c),$e=a(We,2),Sr=o($e);{var Cr=g=>{var M=bt();f(g,M)},$r=g=>{var M=Be("Create Scale Set");f(g,M)};D(Sr,g=>{e(O)?g(Cr):g($r,!1)})}s($e),s(c),s(V),s(P),k(()=>{Fe(W,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="repository"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),Fe(le,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="organization"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),Fe(me,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="enterprise"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),$e.disabled=e(O)||!e($)||!e(n)||!e(v)||!e(_)||!e(u)||!e(y)}),H(ae,()=>e($),g=>r($,g)),ne("click",W,()=>te("repository")),ne("click",le,()=>te("organization")),ne("click",me,()=>te("enterprise")),ne("click",We,()=>Z("close")),ne("submit",V,Fr(Ce)),f(p,P)},$$slots:{default:!0}}),wr()}var vt=w('
',1);function Ut(_e,we){xr(we,!1);const[Z,O]=Or(),b=()=>Lr(Xr,"$eagerCache",Z),n=i(),m=i(),S=i(),L=i();let C=i([]),$=i(!0),v=i(""),_=i(""),u=i(1),y=i(25),A=i(!1),z=i(!1),I=i(!1),d=i(null);async function B(t){try{r(v,""),r(A,!1),ke.success("Scale Set Created","Scale set has been created successfully.")}catch(c){throw r(v,Y(c)),c}}async function J(t){if(e(d))try{await R.updateScaleSet(e(d).id,t),ke.success("Scale Set Updated",`Scale set ${e(d).name} has been updated successfully.`),r(z,!1),r(d,null)}catch(c){throw c}}async function ee(){if(e(d))try{await R.deleteScaleSet(e(d).id),ke.success("Scale Set Deleted",`Scale set ${e(d).name} has been deleted successfully.`)}catch(t){const c=Y(t);ke.error("Delete Failed",c)}finally{r(I,!1),r(d,null)}}function re(){r(A,!0)}function G(t){r(d,t),r(z,!0)}function ue(t){r(d,t),r(I,!0)}kr(async()=>{try{r($,!0);const t=await yr.getScaleSets();t&&Array.isArray(t)&&r(C,t)}catch(t){console.error("Failed to load scale sets:",t),r(v,Y(t))}finally{r($,!1)}});async function Se(){try{await yr.retryResource("scalesets")}catch(t){console.error("Retry failed:",t)}}const te=[{key:"name",title:"Name",cellComponent:rt,cellProps:{entityType:"scaleset"}},{key:"image",title:"Image",cellComponent:Ve,cellProps:{field:"image",type:"code",showTitle:!0}},{key:"provider",title:"Provider",cellComponent:Ve,cellProps:{field:"provider_name"}},{key:"flavor",title:"Flavor",cellComponent:Ve,cellProps:{field:"flavor"}},{key:"entity",title:"Entity",cellComponent:ot},{key:"endpoint",title:"Endpoint",cellComponent:tt},{key:"status",title:"Status",cellComponent:at,cellProps:{statusType:"enabled"}},{key:"actions",title:"Actions",align:"right",cellComponent:et}],Ce={entityType:"scaleset",primaryText:{field:"name",isClickable:!0,href:"/scalesets/{id}"},secondaryText:{field:"entity_name",computedValue:t=>ce(t)},badges:[{type:"custom",value:t=>({variant:t.enabled?"success":"error",text:t.enabled?"Enabled":"Disabled"})}],actions:[{type:"edit",handler:t=>G(t)},{type:"delete",handler:t=>ue(t)}]};function p(t){r(_,t.detail.term),r(u,1)}function F(t){r(u,t.detail.page)}function P(t){r(y,t.detail.perPage),r(u,1)}function V(t){G(t.detail.item)}function ge(t){ue(t.detail.item)}q(()=>(e(C),b()),()=>{(!e(C).length||b().loaded.scalesets)&&r(C,b().scalesets)}),q(()=>b(),()=>{r($,b().loading.scalesets)}),q(()=>b(),()=>{r(n,b().errorMessages.scalesets)}),q(()=>(e(C),e(_),ce),()=>{r(m,Yr(e(C),e(_),t=>ce(t)))}),q(()=>(e(m),e(y)),()=>{r(S,Math.ceil(e(m).length/e(y)))}),q(()=>(e(u),e(S)),()=>{e(u)>e(S)&&e(S)>0&&r(u,e(S))}),q(()=>(e(m),e(u),e(y)),()=>{r(L,e(m).slice((e(u)-1)*e(y),e(u)*e(y)))}),jr(),hr();var be=vt();Nr(t=>{Ur.title="Scale Sets - GARM"});var j=_r(be),ae=o(j);Br(ae,{title:"Scale Sets",description:"Manage GitHub runner scale sets",actionLabel:"Add Scale Set",$$events:{action:re}});var oe=a(ae,2);{let t=Je(()=>e(n)||e(v)),c=Je(()=>!!e(n));Zr(oe,{get columns(){return te},get data(){return e(L)},get loading(){return e($)},get error(){return e(t)},get searchTerm(){return e(_)},searchPlaceholder:"Search by entity name...",get currentPage(){return e(u)},get perPage(){return e(y)},get totalPages(){return e(S)},get totalItems(){return e(m),mr(()=>e(m).length)},itemName:"scale sets",emptyIconType:"cog",get showRetry(){return e(c)},get mobileCardConfig(){return Ce},$$events:{search:p,pageChange:F,perPageChange:P,retry:Se,edit:V,delete:ge}})}s(j);var se=a(j,2);{var pe=t=>{mt(t,{$$events:{close:()=>r(A,!1),submit:c=>B(c.detail)}})};D(se,t=>{e(A)&&t(pe)})}var W=a(se,2);{var le=t=>{Kr(t,{get scaleSet(){return e(d)},$$events:{close:()=>{r(z,!1),r(d,null)},submit:c=>J(c.detail)}})};D(W,t=>{e(z)&&e(d)&&t(le)})}var me=a(W,2);{var ve=t=>{{let c=Je(()=>(e(d),qr(ce),mr(()=>`Scale Set ${e(d).name} (${ce(e(d))})`)));Qr(t,{title:"Delete Scale Set",message:"Are you sure you want to delete this scale set? This action cannot be undone and will remove all associated runners.",get itemName(){return e(c)},$$events:{close:()=>{r(I,!1),r(d,null)},confirm:ee}})}};D(me,t=>{e(I)&&e(d)&&t(ve)})}f(_e,be),wr(),O()}export{Ut as component}; +import"../chunks/DsnmJJEf.js";import{i as hr}from"../chunks/zNh6Oe5P.js";import{p as xr,E as Hr,o as kr,f as w,k as a,j as o,g as e,m as i,r as s,t as k,s as r,e as ne,c as f,v as X,b as _r,z as pr,x as he,D as Be,d as wr,l as q,a as jr,h as Nr,$ as Ur,q as Je,u as mr,n as qr}from"../chunks/sWNKMed7.js";import{i as D,s as Or,a as Lr}from"../chunks/Ccl3fNd2.js";import{r as T,s as Fe,b as xe,g as R}from"../chunks/t8NOL8UT.js";import{P as Br}from"../chunks/sdr-JCKi.js";import{e as vr,i as fr}from"../chunks/BuuPrWMc.js";import{b as H,a as Jr}from"../chunks/CLagxtgo.js";import{p as Fr}from"../chunks/D4Caz1gY.js";import{M as Vr}from"../chunks/-99ewtnX.js";import{J as Wr}from"../chunks/5NDOgLBG.js";import{e as Y}from"../chunks/BZiHL9L3.js";import{U as Kr}from"../chunks/D-gZnIAg.js";import{D as Qr}from"../chunks/Dxyf9P7U.js";import{e as Xr,a as yr}from"../chunks/UPGsoYWO.js";import{t as ke}from"../chunks/BZUCTtPY.js";import{e as ce,h as Yr}from"../chunks/Cbkm53HO.js";import{D as Zr,G as Ve,a as et}from"../chunks/WvS03pW2.js";import{E as rt}from"../chunks/CfvU88k5.js";import{E as tt}from"../chunks/CC0e8UY8.js";import{S as at}from"../chunks/C7WQ-JBG.js";import{P as ot}from"../chunks/MfZe8e4a.js";import"../chunks/BFThZs5w.js";var st=w('

'),lt=w('
'),it=w(""),dt=w(''),nt=w('
'),ct=w(""),ut=w(''),gt=w('

Entity & Provider Configuration

Image & OS Configuration

Runner Limits & Timing

Advanced Settings

Extra Specs (JSON)
',1),bt=w('
Creating...
'),pt=w('

Create New Scale Set

Scale sets are only available for GitHub endpoints

Entity Level *
');function mt(_e,we){xr(we,!1);const Z=Hr();let O=i(!1),b=i(""),n=i(""),m=i([]),S=i([]),L=i(!1),C=i(!1),$=i(""),v=i(""),_=i(""),u=i(""),y=i(""),A=i(void 0),z=i(void 0),I=i(void 0),d=i("garm"),B=i("linux"),J=i("amd64"),ee=i(""),re=i(!0),G=i("{}");async function ue(){try{r(C,!0),r(S,await R.listProviders())}catch(p){r(b,Y(p))}finally{r(C,!1)}}async function Se(){if(e(n))try{switch(r(L,!0),r(m,[]),e(n)){case"repository":r(m,await R.listRepositories());break;case"organization":r(m,await R.listOrganizations());break;case"enterprise":r(m,await R.listEnterprises());break}}catch(p){r(b,Y(p))}finally{r(L,!1)}}function te(p){e(n)!==p&&(r(n,p),r(v,""),Se())}async function Ce(){if(!e($)||!e(n)||!e(v)||!e(_)||!e(u)||!e(y)){r(b,"Please fill in all required fields");return}try{r(O,!0),r(b,"");let p={};if(e(G).trim())try{p=JSON.parse(e(G))}catch{throw new Error("Invalid JSON in extra specs")}const F={name:e($),provider_name:e(_),image:e(u),flavor:e(y),max_runners:e(A)||10,min_idle_runners:e(z)||0,runner_bootstrap_timeout:e(I)||20,runner_prefix:e(d),os_type:e(B),os_arch:e(J),"github-runner-group":e(ee)||void 0,enabled:e(re),extra_specs:e(G).trim()?p:void 0};let P;switch(e(n)){case"repository":P=await R.createRepositoryScaleSet(e(v),F);break;case"organization":P=await R.createOrganizationScaleSet(e(v),F);break;case"enterprise":P=await R.createEnterpriseScaleSet(e(v),F);break;default:throw new Error("Invalid entity level selected")}Z("submit",P)}catch(p){r(b,Y(p))}finally{r(O,!1)}}kr(()=>{ue()}),hr(),Vr(_e,{$$events:{close:()=>Z("close")},children:(p,F)=>{var P=pt(),V=a(o(P),2),ge=o(V);{var be=g=>{var M=st(),K=o(M),fe=o(K,!0);s(K),s(M),k(()=>X(fe,e(b))),f(g,M)};D(ge,g=>{e(b)&&g(be)})}var j=a(ge,2),ae=a(o(j),2);T(ae),s(j);var oe=a(j,2),se=o(oe),pe=a(o(se),2),W=o(pe),le=a(W,2),me=a(le,2);s(pe),s(se),s(oe);var ve=a(oe,2);{var t=g=>{var M=gt(),K=_r(M),fe=a(o(K),2),Pe=o(fe),Me=o(Pe),Pr=o(Me);pr(),s(Me);var Mr=a(Me,2);{var Er=l=>{var h=lt();f(l,h)},Tr=l=>{var h=dt();k(()=>{e(v),he(()=>{e(n),e(m)})});var E=o(h),Le=o(E);s(E),E.value=E.__value="";var ie=a(E);vr(ie,1,()=>e(m),fr,(N,x)=>{var U=it(),ye=o(U);{var Ir=Q=>{var de=Be();k(()=>X(de,`${e(x).owner??""}/${e(x).name??""} (${e(x).endpoint?.name||"Unknown endpoint"})`)),f(Q,de)},Gr=Q=>{var de=Be();k(()=>X(de,`${e(x).name??""} (${e(x).endpoint?.name||"Unknown endpoint"})`)),f(Q,de)};D(ye,Q=>{e(n)==="repository"?Q(Ir):Q(Gr,!1)})}s(U);var br={};k(()=>{br!==(br=e(x).id)&&(U.value=(U.__value=e(x).id)??"")}),f(N,U)}),s(h),k(()=>X(Le,`Select a ${e(n)??""}`)),xe(h,()=>e(v),N=>r(v,N)),f(l,h)};D(Mr,l=>{e(L)?l(Er):l(Tr,!1)})}s(Pe);var Ke=a(Pe,2),Rr=a(o(Ke),2);{var Dr=l=>{var h=nt();f(l,h)},Ar=l=>{var h=ut();k(()=>{e(_),he(()=>{e(S)})});var E=o(h);E.value=E.__value="";var Le=a(E);vr(Le,1,()=>e(S),fr,(ie,N)=>{var x=ct(),U=o(x,!0);s(x);var ye={};k(()=>{X(U,e(N).name),ye!==(ye=e(N).name)&&(x.value=(x.__value=e(N).name)??"")}),f(ie,x)}),s(h),xe(h,()=>e(_),ie=>r(_,ie)),f(l,h)};D(Rr,l=>{e(C)?l(Dr):l(Ar,!1)})}s(Ke),s(fe),s(K);var Ee=a(K,2),Qe=a(o(Ee),2),Te=o(Qe),Xe=a(o(Te),2);T(Xe),s(Te);var Re=a(Te,2),Ye=a(o(Re),2);T(Ye),s(Re);var De=a(Re,2),Ae=a(o(De),2);k(()=>{e(B),he(()=>{})});var ze=o(Ae);ze.value=ze.__value="linux";var Ze=a(ze);Ze.value=Ze.__value="windows",s(Ae),s(De);var er=a(De,2),Ie=a(o(er),2);k(()=>{e(J),he(()=>{})});var Ge=o(Ie);Ge.value=Ge.__value="amd64";var rr=a(Ge);rr.value=rr.__value="arm64",s(Ie),s(er),s(Qe),s(Ee);var He=a(Ee,2),tr=a(o(He),2),je=o(tr),ar=a(o(je),2);T(ar),s(je);var Ne=a(je,2),or=a(o(Ne),2);T(or),s(Ne);var sr=a(Ne,2),lr=a(o(sr),2);T(lr),s(sr),s(tr),s(He);var ir=a(He,2),Ue=a(o(ir),2),qe=o(Ue),dr=a(o(qe),2);T(dr),s(qe);var nr=a(qe,2),cr=a(o(nr),2);T(cr),s(nr),s(Ue);var Oe=a(Ue,2),zr=a(o(Oe),2);Wr(zr,{rows:4,placeholder:"{}",get value(){return e(G)},set value(l){r(G,l)},$$legacy:!0}),s(Oe);var ur=a(Oe,2),gr=o(ur);T(gr),pr(2),s(ur),s(ir),k(l=>X(Pr,`${l??""} `),[()=>e(n).charAt(0).toUpperCase()+e(n).slice(1)]),H(Xe,()=>e(u),l=>r(u,l)),H(Ye,()=>e(y),l=>r(y,l)),xe(Ae,()=>e(B),l=>r(B,l)),xe(Ie,()=>e(J),l=>r(J,l)),H(ar,()=>e(z),l=>r(z,l)),H(or,()=>e(A),l=>r(A,l)),H(lr,()=>e(I),l=>r(I,l)),H(dr,()=>e(d),l=>r(d,l)),H(cr,()=>e(ee),l=>r(ee,l)),Jr(gr,()=>e(re),l=>r(re,l)),f(g,M)};D(ve,g=>{e(n)&&g(t)})}var c=a(ve,2),We=o(c),$e=a(We,2),Sr=o($e);{var Cr=g=>{var M=bt();f(g,M)},$r=g=>{var M=Be("Create Scale Set");f(g,M)};D(Sr,g=>{e(O)?g(Cr):g($r,!1)})}s($e),s(c),s(V),s(P),k(()=>{Fe(W,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="repository"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),Fe(le,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="organization"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),Fe(me,1,`flex flex-col items-center justify-center p-4 border-2 rounded-lg transition-colors cursor-pointer ${e(n)==="enterprise"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),$e.disabled=e(O)||!e($)||!e(n)||!e(v)||!e(_)||!e(u)||!e(y)}),H(ae,()=>e($),g=>r($,g)),ne("click",W,()=>te("repository")),ne("click",le,()=>te("organization")),ne("click",me,()=>te("enterprise")),ne("click",We,()=>Z("close")),ne("submit",V,Fr(Ce)),f(p,P)},$$slots:{default:!0}}),wr()}var vt=w('
',1);function Ut(_e,we){xr(we,!1);const[Z,O]=Or(),b=()=>Lr(Xr,"$eagerCache",Z),n=i(),m=i(),S=i(),L=i();let C=i([]),$=i(!0),v=i(""),_=i(""),u=i(1),y=i(25),A=i(!1),z=i(!1),I=i(!1),d=i(null);async function B(t){try{r(v,""),r(A,!1),ke.success("Scale Set Created","Scale set has been created successfully.")}catch(c){throw r(v,Y(c)),c}}async function J(t){if(e(d))try{await R.updateScaleSet(e(d).id,t),ke.success("Scale Set Updated",`Scale set ${e(d).name} has been updated successfully.`),r(z,!1),r(d,null)}catch(c){throw c}}async function ee(){if(e(d))try{await R.deleteScaleSet(e(d).id),ke.success("Scale Set Deleted",`Scale set ${e(d).name} has been deleted successfully.`)}catch(t){const c=Y(t);ke.error("Delete Failed",c)}finally{r(I,!1),r(d,null)}}function re(){r(A,!0)}function G(t){r(d,t),r(z,!0)}function ue(t){r(d,t),r(I,!0)}kr(async()=>{try{r($,!0);const t=await yr.getScaleSets();t&&Array.isArray(t)&&r(C,t)}catch(t){console.error("Failed to load scale sets:",t),r(v,Y(t))}finally{r($,!1)}});async function Se(){try{await yr.retryResource("scalesets")}catch(t){console.error("Retry failed:",t)}}const te=[{key:"name",title:"Name",cellComponent:rt,cellProps:{entityType:"scaleset"}},{key:"image",title:"Image",cellComponent:Ve,cellProps:{field:"image",type:"code",showTitle:!0}},{key:"provider",title:"Provider",cellComponent:Ve,cellProps:{field:"provider_name"}},{key:"flavor",title:"Flavor",cellComponent:Ve,cellProps:{field:"flavor"}},{key:"entity",title:"Entity",cellComponent:ot},{key:"endpoint",title:"Endpoint",cellComponent:tt},{key:"status",title:"Status",cellComponent:at,cellProps:{statusType:"enabled"}},{key:"actions",title:"Actions",align:"right",cellComponent:et}],Ce={entityType:"scaleset",primaryText:{field:"name",isClickable:!0,href:"/scalesets/{id}"},secondaryText:{field:"entity_name",computedValue:t=>ce(t)},badges:[{type:"custom",value:t=>({variant:t.enabled?"success":"error",text:t.enabled?"Enabled":"Disabled"})}],actions:[{type:"edit",handler:t=>G(t)},{type:"delete",handler:t=>ue(t)}]};function p(t){r(_,t.detail.term),r(u,1)}function F(t){r(u,t.detail.page)}function P(t){r(y,t.detail.perPage),r(u,1)}function V(t){G(t.detail.item)}function ge(t){ue(t.detail.item)}q(()=>(e(C),b()),()=>{(!e(C).length||b().loaded.scalesets)&&r(C,b().scalesets)}),q(()=>b(),()=>{r($,b().loading.scalesets)}),q(()=>b(),()=>{r(n,b().errorMessages.scalesets)}),q(()=>(e(C),e(_),ce),()=>{r(m,Yr(e(C),e(_),t=>ce(t)))}),q(()=>(e(m),e(y)),()=>{r(S,Math.ceil(e(m).length/e(y)))}),q(()=>(e(u),e(S)),()=>{e(u)>e(S)&&e(S)>0&&r(u,e(S))}),q(()=>(e(m),e(u),e(y)),()=>{r(L,e(m).slice((e(u)-1)*e(y),e(u)*e(y)))}),jr(),hr();var be=vt();Nr(t=>{Ur.title="Scale Sets - GARM"});var j=_r(be),ae=o(j);Br(ae,{title:"Scale Sets",description:"Manage GitHub runner scale sets",actionLabel:"Add Scale Set",$$events:{action:re}});var oe=a(ae,2);{let t=Je(()=>e(n)||e(v)),c=Je(()=>!!e(n));Zr(oe,{get columns(){return te},get data(){return e(L)},get loading(){return e($)},get error(){return e(t)},get searchTerm(){return e(_)},searchPlaceholder:"Search by entity name...",get currentPage(){return e(u)},get perPage(){return e(y)},get totalPages(){return e(S)},get totalItems(){return e(m),mr(()=>e(m).length)},itemName:"scale sets",emptyIconType:"cog",get showRetry(){return e(c)},get mobileCardConfig(){return Ce},$$events:{search:p,pageChange:F,perPageChange:P,retry:Se,edit:V,delete:ge}})}s(j);var se=a(j,2);{var pe=t=>{mt(t,{$$events:{close:()=>r(A,!1),submit:c=>B(c.detail)}})};D(se,t=>{e(A)&&t(pe)})}var W=a(se,2);{var le=t=>{Kr(t,{get scaleSet(){return e(d)},$$events:{close:()=>{r(z,!1),r(d,null)},submit:c=>J(c.detail)}})};D(W,t=>{e(z)&&e(d)&&t(le)})}var me=a(W,2);{var ve=t=>{{let c=Je(()=>(e(d),qr(ce),mr(()=>`Scale Set ${e(d).name} (${ce(e(d))})`)));Qr(t,{title:"Delete Scale Set",message:"Are you sure you want to delete this scale set? This action cannot be undone and will remove all associated runners.",get itemName(){return e(c)},$$events:{close:()=>{r(I,!1),r(d,null)},confirm:ee}})}};D(me,t=>{e(I)&&e(d)&&t(ve)})}f(_e,be),wr(),O()}export{Ut as component}; diff --git a/webapp/assets/_app/immutable/nodes/18.DtLK893b.js b/webapp/assets/_app/immutable/nodes/18.DtLK893b.js deleted file mode 100644 index 3dedff77..00000000 --- a/webapp/assets/_app/immutable/nodes/18.DtLK893b.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Je}from"../chunks/B3Pzt0F_.js";import{p as Pe,o as je,A as qe,l as ze,a as Ve,f as w,h as We,b as U,t as k,c as p,d as Ke,s as l,m as _,u as i,$ as Qe,g as t,j as a,r,k as d,v as o,y as ct,B as zt,q as $,n as x}from"../chunks/D8EpLgQ1.js";import{i as g,s as Xe,a as Ye}from"../chunks/5WA7h8uK.js";import{c as Vt,g as B,s as Ze}from"../chunks/CiE1LlKV.js";import{p as ta}from"../chunks/-1rkm990.js";import{g as Wt}from"../chunks/DsX4H4sg.js";import{b as vt}from"../chunks/D3_ugSUS.js";import{U as ea}from"../chunks/2p_hWkLJ.js";import{D as Kt}from"../chunks/KQ2xQpA3.js";import{D as aa,I as ra}from"../chunks/G-ddPbA8.js";import{w as Qt}from"../chunks/u94nIB4-.js";import{t as R}from"../chunks/BEkVdVE1.js";import{e as Xt}from"../chunks/BZiHL9L3.js";import{e as S,i as F,j as Yt,b as C,g as Zt}from"../chunks/D5ucq3Gx.js";var sa=w('

Loading scale set...

'),da=w('

'),ia=w('
GitHub Runner Group
'),na=w('

Extra Specifications

 
'),la=w('

Basic Information

Scale Set ID
Name
Provider
Image
Flavor
Status
Entity
Created At
Updated At

Configuration

Max Runners
Min Idle Runners
Bootstrap Timeout
Runner Prefix
OS Type / Architecture
',1),oa=w(' ',1);function $a(te,ee){Pe(ee,!1);const[ae,re]=Xe(),mt=()=>Ye(ta,"$page",ae),I=_();let e=_(null),G=_(!0),D=_(""),E=_(!1),M=_(!1),A=_(!1),m=_(null),N=null;async function ut(){if(!(!t(I)||isNaN(t(I))))try{l(G,!0),l(D,""),l(e,await B.getScaleSet(t(I)))}catch(s){l(D,s instanceof Error?s.message:"Failed to load scale set")}finally{l(G,!1)}}async function se(s){if(t(e))try{await B.updateScaleSet(t(e).id,s),await ut(),R.success("Scale Set Updated",`Scale Set ${t(e).name} has been updated successfully.`),l(E,!1)}catch(n){throw n}}async function de(){if(t(e)){try{await B.deleteScaleSet(t(e).id),Wt(`${vt}/scalesets`)}catch(s){const n=Xt(s);R.error("Delete Failed",n)}l(M,!1)}}async function ie(){if(t(m)){try{await B.deleteInstance(t(m).name),R.success("Instance Deleted",`Instance ${t(m).name} has been deleted successfully.`)}catch(s){const n=Xt(s);R.error("Delete Failed",n)}l(A,!1),l(m,null)}}function ne(s){l(m,s),l(A,!0)}function le(s){if(!s)return"{}";try{if(typeof s=="string"){const n=JSON.parse(s);return JSON.stringify(n,null,2)}return JSON.stringify(s,null,2)}catch{return s.toString()}}function oe(s){if(s.operation==="update"){const n=s.payload;t(e)&&n.id===t(e).id&&l(e,n)}else if(s.operation==="delete"){const n=s.payload.id||s.payload;t(e)&&t(e).id===n&&Wt(`${vt}/scalesets`)}}function ce(s){if(!t(e)||!t(e).instances)return;const n=s.payload;if(n.scale_set_id===t(e).id){if(s.operation==="create")ct(e,t(e).instances=[...t(e).instances,n]);else if(s.operation==="update")ct(e,t(e).instances=t(e).instances.map(y=>y.id===n.id?n:y));else if(s.operation==="delete"){const y=n.id||n;ct(e,t(e).instances=t(e).instances.filter(J=>J.id!==y))}l(e,t(e))}}je(()=>{ut();const s=Qt.subscribeToEntity("scaleset",["update","delete"],oe),n=Qt.subscribeToEntity("instance",["create","update","delete"],ce);N=()=>{s(),n()}}),qe(()=>{N&&(N(),N=null)}),ze(()=>mt(),()=>{l(I,parseInt(mt().params.id||"0"))}),Ve(),Je();var xt=oa();We(s=>{k(()=>Qe.title=`${t(e),i(()=>t(e)?`${t(e).name} - Scale Set Details`:"Scale Set Details")??""} - GARM`)});var L=U(xt),O=a(L),gt=a(O),H=a(gt),ve=a(H);r(H);var ft=d(H,2),pt=a(ft),_t=d(a(pt),2),me=a(_t,!0);r(_t),r(pt),r(ft),r(gt),r(O);var ue=d(O,2);{var xe=s=>{var n=sa();p(s,n)},ge=s=>{var n=zt(),y=U(n);{var J=h=>{var b=da(),T=a(b),P=a(T,!0);r(T),r(b),k(()=>o(P,t(D))),p(h,b)},he=h=>{var b=zt(),T=U(b);{var P=j=>{var bt=la(),kt=U(bt);{let c=$(()=>(t(e),i(()=>t(e).name||"Scale Set"))),v=$(()=>(x(S),t(e),i(()=>S(t(e))))),u=$(()=>(x(F),t(e),i(()=>F(t(e))))),f=$(()=>(x(Zt),i(()=>Zt("github"))));aa(kt,{get title(){return t(c)},get subtitle(){return`Scale set for ${t(v)??""} (${t(u)??""}) • GitHub Runner Scale Set`},get forgeIcon(){return t(f)},onEdit:()=>l(E,!0),onDelete:()=>l(M,!0)})}var q=d(kt,2),z=a(q),St=a(z),wt=d(a(St),2),V=a(wt),$t=d(a(V),2),be=a($t,!0);r($t),r(V);var W=d(V,2),It=d(a(W),2),ke=a(It,!0);r(It),r(W);var K=d(W,2),Dt=d(a(K),2),Se=a(Dt,!0);r(Dt),r(K);var Q=d(K,2),Et=d(a(Q),2),Mt=a(Et),we=a(Mt,!0);r(Mt),r(Et),r(Q);var X=d(Q,2),At=d(a(X),2),$e=a(At,!0);r(At),r(X);var Y=d(X,2),Nt=d(a(Y),2),Z=a(Nt),Ie=a(Z,!0);r(Z),r(Nt),r(Y);var tt=d(Y,2),Tt=d(a(tt),2),Ut=a(Tt),et=a(Ut),De=a(et,!0);r(et);var at=d(et,2),Ee=a(at,!0);r(at),r(Ut),r(Tt),r(tt);var rt=d(tt,2),Bt=d(a(rt),2),Me=a(Bt,!0);r(Bt),r(rt);var Rt=d(rt,2),Ft=d(a(Rt),2),Ae=a(Ft,!0);r(Ft),r(Rt),r(wt),r(St),r(z);var Ct=d(z,2),Gt=a(Ct),Lt=d(a(Gt),2),st=a(Lt),Ot=d(a(st),2),Ne=a(Ot,!0);r(Ot),r(st);var dt=d(st,2),Ht=d(a(dt),2),Te=a(Ht,!0);r(Ht),r(dt);var it=d(dt,2),Jt=d(a(it),2),Ue=a(Jt);r(Jt),r(it);var nt=d(it,2),Pt=d(a(nt),2),Be=a(Pt,!0);r(Pt),r(nt);var lt=d(nt,2),jt=d(a(lt),2),Re=a(jt);r(jt),r(lt);var Fe=d(lt,2);{var Ce=c=>{var v=ia(),u=d(a(v),2),f=a(u,!0);r(u),r(v),k(()=>o(f,(t(e),i(()=>t(e)["github-runner-group"])))),p(c,v)};g(Fe,c=>{t(e),i(()=>t(e)["github-runner-group"])&&c(Ce)})}r(Lt),r(Gt),r(Ct),r(q);var qt=d(q,2);{var Ge=c=>{var v=na(),u=a(v),f=d(a(u),2),ot=a(f,!0);r(f),r(u),r(v),k(He=>o(ot,He),[()=>(t(e),i(()=>le(t(e).extra_specs)))]),p(c,v)};g(qt,c=>{t(e),i(()=>t(e).extra_specs)&&c(Ge)})}var Le=d(qt,2);{var Oe=c=>{ra(c,{get instances(){return t(e),i(()=>t(e).instances)},entityType:"scaleset",onDeleteInstance:ne})};g(Le,c=>{t(e),i(()=>t(e).instances)&&c(Oe)})}k((c,v,u,f,ot)=>{o(be,(t(e),i(()=>t(e).id))),o(ke,(t(e),i(()=>t(e).name))),o(Se,(t(e),i(()=>t(e).provider_name))),o(we,(t(e),i(()=>t(e).image))),o($e,(t(e),i(()=>t(e).flavor))),Ze(Z,1,`inline-flex px-2 py-1 text-xs font-medium rounded-full ${t(e),i(()=>t(e).enabled?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200")??""}`),o(Ie,(t(e),i(()=>t(e).enabled?"Enabled":"Disabled"))),o(De,c),Vt(at,"href",v),o(Ee,u),o(Me,f),o(Ae,ot),o(Ne,(t(e),i(()=>t(e).max_runners))),o(Te,(t(e),i(()=>t(e).min_idle_runners))),o(Ue,`${t(e),i(()=>t(e).runner_bootstrap_timeout)??""} minutes`),o(Be,(t(e),i(()=>t(e).runner_prefix||"garm"))),o(Re,`${t(e),i(()=>t(e).os_type)??""} / ${t(e),i(()=>t(e).os_arch)??""}`)},[()=>(x(F),t(e),i(()=>F(t(e)))),()=>(x(Yt),t(e),i(()=>Yt(t(e)))),()=>(x(S),t(e),i(()=>S(t(e)))),()=>(x(C),t(e),i(()=>C(t(e).created_at||""))),()=>(x(C),t(e),i(()=>C(t(e).updated_at||"")))]),p(j,bt)};g(T,j=>{t(e)&&j(P)},!0)}p(h,b)};g(y,h=>{t(D)?h(J):h(he,!1)},!0)}p(s,n)};g(ue,s=>{t(G)?s(xe):s(ge,!1)})}r(L);var yt=d(L,2);{var fe=s=>{ea(s,{get scaleSet(){return t(e)},$$events:{close:()=>l(E,!1),submit:n=>se(n.detail)}})};g(yt,s=>{t(E)&&t(e)&&s(fe)})}var ht=d(yt,2);{var pe=s=>{{let n=$(()=>(t(e),x(S),i(()=>`Scale Set ${t(e).name} (${S(t(e))})`)));Kt(s,{title:"Delete Scale Set",message:"Are you sure you want to delete this scale set? This action cannot be undone and will remove all associated runners.",get itemName(){return t(n)},$$events:{close:()=>l(M,!1),confirm:de}})}};g(ht,s=>{t(M)&&t(e)&&s(pe)})}var _e=d(ht,2);{var ye=s=>{Kt(s,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return t(m),i(()=>t(m).name)},$$events:{close:()=>{l(A,!1),l(m,null)},confirm:ie}})};g(_e,s=>{t(A)&&t(m)&&s(ye)})}k(()=>{Vt(ve,"href",`${vt}/scalesets`),o(me,(t(e),i(()=>t(e)?t(e).name:"Loading...")))}),p(te,xt),Ke(),re()}export{$a as component}; diff --git a/webapp/assets/_app/immutable/nodes/18.JK9WAXrb.js b/webapp/assets/_app/immutable/nodes/18.JK9WAXrb.js new file mode 100644 index 00000000..a732ca47 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/18.JK9WAXrb.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as Je}from"../chunks/zNh6Oe5P.js";import{p as Pe,o as je,A as qe,l as ze,a as Ve,f as w,h as We,b as U,t as k,c as p,d as Ke,u as i,n as m,v as o,g as t,m as _,j as a,k as d,s as l,$ as Qe,r,y as vt,B as zt,q as $}from"../chunks/sWNKMed7.js";import{i as g,s as Xe,a as Ye}from"../chunks/Ccl3fNd2.js";import{d as B,c as Vt,g as R,s as Ze}from"../chunks/t8NOL8UT.js";import{p as ta}from"../chunks/-DWf2IZZ.js";import{g as Wt}from"../chunks/CaJ57PEy.js";import{U as ea}from"../chunks/D-gZnIAg.js";import{D as Kt}from"../chunks/Dxyf9P7U.js";import{D as aa,I as ra}from"../chunks/CMejw1Yi.js";import{w as Qt}from"../chunks/BuuPrWMc.js";import{t as F}from"../chunks/BZUCTtPY.js";import{e as Xt}from"../chunks/BZiHL9L3.js";import{e as S,i as C,j as Yt,b as G,g as Zt}from"../chunks/Cbkm53HO.js";var sa=w('

Loading scale set...

'),da=w('

'),ia=w('
GitHub Runner Group
'),na=w('

Extra Specifications

 
'),la=w('

Basic Information

Scale Set ID
Name
Provider
Image
Flavor
Status
Entity
Created At
Updated At

Configuration

Max Runners
Min Idle Runners
Bootstrap Timeout
Runner Prefix
OS Type / Architecture
',1),oa=w(' ',1);function wa(te,ee){Pe(ee,!1);const[ae,re]=Xe(),mt=()=>Ye(ta,"$page",ae),I=_();let e=_(null),L=_(!0),D=_(""),E=_(!1),M=_(!1),A=_(!1),u=_(null),N=null;async function ut(){if(!(!t(I)||isNaN(t(I))))try{l(L,!0),l(D,""),l(e,await R.getScaleSet(t(I)))}catch(s){l(D,s instanceof Error?s.message:"Failed to load scale set")}finally{l(L,!1)}}async function se(s){if(t(e))try{await R.updateScaleSet(t(e).id,s),await ut(),F.success("Scale Set Updated",`Scale Set ${t(e).name} has been updated successfully.`),l(E,!1)}catch(n){throw n}}async function de(){if(t(e)){try{await R.deleteScaleSet(t(e).id),Wt(B("/scalesets"))}catch(s){const n=Xt(s);F.error("Delete Failed",n)}l(M,!1)}}async function ie(){if(t(u)){try{await R.deleteInstance(t(u).name),F.success("Instance Deleted",`Instance ${t(u).name} has been deleted successfully.`)}catch(s){const n=Xt(s);F.error("Delete Failed",n)}l(A,!1),l(u,null)}}function ne(s){l(u,s),l(A,!0)}function le(s){if(!s)return"{}";try{if(typeof s=="string"){const n=JSON.parse(s);return JSON.stringify(n,null,2)}return JSON.stringify(s,null,2)}catch{return s.toString()}}function oe(s){if(s.operation==="update"){const n=s.payload;t(e)&&n.id===t(e).id&&l(e,n)}else if(s.operation==="delete"){const n=s.payload.id||s.payload;t(e)&&t(e).id===n&&Wt(B("/scalesets"))}}function ce(s){if(!t(e)||!t(e).instances)return;const n=s.payload;if(n.scale_set_id===t(e).id){if(s.operation==="create")vt(e,t(e).instances=[...t(e).instances,n]);else if(s.operation==="update")vt(e,t(e).instances=t(e).instances.map(y=>y.id===n.id?n:y));else if(s.operation==="delete"){const y=n.id||n;vt(e,t(e).instances=t(e).instances.filter(P=>P.id!==y))}l(e,t(e))}}je(()=>{ut();const s=Qt.subscribeToEntity("scaleset",["update","delete"],oe),n=Qt.subscribeToEntity("instance",["create","update","delete"],ce);N=()=>{s(),n()}}),qe(()=>{N&&(N(),N=null)}),ze(()=>mt(),()=>{l(I,parseInt(mt().params.id||"0"))}),Ve(),Je();var xt=oa();We(s=>{k(()=>Qe.title=`${t(e),i(()=>t(e)?`${t(e).name} - Scale Set Details`:"Scale Set Details")??""} - GARM`)});var O=U(xt),H=a(O),gt=a(H),J=a(gt),ve=a(J);r(J);var ft=d(J,2),pt=a(ft),_t=d(a(pt),2),me=a(_t,!0);r(_t),r(pt),r(ft),r(gt),r(H);var ue=d(H,2);{var xe=s=>{var n=sa();p(s,n)},ge=s=>{var n=zt(),y=U(n);{var P=h=>{var b=da(),T=a(b),j=a(T,!0);r(T),r(b),k(()=>o(j,t(D))),p(h,b)},he=h=>{var b=zt(),T=U(b);{var j=q=>{var bt=la(),kt=U(bt);{let c=$(()=>(t(e),i(()=>t(e).name||"Scale Set"))),v=$(()=>(m(S),t(e),i(()=>S(t(e))))),x=$(()=>(m(C),t(e),i(()=>C(t(e))))),f=$(()=>(m(Zt),i(()=>Zt("github"))));aa(kt,{get title(){return t(c)},get subtitle(){return`Scale set for ${t(v)??""} (${t(x)??""}) • GitHub Runner Scale Set`},get forgeIcon(){return t(f)},onEdit:()=>l(E,!0),onDelete:()=>l(M,!0)})}var z=d(kt,2),V=a(z),St=a(V),wt=d(a(St),2),W=a(wt),$t=d(a(W),2),be=a($t,!0);r($t),r(W);var K=d(W,2),It=d(a(K),2),ke=a(It,!0);r(It),r(K);var Q=d(K,2),Dt=d(a(Q),2),Se=a(Dt,!0);r(Dt),r(Q);var X=d(Q,2),Et=d(a(X),2),Mt=a(Et),we=a(Mt,!0);r(Mt),r(Et),r(X);var Y=d(X,2),At=d(a(Y),2),$e=a(At,!0);r(At),r(Y);var Z=d(Y,2),Nt=d(a(Z),2),tt=a(Nt),Ie=a(tt,!0);r(tt),r(Nt),r(Z);var et=d(Z,2),Tt=d(a(et),2),Ut=a(Tt),at=a(Ut),De=a(at,!0);r(at);var rt=d(at,2),Ee=a(rt,!0);r(rt),r(Ut),r(Tt),r(et);var st=d(et,2),Bt=d(a(st),2),Me=a(Bt,!0);r(Bt),r(st);var Rt=d(st,2),Ft=d(a(Rt),2),Ae=a(Ft,!0);r(Ft),r(Rt),r(wt),r(St),r(V);var Ct=d(V,2),Gt=a(Ct),Lt=d(a(Gt),2),dt=a(Lt),Ot=d(a(dt),2),Ne=a(Ot,!0);r(Ot),r(dt);var it=d(dt,2),Ht=d(a(it),2),Te=a(Ht,!0);r(Ht),r(it);var nt=d(it,2),Jt=d(a(nt),2),Ue=a(Jt);r(Jt),r(nt);var lt=d(nt,2),Pt=d(a(lt),2),Be=a(Pt,!0);r(Pt),r(lt);var ot=d(lt,2),jt=d(a(ot),2),Re=a(jt);r(jt),r(ot);var Fe=d(ot,2);{var Ce=c=>{var v=ia(),x=d(a(v),2),f=a(x,!0);r(x),r(v),k(()=>o(f,(t(e),i(()=>t(e)["github-runner-group"])))),p(c,v)};g(Fe,c=>{t(e),i(()=>t(e)["github-runner-group"])&&c(Ce)})}r(Lt),r(Gt),r(Ct),r(z);var qt=d(z,2);{var Ge=c=>{var v=na(),x=a(v),f=d(a(x),2),ct=a(f,!0);r(f),r(x),r(v),k(He=>o(ct,He),[()=>(t(e),i(()=>le(t(e).extra_specs)))]),p(c,v)};g(qt,c=>{t(e),i(()=>t(e).extra_specs)&&c(Ge)})}var Le=d(qt,2);{var Oe=c=>{ra(c,{get instances(){return t(e),i(()=>t(e).instances)},entityType:"scaleset",onDeleteInstance:ne})};g(Le,c=>{t(e),i(()=>t(e).instances)&&c(Oe)})}k((c,v,x,f,ct)=>{o(be,(t(e),i(()=>t(e).id))),o(ke,(t(e),i(()=>t(e).name))),o(Se,(t(e),i(()=>t(e).provider_name))),o(we,(t(e),i(()=>t(e).image))),o($e,(t(e),i(()=>t(e).flavor))),Ze(tt,1,`inline-flex px-2 py-1 text-xs font-medium rounded-full ${t(e),i(()=>t(e).enabled?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200")??""}`),o(Ie,(t(e),i(()=>t(e).enabled?"Enabled":"Disabled"))),o(De,c),Vt(rt,"href",v),o(Ee,x),o(Me,f),o(Ae,ct),o(Ne,(t(e),i(()=>t(e).max_runners))),o(Te,(t(e),i(()=>t(e).min_idle_runners))),o(Ue,`${t(e),i(()=>t(e).runner_bootstrap_timeout)??""} minutes`),o(Be,(t(e),i(()=>t(e).runner_prefix||"garm"))),o(Re,`${t(e),i(()=>t(e).os_type)??""} / ${t(e),i(()=>t(e).os_arch)??""}`)},[()=>(m(C),t(e),i(()=>C(t(e)))),()=>(m(Yt),t(e),i(()=>Yt(t(e)))),()=>(m(S),t(e),i(()=>S(t(e)))),()=>(m(G),t(e),i(()=>G(t(e).created_at||""))),()=>(m(G),t(e),i(()=>G(t(e).updated_at||"")))]),p(q,bt)};g(T,q=>{t(e)&&q(j)},!0)}p(h,b)};g(y,h=>{t(D)?h(P):h(he,!1)},!0)}p(s,n)};g(ue,s=>{t(L)?s(xe):s(ge,!1)})}r(O);var yt=d(O,2);{var fe=s=>{ea(s,{get scaleSet(){return t(e)},$$events:{close:()=>l(E,!1),submit:n=>se(n.detail)}})};g(yt,s=>{t(E)&&t(e)&&s(fe)})}var ht=d(yt,2);{var pe=s=>{{let n=$(()=>(t(e),m(S),i(()=>`Scale Set ${t(e).name} (${S(t(e))})`)));Kt(s,{title:"Delete Scale Set",message:"Are you sure you want to delete this scale set? This action cannot be undone and will remove all associated runners.",get itemName(){return t(n)},$$events:{close:()=>l(M,!1),confirm:de}})}};g(ht,s=>{t(M)&&t(e)&&s(pe)})}var _e=d(ht,2);{var ye=s=>{Kt(s,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return t(u),i(()=>t(u).name)},$$events:{close:()=>{l(A,!1),l(u,null)},confirm:ie}})};g(_e,s=>{t(A)&&t(u)&&s(ye)})}k(s=>{Vt(ve,"href",s),o(me,(t(e),i(()=>t(e)?t(e).name:"Loading...")))},[()=>(m(B),i(()=>B("/scalesets")))]),p(te,xt),Ke(),re()}export{wa as component}; diff --git a/webapp/assets/_app/immutable/nodes/2.Bp-DXhN-.js b/webapp/assets/_app/immutable/nodes/2.Bp-DXhN-.js new file mode 100644 index 00000000..657b364d --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/2.Bp-DXhN-.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as Fe}from"../chunks/zNh6Oe5P.js";import{f as h,k as a,j as r,r as t,t as D,v as S,c as m,B as He,b as ze,p as Oe,E as vt,l as Le,s as v,m as I,g as e,a as Ne,C as ut,z as ve,n as _,u,d as Qe,e as Ge,o as mt,A as gt,h as bt,$ as pt,y as Q}from"../chunks/sWNKMed7.js";import{p as fe,i as z,s as ft,a as xt}from"../chunks/Ccl3fNd2.js";import{e as ht,w as Me,i as kt}from"../chunks/BuuPrWMc.js";import{s as xe,B as yt,r as Ue,g as Ke,d as P,c as ue}from"../chunks/t8NOL8UT.js";import{e as _t,a as Ce}from"../chunks/UPGsoYWO.js";import{b as Re}from"../chunks/CLagxtgo.js";import{p as wt}from"../chunks/D4Caz1gY.js";import{M as Mt}from"../chunks/-99ewtnX.js";import{t as Je}from"../chunks/BZUCTtPY.js";import{e as Ut}from"../chunks/BZiHL9L3.js";var Ct=h('
'),Rt=h('
'),zt=h('
'),Lt=h('
'),St=h('
');function pe(me,V){let f=fe(V,"title",8),re=fe(V,"content",8),s=fe(V,"position",8,"top"),ae=fe(V,"width",8,"w-80");var l=St(),k=a(r(l),2),p=r(k),y=r(p,!0);t(p);var d=a(p,2),L=r(d,!0);t(d);var oe=a(d,2);{var ge=E=>{var q=Ct();m(E,q)},se=E=>{var q=He(),J=ze(q);{var F=j=>{var T=Rt();m(j,T)},K=j=>{var T=He(),ie=ze(T);{var le=$=>{var H=zt();m($,H)},ne=$=>{var H=He(),X=ze(H);{var de=i=>{var o=Lt();m(i,o)};z(X,i=>{s()==="right"&&i(de)},!0)}m($,H)};z(ie,$=>{s()==="left"?$(le):$(ne,!1)},!0)}m(j,T)};z(J,j=>{s()==="bottom"?j(F):j(K,!1)},!0)}m(E,q)};z(oe,E=>{s()==="top"?E(ge):E(se,!1)})}t(k),t(l),D(()=>{xe(k,1,`absolute ${s()==="top"?"bottom-full":s()==="bottom"?"top-full":s()==="left"?"right-full top-1/2 -translate-y-1/2":"left-full top-1/2 -translate-y-1/2"} left-1/2 transform -translate-x-1/2 ${s()==="top"?"mb-2":s()==="bottom"?"mt-2":"mx-2"} ${ae()??""} p-3 bg-gray-900 text-white text-xs rounded-lg shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`),S(y,f()),S(L,re())}),m(me,l)}var jt=ut(' Settings',1),$t=h('
Metadata
'),Bt=h('
Callback
'),At=h('
Webhook
'),It=h('

No URLs configured

'),Et=h('
Controller Webhook URL

Use this URL in your GitHub organization/repository webhook settings

'),Ht=h('

Please enter a valid URL

'),Gt=h('

Please enter a valid URL

'),Pt=h('

Please enter a valid URL

'),qt=h('

Controller Settings

URL where runners can fetch metadata and setup information

URL where runners send status updates and lifecycle events

URL where GitHub/Gitea will send webhook events for job notifications

Time to wait before spinning up a runner for a new job (0 = immediate)

'),Tt=h('

Controller Information

Identity

Controller ID
Hostname
Job Age Backoff

Integration URLs

',1);function Dt(me,V){Oe(V,!1);const f=I(),re=I();let s=fe(V,"controllerInfo",12);const ae=vt();let l=I(!1),k=I(!1),p=I(""),y=I(""),d=I(""),L=I(null);function oe(){v(p,s().metadata_url||""),v(y,s().callback_url||""),v(d,s().webhook_url||""),v(L,s().minimum_job_age_backoff||null),v(l,!0)}async function ge(){try{v(k,!0);const n={};e(p).trim()&&(n.metadata_url=e(p).trim()),e(y).trim()&&(n.callback_url=e(y).trim()),e(d).trim()&&(n.webhook_url=e(d).trim()),e(L)!==null&&e(L)>=0&&(n.minimum_job_age_backoff=e(L));const c=await Ke.updateController(n);Je.success("Settings Updated","Controller settings have been updated successfully."),v(l,!1),s(c),ae("updated",c)}catch(n){Je.error("Update Failed",n instanceof Error?n.message:"Failed to update controller settings")}finally{v(k,!1)}}function se(){v(l,!1),v(p,""),v(y,""),v(d,""),v(L,null)}Le(()=>{},()=>{v(f,n=>{if(!n.trim())return!0;try{return new URL(n),!0}catch{return!1}})}),Le(()=>(e(f),e(p),e(y),e(d),e(L)),()=>{v(re,e(f)(e(p))&&e(f)(e(y))&&e(f)(e(d))&&(e(L)===null||e(L)>=0))}),Ne(),Fe();var E=Tt(),q=ze(E),J=r(q),F=r(J),K=r(F),j=a(r(K),2),T=a(r(j),2),ie=r(T),le=r(ie);t(ie),t(T),t(j),t(K);var ne=a(K,2);yt(ne,{variant:"secondary",size:"sm",$$events:{click:oe},children:(n,c)=>{var b=jt();ve(),m(n,b)},$$slots:{default:!0}}),t(F);var $=a(F,2),H=r($),X=r(H),de=a(r(X),2),i=r(de),o=a(r(i),2),w=r(o,!0);t(o),t(i);var M=a(i,2),x=a(r(M),2),U=r(x,!0);t(x),t(M);var A=a(M,2),W=r(A),Y=a(r(W),2),Z=r(Y);pe(Z,{title:"Job Age Backoff",content:"Time in seconds GARM waits after receiving a new job before spinning up a runner. This delay allows existing idle runners to pick up jobs first, preventing unnecessary runner creation. Set to 0 for immediate response."}),t(Y),t(W);var O=a(W,2),N=r(O);t(O),t(A),t(de),t(X),t(H);var ee=a(H,2),ce=r(ee),he=a(r(ce),2),ke=r(he);{var Se=n=>{var c=$t(),b=r(c),C=a(r(b),2),G=r(C);pe(G,{title:"Metadata URL",content:"URL where runners retrieve setup information and metadata. Runners must be able to connect to this URL during their initialization process. Usually accessible at /api/v1/metadata endpoint."}),t(C),t(b);var R=a(b,2),B=r(R,!0);t(R),t(c),D(()=>S(B,(_(s()),u(()=>s().metadata_url)))),m(n,c)};z(ke,n=>{_(s()),u(()=>s().metadata_url)&&n(Se)})}var Pe=a(ke,2);{var Xe=n=>{var c=Bt(),b=r(c),C=a(r(b),2),G=r(C);pe(G,{title:"Callback URL",content:"URL where runners send status updates and system information (OS version, runner agent ID, etc.) to the controller. Runners must be able to connect to this URL. Usually accessible at /api/v1/callbacks endpoint."}),t(C),t(b);var R=a(b,2),B=r(R,!0);t(R),t(c),D(()=>S(B,(_(s()),u(()=>s().callback_url)))),m(n,c)};z(Pe,n=>{_(s()),u(()=>s().callback_url)&&n(Xe)})}var qe=a(Pe,2);{var Ye=n=>{var c=At(),b=r(c),C=a(r(b),2),G=r(C);pe(G,{title:"Webhook Base URL",content:"Base URL for webhooks where GitHub sends job notifications. GARM needs to receive these webhooks to know when to create new runners for jobs. GitHub must be able to connect to this URL. Usually accessible at /webhooks endpoint."}),t(C),t(b);var R=a(b,2),B=r(R,!0);t(R),t(c),D(()=>S(B,(_(s()),u(()=>s().webhook_url)))),m(n,c)};z(qe,n=>{_(s()),u(()=>s().webhook_url)&&n(Ye)})}var Ze=a(qe,2);{var et=n=>{var c=It(),b=a(r(c),4);t(c),Ge("click",b,oe),m(n,c)};z(Ze,n=>{_(s()),u(()=>!s().metadata_url&&!s().callback_url&&!s().webhook_url)&&n(et)})}t(he),t(ce),t(ee),t($);var tt=a($,2);{var rt=n=>{var c=Et(),b=r(c),C=a(r(b),2),G=r(C);pe(G,{title:"Controller Webhook URL",content:"Unique webhook URL for this GARM controller. This is the preferred URL to use in GitHub webhook settings as it's controller-specific and allows multiple GARM controllers to work with the same repository. Automatically combines the webhook base URL with the controller ID."}),t(C),t(b);var R=a(b,2),B=r(R),be=a(r(B),2),ye=r(be),je=r(ye,!0);t(ye),ve(2),t(be),t(B),t(R),t(c),D(()=>S(je,(_(s()),u(()=>s().controller_webhook_url)))),m(n,c)};z(tt,n=>{_(s()),u(()=>s().controller_webhook_url)&&n(rt)})}t(J),t(q);var at=a(q,2);{var ot=n=>{Mt(n,{$$events:{close:se},children:(c,b)=>{var C=qt(),G=a(r(C),2),R=r(G),B=a(r(R),2);Ue(B);let be;var ye=a(B,2);{var je=g=>{var te=Ht();m(g,te)};z(ye,g=>{e(f),e(p),u(()=>!e(f)(e(p)))&&g(je)})}ve(2),t(R);var $e=a(R,2),_e=a(r($e),2);Ue(_e);let Te;var st=a(_e,2);{var it=g=>{var te=Gt();m(g,te)};z(st,g=>{e(f),e(y),u(()=>!e(f)(e(y)))&&g(it)})}ve(2),t($e);var Be=a($e,2),we=a(r(Be),2);Ue(we);let De;var lt=a(we,2);{var nt=g=>{var te=Pt();m(g,te)};z(lt,g=>{e(f),e(d),u(()=>!e(f)(e(d)))&&g(nt)})}ve(2),t(Be);var Ae=a(Be,2),Ve=a(r(Ae),2);Ue(Ve),ve(2),t(Ae);var We=a(Ae,2),Ie=r(We),Ee=a(Ie,2),dt=r(Ee,!0);t(Ee),t(We),t(G),t(C),D((g,te,ct)=>{be=xe(B,1,"block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white sm:text-sm",null,be,g),Te=xe(_e,1,"block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white sm:text-sm",null,Te,te),De=xe(we,1,"block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white sm:text-sm",null,De,ct),Ie.disabled=e(k),Ee.disabled=!e(re)||e(k),S(dt,e(k)?"Saving...":"Save Changes")},[()=>({"border-red-300":!e(f)(e(p))}),()=>({"border-red-300":!e(f)(e(y))}),()=>({"border-red-300":!e(f)(e(d))})]),Re(B,()=>e(p),g=>v(p,g)),Re(_e,()=>e(y),g=>v(y,g)),Re(we,()=>e(d),g=>v(d,g)),Re(Ve,()=>e(L),g=>v(L,g)),Ge("click",Ie,se),Ge("submit",G,wt(ge)),m(c,C)},$$slots:{default:!0}})};z(at,n=>{e(l)&&n(ot)})}D(n=>{S(le,`v${n??""}`),S(w,(_(s()),u(()=>s().controller_id))),S(U,(_(s()),u(()=>s().hostname||"Unknown"))),S(N,`${_(s()),u(()=>s().minimum_job_age_backoff||30)??""}s`)},[()=>(_(s()),u(()=>s().version?.replace(/^v/,"")||"Unknown"))]),m(me,E),Qe()}var Vt=h('

Error loading dashboard

'),Wt=h('
'),Jt=h('

Dashboard

Welcome to GARM - GitHub Actions Runner Manager

');function or(me,V){Oe(V,!1);const[f,re]=ft(),s=()=>xt(_t,"$eagerCache",f),ae=I();let l=I({repositories:0,organizations:0,pools:0,instances:0}),k=I(null),p=I(""),y=[];function d(i,o,w=1e3){const M=parseInt(i.textContent||"0"),x=(o-M)/(w/16);let U=M;const A=()=>{if(U+=x,x>0&&U>=o||x<0&&U<=o){i.textContent=o.toString();return}i.textContent=Math.floor(U).toString(),requestAnimationFrame(A)};M!==o&&requestAnimationFrame(A)}mt(async()=>{try{const[x,U,A,W,Y]=await Promise.all([Ce.getRepositories(),Ce.getOrganizations(),Ce.getPools(),Ke.listInstances(),Ce.getControllerInfo()]);setTimeout(()=>{const Z=document.querySelector('[data-stat="repositories"]'),O=document.querySelector('[data-stat="organizations"]'),N=document.querySelector('[data-stat="pools"]'),ee=document.querySelector('[data-stat="instances"]');Z&&d(Z,x.length),O&&d(O,U.length),N&&d(N,A.length),ee&&d(ee,W.length)},100),v(l,{repositories:x.length,organizations:U.length,pools:A.length,instances:W.length}),Y&&v(k,Y)}catch(x){v(p,Ut(x)),console.error("Dashboard error:",x)}const i=Me.subscribeToEntity("repository",["create","delete"],L),o=Me.subscribeToEntity("organization",["create","delete"],oe),w=Me.subscribeToEntity("pool",["create","delete"],ge),M=Me.subscribeToEntity("instance",["create","delete"],se);y=[i,o,w,M]}),gt(()=>{y.forEach(i=>i())});function L(i){const o=document.querySelector('[data-stat="repositories"]');i.operation==="create"?(Q(l,e(l).repositories++),o&&d(o,e(l).repositories,500)):i.operation==="delete"&&(Q(l,e(l).repositories=Math.max(0,e(l).repositories-1)),o&&d(o,e(l).repositories,500))}function oe(i){const o=document.querySelector('[data-stat="organizations"]');i.operation==="create"?(Q(l,e(l).organizations++),o&&d(o,e(l).organizations,500)):i.operation==="delete"&&(Q(l,e(l).organizations=Math.max(0,e(l).organizations-1)),o&&d(o,e(l).organizations,500))}function ge(i){const o=document.querySelector('[data-stat="pools"]');i.operation==="create"?(Q(l,e(l).pools++),o&&d(o,e(l).pools,500)):i.operation==="delete"&&(Q(l,e(l).pools=Math.max(0,e(l).pools-1)),o&&d(o,e(l).pools,500))}function se(i){const o=document.querySelector('[data-stat="instances"]');i.operation==="create"?(Q(l,e(l).instances++),o&&d(o,e(l).instances,500)):i.operation==="delete"&&(Q(l,e(l).instances=Math.max(0,e(l).instances-1)),o&&d(o,e(l).instances,500))}function E(i){v(k,i.detail)}function q(i){return{blue:"bg-blue-500 text-white",green:"bg-green-500 text-white",purple:"bg-purple-500 text-white",yellow:"bg-yellow-500 text-white"}[i]||"bg-gray-500 text-white"}Le(()=>(e(k),s()),()=>{(!e(k)||s().loaded.controllerInfo)&&v(k,s().controllerInfo)}),Le(()=>(e(l),P),()=>{v(ae,[{title:"Repositories",value:e(l).repositories,icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",color:"blue",href:P("/repositories")},{title:"Organizations",value:e(l).organizations,icon:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",color:"green",href:P("/organizations")},{title:"Pools",value:e(l).pools,icon:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",color:"purple",href:P("/pools")},{title:"Instances",value:e(l).instances,icon:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z",color:"yellow",href:P("/instances")}])}),Ne(),Fe();var J=Jt();bt(i=>{pt.title="Dashboard - GARM"});var F=a(r(J),2);{var K=i=>{var o=Vt(),w=r(o),M=a(r(w),2),x=a(r(M),2),U=r(x,!0);t(x),t(M),t(w),t(o),D(()=>S(U,e(p))),m(i,o)};z(F,i=>{e(p)&&i(K)})}var j=a(F,2);ht(j,5,()=>e(ae),kt,(i,o)=>{var w=Wt(),M=r(w),x=r(M),U=r(x),A=r(U),W=r(A),Y=r(W);t(W),t(A),t(U);var Z=a(U,2),O=r(Z),N=r(O),ee=r(N,!0);t(N);var ce=a(N,2),he=r(ce,!0);t(ce),t(O),t(Z),t(x),t(M),t(w),D((ke,Se)=>{ue(w,"href",(e(o),u(()=>e(o).href))),xe(A,1,`w-8 h-8 rounded-md ${ke??""} flex items-center justify-center`),ue(Y,"d",(e(o),u(()=>e(o).icon))),S(ee,(e(o),u(()=>e(o).title))),ue(ce,"data-stat",Se),S(he,(e(o),u(()=>e(o).value)))},[()=>(e(o),u(()=>q(e(o).color))),()=>(e(o),u(()=>e(o).title.toLowerCase()))]),m(i,w)}),t(j);var T=a(j,2);{var ie=i=>{Dt(i,{get controllerInfo(){return e(k)},$$events:{updated:E}})};z(T,i=>{e(k)&&i(ie)})}var le=a(T,2),ne=r(le),$=a(r(ne),4),H=r($),X=a(H,2),de=a(X,2);t($),t(ne),t(le),t(J),D((i,o,w)=>{ue(H,"href",i),ue(X,"href",o),ue(de,"href",w)},[()=>(_(P),u(()=>P("/repositories"))),()=>(_(P),u(()=>P("/pools"))),()=>(_(P),u(()=>P("/instances")))]),m(me,J),Qe(),re()}export{or as component}; diff --git a/webapp/assets/_app/immutable/nodes/2.C5UFHsji.js b/webapp/assets/_app/immutable/nodes/2.C5UFHsji.js deleted file mode 100644 index 0ad7e25c..00000000 --- a/webapp/assets/_app/immutable/nodes/2.C5UFHsji.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Fe}from"../chunks/B3Pzt0F_.js";import{f as h,k as a,j as r,r as t,t as T,v as z,c as m,B as He,b as ze,p as Oe,E as vt,l as Le,s as v,m as I,g as e,a as Ne,C as ut,z as ve,n as B,u,d as Qe,e as Ge,o as mt,A as gt,h as bt,$ as pt,y as N}from"../chunks/D8EpLgQ1.js";import{p as fe,i as C,s as ft,a as xt}from"../chunks/5WA7h8uK.js";import{e as ht,w as Me,i as kt}from"../chunks/u94nIB4-.js";import{s as xe,B as yt,r as Ue,g as Ke,c as ue}from"../chunks/CiE1LlKV.js";import{b as Q}from"../chunks/D3_ugSUS.js";import{e as _t,a as Ce}from"../chunks/wyaP0EDu.js";import{b as Re}from"../chunks/C6k1Q4We.js";import{p as wt}from"../chunks/D4Caz1gY.js";import{M as Mt}from"../chunks/qB7B8uiS.js";import{t as Je}from"../chunks/BEkVdVE1.js";import{e as Ut}from"../chunks/BZiHL9L3.js";var Ct=h('
'),Rt=h('
'),zt=h('
'),Lt=h('
'),$t=h('
');function pe(me,D){let f=fe(D,"title",8),re=fe(D,"content",8),s=fe(D,"position",8,"top"),ae=fe(D,"width",8,"w-80");var i=$t(),k=a(r(i),2),p=r(k),y=r(p,!0);t(p);var d=a(p,2),R=r(d,!0);t(d);var oe=a(d,2);{var ge=E=>{var P=Ct();m(E,P)},se=E=>{var P=He(),W=ze(P);{var J=L=>{var q=Rt();m(L,q)},K=L=>{var q=He(),ie=ze(q);{var le=$=>{var H=zt();m($,H)},ne=$=>{var H=He(),X=ze(H);{var de=l=>{var o=Lt();m(l,o)};C(X,l=>{s()==="right"&&l(de)},!0)}m($,H)};C(ie,$=>{s()==="left"?$(le):$(ne,!1)},!0)}m(L,q)};C(W,L=>{s()==="bottom"?L(J):L(K,!1)},!0)}m(E,P)};C(oe,E=>{s()==="top"?E(ge):E(se,!1)})}t(k),t(i),T(()=>{xe(k,1,`absolute ${s()==="top"?"bottom-full":s()==="bottom"?"top-full":s()==="left"?"right-full top-1/2 -translate-y-1/2":"left-full top-1/2 -translate-y-1/2"} left-1/2 transform -translate-x-1/2 ${s()==="top"?"mb-2":s()==="bottom"?"mt-2":"mx-2"} ${ae()??""} p-3 bg-gray-900 text-white text-xs rounded-lg shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`),z(y,f()),z(R,re())}),m(me,i)}var St=ut(' Settings',1),jt=h('
Metadata
'),Bt=h('
Callback
'),At=h('
Webhook
'),It=h('

No URLs configured

'),Et=h('
Controller Webhook URL

Use this URL in your GitHub organization/repository webhook settings

'),Ht=h('

Please enter a valid URL

'),Gt=h('

Please enter a valid URL

'),Pt=h('

Please enter a valid URL

'),qt=h('

Controller Settings

URL where runners can fetch metadata and setup information

URL where runners send status updates and lifecycle events

URL where GitHub/Gitea will send webhook events for job notifications

Time to wait before spinning up a runner for a new job (0 = immediate)

'),Tt=h('

Controller Information

Identity

Controller ID
Hostname
Job Age Backoff

Integration URLs

',1);function Dt(me,D){Oe(D,!1);const f=I(),re=I();let s=fe(D,"controllerInfo",12);const ae=vt();let i=I(!1),k=I(!1),p=I(""),y=I(""),d=I(""),R=I(null);function oe(){v(p,s().metadata_url||""),v(y,s().callback_url||""),v(d,s().webhook_url||""),v(R,s().minimum_job_age_backoff||null),v(i,!0)}async function ge(){try{v(k,!0);const n={};e(p).trim()&&(n.metadata_url=e(p).trim()),e(y).trim()&&(n.callback_url=e(y).trim()),e(d).trim()&&(n.webhook_url=e(d).trim()),e(R)!==null&&e(R)>=0&&(n.minimum_job_age_backoff=e(R));const c=await Ke.updateController(n);Je.success("Settings Updated","Controller settings have been updated successfully."),v(i,!1),s(c),ae("updated",c)}catch(n){Je.error("Update Failed",n instanceof Error?n.message:"Failed to update controller settings")}finally{v(k,!1)}}function se(){v(i,!1),v(p,""),v(y,""),v(d,""),v(R,null)}Le(()=>{},()=>{v(f,n=>{if(!n.trim())return!0;try{return new URL(n),!0}catch{return!1}})}),Le(()=>(e(f),e(p),e(y),e(d),e(R)),()=>{v(re,e(f)(e(p))&&e(f)(e(y))&&e(f)(e(d))&&(e(R)===null||e(R)>=0))}),Ne(),Fe();var E=Tt(),P=ze(E),W=r(P),J=r(W),K=r(J),L=a(r(K),2),q=a(r(L),2),ie=r(q),le=r(ie);t(ie),t(q),t(L),t(K);var ne=a(K,2);yt(ne,{variant:"secondary",size:"sm",$$events:{click:oe},children:(n,c)=>{var b=St();ve(),m(n,b)},$$slots:{default:!0}}),t(J);var $=a(J,2),H=r($),X=r(H),de=a(r(X),2),l=r(de),o=a(r(l),2),S=r(o,!0);t(o),t(l);var _=a(l,2),x=a(r(_),2),w=r(x,!0);t(x),t(_);var A=a(_,2),V=r(A),Y=a(r(V),2),Z=r(Y);pe(Z,{title:"Job Age Backoff",content:"Time in seconds GARM waits after receiving a new job before spinning up a runner. This delay allows existing idle runners to pick up jobs first, preventing unnecessary runner creation. Set to 0 for immediate response."}),t(Y),t(V);var F=a(V,2),O=r(F);t(F),t(A),t(de),t(X),t(H);var ee=a(H,2),ce=r(ee),he=a(r(ce),2),ke=r(he);{var $e=n=>{var c=jt(),b=r(c),M=a(r(b),2),G=r(M);pe(G,{title:"Metadata URL",content:"URL where runners retrieve setup information and metadata. Runners must be able to connect to this URL during their initialization process. Usually accessible at /api/v1/metadata endpoint."}),t(M),t(b);var U=a(b,2),j=r(U,!0);t(U),t(c),T(()=>z(j,(B(s()),u(()=>s().metadata_url)))),m(n,c)};C(ke,n=>{B(s()),u(()=>s().metadata_url)&&n($e)})}var Pe=a(ke,2);{var Xe=n=>{var c=Bt(),b=r(c),M=a(r(b),2),G=r(M);pe(G,{title:"Callback URL",content:"URL where runners send status updates and system information (OS version, runner agent ID, etc.) to the controller. Runners must be able to connect to this URL. Usually accessible at /api/v1/callbacks endpoint."}),t(M),t(b);var U=a(b,2),j=r(U,!0);t(U),t(c),T(()=>z(j,(B(s()),u(()=>s().callback_url)))),m(n,c)};C(Pe,n=>{B(s()),u(()=>s().callback_url)&&n(Xe)})}var qe=a(Pe,2);{var Ye=n=>{var c=At(),b=r(c),M=a(r(b),2),G=r(M);pe(G,{title:"Webhook Base URL",content:"Base URL for webhooks where GitHub sends job notifications. GARM needs to receive these webhooks to know when to create new runners for jobs. GitHub must be able to connect to this URL. Usually accessible at /webhooks endpoint."}),t(M),t(b);var U=a(b,2),j=r(U,!0);t(U),t(c),T(()=>z(j,(B(s()),u(()=>s().webhook_url)))),m(n,c)};C(qe,n=>{B(s()),u(()=>s().webhook_url)&&n(Ye)})}var Ze=a(qe,2);{var et=n=>{var c=It(),b=a(r(c),4);t(c),Ge("click",b,oe),m(n,c)};C(Ze,n=>{B(s()),u(()=>!s().metadata_url&&!s().callback_url&&!s().webhook_url)&&n(et)})}t(he),t(ce),t(ee),t($);var tt=a($,2);{var rt=n=>{var c=Et(),b=r(c),M=a(r(b),2),G=r(M);pe(G,{title:"Controller Webhook URL",content:"Unique webhook URL for this GARM controller. This is the preferred URL to use in GitHub webhook settings as it's controller-specific and allows multiple GARM controllers to work with the same repository. Automatically combines the webhook base URL with the controller ID."}),t(M),t(b);var U=a(b,2),j=r(U),be=a(r(j),2),ye=r(be),Se=r(ye,!0);t(ye),ve(2),t(be),t(j),t(U),t(c),T(()=>z(Se,(B(s()),u(()=>s().controller_webhook_url)))),m(n,c)};C(tt,n=>{B(s()),u(()=>s().controller_webhook_url)&&n(rt)})}t(W),t(P);var at=a(P,2);{var ot=n=>{Mt(n,{$$events:{close:se},children:(c,b)=>{var M=qt(),G=a(r(M),2),U=r(G),j=a(r(U),2);Ue(j);let be;var ye=a(j,2);{var Se=g=>{var te=Ht();m(g,te)};C(ye,g=>{e(f),e(p),u(()=>!e(f)(e(p)))&&g(Se)})}ve(2),t(U);var je=a(U,2),_e=a(r(je),2);Ue(_e);let Te;var st=a(_e,2);{var it=g=>{var te=Gt();m(g,te)};C(st,g=>{e(f),e(y),u(()=>!e(f)(e(y)))&&g(it)})}ve(2),t(je);var Be=a(je,2),we=a(r(Be),2);Ue(we);let De;var lt=a(we,2);{var nt=g=>{var te=Pt();m(g,te)};C(lt,g=>{e(f),e(d),u(()=>!e(f)(e(d)))&&g(nt)})}ve(2),t(Be);var Ae=a(Be,2),Ve=a(r(Ae),2);Ue(Ve),ve(2),t(Ae);var We=a(Ae,2),Ie=r(We),Ee=a(Ie,2),dt=r(Ee,!0);t(Ee),t(We),t(G),t(M),T((g,te,ct)=>{be=xe(j,1,"block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white sm:text-sm",null,be,g),Te=xe(_e,1,"block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white sm:text-sm",null,Te,te),De=xe(we,1,"block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white sm:text-sm",null,De,ct),Ie.disabled=e(k),Ee.disabled=!e(re)||e(k),z(dt,e(k)?"Saving...":"Save Changes")},[()=>({"border-red-300":!e(f)(e(p))}),()=>({"border-red-300":!e(f)(e(y))}),()=>({"border-red-300":!e(f)(e(d))})]),Re(j,()=>e(p),g=>v(p,g)),Re(_e,()=>e(y),g=>v(y,g)),Re(we,()=>e(d),g=>v(d,g)),Re(Ve,()=>e(R),g=>v(R,g)),Ge("click",Ie,se),Ge("submit",G,wt(ge)),m(c,M)},$$slots:{default:!0}})};C(at,n=>{e(i)&&n(ot)})}T(n=>{z(le,`v${n??""}`),z(S,(B(s()),u(()=>s().controller_id))),z(w,(B(s()),u(()=>s().hostname||"Unknown"))),z(O,`${B(s()),u(()=>s().minimum_job_age_backoff||30)??""}s`)},[()=>(B(s()),u(()=>s().version?.replace(/^v/,"")||"Unknown"))]),m(me,E),Qe()}var Vt=h('

Error loading dashboard

'),Wt=h('
'),Jt=h('

Dashboard

Welcome to GARM - GitHub Actions Runner Manager

');function sr(me,D){Oe(D,!1);const[f,re]=ft(),s=()=>xt(_t,"$eagerCache",f),ae=I();let i=I({repositories:0,organizations:0,pools:0,instances:0}),k=I(null),p=I(""),y=[];function d(l,o,S=1e3){const _=parseInt(l.textContent||"0"),x=(o-_)/(S/16);let w=_;const A=()=>{if(w+=x,x>0&&w>=o||x<0&&w<=o){l.textContent=o.toString();return}l.textContent=Math.floor(w).toString(),requestAnimationFrame(A)};_!==o&&requestAnimationFrame(A)}mt(async()=>{try{const[x,w,A,V,Y]=await Promise.all([Ce.getRepositories(),Ce.getOrganizations(),Ce.getPools(),Ke.listInstances(),Ce.getControllerInfo()]);setTimeout(()=>{const Z=document.querySelector('[data-stat="repositories"]'),F=document.querySelector('[data-stat="organizations"]'),O=document.querySelector('[data-stat="pools"]'),ee=document.querySelector('[data-stat="instances"]');Z&&d(Z,x.length),F&&d(F,w.length),O&&d(O,A.length),ee&&d(ee,V.length)},100),v(i,{repositories:x.length,organizations:w.length,pools:A.length,instances:V.length}),Y&&v(k,Y)}catch(x){v(p,Ut(x)),console.error("Dashboard error:",x)}const l=Me.subscribeToEntity("repository",["create","delete"],R),o=Me.subscribeToEntity("organization",["create","delete"],oe),S=Me.subscribeToEntity("pool",["create","delete"],ge),_=Me.subscribeToEntity("instance",["create","delete"],se);y=[l,o,S,_]}),gt(()=>{y.forEach(l=>l())});function R(l){const o=document.querySelector('[data-stat="repositories"]');l.operation==="create"?(N(i,e(i).repositories++),o&&d(o,e(i).repositories,500)):l.operation==="delete"&&(N(i,e(i).repositories=Math.max(0,e(i).repositories-1)),o&&d(o,e(i).repositories,500))}function oe(l){const o=document.querySelector('[data-stat="organizations"]');l.operation==="create"?(N(i,e(i).organizations++),o&&d(o,e(i).organizations,500)):l.operation==="delete"&&(N(i,e(i).organizations=Math.max(0,e(i).organizations-1)),o&&d(o,e(i).organizations,500))}function ge(l){const o=document.querySelector('[data-stat="pools"]');l.operation==="create"?(N(i,e(i).pools++),o&&d(o,e(i).pools,500)):l.operation==="delete"&&(N(i,e(i).pools=Math.max(0,e(i).pools-1)),o&&d(o,e(i).pools,500))}function se(l){const o=document.querySelector('[data-stat="instances"]');l.operation==="create"?(N(i,e(i).instances++),o&&d(o,e(i).instances,500)):l.operation==="delete"&&(N(i,e(i).instances=Math.max(0,e(i).instances-1)),o&&d(o,e(i).instances,500))}function E(l){v(k,l.detail)}function P(l){return{blue:"bg-blue-500 text-white",green:"bg-green-500 text-white",purple:"bg-purple-500 text-white",yellow:"bg-yellow-500 text-white"}[l]||"bg-gray-500 text-white"}Le(()=>(e(k),s()),()=>{(!e(k)||s().loaded.controllerInfo)&&v(k,s().controllerInfo)}),Le(()=>(e(i),Q),()=>{v(ae,[{title:"Repositories",value:e(i).repositories,icon:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",color:"blue",href:`${Q}/repositories`},{title:"Organizations",value:e(i).organizations,icon:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",color:"green",href:`${Q}/organizations`},{title:"Pools",value:e(i).pools,icon:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",color:"purple",href:`${Q}/pools`},{title:"Instances",value:e(i).instances,icon:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z",color:"yellow",href:`${Q}/instances`}])}),Ne(),Fe();var W=Jt();bt(l=>{pt.title="Dashboard - GARM"});var J=a(r(W),2);{var K=l=>{var o=Vt(),S=r(o),_=a(r(S),2),x=a(r(_),2),w=r(x,!0);t(x),t(_),t(S),t(o),T(()=>z(w,e(p))),m(l,o)};C(J,l=>{e(p)&&l(K)})}var L=a(J,2);ht(L,5,()=>e(ae),kt,(l,o)=>{var S=Wt(),_=r(S),x=r(_),w=r(x),A=r(w),V=r(A),Y=r(V);t(V),t(A),t(w);var Z=a(w,2),F=r(Z),O=r(F),ee=r(O,!0);t(O);var ce=a(O,2),he=r(ce,!0);t(ce),t(F),t(Z),t(x),t(_),t(S),T((ke,$e)=>{ue(S,"href",(e(o),u(()=>e(o).href))),xe(A,1,`w-8 h-8 rounded-md ${ke??""} flex items-center justify-center`),ue(Y,"d",(e(o),u(()=>e(o).icon))),z(ee,(e(o),u(()=>e(o).title))),ue(ce,"data-stat",$e),z(he,(e(o),u(()=>e(o).value)))},[()=>(e(o),u(()=>P(e(o).color))),()=>(e(o),u(()=>e(o).title.toLowerCase()))]),m(l,S)}),t(L);var q=a(L,2);{var ie=l=>{Dt(l,{get controllerInfo(){return e(k)},$$events:{updated:E}})};C(q,l=>{e(k)&&l(ie)})}var le=a(q,2),ne=r(le),$=a(r(ne),4),H=r($),X=a(H,2),de=a(X,2);t($),t(ne),t(le),t(W),T(()=>{ue(H,"href",`${Q??""}/repositories`),ue(X,"href",`${Q??""}/pools`),ue(de,"href",`${Q??""}/instances`)}),m(me,W),Qe(),re()}export{sr as component}; diff --git a/webapp/assets/_app/immutable/nodes/3.CptFbYi9.js b/webapp/assets/_app/immutable/nodes/3.D-NNlPQY.js similarity index 96% rename from webapp/assets/_app/immutable/nodes/3.CptFbYi9.js rename to webapp/assets/_app/immutable/nodes/3.D-NNlPQY.js index e7d03422..adaff433 100644 --- a/webapp/assets/_app/immutable/nodes/3.CptFbYi9.js +++ b/webapp/assets/_app/immutable/nodes/3.D-NNlPQY.js @@ -1,4 +1,4 @@ -import"../chunks/DsnmJJEf.js";import{i as jt}from"../chunks/B3Pzt0F_.js";import{p as Gt,g as e,o as Ut,l as Q,a as qt,f as E,e as f,h as zt,b as Fe,c as $,d as Bt,$ as St,m as y,s as n,i as Lt,j as o,k as a,r as i,u,n as be,q as Le,t as se,v as W,w as rt,x as Nt,y as _,z as X}from"../chunks/D8EpLgQ1.js";import{i as G,s as Kt,a as Vt}from"../chunks/5WA7h8uK.js";import{e as Ht,i as Rt}from"../chunks/u94nIB4-.js";import{h as Yt,r as L,s as je,b as Ot,a as Jt,g as ve}from"../chunks/CiE1LlKV.js";import{b as N,a as Qt}from"../chunks/C6k1Q4We.js";import{p as at}from"../chunks/D4Caz1gY.js";import{P as Wt}from"../chunks/CO4LUyTP.js";import{F as Xt}from"../chunks/BWbwsSb6.js";import{D as Zt,A as ot,G as it,a as er}from"../chunks/B_CZMFLe.js";import{e as tr,a as Ne}from"../chunks/wyaP0EDu.js";import{t as ke}from"../chunks/BEkVdVE1.js";import{f as rr,p as ar,g as Ke,B as nt,c as or}from"../chunks/D5ucq3Gx.js";import{e as Ve}from"../chunks/BZiHL9L3.js";import"../chunks/D3_ugSUS.js";import{E as ir}from"../chunks/DMCMHBOH.js";import{S as nr}from"../chunks/dB1NgJWc.js";var dr=E('

'),sr=E(""),lr=E('

'),cr=E('

Gitea only supports PAT authentication

'),ur=E('
'),pr=E('

or drag and drop

PEM, KEY files only

',1),gr=E(''),yr=E('
'),br=E('

or drag and drop

PEM, KEY files only. Upload new private key.

',1),vr=E(" ",1),fr=E(''),mr=E(''),xr=E('
',1);function zr(dt,st){Gt(st,!1);const[lt,ct]=Kt(),U=()=>Vt(tr,"$eagerCache",lt),Ge=y(),Z=y(),He=y(),Ue=y(),p={PAT:"pat",APP:"app"};let we=y(!0),le=y([]),J=y([]),Ce=y(""),Pe=y(""),K=y(1),ce=y(25),ue=y(1),Ae=y(!1),Te=y(!1),$e=y(!1),D=y(p.PAT),g=y(null),M=y(null),t=y({name:"",description:"",endpoint:"",auth_type:p.PAT,oauth2_token:"",app_id:"",installation_id:"",private_key_bytes:""}),Ee={...e(t)},ee=y(!1);function ut(r){r.key==="Escape"&&(e(Ae)||e(Te)||e($e))&&P()}Ut(async()=>{try{n(we,!0);const[r,d]=await Promise.all([Ne.getCredentials(),Ne.getEndpoints()]);r&&Array.isArray(r)&&n(le,r),d&&Array.isArray(d)&&n(J,d)}catch(r){console.error("Failed to load credentials:",r),n(Ce,r instanceof Error?r.message:"Failed to load credentials")}finally{n(we,!1)}});async function pt(){try{await Ne.retryResource("credentials")}catch(r){console.error("Retry failed:",r)}}async function gt(){Re(),n(Ae,!0),n(x,"github")}let x=y("");function yt(r){n(x,r.detail),_(t,e(t).auth_type=p.PAT),n(D,p.PAT)}async function qe(r){n(g,r),n(t,{name:r.name||"",description:r.description||"",endpoint:r.endpoint?.name||"",auth_type:r["auth-type"]||p.PAT,oauth2_token:"",app_id:"",installation_id:"",private_key_bytes:""}),n(D,r["auth-type"]||p.PAT),Ee={...e(t)},n(ee,!1),n(Te,!0)}function ze(r){n(M,r),n($e,!0)}function Re(){n(t,{name:"",description:"",endpoint:"",auth_type:p.PAT,oauth2_token:"",app_id:"",installation_id:"",private_key_bytes:""}),Ee={...e(t)},n(D,p.PAT),n(ee,!1)}function P(){n(Ae,!1),n(Te,!1),n($e,!1),n(g,null),n(M,null),n(x,""),Re()}function Ye(r){n(D,r),_(t,e(t).auth_type=r)}function bt(){const r={};if(e(t).name!==Ee.name&&e(t).name.trim()!==""&&(r.name=e(t).name.trim()),e(t).description!==Ee.description&&e(t).description.trim()!==""&&(r.description=e(t).description.trim()),e(ee)&&e(g))if(e(g)["auth-type"]===p.PAT)e(t).oauth2_token.trim()!==""&&(r.pat={oauth2_token:e(t).oauth2_token.trim()});else{const d={};let b=!1;if(e(t).app_id.trim()!==""&&(d.app_id=parseInt(e(t).app_id.trim()),b=!0),e(t).installation_id.trim()!==""&&(d.installation_id=parseInt(e(t).installation_id.trim()),b=!0),e(t).private_key_bytes!=="")try{const m=atob(e(t).private_key_bytes);d.private_key_bytes=Array.from(m,l=>l.charCodeAt(0)),b=!0}catch{}b&&(r.app=d)}return r}async function vt(){try{if(e(x)==="github")await ve.createGithubCredentials(e(t));else if(e(x)==="gitea")await ve.createGiteaCredentials(e(t));else throw new Error("Please select a forge type");ke.success("Credentials Created",`Credentials ${e(t).name} have been created successfully.`),P()}catch(r){n(Ce,Ve(r))}}async function ft(){if(!(!e(g)||!e(g).id))try{const r=bt();if(Object.keys(r).length===0){ke.info("No Changes","No fields were modified."),P();return}e(g).forge_type==="github"?await ve.updateGithubCredentials(e(g).id,r):await ve.updateGiteaCredentials(e(g).id,r),ke.success("Credentials Updated",`Credentials ${e(g)?.name||"Unknown"} have been updated successfully.`),P()}catch(r){n(Ce,Ve(r))}}async function mt(){if(!(!e(M)||!e(M).id))try{e(M).forge_type==="github"?await ve.deleteGithubCredentials(e(M).id):await ve.deleteGiteaCredentials(e(M).id),ke.success("Credentials Deleted",`Credentials ${e(M)?.name||"Unknown"} have been deleted successfully.`)}catch(r){const d=Ve(r);ke.error("Delete Failed",d)}finally{P()}}function Oe(r){const b=r.target.files?.[0];if(!b){_(t,e(t).private_key_bytes="");return}const m=new FileReader;m.onload=l=>{const h=l.target?.result;_(t,e(t).private_key_bytes=btoa(h))},m.readAsText(b)}function Je(){return!e(t).name||!e(t).description||!e(t).endpoint?!1:e(t).auth_type===p.PAT?!!e(t).oauth2_token:!!e(t).app_id&&!!e(t).installation_id&&!!e(t).private_key_bytes}function Qe(){return!e(t).name.trim()||!e(t).description.trim()?!1:e(ee)&&e(g)?e(g)["auth-type"]===p.PAT?!!e(t).oauth2_token.trim():!!e(t).app_id.trim()&&!!e(t).installation_id.trim()&&!!e(t).private_key_bytes:!0}function xt(r){return e(J).find(b=>b.name===r)?.endpoint_type||""}function _t(r){return xt(r)==="gitea"}const ht=[{key:"name",title:"Name",cellComponent:it,cellProps:{field:"name"}},{key:"description",title:"Description",cellComponent:it,cellProps:{field:"description",type:"description"}},{key:"endpoint",title:"Endpoint",cellComponent:ir},{key:"auth_type",title:"Auth Type",cellComponent:nr,cellProps:{statusType:"custom",statusField:"auth-type"}},{key:"actions",title:"Actions",align:"right",cellComponent:er}],kt={entityType:"credential",primaryText:{field:"name",isClickable:!1},secondaryText:{field:"description"},customInfo:[{icon:r=>Ke(r?.forge_type||"unknown"),text:r=>r?.endpoint?.name||"Unknown"}],badges:[{type:"auth",field:"auth-type"}],actions:[{type:"edit",handler:r=>qe(r)},{type:"delete",handler:r=>ze(r)}]};function wt(r){n(Pe,r.detail.term),n(K,1)}function Ct(r){n(K,r.detail.page)}function Pt(r){const d=or(r.detail.perPage);n(ce,d.newPerPage),n(K,d.newCurrentPage)}function At(r){qe(r.detail.item)}function Tt(r){ze(r.detail.item)}Q(()=>(e(le),U()),()=>{(!e(le).length||U().loaded.credentials)&&n(le,U().credentials)}),Q(()=>U(),()=>{n(we,U().loading.credentials)}),Q(()=>U(),()=>{n(Ge,U().errorMessages.credentials)}),Q(()=>(e(J),U()),()=>{(!e(J).length||U().loaded.endpoints)&&n(J,U().endpoints)}),Q(()=>(e(le),e(Pe)),()=>{n(Z,rr(e(le),e(Pe)))}),Q(()=>(e(ue),e(Z),e(ce),e(K)),()=>{n(ue,Math.ceil(e(Z).length/e(ce))),e(K)>e(ue)&&e(ue)>0&&n(K,e(ue))}),Q(()=>(e(Z),e(K),e(ce)),()=>{n(He,ar(e(Z),e(K),e(ce)))}),Q(()=>(e(x),e(J)),()=>{n(Ue,e(x)?e(J).filter(r=>r.endpoint_type===e(x)):e(J))}),qt(),jt();var We=xr();f("keydown",Lt,ut),zt(r=>{St.title="Credentials - GARM"});var Be=Fe(We),Xe=o(Be);Wt(Xe,{title:"Credentials",description:"Manage authentication credentials for your GitHub and Gitea endpoints.",actionLabel:"Add Credentials",$$events:{action:gt}});var $t=a(Xe,2);{let r=Le(()=>e(Ge)||e(Ce)),d=Le(()=>!!e(Ge));Zt($t,{get columns(){return ht},get data(){return e(He)},get loading(){return e(we)},get error(){return e(r)},get searchTerm(){return e(Pe)},searchPlaceholder:"Search credentials by name, description, or endpoint...",get currentPage(){return e(K)},get perPage(){return e(ce)},get totalPages(){return e(ue)},get totalItems(){return e(Z),u(()=>e(Z).length)},itemName:"credentials",emptyIconType:"key",get showRetry(){return e(d)},get mobileCardConfig(){return kt},$$events:{search:wt,pageChange:Ct,perPageChange:Pt,retry:pt,edit:At,delete:Tt},$$slots:{"mobile-card":(b,m)=>{const l=Le(()=>m.item);var h=dr(),A=o(h),q=o(A),I=o(q),F=o(I,!0);i(I);var k=a(I,2),V=o(k,!0);i(k);var z=a(k,2),B=o(z),S=o(B);Yt(S,()=>(be(Ke),be(e(l)),u(()=>Ke(e(l).forge_type||"unknown"))));var te=a(S,2),re=o(te,!0);i(te),i(B),i(z),i(q),i(A);var ae=a(A,2),H=o(ae);{var oe=j=>{nt(j,{variant:"success",text:"PAT"})},R=j=>{nt(j,{variant:"info",text:"App"})};G(H,j=>{be(e(l)),u(()=>(e(l)["auth-type"]||"pat")==="pat")?j(oe):j(R,!1)})}var Y=a(H,2),ie=o(Y);ot(ie,{action:"edit",size:"sm",title:"Edit credentials",ariaLabel:"Edit credentials",$$events:{click:()=>qe(e(l))}});var pe=a(ie,2);ot(pe,{action:"delete",size:"sm",title:"Delete credentials",ariaLabel:"Delete credentials",$$events:{click:()=>ze(e(l))}}),i(Y),i(ae),i(h),se(()=>{W(F,(be(e(l)),u(()=>e(l).name))),W(V,(be(e(l)),u(()=>e(l).description))),W(re,(be(e(l)),u(()=>e(l).endpoint?.name||"Unknown")))}),$(b,h)}}})}i(Be);var Ze=a(Be,2);{var Et=r=>{var d=gr(),b=o(d),m=a(b,2),l=o(m),h=a(o(l),2);i(l);var A=a(l,2),q=o(A);Xt(q,{get selectedForgeType(){return e(x)},set selectedForgeType(s){n(x,s)},$$events:{select:yt},$$legacy:!0});var I=a(q,2),F=a(o(I),2);L(F),i(I);var k=a(I,2),V=a(o(k),2);rt(V),i(k);var z=a(k,2),B=a(o(z),2);se(()=>{e(t),Nt(()=>{e(Ue)})});var S=o(B);S.value=S.__value="";var te=a(S);Ht(te,1,()=>e(Ue),Rt,(s,c)=>{var v=sr(),C=o(v);i(v);var T={};se(()=>{W(C,`${e(c),u(()=>e(c).name)??""} (${e(c),u(()=>e(c).endpoint_type)??""})`),T!==(T=(e(c),u(()=>e(c).name)))&&(v.value=(v.__value=(e(c),u(()=>e(c).name)))??"")}),$(s,v)}),i(B);var re=a(B,2);{var ae=s=>{var c=lr(),v=o(c);i(c),se(()=>W(v,`Showing only ${e(x)??""} endpoints`)),$(s,c)};G(re,s=>{e(x)&&s(ae)})}i(z);var H=a(z,2),oe=a(o(H),2),R=o(oe),Y=a(R,2);i(oe);var ie=a(oe,2);{var pe=s=>{var c=cr();$(s,c)};G(ie,s=>{e(x)==="gitea"&&s(pe)})}i(H);var j=a(H,2);{var De=s=>{var c=ur(),v=a(o(c),2);L(v),i(c),N(v,()=>e(t).oauth2_token,C=>_(t,e(t).oauth2_token=C)),$(s,c)};G(j,s=>{e(D),u(()=>e(D)===p.PAT)&&s(De)})}var fe=a(j,2);{var Me=s=>{var c=pr(),v=Fe(c),C=a(o(v),2);L(C),i(v);var T=a(v,2),O=a(o(T),2);L(O),i(T);var de=a(T,2),ge=a(o(de),2),xe=o(ge),_e=a(xe,2),he=a(o(_e),2),Ie=o(he);X(),i(he),X(2),i(_e),i(ge),i(de),N(C,()=>e(t).app_id,ye=>_(t,e(t).app_id=ye)),N(O,()=>e(t).installation_id,ye=>_(t,e(t).installation_id=ye)),f("change",xe,Oe),f("click",Ie,()=>document.getElementById("private_key")?.click()),$(s,c)};G(fe,s=>{e(D),u(()=>e(D)===p.APP)&&s(Me)})}var w=a(fe,2),ne=o(w),me=a(ne,2);i(w),i(A),i(m),i(d),se((s,c,v)=>{je(R,1,`flex-1 py-2 px-4 text-sm font-medium rounded-md border focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer +import"../chunks/DsnmJJEf.js";import{i as jt}from"../chunks/zNh6Oe5P.js";import{p as Gt,g as e,o as Ut,l as Q,a as qt,f as E,e as f,h as zt,b as Fe,c as $,d as Bt,$ as St,m as y,s as n,i as Lt,j as o,k as a,r as i,u,n as be,q as Le,t as se,v as W,w as rt,x as Nt,y as _,z as X}from"../chunks/sWNKMed7.js";import{i as G,s as Kt,a as Vt}from"../chunks/Ccl3fNd2.js";import{e as Ht,i as Rt}from"../chunks/BuuPrWMc.js";import{h as Yt,r as L,s as je,b as Ot,a as Jt,g as ve}from"../chunks/t8NOL8UT.js";import{b as N,a as Qt}from"../chunks/CLagxtgo.js";import{p as at}from"../chunks/D4Caz1gY.js";import{P as Wt}from"../chunks/sdr-JCKi.js";import{F as Xt}from"../chunks/BYXzcXZj.js";import{D as Zt,A as ot,G as it,a as er}from"../chunks/WvS03pW2.js";import{e as tr,a as Ne}from"../chunks/UPGsoYWO.js";import{t as ke}from"../chunks/BZUCTtPY.js";import{f as rr,p as ar,g as Ke,B as nt,c as or}from"../chunks/Cbkm53HO.js";import{e as Ve}from"../chunks/BZiHL9L3.js";import"../chunks/BFThZs5w.js";import{E as ir}from"../chunks/CC0e8UY8.js";import{S as nr}from"../chunks/C7WQ-JBG.js";var dr=E('

'),sr=E(""),lr=E('

'),cr=E('

Gitea only supports PAT authentication

'),ur=E('
'),pr=E('

or drag and drop

PEM, KEY files only

',1),gr=E(''),yr=E('
'),br=E('

or drag and drop

PEM, KEY files only. Upload new private key.

',1),vr=E(" ",1),fr=E(''),mr=E(''),xr=E('
',1);function zr(dt,st){Gt(st,!1);const[lt,ct]=Kt(),U=()=>Vt(tr,"$eagerCache",lt),Ge=y(),Z=y(),He=y(),Ue=y(),p={PAT:"pat",APP:"app"};let we=y(!0),le=y([]),J=y([]),Ce=y(""),Pe=y(""),K=y(1),ce=y(25),ue=y(1),Ae=y(!1),Te=y(!1),$e=y(!1),D=y(p.PAT),g=y(null),M=y(null),t=y({name:"",description:"",endpoint:"",auth_type:p.PAT,oauth2_token:"",app_id:"",installation_id:"",private_key_bytes:""}),Ee={...e(t)},ee=y(!1);function ut(r){r.key==="Escape"&&(e(Ae)||e(Te)||e($e))&&P()}Ut(async()=>{try{n(we,!0);const[r,d]=await Promise.all([Ne.getCredentials(),Ne.getEndpoints()]);r&&Array.isArray(r)&&n(le,r),d&&Array.isArray(d)&&n(J,d)}catch(r){console.error("Failed to load credentials:",r),n(Ce,r instanceof Error?r.message:"Failed to load credentials")}finally{n(we,!1)}});async function pt(){try{await Ne.retryResource("credentials")}catch(r){console.error("Retry failed:",r)}}async function gt(){Re(),n(Ae,!0),n(x,"github")}let x=y("");function yt(r){n(x,r.detail),_(t,e(t).auth_type=p.PAT),n(D,p.PAT)}async function qe(r){n(g,r),n(t,{name:r.name||"",description:r.description||"",endpoint:r.endpoint?.name||"",auth_type:r["auth-type"]||p.PAT,oauth2_token:"",app_id:"",installation_id:"",private_key_bytes:""}),n(D,r["auth-type"]||p.PAT),Ee={...e(t)},n(ee,!1),n(Te,!0)}function ze(r){n(M,r),n($e,!0)}function Re(){n(t,{name:"",description:"",endpoint:"",auth_type:p.PAT,oauth2_token:"",app_id:"",installation_id:"",private_key_bytes:""}),Ee={...e(t)},n(D,p.PAT),n(ee,!1)}function P(){n(Ae,!1),n(Te,!1),n($e,!1),n(g,null),n(M,null),n(x,""),Re()}function Ye(r){n(D,r),_(t,e(t).auth_type=r)}function bt(){const r={};if(e(t).name!==Ee.name&&e(t).name.trim()!==""&&(r.name=e(t).name.trim()),e(t).description!==Ee.description&&e(t).description.trim()!==""&&(r.description=e(t).description.trim()),e(ee)&&e(g))if(e(g)["auth-type"]===p.PAT)e(t).oauth2_token.trim()!==""&&(r.pat={oauth2_token:e(t).oauth2_token.trim()});else{const d={};let b=!1;if(e(t).app_id.trim()!==""&&(d.app_id=parseInt(e(t).app_id.trim()),b=!0),e(t).installation_id.trim()!==""&&(d.installation_id=parseInt(e(t).installation_id.trim()),b=!0),e(t).private_key_bytes!=="")try{const m=atob(e(t).private_key_bytes);d.private_key_bytes=Array.from(m,l=>l.charCodeAt(0)),b=!0}catch{}b&&(r.app=d)}return r}async function vt(){try{if(e(x)==="github")await ve.createGithubCredentials(e(t));else if(e(x)==="gitea")await ve.createGiteaCredentials(e(t));else throw new Error("Please select a forge type");ke.success("Credentials Created",`Credentials ${e(t).name} have been created successfully.`),P()}catch(r){n(Ce,Ve(r))}}async function ft(){if(!(!e(g)||!e(g).id))try{const r=bt();if(Object.keys(r).length===0){ke.info("No Changes","No fields were modified."),P();return}e(g).forge_type==="github"?await ve.updateGithubCredentials(e(g).id,r):await ve.updateGiteaCredentials(e(g).id,r),ke.success("Credentials Updated",`Credentials ${e(g)?.name||"Unknown"} have been updated successfully.`),P()}catch(r){n(Ce,Ve(r))}}async function mt(){if(!(!e(M)||!e(M).id))try{e(M).forge_type==="github"?await ve.deleteGithubCredentials(e(M).id):await ve.deleteGiteaCredentials(e(M).id),ke.success("Credentials Deleted",`Credentials ${e(M)?.name||"Unknown"} have been deleted successfully.`)}catch(r){const d=Ve(r);ke.error("Delete Failed",d)}finally{P()}}function Oe(r){const b=r.target.files?.[0];if(!b){_(t,e(t).private_key_bytes="");return}const m=new FileReader;m.onload=l=>{const h=l.target?.result;_(t,e(t).private_key_bytes=btoa(h))},m.readAsText(b)}function Je(){return!e(t).name||!e(t).description||!e(t).endpoint?!1:e(t).auth_type===p.PAT?!!e(t).oauth2_token:!!e(t).app_id&&!!e(t).installation_id&&!!e(t).private_key_bytes}function Qe(){return!e(t).name.trim()||!e(t).description.trim()?!1:e(ee)&&e(g)?e(g)["auth-type"]===p.PAT?!!e(t).oauth2_token.trim():!!e(t).app_id.trim()&&!!e(t).installation_id.trim()&&!!e(t).private_key_bytes:!0}function xt(r){return e(J).find(b=>b.name===r)?.endpoint_type||""}function _t(r){return xt(r)==="gitea"}const ht=[{key:"name",title:"Name",cellComponent:it,cellProps:{field:"name"}},{key:"description",title:"Description",cellComponent:it,cellProps:{field:"description",type:"description"}},{key:"endpoint",title:"Endpoint",cellComponent:ir},{key:"auth_type",title:"Auth Type",cellComponent:nr,cellProps:{statusType:"custom",statusField:"auth-type"}},{key:"actions",title:"Actions",align:"right",cellComponent:er}],kt={entityType:"credential",primaryText:{field:"name",isClickable:!1},secondaryText:{field:"description"},customInfo:[{icon:r=>Ke(r?.forge_type||"unknown"),text:r=>r?.endpoint?.name||"Unknown"}],badges:[{type:"auth",field:"auth-type"}],actions:[{type:"edit",handler:r=>qe(r)},{type:"delete",handler:r=>ze(r)}]};function wt(r){n(Pe,r.detail.term),n(K,1)}function Ct(r){n(K,r.detail.page)}function Pt(r){const d=or(r.detail.perPage);n(ce,d.newPerPage),n(K,d.newCurrentPage)}function At(r){qe(r.detail.item)}function Tt(r){ze(r.detail.item)}Q(()=>(e(le),U()),()=>{(!e(le).length||U().loaded.credentials)&&n(le,U().credentials)}),Q(()=>U(),()=>{n(we,U().loading.credentials)}),Q(()=>U(),()=>{n(Ge,U().errorMessages.credentials)}),Q(()=>(e(J),U()),()=>{(!e(J).length||U().loaded.endpoints)&&n(J,U().endpoints)}),Q(()=>(e(le),e(Pe)),()=>{n(Z,rr(e(le),e(Pe)))}),Q(()=>(e(ue),e(Z),e(ce),e(K)),()=>{n(ue,Math.ceil(e(Z).length/e(ce))),e(K)>e(ue)&&e(ue)>0&&n(K,e(ue))}),Q(()=>(e(Z),e(K),e(ce)),()=>{n(He,ar(e(Z),e(K),e(ce)))}),Q(()=>(e(x),e(J)),()=>{n(Ue,e(x)?e(J).filter(r=>r.endpoint_type===e(x)):e(J))}),qt(),jt();var We=xr();f("keydown",Lt,ut),zt(r=>{St.title="Credentials - GARM"});var Be=Fe(We),Xe=o(Be);Wt(Xe,{title:"Credentials",description:"Manage authentication credentials for your GitHub and Gitea endpoints.",actionLabel:"Add Credentials",$$events:{action:gt}});var $t=a(Xe,2);{let r=Le(()=>e(Ge)||e(Ce)),d=Le(()=>!!e(Ge));Zt($t,{get columns(){return ht},get data(){return e(He)},get loading(){return e(we)},get error(){return e(r)},get searchTerm(){return e(Pe)},searchPlaceholder:"Search credentials by name, description, or endpoint...",get currentPage(){return e(K)},get perPage(){return e(ce)},get totalPages(){return e(ue)},get totalItems(){return e(Z),u(()=>e(Z).length)},itemName:"credentials",emptyIconType:"key",get showRetry(){return e(d)},get mobileCardConfig(){return kt},$$events:{search:wt,pageChange:Ct,perPageChange:Pt,retry:pt,edit:At,delete:Tt},$$slots:{"mobile-card":(b,m)=>{const l=Le(()=>m.item);var h=dr(),A=o(h),q=o(A),I=o(q),F=o(I,!0);i(I);var k=a(I,2),V=o(k,!0);i(k);var z=a(k,2),B=o(z),S=o(B);Yt(S,()=>(be(Ke),be(e(l)),u(()=>Ke(e(l).forge_type||"unknown"))));var te=a(S,2),re=o(te,!0);i(te),i(B),i(z),i(q),i(A);var ae=a(A,2),H=o(ae);{var oe=j=>{nt(j,{variant:"success",text:"PAT"})},R=j=>{nt(j,{variant:"info",text:"App"})};G(H,j=>{be(e(l)),u(()=>(e(l)["auth-type"]||"pat")==="pat")?j(oe):j(R,!1)})}var Y=a(H,2),ie=o(Y);ot(ie,{action:"edit",size:"sm",title:"Edit credentials",ariaLabel:"Edit credentials",$$events:{click:()=>qe(e(l))}});var pe=a(ie,2);ot(pe,{action:"delete",size:"sm",title:"Delete credentials",ariaLabel:"Delete credentials",$$events:{click:()=>ze(e(l))}}),i(Y),i(ae),i(h),se(()=>{W(F,(be(e(l)),u(()=>e(l).name))),W(V,(be(e(l)),u(()=>e(l).description))),W(re,(be(e(l)),u(()=>e(l).endpoint?.name||"Unknown")))}),$(b,h)}}})}i(Be);var Ze=a(Be,2);{var Et=r=>{var d=gr(),b=o(d),m=a(b,2),l=o(m),h=a(o(l),2);i(l);var A=a(l,2),q=o(A);Xt(q,{get selectedForgeType(){return e(x)},set selectedForgeType(s){n(x,s)},$$events:{select:yt},$$legacy:!0});var I=a(q,2),F=a(o(I),2);L(F),i(I);var k=a(I,2),V=a(o(k),2);rt(V),i(k);var z=a(k,2),B=a(o(z),2);se(()=>{e(t),Nt(()=>{e(Ue)})});var S=o(B);S.value=S.__value="";var te=a(S);Ht(te,1,()=>e(Ue),Rt,(s,c)=>{var v=sr(),C=o(v);i(v);var T={};se(()=>{W(C,`${e(c),u(()=>e(c).name)??""} (${e(c),u(()=>e(c).endpoint_type)??""})`),T!==(T=(e(c),u(()=>e(c).name)))&&(v.value=(v.__value=(e(c),u(()=>e(c).name)))??"")}),$(s,v)}),i(B);var re=a(B,2);{var ae=s=>{var c=lr(),v=o(c);i(c),se(()=>W(v,`Showing only ${e(x)??""} endpoints`)),$(s,c)};G(re,s=>{e(x)&&s(ae)})}i(z);var H=a(z,2),oe=a(o(H),2),R=o(oe),Y=a(R,2);i(oe);var ie=a(oe,2);{var pe=s=>{var c=cr();$(s,c)};G(ie,s=>{e(x)==="gitea"&&s(pe)})}i(H);var j=a(H,2);{var De=s=>{var c=ur(),v=a(o(c),2);L(v),i(c),N(v,()=>e(t).oauth2_token,C=>_(t,e(t).oauth2_token=C)),$(s,c)};G(j,s=>{e(D),u(()=>e(D)===p.PAT)&&s(De)})}var fe=a(j,2);{var Me=s=>{var c=pr(),v=Fe(c),C=a(o(v),2);L(C),i(v);var T=a(v,2),O=a(o(T),2);L(O),i(T);var de=a(T,2),ge=a(o(de),2),xe=o(ge),_e=a(xe,2),he=a(o(_e),2),Ie=o(he);X(),i(he),X(2),i(_e),i(ge),i(de),N(C,()=>e(t).app_id,ye=>_(t,e(t).app_id=ye)),N(O,()=>e(t).installation_id,ye=>_(t,e(t).installation_id=ye)),f("change",xe,Oe),f("click",Ie,()=>document.getElementById("private_key")?.click()),$(s,c)};G(fe,s=>{e(D),u(()=>e(D)===p.APP)&&s(Me)})}var w=a(fe,2),ne=o(w),me=a(ne,2);i(w),i(A),i(m),i(d),se((s,c,v)=>{je(R,1,`flex-1 py-2 px-4 text-sm font-medium rounded-md border focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer ${e(D),u(()=>e(D)===p.PAT?"bg-blue-600 text-white border-blue-600":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600")??""} ${s??""}`),Y.disabled=e(x)==="gitea",je(Y,1,`flex-1 py-2 px-4 text-sm font-medium rounded-md border focus:outline-none focus:ring-2 focus:ring-blue-500 ${e(D),u(()=>e(D)===p.APP?"bg-blue-600 text-white border-blue-600":"bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600")??""} diff --git a/webapp/assets/_app/immutable/nodes/4.eyQ5jFz4.js b/webapp/assets/_app/immutable/nodes/4.Cla5k8cS.js similarity index 96% rename from webapp/assets/_app/immutable/nodes/4.eyQ5jFz4.js rename to webapp/assets/_app/immutable/nodes/4.Cla5k8cS.js index 68a54ca2..f8950992 100644 --- a/webapp/assets/_app/immutable/nodes/4.eyQ5jFz4.js +++ b/webapp/assets/_app/immutable/nodes/4.Cla5k8cS.js @@ -1,3 +1,3 @@ -import"../chunks/DsnmJJEf.js";import{i as bt}from"../chunks/B3Pzt0F_.js";import{p as gt,g as e,o as ft,l as Z,a as _t,f as j,e as b,h as mt,b as Ce,c as I,d as yt,m as p,i as vt,$ as xt,j as o,q as Ee,k as a,t as ye,u as C,s,r as i,n as ie,v as se,w as Ie,z as V,y as g}from"../chunks/D8EpLgQ1.js";import{i as ne,s as ht,a as kt}from"../chunks/5WA7h8uK.js";import{h as wt,r as U,c as je,s as Ge,g as ee}from"../chunks/CiE1LlKV.js";import{b as E}from"../chunks/C6k1Q4We.js";import{p as ze}from"../chunks/D4Caz1gY.js";import{P as Ct}from"../chunks/CO4LUyTP.js";import{F as Et}from"../chunks/BWbwsSb6.js";import{D as Pt,A as qe,G as Pe,a as $t}from"../chunks/B_CZMFLe.js";import{e as At,a as He}from"../chunks/wyaP0EDu.js";import{t as de}from"../chunks/BEkVdVE1.js";import{g as $e,c as Rt,a as Bt,p as Ut}from"../chunks/D5ucq3Gx.js";import{e as Ae}from"../chunks/BZiHL9L3.js";import"../chunks/D3_ugSUS.js";import{E as Lt}from"../chunks/DMCMHBOH.js";var Mt=j('

'),Tt=j('
',1),Dt=j('

If empty, Base URL will be used as API Base URL

'),Ft=j(''),It=j('
',1),jt=j('

If empty, Base URL will be used as API Base URL

'),Gt=j(''),zt=j(''),qt=j('
',1);function or(Ne,Se){gt(Se,!1);const[Ve,Oe]=ht(),q=()=>kt(At,"$eagerCache",Ve),ve=p(),H=p(),Re=p();let le=p(!0),O=p([]),ue=p(""),ce=p(""),L=p(1),K=p(25),J=p(1),pe=p(!1),be=p(!1),ge=p(!1),G=p("github"),m=p(null),A=p(null),r=p({name:"",description:"",endpoint_type:"",base_url:"",api_base_url:"",upload_base_url:"",ca_cert_bundle:""}),k={...e(r)};ft(async()=>{try{s(le,!0);const t=await He.getEndpoints();t&&Array.isArray(t)&&s(O,t)}catch(t){console.error("Failed to load endpoints:",t),s(ue,t instanceof Error?t.message:"Failed to load endpoints")}finally{s(le,!1)}});async function Ke(){try{await He.retryResource("endpoints")}catch(t){console.error("Retry failed:",t)}}const Je=[{key:"name",title:"Name",cellComponent:Pe,cellProps:{field:"name"}},{key:"description",title:"Description",cellComponent:Pe,cellProps:{field:"description"}},{key:"api_url",title:"API URL",cellComponent:Pe,cellProps:{field:"api_base_url",fallbackField:"base_url"}},{key:"forge_type",title:"Forge Type",cellComponent:Lt},{key:"actions",title:"Actions",align:"right",cellComponent:$t}],Qe={entityType:"endpoint",primaryText:{field:"name",isClickable:!1},secondaryText:{field:"description"},customInfo:[{icon:t=>$e(t?.endpoint_type||"unknown"),text:t=>t?.api_base_url||"Unknown"}],actions:[{type:"edit",handler:t=>xe(t)},{type:"delete",handler:t=>he(t)}]};function We(t){s(ce,t.detail.term),s(L,1)}function Xe(t){s(L,t.detail.page)}function Ye(t){const n=Rt(t.detail.perPage);s(K,n.newPerPage),s(L,n.newCurrentPage)}function Ze(t){xe(t.detail.item)}function et(t){he(t.detail.item)}function tt(){s(G,"github"),Be(),s(pe,!0)}function rt(t){s(G,t.detail),g(r,e(r).endpoint_type=t.detail)}function xe(t){s(m,t),s(r,{name:t.name||"",description:t.description||"",endpoint_type:t.endpoint_type||"",base_url:t.base_url||"",api_base_url:t.api_base_url||"",upload_base_url:t.upload_base_url||"",ca_cert_bundle:typeof t.ca_cert_bundle=="string"?t.ca_cert_bundle:""}),k={...e(r)},s(be,!0)}function he(t){s(A,t),s(ge,!0)}function Be(){s(r,{name:"",description:"",endpoint_type:"",base_url:"",api_base_url:"",upload_base_url:"",ca_cert_bundle:""}),k={...e(r)}}function at(t){t.key==="Escape"&&(e(pe)||e(be)||e(ge))&&y()}function y(){s(pe,!1),s(be,!1),s(ge,!1),s(G,"github"),s(m,null),s(A,null),Be()}function ot(){const t={};if(e(r).description!==k.description&&(e(r).description.trim()!==""||k.description!=="")&&(t.description=e(r).description.trim()),e(r).base_url!==k.base_url&&e(r).base_url.trim()!==""&&(t.base_url=e(r).base_url.trim()),e(r).api_base_url!==k.api_base_url&&(e(r).api_base_url.trim()!==""||k.api_base_url!=="")&&(t.api_base_url=e(r).api_base_url.trim()),e(m)?.endpoint_type==="github"&&e(r).upload_base_url!==k.upload_base_url&&(e(r).upload_base_url.trim()!==""||k.upload_base_url!=="")&&(t.upload_base_url=e(r).upload_base_url.trim()),e(r).ca_cert_bundle!==k.ca_cert_bundle)if(e(r).ca_cert_bundle!=="")try{const n=atob(e(r).ca_cert_bundle);t.ca_cert_bundle=Array.from(n,c=>c.charCodeAt(0))}catch{k.ca_cert_bundle!==""&&(t.ca_cert_bundle=[])}else k.ca_cert_bundle!==""&&(t.ca_cert_bundle=[]);return t}async function it(){try{const t={name:e(r).name,description:e(r).description,endpoint_type:e(r).endpoint_type,base_url:e(r).base_url,api_base_url:e(r).api_base_url,upload_base_url:e(r).upload_base_url};if(e(r).ca_cert_bundle&&e(r).ca_cert_bundle.trim()!=="")try{const n=atob(e(r).ca_cert_bundle);t.ca_cert_bundle=Array.from(n,c=>c.charCodeAt(0))}catch{}e(r).endpoint_type==="github"?await ee.createGithubEndpoint(t):await ee.createGiteaEndpoint(t),de.success("Endpoint Created",`Endpoint ${e(r).name} has been created successfully.`),y()}catch(t){s(ue,Ae(t))}}async function st(){if(e(m))try{const t=ot();if(Object.keys(t).length===0){de.info("No Changes","No fields were modified."),y();return}e(m).endpoint_type==="github"?await ee.updateGithubEndpoint(e(m).name,t):await ee.updateGiteaEndpoint(e(m).name,t),de.success("Endpoint Updated",`Endpoint ${e(m).name} has been updated successfully.`),y()}catch(t){s(ue,Ae(t))}}async function nt(){if(e(A)){try{e(A).endpoint_type==="github"?await ee.deleteGithubEndpoint(e(A).name):await ee.deleteGiteaEndpoint(e(A).name),de.success("Endpoint Deleted",`Endpoint ${e(A).name} has been deleted successfully.`)}catch(t){const n=Ae(t);de.error("Delete Failed",n)}y()}}function Ue(t){const c=t.target.files?.[0];if(!c){g(r,e(r).ca_cert_bundle="");return}const v=new FileReader;v.onload=d=>{const f=d.target?.result;g(r,e(r).ca_cert_bundle=btoa(f))},v.readAsText(c)}function fe(){return!(!e(r).name||!e(r).description||!e(r).base_url||e(r).endpoint_type==="github"&&!e(r).api_base_url)}Z(()=>(e(O),q()),()=>{(!e(O).length||q().loaded.endpoints)&&s(O,q().endpoints)}),Z(()=>q(),()=>{s(le,q().loading.endpoints)}),Z(()=>q(),()=>{s(ve,q().errorMessages.endpoints)}),Z(()=>(e(O),e(ce)),()=>{s(H,Bt(e(O),e(ce)))}),Z(()=>(e(J),e(H),e(K),e(L)),()=>{s(J,Math.ceil(e(H).length/e(K))),e(L)>e(J)&&e(J)>0&&s(L,e(J))}),Z(()=>(e(H),e(L),e(K)),()=>{s(Re,Ut(e(H),e(L),e(K)))}),_t(),bt();var Le=qt();b("keydown",vt,at),mt(t=>{xt.title="Endpoints - GARM"});var ke=Ce(Le),Me=o(ke);Ct(Me,{title:"Endpoints",description:"Manage your GitHub and Gitea endpoints for runner management.",actionLabel:"Add Endpoint",$$events:{action:tt}});var dt=a(Me,2);{let t=Ee(()=>e(ve)||e(ue)),n=Ee(()=>!!e(ve));Pt(dt,{get columns(){return Je},get data(){return e(Re)},get loading(){return e(le)},get error(){return e(t)},get searchTerm(){return e(ce)},searchPlaceholder:"Search endpoints by name, description, or URL...",get currentPage(){return e(L)},get perPage(){return e(K)},get totalPages(){return e(J)},get totalItems(){return e(H),C(()=>e(H).length)},itemName:"endpoints",emptyIconType:"settings",get showRetry(){return e(n)},get mobileCardConfig(){return Qe},$$events:{search:We,pageChange:Xe,perPageChange:Ye,retry:Ke,edit:Ze,delete:et},$$slots:{"mobile-card":(c,v)=>{const d=Ee(()=>v.item);var f=Mt(),x=o(f),R=o(x),P=o(R),w=o(P,!0);i(P);var _=a(P,2),M=o(_,!0);i(_);var B=a(_,2),T=o(B);wt(T,()=>(ie($e),ie(e(d)),C(()=>$e(e(d).endpoint_type||"","w-5 h-5"))));var D=a(T,2),Q=o(D,!0);i(D),i(B),i(R),i(x);var N=a(x,2),z=o(N);qe(z,{action:"edit",size:"sm",title:"Edit endpoint",ariaLabel:"Edit endpoint",$$events:{click:()=>xe(e(d))}});var W=a(z,2);qe(W,{action:"delete",size:"sm",title:"Delete endpoint",ariaLabel:"Delete endpoint",$$events:{click:()=>he(e(d))}}),i(N),i(f),ye(()=>{se(w,(ie(e(d)),C(()=>e(d).name))),se(M,(ie(e(d)),C(()=>e(d).description))),se(Q,(ie(e(d)),C(()=>e(d).endpoint_type)))}),I(c,f)}}})}i(ke);var Te=a(ke,2);{var lt=t=>{var n=Ft(),c=o(n),v=a(c,2),d=o(v),f=a(o(d),2);i(d);var x=a(d,2),R=o(x);Et(R,{get selectedForgeType(){return e(G)},set selectedForgeType(u){s(G,u)},$$events:{select:rt},$$legacy:!0});var P=a(R,2),w=a(o(P),2);U(w),i(P);var _=a(P,2),M=a(o(_),2);Ie(M),i(_);var B=a(_,2),T=a(o(B),2);U(T),i(B);var D=a(B,2);{var Q=u=>{var $=Tt(),l=Ce($),h=a(o(l),2);U(h),i(l);var F=a(l,2),S=a(o(F),2);U(S),i(F),E(h,()=>e(r).api_base_url,Y=>g(r,e(r).api_base_url=Y)),E(S,()=>e(r).upload_base_url,Y=>g(r,e(r).upload_base_url=Y)),I(u,$)},N=u=>{var $=Dt(),l=a(o($),2);U(l),V(2),i($),E(l,()=>e(r).api_base_url,h=>g(r,e(r).api_base_url=h)),I(u,$)};ne(D,u=>{e(G)==="github"?u(Q):u(N,!1)})}var z=a(D,2),W=a(o(z),2),X=o(W),te=a(X,2),re=a(o(te),2),_e=o(re);V(),i(re),V(2),i(te),i(W),i(z);var ae=a(z,2),me=o(ae),oe=a(me,2);i(ae),i(x),i(v),i(n),ye((u,$)=>{je(w,"placeholder",e(G)==="github"?"e.g., github-enterprise or github-com":"e.g., gitea-main or my-gitea"),je(T,"placeholder",e(G)==="github"?"https://github.com or https://github.example.com":"https://gitea.example.com"),oe.disabled=u,Ge(oe,1,`px-4 py-2 text-sm font-medium text-white rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors +import"../chunks/DsnmJJEf.js";import{i as bt}from"../chunks/zNh6Oe5P.js";import{p as gt,g as e,o as ft,l as Z,a as _t,f as j,e as b,h as mt,b as Ce,c as I,d as yt,m as p,i as vt,$ as xt,j as o,q as Ee,k as a,t as ye,u as C,s,r as i,n as ie,v as se,w as Ie,z as V,y as g}from"../chunks/sWNKMed7.js";import{i as ne,s as ht,a as kt}from"../chunks/Ccl3fNd2.js";import{h as wt,r as U,c as je,s as Ge,g as ee}from"../chunks/t8NOL8UT.js";import{b as E}from"../chunks/CLagxtgo.js";import{p as ze}from"../chunks/D4Caz1gY.js";import{P as Ct}from"../chunks/sdr-JCKi.js";import{F as Et}from"../chunks/BYXzcXZj.js";import{D as Pt,A as qe,G as Pe,a as $t}from"../chunks/WvS03pW2.js";import{e as At,a as He}from"../chunks/UPGsoYWO.js";import{t as de}from"../chunks/BZUCTtPY.js";import{g as $e,c as Rt,a as Bt,p as Ut}from"../chunks/Cbkm53HO.js";import{e as Ae}from"../chunks/BZiHL9L3.js";import"../chunks/BFThZs5w.js";import{E as Lt}from"../chunks/CC0e8UY8.js";var Mt=j('

'),Tt=j('
',1),Dt=j('

If empty, Base URL will be used as API Base URL

'),Ft=j(''),It=j('
',1),jt=j('

If empty, Base URL will be used as API Base URL

'),Gt=j(''),zt=j(''),qt=j('
',1);function or(Ne,Se){gt(Se,!1);const[Ve,Oe]=ht(),q=()=>kt(At,"$eagerCache",Ve),ve=p(),H=p(),Re=p();let le=p(!0),O=p([]),ue=p(""),ce=p(""),L=p(1),K=p(25),J=p(1),pe=p(!1),be=p(!1),ge=p(!1),G=p("github"),m=p(null),A=p(null),r=p({name:"",description:"",endpoint_type:"",base_url:"",api_base_url:"",upload_base_url:"",ca_cert_bundle:""}),k={...e(r)};ft(async()=>{try{s(le,!0);const t=await He.getEndpoints();t&&Array.isArray(t)&&s(O,t)}catch(t){console.error("Failed to load endpoints:",t),s(ue,t instanceof Error?t.message:"Failed to load endpoints")}finally{s(le,!1)}});async function Ke(){try{await He.retryResource("endpoints")}catch(t){console.error("Retry failed:",t)}}const Je=[{key:"name",title:"Name",cellComponent:Pe,cellProps:{field:"name"}},{key:"description",title:"Description",cellComponent:Pe,cellProps:{field:"description"}},{key:"api_url",title:"API URL",cellComponent:Pe,cellProps:{field:"api_base_url",fallbackField:"base_url"}},{key:"forge_type",title:"Forge Type",cellComponent:Lt},{key:"actions",title:"Actions",align:"right",cellComponent:$t}],Qe={entityType:"endpoint",primaryText:{field:"name",isClickable:!1},secondaryText:{field:"description"},customInfo:[{icon:t=>$e(t?.endpoint_type||"unknown"),text:t=>t?.api_base_url||"Unknown"}],actions:[{type:"edit",handler:t=>xe(t)},{type:"delete",handler:t=>he(t)}]};function We(t){s(ce,t.detail.term),s(L,1)}function Xe(t){s(L,t.detail.page)}function Ye(t){const n=Rt(t.detail.perPage);s(K,n.newPerPage),s(L,n.newCurrentPage)}function Ze(t){xe(t.detail.item)}function et(t){he(t.detail.item)}function tt(){s(G,"github"),Be(),s(pe,!0)}function rt(t){s(G,t.detail),g(r,e(r).endpoint_type=t.detail)}function xe(t){s(m,t),s(r,{name:t.name||"",description:t.description||"",endpoint_type:t.endpoint_type||"",base_url:t.base_url||"",api_base_url:t.api_base_url||"",upload_base_url:t.upload_base_url||"",ca_cert_bundle:typeof t.ca_cert_bundle=="string"?t.ca_cert_bundle:""}),k={...e(r)},s(be,!0)}function he(t){s(A,t),s(ge,!0)}function Be(){s(r,{name:"",description:"",endpoint_type:"",base_url:"",api_base_url:"",upload_base_url:"",ca_cert_bundle:""}),k={...e(r)}}function at(t){t.key==="Escape"&&(e(pe)||e(be)||e(ge))&&y()}function y(){s(pe,!1),s(be,!1),s(ge,!1),s(G,"github"),s(m,null),s(A,null),Be()}function ot(){const t={};if(e(r).description!==k.description&&(e(r).description.trim()!==""||k.description!=="")&&(t.description=e(r).description.trim()),e(r).base_url!==k.base_url&&e(r).base_url.trim()!==""&&(t.base_url=e(r).base_url.trim()),e(r).api_base_url!==k.api_base_url&&(e(r).api_base_url.trim()!==""||k.api_base_url!=="")&&(t.api_base_url=e(r).api_base_url.trim()),e(m)?.endpoint_type==="github"&&e(r).upload_base_url!==k.upload_base_url&&(e(r).upload_base_url.trim()!==""||k.upload_base_url!=="")&&(t.upload_base_url=e(r).upload_base_url.trim()),e(r).ca_cert_bundle!==k.ca_cert_bundle)if(e(r).ca_cert_bundle!=="")try{const n=atob(e(r).ca_cert_bundle);t.ca_cert_bundle=Array.from(n,c=>c.charCodeAt(0))}catch{k.ca_cert_bundle!==""&&(t.ca_cert_bundle=[])}else k.ca_cert_bundle!==""&&(t.ca_cert_bundle=[]);return t}async function it(){try{const t={name:e(r).name,description:e(r).description,endpoint_type:e(r).endpoint_type,base_url:e(r).base_url,api_base_url:e(r).api_base_url,upload_base_url:e(r).upload_base_url};if(e(r).ca_cert_bundle&&e(r).ca_cert_bundle.trim()!=="")try{const n=atob(e(r).ca_cert_bundle);t.ca_cert_bundle=Array.from(n,c=>c.charCodeAt(0))}catch{}e(r).endpoint_type==="github"?await ee.createGithubEndpoint(t):await ee.createGiteaEndpoint(t),de.success("Endpoint Created",`Endpoint ${e(r).name} has been created successfully.`),y()}catch(t){s(ue,Ae(t))}}async function st(){if(e(m))try{const t=ot();if(Object.keys(t).length===0){de.info("No Changes","No fields were modified."),y();return}e(m).endpoint_type==="github"?await ee.updateGithubEndpoint(e(m).name,t):await ee.updateGiteaEndpoint(e(m).name,t),de.success("Endpoint Updated",`Endpoint ${e(m).name} has been updated successfully.`),y()}catch(t){s(ue,Ae(t))}}async function nt(){if(e(A)){try{e(A).endpoint_type==="github"?await ee.deleteGithubEndpoint(e(A).name):await ee.deleteGiteaEndpoint(e(A).name),de.success("Endpoint Deleted",`Endpoint ${e(A).name} has been deleted successfully.`)}catch(t){const n=Ae(t);de.error("Delete Failed",n)}y()}}function Ue(t){const c=t.target.files?.[0];if(!c){g(r,e(r).ca_cert_bundle="");return}const v=new FileReader;v.onload=d=>{const f=d.target?.result;g(r,e(r).ca_cert_bundle=btoa(f))},v.readAsText(c)}function fe(){return!(!e(r).name||!e(r).description||!e(r).base_url||e(r).endpoint_type==="github"&&!e(r).api_base_url)}Z(()=>(e(O),q()),()=>{(!e(O).length||q().loaded.endpoints)&&s(O,q().endpoints)}),Z(()=>q(),()=>{s(le,q().loading.endpoints)}),Z(()=>q(),()=>{s(ve,q().errorMessages.endpoints)}),Z(()=>(e(O),e(ce)),()=>{s(H,Bt(e(O),e(ce)))}),Z(()=>(e(J),e(H),e(K),e(L)),()=>{s(J,Math.ceil(e(H).length/e(K))),e(L)>e(J)&&e(J)>0&&s(L,e(J))}),Z(()=>(e(H),e(L),e(K)),()=>{s(Re,Ut(e(H),e(L),e(K)))}),_t(),bt();var Le=qt();b("keydown",vt,at),mt(t=>{xt.title="Endpoints - GARM"});var ke=Ce(Le),Me=o(ke);Ct(Me,{title:"Endpoints",description:"Manage your GitHub and Gitea endpoints for runner management.",actionLabel:"Add Endpoint",$$events:{action:tt}});var dt=a(Me,2);{let t=Ee(()=>e(ve)||e(ue)),n=Ee(()=>!!e(ve));Pt(dt,{get columns(){return Je},get data(){return e(Re)},get loading(){return e(le)},get error(){return e(t)},get searchTerm(){return e(ce)},searchPlaceholder:"Search endpoints by name, description, or URL...",get currentPage(){return e(L)},get perPage(){return e(K)},get totalPages(){return e(J)},get totalItems(){return e(H),C(()=>e(H).length)},itemName:"endpoints",emptyIconType:"settings",get showRetry(){return e(n)},get mobileCardConfig(){return Qe},$$events:{search:We,pageChange:Xe,perPageChange:Ye,retry:Ke,edit:Ze,delete:et},$$slots:{"mobile-card":(c,v)=>{const d=Ee(()=>v.item);var f=Mt(),x=o(f),R=o(x),P=o(R),w=o(P,!0);i(P);var _=a(P,2),M=o(_,!0);i(_);var B=a(_,2),T=o(B);wt(T,()=>(ie($e),ie(e(d)),C(()=>$e(e(d).endpoint_type||"","w-5 h-5"))));var D=a(T,2),Q=o(D,!0);i(D),i(B),i(R),i(x);var N=a(x,2),z=o(N);qe(z,{action:"edit",size:"sm",title:"Edit endpoint",ariaLabel:"Edit endpoint",$$events:{click:()=>xe(e(d))}});var W=a(z,2);qe(W,{action:"delete",size:"sm",title:"Delete endpoint",ariaLabel:"Delete endpoint",$$events:{click:()=>he(e(d))}}),i(N),i(f),ye(()=>{se(w,(ie(e(d)),C(()=>e(d).name))),se(M,(ie(e(d)),C(()=>e(d).description))),se(Q,(ie(e(d)),C(()=>e(d).endpoint_type)))}),I(c,f)}}})}i(ke);var Te=a(ke,2);{var lt=t=>{var n=Ft(),c=o(n),v=a(c,2),d=o(v),f=a(o(d),2);i(d);var x=a(d,2),R=o(x);Et(R,{get selectedForgeType(){return e(G)},set selectedForgeType(u){s(G,u)},$$events:{select:rt},$$legacy:!0});var P=a(R,2),w=a(o(P),2);U(w),i(P);var _=a(P,2),M=a(o(_),2);Ie(M),i(_);var B=a(_,2),T=a(o(B),2);U(T),i(B);var D=a(B,2);{var Q=u=>{var $=Tt(),l=Ce($),h=a(o(l),2);U(h),i(l);var F=a(l,2),S=a(o(F),2);U(S),i(F),E(h,()=>e(r).api_base_url,Y=>g(r,e(r).api_base_url=Y)),E(S,()=>e(r).upload_base_url,Y=>g(r,e(r).upload_base_url=Y)),I(u,$)},N=u=>{var $=Dt(),l=a(o($),2);U(l),V(2),i($),E(l,()=>e(r).api_base_url,h=>g(r,e(r).api_base_url=h)),I(u,$)};ne(D,u=>{e(G)==="github"?u(Q):u(N,!1)})}var z=a(D,2),W=a(o(z),2),X=o(W),te=a(X,2),re=a(o(te),2),_e=o(re);V(),i(re),V(2),i(te),i(W),i(z);var ae=a(z,2),me=o(ae),oe=a(me,2);i(ae),i(x),i(v),i(n),ye((u,$)=>{je(w,"placeholder",e(G)==="github"?"e.g., github-enterprise or github-com":"e.g., gitea-main or my-gitea"),je(T,"placeholder",e(G)==="github"?"https://github.com or https://github.example.com":"https://gitea.example.com"),oe.disabled=u,Ge(oe,1,`px-4 py-2 text-sm font-medium text-white rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors ${$??""}`)},[()=>C(()=>!fe()),()=>C(()=>fe()?"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500 cursor-pointer":"bg-gray-400 cursor-not-allowed")]),b("click",c,y),b("click",f,y),E(w,()=>e(r).name,u=>g(r,e(r).name=u)),E(M,()=>e(r).description,u=>g(r,e(r).description=u)),E(T,()=>e(r).base_url,u=>g(r,e(r).base_url=u)),b("change",X,Ue),b("click",_e,()=>document.getElementById("ca_cert_file")?.click()),b("click",me,y),b("submit",x,ze(it)),I(t,n)};ne(Te,t=>{e(pe)&&t(lt)})}var De=a(Te,2);{var ut=t=>{var n=Gt(),c=o(n),v=a(c,2),d=o(v),f=o(d),x=o(f),R=o(x);i(x),V(2),i(f);var P=a(f,2);i(d);var w=a(d,2),_=o(w),M=a(o(_),2);U(M),i(_);var B=a(_,2),T=a(o(B),2);Ie(T),i(B);var D=a(B,2),Q=a(o(D),2);U(Q),i(D);var N=a(D,2);{var z=l=>{var h=It(),F=Ce(h),S=a(o(F),2);U(S),i(F);var Y=a(F,2),Fe=a(o(Y),2);U(Fe),i(Y),E(S,()=>e(r).api_base_url,we=>g(r,e(r).api_base_url=we)),E(Fe,()=>e(r).upload_base_url,we=>g(r,e(r).upload_base_url=we)),I(l,h)},W=l=>{var h=jt(),F=a(o(h),2);U(F),V(2),i(h),E(F,()=>e(r).api_base_url,S=>g(r,e(r).api_base_url=S)),I(l,h)};ne(N,l=>{e(m),C(()=>e(m).endpoint_type==="github")?l(z):l(W,!1)})}var X=a(N,2),te=a(o(X),2),re=o(te),_e=a(re,2),ae=a(o(_e),2),me=o(ae);V(),i(ae),V(2),i(_e),i(te),i(X);var oe=a(X,2),u=o(oe),$=a(u,2);i(oe),i(w),i(v),i(n),ye((l,h)=>{se(R,`Edit ${e(m),C(()=>e(m).endpoint_type==="github"?"GitHub":"Gitea")??""} Endpoint`),$.disabled=l,Ge($,1,`px-4 py-2 text-sm font-medium text-white rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors ${h??""}`)},[()=>C(()=>!fe()),()=>C(()=>fe()?"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500 cursor-pointer":"bg-gray-400 cursor-not-allowed")]),b("click",c,y),b("click",P,y),E(M,()=>e(r).name,l=>g(r,e(r).name=l)),E(T,()=>e(r).description,l=>g(r,e(r).description=l)),E(Q,()=>e(r).base_url,l=>g(r,e(r).base_url=l)),b("change",re,Ue),b("click",me,()=>document.getElementById("edit_ca_cert_file")?.click()),b("click",u,y),b("submit",w,ze(st)),I(t,n)};ne(De,t=>{e(be)&&e(m)&&t(ut)})}var ct=a(De,2);{var pt=t=>{var n=zt(),c=o(n),v=a(c,2),d=o(v),f=o(d),x=a(o(f),2),R=a(o(x),2),P=o(R);i(R),i(x),i(f),i(d);var w=a(d,2),_=o(w),M=a(_,2);i(w),i(v),i(n),ye(()=>se(P,`Are you sure you want to delete the endpoint "${e(A),C(()=>e(A).name)??""}"? This action cannot be undone.`)),b("click",c,y),b("click",_,y),b("click",M,nt),I(t,n)};ne(ct,t=>{e(ge)&&e(A)&&t(pt)})}I(Ne,Le),yt(),Oe()}export{or as component}; diff --git a/webapp/assets/_app/immutable/nodes/5.BtWUgRCe.js b/webapp/assets/_app/immutable/nodes/5.BtWUgRCe.js deleted file mode 100644 index de157392..00000000 --- a/webapp/assets/_app/immutable/nodes/5.BtWUgRCe.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Ge}from"../chunks/B3Pzt0F_.js";import{p as Se,E as Ie,o as Be,l as w,s as r,m as n,g as e,a as He,f as M,k as o,j as i,r as l,c as $,t as N,v as K,x as $e,u as v,z as Je,y as Z,e as Ce,d as Re,B as Ve,b as Ue,h as We,$ as Ye,n as A,q as ee}from"../chunks/D8EpLgQ1.js";import{a as Le,i as B,s as Ne}from"../chunks/5WA7h8uK.js";import{r as Pe,b as Me,c as Ke,g as ve}from"../chunks/CiE1LlKV.js";import{b as De}from"../chunks/D3_ugSUS.js";import{P as Oe}from"../chunks/CO4LUyTP.js";import{e as Qe,i as Xe}from"../chunks/u94nIB4-.js";import{b as Te}from"../chunks/C6k1Q4We.js";import{p as Ze}from"../chunks/D4Caz1gY.js";import{M as et}from"../chunks/qB7B8uiS.js";import{e as re}from"../chunks/BZiHL9L3.js";import{e as qe,a as he}from"../chunks/wyaP0EDu.js";import{U as tt}from"../chunks/CIBm3n2u.js";import{D as rt}from"../chunks/KQ2xQpA3.js";import{t as te}from"../chunks/BEkVdVE1.js";import{B as at,k as ye,l as st}from"../chunks/D5ucq3Gx.js";import{D as ot,A as Ae,G as nt,a as it}from"../chunks/B_CZMFLe.js";import{E as lt}from"../chunks/C9H3KoyH.js";import{E as dt}from"../chunks/DMCMHBOH.js";import{S as ct}from"../chunks/dB1NgJWc.js";var ut=M('

'),pt=M('

Loading...

'),mt=M(""),ft=M('

Loading credentials...

'),gt=M('

No GitHub credentials found. Please create GitHub credentials first.

'),bt=M(`

You'll need to manually configure this secret in GitHub's enterprise webhook settings.

`),vt=M('

Create Enterprise

Enterprises are only available for GitHub endpoints.

');function yt(ae,se){Se(se,!1);const[oe,ne]=Ne(),u=()=>Le(qe,"$eagerCache",oe),G=n(),h=n(),p=n(),H=n(),E=Ie();let x=n(!1),y=n(""),a=n({name:"",credentials_name:"",webhook_secret:"",pool_balancer_type:"roundrobin"});async function _(){if(!u().loaded.credentials&&!u().loading.credentials)try{await he.getCredentials()}catch(m){r(y,re(m))}}async function C(){if(!e(a).name||!e(a).name.trim()){r(y,"Enterprise name is required");return}if(!e(a).credentials_name){r(y,"Please select credentials");return}try{r(x,!0),r(y,"");const m={...e(a)};E("submit",m)}catch(m){r(y,re(m)),r(x,!1)}}Be(()=>{_()}),w(()=>u(),()=>{r(G,u().credentials)}),w(()=>u(),()=>{r(h,u().loading.credentials)}),w(()=>e(G),()=>{r(p,e(G).filter(m=>m.forge_type==="github"))}),w(()=>e(a),()=>{r(H,e(a).name&&e(a).name.trim()!==""&&e(a).credentials_name!==""&&e(a).webhook_secret&&e(a).webhook_secret.trim()!=="")}),He(),Ge(),et(ae,{$$events:{close:()=>E("close")},children:(m,q)=>{var D=vt(),d=o(i(D),4);{var ie=f=>{var g=ut(),T=i(g),R=i(T,!0);l(T),l(g),N(()=>K(R,e(y))),$(f,g)};B(d,f=>{e(y)&&f(ie)})}var le=o(d,2);{var de=f=>{var g=pt();$(f,g)},ce=f=>{var g=bt(),T=i(g),R=o(i(T),2);Pe(R),l(T);var z=o(T,2),U=o(i(z),2);N(()=>{e(a),$e(()=>{e(p)})});var j=i(U);j.value=j.__value="";var ue=o(j);Qe(ue,1,()=>e(p),Xe,(s,c)=>{var P=mt(),b=i(P);l(P);var k={};N(()=>{K(b,`${e(c),v(()=>e(c).name)??""} (${e(c),v(()=>e(c).endpoint?.name||"Unknown endpoint")??""})`),k!==(k=(e(c),v(()=>e(c).name)))&&(P.value=(P.__value=(e(c),v(()=>e(c).name)))??"")}),$(s,P)}),l(U);var pe=o(U,2);{var me=s=>{var c=ft();$(s,c)},O=s=>{var c=Ve(),P=Ue(c);{var b=k=>{var Y=gt();$(k,Y)};B(P,k=>{e(p),v(()=>e(p).length===0)&&k(b)},!0)}$(s,c)};B(pe,s=>{e(h)?s(me):s(O,!1)})}l(z);var S=o(z,2),L=o(i(S),2);N(()=>{e(a),$e(()=>{})});var F=i(L);F.value=F.__value="roundrobin";var I=o(F);I.value=I.__value="pack",l(L),l(S);var J=o(S,2),V=o(i(J),2);Pe(V),Je(2),l(J);var Q=o(J,2),X=i(Q),W=o(X,2),t=i(W,!0);l(W),l(Q),l(g),N(()=>{W.disabled=(e(x),e(h),e(H),e(p),v(()=>e(x)||e(h)||!e(H)||e(p).length===0)),K(t,e(x)?"Creating...":"Create Enterprise")}),Te(R,()=>e(a).name,s=>Z(a,e(a).name=s)),Me(U,()=>e(a).credentials_name,s=>Z(a,e(a).credentials_name=s)),Me(L,()=>e(a).pool_balancer_type,s=>Z(a,e(a).pool_balancer_type=s)),Te(V,()=>e(a).webhook_secret,s=>Z(a,e(a).webhook_secret=s)),Ce("click",X,()=>E("close")),Ce("submit",g,Ze(C)),$(f,g)};B(le,f=>{e(x)?f(de):f(ce,!1)})}l(D),$(m,D)},$$slots:{default:!0}}),Re(),ne()}var ht=M(''),_t=M('
',1);function jt(ae,se){Se(se,!1);const[oe,ne]=Ne(),u=()=>Le(qe,"$eagerCache",oe),G=n(),h=n(),p=n(),H=n();let E=n([]),x=n(!0),y=n(""),a=n(""),_=n(1),C=n(25),m=n(!1),q=n(!1),D=n(!1),d=n(null);async function ie(t){try{r(y,""),await ve.createEnterprise(t),te.success("Enterprise Created",`Enterprise ${t.name} has been created successfully.`),r(m,!1)}catch(s){throw r(y,re(s)),s}}async function le(t){if(e(d))try{await ve.updateEnterprise(e(d).id,t),te.success("Enterprise Updated",`Enterprise ${e(d).name} has been updated successfully.`),r(q,!1),r(d,null)}catch(s){throw s}}async function de(){if(e(d))try{r(y,""),await ve.deleteEnterprise(e(d).id),te.success("Enterprise Deleted",`Enterprise ${e(d).name} has been deleted successfully.`),r(D,!1),r(d,null)}catch(t){const s=re(t);te.error("Delete Failed",s)}}function ce(){r(m,!0)}function f(t){r(d,t),r(q,!0)}function g(t){r(d,t),r(D,!0)}Be(async()=>{try{r(x,!0);const t=await he.getEnterprises();t&&Array.isArray(t)&&r(E,t)}catch(t){console.error("Failed to load enterprises:",t),r(y,t instanceof Error?t.message:"Failed to load enterprises")}finally{r(x,!1)}});async function T(){try{await he.retryResource("enterprises")}catch(t){console.error("Retry failed:",t)}}const R=[{key:"name",title:"Name",cellComponent:lt,cellProps:{entityType:"enterprise"}},{key:"endpoint",title:"Endpoint",cellComponent:dt},{key:"credentials",title:"Credentials",cellComponent:nt,cellProps:{field:"credentials_name"}},{key:"status",title:"Status",cellComponent:ct,cellProps:{statusType:"entity"}},{key:"actions",title:"Actions",align:"right",cellComponent:it}],z={entityType:"enterprise",primaryText:{field:"name",isClickable:!0,href:"/enterprises/{id}"},secondaryText:{field:"credentials_name"},badges:[{type:"custom",value:t=>ye(t)}],actions:[{type:"edit",handler:t=>f(t)},{type:"delete",handler:t=>g(t)}]};function U(t){r(a,t.detail.term),r(_,1)}function j(t){r(_,t.detail.page)}function ue(t){r(C,t.detail.perPage),r(_,1)}function pe(t){f(t.detail.item)}function me(t){g(t.detail.item)}w(()=>(e(E),u()),()=>{(!e(E).length||u().loaded.enterprises)&&r(E,u().enterprises)}),w(()=>u(),()=>{r(x,u().loading.enterprises)}),w(()=>u(),()=>{r(G,u().errorMessages.enterprises)}),w(()=>(e(E),e(a)),()=>{r(h,st(e(E),e(a)))}),w(()=>(e(h),e(C)),()=>{r(p,Math.ceil(e(h).length/e(C)))}),w(()=>(e(_),e(p)),()=>{e(_)>e(p)&&e(p)>0&&r(_,e(p))}),w(()=>(e(h),e(_),e(C)),()=>{r(H,e(h).slice((e(_)-1)*e(C),e(_)*e(C)))}),He(),Ge();var O=_t();We(t=>{Ye.title="Enterprises - GARM"});var S=Ue(O),L=i(S);Oe(L,{title:"Enterprises",description:"Manage GitHub enterprises",actionLabel:"Add Enterprise",$$events:{action:ce}});var F=o(L,2);{let t=ee(()=>e(G)||e(y)),s=ee(()=>!!e(G));ot(F,{get columns(){return R},get data(){return e(H)},get loading(){return e(x)},get error(){return e(t)},get searchTerm(){return e(a)},searchPlaceholder:"Search enterprises...",get currentPage(){return e(_)},get perPage(){return e(C)},get totalPages(){return e(p)},get totalItems(){return e(h),v(()=>e(h).length)},itemName:"enterprises",emptyIconType:"building",get showRetry(){return e(s)},get mobileCardConfig(){return z},$$events:{search:U,pageChange:j,perPageChange:ue,retry:T,edit:pe,delete:me},$$slots:{"mobile-card":(c,P)=>{const b=ee(()=>P.item),k=ee(()=>(A(ye),A(e(b)),v(()=>ye(e(b)))));var Y=ht(),fe=i(Y),ge=i(fe),be=i(ge),ze=i(be,!0);l(be);var _e=o(be,2),je=i(_e,!0);l(_e),l(ge),l(fe);var xe=o(fe,2),ke=i(xe);at(ke,{get variant(){return A(e(k)),v(()=>e(k).variant)},get text(){return A(e(k)),v(()=>e(k).text)}});var we=o(ke,2),Ee=i(we);Ae(Ee,{action:"edit",size:"sm",title:"Edit enterprise",ariaLabel:"Edit enterprise",$$events:{click:()=>f(e(b))}});var Fe=o(Ee,2);Ae(Fe,{action:"delete",size:"sm",title:"Delete enterprise",ariaLabel:"Delete enterprise",$$events:{click:()=>g(e(b))}}),l(we),l(xe),l(Y),N(()=>{Ke(ge,"href",(A(De),A(e(b)),v(()=>`${De}/enterprises/${e(b).id}`))),K(ze,(A(e(b)),v(()=>e(b).name))),K(je,(A(e(b)),v(()=>e(b).credentials_name)))}),$(c,Y)}}})}l(S);var I=o(S,2);{var J=t=>{yt(t,{$$events:{close:()=>r(m,!1),submit:s=>ie(s.detail)}})};B(I,t=>{e(m)&&t(J)})}var V=o(I,2);{var Q=t=>{tt(t,{get entity(){return e(d)},entityType:"enterprise",$$events:{close:()=>{r(q,!1),r(d,null)},submit:s=>le(s.detail)}})};B(V,t=>{e(q)&&e(d)&&t(Q)})}var X=o(V,2);{var W=t=>{rt(t,{title:"Delete Enterprise",message:"Are you sure you want to delete this enterprise? This action cannot be undone.",get itemName(){return e(d),v(()=>e(d).name)},$$events:{close:()=>{r(D,!1),r(d,null)},confirm:de}})};B(X,t=>{e(D)&&e(d)&&t(W)})}$(ae,O),Re(),ne()}export{jt as component}; diff --git a/webapp/assets/_app/immutable/nodes/5.BtwOyDJ_.js b/webapp/assets/_app/immutable/nodes/5.BtwOyDJ_.js new file mode 100644 index 00000000..113dc039 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/5.BtwOyDJ_.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as Ge}from"../chunks/zNh6Oe5P.js";import{p as Se,E as Je,o as Be,l as w,s as r,m as n,g as e,a as He,f as M,k as o,j as i,r as l,c as $,t as N,v as K,x as $e,u as b,z as Ve,y as Z,e as Ce,d as Re,B as We,b as Ue,h as Ye,$ as Ke,n as A,q as ee}from"../chunks/sWNKMed7.js";import{a as Le,i as B,s as Ne}from"../chunks/Ccl3fNd2.js";import{r as Pe,b as Me,d as De,c as Oe,g as be}from"../chunks/t8NOL8UT.js";import{P as Qe}from"../chunks/sdr-JCKi.js";import{e as Xe,i as Ze}from"../chunks/BuuPrWMc.js";import{b as Te}from"../chunks/CLagxtgo.js";import{p as et}from"../chunks/D4Caz1gY.js";import{M as tt}from"../chunks/-99ewtnX.js";import{e as re}from"../chunks/BZiHL9L3.js";import{e as qe,a as he}from"../chunks/UPGsoYWO.js";import{U as rt}from"../chunks/nqMQkPXF.js";import{D as at}from"../chunks/Dxyf9P7U.js";import{t as te}from"../chunks/BZUCTtPY.js";import{B as st,k as ye,l as ot}from"../chunks/Cbkm53HO.js";import{D as nt,A as Ae,G as it,a as lt}from"../chunks/WvS03pW2.js";import{E as dt}from"../chunks/CfvU88k5.js";import{E as ct}from"../chunks/CC0e8UY8.js";import{S as ut}from"../chunks/C7WQ-JBG.js";var pt=M('

'),mt=M('

Loading...

'),ft=M(""),gt=M('

Loading credentials...

'),vt=M('

No GitHub credentials found. Please create GitHub credentials first.

'),bt=M(`

You'll need to manually configure this secret in GitHub's enterprise webhook settings.

`),yt=M('

Create Enterprise

Enterprises are only available for GitHub endpoints.

');function ht(ae,se){Se(se,!1);const[oe,ne]=Ne(),u=()=>Le(qe,"$eagerCache",oe),G=n(),h=n(),p=n(),H=n(),E=Je();let x=n(!1),y=n(""),a=n({name:"",credentials_name:"",webhook_secret:"",pool_balancer_type:"roundrobin"});async function _(){if(!u().loaded.credentials&&!u().loading.credentials)try{await he.getCredentials()}catch(m){r(y,re(m))}}async function C(){if(!e(a).name||!e(a).name.trim()){r(y,"Enterprise name is required");return}if(!e(a).credentials_name){r(y,"Please select credentials");return}try{r(x,!0),r(y,"");const m={...e(a)};E("submit",m)}catch(m){r(y,re(m)),r(x,!1)}}Be(()=>{_()}),w(()=>u(),()=>{r(G,u().credentials)}),w(()=>u(),()=>{r(h,u().loading.credentials)}),w(()=>e(G),()=>{r(p,e(G).filter(m=>m.forge_type==="github"))}),w(()=>e(a),()=>{r(H,e(a).name&&e(a).name.trim()!==""&&e(a).credentials_name!==""&&e(a).webhook_secret&&e(a).webhook_secret.trim()!=="")}),He(),Ge(),tt(ae,{$$events:{close:()=>E("close")},children:(m,q)=>{var D=yt(),d=o(i(D),4);{var ie=f=>{var g=pt(),T=i(g),R=i(T,!0);l(T),l(g),N(()=>K(R,e(y))),$(f,g)};B(d,f=>{e(y)&&f(ie)})}var le=o(d,2);{var de=f=>{var g=mt();$(f,g)},ce=f=>{var g=bt(),T=i(g),R=o(i(T),2);Pe(R),l(T);var z=o(T,2),U=o(i(z),2);N(()=>{e(a),$e(()=>{e(p)})});var j=i(U);j.value=j.__value="";var ue=o(j);Xe(ue,1,()=>e(p),Ze,(s,c)=>{var P=ft(),v=i(P);l(P);var k={};N(()=>{K(v,`${e(c),b(()=>e(c).name)??""} (${e(c),b(()=>e(c).endpoint?.name||"Unknown endpoint")??""})`),k!==(k=(e(c),b(()=>e(c).name)))&&(P.value=(P.__value=(e(c),b(()=>e(c).name)))??"")}),$(s,P)}),l(U);var pe=o(U,2);{var me=s=>{var c=gt();$(s,c)},O=s=>{var c=We(),P=Ue(c);{var v=k=>{var Y=vt();$(k,Y)};B(P,k=>{e(p),b(()=>e(p).length===0)&&k(v)},!0)}$(s,c)};B(pe,s=>{e(h)?s(me):s(O,!1)})}l(z);var S=o(z,2),L=o(i(S),2);N(()=>{e(a),$e(()=>{})});var F=i(L);F.value=F.__value="roundrobin";var I=o(F);I.value=I.__value="pack",l(L),l(S);var J=o(S,2),V=o(i(J),2);Pe(V),Ve(2),l(J);var Q=o(J,2),X=i(Q),W=o(X,2),t=i(W,!0);l(W),l(Q),l(g),N(()=>{W.disabled=(e(x),e(h),e(H),e(p),b(()=>e(x)||e(h)||!e(H)||e(p).length===0)),K(t,e(x)?"Creating...":"Create Enterprise")}),Te(R,()=>e(a).name,s=>Z(a,e(a).name=s)),Me(U,()=>e(a).credentials_name,s=>Z(a,e(a).credentials_name=s)),Me(L,()=>e(a).pool_balancer_type,s=>Z(a,e(a).pool_balancer_type=s)),Te(V,()=>e(a).webhook_secret,s=>Z(a,e(a).webhook_secret=s)),Ce("click",X,()=>E("close")),Ce("submit",g,et(C)),$(f,g)};B(le,f=>{e(x)?f(de):f(ce,!1)})}l(D),$(m,D)},$$slots:{default:!0}}),Re(),ne()}var _t=M(''),xt=M('
',1);function jt(ae,se){Se(se,!1);const[oe,ne]=Ne(),u=()=>Le(qe,"$eagerCache",oe),G=n(),h=n(),p=n(),H=n();let E=n([]),x=n(!0),y=n(""),a=n(""),_=n(1),C=n(25),m=n(!1),q=n(!1),D=n(!1),d=n(null);async function ie(t){try{r(y,""),await be.createEnterprise(t),te.success("Enterprise Created",`Enterprise ${t.name} has been created successfully.`),r(m,!1)}catch(s){throw r(y,re(s)),s}}async function le(t){if(e(d))try{await be.updateEnterprise(e(d).id,t),te.success("Enterprise Updated",`Enterprise ${e(d).name} has been updated successfully.`),r(q,!1),r(d,null)}catch(s){throw s}}async function de(){if(e(d))try{r(y,""),await be.deleteEnterprise(e(d).id),te.success("Enterprise Deleted",`Enterprise ${e(d).name} has been deleted successfully.`),r(D,!1),r(d,null)}catch(t){const s=re(t);te.error("Delete Failed",s)}}function ce(){r(m,!0)}function f(t){r(d,t),r(q,!0)}function g(t){r(d,t),r(D,!0)}Be(async()=>{try{r(x,!0);const t=await he.getEnterprises();t&&Array.isArray(t)&&r(E,t)}catch(t){console.error("Failed to load enterprises:",t),r(y,t instanceof Error?t.message:"Failed to load enterprises")}finally{r(x,!1)}});async function T(){try{await he.retryResource("enterprises")}catch(t){console.error("Retry failed:",t)}}const R=[{key:"name",title:"Name",cellComponent:dt,cellProps:{entityType:"enterprise"}},{key:"endpoint",title:"Endpoint",cellComponent:ct},{key:"credentials",title:"Credentials",cellComponent:it,cellProps:{field:"credentials_name"}},{key:"status",title:"Status",cellComponent:ut,cellProps:{statusType:"entity"}},{key:"actions",title:"Actions",align:"right",cellComponent:lt}],z={entityType:"enterprise",primaryText:{field:"name",isClickable:!0,href:"/enterprises/{id}"},secondaryText:{field:"credentials_name"},badges:[{type:"custom",value:t=>ye(t)}],actions:[{type:"edit",handler:t=>f(t)},{type:"delete",handler:t=>g(t)}]};function U(t){r(a,t.detail.term),r(_,1)}function j(t){r(_,t.detail.page)}function ue(t){r(C,t.detail.perPage),r(_,1)}function pe(t){f(t.detail.item)}function me(t){g(t.detail.item)}w(()=>(e(E),u()),()=>{(!e(E).length||u().loaded.enterprises)&&r(E,u().enterprises)}),w(()=>u(),()=>{r(x,u().loading.enterprises)}),w(()=>u(),()=>{r(G,u().errorMessages.enterprises)}),w(()=>(e(E),e(a)),()=>{r(h,ot(e(E),e(a)))}),w(()=>(e(h),e(C)),()=>{r(p,Math.ceil(e(h).length/e(C)))}),w(()=>(e(_),e(p)),()=>{e(_)>e(p)&&e(p)>0&&r(_,e(p))}),w(()=>(e(h),e(_),e(C)),()=>{r(H,e(h).slice((e(_)-1)*e(C),e(_)*e(C)))}),He(),Ge();var O=xt();Ye(t=>{Ke.title="Enterprises - GARM"});var S=Ue(O),L=i(S);Qe(L,{title:"Enterprises",description:"Manage GitHub enterprises",actionLabel:"Add Enterprise",$$events:{action:ce}});var F=o(L,2);{let t=ee(()=>e(G)||e(y)),s=ee(()=>!!e(G));nt(F,{get columns(){return R},get data(){return e(H)},get loading(){return e(x)},get error(){return e(t)},get searchTerm(){return e(a)},searchPlaceholder:"Search enterprises...",get currentPage(){return e(_)},get perPage(){return e(C)},get totalPages(){return e(p)},get totalItems(){return e(h),b(()=>e(h).length)},itemName:"enterprises",emptyIconType:"building",get showRetry(){return e(s)},get mobileCardConfig(){return z},$$events:{search:U,pageChange:j,perPageChange:ue,retry:T,edit:pe,delete:me},$$slots:{"mobile-card":(c,P)=>{const v=ee(()=>P.item),k=ee(()=>(A(ye),A(e(v)),b(()=>ye(e(v)))));var Y=_t(),fe=i(Y),ge=i(fe),ve=i(ge),ze=i(ve,!0);l(ve);var _e=o(ve,2),je=i(_e,!0);l(_e),l(ge),l(fe);var xe=o(fe,2),ke=i(xe);st(ke,{get variant(){return A(e(k)),b(()=>e(k).variant)},get text(){return A(e(k)),b(()=>e(k).text)}});var we=o(ke,2),Ee=i(we);Ae(Ee,{action:"edit",size:"sm",title:"Edit enterprise",ariaLabel:"Edit enterprise",$$events:{click:()=>f(e(v))}});var Fe=o(Ee,2);Ae(Fe,{action:"delete",size:"sm",title:"Delete enterprise",ariaLabel:"Delete enterprise",$$events:{click:()=>g(e(v))}}),l(we),l(xe),l(Y),N(Ie=>{Oe(ge,"href",Ie),K(ze,(A(e(v)),b(()=>e(v).name))),K(je,(A(e(v)),b(()=>e(v).credentials_name)))},[()=>(A(De),A(e(v)),b(()=>De(`/enterprises/${e(v).id}`)))]),$(c,Y)}}})}l(S);var I=o(S,2);{var J=t=>{ht(t,{$$events:{close:()=>r(m,!1),submit:s=>ie(s.detail)}})};B(I,t=>{e(m)&&t(J)})}var V=o(I,2);{var Q=t=>{rt(t,{get entity(){return e(d)},entityType:"enterprise",$$events:{close:()=>{r(q,!1),r(d,null)},submit:s=>le(s.detail)}})};B(V,t=>{e(q)&&e(d)&&t(Q)})}var X=o(V,2);{var W=t=>{at(t,{title:"Delete Enterprise",message:"Are you sure you want to delete this enterprise? This action cannot be undone.",get itemName(){return e(d),b(()=>e(d).name)},$$events:{close:()=>{r(D,!1),r(d,null)},confirm:de}})};B(X,t=>{e(D)&&e(d)&&t(W)})}$(ae,O),Re(),ne()}export{jt as component}; diff --git a/webapp/assets/_app/immutable/nodes/6.Bl8qEs3v.js b/webapp/assets/_app/immutable/nodes/6.Bl8qEs3v.js deleted file mode 100644 index dac503c2..00000000 --- a/webapp/assets/_app/immutable/nodes/6.Bl8qEs3v.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Ne}from"../chunks/B3Pzt0F_.js";import{p as qe,o as ze,A as Ge,l as je,a as Re,f as F,h as Ve,b as B,t as G,c as E,d as We,g as e,m as i,s,u as l,$ as Je,j as u,r as f,k as d,v as ie,y as Ke,B as le,q as v,n as Oe}from"../chunks/D8EpLgQ1.js";import{i as g,s as Qe,a as Xe}from"../chunks/5WA7h8uK.js";import{c as Ye,g as y}from"../chunks/CiE1LlKV.js";import{p as Ze}from"../chunks/-1rkm990.js";import{g as de}from"../chunks/DsX4H4sg.js";import{b as j}from"../chunks/D3_ugSUS.js";import{U as et}from"../chunks/CIBm3n2u.js";import{D as ce}from"../chunks/KQ2xQpA3.js";import{E as tt,P as at,a as rt}from"../chunks/DxQgLoe9.js";import{D as st,I as nt}from"../chunks/G-ddPbA8.js";import{g as pe}from"../chunks/D5ucq3Gx.js";import{w as R}from"../chunks/u94nIB4-.js";import{t as D}from"../chunks/BEkVdVE1.js";import{C as ot}from"../chunks/CRD55Dyg.js";import{e as ue}from"../chunks/BZiHL9L3.js";var it=F('

Loading enterprise...

'),lt=F('

'),dt=F(" ",1),ct=F(' ',1);function Tt(fe,me){qe(me,!1);const[ve,ge]=Qe(),V=()=>Xe(Ze,"$page",ve),$=i();let a=i(null),c=i([]),m=i([]),S=i(!0),P=i(""),T=i(!1),M=i(!1),x=i(!1),C=i(!1),p=i(null),k=null,h=i();async function W(){if(e($))try{s(S,!0),s(P,"");const[t,r,n]=await Promise.all([y.getEnterprise(e($)),y.listEnterprisePools(e($)).catch(()=>[]),y.listEnterpriseInstances(e($)).catch(()=>[])]);s(a,t),s(c,r),s(m,n)}catch(t){s(P,t instanceof Error?t.message:"Failed to load enterprise")}finally{s(S,!1)}}function ye(t,r){const{events:n}=t;return{...r,events:n}}async function he(t){if(e(a))try{await y.updateEnterprise(e(a).id,t),await W(),D.success("Enterprise Updated",`Enterprise ${e(a).name} has been updated successfully.`),s(T,!1)}catch(r){throw r}}async function be(){if(e(a)){try{await y.deleteEnterprise(e(a).id),de(`${j}/enterprises`)}catch(t){const r=ue(t);D.error("Delete Failed",r)}s(M,!1)}}async function _e(){if(e(p))try{await y.deleteInstance(e(p).name),D.success("Instance Deleted",`Instance ${e(p).name} has been deleted successfully.`),s(x,!1),s(p,null)}catch(t){const r=ue(t);D.error("Delete Failed",r),s(x,!1),s(p,null)}}function Ee(t){s(p,t),s(x,!0)}function $e(){s(C,!0)}async function xe(t){try{if(!e(a))return;await y.createEnterprisePool(e(a).id,t.detail),D.success("Pool Created",`Pool has been created successfully for enterprise ${e(a).name}.`),s(C,!1)}catch(r){throw r}}function J(){e(h)&&Ke(h,e(h).scrollTop=e(h).scrollHeight)}function Ie(t){if(t.operation==="update"){const r=t.payload;if(e(a)&&r.id===e(a).id){const n=e(a).events?.length||0,o=r.events?.length||0;s(a,ye(e(a),r)),o>n&&setTimeout(()=>{J()},100)}}else if(t.operation==="delete"){const r=t.payload.id||t.payload;e(a)&&e(a).id===r&&de(`${j}/enterprises`)}}function we(t){if(!e(a))return;const r=t.payload;if(r.enterprise_id===e(a).id){if(t.operation==="create")s(c,[...e(c),r]);else if(t.operation==="update")s(c,e(c).map(n=>n.id===r.id?r:n));else if(t.operation==="delete"){const n=r.id||r;s(c,e(c).filter(o=>o.id!==n))}}}function De(t){if(!e(a)||!e(c))return;const r=t.payload;if(e(c).some(o=>o.id===r.pool_id)){if(t.operation==="create")s(m,[...e(m),r]);else if(t.operation==="update")s(m,e(m).map(o=>o.id===r.id?r:o));else if(t.operation==="delete"){const o=r.id||r;s(m,e(m).filter(N=>N.id!==o))}}}ze(()=>{W().then(()=>{e(a)?.events?.length&&setTimeout(()=>{J()},100)});const t=R.subscribeToEntity("enterprise",["update","delete"],Ie),r=R.subscribeToEntity("pool",["create","update","delete"],we),n=R.subscribeToEntity("instance",["create","update","delete"],De);k=()=>{t(),r(),n()}}),Ge(()=>{k&&(k(),k=null)}),je(()=>V(),()=>{s($,V().params.id)}),Re(),Ne();var K=ct();Ve(t=>{G(()=>Je.title=`${e(a),l(()=>e(a)?`${e(a).name} - Enterprise Details`:"Enterprise Details")??""} - GARM`)});var U=B(K),L=u(U),O=u(L),H=u(O),Pe=u(H);f(H);var Q=d(H,2),X=u(Q),Y=d(u(X),2),Te=u(Y,!0);f(Y),f(X),f(Q),f(O),f(L);var Me=d(L,2);{var Ce=t=>{var r=it();E(t,r)},ke=t=>{var r=le(),n=B(r);{var o=b=>{var _=lt(),A=u(_),q=u(A,!0);f(A),f(_),G(()=>ie(q,e(P))),E(b,_)},N=b=>{var _=le(),A=B(_);{var q=z=>{var ae=dt(),re=B(ae);{let I=v(()=>(e(a),l(()=>e(a).name||"Enterprise"))),w=v(()=>(e(a),l(()=>e(a).endpoint?.name))),He=v(()=>(Oe(pe),l(()=>pe("github"))));st(re,{get title(){return e(I)},get subtitle(){return`Endpoint: ${e(w)??""} • GitHub Enterprise`},get forgeIcon(){return e(He)},onEdit:()=>s(T,!0),onDelete:()=>s(M,!0)})}var se=d(re,2);tt(se,{get entity(){return e(a)},entityType:"enterprise"});var ne=d(se,2);{let I=v(()=>(e(a),l(()=>e(a).id||""))),w=v(()=>(e(a),l(()=>e(a).name||"")));at(ne,{get pools(){return e(c)},entityType:"enterprise",get entityId(){return e(I)},get entityName(){return e(w)},$$events:{addPool:$e}})}var oe=d(ne,2);nt(oe,{get instances(){return e(m)},entityType:"enterprise",onDeleteInstance:Ee});var Le=d(oe,2);{let I=v(()=>(e(a),l(()=>e(a)?.events)));rt(Le,{get events(){return e(I)},get eventsContainer(){return e(h)},set eventsContainer(w){s(h,w)},$$legacy:!0})}E(z,ae)};g(A,z=>{e(a)&&z(q)},!0)}E(b,_)};g(n,b=>{e(P)?b(o):b(N,!1)},!0)}E(t,r)};g(Me,t=>{e(S)?t(Ce):t(ke,!1)})}f(U);var Z=d(U,2);{var Ae=t=>{et(t,{get entity(){return e(a)},entityType:"enterprise",$$events:{close:()=>s(T,!1),submit:r=>he(r.detail)}})};g(Z,t=>{e(T)&&e(a)&&t(Ae)})}var ee=d(Z,2);{var Be=t=>{ce(t,{title:"Delete Enterprise",message:"Are you sure you want to delete this enterprise? This action cannot be undone and will remove all associated pools and instances.",get itemName(){return e(a),l(()=>e(a).name)},$$events:{close:()=>s(M,!1),confirm:be}})};g(ee,t=>{e(M)&&e(a)&&t(Be)})}var te=d(ee,2);{var Fe=t=>{ce(t,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(p),l(()=>e(p).name)},$$events:{close:()=>{s(x,!1),s(p,null)},confirm:_e}})};g(te,t=>{e(x)&&e(p)&&t(Fe)})}var Se=d(te,2);{var Ue=t=>{{let r=v(()=>(e(a),l(()=>e(a).id||"")));ot(t,{initialEntityType:"enterprise",get initialEntityId(){return e(r)},$$events:{close:()=>s(C,!1),submit:xe}})}};g(Se,t=>{e(C)&&e(a)&&t(Ue)})}G(()=>{Ye(Pe,"href",`${j}/enterprises`),ie(Te,(e(a),l(()=>e(a)?e(a).name:"Loading...")))}),E(fe,K),We(),ge()}export{Tt as component}; diff --git a/webapp/assets/_app/immutable/nodes/6.DeLLudQb.js b/webapp/assets/_app/immutable/nodes/6.DeLLudQb.js new file mode 100644 index 00000000..e0c3a888 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/6.DeLLudQb.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as qe}from"../chunks/zNh6Oe5P.js";import{p as ze,o as Ge,A as je,l as Re,a as Ve,f as S,h as We,b as B,t as j,c as E,d as Je,u as i,n as ie,v as le,g as e,m as l,j as u,k as d,s,$ as Ke,r as f,y as Oe,B as de,q as v}from"../chunks/sWNKMed7.js";import{i as g,s as Qe,a as Xe}from"../chunks/Ccl3fNd2.js";import{d as F,c as Ye,g as y}from"../chunks/t8NOL8UT.js";import{p as Ze}from"../chunks/-DWf2IZZ.js";import{g as ce}from"../chunks/CaJ57PEy.js";import{U as et}from"../chunks/nqMQkPXF.js";import{D as pe}from"../chunks/Dxyf9P7U.js";import{E as tt,P as at,a as rt}from"../chunks/DJF9YLeI.js";import{D as st,I as nt}from"../chunks/CMejw1Yi.js";import{g as ue}from"../chunks/Cbkm53HO.js";import{w as R}from"../chunks/BuuPrWMc.js";import{t as D}from"../chunks/BZUCTtPY.js";import{C as ot}from"../chunks/Csic5lDL.js";import{e as fe}from"../chunks/BZiHL9L3.js";var it=S('

Loading enterprise...

'),lt=S('

'),dt=S(" ",1),ct=S(' ',1);function Pt(me,ve){ze(ve,!1);const[ge,ye]=Qe(),V=()=>Xe(Ze,"$page",ge),x=l();let a=l(null),c=l([]),m=l([]),U=l(!0),P=l(""),T=l(!1),M=l(!1),$=l(!1),C=l(!1),p=l(null),k=null,h=l();async function W(){if(e(x))try{s(U,!0),s(P,"");const[t,r,n]=await Promise.all([y.getEnterprise(e(x)),y.listEnterprisePools(e(x)).catch(()=>[]),y.listEnterpriseInstances(e(x)).catch(()=>[])]);s(a,t),s(c,r),s(m,n)}catch(t){s(P,t instanceof Error?t.message:"Failed to load enterprise")}finally{s(U,!1)}}function he(t,r){const{events:n}=t;return{...r,events:n}}async function _e(t){if(e(a))try{await y.updateEnterprise(e(a).id,t),await W(),D.success("Enterprise Updated",`Enterprise ${e(a).name} has been updated successfully.`),s(T,!1)}catch(r){throw r}}async function be(){if(e(a)){try{await y.deleteEnterprise(e(a).id),ce(F("/enterprises"))}catch(t){const r=fe(t);D.error("Delete Failed",r)}s(M,!1)}}async function Ee(){if(e(p))try{await y.deleteInstance(e(p).name),D.success("Instance Deleted",`Instance ${e(p).name} has been deleted successfully.`),s($,!1),s(p,null)}catch(t){const r=fe(t);D.error("Delete Failed",r),s($,!1),s(p,null)}}function xe(t){s(p,t),s($,!0)}function $e(){s(C,!0)}async function Ie(t){try{if(!e(a))return;await y.createEnterprisePool(e(a).id,t.detail),D.success("Pool Created",`Pool has been created successfully for enterprise ${e(a).name}.`),s(C,!1)}catch(r){throw r}}function J(){e(h)&&Oe(h,e(h).scrollTop=e(h).scrollHeight)}function we(t){if(t.operation==="update"){const r=t.payload;if(e(a)&&r.id===e(a).id){const n=e(a).events?.length||0,o=r.events?.length||0;s(a,he(e(a),r)),o>n&&setTimeout(()=>{J()},100)}}else if(t.operation==="delete"){const r=t.payload.id||t.payload;e(a)&&e(a).id===r&&ce(F("/enterprises"))}}function De(t){if(!e(a))return;const r=t.payload;if(r.enterprise_id===e(a).id){if(t.operation==="create")s(c,[...e(c),r]);else if(t.operation==="update")s(c,e(c).map(n=>n.id===r.id?r:n));else if(t.operation==="delete"){const n=r.id||r;s(c,e(c).filter(o=>o.id!==n))}}}function Pe(t){if(!e(a)||!e(c))return;const r=t.payload;if(e(c).some(o=>o.id===r.pool_id)){if(t.operation==="create")s(m,[...e(m),r]);else if(t.operation==="update")s(m,e(m).map(o=>o.id===r.id?r:o));else if(t.operation==="delete"){const o=r.id||r;s(m,e(m).filter(q=>q.id!==o))}}}Ge(()=>{W().then(()=>{e(a)?.events?.length&&setTimeout(()=>{J()},100)});const t=R.subscribeToEntity("enterprise",["update","delete"],we),r=R.subscribeToEntity("pool",["create","update","delete"],De),n=R.subscribeToEntity("instance",["create","update","delete"],Pe);k=()=>{t(),r(),n()}}),je(()=>{k&&(k(),k=null)}),Re(()=>V(),()=>{s(x,V().params.id)}),Ve(),qe();var K=ct();We(t=>{j(()=>Ke.title=`${e(a),i(()=>e(a)?`${e(a).name} - Enterprise Details`:"Enterprise Details")??""} - GARM`)});var L=B(K),H=u(L),O=u(H),N=u(O),Te=u(N);f(N);var Q=d(N,2),X=u(Q),Y=d(u(X),2),Me=u(Y,!0);f(Y),f(X),f(Q),f(O),f(H);var Ce=d(H,2);{var ke=t=>{var r=it();E(t,r)},Ae=t=>{var r=de(),n=B(r);{var o=_=>{var b=lt(),A=u(b),z=u(A,!0);f(A),f(b),j(()=>le(z,e(P))),E(_,b)},q=_=>{var b=de(),A=B(b);{var z=G=>{var ae=dt(),re=B(ae);{let I=v(()=>(e(a),i(()=>e(a).name||"Enterprise"))),w=v(()=>(e(a),i(()=>e(a).endpoint?.name))),Ne=v(()=>(ie(ue),i(()=>ue("github"))));st(re,{get title(){return e(I)},get subtitle(){return`Endpoint: ${e(w)??""} • GitHub Enterprise`},get forgeIcon(){return e(Ne)},onEdit:()=>s(T,!0),onDelete:()=>s(M,!0)})}var se=d(re,2);tt(se,{get entity(){return e(a)},entityType:"enterprise"});var ne=d(se,2);{let I=v(()=>(e(a),i(()=>e(a).id||""))),w=v(()=>(e(a),i(()=>e(a).name||"")));at(ne,{get pools(){return e(c)},entityType:"enterprise",get entityId(){return e(I)},get entityName(){return e(w)},$$events:{addPool:$e}})}var oe=d(ne,2);nt(oe,{get instances(){return e(m)},entityType:"enterprise",onDeleteInstance:xe});var He=d(oe,2);{let I=v(()=>(e(a),i(()=>e(a)?.events)));rt(He,{get events(){return e(I)},get eventsContainer(){return e(h)},set eventsContainer(w){s(h,w)},$$legacy:!0})}E(G,ae)};g(A,G=>{e(a)&&G(z)},!0)}E(_,b)};g(n,_=>{e(P)?_(o):_(q,!1)},!0)}E(t,r)};g(Ce,t=>{e(U)?t(ke):t(Ae,!1)})}f(L);var Z=d(L,2);{var Be=t=>{et(t,{get entity(){return e(a)},entityType:"enterprise",$$events:{close:()=>s(T,!1),submit:r=>_e(r.detail)}})};g(Z,t=>{e(T)&&e(a)&&t(Be)})}var ee=d(Z,2);{var Fe=t=>{pe(t,{title:"Delete Enterprise",message:"Are you sure you want to delete this enterprise? This action cannot be undone and will remove all associated pools and instances.",get itemName(){return e(a),i(()=>e(a).name)},$$events:{close:()=>s(M,!1),confirm:be}})};g(ee,t=>{e(M)&&e(a)&&t(Fe)})}var te=d(ee,2);{var Se=t=>{pe(t,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(p),i(()=>e(p).name)},$$events:{close:()=>{s($,!1),s(p,null)},confirm:Ee}})};g(te,t=>{e($)&&e(p)&&t(Se)})}var Ue=d(te,2);{var Le=t=>{{let r=v(()=>(e(a),i(()=>e(a).id||"")));ot(t,{initialEntityType:"enterprise",get initialEntityId(){return e(r)},$$events:{close:()=>s(C,!1),submit:Ie}})}};g(Ue,t=>{e(C)&&e(a)&&t(Le)})}j(t=>{Ye(Te,"href",t),le(Me,(e(a),i(()=>e(a)?e(a).name:"Loading...")))},[()=>(ie(F),i(()=>F("/enterprises")))]),E(me,K),Je(),ye()}export{Pt as component}; diff --git a/webapp/assets/_app/immutable/nodes/7.BZbwCFB-.js b/webapp/assets/_app/immutable/nodes/7.BZbwCFB-.js new file mode 100644 index 00000000..09851a39 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/7.BZbwCFB-.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as Ye}from"../chunks/zNh6Oe5P.js";import{p as Ze,o as er,l as A,a as rr,f as m,h as ar,t as re,g as e,e as tr,c as n,d as dr,m as i,$ as lr,j as a,u,n as $e,k as d,s,r as t,z as L,C as sr,b as or,D as ir,v as Ue,q as nr}from"../chunks/sWNKMed7.js";import{i as p,s as vr,a as mr}from"../chunks/Ccl3fNd2.js";import{B as ze,d as y,c as Me,s as N,r as P}from"../chunks/t8NOL8UT.js";import{b as q}from"../chunks/CLagxtgo.js";import{p as cr}from"../chunks/D4Caz1gY.js";import{g as W}from"../chunks/CaJ57PEy.js";import{a as ur,b as pr}from"../chunks/DKD3N1EI.js";import{t as br}from"../chunks/BZUCTtPY.js";import{e as gr}from"../chunks/BZiHL9L3.js";var fr=m('

Username is required

'),xr=m('

Please enter a valid email address

'),hr=m('

Full name is required

'),yr=m('

Password must be at least 8 characters long

'),kr=m('

Passwords do not match

'),_r=sr(' Advanced Configuration (Optional)',1),wr=m('

URL where runners can fetch metadata and setup information.

URL where runners send status updates and lifecycle events.

URL where GitHub/Gitea will send webhook events for job notifications.

'),$r=m("
  • Enter a username
  • "),Ur=m("
  • Enter a valid email address
  • "),zr=m("
  • Enter your full name
  • "),Mr=m("
  • Enter a password with at least 8 characters
  • "),Rr=m("
  • Confirm your password
  • "),Ar=m('

    Please complete all required fields

    '),Pr=m('

    '),qr=m('
    GARM

    Welcome to GARM

    Complete the first-run setup to get started

    First-Run Initialization

    GARM needs to be initialized before first use. This will create the admin user and generate a unique controller ID for this installation.

    This will create the admin user, generate a unique controller ID, and configure the required URLs for your GARM installation.
    Make sure to remember these credentials as they cannot be recovered.

    ');function Dr(Re,Ae){Ze(Ae,!1);const[Pe,qe]=vr(),C=()=>mr(ur,"$authStore",Pe),_=i(),w=i(),$=i(),U=i(),z=i(),S=i();let f=i("admin"),b=i("admin@garm.local"),c=i(""),x=i(""),h=i("Administrator"),j=i(!1),H=i(""),T=i(!1),I=i(""),E=i(""),V=i("");async function Ce(){if(e(S))try{s(j,!0),s(H,""),await pr.initialize(e(f).trim(),e(b).trim(),e(c),e(h).trim(),{callbackUrl:e(I).trim()||void 0,metadataUrl:e(E).trim()||void 0,webhookUrl:e(V).trim()||void 0}),br.success("GARM Initialized","GARM has been successfully initialized. Welcome!"),W(y("/"))}catch(r){s(H,gr(r))}finally{s(j,!1)}}er(()=>{if(C().isAuthenticated){W(y("/"));return}!C().needsInitialization&&!C().loading&&W(y("/login"))}),A(()=>(e(I),e(E),e(V)),()=>{if(typeof window<"u"){const r=window.location.origin;e(I)||s(I,`${r}/api/v1/callbacks`),e(E)||s(E,`${r}/api/v1/metadata`),e(V)||s(V,`${r}/webhooks`)}}),A(()=>e(b),()=>{s(_,e(b).trim()!==""&&e(b).includes("@"))}),A(()=>e(c),()=>{s(w,e(c).length>=8)}),A(()=>(e(x),e(c)),()=>{s($,e(x).length>0&&e(c)===e(x))}),A(()=>e(f),()=>{s(U,e(f).trim()!=="")}),A(()=>e(h),()=>{s(z,e(h).trim()!=="")}),A(()=>(e(U),e(_),e(z),e(w),e($)),()=>{s(S,e(U)&&e(_)&&e(z)&&e(w)&&e($))}),A(()=>(C(),y),()=>{C().isAuthenticated?W(y("/")):!C().needsInitialization&&!C().loading&&W(y("/login"))}),rr(),Ye();var ae=qr();ar(r=>{lr.title="Initialize GARM - First Run Setup"});var te=a(ae),me=a(te),ce=a(me),Ge=d(ce,2);t(me),L(4),t(te);var ue=d(te,2),pe=d(a(ue),2),de=a(pe),le=a(de),be=d(a(le),2),O=a(be);P(O);var Le=d(O,2);{var Ie=r=>{var l=fr();n(r,l)};p(Le,r=>{e(U),e(f),u(()=>!e(U)&&e(f).length>0)&&r(Ie)})}t(be),t(le);var se=d(le,2),ge=d(a(se),2),J=a(ge);P(J);var Ee=d(J,2);{var Ve=r=>{var l=xr();n(r,l)};p(Ee,r=>{e(_),e(b),u(()=>!e(_)&&e(b).length>0)&&r(Ve)})}t(ge),t(se);var oe=d(se,2),fe=d(a(oe),2),K=a(fe);P(K);var Be=d(K,2);{var Ne=r=>{var l=hr();n(r,l)};p(Be,r=>{e(z),e(h),u(()=>!e(z)&&e(h).length>0)&&r(Ne)})}t(fe),t(oe);var ie=d(oe,2),xe=d(a(ie),2),Q=a(xe);P(Q);var Se=d(Q,2);{var je=r=>{var l=yr();n(r,l)};p(Se,r=>{e(w),e(c),u(()=>!e(w)&&e(c).length>0)&&r(je)})}t(xe),t(ie);var ne=d(ie,2),he=d(a(ne),2),X=a(he);P(X);var Fe=d(X,2);{var De=r=>{var l=kr();n(r,l)};p(Fe,r=>{e($),e(x),u(()=>!e($)&&e(x).length>0)&&r(De)})}t(he),t(ne);var ve=d(ne,2),ye=a(ve);ze(ye,{type:"button",variant:"ghost",size:"sm",$$events:{click:()=>s(T,!e(T))},children:(r,l)=>{var g=_r(),v=or(g);L(),re(()=>N(v,0,`w-4 h-4 mr-2 transition-transform ${e(T)?"rotate-90":""}`)),n(r,g)},$$slots:{default:!0}});var We=d(ye,2);{var He=r=>{var l=wr(),g=a(l),v=a(g),M=d(a(v),2),G=a(M);P(G),L(2),t(M),t(v);var B=d(v,2),Y=d(a(B),2),F=a(Y);P(F),L(2),t(Y),t(B);var Z=d(B,2),D=d(a(Z),2),ee=a(D);P(ee),L(2),t(D),t(Z),t(g),t(l),q(G,()=>e(E),R=>s(E,R)),q(F,()=>e(I),R=>s(I,R)),q(ee,()=>e(V),R=>s(V,R)),n(r,l)};p(We,r=>{e(T)&&r(He)})}t(ve);var ke=d(ve,2);{var Te=r=>{var l=Ar(),g=a(l),v=d(a(g),2),M=d(a(v),2),G=a(M),B=a(G);{var Y=o=>{var k=$r();n(o,k)};p(B,o=>{e(U)||o(Y)})}var F=d(B,2);{var Z=o=>{var k=Ur();n(o,k)};p(F,o=>{e(_)||o(Z)})}var D=d(F,2);{var ee=o=>{var k=zr();n(o,k)};p(D,o=>{e(z)||o(ee)})}var R=d(D,2);{var Ke=o=>{var k=Mr();n(o,k)};p(R,o=>{e(w)||o(Ke)})}var Qe=d(R,2);{var Xe=o=>{var k=Rr();n(o,k)};p(Qe,o=>{e($)||o(Xe)})}t(G),t(M),t(v),t(g),t(l),n(r,l)};p(ke,r=>{e(S),e(f),e(b),e(h),e(c),e(x),u(()=>!e(S)&&(e(f).length>0||e(b).length>0||e(h).length>0||e(c).length>0||e(x).length>0))&&r(Te)})}var _e=d(ke,2);{var Oe=r=>{var l=Pr(),g=a(l),v=d(a(g),2),M=a(v),G=a(M,!0);t(M),t(v),t(g),t(l),re(()=>Ue(G,e(H))),n(r,l)};p(_e,r=>{e(H)&&r(Oe)})}var we=d(_e,2),Je=a(we);{let r=nr(()=>!e(S)||e(j));ze(Je,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,get loading(){return e(j)},get disabled(){return e(r)},children:(l,g)=>{L();var v=ir();re(()=>Ue(v,e(j)?"Initializing...":"Initialize GARM")),n(l,v)},$$slots:{default:!0}})}t(we),t(de),L(2),t(pe),t(ue),t(ae),re((r,l)=>{Me(ce,"src",r),Me(Ge,"src",l),N(O,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(U),e(f),u(()=>!e(U)&&e(f).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(J,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(_),e(b),u(()=>!e(_)&&e(b).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(K,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(z),e(h),u(()=>!e(z)&&e(h).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(Q,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(w),e(c),u(()=>!e(w)&&e(c).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(X,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e($),e(x),u(()=>!e($)&&e(x).length>0?"border-red-300 dark:border-red-600":"")??""}`)},[()=>($e(y),u(()=>y("/assets/garm-light.svg"))),()=>($e(y),u(()=>y("/assets/garm-dark.svg")))]),q(O,()=>e(f),r=>s(f,r)),q(J,()=>e(b),r=>s(b,r)),q(K,()=>e(h),r=>s(h,r)),q(Q,()=>e(c),r=>s(c,r)),q(X,()=>e(x),r=>s(x,r)),tr("submit",de,cr(Ce)),n(Re,ae),dr(),qe()}export{Dr as component}; diff --git a/webapp/assets/_app/immutable/nodes/7.DEMe5MWU.js b/webapp/assets/_app/immutable/nodes/7.DEMe5MWU.js deleted file mode 100644 index 6183a943..00000000 --- a/webapp/assets/_app/immutable/nodes/7.DEMe5MWU.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Xe}from"../chunks/B3Pzt0F_.js";import{p as Ye,o as Ze,l as R,a as er,f as m,h as rr,t as re,g as e,e as ar,c as n,d as tr,m as i,$ as dr,j as a,k as d,s,r as t,z as L,u as h,C as lr,b as sr,D as or,v as $e,q as ir}from"../chunks/D8EpLgQ1.js";import{i as u,s as nr,a as vr}from"../chunks/5WA7h8uK.js";import{B as Ue,r as A,s as N,c as ze}from"../chunks/CiE1LlKV.js";import{b as P}from"../chunks/C6k1Q4We.js";import{p as mr}from"../chunks/D4Caz1gY.js";import{g as W}from"../chunks/DsX4H4sg.js";import{b as q}from"../chunks/D3_ugSUS.js";import{a as cr,b as ur}from"../chunks/duD3WMbl.js";import{t as pr}from"../chunks/BEkVdVE1.js";import{e as br}from"../chunks/BZiHL9L3.js";var gr=m('

    Username is required

    '),fr=m('

    Please enter a valid email address

    '),xr=m('

    Full name is required

    '),hr=m('

    Password must be at least 8 characters long

    '),yr=m('

    Passwords do not match

    '),kr=lr(' Advanced Configuration (Optional)',1),_r=m('

    URL where runners can fetch metadata and setup information.

    URL where runners send status updates and lifecycle events.

    URL where GitHub/Gitea will send webhook events for job notifications.

    '),wr=m("
  • Enter a username
  • "),$r=m("
  • Enter a valid email address
  • "),Ur=m("
  • Enter your full name
  • "),zr=m("
  • Enter a password with at least 8 characters
  • "),Mr=m("
  • Confirm your password
  • "),Rr=m('

    Please complete all required fields

    '),Ar=m('

    '),Pr=m('
    GARM

    Welcome to GARM

    Complete the first-run setup to get started

    First-Run Initialization

    GARM needs to be initialized before first use. This will create the admin user and generate a unique controller ID for this installation.

    This will create the admin user, generate a unique controller ID, and configure the required URLs for your GARM installation.
    Make sure to remember these credentials as they cannot be recovered.

    ');function Dr(Me,Re){Ye(Re,!1);const[Ae,Pe]=nr(),C=()=>vr(cr,"$authStore",Ae),k=i(),_=i(),w=i(),$=i(),U=i(),S=i();let g=i("admin"),p=i("admin@garm.local"),c=i(""),f=i(""),x=i("Administrator"),j=i(!1),H=i(""),T=i(!1),I=i(""),E=i(""),V=i("");async function qe(){if(e(S))try{s(j,!0),s(H,""),await ur.initialize(e(g).trim(),e(p).trim(),e(c),e(x).trim(),{callbackUrl:e(I).trim()||void 0,metadataUrl:e(E).trim()||void 0,webhookUrl:e(V).trim()||void 0}),pr.success("GARM Initialized","GARM has been successfully initialized. Welcome!"),W(`${q}/`)}catch(r){s(H,br(r))}finally{s(j,!1)}}Ze(()=>{if(C().isAuthenticated){W(`${q}/`);return}!C().needsInitialization&&!C().loading&&W(`${q}/login`)}),R(()=>(e(I),e(E),e(V)),()=>{if(typeof window<"u"){const r=window.location.origin;e(I)||s(I,`${r}/api/v1/callbacks`),e(E)||s(E,`${r}/api/v1/metadata`),e(V)||s(V,`${r}/webhooks`)}}),R(()=>e(p),()=>{s(k,e(p).trim()!==""&&e(p).includes("@"))}),R(()=>e(c),()=>{s(_,e(c).length>=8)}),R(()=>(e(f),e(c)),()=>{s(w,e(f).length>0&&e(c)===e(f))}),R(()=>e(g),()=>{s($,e(g).trim()!=="")}),R(()=>e(x),()=>{s(U,e(x).trim()!=="")}),R(()=>(e($),e(k),e(U),e(_),e(w)),()=>{s(S,e($)&&e(k)&&e(U)&&e(_)&&e(w))}),R(()=>(C(),q),()=>{C().isAuthenticated?W(`${q}/`):!C().needsInitialization&&!C().loading&&W(`${q}/login`)}),er(),Xe();var ae=Pr();rr(r=>{dr.title="Initialize GARM - First Run Setup"});var te=a(ae),me=a(te),ce=a(me),Ce=d(ce,2);t(me),L(4),t(te);var ue=d(te,2),pe=d(a(ue),2),de=a(pe),le=a(de),be=d(a(le),2),O=a(be);A(O);var Ge=d(O,2);{var Le=r=>{var l=gr();n(r,l)};u(Ge,r=>{e($),e(g),h(()=>!e($)&&e(g).length>0)&&r(Le)})}t(be),t(le);var se=d(le,2),ge=d(a(se),2),J=a(ge);A(J);var Ie=d(J,2);{var Ee=r=>{var l=fr();n(r,l)};u(Ie,r=>{e(k),e(p),h(()=>!e(k)&&e(p).length>0)&&r(Ee)})}t(ge),t(se);var oe=d(se,2),fe=d(a(oe),2),K=a(fe);A(K);var Ve=d(K,2);{var Be=r=>{var l=xr();n(r,l)};u(Ve,r=>{e(U),e(x),h(()=>!e(U)&&e(x).length>0)&&r(Be)})}t(fe),t(oe);var ie=d(oe,2),xe=d(a(ie),2),Q=a(xe);A(Q);var Ne=d(Q,2);{var Se=r=>{var l=hr();n(r,l)};u(Ne,r=>{e(_),e(c),h(()=>!e(_)&&e(c).length>0)&&r(Se)})}t(xe),t(ie);var ne=d(ie,2),he=d(a(ne),2),X=a(he);A(X);var je=d(X,2);{var Fe=r=>{var l=yr();n(r,l)};u(je,r=>{e(w),e(f),h(()=>!e(w)&&e(f).length>0)&&r(Fe)})}t(he),t(ne);var ve=d(ne,2),ye=a(ve);Ue(ye,{type:"button",variant:"ghost",size:"sm",$$events:{click:()=>s(T,!e(T))},children:(r,l)=>{var b=kr(),v=sr(b);L(),re(()=>N(v,0,`w-4 h-4 mr-2 transition-transform ${e(T)?"rotate-90":""}`)),n(r,b)},$$slots:{default:!0}});var De=d(ye,2);{var We=r=>{var l=_r(),b=a(l),v=a(b),z=d(a(v),2),G=a(z);A(G),L(2),t(z),t(v);var B=d(v,2),Y=d(a(B),2),F=a(Y);A(F),L(2),t(Y),t(B);var Z=d(B,2),D=d(a(Z),2),ee=a(D);A(ee),L(2),t(D),t(Z),t(b),t(l),P(G,()=>e(E),M=>s(E,M)),P(F,()=>e(I),M=>s(I,M)),P(ee,()=>e(V),M=>s(V,M)),n(r,l)};u(De,r=>{e(T)&&r(We)})}t(ve);var ke=d(ve,2);{var He=r=>{var l=Rr(),b=a(l),v=d(a(b),2),z=d(a(v),2),G=a(z),B=a(G);{var Y=o=>{var y=wr();n(o,y)};u(B,o=>{e($)||o(Y)})}var F=d(B,2);{var Z=o=>{var y=$r();n(o,y)};u(F,o=>{e(k)||o(Z)})}var D=d(F,2);{var ee=o=>{var y=Ur();n(o,y)};u(D,o=>{e(U)||o(ee)})}var M=d(D,2);{var Je=o=>{var y=zr();n(o,y)};u(M,o=>{e(_)||o(Je)})}var Ke=d(M,2);{var Qe=o=>{var y=Mr();n(o,y)};u(Ke,o=>{e(w)||o(Qe)})}t(G),t(z),t(v),t(b),t(l),n(r,l)};u(ke,r=>{e(S),e(g),e(p),e(x),e(c),e(f),h(()=>!e(S)&&(e(g).length>0||e(p).length>0||e(x).length>0||e(c).length>0||e(f).length>0))&&r(He)})}var _e=d(ke,2);{var Te=r=>{var l=Ar(),b=a(l),v=d(a(b),2),z=a(v),G=a(z,!0);t(z),t(v),t(b),t(l),re(()=>$e(G,e(H))),n(r,l)};u(_e,r=>{e(H)&&r(Te)})}var we=d(_e,2),Oe=a(we);{let r=ir(()=>!e(S)||e(j));Ue(Oe,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,get loading(){return e(j)},get disabled(){return e(r)},children:(l,b)=>{L();var v=or();re(()=>$e(v,e(j)?"Initializing...":"Initialize GARM")),n(l,v)},$$slots:{default:!0}})}t(we),t(de),L(2),t(pe),t(ue),t(ae),re(()=>{ze(ce,"src",`${q??""}/assets/garm-light.svg`),ze(Ce,"src",`${q??""}/assets/garm-dark.svg`),N(O,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e($),e(g),h(()=>!e($)&&e(g).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(J,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(k),e(p),h(()=>!e(k)&&e(p).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(K,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(U),e(x),h(()=>!e(U)&&e(x).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(Q,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(_),e(c),h(()=>!e(_)&&e(c).length>0?"border-red-300 dark:border-red-600":"")??""}`),N(X,1,`appearance-none block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm ${e(w),e(f),h(()=>!e(w)&&e(f).length>0?"border-red-300 dark:border-red-600":"")??""}`)}),P(O,()=>e(g),r=>s(g,r)),P(J,()=>e(p),r=>s(p,r)),P(K,()=>e(x),r=>s(x,r)),P(Q,()=>e(c),r=>s(c,r)),P(X,()=>e(f),r=>s(f,r)),ar("submit",de,mr(qe)),n(Me,ae),tr(),Pe()}export{Dr as component}; diff --git a/webapp/assets/_app/immutable/nodes/8.Cbgd9-Vo.js b/webapp/assets/_app/immutable/nodes/8.Cbgd9-Vo.js deleted file mode 100644 index 5b7745e9..00000000 --- a/webapp/assets/_app/immutable/nodes/8.Cbgd9-Vo.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as z}from"../chunks/B3Pzt0F_.js";import{p as J,f as C,c as x,d as K,j as y,n as _,u as f,r as b,t as E,v as L,B as ce,b as O,o as de,A as ue,l as S,a as me,h as pe,g as e,m as u,$ as fe,q as ge,k as w,s}from"../chunks/D8EpLgQ1.js";import{p as ve,i as D}from"../chunks/5WA7h8uK.js";import{c as T,g as B}from"../chunks/CiE1LlKV.js";import{D as he}from"../chunks/KQ2xQpA3.js";import{P as _e}from"../chunks/CO4LUyTP.js";import{w as ye}from"../chunks/u94nIB4-.js";import{t as be}from"../chunks/BEkVdVE1.js";import{D as xe,G as Ce,a as Pe}from"../chunks/B_CZMFLe.js";import{e as ke}from"../chunks/BZiHL9L3.js";import{E as Ie}from"../chunks/C9H3KoyH.js";import{b as H}from"../chunks/D3_ugSUS.js";import{S as W}from"../chunks/dB1NgJWc.js";var Se=C(' '),we=C(' '),Te=C('-'),De=C('
    ');function $e($,k){J(k,!1);let a=ve(k,"item",8);z();var m=De(),I=y(m);{var i=r=>{var p=Se(),v=y(p);b(p),E(()=>{T(p,"href",`${H??""}/pools/${_(a()),f(()=>a().pool_id)??""}`),T(p,"title",`Pool: ${_(a()),f(()=>a().pool_id)??""}`),L(v,`Pool: ${_(a()),f(()=>a().pool_id)??""}`)}),x(r,p)},P=r=>{var p=ce(),v=O(p);{var l=n=>{var o=we(),c=y(o);b(o),E(()=>{T(o,"href",`${H??""}/scalesets/${_(a()),f(()=>a().scale_set_id)??""}`),T(o,"title",`Scale Set: ${_(a()),f(()=>a().scale_set_id)??""}`),L(c,`Scale Set: ${_(a()),f(()=>a().scale_set_id)??""}`)}),x(n,o)},g=n=>{var o=Te();x(n,o)};D(v,n=>{_(a()),f(()=>a()?.scale_set_id)?n(l):n(g,!1)},!0)}x(r,p)};D(I,r=>{_(a()),f(()=>a()?.pool_id)?r(i):r(P,!1)})}b(m),x($,m),K()}var Ae=C('

    Error

    '),Ee=C('
    ',1);function Oe($,k){J(k,!1);const a=u(),m=u(),I=u();let i=u([]),P=u(!0),r=u(""),p="",v=null,l=u(1),g=u(25),n=u(""),o=u(!1),c=u(null);async function M(){try{s(P,!0),s(r,""),s(i,await B.listInstances())}catch(t){s(r,t instanceof Error?t.message:"Failed to load instances")}finally{s(P,!1)}}function R(t){s(c,t),s(o,!0)}async function Q(){if(e(c))try{await B.deleteInstance(e(c).name),be.success("Instance Deleted",`Instance ${e(c).name} has been deleted successfully.`)}catch(t){s(r,ke(t))}finally{s(o,!1),s(c,null)}}const U=[{key:"name",title:"Name",cellComponent:Ie,cellProps:{entityType:"instance",showId:!0}},{key:"pool_scale_set",title:"Pool/Scale Set",flexible:!0,cellComponent:$e},{key:"created",title:"Created",cellComponent:Ce,cellProps:{field:"created_at",type:"date"}},{key:"status",title:"Status",cellComponent:W,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:W,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"actions",title:"Actions",align:"right",cellComponent:Pe,cellProps:{actions:[{type:"delete",title:"Delete",ariaLabel:"Delete instance",action:"delete"}]}}],V={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"},{type:"status",field:"runner_status"}],actions:[{type:"delete",handler:t=>R(t)}]};function X(t){s(n,t.detail.term),s(l,1)}function Y(t){s(l,t.detail.page)}function Z(t){s(g,t.detail.perPage),s(l,1)}async function ee(){try{await M()}catch(t){console.error("Retry failed:",t)}}function te(t){}function ae(t){R(t.detail.item)}function se(t){if(t.operation==="create"){const d=t.payload;s(i,[...e(i),d])}else if(t.operation==="update"){const d=t.payload;s(i,e(i).map(h=>h.name===d.name?d:h))}else if(t.operation==="delete"){const d=t.payload.name||t.payload;s(i,e(i).filter(h=>h.name!==d))}}de(()=>{M(),v=ye.subscribeToEntity("instance",["create","update","delete"],se)}),ue(()=>{v&&(v(),v=null)}),S(()=>(e(i),e(n)),()=>{s(a,e(i).filter(t=>(e(n)===""||t.name?.toLowerCase().includes(e(n).toLowerCase())||t.provider_id?.toLowerCase().includes(e(n).toLowerCase()))&&p===""))}),S(()=>(e(a),e(g)),()=>{s(m,Math.ceil(e(a).length/e(g)))}),S(()=>(e(l),e(m)),()=>{e(l)>e(m)&&e(m)>0&&s(l,e(m))}),S(()=>(e(a),e(l),e(g)),()=>{s(I,e(a).slice((e(l)-1)*e(g),e(l)*e(g)))}),me(),z();var F=Ee();pe(t=>{fe.title="Instances - GARM"});var A=O(F),N=y(A);_e(N,{title:"Runner Instances",description:"Monitor your running instances",showAction:!1});var G=w(N,2);{var re=t=>{var d=Ae(),h=y(d),q=y(h),j=w(y(q),2),ie=y(j,!0);b(j),b(q),b(h),b(d),E(()=>L(ie,e(r))),x(t,d)};D(G,t=>{e(r)&&t(re)})}var ne=w(G,2);{let t=ge(()=>!!e(r));xe(ne,{get columns(){return U},get data(){return e(I)},get loading(){return e(P)},get error(){return e(r)},get searchTerm(){return e(n)},searchPlaceholder:"Search instances...",get currentPage(){return e(l)},get perPage(){return e(g)},get totalPages(){return e(m)},get totalItems(){return e(a),f(()=>e(a).length)},itemName:"instances",emptyIconType:"cog",get showRetry(){return e(t)},get mobileCardConfig(){return V},$$events:{search:X,pageChange:Y,perPageChange:Z,retry:ee,edit:te,delete:ae}})}b(A);var le=w(A,2);{var oe=t=>{he(t,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(c),f(()=>e(c).name)},$$events:{close:()=>{s(o,!1),s(c,null)},confirm:Q}})};D(le,t=>{e(o)&&e(c)&&t(oe)})}x($,F),K()}export{Oe as component}; diff --git a/webapp/assets/_app/immutable/nodes/8.DZSdTfWG.js b/webapp/assets/_app/immutable/nodes/8.DZSdTfWG.js new file mode 100644 index 00000000..b9b63a92 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/8.DZSdTfWG.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as z}from"../chunks/zNh6Oe5P.js";import{p as J,f as C,c as x,d as K,j as y,n as f,u as g,r as b,t as M,v as R,B as ce,b as O,o as de,A as ue,l as w,a as me,h as pe,g as e,m as u,$ as fe,q as ge,k as T,s}from"../chunks/sWNKMed7.js";import{p as ve,i as A}from"../chunks/Ccl3fNd2.js";import{d as D,c as $,g as H}from"../chunks/t8NOL8UT.js";import{D as he}from"../chunks/Dxyf9P7U.js";import{P as _e}from"../chunks/sdr-JCKi.js";import{w as ye}from"../chunks/BuuPrWMc.js";import{t as be}from"../chunks/BZUCTtPY.js";import{D as xe,G as Ce,a as Pe}from"../chunks/WvS03pW2.js";import{e as ke}from"../chunks/BZiHL9L3.js";import{E as Ie}from"../chunks/CfvU88k5.js";import"../chunks/BFThZs5w.js";import{S as W}from"../chunks/C7WQ-JBG.js";var Se=C(' '),we=C(' '),Te=C('-'),De=C('
    ');function $e(E,k){J(k,!1);let a=ve(k,"item",8);z();var m=De(),I=y(m);{var i=r=>{var p=Se(),h=y(p);b(p),M(n=>{$(p,"href",n),$(p,"title",`Pool: ${f(a()),g(()=>a().pool_id)??""}`),R(h,`Pool: ${f(a()),g(()=>a().pool_id)??""}`)},[()=>(f(D),f(a()),g(()=>D(`/pools/${a().pool_id}`)))]),x(r,p)},P=r=>{var p=ce(),h=O(p);{var n=l=>{var o=we(),c=y(o);b(o),M(S=>{$(o,"href",S),$(o,"title",`Scale Set: ${f(a()),g(()=>a().scale_set_id)??""}`),R(c,`Scale Set: ${f(a()),g(()=>a().scale_set_id)??""}`)},[()=>(f(D),f(a()),g(()=>D(`/scalesets/${a().scale_set_id}`)))]),x(l,o)},v=l=>{var o=Te();x(l,o)};A(h,l=>{f(a()),g(()=>a()?.scale_set_id)?l(n):l(v,!1)},!0)}x(r,p)};A(I,r=>{f(a()),g(()=>a()?.pool_id)?r(i):r(P,!1)})}b(m),x(E,m),K()}var Ae=C('

    Error

    '),Ee=C('
    ',1);function Oe(E,k){J(k,!1);const a=u(),m=u(),I=u();let i=u([]),P=u(!0),r=u(""),p="",h=null,n=u(1),v=u(25),l=u(""),o=u(!1),c=u(null);async function S(){try{s(P,!0),s(r,""),s(i,await H.listInstances())}catch(t){s(r,t instanceof Error?t.message:"Failed to load instances")}finally{s(P,!1)}}function F(t){s(c,t),s(o,!0)}async function Q(){if(e(c))try{await H.deleteInstance(e(c).name),be.success("Instance Deleted",`Instance ${e(c).name} has been deleted successfully.`)}catch(t){s(r,ke(t))}finally{s(o,!1),s(c,null)}}const U=[{key:"name",title:"Name",cellComponent:Ie,cellProps:{entityType:"instance",showId:!0}},{key:"pool_scale_set",title:"Pool/Scale Set",flexible:!0,cellComponent:$e},{key:"created",title:"Created",cellComponent:Ce,cellProps:{field:"created_at",type:"date"}},{key:"status",title:"Status",cellComponent:W,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:W,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"actions",title:"Actions",align:"right",cellComponent:Pe,cellProps:{actions:[{type:"delete",title:"Delete",ariaLabel:"Delete instance",action:"delete"}]}}],V={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"},{type:"status",field:"runner_status"}],actions:[{type:"delete",handler:t=>F(t)}]};function X(t){s(l,t.detail.term),s(n,1)}function Y(t){s(n,t.detail.page)}function Z(t){s(v,t.detail.perPage),s(n,1)}async function ee(){try{await S()}catch(t){console.error("Retry failed:",t)}}function te(t){}function ae(t){F(t.detail.item)}function se(t){if(t.operation==="create"){const d=t.payload;s(i,[...e(i),d])}else if(t.operation==="update"){const d=t.payload;s(i,e(i).map(_=>_.name===d.name?d:_))}else if(t.operation==="delete"){const d=t.payload.name||t.payload;s(i,e(i).filter(_=>_.name!==d))}}de(()=>{S(),h=ye.subscribeToEntity("instance",["create","update","delete"],se)}),ue(()=>{h&&(h(),h=null)}),w(()=>(e(i),e(l)),()=>{s(a,e(i).filter(t=>(e(l)===""||t.name?.toLowerCase().includes(e(l).toLowerCase())||t.provider_id?.toLowerCase().includes(e(l).toLowerCase()))&&p===""))}),w(()=>(e(a),e(v)),()=>{s(m,Math.ceil(e(a).length/e(v)))}),w(()=>(e(n),e(m)),()=>{e(n)>e(m)&&e(m)>0&&s(n,e(m))}),w(()=>(e(a),e(n),e(v)),()=>{s(I,e(a).slice((e(n)-1)*e(v),e(n)*e(v)))}),me(),z();var N=Ee();pe(t=>{fe.title="Instances - GARM"});var L=O(N),G=y(L);_e(G,{title:"Runner Instances",description:"Monitor your running instances",showAction:!1});var q=T(G,2);{var re=t=>{var d=Ae(),_=y(d),j=y(_),B=T(y(j),2),ie=y(B,!0);b(B),b(j),b(_),b(d),M(()=>R(ie,e(r))),x(t,d)};A(q,t=>{e(r)&&t(re)})}var ne=T(q,2);{let t=ge(()=>!!e(r));xe(ne,{get columns(){return U},get data(){return e(I)},get loading(){return e(P)},get error(){return e(r)},get searchTerm(){return e(l)},searchPlaceholder:"Search instances...",get currentPage(){return e(n)},get perPage(){return e(v)},get totalPages(){return e(m)},get totalItems(){return e(a),g(()=>e(a).length)},itemName:"instances",emptyIconType:"cog",get showRetry(){return e(t)},get mobileCardConfig(){return V},$$events:{search:X,pageChange:Y,perPageChange:Z,retry:ee,edit:te,delete:ae}})}b(L);var le=T(L,2);{var oe=t=>{he(t,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return e(c),g(()=>e(c).name)},$$events:{close:()=>{s(o,!1),s(c,null)},confirm:Q}})};A(le,t=>{e(o)&&e(c)&&t(oe)})}x(E,N),K()}export{Oe as component}; diff --git a/webapp/assets/_app/immutable/nodes/9.C4zA79ZC.js b/webapp/assets/_app/immutable/nodes/9.C4zA79ZC.js deleted file mode 100644 index e7ad330a..00000000 --- a/webapp/assets/_app/immutable/nodes/9.C4zA79ZC.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/DsnmJJEf.js";import{i as Te}from"../chunks/B3Pzt0F_.js";import{p as Ue,o as Le,A as Oe,l as Pe,a as Ve,f as g,h as ze,b as O,t as f,c as v,d as Re,g as t,m as M,s as p,u as i,$ as qe,j as s,r as a,k as r,v as c,B as Et,n as b,e as Fe,q as Tt,D as Ut}from"../chunks/D8EpLgQ1.js";import{i as _,s as Ge,a as He}from"../chunks/5WA7h8uK.js";import{w as We,e as Lt,i as Ot}from"../chunks/u94nIB4-.js";import{c as nt,g as Pt,s as Vt}from"../chunks/CiE1LlKV.js";import{b as Je}from"../chunks/BAg1iRPq.js";import{p as Ke}from"../chunks/-1rkm990.js";import{g as zt}from"../chunks/DsX4H4sg.js";import{b as $}from"../chunks/D3_ugSUS.js";import{D as Qe}from"../chunks/KQ2xQpA3.js";import{g as P,f as V}from"../chunks/ow_oMtSd.js";import{s as Rt,b as A,B as qt,d as Ft}from"../chunks/D5ucq3Gx.js";import{e as Xe}from"../chunks/BZiHL9L3.js";var Ye=g('

    Error

    '),Ze=g('

    Loading instance details...

    '),ta=g(' '),ea=g(' '),aa=g('-'),sa=g('
    Updated At:
    '),ra=g('
    '),da=g('
    Network Addresses:
    '),ia=g('
    Network Addresses:
    No addresses available
    '),na=g('
    OS Type:
    '),oa=g('
    OS Name:
    '),la=g('
    OS Version:
    '),va=g('
    OS Architecture:
    '),xa=g('

    '),ca=g('

    Status Messages

    '),ma=g('

    Status Messages

    No status messages available

    '),ga=g('

    Instance Information

    ID:
    Name:
    Provider ID:
    Provider:
    Pool/Scale Set:
    Agent ID:
    Created At:

    Status & Network

    Instance Status:
    Runner Status:
    ',1),_a=g('
    Instance not found.
    '),ua=g(' ',1);function $a(Gt,Ht){Ue(Ht,!1);const[Wt,Jt]=Ge(),ot=()=>He(Ke,"$page",Wt),z=M();let e=M(null),R=M(!0),B=M(""),N=M(!1),C=null,E=M();async function Kt(){if(t(z))try{p(R,!0),p(B,""),p(e,await Pt.getInstance(t(z)))}catch(o){p(B,o instanceof Error?o.message:"Failed to load instance")}finally{p(R,!1)}}async function Qt(){if(t(e)){try{await Pt.deleteInstance(t(e).name),zt(`${$}/instances`)}catch(o){p(B,Xe(o))}p(N,!1)}}function Xt(o){if(t(e))if(o.operation==="update"&&o.payload.id===t(e).id){const h=t(e).status_messages?.length||0,j={...t(e),...o.payload},S=j.status_messages?.length||0;p(e,j),S>h&&setTimeout(()=>{Rt(t(E))},100)}else o.operation==="delete"&&(o.payload.id||o.payload)===t(e).id&&zt(`${$}/instances`)}Le(()=>{Kt().then(()=>{t(e)?.status_messages?.length&&setTimeout(()=>{Rt(t(E))},100)}),C=We.subscribeToEntity("instance",["update","delete"],Xt)}),Oe(()=>{C&&(C(),C=null)}),Pe(()=>ot(),()=>{p(z,decodeURIComponent(ot().params.id||""))}),Ve(),Te();var lt=ua();ze(o=>{f(()=>qe.title=`${t(e),i(()=>t(e)?`${t(e).name} - Instance Details`:"Instance Details")??""} - GARM`)});var q=O(lt),F=s(q),vt=s(F),G=s(vt),Yt=s(G);a(G);var xt=r(G,2),ct=s(xt),mt=r(s(ct),2),Zt=s(mt,!0);a(mt),a(ct),a(xt),a(vt),a(F);var gt=r(F,2);{var te=o=>{var h=Ye(),j=s(h),S=s(j),T=r(s(S),2),I=s(T,!0);a(T),a(S),a(j),a(h),f(()=>c(I,t(B))),v(o,h)};_(gt,o=>{t(B)&&o(te)})}var ee=r(gt,2);{var ae=o=>{var h=Ze();v(o,h)},se=o=>{var h=Et(),j=O(h);{var S=I=>{var U=ga(),H=O(U),W=s(H),J=s(W),_t=r(s(J),2),ie=s(_t);a(_t),a(J);var ut=r(J,2),K=s(ut),ft=r(s(K),2),ne=s(ft,!0);a(ft),a(K);var Q=r(K,2),yt=r(s(Q),2),oe=s(yt,!0);a(yt),a(Q);var X=r(Q,2),pt=r(s(X),2),le=s(pt,!0);a(pt),a(X);var Y=r(X,2),ht=r(s(Y),2),ve=s(ht,!0);a(ht),a(Y);var Z=r(Y,2),kt=r(s(Z),2),xe=s(kt);{var ce=d=>{var n=ta(),l=s(n,!0);a(n),f(()=>{nt(n,"href",`${$??""}/pools/${t(e),i(()=>t(e).pool_id)??""}`),c(l,(t(e),i(()=>t(e).pool_id)))}),v(d,n)},me=d=>{var n=Et(),l=O(n);{var m=u=>{var y=ea(),D=s(y,!0);a(y),f(()=>{nt(y,"href",`${$??""}/scalesets/${t(e),i(()=>t(e).scale_set_id)??""}`),c(D,(t(e),i(()=>t(e).scale_set_id)))}),v(u,y)},x=u=>{var y=aa();v(u,y)};_(l,u=>{t(e),i(()=>t(e).scale_set_id)?u(m):u(x,!1)},!0)}v(d,n)};_(xe,d=>{t(e),i(()=>t(e).pool_id)?d(ce):d(me,!1)})}a(kt),a(Z);var tt=r(Z,2),bt=r(s(tt),2),ge=s(bt,!0);a(bt),a(tt);var et=r(tt,2),wt=r(s(et),2),_e=s(wt,!0);a(wt),a(et);var ue=r(et,2);{var fe=d=>{var n=sa(),l=r(s(n),2),m=s(l,!0);a(l),a(n),f(x=>c(m,x),[()=>(b(A),t(e),i(()=>A(t(e).updated_at)))]),v(d,n)};_(ue,d=>{t(e),i(()=>t(e).updated_at&&t(e).updated_at!==t(e).created_at)&&d(fe)})}a(ut),a(W);var It=r(W,2),jt=r(s(It),2),at=s(jt),Dt=r(s(at),2),st=s(Dt),ye=s(st,!0);a(st),a(Dt),a(at);var rt=r(at,2),St=r(s(rt),2),dt=s(St),pe=s(dt,!0);a(dt),a(St),a(rt);var Mt=r(rt,2);{var he=d=>{var n=da(),l=r(s(n),2);Lt(l,5,()=>(t(e),i(()=>t(e).addresses)),Ot,(m,x)=>{var u=ra(),y=s(u),D=s(y,!0);a(y);var it=r(y,2);{let L=Tt(()=>(t(x),i(()=>t(x).type||"Unknown")));qt(it,{variant:"info",get text(){return t(L)}})}a(u),f(()=>c(D,(t(x),i(()=>t(x).address)))),v(m,u)}),a(l),a(n),v(d,n)},ke=d=>{var n=ia();v(d,n)};_(Mt,d=>{t(e),i(()=>t(e).addresses&&t(e).addresses.length>0)?d(he):d(ke,!1)})}var At=r(Mt,2);{var be=d=>{var n=na(),l=r(s(n),2),m=s(l,!0);a(l),a(n),f(()=>c(m,(t(e),i(()=>t(e).os_type)))),v(d,n)};_(At,d=>{t(e),i(()=>t(e).os_type)&&d(be)})}var Bt=r(At,2);{var we=d=>{var n=oa(),l=r(s(n),2),m=s(l,!0);a(l),a(n),f(()=>c(m,(t(e),i(()=>t(e).os_name)))),v(d,n)};_(Bt,d=>{t(e),i(()=>t(e).os_name)&&d(we)})}var $t=r(Bt,2);{var Ie=d=>{var n=la(),l=r(s(n),2),m=s(l,!0);a(l),a(n),f(()=>c(m,(t(e),i(()=>t(e).os_version)))),v(d,n)};_($t,d=>{t(e),i(()=>t(e).os_version)&&d(Ie)})}var je=r($t,2);{var De=d=>{var n=va(),l=r(s(n),2),m=s(l,!0);a(l),a(n),f(()=>c(m,(t(e),i(()=>t(e).os_arch)))),v(d,n)};_(je,d=>{t(e),i(()=>t(e).os_arch)&&d(De)})}a(jt),a(It),a(H);var Se=r(H,2);{var Me=d=>{var n=ca(),l=r(s(n),2);Lt(l,5,()=>(t(e),i(()=>t(e).status_messages)),Ot,(m,x)=>{var u=xa(),y=s(u),D=s(y),it=s(D,!0);a(D);var L=r(D,2),Nt=s(L);{var Be=k=>{const w=Tt(()=>(b(Ft),t(x),i(()=>Ft(t(x).event_level))));qt(k,{get variant(){return b(t(w)),i(()=>t(w).variant)},get text(){return b(t(w)),i(()=>t(w).text)}})};_(Nt,k=>{t(x),i(()=>t(x).event_level)&&k(Be)})}var Ct=r(Nt,2),$e=s(Ct);{var Ne=k=>{var w=Ut();f(Ee=>c(w,Ee),[()=>(b(A),t(x),i(()=>A(t(x).created_at)))]),v(k,w)},Ce=k=>{var w=Ut("Unknown date");v(k,w)};_($e,k=>{t(x),i(()=>t(x).created_at)?k(Ne):k(Ce,!1)})}a(Ct),a(L),a(y),a(u),f(()=>c(it,(t(x),i(()=>t(x).message)))),v(m,u)}),a(l),Je(l,m=>p(E,m),()=>t(E)),a(n),v(d,n)},Ae=d=>{var n=ma();v(d,n)};_(Se,d=>{t(e),i(()=>t(e).status_messages&&t(e).status_messages.length>0)?d(Me):d(Ae,!1)})}f((d,n,l,m,x)=>{c(ne,(t(e),i(()=>t(e).id))),c(oe,(t(e),i(()=>t(e).name))),c(le,(t(e),i(()=>t(e).provider_id))),c(ve,(t(e),i(()=>t(e).provider_name||"Unknown"))),c(ge,(t(e),i(()=>t(e).agent_id||"Not assigned"))),c(_e,d),Vt(st,1,`inline-flex px-2 py-1 text-xs font-semibold rounded-full ring-1 ring-inset ${n??""}`),c(ye,l),Vt(dt,1,`inline-flex px-2 py-1 text-xs font-semibold rounded-full ring-1 ring-inset ${m??""}`),c(pe,x)},[()=>(b(A),t(e),i(()=>A(t(e).created_at))),()=>(b(P),t(e),i(()=>P(t(e).status||"unknown"))),()=>(b(V),t(e),i(()=>V(t(e).status||"unknown"))),()=>(b(P),t(e),i(()=>P(t(e).runner_status||"unknown"))),()=>(b(V),t(e),i(()=>V(t(e).runner_status||"unknown")))]),Fe("click",ie,()=>p(N,!0)),v(I,U)},T=I=>{var U=_a();v(I,U)};_(j,I=>{t(e)?I(S):I(T,!1)},!0)}v(o,h)};_(ee,o=>{t(R)?o(ae):o(se,!1)})}a(q);var re=r(q,2);{var de=o=>{Qe(o,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return t(e),i(()=>t(e).name)},$$events:{close:()=>p(N,!1),confirm:Qt}})};_(re,o=>{t(N)&&t(e)&&o(de)})}f(()=>{nt(Yt,"href",`${$}/instances`),c(Zt,(t(e),i(()=>t(e)?t(e).name:"Instance Details")))}),v(Gt,lt),Re(),Jt()}export{$a as component}; diff --git a/webapp/assets/_app/immutable/nodes/9.ziBiiJGk.js b/webapp/assets/_app/immutable/nodes/9.ziBiiJGk.js new file mode 100644 index 00000000..86e227e3 --- /dev/null +++ b/webapp/assets/_app/immutable/nodes/9.ziBiiJGk.js @@ -0,0 +1 @@ +import"../chunks/DsnmJJEf.js";import{i as $e}from"../chunks/zNh6Oe5P.js";import{p as Ue,o as Le,A as Oe,l as Pe,a as Ve,f as u,h as ze,b as P,t as f,c as v,d as Re,u as r,n as p,v as m,g as t,m as A,j as s,k as d,s as h,$ as qe,r as a,B as Tt,e as Fe,q as $t,D as Ut}from"../chunks/sWNKMed7.js";import{i as g,s as Ge,a as He}from"../chunks/Ccl3fNd2.js";import{w as We,e as Lt,i as Ot}from"../chunks/BuuPrWMc.js";import{d as j,c as nt,g as Pt,s as Vt}from"../chunks/t8NOL8UT.js";import{b as Je}from"../chunks/_gFYyMUN.js";import{p as Ke}from"../chunks/-DWf2IZZ.js";import{g as zt}from"../chunks/CaJ57PEy.js";import{D as Qe}from"../chunks/Dxyf9P7U.js";import{g as V,f as z}from"../chunks/ow_oMtSd.js";import{s as Rt,b as B,B as qt,d as Ft}from"../chunks/Cbkm53HO.js";import{e as Xe}from"../chunks/BZiHL9L3.js";var Ye=u('

    Error

    '),Ze=u('

    Loading instance details...

    '),ta=u(' '),ea=u(' '),aa=u('-'),sa=u('
    Updated At:
    '),ra=u('
    '),da=u('
    Network Addresses:
    '),ia=u('
    Network Addresses:
    No addresses available
    '),na=u('
    OS Type:
    '),la=u('
    OS Name:
    '),oa=u('
    OS Version:
    '),va=u('
    OS Architecture:
    '),xa=u('

    '),ca=u('

    Status Messages

    '),ma=u('

    Status Messages

    No status messages available

    '),ua=u('

    Instance Information

    ID:
    Name:
    Provider ID:
    Provider:
    Pool/Scale Set:
    Agent ID:
    Created At:

    Status & Network

    Instance Status:
    Runner Status:
    ',1),ga=u('
    Instance not found.
    '),_a=u(' ',1);function Ba(Gt,Ht){Ue(Ht,!1);const[Wt,Jt]=Ge(),lt=()=>He(Ke,"$page",Wt),R=A();let e=A(null),q=A(!0),N=A(""),E=A(!1),T=null,$=A();async function Kt(){if(t(R))try{h(q,!0),h(N,""),h(e,await Pt.getInstance(t(R)))}catch(l){h(N,l instanceof Error?l.message:"Failed to load instance")}finally{h(q,!1)}}async function Qt(){if(t(e)){try{await Pt.deleteInstance(t(e).name),zt(j("/instances"))}catch(l){h(N,Xe(l))}h(E,!1)}}function Xt(l){if(t(e))if(l.operation==="update"&&l.payload.id===t(e).id){const b=t(e).status_messages?.length||0,D={...t(e),...l.payload},M=D.status_messages?.length||0;h(e,D),M>b&&setTimeout(()=>{Rt(t($))},100)}else l.operation==="delete"&&(l.payload.id||l.payload)===t(e).id&&zt(j("/instances"))}Le(()=>{Kt().then(()=>{t(e)?.status_messages?.length&&setTimeout(()=>{Rt(t($))},100)}),T=We.subscribeToEntity("instance",["update","delete"],Xt)}),Oe(()=>{T&&(T(),T=null)}),Pe(()=>lt(),()=>{h(R,decodeURIComponent(lt().params.id||""))}),Ve(),$e();var ot=_a();ze(l=>{f(()=>qe.title=`${t(e),r(()=>t(e)?`${t(e).name} - Instance Details`:"Instance Details")??""} - GARM`)});var F=P(ot),G=s(F),vt=s(G),H=s(vt),Yt=s(H);a(H);var xt=d(H,2),ct=s(xt),mt=d(s(ct),2),Zt=s(mt,!0);a(mt),a(ct),a(xt),a(vt),a(G);var ut=d(G,2);{var te=l=>{var b=Ye(),D=s(b),M=s(D),U=d(s(M),2),I=s(U,!0);a(U),a(M),a(D),a(b),f(()=>m(I,t(N))),v(l,b)};g(ut,l=>{t(N)&&l(te)})}var ee=d(ut,2);{var ae=l=>{var b=Ze();v(l,b)},se=l=>{var b=Tt(),D=P(b);{var M=I=>{var L=ua(),W=P(L),J=s(W),K=s(J),gt=d(s(K),2),ie=s(gt);a(gt),a(K);var _t=d(K,2),Q=s(_t),ft=d(s(Q),2),ne=s(ft,!0);a(ft),a(Q);var X=d(Q,2),yt=d(s(X),2),le=s(yt,!0);a(yt),a(X);var Y=d(X,2),pt=d(s(Y),2),oe=s(pt,!0);a(pt),a(Y);var Z=d(Y,2),ht=d(s(Z),2),ve=s(ht,!0);a(ht),a(Z);var tt=d(Z,2),bt=d(s(tt),2),xe=s(bt);{var ce=i=>{var n=ta(),o=s(n,!0);a(n),f(x=>{nt(n,"href",x),m(o,(t(e),r(()=>t(e).pool_id)))},[()=>(p(j),t(e),r(()=>j(`/pools/${t(e).pool_id}`)))]),v(i,n)},me=i=>{var n=Tt(),o=P(n);{var x=_=>{var y=ea(),S=s(y,!0);a(y),f(C=>{nt(y,"href",C),m(S,(t(e),r(()=>t(e).scale_set_id)))},[()=>(p(j),t(e),r(()=>j(`/scalesets/${t(e).scale_set_id}`)))]),v(_,y)},c=_=>{var y=aa();v(_,y)};g(o,_=>{t(e),r(()=>t(e).scale_set_id)?_(x):_(c,!1)},!0)}v(i,n)};g(xe,i=>{t(e),r(()=>t(e).pool_id)?i(ce):i(me,!1)})}a(bt),a(tt);var et=d(tt,2),kt=d(s(et),2),ue=s(kt,!0);a(kt),a(et);var at=d(et,2),wt=d(s(at),2),ge=s(wt,!0);a(wt),a(at);var _e=d(at,2);{var fe=i=>{var n=sa(),o=d(s(n),2),x=s(o,!0);a(o),a(n),f(c=>m(x,c),[()=>(p(B),t(e),r(()=>B(t(e).updated_at)))]),v(i,n)};g(_e,i=>{t(e),r(()=>t(e).updated_at&&t(e).updated_at!==t(e).created_at)&&i(fe)})}a(_t),a(J);var It=d(J,2),jt=d(s(It),2),st=s(jt),Dt=d(s(st),2),rt=s(Dt),ye=s(rt,!0);a(rt),a(Dt),a(st);var dt=d(st,2),St=d(s(dt),2),it=s(St),pe=s(it,!0);a(it),a(St),a(dt);var Mt=d(dt,2);{var he=i=>{var n=da(),o=d(s(n),2);Lt(o,5,()=>(t(e),r(()=>t(e).addresses)),Ot,(x,c)=>{var _=ra(),y=s(_),S=s(y,!0);a(y);var C=d(y,2);{let O=$t(()=>(t(c),r(()=>t(c).type||"Unknown")));qt(C,{variant:"info",get text(){return t(O)}})}a(_),f(()=>m(S,(t(c),r(()=>t(c).address)))),v(x,_)}),a(o),a(n),v(i,n)},be=i=>{var n=ia();v(i,n)};g(Mt,i=>{t(e),r(()=>t(e).addresses&&t(e).addresses.length>0)?i(he):i(be,!1)})}var At=d(Mt,2);{var ke=i=>{var n=na(),o=d(s(n),2),x=s(o,!0);a(o),a(n),f(()=>m(x,(t(e),r(()=>t(e).os_type)))),v(i,n)};g(At,i=>{t(e),r(()=>t(e).os_type)&&i(ke)})}var Bt=d(At,2);{var we=i=>{var n=la(),o=d(s(n),2),x=s(o,!0);a(o),a(n),f(()=>m(x,(t(e),r(()=>t(e).os_name)))),v(i,n)};g(Bt,i=>{t(e),r(()=>t(e).os_name)&&i(we)})}var Nt=d(Bt,2);{var Ie=i=>{var n=oa(),o=d(s(n),2),x=s(o,!0);a(o),a(n),f(()=>m(x,(t(e),r(()=>t(e).os_version)))),v(i,n)};g(Nt,i=>{t(e),r(()=>t(e).os_version)&&i(Ie)})}var je=d(Nt,2);{var De=i=>{var n=va(),o=d(s(n),2),x=s(o,!0);a(o),a(n),f(()=>m(x,(t(e),r(()=>t(e).os_arch)))),v(i,n)};g(je,i=>{t(e),r(()=>t(e).os_arch)&&i(De)})}a(jt),a(It),a(W);var Se=d(W,2);{var Me=i=>{var n=ca(),o=d(s(n),2);Lt(o,5,()=>(t(e),r(()=>t(e).status_messages)),Ot,(x,c)=>{var _=xa(),y=s(_),S=s(y),C=s(S,!0);a(S);var O=d(S,2),Ct=s(O);{var Be=k=>{const w=$t(()=>(p(Ft),t(c),r(()=>Ft(t(c).event_level))));qt(k,{get variant(){return p(t(w)),r(()=>t(w).variant)},get text(){return p(t(w)),r(()=>t(w).text)}})};g(Ct,k=>{t(c),r(()=>t(c).event_level)&&k(Be)})}var Et=d(Ct,2),Ne=s(Et);{var Ce=k=>{var w=Ut();f(Te=>m(w,Te),[()=>(p(B),t(c),r(()=>B(t(c).created_at)))]),v(k,w)},Ee=k=>{var w=Ut("Unknown date");v(k,w)};g(Ne,k=>{t(c),r(()=>t(c).created_at)?k(Ce):k(Ee,!1)})}a(Et),a(O),a(y),a(_),f(()=>m(C,(t(c),r(()=>t(c).message)))),v(x,_)}),a(o),Je(o,x=>h($,x),()=>t($)),a(n),v(i,n)},Ae=i=>{var n=ma();v(i,n)};g(Se,i=>{t(e),r(()=>t(e).status_messages&&t(e).status_messages.length>0)?i(Me):i(Ae,!1)})}f((i,n,o,x,c)=>{m(ne,(t(e),r(()=>t(e).id))),m(le,(t(e),r(()=>t(e).name))),m(oe,(t(e),r(()=>t(e).provider_id))),m(ve,(t(e),r(()=>t(e).provider_name||"Unknown"))),m(ue,(t(e),r(()=>t(e).agent_id||"Not assigned"))),m(ge,i),Vt(rt,1,`inline-flex px-2 py-1 text-xs font-semibold rounded-full ring-1 ring-inset ${n??""}`),m(ye,o),Vt(it,1,`inline-flex px-2 py-1 text-xs font-semibold rounded-full ring-1 ring-inset ${x??""}`),m(pe,c)},[()=>(p(B),t(e),r(()=>B(t(e).created_at))),()=>(p(V),t(e),r(()=>V(t(e).status||"unknown"))),()=>(p(z),t(e),r(()=>z(t(e).status||"unknown"))),()=>(p(V),t(e),r(()=>V(t(e).runner_status||"unknown"))),()=>(p(z),t(e),r(()=>z(t(e).runner_status||"unknown")))]),Fe("click",ie,()=>h(E,!0)),v(I,L)},U=I=>{var L=ga();v(I,L)};g(D,I=>{t(e)?I(M):I(U,!1)},!0)}v(l,b)};g(ee,l=>{t(q)?l(ae):l(se,!1)})}a(F);var re=d(F,2);{var de=l=>{Qe(l,{title:"Delete Instance",message:"Are you sure you want to delete this instance? This action cannot be undone.",get itemName(){return t(e),r(()=>t(e).name)},$$events:{close:()=>h(E,!1),confirm:Qt}})};g(re,l=>{t(E)&&t(e)&&l(de)})}f(l=>{nt(Yt,"href",l),m(Zt,(t(e),r(()=>t(e)?t(e).name:"Instance Details")))},[()=>(p(j),r(()=>j("/instances")))]),v(Gt,ot),Re(),Jt()}export{Ba as component}; diff --git a/webapp/assets/_app/version.json b/webapp/assets/_app/version.json index 2d9ca8fc..d30d1af5 100644 --- a/webapp/assets/_app/version.json +++ b/webapp/assets/_app/version.json @@ -1 +1 @@ -{"version":"1755518451537"} \ No newline at end of file +{"version":"1755522486509"} \ No newline at end of file diff --git a/webapp/assets/index.html b/webapp/assets/index.html index 620d55f8..9067faec 100644 --- a/webapp/assets/index.html +++ b/webapp/assets/index.html @@ -71,22 +71,21 @@ })(); - - - - - - + + + + + - - - + + +
    {#if item?.pool_id} - + Pool: {item.pool_id} {:else if item?.scale_set_id} - + Scale Set: {item.scale_set_id} {:else} diff --git a/webapp/src/lib/components/cells/PoolEntityCell.svelte b/webapp/src/lib/components/cells/PoolEntityCell.svelte index 0861d11c..e8ed933d 100644 --- a/webapp/src/lib/components/cells/PoolEntityCell.svelte +++ b/webapp/src/lib/components/cells/PoolEntityCell.svelte @@ -1,5 +1,4 @@ diff --git a/webapp/src/routes/+page.svelte b/webapp/src/routes/+page.svelte index 258f0cf3..07df6498 100644 --- a/webapp/src/routes/+page.svelte +++ b/webapp/src/routes/+page.svelte @@ -1,6 +1,6 @@ @@ -107,12 +107,12 @@
    GARM diff --git a/webapp/src/routes/instances/[id]/+page.svelte b/webapp/src/routes/instances/[id]/+page.svelte index e7024404..40fa3be5 100644 --- a/webapp/src/routes/instances/[id]/+page.svelte +++ b/webapp/src/routes/instances/[id]/+page.svelte @@ -4,7 +4,7 @@ import { goto } from '$app/navigation'; import { garmApi } from '$lib/api/client.js'; import type { Instance } from '$lib/api/generated/api.js'; - import { base } from '$app/paths'; + import { resolve } from '$app/paths'; import DeleteModal from '$lib/components/DeleteModal.svelte'; import { websocketStore, type WebSocketEvent } from '$lib/stores/websocket.js'; import { formatStatusText, getStatusBadgeClass } from '$lib/utils/status.js'; @@ -40,7 +40,7 @@ if (!instance) return; try { await garmApi.deleteInstance(instance.name!); - goto(`${base}/instances`); + goto(resolve('/instances')); } catch (err) { error = extractAPIError(err); } @@ -71,7 +71,7 @@ // Instance was deleted - redirect to list page const instanceId = event.payload.id || event.payload; if (instanceId === instance.id) { - goto(`${base}/instances`); + goto(resolve('/instances')); } } } @@ -112,7 +112,7 @@