@cloudsnorkel/cdk-github-runners
Version:
CDK construct to create GitHub Actions self-hosted runners. Creates ephemeral runners on demand. Easy to deploy and highly customizable.
25 lines • 172 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Setup GitHub Runners</title>
<script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const f of s.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&n(f)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();const xn=!1;var Tn=Array.isArray,An=Array.prototype.indexOf,Le=Array.prototype.includes,Rn=Array.from,Nn=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,br=Object.getOwnPropertyDescriptors,On=Object.prototype,Pn=Array.prototype,Pt=Object.getPrototypeOf,tr=Object.isExtensible;const In=()=>{};function Mn(e){return e()}function St(e){for(var t=0;t<e.length;t++)e[t]()}function yr(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const M=2,Je=4,Xe=8,wr=1<<24,Ee=16,ne=32,Ne=64,xt=128,W=512,O=1024,L=2048,ie=4096,te=8192,re=16384,Ie=32768,rr=1<<25,He=65536,nr=1<<17,Cn=1<<18,Ge=1<<19,Er=1<<20,Oe=65536,Tt=1<<21,It=1<<22,be=1<<23,Ae=Symbol("$state"),Dn=Symbol(""),ue=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ln=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Hn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Fn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Gn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function jn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Un(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Bn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Wn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const $n=1,Yn=2,C=Symbol(),kr="http://www.w3.org/1999/xhtml";function Kn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Sr(e){return e===this.v}function Vn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function xr(e){return!Vn(e,this.v)}let ct=!1,Jn=!1;function Zn(){ct=!0}let I=null;function ze(e){I=e}function Tr(e,t=!1,r){I={p:I,i:!1,c:null,e:null,s:e,x:null,r:w,l:ct&&!t?{s:null,u:null,$:[]}:null}}function Ar(e){var t=I,r=t.e;if(r!==null){t.e=null;for(var n of r)Wr(n)}return t.i=!0,I=t.p,{}}function Qe(){return!ct||I!==null&&I.l===null}let xe=[];function Rr(){var e=xe;xe=[],St(e)}function ce(e){if(xe.length===0&&!Ye){var t=xe;queueMicrotask(()=>{t===xe&&Rr()})}xe.push(e)}function Xn(){for(;xe.length>0;)Rr()}function Nr(e){var t=w;if(t===null)return y.f|=be,e;if((t.f&Ie)===0&&(t.f&Je)===0)throw e;me(e,t)}function me(e,t){for(;t!==null;){if((t.f&xt)!==0){if((t.f&Ie)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const Qn=-7169;function N(e,t){e.f=e.f&Qn|t}function Mt(e){(e.f&W)!==0||e.deps===null?N(e,O):N(e,ie)}function Or(e){if(e!==null)for(const t of e)(t.f&M)===0||(t.f&Oe)===0||(t.f^=Oe,Or(t.deps))}function Pr(e,t,r){(e.f&L)!==0?t.add(e):(e.f&ie)!==0&&r.add(e),Or(e.deps),N(e,O)}const pe=new Set;let S=null,Z=null,At=null,Ye=!1,yt=!1,De=null,st=null;var ir=0;let ei=1;class we{id=ei++;current=new Map;previous=new Map;#t=new Set;#l=new Set;#e=new Map;#n=new Map;#i=null;#r=[];#s=new Set;#o=new Set;#a=new Map;is_fork=!1;#c=!1;#f=new Set;#d(){return this.is_fork||this.#n.size>0}#p(){for(const n of this.#f)for(const i of n.#n.keys()){for(var t=!1,r=i;r.parent!==null;){if(this.#a.has(r)){t=!0;break}r=r.parent}if(!t)return!0}return!1}skip_effect(t){this.#a.has(t)||this.#a.set(t,{d:[],m:[]})}unskip_effect(t){var r=this.#a.get(t);if(r){this.#a.delete(t);for(var n of r.d)N(n,L),this.schedule(n);for(n of r.m)N(n,ie),this.schedule(n)}}#h(){if(ir++>1e3&&(pe.delete(this),ri()),!this.#d()){for(const a of this.#s)this.#o.delete(a),N(a,L),this.schedule(a);for(const a of this.#o)N(a,ie),this.schedule(a)}const t=this.#r;this.#r=[],this.apply();var r=De=[],n=[],i=st=[];for(const a of t)try{this.#u(a,r,n)}catch(o){throw Dr(a),o}if(S=null,i.length>0){var s=we.ensure();for(const a of i)s.schedule(a)}if(De=null,st=null,this.#d()||this.#p()){this.#v(n),this.#v(r);for(const[a,o]of this.#a)Cr(a,o)}else{this.#e.size===0&&pe.delete(this),this.#s.clear(),this.#o.clear();for(const a of this.#t)a(this);this.#t.clear(),sr(n),sr(r),this.#i?.resolve()}var f=S;if(this.#r.length>0){const a=f??=this;a.#r.push(...this.#r.filter(o=>!a.#r.includes(o)))}f!==null&&(pe.add(f),f.#h()),pe.has(this)||this.#m()}#u(t,r,n){t.f^=O;for(var i=t.first;i!==null;){var s=i.f,f=(s&(ne|Ne))!==0,a=f&&(s&O)!==0,o=a||(s&te)!==0||this.#a.has(i);if(!o&&i.fn!==null){f?i.f^=O:(s&Je)!==0?r.push(i):tt(i)&&((s&Ee)!==0&&this.#o.add(i),Fe(i));var l=i.first;if(l!==null){i=l;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}#v(t){for(var r=0;r<t.length;r+=1)Pr(t[r],this.#s,this.#o)}capture(t,r,n=!1){r!==C&&!this.previous.has(t)&&this.previous.set(t,r),(t.f&be)===0&&(this.current.set(t,[t.v,n]),Z?.set(t,t.v))}activate(){S=this}deactivate(){S=null,Z=null}flush(){try{yt=!0,S=this,this.#h()}finally{ir=0,At=null,De=null,st=null,yt=!1,S=null,Z=null,ye.clear()}}discard(){for(const t of this.#l)t(this);this.#l.clear(),pe.delete(this)}#m(){for(const l of pe){var t=l.id<this.id,r=[];for(const[c,[d,h]]of this.current){if(l.current.has(c)){var n=l.current.get(c)[0];if(t&&d!==n)l.current.set(c,[d,h]);else continue}r.push(c)}var i=[...l.current.keys()].filter(c=>!this.current.has(c));if(i.length===0)t&&l.discard();else if(r.length>0){l.activate();var s=new Set,f=new Map;for(var a of r)Ir(a,i,s,f);if(l.#r.length>0){l.apply();for(var o of l.#r)l.#u(o,[],[]);l.#r=[]}l.deactivate()}}for(const l of pe)l.#f.has(this)&&(l.#f.delete(this),l.#f.size===0&&!l.#d()&&(l.activate(),l.#h()))}increment(t,r){let n=this.#e.get(r)??0;if(this.#e.set(r,n+1),t){let i=this.#n.get(r)??0;this.#n.set(r,i+1)}}decrement(t,r,n){let i=this.#e.get(r)??0;if(i===1?this.#e.delete(r):this.#e.set(r,i-1),t){let s=this.#n.get(r)??0;s===1?this.#n.delete(r):this.#n.set(r,s-1)}this.#c||n||(this.#c=!0,ce(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,r){for(const n of t)this.#s.add(n);for(const n of r)this.#o.add(n);t.clear(),r.clear()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#l.add(t)}settled(){return(this.#i??=yr()).promise}static ensure(){if(S===null){const t=S=new we;yt||(pe.add(S),Ye||ce(()=>{S===t&&t.flush()}))}return S}apply(){{Z=null;return}}schedule(t){if(At=t,t.b?.is_pending&&(t.f&(Je|Xe|wr))!==0&&(t.f&Ie)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(De!==null&&r===w&&(y===null||(y.f&M)===0))return;if((n&(Ne|ne))!==0){if((n&O)===0)return;r.f^=O}}this.#r.push(r)}}function ti(e){var t=Ye;Ye=!0;try{for(var r;;){if(Xn(),S===null)return r;S.flush()}}finally{Ye=t}}function ri(){try{jn()}catch(e){me(e,At)}}let le=null;function sr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(re|te))===0&&tt(n)&&(le=new Set,Fe(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Kr(n),le?.size>0)){ye.clear();for(const i of le){if((i.f&(re|te))!==0)continue;const s=[i];let f=i.parent;for(;f!==null;)le.has(f)&&(le.delete(f),s.push(f)),f=f.parent;for(let a=s.length-1;a>=0;a--){const o=s[a];(o.f&(re|te))===0&&Fe(o)}}le.clear()}}le=null}}function Ir(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&M)!==0?Ir(i,t,r,n):(s&(It|Ee))!==0&&(s&L)===0&&Mr(i,t,n)&&(N(i,L),Ct(i))}}function Mr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(Le.call(t,i))return!0;if((i.f&M)!==0&&Mr(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Ct(e){S.schedule(e)}function Cr(e,t){if(!((e.f&ne)!==0&&(e.f&O)!==0)){(e.f&L)!==0?t.d.push(e):(e.f&ie)!==0&&t.m.push(e),N(e,O);for(var r=e.first;r!==null;)Cr(r,t),r=r.next}}function Dr(e){N(e,O);for(var t=e.first;t!==null;)Dr(t),t=t.next}function ni(e){let t=0,r=et(0),n;return()=>{zt()&&(u(r),pt(()=>(t===0&&(n=rt(()=>e(()=>Ke(r)))),t+=1,()=>{ce(()=>{t-=1,t===0&&(n?.(),n=void 0,Ke(r))})})))}}var ii=He|Ge;function si(e,t,r,n){new oi(e,t,r,n)}class oi{parent;is_pending=!1;transform_error;#t;#l=null;#e;#n;#i;#r=null;#s=null;#o=null;#a=null;#c=0;#f=0;#d=!1;#p=new Set;#h=new Set;#u=null;#v=ni(()=>(this.#u=et(this.#c),()=>{this.#u=null}));constructor(t,r,n,i){this.#t=t,this.#e=r,this.#n=s=>{var f=w;f.b=this,f.f|=xt,n(s)},this.parent=w.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#i=$r(()=>{this.#b()},ii)}#m(){try{this.#r=fe(()=>this.#n(this.#t))}catch(t){this.error(t)}}#w(t){const r=this.#e.failed;r&&(this.#o=fe(()=>{r(this.#t,()=>t,()=>()=>{})}))}#E(){const t=this.#e.pending;t&&(this.is_pending=!0,this.#s=fe(()=>t(this.#t)),ce(()=>{var r=this.#a=document.createDocumentFragment(),n=ft();r.append(n),this.#r=this.#g(()=>fe(()=>this.#n(n))),this.#f===0&&(this.#t.before(r),this.#a=null,Ve(this.#s,()=>{this.#s=null}),this.#_(S))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#c=0,this.#r=fe(()=>{this.#n(this.#t)}),this.#f>0){var t=this.#a=document.createDocumentFragment();Zr(this.#r,t);const r=this.#e.pending;this.#s=fe(()=>r(this.#t))}else this.#_(S)}catch(r){this.error(r)}}#_(t){this.is_pending=!1,t.transfer_effects(this.#p,this.#h)}defer_effect(t){Pr(t,this.#p,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#g(t){var r=w,n=y,i=I;se(this.#i),Y(this.#i),ze(this.#i.ctx);try{return we.ensure(),t()}catch(s){return Nr(s),null}finally{se(r),Y(n),ze(i)}}#y(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t,r);return}this.#f+=t,this.#f===0&&(this.#_(r),this.#s&&Ve(this.#s,()=>{this.#s=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(t,r){this.#y(t,r),this.#c+=t,!(!this.#u||this.#d)&&(this.#d=!0,ce(()=>{this.#d=!1,this.#u&<(this.#u,this.#c)}))}get_effect_pending(){return this.#v(),u(this.#u)}error(t){var r=this.#e.onerror;let n=this.#e.failed;if(!r&&!n)throw t;this.#r&&(j(this.#r),this.#r=null),this.#s&&(j(this.#s),this.#s=null),this.#o&&(j(this.#o),this.#o=null);var i=!1,s=!1;const f=()=>{if(i){Kn();return}i=!0,s&&Wn(),this.#o!==null&&Ve(this.#o,()=>{this.#o=null}),this.#g(()=>{this.#b()})},a=o=>{try{s=!0,r?.(o,f),s=!1}catch(l){me(l,this.#i&&this.#i.parent)}n&&(this.#o=this.#g(()=>{try{return fe(()=>{var l=w;l.b=this,l.f|=xt,n(this.#t,()=>o,()=>f)})}catch(l){return me(l,this.#i.parent),null}}))};ce(()=>{var o;try{o=this.transform_error(t)}catch(l){me(l,this.#i&&this.#i.parent);return}o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(a,l=>me(l,this.#i&&this.#i.parent)):a(o)})}}function ai(e,t,r,n){const i=Qe()?Dt:ui;var s=e.filter(h=>!h.settled);if(r.length===0&&s.length===0){n(t.map(i));return}var f=w,a=li(),o=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function l(h){a();try{n(h)}catch(m){(f.f&re)===0&&me(m,f)}at()}if(r.length===0){o.then(()=>l(t.map(i)));return}var c=Lr();function d(){Promise.all(r.map(h=>fi(h))).then(h=>l([...t.map(i),...h])).catch(h=>me(h,f)).finally(()=>c())}o?o.then(()=>{a(),d(),at()}):d()}function li(){var e=w,t=y,r=I,n=S;return function(s=!0){se(e),Y(t),ze(r),s&&(e.f&re)===0&&(n?.activate(),n?.apply())}}function at(e=!0){se(null),Y(null),ze(null),e&&S?.deactivate()}function Lr(){var e=w,t=e.b,r=S,n=t.is_rendered();return t.update_pending_count(1,r),r.increment(n,e),(i=!1)=>{t.update_pending_count(-1,r),r.decrement(n,e,i)}}function Dt(e){var t=M|L,r=y!==null&&(y.f&M)!==0?y:null;return w!==null&&(w.f|=Ge),{ctx:I,deps:null,effects:null,equals:Sr,f:t,fn:e,reactions:null,rv:0,v:C,wv:0,parent:r??w,ac:null}}function fi(e,t,r){let n=w;n===null&&Hn();var i=void 0,s=et(C),f=!y,a=new Map;return ki(()=>{var o=w,l=yr();i=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).finally(at)}catch(m){l.reject(m),at()}var c=S;if(f){if((o.f&Ie)!==0)var d=Lr();if(n.b.is_rendered())a.get(c)?.reject(ue),a.delete(c);else{for(const m of a.values())m.reject(ue);a.clear()}a.set(c,l)}const h=(m,v=void 0)=>{if(d){var k=v===ue;d(k)}if(!(v===ue||(o.f&re)!==0)){if(c.activate(),v)s.f|=be,lt(s,v);else{(s.f&be)!==0&&(s.f^=be),lt(s,m);for(const[R,D]of a){if(a.delete(R),R===c)break;D.reject(ue)}}c.deactivate()}};l.promise.then(h,m=>h(null,m||"unknown"))}),Ft(()=>{for(const o of a.values())o.reject(ue)}),new Promise(o=>{function l(c){function d(){c===i?o(s):l(i)}c.then(d,d)}l(i)})}function ui(e){const t=Dt(e);return t.equals=xr,t}function ci(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)j(t[r])}}function di(e){for(var t=e.parent;t!==null;){if((t.f&M)===0)return(t.f&re)===0?t:null;t=t.parent}return null}function Lt(e){var t,r=w;se(di(e));try{e.f&=~Oe,ci(e),t=tn(e)}finally{se(r)}return t}function Hr(e){var t=e.v,r=Lt(e);if(!e.equals(r)&&(e.wv=Qr(),(!S?.is_fork||e.deps===null)&&(e.v=r,S?.capture(e,t,!0),e.deps===null))){N(e,O);return}Pe||(Z!==null?(zt()||S?.is_fork)&&Z.set(e,r):Mt(e))}function hi(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ue),t.teardown=In,t.ac=null,Ze(t,0),Gt(t))}function zr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Fe(t)}let Rt=new Set;const ye=new Map;let Fr=!1;function et(e,t){var r={f:0,v:e,reactions:null,equals:Sr,rv:0,wv:0};return r}function ve(e,t){const r=et(e);return Ai(r),r}function q(e,t=!1,r=!0){const n=et(e);return t||(n.equals=xr),ct&&r&&I!==null&&I.l!==null&&(I.l.s??=[]).push(n),n}function or(e,t){return x(e,rt(()=>u(e))),t}function x(e,t,r=!1){y!==null&&(!X||(y.f&nr)!==0)&&Qe()&&(y.f&(M|Ee|It|nr))!==0&&($===null||!Le.call($,e))&&Bn();let n=r?We(t):t;return lt(e,n,st)}function lt(e,t,r=null){if(!e.equals(t)){var n=e.v;Pe?ye.set(e,t):ye.set(e,n),e.v=t;var i=we.ensure();if(i.capture(e,n),(e.f&M)!==0){const s=e;(e.f&L)!==0&&Lt(s),Z===null&&Mt(s)}e.wv=Qr(),Gr(e,L,r),Qe()&&w!==null&&(w.f&O)!==0&&(w.f&(ne|Ne))===0&&(B===null?Ri([e]):B.push(e)),!i.is_fork&&Rt.size>0&&!Fr&&pi()}return t}function pi(){Fr=!1;for(const e of Rt)(e.f&O)!==0&&N(e,ie),tt(e)&&Fe(e);Rt.clear()}function Ke(e){x(e,e.v+1)}function Gr(e,t,r){var n=e.reactions;if(n!==null)for(var i=Qe(),s=n.length,f=0;f<s;f++){var a=n[f],o=a.f;if(!(!i&&a===w)){var l=(o&L)===0;if(l&&N(a,t),(o&M)!==0){var c=a;Z?.delete(c),(o&Oe)===0&&(o&W&&(a.f|=Oe),Gr(c,ie,r))}else if(l){var d=a;(o&Ee)!==0&&le!==null&&le.add(d),r!==null?r.push(d):Ct(d)}}}}function We(e){if(typeof e!="object"||e===null||Ae in e)return e;const t=Pt(e);if(t!==On&&t!==Pn)return e;var r=new Map,n=Tn(e),i=ve(0),s=Re,f=a=>{if(Re===s)return a();var o=y,l=Re;Y(null),dr(s);var c=a();return Y(o),dr(l),c};return n&&r.set("length",ve(e.length)),new Proxy(e,{defineProperty(a,o,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&qn();var c=r.get(o);return c===void 0?f(()=>{var d=ve(l.value);return r.set(o,d),d}):x(c,l.value,!0),!0},deleteProperty(a,o){var l=r.get(o);if(l===void 0){if(o in a){const c=f(()=>ve(C));r.set(o,c),Ke(i)}}else x(l,C),Ke(i);return!0},get(a,o,l){if(o===Ae)return e;var c=r.get(o),d=o in a;if(c===void 0&&(!d||$e(a,o)?.writable)&&(c=f(()=>{var m=We(d?a[o]:C),v=ve(m);return v}),r.set(o,c)),c!==void 0){var h=u(c);return h===C?void 0:h}return Reflect.get(a,o,l)},getOwnPropertyDescriptor(a,o){var l=Reflect.getOwnPropertyDescriptor(a,o);if(l&&"value"in l){var c=r.get(o);c&&(l.value=u(c))}else if(l===void 0){var d=r.get(o),h=d?.v;if(d!==void 0&&h!==C)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(a,o){if(o===Ae)return!0;var l=r.get(o),c=l!==void 0&&l.v!==C||Reflect.has(a,o);if(l!==void 0||w!==null&&(!c||$e(a,o)?.writable)){l===void 0&&(l=f(()=>{var h=c?We(a[o]):C,m=ve(h);return m}),r.set(o,l));var d=u(l);if(d===C)return!1}return c},set(a,o,l,c){var d=r.get(o),h=o in a;if(n&&o==="length")for(var m=l;m<d.v;m+=1){var v=r.get(m+"");v!==void 0?x(v,C):m in a&&(v=f(()=>ve(C)),r.set(m+"",v))}if(d===void 0)(!h||$e(a,o)?.writable)&&(d=f(()=>ve(void 0)),x(d,We(l)),r.set(o,d));else{h=d.v!==C;var k=f(()=>We(l));x(d,k)}var R=Reflect.getOwnPropertyDescriptor(a,o);if(R?.set&&R.set.call(c,l),!h){if(n&&typeof o=="string"){var D=r.get("length"),Q=Number(o);Number.isInteger(Q)&&Q>=D.v&&x(D,Q+1)}Ke(i)}return!0},ownKeys(a){u(i);var o=Reflect.ownKeys(a).filter(d=>{var h=r.get(d);return h===void 0||h.v!==C});for(var[l,c]of r)c.v!==C&&!(l in a)&&o.push(l);return o},setPrototypeOf(){Un()}})}function ar(e){try{if(e!==null&&typeof e=="object"&&Ae in e)return e[Ae]}catch{}return e}function vi(e,t){return Object.is(ar(e),ar(t))}var lr,jr,qr,Ur;function _i(){if(lr===void 0){lr=window,jr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;qr=$e(t,"firstChild").get,Ur=$e(t,"nextSibling").get,tr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),tr(r)&&(r.__t=void 0)}}function ft(e=""){return document.createTextNode(e)}function ut(e){return qr.call(e)}function dt(e){return Ur.call(e)}function g(e,t){return ut(e)}function _e(e,t=!1){{var r=ut(e);return r instanceof Comment&&r.data===""?dt(r):r}}function _(e,t=1,r=!1){let n=e;for(;t--;)n=dt(n);return n}function gi(){return!1}function mi(e,t,r){return document.createElementNS(kr,e,void 0)}let fr=!1;function bi(){fr||(fr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function ht(e){var t=y,r=w;Y(null),se(null);try{return e()}finally{Y(t),se(r)}}function Ht(e,t,r,n=r){e.addEventListener(t,()=>ht(r));const i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),bi()}function Br(e){w===null&&(y===null&&Gn(),Fn()),Pe&&zn()}function yi(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function de(e,t){var r=w;r!==null&&(r.f&te)!==0&&(e|=te);var n={ctx:I,deps:null,nodes:null,f:e|L|W,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null},i=n;if((e&Je)!==0)De!==null?De.push(n):we.ensure().schedule(n);else if(t!==null){try{Fe(n)}catch(f){throw j(n),f}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ge)===0&&(i=i.first,(e&Ee)!==0&&(e&He)!==0&&i!==null&&(i.f|=He))}if(i!==null&&(i.parent=r,r!==null&&yi(i,r),y!==null&&(y.f&M)!==0&&(e&Ne)===0)){var s=y;(s.effects??=[]).push(i)}return n}function zt(){return y!==null&&!X}function Ft(e){const t=de(Xe,null);return N(t,O),t.teardown=e,t}function ur(e){Br();var t=w.f,r=!y&&(t&ne)!==0&&(t&Ie)===0;if(r){var n=I;(n.e??=[]).push(e)}else return Wr(e)}function Wr(e){return de(Je|Er,e)}function wi(e){return Br(),de(Xe|Er,e)}function Ei(e){we.ensure();const t=de(Ne|Ge,e);return(r={})=>new Promise(n=>{r.outro?Ve(t,()=>{j(t),n(void 0)}):(j(t),n(void 0))})}function ki(e){return de(It|Ge,e)}function pt(e,t=0){return de(Xe|t,e)}function Ce(e,t=[],r=[],n=[]){ai(n,t,r,i=>{de(Xe,()=>e(...i.map(u)))})}function $r(e,t=0){var r=de(Ee|t,e);return r}function fe(e){return de(ne|Ge,e)}function Yr(e){var t=e.teardown;if(t!==null){const r=Pe,n=y;cr(!0),Y(null);try{t.call(null)}finally{cr(r),Y(n)}}}function Gt(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&ht(()=>{i.abort(ue)});var n=r.next;(r.f&Ne)!==0?r.parent=null:j(r,t),r=n}}function Si(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ne)===0&&j(t),t=r}}function j(e,t=!0){var r=!1;(t||(e.f&Cn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(xi(e.nodes.start,e.nodes.end),r=!0),N(e,rr),Gt(e,t&&!r),Ze(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Yr(e),e.f^=rr,e.f|=re;var i=e.parent;i!==null&&i.first!==null&&Kr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function xi(e,t){for(;e!==null;){var r=e===t?null:dt(e);e.remove(),e=r}}function Kr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Ve(e,t,r=!0){var n=[];Vr(e,n,!0);var i=()=>{r&&j(e),t&&t()},s=n.length;if(s>0){var f=()=>--s||i();for(var a of n)a.out(f)}else i()}function Vr(e,t,r){if((e.f&te)===0){e.f^=te;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next,f=(i.f&He)!==0||(i.f&ne)!==0&&(e.f&Ee)!==0;Vr(i,t,f?r:!1),i=s}}}function Ti(e){Jr(e,!0)}function Jr(e,t){if((e.f&te)!==0){e.f^=te,(e.f&O)===0&&(N(e,L),we.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&He)!==0||(r.f&ne)!==0;Jr(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const f of s)(f.is_global||t)&&f.in()}}function Zr(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:dt(r);t.append(r),r=i}}let ot=!1,Pe=!1;function cr(e){Pe=e}let y=null,X=!1;function Y(e){y=e}let w=null;function se(e){w=e}let $=null;function Ai(e){y!==null&&($===null?$=[e]:$.push(e))}let F=null,G=0,B=null;function Ri(e){B=e}let Xr=1,Te=0,Re=Te;function dr(e){Re=e}function Qr(){return++Xr}function tt(e){var t=e.f;if((t&L)!==0)return!0;if(t&M&&(e.f&=~Oe),(t&ie)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(tt(s)&&Hr(s),s.wv>e.wv)return!0}(t&W)!==0&&Z===null&&N(e,O)}return!1}function en(e,t,r=!0){var n=e.reactions;if(n!==null&&!($!==null&&Le.call($,e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&M)!==0?en(s,t,!1):t===s&&(r?N(s,L):(s.f&O)!==0&&N(s,ie),Ct(s))}}function tn(e){var t=F,r=G,n=B,i=y,s=$,f=I,a=X,o=Re,l=e.f;F=null,G=0,B=null,y=(l&(ne|Ne))===0?e:null,$=null,ze(e.ctx),X=!1,Re=++Te,e.ac!==null&&(ht(()=>{e.ac.abort(ue)}),e.ac=null);try{e.f|=Tt;var c=e.fn,d=c();e.f|=Ie;var h=e.deps,m=S?.is_fork;if(F!==null){var v;if(m||Ze(e,G),h!==null&&G>0)for(h.length=G+F.length,v=0;v<F.length;v++)h[G+v]=F[v];else e.deps=h=F;if(zt()&&(e.f&W)!==0)for(v=G;v<h.length;v++)(h[v].reactions??=[]).push(e)}else!m&&h!==null&&G<h.length&&(Ze(e,G),h.length=G);if(Qe()&&B!==null&&!X&&h!==null&&(e.f&(M|ie|L))===0)for(v=0;v<B.length;v++)en(B[v],e);if(i!==null&&i!==e){if(Te++,i.deps!==null)for(let k=0;k<r;k+=1)i.deps[k].rv=Te;if(t!==null)for(const k of t)k.rv=Te;B!==null&&(n===null?n=B:n.push(...B))}return(e.f&be)!==0&&(e.f^=be),d}catch(k){return Nr(k)}finally{e.f^=Tt,F=t,G=r,B=n,y=i,$=s,ze(f),X=a,Re=o}}function Ni(e,t){let r=t.reactions;if(r!==null){var n=An.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&M)!==0&&(F===null||!Le.call(F,t))){var s=t;(s.f&W)!==0&&(s.f^=W,s.f&=~Oe),Mt(s),hi(s),Ze(s,0)}}function Ze(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ni(e,r[n])}function Fe(e){var t=e.f;if((t&re)===0){N(e,O);var r=w,n=ot;w=e,ot=!0;try{(t&(Ee|wr))!==0?Si(e):Gt(e),Yr(e);var i=tn(e);e.teardown=typeof i=="function"?i:null,e.wv=Xr;var s;xn&&Jn&&(e.f&L)!==0&&e.deps}finally{ot=n,w=r}}}async function Oi(){await Promise.resolve(),ti()}function u(e){var t=e.f,r=(t&M)!==0;if(y!==null&&!X){var n=w!==null&&(w.f&re)!==0;if(!n&&($===null||!Le.call($,e))){var i=y.deps;if((y.f&Tt)!==0)e.rv<Te&&(e.rv=Te,F===null&&i!==null&&i[G]===e?G++:F===null?F=[e]:F.push(e));else{(y.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[y]:Le.call(s,y)||s.push(y)}}}if(Pe&&ye.has(e))return ye.get(e);if(r){var f=e;if(Pe){var a=f.v;return((f.f&O)===0&&f.reactions!==null||nn(f))&&(a=Lt(f)),ye.set(f,a),a}var o=(f.f&W)===0&&!X&&y!==null&&(ot||(y.f&W)!==0),l=(f.f&Ie)===0;tt(f)&&(o&&(f.f|=W),Hr(f)),o&&!l&&(zr(f),rn(f))}if(Z?.has(e))return Z.get(e);if((e.f&be)!==0)throw e.v;return e.v}function rn(e){if(e.f|=W,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&M)!==0&&(t.f&W)===0&&(zr(t),rn(t))}function nn(e){if(e.v===C)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ye.has(t)||(t.f&M)!==0&&nn(t))return!0;return!1}function rt(e){var t=X;try{return X=!0,e()}finally{X=t}}function Pi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ae in e)Nt(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Ae in r&&Nt(r)}}}function Nt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Nt(e[n],t)}catch{}const r=Pt(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=br(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}const Ii=["touchstart","touchmove"];function Mi(e){return Ii.includes(e)}const nt=Symbol("events"),Ci=new Set,hr=new Set;function Di(e,t,r,n={}){function i(s){if(n.capture||Ot.call(t,s),!s.cancelBubble)return ht(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ce(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Li(e,t,r,n,i){var s={capture:n,passive:i},f=Di(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ft(()=>{t.removeEventListener(e,f,s)})}let pr=null;function Ot(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;pr=e;var f=0,a=pr===e&&e[nt];if(a){var o=i.indexOf(a);if(o!==-1&&(t===document||t===window)){e[nt]=t;return}var l=i.indexOf(t);if(l===-1)return;o<=l&&(f=o)}if(s=i[f]||e.target,s!==t){Nn(e,"currentTarget",{configurable:!0,get(){return s||r}});var c=y,d=w;Y(null),se(null);try{for(var h,m=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var k=s[nt]?.[n];k!=null&&(!s.disabled||e.target===s)&&k.call(s,e)}catch(R){h?m.push(R):h=R}if(e.cancelBubble||v===t||v===null)break;s=v}if(h){for(let R of m)queueMicrotask(()=>{throw R});throw h}}finally{e[nt]=t,delete e.currentTarget,Y(c),se(d)}}}const Hi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function zi(e){return Hi?.createHTML(e)??e}function Fi(e){var t=mi("template");return t.innerHTML=zi(e.replaceAll("<!>","\x3C!---->")),t.content}function vr(e,t){var r=w;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var r=(t&$n)!==0,n=(t&Yn)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Fi(s?e:"<!>"+e),r||(i=ut(i)));var f=n||jr?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=ut(f),o=f.lastChild;vr(a,o)}else vr(f,f);return f}}function U(e,t){e!==null&&e.before(t)}function Ue(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=`${r}`)}function Gi(e,t){return ji(e,t)}const it=new Map;function ji(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:f=!0,transformError:a}){_i();var o=void 0,l=Ei(()=>{var c=r??t.appendChild(ft());si(c,{pending:()=>{}},m=>{Tr({});var v=I;s&&(v.c=s),i&&(n.$$events=i),o=e(m,n)||{},Ar()},a);var d=new Set,h=m=>{for(var v=0;v<m.length;v++){var k=m[v];if(!d.has(k)){d.add(k);var R=Mi(k);for(const Me of[t,document]){var D=it.get(Me);D===void 0&&(D=new Map,it.set(Me,D));var Q=D.get(k);Q===void 0?(Me.addEventListener(k,Ot,{passive:R}),D.set(k,1)):D.set(k,Q+1)}}}};return h(Rn(Ci)),hr.add(h),()=>{for(var m of d)for(const R of[t,document]){var v=it.get(R),k=v.get(m);--k==0?(R.removeEventListener(m,Ot),v.delete(m),v.size===0&&it.delete(R)):v.set(m,k)}hr.delete(h),c!==r&&c.parentNode?.removeChild(c)}});return qi.set(o,l),o}let qi=new WeakMap;class Ui{anchor;#t=new Map;#l=new Map;#e=new Map;#n=new Set;#i=!0;constructor(t,r=!0){this.anchor=t,this.#i=r}#r=t=>{if(this.#t.has(t)){var r=this.#t.get(t),n=this.#l.get(r);if(n)Ti(n),this.#n.delete(r);else{var i=this.#e.get(r);i&&(this.#l.set(r,i.effect),this.#e.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,f]of this.#t){if(this.#t.delete(s),s===t)break;const a=this.#e.get(f);a&&(j(a.effect),this.#e.delete(f))}for(const[s,f]of this.#l){if(s===r||this.#n.has(s))continue;const a=()=>{if(Array.from(this.#t.values()).includes(s)){var l=document.createDocumentFragment();Zr(f,l),l.append(ft()),this.#e.set(s,{effect:f,fragment:l})}else j(f);this.#n.delete(s),this.#l.delete(s)};this.#i||!n?(this.#n.add(s),Ve(f,a,!1)):a()}}};#s=t=>{this.#t.delete(t);const r=Array.from(this.#t.values());for(const[n,i]of this.#e)r.includes(n)||(j(i.effect),this.#e.delete(n))};ensure(t,r){var n=S,i=gi();if(r&&!this.#l.has(t)&&!this.#e.has(t))if(i){var s=document.createDocumentFragment(),f=ft();s.append(f),this.#e.set(t,{effect:fe(()=>r(f)),fragment:s})}else this.#l.set(t,fe(()=>r(this.anchor)));if(this.#t.set(n,t),i){for(const[a,o]of this.#l)a===t?n.unskip_effect(o):n.skip_effect(o);for(const[a,o]of this.#e)a===t?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(this.#r),n.ondiscard(this.#s)}else this.#r(n)}}function ge(e,t,r=!1){var n=new Ui(e),i=r?He:0;function s(f,a){n.ensure(f,a)}$r(()=>{var f=!1;t((a,o=0)=>{f=!0,s(o,a)}),f||s(-1,null)},i)}function Bi(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function Wi(e,t,r,n,i,s){var f=e.__className;if(f!==r||f===void 0){var a=Bi(r);a==null?e.removeAttribute("class"):e.className=a,e.__className=r}return s}const $i=Symbol("is custom element"),Yi=Symbol("is html"),Ki=Ln?"progress":"PROGRESS";function Vi(e,t){var r=sn(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Ki)||(e.value=t??"")}function _r(e,t,r,n){var i=sn(e);i[t]!==(i[t]=r)&&(t==="loading"&&(e[Dn]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ji(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function sn(e){return e.__attributes??={[$i]:e.nodeName.includes("-"),[Yi]:e.namespaceURI===kr}}var gr=new Map;function Ji(e){var t=e.getAttribute("is")||e.nodeName,r=gr.get(t);if(r)return r;gr.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=br(i);for(var f in n)n[f].set&&r.push(f);i=Pt(i)}return r}function Be(e,t,r=t){var n=new WeakSet;Ht(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Et(e)?kt(s):s,r(s),S!==null&&n.add(S),await Oi(),s!==(s=t())){var f=e.selectionStart,a=e.selectionEnd,o=e.value.length;if(e.value=s??"",a!==null){var l=e.value.length;f===a&&a===o&&l>o?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=f,e.selectionEnd=Math.min(a,l))}}}),rt(t)==null&&e.value&&(r(Et(e)?kt(e.value):e.value),S!==null&&n.add(S)),pt(()=>{var i=t();if(e===document.activeElement){var s=S;if(n.has(s))return}Et(e)&&i===kt(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}const wt=new Set;function J(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",f=e;if(t!==null)for(var a of t)f=f[a]??=[];f.push(r),Ht(r,"change",()=>{var o=r.__value;s&&(o=Xi(f,o,r.checked)),i(o)},()=>i(s?[]:null)),pt(()=>{var o=n();s?(o=o||[],r.checked=o.includes(r.__value)):r.checked=vi(r.__value,o)}),Ft(()=>{var o=f.indexOf(r);o!==-1&&f.splice(o,1)}),wt.has(f)||(wt.add(f),ce(()=>{f.sort((o,l)=>o.compareDocumentPosition(l)===4?-1:1),wt.delete(f)})),ce(()=>{})}function Zi(e,t,r=t){Ht(e,"change",n=>{var i=n?e.defaultChecked:e.checked;r(i)}),rt(t)==null&&r(e.checked),pt(()=>{var n=t();e.checked=!!n})}function Xi(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function Et(e){var t=e.type;return t==="number"||t==="range"}function kt(e){return e===""?null:+e}function Qi(e=!1){const t=I,r=t.l.u;if(!r)return;let n=()=>Pi(t.s);if(e){let i=0,s={};const f=Dt(()=>{let a=!1;const o=t.s;for(const l in o)o[l]!==s[l]&&(s[l]=o[l],a=!0);return a&&i++,i});n=()=>u(f)}r.b.length&&wi(()=>{mr(t,n),St(r.b)}),ur(()=>{const i=rt(()=>r.m.map(Mn));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&ur(()=>{mr(t,n),St(r.a)})}function mr(e,t){if(e.l.s)for(const r of e.l.s)u(r);t()}const es="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(es);Zn();var ts=K('<h3>GitHub Enterprise Server Domain</h3> <div class="px-3 py-3"><p>Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code> and without any path. It should look something like <code>github.mycompany.com</code>.</p> <input class="form-control"/></div>',1),rs=K(`<h3>Authentication Type</h3> <div class="px-3 py-3"><p>You can choose between creating a new app that will provide authentication for specific
repositories, or a personal access token that will provide access to all repositories
available to you. Apps are easier to set up and provide more fine-grained access control. If
you have previously created an app, you can choose to use an existing app.</p> <div class="form-check"><input class="form-check-input" type="radio" id="newApp"/> <label class="form-check-label" for="newApp">New GitHub App <b>(recommended)</b></label></div> <div class="form-check"><input class="form-check-input" type="radio" id="existingApp"/> <label class="form-check-label" for="existingApp">Existing GitHub App</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="pat"/> <label class="form-check-label" for="pat">Personal Access Token</label></div></div>`,1),ns=K(`<p class="pt-2">If multiple organizations under the same GitHub Enterprise Server need to use the runners,
you can make the app public.</p> <div class="form-check"><input class="form-check-input" type="checkbox" id="public"/> <label class="form-check-label" for="public">Public app</label></div>`,1),is=K('<h3>Organization name</h3> <div class="px-3 py-3"><p>What is the slug for your organization? If your repositories have a URL like <code> </code> then your organization slug is <code>MyOrg</code>.</p> <input class="form-control"/></div>',1),ss=K(`<h3>New App Settings</h3> <div class="px-3 py-3"><p>Choose whether to create a new personal app or organization app. A private personal app can
only be used for repositories under your user. A private organization app can only be used
for repositories under that organization.</p> <div class="form-check"><input class="form-check-input" type="radio" id="userScope"/> <label class="form-check-label" for="userScope">User app</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="orgScope"/> <label class="form-check-label" for="orgScope">Organization app</label></div> <!></div> <!>`,1),os=K(`<h3>Existing App Details</h3> <div class="px-3 py-3"><div class="form-group row px-3 py-2"><label for="appid" class="col-sm-2 col-form-label">App Id</label> <div class="col-sm-10"><input type="number" class="form-control" id="appid"/></div></div> <div class="form-group row px-3 py-2"><label for="pk" class="col-sm-2 col-form-label">Private Key</label> <div class="col-sm-10"><textarea class="form-control" id="pk" rows="10"></textarea></div></div> <div class="form-group row px-3 py-2"><div class="col-sm-2 col-form-label">Registration Level</div> <div class="col-sm-10"><div class="form-check"><input class="form-check-input" type="radio" id="repo"/> <label class="form-check-label" for="repo">Repository</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="org"/> <label class="form-check-label" for="org">Organization</label></div></div></div> <h4>Required Permissions</h4> <p>The existing app must have the following permissions.</p> <pre> </pre> <h4>Webhook</h4> <p>Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.</p></div>`,1),as=K(`<h2>Personal Access Token</h2> <div class="px-3 py-3"><p>The <a>personal access token</a> must have the <code>repo</code> scope enabled. Don't forget to also create a webhook as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.</p> <input class="form-control" placeholder="Token e.g. ghp_abcdefghijklmnopqrstuvwxyz1234567890"/></div>`,1),ls=K(`<h3>Registration Level</h3> <div class="px-3 py-3"><p>Would you like runners to be registered on repository level, or on organization level?</p> <p><em>This determines where runners will be registered dynamically each time they are provisioned. This is
independent of where the GitHub app is installed.</em></p> <ul><li>Registering runners on repository level requires the <code>administration</code> <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#authentication-requirements">permission</a>.</li> <li>Registering runners on organization level only requires the <code>organization_self_hosted_runners</code> <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#authentication-requirements">permission</a> which is more fine-grained.</li> <li><strong>Repository level is recommended</strong> because runners are registered to the specific repository
where the job started, preventing jobs from being assigned to runners intended for other repositories.</li> <li>Registering runners on organization level means runners are registered to the entire organization, making
them available to <strong>ALL repositories in the organization</strong>, regardless of whether the app is
installed on those repositories. This can lead to jobs being routed to runners that weren't intended for them.</li> <li>Organization level registration does <strong>not</strong> automatically install the app on all repositories.
You still need to install the app on each repository where you want to use runners. GitHub will ask you
on which repositories to install this app after it's created.</li> <li>Do not use organization level registration if you don't fully trust all repositories in your organization.</li> <li>Use organization level only if you need to minimize permissions and you fully trust all repositories in your organization.</li> <li><strong>When in doubt, use the default repository level registration.</strong></li></ul> <div class="form-check"><input class="form-check-input" type="radio" id="repo"/> <label class="form-check-label" for="repo">Repository</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="org"/> <label class="form-check-label" for="org">Organization</label></div></div>`,1),fs=K("<p>This button will be enabled once all the questions above are answered.</p>"),us=K('<div role="alert"> </div>'),cs=K(`<p><b class="text-danger">WARNING:</b> using a public app means anyone with access to <code> </code> can use the runners you're setting up now. Anyone can create a workflow that will run on those runners,
have access to their instance profile, and be part of their security group. Consider the security
implications before continuing.</p>`),ds=K(`<main><div class="container py-3 px-2"><div class="row"><form class="col"><h1>Setup GitHub Runners</h1> <p>Answer all the questions on this page to automatically configure GitHub integration and get the
runners working. This page will not be accessible once you complete this operation. If you ever want
to access it again, edit <code></code> and run the status function again.</p> <h3>Choose GitHub Instance</h3> <div class="px-3 py-3"><p>Are your repositories hosted on GitHub.com or are you using an on-premise installation of GitHub
Enterprise Server?</p> <div class="form-check"><input class="form-check-input" type="radio" id="github.com"/> <label class="form-check-label" for="github.com">GitHub.com</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="ghes"/> <label class="form-check-label" for="ghes">GitHub Enterprise Server</label></div></div> <!> <!> <!> <!> <h2>Finish Setup</h2> <div class="px-3 py-3"><!> <!> <button type="submit" class="btn btn-success"> </button></div></form></div></div> <form method="post" id="appform"><input type="hidden" name="manifest"/></form></main>`);function hs(e,t){Tr(t,!1);const r=[],n=[],i=[],s=[],f="INSERT_TOKEN_HERE";let a=q(),o=q("INSERT_DOMAIN_HERE"),l=q(),c=q("user"),d=q("repo"),h=q("ORGANIZATION"),m=q(""),v=q(""),k=q(""),R=q(),D=q();const Q={actions:"write",administration:"write",deployments:"read"},Me={actions:"write",organization_self_hosted_runners:"write",deployments:"read"},ke=q({url:"https://github.com/CloudSnorkel/cdk-github-runners",hook_attributes:{url:"INSERT_WEBHOOK_URL_HERE"},redirect_url:"INSERT_BASE_URL_HERE/complete-new-app",public:!1,default_permissions:Q,default_events:["workflow_job"]});function on(p,b,E,T,A,H,P){return P||p===void 0||b===void 0?!0:b==="newApp"?!1:b==="existingApp"?E===""||T===""||A===void 0:b==="pat"?H==="":(console.error("Something is broken",p,b,E),!0)}function an(p){return p==="newApp"?"Create GitHub App":"Setup"}function vt(p,b){return new Promise((E,T)=>{fetch(`${p}?token=${f}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(b),redirect:"error"}).then(A=>{A.ok?A.text().then(E).catch(T):A.text().then(H=>{T(new Error(`${H} [${A.status}]`))}).catch(T)}).catch(T)})}function ln(p){p.preventDefault();function b(){const E=u(a)==="ghes"?u(o):"github.com";switch(or(ke,u(ke).default_permissions=u(d)==="repo"?Q:Me),u(l)){case"newApp":return vt("domain",{domain:E,runnerLevel:u(d)}).then(T=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return vt("app",{appid:u(m),pk:u(v),domain:E,runnerLevel:u(d)});case"pat":return vt("pat",{pat:u(k),domain:E})}}b().then(E=>{x(D,E),x(R,!0)}).catch(E=>{x(D,`${E}`),x(R,!1)})}Qi();var jt=ds(),qt=g(jt),fn=g(qt),Ut=g(fn),Bt=_(g(Ut),2),un=_(g(Bt));un.textContent="INSERT_SECRET_ARN_HERE";var Wt=_(Bt,4),$t=_(g(Wt),2),_t=g($t);_t.value=_t.__value="github.com";var cn=_($t,2),gt=g(cn);gt.value=gt.__value="ghes";var Yt=_(Wt,2);{var dn=p=>{var b=ts(),E=_(_e(b),2),T=_(g(E),2);Be(T,()=>u(o),A=>x(o,A)),U(p,b)};ge(Yt,p=>{u(a)==="ghes"&&p(dn)})}var Kt=_(Yt,2);{var hn=p=>{var b=rs(),E=_(_e(b),2),T=_(g(E),2),A=g(T);A.value=A.__value="newApp";var H=_(T,2),P=g(H);P.value=P.__value="existingApp";var oe=_(H,2),Se=g(oe);Se.value=Se.__value="pat",J(n,[],A,()=>u(l),ee=>x(l,ee)),J(n,[],P,()=>u(l),ee=>x(l,ee)),J(n,[],Se,()=>u(l),ee=>x(l,ee)),U(p,b)};ge(Kt,p=>{u(a)&&p(hn)})}var Vt=_(Kt,2);{var pn=p=>{var b=ss(),E=_(_e(b),2),T=_(g(E),2),A=g(T);A.value=A.__value="user";var H=_(T,2),P=g(H);P.value=P.__value="org";var oe=_(H,2);{var Se=z=>{var ae=ns(),je=_(_e(ae),2),he=g(je);Zi(he,()=>u(ke).public,qe=>or(ke,u(ke).public=qe)),U(z,ae)};ge(oe,z=>{u(a)==="ghes"&&z(Se)})}var ee=_(E,2);{var mt=z=>{var ae=is(),je=_(_e(ae),2),he=g(je),qe=_(g(he)),bt=g(qe),V=_(he,2);Ce(()=>Ue(bt,`https://${u(o)??""}/MyOrg/my-repo`)),Be(V,()=>u(h),Sn=>x(h,Sn)),U(z,ae)};ge(ee,z=>{u(c)==="org"&&z(mt)})}J(i,[],A,()=>u(c),z=>x(c,z)),J(i,[],P,()=>u(c),z=>x(c,z)),U(p,b)},vn=p=>{var b=os(),E=_(_e(b),2),T=g(E),A=_(g(T),2),H=g(A),P=_(T,2),oe=_(g(P),2),Se=g(oe),ee=_(P,2),mt=_(g(ee),2),z=g(mt),ae=g(z);ae.value=ae.__value="repo";var je=_(z,2),he=g(je);he.value=he.__value="org";var qe=_(ee,6),bt=g(qe);Ce(V=>Ue(bt,V),[()=>JSON.stringify(u(d)==="repo"?Q:Me,void 0,2)]),Be(H,()=>u(m),V=>x(m,V)),Be(Se,()=>u(v),V=>x(v,V)),J(s,[],ae,()=>u(d),V=>x(d,V)),J(s,[],he,()=>u(d),V=>x(d,V)),U(p,b)},_n=p=>{var b=as(),E=_(_e(b),2),T=g(E),A=_(g(T)),H=_(T,2);Ce(()=>_r(A,"href",`https://${u(o)??""}/settings/tokens`)),Be(H,()=>u(k),P=>x(k,P)),U(p,b)};ge(Vt,p=>{u(l)==="newApp"?p(pn):u(l)==="existingApp"?p(vn,1):u(l)==="pat"&&p(_n,2)})}var Jt=_(Vt,2);{var gn=p=>{var b=ls(),E=_(_e(b),2),T=_(g(E),6),A=g(T);A.value=A.__value="repo";var H=_(T,2),P=g(H);P.value=P.__value="org",J(s,[],A,()=>u(d),oe=>x(d,oe)),J(s,[],P,()=>u(d),oe=>x(d,oe)),U(p,b)};ge(Jt,p=>{u(c)==="org"&&u(l)==="newApp"&&p(gn)})}var mn=_(Jt,4),Zt=g(mn);{var bn=p=>{var b=fs();U(p,b)},yn=p=>{var b=us(),E=g(b);Ce(()=>{Wi(b,1,`alert alert-${u(R)?"success":"danger"}`),Ue(E,u(D))}),U(p,b)};ge(Zt,p=>{u(D)===void 0?p(bn):p(yn,-1)})}var Xt=_(Zt,2);{var wn=p=>{var b=cs(),E=_(g(b),2),T=g(E);Ce(()=>Ue(T,u(o))),U(p,b)};ge(Xt,p=>{u(ke).public&&u(l)==="newApp"&&p(wn)})}var Qt=_(Xt,2),En=g(Qt),er=_(qt,2),kn=g(er);Ce((p,b,E)=>{Qt.disabled=p,Ue(En,b),_r(er,"action",`https://${u(o)??""}/${u(c)==="org"?`organizations/${u(h)}/`:""}settings/apps/new?state=INSERT_TOKEN_HERE`),Vi(kn,E)},[()=>on(u(a),u(l),u(m),u(v),u(d),u(k),u(R)),()=>an(u(l)),()=>JSON.stringify(u(ke))]),J(r,[],_t,()=>u(a),p=>x(a,p)),J(r,[],gt,()=>u(a),p=>x(a,p)),Li("submit",Ut,ln),U(e,jt),Ar()}Gi(hs,{target:document.getElementById("app")});</script>
<style rel="stylesheet" crossorigin>.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.object-fit-contain{object-fit:contain!important}.object-fit-cover{object-fit:cover!important}.object-fit-fill{object-fit:fill!important}.object-fit-scale{object-fit:scale-down!important}.object-fit-none{object-fit:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-x-visible{overflow-x:visible!important}.overflow-x-scroll{overflow-x:scroll!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-visible{overflow-y:visible!important}.overflow-y-scroll{overflow-y:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-inline-grid{display:inline-grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:var(--bs-box-shadow)!important}.shadow-sm{box-shadow:var(--bs-box-shadow-sm)!important}.shadow-lg{box-shadow:var(--bs-box-shadow-lg)!important}.shadow-none{box-shadow:none!important}.focus-ring-primary{--bs-focus-ring-color: rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-secondary{--bs-focus-ring-color: rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-success{--bs-focus-ring-color: rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity))}.focus-ring-info{--bs-focus-ring-color: rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity))}.focus-ring-warning{--bs-focus-ring-color: rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity))}.focus-ring-danger{--bs-focus-ring-color: rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity))}.focus-ring-light{--bs-focus-ring-color: rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity))}.focus-ring-dark{--bs-focus-ring-color: rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity))}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translate(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity: 1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity: 1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity: 1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity: 1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity: 1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity: 1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity: 1;border-color:rgba(var(--bs