),kt=bt.test.bind(bt);async function St(e){const t=kt(e),r=e.startsWith("v1.")||e.startsWith("ghs_"),o=e.startsWith("ghu_");return{type:"token",token:e,tokenType:t?"app":r?"installation":o?"user-to-server":"oauth"}}async function Tt(e,t,r,o){const n=t.endpoint.merge(r,o);return n.headers.authorization=function(e){return 3===e.split(/\./).length?`bearer ${e}`:`token ${e}`}(e),t(n)}var At=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if("string"!=typeof e)throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(St.bind(null,e),{hook:Tt.bind(null,e)})};const _t="6.1.4",Et=()=>{},Pt=console.warn.bind(console),xt=console.error.bind(console),Ot=`octokit-core.js/${_t} ${Fe()}`;class Rt{static VERSION=_t;static defaults(e){return class extends(this){constructor(...t){const r=t[0]||{};super("function"!=typeof e?Object.assign({},e,r,r.userAgent&&e.userAgent?{userAgent:`${r.userAgent} ${e.userAgent}`}:null):e(r))}}}static plugins=[];static plugin(...e){const t=this.plugins;return class extends(this){static plugins=t.concat(e.filter(e=>!t.includes(e)))}}constructor(e={}){const t=new Ve.Collection,r={baseUrl:mt.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};var o;if(r.headers["user-agent"]=e.userAgent?`${e.userAgent} ${Ot}`:Ot,e.baseUrl&&(r.baseUrl=e.baseUrl),e.previews&&(r.mediaType.previews=e.previews),e.timeZone&&(r.headers["time-zone"]=e.timeZone),this.request=mt.defaults(r),this.graphql=(o=this.request,Ct(o,{method:"POST",url:"/graphql"})).defaults(r),this.log=Object.assign({debug:Et,info:Et,warn:Pt,error:xt},e.log),this.hook=t,e.authStrategy){const{authStrategy:r,...o}=e,n=r(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));t.wrap("request",n.hook),this.auth=n}else if(e.auth){const r=At(e.auth);t.wrap("request",r.hook),this.auth=r}else this.auth=async()=>({type:"unauthenticated"});const n=this.constructor;for(let t=0;t