MCPcopy Create free account
hub / github.com/EndBug/add-and-commit / extractUrlVariableNames

Function extractUrlVariableNames

lib/index.js:5–5  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

3/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */i[A-4]=r[0];i[A-3]=r[1];i[A-2]=r[2];i[A-1]=r[3];i[1]=n;if(n===126){i.writeUInt16BE(o,2)}else if(n===127){i[2]=i[3]=0;i.writeUIntBE(o,4,6)}i[1]|=128;for(let e=0;e<o;++e){i[A+e]=t[e]^r[e&3]}return i}}e.exports={WebsocketFrameSend:WebsocketFrameSend}},9469:(e,t,r)=>{const{createInflateRaw:s,Z_DEFAULT_WINDOWBITS:o}=r(8522);const{isValidClientWindowBits:n}=r(8625);const{MessageSizeExceededError:A}=r(8707);const i=Buffer.from([0,0,255,255]);const a=Symbol("kBuffer");const c=Symbol("kLength");const l=4*1024*1024;class PerMessageDeflate{#Z;#h={};#b=false;#K=null;constructor(e){this.#h.serverNoContextTakeover=e.has("server_no_context_takeover");this.#h.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,t,r){if(this.#b){r(new A);return}if(!this.#Z){let e=o;if(this.#h.serverMaxWindowBits){if(!n(this.#h.serverMaxWindowBits)){r(new Error("Invalid server_max_window_bits"));return}e=Number.parseInt(this.#h.serverMaxWindowBits)}try{this.#Z=s({windowBits:e})}catch(e){r(e);return}this.#Z[a]=[];this.#Z[c]=0;this.#Z.on("data",(e=>{if(this.#b){return}this.#Z[c]+=e.length;if(this.#Z[c]>l){this.#b=true;this.#Z.removeAllListeners();this.#Z.destroy();this.#Z=null;if(this.#K){const e=this.#K;this.#K=null;e(new A)}return}this.#Z[a].push(e)}));this.#Z.on("error",(e=>{this.#Z=null;r(e)}))}this.#K=r;this.#Z.write(e);if(t){this.#Z.write(i)}this.#Z.flush((()=>{if(this.#b||!this.#Z){return}const e=Buffer.concat(this.#Z[a],this.#Z[c]);this.#Z[a].length=0;this.#Z[c]=0;this.#K=null;r(null,e)}))}}e.exports={PerMessageDeflate:PerMessageDeflate}},1652:(e,t,r)=>{const{Writable:s}=r(7075);const o=r(4589);const{parserStates:n,opcodes:A,states:i,emptyBuffer:a,sentCloseFrameState:c}=r(736);const{kReadyState:l,kSentClose:u,kResponse:g,kReceivedClose:h}=r(1216);const{channels:d}=r(2414);const{isValidStatusCode:E,isValidOpcode:p,failWebsocketConnection:f,websocketMessageReceived:C,utf8Decode:Q,isControlFrame:B,isTextBinaryFrame:I,isContinuationFrame:m}=r(8625);const{WebsocketFrameSend:w}=r(3264);const{closeWebSocketConnection:y}=r(6897);const{PerMessageDeflate:b}=r(9469);class ByteParser extends s{#X=[];#$=0;#ee=false;#B=n.INFO;#te={};#re=[];#se;constructor(e,t){super();this.ws=e;this.#se=t==null?new Map:t;if(this.#se.has("permessage-deflate")){this.#se.set("permessage-deflate",new b(t))}}_write(e,t,r){this.#X.push(e);this.#$+=e.length;this.#ee=true;this.run(r)}run(e){while(this.#ee){if(this.#B===n.INFO){if(this.#$<2){return e()}const t=this.consume(2);const r=(t[0]&128)!==0;const s=t[0]&15;const o=(t[1]&128)===128;const i=!r&&s!==A.CONTINUATION;const a=t[1]&127;const c=t[0]&64;const l=t[0]&32;const u=t[0]&16;if(!p(s)){f(this.ws,"Invalid opcode received");return e()}if(o){f(this.ws,"Frame cannot be masked");return e()}if(c!==0&&!this.#se.has("permessage-deflate")){f(this.ws,"Expected RSV1 to be clear.");return}if(l!==0||u!==0){f(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(i&&!I(s)){f(this.ws,"Invalid frame type was fragmented.");return}if(I(s)&&this.#re.length>0){f(this.ws,"Expected continuation frame");return}if(this.#te.fragmented&&i){f(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((a>125||i)&&B(s)){f(this.ws,"Control frame either too large or fragmented");return}if(m(s)&&this.#re.length===0&&!this.#te.compressed){f(this.ws,"Unexpected continuation frame");return}if(a<=125){this.#te.payloadLength=a;this.#B=n.READ_DATA}else if(a===126){this.#B=n.PAYLOADLENGTH_16}else if(a===127){this.#B=n.PAYLOADLENGTH_64}if(I(s)){this.#te.binaryType=s;this.#te.compressed=c!==0}this.#te.opcode=s;this.#te.masked=o;this.#te.fin=r;this.#te.fragmented=i}else if(this.#B===n.PAYLOADLENGTH_16){if(this.#$<2){return e()}const t=this.consume(2);this.#te.payloadLength=t.readUInt16BE(0);this.#B=n.READ_DATA}else if(this.#B===n.PAYLOADLENGTH_64){if(this.#$<8){return e()}const t=this.consume(8);const r=t.readUInt32BE(0);const s=t.readUInt32BE(4);if(r!==0||s>2**31-1){f(this.ws,"Received payload length > 2^31 bytes.");return}this.#te.payloadLength=s;this.#B=n.READ_DATA}else if(this.#B===n.READ_DATA){if(this.#$<this.#te.payloadLength){return e()}const t=this.consume(this.#te.payloadLength);if(B(this.#te.opcode)){this.#ee=this.parseControlFrame(t);this.#B=n.INFO}else{if(!this.#te.compressed){this.#re.push(t);if(!this.#te.fragmented&&this.#te.fin){const e=Buffer.concat(this.#re);C(this.ws,this.#te.binaryType,e);this.#re.length=0}this.#B=n.INFO}else{this.#se.get("permessage-deflate").decompress(t,this.#te.fin,((t,r)=>{if(t){f(this.ws,t.message);return}this.#re.push(r);if(!this.#te.fin){this.#B=n.INFO;this.#ee=true;this.run(e);return}C(this.ws,this.#te.binaryType,Buffer.concat(this.#re));this.#ee=true;this.#B=n.INFO;this.#re.length=0;this.run(e)}));this.#ee=false;break}}}}}consume(e){if(e>this.#$){throw new Error("Called consume() before buffers satiated.")}else if(e===0){return a}if(this.#X[0].length===e){this.#$-=this.#X[0].length;return this.#X.shift()}const t=Buffer.allocUnsafe(e);let r=0;while(r!==e){const s=this.#X[0];const{length:o}=s;if(o+r===e){t.set(this.#X.shift(),r);break}else if(o+r>e){t.set(s.subarray(0,e-r),r);this.#X[0]=s.subarray(e-r);break}else{t.set(this.#X.shift(),r);r+=s.length}}this.#$-=e;return t}parseCloseBody(e){o(e.length!==1);let t;if(e.length>=2){t=e.readUInt16BE(0)}if(t!==undefined&&!E(t)){return{code:1002,reason:"Invalid status code",error:true}}let r=e.subarray(2);if(r[0]===239&&r[1]===187&&r[2]===191){r=r.subarray(3)}try{r=Q(r)}catch{return{code:1007,reason:"Invalid UTF-8",error:true}}return{code:t,reason:r,error:false}}parseControlFrame(e){const{opcode:t,payloadLength:r}=this.#te;if(t===A.CLOSE){if(r===1){f(this.ws,"Received close frame with a 1-byte body.");return false}this.#te.closeInfo=this.parseCloseBody(e);if(this.#te.closeInfo.error){const{code:e,reason:t}=this.#te.closeInfo;y(this.ws,e,t,t.length);f(this.ws,t);return false}if(this.ws[u]!==c.SENT){let e=a;if(this.#te.closeInfo.code){e=Buffer.allocUnsafe(2);e.writeUInt16BE(this.#te.closeInfo.code,0)}const t=new w(e);this.ws[g].socket.write(t.createFrame(A.CLOSE),(e=>{if(!e){this.ws[u]=c.SENT}}))}this.ws[l]=i.CLOSING;this.ws[h]=true;return false}else if(t===A.PING){if(!this.ws[h]){const t=new w(e);this.ws[g].socket.write(t.createFrame(A.PONG));if(d.ping.hasSubscribers){d.ping.publish({payload:e})}}}else if(t===A.PONG){if(d.pong.hasSubscribers){d.pong.publish({payload:e})}}return true}get closingInfo(){return this.#te.closeInfo}}e.exports={ByteParser:ByteParser}},3900:(e,t,r)=>{const{WebsocketFrameSend:s}=r(3264);const{opcodes:o,sendHints:n}=r(736);const A=r(4660);const i=Buffer[Symbol.species];class SendQueue{#oe=new A;#ne=false;#Ae;constructor(e){this.#Ae=e}add(e,t,r){if(r!==n.blob){const s=createFrame(e,r);if(!this.#ne){this.#Ae.write(s,t)}else{const e={promise:null,callback:t,frame:s};this.#oe.push(e)}return}const s={promise:e.arrayBuffer().then((e=>{s.promise=null;s.frame=createFrame(e,r)})),callback:t,frame:null};this.#oe.push(s);if(!this.#ne){this.#ie()}}async#ie(){this.#ne=true;const e=this.#oe;while(!e.isEmpty()){const t=e.shift();if(t.promise!==null){await t.promise}this.#Ae.write(t.frame,t.callback);t.callback=t.frame=null}this.#ne=false}}function createFrame(e,t){return new s(toBuffer(e,t)).createFrame(t===n.string?o.TEXT:o.BINARY)}function toBuffer(e,t){switch(t){case n.string:return Buffer.from(e);case n.arrayBuffer:case n.blob:return new i(e);case n.typedArray:return new i(e.buffer,e.byteOffset,e.byteLength)}}e.exports={SendQueue:SendQueue}},1216:e=>{e.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}},8625:(e,t,r)=>{const{kReadyState:s,kController:o,kResponse:n,kBinaryType:A,kWebSocketURL:i}=r(1216);const{states:a,opcodes:c}=r(736);const{ErrorEvent:l,createFastMessageEvent:u}=r(5188);const{isUtf8:g}=r(4573);const{collectASequenceOfCodePointsFast:h,removeHTTPWhitespace:d}=r(1900);function isConnecting(e){return e[s]===a.CONNECTING}function isEstablished(e){return e[s]===a.OPEN}function isClosing(e){return e[s]===a.CLOSING}function isClosed(e){return e[s]===a.CLOSED}function fireEvent(e,t,r=(e,t)=>new Event(e,t),s={}){const o=r(e,s);t.dispatchEvent(o)}function websocketMessageReceived(e,t,r){if(e[s]!==a.OPEN){return}let o;if(t===c.TEXT){try{o=f(r)}catch{failWebsocketConnection(e,"Received invalid UTF-8 in text frame.");return}}else if(t===c.BINARY){if(e[A]==="blob"){o=new Blob([r])}else{o=toArrayBuffer(r)}}fireEvent("message",e,u,{origin:e[i].origin,data:o})}function toArrayBuffer(e){if(e.byteLength===e.buffer.byteLength){return e.buffer}return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function isValidSubprotocol(e){if(e.length===0){return false}for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);if(r<33||r>126||r===34||r===40||r===41||r===44||r===47||r===58||r===59||r===60||r===61||r===62||r===63||r===64||r===91||r===92||r===93||r===123||r===125){return false}}return true}function isValidStatusCode(e){if(e>=1e3&&e<1015){return e!==1004&&e!==1005&&e!==1006}return e>=3e3&&e<=4999}function failWebsocketConnection(e,t){const{[o]:r,[n]:s}=e;r.abort();if(s?.socket&&!s.socket.destroyed){s.socket.destroy()}if(t){fireEvent("error",e,((e,t)=>new l(e,t)),{error:new Error(t),message:t})}}function isControlFrame(e){return e===c.CLOSE||e===c.PING||e===c.PONG}function isContinuationFrame(e){return e===c.CONTINUATION}function isTextBinaryFrame(e){return e===c.TEXT||e===c.BINARY}function isValidOpcode(e){return isTextBinaryFrame(e)||isContinuationFrame(e)||isControlFrame(e)}function parseExtensions(e){const t={position:0};const r=new Map;while(t.position<e.length){const s=h(";",e,t);const[o,n=""]=s.split("=");r.set(d(o,true,false),d(n,false,true));t.position++}return r}function isValidClientWindowBits(e){if(e.length===0){return false}for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);if(r<48||r>57){return false}}const t=Number.parseInt(e,10);return t>=8&&t<=15}const E=typeof process.versions.icu==="string";const p=E?new TextDecoder("utf-8",{fatal:true}):undefined;const f=E?p.decode.bind(p):function(e){if(g(e)){return e.toString("utf-8")}throw new TypeError("Invalid utf-8 received.")};e.exports={isConnecting:isConnecting,isEstablished:isEstablished,isClosing:isClosing,isClosed:isClosed,fireEvent:fireEvent,isValidSubprotocol:isValidSubprotocol,isValidStatusCode:isValidStatusCode,failWebsocketConnection:failWebsocketConnection,websocketMessageReceived:websocketMessageReceived,utf8Decode:f,isControlFrame:isControlFrame,isContinuationFrame:isContinuationFrame,isTextBinaryFrame:isTextBinaryFrame,isValidOpcode:isValidOpcode,parseExtensions:parseExtensions,isValidClientWindowBits:isValidClientWindowBits}},3726:(e,t,r)=>{const{webidl:s}=r(5893);const{URLSerializer:o}=r(1900);const{environmentSettingsObject:n}=r(3168);const{staticPropertyDescriptors:A,states:i,sentCloseFrameState:a,sendHints:c}=r(736);const{kWebSocketURL:l,kReadyState:u,kController:g,kBinaryType:h,kResponse:d,kSentClose:E,kByteParser:p}=r(1216);const{isConnecting:f,isEstablished:C,isClosing:Q,isValidSubprotocol:B,fireEvent:I}=r(8625);const{establishWebSocketConnection:m,closeWebSocketConnection:w}=r(6897);const{ByteParser:y}=r(1652);const{kEnumerableProperty:b,isBlobLike:k}=r(3440);const{getGlobalDispatcher:T}=r(2581);const{types:R}=r(7975);const{ErrorEvent:D,CloseEvent:S}=r(5188);const{SendQueue:F}=r(3900);class WebSocket extends EventTarget{#M={open:null,error:null,close:null,message:null};#ae=0;#ce="";#se="";#le;constructor(e,t=[]){super();s.util.markAsUncloneable(this);const r="WebSocket constructor";s.argumentLengthCheck(arguments,1,r);const o=s.converters["DOMString or sequence<DOMString> or WebSocketInit"](t,r,"options");e=s.converters.USVString(e,r,"url");t=o.protocols;const A=n.settingsObject.baseUrl;let i;try{i=new URL(e,A)}catch(e){throw new DOMException(e,"SyntaxError")}if(i.protocol==="http:"){i.protocol="ws:"}else if(i.protocol==="https:"){i.protocol="wss:"}if(i.protocol!=="ws:"&&i.protocol!=="wss:"){throw new DOMException(`Expected a ws: or wss: protocol, got ${i.protocol}`,"SyntaxError")}if(i.hash||i.href.endsWith("#")){throw new DOMException("Got fragment","SyntaxError")}if(typeof t==="string"){t=[t]}if(t.length!==new Set(t.map((e=>e.toLowerCase()))).size){throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError")}if(t.length>0&&!t.every((e=>B(e)))){throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError")}this[l]=new URL(i.href);const c=n.settingsObject;this[g]=m(i,t,c,this,((e,t)=>this.#ue(e,t)),o);this[u]=WebSocket.CONNECTING;this[E]=a.NOT_SENT;this[h]="blob"}close(e=undefined,t=undefined){s.brandCheck(this,WebSocket);const r="WebSocket.close";if(e!==undefined){e=s.converters["unsigned short"](e,r,"code",{clamp:true})}if(t!==undefined){t=s.converters.USVString(t,r,"reason")}if(e!==undefined){if(e!==1e3&&(e<3e3||e>4999)){throw new DOMException("invalid code","InvalidAccessError")}}let o=0;if(t!==undefined){o=Buffer.byteLength(t);if(o>123){throw new DOMException(`Reason must be less than 123 bytes; received ${o}`,"SyntaxError")}}w(this,e,t,o)}send(e){s.brandCheck(this,WebSocket);const t="WebSocket.send";s.argumentLengthCheck(arguments,1,t);e=s.converters.WebSocketSendData(e,t,"data");if(f(this)){throw new DOMException("Sent before connected.","InvalidStateError")}if(!C(this)||Q(this)){return}if(typeof e==="string"){const t=Buffer.byteLength(e);this.#ae+=t;this.#le.add(e,(()=>{this.#ae-=t}),c.string)}else if(R.isArrayBuffer(e)){this.#ae+=e.byteLength;this.#le.add(e,(()=>{this.#ae-=e.byteLength}),c.arrayBuffer)}else if(ArrayBuffer.isView(e)){this.#ae+=e.byteLength;this.#le.add(e,(()=>{this.#ae-=e.byteLength}),c.typedArray)}else if(k(e)){this.#ae+=e.size;this.#le.add(e,(()=>{this.#ae-=e.size}),c.blob)}}get readyState(){s.brandCheck(this,WebSocket);return this[u]}get bufferedAmount(){s.brandCheck(this,WebSocket);return this.#ae}get url(){s.brandCheck(this,WebSocket);return o(this[l])}get extensions(){s.brandCheck(this,WebSocket);return this.#se}get protocol(){s.brandCheck(this,WebSocket);return this.#ce}get onopen(){s.brandCheck(this,WebSocket);return this.#M.open}set onopen(e){s.brandCheck(this,WebSocket);if(this.#M.open){this.removeEventListener("open",this.#M.open)}if(typeof e==="function"){this.#M.open=e;this.addEventListener("open",e)}else{this.#M.open=null}}get onerror(){s.brandCheck(this,WebSocket);return this.#M.error}set onerror(e){s.brandCheck(this,WebSocket);if(this.#M.error){this.removeEventListener("error",this.#M.error)}if(typeof e==="function"){this.#M.error=e;this.addEventListener("error",e)}else{this.#M.error=null}}get onclose(){s.brandCheck(this,WebSocket);return this.#M.close}set onclose(e){s.brandCheck(this,WebSocket);if(this.#M.close){this.removeEventListener("close",this.#M.close)}if(typeof e==="function"){this.#M.close=e;this.addEventListener("close",e)}else{this.#M.close=null}}get onmessage(){s.brandCheck(this,WebSocket);return this.#M.message}set onmessage(e){s.brandCheck(this,WebSocket);if(this.#M.message){this.removeEventListener("message",this.#M.message)}if(typeof e==="function"){this.#M.message=e;this.addEventListener("message",e)}else{this.#M.message=null}}get binaryType(){s.brandCheck(this,WebSocket);return this[h]}set binaryType(e){s.brandCheck(this,WebSocket);if(e!=="blob"&&e!=="arraybuffer"){this[h]="blob"}else{this[h]=e}}#ue(e,t){this[d]=e;const r=new y(this,t);r.on("drain",onParserDrain);r.on("error",onParserError.bind(this));e.socket.ws=this;this[p]=r;this.#le=new F(e.socket);this[u]=i.OPEN;const s=e.headersList.get("sec-websocket-extensions");if(s!==null){this.#se=s}const o=e.headersList.get("sec-websocket-protocol");if(o!==null){this.#ce=o}I("open",this)}}WebSocket.CONNECTING=WebSocket.prototype.CONNECTING=i.CONNECTING;WebSocket.OPEN=WebSocket.prototype.OPEN=i.OPEN;WebSocket.CLOSING=WebSocket.prototype.CLOSING=i.CLOSING;WebSocket.CLOSED=WebSocket.prototype.CLOSED=i.CLOSED;Object.defineProperties(WebSocket.prototype,{CONNECTING:A,OPEN:A,CLOSING:A,CLOSED:A,url:b,readyState:b,bufferedAmount:b,onopen:b,onerror:b,onclose:b,close:b,onmessage:b,binaryType:b,send:b,extensions:b,protocol:b,[Symbol.toStringTag]:{value:"WebSocket",writable:false,enumerable:false,configurable:true}});Object.defineProperties(WebSocket,{CONNECTING:A,OPEN:A,CLOSING:A,CLOSED:A});s.converters["sequence<DOMString>"]=s.sequenceConverter(s.converters.DOMString);s.converters["DOMString or sequence<DOMString>"]=function(e,t,r){if(s.util.Type(e)==="Object"&&Symbol.iterator in e){return s.converters["sequence<DOMString>"](e)}return s.converters.DOMString(e,t,r)};s.converters.WebSocketInit=s.dictionaryConverter([{key:"protocols",converter:s.converters["DOMString or sequence<DOMString>"],defaultValue:()=>new Array(0)},{key:"dispatcher",converter:s.converters.any,defaultValue:()=>T()},{key:"headers",converter:s.nullableConverter(s.converters.HeadersInit)}]);s.converters["DOMString or sequence<DOMString> or WebSocketInit"]=function(e){if(s.util.Type(e)==="Object"&&!(Symbol.iterator in e)){return s.converters.WebSocketInit(e)}return{protocols:s.converters["DOMString or sequence<DOMString>"](e)}};s.converters.WebSocketSendData=function(e){if(s.util.Type(e)==="Object"){if(k(e)){return s.converters.Blob(e,{strict:false})}if(ArrayBuffer.isView(e)||R.isArrayBuffer(e)){return s.converters.BufferSource(e)}}return s.converters.USVString(e)};function onParserDrain(){this.ws[d].socket.resume()}function onParserError(e){let t;let r;if(e instanceof S){t=e.reason;r=e.code}else{t=e.message}I("error",this,(()=>new D("error",{error:e,message:t})));w(this,r)}e.exports={WebSocket:WebSocket}},2613:t=>{t.exports=e(import.meta.url)("assert")},4434:t=>{t.exports=e(import.meta.url)("events")},9896:t=>{t.exports=e(import.meta.url)("fs")},8611:t=>{t.exports=e(import.meta.url)("http")},5692:t=>{t.exports=e(import.meta.url)("https")},9278:t=>{t.exports=e(import.meta.url)("net")},4589:t=>{t.exports=e(import.meta.url)("node:assert")},6698:t=>{t.exports=e(import.meta.url)("node:async_hooks")},4573:t=>{t.exports=e(import.meta.url)("node:buffer")},7540:t=>{t.exports=e(import.meta.url)("node:console")},7598:t=>{t.exports=e(import.meta.url)("node:crypto")},3053:t=>{t.exports=e(import.meta.url)("node:diagnostics_channel")},610:t=>{t.exports=e(import.meta.url)("node:dns")},8474:t=>{t.exports=e(import.meta.url)("node:events")},7067:t=>{t.exports=e(import.meta.url)("node:http")},2467:t=>{t.exports=e(import.meta.url)("node:http2")},7030:t=>{t.exports=e(import.meta.url)("node:net")},643:t=>{t.exports=e(import.meta.url)("node:perf_hooks")},1792:t=>{t.exports=e(import.meta.url)("node:querystring")},7075:t=>{t.exports=e(import.meta.url)("node:stream")},1692:t=>{t.exports=e(import.meta.url)("node:tls")},3136:t=>{t.exports=e(import.meta.url)("node:url")},7975:t=>{t.exports=e(import.meta.url)("node:util")},3429:t=>{t.exports=e(import.meta.url)("node:util/types")},5919:t=>{t.exports=e(import.meta.url)("node:worker_threads")},8522:t=>{t.exports=e(import.meta.url)("node:zlib")},857:t=>{t.exports=e(import.meta.url)("os")},3193:t=>{t.exports=e(import.meta.url)("string_decoder")},4756:t=>{t.exports=e(import.meta.url)("tls")},2018:t=>{t.exports=e(import.meta.url)("tty")},9023:t=>{t.exports=e(import.meta.url)("util")},1120:e=>{var t;const r=function NullObject(){};r.prototype=Object.create(null);const s=/; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;const o=/\\([\v\u0020-\u00ff])/gu;const n=/^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;const A={type:"",parameters:new r};Object.freeze(A.parameters);Object.freeze(A);function parse(e){if(typeof e!=="string"){throw new TypeError("argument header is required and must be a string")}let t=e.indexOf(";");const A=t!==-1?e.slice(0,t).trim():e.trim();if(n.test(A)===false){throw new TypeError("invalid media type")}const i={type:A.toLowerCase(),parameters:new r};if(t===-1){return i}let a;let c;let l;s.lastIndex=t;while(c=s.exec(e)){if(c.index!==t){throw new TypeError("invalid parameter format")}t+=c[0].length;a=c[1].toLowerCase();l=c[2];if(l[0]==='"'){l=l.slice(1,l.length-1);o.test(l)&&(l=l.replace(o,"$1"))}i.parameters[a]=l}if(t!==e.length){throw new TypeError("invalid parameter format")}return i}function safeParse(e){if(typeof e!=="string"){return A}let t=e.indexOf(";");const i=t!==-1?e.slice(0,t).trim():e.trim();if(n.test(i)===false){return A}const a={type:i.toLowerCase(),parameters:new r};if(t===-1){return a}let c;let l;let u;s.lastIndex=t;while(l=s.exec(e)){if(l.index!==t){return A}t+=l[0].length;c=l[1].toLowerCase();u=l[2];if(u[0]==='"'){u=u.slice(1,u.length-1);o.test(u)&&(u=u.replace(o,"$1"))}a.parameters[c]=u}if(t!==e.length){return A}return a}t={parse:parse,safeParse:safeParse};t=parse;e.exports.xL=safeParse;t=A}};var r={};function __nccwpck_require__(e){var s=r[e];if(s!==undefined){return s.exports}var o=r[e]={exports:{}};var n=true;try{t[e].call(o.exports,o,o.exports,__nccwpck_require__);n=false}finally{if(n)delete r[e]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";var s={};var o=__nccwpck_require__(857);function utils_toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}function utils_toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}function command_issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+o.EOL)}function command_issue(e,t=""){command_issueCommand(e,{},t)}const n="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=n+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${n}${escapeData(this.message)}`;return e}}function escapeData(e){return utils_toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return utils_toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}const A=e(import.meta.url)("crypto");var i=__nccwpck_require__(9896);function file_command_issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${utils_toCommandValue(t)}${o.EOL}`,{encoding:"utf8"})}function file_command_prepareKeyValueMessage(e,t){const r=`ghadelimiter_${A.randomUUID()}`;const s=utils_toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(s.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${o.EOL}${s}${o.EOL}${r}`}const a=e(import.meta.url)("path");var c=__nccwpck_require__(8611);var l=__nccwpck_require__(5692);function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new DecodedURL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new DecodedURL(`http://${r}`)}}else{return undefined}}function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const o=[e.hostname.toUpperCase()];if(typeof s==="number"){o.push(`${o[0]}:${s}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||o.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(e,t){super(e,t);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}var u=__nccwpck_require__(770);var g=__nccwpck_require__(6752);var h=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d||(d={}));var E;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(E||(E={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p||(p={}));function lib_getProxyUrl(e){const t=pm.getProxyUrl(new URL(e));return t?t.href:""}const f=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const C=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const Q=null&&["OPTIONS","GET","DELETE","HEAD"];const B=10;const I=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}class HttpClientResponse{constructor(e){this.message=e}readBody(){return h(this,void 0,void 0,(function*(){return new Promise((e=>h(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return h(this,void 0,void 0,(function*(){return new Promise((e=>h(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}function isHttps(e){const t=new URL(e);return t.protocol==="https:"}class lib_HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=this._getUserAgentWithOrchestrationId(e);this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return h(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return h(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return h(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return h(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return h(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return h(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return h(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,s){return h(this,void 0,void 0,(function*(){return this.request(e,t,r,s)}))}getJson(e){return h(this,arguments,void 0,(function*(e,t={}){t[E.Accept]=this._getExistingOrDefaultHeader(t,E.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t){return h(this,arguments,void 0,(function*(e,t,r={}){const s=JSON.stringify(t,null,2);r[E.Accept]=this._getExistingOrDefaultHeader(r,E.Accept,p.ApplicationJson);r[E.ContentType]=this._getExistingOrDefaultContentTypeHeader(r,p.ApplicationJson);const o=yield this.post(e,s,r);return this._processResponse(o,this.requestOptions)}))}putJson(e,t){return h(this,arguments,void 0,(function*(e,t,r={}){const s=JSON.stringify(t,null,2);r[E.Accept]=this._getExistingOrDefaultHeader(r,E.Accept,p.ApplicationJson);r[E.ContentType]=this._getExistingOrDefaultContentTypeHeader(r,p.ApplicationJson);const o=yield this.put(e,s,r);return this._processResponse(o,this.requestOptions)}))}patchJson(e,t){return h(this,arguments,void 0,(function*(e,t,r={}){const s=JSON.stringify(t,null,2);r[E.Accept]=this._getExistingOrDefaultHeader(r,E.Accept,p.ApplicationJson);r[E.ContentType]=this._getExistingOrDefaultContentTypeHeader(r,p.ApplicationJson);const o=yield this.patch(e,s,r);return this._processResponse(o,this.requestOptions)}))}request(e,t,r,s){return h(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const o=new URL(t);let n=this._prepareRequest(e,o,s);const A=this._allowRetries&&Q.includes(e)?this._maxRetries+1:1;let i=0;let a;do{a=yield this.requestRaw(n,r);if(a&&a.message&&a.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(a)){e=t;break}}if(e){return e.handleAuthentication(this,n,r)}else{return a}}let t=this._maxRedirects;while(a.message.statusCode&&f.includes(a.message.statusCode)&&this._allowRedirects&&t>0){const A=a.message.headers["location"];if(!A){break}const i=new URL(A);if(o.protocol==="https:"&&o.protocol!==i.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield a.readBody();if(i.hostname!==o.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}n=this._prepareRequest(e,i,s);a=yield this.requestRaw(n,r);t--}if(!a.message.statusCode||!C.includes(a.message.statusCode)){return a}i+=1;if(i<A){yield a.readBody();yield this._performExponentialBackoff(i)}}while(i<A);return a}))}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(e,t){return h(this,void 0,void 0,(function*(){return new Promise(((r,s)=>{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;r(e,t)}}const o=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let n;o.on("socket",(e=>{n=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));o.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){o.end()}));t.pipe(o)}else{o.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=pm.getProxyUrl(t);const s=r&&r.hostname;if(!s){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const o=s.parsedUrl.protocol==="https:";s.httpModule=o?https:http;const n=o?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):n;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let s;if(this.requestOptions&&this.requestOptions.headers){const e=lowercaseKeys(this.requestOptions.headers)[t];if(e){s=typeof e==="number"?e.toString():e}}const o=e[t];if(o!==undefined){return typeof o==="number"?o.toString():o}if(s!==undefined){return s}return r}_getExistingOrDefaultContentTypeHeader(e,t){let r;if(this.requestOptions&&this.requestOptions.headers){const e=lowercaseKeys(this.requestOptions.headers)[E.ContentType];if(e){if(typeof e==="number"){r=String(e)}else if(Array.isArray(e)){r=e.join(", ")}else{r=e}}}const s=e[E.ContentType];if(s!==undefined){if(typeof s==="number"){return String(s)}else if(Array.isArray(s)){return s.join(", ")}else{return s}}if(r!==undefined){return r}return t}_getAgent(e){let t;const r=pm.getProxyUrl(e);const s=r&&r.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(!s){t=this._agent}if(t){return t}const o=e.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||http.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let s;const A=r.protocol==="https:";if(o){s=A?tunnel.httpsOverHttps:tunnel.httpsOverHttp}else{s=A?tunnel.httpOverHttps:tunnel.httpOverHttp}t=s(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:n};t=o?new https.Agent(e):new http.Agent(e);this._agent=t}if(o&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const s=e.protocol==="https:";r=new ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString("base64")}`}));this._proxyAgentDispatcher=r;if(s&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_getUserAgentWithOrchestrationId(e){const t=e||"actions/http-client";const r=process.env["ACTIONS_ORCHESTRATION_ID"];if(r){const e=r.replace(/[^a-z0-9_.-]/gi,"_");return`${t} actions_orchestration_id/${e}`}return t}_performExponentialBackoff(e){return h(this,void 0,void 0,(function*(){e=Math.min(B,e);const t=I*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return h(this,void 0,void 0,(function*(){return new Promise(((r,s)=>h(this,void 0,void 0,(function*(){const o=e.message.statusCode||0;const n={statusCode:o,result:null,headers:{}};if(o===d.NotFound){r(n)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let A;let i;try{i=yield e.readBody();if(i&&i.length>0){if(t&&t.deserializeDates){A=JSON.parse(i,dateTimeDeserializer)}else{A=JSON.parse(i)}n.result=A}n.headers=e.message.headers}catch(e){}if(o>299){let e;if(A&&A.message){e=A.message}else if(i&&i.length>0){e=i}else{e=`Failed request: (${o})`}const t=new HttpClientError(e,o);t.result=n.result;s(t)}else{r(n)}}))))}))}}const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});var m=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return m(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}class auth_BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return m(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return m(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}var w=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};class oidc_utils_OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new HttpClient("actions/oidc-client",[new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){return w(this,void 0,void 0,(function*(){var t;const r=oidc_utils_OidcClient.createHttpClient();const s=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const o=(t=s.result)===null||t===void 0?void 0:t.value;if(!o){throw new Error("Response json body do not have ID Token field")}return o}))}static getIDToken(e){return w(this,void 0,void 0,(function*(){try{let t=oidc_utils_OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}debug(`ID token url is ${t}`);const r=yield oidc_utils_OidcClient.getCall(t);setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}var y=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};const{access:b,appendFile:k,writeFile:T}=i.promises;const R="GITHUB_STEP_SUMMARY";const D="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return y(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[R];if(!e){throw new Error(`Unable to find environment variable for $${R}. Check if your runtime environment supports job summaries.`)}try{yield b(e,i.constants.R_OK|i.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const s=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}</${e}>`}write(e){return y(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const s=t?T:k;yield s(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return y(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(o.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(s).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const o=this.wrap(r,s);return this.addRaw(o).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:s,rowspan:o}=e;const n=t?"th":"td";const A=Object.assign(Object.assign({},s&&{colspan:s}),o&&{rowspan:o});return this.wrap(n,r,A)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:s,height:o}=r||{};const n=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o});const A=this.wrap("img",null,Object.assign({src:e,alt:t},n));return this.addRaw(A).addEOL()}addHeading(e,t){const r=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const o=this.wrap(s,e);return this.addRaw(o).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,r);return this.addRaw(s).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const S=new Summary;const F=null&&S;const v=null&&S;function toPosixPath(e){return e.replace(/[\\]/g,"/")}function toWin32Path(e){return e.replace(/[/]/g,"\\")}function toPlatformPath(e){return e.replace(/[/\\]/g,path.sep)}var U=__nccwpck_require__(3193);var N=__nccwpck_require__(4434);const M=e(import.meta.url)("child_process");var L=__nccwpck_require__(2613);var G=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};const{chmod:_,copyFile:O,lstat:H,mkdir:x,open:P,readdir:Y,rename:J,rm:V,rmdir:W,stat:q,symlink:j,unlink:z}=i.promises;const Z=process.platform==="win32";function readlink(e){return G(this,void 0,void 0,(function*(){const t=yield fs.promises.readlink(e);if(Z&&!t.endsWith("\\")){return`${t}\\`}return t}))}const K=268435456;const X=i.constants.O_RDONLY;function exists(e){return G(this,void 0,void 0,(function*(){try{yield q(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}function isDirectory(e){return G(this,arguments,void 0,(function*(e,t=false){const r=t?yield q(e):yield H(e);return r.isDirectory()}))}function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(Z){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}function tryGetExecutablePath(e,t){return G(this,void 0,void 0,(function*(){let r=undefined;try{r=yield q(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(r&&r.isFile()){if(Z){const r=a.extname(e).toUpperCase();if(t.some((e=>e.toUpperCase()===r))){return e}}else{if(isUnixExecutable(r)){return e}}}const s=e;for(const o of t){e=s+o;r=undefined;try{r=yield q(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(r&&r.isFile()){if(Z){try{const t=a.dirname(e);const r=a.basename(e).toUpperCase();for(const s of yield Y(t)){if(r===s.toUpperCase()){e=a.join(t,s);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(r)){return e}}}}return""}))}function normalizeSeparators(e){e=e||"";if(Z){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&process.getgid!==undefined&&e.gid===process.getgid()||(e.mode&64)>0&&process.getuid!==undefined&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}var $=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};function cp(e,t){return $(this,arguments,void 0,(function*(e,t,r={}){const{force:s,recursive:o,copySourceDirectory:n}=readCopyOptions(r);const A=(yield ioUtil.exists(t))?yield ioUtil.stat(t):null;if(A&&A.isFile()&&!s){return}const i=A&&A.isDirectory()&&n?path.join(t,path.basename(e)):t;if(!(yield ioUtil.exists(e))){throw new Error(`no such file or directory: ${e}`)}const a=yield ioUtil.stat(e);if(a.isDirectory()){if(!o){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,i,0,s)}}else{if(path.relative(e,i)===""){throw new Error(`'${i}' and '${e}' are the same file`)}yield io_copyFile(e,i,s)}}))}function mv(e,t){return $(this,arguments,void 0,(function*(e,t,r={}){if(yield ioUtil.exists(t)){let s=true;if(yield ioUtil.isDirectory(t)){t=path.join(t,path.basename(e));s=yield ioUtil.exists(t)}if(s){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(path.dirname(t));yield ioUtil.rename(e,t)}))}function rmRF(e){return $(this,void 0,void 0,(function*(){if(ioUtil.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield ioUtil.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}function mkdirP(e){return $(this,void 0,void 0,(function*(){ok(e,"a path argument must be provided");yield ioUtil.mkdir(e,{recursive:true})}))}function which(e,t){return $(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(Z){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}function findInPath(e){return $(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(Z&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(a.delimiter)){if(e){t.push(e)}}}if(isRooted(e)){const r=yield tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(a.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(a.delimiter)){if(e){r.push(e)}}}const s=[];for(const o of r){const r=yield tryGetExecutablePath(a.join(o,e),t);if(r){s.push(r)}}return s}))}function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const s=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:s}}function cpDirRecursive(e,t,r,s){return $(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const o=yield ioUtil.readdir(e);for(const n of o){const o=`${e}/${n}`;const A=`${t}/${n}`;const i=yield ioUtil.lstat(o);if(i.isDirectory()){yield cpDirRecursive(o,A,r,s)}else{yield io_copyFile(o,A,s)}}yield ioUtil.chmod(t,(yield ioUtil.stat(e)).mode)}))}function io_copyFile(e,t,r){return $(this,void 0,void 0,(function*(){if((yield ioUtil.lstat(e)).isSymbolicLink()){try{yield ioUtil.lstat(t);yield ioUtil.unlink(t)}catch(e){if(e.code==="EPERM"){yield ioUtil.chmod(t,"0666");yield ioUtil.unlink(t)}}const r=yield ioUtil.readlink(e);yield ioUtil.symlink(r,t,ioUtil.IS_WINDOWS?"junction":null)}else if(!(yield ioUtil.exists(t))||r){yield ioUtil.copyFile(e,t)}}))}const ee=e(import.meta.url)("timers");var te=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};const re=process.platform==="win32";class ToolRunner extends N.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const s=this._getSpawnArgs(e);let o=t?"":"[command]";if(re){if(this._isCmdFile()){o+=r;for(const e of s){o+=` ${e}`}}else if(e.windowsVerbatimArguments){o+=`"${r}"`;for(const e of s){o+=` ${e}`}}else{o+=this._windowsQuoteCmdArg(r);for(const e of s){o+=` ${this._windowsQuoteCmdArg(e)}`}}}else{o+=r;for(const e of s){o+=` ${e}`}}return o}_processLineBuffer(e,t,r){try{let s=t+e.toString();let n=s.indexOf(o.EOL);while(n>-1){const e=s.substring(0,n);r(e);s=s.substring(n+o.EOL.length);n=s.indexOf(o.EOL)}return s}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(re){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(re){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const s of e){if(t.some((e=>e===s))){r=true;break}}if(!r){return e}let s='"';let o=true;for(let t=e.length;t>0;t--){s+=e[t-1];if(o&&e[t-1]==="\\"){s+="\\"}else if(e[t-1]==='"'){o=true;s+='"'}else{o=false}}s+='"';return s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let s=e.length;s>0;s--){t+=e[s-1];if(r&&e[s-1]==="\\"){t+="\\"}else if(e[s-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return te(this,void 0,void 0,(function*(){if(!isRooted(this.toolPath)&&(this.toolPath.includes("/")||re&&this.toolPath.includes("\\"))){this.toolPath=a.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield which(this.toolPath,true);return new Promise(((e,t)=>te(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+o.EOL)}const s=new ExecState(r,this.toolPath);s.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const A=M.spawn(n,this._getSpawnArgs(r),this._getSpawnOptions(this.options,n));let i="";if(A.stdout){A.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}i=this._processLineBuffer(e,i,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let a="";if(A.stderr){A.stderr.on("data",(e=>{s.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}a=this._processLineBuffer(e,a,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}A.on("error",(e=>{s.processError=e.message;s.processExited=true;s.processClosed=true;s.CheckComplete()}));A.on("exit",(e=>{s.processExitCode=e;s.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);s.CheckComplete()}));A.on("close",(e=>{s.processExitCode=e;s.processExited=true;s.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);s.CheckComplete()}));s.on("done",((r,s)=>{if(i.length>0){this.emit("stdline",i)}if(a.length>0){this.emit("errline",a)}A.removeAllListeners();if(r){t(r)}else{e(s)}}));if(this.options.input){if(!A.stdin){throw new Error("child process missing stdin")}A.stdin.end(this.options.input)}}))))}))}}function argStringToArray(e){const t=[];let r=false;let s=false;let o="";function append(e){if(s&&e!=='"'){o+="\\"}o+=e;s=false}for(let n=0;n<e.length;n++){const A=e.charAt(n);if(A==='"'){if(!s){r=!r}else{append(A)}continue}if(A==="\\"&&s){append(A);continue}if(A==="\\"&&r){s=true;continue}if(A===" "&&!r){if(o.length>0){t.push(o);o=""}continue}append(A)}if(o.length>0){t.push(o.trim())}return t}class ExecState extends N.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=(0,ee.setTimeout)(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}var se=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};function exec_exec(e,t,r){return se(this,void 0,void 0,(function*(){const s=tr.argStringToArray(e);if(s.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const o=s[0];t=s.slice(1).concat(t||[]);const n=new tr.ToolRunner(o,t,r);return n.exec()}))}function getExecOutput(e,t,r){return se(this,void 0,void 0,(function*(){var s,o;let n="";let A="";const i=new StringDecoder("utf8");const a=new StringDecoder("utf8");const c=(s=r===null||r===void 0?void 0:r.listeners)===null||s===void 0?void 0:s.stdout;const l=(o=r===null||r===void 0?void 0:r.listeners)===null||o===void 0?void 0:o.stderr;const stdErrListener=e=>{A+=a.write(e);if(l){l(e)}};const stdOutListener=e=>{n+=i.write(e);if(c){c(e)}};const u=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const g=yield exec_exec(e,t,Object.assign(Object.assign({},r),{listeners:u}));n+=i.end();A+=a.end();return{exitCode:g,stdout:n,stderr:A}}))}var oe=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};const getWindowsInfo=()=>oe(void 0,void 0,void 0,(function*(){const{stdout:e}=yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>oe(void 0,void 0,void 0,(function*(){var e,t,r,s;const{stdout:o}=yield exec.getExecOutput("sw_vers",undefined,{silent:true});const n=(t=(e=o.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const A=(s=(r=o.match(/ProductName:\s*(.+)/))===null||r===void 0?void 0:r[1])!==null&&s!==void 0?s:"";return{name:A,version:n}}));const getLinuxInfo=()=>oe(void 0,void 0,void 0,(function*(){const{stdout:e}=yield exec.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,r]=e.trim().split("\n");return{name:t,version:r}}));const ne=o.platform();const Ae=o.arch();const ie=ne==="win32";const ae=ne==="darwin";const ce=ne==="linux";function getDetails(){return oe(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield ie?getWindowsInfo():ae?getMacOsInfo():getLinuxInfo()),{platform:ne,arch:Ae,isWindows:ie,isMacOS:ae,isLinux:ce})}))}var le=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};var ue;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(ue||(ue={}));function exportVariable(e,t){const r=toCommandValue(t);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){return issueFileCommand("ENV",prepareKeyValueMessage(e,t))}issueCommand("set-env",{name:e},r)}function core_setSecret(e){issueCommand("add-mask",{},e)}function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){issueFileCommand("PATH",e)}else{issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${path.delimiter}${process.env["PATH"]}`}function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}function getBooleanInput(e,t){const r=["true","True","TRUE"];const s=["false","False","FALSE"];const o=getInput(e,t);if(r.includes(o))return true;if(s.includes(o))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return file_command_issueFileCommand("OUTPUT",file_command_prepareKeyValueMessage(e,t))}process.stdout.write(o.EOL);command_issueCommand("set-output",{name:e},utils_toCommandValue(t))}function setCommandEcho(e){issue("echo",e?"on":"off")}function setFailed(e){process.exitCode=ue.Failure;error(e)}function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}function core_debug(e){command_issueCommand("debug",{},e)}function error(e,t={}){command_issueCommand("error",utils_toCommandProperties(t),e instanceof Error?e.toString():e)}function warning(e,t={}){command_issueCommand("warning",utils_toCommandProperties(t),e instanceof Error?e.toString():e)}function notice(e,t={}){issueCommand("notice",toCommandProperties(t),e instanceof Error?e.toString():e)}function info(e){process.stdout.write(e+o.EOL)}function startGroup(e){command_issue("group",e)}function endGroup(){command_issue("endgroup")}function group(e,t){return le(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return issueFileCommand("STATE",prepareKeyValueMessage(e,t))}issueCommand("save-state",{name:e},toCommandValue(t))}function getState(e){return process.env[`STATE_${e}`]||""}function getIDToken(e){return le(this,void 0,void 0,(function*(){return yield OidcClient.getIDToken(e)}))}var ge=__nccwpck_require__(4573);var he=__nccwpck_require__(7117);var de=__nccwpck_require__(2830);var Ee=__nccwpck_require__(9997);const pe=e(import.meta.url)("node:path");var fe=__nccwpck_require__(8474);var Ce=Object.defineProperty;var Qe=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Ie=Object.prototype.hasOwnProperty;var __esm=(e,t)=>function __init(){return e&&(t=(0,e[Be(e)[0]])(e=0)),t};var __commonJS=(e,t)=>function __require(){return t||(0,e[Be(e)[0]])((t={exports:{}}).exports,t),t.exports};var __export=(e,t)=>{for(var r in t)Ce(e,r,{get:t[r],enumerable:true})};var __copyProps=(e,t,r,s)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of Be(t))if(!Ie.call(e,o)&&o!==r)Ce(e,o,{get:()=>t[o],enumerable:!(s=Qe(t,o))||s.enumerable})}return e};var __toCommonJS=e=>__copyProps(Ce({},"__esModule",{value:true}),e);function pathspec(...e){const t=new String(e);me.set(t,e);return t}function isPathSpec(e){return e instanceof String&&me.has(e)}function toPaths(e){return me.get(e)||[]}var me;var we=__esm({"src/lib/args/pathspec.ts"(){"use strict";me=new WeakMap}});var ye;var be=__esm({"src/lib/errors/git-error.ts"(){"use strict";ye=class extends Error{constructor(e,t){super(t);this.task=e;Object.setPrototypeOf(this,new.target.prototype)}}}});var ke;var Te=__esm({"src/lib/errors/git-response-error.ts"(){"use strict";be();ke=class extends ye{constructor(e,t){super(void 0,t||String(e));this.git=e}}}});var Re;var De=__esm({"src/lib/errors/task-configuration-error.ts"(){"use strict";be();Re=class extends ye{constructor(e){super(void 0,e)}}}});function asFunction(e){if(typeof e!=="function"){return Fe}return e}function isUserFunction(e){return typeof e==="function"&&e!==Fe}function splitOn(e,t){const r=e.indexOf(t);if(r<=0){return[e,""]}return[e.substr(0,r),e.substr(r+1)]}function first(e,t=0){return isArrayLike(e)&&e.length>t?e[t]:void 0}function last(e,t=0){if(isArrayLike(e)&&e.length>t){return e[e.length-1-t]}}function isArrayLike(e){return _e(e)}function toLinesWithContent(e="",t=true,r="\n"){return e.split(r).reduce(((e,r)=>{const s=t?r.trim():r;if(s){e.push(s)}return e}),[])}function forEachLineWithContent(e,t){return toLinesWithContent(e,true).map((e=>t(e)))}function folderExists(e){return(0,he.exists)(e,he.FOLDER)}function append(e,t){if(Array.isArray(e)){if(!e.includes(t)){e.push(t)}}else{e.add(t)}return t}function including(e,t){if(Array.isArray(e)&&!e.includes(t)){e.push(t)}return e}function remove(e,t){if(Array.isArray(e)){const r=e.indexOf(t);if(r>=0){e.splice(r,1)}}else{e.delete(t)}return t}function asArray(e){return Array.isArray(e)?e:[e]}function asCamelCase(e){return e.replace(/[\s-]+(.)/g,((e,t)=>t.toUpperCase()))}function asStringArray(e){return asArray(e).map((e=>e instanceof String?e:String(e)))}function asNumber(e,t=0){if(e==null){return t}const r=parseInt(e,10);return Number.isNaN(r)?t:r}function prefixedArray(e,t){const r=[];for(let s=0,o=e.length;s<o;s++){r.push(t,e[s])}return r}function bufferToString(e){return(Array.isArray(e)?ge.Buffer.concat(e):e).toString("utf-8")}function pick(e,t){const r={};t.forEach((t=>{if(e[t]!==void 0){r[t]=e[t]}}));return r}function delay(e=0){return new Promise((t=>setTimeout(t,e)))}function orVoid(e){if(e===false){return void 0}return e}var Se,Fe,ve;var Ue=__esm({"src/lib/utils/util.ts"(){"use strict";Oe();Se="\0";Fe=()=>{};ve=Object.prototype.toString.call.bind(Object.prototype.toString)}});function filterType(e,t,r){if(t(e)){return e}return arguments.length>2?r:void 0}function filterPrimitives(e,t){const r=isPathSpec(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function filterPlainObject(e){return!!e&&ve(e)==="[object Object]"}function filterFunction(e){return typeof e==="function"}var Ne,Me,Le,Ge,_e;var Oe=__esm({"src/lib/utils/argument-filters.ts"(){"use strict";we();Ue();Ne=e=>Array.isArray(e);Me=e=>typeof e==="number";Le=e=>typeof e==="string"||isPathSpec(e);Ge=e=>Le(e)||Array.isArray(e)&&e.every(Le);_e=e=>{if(e==null||"number|boolean|function".includes(typeof e)){return false}return typeof e.length==="number"}}});var He;var xe=__esm({"src/lib/utils/exit-codes.ts"(){"use strict";He=(e=>{e[e["SUCCESS"]=0]="SUCCESS";e[e["ERROR"]=1]="ERROR";e[e["NOT_FOUND"]=-2]="NOT_FOUND";e[e["UNCLEAN"]=128]="UNCLEAN";return e})(He||{})}});var Pe;var Ye=__esm({"src/lib/utils/git-output-streams.ts"(){"use strict";Pe=class _GitOutputStreams{constructor(e,t){this.stdOut=e;this.stdErr=t}asStrings(){return new _GitOutputStreams(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function useMatchesDefault(){throw new Error(`LineParser:useMatches not implemented`)}var Je,Ve;var We=__esm({"src/lib/utils/line-parser.ts"(){"use strict";Je=class{constructor(e,t){this.matches=[];this.useMatches=useMatchesDefault;this.parse=(e,t)=>{this.resetMatches();if(!this._regExp.every(((t,r)=>this.addMatch(t,r,e(r))))){return false}return this.useMatches(t,this.prepareMatches())!==false};this._regExp=Array.isArray(e)?e:[e];if(t){this.useMatches=t}}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){const s=r&&e.exec(r);if(s){this.pushMatch(t,s)}return!!s}pushMatch(e,t){this.matches.push(...t.slice(1))}};Ve=class extends Je{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){if(e>0||t.length>1){super.pushMatch(e,t)}}}}});function createInstanceConfig(...e){const t=process.cwd();const r=Object.assign({baseDir:t,...qe},...e.filter((e=>typeof e==="object"&&e)));r.baseDir=r.baseDir||t;r.trimmed=r.trimmed===true;return r}var qe;var je=__esm({"src/lib/utils/simple-git-options.ts"(){"use strict";qe={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:false}}});function appendTaskOptions(e,t=[]){if(!filterPlainObject(e)){return t}return Object.keys(e).reduce(((t,r)=>{const s=e[r];if(isPathSpec(s)){t.push(s)}else if(filterPrimitives(s,["boolean"])){t.push(r+"="+s)}else if(Array.isArray(s)){for(const e of s){if(!filterPrimitives(e,["string","number"])){t.push(r+"="+e)}}}else{t.push(r)}return t}),t)}function getTrailingOptions(e,t=0,r=false){const s=[];for(let r=0,o=t<0?e.length:t;r<o;r++){if("string|number".includes(typeof e[r])){s.push(String(e[r]))}}appendTaskOptions(trailingOptionsArgument(e),s);if(!r){s.push(...trailingArrayArgument(e))}return s}function trailingArrayArgument(e){const t=typeof last(e)==="function";return asStringArray(filterType(last(e,t?1:0),Ne,[]))}function trailingOptionsArgument(e){const t=filterFunction(last(e));return filterType(last(e,t?1:0),filterPlainObject)}function trailingFunctionArgument(e,t=true){const r=asFunction(last(e));return t||isUserFunction(r)?r:void 0}var ze=__esm({"src/lib/utils/task-options.ts"(){"use strict";Oe();Ue();we()}});function callTaskParser(e,t){return e(t.stdOut,t.stdErr)}function parseStringResponse(e,t,r,s=true){asArray(r).forEach((r=>{for(let o=toLinesWithContent(r,s),n=0,A=o.length;n<A;n++){const line=(e=0)=>{if(n+e>=A){return}return o[n+e]};t.some((({parse:t})=>t(line,e)))}}));return e}var Ze=__esm({"src/lib/utils/task-parser.ts"(){"use strict";Ue()}});var Ke={};__export(Ke,{ExitCodes:()=>He,GitOutputStreams:()=>Pe,LineParser:()=>Je,NOOP:()=>Fe,NULL:()=>Se,RemoteLineParser:()=>Ve,append:()=>append,appendTaskOptions:()=>appendTaskOptions,asArray:()=>asArray,asCamelCase:()=>asCamelCase,asFunction:()=>asFunction,asNumber:()=>asNumber,asStringArray:()=>asStringArray,bufferToString:()=>bufferToString,callTaskParser:()=>callTaskParser,createInstanceConfig:()=>createInstanceConfig,delay:()=>delay,filterArray:()=>Ne,filterFunction:()=>filterFunction,filterHasLength:()=>_e,filterNumber:()=>Me,filterPlainObject:()=>filterPlainObject,filterPrimitives:()=>filterPrimitives,filterString:()=>Le,filterStringOrStringArray:()=>Ge,filterType:()=>filterType,first:()=>first,folderExists:()=>folderExists,forEachLineWithContent:()=>forEachLineWithContent,getTrailingOptions:()=>getTrailingOptions,including:()=>including,isUserFunction:()=>isUserFunction,last:()=>last,objectToString:()=>ve,orVoid:()=>orVoid,parseStringResponse:()=>parseStringResponse,pick:()=>pick,prefixedArray:()=>prefixedArray,remove:()=>remove,splitOn:()=>splitOn,toLinesWithContent:()=>toLinesWithContent,trailingFunctionArgument:()=>trailingFunctionArgument,trailingOptionsArgument:()=>trailingOptionsArgument});var Xe=__esm({"src/lib/utils/index.ts"(){"use strict";Oe();xe();Ye();We();je();ze();Ze();Ue()}});var $e={};__export($e,{CheckRepoActions:()=>et,checkIsBareRepoTask:()=>checkIsBareRepoTask,checkIsRepoRootTask:()=>checkIsRepoRootTask,checkIsRepoTask:()=>checkIsRepoTask});function checkIsRepoTask(e){switch(e){case"bare":return checkIsBareRepoTask();case"root":return checkIsRepoRootTask()}const t=["rev-parse","--is-inside-work-tree"];return{commands:t,format:"utf-8",onError:tt,parser:rt}}function checkIsRepoRootTask(){const e=["rev-parse","--git-dir"];return{commands:e,format:"utf-8",onError:tt,parser(e){return/^\.(git)?$/.test(e.trim())}}}function checkIsBareRepoTask(){const e=["rev-parse","--is-bare-repository"];return{commands:e,format:"utf-8",onError:tt,parser:rt}}function isNotRepoMessage(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var et,tt,rt;var st=__esm({"src/lib/tasks/check-is-repo.ts"(){"use strict";Xe();et=(e=>{e["BARE"]="bare";e["IN_TREE"]="tree";e["IS_REPO_ROOT"]="root";return e})(et||{});tt=({exitCode:e},t,r,s)=>{if(e===128&&isNotRepoMessage(t)){return r(Buffer.from("false"))}s(t)};rt=e=>e.trim()==="true"}});function cleanSummaryParser(e,t){const r=new ot(e);const s=e?At:nt;toLinesWithContent(t).forEach((e=>{const t=e.replace(s,"");r.paths.push(t);(it.test(t)?r.folders:r.files).push(t)}));return r}var ot,nt,At,it;var at=__esm({"src/lib/responses/CleanSummary.ts"(){"use strict";Xe();ot=class{constructor(e){this.dryRun=e;this.paths=[];this.files=[];this.folders=[]}};nt=/^[a-z]+\s*/i;At=/^[a-z]+\s+[a-z]+\s*/i;it=/\/$/}});var ct={};__export(ct,{EMPTY_COMMANDS:()=>lt,adhocExecTask:()=>adhocExecTask,configurationErrorTask:()=>configurationErrorTask,isBufferTask:()=>isBufferTask,isEmptyTask:()=>isEmptyTask,straightThroughBufferTask:()=>straightThroughBufferTask,straightThroughStringTask:()=>straightThroughStringTask});function adhocExecTask(e){return{commands:lt,format:"empty",parser:e}}function configurationErrorTask(e){return{commands:lt,format:"empty",parser(){throw typeof e==="string"?new Re(e):e}}}function straightThroughStringTask(e,t=false){return{commands:e,format:"utf-8",parser(e){return t?String(e).trim():e}}}function straightThroughBufferTask(e){return{commands:e,format:"buffer",parser(e){return e}}}function isBufferTask(e){return e.format==="buffer"}function isEmptyTask(e){return e.format==="empty"||!e.commands.length}var lt;var ut=__esm({"src/lib/tasks/task.ts"(){"use strict";De();lt=[]}});var gt={};__export(gt,{CONFIG_ERROR_INTERACTIVE_MODE:()=>ht,CONFIG_ERROR_MODE_REQUIRED:()=>dt,CONFIG_ERROR_UNKNOWN_OPTION:()=>Et,CleanOptions:()=>pt,cleanTask:()=>cleanTask,cleanWithOptionsTask:()=>cleanWithOptionsTask,isCleanOptionsArray:()=>isCleanOptionsArray});function cleanWithOptionsTask(e,t){const{cleanMode:r,options:s,valid:o}=getCleanOptions(e);if(!r){return configurationErrorTask(dt)}if(!o.options){return configurationErrorTask(Et+JSON.stringify(e))}s.push(...t);if(s.some(isInteractiveMode)){return configurationErrorTask(ht)}return cleanTask(r,s)}function cleanTask(e,t){const r=["clean",`-${e}`,...t];return{commands:r,format:"utf-8",parser(t){return cleanSummaryParser(e==="n",t)}}}function isCleanOptionsArray(e){return Array.isArray(e)&&e.every((e=>ft.has(e)))}function getCleanOptions(e){let t;let r=[];let s={cleanMode:false,options:true};e.replace(/[^a-z]i/g,"").split("").forEach((e=>{if(isCleanMode(e)){t=e;s.cleanMode=true}else{s.options=s.options&&isKnownOption(r[r.length]=`-${e}`)}}));return{cleanMode:t,options:r,valid:s}}function isCleanMode(e){return e==="f"||e==="n"}function isKnownOption(e){return/^-[a-z]$/i.test(e)&&ft.has(e.charAt(1))}function isInteractiveMode(e){if(/^-[^\-]/.test(e)){return e.indexOf("i")>0}return e==="--interactive"}var ht,dt,Et,pt,ft;var Ct=__esm({"src/lib/tasks/clean.ts"(){"use strict";at();Xe();ut();ht="Git clean interactive mode is not supported";dt='Git clean mode parameter ("n" or "f") is required';Et="Git clean unknown option found in: ";pt=(e=>{e["DRY_RUN"]="n";e["FORCE"]="f";e["IGNORED_INCLUDED"]="x";e["IGNORED_ONLY"]="X";e["EXCLUDING"]="e";e["QUIET"]="q";e["RECURSIVE"]="d";return e})(pt||{});ft=new Set(["i",...asStringArray(Object.values(pt))])}});function configListParser(e){const t=new Qt;for(const r of configParser(e)){t.addValue(r.file,String(r.key),r.value)}return t}function configGetParser(e,t){let r=null;const s=[];const o=new Map;for(const n of configParser(e,t)){if(n.key!==t){continue}s.push(r=n.value);if(!o.has(n.file)){o.set(n.file,[])}o.get(n.file).push(r)}return{key:t,paths:Array.from(o.keys()),scopes:o,value:r,values:s}}function configFilePath(e){return e.replace(/^(file):/,"")}function*configParser(e,t=null){const r=e.split("\0");for(let e=0,s=r.length-1;e<s;){const s=configFilePath(r[e++]);let o=r[e++];let n=t;if(o.includes("\n")){const e=splitOn(o,"\n");n=e[0];o=e[1]}yield{file:s,key:n,value:o}}}var Qt;var Bt=__esm({"src/lib/responses/ConfigList.ts"(){"use strict";Xe();Qt=class{constructor(){this.files=[];this.values=Object.create(null)}get all(){if(!this._all){this._all=this.files.reduce(((e,t)=>Object.assign(e,this.values[t])),{})}return this._all}addFile(e){if(!(e in this.values)){const t=last(this.files);this.values[e]=t?Object.create(this.values[t]):{};this.files.push(e)}return this.values[e]}addValue(e,t,r){const s=this.addFile(e);if(!Object.hasOwn(s,t)){s[t]=r}else if(Array.isArray(s[t])){s[t].push(r)}else{s[t]=[s[t],r]}this._all=void 0}}}});function asConfigScope(e,t){if(typeof e==="string"&&Object.hasOwn(It,e)){return e}return t}function addConfigTask(e,t,r,s){const o=["config",`--${s}`];if(r){o.push("--add")}o.push(e,t);return{commands:o,format:"utf-8",parser(e){return e}}}function getConfigTask(e,t){const r=["config","--null","--show-origin","--get-all",e];if(t){r.splice(1,0,`--${t}`)}return{commands:r,format:"utf-8",parser(t){return configGetParser(t,e)}}}function listConfigTask(e){const t=["config","--list","--show-origin","--null"];if(e){t.push(`--${e}`)}return{commands:t,format:"utf-8",parser(e){return configListParser(e)}}}function config_default(){return{addConfig(e,t,...r){return this._runTask(addConfigTask(e,t,r[0]===true,asConfigScope(r[1],"local")),trailingFunctionArgument(arguments))},getConfig(e,t){return this._runTask(getConfigTask(e,asConfigScope(t,void 0)),trailingFunctionArgument(arguments))},listConfig(...e){return this._runTask(listConfigTask(asConfigScope(e[0],void 0)),trailingFunctionArgument(arguments))}}}var It;var mt=__esm({"src/lib/tasks/config.ts"(){"use strict";Bt();Xe();It=(e=>{e["system"]="system";e["global"]="global";e["local"]="local";e["worktree"]="worktree";return e})(It||{})}});function isDiffNameStatus(e){return yt.has(e)}var wt,yt;var bt=__esm({"src/lib/tasks/diff-name-status.ts"(){"use strict";wt=(e=>{e["ADDED"]="A";e["COPIED"]="C";e["DELETED"]="D";e["MODIFIED"]="M";e["RENAMED"]="R";e["CHANGED"]="T";e["UNMERGED"]="U";e["UNKNOWN"]="X";e["BROKEN"]="B";return e})(wt||{});yt=new Set(Object.values(wt))}});function grepQueryBuilder(...e){return(new Dt).param(...e)}function parseGrep(e){const t=new Set;const r={};forEachLineWithContent(e,(e=>{const[s,o,n]=e.split(Se);t.add(s);(r[s]=r[s]||[]).push({line:asNumber(o),path:s,preview:n})}));return{paths:t,results:r}}function grep_default(){return{grep(e){const t=trailingFunctionArgument(arguments);const r=getTrailingOptions(arguments);for(const e of kt){if(r.includes(e)){return this._runTask(configurationErrorTask(`git.grep: use of "${e}" is not supported.`),t)}}if(typeof e==="string"){e=grepQueryBuilder().param(e)}const s=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:s,format:"utf-8",parser(e){return parseGrep(e)}},t)}}}var kt,Tt,Rt,Dt;var St=__esm({"src/lib/tasks/grep.ts"(){"use strict";Xe();ut();kt=["-h"];Tt=Symbol("grepQuery");Dt=class{constructor(){this[Rt]=[]}*[(Rt=Tt,Symbol.iterator)](){for(const e of this[Tt]){yield e}}and(...e){e.length&&this[Tt].push("--and","(",...prefixedArray(e,"-e"),")");return this}param(...e){this[Tt].push(...prefixedArray(e,"-e"));return this}}}});var Ft={};__export(Ft,{ResetMode:()=>vt,getResetMode:()=>getResetMode,resetTask:()=>resetTask});function resetTask(e,t){const r=["reset"];if(isValidResetMode(e)){r.push(`--${e}`)}r.push(...t);return straightThroughStringTask(r)}function getResetMode(e){if(isValidResetMode(e)){return e}switch(typeof e){case"string":case"undefined":return"soft"}return}function isValidResetMode(e){return typeof e==="string"&&Ut.includes(e)}var vt,Ut;var Nt=__esm({"src/lib/tasks/reset.ts"(){"use strict";Xe();ut();vt=(e=>{e["MIXED"]="mixed";e["SOFT"]="soft";e["HARD"]="hard";e["MERGE"]="merge";e["KEEP"]="keep";return e})(vt||{});Ut=asStringArray(Object.values(vt))}});function createLog(){return de("simple-git")}function prefixedLogger(e,t,r){if(!t||!String(t).replace(/\s*/,"")){return!r?e:(t,...s)=>{e(t,...s);r(t,...s)}}return(s,...o)=>{e(`%s ${s}`,t,...o);if(r){r(s,...o)}}}function childLoggerName(e,t,{namespace:r}){if(typeof e==="string"){return e}const s=t&&t.namespace||"";if(s.startsWith(r)){return s.substr(r.length+1)}return s||r}function createLogger(e,t,r,s=createLog()){const o=e&&`[${e}]`||"";const n=[];const A=typeof t==="string"?s.extend(t):t;const i=childLoggerName(filterType(t,Le),A,s);return step(r);function sibling(t,r){return append(n,createLogger(e,i.replace(/^[^:]+/,t),r,s))}function step(t){const r=t&&`[${t}]`||"";const n=A&&prefixedLogger(A,r)||Fe;const i=prefixedLogger(s,`${o} ${r}`,n);return Object.assign(A?n:i,{label:e,sibling:sibling,info:i,step:step})}}var Mt=__esm({"src/lib/git-logger.ts"(){"use strict";Xe();de.formatters.L=e=>String(_e(e)?e.length:"-");de.formatters.B=e=>{if(Buffer.isBuffer(e)){return e.toString("utf8")}return ve(e)}}});var Lt;var Gt=__esm({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";be();Mt();Lt=class _TasksPendingQueue{constructor(e="GitExecutor"){this.logLabel=e;this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){const t=_TasksPendingQueue.getName(e.commands[0]);const r=createLogger(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){const t=this.createProgress(e);t.logger("Adding task to the queue, commands = %o",e.commands);this._queue.set(e,t);return t}fatal(e){for(const[t,{logger:r}]of Array.from(this._queue.entries())){if(t===e.task){r.info(`Failed %o`,e);r(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`)}else{r.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`,e.message)}this.complete(t)}if(this._queue.size!==0){throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}}complete(e){const t=this.withProgress(e);if(t){this._queue.delete(e)}}attempt(e){const t=this.withProgress(e);if(!t){throw new ye(void 0,"TasksPendingQueue: attempt called for an unknown task")}t.logger("Starting task");return t}static getName(e="empty"){return`task:${e}:${++_TasksPendingQueue.counter}`}static{this.counter=0}}}});function pluginContext(e,t){return{method:first(e.commands)||"",commands:t}}function onErrorReceived(e,t){return r=>{t(`[ERROR] child process exception %o`,r);e.push(Buffer.from(String(r.stack),"ascii"))}}function onDataReceived(e,t,r,s){return o=>{r(`%s received %L bytes`,t,o);s(`%B`,o);e.push(o)}}var _t;var Ot=__esm({"src/lib/runners/git-executor-chain.ts"(){"use strict";be();ut();Xe();Gt();_t=class{constructor(e,t,r){this._executor=e;this._scheduler=t;this._plugins=r;this._chain=Promise.resolve();this._queue=new Lt}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){this._queue.push(e);return this._chain=this._chain.then((()=>this.attemptTask(e)))}async attemptTask(e){const t=await this._scheduler.next();const onQueueComplete=()=>this._queue.complete(e);try{const{logger:t}=this._queue.attempt(e);return await(isEmptyTask(e)?this.attemptEmptyTask(e,t):this.attemptRemoteTask(e,t))}catch(t){throw this.onFatalException(e,t)}finally{onQueueComplete();t()}}onFatalException(e,t){const r=t instanceof ye?Object.assign(t,{task:e}):new ye(e,t&&String(t));this._chain=Promise.resolve();this._queue.fatal(r);return r}async attemptRemoteTask(e,t){const r=this._plugins.exec("spawn.binary","",pluginContext(e,e.commands));const s=this._plugins.exec("spawn.args",[...e.commands],pluginContext(e,e.commands));const o=await this.gitResponse(e,r,s,this.outputHandler,t.step("SPAWN"));const n=await this.handleTaskData(e,s,o,t.step("HANDLE"));t(`passing response to task's parser as a %s`,e.format);if(isBufferTask(e)){return callTaskParser(e.parser,n)}return callTaskParser(e.parser,n.asStrings())}async attemptEmptyTask(e,t){t(`empty task bypassing child process to call to task's parser`);return e.parser(this)}handleTaskData(e,t,r,s){const{exitCode:o,rejection:n,stdOut:A,stdErr:i}=r;return new Promise(((a,c)=>{s(`Preparing to handle process response exitCode=%d stdOut=`,o);const{error:l}=this._plugins.exec("task.error",{error:n},{...pluginContext(e,t),...r});if(l&&e.onError){s.info(`exitCode=%s handling with custom error handler`);return e.onError(r,l,(e=>{s.info(`custom error handler treated as success`);s(`custom error returned a %s`,ve(e));a(new Pe(Array.isArray(e)?Buffer.concat(e):e,Buffer.concat(i)))}),c)}if(l){s.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`,o,i.length,n);return c(l)}s.info(`retrieving task output complete`);a(new Pe(Buffer.concat(A),Buffer.concat(i)))}))}async gitResponse(e,t,r,s,o){const n=o.sibling("output");const A=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:true},pluginContext(e,e.commands));return new Promise((i=>{const a=[];const c=[];o.info(`%s %o`,t,r);o("%O",A);let l=this._beforeSpawn(e,r);if(l){return i({stdOut:a,stdErr:c,exitCode:9901,rejection:l})}this._plugins.exec("spawn.before",void 0,{...pluginContext(e,r),kill(e){l=e||l}});const u=(0,M.spawn)(t,r,A);u.stdout.on("data",onDataReceived(a,"stdOut",o,n.step("stdOut")));u.stderr.on("data",onDataReceived(c,"stdErr",o,n.step("stdErr")));u.on("error",onErrorReceived(c,o));if(s){o(`Passing child process stdOut/stdErr to custom outputHandler`);s(t,u.stdout,u.stderr,[...r])}this._plugins.exec("spawn.after",void 0,{...pluginContext(e,r),spawned:u,close(e,t){i({stdOut:a,stdErr:c,exitCode:e,rejection:l||t})},kill(e){if(u.killed){return}l=e;u.kill("SIGINT")}})}))}_beforeSpawn(e,t){let r;this._plugins.exec("spawn.before",void 0,{...pluginContext(e,t),kill(e){r=e||r}});return r}}}});var Ht={};__export(Ht,{GitExecutor:()=>xt});var xt;var Pt=__esm({"src/lib/runners/git-executor.ts"(){"use strict";Ot();xt=class{constructor(e,t,r){this.cwd=e;this._scheduler=t;this._plugins=r;this._chain=new _t(this,this._scheduler,this._plugins)}chain(){return new _t(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function taskCallback(e,t,r=Fe){const onSuccess=e=>{r(null,e)};const onError2=t=>{if(t?.task===e){r(t instanceof ke?addDeprecationNoticeToError(t):t,void 0)}};t.then(onSuccess,onError2)}function addDeprecationNoticeToError(e){let log=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}, this will no longer be available in version 3`);log=Fe};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(descriptorReducer,{}));function descriptorReducer(t,r){if(r in e){return t}t[r]={enumerable:false,configurable:false,get(){log(r);return e.git[r]}};return t}}var Yt=__esm({"src/lib/task-callback.ts"(){"use strict";Te();Xe()}});function changeWorkingDirectoryTask(e,t){return adhocExecTask((r=>{if(!folderExists(e)){throw new Error(`Git.cwd: cannot change to non-directory "${e}"`)}return(t||r).cwd=e}))}var Jt=__esm({"src/lib/tasks/change-working-directory.ts"(){"use strict";Xe();ut()}});function checkoutTask(e){const t=["checkout",...e];if(t[1]==="-b"&&t.includes("-B")){t[1]=remove(t,"-B")}return straightThroughStringTask(t)}function checkout_default(){return{checkout(){return this._runTask(checkoutTask(getTrailingOptions(arguments,1)),trailingFunctionArgument(arguments))},checkoutBranch(e,t){return this._runTask(checkoutTask(["-b",e,t,...getTrailingOptions(arguments)]),trailingFunctionArgument(arguments))},checkoutLocalBranch(e){return this._runTask(checkoutTask(["-b",e,...getTrailingOptions(arguments)]),trailingFunctionArgument(arguments))}}}var Vt=__esm({"src/lib/tasks/checkout.ts"(){"use strict";Xe();ut()}});function countObjectsResponse(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function count_objects_default(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return parseStringResponse(countObjectsResponse(),[Wt],e)}})}}}var Wt;var qt=__esm({"src/lib/tasks/count-objects.ts"(){"use strict";Xe();Wt=new Je(/([a-z-]+): (\d+)$/,((e,[t,r])=>{const s=asCamelCase(t);if(Object.hasOwn(e,s)){e[s]=asNumber(r)}}))}});function parseCommitResult(e){const t={author:null,branch:"",commit:"",root:false,summary:{changes:0,insertions:0,deletions:0}};return parseStringResponse(t,jt,e)}var jt;var zt=__esm({"src/lib/parsers/parse-commit.ts"(){"use strict";Xe();jt=[new Je(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,((e,[t,r,s])=>{e.branch=t;e.commit=s;e.root=!!r})),new Je(/\s*Author:\s(.+)/i,((e,[t])=>{const r=t.split("<");const s=r.pop();if(!s||!s.includes("@")){return}e.author={email:s.substr(0,s.length-1),name:r.join("<").trim()}})),new Je(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,((e,[t,r,s])=>{e.summary.changes=parseInt(t,10)||0;e.summary.insertions=parseInt(r,10)||0;e.summary.deletions=parseInt(s,10)||0})),new Je(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,((e,[t,r,s])=>{e.summary.changes=parseInt(t,10)||0;const o=parseInt(r,10)||0;if(s==="-"){e.summary.deletions=o}else if(s==="+"){e.summary.insertions=o}}))]}});function commitTask(e,t,r){const s=["-c","core.abbrev=40","commit",...prefixedArray(e,"-m"),...t,...r];return{commands:s,format:"utf-8",parser:parseCommitResult}}function commit_default(){return{commit(e,...t){const r=trailingFunctionArgument(arguments);const s=rejectDeprecatedSignatures(e)||commitTask(asArray(e),asArray(filterType(t[0],Ge,[])),[...asStringArray(filterType(t[1],Ne,[])),...getTrailingOptions(arguments,0,true)]);return this._runTask(s,r)}};function rejectDeprecatedSignatures(e){return!Ge(e)&&configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)}}var Zt=__esm({"src/lib/tasks/commit.ts"(){"use strict";zt();Xe();ut()}});function first_commit_default(){return{firstCommit(){return this._runTask(straightThroughStringTask(["rev-list","--max-parents=0","HEAD"],true),trailingFunctionArgument(arguments))}}}var Kt=__esm({"src/lib/tasks/first-commit.ts"(){"use strict";Xe();ut()}});function hashObjectTask(e,t){const r=["hash-object",e];if(t){r.push("-w")}return straightThroughStringTask(r,true)}var Xt=__esm({"src/lib/tasks/hash-object.ts"(){"use strict";ut()}});function parseInit(e,t,r){const s=String(r).trim();let o;if(o=er.exec(s)){return new $t(e,t,false,o[1])}if(o=rr.exec(s)){return new $t(e,t,true,o[1])}let n="";const A=s.split(" ");while(A.length){const e=A.shift();if(e==="in"){n=A.join(" ");break}}return new $t(e,t,/^re/i.test(s),n)}var $t,er,rr;var sr=__esm({"src/lib/responses/InitSummary.ts"(){"use strict";$t=class{constructor(e,t,r,s){this.bare=e;this.path=t;this.existing=r;this.gitDir=s}};er=/^Init.+ repository in (.+)$/;rr=/^Rein.+ in (.+)$/}});function hasBareCommand(e){return e.includes(or)}function initTask(e=false,t,r){const s=["init",...r];if(e&&!hasBareCommand(s)){s.splice(1,0,or)}return{commands:s,format:"utf-8",parser(e){return parseInit(s.includes("--bare"),t,e)}}}var or;var nr=__esm({"src/lib/tasks/init.ts"(){"use strict";sr();or="--bare"}});function logFormatFromCommand(e){for(let t=0;t<e.length;t++){const r=Ar.exec(e[t]);if(r){return`--${r[1]}`}}return""}function isLogFormat(e){return Ar.test(e)}var Ar;var ir=__esm({"src/lib/args/log-format.ts"(){"use strict";Ar=/^--(stat|numstat|name-only|name-status)(=|$)/}});var ar;var cr=__esm({"src/lib/responses/DiffSummary.ts"(){"use strict";ar=class{constructor(){this.changed=0;this.deletions=0;this.insertions=0;this.files=[]}}}});function getDiffParser(e=""){const t=dr[e];return e=>parseStringResponse(new ar,t,e,false)}var lr,ur,gr,hr,dr;var Er=__esm({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";ir();cr();bt();Xe();lr=[new Je(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,((e,[t,r,s=""])=>{e.files.push({file:t.trim(),changes:asNumber(r),insertions:s.replace(/[^+]/g,"").length,deletions:s.replace(/[^-]/g,"").length,binary:false})})),new Je(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,((e,[t,r,s])=>{e.files.push({file:t.trim(),before:asNumber(r),after:asNumber(s),binary:true})})),new Je(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,((e,[t,r])=>{const s=/(\d+) i/.exec(r);const o=/(\d+) d/.exec(r);e.changed=asNumber(t);e.insertions=asNumber(s?.[1]);e.deletions=asNumber(o?.[1])}))];ur=[new Je(/(\d+)\t(\d+)\t(.+)$/,((e,[t,r,s])=>{const o=asNumber(t);const n=asNumber(r);e.changed++;e.insertions+=o;e.deletions+=n;e.files.push({file:s,changes:o+n,insertions:o,deletions:n,binary:false})})),new Je(/-\t-\t(.+)$/,((e,[t])=>{e.changed++;e.files.push({file:t,after:0,before:0,binary:true})}))];gr=[new Je(/(.+)$/,((e,[t])=>{e.changed++;e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:false})}))];hr=[new Je(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,((e,[t,r,s,o,n])=>{e.changed++;e.files.push({file:n??s,changes:0,insertions:0,deletions:0,binary:false,status:orVoid(isDiffNameStatus(t)&&t),from:orVoid(!!n&&s!==n&&s),similarity:asNumber(r)})}))];dr={[""]:lr,["--stat"]:lr,["--numstat"]:ur,["--name-status"]:hr,["--name-only"]:gr}}});function lineBuilder(e,t){return t.reduce(((t,r,s)=>{t[r]=e[s]||"";return t}),Object.create({diff:null}))}function createListLogSummaryParser(e=Cr,t=Qr,r=""){const s=getDiffParser(r);return function(r){const o=toLinesWithContent(r.trim(),false,pr).map((function(r){const o=r.split(fr);const n=lineBuilder(o[0].split(e),t);if(o.length>1&&!!o[1].trim()){n.diff=s(o[1])}return n}));return{all:o,latest:o.length&&o[0]||null,total:o.length}}}var pr,fr,Cr,Qr;var Br=__esm({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";Xe();Er();ir();pr="òòòòòò ";fr=" òò";Cr=" ò ";Qr=["hash","date","message","refs","author_name","author_email"]}});var Ir={};__export(Ir,{diffSummaryTask:()=>diffSummaryTask,validateLogFormatConfig:()=>validateLogFormatConfig});function diffSummaryTask(e){let t=logFormatFromCommand(e);const r=["diff"];if(t===""){t="--stat";r.push("--stat=4096")}r.push(...e);return validateLogFormatConfig(r)||{commands:r,format:"utf-8",parser:getDiffParser(t)}}function validateLogFormatConfig(e){const t=e.filter(isLogFormat);if(t.length>1){return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`)}if(t.length&&e.includes("-z")){return configurationErrorTask(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}}var mr=__esm({"src/lib/tasks/diff.ts"(){"use strict";ir();Er();ut()}});function prettyFormat(e,t){const r=[];const s=[];Object.keys(e).forEach((t=>{r.push(t);s.push(String(e[t]))}));return[r,s.join(t)]}function userOptions(e){return Object.keys(e).reduce(((t,r)=>{if(!(r in wr)){t[r]=e[r]}return t}),{})}function parseLogOptions(e={},t=[]){const r=filterType(e.splitter,Le,Cr);const s=filterPlainObject(e.format)?e.format:{hash:"%H",date:e.strictDate===false?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==false?"%aN":"%an",author_email:e.mailMap!==false?"%aE":"%ae"};const[o,n]=prettyFormat(s,r);const A=[];const i=[`--pretty=format:${pr}${n}${fr}`,...t];const a=e.n||e["max-count"]||e.maxCount;if(a){i.push(`--max-count=${a}`)}if(e.from||e.to){const t=e.symmetric!==false?"...":"..";A.push(`${e.from||""}${t}${e.to||""}`)}if(Le(e.file)){i.push("--follow",pathspec(e.file))}appendTaskOptions(userOptions(e),i);return{fields:o,splitter:r,commands:[...i,...A]}}function logTask(e,t,r){const s=createListLogSummaryParser(e,t,logFormatFromCommand(r));return{commands:["log",...r],format:"utf-8",parser:s}}function log_default(){return{log(...e){const t=trailingFunctionArgument(arguments);const r=parseLogOptions(trailingOptionsArgument(arguments),asStringArray(filterType(arguments[0],Ne,[])));const s=rejectDeprecatedSignatures(...e)||validateLogFormatConfig(r.commands)||createLogTask(r);return this._runTask(s,t)}};function createLogTask(e){return logTask(e.splitter,e.fields,e.commands)}function rejectDeprecatedSignatures(e,t){return Le(e)&&Le(t)&&configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`)}}var wr;var yr=__esm({"src/lib/tasks/log.ts"(){"use strict";ir();we();Br();Xe();ut();mr();wr=(e=>{e[e["--pretty"]=0]="--pretty";e[e["max-count"]=1]="max-count";e[e["maxCount"]=2]="maxCount";e[e["n"]=3]="n";e[e["file"]=4]="file";e[e["format"]=5]="format";e[e["from"]=6]="from";e[e["to"]=7]="to";e[e["splitter"]=8]="splitter";e[e["symmetric"]=9]="symmetric";e[e["mailMap"]=10]="mailMap";e[e["multiLine"]=11]="multiLine";e[e["strictDate"]=12]="strictDate";return e})(wr||{})}});var br,kr;var Tr=__esm({"src/lib/responses/MergeSummary.ts"(){"use strict";br=class{constructor(e,t=null,r){this.reason=e;this.file=t;this.meta=r}toString(){return`${this.file}:${this.reason}`}};kr=class{constructor(){this.conflicts=[];this.merges=[];this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){if(this.conflicts.length){return`CONFLICTS: ${this.conflicts.join(", ")}`}return"OK"}}}});var Rr,Dr;var Sr=__esm({"src/lib/responses/PullSummary.ts"(){"use strict";Rr=class{constructor(){this.remoteMessages={all:[]};this.created=[];this.deleted=[];this.files=[];this.deletions={};this.insertions={};this.summary={changes:0,deletions:0,insertions:0}}};Dr=class{constructor(){this.remote="";this.hash={local:"",remote:""};this.branch={local:"",remote:""};this.message=""}toString(){return this.message}}}});function objectEnumerationResult(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function asObjectCount(e){const t=/^\s*(\d+)/.exec(e);const r=/delta (\d+)/i.exec(e);return{count:asNumber(t&&t[1]||"0"),delta:asNumber(r&&r[1]||"0")}}var Fr;var vr=__esm({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";Xe();Fr=[new Ve(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,((e,[t,r])=>{const s=t.toLowerCase();const o=objectEnumerationResult(e.remoteMessages);Object.assign(o,{[s]:asNumber(r)})})),new Ve(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,((e,[t,r])=>{const s=t.toLowerCase();const o=objectEnumerationResult(e.remoteMessages);Object.assign(o,{[s]:asNumber(r)})})),new Ve(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,((e,[t,r,s])=>{const o=objectEnumerationResult(e.remoteMessages);o.total=asObjectCount(t);o.reused=asObjectCount(r);o.packReused=asNumber(s)}))]}});function parseRemoteMessages(e,t){return parseStringResponse({remoteMessages:new Nr},Ur,t)}var Ur,Nr;var Mr=__esm({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";Xe();vr();Ur=[new Ve(/^remote:\s*(.+)$/,((e,[t])=>{e.remoteMessages.all.push(t.trim());return false})),...Fr,new Ve([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],((e,[t])=>{e.remoteMessages.pullRequestUrl=t})),new Ve([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],((e,[t,r,s])=>{e.remoteMessages.vulnerabilities={count:asNumber(t),summary:r,url:s}}))];Nr=class{constructor(){this.all=[]}}}});function parsePullErrorResult(e,t){const r=parseStringResponse(new Dr,Hr,[e,t]);return r.message&&r}var Lr,Gr,_r,Or,Hr,xr,Pr;var Yr=__esm({"src/lib/parsers/parse-pull.ts"(){"use strict";Sr();Xe();Mr();Lr=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/;Gr=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/;_r=/^(create|delete) mode \d+ (.+)/;Or=[new Je(Lr,((e,[t,r,s])=>{e.files.push(t);if(r){e.insertions[t]=r.length}if(s){e.deletions[t]=s.length}})),new Je(Gr,((e,[t,,r,,s])=>{if(r!==void 0||s!==void 0){e.summary.changes=+t||0;e.summary.insertions=+r||0;e.summary.deletions=+s||0;return true}return false})),new Je(_r,((e,[t,r])=>{append(e.files,r);append(t==="create"?e.created:e.deleted,r)}))];Hr=[new Je(/^from\s(.+)$/i,((e,[t])=>void(e.remote=t))),new Je(/^fatal:\s(.+)$/,((e,[t])=>void(e.message=t))),new Je(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,((e,[t,r,s,o])=>{e.branch.local=s;e.hash.local=t;e.branch.remote=o;e.hash.remote=r}))];xr=(e,t)=>parseStringResponse(new Rr,Or,[e,t]);Pr=(e,t)=>Object.assign(new Rr,xr(e,t),parseRemoteMessages(e,t))}});var Jr,Vr,Wr;var qr=__esm({"src/lib/parsers/parse-merge.ts"(){"use strict";Tr();Xe();Yr();Jr=[new Je(/^Auto-merging\s+(.+)$/,((e,[t])=>{e.merges.push(t)})),new Je(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,((e,[t,r])=>{e.conflicts.push(new br(t,r))})),new Je(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,((e,[t,r,s])=>{e.conflicts.push(new br(t,r,{deleteRef:s}))})),new Je(/^CONFLICT\s+\((.+)\):/,((e,[t])=>{e.conflicts.push(new br(t,null))})),new Je(/^Automatic merge failed;\s+(.+)$/,((e,[t])=>{e.result=t}))];Vr=(e,t)=>Object.assign(Wr(e,t),Pr(e,t));Wr=e=>parseStringResponse(new kr,Jr,e)}});function mergeTask(e){if(!e.length){return configurationErrorTask("Git.merge requires at least one option")}return{commands:["merge",...e],format:"utf-8",parser(e,t){const r=Vr(e,t);if(r.failed){throw new ke(r)}return r}}}var jr=__esm({"src/lib/tasks/merge.ts"(){"use strict";Te();qr();ut()}});function pushResultPushedItem(e,t,r){const s=r.includes("deleted");const o=r.includes("tag")||/^refs\/tags/.test(e);const n=!r.includes("new");return{deleted:s,tag:o,branch:!o,new:!n,alreadyUpdated:n,local:e,remote:t}}var zr,Zr,Kr;var Xr=__esm({"src/lib/parsers/parse-push.ts"(){"use strict";Xe();Mr();zr=[new Je(/^Pushing to (.+)$/,((e,[t])=>{e.repo=t})),new Je(/^updating local tracking ref '(.+)'/,((e,[t])=>{e.ref={...e.ref||{},local:t}})),new Je(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,((e,[t,r,s])=>{e.pushed.push(pushResultPushedItem(t,r,s))})),new Je(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,((e,[t,r,s])=>{e.branch={...e.branch||{},local:t,remote:r,remoteName:s}})),new Je(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,((e,[t,r,s,o])=>{e.update={head:{local:t,remote:r},hash:{from:s,to:o}}}))];Zr=(e,t)=>{const r=Kr(e,t);const s=parseRemoteMessages(e,t);return{...r,...s}};Kr=(e,t)=>parseStringResponse({pushed:[]},zr,[e,t])}});var $r={};__export($r,{pushTagsTask:()=>pushTagsTask,pushTask:()=>pushTask});function pushTagsTask(e={},t){append(t,"--tags");return pushTask(e,t)}function pushTask(e={},t){const r=["push",...t];if(e.branch){r.splice(1,0,e.branch)}if(e.remote){r.splice(1,0,e.remote)}remove(r,"-v");append(r,"--verbose");append(r,"--porcelain");return{commands:r,format:"utf-8",parser:Zr}}var es=__esm({"src/lib/tasks/push.ts"(){"use strict";Xr();Xe()}});function show_default(){return{showBuffer(){const e=["show",...getTrailingOptions(arguments,1)];if(!e.includes("--binary")){e.splice(1,0,"--binary")}return this._runTask(straightThroughBufferTask(e),trailingFunctionArgument(arguments))},show(){const e=["show",...getTrailingOptions(arguments,1)];return this._runTask(straightThroughStringTask(e),trailingFunctionArgument(arguments))}}}var ts=__esm({"src/lib/tasks/show.ts"(){"use strict";Xe();ut()}});var rs,ss;var os=__esm({"src/lib/responses/FileStatusSummary.ts"(){"use strict";rs=/^(.+)\0(.+)$/;ss=class{constructor(e,t,r){this.path=e;this.index=t;this.working_dir=r;if(t==="R"||r==="R"){const t=rs.exec(e)||[null,e,e];this.from=t[2]||"";this.path=t[1]||""}}}}});function renamedFile(e){const[t,r]=e.split(Se);return{from:r||t,to:t}}function parser3(e,t,r){return[`${e}${t}`,r]}function conflicts(e,...t){return t.map((t=>parser3(e,t,((e,t)=>e.conflicted.push(t)))))}function splitLine(e,t){const r=t.trim();switch(" "){case r.charAt(2):return data(r.charAt(0),r.charAt(1),r.slice(3));case r.charAt(1):return data(" ",r.charAt(0),r.slice(2));default:return}function data(t,r,s){const o=`${t}${r}`;const n=As.get(o);if(n){n(e,s)}if(o!=="##"&&o!=="!!"){e.files.push(new ss(s,t,r))}}}var ns,As,is;var as=__esm({"src/lib/responses/StatusSummary.ts"(){"use strict";Xe();os();ns=class{constructor(){this.not_added=[];this.conflicted=[];this.created=[];this.deleted=[];this.ignored=void 0;this.modified=[];this.renamed=[];this.files=[];this.staged=[];this.ahead=0;this.behind=0;this.current=null;this.tracking=null;this.detached=false;this.isClean=()=>!this.files.length}};As=new Map([parser3(" ","A",((e,t)=>e.created.push(t))),parser3(" ","D",((e,t)=>e.deleted.push(t))),parser3(" ","M",((e,t)=>e.modified.push(t))),parser3("A"," ",((e,t)=>{e.created.push(t);e.staged.push(t)})),parser3("A","M",((e,t)=>{e.created.push(t);e.staged.push(t);e.modified.push(t)})),parser3("D"," ",((e,t)=>{e.deleted.push(t);e.staged.push(t)})),parser3("M"," ",((e,t)=>{e.modified.push(t);e.staged.push(t)})),parser3("M","M",((e,t)=>{e.modified.push(t);e.staged.push(t)})),parser3("R"," ",((e,t)=>{e.renamed.push(renamedFile(t))})),parser3("R","M",((e,t)=>{const r=renamedFile(t);e.renamed.push(r);e.modified.push(r.to)})),parser3("!","!",((e,t)=>{(e.ignored=e.ignored||[]).push(t)})),parser3("?","?",((e,t)=>e.not_added.push(t))),...conflicts("A","A","U"),...conflicts("D","D","U"),...conflicts("U","A","D","U"),["##",(e,t)=>{const r=/ahead (\d+)/;const s=/behind (\d+)/;const o=/^(.+?(?=(?:\.{3}|\s|$)))/;const n=/\.{3}(\S*)/;const A=/\son\s(\S+?)(?=\.{3}|$)/;let i=r.exec(t);e.ahead=i&&+i[1]||0;i=s.exec(t);e.behind=i&&+i[1]||0;i=o.exec(t);e.current=filterType(i?.[1],Le,null);i=n.exec(t);e.tracking=filterType(i?.[1],Le,null);i=A.exec(t);if(i){e.current=filterType(i?.[1],Le,e.current)}e.detached=/\(no branch\)/.test(t)}]]);is=function(e){const t=e.split(Se);const r=new ns;for(let e=0,s=t.length;e<s;){let s=t[e++].trim();if(!s){continue}if(s.charAt(0)==="R"){s+=Se+(t[e++]||"")}splitLine(r,s)}return r}}});function statusTask(e){const t=["status","--porcelain","-b","-u","--null",...e.filter((e=>!cs.includes(e)))];return{format:"utf-8",commands:t,parser(e){return is(e)}}}var cs;var ls=__esm({"src/lib/tasks/status.ts"(){"use strict";as();cs=["--null","-z"]}});function versionResponse(e=0,t=0,r=0,s="",o=true){return Object.defineProperty({major:e,minor:t,patch:r,agent:s,installed:o},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:false,enumerable:false})}function notInstalledResponse(){return versionResponse(0,0,0,"",false)}function version_default(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:versionParser,onError(e,t,r,s){if(e.exitCode===-2){return r(Buffer.from(us))}s(t)}})}}}function versionParser(e){if(e===us){return notInstalledResponse()}return parseStringResponse(versionResponse(0,0,0,e),gs,e)}var us,gs;var hs=__esm({"src/lib/tasks/version.ts"(){"use strict";Xe();us="installed=false";gs=[new Je(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,((e,[t,r,s,o=""])=>{Object.assign(e,versionResponse(asNumber(t),asNumber(r),asNumber(s),o))})),new Je(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,((e,[t,r,s,o=""])=>{Object.assign(e,versionResponse(asNumber(t),asNumber(r),s,o))}))]}});function createCloneTask(e,t,r,...s){if(!Le(r)){return configurationErrorTask(`git.${e}() requires a string 'repoPath'`)}return t(r,filterType(s[0],Le),getTrailingOptions(arguments))}function clone_default(){return{clone(e,...t){return this._runTask(createCloneTask("clone",ds,filterType(e,Le),...t),trailingFunctionArgument(arguments))},mirror(e,...t){return this._runTask(createCloneTask("mirror",Es,filterType(e,Le),...t),trailingFunctionArgument(arguments))}}}var ds,Es;var ps=__esm({"src/lib/tasks/clone.ts"(){"use strict";ut();Xe();we();ds=(e,t,r)=>{const s=["clone",...r];Le(e)&&s.push(pathspec(e));Le(t)&&s.push(pathspec(t));return straightThroughStringTask(s)};Es=(e,t,r)=>{append(r,"--mirror");return ds(e,t,r)}}});var Cs={};__export(Cs,{SimpleGitApi:()=>Qs});var Qs;var Bs=__esm({"src/lib/simple-git-api.ts"(){"use strict";Yt();Jt();Vt();qt();Zt();mt();Kt();St();Xt();nr();yr();jr();es();ts();ls();ut();hs();Xe();ps();Qs=class{constructor(e){this._executor=e}_runTask(e,t){const r=this._executor.chain();const s=r.push(e);if(t){taskCallback(e,s,t)}return Object.create(this,{then:{value:s.then.bind(s)},catch:{value:s.catch.bind(s)},_executor:{value:r}})}add(e){return this._runTask(straightThroughStringTask(["add",...asArray(e)]),trailingFunctionArgument(arguments))}cwd(e){const t=trailingFunctionArgument(arguments);if(typeof e==="string"){return this._runTask(changeWorkingDirectoryTask(e,this._executor),t)}if(typeof e?.path==="string"){return this._runTask(changeWorkingDirectoryTask(e.path,e.root&&this._executor||void 0),t)}return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(hashObjectTask(e,t===true),trailingFunctionArgument(arguments))}init(e){return this._runTask(initTask(e===true,this._executor.cwd,getTrailingOptions(arguments)),trailingFunctionArgument(arguments))}merge(){return this._runTask(mergeTask(getTrailingOptions(arguments)),trailingFunctionArgument(arguments))}mergeFromTo(e,t){if(!(Le(e)&&Le(t))){return this._runTask(configurationErrorTask(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`))}return this._runTask(mergeTask([e,t,...getTrailingOptions(arguments)]),trailingFunctionArgument(arguments,false))}outputHandler(e){this._executor.outputHandler=e;return this}push(){const e=pushTask({remote:filterType(arguments[0],Le),branch:filterType(arguments[1],Le)},getTrailingOptions(arguments));return this._runTask(e,trailingFunctionArgument(arguments))}stash(){return this._runTask(straightThroughStringTask(["stash",...getTrailingOptions(arguments)]),trailingFunctionArgument(arguments))}status(){return this._runTask(statusTask(getTrailingOptions(arguments)),trailingFunctionArgument(arguments))}};Object.assign(Qs.prototype,checkout_default(),clone_default(),commit_default(),config_default(),count_objects_default(),first_commit_default(),grep_default(),log_default(),show_default(),version_default())}});var Is={};__export(Is,{Scheduler:()=>ws});var ms,ws;var ys=__esm({"src/lib/runners/scheduler.ts"(){"use strict";Xe();Mt();ms=(()=>{let e=0;return()=>{e++;const{promise:t,done:r}=(0,Ee.ud)();return{promise:t,done:r,id:e}}})();ws=class{constructor(e=2){this.concurrency=e;this.logger=createLogger("","scheduler");this.pending=[];this.running=[];this.logger(`Constructed, concurrency=%s`,e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`,this.pending.length,this.running.length,this.concurrency);return}const e=append(this.running,this.pending.shift());this.logger(`Attempting id=%s`,e.id);e.done((()=>{this.logger(`Completing id=`,e.id);remove(this.running,e);this.schedule()}))}next(){const{promise:e,id:t}=append(this.pending,ms());this.logger(`Scheduling id=%s`,t);this.schedule();return e}}}});var bs={};__export(bs,{applyPatchTask:()=>applyPatchTask});function applyPatchTask(e,t){return straightThroughStringTask(["apply",...t,...e])}var ks=__esm({"src/lib/tasks/apply-patch.ts"(){"use strict";ut()}});function branchDeletionSuccess(e,t){return{branch:e,hash:t,success:true}}function branchDeletionFailure(e){return{branch:e,hash:null,success:false}}var Ts;var Rs=__esm({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";Ts=class{constructor(){this.all=[];this.branches={};this.errors=[]}get success(){return!this.errors.length}}}});function hasBranchDeletionError(e,t){return t===1&&Ss.test(e)}var Ds,Ss,Fs,vs;var Us=__esm({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";Rs();Xe();Ds=/(\S+)\s+\(\S+\s([^)]+)\)/;Ss=/^error[^']+'([^']+)'/m;Fs=[new Je(Ds,((e,[t,r])=>{const s=branchDeletionSuccess(t,r);e.all.push(s);e.branches[t]=s})),new Je(Ss,((e,[t])=>{const r=branchDeletionFailure(t);e.errors.push(r);e.all.push(r);e.branches[t]=r}))];vs=(e,t)=>parseStringResponse(new Ts,Fs,[e,t])}});var Ns;var Ms=__esm({"src/lib/responses/BranchSummary.ts"(){"use strict";Ns=class{constructor(){this.all=[];this.branches={};this.current="";this.detached=false}push(e,t,r,s,o){if(e==="*"){this.detached=t;this.current=r}this.all.push(r);this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:s,label:o}}}}});function branchStatus(e){return e?e.charAt(0):""}function parseBranchSummary(e,t=false){return parseStringResponse(new Ns,t?[Gs]:Ls,e)}var Ls,Gs;var _s=__esm({"src/lib/parsers/parse-branch.ts"(){"use strict";Ms();Xe();Ls=[new Je(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,((e,[t,r,s,o])=>{e.push(branchStatus(t),true,r,s,o)})),new Je(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,((e,[t,r,s,o])=>{e.push(branchStatus(t),false,r,s,o)}))];Gs=new Je(/^(\S+)$/s,((e,[t])=>{e.push("*",false,t,"","")}))}});var Os={};__export(Os,{branchLocalTask:()=>branchLocalTask,branchTask:()=>branchTask,containsDeleteBranchCommand:()=>containsDeleteBranchCommand,deleteBranchTask:()=>deleteBranchTask,deleteBranchesTask:()=>deleteBranchesTask});function containsDeleteBranchCommand(e){const t=["-d","-D","--delete"];return e.some((e=>t.includes(e)))}function branchTask(e){const t=containsDeleteBranchCommand(e);const r=e.includes("--show-current");const s=["branch",...e];if(s.length===1){s.push("-a")}if(!s.includes("-v")){s.splice(1,0,"-v")}return{format:"utf-8",commands:s,parser(e,s){if(t){return vs(e,s).all[0]}return parseBranchSummary(e,r)}}}function branchLocalTask(){return{format:"utf-8",commands:["branch","-v"],parser(e){return parseBranchSummary(e)}}}function deleteBranchesTask(e,t=false){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(e,t){return vs(e,t)},onError({exitCode:e,stdOut:t},r,s,o){if(!hasBranchDeletionError(String(r),e)){return o(r)}s(t)}}}function deleteBranchTask(e,t=false){const r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(t,r){return vs(t,r).branches[e]},onError({exitCode:e,stdErr:t,stdOut:s},o,n,A){if(!hasBranchDeletionError(String(o),e)){return A(o)}throw new ke(r.parser(bufferToString(s),bufferToString(t)),String(o))}};return r}var Hs=__esm({"src/lib/tasks/branch.ts"(){"use strict";Te();Us();_s();Xe()}});function toPath(e){const t=e.trim().replace(/^["']|["']$/g,"");return t&&(0,pe.normalize)(t)}var xs;var Ps=__esm({"src/lib/responses/CheckIgnore.ts"(){"use strict";xs=e=>e.split(/\n/g).map(toPath).filter(Boolean)}});var Ys={};__export(Ys,{checkIgnoreTask:()=>checkIgnoreTask});function checkIgnoreTask(e){return{commands:["check-ignore",...e],format:"utf-8",parser:xs}}var Js=__esm({"src/lib/tasks/check-ignore.ts"(){"use strict";Ps()}});function parseFetchResult(e,t){const r={raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]};return parseStringResponse(r,Vs,[e,t])}var Vs;var Ws=__esm({"src/lib/parsers/parse-fetch.ts"(){"use strict";Xe();Vs=[new Je(/From (.+)$/,((e,[t])=>{e.remote=t})),new Je(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,((e,[t,r])=>{e.branches.push({name:t,tracking:r})})),new Je(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,((e,[t,r])=>{e.tags.push({name:t,tracking:r})})),new Je(/- \[deleted]\s+\S+\s*-> (.+)$/,((e,[t])=>{e.deleted.push({tracking:t})})),new Je(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,((e,[t,r,s,o])=>{e.updated.push({name:s,tracking:o,to:r,from:t})}))]}});var qs={};__export(qs,{fetchTask:()=>fetchTask});function disallowedCommand(e){return/^--upload-pack(=|$)/.test(e)}function fetchTask(e,t,r){const s=["fetch",...r];if(e&&t){s.push(e,t)}const o=s.find(disallowedCommand);if(o){return configurationErrorTask(`git.fetch: potential exploit argument blocked.`)}return{commands:s,format:"utf-8",parser:parseFetchResult}}var js=__esm({"src/lib/tasks/fetch.ts"(){"use strict";Ws();ut()}});function parseMoveResult(e){return parseStringResponse({moves:[]},zs,e)}var zs;var Zs=__esm({"src/lib/parsers/parse-move.ts"(){"use strict";Xe();zs=[new Je(/^Renaming (.+) to (.+)$/,((e,[t,r])=>{e.moves.push({from:t,to:r})}))]}});var Ks={};__export(Ks,{moveTask:()=>moveTask});function moveTask(e,t){return{commands:["mv","-v",...asArray(e),t],format:"utf-8",parser:parseMoveResult}}var Xs=__esm({"src/lib/tasks/move.ts"(){"use strict";Zs();Xe()}});var $s={};__export($s,{pullTask:()=>pullTask});function pullTask(e,t,r){const s=["pull",...r];if(e&&t){s.splice(1,0,e,t)}return{commands:s,format:"utf-8",parser(e,t){return Pr(e,t)},onError(e,t,r,s){const o=parsePullErrorResult(bufferToString(e.stdOut),bufferToString(e.stdErr));if(o){return s(new ke(o))}s(t)}}}var eo=__esm({"src/lib/tasks/pull.ts"(){"use strict";Te();Yr();Xe()}});function parseGetRemotes(e){const t={};forEach(e,(([e])=>t[e]={name:e}));return Object.values(t)}function parseGetRemotesVerbose(e){const t={};forEach(e,(([e,r,s])=>{if(!Object.hasOwn(t,e)){t[e]={name:e,refs:{fetch:"",push:""}}}if(s&&r){t[e].refs[s.replace(/[^a-z]/g,"")]=r}}));return Object.values(t)}function forEach(e,t){forEachLineWithContent(e,(e=>t(e.split(/\s+/))))}var to=__esm({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";Xe()}});var ro={};__export(ro,{addRemoteTask:()=>addRemoteTask,getRemotesTask:()=>getRemotesTask,listRemotesTask:()=>listRemotesTask,remoteTask:()=>remoteTask,removeRemoteTask:()=>removeRemoteTask});function addRemoteTask(e,t,r){return straightThroughStringTask(["remote","add",...r,e,t])}function getRemotesTask(e){const t=["remote"];if(e){t.push("-v")}return{commands:t,format:"utf-8",parser:e?parseGetRemotesVerbose:parseGetRemotes}}function listRemotesTask(e){const t=[...e];if(t[0]!=="ls-remote"){t.unshift("ls-remote")}return straightThroughStringTask(t)}function remoteTask(e){const t=[...e];if(t[0]!=="remote"){t.unshift("remote")}return straightThroughStringTask(t)}function removeRemoteTask(e){return straightThroughStringTask(["remote","remove",e])}var so=__esm({"src/lib/tasks/remote.ts"(){"use strict";to();ut()}});var oo={};__export(oo,{stashListTask:()=>stashListTask});function stashListTask(e={},t){const r=parseLogOptions(e);const s=["stash","list",...r.commands,...t];const o=createListLogSummaryParser(r.splitter,r.fields,logFormatFromCommand(s));return validateLogFormatConfig(s)||{commands:s,format:"utf-8",parser:o}}var no=__esm({"src/lib/tasks/stash-list.ts"(){"use strict";ir();Br();mr();yr()}});var Ao={};__export(Ao,{addSubModuleTask:()=>addSubModuleTask,initSubModuleTask:()=>initSubModuleTask,subModuleTask:()=>subModuleTask,updateSubModuleTask:()=>updateSubModuleTask});function addSubModuleTask(e,t){return subModuleTask(["add",e,t])}function initSubModuleTask(e){return subModuleTask(["init",...e])}function subModuleTask(e){const t=[...e];if(t[0]!=="submodule"){t.unshift("submodule")}return straightThroughStringTask(t)}function updateSubModuleTask(e){return subModuleTask(["update",...e])}var io=__esm({"src/lib/tasks/sub-module.ts"(){"use strict";ut()}});function singleSorted(e,t){const r=Number.isNaN(e);const s=Number.isNaN(t);if(r!==s){return r?1:-1}return r?sorted(e,t):0}function sorted(e,t){return e===t?0:e>t?1:-1}function trimmed(e){return e.trim()}function toNumber(e){if(typeof e==="string"){return parseInt(e.replace(/^\D+/g,""),10)||0}return 0}var ao,co;var lo=__esm({"src/lib/responses/TagList.ts"(){"use strict";ao=class{constructor(e,t){this.all=e;this.latest=t}};co=function(e,t=false){const r=e.split("\n").map(trimmed).filter(Boolean);if(!t){r.sort((function(e,t){const r=e.split(".");const s=t.split(".");if(r.length===1||s.length===1){return singleSorted(toNumber(r[0]),toNumber(s[0]))}for(let e=0,t=Math.max(r.length,s.length);e<t;e++){const t=sorted(toNumber(r[e]),toNumber(s[e]));if(t){return t}}return 0}))}const s=t?r[0]:[...r].reverse().find((e=>e.indexOf(".")>=0));return new ao(r,s)}}});var uo={};__export(uo,{addAnnotatedTagTask:()=>addAnnotatedTagTask,addTagTask:()=>addTagTask,tagListTask:()=>tagListTask});function tagListTask(e=[]){const t=e.some((e=>/^--sort=/.test(e)));return{format:"utf-8",commands:["tag","-l",...e],parser(e){return co(e,t)}}}function addTagTask(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function addAnnotatedTagTask(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var go=__esm({"src/lib/tasks/tag.ts"(){"use strict";lo()}});var ho=__commonJS({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(Pt(),__toCommonJS(Ht));var{SimpleGitApi:s}=(Bs(),__toCommonJS(Cs));var{Scheduler:o}=(ys(),__toCommonJS(Is));var{adhocExecTask:n,configurationErrorTask:A}=(ut(),__toCommonJS(ct));var{asArray:i,filterArray:a,filterPrimitives:c,filterString:l,filterStringOrStringArray:u,filterType:g,getTrailingOptions:h,trailingFunctionArgument:d,trailingOptionsArgument:E}=(Xe(),__toCommonJS(Ke));var{applyPatchTask:p}=(ks(),__toCommonJS(bs));var{branchTask:f,branchLocalTask:C,deleteBranchesTask:Q,deleteBranchTask:B}=(Hs(),__toCommonJS(Os));var{checkIgnoreTask:I}=(Js(),__toCommonJS(Ys));var{checkIsRepoTask:m}=(st(),__toCommonJS($e));var{cleanWithOptionsTask:w,isCleanOptionsArray:y}=(Ct(),__toCommonJS(gt));var{diffSummaryTask:b}=(mr(),__toCommonJS(Ir));var{fetchTask:k}=(js(),__toCommonJS(qs));var{moveTask:T}=(Xs(),__toCommonJS(Ks));var{pullTask:R}=(eo(),__toCommonJS($s));var{pushTagsTask:D}=(es(),__toCommonJS($r));var{addRemoteTask:S,getRemotesTask:F,listRemotesTask:v,remoteTask:U,removeRemoteTask:N}=(so(),__toCommonJS(ro));var{getResetMode:M,resetTask:L}=(Nt(),__toCommonJS(Ft));var{stashListTask:G}=(no(),__toCommonJS(oo));var{addSubModuleTask:_,initSubModuleTask:O,subModuleTask:H,updateSubModuleTask:x}=(io(),__toCommonJS(Ao));var{addAnnotatedTagTask:P,addTagTask:Y,tagListTask:J}=(go(),__toCommonJS(uo));var{straightThroughBufferTask:V,straightThroughStringTask:W}=(ut(),__toCommonJS(ct));function Git2(e,t){this._plugins=t;this._executor=new r(e.baseDir,new o(e.maxConcurrentProcesses),t);this._trimmed=e.trimmed}(Git2.prototype=Object.create(s.prototype)).constructor=Git2;Git2.prototype.customBinary=function(e){this._plugins.reconfigure("binary",e);return this};Git2.prototype.env=function(e,t){if(arguments.length===1&&typeof e==="object"){this._executor.env=e}else{(this._executor.env=this._executor.env||{})[e]=t}return this};Git2.prototype.stashList=function(e){return this._runTask(G(E(arguments)||{},a(e)&&e||[]),d(arguments))};Git2.prototype.mv=function(e,t){return this._runTask(T(e,t),d(arguments))};Git2.prototype.checkoutLatestTag=function(e){var t=this;return this.pull((function(){t.tags((function(r,s){t.checkout(s.latest,e)}))}))};Git2.prototype.pull=function(e,t,r,s){return this._runTask(R(g(e,l),g(t,l),h(arguments)),d(arguments))};Git2.prototype.fetch=function(e,t){return this._runTask(k(g(e,l),g(t,l),h(arguments)),d(arguments))};Git2.prototype.silent=function(e){return this._runTask(n((()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed."))))};Git2.prototype.tags=function(e,t){return this._runTask(J(h(arguments)),d(arguments))};Git2.prototype.rebase=function(){return this._runTask(W(["rebase",...h(arguments)]),d(arguments))};Git2.prototype.reset=function(e){return this._runTask(L(M(e),h(arguments)),d(arguments))};Git2.prototype.revert=function(e){const t=d(arguments);if(typeof e!=="string"){return this._runTask(A("Commit must be a string"),t)}return this._runTask(W(["revert",...h(arguments,0,true),e]),t)};Git2.prototype.addTag=function(e){const t=typeof e==="string"?Y(e):A("Git.addTag requires a tag name");return this._runTask(t,d(arguments))};Git2.prototype.addAnnotatedTag=function(e,t){return this._runTask(P(e,t),d(arguments))};Git2.prototype.deleteLocalBranch=function(e,t,r){return this._runTask(B(e,typeof t==="boolean"?t:false),d(arguments))};Git2.prototype.deleteLocalBranches=function(e,t,r){return this._runTask(Q(e,typeof t==="boolean"?t:false),d(arguments))};Git2.prototype.branch=function(e,t){return this._runTask(f(h(arguments)),d(arguments))};Git2.prototype.branchLocal=function(e){return this._runTask(C(),d(arguments))};Git2.prototype.raw=function(e){const t=!Array.isArray(e);const r=[].slice.call(t?arguments:e,0);for(let e=0;e<r.length&&t;e++){if(!c(r[e])){r.splice(e,r.length-e);break}}r.push(...h(arguments,0,true));var s=d(arguments);if(!r.length){return this._runTask(A("Raw: must supply one or more command to execute"),s)}return this._runTask(W(r,this._trimmed),s)};Git2.prototype.submoduleAdd=function(e,t,r){return this._runTask(_(e,t),d(arguments))};Git2.prototype.submoduleUpdate=function(e,t){return this._runTask(x(h(arguments,true)),d(arguments))};Git2.prototype.submoduleInit=function(e,t){return this._runTask(O(h(arguments,true)),d(arguments))};Git2.prototype.subModule=function(e,t){return this._runTask(H(h(arguments)),d(arguments))};Git2.prototype.listRemote=function(){return this._runTask(v(h(arguments)),d(arguments))};Git2.prototype.addRemote=function(e,t,r){return this._runTask(S(e,t,h(arguments)),d(arguments))};Git2.prototype.removeRemote=function(e,t){return this._runTask(N(e),d(arguments))};Git2.prototype.getRemotes=function(e,t){return this._runTask(F(e===true),d(arguments))};Git2.prototype.remote=function(e,t){return this._runTask(U(h(arguments)),d(arguments))};Git2.prototype.tag=function(e,t){const r=h(arguments);if(r[0]!=="tag"){r.unshift("tag")}return this._runTask(W(r),d(arguments))};Git2.prototype.updateServerInfo=function(e){return this._runTask(W(["update-server-info"]),d(arguments))};Git2.prototype.pushTags=function(e,t){const r=D({remote:g(e,l)},h(arguments));return this._runTask(r,d(arguments))};Git2.prototype.rm=function(e){return this._runTask(W(["rm","-f",...i(e)]),d(arguments))};Git2.prototype.rmKeepLocal=function(e){return this._runTask(W(["rm","--cached",...i(e)]),d(arguments))};Git2.prototype.catFile=function(e,t){return this._catFile("utf-8",arguments)};Git2.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)};Git2.prototype._catFile=function(e,t){var r=d(t);var s=["cat-file"];var o=t[0];if(typeof o==="string"){return this._runTask(A("Git.catFile: options must be supplied as an array of strings"),r)}if(Array.isArray(o)){s.push.apply(s,o)}const n=e==="buffer"?V(s):W(s);return this._runTask(n,r)};Git2.prototype.diff=function(e,t){const r=l(e)?A("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):W(["diff",...h(arguments)]);return this._runTask(r,d(arguments))};Git2.prototype.diffSummary=function(){return this._runTask(b(h(arguments,1)),d(arguments))};Git2.prototype.applyPatch=function(e){const t=!u(e)?A(`git.applyPatch requires one or more string patches as the first argument`):p(i(e),h([].slice.call(arguments,1)));return this._runTask(t,d(arguments))};Git2.prototype.revparse=function(){const e=["rev-parse",...h(arguments,true)];return this._runTask(W(e,true),d(arguments))};Git2.prototype.clean=function(e,t,r){const s=y(e);const o=s&&e.join("")||g(e,l)||"";const n=h([].slice.call(arguments,s?1:0));return this._runTask(w(o,n),d(arguments))};Git2.prototype.exec=function(e){const t={commands:[],format:"utf-8",parser(){if(typeof e==="function"){e()}}};return this._runTask(t)};Git2.prototype.clearQueue=function(){return this._runTask(n((()=>console.warn("simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead."))))};Git2.prototype.checkIgnore=function(e,t){return this._runTask(I(i(g(e,u,[]))),d(arguments))};Git2.prototype.checkIsRepo=function(e,t){return this._runTask(m(g(e,l)),d(arguments))};t.exports=Git2}});we();be();var Eo=class extends ye{constructor(e,t){super(void 0,t);this.config=e}};be();be();var po=class extends ye{constructor(e,t,r){super(e,r);this.task=e;this.plugin=t;Object.setPrototypeOf(this,new.target.prototype)}};Te();De();st();Ct();mt();bt();St();Nt();function abortPlugin(e){if(!e){return}const t={type:"spawn.after",action(t,r){function kill(){r.kill(new po(void 0,"abort","Abort signal received"))}e.addEventListener("abort",kill);r.spawned.on("close",(()=>e.removeEventListener("abort",kill)))}};const r={type:"spawn.before",action(t,r){if(e.aborted){r.kill(new po(void 0,"abort","Abort already signaled"))}}};return[r,t]}function isConfigSwitch(e){return typeof e==="string"&&e.trim().toLowerCase()==="-c"}function isCloneUploadPackSwitch(e,t){if(typeof t!=="string"||!t.includes(e)){return false}const r=t.trim().replace(/\0/g,"");return/^(--no)?-{1,2}[\dlsqvnobucj]+(\s|$)/.test(r)}function preventConfigBuilder(e,t,r=String(e)){const s=typeof e==="string"?new RegExp(`\\s*${e}`,"i"):e;return function preventCommand(e,o,n){if(e[t]!==true&&isConfigSwitch(o)&&s.test(n)){throw new po(void 0,"unsafe",`Configuring ${r} is not permitted without enabling ${t}`)}}}var fo=[preventConfigBuilder(/^\s*protocol(.[a-z]+)?.allow/i,"allowUnsafeProtocolOverride","protocol.allow"),preventConfigBuilder("core.sshCommand","allowUnsafeSshCommand"),preventConfigBuilder("core.gitProxy","allowUnsafeGitProxy"),preventConfigBuilder("core.hooksPath","allowUnsafeHooksPath"),preventConfigBuilder("diff.external","allowUnsafeDiffExternal")];function preventUploadPack(e,t){if(/^\s*--(upload|receive)-pack/.test(e)){throw new po(void 0,"unsafe",`Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`)}if(t==="clone"&&isCloneUploadPackSwitch("u",e)){throw new po(void 0,"unsafe",`Use of clone with option -u is not permitted without enabling allowUnsafePack`)}if(t==="push"&&/^\s*--exec\b/.test(e)){throw new po(void 0,"unsafe",`Use of push with option --exec is not permitted without enabling allowUnsafePack`)}}function blockUnsafeOperationsPlugin({allowUnsafePack:e=false,...t}={}){return{type:"spawn.args",action(r,s){r.forEach(((o,n)=>{const A=n<r.length?r[n+1]:"";e||preventUploadPack(o,s.method);fo.forEach((e=>e(t,o,A)))}));return r}}}Xe();function commandConfigPrefixingPlugin(e){const t=prefixedArray(e,"-c");return{type:"spawn.args",action(e){return[...t,...e]}}}Xe();var Co=(0,Ee.yX)().promise;function completionDetectionPlugin({onClose:e=true,onExit:t=50}={}){function createEvents(){let r=-1;const s={close:(0,Ee.yX)(),closeTimeout:(0,Ee.yX)(),exit:(0,Ee.yX)(),exitTimeout:(0,Ee.yX)()};const o=Promise.race([e===false?Co:s.closeTimeout.promise,t===false?Co:s.exitTimeout.promise]);configureTimeout(e,s.close,s.closeTimeout);configureTimeout(t,s.exit,s.exitTimeout);return{close(e){r=e;s.close.done()},exit(e){r=e;s.exit.done()},get exitCode(){return r},result:o}}function configureTimeout(e,t,r){if(e===false){return}(e===true?t.promise:t.promise.then((()=>delay(e)))).then(r.done)}return{type:"spawn.after",async action(e,{spawned:t,close:r}){const s=createEvents();let o=true;let quickClose=()=>void(o=false);t.stdout?.on("data",quickClose);t.stderr?.on("data",quickClose);t.on("error",quickClose);t.on("close",(e=>s.close(e)));t.on("exit",(e=>s.exit(e)));try{await s.result;if(o){await delay(50)}r(s.exitCode)}catch(e){r(s.exitCode,e)}}}}Xe();var Qo=`Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`;var Bo=`Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;function isBadArgument(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function toBinaryConfig(e,t){if(e.length<1||e.length>2){throw new po(void 0,"binary",Qo)}const r=e.some(isBadArgument);if(r){if(t){console.warn(Bo)}else{throw new po(void 0,"binary",Bo)}}const[s,o]=e;return{binary:s,prefix:o}}function customBinaryPlugin(e,t=["git"],r=false){let s=toBinaryConfig(asArray(t),r);e.on("binary",(e=>{s=toBinaryConfig(asArray(e),r)}));e.append("spawn.binary",(()=>s.binary));e.append("spawn.args",(e=>s.prefix?[s.prefix,...e]:e))}be();function isTaskError(e){return!!(e.exitCode&&e.stdErr.length)}function getErrorMessage(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function errorDetectionHandler(e=false,t=isTaskError,r=getErrorMessage){return(s,o)=>{if(!e&&s||!t(o)){return s}return r(o)}}function errorDetectionPlugin(e){return{type:"task.error",action(t,r){const s=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});if(Buffer.isBuffer(s)){return{error:new ye(void 0,s.toString("utf-8"))}}return{error:s}}}}Xe();var Io=class{constructor(){this.plugins=new Set;this.events=new fe.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){const r=append(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){const t=[];asArray(e).forEach((e=>e&&this.plugins.add(append(t,e))));return()=>{t.forEach((e=>this.plugins.delete(e)))}}exec(e,t,r){let s=t;const o=Object.freeze(Object.create(r));for(const t of this.plugins){if(t.type===e){s=t.action(s,o)}}return s}};Xe();function progressMonitorPlugin(e){const t="--progress";const r=["checkout","clone","fetch","pull","push"];const s={type:"spawn.after",action(r,s){if(!s.commands.includes(t)){return}s.spawned.stderr?.on("data",(t=>{const r=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(t.toString("utf8"));if(!r){return}e({method:s.method,stage:progressEventStage(r[1]),progress:asNumber(r[2]),processed:asNumber(r[3]),total:asNumber(r[4])})}))}};const o={type:"spawn.args",action(e,s){if(!r.includes(s.method)){return e}return including(e,t)}};return[o,s]}function progressEventStage(e){return String(e.toLowerCase().split(" ",1))||"unknown"}Xe();function spawnOptionsPlugin(e){const t=pick(e,["uid","gid"]);return{type:"spawn.options",action(e){return{...t,...e}}}}function timeoutPlugin({block:e,stdErr:t=true,stdOut:r=true}){if(e>0){return{type:"spawn.after",action(s,o){let n;function wait(){n&&clearTimeout(n);n=setTimeout(kill,e)}function stop(){o.spawned.stdout?.off("data",wait);o.spawned.stderr?.off("data",wait);o.spawned.off("exit",stop);o.spawned.off("close",stop);n&&clearTimeout(n)}function kill(){stop();o.kill(new po(void 0,"timeout",`block timeout reached`))}r&&o.spawned.stdout?.on("data",wait);t&&o.spawned.stderr?.on("data",wait);o.spawned.on("exit",stop);o.spawned.on("close",stop);wait()}}}}we();function suffixPathsPlugin(){return{type:"spawn.args",action(e){const t=[];let r;function append2(e){(r=r||[]).push(...e)}for(let r=0;r<e.length;r++){const s=e[r];if(isPathSpec(s)){append2(toPaths(s));continue}if(s==="--"){append2(e.slice(r+1).flatMap((e=>isPathSpec(e)&&toPaths(e)||e)));break}t.push(s)}return!r?t:[...t,"--",...r.map(String)]}}}Xe();var mo=ho();function gitInstanceFactory(e,t){const r=new Io;const s=createInstanceConfig(e&&(typeof e==="string"?{baseDir:e}:e)||{},t);if(!folderExists(s.baseDir)){throw new Eo(s,`Cannot use simple-git on a directory that does not exist`)}if(Array.isArray(s.config)){r.add(commandConfigPrefixingPlugin(s.config))}r.add(blockUnsafeOperationsPlugin(s.unsafe));r.add(completionDetectionPlugin(s.completion));s.abort&&r.add(abortPlugin(s.abort));s.progress&&r.add(progressMonitorPlugin(s.progress));s.timeout&&r.add(timeoutPlugin(s.timeout));s.spawnOptions&&r.add(spawnOptionsPlugin(s.spawnOptions));r.add(suffixPathsPlugin());r.add(errorDetectionPlugin(errorDetectionHandler(true)));s.errors&&r.add(errorDetectionPlugin(s.errors));customBinaryPlugin(r,s.binary,s.unsafe?.allowUnsafeCustomBinary);return new mo(s,r)}Te();var wo=null&&["customBinary","env","outputHandler","silent"];var yo=null&&["add","addAnnotatedTag","addConfig","addRemote","addTag","applyPatch","binaryCatFile","branch","branchLocal","catFile","checkIgnore","checkIsRepo","checkout","checkoutBranch","checkoutLatestTag","checkoutLocalBranch","clean","clone","commit","cwd","deleteLocalBranch","deleteLocalBranches","diff","diffSummary","exec","fetch","getRemotes","init","listConfig","listRemote","log","merge","mergeFromTo","mirror","mv","pull","push","pushTags","raw","rebase","remote","removeRemote","reset","revert","revparse","rm","rmKeepLocal","show","stash","stashList","status","subModule","submoduleAdd","submoduleInit","submoduleUpdate","tag","tags","updateServerInfo"];function gitP(...e){let t;let r=Promise.resolve();try{t=gitInstanceFactory(...e)}catch(e){r=Promise.reject(e)}function builderReturn(){return s}function chainReturn(){return r}const s=[...wo,...yo].reduce(((e,r)=>{const s=yo.includes(r);const o=s?asyncWrapper(r,t):syncWrapper(r,t,e);const n=s?chainReturn:builderReturn;Object.defineProperty(e,r,{enumerable:false,configurable:false,value:t?o:n});return e}),{});return s;function asyncWrapper(e,t){return function(...s){if(typeof s[s.length]==="function"){throw new TypeError("Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to "+e)}return r.then((function(){return new Promise((function(r,o){const callback=(e,t)=>{if(e){return o(toError(e))}r(t)};s.push(callback);t[e].apply(t,s)}))}))}}function syncWrapper(e,t,r){return(...s)=>{t[e](...s);return r}}}function toError(e){if(e instanceof Error){return e}if(typeof e==="string"){return new Error(e)}return new ke(e)}var bo=null&&gitInstanceFactory;var ko=gitInstanceFactory;function parseArgsStringToArgv(e,t,r){var s=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi;var o=e;var n=[];if(t){n.push(t)}if(r){n.push(r)}var A;do{A=s.exec(o);if(A!==null){n.push(firstString(A[1],A[6],A[0]))}}while(A!==null);return n}function firstString(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}for(var r=0;r<e.length;r++){var s=e[r];if(typeof s==="string"){return s}}}
4/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
5function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,t){var r,s,o,n;if(t){n=Object.keys(t);for(r=0,s=n.length;r<s;r+=1){o=n[r];e[o]=t[o]}}return e}function repeat(e,t){var r="",s;for(s=0;s<t;s+=1){r+=e}return r}function isNegativeZero(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var To=isNothing;var Ro=isObject;var Do=toArray;var So=repeat;var Fo=isNegativeZero;var vo=extend;var Uo={isNothing:To,isObject:Ro,toArray:Do,repeat:So,isNegativeZero:Fo,extend:vo};function formatError(e,t){var r="",s=e.reason||"(unknown reason)";if(!e.mark)return s;if(e.mark.name){r+='in "'+e.mark.name+'" '}r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!t&&e.mark.snippet){r+="\n\n"+e.mark.snippet}return s+" "+r}function YAMLException$1(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException$1.prototype=Object.create(Error.prototype);YAMLException$1.prototype.constructor=YAMLException$1;YAMLException$1.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};var No=YAMLException$1;function getLine(e,t,r,s,o){var n="";var A="";var i=Math.floor(o/2)-1;if(s-t>i){n=" ... ";t=s-i+n.length}if(r-s>i){A=" ...";r=s+i-A.length}return{str:n+e.slice(t,r).replace(/\t/g,"→")+A,pos:s-t+n.length}}function padStart(e,t){return Uo.repeat(" ",t-e.length)+e}function makeSnippet(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var r=/\r?\n|\r|\0/g;var s=[0];var o=[];var n;var A=-1;while(n=r.exec(e.buffer)){o.push(n.index);s.push(n.index+n[0].length);if(e.position<=n.index&&A<0){A=s.length-2}}if(A<0)A=s.length-1;var i="",a,c;var l=Math.min(e.line+t.linesAfter,o.length).toString().length;var u=t.maxLength-(t.indent+l+3);for(a=1;a<=t.linesBefore;a++){if(A-a<0)break;c=getLine(e.buffer,s[A-a],o[A-a],e.position-(s[A]-s[A-a]),u);i=Uo.repeat(" ",t.indent)+padStart((e.line-a+1).toString(),l)+" | "+c.str+"\n"+i}c=getLine(e.buffer,s[A],o[A],e.position,u);i+=Uo.repeat(" ",t.indent)+padStart((e.line+1).toString(),l)+" | "+c.str+"\n";i+=Uo.repeat("-",t.indent+l+3+c.pos)+"^"+"\n";for(a=1;a<=t.linesAfter;a++){if(A+a>=o.length)break;c=getLine(e.buffer,s[A+a],o[A+a],e.position-(s[A]-s[A+a]),u);i+=Uo.repeat(" ",t.indent)+padStart((e.line+a+1).toString(),l)+" | "+c.str+"\n"}return i.replace(/\n$/,"")}var Mo=makeSnippet;var Lo=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var Go=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))}))}return t}function Type$1(e,t){t=t||{};Object.keys(t).forEach((function(t){if(Lo.indexOf(t)===-1){throw new No('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(Go.indexOf(this.kind)===-1){throw new No('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}var _o=Type$1;function compileList(e,t){var r=[];e[t].forEach((function(e){var t=r.length;r.forEach((function(r,s){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t=s}}));r[t]=e}));return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function collectType(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,r=arguments.length;t<r;t+=1){arguments[t].forEach(collectType)}return e}function Schema$1(e){return this.extend(e)}Schema$1.prototype.extend=function extend(e){var t=[];var r=[];if(e instanceof _o){r.push(e)}else if(Array.isArray(e)){r=r.concat(e)}else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit))){if(e.implicit)t=t.concat(e.implicit);if(e.explicit)r=r.concat(e.explicit)}else{throw new No("Schema.extend argument should be a Type, [ Type ], "+"or a schema definition ({ implicit: [...], explicit: [...] })")}t.forEach((function(e){if(!(e instanceof _o)){throw new No("Specified list of YAML types (or a single Type object) contains a non-Type object.")}if(e.loadKind&&e.loadKind!=="scalar"){throw new No("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}if(e.multi){throw new No("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}}));r.forEach((function(e){if(!(e instanceof _o)){throw new No("Specified list of YAML types (or a single Type object) contains a non-Type object.")}}));var s=Object.create(Schema$1.prototype);s.implicit=(this.implicit||[]).concat(t);s.explicit=(this.explicit||[]).concat(r);s.compiledImplicit=compileList(s,"implicit");s.compiledExplicit=compileList(s,"explicit");s.compiledTypeMap=compileMap(s.compiledImplicit,s.compiledExplicit);return s};var Oo=Schema$1;var Ho=new _o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}});var xo=new _o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}});var Po=new _o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}});var Yo=new Oo({explicit:[Ho,xo,Po]});function resolveYamlNull(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}var Jo=new _o("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function resolveYamlBoolean(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Vo=new _o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var t=e.length,r=0,s=false,o;if(!t)return false;o=e[r];if(o==="-"||o==="+"){o=e[++r]}if(o==="0"){if(r+1===t)return true;o=e[++r];if(o==="b"){r++;for(;r<t;r++){o=e[r];if(o==="_")continue;if(o!=="0"&&o!=="1")return false;s=true}return s&&o!=="_"}if(o==="x"){r++;for(;r<t;r++){o=e[r];if(o==="_")continue;if(!isHexCode(e.charCodeAt(r)))return false;s=true}return s&&o!=="_"}if(o==="o"){r++;for(;r<t;r++){o=e[r];if(o==="_")continue;if(!isOctCode(e.charCodeAt(r)))return false;s=true}return s&&o!=="_"}}if(o==="_")return false;for(;r<t;r++){o=e[r];if(o==="_")continue;if(!isDecCode(e.charCodeAt(r))){return false}s=true}if(!s||o==="_")return false;return true}function constructYamlInteger(e){var t=e,r=1,s;if(t.indexOf("_")!==-1){t=t.replace(/_/g,"")}s=t[0];if(s==="-"||s==="+"){if(s==="-")r=-1;t=t.slice(1);s=t[0]}if(t==="0")return 0;if(s==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function isInteger(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1===0&&!Uo.isNegativeZero(e))}var Wo=new _o("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});var qo=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!qo.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var t,r;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return r*parseFloat(t,10)}var jo=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(Uo.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return jo.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Uo.isNegativeZero(e))}var zo=new _o("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});var Zo=Yo.extend({implicit:[Jo,Vo,Wo,zo]});var Ko=Zo;var Xo=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var $o=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(Xo.exec(e)!==null)return true;if($o.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var t,r,s,o,n,A,i,a=0,c=null,l,u,g;t=Xo.exec(e);if(t===null)t=$o.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];s=+t[2]-1;o=+t[3];if(!t[4]){return new Date(Date.UTC(r,s,o))}n=+t[4];A=+t[5];i=+t[6];if(t[7]){a=t[7].slice(0,3);while(a.length<3){a+="0"}a=+a}if(t[9]){l=+t[10];u=+(t[11]||0);c=(l*60+u)*6e4;if(t[9]==="-")c=-c}g=new Date(Date.UTC(r,s,o,n,A,i,a));if(c)g.setTime(g.getTime()-c);return g}function representYamlTimestamp(e){return e.toISOString()}var en=new _o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(e){return e==="<<"||e===null}var tn=new _o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});var rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var t,r,s=0,o=e.length,n=rn;for(r=0;r<o;r++){t=n.indexOf(e.charAt(r));if(t>64)continue;if(t<0)return false;s+=6}return s%8===0}function constructYamlBinary(e){var t,r,s=e.replace(/[\r\n=]/g,""),o=s.length,n=rn,A=0,i=[];for(t=0;t<o;t++){if(t%4===0&&t){i.push(A>>16&255);i.push(A>>8&255);i.push(A&255)}A=A<<6|n.indexOf(s.charAt(t))}r=o%4*6;if(r===0){i.push(A>>16&255);i.push(A>>8&255);i.push(A&255)}else if(r===18){i.push(A>>10&255);i.push(A>>2&255)}else if(r===12){i.push(A>>4&255)}return new Uint8Array(i)}function representYamlBinary(e){var t="",r=0,s,o,n=e.length,A=rn;for(s=0;s<n;s++){if(s%3===0&&s){t+=A[r>>18&63];t+=A[r>>12&63];t+=A[r>>6&63];t+=A[r&63]}r=(r<<8)+e[s]}o=n%3;if(o===0){t+=A[r>>18&63];t+=A[r>>12&63];t+=A[r>>6&63];t+=A[r&63]}else if(o===2){t+=A[r>>10&63];t+=A[r>>4&63];t+=A[r<<2&63];t+=A[64]}else if(o===1){t+=A[r>>2&63];t+=A[r<<4&63];t+=A[64];t+=A[64]}return t}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var sn=new _o("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});var on=Object.prototype.hasOwnProperty;var nn=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,s,o,n,A,i=e;for(r=0,s=i.length;r<s;r+=1){o=i[r];A=false;if(nn.call(o)!=="[object Object]")return false;for(n in o){if(on.call(o,n)){if(!A)A=true;else return false}}if(!A)return false;if(t.indexOf(n)===-1)t.push(n);else return false}return true}function constructYamlOmap(e){return e!==null?e:[]}var An=new _o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});var an=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,s,o,n,A=e;n=new Array(A.length);for(t=0,r=A.length;t<r;t+=1){s=A[t];if(an.call(s)!=="[object Object]")return false;o=Object.keys(s);if(o.length!==1)return false;n[t]=[o[0],s[o[0]]]}return true}function constructYamlPairs(e){if(e===null)return[];var t,r,s,o,n,A=e;n=new Array(A.length);for(t=0,r=A.length;t<r;t+=1){s=A[t];o=Object.keys(s);n[t]=[o[0],s[o[0]]]}return n}var cn=new _o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});var ln=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(ln.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}var un=new _o("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});var gn=Ko.extend({implicit:[en,tn],explicit:[sn,An,cn,un]});var hn=Object.prototype.hasOwnProperty;var dn=1;var En=2;var pn=3;var fn=4;var Cn=1;var Qn=2;var Bn=3;var In=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var mn=/[\x85\u2028\u2029]/;var wn=/[,\[\]\{\}]/;var yn=/^(?:!|!!|![a-z\-]+!)$/i;var bn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
6":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function setProperty(e,t,r){if(t==="__proto__"){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}}var kn=new Array(256);var Tn=new Array(256);for(var Rn=0;Rn<256;Rn++){kn[Rn]=simpleEscapeSequence(Rn)?1:0;Tn[Rn]=simpleEscapeSequence(Rn)}function State$1(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||gn;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=Mo(r);return new No(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var Dn={YAML:function handleYamlDirective(e,t,r){var s,o,n;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}s=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(s===null){throwError(e,"ill-formed argument of the YAML directive")}o=parseInt(s[1],10);n=parseInt(s[2],10);if(o!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=n<2;if(n!==1&&n!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var s,o;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}s=r[0];o=r[1];if(!yn.test(s)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(hn.call(e.tagMap,s)){throwError(e,'there is a previously declared suffix for "'+s+'" tag handle')}if(!bn.test(o)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{o=decodeURIComponent(o)}catch(t){throwError(e,"tag prefix is malformed: "+o)}e.tagMap[s]=o}};function captureSegment(e,t,r,s){var o,n,A,i;if(t<r){i=e.input.slice(t,r);if(s){for(o=0,n=i.length;o<n;o+=1){A=i.charCodeAt(o);if(!(A===9||32<=A&&A<=1114111)){throwError(e,"expected valid JSON character")}}}else if(In.test(i)){throwError(e,"the stream contains non-printable characters")}e.result+=i}}function mergeMappings(e,t,r,s){var o,n,A,i;if(!Uo.isObject(r)){throwError(e,"cannot merge mappings; the provided source object is unacceptable")}o=Object.keys(r);for(A=0,i=o.length;A<i;A+=1){n=o[A];if(!hn.call(t,n)){setProperty(t,n,r[n]);s[n]=true}}}function storeMappingPair(e,t,r,s,o,n,A,i,a){var c,l;if(Array.isArray(o)){o=Array.prototype.slice.call(o);for(c=0,l=o.length;c<l;c+=1){if(Array.isArray(o[c])){throwError(e,"nested arrays are not supported inside keys")}if(typeof o==="object"&&_class(o[c])==="[object Object]"){o[c]="[object Object]"}}}if(typeof o==="object"&&_class(o)==="[object Object]"){o="[object Object]"}o=String(o);if(t===null){t={}}if(s==="tag:yaml.org,2002:merge"){if(Array.isArray(n)){for(c=0,l=n.length;c<l;c+=1){mergeMappings(e,t,n[c],r)}}else{mergeMappings(e,t,n,r)}}else{if(!e.json&&!hn.call(r,o)&&hn.call(t,o)){e.line=A||e.line;e.lineStart=i||e.lineStart;e.position=a||e.position;throwError(e,"duplicated mapping key")}setProperty(t,o,n);delete r[o]}return t}function readLineBreak(e){var t;t=e.input.charCodeAt(e.position);if(t===10){e.position++}else if(t===13){e.position++;if(e.input.charCodeAt(e.position)===10){e.position++}}else{throwError(e,"a line break is expected")}e.line+=1;e.lineStart=e.position;e.firstTabInLine=-1}function skipSeparationSpace(e,t,r){var s=0,o=e.input.charCodeAt(e.position);while(o!==0){while(is_WHITE_SPACE(o)){if(o===9&&e.firstTabInLine===-1){e.firstTabInLine=e.position}o=e.input.charCodeAt(++e.position)}if(t&&o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==10&&o!==13&&o!==0)}if(is_EOL(o)){readLineBreak(e);o=e.input.charCodeAt(e.position);s++;e.lineIndent=0;while(o===32){e.lineIndent++;o=e.input.charCodeAt(++e.position)}}else{break}}if(r!==-1&&s!==0&&e.lineIndent<r){throwWarning(e,"deficient indentation")}return s}function testDocumentSeparator(e){var t=e.position,r;r=e.input.charCodeAt(t);if((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)){t+=3;r=e.input.charCodeAt(t);if(r===0||is_WS_OR_EOL(r)){return true}}return false}function writeFoldedLines(e,t){if(t===1){e.result+=" "}else if(t>1){e.result+=Uo.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var s,o,n,A,i,a,c,l,u=e.kind,g=e.result,h;h=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(h)||is_FLOW_INDICATOR(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96){return false}if(h===63||h===45){o=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(o)||r&&is_FLOW_INDICATOR(o)){return false}}e.kind="scalar";e.result="";n=A=e.position;i=false;while(h!==0){if(h===58){o=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(o)||r&&is_FLOW_INDICATOR(o)){break}}else if(h===35){s=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(s)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(h)){break}else if(is_EOL(h)){a=e.line;c=e.lineStart;l=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){i=true;h=e.input.charCodeAt(e.position);continue}else{e.position=A;e.line=a;e.lineStart=c;e.lineIndent=l;break}}if(i){captureSegment(e,n,A,false);writeFoldedLines(e,e.line-a);n=A=e.position;i=false}if(!is_WHITE_SPACE(h)){A=e.position+1}h=e.input.charCodeAt(++e.position)}captureSegment(e,n,A,false);if(e.result){return true}e.kind=u;e.result=g;return false}function readSingleQuotedScalar(e,t){var r,s,o;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;s=o=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,s,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){s=e.position;e.position++;o=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,s,o,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));s=o=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;o=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,s,o,n,A,i;i=e.input.charCodeAt(e.position);if(i!==34){return false}e.kind="scalar";e.result="";e.position++;r=s=e.position;while((i=e.input.charCodeAt(e.position))!==0){if(i===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(i===92){captureSegment(e,r,e.position,true);i=e.input.charCodeAt(++e.position);if(is_EOL(i)){skipSeparationSpace(e,false,t)}else if(i<256&&kn[i]){e.result+=Tn[i];e.position++}else if((A=escapedHexLen(i))>0){o=A;n=0;for(;o>0;o--){i=e.input.charCodeAt(++e.position);if((A=fromHexCode(i))>=0){n=(n<<4)+A}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(n);e.position++}else{throwError(e,"unknown escape sequence")}r=s=e.position}else if(is_EOL(i)){captureSegment(e,r,s,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=s=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;s=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,s,o,n,A=e.tag,i,a=e.anchor,c,l,u,g,h,d=Object.create(null),E,p,f,C;C=e.input.charCodeAt(e.position);if(C===91){l=93;h=false;i=[]}else if(C===123){l=125;h=true;i={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=i}C=e.input.charCodeAt(++e.position);while(C!==0){skipSeparationSpace(e,true,t);C=e.input.charCodeAt(e.position);if(C===l){e.position++;e.tag=A;e.anchor=a;e.kind=h?"mapping":"sequence";e.result=i;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(C===44){throwError(e,"expected the node content, but found ','")}p=E=f=null;u=g=false;if(C===63){c=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(c)){u=g=true;e.position++;skipSeparationSpace(e,true,t)}}s=e.line;o=e.lineStart;n=e.position;composeNode(e,t,dn,false,true);p=e.tag;E=e.result;skipSeparationSpace(e,true,t);C=e.input.charCodeAt(e.position);if((g||e.line===s)&&C===58){u=true;C=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,dn,false,true);f=e.result}if(h){storeMappingPair(e,i,d,p,E,f,s,o,n)}else if(u){i.push(storeMappingPair(e,null,d,p,E,f,s,o,n))}else{i.push(E)}skipSeparationSpace(e,true,t);C=e.input.charCodeAt(e.position);if(C===44){r=true;C=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,s,o=Cn,n=false,A=false,i=t,a=0,c=false,l,u;u=e.input.charCodeAt(e.position);if(u===124){s=false}else if(u===62){s=true}else{return false}e.kind="scalar";e.result="";while(u!==0){u=e.input.charCodeAt(++e.position);if(u===43||u===45){if(Cn===o){o=u===43?Bn:Qn}else{throwError(e,"repeat of a chomping mode identifier")}}else if((l=fromDecimalCode(u))>=0){if(l===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!A){i=t+l-1;A=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(u)){do{u=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(u));if(u===35){do{u=e.input.charCodeAt(++e.position)}while(!is_EOL(u)&&u!==0)}}while(u!==0){readLineBreak(e);e.lineIndent=0;u=e.input.charCodeAt(e.position);while((!A||e.lineIndent<i)&&u===32){e.lineIndent++;u=e.input.charCodeAt(++e.position)}if(!A&&e.lineIndent>i){i=e.lineIndent}if(is_EOL(u)){a++;continue}if(e.lineIndent<i){if(o===Bn){e.result+=Uo.repeat("\n",n?1+a:a)}else if(o===Cn){if(n){e.result+="\n"}}break}if(s){if(is_WHITE_SPACE(u)){c=true;e.result+=Uo.repeat("\n",n?1+a:a)}else if(c){c=false;e.result+=Uo.repeat("\n",a+1)}else if(a===0){if(n){e.result+=" "}}else{e.result+=Uo.repeat("\n",a)}}else{e.result+=Uo.repeat("\n",n?1+a:a)}n=true;A=true;a=0;r=e.position;while(!is_EOL(u)&&u!==0){u=e.input.charCodeAt(++e.position)}captureSegment(e,r,e.position,false)}return true}function readBlockSequence(e,t){var r,s=e.tag,o=e.anchor,n=[],A,i=false,a;if(e.firstTabInLine!==-1)return false;if(e.anchor!==null){e.anchorMap[e.anchor]=n}a=e.input.charCodeAt(e.position);while(a!==0){if(e.firstTabInLine!==-1){e.position=e.firstTabInLine;throwError(e,"tab characters must not be used in indentation")}if(a!==45){break}A=e.input.charCodeAt(e.position+1);if(!is_WS_OR_EOL(A)){break}i=true;e.position++;if(skipSeparationSpace(e,true,-1)){if(e.lineIndent<=t){n.push(null);a=e.input.charCodeAt(e.position);continue}}r=e.line;composeNode(e,t,pn,false,true);n.push(e.result);skipSeparationSpace(e,true,-1);a=e.input.charCodeAt(e.position);if((e.line===r||e.lineIndent>t)&&a!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndent<t){break}}if(i){e.tag=s;e.anchor=o;e.kind="sequence";e.result=n;return true}return false}function readBlockMapping(e,t,r){var s,o,n,A,i,a,c=e.tag,l=e.anchor,u={},g=Object.create(null),h=null,d=null,E=null,p=false,f=false,C;if(e.firstTabInLine!==-1)return false;if(e.anchor!==null){e.anchorMap[e.anchor]=u}C=e.input.charCodeAt(e.position);while(C!==0){if(!p&&e.firstTabInLine!==-1){e.position=e.firstTabInLine;throwError(e,"tab characters must not be used in indentation")}s=e.input.charCodeAt(e.position+1);n=e.line;if((C===63||C===58)&&is_WS_OR_EOL(s)){if(C===63){if(p){storeMappingPair(e,u,g,h,d,null,A,i,a);h=d=E=null}f=true;p=true;o=true}else if(p){p=false;o=true}else{throwError(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}e.position+=1;C=s}else{A=e.line;i=e.lineStart;a=e.position;if(!composeNode(e,r,En,false,true)){break}if(e.line===n){C=e.input.charCodeAt(e.position);while(is_WHITE_SPACE(C)){C=e.input.charCodeAt(++e.position)}if(C===58){C=e.input.charCodeAt(++e.position);if(!is_WS_OR_EOL(C)){throwError(e,"a whitespace character is expected after the key-value separator within a block mapping")}if(p){storeMappingPair(e,u,g,h,d,null,A,i,a);h=d=E=null}f=true;p=false;o=false;h=e.tag;d=e.result}else if(f){throwError(e,"can not read an implicit mapping pair; a colon is missed")}else{e.tag=c;e.anchor=l;return true}}else if(f){throwError(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{e.tag=c;e.anchor=l;return true}}if(e.line===n||e.lineIndent>t){if(p){A=e.line;i=e.lineStart;a=e.position}if(composeNode(e,t,fn,true,o)){if(p){d=e.result}else{E=e.result}}if(!p){storeMappingPair(e,u,g,h,d,E,A,i,a);h=d=E=null}skipSeparationSpace(e,true,-1);C=e.input.charCodeAt(e.position)}if((e.line===n||e.lineIndent>t)&&C!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndent<t){break}}if(p){storeMappingPair(e,u,g,h,d,null,A,i,a)}if(f){e.tag=c;e.anchor=l;e.kind="mapping";e.result=u}return f}function readTagProperty(e){var t,r=false,s=false,o,n,A;A=e.input.charCodeAt(e.position);if(A!==33)return false;if(e.tag!==null){throwError(e,"duplication of a tag property")}A=e.input.charCodeAt(++e.position);if(A===60){r=true;A=e.input.charCodeAt(++e.position)}else if(A===33){s=true;o="!!";A=e.input.charCodeAt(++e.position)}else{o="!"}t=e.position;if(r){do{A=e.input.charCodeAt(++e.position)}while(A!==0&&A!==62);if(e.position<e.length){n=e.input.slice(t,e.position);A=e.input.charCodeAt(++e.position)}else{throwError(e,"unexpected end of the stream within a verbatim tag")}}else{while(A!==0&&!is_WS_OR_EOL(A)){if(A===33){if(!s){o=e.input.slice(t-1,e.position+1);if(!yn.test(o)){throwError(e,"named tag handle cannot contain such characters")}s=true;t=e.position+1}else{throwError(e,"tag suffix cannot contain exclamation marks")}}A=e.input.charCodeAt(++e.position)}n=e.input.slice(t,e.position);if(wn.test(n)){throwError(e,"tag suffix cannot contain flow indicator characters")}}if(n&&!bn.test(n)){throwError(e,"tag name cannot contain such characters: "+n)}try{n=decodeURIComponent(n)}catch(t){throwError(e,"tag name is malformed: "+n)}if(r){e.tag=n}else if(hn.call(e.tagMap,o)){e.tag=e.tagMap[o]+n}else if(o==="!"){e.tag="!"+n}else if(o==="!!"){e.tag="tag:yaml.org,2002:"+n}else{throwError(e,'undeclared tag handle "'+o+'"')}return true}function readAnchorProperty(e){var t,r;r=e.input.charCodeAt(e.position);if(r!==38)return false;if(e.anchor!==null){throwError(e,"duplication of an anchor property")}r=e.input.charCodeAt(++e.position);t=e.position;while(r!==0&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r)){r=e.input.charCodeAt(++e.position)}if(e.position===t){throwError(e,"name of an anchor node must contain at least one character")}e.anchor=e.input.slice(t,e.position);return true}function readAlias(e){var t,r,s;s=e.input.charCodeAt(e.position);if(s!==42)return false;s=e.input.charCodeAt(++e.position);t=e.position;while(s!==0&&!is_WS_OR_EOL(s)&&!is_FLOW_INDICATOR(s)){s=e.input.charCodeAt(++e.position)}if(e.position===t){throwError(e,"name of an alias node must contain at least one character")}r=e.input.slice(t,e.position);if(!hn.call(e.anchorMap,r)){throwError(e,'unidentified alias "'+r+'"')}e.result=e.anchorMap[r];skipSeparationSpace(e,true,-1);return true}function composeNode(e,t,r,s,o){var n,A,i,a=1,c=false,l=false,u,g,h,d,E,p;if(e.listener!==null){e.listener("open",e)}e.tag=null;e.anchor=null;e.kind=null;e.result=null;n=A=i=fn===r||pn===r;if(s){if(skipSeparationSpace(e,true,-1)){c=true;if(e.lineIndent>t){a=1}else if(e.lineIndent===t){a=0}else if(e.lineIndent<t){a=-1}}}if(a===1){while(readTagProperty(e)||readAnchorProperty(e)){if(skipSeparationSpace(e,true,-1)){c=true;i=n;if(e.lineIndent>t){a=1}else if(e.lineIndent===t){a=0}else if(e.lineIndent<t){a=-1}}else{i=false}}}if(i){i=c||o}if(a===1||fn===r){if(dn===r||En===r){E=t}else{E=t+1}p=e.position-e.lineStart;if(a===1){if(i&&(readBlockSequence(e,p)||readBlockMapping(e,p,E))||readFlowCollection(e,E)){l=true}else{if(A&&readBlockScalar(e,E)||readSingleQuotedScalar(e,E)||readDoubleQuotedScalar(e,E)){l=true}else if(readAlias(e)){l=true;if(e.tag!==null||e.anchor!==null){throwError(e,"alias node should not have any properties")}}else if(readPlainScalar(e,E,dn===r)){l=true;if(e.tag===null){e.tag="?"}}if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else if(a===0){l=i&&readBlockSequence(e,p)}}if(e.tag===null){if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}else if(e.tag==="?"){if(e.result!==null&&e.kind!=="scalar"){throwError(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"')}for(u=0,g=e.implicitTypes.length;u<g;u+=1){d=e.implicitTypes[u];if(d.resolve(e.result)){e.result=d.construct(e.result);e.tag=d.tag;if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}break}}}else if(e.tag!=="!"){if(hn.call(e.typeMap[e.kind||"fallback"],e.tag)){d=e.typeMap[e.kind||"fallback"][e.tag]}else{d=null;h=e.typeMap.multi[e.kind||"fallback"];for(u=0,g=h.length;u<g;u+=1){if(e.tag.slice(0,h[u].tag.length)===h[u].tag){d=h[u];break}}}if(!d){throwError(e,"unknown tag !<"+e.tag+">")}if(e.result!==null&&d.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"')}if(!d.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=d.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||l}function readDocument(e){var t=e.position,r,s,o,n=false,A;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((A=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);A=e.input.charCodeAt(e.position);if(e.lineIndent>0||A!==37){break}n=true;A=e.input.charCodeAt(++e.position);r=e.position;while(A!==0&&!is_WS_OR_EOL(A)){A=e.input.charCodeAt(++e.position)}s=e.input.slice(r,e.position);o=[];if(s.length<1){throwError(e,"directive name must not be less than one character in length")}while(A!==0){while(is_WHITE_SPACE(A)){A=e.input.charCodeAt(++e.position)}if(A===35){do{A=e.input.charCodeAt(++e.position)}while(A!==0&&!is_EOL(A));break}if(is_EOL(A))break;r=e.position;while(A!==0&&!is_WS_OR_EOL(A)){A=e.input.charCodeAt(++e.position)}o.push(e.input.slice(r,e.position))}if(A!==0)readLineBreak(e);if(hn.call(Dn,s)){Dn[s](e,s,o)}else{throwWarning(e,'unknown document directive "'+s+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(n){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,fn,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&mn.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position<e.length-1){throwError(e,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(e,t){e=String(e);t=t||{};if(e.length!==0){if(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13){e+="\n"}if(e.charCodeAt(0)===65279){e=e.slice(1)}}var r=new State$1(e,t);var s=e.indexOf("\0");if(s!==-1){r.position=s;throwError(r,"null byte is not allowed in input")}r.input+="\0";while(r.input.charCodeAt(r.position)===32){r.lineIndent+=1;r.position+=1}while(r.position<r.length-1){readDocument(r)}return r.documents}function loadAll$1(e,t,r){if(t!==null&&typeof t==="object"&&typeof r==="undefined"){r=t;t=null}var s=loadDocuments(e,r);if(typeof t!=="function"){return s}for(var o=0,n=s.length;o<n;o+=1){t(s[o])}}function load$1(e,t){var r=loadDocuments(e,t);if(r.length===0){return undefined}else if(r.length===1){return r[0]}throw new No("expected a single document in the stream, but found more")}var Sn=loadAll$1;var Fn=load$1;var vn={loadAll:Sn,load:Fn};var Un=Object.prototype.toString;var Nn=Object.prototype.hasOwnProperty;var Mn=65279;var Ln=9;var Gn=10;var _n=13;var On=32;var Hn=33;var xn=34;var Pn=35;var Yn=37;var Jn=38;var Vn=39;var Wn=42;var qn=44;var jn=45;var zn=58;var Zn=61;var Kn=62;var Xn=63;var $n=64;var eA=91;var tA=93;var rA=96;var sA=123;var oA=124;var nA=125;var AA={};AA[0]="\\0";AA[7]="\\a";AA[8]="\\b";AA[9]="\\t";AA[10]="\\n";AA[11]="\\v";AA[12]="\\f";AA[13]="\\r";AA[27]="\\e";AA[34]='\\"';AA[92]="\\\\";AA[133]="\\N";AA[160]="\\_";AA[8232]="\\L";AA[8233]="\\P";var iA=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var aA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,t){var r,s,o,n,A,i,a;if(t===null)return{};r={};s=Object.keys(t);for(o=0,n=s.length;o<n;o+=1){A=s[o];i=String(t[A]);if(A.slice(0,2)==="!!"){A="tag:yaml.org,2002:"+A.slice(2)}a=e.compiledTypeMap["fallback"][A];if(a&&Nn.call(a.styleAliases,i)){i=a.styleAliases[i]}r[A]=i}return r}function encodeHex(e){var t,r,s;t=e.toString(16).toUpperCase();if(e<=255){r="x";s=2}else if(e<=65535){r="u";s=4}else if(e<=4294967295){r="U";s=8}else{throw new No("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+r+Uo.repeat("0",s-t.length)+t}var cA=1,lA=2;function State(e){this.schema=e["schema"]||gn;this.indent=Math.max(1,e["indent"]||2);this.noArrayIndent=e["noArrayIndent"]||false;this.skipInvalid=e["skipInvalid"]||false;this.flowLevel=Uo.isNothing(e["flowLevel"])?-1:e["flowLevel"];this.styleMap=compileStyleMap(this.schema,e["styles"]||null);this.sortKeys=e["sortKeys"]||false;this.lineWidth=e["lineWidth"]||80;this.noRefs=e["noRefs"]||false;this.noCompatMode=e["noCompatMode"]||false;this.condenseFlow=e["condenseFlow"]||false;this.quotingType=e["quotingType"]==='"'?lA:cA;this.forceQuotes=e["forceQuotes"]||false;this.replacer=typeof e["replacer"]==="function"?e["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(e,t){var r=Uo.repeat(" ",t),s=0,o=-1,n="",A,i=e.length;while(s<i){o=e.indexOf("\n",s);if(o===-1){A=e.slice(s);s=i}else{A=e.slice(s,o+1);s=o+1}if(A.length&&A!=="\n")n+=r;n+=A}return n}function generateNextLine(e,t){return"\n"+Uo.repeat(" ",e.indent*t)}function testImplicitResolving(e,t){var r,s,o;for(r=0,s=e.implicitTypes.length;r<s;r+=1){o=e.implicitTypes[r];if(o.resolve(t)){return true}}return false}function isWhitespace(e){return e===On||e===Ln}function isPrintable(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Mn||65536<=e&&e<=1114111}function isNsCharOrWhitespace(e){return isPrintable(e)&&e!==Mn&&e!==_n&&e!==Gn}function isPlainSafe(e,t,r){var s=isNsCharOrWhitespace(e);var o=s&&!isWhitespace(e);return(r?s:s&&e!==qn&&e!==eA&&e!==tA&&e!==sA&&e!==nA)&&e!==Pn&&!(t===zn&&!o)||isNsCharOrWhitespace(t)&&!isWhitespace(t)&&e===Pn||t===zn&&o}function isPlainSafeFirst(e){return isPrintable(e)&&e!==Mn&&!isWhitespace(e)&&e!==jn&&e!==Xn&&e!==zn&&e!==qn&&e!==eA&&e!==tA&&e!==sA&&e!==nA&&e!==Pn&&e!==Jn&&e!==Wn&&e!==Hn&&e!==oA&&e!==Zn&&e!==Kn&&e!==Vn&&e!==xn&&e!==Yn&&e!==$n&&e!==rA}function isPlainSafeLast(e){return!isWhitespace(e)&&e!==zn}function codePointAt(e,t){var r=e.charCodeAt(t),s;if(r>=55296&&r<=56319&&t+1<e.length){s=e.charCodeAt(t+1);if(s>=56320&&s<=57343){return(r-55296)*1024+s-56320+65536}}return r}function needIndentIndicator(e){var t=/^\n* /;return t.test(e)}var uA=1,gA=2,hA=3,dA=4,EA=5;function chooseScalarStyle(e,t,r,s,o,n,A,i){var a;var c=0;var l=null;var u=false;var g=false;var h=s!==-1;var d=-1;var E=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||A){for(a=0;a<e.length;c>=65536?a+=2:a++){c=codePointAt(e,a);if(!isPrintable(c)){return EA}E=E&&isPlainSafe(c,l,i);l=c}}else{for(a=0;a<e.length;c>=65536?a+=2:a++){c=codePointAt(e,a);if(c===Gn){u=true;if(h){g=g||a-d-1>s&&e[d+1]!==" ";d=a}}else if(!isPrintable(c)){return EA}E=E&&isPlainSafe(c,l,i);l=c}g=g||h&&(a-d-1>s&&e[d+1]!==" ")}if(!u&&!g){if(E&&!A&&!o(e)){return uA}return n===lA?EA:gA}if(r>9&&needIndentIndicator(e)){return EA}if(!A){return g?dA:hA}return n===lA?EA:gA}function writeScalar(e,t,r,s,o){e.dump=function(){if(t.length===0){return e.quotingType===lA?'""':"''"}if(!e.noCompatMode){if(iA.indexOf(t)!==-1||aA.test(t)){return e.quotingType===lA?'"'+t+'"':"'"+t+"'"}}var n=e.indent*Math.max(1,r);var A=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n);var i=s||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,i,e.indent,A,testAmbiguity,e.quotingType,e.forceQuotes&&!s,o)){case uA:return t;case gA:return"'"+t.replace(/'/g,"''")+"'";case hA:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,n));case dA:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,A),n));case EA:return'"'+escapeString(t)+'"';default:throw new No("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var s=e[e.length-1]==="\n";var o=s&&(e[e.length-2]==="\n"||e==="\n");var n=o?"+":s?"":"-";return r+n+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var s=function(){var s=e.indexOf("\n");s=s!==-1?s:e.length;r.lastIndex=s;return foldLine(e.slice(0,s),t)}();var o=e[0]==="\n"||e[0]===" ";var n;var A;while(A=r.exec(e)){var i=A[1],a=A[2];n=a[0]===" ";s+=i+(!o&&!n&&a!==""?"\n":"")+foldLine(a,t);o=n}return s}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var s;var o=0,n,A=0,i=0;var a="";while(s=r.exec(e)){i=s.index;if(i-o>t){n=A>o?A:i;a+="\n"+e.slice(o,n);o=n+1}A=i}a+="\n";if(e.length-o>t&&A>o){a+=e.slice(o,A)+"\n"+e.slice(A+1)}else{a+=e.slice(o)}return a.slice(1)}function escapeString(e){var t="";var r=0;var s;for(var o=0;o<e.length;r>=65536?o+=2:o++){r=codePointAt(e,o);s=AA[r];if(!s&&isPrintable(r)){t+=e[o];if(r>=65536)t+=e[o+1]}else{t+=s||encodeHex(r)}}return t}function writeFlowSequence(e,t,r){var s="",o=e.tag,n,A,i;for(n=0,A=r.length;n<A;n+=1){i=r[n];if(e.replacer){i=e.replacer.call(r,String(n),i)}if(writeNode(e,t,i,false,false)||typeof i==="undefined"&&writeNode(e,t,null,false,false)){if(s!=="")s+=","+(!e.condenseFlow?" ":"");s+=e.dump}}e.tag=o;e.dump="["+s+"]"}function writeBlockSequence(e,t,r,s){var o="",n=e.tag,A,i,a;for(A=0,i=r.length;A<i;A+=1){a=r[A];if(e.replacer){a=e.replacer.call(r,String(A),a)}if(writeNode(e,t+1,a,true,true,false,true)||typeof a==="undefined"&&writeNode(e,t+1,null,true,true,false,true)){if(!s||o!==""){o+=generateNextLine(e,t)}if(e.dump&&Gn===e.dump.charCodeAt(0)){o+="-"}else{o+="- "}o+=e.dump}}e.tag=n;e.dump=o||"[]"}function writeFlowMapping(e,t,r){var s="",o=e.tag,n=Object.keys(r),A,i,a,c,l;for(A=0,i=n.length;A<i;A+=1){l="";if(s!=="")l+=", ";if(e.condenseFlow)l+='"';a=n[A];c=r[a];if(e.replacer){c=e.replacer.call(r,a,c)}if(!writeNode(e,t,a,false,false)){continue}if(e.dump.length>1024)l+="? ";l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,c,false,false)){continue}l+=e.dump;s+=l}e.tag=o;e.dump="{"+s+"}"}function writeBlockMapping(e,t,r,s){var o="",n=e.tag,A=Object.keys(r),i,a,c,l,u,g;if(e.sortKeys===true){A.sort()}else if(typeof e.sortKeys==="function"){A.sort(e.sortKeys)}else if(e.sortKeys){throw new No("sortKeys must be a boolean or a function")}for(i=0,a=A.length;i<a;i+=1){g="";if(!s||o!==""){g+=generateNextLine(e,t)}c=A[i];l=r[c];if(e.replacer){l=e.replacer.call(r,c,l)}if(!writeNode(e,t+1,c,true,true,true)){continue}u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024;if(u){if(e.dump&&Gn===e.dump.charCodeAt(0)){g+="?"}else{g+="? "}}g+=e.dump;if(u){g+=generateNextLine(e,t)}if(!writeNode(e,t+1,l,true,u)){continue}if(e.dump&&Gn===e.dump.charCodeAt(0)){g+=":"}else{g+=": "}g+=e.dump;o+=g}e.tag=n;e.dump=o||"{}"}function detectType(e,t,r){var s,o,n,A,i,a;o=r?e.explicitTypes:e.implicitTypes;for(n=0,A=o.length;n<A;n+=1){i=o[n];if((i.instanceOf||i.predicate)&&(!i.instanceOf||typeof t==="object"&&t instanceof i.instanceOf)&&(!i.predicate||i.predicate(t))){if(r){if(i.multi&&i.representName){e.tag=i.representName(t)}else{e.tag=i.tag}}else{e.tag="?"}if(i.represent){a=e.styleMap[i.tag]||i.defaultStyle;if(Un.call(i.represent)==="[object Function]"){s=i.represent(t,a)}else if(Nn.call(i.represent,a)){s=i.represent[a](t,a)}else{throw new No("!<"+i.tag+'> tag resolver accepts not "'+a+'" style')}e.dump=s}return true}}return false}function writeNode(e,t,r,s,o,n,A){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var i=Un.call(e.dump);var a=s;var c;if(s){s=e.flowLevel<0||e.flowLevel>t}var l=i==="[object Object]"||i==="[object Array]",u,g;if(l){u=e.duplicates.indexOf(r);g=u!==-1}if(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0){o=false}if(g&&e.usedDuplicates[u]){e.dump="*ref_"+u}else{if(l&&g&&!e.usedDuplicates[u]){e.usedDuplicates[u]=true}if(i==="[object Object]"){if(s&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,o);if(g){e.dump="&ref_"+u+e.dump}}else{writeFlowMapping(e,t,e.dump);if(g){e.dump="&ref_"+u+" "+e.dump}}}else if(i==="[object Array]"){if(s&&e.dump.length!==0){if(e.noArrayIndent&&!A&&t>0){writeBlockSequence(e,t-1,e.dump,o)}else{writeBlockSequence(e,t,e.dump,o)}if(g){e.dump="&ref_"+u+e.dump}}else{writeFlowSequence(e,t,e.dump);if(g){e.dump="&ref_"+u+" "+e.dump}}}else if(i==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,n,a)}}else if(i==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new No("unacceptable kind of an object to dump "+i)}if(e.tag!==null&&e.tag!=="?"){c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){c="!"+c}else if(c.slice(0,18)==="tag:yaml.org,2002:"){c="!!"+c.slice(18)}else{c="!<"+c+">"}e.dump=c+" "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],s=[],o,n;inspectNode(e,r,s);for(o=0,n=s.length;o<n;o+=1){t.duplicates.push(r[s[o]])}t.usedDuplicates=new Array(n)}function inspectNode(e,t,r){var s,o,n;if(e!==null&&typeof e==="object"){o=t.indexOf(e);if(o!==-1){if(r.indexOf(o)===-1){r.push(o)}}else{t.push(e);if(Array.isArray(e)){for(o=0,n=e.length;o<n;o+=1){inspectNode(e[o],t,r)}}else{s=Object.keys(e);for(o=0,n=s.length;o<n;o+=1){inspectNode(e[s[o]],t,r)}}}}}function dump$1(e,t){t=t||{};var r=new State(t);if(!r.noRefs)getDuplicateReferences(e,r);var s=e;if(r.replacer){s=r.replacer.call({"":s},"",s)}if(writeNode(r,0,s,true,true))return r.dump+"\n";return""}var pA=dump$1;var fA={dump:pA};function renamed(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+t+" instead, which is now safe by default.")}}var CA=_o;var QA=Oo;var BA=Yo;var IA=Zo;var mA=Ko;var wA=gn;var yA=vn.load;var bA=vn.loadAll;var kA=fA.dump;var TA=No;var RA={binary:sn,float:zo,map:Po,null:Jo,pairs:cn,set:un,timestamp:en,bool:Vo,int:Wo,merge:tn,omap:An,seq:xo,str:Ho};var DA=renamed("safeLoad","load");var SA=renamed("safeLoadAll","loadAll");var FA=renamed("safeDump","dump");var vA={Type:CA,Schema:QA,FAILSAFE_SCHEMA:BA,JSON_SCHEMA:IA,CORE_SCHEMA:mA,DEFAULT_SCHEMA:wA,load:yA,loadAll:bA,dump:kA,YAMLException:TA,types:RA,safeLoad:DA,safeLoadAll:SA,safeDump:FA};class Context{constructor(){var e,t,r;this.payload={};if(process.env.GITHUB_EVENT_PATH){if((0,i.existsSync)(process.env.GITHUB_EVENT_PATH)){this.payload=JSON.parse((0,i.readFileSync)(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}))}else{const e=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${e} does not exist${o.EOL}`)}}this.eventName=process.env.GITHUB_EVENT_NAME;this.sha=process.env.GITHUB_SHA;this.ref=process.env.GITHUB_REF;this.workflow=process.env.GITHUB_WORKFLOW;this.action=process.env.GITHUB_ACTION;this.actor=process.env.GITHUB_ACTOR;this.job=process.env.GITHUB_JOB;this.runAttempt=parseInt(process.env.GITHUB_RUN_ATTEMPT,10);this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10);this.runId=parseInt(process.env.GITHUB_RUN_ID,10);this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:`https://api.github.com`;this.serverUrl=(t=process.env.GITHUB_SERVER_URL)!==null&&t!==void 0?t:`https://github.com`;this.graphqlUrl=(r=process.env.GITHUB_GRAPHQL_URL)!==null&&r!==void 0?r:`https://api.github.com/graphql`}get issue(){const e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){const[e,t]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:t}}if(this.payload.repository){return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name}}throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}}var UA=__nccwpck_require__(9659);var NA=undefined&&undefined.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(s.next(e))}catch(e){o(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};function getAuthString(e,t){if(!e&&!t.auth){throw new Error("Parameter token or opts.auth is required")}else if(e&&t.auth){throw new Error("Parameters token and opts.auth may not both be specified")}return typeof t.auth==="string"?t.auth:`token ${e}`}function getProxyAgent(e){const t=new UA.HttpClient;return t.getAgent(e)}function getProxyAgentDispatcher(e){const t=new UA.HttpClient;return t.getAgentDispatcher(e)}function getProxyFetch(e){const t=getProxyAgentDispatcher(e);const proxyFetch=(e,r)=>NA(this,void 0,void 0,(function*(){return(0,g.fetch)(e,Object.assign(Object.assign({},r),{dispatcher:t}))}));return proxyFetch}function getApiBaseUrl(){return process.env["GITHUB_API_URL"]||"https://api.github.com"}function getUserAgent(){if(typeof navigator==="object"&&"userAgent"in navigator){return navigator.userAgent}if(typeof process==="object"&&process.version!==undefined){return`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`}return"<environment undetectable>"}function register(e,t,r,s){if(typeof r!=="function"){throw new Error("method for before hook must be a function")}if(!s){s={}}if(Array.isArray(t)){return t.reverse().reduce(((t,r)=>register.bind(null,e,r,t,s)),r)()}return Promise.resolve().then((()=>{if(!e.registry[t]){return r(s)}return e.registry[t].reduce(((e,t)=>t.hook.bind(null,e,s)),r)()}))}function addHook(e,t,r,s){const o=s;if(!e.registry[r]){e.registry[r]=[]}if(t==="before"){s=(e,t)=>Promise.resolve().then(o.bind(null,t)).then(e.bind(null,t))}if(t==="after"){s=(e,t)=>{let r;return Promise.resolve().then(e.bind(null,t)).then((e=>{r=e;return o(r,t)})).then((()=>r))}}if(t==="error"){s=(e,t)=>Promise.resolve().then(e.bind(null,t)).catch((e=>o(e,t)))}e.registry[r].push({hook:s,orig:o})}function removeHook(e,t,r){if(!e.registry[t]){return}const s=e.registry[t].map((e=>e.orig)).indexOf(r);if(s===-1){return}e.registry[t].splice(s,1)}const MA=Function.bind;const LA=MA.bind(MA);function bindApi(e,t,r){const s=LA(removeHook,null).apply(null,r?[t,r]:[t]);e.api={remove:s};e.remove=s;["before","error","after","wrap"].forEach((s=>{const o=r?[t,s,r]:[t,s];e[s]=e.api[s]=LA(addHook,null).apply(null,o)}))}function Singular(){const e=Symbol("Singular");const t={registry:{}};const r=register.bind(null,t,e);bindApi(r,t,e);return r}function Collection(){const e={registry:{}};const t=register.bind(null,e);bindApi(t,e);return t}const GA={Singular:Singular,Collection:Collection};var _A="0.0.0-development";var OA=`octokit-endpoint.js/${_A} ${getUserAgent()}`;var HA={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":OA},mediaType:{format:""}};function dist_bundle_lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce(((t,r)=>{t[r.toLowerCase()]=e[r];return t}),{})}function isPlainObject(e){if(typeof e!=="object"||e===null)return false;if(Object.prototype.toString.call(e)!=="[object Object]")return false;const t=Object.getPrototypeOf(e);if(t===null)return true;const r=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r==="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(e)}function mergeDeep(e,t){const r=Object.assign({},e);Object.keys(t).forEach((s=>{if(isPlainObject(t[s])){if(!(s in e))Object.assign(r,{[s]:t[s]});else r[s]=mergeDeep(e[s],t[s])}else{Object.assign(r,{[s]:t[s]})}}));return r}function removeUndefinedProperties(e){for(const t in e){if(e[t]===void 0){delete e[t]}}return e}function dist_bundle_merge(e,t,r){if(typeof t==="string"){let[e,s]=t.split(" ");r=Object.assign(s?{method:e,url:s}:{url:e},r)}else{r=Object.assign({},t)}r.headers=dist_bundle_lowercaseKeys(r.headers);removeUndefinedProperties(r);removeUndefinedProperties(r.headers);const s=mergeDeep(e||{},r);if(r.url==="/graphql"){if(e&&e.mediaType.previews?.length){s.mediaType.previews=e.mediaType.previews.filter((e=>!s.mediaType.previews.includes(e))).concat(s.mediaType.previews)}s.mediaType.previews=(s.mediaType.previews||[]).map((e=>e.replace(/-preview/,"")))}return s}function addQueryParameters(e,t){const r=/\?/.test(e)?"&":"?";const s=Object.keys(t);if(s.length===0){return e}return e+r+s.map((e=>{if(e==="q"){return"q="+t.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(t[e])}`})).join("&")}var xA=/\{[^{}}]+\}/g;function removeNonChars(e){return e.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g,"").split(/,/)}function extractUrlVariableNames(e){const t=e.match(xA);if(!t){return[]}return t.map(removeNonChars).reduce(((e,t)=>e.concat(t)),[])}function omit(e,t){const r={__proto__:null};for(const s of Object.keys(e)){if(t.indexOf(s)===-1){r[s]=e[s]}}return r}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e})).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encodeValue(e,t,r){t=e==="+"||e==="#"?encodeReserved(t):encodeUnreserved(t);if(r){return encodeUnreserved(r)+"="+t}else{return t}}function isDefined(e){return e!==void 0&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,t,r,s){var o=e[r],n=[];if(isDefined(o)&&o!==""){if(typeof o==="string"||typeof o==="number"||typeof o==="boolean"){o=o.toString();if(s&&s!=="*"){o=o.substring(0,parseInt(s,10))}n.push(encodeValue(t,o,isKeyOperator(t)?r:""))}else{if(s==="*"){if(Array.isArray(o)){o.filter(isDefined).forEach((function(e){n.push(encodeValue(t,e,isKeyOperator(t)?r:""))}))}else{Object.keys(o).forEach((function(e){if(isDefined(o[e])){n.push(encodeValue(t,o[e],e))}}))}}else{const e=[];if(Array.isArray(o)){o.filter(isDefined).forEach((function(r){e.push(encodeValue(t,r))}))}else{Object.keys(o).forEach((function(r){if(isDefined(o[r])){e.push(encodeUnreserved(r));e.push(encodeValue(t,o[r].toString()))}}))}if(isKeyOperator(t)){n.push(encodeUnreserved(r)+"="+e.join(","))}else if(e.length!==0){n.push(e.join(","))}}}}else{if(t===";"){if(isDefined(o)){n.push(encodeUnreserved(r))}}else if(o===""&&(t==="&"||t==="?")){n.push(encodeUnreserved(r)+"=")}else if(o===""){n.push("")}}return n}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,t){var r=["+","#",".","/",";","?","&"];e=e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,s,o){if(s){let e="";const o=[];if(r.indexOf(s.charAt(0))!==-1){e=s.charAt(0);s=s.substr(1)}s.split(/,/g).forEach((function(r){var s=/([^:\*]*)(?::(\d+)|(\*))?/.exec(r);o.push(getValues(t,e,s[1],s[2]||s[3]))}));if(e&&e!=="+"){var n=",";if(e==="?"){n="&"}else if(e!=="#"){n=e}return(o.length!==0?e:"")+o.join(n)}else{return o.join(",")}}else{return encodeReserved(o)}}));if(e==="/"){return e}else{return e.replace(/\/$/,"")}}function parse(e){let t=e.method.toUpperCase();let r=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}");let s=Object.assign({},e.headers);let o;let n=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const A=extractUrlVariableNames(r);r=parseUrl(r).expand(n);if(!/^http/.test(r)){r=e.baseUrl+r}const i=Object.keys(e).filter((e=>A.includes(e))).concat("baseUrl");const a=omit(n,i);const c=/application\/octet-stream/i.test(s.accept);if(!c){if(e.mediaType.format){s.accept=s.accept.split(/,/).map((t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")}if(r.endsWith("/graphql")){if(e.mediaType.previews?.length){const t=s.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g)||[];s.accept=t.concat(e.mediaType.previews).map((t=>{const r=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${t}-preview${r}`})).join(",")}}}if(["GET","HEAD"].includes(t)){r=addQueryParameters(r,a)}else{if("data"in a){o=a.data}else{if(Object.keys(a).length){o=a}}}if(!s["content-type"]&&typeof o!=="undefined"){s["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(t)&&typeof o==="undefined"){o=""}return Object.assign({method:t,url:r,headers:s},typeof o!=="undefined"?{body:o}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,t,r){return parse(dist_bundle_merge(e,t,r))}function withDefaults(e,t){const r=dist_bundle_merge(e,t);const s=endpointWithDefaults.bind(null,r);return Object.assign(s,{DEFAULTS:r,defaults:withDefaults.bind(null,r),merge:dist_bundle_merge.bind(null,r),parse:parse})}var PA=withDefaults(null,HA);var YA=__nccwpck_require__(1120);class RequestError extends Error{name;status;request;response;constructor(e,t,r){super(e,{cause:r.cause});this.name="HttpError";this.status=Number.parseInt(t);if(Number.isNaN(this.status)){this.status=0}
7/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */if("response"in r){this.response=r.response}const s=Object.assign({},r.request);if(r.request.headers.authorization){s.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/(?<! ) .*$/," [REDACTED]")})}s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=s}}var JA="10.0.7";var VA={headers:{"user-agent":`octokit-request.js/${JA} ${getUserAgent()}`}};function dist_bundle_isPlainObject(e){if(typeof e!=="object"||e===null)return false;if(Object.prototype.toString.call(e)!=="[object Object]")return false;const t=Object.getPrototypeOf(e);if(t===null)return true;const r=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r==="function"&&r instanceof r&&Function.prototype.call(r)===Function.prototype.call(e)}var noop=()=>"";async function fetchWrapper(e){const t=e.request?.fetch||globalThis.fetch;if(!t){throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing")}const r=e.request?.log||console;const s=e.request?.parseSuccessResponseBody!==false;const o=dist_bundle_isPlainObject(e.body)||Array.isArray(e.body)?JSON.stringify(e.body):e.body;const n=Object.fromEntries(Object.entries(e.headers).map((([e,t])=>[e,String(t)])));let A;try{A=await t(e.url,{method:e.method,body:o,redirect:e.request?.redirect,headers:n,signal:e.request?.signal,...e.body&&{duplex:"half"}})}catch(t){let r="Unknown Error";if(t instanceof Error){if(t.name==="AbortError"){t.status=500;throw t}r=t.message;if(t.name==="TypeError"&&"cause"in t){if(t.cause instanceof Error){r=t.cause.message}else if(typeof t.cause==="string"){r=t.cause}}}const s=new RequestError(r,500,{request:e});s.cause=t;throw s}const i=A.status;const a=A.url;const c={};for(const[e,t]of A.headers){c[e]=t}const l={url:a,status:i,headers:c,data:""};if("deprecation"in c){const t=c.link&&c.link.match(/<([^<>]+)>; rel="deprecation"/);const s=t&&t.pop();r.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${c.sunset}${s?`. See ${s}`:""}`)}if(i===204||i===205){return l}if(e.method==="HEAD"){if(i<400){return l}throw new RequestError(A.statusText,i,{response:l,request:e})}if(i===304){l.data=await getResponseData(A);throw new RequestError("Not modified",i,{response:l,request:e})}if(i>=400){l.data=await getResponseData(A);throw new RequestError(toErrorMessage(l.data),i,{response:l,request:e})}l.data=s?await getResponseData(A):A.body;return l}async function getResponseData(e){const t=e.headers.get("content-type");if(!t){return e.text().catch(noop)}const r=(0,YA.xL)(t);if(isJSONResponse(r)){let t="";try{t=await e.text();return JSON.parse(t)}catch(e){return t}}else if(r.type.startsWith("text/")||r.parameters.charset?.toLowerCase()==="utf-8"){return e.text().catch(noop)}else{return e.arrayBuffer().catch((
8/* v8 ignore next -- @preserve */

Callers 1

parseFunction · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected