@activepieces/piece-github 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +3 -3
package/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Bk=Object.create;var zi=Object.defineProperty;var Fk=Object.getOwnPropertyDescriptor;var Hk=Object.getOwnPropertyNames;var Gk=Object.getPrototypeOf,Zk=Object.prototype.hasOwnProperty;var o=(e,r)=>zi(e,"name",{value:r,configurable:!0});var L=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(i){throw r=0,i}},zm=(e,r)=>{for(var i in r)zi(e,i,{get:r[i],enumerable:!0})},Cm=(e,r,i,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of Hk(r))!Zk.call(e,u)&&u!==i&&zi(e,u,{get:()=>r[u],enumerable:!(a=Fk(r,u))||a.enumerable});return e};var pn=(e,r,i)=>(i=e!=null?Bk(Gk(e)):{},Cm(r||!e||!e.__esModule?zi(i,"default",{value:e,enumerable:!0}):i,e)),Vk=e=>Cm(zi({},"__esModule",{value:!0}),e);var oh=L((ih,za)=>{(function(e){"use strict";let r="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},a=new RegExp("^0[0-7]+$","i"),u=new RegExp("^0x[a-f0-9]+$","i"),c="%[0-9a-z]{1,}",p="(?:[0-9a-f]+::?)+",m={zoneIndex:new RegExp(c,"i"),native:new RegExp(`^(::)?(${p})?([0-9a-f]+)?(::)?(${c})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${c})?)$`,"i"),transitional:new RegExp(`^((?:${p})|(?:::)(?:${p})?)${r}\\.${r}\\.${r}\\.${r}(${c})?$`,"i")};function v(b,E){if(b.indexOf("::")!==b.lastIndexOf("::"))return null;let z=0,O=-1,F=(b.match(m.zoneIndex)||[])[0],Z,ae;for(F&&(F=F.substring(1),b=b.replace(/%.+$/,""));(O=b.indexOf(":",O+1))>=0;)z++;if(b.substr(0,2)==="::"&&z--,b.substr(-2,2)==="::"&&z--,z>E)return null;for(ae=E-z,Z=":";ae--;)Z+="0:";return b=b.replace("::",Z),b[0]===":"&&(b=b.slice(1)),b[b.length-1]===":"&&(b=b.slice(0,-1)),E=(function(){let Me=b.split(":"),et=[];for(let dt=0;dt<Me.length;dt++)et.push(parseInt(Me[dt],16));return et})(),{parts:E,zoneId:F}}o(v,"expandIPv6");function _(b,E,z,O){if(b.length!==E.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let F=0,Z;for(;O>0;){if(Z=z-O,Z<0&&(Z=0),b[F]>>Z!==E[F]>>Z)return!1;O-=z,F+=1}return!0}o(_,"matchCIDR");function A(b){if(u.test(b))return parseInt(b,16);if(b[0]==="0"&&!isNaN(parseInt(b[1],10))){if(a.test(b))return parseInt(b,8);throw new Error(`ipaddr: cannot parse ${b} as octal`)}return parseInt(b,10)}o(A,"parseIntAuto");function k(b,E){for(;b.length<E;)b=`0${b}`;return b}o(k,"padPart");let U={};U.IPv4=(function(){function b(E){if(E.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let z,O;for(z=0;z<E.length;z++)if(O=E[z],!(0<=O&&O<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=E}return o(b,"IPv4"),b.prototype.SpecialRanges={unspecified:[[new b([0,0,0,0]),8]],broadcast:[[new b([255,255,255,255]),32]],multicast:[[new b([224,0,0,0]),4]],linkLocal:[[new b([169,254,0,0]),16]],loopback:[[new b([127,0,0,0]),8]],carrierGradeNat:[[new b([100,64,0,0]),10]],private:[[new b([10,0,0,0]),8],[new b([172,16,0,0]),12],[new b([192,168,0,0]),16]],reserved:[[new b([192,0,0,0]),24],[new b([192,0,2,0]),24],[new b([192,88,99,0]),24],[new b([198,18,0,0]),15],[new b([198,51,100,0]),24],[new b([203,0,113,0]),24],[new b([240,0,0,0]),4]],as112:[[new b([192,175,48,0]),24],[new b([192,31,196,0]),24]],amt:[[new b([192,52,193,0]),24]]},b.prototype.kind=function(){return"ipv4"},b.prototype.match=function(E,z){let O;if(z===void 0&&(O=E,E=O[0],z=O[1]),E.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return _(this.octets,E.octets,8,z)},b.prototype.prefixLengthFromSubnetMask=function(){let E=0,z=!1,O={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},F,Z,ae;for(F=3;F>=0;F-=1)if(Z=this.octets[F],Z in O){if(ae=O[Z],z&&ae!==0)return null;ae!==8&&(z=!0),E+=ae}else return null;return 32-E},b.prototype.range=function(){return U.subnetMatch(this,this.SpecialRanges)},b.prototype.toByteArray=function(){return this.octets.slice(0)},b.prototype.toIPv4MappedAddress=function(){return U.IPv6.parse(`::ffff:${this.toString()}`)},b.prototype.toNormalizedString=function(){return this.toString()},b.prototype.toString=function(){return this.octets.join(".")},b})(),U.IPv4.broadcastAddressFromCIDR=function(b){try{let E=this.parseCIDR(b),z=E[0].toByteArray(),O=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],Z=0;for(;Z<4;)F.push(parseInt(z[Z],10)|parseInt(O[Z],10)^255),Z++;return new this(F)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},U.IPv4.isIPv4=function(b){return this.parser(b)!==null},U.IPv4.isValid=function(b){try{return new this(this.parser(b)),!0}catch{return!1}},U.IPv4.isValidCIDR=function(b){try{return this.parseCIDR(b),!0}catch{return!1}},U.IPv4.isValidFourPartDecimal=function(b){return!!(U.IPv4.isValid(b)&&b.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},U.IPv4.isValidCIDRFourPartDecimal=function(b){let E=b.match(/^(.+)\/(\d+)$/);return!U.IPv4.isValidCIDR(b)||!E?!1:U.IPv4.isValidFourPartDecimal(E[1])},U.IPv4.networkAddressFromCIDR=function(b){let E,z,O,F,Z;try{for(E=this.parseCIDR(b),O=E[0].toByteArray(),Z=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],z=0;z<4;)F.push(parseInt(O[z],10)&parseInt(Z[z],10)),z++;return new this(F)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},U.IPv4.parse=function(b){let E=this.parser(b);if(E===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(E)},U.IPv4.parseCIDR=function(b){let E;if(E=b.match(/^(.+)\/(\d+)$/)){let z=parseInt(E[2]);if(z>=0&&z<=32){let O=[this.parse(E[1]),z];return Object.defineProperty(O,"toString",{value:o(function(){return this.join("/")},"value")}),O}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},U.IPv4.parser=function(b){let E,z,O;if(E=b.match(i.fourOctet))return(function(){let F=E.slice(1,6),Z=[];for(let ae=0;ae<F.length;ae++)z=F[ae],Z.push(A(z));return Z})();if(E=b.match(i.longValue)){if(O=A(E[1]),O>4294967295||O<0)throw new Error("ipaddr: address outside defined range");return(function(){let F=[],Z;for(Z=0;Z<=24;Z+=8)F.push(O>>Z&255);return F})().reverse()}else return(E=b.match(i.twoOctet))?(function(){let F=E.slice(1,4),Z=[];if(O=A(F[1]),O>16777215||O<0)throw new Error("ipaddr: address outside defined range");return Z.push(A(F[0])),Z.push(O>>16&255),Z.push(O>>8&255),Z.push(O&255),Z})():(E=b.match(i.threeOctet))?(function(){let F=E.slice(1,5),Z=[];if(O=A(F[2]),O>65535||O<0)throw new Error("ipaddr: address outside defined range");return Z.push(A(F[0])),Z.push(A(F[1])),Z.push(O>>8&255),Z.push(O&255),Z})():null},U.IPv4.subnetMaskFromPrefixLength=function(b){if(b=parseInt(b),b<0||b>32)throw new Error("ipaddr: invalid IPv4 prefix length");let E=[0,0,0,0],z=0,O=Math.floor(b/8);for(;z<O;)E[z]=255,z++;return O<4&&(E[O]=Math.pow(2,b%8)-1<<8-b%8),new this(E)},U.IPv6=(function(){function b(E,z){let O,F;if(E.length===16)for(this.parts=[],O=0;O<=14;O+=2)this.parts.push(E[O]<<8|E[O+1]);else if(E.length===8)this.parts=E;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(O=0;O<this.parts.length;O++)if(F=this.parts[O],!(0<=F&&F<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");z&&(this.zoneId=z)}return o(b,"IPv6"),b.prototype.SpecialRanges={unspecified:[new b([0,0,0,0,0,0,0,0]),128],linkLocal:[new b([65152,0,0,0,0,0,0,0]),10],multicast:[new b([65280,0,0,0,0,0,0,0]),8],loopback:[new b([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new b([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new b([0,0,0,0,0,65535,0,0]),96],discard:[new b([256,0,0,0,0,0,0,0]),64],rfc6145:[new b([0,0,0,0,65535,0,0,0]),96],rfc6052:[new b([100,65435,0,0,0,0,0,0]),96],"6to4":[new b([8194,0,0,0,0,0,0,0]),16],teredo:[new b([8193,0,0,0,0,0,0,0]),32],benchmarking:[new b([8193,2,0,0,0,0,0,0]),48],amt:[new b([8193,3,0,0,0,0,0,0]),32],as112v6:[[new b([8193,4,274,0,0,0,0,0]),48],[new b([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new b([8193,16,0,0,0,0,0,0]),28],orchid2:[new b([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new b([8193,48,0,0,0,0,0,0]),28],reserved:[[new b([8193,0,0,0,0,0,0,0]),23],[new b([8193,3512,0,0,0,0,0,0]),32]]},b.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},b.prototype.kind=function(){return"ipv6"},b.prototype.match=function(E,z){let O;if(z===void 0&&(O=E,E=O[0],z=O[1]),E.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return _(this.parts,E.parts,16,z)},b.prototype.prefixLengthFromSubnetMask=function(){let E=0,z=!1,O={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},F,Z;for(let ae=7;ae>=0;ae-=1)if(F=this.parts[ae],F in O){if(Z=O[F],z&&Z!==0)return null;Z!==16&&(z=!0),E+=Z}else return null;return 128-E},b.prototype.range=function(){return U.subnetMatch(this,this.SpecialRanges)},b.prototype.toByteArray=function(){let E,z=[],O=this.parts;for(let F=0;F<O.length;F++)E=O[F],z.push(E>>8),z.push(E&255);return z},b.prototype.toFixedLengthString=function(){let E=(function(){let O=[];for(let F=0;F<this.parts.length;F++)O.push(k(this.parts[F].toString(16),4));return O}).call(this).join(":"),z="";return this.zoneId&&(z=`%${this.zoneId}`),E+z},b.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let E=this.parts.slice(-2),z=E[0],O=E[1];return new U.IPv4([z>>8,z&255,O>>8,O&255])},b.prototype.toNormalizedString=function(){let E=(function(){let O=[];for(let F=0;F<this.parts.length;F++)O.push(this.parts[F].toString(16));return O}).call(this).join(":"),z="";return this.zoneId&&(z=`%${this.zoneId}`),E+z},b.prototype.toRFC5952String=function(){let E=/((^|:)(0(:|$)){2,})/g,z=this.toNormalizedString(),O=0,F=-1,Z;for(;Z=E.exec(z);)Z[0].length>F&&(O=Z.index,F=Z[0].length);return F<0?z:`${z.substring(0,O)}::${z.substring(O+F)}`},b.prototype.toString=function(){return this.toRFC5952String()},b})(),U.IPv6.broadcastAddressFromCIDR=function(b){try{let E=this.parseCIDR(b),z=E[0].toByteArray(),O=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],Z=0;for(;Z<16;)F.push(parseInt(z[Z],10)|parseInt(O[Z],10)^255),Z++;return new this(F)}catch(E){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${E})`)}},U.IPv6.isIPv6=function(b){return this.parser(b)!==null},U.IPv6.isValid=function(b){if(typeof b=="string"&&b.indexOf(":")===-1)return!1;try{let E=this.parser(b);return new this(E.parts,E.zoneId),!0}catch{return!1}},U.IPv6.isValidCIDR=function(b){if(typeof b=="string"&&b.indexOf(":")===-1)return!1;try{return this.parseCIDR(b),!0}catch{return!1}},U.IPv6.networkAddressFromCIDR=function(b){let E,z,O,F,Z;try{for(E=this.parseCIDR(b),O=E[0].toByteArray(),Z=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],z=0;z<16;)F.push(parseInt(O[z],10)&parseInt(Z[z],10)),z++;return new this(F)}catch(ae){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${ae})`)}},U.IPv6.parse=function(b){let E=this.parser(b);if(E.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(E.parts,E.zoneId)},U.IPv6.parseCIDR=function(b){let E,z,O;if((z=b.match(/^(.+)\/(\d+)$/))&&(E=parseInt(z[2]),E>=0&&E<=128))return O=[this.parse(z[1]),E],Object.defineProperty(O,"toString",{value:o(function(){return this.join("/")},"value")}),O;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},U.IPv6.parser=function(b){let E,z,O,F,Z,ae;if(O=b.match(m.deprecatedTransitional))return this.parser(`::ffff:${O[1]}`);if(m.native.test(b))return v(b,8);if((O=b.match(m.transitional))&&(ae=O[6]||"",E=O[1],O[1].endsWith("::")||(E=E.slice(0,-1)),E=v(E+ae,6),E.parts)){for(Z=[parseInt(O[2]),parseInt(O[3]),parseInt(O[4]),parseInt(O[5])],z=0;z<Z.length;z++)if(F=Z[z],!(0<=F&&F<=255))return null;return E.parts.push(Z[0]<<8|Z[1]),E.parts.push(Z[2]<<8|Z[3]),{parts:E.parts,zoneId:E.zoneId}}return null},U.IPv6.subnetMaskFromPrefixLength=function(b){if(b=parseInt(b),b<0||b>128)throw new Error("ipaddr: invalid IPv6 prefix length");let E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],z=0,O=Math.floor(b/8);for(;z<O;)E[z]=255,z++;return O<16&&(E[O]=Math.pow(2,b%8)-1<<8-b%8),new this(E)},U.fromByteArray=function(b){let E=b.length;if(E===4)return new U.IPv4(b);if(E===16)return new U.IPv6(b);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},U.isValid=function(b){return U.IPv6.isValid(b)||U.IPv4.isValid(b)},U.isValidCIDR=function(b){return U.IPv6.isValidCIDR(b)||U.IPv4.isValidCIDR(b)},U.parse=function(b){if(U.IPv6.isValid(b))return U.IPv6.parse(b);if(U.IPv4.isValid(b))return U.IPv4.parse(b);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},U.parseCIDR=function(b){try{return U.IPv6.parseCIDR(b)}catch{try{return U.IPv4.parseCIDR(b)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},U.process=function(b){let E=this.parse(b);return E.kind()==="ipv6"&&E.isIPv4MappedAddress()?E.toIPv4Address():E},U.subnetMatch=function(b,E,z){let O,F,Z,ae;z==null&&(z="unicast");for(F in E)if(Object.prototype.hasOwnProperty.call(E,F)){for(Z=E[F],Z[0]&&!(Z[0]instanceof Array)&&(Z=[Z]),O=0;O<Z.length;O++)if(ae=Z[O],b.kind()===ae[0].kind()&&b.match.apply(b,ae))return F}return z},typeof za<"u"&&za.exports?za.exports=U:e.ipaddr=U})(ih)});var ig=L((ZK,ng)=>{var rg=require("stream").Stream,I0=require("util");ng.exports=tr;function tr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(tr,"DelayedStream");I0.inherits(tr,rg);tr.create=function(e,r){var i=new this;r=r||{};for(var a in r)i[a]=r[a];i.source=e;var u=e.emit;return e.emit=function(){return i._handleEmit(arguments),u.apply(e,arguments)},e.on("error",function(){}),i.pauseStream&&e.pause(),i};Object.defineProperty(tr.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});tr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};tr.prototype.resume=function(){this._released||this.release(),this.source.resume()};tr.prototype.pause=function(){this.source.pause()};tr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};tr.prototype.pipe=function(){var e=rg.prototype.pipe.apply(this,arguments);return this.resume(),e};tr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};tr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var ug=L((WK,sg)=>{var $0=require("util"),ag=require("stream").Stream,og=ig();sg.exports=Ve;function Ve(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(Ve,"CombinedStream");$0.inherits(Ve,ag);Ve.create=function(e){var r=new this;e=e||{};for(var i in e)r[i]=e[i];return r};Ve.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Ve.prototype.append=function(e){var r=Ve.isStreamLike(e);if(r){if(!(e instanceof og)){var i=og.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=i}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Ve.prototype.pipe=function(e,r){return ag.prototype.pipe.call(this,e,r),this.resume(),e};Ve.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Ve.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var r=e;r(function(i){var a=Ve.isStreamLike(i);a&&(i.on("data",this._checkDataSize.bind(this)),this._handleErrors(i)),this._pipeNext(i)}.bind(this))};Ve.prototype._pipeNext=function(e){this._currentStream=e;var r=Ve.isStreamLike(e);if(r){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var i=e;this.write(i),this._getNext()};Ve.prototype._handleErrors=function(e){var r=this;e.on("error",function(i){r._emitError(i)})};Ve.prototype.write=function(e){this.emit("data",e)};Ve.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Ve.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};Ve.prototype.end=function(){this._reset(),this.emit("end")};Ve.prototype.destroy=function(){this._reset(),this.emit("close")};Ve.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Ve.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Ve.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(r){r.dataSize&&(e.dataSize+=r.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Ve.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var lg=L((JK,cg)=>{"use strict";cg.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var mg=L(At=>{"use strict";var qa=lg(),R0=require("path").extname,pg=/^\s*([^;\s]*)(?:;|\s|$)/,k0=/^text\//i;At.charset=dg;At.charsets={lookup:dg};At.contentType=O0;At.extension=N0;At.extensions=Object.create(null);At.lookup=z0;At.types=Object.create(null);C0(At.extensions,At.types);function dg(e){if(!e||typeof e!="string")return!1;var r=pg.exec(e),i=r&&qa[r[1].toLowerCase()];return i&&i.charset?i.charset:r&&k0.test(r[1])?"UTF-8":!1}o(dg,"charset");function O0(e){if(!e||typeof e!="string")return!1;var r=e.indexOf("/")===-1?At.lookup(e):e;if(!r)return!1;if(r.indexOf("charset")===-1){var i=At.charset(r);i&&(r+="; charset="+i.toLowerCase())}return r}o(O0,"contentType");function N0(e){if(!e||typeof e!="string")return!1;var r=pg.exec(e),i=r&&At.extensions[r[1].toLowerCase()];return!i||!i.length?!1:i[0]}o(N0,"extension");function z0(e){if(!e||typeof e!="string")return!1;var r=R0("x."+e).toLowerCase().substr(1);return r&&At.types[r]||!1}o(z0,"lookup");function C0(e,r){var i=["nginx","apache",void 0,"iana"];Object.keys(qa).forEach(o(function(u){var c=qa[u],p=c.extensions;if(!(!p||!p.length)){e[u]=p;for(var m=0;m<p.length;m++){var v=p[m];if(r[v]){var _=i.indexOf(qa[r[v]].source),A=i.indexOf(c.source);if(r[v]!=="application/octet-stream"&&(_>A||_===A&&r[v].substr(0,12)==="application/"))continue}r[v]=u}}},"forEachMimeType"))}o(C0,"populateMaps")});var hg=L((QK,fg)=>{fg.exports=D0;function D0(e){var r=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;r?r(e):setTimeout(e,0)}o(D0,"defer")});var jc=L((t8,yg)=>{var gg=hg();yg.exports=L0;function L0(e){var r=!1;return gg(function(){r=!0}),o(function(a,u){r?e(a,u):gg(o(function(){e(a,u)},"nextTick_callback"))},"async_callback")}o(L0,"async")});var Bc=L((n8,bg)=>{bg.exports=U0;function U0(e){Object.keys(e.jobs).forEach(M0.bind(e)),e.jobs={}}o(U0,"abort");function M0(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(M0,"clean")});var Fc=L((o8,_g)=>{var vg=jc(),q0=Bc();_g.exports=j0;function j0(e,r,i,a){var u=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[u]=B0(r,u,e[u],function(c,p){u in i.jobs&&(delete i.jobs[u],c?q0(i):i.results[u]=p,a(c,i.results))})}o(j0,"iterate");function B0(e,r,i,a){var u;return e.length==2?u=e(i,vg(a)):u=e(i,r,vg(a)),u}o(B0,"runJob")});var Hc=L((s8,xg)=>{xg.exports=F0;function F0(e,r){var i=!Array.isArray(e),a={index:0,keyedList:i||r?Object.keys(e):null,jobs:{},results:i?{}:[],size:i?Object.keys(e).length:e.length};return r&&a.keyedList.sort(i?r:function(u,c){return r(e[u],e[c])}),a}o(F0,"state")});var Gc=L((c8,Pg)=>{var H0=Bc(),G0=jc();Pg.exports=Z0;function Z0(e){Object.keys(this.jobs).length&&(this.index=this.size,H0(this),G0(e)(null,this.results))}o(Z0,"terminator")});var Ag=L((p8,wg)=>{var V0=Fc(),W0=Hc(),K0=Gc();wg.exports=J0;function J0(e,r,i){for(var a=W0(e);a.index<(a.keyedList||e).length;)V0(e,r,a,function(u,c){if(u){i(u,c);return}if(Object.keys(a.jobs).length===0){i(null,a.results);return}}),a.index++;return K0.bind(a,i)}o(J0,"parallel")});var Zc=L((m8,ja)=>{var Tg=Fc(),X0=Hc(),Y0=Gc();ja.exports=Q0;ja.exports.ascending=Sg;ja.exports.descending=ez;function Q0(e,r,i,a){var u=X0(e,i);return Tg(e,r,u,o(function c(p,m){if(p){a(p,m);return}if(u.index++,u.index<(u.keyedList||e).length){Tg(e,r,u,c);return}a(null,u.results)},"iteratorHandler")),Y0.bind(u,a)}o(Q0,"serialOrdered");function Sg(e,r){return e<r?-1:e>r?1:0}o(Sg,"ascending");function ez(e,r){return-1*Sg(e,r)}o(ez,"descending")});var Ig=L((h8,Eg)=>{var tz=Zc();Eg.exports=rz;function rz(e,r,i){return tz(e,r,null,i)}o(rz,"serial")});var Rg=L((y8,$g)=>{$g.exports={parallel:Ag(),serial:Ig(),serialOrdered:Zc()}});var Vc=L((b8,kg)=>{"use strict";kg.exports=Object});var Ng=L((v8,Og)=>{"use strict";Og.exports=Error});var Cg=L((_8,zg)=>{"use strict";zg.exports=EvalError});var Lg=L((x8,Dg)=>{"use strict";Dg.exports=RangeError});var Mg=L((P8,Ug)=>{"use strict";Ug.exports=ReferenceError});var jg=L((w8,qg)=>{"use strict";qg.exports=SyntaxError});var Ba=L((A8,Bg)=>{"use strict";Bg.exports=TypeError});var Hg=L((T8,Fg)=>{"use strict";Fg.exports=URIError});var Zg=L((S8,Gg)=>{"use strict";Gg.exports=Math.abs});var Wg=L((E8,Vg)=>{"use strict";Vg.exports=Math.floor});var Jg=L((I8,Kg)=>{"use strict";Kg.exports=Math.max});var Yg=L(($8,Xg)=>{"use strict";Xg.exports=Math.min});var ey=L((R8,Qg)=>{"use strict";Qg.exports=Math.pow});var ry=L((k8,ty)=>{"use strict";ty.exports=Math.round});var iy=L((O8,ny)=>{"use strict";ny.exports=Number.isNaN||o(function(r){return r!==r},"isNaN")});var ay=L((z8,oy)=>{"use strict";var nz=iy();oy.exports=o(function(r){return nz(r)||r===0?r:r<0?-1:1},"sign")});var uy=L((D8,sy)=>{"use strict";sy.exports=Object.getOwnPropertyDescriptor});var Wc=L((L8,cy)=>{"use strict";var Fa=uy();if(Fa)try{Fa([],"length")}catch{Fa=null}cy.exports=Fa});var py=L((U8,ly)=>{"use strict";var Ha=Object.defineProperty||!1;if(Ha)try{Ha({},"a",{value:1})}catch{Ha=!1}ly.exports=Ha});var Kc=L((M8,dy)=>{"use strict";dy.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},i=Symbol("test"),a=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var u=42;r[i]=u;for(var c in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var p=Object.getOwnPropertySymbols(r);if(p.length!==1||p[0]!==i||!Object.prototype.propertyIsEnumerable.call(r,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(r,i);if(m.value!==u||m.enumerable!==!0)return!1}return!0},"hasSymbols")});var hy=L((j8,fy)=>{"use strict";var my=typeof Symbol<"u"&&Symbol,iz=Kc();fy.exports=o(function(){return typeof my!="function"||typeof Symbol!="function"||typeof my("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:iz()},"hasNativeSymbols")});var Jc=L((F8,gy)=>{"use strict";gy.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Xc=L((H8,yy)=>{"use strict";var oz=Vc();yy.exports=oz.getPrototypeOf||null});var _y=L((G8,vy)=>{"use strict";var az="Function.prototype.bind called on incompatible ",sz=Object.prototype.toString,uz=Math.max,cz="[object Function]",by=o(function(r,i){for(var a=[],u=0;u<r.length;u+=1)a[u]=r[u];for(var c=0;c<i.length;c+=1)a[c+r.length]=i[c];return a},"concatty"),lz=o(function(r,i){for(var a=[],u=i||0,c=0;u<r.length;u+=1,c+=1)a[c]=r[u];return a},"slicy"),pz=o(function(e,r){for(var i="",a=0;a<e.length;a+=1)i+=e[a],a+1<e.length&&(i+=r);return i},"joiny");vy.exports=o(function(r){var i=this;if(typeof i!="function"||sz.apply(i)!==cz)throw new TypeError(az+i);for(var a=lz(arguments,1),u,c=o(function(){if(this instanceof u){var A=i.apply(this,by(a,arguments));return Object(A)===A?A:this}return i.apply(r,by(a,arguments))},"binder"),p=uz(0,i.length-a.length),m=[],v=0;v<p;v++)m[v]="$"+v;if(u=Function("binder","return function ("+pz(m,",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var _=o(function(){},"Empty");_.prototype=i.prototype,u.prototype=new _,_.prototype=null}return u},"bind")});var Hn=L((V8,xy)=>{"use strict";var dz=_y();xy.exports=Function.prototype.bind||dz});var Ga=L((W8,Py)=>{"use strict";Py.exports=Function.prototype.call});var Yc=L((K8,wy)=>{"use strict";wy.exports=Function.prototype.apply});var Ty=L((J8,Ay)=>{"use strict";Ay.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ey=L((X8,Sy)=>{"use strict";var mz=Hn(),fz=Yc(),hz=Ga(),gz=Ty();Sy.exports=gz||mz.call(hz,fz)});var $y=L((Y8,Iy)=>{"use strict";var yz=Hn(),bz=Ba(),vz=Ga(),_z=Ey();Iy.exports=o(function(r){if(r.length<1||typeof r[0]!="function")throw new bz("a function is required");return _z(yz,vz,r)},"callBindBasic")});var Cy=L((e9,zy)=>{"use strict";var xz=$y(),Ry=Wc(),Oy;try{Oy=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Qc=!!Oy&&Ry&&Ry(Object.prototype,"__proto__"),Ny=Object,ky=Ny.getPrototypeOf;zy.exports=Qc&&typeof Qc.get=="function"?xz([Qc.get]):typeof ky=="function"?o(function(r){return ky(r==null?r:Ny(r))},"getDunder"):!1});var qy=L((r9,My)=>{"use strict";var Dy=Jc(),Ly=Xc(),Uy=Cy();My.exports=Dy?o(function(r){return Dy(r)},"getProto"):Ly?o(function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return Ly(r)},"getProto"):Uy?o(function(r){return Uy(r)},"getProto"):null});var el=L((i9,jy)=>{"use strict";var Pz=Function.prototype.call,wz=Object.prototype.hasOwnProperty,Az=Hn();jy.exports=Az.call(Pz,wz)});var Wy=L((o9,Vy)=>{"use strict";var Ae,Tz=Vc(),Sz=Ng(),Ez=Cg(),Iz=Lg(),$z=Mg(),Wn=jg(),Vn=Ba(),Rz=Hg(),kz=Zg(),Oz=Wg(),Nz=Jg(),zz=Yg(),Cz=ey(),Dz=ry(),Lz=ay(),Gy=Function,tl=o(function(e){try{return Gy('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ro=Wc(),Uz=py(),rl=o(function(){throw new Vn},"throwTypeError"),Mz=ro?(function(){try{return arguments.callee,rl}catch{try{return ro(arguments,"callee").get}catch{return rl}}})():rl,Gn=hy()(),it=qy(),qz=Xc(),jz=Jc(),Zy=Yc(),no=Ga(),Zn={},Bz=typeof Uint8Array>"u"||!it?Ae:it(Uint8Array),hn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ae:ArrayBuffer,"%ArrayIteratorPrototype%":Gn&&it?it([][Symbol.iterator]()):Ae,"%AsyncFromSyncIteratorPrototype%":Ae,"%AsyncFunction%":Zn,"%AsyncGenerator%":Zn,"%AsyncGeneratorFunction%":Zn,"%AsyncIteratorPrototype%":Zn,"%Atomics%":typeof Atomics>"u"?Ae:Atomics,"%BigInt%":typeof BigInt>"u"?Ae:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ae:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ae:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Sz,"%eval%":eval,"%EvalError%":Ez,"%Float16Array%":typeof Float16Array>"u"?Ae:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ae:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ae:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ae:FinalizationRegistry,"%Function%":Gy,"%GeneratorFunction%":Zn,"%Int8Array%":typeof Int8Array>"u"?Ae:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ae:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Gn&&it?it(it([][Symbol.iterator]())):Ae,"%JSON%":typeof JSON=="object"?JSON:Ae,"%Map%":typeof Map>"u"?Ae:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Gn||!it?Ae:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Tz,"%Object.getOwnPropertyDescriptor%":ro,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ae:Promise,"%Proxy%":typeof Proxy>"u"?Ae:Proxy,"%RangeError%":Iz,"%ReferenceError%":$z,"%Reflect%":typeof Reflect>"u"?Ae:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ae:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Gn||!it?Ae:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Gn&&it?it(""[Symbol.iterator]()):Ae,"%Symbol%":Gn?Symbol:Ae,"%SyntaxError%":Wn,"%ThrowTypeError%":Mz,"%TypedArray%":Bz,"%TypeError%":Vn,"%Uint8Array%":typeof Uint8Array>"u"?Ae:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ae:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ae:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ae:Uint32Array,"%URIError%":Rz,"%WeakMap%":typeof WeakMap>"u"?Ae:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ae:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ae:WeakSet,"%Function.prototype.call%":no,"%Function.prototype.apply%":Zy,"%Object.defineProperty%":Uz,"%Object.getPrototypeOf%":qz,"%Math.abs%":kz,"%Math.floor%":Oz,"%Math.max%":Nz,"%Math.min%":zz,"%Math.pow%":Cz,"%Math.round%":Dz,"%Math.sign%":Lz,"%Reflect.getPrototypeOf%":jz};if(it)try{null.error}catch(e){By=it(it(e)),hn["%Error.prototype%"]=By}var By,Fz=o(function e(r){var i;if(r==="%AsyncFunction%")i=tl("async function () {}");else if(r==="%GeneratorFunction%")i=tl("function* () {}");else if(r==="%AsyncGeneratorFunction%")i=tl("async function* () {}");else if(r==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(i=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var u=e("%AsyncGenerator%");u&&it&&(i=it(u.prototype))}return hn[r]=i,i},"doEval"),Fy={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},io=Hn(),Za=el(),Hz=io.call(no,Array.prototype.concat),Gz=io.call(Zy,Array.prototype.splice),Hy=io.call(no,String.prototype.replace),Va=io.call(no,String.prototype.slice),Zz=io.call(no,RegExp.prototype.exec),Vz=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Wz=/\\(\\)?/g,Kz=o(function(r){var i=Va(r,0,1),a=Va(r,-1);if(i==="%"&&a!=="%")throw new Wn("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&i!=="%")throw new Wn("invalid intrinsic syntax, expected opening `%`");var u=[];return Hy(r,Vz,function(c,p,m,v){u[u.length]=m?Hy(v,Wz,"$1"):p||c}),u},"stringToPath"),Jz=o(function(r,i){var a=r,u;if(Za(Fy,a)&&(u=Fy[a],a="%"+u[0]+"%"),Za(hn,a)){var c=hn[a];if(c===Zn&&(c=Fz(a)),typeof c>"u"&&!i)throw new Vn("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:u,name:a,value:c}}throw new Wn("intrinsic "+r+" does not exist!")},"getBaseIntrinsic");Vy.exports=o(function(r,i){if(typeof r!="string"||r.length===0)throw new Vn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof i!="boolean")throw new Vn('"allowMissing" argument must be a boolean');if(Zz(/^%?[^%]*%?$/,r)===null)throw new Wn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Kz(r),u=a.length>0?a[0]:"",c=Jz("%"+u+"%",i),p=c.name,m=c.value,v=!1,_=c.alias;_&&(u=_[0],Gz(a,Hz([0,1],_)));for(var A=1,k=!0;A<a.length;A+=1){var U=a[A],b=Va(U,0,1),E=Va(U,-1);if((b==='"'||b==="'"||b==="`"||E==='"'||E==="'"||E==="`")&&b!==E)throw new Wn("property names with quotes must have matching quotes");if((U==="constructor"||!k)&&(v=!0),u+="."+U,p="%"+u+"%",Za(hn,p))m=hn[p];else if(m!=null){if(!(U in m)){if(!i)throw new Vn("base intrinsic for "+r+" exists, but the property is not available.");return}if(ro&&A+1>=a.length){var z=ro(m,U);k=!!z,k&&"get"in z&&!("originalValue"in z.get)?m=z.get:m=m[U]}else k=Za(m,U),m=m[U];k&&!v&&(hn[p]=m)}}return m},"GetIntrinsic")});var Jy=L((s9,Ky)=>{"use strict";var Xz=Kc();Ky.exports=o(function(){return Xz()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Qy=L((c9,Yy)=>{"use strict";var Yz=Wy(),Xy=Yz("%Object.defineProperty%",!0),Qz=Jy()(),eC=el(),tC=Ba(),Wa=Qz?Symbol.toStringTag:null;Yy.exports=o(function(r,i){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,u=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a<"u"&&typeof a!="boolean"||typeof u<"u"&&typeof u!="boolean")throw new tC("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Wa&&(a||!eC(r,Wa))&&(Xy?Xy(r,Wa,{configurable:!u,enumerable:!1,value:i,writable:!1}):r[Wa]=i)},"setToStringTag")});var tb=L((p9,eb)=>{"use strict";var rC=Function.prototype.call,nC=Object.prototype.hasOwnProperty,iC=Hn();eb.exports=iC.call(rC,nC)});var nb=L((d9,rb)=>{"use strict";rb.exports=function(e,r){return Object.keys(r).forEach(function(i){e[i]=e[i]||r[i]}),e}});var ab=L((m9,ob)=>{"use strict";var al=ug(),oC=require("util"),nl=require("path"),aC=require("http"),sC=require("https"),uC=require("url").parse,cC=require("fs"),lC=require("stream").Stream,pC=require("crypto"),il=mg(),dC=Rg(),mC=Qy(),Wr=tb(),ol=nb();function ib(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(ib,"escapeHeaderParam");function Ee(e){if(!(this instanceof Ee))return new Ee(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],al.call(this),e=e||{};for(var r in e)this[r]=e[r]}o(Ee,"FormData");oC.inherits(Ee,al);Ee.LINE_BREAK=`\r
|
|
1
|
+
"use strict";var Bk=Object.create;var zi=Object.defineProperty;var Fk=Object.getOwnPropertyDescriptor;var Hk=Object.getOwnPropertyNames;var Gk=Object.getPrototypeOf,Zk=Object.prototype.hasOwnProperty;var o=(e,r)=>zi(e,"name",{value:r,configurable:!0});var L=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(i){throw r=0,i}},zm=(e,r)=>{for(var i in r)zi(e,i,{get:r[i],enumerable:!0})},Cm=(e,r,i,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of Hk(r))!Zk.call(e,u)&&u!==i&&zi(e,u,{get:()=>r[u],enumerable:!(a=Fk(r,u))||a.enumerable});return e};var pn=(e,r,i)=>(i=e!=null?Bk(Gk(e)):{},Cm(r||!e||!e.__esModule?zi(i,"default",{value:e,enumerable:!0}):i,e)),Vk=e=>Cm(zi({},"__esModule",{value:!0}),e);var oh=L((ih,za)=>{(function(e){"use strict";let r="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},a=new RegExp("^0[0-7]+$","i"),u=new RegExp("^0x[a-f0-9]+$","i"),c="%[0-9a-z]{1,}",p="(?:[0-9a-f]+::?)+",m={zoneIndex:new RegExp(c,"i"),native:new RegExp(`^(::)?(${p})?([0-9a-f]+)?(::)?(${c})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${c})?)$`,"i"),transitional:new RegExp(`^((?:${p})|(?:::)(?:${p})?)${r}\\.${r}\\.${r}\\.${r}(${c})?$`,"i")};function v(b,E){if(b.indexOf("::")!==b.lastIndexOf("::"))return null;let z=0,O=-1,F=(b.match(m.zoneIndex)||[])[0],Z,ae;for(F&&(F=F.substring(1),b=b.replace(/%.+$/,""));(O=b.indexOf(":",O+1))>=0;)z++;if(b.substr(0,2)==="::"&&z--,b.substr(-2,2)==="::"&&z--,z>E)return null;for(ae=E-z,Z=":";ae--;)Z+="0:";return b=b.replace("::",Z),b[0]===":"&&(b=b.slice(1)),b[b.length-1]===":"&&(b=b.slice(0,-1)),E=(function(){let Me=b.split(":"),et=[];for(let dt=0;dt<Me.length;dt++)et.push(parseInt(Me[dt],16));return et})(),{parts:E,zoneId:F}}o(v,"expandIPv6");function _(b,E,z,O){if(b.length!==E.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let F=0,Z;for(;O>0;){if(Z=z-O,Z<0&&(Z=0),b[F]>>Z!==E[F]>>Z)return!1;O-=z,F+=1}return!0}o(_,"matchCIDR");function A(b){if(u.test(b))return parseInt(b,16);if(b[0]==="0"&&!isNaN(parseInt(b[1],10))){if(a.test(b))return parseInt(b,8);throw new Error(`ipaddr: cannot parse ${b} as octal`)}return parseInt(b,10)}o(A,"parseIntAuto");function k(b,E){for(;b.length<E;)b=`0${b}`;return b}o(k,"padPart");let U={};U.IPv4=(function(){function b(E){if(E.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let z,O;for(z=0;z<E.length;z++)if(O=E[z],!(0<=O&&O<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=E}return o(b,"IPv4"),b.prototype.SpecialRanges={unspecified:[[new b([0,0,0,0]),8]],broadcast:[[new b([255,255,255,255]),32]],multicast:[[new b([224,0,0,0]),4]],linkLocal:[[new b([169,254,0,0]),16]],loopback:[[new b([127,0,0,0]),8]],carrierGradeNat:[[new b([100,64,0,0]),10]],private:[[new b([10,0,0,0]),8],[new b([172,16,0,0]),12],[new b([192,168,0,0]),16]],reserved:[[new b([192,0,0,0]),24],[new b([192,0,2,0]),24],[new b([192,88,99,0]),24],[new b([198,18,0,0]),15],[new b([198,51,100,0]),24],[new b([203,0,113,0]),24],[new b([240,0,0,0]),4]],as112:[[new b([192,175,48,0]),24],[new b([192,31,196,0]),24]],amt:[[new b([192,52,193,0]),24]]},b.prototype.kind=function(){return"ipv4"},b.prototype.match=function(E,z){let O;if(z===void 0&&(O=E,E=O[0],z=O[1]),E.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return _(this.octets,E.octets,8,z)},b.prototype.prefixLengthFromSubnetMask=function(){let E=0,z=!1,O={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},F,Z,ae;for(F=3;F>=0;F-=1)if(Z=this.octets[F],Z in O){if(ae=O[Z],z&&ae!==0)return null;ae!==8&&(z=!0),E+=ae}else return null;return 32-E},b.prototype.range=function(){return U.subnetMatch(this,this.SpecialRanges)},b.prototype.toByteArray=function(){return this.octets.slice(0)},b.prototype.toIPv4MappedAddress=function(){return U.IPv6.parse(`::ffff:${this.toString()}`)},b.prototype.toNormalizedString=function(){return this.toString()},b.prototype.toString=function(){return this.octets.join(".")},b})(),U.IPv4.broadcastAddressFromCIDR=function(b){try{let E=this.parseCIDR(b),z=E[0].toByteArray(),O=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],Z=0;for(;Z<4;)F.push(parseInt(z[Z],10)|parseInt(O[Z],10)^255),Z++;return new this(F)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},U.IPv4.isIPv4=function(b){return this.parser(b)!==null},U.IPv4.isValid=function(b){try{return new this(this.parser(b)),!0}catch{return!1}},U.IPv4.isValidCIDR=function(b){try{return this.parseCIDR(b),!0}catch{return!1}},U.IPv4.isValidFourPartDecimal=function(b){return!!(U.IPv4.isValid(b)&&b.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},U.IPv4.isValidCIDRFourPartDecimal=function(b){let E=b.match(/^(.+)\/(\d+)$/);return!U.IPv4.isValidCIDR(b)||!E?!1:U.IPv4.isValidFourPartDecimal(E[1])},U.IPv4.networkAddressFromCIDR=function(b){let E,z,O,F,Z;try{for(E=this.parseCIDR(b),O=E[0].toByteArray(),Z=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],z=0;z<4;)F.push(parseInt(O[z],10)&parseInt(Z[z],10)),z++;return new this(F)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},U.IPv4.parse=function(b){let E=this.parser(b);if(E===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(E)},U.IPv4.parseCIDR=function(b){let E;if(E=b.match(/^(.+)\/(\d+)$/)){let z=parseInt(E[2]);if(z>=0&&z<=32){let O=[this.parse(E[1]),z];return Object.defineProperty(O,"toString",{value:o(function(){return this.join("/")},"value")}),O}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},U.IPv4.parser=function(b){let E,z,O;if(E=b.match(i.fourOctet))return(function(){let F=E.slice(1,6),Z=[];for(let ae=0;ae<F.length;ae++)z=F[ae],Z.push(A(z));return Z})();if(E=b.match(i.longValue)){if(O=A(E[1]),O>4294967295||O<0)throw new Error("ipaddr: address outside defined range");return(function(){let F=[],Z;for(Z=0;Z<=24;Z+=8)F.push(O>>Z&255);return F})().reverse()}else return(E=b.match(i.twoOctet))?(function(){let F=E.slice(1,4),Z=[];if(O=A(F[1]),O>16777215||O<0)throw new Error("ipaddr: address outside defined range");return Z.push(A(F[0])),Z.push(O>>16&255),Z.push(O>>8&255),Z.push(O&255),Z})():(E=b.match(i.threeOctet))?(function(){let F=E.slice(1,5),Z=[];if(O=A(F[2]),O>65535||O<0)throw new Error("ipaddr: address outside defined range");return Z.push(A(F[0])),Z.push(A(F[1])),Z.push(O>>8&255),Z.push(O&255),Z})():null},U.IPv4.subnetMaskFromPrefixLength=function(b){if(b=parseInt(b),b<0||b>32)throw new Error("ipaddr: invalid IPv4 prefix length");let E=[0,0,0,0],z=0,O=Math.floor(b/8);for(;z<O;)E[z]=255,z++;return O<4&&(E[O]=Math.pow(2,b%8)-1<<8-b%8),new this(E)},U.IPv6=(function(){function b(E,z){let O,F;if(E.length===16)for(this.parts=[],O=0;O<=14;O+=2)this.parts.push(E[O]<<8|E[O+1]);else if(E.length===8)this.parts=E;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(O=0;O<this.parts.length;O++)if(F=this.parts[O],!(0<=F&&F<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");z&&(this.zoneId=z)}return o(b,"IPv6"),b.prototype.SpecialRanges={unspecified:[new b([0,0,0,0,0,0,0,0]),128],linkLocal:[new b([65152,0,0,0,0,0,0,0]),10],multicast:[new b([65280,0,0,0,0,0,0,0]),8],loopback:[new b([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new b([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new b([0,0,0,0,0,65535,0,0]),96],discard:[new b([256,0,0,0,0,0,0,0]),64],rfc6145:[new b([0,0,0,0,65535,0,0,0]),96],rfc6052:[new b([100,65435,0,0,0,0,0,0]),96],"6to4":[new b([8194,0,0,0,0,0,0,0]),16],teredo:[new b([8193,0,0,0,0,0,0,0]),32],benchmarking:[new b([8193,2,0,0,0,0,0,0]),48],amt:[new b([8193,3,0,0,0,0,0,0]),32],as112v6:[[new b([8193,4,274,0,0,0,0,0]),48],[new b([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new b([8193,16,0,0,0,0,0,0]),28],orchid2:[new b([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new b([8193,48,0,0,0,0,0,0]),28],reserved:[[new b([8193,0,0,0,0,0,0,0]),23],[new b([8193,3512,0,0,0,0,0,0]),32]]},b.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},b.prototype.kind=function(){return"ipv6"},b.prototype.match=function(E,z){let O;if(z===void 0&&(O=E,E=O[0],z=O[1]),E.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return _(this.parts,E.parts,16,z)},b.prototype.prefixLengthFromSubnetMask=function(){let E=0,z=!1,O={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},F,Z;for(let ae=7;ae>=0;ae-=1)if(F=this.parts[ae],F in O){if(Z=O[F],z&&Z!==0)return null;Z!==16&&(z=!0),E+=Z}else return null;return 128-E},b.prototype.range=function(){return U.subnetMatch(this,this.SpecialRanges)},b.prototype.toByteArray=function(){let E,z=[],O=this.parts;for(let F=0;F<O.length;F++)E=O[F],z.push(E>>8),z.push(E&255);return z},b.prototype.toFixedLengthString=function(){let E=(function(){let O=[];for(let F=0;F<this.parts.length;F++)O.push(k(this.parts[F].toString(16),4));return O}).call(this).join(":"),z="";return this.zoneId&&(z=`%${this.zoneId}`),E+z},b.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let E=this.parts.slice(-2),z=E[0],O=E[1];return new U.IPv4([z>>8,z&255,O>>8,O&255])},b.prototype.toNormalizedString=function(){let E=(function(){let O=[];for(let F=0;F<this.parts.length;F++)O.push(this.parts[F].toString(16));return O}).call(this).join(":"),z="";return this.zoneId&&(z=`%${this.zoneId}`),E+z},b.prototype.toRFC5952String=function(){let E=/((^|:)(0(:|$)){2,})/g,z=this.toNormalizedString(),O=0,F=-1,Z;for(;Z=E.exec(z);)Z[0].length>F&&(O=Z.index,F=Z[0].length);return F<0?z:`${z.substring(0,O)}::${z.substring(O+F)}`},b.prototype.toString=function(){return this.toRFC5952String()},b})(),U.IPv6.broadcastAddressFromCIDR=function(b){try{let E=this.parseCIDR(b),z=E[0].toByteArray(),O=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],Z=0;for(;Z<16;)F.push(parseInt(z[Z],10)|parseInt(O[Z],10)^255),Z++;return new this(F)}catch(E){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${E})`)}},U.IPv6.isIPv6=function(b){return this.parser(b)!==null},U.IPv6.isValid=function(b){if(typeof b=="string"&&b.indexOf(":")===-1)return!1;try{let E=this.parser(b);return new this(E.parts,E.zoneId),!0}catch{return!1}},U.IPv6.isValidCIDR=function(b){if(typeof b=="string"&&b.indexOf(":")===-1)return!1;try{return this.parseCIDR(b),!0}catch{return!1}},U.IPv6.networkAddressFromCIDR=function(b){let E,z,O,F,Z;try{for(E=this.parseCIDR(b),O=E[0].toByteArray(),Z=this.subnetMaskFromPrefixLength(E[1]).toByteArray(),F=[],z=0;z<16;)F.push(parseInt(O[z],10)&parseInt(Z[z],10)),z++;return new this(F)}catch(ae){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${ae})`)}},U.IPv6.parse=function(b){let E=this.parser(b);if(E.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(E.parts,E.zoneId)},U.IPv6.parseCIDR=function(b){let E,z,O;if((z=b.match(/^(.+)\/(\d+)$/))&&(E=parseInt(z[2]),E>=0&&E<=128))return O=[this.parse(z[1]),E],Object.defineProperty(O,"toString",{value:o(function(){return this.join("/")},"value")}),O;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},U.IPv6.parser=function(b){let E,z,O,F,Z,ae;if(O=b.match(m.deprecatedTransitional))return this.parser(`::ffff:${O[1]}`);if(m.native.test(b))return v(b,8);if((O=b.match(m.transitional))&&(ae=O[6]||"",E=O[1],O[1].endsWith("::")||(E=E.slice(0,-1)),E=v(E+ae,6),E.parts)){for(Z=[parseInt(O[2]),parseInt(O[3]),parseInt(O[4]),parseInt(O[5])],z=0;z<Z.length;z++)if(F=Z[z],!(0<=F&&F<=255))return null;return E.parts.push(Z[0]<<8|Z[1]),E.parts.push(Z[2]<<8|Z[3]),{parts:E.parts,zoneId:E.zoneId}}return null},U.IPv6.subnetMaskFromPrefixLength=function(b){if(b=parseInt(b),b<0||b>128)throw new Error("ipaddr: invalid IPv6 prefix length");let E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],z=0,O=Math.floor(b/8);for(;z<O;)E[z]=255,z++;return O<16&&(E[O]=Math.pow(2,b%8)-1<<8-b%8),new this(E)},U.fromByteArray=function(b){let E=b.length;if(E===4)return new U.IPv4(b);if(E===16)return new U.IPv6(b);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},U.isValid=function(b){return U.IPv6.isValid(b)||U.IPv4.isValid(b)},U.isValidCIDR=function(b){return U.IPv6.isValidCIDR(b)||U.IPv4.isValidCIDR(b)},U.parse=function(b){if(U.IPv6.isValid(b))return U.IPv6.parse(b);if(U.IPv4.isValid(b))return U.IPv4.parse(b);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},U.parseCIDR=function(b){try{return U.IPv6.parseCIDR(b)}catch{try{return U.IPv4.parseCIDR(b)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},U.process=function(b){let E=this.parse(b);return E.kind()==="ipv6"&&E.isIPv4MappedAddress()?E.toIPv4Address():E},U.subnetMatch=function(b,E,z){let O,F,Z,ae;z==null&&(z="unicast");for(F in E)if(Object.prototype.hasOwnProperty.call(E,F)){for(Z=E[F],Z[0]&&!(Z[0]instanceof Array)&&(Z=[Z]),O=0;O<Z.length;O++)if(ae=Z[O],b.kind()===ae[0].kind()&&b.match.apply(b,ae))return F}return z},typeof za<"u"&&za.exports?za.exports=U:e.ipaddr=U})(ih)});var ig=L((ZK,ng)=>{var rg=require("stream").Stream,Iz=require("util");ng.exports=tr;function tr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(tr,"DelayedStream");Iz.inherits(tr,rg);tr.create=function(e,r){var i=new this;r=r||{};for(var a in r)i[a]=r[a];i.source=e;var u=e.emit;return e.emit=function(){return i._handleEmit(arguments),u.apply(e,arguments)},e.on("error",function(){}),i.pauseStream&&e.pause(),i};Object.defineProperty(tr.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});tr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};tr.prototype.resume=function(){this._released||this.release(),this.source.resume()};tr.prototype.pause=function(){this.source.pause()};tr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};tr.prototype.pipe=function(){var e=rg.prototype.pipe.apply(this,arguments);return this.resume(),e};tr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};tr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var ug=L((WK,sg)=>{var $z=require("util"),ag=require("stream").Stream,og=ig();sg.exports=Ve;function Ve(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(Ve,"CombinedStream");$z.inherits(Ve,ag);Ve.create=function(e){var r=new this;e=e||{};for(var i in e)r[i]=e[i];return r};Ve.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Ve.prototype.append=function(e){var r=Ve.isStreamLike(e);if(r){if(!(e instanceof og)){var i=og.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=i}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Ve.prototype.pipe=function(e,r){return ag.prototype.pipe.call(this,e,r),this.resume(),e};Ve.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Ve.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var r=e;r(function(i){var a=Ve.isStreamLike(i);a&&(i.on("data",this._checkDataSize.bind(this)),this._handleErrors(i)),this._pipeNext(i)}.bind(this))};Ve.prototype._pipeNext=function(e){this._currentStream=e;var r=Ve.isStreamLike(e);if(r){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var i=e;this.write(i),this._getNext()};Ve.prototype._handleErrors=function(e){var r=this;e.on("error",function(i){r._emitError(i)})};Ve.prototype.write=function(e){this.emit("data",e)};Ve.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Ve.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};Ve.prototype.end=function(){this._reset(),this.emit("end")};Ve.prototype.destroy=function(){this._reset(),this.emit("close")};Ve.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Ve.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Ve.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(r){r.dataSize&&(e.dataSize+=r.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Ve.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var lg=L((JK,cg)=>{"use strict";cg.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var mg=L(At=>{"use strict";var qa=lg(),Rz=require("path").extname,pg=/^\s*([^;\s]*)(?:;|\s|$)/,kz=/^text\//i;At.charset=dg;At.charsets={lookup:dg};At.contentType=Oz;At.extension=Nz;At.extensions=Object.create(null);At.lookup=zz;At.types=Object.create(null);Cz(At.extensions,At.types);function dg(e){if(!e||typeof e!="string")return!1;var r=pg.exec(e),i=r&&qa[r[1].toLowerCase()];return i&&i.charset?i.charset:r&&kz.test(r[1])?"UTF-8":!1}o(dg,"charset");function Oz(e){if(!e||typeof e!="string")return!1;var r=e.indexOf("/")===-1?At.lookup(e):e;if(!r)return!1;if(r.indexOf("charset")===-1){var i=At.charset(r);i&&(r+="; charset="+i.toLowerCase())}return r}o(Oz,"contentType");function Nz(e){if(!e||typeof e!="string")return!1;var r=pg.exec(e),i=r&&At.extensions[r[1].toLowerCase()];return!i||!i.length?!1:i[0]}o(Nz,"extension");function zz(e){if(!e||typeof e!="string")return!1;var r=Rz("x."+e).toLowerCase().substr(1);return r&&At.types[r]||!1}o(zz,"lookup");function Cz(e,r){var i=["nginx","apache",void 0,"iana"];Object.keys(qa).forEach(o(function(u){var c=qa[u],p=c.extensions;if(!(!p||!p.length)){e[u]=p;for(var m=0;m<p.length;m++){var v=p[m];if(r[v]){var _=i.indexOf(qa[r[v]].source),A=i.indexOf(c.source);if(r[v]!=="application/octet-stream"&&(_>A||_===A&&r[v].substr(0,12)==="application/"))continue}r[v]=u}}},"forEachMimeType"))}o(Cz,"populateMaps")});var hg=L((QK,fg)=>{fg.exports=Dz;function Dz(e){var r=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;r?r(e):setTimeout(e,0)}o(Dz,"defer")});var jc=L((t8,yg)=>{var gg=hg();yg.exports=Lz;function Lz(e){var r=!1;return gg(function(){r=!0}),o(function(a,u){r?e(a,u):gg(o(function(){e(a,u)},"nextTick_callback"))},"async_callback")}o(Lz,"async")});var Bc=L((n8,bg)=>{bg.exports=Uz;function Uz(e){Object.keys(e.jobs).forEach(Mz.bind(e)),e.jobs={}}o(Uz,"abort");function Mz(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Mz,"clean")});var Fc=L((o8,_g)=>{var vg=jc(),qz=Bc();_g.exports=jz;function jz(e,r,i,a){var u=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[u]=Bz(r,u,e[u],function(c,p){u in i.jobs&&(delete i.jobs[u],c?qz(i):i.results[u]=p,a(c,i.results))})}o(jz,"iterate");function Bz(e,r,i,a){var u;return e.length==2?u=e(i,vg(a)):u=e(i,r,vg(a)),u}o(Bz,"runJob")});var Hc=L((s8,xg)=>{xg.exports=Fz;function Fz(e,r){var i=!Array.isArray(e),a={index:0,keyedList:i||r?Object.keys(e):null,jobs:{},results:i?{}:[],size:i?Object.keys(e).length:e.length};return r&&a.keyedList.sort(i?r:function(u,c){return r(e[u],e[c])}),a}o(Fz,"state")});var Gc=L((c8,Pg)=>{var Hz=Bc(),Gz=jc();Pg.exports=Zz;function Zz(e){Object.keys(this.jobs).length&&(this.index=this.size,Hz(this),Gz(e)(null,this.results))}o(Zz,"terminator")});var Ag=L((p8,wg)=>{var Vz=Fc(),Wz=Hc(),Kz=Gc();wg.exports=Jz;function Jz(e,r,i){for(var a=Wz(e);a.index<(a.keyedList||e).length;)Vz(e,r,a,function(u,c){if(u){i(u,c);return}if(Object.keys(a.jobs).length===0){i(null,a.results);return}}),a.index++;return Kz.bind(a,i)}o(Jz,"parallel")});var Zc=L((m8,ja)=>{var Tg=Fc(),Xz=Hc(),Yz=Gc();ja.exports=Qz;ja.exports.ascending=Sg;ja.exports.descending=e0;function Qz(e,r,i,a){var u=Xz(e,i);return Tg(e,r,u,o(function c(p,m){if(p){a(p,m);return}if(u.index++,u.index<(u.keyedList||e).length){Tg(e,r,u,c);return}a(null,u.results)},"iteratorHandler")),Yz.bind(u,a)}o(Qz,"serialOrdered");function Sg(e,r){return e<r?-1:e>r?1:0}o(Sg,"ascending");function e0(e,r){return-1*Sg(e,r)}o(e0,"descending")});var Ig=L((h8,Eg)=>{var t0=Zc();Eg.exports=r0;function r0(e,r,i){return t0(e,r,null,i)}o(r0,"serial")});var Rg=L((y8,$g)=>{$g.exports={parallel:Ag(),serial:Ig(),serialOrdered:Zc()}});var Vc=L((b8,kg)=>{"use strict";kg.exports=Object});var Ng=L((v8,Og)=>{"use strict";Og.exports=Error});var Cg=L((_8,zg)=>{"use strict";zg.exports=EvalError});var Lg=L((x8,Dg)=>{"use strict";Dg.exports=RangeError});var Mg=L((P8,Ug)=>{"use strict";Ug.exports=ReferenceError});var jg=L((w8,qg)=>{"use strict";qg.exports=SyntaxError});var Ba=L((A8,Bg)=>{"use strict";Bg.exports=TypeError});var Hg=L((T8,Fg)=>{"use strict";Fg.exports=URIError});var Zg=L((S8,Gg)=>{"use strict";Gg.exports=Math.abs});var Wg=L((E8,Vg)=>{"use strict";Vg.exports=Math.floor});var Jg=L((I8,Kg)=>{"use strict";Kg.exports=Math.max});var Yg=L(($8,Xg)=>{"use strict";Xg.exports=Math.min});var ey=L((R8,Qg)=>{"use strict";Qg.exports=Math.pow});var ry=L((k8,ty)=>{"use strict";ty.exports=Math.round});var iy=L((O8,ny)=>{"use strict";ny.exports=Number.isNaN||o(function(r){return r!==r},"isNaN")});var ay=L((z8,oy)=>{"use strict";var n0=iy();oy.exports=o(function(r){return n0(r)||r===0?r:r<0?-1:1},"sign")});var uy=L((D8,sy)=>{"use strict";sy.exports=Object.getOwnPropertyDescriptor});var Wc=L((L8,cy)=>{"use strict";var Fa=uy();if(Fa)try{Fa([],"length")}catch{Fa=null}cy.exports=Fa});var py=L((U8,ly)=>{"use strict";var Ha=Object.defineProperty||!1;if(Ha)try{Ha({},"a",{value:1})}catch{Ha=!1}ly.exports=Ha});var Kc=L((M8,dy)=>{"use strict";dy.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},i=Symbol("test"),a=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var u=42;r[i]=u;for(var c in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var p=Object.getOwnPropertySymbols(r);if(p.length!==1||p[0]!==i||!Object.prototype.propertyIsEnumerable.call(r,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(r,i);if(m.value!==u||m.enumerable!==!0)return!1}return!0},"hasSymbols")});var hy=L((j8,fy)=>{"use strict";var my=typeof Symbol<"u"&&Symbol,i0=Kc();fy.exports=o(function(){return typeof my!="function"||typeof Symbol!="function"||typeof my("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i0()},"hasNativeSymbols")});var Jc=L((F8,gy)=>{"use strict";gy.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Xc=L((H8,yy)=>{"use strict";var o0=Vc();yy.exports=o0.getPrototypeOf||null});var _y=L((G8,vy)=>{"use strict";var a0="Function.prototype.bind called on incompatible ",s0=Object.prototype.toString,u0=Math.max,c0="[object Function]",by=o(function(r,i){for(var a=[],u=0;u<r.length;u+=1)a[u]=r[u];for(var c=0;c<i.length;c+=1)a[c+r.length]=i[c];return a},"concatty"),l0=o(function(r,i){for(var a=[],u=i||0,c=0;u<r.length;u+=1,c+=1)a[c]=r[u];return a},"slicy"),p0=o(function(e,r){for(var i="",a=0;a<e.length;a+=1)i+=e[a],a+1<e.length&&(i+=r);return i},"joiny");vy.exports=o(function(r){var i=this;if(typeof i!="function"||s0.apply(i)!==c0)throw new TypeError(a0+i);for(var a=l0(arguments,1),u,c=o(function(){if(this instanceof u){var A=i.apply(this,by(a,arguments));return Object(A)===A?A:this}return i.apply(r,by(a,arguments))},"binder"),p=u0(0,i.length-a.length),m=[],v=0;v<p;v++)m[v]="$"+v;if(u=Function("binder","return function ("+p0(m,",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var _=o(function(){},"Empty");_.prototype=i.prototype,u.prototype=new _,_.prototype=null}return u},"bind")});var Hn=L((V8,xy)=>{"use strict";var d0=_y();xy.exports=Function.prototype.bind||d0});var Ga=L((W8,Py)=>{"use strict";Py.exports=Function.prototype.call});var Yc=L((K8,wy)=>{"use strict";wy.exports=Function.prototype.apply});var Ty=L((J8,Ay)=>{"use strict";Ay.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ey=L((X8,Sy)=>{"use strict";var m0=Hn(),f0=Yc(),h0=Ga(),g0=Ty();Sy.exports=g0||m0.call(h0,f0)});var $y=L((Y8,Iy)=>{"use strict";var y0=Hn(),b0=Ba(),v0=Ga(),_0=Ey();Iy.exports=o(function(r){if(r.length<1||typeof r[0]!="function")throw new b0("a function is required");return _0(y0,v0,r)},"callBindBasic")});var Cy=L((e9,zy)=>{"use strict";var x0=$y(),Ry=Wc(),Oy;try{Oy=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Qc=!!Oy&&Ry&&Ry(Object.prototype,"__proto__"),Ny=Object,ky=Ny.getPrototypeOf;zy.exports=Qc&&typeof Qc.get=="function"?x0([Qc.get]):typeof ky=="function"?o(function(r){return ky(r==null?r:Ny(r))},"getDunder"):!1});var qy=L((r9,My)=>{"use strict";var Dy=Jc(),Ly=Xc(),Uy=Cy();My.exports=Dy?o(function(r){return Dy(r)},"getProto"):Ly?o(function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return Ly(r)},"getProto"):Uy?o(function(r){return Uy(r)},"getProto"):null});var el=L((i9,jy)=>{"use strict";var P0=Function.prototype.call,w0=Object.prototype.hasOwnProperty,A0=Hn();jy.exports=A0.call(P0,w0)});var Wy=L((o9,Vy)=>{"use strict";var Ae,T0=Vc(),S0=Ng(),E0=Cg(),I0=Lg(),$0=Mg(),Wn=jg(),Vn=Ba(),R0=Hg(),k0=Zg(),O0=Wg(),N0=Jg(),z0=Yg(),C0=ey(),D0=ry(),L0=ay(),Gy=Function,tl=o(function(e){try{return Gy('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ro=Wc(),U0=py(),rl=o(function(){throw new Vn},"throwTypeError"),M0=ro?(function(){try{return arguments.callee,rl}catch{try{return ro(arguments,"callee").get}catch{return rl}}})():rl,Gn=hy()(),it=qy(),q0=Xc(),j0=Jc(),Zy=Yc(),no=Ga(),Zn={},B0=typeof Uint8Array>"u"||!it?Ae:it(Uint8Array),hn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ae:ArrayBuffer,"%ArrayIteratorPrototype%":Gn&&it?it([][Symbol.iterator]()):Ae,"%AsyncFromSyncIteratorPrototype%":Ae,"%AsyncFunction%":Zn,"%AsyncGenerator%":Zn,"%AsyncGeneratorFunction%":Zn,"%AsyncIteratorPrototype%":Zn,"%Atomics%":typeof Atomics>"u"?Ae:Atomics,"%BigInt%":typeof BigInt>"u"?Ae:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ae:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ae:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":S0,"%eval%":eval,"%EvalError%":E0,"%Float16Array%":typeof Float16Array>"u"?Ae:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ae:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ae:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ae:FinalizationRegistry,"%Function%":Gy,"%GeneratorFunction%":Zn,"%Int8Array%":typeof Int8Array>"u"?Ae:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ae:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Gn&&it?it(it([][Symbol.iterator]())):Ae,"%JSON%":typeof JSON=="object"?JSON:Ae,"%Map%":typeof Map>"u"?Ae:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Gn||!it?Ae:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":T0,"%Object.getOwnPropertyDescriptor%":ro,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ae:Promise,"%Proxy%":typeof Proxy>"u"?Ae:Proxy,"%RangeError%":I0,"%ReferenceError%":$0,"%Reflect%":typeof Reflect>"u"?Ae:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ae:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Gn||!it?Ae:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Gn&&it?it(""[Symbol.iterator]()):Ae,"%Symbol%":Gn?Symbol:Ae,"%SyntaxError%":Wn,"%ThrowTypeError%":M0,"%TypedArray%":B0,"%TypeError%":Vn,"%Uint8Array%":typeof Uint8Array>"u"?Ae:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ae:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ae:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ae:Uint32Array,"%URIError%":R0,"%WeakMap%":typeof WeakMap>"u"?Ae:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ae:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ae:WeakSet,"%Function.prototype.call%":no,"%Function.prototype.apply%":Zy,"%Object.defineProperty%":U0,"%Object.getPrototypeOf%":q0,"%Math.abs%":k0,"%Math.floor%":O0,"%Math.max%":N0,"%Math.min%":z0,"%Math.pow%":C0,"%Math.round%":D0,"%Math.sign%":L0,"%Reflect.getPrototypeOf%":j0};if(it)try{null.error}catch(e){By=it(it(e)),hn["%Error.prototype%"]=By}var By,F0=o(function e(r){var i;if(r==="%AsyncFunction%")i=tl("async function () {}");else if(r==="%GeneratorFunction%")i=tl("function* () {}");else if(r==="%AsyncGeneratorFunction%")i=tl("async function* () {}");else if(r==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(i=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var u=e("%AsyncGenerator%");u&&it&&(i=it(u.prototype))}return hn[r]=i,i},"doEval"),Fy={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},io=Hn(),Za=el(),H0=io.call(no,Array.prototype.concat),G0=io.call(Zy,Array.prototype.splice),Hy=io.call(no,String.prototype.replace),Va=io.call(no,String.prototype.slice),Z0=io.call(no,RegExp.prototype.exec),V0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W0=/\\(\\)?/g,K0=o(function(r){var i=Va(r,0,1),a=Va(r,-1);if(i==="%"&&a!=="%")throw new Wn("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&i!=="%")throw new Wn("invalid intrinsic syntax, expected opening `%`");var u=[];return Hy(r,V0,function(c,p,m,v){u[u.length]=m?Hy(v,W0,"$1"):p||c}),u},"stringToPath"),J0=o(function(r,i){var a=r,u;if(Za(Fy,a)&&(u=Fy[a],a="%"+u[0]+"%"),Za(hn,a)){var c=hn[a];if(c===Zn&&(c=F0(a)),typeof c>"u"&&!i)throw new Vn("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:u,name:a,value:c}}throw new Wn("intrinsic "+r+" does not exist!")},"getBaseIntrinsic");Vy.exports=o(function(r,i){if(typeof r!="string"||r.length===0)throw new Vn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof i!="boolean")throw new Vn('"allowMissing" argument must be a boolean');if(Z0(/^%?[^%]*%?$/,r)===null)throw new Wn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=K0(r),u=a.length>0?a[0]:"",c=J0("%"+u+"%",i),p=c.name,m=c.value,v=!1,_=c.alias;_&&(u=_[0],G0(a,H0([0,1],_)));for(var A=1,k=!0;A<a.length;A+=1){var U=a[A],b=Va(U,0,1),E=Va(U,-1);if((b==='"'||b==="'"||b==="`"||E==='"'||E==="'"||E==="`")&&b!==E)throw new Wn("property names with quotes must have matching quotes");if((U==="constructor"||!k)&&(v=!0),u+="."+U,p="%"+u+"%",Za(hn,p))m=hn[p];else if(m!=null){if(!(U in m)){if(!i)throw new Vn("base intrinsic for "+r+" exists, but the property is not available.");return}if(ro&&A+1>=a.length){var z=ro(m,U);k=!!z,k&&"get"in z&&!("originalValue"in z.get)?m=z.get:m=m[U]}else k=Za(m,U),m=m[U];k&&!v&&(hn[p]=m)}}return m},"GetIntrinsic")});var Jy=L((s9,Ky)=>{"use strict";var X0=Kc();Ky.exports=o(function(){return X0()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Qy=L((c9,Yy)=>{"use strict";var Y0=Wy(),Xy=Y0("%Object.defineProperty%",!0),Q0=Jy()(),eC=el(),tC=Ba(),Wa=Q0?Symbol.toStringTag:null;Yy.exports=o(function(r,i){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force,u=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a<"u"&&typeof a!="boolean"||typeof u<"u"&&typeof u!="boolean")throw new tC("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Wa&&(a||!eC(r,Wa))&&(Xy?Xy(r,Wa,{configurable:!u,enumerable:!1,value:i,writable:!1}):r[Wa]=i)},"setToStringTag")});var tb=L((p9,eb)=>{"use strict";var rC=Function.prototype.call,nC=Object.prototype.hasOwnProperty,iC=Hn();eb.exports=iC.call(rC,nC)});var nb=L((d9,rb)=>{"use strict";rb.exports=function(e,r){return Object.keys(r).forEach(function(i){e[i]=e[i]||r[i]}),e}});var ab=L((m9,ob)=>{"use strict";var al=ug(),oC=require("util"),nl=require("path"),aC=require("http"),sC=require("https"),uC=require("url").parse,cC=require("fs"),lC=require("stream").Stream,pC=require("crypto"),il=mg(),dC=Rg(),mC=Qy(),Wr=tb(),ol=nb();function ib(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(ib,"escapeHeaderParam");function Ee(e){if(!(this instanceof Ee))return new Ee(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],al.call(this),e=e||{};for(var r in e)this[r]=e[r]}o(Ee,"FormData");oC.inherits(Ee,al);Ee.LINE_BREAK=`\r
|
|
2
2
|
`;Ee.DEFAULT_CONTENT_TYPE="application/octet-stream";Ee.prototype.append=function(e,r,i){i=i||{},typeof i=="string"&&(i={filename:i});var a=al.prototype.append.bind(this);if((typeof r=="number"||r==null)&&(r=String(r)),Array.isArray(r)){this._error(new Error("Arrays are not supported."));return}var u=this._multiPartHeader(e,r,i),c=this._multiPartFooter();a(u),a(r),a(c),this._trackLength(u,r,i)};Ee.prototype._trackLength=function(e,r,i){var a=0;i.knownLength!=null?a+=Number(i.knownLength):Buffer.isBuffer(r)?a=r.length:typeof r=="string"&&(a=Buffer.byteLength(r)),this._valueLength+=a,this._overheadLength+=Buffer.byteLength(e)+Ee.LINE_BREAK.length,!(!r||!r.path&&!(r.readable&&Wr(r,"httpVersion"))&&!(r instanceof lC))&&(i.knownLength||this._valuesToMeasure.push(r))};Ee.prototype._lengthRetriever=function(e,r){Wr(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?r(null,e.end+1-(e.start?e.start:0)):cC.stat(e.path,function(i,a){if(i){r(i);return}var u=a.size-(e.start?e.start:0);r(null,u)}):Wr(e,"httpVersion")?r(null,Number(e.headers["content-length"])):Wr(e,"httpModule")?(e.on("response",function(i){e.pause(),r(null,Number(i.headers["content-length"]))}),e.resume()):r("Unknown stream")};Ee.prototype._multiPartHeader=function(e,r,i){if(typeof i.header=="string")return i.header;var a=this._getContentDisposition(r,i),u=this._getContentType(r,i),c="",p={"Content-Disposition":["form-data",'name="'+ib(e)+'"'].concat(a||[]),"Content-Type":[].concat(u||[])};typeof i.header=="object"&&ol(p,i.header);var m;for(var v in p)if(Wr(p,v)){if(m=p[v],m==null)continue;Array.isArray(m)||(m=[m]),m.length&&(c+=v+": "+m.join("; ")+Ee.LINE_BREAK)}return"--"+this.getBoundary()+Ee.LINE_BREAK+c+Ee.LINE_BREAK};Ee.prototype._getContentDisposition=function(e,r){var i;if(typeof r.filepath=="string"?i=nl.normalize(r.filepath).replace(/\\/g,"/"):r.filename||e&&(e.name||e.path)?i=nl.basename(r.filename||e&&(e.name||e.path)):e&&e.readable&&Wr(e,"httpVersion")&&(i=nl.basename(e.client._httpMessage.path||"")),i)return'filename="'+ib(i)+'"'};Ee.prototype._getContentType=function(e,r){var i=r.contentType;return!i&&e&&e.name&&(i=il.lookup(e.name)),!i&&e&&e.path&&(i=il.lookup(e.path)),!i&&e&&e.readable&&Wr(e,"httpVersion")&&(i=e.headers["content-type"]),!i&&(r.filepath||r.filename)&&(i=il.lookup(r.filepath||r.filename)),!i&&e&&typeof e=="object"&&(i=Ee.DEFAULT_CONTENT_TYPE),i};Ee.prototype._multiPartFooter=function(){return function(e){var r=Ee.LINE_BREAK,i=this._streams.length===0;i&&(r+=this._lastBoundary()),e(r)}.bind(this)};Ee.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ee.LINE_BREAK};Ee.prototype.getHeaders=function(e){var r,i={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(r in e)Wr(e,r)&&(i[r.toLowerCase()]=e[r]);return i};Ee.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Ee.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ee.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),r=this.getBoundary(),i=0,a=this._streams.length;i<a;i++)typeof this._streams[i]!="function"&&(Buffer.isBuffer(this._streams[i])?e=Buffer.concat([e,this._streams[i]]):e=Buffer.concat([e,Buffer.from(this._streams[i])]),(typeof this._streams[i]!="string"||this._streams[i].substring(2,r.length+2)!==r)&&(e=Buffer.concat([e,Buffer.from(Ee.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Ee.prototype._generateBoundary=function(){this._boundary="--------------------------"+pC.randomBytes(12).toString("hex")};Ee.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Ee.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Ee.prototype.getLength=function(e){var r=this._overheadLength+this._valueLength;if(this._streams.length&&(r+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,r));return}dC.parallel(this._valuesToMeasure,this._lengthRetriever,function(i,a){if(i){e(i);return}a.forEach(function(u){r+=u}),e(null,r)})};Ee.prototype.submit=function(e,r){var i,a,u={method:"post"};return typeof e=="string"?(e=uC(e),a=ol({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},u)):(a=ol(e,u),a.port||(a.port=a.protocol==="https:"?443:80)),a.headers=this.getHeaders(e.headers),a.protocol==="https:"?i=sC.request(a):i=aC.request(a),this.getLength(function(c,p){if(c&&c!=="Unknown stream"){this._error(c);return}if(p&&i.setHeader("Content-Length",p),this.pipe(i),r){var m,v=o(function(_,A){return i.removeListener("error",v),i.removeListener("response",m),r.call(this,_,A)},"callback");m=v.bind(this,null),i.on("error",v),i.on("response",m)}}.bind(this)),i};Ee.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Ee.prototype.toString=function(){return"[object FormData]"};mC(Ee.prototype,"FormData");ob.exports=Ee});var Kn=L((sl,lb)=>{var Ka=require("buffer"),pr=Ka.Buffer;function cb(e,r){for(var i in e)r[i]=e[i]}o(cb,"copyProps");pr.from&&pr.alloc&&pr.allocUnsafe&&pr.allocUnsafeSlow?lb.exports=Ka:(cb(Ka,sl),sl.Buffer=gn);function gn(e,r,i){return pr(e,r,i)}o(gn,"SafeBuffer");gn.prototype=Object.create(pr.prototype);cb(pr,gn);gn.from=function(e,r,i){if(typeof e=="number")throw new TypeError("Argument must not be a number");return pr(e,r,i)};gn.alloc=function(e,r,i){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=pr(e);return r!==void 0?typeof i=="string"?a.fill(r,i):a.fill(r):a.fill(0),a};gn.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return pr(e)};gn.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ka.SlowBuffer(e)}});var ul=L((z9,pb)=>{var Ja=Kn().Buffer,xC=require("stream"),PC=require("util");function Xa(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=Ja.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=Ja.alloc(0),e.pipe(this),this;if(e.length||typeof e=="object")return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}o(Xa,"DataStream");PC.inherits(Xa,xC);Xa.prototype.write=o(function(r){this.buffer=Ja.concat([this.buffer,Ja.from(r)]),this.emit("data",r)},"write");Xa.prototype.end=o(function(r){r&&this.write(r),this.emit("end",r),this.emit("close"),this.writable=!1,this.readable=!1},"end");pb.exports=Xa});var mb=L((D9,db)=>{"use strict";function cl(e){var r=(e/8|0)+(e%8===0?0:1);return r}o(cl,"getParamSize");var wC={ES256:cl(256),ES384:cl(384),ES512:cl(521)};function AC(e){var r=wC[e];if(r)return r;throw new Error('Unknown algorithm "'+e+'"')}o(AC,"getParamBytesForAlg");db.exports=AC});var _b=L((U9,vb)=>{"use strict";var Ya=Kn().Buffer,hb=mb(),Qa=128,gb=0,TC=32,SC=16,EC=2,yb=SC|TC|gb<<6,es=EC|gb<<6;function IC(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(IC,"base64Url");function bb(e){if(Ya.isBuffer(e))return e;if(typeof e=="string")return Ya.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}o(bb,"signatureAsBuffer");function $C(e,r){e=bb(e);var i=hb(r),a=i+1,u=e.length,c=0;if(e[c++]!==yb)throw new Error('Could not find expected "seq"');var p=e[c++];if(p===(Qa|1)&&(p=e[c++]),u-c<p)throw new Error('"seq" specified length of "'+p+'", only "'+(u-c)+'" remaining');if(e[c++]!==es)throw new Error('Could not find expected "int" for "r"');var m=e[c++];if(u-c-2<m)throw new Error('"r" specified length of "'+m+'", only "'+(u-c-2)+'" available');if(a<m)throw new Error('"r" specified length of "'+m+'", max of "'+a+'" is acceptable');var v=c;if(c+=m,e[c++]!==es)throw new Error('Could not find expected "int" for "s"');var _=e[c++];if(u-c!==_)throw new Error('"s" specified length of "'+_+'", expected "'+(u-c)+'"');if(a<_)throw new Error('"s" specified length of "'+_+'", max of "'+a+'" is acceptable');var A=c;if(c+=_,c!==u)throw new Error('Expected to consume entire buffer, but "'+(u-c)+'" bytes remain');var k=i-m,U=i-_,b=Ya.allocUnsafe(k+m+U+_);for(c=0;c<k;++c)b[c]=0;e.copy(b,c,v+Math.max(-k,0),v+m),c=i;for(var E=c;c<E+U;++c)b[c]=0;return e.copy(b,c,A+Math.max(-U,0),A+_),b=b.toString("base64"),b=IC(b),b}o($C,"derToJose");function fb(e,r,i){for(var a=0;r+a<i&&e[r+a]===0;)++a;var u=e[r+a]>=Qa;return u&&--a,a}o(fb,"countPadding");function RC(e,r){e=bb(e);var i=hb(r),a=e.length;if(a!==i*2)throw new TypeError('"'+r+'" signatures must be "'+i*2+'" bytes, saw "'+a+'"');var u=fb(e,0,i),c=fb(e,i,e.length),p=i-u,m=i-c,v=2+p+1+1+m,_=v<Qa,A=Ya.allocUnsafe((_?2:3)+v),k=0;return A[k++]=yb,_?A[k++]=v:(A[k++]=Qa|1,A[k++]=v&255),A[k++]=es,A[k++]=p,u<0?(A[k++]=0,k+=e.copy(A,k,0,i)):k+=e.copy(A,k,u,i),A[k++]=es,A[k++]=m,c<0?(A[k++]=0,e.copy(A,k,i)):e.copy(A,k,i+c),A}o(RC,"joseToDer");vb.exports={derToJose:$C,joseToDer:RC}});var Pb=L((q9,xb)=>{"use strict";var oo=require("buffer").Buffer,ll=require("buffer").SlowBuffer;xb.exports=ts;function ts(e,r){if(!oo.isBuffer(e)||!oo.isBuffer(r)||e.length!==r.length)return!1;for(var i=0,a=0;a<e.length;a++)i|=e[a]^r[a];return i===0}o(ts,"bufferEq");ts.install=function(){oo.prototype.equal=ll.prototype.equal=o(function(r){return ts(this,r)},"equal")};var kC=oo.prototype.equal,OC=ll.prototype.equal;ts.restore=function(){oo.prototype.equal=kC,ll.prototype.equal=OC}});var fl=L((B9,kb)=>{var Xn=Kn().Buffer,Ht=require("crypto"),Ab=_b(),wb=require("util"),NC=`"%s" is not a valid algorithm.
|
|
3
3
|
Supported algorithms are:
|
|
4
4
|
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,ao="secret must be a string or buffer",Jn="key must be a string or a buffer",zC="key must be a string, a buffer or an object",dl=typeof Ht.createPublicKey=="function";dl&&(Jn+=" or a KeyObject",ao+="or a KeyObject");function Tb(e){if(!Xn.isBuffer(e)&&typeof e!="string"&&(!dl||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw rr(Jn)}o(Tb,"checkIsPublicKey");function Sb(e){if(!Xn.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw rr(zC)}o(Sb,"checkIsPrivateKey");function CC(e){if(!Xn.isBuffer(e)){if(typeof e=="string")return e;if(!dl||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw rr(ao)}}o(CC,"checkIsSecretKey");function ml(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(ml,"fromBase64");function Eb(e){e=e.toString();var r=4-e.length%4;if(r!==4)for(var i=0;i<r;++i)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}o(Eb,"toBase64");function rr(e){var r=[].slice.call(arguments,1),i=wb.format.bind(wb,e).apply(null,r);return new TypeError(i)}o(rr,"typeError");function DC(e){return Xn.isBuffer(e)||typeof e=="string"}o(DC,"bufferOrString");function so(e){return DC(e)||(e=JSON.stringify(e)),e}o(so,"normalizeInput");function Ib(e){return o(function(i,a){CC(a),i=so(i);var u=Ht.createHmac("sha"+e,a),c=(u.update(i),u.digest("base64"));return ml(c)},"sign")}o(Ib,"createHmacSigner");var pl,LC="timingSafeEqual"in Ht?o(function(r,i){return r.byteLength!==i.byteLength?!1:Ht.timingSafeEqual(r,i)},"timingSafeEqual"):o(function(r,i){return pl||(pl=Pb()),pl(r,i)},"timingSafeEqual");function UC(e){return o(function(i,a,u){var c=Ib(e)(i,u);return LC(Xn.from(a),Xn.from(c))},"verify")}o(UC,"createHmacVerifier");function $b(e){return o(function(i,a){Sb(a),i=so(i);var u=Ht.createSign("RSA-SHA"+e),c=(u.update(i),u.sign(a,"base64"));return ml(c)},"sign")}o($b,"createKeySigner");function Rb(e){return o(function(i,a,u){Tb(u),i=so(i),a=Eb(a);var c=Ht.createVerify("RSA-SHA"+e);return c.update(i),c.verify(u,a,"base64")},"verify")}o(Rb,"createKeyVerifier");function MC(e){return o(function(i,a){Sb(a),i=so(i);var u=Ht.createSign("RSA-SHA"+e),c=(u.update(i),u.sign({key:a,padding:Ht.constants.RSA_PKCS1_PSS_PADDING,saltLength:Ht.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return ml(c)},"sign")}o(MC,"createPSSKeySigner");function qC(e){return o(function(i,a,u){Tb(u),i=so(i),a=Eb(a);var c=Ht.createVerify("RSA-SHA"+e);return c.update(i),c.verify({key:u,padding:Ht.constants.RSA_PKCS1_PSS_PADDING,saltLength:Ht.constants.RSA_PSS_SALTLEN_DIGEST},a,"base64")},"verify")}o(qC,"createPSSKeyVerifier");function jC(e){var r=$b(e);return o(function(){var a=r.apply(null,arguments);return a=Ab.derToJose(a,"ES"+e),a},"sign")}o(jC,"createECDSASigner");function BC(e){var r=Rb(e);return o(function(a,u,c){u=Ab.joseToDer(u,"ES"+e).toString("base64");var p=r(a,u,c);return p},"verify")}o(BC,"createECDSAVerifer");function FC(){return o(function(){return""},"sign")}o(FC,"createNoneSigner");function HC(){return o(function(r,i){return i===""},"verify")}o(HC,"createNoneVerifier");kb.exports=o(function(r){var i={hs:Ib,rs:$b,ps:MC,es:jC,none:FC},a={hs:UC,rs:Rb,ps:qC,es:BC,none:HC},u=r.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!u)throw rr(NC,r);var c=(u[1]||u[3]).toLowerCase(),p=u[2];return{sign:i[c](p),verify:a[c](p)}},"jwa")});var hl=L((H9,Ob)=>{var GC=require("buffer").Buffer;Ob.exports=o(function(r){return typeof r=="string"?r:typeof r=="number"||GC.isBuffer(r)?r.toString():JSON.stringify(r)},"toString")});var Ub=L((Z9,Lb)=>{var ZC=Kn().Buffer,Nb=ul(),VC=fl(),WC=require("stream"),zb=hl(),gl=require("util");function Cb(e,r){return ZC.from(e,r).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(Cb,"base64url");function KC(e,r,i){i=i||"utf8";var a=Cb(zb(e),"binary"),u=Cb(zb(r),i);return gl.format("%s.%s",a,u)}o(KC,"jwsSecuredInput");function Db(e){var r=e.header,i=e.payload,a=e.secret||e.privateKey,u=e.encoding,c=VC(r.alg),p=KC(r,i,u),m=c.sign(p,a);return gl.format("%s.%s",p,m)}o(Db,"jwsSign");function rs(e){var r=e.secret;if(r=r??e.privateKey,r=r??e.key,/^hs/i.test(e.header.alg)===!0&&r==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var i=new Nb(r);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=i,this.payload=new Nb(e.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}o(rs,"SignStream");gl.inherits(rs,WC);rs.prototype.sign=o(function(){try{var r=Db({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",r),this.emit("data",r),this.emit("end"),this.readable=!1,r}catch(i){this.readable=!1,this.emit("error",i),this.emit("close")}},"sign");rs.sign=Db;Lb.exports=rs});var Wb=L((W9,Vb)=>{var qb=Kn().Buffer,Mb=ul(),JC=fl(),XC=require("stream"),jb=hl(),YC=require("util"),QC=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function eD(e){return Object.prototype.toString.call(e)==="[object Object]"}o(eD,"isObject");function tD(e){if(eD(e))return e;try{return JSON.parse(e)}catch{return}}o(tD,"safeJsonParse");function Bb(e){var r=e.split(".",1)[0];return tD(qb.from(r,"base64").toString("binary"))}o(Bb,"headerFromJWS");function rD(e){return e.split(".",2).join(".")}o(rD,"securedInputFromJWS");function Fb(e){return e.split(".")[2]}o(Fb,"signatureFromJWS");function nD(e,r){r=r||"utf8";var i=e.split(".")[1];return qb.from(i,"base64").toString(r)}o(nD,"payloadFromJWS");function Hb(e){return QC.test(e)&&!!Bb(e)}o(Hb,"isValidJws");function Gb(e,r,i){if(!r){var a=new Error("Missing algorithm parameter for jws.verify");throw a.code="MISSING_ALGORITHM",a}e=jb(e);var u=Fb(e),c=rD(e),p=JC(r);return p.verify(c,u,i)}o(Gb,"jwsVerify");function Zb(e,r){if(r=r||{},e=jb(e),!Hb(e))return null;var i=Bb(e);if(!i)return null;var a=nD(e);return(i.typ==="JWT"||r.json)&&(a=JSON.parse(a,r.encoding)),{header:i,payload:a,signature:Fb(e)}}o(Zb,"jwsDecode");function Yn(e){e=e||{};var r=e.secret;if(r=r??e.publicKey,r=r??e.key,/^hs/i.test(e.algorithm)===!0&&r==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var i=new Mb(r);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=i,this.signature=new Mb(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}o(Yn,"VerifyStream");YC.inherits(Yn,XC);Yn.prototype.verify=o(function(){try{var r=Gb(this.signature.buffer,this.algorithm,this.key.buffer),i=Zb(this.signature.buffer,this.encoding);return this.emit("done",r,i),this.emit("data",r),this.emit("end"),this.readable=!1,r}catch(a){this.readable=!1,this.emit("error",a),this.emit("close")}},"verify");Yn.decode=Zb;Yn.isValid=Hb;Yn.verify=Gb;Vb.exports=Yn});var is=L(Kr=>{var Kb=Ub(),ns=Wb(),iD=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];Kr.ALGORITHMS=iD;Kr.sign=Kb.sign;Kr.verify=ns.verify;Kr.decode=ns.decode;Kr.isValid=ns.isValid;Kr.createSign=o(function(r){return new Kb(r)},"createSign");Kr.createVerify=o(function(r){return new ns(r)},"createVerify")});var yl=L((Y9,Jb)=>{var oD=is();Jb.exports=function(e,r){r=r||{};var i=oD.decode(e,r);if(!i)return null;var a=i.payload;if(typeof a=="string")try{var u=JSON.parse(a);u!==null&&typeof u=="object"&&(a=u)}catch{}return r.complete===!0?{header:i.header,payload:a,signature:i.signature}:a}});var uo=L((Q9,Xb)=>{var os=o(function(e,r){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,r&&(this.inner=r)},"JsonWebTokenError");os.prototype=Object.create(Error.prototype);os.prototype.constructor=os;Xb.exports=os});var bl=L((tJ,Qb)=>{var Yb=uo(),as=o(function(e,r){Yb.call(this,e),this.name="NotBeforeError",this.date=r},"NotBeforeError");as.prototype=Object.create(Yb.prototype);as.prototype.constructor=as;Qb.exports=as});var vl=L((nJ,tv)=>{var ev=uo(),ss=o(function(e,r){ev.call(this,e),this.name="TokenExpiredError",this.expiredAt=r},"TokenExpiredError");ss.prototype=Object.create(ev.prototype);ss.prototype.constructor=ss;tv.exports=ss});var nv=L((oJ,rv)=>{var Qn=1e3,ei=Qn*60,ti=ei*60,yn=ti*24,aD=yn*7,sD=yn*365.25;rv.exports=function(e,r){r=r||{};var i=typeof e;if(i==="string"&&e.length>0)return uD(e);if(i==="number"&&isFinite(e))return r.long?lD(e):cD(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function uD(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var i=parseFloat(r[1]),a=(r[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return i*sD;case"weeks":case"week":case"w":return i*aD;case"days":case"day":case"d":return i*yn;case"hours":case"hour":case"hrs":case"hr":case"h":return i*ti;case"minutes":case"minute":case"mins":case"min":case"m":return i*ei;case"seconds":case"second":case"secs":case"sec":case"s":return i*Qn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}o(uD,"parse");function cD(e){var r=Math.abs(e);return r>=yn?Math.round(e/yn)+"d":r>=ti?Math.round(e/ti)+"h":r>=ei?Math.round(e/ei)+"m":r>=Qn?Math.round(e/Qn)+"s":e+"ms"}o(cD,"fmtShort");function lD(e){var r=Math.abs(e);return r>=yn?us(e,r,yn,"day"):r>=ti?us(e,r,ti,"hour"):r>=ei?us(e,r,ei,"minute"):r>=Qn?us(e,r,Qn,"second"):e+" ms"}o(lD,"fmtLong");function us(e,r,i,a){var u=r>=i*1.5;return Math.round(e/i)+" "+a+(u?"s":"")}o(us,"plural")});var _l=L((sJ,iv)=>{var pD=nv();iv.exports=function(e,r){var i=r||Math.floor(Date.now()/1e3);if(typeof e=="string"){var a=pD(e);return typeof a>"u"?void 0:Math.floor(i+a/1e3)}else return typeof e=="number"?i+e:void 0}});var co=L((uJ,ov)=>{"use strict";var dD="2.0.0",mD=Number.MAX_SAFE_INTEGER||9007199254740991,fD=16,hD=250,gD=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ov.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:fD,MAX_SAFE_BUILD_LENGTH:hD,MAX_SAFE_INTEGER:mD,RELEASE_TYPES:gD,SEMVER_SPEC_VERSION:dD,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lo=L((cJ,av)=>{"use strict";var yD=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};av.exports=yD});var ri=L((dr,sv)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:xl,MAX_SAFE_BUILD_LENGTH:bD,MAX_LENGTH:vD}=co(),_D=lo();dr=sv.exports={};var xD=dr.re=[],PD=dr.safeRe=[],W=dr.src=[],wD=dr.safeSrc=[],K=dr.t={},AD=0,Pl="[a-zA-Z0-9-]",TD=[["\\s",1],["\\d",vD],[Pl,bD]],SD=o(e=>{for(let[r,i]of TD)e=e.split(`${r}*`).join(`${r}{0,${i}}`).split(`${r}+`).join(`${r}{1,${i}}`);return e},"makeSafeRegex"),he=o((e,r,i)=>{let a=SD(r),u=AD++;_D(e,u,r),K[e]=u,W[u]=r,wD[u]=a,xD[u]=new RegExp(r,i?"g":void 0),PD[u]=new RegExp(a,i?"g":void 0)},"createToken");he("NUMERICIDENTIFIER","0|[1-9]\\d*");he("NUMERICIDENTIFIERLOOSE","\\d+");he("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Pl}*`);he("MAINVERSION",`(${W[K.NUMERICIDENTIFIER]})\\.(${W[K.NUMERICIDENTIFIER]})\\.(${W[K.NUMERICIDENTIFIER]})`);he("MAINVERSIONLOOSE",`(${W[K.NUMERICIDENTIFIERLOOSE]})\\.(${W[K.NUMERICIDENTIFIERLOOSE]})\\.(${W[K.NUMERICIDENTIFIERLOOSE]})`);he("PRERELEASEIDENTIFIER",`(?:${W[K.NONNUMERICIDENTIFIER]}|${W[K.NUMERICIDENTIFIER]})`);he("PRERELEASEIDENTIFIERLOOSE",`(?:${W[K.NONNUMERICIDENTIFIER]}|${W[K.NUMERICIDENTIFIERLOOSE]})`);he("PRERELEASE",`(?:-(${W[K.PRERELEASEIDENTIFIER]}(?:\\.${W[K.PRERELEASEIDENTIFIER]})*))`);he("PRERELEASELOOSE",`(?:-?(${W[K.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${W[K.PRERELEASEIDENTIFIERLOOSE]})*))`);he("BUILDIDENTIFIER",`${Pl}+`);he("BUILD",`(?:\\+(${W[K.BUILDIDENTIFIER]}(?:\\.${W[K.BUILDIDENTIFIER]})*))`);he("FULLPLAIN",`v?${W[K.MAINVERSION]}${W[K.PRERELEASE]}?${W[K.BUILD]}?`);he("FULL",`^${W[K.FULLPLAIN]}$`);he("LOOSEPLAIN",`[v=\\s]*${W[K.MAINVERSIONLOOSE]}${W[K.PRERELEASELOOSE]}?${W[K.BUILD]}?`);he("LOOSE",`^${W[K.LOOSEPLAIN]}$`);he("GTLT","((?:<|>)?=?)");he("XRANGEIDENTIFIERLOOSE",`${W[K.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);he("XRANGEIDENTIFIER",`${W[K.NUMERICIDENTIFIER]}|x|X|\\*`);he("XRANGEPLAIN",`[v=\\s]*(${W[K.XRANGEIDENTIFIER]})(?:\\.(${W[K.XRANGEIDENTIFIER]})(?:\\.(${W[K.XRANGEIDENTIFIER]})(?:${W[K.PRERELEASE]})?${W[K.BUILD]}?)?)?`);he("XRANGEPLAINLOOSE",`[v=\\s]*(${W[K.XRANGEIDENTIFIERLOOSE]})(?:\\.(${W[K.XRANGEIDENTIFIERLOOSE]})(?:\\.(${W[K.XRANGEIDENTIFIERLOOSE]})(?:${W[K.PRERELEASELOOSE]})?${W[K.BUILD]}?)?)?`);he("XRANGE",`^${W[K.GTLT]}\\s*${W[K.XRANGEPLAIN]}$`);he("XRANGELOOSE",`^${W[K.GTLT]}\\s*${W[K.XRANGEPLAINLOOSE]}$`);he("COERCEPLAIN",`(^|[^\\d])(\\d{1,${xl}})(?:\\.(\\d{1,${xl}}))?(?:\\.(\\d{1,${xl}}))?`);he("COERCE",`${W[K.COERCEPLAIN]}(?:$|[^\\d])`);he("COERCEFULL",W[K.COERCEPLAIN]+`(?:${W[K.PRERELEASE]})?(?:${W[K.BUILD]})?(?:$|[^\\d])`);he("COERCERTL",W[K.COERCE],!0);he("COERCERTLFULL",W[K.COERCEFULL],!0);he("LONETILDE","(?:~>?)");he("TILDETRIM",`(\\s*)${W[K.LONETILDE]}\\s+`,!0);dr.tildeTrimReplace="$1~";he("TILDE",`^${W[K.LONETILDE]}${W[K.XRANGEPLAIN]}$`);he("TILDELOOSE",`^${W[K.LONETILDE]}${W[K.XRANGEPLAINLOOSE]}$`);he("LONECARET","(?:\\^)");he("CARETTRIM",`(\\s*)${W[K.LONECARET]}\\s+`,!0);dr.caretTrimReplace="$1^";he("CARET",`^${W[K.LONECARET]}${W[K.XRANGEPLAIN]}$`);he("CARETLOOSE",`^${W[K.LONECARET]}${W[K.XRANGEPLAINLOOSE]}$`);he("COMPARATORLOOSE",`^${W[K.GTLT]}\\s*(${W[K.LOOSEPLAIN]})$|^$`);he("COMPARATOR",`^${W[K.GTLT]}\\s*(${W[K.FULLPLAIN]})$|^$`);he("COMPARATORTRIM",`(\\s*)${W[K.GTLT]}\\s*(${W[K.LOOSEPLAIN]}|${W[K.XRANGEPLAIN]})`,!0);dr.comparatorTrimReplace="$1$2$3";he("HYPHENRANGE",`^\\s*(${W[K.XRANGEPLAIN]})\\s+-\\s+(${W[K.XRANGEPLAIN]})\\s*$`);he("HYPHENRANGELOOSE",`^\\s*(${W[K.XRANGEPLAINLOOSE]})\\s+-\\s+(${W[K.XRANGEPLAINLOOSE]})\\s*$`);he("STAR","(<|>)?=?\\s*\\*");he("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");he("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var cs=L((pJ,uv)=>{"use strict";var ED=Object.freeze({loose:!0}),ID=Object.freeze({}),$D=o(e=>e?typeof e!="object"?ED:e:ID,"parseOptions");uv.exports=$D});var wl=L((mJ,pv)=>{"use strict";var cv=/^[0-9]+$/,lv=o((e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;let i=cv.test(e),a=cv.test(r);return i&&a&&(e=+e,r=+r),e===r?0:i&&!a?-1:a&&!i?1:e<r?-1:1},"compareIdentifiers"),RD=o((e,r)=>lv(r,e),"rcompareIdentifiers");pv.exports={compareIdentifiers:lv,rcompareIdentifiers:RD}});var lt=L((hJ,mv)=>{"use strict";var ls=lo(),{MAX_LENGTH:dv,MAX_SAFE_INTEGER:ps}=co(),{safeRe:ds,t:ms}=ri(),kD=cs(),{compareIdentifiers:Al}=wl(),Tl=class e{static{o(this,"SemVer")}constructor(r,i){if(i=kD(i),r instanceof e){if(r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>dv)throw new TypeError(`version is longer than ${dv} characters`);ls("SemVer",r,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;let a=r.trim().match(i.loose?ds[ms.LOOSE]:ds[ms.FULL]);if(!a)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>ps||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ps||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ps||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(u=>{if(/^[0-9]+$/.test(u)){let c=+u;if(c>=0&&c<ps)return c}return u}):this.prerelease=[],this.build=a[5]?a[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(ls("SemVer.compare",this.version,this.options,r),!(r instanceof e)){if(typeof r=="string"&&r===this.version)return 0;r=new e(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof e||(r=new e(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof e||(r=new e(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let i=0;do{let a=this.prerelease[i],u=r.prerelease[i];if(ls("prerelease compare",i,a,u),a===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(a===void 0)return-1;if(a===u)continue;return Al(a,u)}while(++i)}compareBuild(r){r instanceof e||(r=new e(r,this.options));let i=0;do{let a=this.build[i],u=r.build[i];if(ls("build compare",i,a,u),a===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(a===void 0)return-1;if(a===u)continue;return Al(a,u)}while(++i)}inc(r,i,a){if(r.startsWith("pre")){if(!i&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(i){let u=`-${i}`.match(this.options.loose?ds[ms.PRERELEASELOOSE]:ds[ms.PRERELEASE]);if(!u||u[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,a),this.inc("pre",i,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,a),this.inc("pre",i,a);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let u=Number(a)?1:0;if(this.prerelease.length===0)this.prerelease=[u];else{let c=this.prerelease.length;for(;--c>=0;)typeof this.prerelease[c]=="number"&&(this.prerelease[c]++,c=-2);if(c===-1){if(i===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(u)}}if(i){let c=[i,u];a===!1&&(c=[i]),Al(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=c):this.prerelease=c}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};mv.exports=Tl});var bn=L((yJ,hv)=>{"use strict";var fv=lt(),OD=o((e,r,i=!1)=>{if(e instanceof fv)return e;try{return new fv(e,r)}catch(a){if(!i)return null;throw a}},"parse");hv.exports=OD});var yv=L((vJ,gv)=>{"use strict";var ND=bn(),zD=o((e,r)=>{let i=ND(e,r);return i?i.version:null},"valid");gv.exports=zD});var vv=L((xJ,bv)=>{"use strict";var CD=bn(),DD=o((e,r)=>{let i=CD(e.trim().replace(/^[=v]+/,""),r);return i?i.version:null},"clean");bv.exports=DD});var Pv=L((wJ,xv)=>{"use strict";var _v=lt(),LD=o((e,r,i,a,u)=>{typeof i=="string"&&(u=a,a=i,i=void 0);try{return new _v(e instanceof _v?e.version:e,i).inc(r,a,u).version}catch{return null}},"inc");xv.exports=LD});var Tv=L((TJ,Av)=>{"use strict";var wv=bn(),UD=o((e,r)=>{let i=wv(e,null,!0),a=wv(r,null,!0),u=i.compare(a);if(u===0)return null;let c=u>0,p=c?i:a,m=c?a:i,v=!!p.prerelease.length;if(!!m.prerelease.length&&!v){if(!m.patch&&!m.minor)return"major";if(m.compareMain(p)===0)return m.minor&&!m.patch?"minor":"patch"}let A=v?"pre":"";return i.major!==a.major?A+"major":i.minor!==a.minor?A+"minor":i.patch!==a.patch?A+"patch":"prerelease"},"diff");Av.exports=UD});var Ev=L((EJ,Sv)=>{"use strict";var MD=lt(),qD=o((e,r)=>new MD(e,r).major,"major");Sv.exports=qD});var $v=L(($J,Iv)=>{"use strict";var jD=lt(),BD=o((e,r)=>new jD(e,r).minor,"minor");Iv.exports=BD});var kv=L((kJ,Rv)=>{"use strict";var FD=lt(),HD=o((e,r)=>new FD(e,r).patch,"patch");Rv.exports=HD});var Nv=L((NJ,Ov)=>{"use strict";var GD=bn(),ZD=o((e,r)=>{let i=GD(e,r);return i&&i.prerelease.length?i.prerelease:null},"prerelease");Ov.exports=ZD});var Gt=L((CJ,Cv)=>{"use strict";var zv=lt(),VD=o((e,r,i)=>new zv(e,i).compare(new zv(r,i)),"compare");Cv.exports=VD});var Lv=L((LJ,Dv)=>{"use strict";var WD=Gt(),KD=o((e,r,i)=>WD(r,e,i),"rcompare");Dv.exports=KD});var Mv=L((MJ,Uv)=>{"use strict";var JD=Gt(),XD=o((e,r)=>JD(e,r,!0),"compareLoose");Uv.exports=XD});var fs=L((jJ,jv)=>{"use strict";var qv=lt(),YD=o((e,r,i)=>{let a=new qv(e,i),u=new qv(r,i);return a.compare(u)||a.compareBuild(u)},"compareBuild");jv.exports=YD});var Fv=L((FJ,Bv)=>{"use strict";var QD=fs(),eL=o((e,r)=>e.sort((i,a)=>QD(i,a,r)),"sort");Bv.exports=eL});var Gv=L((GJ,Hv)=>{"use strict";var tL=fs(),rL=o((e,r)=>e.sort((i,a)=>tL(a,i,r)),"rsort");Hv.exports=rL});var po=L((VJ,Zv)=>{"use strict";var nL=Gt(),iL=o((e,r,i)=>nL(e,r,i)>0,"gt");Zv.exports=iL});var hs=L((KJ,Vv)=>{"use strict";var oL=Gt(),aL=o((e,r,i)=>oL(e,r,i)<0,"lt");Vv.exports=aL});var Sl=L((XJ,Wv)=>{"use strict";var sL=Gt(),uL=o((e,r,i)=>sL(e,r,i)===0,"eq");Wv.exports=uL});var El=L((QJ,Kv)=>{"use strict";var cL=Gt(),lL=o((e,r,i)=>cL(e,r,i)!==0,"neq");Kv.exports=lL});var gs=L((tX,Jv)=>{"use strict";var pL=Gt(),dL=o((e,r,i)=>pL(e,r,i)>=0,"gte");Jv.exports=dL});var ys=L((nX,Xv)=>{"use strict";var mL=Gt(),fL=o((e,r,i)=>mL(e,r,i)<=0,"lte");Xv.exports=fL});var Il=L((oX,Yv)=>{"use strict";var hL=Sl(),gL=El(),yL=po(),bL=gs(),vL=hs(),_L=ys(),xL=o((e,r,i,a)=>{switch(r){case"===":return typeof e=="object"&&(e=e.version),typeof i=="object"&&(i=i.version),e===i;case"!==":return typeof e=="object"&&(e=e.version),typeof i=="object"&&(i=i.version),e!==i;case"":case"=":case"==":return hL(e,i,a);case"!=":return gL(e,i,a);case">":return yL(e,i,a);case">=":return bL(e,i,a);case"<":return vL(e,i,a);case"<=":return _L(e,i,a);default:throw new TypeError(`Invalid operator: ${r}`)}},"cmp");Yv.exports=xL});var e_=L((sX,Qv)=>{"use strict";var PL=lt(),wL=bn(),{safeRe:bs,t:vs}=ri(),AL=o((e,r)=>{if(e instanceof PL)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;r=r||{};let i=null;if(!r.rtl)i=e.match(r.includePrerelease?bs[vs.COERCEFULL]:bs[vs.COERCE]);else{let v=r.includePrerelease?bs[vs.COERCERTLFULL]:bs[vs.COERCERTL],_;for(;(_=v.exec(e))&&(!i||i.index+i[0].length!==e.length);)(!i||_.index+_[0].length!==i.index+i[0].length)&&(i=_),v.lastIndex=_.index+_[1].length+_[2].length;v.lastIndex=-1}if(i===null)return null;let a=i[2],u=i[3]||"0",c=i[4]||"0",p=r.includePrerelease&&i[5]?`-${i[5]}`:"",m=r.includePrerelease&&i[6]?`+${i[6]}`:"";return wL(`${a}.${u}.${c}${p}${m}`,r)},"coerce");Qv.exports=AL});var r_=L((cX,t_)=>{"use strict";var $l=class{static{o(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(r){let i=this.map.get(r);if(i!==void 0)return this.map.delete(r),this.map.set(r,i),i}delete(r){return this.map.delete(r)}set(r,i){if(!this.delete(r)&&i!==void 0){if(this.map.size>=this.max){let u=this.map.keys().next().value;this.delete(u)}this.map.set(r,i)}return this}};t_.exports=$l});var Zt=L((pX,a_)=>{"use strict";var TL=/\s+/g,Rl=class e{static{o(this,"Range")}constructor(r,i){if(i=EL(i),r instanceof e)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new e(r.raw,i);if(r instanceof kl)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=r.trim().replace(TL," "),this.set=this.raw.split("||").map(a=>this.parseRange(a.trim())).filter(a=>a.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let a=this.set[0];if(this.set=this.set.filter(u=>!i_(u[0])),this.set.length===0)this.set=[a];else if(this.set.length>1){for(let u of this.set)if(u.length===1&&zL(u[0])){this.set=[u];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r<this.set.length;r++){r>0&&(this.formatted+="||");let i=this.set[r];for(let a=0;a<i.length;a++)a>0&&(this.formatted+=" "),this.formatted+=i[a].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){let a=((this.options.includePrerelease&&OL)|(this.options.loose&&NL))+":"+r,u=n_.get(a);if(u)return u;let c=this.options.loose,p=c?bt[pt.HYPHENRANGELOOSE]:bt[pt.HYPHENRANGE];r=r.replace(p,HL(this.options.includePrerelease)),Le("hyphen replace",r),r=r.replace(bt[pt.COMPARATORTRIM],$L),Le("comparator trim",r),r=r.replace(bt[pt.TILDETRIM],RL),Le("tilde trim",r),r=r.replace(bt[pt.CARETTRIM],kL),Le("caret trim",r);let m=r.split(" ").map(k=>CL(k,this.options)).join(" ").split(/\s+/).map(k=>FL(k,this.options));c&&(m=m.filter(k=>(Le("loose invalid filter",k,this.options),!!k.match(bt[pt.COMPARATORLOOSE])))),Le("range list",m);let v=new Map,_=m.map(k=>new kl(k,this.options));for(let k of _){if(i_(k))return[k];v.set(k.value,k)}v.size>1&&v.has("")&&v.delete("");let A=[...v.values()];return n_.set(a,A),A}intersects(r,i){if(!(r instanceof e))throw new TypeError("a Range is required");return this.set.some(a=>o_(a,i)&&r.set.some(u=>o_(u,i)&&a.every(c=>u.every(p=>c.intersects(p,i)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new IL(r,this.options)}catch{return!1}for(let i=0;i<this.set.length;i++)if(GL(this.set[i],r,this.options))return!0;return!1}};a_.exports=Rl;var SL=r_(),n_=new SL,EL=cs(),kl=mo(),Le=lo(),IL=lt(),{safeRe:bt,t:pt,comparatorTrimReplace:$L,tildeTrimReplace:RL,caretTrimReplace:kL}=ri(),{FLAG_INCLUDE_PRERELEASE:OL,FLAG_LOOSE:NL}=co(),i_=o(e=>e.value==="<0.0.0-0","isNullSet"),zL=o(e=>e.value==="","isAny"),o_=o((e,r)=>{let i=!0,a=e.slice(),u=a.pop();for(;i&&a.length;)i=a.every(c=>u.intersects(c,r)),u=a.pop();return i},"isSatisfiable"),CL=o((e,r)=>(e=e.replace(bt[pt.BUILD],""),Le("comp",e,r),e=UL(e,r),Le("caret",e),e=DL(e,r),Le("tildes",e),e=qL(e,r),Le("xrange",e),e=BL(e,r),Le("stars",e),e),"parseComparator"),vt=o(e=>!e||e.toLowerCase()==="x"||e==="*","isX"),DL=o((e,r)=>e.trim().split(/\s+/).map(i=>LL(i,r)).join(" "),"replaceTildes"),LL=o((e,r)=>{let i=r.loose?bt[pt.TILDELOOSE]:bt[pt.TILDE];return e.replace(i,(a,u,c,p,m)=>{Le("tilde",e,a,u,c,p,m);let v;return vt(u)?v="":vt(c)?v=`>=${u}.0.0 <${+u+1}.0.0-0`:vt(p)?v=`>=${u}.${c}.0 <${u}.${+c+1}.0-0`:m?(Le("replaceTilde pr",m),v=`>=${u}.${c}.${p}-${m} <${u}.${+c+1}.0-0`):v=`>=${u}.${c}.${p} <${u}.${+c+1}.0-0`,Le("tilde return",v),v})},"replaceTilde"),UL=o((e,r)=>e.trim().split(/\s+/).map(i=>ML(i,r)).join(" "),"replaceCarets"),ML=o((e,r)=>{Le("caret",e,r);let i=r.loose?bt[pt.CARETLOOSE]:bt[pt.CARET],a=r.includePrerelease?"-0":"";return e.replace(i,(u,c,p,m,v)=>{Le("caret",e,u,c,p,m,v);let _;return vt(c)?_="":vt(p)?_=`>=${c}.0.0${a} <${+c+1}.0.0-0`:vt(m)?c==="0"?_=`>=${c}.${p}.0${a} <${c}.${+p+1}.0-0`:_=`>=${c}.${p}.0${a} <${+c+1}.0.0-0`:v?(Le("replaceCaret pr",v),c==="0"?p==="0"?_=`>=${c}.${p}.${m}-${v} <${c}.${p}.${+m+1}-0`:_=`>=${c}.${p}.${m}-${v} <${c}.${+p+1}.0-0`:_=`>=${c}.${p}.${m}-${v} <${+c+1}.0.0-0`):(Le("no pr"),c==="0"?p==="0"?_=`>=${c}.${p}.${m}${a} <${c}.${p}.${+m+1}-0`:_=`>=${c}.${p}.${m}${a} <${c}.${+p+1}.0-0`:_=`>=${c}.${p}.${m} <${+c+1}.0.0-0`),Le("caret return",_),_})},"replaceCaret"),qL=o((e,r)=>(Le("replaceXRanges",e,r),e.split(/\s+/).map(i=>jL(i,r)).join(" ")),"replaceXRanges"),jL=o((e,r)=>{e=e.trim();let i=r.loose?bt[pt.XRANGELOOSE]:bt[pt.XRANGE];return e.replace(i,(a,u,c,p,m,v)=>{Le("xRange",e,a,u,c,p,m,v);let _=vt(c),A=_||vt(p),k=A||vt(m),U=k;return u==="="&&U&&(u=""),v=r.includePrerelease?"-0":"",_?u===">"||u==="<"?a="<0.0.0-0":a="*":u&&U?(A&&(p=0),m=0,u===">"?(u=">=",A?(c=+c+1,p=0,m=0):(p=+p+1,m=0)):u==="<="&&(u="<",A?c=+c+1:p=+p+1),u==="<"&&(v="-0"),a=`${u+c}.${p}.${m}${v}`):A?a=`>=${c}.0.0${v} <${+c+1}.0.0-0`:k&&(a=`>=${c}.${p}.0${v} <${c}.${+p+1}.0-0`),Le("xRange return",a),a})},"replaceXRange"),BL=o((e,r)=>(Le("replaceStars",e,r),e.trim().replace(bt[pt.STAR],"")),"replaceStars"),FL=o((e,r)=>(Le("replaceGTE0",e,r),e.trim().replace(bt[r.includePrerelease?pt.GTE0PRE:pt.GTE0],"")),"replaceGTE0"),HL=o(e=>(r,i,a,u,c,p,m,v,_,A,k,U)=>(vt(a)?i="":vt(u)?i=`>=${a}.0.0${e?"-0":""}`:vt(c)?i=`>=${a}.${u}.0${e?"-0":""}`:p?i=`>=${i}`:i=`>=${i}${e?"-0":""}`,vt(_)?v="":vt(A)?v=`<${+_+1}.0.0-0`:vt(k)?v=`<${_}.${+A+1}.0-0`:U?v=`<=${_}.${A}.${k}-${U}`:e?v=`<${_}.${A}.${+k+1}-0`:v=`<=${v}`,`${i} ${v}`.trim()),"hyphenReplace"),GL=o((e,r,i)=>{for(let a=0;a<e.length;a++)if(!e[a].test(r))return!1;if(r.prerelease.length&&!i.includePrerelease){for(let a=0;a<e.length;a++)if(Le(e[a].semver),e[a].semver!==kl.ANY&&e[a].semver.prerelease.length>0){let u=e[a].semver;if(u.major===r.major&&u.minor===r.minor&&u.patch===r.patch)return!0}return!1}return!0},"testSet")});var mo=L((mX,d_)=>{"use strict";var fo=Symbol("SemVer ANY"),zl=class e{static{o(this,"Comparator")}static get ANY(){return fo}constructor(r,i){if(i=s_(i),r instanceof e){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),Nl("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===fo?this.value="":this.value=this.operator+this.semver.version,Nl("comp",this)}parse(r){let i=this.options.loose?u_[c_.COMPARATORLOOSE]:u_[c_.COMPARATOR],a=r.match(i);if(!a)throw new TypeError(`Invalid comparator: ${r}`);this.operator=a[1]!==void 0?a[1]:"",this.operator==="="&&(this.operator=""),a[2]?this.semver=new l_(a[2],this.options.loose):this.semver=fo}toString(){return this.value}test(r){if(Nl("Comparator.test",r,this.options.loose),this.semver===fo||r===fo)return!0;if(typeof r=="string")try{r=new l_(r,this.options)}catch{return!1}return Ol(r,this.operator,this.semver,this.options)}intersects(r,i){if(!(r instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p_(r.value,i).test(this.value):r.operator===""?r.value===""?!0:new p_(this.value,i).test(r.semver):(i=s_(i),i.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!i.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||Ol(this.semver,"<",r.semver,i)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||Ol(this.semver,">",r.semver,i)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};d_.exports=zl;var s_=cs(),{safeRe:u_,t:c_}=ri(),Ol=Il(),Nl=lo(),l_=lt(),p_=Zt()});var ho=L((hX,m_)=>{"use strict";var ZL=Zt(),VL=o((e,r,i)=>{try{r=new ZL(r,i)}catch{return!1}return r.test(e)},"satisfies");m_.exports=VL});var h_=L((yX,f_)=>{"use strict";var WL=Zt(),KL=o((e,r)=>new WL(e,r).set.map(i=>i.map(a=>a.value).join(" ").trim().split(" ")),"toComparators");f_.exports=KL});var y_=L((vX,g_)=>{"use strict";var JL=lt(),XL=Zt(),YL=o((e,r,i)=>{let a=null,u=null,c=null;try{c=new XL(r,i)}catch{return null}return e.forEach(p=>{c.test(p)&&(!a||u.compare(p)===-1)&&(a=p,u=new JL(a,i))}),a},"maxSatisfying");g_.exports=YL});var v_=L((xX,b_)=>{"use strict";var QL=lt(),eU=Zt(),tU=o((e,r,i)=>{let a=null,u=null,c=null;try{c=new eU(r,i)}catch{return null}return e.forEach(p=>{c.test(p)&&(!a||u.compare(p)===1)&&(a=p,u=new QL(a,i))}),a},"minSatisfying");b_.exports=tU});var P_=L((wX,x_)=>{"use strict";var Cl=lt(),rU=Zt(),__=po(),nU=o((e,r)=>{e=new rU(e,r);let i=new Cl("0.0.0");if(e.test(i)||(i=new Cl("0.0.0-0"),e.test(i)))return i;i=null;for(let a=0;a<e.set.length;++a){let u=e.set[a],c=null;u.forEach(p=>{let m=new Cl(p.semver.version);switch(p.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!c||__(m,c))&&(c=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),c&&(!i||__(i,c))&&(i=c)}return i&&e.test(i)?i:null},"minVersion");x_.exports=nU});var A_=L((TX,w_)=>{"use strict";var iU=Zt(),oU=o((e,r)=>{try{return new iU(e,r).range||"*"}catch{return null}},"validRange");w_.exports=oU});var _s=L((EX,I_)=>{"use strict";var aU=lt(),E_=mo(),{ANY:sU}=E_,uU=Zt(),cU=ho(),T_=po(),S_=hs(),lU=ys(),pU=gs(),dU=o((e,r,i,a)=>{e=new aU(e,a),r=new uU(r,a);let u,c,p,m,v;switch(i){case">":u=T_,c=lU,p=S_,m=">",v=">=";break;case"<":u=S_,c=pU,p=T_,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(cU(e,r,a))return!1;for(let _=0;_<r.set.length;++_){let A=r.set[_],k=null,U=null;if(A.forEach(b=>{b.semver===sU&&(b=new E_(">=0.0.0")),k=k||b,U=U||b,u(b.semver,k.semver,a)?k=b:p(b.semver,U.semver,a)&&(U=b)}),k.operator===m||k.operator===v||(!U.operator||U.operator===m)&&c(e,U.semver))return!1;if(U.operator===v&&p(e,U.semver))return!1}return!0},"outside");I_.exports=dU});var R_=L(($X,$_)=>{"use strict";var mU=_s(),fU=o((e,r,i)=>mU(e,r,">",i),"gtr");$_.exports=fU});var O_=L((kX,k_)=>{"use strict";var hU=_s(),gU=o((e,r,i)=>hU(e,r,"<",i),"ltr");k_.exports=gU});var C_=L((NX,z_)=>{"use strict";var N_=Zt(),yU=o((e,r,i)=>(e=new N_(e,i),r=new N_(r,i),e.intersects(r,i)),"intersects");z_.exports=yU});var L_=L((CX,D_)=>{"use strict";var bU=ho(),vU=Gt();D_.exports=(e,r,i)=>{let a=[],u=null,c=null,p=e.sort((A,k)=>vU(A,k,i));for(let A of p)bU(A,r,i)?(c=A,u||(u=A)):(c&&a.push([u,c]),c=null,u=null);u&&a.push([u,null]);let m=[];for(let[A,k]of a)A===k?m.push(A):!k&&A===p[0]?m.push("*"):k?A===p[0]?m.push(`<=${k}`):m.push(`${A} - ${k}`):m.push(`>=${A}`);let v=m.join(" || "),_=typeof r.raw=="string"?r.raw:String(r);return v.length<_.length?v:r}});var F_=L((DX,B_)=>{"use strict";var U_=Zt(),Ll=mo(),{ANY:Dl}=Ll,go=ho(),Ul=Gt(),_U=o((e,r,i={})=>{if(e===r)return!0;e=new U_(e,i),r=new U_(r,i);let a=!1;e:for(let u of e.set){for(let c of r.set){let p=PU(u,c,i);if(a=a||p!==null,p)continue e}if(a)return!1}return!0},"subset"),xU=[new Ll(">=0.0.0-0")],M_=[new Ll(">=0.0.0")],PU=o((e,r,i)=>{if(e===r)return!0;if(e.length===1&&e[0].semver===Dl){if(r.length===1&&r[0].semver===Dl)return!0;i.includePrerelease?e=xU:e=M_}if(r.length===1&&r[0].semver===Dl){if(i.includePrerelease)return!0;r=M_}let a=new Set,u,c;for(let b of e)b.operator===">"||b.operator===">="?u=q_(u,b,i):b.operator==="<"||b.operator==="<="?c=j_(c,b,i):a.add(b.semver);if(a.size>1)return null;let p;if(u&&c){if(p=Ul(u.semver,c.semver,i),p>0)return null;if(p===0&&(u.operator!==">="||c.operator!=="<="))return null}for(let b of a){if(u&&!go(b,String(u),i)||c&&!go(b,String(c),i))return null;for(let E of r)if(!go(b,String(E),i))return!1;return!0}let m,v,_,A,k=c&&!i.includePrerelease&&c.semver.prerelease.length?c.semver:!1,U=u&&!i.includePrerelease&&u.semver.prerelease.length?u.semver:!1;k&&k.prerelease.length===1&&c.operator==="<"&&k.prerelease[0]===0&&(k=!1);for(let b of r){if(A=A||b.operator===">"||b.operator===">=",_=_||b.operator==="<"||b.operator==="<=",u){if(U&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===U.major&&b.semver.minor===U.minor&&b.semver.patch===U.patch&&(U=!1),b.operator===">"||b.operator===">="){if(m=q_(u,b,i),m===b&&m!==u)return!1}else if(u.operator===">="&&!go(u.semver,String(b),i))return!1}if(c){if(k&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===k.major&&b.semver.minor===k.minor&&b.semver.patch===k.patch&&(k=!1),b.operator==="<"||b.operator==="<="){if(v=j_(c,b,i),v===b&&v!==c)return!1}else if(c.operator==="<="&&!go(c.semver,String(b),i))return!1}if(!b.operator&&(c||u)&&p!==0)return!1}return!(u&&_&&!c&&p!==0||c&&A&&!u&&p!==0||U||k)},"simpleSubset"),q_=o((e,r,i)=>{if(!e)return r;let a=Ul(e.semver,r.semver,i);return a>0?e:a<0||r.operator===">"&&e.operator===">="?r:e},"higherGT"),j_=o((e,r,i)=>{if(!e)return r;let a=Ul(e.semver,r.semver,i);return a<0?e:a>0||r.operator==="<"&&e.operator==="<="?r:e},"lowerLT");B_.exports=_U});var xs=L((UX,Z_)=>{"use strict";var Ml=ri(),H_=co(),wU=lt(),G_=wl(),AU=bn(),TU=yv(),SU=vv(),EU=Pv(),IU=Tv(),$U=Ev(),RU=$v(),kU=kv(),OU=Nv(),NU=Gt(),zU=Lv(),CU=Mv(),DU=fs(),LU=Fv(),UU=Gv(),MU=po(),qU=hs(),jU=Sl(),BU=El(),FU=gs(),HU=ys(),GU=Il(),ZU=e_(),VU=mo(),WU=Zt(),KU=ho(),JU=h_(),XU=y_(),YU=v_(),QU=P_(),eM=A_(),tM=_s(),rM=R_(),nM=O_(),iM=C_(),oM=L_(),aM=F_();Z_.exports={parse:AU,valid:TU,clean:SU,inc:EU,diff:IU,major:$U,minor:RU,patch:kU,prerelease:OU,compare:NU,rcompare:zU,compareLoose:CU,compareBuild:DU,sort:LU,rsort:UU,gt:MU,lt:qU,eq:jU,neq:BU,gte:FU,lte:HU,cmp:GU,coerce:ZU,Comparator:VU,Range:WU,satisfies:KU,toComparators:JU,maxSatisfying:XU,minSatisfying:YU,minVersion:QU,validRange:eM,outside:tM,gtr:rM,ltr:nM,intersects:iM,simplifyRange:oM,subset:aM,SemVer:wU,re:Ml.re,src:Ml.src,tokens:Ml.t,SEMVER_SPEC_VERSION:H_.SEMVER_SPEC_VERSION,RELEASE_TYPES:H_.RELEASE_TYPES,compareIdentifiers:G_.compareIdentifiers,rcompareIdentifiers:G_.rcompareIdentifiers}});var W_=L((MX,V_)=>{var sM=xs();V_.exports=sM.satisfies(process.version,">=15.7.0")});var J_=L((qX,K_)=>{var uM=xs();K_.exports=uM.satisfies(process.version,">=16.9.0")});var ql=L((jX,X_)=>{var cM=W_(),lM=J_(),pM={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},dM={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};X_.exports=function(e,r){if(!e||!r)return;let i=r.asymmetricKeyType;if(!i)return;let a=pM[i];if(!a)throw new Error(`Unknown key type "${i}".`);if(!a.includes(e))throw new Error(`"alg" parameter for "${i}" key type must be one of: ${a.join(", ")}.`);if(cM)switch(i){case"ec":let u=r.asymmetricKeyDetails.namedCurve,c=dM[e];if(u!==c)throw new Error(`"alg" parameter "${e}" requires curve "${c}".`);break;case"rsa-pss":if(lM){let p=parseInt(e.slice(-3),10),{hashAlgorithm:m,mgf1HashAlgorithm:v,saltLength:_}=r.asymmetricKeyDetails;if(m!==`sha${p}`||v!==m)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(_!==void 0&&_>p>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}break}}});var jl=L((BX,Y_)=>{var mM=xs();Y_.exports=mM.satisfies(process.version,"^6.12.0 || >=8.0.0")});var tx=L((FX,ex)=>{var Ce=uo(),fM=bl(),Q_=vl(),hM=yl(),gM=_l(),yM=ql(),bM=jl(),vM=is(),{KeyObject:_M,createSecretKey:xM,createPublicKey:PM}=require("crypto"),Bl=["RS256","RS384","RS512"],wM=["ES256","ES384","ES512"],Fl=["RS256","RS384","RS512"],AM=["HS256","HS384","HS512"];bM&&(Bl.splice(Bl.length,0,"PS256","PS384","PS512"),Fl.splice(Fl.length,0,"PS256","PS384","PS512"));ex.exports=function(e,r,i,a){typeof i=="function"&&!a&&(a=i,i={}),i||(i={}),i=Object.assign({},i);let u;if(a?u=a:u=o(function(A,k){if(A)throw A;return k},"done"),i.clockTimestamp&&typeof i.clockTimestamp!="number")return u(new Ce("clockTimestamp must be a number"));if(i.nonce!==void 0&&(typeof i.nonce!="string"||i.nonce.trim()===""))return u(new Ce("nonce must be a non-empty string"));if(i.allowInvalidAsymmetricKeyTypes!==void 0&&typeof i.allowInvalidAsymmetricKeyTypes!="boolean")return u(new Ce("allowInvalidAsymmetricKeyTypes must be a boolean"));let c=i.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return u(new Ce("jwt must be provided"));if(typeof e!="string")return u(new Ce("jwt must be a string"));let p=e.split(".");if(p.length!==3)return u(new Ce("jwt malformed"));let m;try{m=hM(e,{complete:!0})}catch(A){return u(A)}if(!m)return u(new Ce("invalid token"));let v=m.header,_;if(typeof r=="function"){if(!a)return u(new Ce("verify must be called asynchronous if secret or public key is provided as a callback"));_=r}else _=o(function(A,k){return k(null,r)},"getSecret");return _(v,function(A,k){if(A)return u(new Ce("error in secret or public key callback: "+A.message));let U=p[2].trim()!=="";if(!U&&k)return u(new Ce("jwt signature is required"));if(U&&!k)return u(new Ce("secret or public key must be provided"));if(!U&&!i.algorithms)return u(new Ce('please specify "none" in "algorithms" to verify unsigned tokens'));if(k!=null&&!(k instanceof _M))try{k=PM(k)}catch{try{k=xM(typeof k=="string"?Buffer.from(k):k)}catch{return u(new Ce("secretOrPublicKey is not valid key material"))}}if(i.algorithms||(k.type==="secret"?i.algorithms=AM:["rsa","rsa-pss"].includes(k.asymmetricKeyType)?i.algorithms=Fl:k.asymmetricKeyType==="ec"?i.algorithms=wM:i.algorithms=Bl),i.algorithms.indexOf(m.header.alg)===-1)return u(new Ce("invalid algorithm"));if(v.alg.startsWith("HS")&&k.type!=="secret")return u(new Ce(`secretOrPublicKey must be a symmetric key when using ${v.alg}`));if(/^(?:RS|PS|ES)/.test(v.alg)&&k.type!=="public")return u(new Ce(`secretOrPublicKey must be an asymmetric key when using ${v.alg}`));if(!i.allowInvalidAsymmetricKeyTypes)try{yM(v.alg,k)}catch(z){return u(z)}let b;try{b=vM.verify(e,m.header.alg,k)}catch(z){return u(z)}if(!b)return u(new Ce("invalid signature"));let E=m.payload;if(typeof E.nbf<"u"&&!i.ignoreNotBefore){if(typeof E.nbf!="number")return u(new Ce("invalid nbf value"));if(E.nbf>c+(i.clockTolerance||0))return u(new fM("jwt not active",new Date(E.nbf*1e3)))}if(typeof E.exp<"u"&&!i.ignoreExpiration){if(typeof E.exp!="number")return u(new Ce("invalid exp value"));if(c>=E.exp+(i.clockTolerance||0))return u(new Q_("jwt expired",new Date(E.exp*1e3)))}if(i.audience){let z=Array.isArray(i.audience)?i.audience:[i.audience];if(!(Array.isArray(E.aud)?E.aud:[E.aud]).some(function(Z){return z.some(function(ae){return ae instanceof RegExp?ae.test(Z):ae===Z})}))return u(new Ce("jwt audience invalid. expected: "+z.join(" or ")))}if(i.issuer&&(typeof i.issuer=="string"&&E.iss!==i.issuer||Array.isArray(i.issuer)&&i.issuer.indexOf(E.iss)===-1))return u(new Ce("jwt issuer invalid. expected: "+i.issuer));if(i.subject&&E.sub!==i.subject)return u(new Ce("jwt subject invalid. expected: "+i.subject));if(i.jwtid&&E.jti!==i.jwtid)return u(new Ce("jwt jwtid invalid. expected: "+i.jwtid));if(i.nonce&&E.nonce!==i.nonce)return u(new Ce("jwt nonce invalid. expected: "+i.nonce));if(i.maxAge){if(typeof E.iat!="number")return u(new Ce("iat required when maxAge is specified"));let z=gM(i.maxAge,E.iat);if(typeof z>"u")return u(new Ce('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(c>=z+(i.clockTolerance||0))return u(new Q_("maxAge exceeded",new Date(z*1e3)))}if(i.complete===!0){let z=m.signature;return u(null,{header:v,payload:E,signature:z})}return u(null,E)})}});var rx=L((ni,yo)=>{(function(){var e,r="4.18.1",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",p="Invalid `imports` option passed into `_.template`",m="__lodash_hash_undefined__",v=500,_="__lodash_placeholder__",A=1,k=2,U=4,b=1,E=2,z=1,O=2,F=4,Z=8,ae=16,Me=32,et=64,dt=128,Tt=256,St=512,Ns=30,vn="...",_o=800,xo=16,li=1,pi=2,eA=3,en=1/0,$r=9007199254740991,tA=17976931348623157e292,Po=NaN,nr=4294967295,rA=nr-1,nA=nr>>>1,iA=[["ary",dt],["bind",z],["bindKey",O],["curry",Z],["curryRight",ae],["flip",St],["partial",Me],["partialRight",et],["rearg",Tt]],_n="[object Arguments]",wo="[object Array]",oA="[object AsyncFunction]",di="[object Boolean]",mi="[object Date]",aA="[object DOMException]",Ao="[object Error]",To="[object Function]",tp="[object GeneratorFunction]",Vt="[object Map]",fi="[object Number]",sA="[object Null]",fr="[object Object]",rp="[object Promise]",uA="[object Proxy]",hi="[object RegExp]",Wt="[object Set]",gi="[object String]",So="[object Symbol]",cA="[object Undefined]",yi="[object WeakMap]",lA="[object WeakSet]",bi="[object ArrayBuffer]",xn="[object DataView]",zs="[object Float32Array]",Cs="[object Float64Array]",Ds="[object Int8Array]",Ls="[object Int16Array]",Us="[object Int32Array]",Ms="[object Uint8Array]",qs="[object Uint8ClampedArray]",js="[object Uint16Array]",Bs="[object Uint32Array]",pA=/\b__p \+= '';/g,dA=/\b(__p \+=) '' \+/g,mA=/(__e\(.*?\)|\b__t\)) \+\n'';/g,np=/&(?:amp|lt|gt|quot|#39);/g,ip=/[&<>"']/g,fA=RegExp(np.source),hA=RegExp(ip.source),gA=/<%-([\s\S]+?)%>/g,yA=/<%([\s\S]+?)%>/g,op=/<%=([\s\S]+?)%>/g,bA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vA=/^\w*$/,_A=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fs=/[\\^$.*+?()[\]{}|]/g,xA=RegExp(Fs.source),Hs=/^\s+/,PA=/\s/,wA=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,AA=/\{\n\/\* \[wrapped with (.+)\] \*/,TA=/,? & /,SA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ap=/[()=,{}\[\]\/\s]/,EA=/\\(\\)?/g,IA=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sp=/\w*$/,$A=/^[-+]0x[0-9a-f]+$/i,RA=/^0b[01]+$/i,kA=/^\[object .+?Constructor\]$/,OA=/^0o[0-7]+$/i,NA=/^(?:0|[1-9]\d*)$/,zA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Eo=/($^)/,CA=/['\n\r\u2028\u2029\\]/g,Io="\\ud800-\\udfff",DA="\\u0300-\\u036f",LA="\\ufe20-\\ufe2f",UA="\\u20d0-\\u20ff",up=DA+LA+UA,cp="\\u2700-\\u27bf",lp="a-z\\xdf-\\xf6\\xf8-\\xff",MA="\\xac\\xb1\\xd7\\xf7",qA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jA="\\u2000-\\u206f",BA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pp="A-Z\\xc0-\\xd6\\xd8-\\xde",dp="\\ufe0e\\ufe0f",mp=MA+qA+jA+BA,Gs="['\u2019]",FA="["+Io+"]",fp="["+mp+"]",$o="["+up+"]",hp="\\d+",HA="["+cp+"]",gp="["+lp+"]",yp="[^"+Io+mp+hp+cp+lp+pp+"]",Zs="\\ud83c[\\udffb-\\udfff]",GA="(?:"+$o+"|"+Zs+")",bp="[^"+Io+"]",Vs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ws="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+pp+"]",vp="\\u200d",_p="(?:"+gp+"|"+yp+")",ZA="(?:"+Pn+"|"+yp+")",xp="(?:"+Gs+"(?:d|ll|m|re|s|t|ve))?",Pp="(?:"+Gs+"(?:D|LL|M|RE|S|T|VE))?",wp=GA+"?",Ap="["+dp+"]?",VA="(?:"+vp+"(?:"+[bp,Vs,Ws].join("|")+")"+Ap+wp+")*",WA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",KA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Tp=Ap+wp+VA,JA="(?:"+[HA,Vs,Ws].join("|")+")"+Tp,XA="(?:"+[bp+$o+"?",$o,Vs,Ws,FA].join("|")+")",YA=RegExp(Gs,"g"),QA=RegExp($o,"g"),Ks=RegExp(Zs+"(?="+Zs+")|"+XA+Tp,"g"),eT=RegExp([Pn+"?"+gp+"+"+xp+"(?="+[fp,Pn,"$"].join("|")+")",ZA+"+"+Pp+"(?="+[fp,Pn+_p,"$"].join("|")+")",Pn+"?"+_p+"+"+xp,Pn+"+"+Pp,KA,WA,hp,JA].join("|"),"g"),tT=RegExp("["+vp+Io+up+dp+"]"),rT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nT=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],iT=-1,De={};De[zs]=De[Cs]=De[Ds]=De[Ls]=De[Us]=De[Ms]=De[qs]=De[js]=De[Bs]=!0,De[_n]=De[wo]=De[bi]=De[di]=De[xn]=De[mi]=De[Ao]=De[To]=De[Vt]=De[fi]=De[fr]=De[hi]=De[Wt]=De[gi]=De[yi]=!1;var ze={};ze[_n]=ze[wo]=ze[bi]=ze[xn]=ze[di]=ze[mi]=ze[zs]=ze[Cs]=ze[Ds]=ze[Ls]=ze[Us]=ze[Vt]=ze[fi]=ze[fr]=ze[hi]=ze[Wt]=ze[gi]=ze[So]=ze[Ms]=ze[qs]=ze[js]=ze[Bs]=!0,ze[Ao]=ze[To]=ze[yi]=!1;var oT={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},aT={"&":"&","<":"<",">":">",'"':""","'":"'"},sT={"&":"&","<":"<",">":">",""":'"',"'":"'"},uT={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cT=parseFloat,lT=parseInt,Sp=typeof global=="object"&&global&&global.Object===Object&&global,pT=typeof self=="object"&&self&&self.Object===Object&&self,tt=Sp||pT||Function("return this")(),Js=typeof ni=="object"&&ni&&!ni.nodeType&&ni,tn=Js&&typeof yo=="object"&&yo&&!yo.nodeType&&yo,Ep=tn&&tn.exports===Js,Xs=Ep&&Sp.process,Dt=(function(){try{var S=tn&&tn.require&&tn.require("util").types;return S||Xs&&Xs.binding&&Xs.binding("util")}catch{}})(),Ip=Dt&&Dt.isArrayBuffer,$p=Dt&&Dt.isDate,Rp=Dt&&Dt.isMap,kp=Dt&&Dt.isRegExp,Op=Dt&&Dt.isSet,Np=Dt&&Dt.isTypedArray;function Et(S,D,N){switch(N.length){case 0:return S.call(D);case 1:return S.call(D,N[0]);case 2:return S.call(D,N[0],N[1]);case 3:return S.call(D,N[0],N[1],N[2])}return S.apply(D,N)}o(Et,"apply");function dT(S,D,N,J){for(var me=-1,$e=S==null?0:S.length;++me<$e;){var Ye=S[me];D(J,Ye,N(Ye),S)}return J}o(dT,"arrayAggregator");function It(S,D){for(var N=-1,J=S==null?0:S.length;++N<J&&D(S[N],N,S)!==!1;);return S}o(It,"arrayEach");function mT(S,D){for(var N=S==null?0:S.length;N--&&D(S[N],N,S)!==!1;);return S}o(mT,"arrayEachRight");function zp(S,D){for(var N=-1,J=S==null?0:S.length;++N<J;)if(!D(S[N],N,S))return!1;return!0}o(zp,"arrayEvery");function Rr(S,D){for(var N=-1,J=S==null?0:S.length,me=0,$e=[];++N<J;){var Ye=S[N];D(Ye,N,S)&&($e[me++]=Ye)}return $e}o(Rr,"arrayFilter");function Ro(S,D){var N=S==null?0:S.length;return!!N&&wn(S,D,0)>-1}o(Ro,"arrayIncludes");function Ys(S,D,N){for(var J=-1,me=S==null?0:S.length;++J<me;)if(N(D,S[J]))return!0;return!1}o(Ys,"arrayIncludesWith");function qe(S,D){for(var N=-1,J=S==null?0:S.length,me=Array(J);++N<J;)me[N]=D(S[N],N,S);return me}o(qe,"arrayMap");function kr(S,D){for(var N=-1,J=D.length,me=S.length;++N<J;)S[me+N]=D[N];return S}o(kr,"arrayPush");function Qs(S,D,N,J){var me=-1,$e=S==null?0:S.length;for(J&&$e&&(N=S[++me]);++me<$e;)N=D(N,S[me],me,S);return N}o(Qs,"arrayReduce");function fT(S,D,N,J){var me=S==null?0:S.length;for(J&&me&&(N=S[--me]);me--;)N=D(N,S[me],me,S);return N}o(fT,"arrayReduceRight");function eu(S,D){for(var N=-1,J=S==null?0:S.length;++N<J;)if(D(S[N],N,S))return!0;return!1}o(eu,"arraySome");var hT=tu("length");function gT(S){return S.split("")}o(gT,"asciiToArray");function yT(S){return S.match(SA)||[]}o(yT,"asciiWords");function Cp(S,D,N){var J;return N(S,function(me,$e,Ye){if(D(me,$e,Ye))return J=$e,!1}),J}o(Cp,"baseFindKey");function ko(S,D,N,J){for(var me=S.length,$e=N+(J?1:-1);J?$e--:++$e<me;)if(D(S[$e],$e,S))return $e;return-1}o(ko,"baseFindIndex");function wn(S,D,N){return D===D?$T(S,D,N):ko(S,Dp,N)}o(wn,"baseIndexOf");function bT(S,D,N,J){for(var me=N-1,$e=S.length;++me<$e;)if(J(S[me],D))return me;return-1}o(bT,"baseIndexOfWith");function Dp(S){return S!==S}o(Dp,"baseIsNaN");function Lp(S,D){var N=S==null?0:S.length;return N?nu(S,D)/N:Po}o(Lp,"baseMean");function tu(S){return function(D){return D==null?e:D[S]}}o(tu,"baseProperty");function ru(S){return function(D){return S==null?e:S[D]}}o(ru,"basePropertyOf");function Up(S,D,N,J,me){return me(S,function($e,Ye,Ne){N=J?(J=!1,$e):D(N,$e,Ye,Ne)}),N}o(Up,"baseReduce");function vT(S,D){var N=S.length;for(S.sort(D);N--;)S[N]=S[N].value;return S}o(vT,"baseSortBy");function nu(S,D){for(var N,J=-1,me=S.length;++J<me;){var $e=D(S[J]);$e!==e&&(N=N===e?$e:N+$e)}return N}o(nu,"baseSum");function iu(S,D){for(var N=-1,J=Array(S);++N<S;)J[N]=D(N);return J}o(iu,"baseTimes");function _T(S,D){return qe(D,function(N){return[N,S[N]]})}o(_T,"baseToPairs");function Mp(S){return S&&S.slice(0,Fp(S)+1).replace(Hs,"")}o(Mp,"baseTrim");function $t(S){return function(D){return S(D)}}o($t,"baseUnary");function ou(S,D){return qe(D,function(N){return S[N]})}o(ou,"baseValues");function vi(S,D){return S.has(D)}o(vi,"cacheHas");function qp(S,D){for(var N=-1,J=S.length;++N<J&&wn(D,S[N],0)>-1;);return N}o(qp,"charsStartIndex");function jp(S,D){for(var N=S.length;N--&&wn(D,S[N],0)>-1;);return N}o(jp,"charsEndIndex");function xT(S,D){for(var N=S.length,J=0;N--;)S[N]===D&&++J;return J}o(xT,"countHolders");var PT=ru(oT),wT=ru(aT);function AT(S){return"\\"+uT[S]}o(AT,"escapeStringChar");function TT(S,D){return S==null?e:S[D]}o(TT,"getValue");function An(S){return tT.test(S)}o(An,"hasUnicode");function ST(S){return rT.test(S)}o(ST,"hasUnicodeWord");function ET(S){for(var D,N=[];!(D=S.next()).done;)N.push(D.value);return N}o(ET,"iteratorToArray");function au(S){var D=-1,N=Array(S.size);return S.forEach(function(J,me){N[++D]=[me,J]}),N}o(au,"mapToArray");function Bp(S,D){return function(N){return S(D(N))}}o(Bp,"overArg");function Or(S,D){for(var N=-1,J=S.length,me=0,$e=[];++N<J;){var Ye=S[N];(Ye===D||Ye===_)&&(S[N]=_,$e[me++]=N)}return $e}o(Or,"replaceHolders");function Oo(S){var D=-1,N=Array(S.size);return S.forEach(function(J){N[++D]=J}),N}o(Oo,"setToArray");function IT(S){var D=-1,N=Array(S.size);return S.forEach(function(J){N[++D]=[J,J]}),N}o(IT,"setToPairs");function $T(S,D,N){for(var J=N-1,me=S.length;++J<me;)if(S[J]===D)return J;return-1}o($T,"strictIndexOf");function RT(S,D,N){for(var J=N+1;J--;)if(S[J]===D)return J;return J}o(RT,"strictLastIndexOf");function Tn(S){return An(S)?OT(S):hT(S)}o(Tn,"stringSize");function Kt(S){return An(S)?NT(S):gT(S)}o(Kt,"stringToArray");function Fp(S){for(var D=S.length;D--&&PA.test(S.charAt(D)););return D}o(Fp,"trimmedEndIndex");var kT=ru(sT);function OT(S){for(var D=Ks.lastIndex=0;Ks.test(S);)++D;return D}o(OT,"unicodeSize");function NT(S){return S.match(Ks)||[]}o(NT,"unicodeToArray");function zT(S){return S.match(eT)||[]}o(zT,"unicodeWords");var CT=o((function S(D){D=D==null?tt:Nr.defaults(tt.Object(),D,Nr.pick(tt,nT));var N=D.Array,J=D.Date,me=D.Error,$e=D.Function,Ye=D.Math,Ne=D.Object,su=D.RegExp,DT=D.String,Lt=D.TypeError,No=N.prototype,LT=$e.prototype,Sn=Ne.prototype,zo=D["__core-js_shared__"],Co=LT.toString,ke=Sn.hasOwnProperty,UT=0,Hp=(function(){var t=/[^.]+$/.exec(zo&&zo.keys&&zo.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Do=Sn.toString,MT=Co.call(Ne),qT=tt._,jT=su("^"+Co.call(ke).replace(Fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lo=Ep?D.Buffer:e,zr=D.Symbol,Uo=D.Uint8Array,Gp=Lo?Lo.allocUnsafe:e,Mo=Bp(Ne.getPrototypeOf,Ne),Zp=Ne.create,Vp=Sn.propertyIsEnumerable,qo=No.splice,Wp=zr?zr.isConcatSpreadable:e,_i=zr?zr.iterator:e,rn=zr?zr.toStringTag:e,jo=(function(){try{var t=un(Ne,"defineProperty");return t({},"",{}),t}catch{}})(),BT=D.clearTimeout!==tt.clearTimeout&&D.clearTimeout,FT=J&&J.now!==tt.Date.now&&J.now,HT=D.setTimeout!==tt.setTimeout&&D.setTimeout,Bo=Ye.ceil,Fo=Ye.floor,uu=Ne.getOwnPropertySymbols,GT=Lo?Lo.isBuffer:e,Kp=D.isFinite,ZT=No.join,VT=Bp(Ne.keys,Ne),Qe=Ye.max,st=Ye.min,WT=J.now,KT=D.parseInt,Jp=Ye.random,JT=No.reverse,cu=un(D,"DataView"),xi=un(D,"Map"),lu=un(D,"Promise"),En=un(D,"Set"),Pi=un(D,"WeakMap"),wi=un(Ne,"create"),Ho=Pi&&new Pi,In={},XT=cn(cu),YT=cn(xi),QT=cn(lu),eS=cn(En),tS=cn(Pi),Go=zr?zr.prototype:e,Ai=Go?Go.valueOf:e,Xp=Go?Go.toString:e;function f(t){if(He(t)&&!fe(t)&&!(t instanceof Te)){if(t instanceof Ut)return t;if(ke.call(t,"__wrapped__"))return Yd(t)}return new Ut(t)}o(f,"lodash");var $n=(function(){function t(){}return o(t,"object"),function(n){if(!Be(n))return{};if(Zp)return Zp(n);t.prototype=n;var s=new t;return t.prototype=e,s}})();function Zo(){}o(Zo,"baseLodash");function Ut(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}o(Ut,"LodashWrapper"),f.templateSettings={escape:gA,evaluate:yA,interpolate:op,variable:"",imports:{_:f}},f.prototype=Zo.prototype,f.prototype.constructor=f,Ut.prototype=$n(Zo.prototype),Ut.prototype.constructor=Ut;function Te(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=nr,this.__views__=[]}o(Te,"LazyWrapper");function rS(){var t=new Te(this.__wrapped__);return t.__actions__=_t(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_t(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_t(this.__views__),t}o(rS,"lazyClone");function nS(){if(this.__filtered__){var t=new Te(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}o(nS,"lazyReverse");function iS(){var t=this.__wrapped__.value(),n=this.__dir__,s=fe(t),l=n<0,d=s?t.length:0,g=gE(0,d,this.__views__),x=g.start,w=g.end,I=w-x,M=l?w:x-1,q=this.__iteratees__,B=q.length,V=0,Y=st(I,this.__takeCount__);if(!s||!l&&d==I&&Y==I)return xd(t,this.__actions__);var ie=[];e:for(;I--&&V<Y;){M+=n;for(var _e=-1,te=t[M];++_e<B;){var we=q[_e],Se=we.iteratee,Ot=we.type,ht=Se(te);if(Ot==pi)te=ht;else if(!ht){if(Ot==li)continue e;break e}}ie[V++]=te}return ie}o(iS,"lazyValue"),Te.prototype=$n(Zo.prototype),Te.prototype.constructor=Te;function nn(t){var n=-1,s=t==null?0:t.length;for(this.clear();++n<s;){var l=t[n];this.set(l[0],l[1])}}o(nn,"Hash");function oS(){this.__data__=wi?wi(null):{},this.size=0}o(oS,"hashClear");function aS(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}o(aS,"hashDelete");function sS(t){var n=this.__data__;if(wi){var s=n[t];return s===m?e:s}return ke.call(n,t)?n[t]:e}o(sS,"hashGet");function uS(t){var n=this.__data__;return wi?n[t]!==e:ke.call(n,t)}o(uS,"hashHas");function cS(t,n){var s=this.__data__;return this.size+=this.has(t)?0:1,s[t]=wi&&n===e?m:n,this}o(cS,"hashSet"),nn.prototype.clear=oS,nn.prototype.delete=aS,nn.prototype.get=sS,nn.prototype.has=uS,nn.prototype.set=cS;function hr(t){var n=-1,s=t==null?0:t.length;for(this.clear();++n<s;){var l=t[n];this.set(l[0],l[1])}}o(hr,"ListCache");function lS(){this.__data__=[],this.size=0}o(lS,"listCacheClear");function pS(t){var n=this.__data__,s=Vo(n,t);if(s<0)return!1;var l=n.length-1;return s==l?n.pop():qo.call(n,s,1),--this.size,!0}o(pS,"listCacheDelete");function dS(t){var n=this.__data__,s=Vo(n,t);return s<0?e:n[s][1]}o(dS,"listCacheGet");function mS(t){return Vo(this.__data__,t)>-1}o(mS,"listCacheHas");function fS(t,n){var s=this.__data__,l=Vo(s,t);return l<0?(++this.size,s.push([t,n])):s[l][1]=n,this}o(fS,"listCacheSet"),hr.prototype.clear=lS,hr.prototype.delete=pS,hr.prototype.get=dS,hr.prototype.has=mS,hr.prototype.set=fS;function gr(t){var n=-1,s=t==null?0:t.length;for(this.clear();++n<s;){var l=t[n];this.set(l[0],l[1])}}o(gr,"MapCache");function hS(){this.size=0,this.__data__={hash:new nn,map:new(xi||hr),string:new nn}}o(hS,"mapCacheClear");function gS(t){var n=oa(this,t).delete(t);return this.size-=n?1:0,n}o(gS,"mapCacheDelete");function yS(t){return oa(this,t).get(t)}o(yS,"mapCacheGet");function bS(t){return oa(this,t).has(t)}o(bS,"mapCacheHas");function vS(t,n){var s=oa(this,t),l=s.size;return s.set(t,n),this.size+=s.size==l?0:1,this}o(vS,"mapCacheSet"),gr.prototype.clear=hS,gr.prototype.delete=gS,gr.prototype.get=yS,gr.prototype.has=bS,gr.prototype.set=vS;function on(t){var n=-1,s=t==null?0:t.length;for(this.__data__=new gr;++n<s;)this.add(t[n])}o(on,"SetCache");function _S(t){return this.__data__.set(t,m),this}o(_S,"setCacheAdd");function xS(t){return this.__data__.has(t)}o(xS,"setCacheHas"),on.prototype.add=on.prototype.push=_S,on.prototype.has=xS;function Jt(t){var n=this.__data__=new hr(t);this.size=n.size}o(Jt,"Stack");function PS(){this.__data__=new hr,this.size=0}o(PS,"stackClear");function wS(t){var n=this.__data__,s=n.delete(t);return this.size=n.size,s}o(wS,"stackDelete");function AS(t){return this.__data__.get(t)}o(AS,"stackGet");function TS(t){return this.__data__.has(t)}o(TS,"stackHas");function SS(t,n){var s=this.__data__;if(s instanceof hr){var l=s.__data__;if(!xi||l.length<i-1)return l.push([t,n]),this.size=++s.size,this;s=this.__data__=new gr(l)}return s.set(t,n),this.size=s.size,this}o(SS,"stackSet"),Jt.prototype.clear=PS,Jt.prototype.delete=wS,Jt.prototype.get=AS,Jt.prototype.has=TS,Jt.prototype.set=SS;function Yp(t,n){var s=fe(t),l=!s&&ln(t),d=!s&&!l&&Mr(t),g=!s&&!l&&!d&&Nn(t),x=s||l||d||g,w=x?iu(t.length,DT):[],I=w.length;for(var M in t)(n||ke.call(t,M))&&!(x&&(M=="length"||d&&(M=="offset"||M=="parent")||g&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||vr(M,I)))&&w.push(M);return w}o(Yp,"arrayLikeKeys");function Qp(t){var n=t.length;return n?t[xu(0,n-1)]:e}o(Qp,"arraySample");function ES(t,n){return aa(_t(t),an(n,0,t.length))}o(ES,"arraySampleSize");function IS(t){return aa(_t(t))}o(IS,"arrayShuffle");function pu(t,n,s){(s!==e&&!Yt(t[n],s)||s===e&&!(n in t))&&ir(t,n,s)}o(pu,"assignMergeValue");function Ti(t,n,s){var l=t[n];(!(ke.call(t,n)&&Yt(l,s))||s===e&&!(n in t))&&ir(t,n,s)}o(Ti,"assignValue");function Vo(t,n){for(var s=t.length;s--;)if(Yt(t[s][0],n))return s;return-1}o(Vo,"assocIndexOf");function $S(t,n,s,l){return Cr(t,function(d,g,x){n(l,d,s(d),x)}),l}o($S,"baseAggregator");function ed(t,n){return t&&ar(n,rt(n),t)}o(ed,"baseAssign");function RS(t,n){return t&&ar(n,Pt(n),t)}o(RS,"baseAssignIn");function ir(t,n,s){n=="__proto__"&&jo?jo(t,n,{configurable:!0,enumerable:!0,value:s,writable:!0}):t[n]=s}o(ir,"baseAssignValue");function du(t,n){for(var s=-1,l=n.length,d=N(l),g=t==null;++s<l;)d[s]=g?e:Vu(t,n[s]);return d}o(du,"baseAt");function an(t,n,s){return t===t&&(s!==e&&(t=t<=s?t:s),n!==e&&(t=t>=n?t:n)),t}o(an,"baseClamp");function Mt(t,n,s,l,d,g){var x,w=n&A,I=n&k,M=n&U;if(s&&(x=d?s(t,l,d,g):s(t)),x!==e)return x;if(!Be(t))return t;var q=fe(t);if(q){if(x=bE(t),!w)return _t(t,x)}else{var B=ut(t),V=B==To||B==tp;if(Mr(t))return Ad(t,w);if(B==fr||B==_n||V&&!d){if(x=I||V?{}:Fd(t),!w)return I?sE(t,RS(x,t)):aE(t,ed(x,t))}else{if(!ze[B])return d?t:{};x=vE(t,B,w)}}g||(g=new Jt);var Y=g.get(t);if(Y)return Y;g.set(t,x),bm(t)?t.forEach(function(te){x.add(Mt(te,n,s,te,t,g))}):gm(t)&&t.forEach(function(te,we){x.set(we,Mt(te,n,s,we,t,g))});var ie=M?I?Ou:ku:I?Pt:rt,_e=q?e:ie(t);return It(_e||t,function(te,we){_e&&(we=te,te=t[we]),Ti(x,we,Mt(te,n,s,we,t,g))}),x}o(Mt,"baseClone");function kS(t){var n=rt(t);return function(s){return td(s,t,n)}}o(kS,"baseConforms");function td(t,n,s){var l=s.length;if(t==null)return!l;for(t=Ne(t);l--;){var d=s[l],g=n[d],x=t[d];if(x===e&&!(d in t)||!g(x))return!1}return!0}o(td,"baseConformsTo");function rd(t,n,s){if(typeof t!="function")throw new Lt(u);return Oi(function(){t.apply(e,s)},n)}o(rd,"baseDelay");function Si(t,n,s,l){var d=-1,g=Ro,x=!0,w=t.length,I=[],M=n.length;if(!w)return I;s&&(n=qe(n,$t(s))),l?(g=Ys,x=!1):n.length>=i&&(g=vi,x=!1,n=new on(n));e:for(;++d<w;){var q=t[d],B=s==null?q:s(q);if(q=l||q!==0?q:0,x&&B===B){for(var V=M;V--;)if(n[V]===B)continue e;I.push(q)}else g(n,B,l)||I.push(q)}return I}o(Si,"baseDifference");var Cr=$d(or),nd=$d(fu,!0);function OS(t,n){var s=!0;return Cr(t,function(l,d,g){return s=!!n(l,d,g),s}),s}o(OS,"baseEvery");function Wo(t,n,s){for(var l=-1,d=t.length;++l<d;){var g=t[l],x=n(g);if(x!=null&&(w===e?x===x&&!kt(x):s(x,w)))var w=x,I=g}return I}o(Wo,"baseExtremum");function NS(t,n,s,l){var d=t.length;for(s=be(s),s<0&&(s=-s>d?0:d+s),l=l===e||l>d?d:be(l),l<0&&(l+=d),l=s>l?0:_m(l);s<l;)t[s++]=n;return t}o(NS,"baseFill");function id(t,n){var s=[];return Cr(t,function(l,d,g){n(l,d,g)&&s.push(l)}),s}o(id,"baseFilter");function ot(t,n,s,l,d){var g=-1,x=t.length;for(s||(s=xE),d||(d=[]);++g<x;){var w=t[g];n>0&&s(w)?n>1?ot(w,n-1,s,l,d):kr(d,w):l||(d[d.length]=w)}return d}o(ot,"baseFlatten");var mu=Rd(),od=Rd(!0);function or(t,n){return t&&mu(t,n,rt)}o(or,"baseForOwn");function fu(t,n){return t&&od(t,n,rt)}o(fu,"baseForOwnRight");function Ko(t,n){return Rr(n,function(s){return _r(t[s])})}o(Ko,"baseFunctions");function sn(t,n){n=Lr(n,t);for(var s=0,l=n.length;t!=null&&s<l;)t=t[Xt(n[s++])];return s&&s==l?t:e}o(sn,"baseGet");function ad(t,n,s){var l=n(t);return fe(t)?l:kr(l,s(t))}o(ad,"baseGetAllKeys");function mt(t){return t==null?t===e?cA:sA:rn&&rn in Ne(t)?hE(t):IE(t)}o(mt,"baseGetTag");function hu(t,n){return t>n}o(hu,"baseGt");function zS(t,n){return t!=null&&ke.call(t,n)}o(zS,"baseHas");function CS(t,n){return t!=null&&n in Ne(t)}o(CS,"baseHasIn");function DS(t,n,s){return t>=st(n,s)&&t<Qe(n,s)}o(DS,"baseInRange");function gu(t,n,s){for(var l=s?Ys:Ro,d=t[0].length,g=t.length,x=g,w=N(g),I=1/0,M=[];x--;){var q=t[x];x&&n&&(q=qe(q,$t(n))),I=st(q.length,I),w[x]=!s&&(n||d>=120&&q.length>=120)?new on(x&&q):e}q=t[0];var B=-1,V=w[0];e:for(;++B<d&&M.length<I;){var Y=q[B],ie=n?n(Y):Y;if(Y=s||Y!==0?Y:0,!(V?vi(V,ie):l(M,ie,s))){for(x=g;--x;){var _e=w[x];if(!(_e?vi(_e,ie):l(t[x],ie,s)))continue e}V&&V.push(ie),M.push(Y)}}return M}o(gu,"baseIntersection");function LS(t,n,s,l){return or(t,function(d,g,x){n(l,s(d),g,x)}),l}o(LS,"baseInverter");function Ei(t,n,s){n=Lr(n,t),t=Vd(t,n);var l=t==null?t:t[Xt(jt(n))];return l==null?e:Et(l,t,s)}o(Ei,"baseInvoke");function sd(t){return He(t)&&mt(t)==_n}o(sd,"baseIsArguments");function US(t){return He(t)&&mt(t)==bi}o(US,"baseIsArrayBuffer");function MS(t){return He(t)&&mt(t)==mi}o(MS,"baseIsDate");function Ii(t,n,s,l,d){return t===n?!0:t==null||n==null||!He(t)&&!He(n)?t!==t&&n!==n:qS(t,n,s,l,Ii,d)}o(Ii,"baseIsEqual");function qS(t,n,s,l,d,g){var x=fe(t),w=fe(n),I=x?wo:ut(t),M=w?wo:ut(n);I=I==_n?fr:I,M=M==_n?fr:M;var q=I==fr,B=M==fr,V=I==M;if(V&&Mr(t)){if(!Mr(n))return!1;x=!0,q=!1}if(V&&!q)return g||(g=new Jt),x||Nn(t)?qd(t,n,s,l,d,g):mE(t,n,I,s,l,d,g);if(!(s&b)){var Y=q&&ke.call(t,"__wrapped__"),ie=B&&ke.call(n,"__wrapped__");if(Y||ie){var _e=Y?t.value():t,te=ie?n.value():n;return g||(g=new Jt),d(_e,te,s,l,g)}}return V?(g||(g=new Jt),fE(t,n,s,l,d,g)):!1}o(qS,"baseIsEqualDeep");function jS(t){return He(t)&&ut(t)==Vt}o(jS,"baseIsMap");function yu(t,n,s,l){var d=s.length,g=d,x=!l;if(t==null)return!g;for(t=Ne(t);d--;){var w=s[d];if(x&&w[2]?w[1]!==t[w[0]]:!(w[0]in t))return!1}for(;++d<g;){w=s[d];var I=w[0],M=t[I],q=w[1];if(x&&w[2]){if(M===e&&!(I in t))return!1}else{var B=new Jt;if(l)var V=l(M,q,I,t,n,B);if(!(V===e?Ii(q,M,b|E,l,B):V))return!1}}return!0}o(yu,"baseIsMatch");function ud(t){if(!Be(t)||wE(t))return!1;var n=_r(t)?jT:kA;return n.test(cn(t))}o(ud,"baseIsNative");function BS(t){return He(t)&&mt(t)==hi}o(BS,"baseIsRegExp");function FS(t){return He(t)&&ut(t)==Wt}o(FS,"baseIsSet");function HS(t){return He(t)&&da(t.length)&&!!De[mt(t)]}o(HS,"baseIsTypedArray");function cd(t){return typeof t=="function"?t:t==null?wt:typeof t=="object"?fe(t)?dd(t[0],t[1]):pd(t):Om(t)}o(cd,"baseIteratee");function bu(t){if(!ki(t))return VT(t);var n=[];for(var s in Ne(t))ke.call(t,s)&&s!="constructor"&&n.push(s);return n}o(bu,"baseKeys");function GS(t){if(!Be(t))return EE(t);var n=ki(t),s=[];for(var l in t)l=="constructor"&&(n||!ke.call(t,l))||s.push(l);return s}o(GS,"baseKeysIn");function vu(t,n){return t<n}o(vu,"baseLt");function ld(t,n){var s=-1,l=xt(t)?N(t.length):[];return Cr(t,function(d,g,x){l[++s]=n(d,g,x)}),l}o(ld,"baseMap");function pd(t){var n=zu(t);return n.length==1&&n[0][2]?Gd(n[0][0],n[0][1]):function(s){return s===t||yu(s,t,n)}}o(pd,"baseMatches");function dd(t,n){return Du(t)&&Hd(n)?Gd(Xt(t),n):function(s){var l=Vu(s,t);return l===e&&l===n?Wu(s,t):Ii(n,l,b|E)}}o(dd,"baseMatchesProperty");function Jo(t,n,s,l,d){t!==n&&mu(n,function(g,x){if(d||(d=new Jt),Be(g))ZS(t,n,x,s,Jo,l,d);else{var w=l?l(Uu(t,x),g,x+"",t,n,d):e;w===e&&(w=g),pu(t,x,w)}},Pt)}o(Jo,"baseMerge");function ZS(t,n,s,l,d,g,x){var w=Uu(t,s),I=Uu(n,s),M=x.get(I);if(M){pu(t,s,M);return}var q=g?g(w,I,s+"",t,n,x):e,B=q===e;if(B){var V=fe(I),Y=!V&&Mr(I),ie=!V&&!Y&&Nn(I);q=I,V||Y||ie?fe(w)?q=w:We(w)?q=_t(w):Y?(B=!1,q=Ad(I,!0)):ie?(B=!1,q=Td(I,!0)):q=[]:Ni(I)||ln(I)?(q=w,ln(w)?q=xm(w):(!Be(w)||_r(w))&&(q=Fd(I))):B=!1}B&&(x.set(I,q),d(q,I,l,g,x),x.delete(I)),pu(t,s,q)}o(ZS,"baseMergeDeep");function md(t,n){var s=t.length;if(s)return n+=n<0?s:0,vr(n,s)?t[n]:e}o(md,"baseNth");function fd(t,n,s){n.length?n=qe(n,function(g){return fe(g)?function(x){return sn(x,g.length===1?g[0]:g)}:g}):n=[wt];var l=-1;n=qe(n,$t(ne()));var d=ld(t,function(g,x,w){var I=qe(n,function(M){return M(g)});return{criteria:I,index:++l,value:g}});return vT(d,function(g,x){return oE(g,x,s)})}o(fd,"baseOrderBy");function VS(t,n){return hd(t,n,function(s,l){return Wu(t,l)})}o(VS,"basePick");function hd(t,n,s){for(var l=-1,d=n.length,g={};++l<d;){var x=n[l],w=sn(t,x);s(w,x)&&$i(g,Lr(x,t),w)}return g}o(hd,"basePickBy");function WS(t){return function(n){return sn(n,t)}}o(WS,"basePropertyDeep");function _u(t,n,s,l){var d=l?bT:wn,g=-1,x=n.length,w=t;for(t===n&&(n=_t(n)),s&&(w=qe(t,$t(s)));++g<x;)for(var I=0,M=n[g],q=s?s(M):M;(I=d(w,q,I,l))>-1;)w!==t&&qo.call(w,I,1),qo.call(t,I,1);return t}o(_u,"basePullAll");function gd(t,n){for(var s=t?n.length:0,l=s-1;s--;){var d=n[s];if(s==l||d!==g){var g=d;vr(d)?qo.call(t,d,1):Au(t,d)}}return t}o(gd,"basePullAt");function xu(t,n){return t+Fo(Jp()*(n-t+1))}o(xu,"baseRandom");function KS(t,n,s,l){for(var d=-1,g=Qe(Bo((n-t)/(s||1)),0),x=N(g);g--;)x[l?g:++d]=t,t+=s;return x}o(KS,"baseRange");function Pu(t,n){var s="";if(!t||n<1||n>$r)return s;do n%2&&(s+=t),n=Fo(n/2),n&&(t+=t);while(n);return s}o(Pu,"baseRepeat");function xe(t,n){return Mu(Zd(t,n,wt),t+"")}o(xe,"baseRest");function JS(t){return Qp(zn(t))}o(JS,"baseSample");function XS(t,n){var s=zn(t);return aa(s,an(n,0,s.length))}o(XS,"baseSampleSize");function $i(t,n,s,l){if(!Be(t))return t;n=Lr(n,t);for(var d=-1,g=n.length,x=g-1,w=t;w!=null&&++d<g;){var I=Xt(n[d]),M=s;if(I==="__proto__"||I==="constructor"||I==="prototype")return t;if(d!=x){var q=w[I];M=l?l(q,I,w):e,M===e&&(M=Be(q)?q:vr(n[d+1])?[]:{})}Ti(w,I,M),w=w[I]}return t}o($i,"baseSet");var yd=Ho?function(t,n){return Ho.set(t,n),t}:wt,YS=jo?function(t,n){return jo(t,"toString",{configurable:!0,enumerable:!1,value:Ju(n),writable:!0})}:wt;function QS(t){return aa(zn(t))}o(QS,"baseShuffle");function qt(t,n,s){var l=-1,d=t.length;n<0&&(n=-n>d?0:d+n),s=s>d?d:s,s<0&&(s+=d),d=n>s?0:s-n>>>0,n>>>=0;for(var g=N(d);++l<d;)g[l]=t[l+n];return g}o(qt,"baseSlice");function eE(t,n){var s;return Cr(t,function(l,d,g){return s=n(l,d,g),!s}),!!s}o(eE,"baseSome");function Xo(t,n,s){var l=0,d=t==null?l:t.length;if(typeof n=="number"&&n===n&&d<=nA){for(;l<d;){var g=l+d>>>1,x=t[g];x!==null&&!kt(x)&&(s?x<=n:x<n)?l=g+1:d=g}return d}return wu(t,n,wt,s)}o(Xo,"baseSortedIndex");function wu(t,n,s,l){var d=0,g=t==null?0:t.length;if(g===0)return 0;n=s(n);for(var x=n!==n,w=n===null,I=kt(n),M=n===e;d<g;){var q=Fo((d+g)/2),B=s(t[q]),V=B!==e,Y=B===null,ie=B===B,_e=kt(B);if(x)var te=l||ie;else M?te=ie&&(l||V):w?te=ie&&V&&(l||!Y):I?te=ie&&V&&!Y&&(l||!_e):Y||_e?te=!1:te=l?B<=n:B<n;te?d=q+1:g=q}return st(g,rA)}o(wu,"baseSortedIndexBy");function bd(t,n){for(var s=-1,l=t.length,d=0,g=[];++s<l;){var x=t[s],w=n?n(x):x;if(!s||!Yt(w,I)){var I=w;g[d++]=x===0?0:x}}return g}o(bd,"baseSortedUniq");function vd(t){return typeof t=="number"?t:kt(t)?Po:+t}o(vd,"baseToNumber");function Rt(t){if(typeof t=="string")return t;if(fe(t))return qe(t,Rt)+"";if(kt(t))return Xp?Xp.call(t):"";var n=t+"";return n=="0"&&1/t==-en?"-0":n}o(Rt,"baseToString");function Dr(t,n,s){var l=-1,d=Ro,g=t.length,x=!0,w=[],I=w;if(s)x=!1,d=Ys;else if(g>=i){var M=n?null:pE(t);if(M)return Oo(M);x=!1,d=vi,I=new on}else I=n?[]:w;e:for(;++l<g;){var q=t[l],B=n?n(q):q;if(q=s||q!==0?q:0,x&&B===B){for(var V=I.length;V--;)if(I[V]===B)continue e;n&&I.push(B),w.push(q)}else d(I,B,s)||(I!==w&&I.push(B),w.push(q))}return w}o(Dr,"baseUniq");function Au(t,n){n=Lr(n,t);var s=-1,l=n.length;if(!l)return!0;for(;++s<l;){var d=Xt(n[s]);if(d==="__proto__"&&!ke.call(t,"__proto__")||(d==="constructor"||d==="prototype")&&s<l-1)return!1}var g=Vd(t,n);return g==null||delete g[Xt(jt(n))]}o(Au,"baseUnset");function _d(t,n,s,l){return $i(t,n,s(sn(t,n)),l)}o(_d,"baseUpdate");function Yo(t,n,s,l){for(var d=t.length,g=l?d:-1;(l?g--:++g<d)&&n(t[g],g,t););return s?qt(t,l?0:g,l?g+1:d):qt(t,l?g+1:0,l?d:g)}o(Yo,"baseWhile");function xd(t,n){var s=t;return s instanceof Te&&(s=s.value()),Qs(n,function(l,d){return d.func.apply(d.thisArg,kr([l],d.args))},s)}o(xd,"baseWrapperValue");function Tu(t,n,s){var l=t.length;if(l<2)return l?Dr(t[0]):[];for(var d=-1,g=N(l);++d<l;)for(var x=t[d],w=-1;++w<l;)w!=d&&(g[d]=Si(g[d]||x,t[w],n,s));return Dr(ot(g,1),n,s)}o(Tu,"baseXor");function Pd(t,n,s){for(var l=-1,d=t.length,g=n.length,x={};++l<d;){var w=l<g?n[l]:e;s(x,t[l],w)}return x}o(Pd,"baseZipObject");function Su(t){return We(t)?t:[]}o(Su,"castArrayLikeObject");function Eu(t){return typeof t=="function"?t:wt}o(Eu,"castFunction");function Lr(t,n){return fe(t)?t:Du(t,n)?[t]:Xd(Oe(t))}o(Lr,"castPath");var tE=xe;function Ur(t,n,s){var l=t.length;return s=s===e?l:s,!n&&s>=l?t:qt(t,n,s)}o(Ur,"castSlice");var wd=BT||function(t){return tt.clearTimeout(t)};function Ad(t,n){if(n)return t.slice();var s=t.length,l=Gp?Gp(s):new t.constructor(s);return t.copy(l),l}o(Ad,"cloneBuffer");function Iu(t){var n=new t.constructor(t.byteLength);return new Uo(n).set(new Uo(t)),n}o(Iu,"cloneArrayBuffer");function rE(t,n){var s=n?Iu(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.byteLength)}o(rE,"cloneDataView");function nE(t){var n=new t.constructor(t.source,sp.exec(t));return n.lastIndex=t.lastIndex,n}o(nE,"cloneRegExp");function iE(t){return Ai?Ne(Ai.call(t)):{}}o(iE,"cloneSymbol");function Td(t,n){var s=n?Iu(t.buffer):t.buffer;return new t.constructor(s,t.byteOffset,t.length)}o(Td,"cloneTypedArray");function Sd(t,n){if(t!==n){var s=t!==e,l=t===null,d=t===t,g=kt(t),x=n!==e,w=n===null,I=n===n,M=kt(n);if(!w&&!M&&!g&&t>n||g&&x&&I&&!w&&!M||l&&x&&I||!s&&I||!d)return 1;if(!l&&!g&&!M&&t<n||M&&s&&d&&!l&&!g||w&&s&&d||!x&&d||!I)return-1}return 0}o(Sd,"compareAscending");function oE(t,n,s){for(var l=-1,d=t.criteria,g=n.criteria,x=d.length,w=s.length;++l<x;){var I=Sd(d[l],g[l]);if(I){if(l>=w)return I;var M=s[l];return I*(M=="desc"?-1:1)}}return t.index-n.index}o(oE,"compareMultiple");function Ed(t,n,s,l){for(var d=-1,g=t.length,x=s.length,w=-1,I=n.length,M=Qe(g-x,0),q=N(I+M),B=!l;++w<I;)q[w]=n[w];for(;++d<x;)(B||d<g)&&(q[s[d]]=t[d]);for(;M--;)q[w++]=t[d++];return q}o(Ed,"composeArgs");function Id(t,n,s,l){for(var d=-1,g=t.length,x=-1,w=s.length,I=-1,M=n.length,q=Qe(g-w,0),B=N(q+M),V=!l;++d<q;)B[d]=t[d];for(var Y=d;++I<M;)B[Y+I]=n[I];for(;++x<w;)(V||d<g)&&(B[Y+s[x]]=t[d++]);return B}o(Id,"composeArgsRight");function _t(t,n){var s=-1,l=t.length;for(n||(n=N(l));++s<l;)n[s]=t[s];return n}o(_t,"copyArray");function ar(t,n,s,l){var d=!s;s||(s={});for(var g=-1,x=n.length;++g<x;){var w=n[g],I=l?l(s[w],t[w],w,s,t):e;I===e&&(I=t[w]),d?ir(s,w,I):Ti(s,w,I)}return s}o(ar,"copyObject");function aE(t,n){return ar(t,Cu(t),n)}o(aE,"copySymbols");function sE(t,n){return ar(t,jd(t),n)}o(sE,"copySymbolsIn");function Qo(t,n){return function(s,l){var d=fe(s)?dT:$S,g=n?n():{};return d(s,t,ne(l,2),g)}}o(Qo,"createAggregator");function Rn(t){return xe(function(n,s){var l=-1,d=s.length,g=d>1?s[d-1]:e,x=d>2?s[2]:e;for(g=t.length>3&&typeof g=="function"?(d--,g):e,x&&ft(s[0],s[1],x)&&(g=d<3?e:g,d=1),n=Ne(n);++l<d;){var w=s[l];w&&t(n,w,l,g)}return n})}o(Rn,"createAssigner");function $d(t,n){return function(s,l){if(s==null)return s;if(!xt(s))return t(s,l);for(var d=s.length,g=n?d:-1,x=Ne(s);(n?g--:++g<d)&&l(x[g],g,x)!==!1;);return s}}o($d,"createBaseEach");function Rd(t){return function(n,s,l){for(var d=-1,g=Ne(n),x=l(n),w=x.length;w--;){var I=x[t?w:++d];if(s(g[I],I,g)===!1)break}return n}}o(Rd,"createBaseFor");function uE(t,n,s){var l=n&z,d=Ri(t);function g(){var x=this&&this!==tt&&this instanceof g?d:t;return x.apply(l?s:this,arguments)}return o(g,"wrapper"),g}o(uE,"createBind");function kd(t){return function(n){n=Oe(n);var s=An(n)?Kt(n):e,l=s?s[0]:n.charAt(0),d=s?Ur(s,1).join(""):n.slice(1);return l[t]()+d}}o(kd,"createCaseFirst");function kn(t){return function(n){return Qs(Rm($m(n).replace(YA,"")),t,"")}}o(kn,"createCompounder");function Ri(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var s=$n(t.prototype),l=t.apply(s,n);return Be(l)?l:s}}o(Ri,"createCtor");function cE(t,n,s){var l=Ri(t);function d(){for(var g=arguments.length,x=N(g),w=g,I=On(d);w--;)x[w]=arguments[w];var M=g<3&&x[0]!==I&&x[g-1]!==I?[]:Or(x,I);if(g-=M.length,g<s)return Dd(t,n,ea,d.placeholder,e,x,M,e,e,s-g);var q=this&&this!==tt&&this instanceof d?l:t;return Et(q,this,x)}return o(d,"wrapper"),d}o(cE,"createCurry");function Od(t){return function(n,s,l){var d=Ne(n);if(!xt(n)){var g=ne(s,3);n=rt(n),s=o(function(w){return g(d[w],w,d)},"predicate")}var x=t(n,s,l);return x>-1?d[g?n[x]:x]:e}}o(Od,"createFind");function Nd(t){return br(function(n){var s=n.length,l=s,d=Ut.prototype.thru;for(t&&n.reverse();l--;){var g=n[l];if(typeof g!="function")throw new Lt(u);if(d&&!x&&ia(g)=="wrapper")var x=new Ut([],!0)}for(l=x?l:s;++l<s;){g=n[l];var w=ia(g),I=w=="wrapper"?Nu(g):e;I&&Lu(I[0])&&I[1]==(dt|Z|Me|Tt)&&!I[4].length&&I[9]==1?x=x[ia(I[0])].apply(x,I[3]):x=g.length==1&&Lu(g)?x[w]():x.thru(g)}return function(){var M=arguments,q=M[0];if(x&&M.length==1&&fe(q))return x.plant(q).value();for(var B=0,V=s?n[B].apply(this,M):q;++B<s;)V=n[B].call(this,V);return V}})}o(Nd,"createFlow");function ea(t,n,s,l,d,g,x,w,I,M){var q=n&dt,B=n&z,V=n&O,Y=n&(Z|ae),ie=n&St,_e=V?e:Ri(t);function te(){for(var we=arguments.length,Se=N(we),Ot=we;Ot--;)Se[Ot]=arguments[Ot];if(Y)var ht=On(te),Nt=xT(Se,ht);if(l&&(Se=Ed(Se,l,d,Y)),g&&(Se=Id(Se,g,x,Y)),we-=Nt,Y&&we<M){var Ke=Or(Se,ht);return Dd(t,n,ea,te.placeholder,s,Se,Ke,w,I,M-we)}var Qt=B?s:this,Pr=V?Qt[t]:t;return we=Se.length,w?Se=$E(Se,w):ie&&we>1&&Se.reverse(),q&&I<we&&(Se.length=I),this&&this!==tt&&this instanceof te&&(Pr=_e||Ri(Pr)),Pr.apply(Qt,Se)}return o(te,"wrapper"),te}o(ea,"createHybrid");function zd(t,n){return function(s,l){return LS(s,t,n(l),{})}}o(zd,"createInverter");function ta(t,n){return function(s,l){var d;if(s===e&&l===e)return n;if(s!==e&&(d=s),l!==e){if(d===e)return l;typeof s=="string"||typeof l=="string"?(s=Rt(s),l=Rt(l)):(s=vd(s),l=vd(l)),d=t(s,l)}return d}}o(ta,"createMathOperation");function $u(t){return br(function(n){return n=qe(n,$t(ne())),xe(function(s){var l=this;return t(n,function(d){return Et(d,l,s)})})})}o($u,"createOver");function ra(t,n){n=n===e?" ":Rt(n);var s=n.length;if(s<2)return s?Pu(n,t):n;var l=Pu(n,Bo(t/Tn(n)));return An(n)?Ur(Kt(l),0,t).join(""):l.slice(0,t)}o(ra,"createPadding");function lE(t,n,s,l){var d=n&z,g=Ri(t);function x(){for(var w=-1,I=arguments.length,M=-1,q=l.length,B=N(q+I),V=this&&this!==tt&&this instanceof x?g:t;++M<q;)B[M]=l[M];for(;I--;)B[M++]=arguments[++w];return Et(V,d?s:this,B)}return o(x,"wrapper"),x}o(lE,"createPartial");function Cd(t){return function(n,s,l){return l&&typeof l!="number"&&ft(n,s,l)&&(s=l=e),n=xr(n),s===e?(s=n,n=0):s=xr(s),l=l===e?n<s?1:-1:xr(l),KS(n,s,l,t)}}o(Cd,"createRange");function na(t){return function(n,s){return typeof n=="string"&&typeof s=="string"||(n=Bt(n),s=Bt(s)),t(n,s)}}o(na,"createRelationalOperation");function Dd(t,n,s,l,d,g,x,w,I,M){var q=n&Z,B=q?x:e,V=q?e:x,Y=q?g:e,ie=q?e:g;n|=q?Me:et,n&=~(q?et:Me),n&F||(n&=~(z|O));var _e=[t,n,d,Y,B,ie,V,w,I,M],te=s.apply(e,_e);return Lu(t)&&Wd(te,_e),te.placeholder=l,Kd(te,t,n)}o(Dd,"createRecurry");function Ru(t){var n=Ye[t];return function(s,l){if(s=Bt(s),l=l==null?0:st(be(l),292),l&&Kp(s)){var d=(Oe(s)+"e").split("e"),g=n(d[0]+"e"+(+d[1]+l));return d=(Oe(g)+"e").split("e"),+(d[0]+"e"+(+d[1]-l))}return n(s)}}o(Ru,"createRound");var pE=En&&1/Oo(new En([,-0]))[1]==en?function(t){return new En(t)}:Qu;function Ld(t){return function(n){var s=ut(n);return s==Vt?au(n):s==Wt?IT(n):_T(n,t(n))}}o(Ld,"createToPairs");function yr(t,n,s,l,d,g,x,w){var I=n&O;if(!I&&typeof t!="function")throw new Lt(u);var M=l?l.length:0;if(M||(n&=~(Me|et),l=d=e),x=x===e?x:Qe(be(x),0),w=w===e?w:be(w),M-=d?d.length:0,n&et){var q=l,B=d;l=d=e}var V=I?e:Nu(t),Y=[t,n,s,l,d,q,B,g,x,w];if(V&&SE(Y,V),t=Y[0],n=Y[1],s=Y[2],l=Y[3],d=Y[4],w=Y[9]=Y[9]===e?I?0:t.length:Qe(Y[9]-M,0),!w&&n&(Z|ae)&&(n&=~(Z|ae)),!n||n==z)var ie=uE(t,n,s);else n==Z||n==ae?ie=cE(t,n,w):(n==Me||n==(z|Me))&&!d.length?ie=lE(t,n,s,l):ie=ea.apply(e,Y);var _e=V?yd:Wd;return Kd(_e(ie,Y),t,n)}o(yr,"createWrap");function Ud(t,n,s,l){return t===e||Yt(t,Sn[s])&&!ke.call(l,s)?n:t}o(Ud,"customDefaultsAssignIn");function Md(t,n,s,l,d,g){return Be(t)&&Be(n)&&(g.set(n,t),Jo(t,n,e,Md,g),g.delete(n)),t}o(Md,"customDefaultsMerge");function dE(t){return Ni(t)?e:t}o(dE,"customOmitClone");function qd(t,n,s,l,d,g){var x=s&b,w=t.length,I=n.length;if(w!=I&&!(x&&I>w))return!1;var M=g.get(t),q=g.get(n);if(M&&q)return M==n&&q==t;var B=-1,V=!0,Y=s&E?new on:e;for(g.set(t,n),g.set(n,t);++B<w;){var ie=t[B],_e=n[B];if(l)var te=x?l(_e,ie,B,n,t,g):l(ie,_e,B,t,n,g);if(te!==e){if(te)continue;V=!1;break}if(Y){if(!eu(n,function(we,Se){if(!vi(Y,Se)&&(ie===we||d(ie,we,s,l,g)))return Y.push(Se)})){V=!1;break}}else if(!(ie===_e||d(ie,_e,s,l,g))){V=!1;break}}return g.delete(t),g.delete(n),V}o(qd,"equalArrays");function mE(t,n,s,l,d,g,x){switch(s){case xn:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case bi:return!(t.byteLength!=n.byteLength||!g(new Uo(t),new Uo(n)));case di:case mi:case fi:return Yt(+t,+n);case Ao:return t.name==n.name&&t.message==n.message;case hi:case gi:return t==n+"";case Vt:var w=au;case Wt:var I=l&b;if(w||(w=Oo),t.size!=n.size&&!I)return!1;var M=x.get(t);if(M)return M==n;l|=E,x.set(t,n);var q=qd(w(t),w(n),l,d,g,x);return x.delete(t),q;case So:if(Ai)return Ai.call(t)==Ai.call(n)}return!1}o(mE,"equalByTag");function fE(t,n,s,l,d,g){var x=s&b,w=ku(t),I=w.length,M=ku(n),q=M.length;if(I!=q&&!x)return!1;for(var B=I;B--;){var V=w[B];if(!(x?V in n:ke.call(n,V)))return!1}var Y=g.get(t),ie=g.get(n);if(Y&&ie)return Y==n&&ie==t;var _e=!0;g.set(t,n),g.set(n,t);for(var te=x;++B<I;){V=w[B];var we=t[V],Se=n[V];if(l)var Ot=x?l(Se,we,V,n,t,g):l(we,Se,V,t,n,g);if(!(Ot===e?we===Se||d(we,Se,s,l,g):Ot)){_e=!1;break}te||(te=V=="constructor")}if(_e&&!te){var ht=t.constructor,Nt=n.constructor;ht!=Nt&&"constructor"in t&&"constructor"in n&&!(typeof ht=="function"&&ht instanceof ht&&typeof Nt=="function"&&Nt instanceof Nt)&&(_e=!1)}return g.delete(t),g.delete(n),_e}o(fE,"equalObjects");function br(t){return Mu(Zd(t,e,tm),t+"")}o(br,"flatRest");function ku(t){return ad(t,rt,Cu)}o(ku,"getAllKeys");function Ou(t){return ad(t,Pt,jd)}o(Ou,"getAllKeysIn");var Nu=Ho?function(t){return Ho.get(t)}:Qu;function ia(t){for(var n=t.name+"",s=In[n],l=ke.call(In,n)?s.length:0;l--;){var d=s[l],g=d.func;if(g==null||g==t)return d.name}return n}o(ia,"getFuncName");function On(t){var n=ke.call(f,"placeholder")?f:t;return n.placeholder}o(On,"getHolder");function ne(){var t=f.iteratee||Xu;return t=t===Xu?cd:t,arguments.length?t(arguments[0],arguments[1]):t}o(ne,"getIteratee");function oa(t,n){var s=t.__data__;return PE(n)?s[typeof n=="string"?"string":"hash"]:s.map}o(oa,"getMapData");function zu(t){for(var n=rt(t),s=n.length;s--;){var l=n[s],d=t[l];n[s]=[l,d,Hd(d)]}return n}o(zu,"getMatchData");function un(t,n){var s=TT(t,n);return ud(s)?s:e}o(un,"getNative");function hE(t){var n=ke.call(t,rn),s=t[rn];try{t[rn]=e;var l=!0}catch{}var d=Do.call(t);return l&&(n?t[rn]=s:delete t[rn]),d}o(hE,"getRawTag");var Cu=uu?function(t){return t==null?[]:(t=Ne(t),Rr(uu(t),function(n){return Vp.call(t,n)}))}:ec,jd=uu?function(t){for(var n=[];t;)kr(n,Cu(t)),t=Mo(t);return n}:ec,ut=mt;(cu&&ut(new cu(new ArrayBuffer(1)))!=xn||xi&&ut(new xi)!=Vt||lu&&ut(lu.resolve())!=rp||En&&ut(new En)!=Wt||Pi&&ut(new Pi)!=yi)&&(ut=o(function(t){var n=mt(t),s=n==fr?t.constructor:e,l=s?cn(s):"";if(l)switch(l){case XT:return xn;case YT:return Vt;case QT:return rp;case eS:return Wt;case tS:return yi}return n},"getTag"));function gE(t,n,s){for(var l=-1,d=s.length;++l<d;){var g=s[l],x=g.size;switch(g.type){case"drop":t+=x;break;case"dropRight":n-=x;break;case"take":n=st(n,t+x);break;case"takeRight":t=Qe(t,n-x);break}}return{start:t,end:n}}o(gE,"getView");function yE(t){var n=t.match(AA);return n?n[1].split(TA):[]}o(yE,"getWrapDetails");function Bd(t,n,s){n=Lr(n,t);for(var l=-1,d=n.length,g=!1;++l<d;){var x=Xt(n[l]);if(!(g=t!=null&&s(t,x)))break;t=t[x]}return g||++l!=d?g:(d=t==null?0:t.length,!!d&&da(d)&&vr(x,d)&&(fe(t)||ln(t)))}o(Bd,"hasPath");function bE(t){var n=t.length,s=new t.constructor(n);return n&&typeof t[0]=="string"&&ke.call(t,"index")&&(s.index=t.index,s.input=t.input),s}o(bE,"initCloneArray");function Fd(t){return typeof t.constructor=="function"&&!ki(t)?$n(Mo(t)):{}}o(Fd,"initCloneObject");function vE(t,n,s){var l=t.constructor;switch(n){case bi:return Iu(t);case di:case mi:return new l(+t);case xn:return rE(t,s);case zs:case Cs:case Ds:case Ls:case Us:case Ms:case qs:case js:case Bs:return Td(t,s);case Vt:return new l;case fi:case gi:return new l(t);case hi:return nE(t);case Wt:return new l;case So:return iE(t)}}o(vE,"initCloneByTag");function _E(t,n){var s=n.length;if(!s)return t;var l=s-1;return n[l]=(s>1?"& ":"")+n[l],n=n.join(s>2?", ":" "),t.replace(wA,`{
|
|
@@ -20,7 +20,7 @@ __p += '`),Se&&(B+=`' +
|
|
|
20
20
|
function print() { __p += __j.call(arguments, '') }
|
|
21
21
|
`:`;
|
|
22
22
|
`)+B+`return __p
|
|
23
|
-
}`;var _e=km(function(){return $e(g,Y+"return "+B).apply(e,x)});if(_e.source=B,Hu(_e))throw _e;return _e}o(WR,"template");function KR(t){return Oe(t).toLowerCase()}o(KR,"toLower");function JR(t){return Oe(t).toUpperCase()}o(JR,"toUpper");function XR(t,n,s){if(t=Oe(t),t&&(s||n===e))return Mp(t);if(!t||!(n=Rt(n)))return t;var l=Kt(t),d=Kt(n),g=qp(l,d),x=jp(l,d)+1;return Ur(l,g,x).join("")}o(XR,"trim");function YR(t,n,s){if(t=Oe(t),t&&(s||n===e))return t.slice(0,Fp(t)+1);if(!t||!(n=Rt(n)))return t;var l=Kt(t),d=jp(l,Kt(n))+1;return Ur(l,0,d).join("")}o(YR,"trimEnd");function QR(t,n,s){if(t=Oe(t),t&&(s||n===e))return t.replace(Hs,"");if(!t||!(n=Rt(n)))return t;var l=Kt(t),d=qp(l,Kt(n));return Ur(l,d).join("")}o(QR,"trimStart");function ek(t,n){var s=Ns,l=vn;if(Be(n)){var d="separator"in n?n.separator:d;s="length"in n?be(n.length):s,l="omission"in n?Rt(n.omission):l}t=Oe(t);var g=t.length;if(An(t)){var x=Kt(t);g=x.length}if(s>=g)return t;var w=s-Tn(l);if(w<1)return l;var I=x?Ur(x,0,w).join(""):t.slice(0,w);if(d===e)return I+l;if(x&&(w+=I.length-w),Gu(d)){if(t.slice(w).search(d)){var M,q=I;for(d.global||(d=su(d.source,Oe(sp.exec(d))+"g")),d.lastIndex=0;M=d.exec(q);)var B=M.index;I=I.slice(0,B===e?w:B)}}else if(t.indexOf(Rt(d),w)!=w){var V=I.lastIndexOf(d);V>-1&&(I=I.slice(0,V))}return I+l}o(ek,"truncate");function tk(t){return t=Oe(t),t&&fA.test(t)?t.replace(np,kT):t}o(tk,"unescape");var rk=kn(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),Ku=kd("toUpperCase");function Rm(t,n,s){return t=Oe(t),n=s?e:n,n===e?ST(t)?zT(t):yT(t):t.match(n)||[]}o(Rm,"words");var km=xe(function(t,n){try{return Et(t,e,n)}catch(s){return Hu(s)?s:new me(s)}}),nk=br(function(t,n){return It(n,function(s){s=Xt(s),ir(t,s,Bu(t[s],t))}),t});function ik(t){var n=t==null?0:t.length,s=ne();return t=n?qe(t,function(l){if(typeof l[1]!="function")throw new Lt(u);return[s(l[0]),l[1]]}):[],xe(function(l){for(var d=-1;++d<n;){var g=t[d];if(Et(g[0],this,l))return Et(g[1],this,l)}})}o(ik,"cond");function ok(t){return kS(Mt(t,A))}o(ok,"conforms");function Ju(t){return function(){return t}}o(Ju,"constant");function ak(t,n){return t==null||t!==t?n:t}o(ak,"defaultTo");var sk=Nd(),uk=Nd(!0);function wt(t){return t}o(wt,"identity");function Xu(t){return cd(typeof t=="function"?t:Mt(t,A))}o(Xu,"iteratee");function ck(t){return pd(Mt(t,A))}o(ck,"matches");function lk(t,n){return dd(t,Mt(n,A))}o(lk,"matchesProperty");var pk=xe(function(t,n){return function(s){return Ei(s,t,n)}}),dk=xe(function(t,n){return function(s){return Ei(t,s,n)}});function Yu(t,n,s){var l=rt(n),d=Ko(n,l);s==null&&!(Be(n)&&(d.length||!l.length))&&(s=n,n=t,t=this,d=Ko(n,rt(n)));var g=!(Be(s)&&"chain"in s)||!!s.chain,x=_r(t);return It(d,function(w){var I=n[w];t[w]=I,x&&(t.prototype[w]=function(){var M=this.__chain__;if(g||M){var q=t(this.__wrapped__),B=q.__actions__=_t(this.__actions__);return B.push({func:I,args:arguments,thisArg:t}),q.__chain__=M,q}return I.apply(t,kr([this.value()],arguments))})}),t}o(Yu,"mixin");function mk(){return tt._===this&&(tt._=qT),this}o(mk,"noConflict");function Qu(){}o(Qu,"noop");function fk(t){return t=be(t),xe(function(n){return md(n,t)})}o(fk,"nthArg");var hk=$u(qe),gk=$u(zp),yk=$u(eu);function Om(t){return Du(t)?tu(Xt(t)):WS(t)}o(Om,"property");function bk(t){return function(n){return t==null?e:sn(t,n)}}o(bk,"propertyOf");var vk=Cd(),_k=Cd(!0);function ec(){return[]}o(ec,"stubArray");function tc(){return!1}o(tc,"stubFalse");function xk(){return{}}o(xk,"stubObject");function Pk(){return""}o(Pk,"stubString");function wk(){return!0}o(wk,"stubTrue");function Ak(t,n){if(t=be(t),t<1||t>$r)return[];var s=nr,l=st(t,nr);n=ne(n),t-=nr;for(var d=iu(l,n);++s<t;)n(s);return d}o(Ak,"times");function Tk(t){return fe(t)?qe(t,Xt):kt(t)?[t]:_t(Xd(Oe(t)))}o(Tk,"toPath");function Sk(t){var n=++UT;return Oe(t)+n}o(Sk,"uniqueId");var Ek=ta(function(t,n){return t+n},0),Ik=Ru("ceil"),$k=ta(function(t,n){return t/n},1),Rk=Ru("floor");function kk(t){return t&&t.length?Wo(t,wt,hu):e}o(kk,"max");function Ok(t,n){return t&&t.length?Wo(t,ne(n,2),hu):e}o(Ok,"maxBy");function Nk(t){return Lp(t,wt)}o(Nk,"mean");function zk(t,n){return Lp(t,ne(n,2))}o(zk,"meanBy");function Ck(t){return t&&t.length?Wo(t,wt,vu):e}o(Ck,"min");function Dk(t,n){return t&&t.length?Wo(t,ne(n,2),vu):e}o(Dk,"minBy");var Lk=ta(function(t,n){return t*n},1),Uk=Ru("round"),Mk=ta(function(t,n){return t-n},0);function qk(t){return t&&t.length?nu(t,wt):0}o(qk,"sum");function jk(t,n){return t&&t.length?nu(t,ne(n,2)):0}return o(jk,"sumBy"),f.after=l$,f.ary=um,f.assign=X$,f.assignIn=Pm,f.assignInWith=wm,f.assignWith=Zu,f.at=Y$,f.before=cm,f.bind=Bu,f.bindAll=nk,f.bindKey=lm,f.castArray=P$,f.chain=om,f.chunk=kE,f.compact=OE,f.concat=NE,f.cond=ik,f.conforms=ok,f.constant=Ju,f.countBy=jI,f.create=Q$,f.curry=pm,f.curryRight=dm,f.debounce=mm,f.defaults=eR,f.defaultsDeep=tR,f.defer=p$,f.delay=d$,f.difference=zE,f.differenceBy=CE,f.differenceWith=DE,f.drop=LE,f.dropRight=UE,f.dropRightWhile=ME,f.dropWhile=qE,f.fill=jE,f.filter=FI,f.flatMap=ZI,f.flatMapDeep=VI,f.flatMapDepth=WI,f.flatten=tm,f.flattenDeep=BE,f.flattenDepth=FE,f.flip=m$,f.flow=sk,f.flowRight=uk,f.fromPairs=HE,f.functions=uR,f.functionsIn=cR,f.groupBy=KI,f.initial=ZE,f.intersection=VE,f.intersectionBy=WE,f.intersectionWith=KE,f.invert=pR,f.invertBy=dR,f.invokeMap=XI,f.iteratee=Xu,f.keyBy=YI,f.keys=rt,f.keysIn=Pt,f.map=ua,f.mapKeys=fR,f.mapValues=hR,f.matches=ck,f.matchesProperty=lk,f.memoize=la,f.merge=gR,f.mergeWith=Am,f.method=pk,f.methodOf=dk,f.mixin=Yu,f.negate=pa,f.nthArg=fk,f.omit=yR,f.omitBy=bR,f.once=f$,f.orderBy=QI,f.over=hk,f.overArgs=h$,f.overEvery=gk,f.overSome=yk,f.partial=Fu,f.partialRight=fm,f.partition=e$,f.pick=vR,f.pickBy=Tm,f.property=Om,f.propertyOf=bk,f.pull=QE,f.pullAll=nm,f.pullAllBy=eI,f.pullAllWith=tI,f.pullAt=rI,f.range=vk,f.rangeRight=_k,f.rearg=g$,f.reject=n$,f.remove=nI,f.rest=y$,f.reverse=qu,f.sampleSize=o$,f.set=xR,f.setWith=PR,f.shuffle=a$,f.slice=iI,f.sortBy=c$,f.sortedUniq=pI,f.sortedUniqBy=dI,f.split=GR,f.spread=b$,f.tail=mI,f.take=fI,f.takeRight=hI,f.takeRightWhile=gI,f.takeWhile=yI,f.tap=OI,f.throttle=v$,f.thru=sa,f.toArray=vm,f.toPairs=Sm,f.toPairsIn=Em,f.toPath=Tk,f.toPlainObject=xm,f.transform=wR,f.unary=_$,f.union=bI,f.unionBy=vI,f.unionWith=_I,f.uniq=xI,f.uniqBy=PI,f.uniqWith=wI,f.unset=AR,f.unzip=ju,f.unzipWith=im,f.update=TR,f.updateWith=SR,f.values=zn,f.valuesIn=ER,f.without=AI,f.words=Rm,f.wrap=x$,f.xor=TI,f.xorBy=SI,f.xorWith=EI,f.zip=II,f.zipObject=$I,f.zipObjectDeep=RI,f.zipWith=kI,f.entries=Sm,f.entriesIn=Em,f.extend=Pm,f.extendWith=wm,Yu(f,f),f.add=Ek,f.attempt=km,f.camelCase=kR,f.capitalize=Im,f.ceil=Ik,f.clamp=IR,f.clone=w$,f.cloneDeep=T$,f.cloneDeepWith=S$,f.cloneWith=A$,f.conformsTo=E$,f.deburr=$m,f.defaultTo=ak,f.divide=$k,f.endsWith=OR,f.eq=Yt,f.escape=NR,f.escapeRegExp=zR,f.every=BI,f.find=HI,f.findIndex=Qd,f.findKey=rR,f.findLast=GI,f.findLastIndex=em,f.findLastKey=nR,f.floor=Rk,f.forEach=am,f.forEachRight=sm,f.forIn=iR,f.forInRight=oR,f.forOwn=aR,f.forOwnRight=sR,f.get=Vu,f.gt=I$,f.gte=$$,f.has=lR,f.hasIn=Wu,f.head=rm,f.identity=wt,f.includes=JI,f.indexOf=GE,f.inRange=$R,f.invoke=mR,f.isArguments=ln,f.isArray=fe,f.isArrayBuffer=R$,f.isArrayLike=xt,f.isArrayLikeObject=We,f.isBoolean=k$,f.isBuffer=Mr,f.isDate=O$,f.isElement=N$,f.isEmpty=z$,f.isEqual=C$,f.isEqualWith=D$,f.isError=Hu,f.isFinite=L$,f.isFunction=_r,f.isInteger=hm,f.isLength=da,f.isMap=gm,f.isMatch=U$,f.isMatchWith=M$,f.isNaN=q$,f.isNative=j$,f.isNil=F$,f.isNull=B$,f.isNumber=ym,f.isObject=Be,f.isObjectLike=He,f.isPlainObject=Ni,f.isRegExp=Gu,f.isSafeInteger=H$,f.isSet=bm,f.isString=ma,f.isSymbol=kt,f.isTypedArray=Nn,f.isUndefined=G$,f.isWeakMap=Z$,f.isWeakSet=V$,f.join=JE,f.kebabCase=CR,f.last=jt,f.lastIndexOf=XE,f.lowerCase=DR,f.lowerFirst=LR,f.lt=W$,f.lte=K$,f.max=kk,f.maxBy=Ok,f.mean=Nk,f.meanBy=zk,f.min=Ck,f.minBy=Dk,f.stubArray=ec,f.stubFalse=tc,f.stubObject=xk,f.stubString=Pk,f.stubTrue=wk,f.multiply=Lk,f.nth=YE,f.noConflict=mk,f.noop=Qu,f.now=ca,f.pad=UR,f.padEnd=MR,f.padStart=qR,f.parseInt=jR,f.random=RR,f.reduce=t$,f.reduceRight=r$,f.repeat=BR,f.replace=FR,f.result=_R,f.round=Uk,f.runInContext=S,f.sample=i$,f.size=s$,f.snakeCase=HR,f.some=u$,f.sortedIndex=oI,f.sortedIndexBy=aI,f.sortedIndexOf=sI,f.sortedLastIndex=uI,f.sortedLastIndexBy=cI,f.sortedLastIndexOf=lI,f.startCase=ZR,f.startsWith=VR,f.subtract=Mk,f.sum=qk,f.sumBy=jk,f.template=WR,f.times=Ak,f.toFinite=xr,f.toInteger=be,f.toLength=_m,f.toLower=KR,f.toNumber=Bt,f.toSafeInteger=J$,f.toString=Oe,f.toUpper=JR,f.trim=XR,f.trimEnd=YR,f.trimStart=QR,f.truncate=ek,f.unescape=tk,f.uniqueId=Sk,f.upperCase=rk,f.upperFirst=Ku,f.each=am,f.eachRight=sm,f.first=rm,Yu(f,(function(){var t={};return or(f,function(n,s){ke.call(f.prototype,s)||(t[s]=n)}),t})(),{chain:!1}),f.VERSION=r,It(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){f[t].placeholder=f}),It(["drop","take"],function(t,n){Te.prototype[t]=function(s){s=s===e?1:Qe(be(s),0);var l=this.__filtered__&&!n?new Te(this):this.clone();return l.__filtered__?l.__takeCount__=st(s,l.__takeCount__):l.__views__.push({size:st(s,nr),type:t+(l.__dir__<0?"Right":"")}),l},Te.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),It(["filter","map","takeWhile"],function(t,n){var s=n+1,l=s==li||s==eA;Te.prototype[t]=function(d){var g=this.clone();return g.__iteratees__.push({iteratee:ne(d,3),type:s}),g.__filtered__=g.__filtered__||l,g}}),It(["head","last"],function(t,n){var s="take"+(n?"Right":"");Te.prototype[t]=function(){return this[s](1).value()[0]}}),It(["initial","tail"],function(t,n){var s="drop"+(n?"":"Right");Te.prototype[t]=function(){return this.__filtered__?new Te(this):this[s](1)}}),Te.prototype.compact=function(){return this.filter(wt)},Te.prototype.find=function(t){return this.filter(t).head()},Te.prototype.findLast=function(t){return this.reverse().find(t)},Te.prototype.invokeMap=xe(function(t,n){return typeof t=="function"?new Te(this):this.map(function(s){return Ei(s,t,n)})}),Te.prototype.reject=function(t){return this.filter(pa(ne(t)))},Te.prototype.slice=function(t,n){t=be(t);var s=this;return s.__filtered__&&(t>0||n<0)?new Te(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==e&&(n=be(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},Te.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Te.prototype.toArray=function(){return this.take(nr)},or(Te.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),l=/^(?:head|last)$/.test(n),d=f[l?"take"+(n=="last"?"Right":""):n],g=l||/^find/.test(n);d&&(f.prototype[n]=function(){var x=this.__wrapped__,w=l?[1]:arguments,I=x instanceof Te,M=w[0],q=I||fe(x),B=o(function(we){var Se=d.apply(f,kr([we],w));return l&&V?Se[0]:Se},"interceptor");q&&s&&typeof M=="function"&&M.length!=1&&(I=q=!1);var V=this.__chain__,Y=!!this.__actions__.length,ie=g&&!V,_e=I&&!Y;if(!g&&q){x=_e?x:new Te(this);var te=t.apply(x,w);return te.__actions__.push({func:sa,args:[B],thisArg:e}),new Ut(te,V)}return ie&&_e?t.apply(this,w):(te=this.thru(B),ie?l?te.value()[0]:te.value():te)})}),It(["pop","push","shift","sort","splice","unshift"],function(t){var n=No[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",l=/^(?:pop|shift)$/.test(t);f.prototype[t]=function(){var d=arguments;if(l&&!this.__chain__){var g=this.value();return n.apply(fe(g)?g:[],d)}return this[s](function(x){return n.apply(fe(x)?x:[],d)})}}),or(Te.prototype,function(t,n){var s=f[n];if(s){var l=s.name+"";ke.call(In,l)||(In[l]=[]),In[l].push({name:n,func:s})}}),In[ea(e,O).name]=[{name:"wrapper",func:e}],Te.prototype.clone=rS,Te.prototype.reverse=nS,Te.prototype.value=iS,f.prototype.at=NI,f.prototype.chain=zI,f.prototype.commit=CI,f.prototype.next=DI,f.prototype.plant=UI,f.prototype.reverse=MI,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=qI,f.prototype.first=f.prototype.head,_i&&(f.prototype[_i]=LI),f}),"runInContext"),Nr=CT();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(tt._=Nr,define(function(){return Nr})):tn?((tn.exports=Nr)._=Nr,Js._=Nr):tt._=Nr}).call(ni)});var px=L((ZX,lx)=>{var nx=_l(),TM=jl(),SM=ql(),ix=is(),{includes:EM,isBoolean:Ps,isInteger:ox,isNumber:Hl,isPlainObject:sx,isString:Jr,once:IM}=rx(),{KeyObject:$M,createSecretKey:RM,createPrivateKey:kM}=require("crypto"),ux=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];TM&&ux.splice(3,0,"PS256","PS384","PS512");var OM={expiresIn:{isValid:o(function(e){return ox(e)||Jr(e)&&e},"isValid"),message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:o(function(e){return ox(e)||Jr(e)&&e},"isValid"),message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:o(function(e){return Jr(e)||Array.isArray(e)},"isValid"),message:'"audience" must be a string or array'},algorithm:{isValid:EM.bind(null,ux),message:'"algorithm" must be a valid string enum value'},header:{isValid:sx,message:'"header" must be an object'},encoding:{isValid:Jr,message:'"encoding" must be a string'},issuer:{isValid:Jr,message:'"issuer" must be a string'},subject:{isValid:Jr,message:'"subject" must be a string'},jwtid:{isValid:Jr,message:'"jwtid" must be a string'},noTimestamp:{isValid:Ps,message:'"noTimestamp" must be a boolean'},keyid:{isValid:Jr,message:'"keyid" must be a string'},mutatePayload:{isValid:Ps,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:Ps,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:Ps,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},NM={iat:{isValid:Hl,message:'"iat" should be a number of seconds'},exp:{isValid:Hl,message:'"exp" should be a number of seconds'},nbf:{isValid:Hl,message:'"nbf" should be a number of seconds'}};function cx(e,r,i,a){if(!sx(i))throw new Error('Expected "'+a+'" to be a plain object.');Object.keys(i).forEach(function(u){let c=e[u];if(!c){if(!r)throw new Error('"'+u+'" is not allowed in "'+a+'"');return}if(!c.isValid(i[u]))throw new Error(c.message)})}o(cx,"validate");function zM(e){return cx(OM,!1,e,"options")}o(zM,"validateOptions");function CM(e){return cx(NM,!0,e,"payload")}o(CM,"validatePayload");var ax={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},DM=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];lx.exports=function(e,r,i,a){typeof i=="function"?(a=i,i={}):i=i||{};let u=typeof e=="object"&&!Buffer.isBuffer(e),c=Object.assign({alg:i.algorithm||"HS256",typ:u?"JWT":void 0,kid:i.keyid},i.header);function p(_){if(a)return a(_);throw _}if(o(p,"failure"),!r&&i.algorithm!=="none")return p(new Error("secretOrPrivateKey must have a value"));if(r!=null&&!(r instanceof $M))try{r=kM(r)}catch{try{r=RM(typeof r=="string"?Buffer.from(r):r)}catch{return p(new Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&r.type!=="secret")return p(new Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if(r.type!=="private")return p(new Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!i.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&r.asymmetricKeyDetails!==void 0&&r.asymmetricKeyDetails.modulusLength<2048)return p(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(typeof e>"u")return p(new Error("payload is required"));if(u){try{CM(e)}catch(_){return p(_)}i.mutatePayload||(e=Object.assign({},e))}else{let _=DM.filter(function(A){return typeof i[A]<"u"});if(_.length>0)return p(new Error("invalid "+_.join(",")+" option for "+typeof e+" payload"))}if(typeof e.exp<"u"&&typeof i.expiresIn<"u")return p(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof e.nbf<"u"&&typeof i.notBefore<"u")return p(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{zM(i)}catch(_){return p(_)}if(!i.allowInvalidAsymmetricKeyTypes)try{SM(c.alg,r)}catch(_){return p(_)}let m=e.iat||Math.floor(Date.now()/1e3);if(i.noTimestamp?delete e.iat:u&&(e.iat=m),typeof i.notBefore<"u"){try{e.nbf=nx(i.notBefore,m)}catch(_){return p(_)}if(typeof e.nbf>"u")return p(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof i.expiresIn<"u"&&typeof e=="object"){try{e.exp=nx(i.expiresIn,m)}catch(_){return p(_)}if(typeof e.exp>"u")return p(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(ax).forEach(function(_){let A=ax[_];if(typeof i[_]<"u"){if(typeof e[A]<"u")return p(new Error('Bad "options.'+_+'" option. The payload already has an "'+A+'" property.'));e[A]=i[_]}});let v=i.encoding||"utf8";if(typeof a=="function")a=a&&IM(a),ix.createSign({header:c,privateKey:r,payload:e,encoding:v}).once("error",a).once("done",function(_){if(!i.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&_.length<256)return a(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));a(null,_)});else{let _=ix.sign({header:c,payload:e,secret:r,encoding:v});if(!i.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&_.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return _}}});var mx=L((WX,dx)=>{dx.exports={decode:yl(),verify:tx(),sign:px(),JsonWebTokenError:uo(),NotBeforeError:bl(),TokenExpiredError:vl()}});var g1={};zm(g1,{github:()=>h1});module.exports=Vk(g1);var Wk=Object.freeze({status:"aborted"});function X(e,r,i){function a(m,v){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:v,constr:p,traits:new Set},enumerable:!1}),m._zod.traits.has(e))return;m._zod.traits.add(e),r(m,v);let _=p.prototype,A=Object.keys(_);for(let k=0;k<A.length;k++){let U=A[k];U in m||(m[U]=_[U].bind(m))}}o(a,"init");let u=i?.Parent??Object;class c extends u{static{o(this,"Definition")}}Object.defineProperty(c,"name",{value:e});function p(m){var v;let _=i?.Parent?new c:this;a(_,m),(v=_._zod).deferred??(v.deferred=[]);for(let A of _._zod.deferred)A();return _}return o(p,"_"),Object.defineProperty(p,"init",{value:a}),Object.defineProperty(p,Symbol.hasInstance,{value:o(m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e),"value")}),Object.defineProperty(p,"name",{value:e}),p}o(X,"$constructor");var sr=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},fa=class extends Error{static{o(this,"$ZodEncodeError")}constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}},rc={};function wr(e){return e&&Object.assign(rc,e),rc}o(wr,"config");function ic(e){let r=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,u])=>r.indexOf(+a)===-1).map(([a,u])=>u)}o(ic,"getEnumValues");function Lm(e,r){return typeof r=="bigint"?r.toString():r}o(Lm,"jsonStringifyReplacer");function ga(e){return{get value(){{let i=e();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}o(ga,"cached");function Um(e){return e==null}o(Um,"nullish");function ya(e){let r=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(r,i)}o(ya,"cleanRegex");var Dm=Symbol("evaluating");function Je(e,r,i){let a;Object.defineProperty(e,r,{get(){if(a!==Dm)return a===void 0&&(a=Dm,a=i()),a},set(u){Object.defineProperty(e,r,{value:u})},configurable:!0})}o(Je,"defineLazy");var oc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ci(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ci,"isObject");var Kk=ga(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Mm(e){if(Ci(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(Ci(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}o(Mm,"isPlainObject");var qm=new Set(["string","number","symbol"]);function Cn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Cn,"escapeRegex");function ba(e,r,i){let a=new e._zod.constr(r??e._zod.def);return(!r||i?.parent)&&(a._zod.parent=e),a}o(ba,"clone");function je(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:o(()=>r,"error")};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:o(()=>r.error,"error")}:r}o(je,"normalizeParams");function jm(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}o(jm,"optionalKeys");var Bm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Dn(e,r=0){if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}o(Dn,"aborted");function qr(e,r){return r.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}o(qr,"prefixIssues");function ha(e){return typeof e=="string"?e:e?.message}o(ha,"unwrapMessage");function jr(e,r,i){let a={...e,path:e.path??[]};if(!e.message){let u=ha(e.inst?._zod.def?.error?.(e))??ha(r?.error?.(e))??ha(i.customError?.(e))??ha(i.localeError?.(e))??"Invalid input";a.message=u}return delete a.inst,delete a.continue,r?.reportInput||delete a.input,a}o(jr,"finalizeIssue");function Fm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Fm,"getLengthableOrigin");function ac(...e){let[r,i,a]=e;return typeof r=="string"?{message:r,code:"custom",input:i,inst:a}:{...r}}o(ac,"issue");var Hm=o((e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Lm,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Gm=X("$ZodError",Hm),Di=X("$ZodError",Hm,{Parent:Error});var Xk=o(e=>(r,i,a,u)=>{let c=a?Object.assign(a,{async:!1}):{async:!1},p=r._zod.run({value:i,issues:[]},c);if(p instanceof Promise)throw new sr;if(p.issues.length){let m=new(u?.Err??e)(p.issues.map(v=>jr(v,c,wr())));throw oc(m,u?.callee),m}return p.value},"_parse"),va=Xk(Di),Yk=o(e=>async(r,i,a,u)=>{let c=a?Object.assign(a,{async:!0}):{async:!0},p=r._zod.run({value:i,issues:[]},c);if(p instanceof Promise&&(p=await p),p.issues.length){let m=new(u?.Err??e)(p.issues.map(v=>jr(v,c,wr())));throw oc(m,u?.callee),m}return p.value},"_parseAsync"),_a=Yk(Di),Qk=o(e=>(r,i,a)=>{let u=a?{...a,async:!1}:{async:!1},c=r._zod.run({value:i,issues:[]},u);if(c instanceof Promise)throw new sr;return c.issues.length?{success:!1,error:new(e??Gm)(c.issues.map(p=>jr(p,u,wr())))}:{success:!0,data:c.value}},"_safeParse"),Li=Qk(Di),eO=o(e=>async(r,i,a)=>{let u=a?Object.assign(a,{async:!0}):{async:!0},c=r._zod.run({value:i,issues:[]},u);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(p=>jr(p,u,wr())))}:{success:!0,data:c.value}},"_safeParseAsync"),Ui=eO(Di);var tO="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",rO=new RegExp(`^${tO}$`);var Zm=o(e=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},"string"),Vm=/^-?\d+n?$/,Wm=/^-?\d+$/,sc=/^-?\d+(?:\.\d+)?$/,Km=/^(?:true|false)$/i;var Br=X("$ZodCheck",(e,r)=>{var i;e._zod??(e._zod={}),e._zod.def=r,(i=e._zod).onattach??(i.onattach=[])}),nO={number:"number",bigint:"bigint",object:"date"};var Jm=X("$ZodCheckGreaterThan",(e,r)=>{Br.init(e,r);let i=nO[typeof r.value];e._zod.onattach.push(a=>{let u=a._zod.bag,c=(r.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>c&&(r.inclusive?u.minimum=r.value:u.exclusiveMinimum=r.value)}),e._zod.check=a=>{(r.inclusive?a.value>=r.value:a.value>r.value)||a.issues.push({origin:i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:a.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}});var Xm=X("$ZodCheckNumberFormat",(e,r)=>{Br.init(e,r),r.format=r.format||"float64";let i=r.format?.includes("int"),a=i?"int":"number",[u,c]=Bm[r.format];e._zod.onattach.push(p=>{let m=p._zod.bag;m.format=r.format,m.minimum=u,m.maximum=c,i&&(m.pattern=Wm)}),e._zod.check=p=>{let m=p.value;if(i){if(!Number.isInteger(m)){p.issues.push({expected:a,format:r.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?p.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!r.abort}):p.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!r.abort});return}}m<u&&p.issues.push({origin:"number",input:m,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!r.abort}),m>c&&p.issues.push({origin:"number",input:m,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!r.abort})}});var Ym=X("$ZodCheckMinLength",(e,r)=>{var i;Br.init(e,r),(i=e._zod.def).when??(i.when=a=>{let u=a.value;return!Um(u)&&u.length!==void 0}),e._zod.onattach.push(a=>{let u=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>u&&(a._zod.bag.minimum=r.minimum)}),e._zod.check=a=>{let u=a.value;if(u.length>=r.minimum)return;let p=Fm(u);a.issues.push({origin:p,code:"too_small",minimum:r.minimum,inclusive:!0,input:u,inst:e,continue:!r.abort})}});var uc=X("$ZodCheckStringFormat",(e,r)=>{var i,a;Br.init(e,r),e._zod.onattach.push(u=>{let c=u._zod.bag;c.format=r.format,r.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(r.pattern))}),r.pattern?(i=e._zod).check??(i.check=u=>{r.pattern.lastIndex=0,!r.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:r.format,input:u.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(a=e._zod).check??(a.check=()=>{})}),Qm=X("$ZodCheckRegex",(e,r)=>{uc.init(e,r),e._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}});var tf={major:4,minor:3,patch:6};var Ge=X("$ZodType",(e,r)=>{var i;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=tf;let a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(let u of a)for(let c of u._zod.onattach)c(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((p,m,v)=>{let _=Dn(p),A;for(let k of m){if(k._zod.def.when){if(!k._zod.def.when(p))continue}else if(_)continue;let U=p.issues.length,b=k._zod.check(p);if(b instanceof Promise&&v?.async===!1)throw new sr;if(A||b instanceof Promise)A=(A??Promise.resolve()).then(async()=>{await b,p.issues.length!==U&&(_||(_=Dn(p,U)))});else{if(p.issues.length===U)continue;_||(_=Dn(p,U))}}return A?A.then(()=>p):p},"runChecks"),c=o((p,m,v)=>{if(Dn(p))return p.aborted=!0,p;let _=u(m,a,v);if(_ instanceof Promise){if(v.async===!1)throw new sr;return _.then(A=>e._zod.parse(A,v))}return e._zod.parse(_,v)},"handleCanaryResult");e._zod.run=(p,m)=>{if(m.skipChecks)return e._zod.parse(p,m);if(m.direction==="backward"){let _=e._zod.parse({value:p.value,issues:[]},{...m,skipChecks:!0});return _ instanceof Promise?_.then(A=>c(A,p,m)):c(_,p,m)}let v=e._zod.parse(p,m);if(v instanceof Promise){if(m.async===!1)throw new sr;return v.then(_=>u(_,a,m))}return u(v,a,m)}}Je(e,"~standard",()=>({validate:o(u=>{try{let c=Li(e,u);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return Ui(e,u).then(p=>p.success?{value:p.data}:{issues:p.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wa=X("$ZodString",(e,r)=>{Ge.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zm(e._zod.bag),e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),cc=X("$ZodStringFormat",(e,r)=>{uc.init(e,r),wa.init(e,r)});var sf=X("$ZodURL",(e,r)=>{cc.init(e,r),e._zod.check=i=>{try{let a=i.value.trim(),u=new URL(a);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(u.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:e,continue:!r.abort})),r.normalize?i.value=u.href:i.value=a;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort})}}});var lc=X("$ZodNumber",(e,r)=>{Ge.init(e,r),e._zod.pattern=e._zod.bag.pattern??sc,e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}let u=i.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return i;let c=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...c?{received:c}:{}}),i}}),uf=X("$ZodNumberFormat",(e,r)=>{Xm.init(e,r),lc.init(e,r)}),pc=X("$ZodBoolean",(e,r)=>{Ge.init(e,r),e._zod.pattern=Km,e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=!!i.value}catch{}let u=i.value;return typeof u=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),i}}),cf=X("$ZodBigInt",(e,r)=>{Ge.init(e,r),e._zod.pattern=Vm,e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:e}),i}});var lf=X("$ZodAny",(e,r)=>{Ge.init(e,r),e._zod.parse=i=>i}),pf=X("$ZodUnknown",(e,r)=>{Ge.init(e,r),e._zod.parse=i=>i});var df=X("$ZodVoid",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{let u=i.value;return typeof u>"u"||i.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),i}}),mf=X("$ZodDate",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=new Date(i.value)}catch{}let u=i.value,c=u instanceof Date;return c&&!Number.isNaN(u.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:u,...c?{received:"Invalid Date"}:{},inst:e}),i}});function rf(e,r,i){e.issues.length&&r.issues.push(...qr(i,e.issues)),r.value[i]=e.value}o(rf,"handleArrayResult");var ff=X("$ZodArray",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{let u=i.value;if(!Array.isArray(u))return i.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),i;i.value=Array(u.length);let c=[];for(let p=0;p<u.length;p++){let m=u[p],v=r.element._zod.run({value:m,issues:[]},a);v instanceof Promise?c.push(v.then(_=>rf(_,i,p))):rf(v,i,p)}return c.length?Promise.all(c).then(()=>i):i}});function Pa(e,r,i,a,u){if(e.issues.length){if(u&&!(i in a))return;r.issues.push(...qr(i,e.issues))}e.value===void 0?i in a&&(r.value[i]=void 0):r.value[i]=e.value}o(Pa,"handlePropertyResult");function iO(e){let r=Object.keys(e.shape);for(let a of r)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);let i=jm(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}o(iO,"normalizeDef");function oO(e,r,i,a,u,c){let p=[],m=u.keySet,v=u.catchall._zod,_=v.def.type,A=v.optout==="optional";for(let k in r){if(m.has(k))continue;if(_==="never"){p.push(k);continue}let U=v.run({value:r[k],issues:[]},a);U instanceof Promise?e.push(U.then(b=>Pa(b,i,k,r,A))):Pa(U,i,k,r,A)}return p.length&&i.issues.push({code:"unrecognized_keys",keys:p,input:r,inst:c}),e.length?Promise.all(e).then(()=>i):i}o(oO,"handleCatchall");var hf=X("$ZodObject",(e,r)=>{if(Ge.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let m=r.shape;Object.defineProperty(r,"shape",{get:o(()=>{let v={...m};return Object.defineProperty(r,"shape",{value:v}),v},"get")})}let a=ga(()=>iO(r));Je(e._zod,"propValues",()=>{let m=r.shape,v={};for(let _ in m){let A=m[_]._zod;if(A.values){v[_]??(v[_]=new Set);for(let k of A.values)v[_].add(k)}}return v});let u=Ci,c=r.catchall,p;e._zod.parse=(m,v)=>{p??(p=a.value);let _=m.value;if(!u(_))return m.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),m;m.value={};let A=[],k=p.shape;for(let U of p.keys){let b=k[U],E=b._zod.optout==="optional",z=b._zod.run({value:_[U],issues:[]},v);z instanceof Promise?A.push(z.then(O=>Pa(O,m,U,_,E))):Pa(z,m,U,_,E)}return c?oO(A,_,m,v,a.value,e):A.length?Promise.all(A).then(()=>m):m}});function nf(e,r,i,a){for(let c of e)if(c.issues.length===0)return r.value=c.value,r;let u=e.filter(c=>!Dn(c));return u.length===1?(r.value=u[0].value,u[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:e.map(c=>c.issues.map(p=>jr(p,a,wr())))}),r)}o(nf,"handleUnionResults");var dc=X("$ZodUnion",(e,r)=>{Ge.init(e,r),Je(e._zod,"optin",()=>r.options.some(u=>u._zod.optin==="optional")?"optional":void 0),Je(e._zod,"optout",()=>r.options.some(u=>u._zod.optout==="optional")?"optional":void 0),Je(e._zod,"values",()=>{if(r.options.every(u=>u._zod.values))return new Set(r.options.flatMap(u=>Array.from(u._zod.values)))}),Je(e._zod,"pattern",()=>{if(r.options.every(u=>u._zod.pattern)){let u=r.options.map(c=>c._zod.pattern);return new RegExp(`^(${u.map(c=>ya(c.source)).join("|")})$`)}});let i=r.options.length===1,a=r.options[0]._zod.run;e._zod.parse=(u,c)=>{if(i)return a(u,c);let p=!1,m=[];for(let v of r.options){let _=v._zod.run({value:u.value,issues:[]},c);if(_ instanceof Promise)m.push(_),p=!0;else{if(_.issues.length===0)return _;m.push(_)}}return p?Promise.all(m).then(v=>nf(v,u,e,c)):nf(m,u,e,c)}});var gf=X("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,dc.init(e,r);let i=e._zod.parse;Je(e._zod,"propValues",()=>{let u={};for(let c of r.options){let p=c._zod.propValues;if(!p||Object.keys(p).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(c)}"`);for(let[m,v]of Object.entries(p)){u[m]||(u[m]=new Set);for(let _ of v)u[m].add(_)}}return u});let a=ga(()=>{let u=r.options,c=new Map;for(let p of u){let m=p._zod.propValues?.[r.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(p)}"`);for(let v of m){if(c.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);c.set(v,p)}}return c});e._zod.parse=(u,c)=>{let p=u.value;if(!Ci(p))return u.issues.push({code:"invalid_type",expected:"object",input:p,inst:e}),u;let m=a.value.get(p?.[r.discriminator]);return m?m._zod.run(u,c):r.unionFallback?i(u,c):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:p,path:[r.discriminator],inst:e}),u)}});var yf=X("$ZodRecord",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{let u=i.value;if(!Mm(u))return i.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),i;let c=[],p=r.keyType._zod.values;if(p){i.value={};let m=new Set;for(let _ of p)if(typeof _=="string"||typeof _=="number"||typeof _=="symbol"){m.add(typeof _=="number"?_.toString():_);let A=r.valueType._zod.run({value:u[_],issues:[]},a);A instanceof Promise?c.push(A.then(k=>{k.issues.length&&i.issues.push(...qr(_,k.issues)),i.value[_]=k.value})):(A.issues.length&&i.issues.push(...qr(_,A.issues)),i.value[_]=A.value)}let v;for(let _ in u)m.has(_)||(v=v??[],v.push(_));v&&v.length>0&&i.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:v})}else{i.value={};for(let m of Reflect.ownKeys(u)){if(m==="__proto__")continue;let v=r.keyType._zod.run({value:m,issues:[]},a);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&sc.test(m)&&v.issues.length){let k=r.keyType._zod.run({value:Number(m),issues:[]},a);if(k instanceof Promise)throw new Error("Async schemas not supported in object keys currently");k.issues.length===0&&(v=k)}if(v.issues.length){r.mode==="loose"?i.value[m]=u[m]:i.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(k=>jr(k,a,wr())),input:m,path:[m],inst:e});continue}let A=r.valueType._zod.run({value:u[m],issues:[]},a);A instanceof Promise?c.push(A.then(k=>{k.issues.length&&i.issues.push(...qr(m,k.issues)),i.value[v.value]=k.value})):(A.issues.length&&i.issues.push(...qr(m,A.issues)),i.value[v.value]=A.value)}}return c.length?Promise.all(c).then(()=>i):i}});var bf=X("$ZodEnum",(e,r)=>{Ge.init(e,r);let i=ic(r.entries),a=new Set(i);e._zod.values=a,e._zod.pattern=new RegExp(`^(${i.filter(u=>qm.has(typeof u)).map(u=>typeof u=="string"?Cn(u):u.toString()).join("|")})$`),e._zod.parse=(u,c)=>{let p=u.value;return a.has(p)||u.issues.push({code:"invalid_value",values:i,input:p,inst:e}),u}}),vf=X("$ZodLiteral",(e,r)=>{if(Ge.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");let i=new Set(r.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.values.map(a=>typeof a=="string"?Cn(a):a?Cn(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,u)=>{let c=a.value;return i.has(c)||a.issues.push({code:"invalid_value",values:r.values,input:c,inst:e}),a}});var _f=X("$ZodTransform",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new fa(e.constructor.name);let u=r.transform(i.value,i);if(a.async)return(u instanceof Promise?u:Promise.resolve(u)).then(p=>(i.value=p,i));if(u instanceof Promise)throw new sr;return i.value=u,i}});function of(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}o(of,"handleOptionalResult");var xf=X("$ZodOptional",(e,r)=>{Ge.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Je(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Je(e._zod,"pattern",()=>{let i=r.innerType._zod.pattern;return i?new RegExp(`^(${ya(i.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(r.innerType._zod.optin==="optional"){let u=r.innerType._zod.run(i,a);return u instanceof Promise?u.then(c=>of(c,i.value)):of(u,i.value)}return i.value===void 0?i:r.innerType._zod.run(i,a)}});var Pf=X("$ZodNullable",(e,r)=>{Ge.init(e,r),Je(e._zod,"optin",()=>r.innerType._zod.optin),Je(e._zod,"optout",()=>r.innerType._zod.optout),Je(e._zod,"pattern",()=>{let i=r.innerType._zod.pattern;return i?new RegExp(`^(${ya(i.source)}|null)$`):void 0}),Je(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:r.innerType._zod.run(i,a)});var wf=X("$ZodPipe",(e,r)=>{Ge.init(e,r),Je(e._zod,"values",()=>r.in._zod.values),Je(e._zod,"optin",()=>r.in._zod.optin),Je(e._zod,"optout",()=>r.out._zod.optout),Je(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){let c=r.out._zod.run(i,a);return c instanceof Promise?c.then(p=>xa(p,r.in,a)):xa(c,r.in,a)}let u=r.in._zod.run(i,a);return u instanceof Promise?u.then(c=>xa(c,r.out,a)):xa(u,r.out,a)}});function xa(e,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},i)}o(xa,"handlePipeResult");var Af=X("$ZodCustom",(e,r)=>{Br.init(e,r),Ge.init(e,r),e._zod.parse=(i,a)=>i,e._zod.check=i=>{let a=i.value,u=r.fn(a);if(u instanceof Promise)return u.then(c=>af(c,i,a,e));af(u,i,a,e)}});function af(e,r,i,a){if(!e){let u={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(u.params=a._zod.def.params),r.issues.push(ac(u))}}o(af,"handleRefineResult");var Sf;var mc=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...i){let a=i[0];return this._map.set(r,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let i=this._map.get(r);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(r),this}get(r){let i=r._zod.parent;if(i){let a={...this.get(i)??{}};delete a.id;let u={...a,...this._map.get(r)};return Object.keys(u).length?u:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function Ef(){return new mc}o(Ef,"registry");(Sf=globalThis).__zod_globalRegistry??(Sf.__zod_globalRegistry=Ef());var fc=globalThis.__zod_globalRegistry;function If(e,r){return new e({type:"string",...je(r)})}o(If,"_string");function $f(e,r){return new e({type:"string",coerce:!0,...je(r)})}o($f,"_coercedString");function Rf(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...je(r)})}o(Rf,"_url");function kf(e,r){return new e({type:"number",checks:[],...je(r)})}o(kf,"_number");function Of(e,r){return new e({type:"number",coerce:!0,checks:[],...je(r)})}o(Of,"_coercedNumber");function Nf(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...je(r)})}o(Nf,"_int");function zf(e,r){return new e({type:"boolean",...je(r)})}o(zf,"_boolean");function Cf(e,r){return new e({type:"boolean",coerce:!0,...je(r)})}o(Cf,"_coercedBoolean");function Df(e,r){return new e({type:"bigint",coerce:!0,...je(r)})}o(Df,"_coercedBigint");function Lf(e){return new e({type:"any"})}o(Lf,"_any");function Uf(e){return new e({type:"unknown"})}o(Uf,"_unknown");function Mf(e,r){return new e({type:"void",...je(r)})}o(Mf,"_void");function qf(e,r){return new e({type:"date",coerce:!0,...je(r)})}o(qf,"_coercedDate");function Aa(e,r){return new Jm({check:"greater_than",...je(r),value:e,inclusive:!0})}o(Aa,"_gte");function er(e,r){return new Ym({check:"min_length",...je(r),minimum:e})}o(er,"_minLength");function Fr(e,r){return new Qm({check:"string_format",format:"regex",...je(r),pattern:e})}o(Fr,"_regex");function jf(e,r,i){let a=je(i);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:r,...a})}o(jf,"_custom");var Xe=X("ZodMiniType",(e,r)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ge.init(e,r),e.def=r,e.type=r.type,e.parse=(i,a)=>va(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>Li(e,i,a),e.parseAsync=async(i,a)=>_a(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>Ui(e,i,a),e.check=(...i)=>e.clone({...r,checks:[...r.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]},{parent:!0}),e.with=e.check,e.clone=(i,a)=>ba(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.apply=i=>i(e)}),Sa=X("ZodMiniString",(e,r)=>{wa.init(e,r),Xe.init(e,r)});function y(e){return If(Sa,e)}o(y,"string");var Bf=X("ZodMiniStringFormat",(e,r)=>{cc.init(e,r),Sa.init(e,r)});var bO=X("ZodMiniURL",(e,r)=>{sf.init(e,r),Bf.init(e,r)});function Ff(e){return Rf(bO,e)}o(Ff,"url");var Ea=X("ZodMiniNumber",(e,r)=>{lc.init(e,r),Xe.init(e,r)});function gt(e){return kf(Ea,e)}o(gt,"number");var vO=X("ZodMiniNumberFormat",(e,r)=>{uf.init(e,r),Ea.init(e,r)});function Hf(e){return Nf(vO,e)}o(Hf,"int");var hc=X("ZodMiniBoolean",(e,r)=>{pc.init(e,r),Xe.init(e,r)});function Re(e){return zf(hc,e)}o(Re,"boolean");var Gf=X("ZodMiniBigInt",(e,r)=>{cf.init(e,r),Xe.init(e,r)});var _O=X("ZodMiniAny",(e,r)=>{lf.init(e,r),Xe.init(e,r)});function qi(){return Lf(_O)}o(qi,"any");var xO=X("ZodMiniUnknown",(e,r)=>{pf.init(e,r),Xe.init(e,r)});function le(){return Uf(xO)}o(le,"unknown");var PO=X("ZodMiniVoid",(e,r)=>{df.init(e,r),Xe.init(e,r)});function Zf(e){return Mf(PO,e)}o(Zf,"_void");var Vf=X("ZodMiniDate",(e,r)=>{mf.init(e,r),Xe.init(e,r)});var wO=X("ZodMiniArray",(e,r)=>{ff.init(e,r),Xe.init(e,r)});function ge(e,r){return new wO({type:"array",element:e,...je(r)})}o(ge,"array");var AO=X("ZodMiniObject",(e,r)=>{hf.init(e,r),Xe.init(e,r),Je(e,"shape",()=>r.shape)});function R(e,r){let i={type:"object",shape:e??{},...je(r)};return new AO(i)}o(R,"object");var TO=X("ZodMiniUnion",(e,r)=>{dc.init(e,r),Xe.init(e,r)});function ye(e,r){return new TO({type:"union",options:e,...je(r)})}o(ye,"union");var SO=X("ZodMiniDiscriminatedUnion",(e,r)=>{gf.init(e,r),Xe.init(e,r)});function Hr(e,r,i){return new SO({type:"union",options:r,discriminator:e,...je(i)})}o(Hr,"discriminatedUnion");var EO=X("ZodMiniRecord",(e,r)=>{yf.init(e,r),Xe.init(e,r)});function pe(e,r,i){return new EO({type:"record",keyType:e,valueType:r,...je(i)})}o(pe,"record");var IO=X("ZodMiniEnum",(e,r)=>{bf.init(e,r),Xe.init(e,r),e.options=Object.values(r.entries)});function Pe(e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new IO({type:"enum",entries:i,...je(r)})}o(Pe,"_enum");var $O=X("ZodMiniLiteral",(e,r)=>{vf.init(e,r),Xe.init(e,r)});function re(e,r){return new $O({type:"literal",values:Array.isArray(e)?e:[e],...je(r)})}o(re,"literal");var RO=X("ZodMiniTransform",(e,r)=>{_f.init(e,r),Xe.init(e,r)});function Gr(e){return new RO({type:"transform",transform:e})}o(Gr,"transform");var kO=X("ZodMiniOptional",(e,r)=>{xf.init(e,r),Xe.init(e,r)});function j(e){return new kO({type:"optional",innerType:e})}o(j,"optional");var OO=X("ZodMiniNullable",(e,r)=>{Pf.init(e,r),Xe.init(e,r)});function ji(e){return new OO({type:"nullable",innerType:e})}o(ji,"nullable");var NO=X("ZodMiniPipe",(e,r)=>{wf.init(e,r),Xe.init(e,r)});function Zr(e,r){return new NO({type:"pipe",in:e,out:r})}o(Zr,"pipe");var zO=X("ZodMiniCustom",(e,r)=>{Af.init(e,r),Xe.init(e,r)});function Ia(e,r){return jf(zO,e??(()=>!0),r)}o(Ia,"custom");var Bi={};zm(Bi,{bigint:()=>qO,boolean:()=>MO,date:()=>jO,number:()=>UO,string:()=>LO});function LO(e){return $f(Sa,e)}o(LO,"string");function UO(e){return Of(Ea,e)}o(UO,"number");function MO(e){return Cf(hc,e)}o(MO,"boolean");function qO(e){return Df(Gf,e)}o(qO,"bigint");function jO(e){return qf(Vf,e)}o(jO,"date");var yc=R({retryOnFailure:R({defaultValue:j(Re()),hide:j(Re())}),continueOnFailure:R({defaultValue:j(Re()),hide:j(Re())})}),gc=class{constructor(r,i,a,u,c,p,m,v,_,A,k){this.name=r;this.displayName=i;this.description=a;this.props=u;this.run=c;this.test=p;this.requireAuth=m;this.errorHandlingOptions=v;this.outputSchema=_;this.audience=A;this.aiMetadata=k}static{o(this,"IAction")}},T=o(e=>new gc(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Ie=R({displayName:y(),description:j(y())}),ve=o((e,r)=>R({type:re(r),required:Re(),defaultValue:j(qi())}),"TPropertyValue");var zt=R({...Ie.shape,...ve(y(),"SHORT_TEXT").shape}),Ar=R({...Ie.shape,...ve(y(),"LONG_TEXT").shape});var Kf=R({label:y(),value:le()}),$a=R({disabled:j(Re()),placeholder:j(y()),options:ge(Kf)});var Ct=R({...Ie.shape,options:$a,...ve(le(),"STATIC_DROPDOWN").shape}),Tr=R({...Ie.shape,options:$a,...ve(ge(le()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var bc=R({...Ie.shape,...ve(le(),"DROPDOWN").shape,refreshers:ge(y())}),Fi=R({...Ie.shape,...ve(ge(le()),"MULTI_SELECT_DROPDOWN").shape,refreshers:ge(y())});var Sr=R({...Ie.shape,...ve(Re(),"CHECKBOX").shape});var Er=R({...Ie.shape,...ve(gt(),"NUMBER").shape});var Hi=R({...Ie.shape,streaming:j(Re()),...ve(le(),"FILE").shape});var Gi=R({...Ie.shape,...ve(y(),"DATE_TIME").shape});var Jf=pe(y(),ye([zt,Ar,Ct,Fi,Tr,Sr,Er,Hi,Gi])),Zi=R({...Ie.shape,properties:Jf,...ve(ge(le()),"ARRAY").shape});var Vi=R({...Ie.shape,...ve(ye([pe(y(),le())]),"JSON").shape});var Xf=ye([zt,Ct,Vi,Zi,Tr]),FO=pe(y(),Xf),vc=R({refreshers:ge(y()),...Ie.shape,...ve(le(),"DYNAMIC").shape});var Ra=R({...Ie.shape,...ve(Zf(),"MARKDOWN").shape});var Wi=(i=>(i.ARCHIVE="ARCHIVE",i.REGISTRY="REGISTRY",i))(Wi||{}),Ln=(i=>(i.CUSTOM="CUSTOM",i.OFFICIAL="OFFICIAL",i))(Ln||{}),Un=(F=>(F.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",F.COMMUNICATION="COMMUNICATION",F.COMMERCE="COMMERCE",F.CORE="CORE",F.UNIVERSAL_AI="UNIVERSAL_AI",F.FLOW_CONTROL="FLOW_CONTROL",F.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",F.ACCOUNTING="ACCOUNTING",F.PRODUCTIVITY="PRODUCTIVITY",F.CONTENT_AND_FILES="CONTENT_AND_FILES",F.DEVELOPER_TOOLS="DEVELOPER_TOOLS",F.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",F.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",F.HUMAN_RESOURCES="HUMAN_RESOURCES",F.PAYMENT_PROCESSING="PAYMENT_PROCESSING",F.MARKETING="MARKETING",F.SALES_AND_CRM="SALES_AND_CRM",F))(Un||{});var Ki=(i=>(i.AUTHORIZATION_CODE="authorization_code",i.CLIENT_CREDENTIALS="client_credentials",i))(Ki||{}),_c="both_client_credentials_and_authorization_code";var ct=(u=>(u.POLLING="POLLING",u.WEBHOOK="WEBHOOK",u.APP_WEBHOOK="APP_WEBHOOK",u.MANUAL="MANUAL",u))(ct||{}),Ji=(c=>(c.NONE="NONE",c.HEADER_PRESENT="HEADER_PRESENT",c.QUERY_PRESENT="QUERY_PRESENT",c.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",c.HEAD_REQUEST="HEAD_REQUEST",c))(Ji||{}),HO=R({strategy:Pe(Ji),paramName:j(y())}),Xi=(i=>(i.SIMULATION="SIMULATION",i.TEST_FUNCTION="TEST_FUNCTION",i))(Xi||{});var ka=(i=>(i.WEBSOCKET="WEBSOCKET",i.NONE="NONE",i))(ka||{}),Yf=R({status:j(gt()),body:j(le()),headers:j(pe(y(),y()))}),Qf=R({type:re("DELAY"),resumeDateTime:y(),requestIdToReply:j(y()),handlerId:j(y()),streamStepProgress:j(Pe(ka))}),eh=R({type:re("WEBHOOK"),requestId:y(),requestIdToReply:j(y()),response:Yf,handlerId:j(y()),streamStepProgress:j(Pe(ka))}),GO=ye([Qf,eh]);var ZO=R({body:le(),rawBody:j(le()),headers:pe(y(),y()),queryParams:pe(y(),y())});function yt(e){return e==null}o(yt,"isNil");function Yi(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(Yi,"isEmpty");function Oa(e,r){if(e==null)throw new Error(`${r} is null or undefined`)}o(Oa,"assertNotNullOrUndefined");var xc=pn(require("crypto"),1);var VO=128,dn,Mn,WO=o(e=>{!dn||dn.length<e?(dn=Buffer.allocUnsafe(e*VO),xc.default.randomFillSync(dn),Mn=0):Mn+e>dn.length&&(xc.default.randomFillSync(dn),Mn=0),Mn+=e},"fillPool"),KO=o(e=>(WO(e|=0),dn.subarray(Mn-e,Mn)),"random"),JO=o((e,r,i)=>{let a=(2<<31-Math.clz32(e.length-1|1))-1,u=Math.ceil(1.6*a*r/e.length);return(c=r)=>{let p="";for(;;){let m=i(u),v=u;for(;v--;)if(p+=e[m[v]&a]||"",p.length===c)return p}}},"customRandom"),rh=o((e,r=21)=>JO(e,r,KO),"customAlphabet");var XO="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",nh=21,JG=y().check(Fr(new RegExp(`^[0-9a-zA-Z]{${nh}}$`))),YO=rh(XO,nh);var Vr=Zr(Gr(e=>e instanceof Date?e.toISOString():e),y()),Ft={id:y(),created:Vr,updated:Vr},Fe=o(e=>j(ji(e)),"Nullable");function Pc(e){return j(ji(Pe(e)))}o(Pc,"NullableEnum");var QG=Zr(Gr(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),j(Re())),Na=o(e=>Zr(Gr(r=>Array.isArray(r)?r:r!==void 0?[r]:void 0),j(ge(e))),"OptionalArrayFromQuery");var rZ=pe(y(),le());var Qi=(A=>(A.OPENAI="openai",A.OPENROUTER="openrouter",A.ANTHROPIC="anthropic",A.AZURE="azure",A.GOOGLE="google",A.ACTIVEPIECES="activepieces",A.CLOUDFLARE_GATEWAY="cloudflare-gateway",A.CUSTOM="custom",A.BEDROCK="bedrock",A.MISTRAL="mistral",A))(Qi||{});var fZ=y().check(Fr(/^#[0-9A-Fa-f]{6}$/));var gZ=R({filename:y(),data:le(),type:re("file"),mimetype:j(y())});var QO=pn(oh());var wZ=R({...Ft,name:y(),permissions:ge(y()),platformId:Fe(y()),type:y(),userCount:j(gt())});var ah=(a=>(a.AGENT_DECIDE="agent-decide",a.CHOOSE_YOURSELF="choose-yourself",a.LEAVE_EMPTY="leave-empty",a))(ah||{}),wc=(i=>(i.FILE="FILE",i.TABLE="TABLE",i))(wc||{}),Ac=(a=>(a.SSE="sse",a.STREAMABLE_HTTP="streamable-http",a.SIMPLE_HTTP="http",a))(Ac||{});var Tc=(a=>(a.TEXT="text",a.NUMBER="number",a.BOOLEAN="boolean",a))(Tc||{});var Sc=(i=>(i.IN_PROGRESS="in-progress",i.COMPLETED="completed",i))(Sc||{});var eN=R({mode:Pe(ah),value:le()}),tN=R({auth:j(y()),fields:pe(y(),eN)}),rN=R({pieceName:y(),pieceVersion:y(),actionName:y(),predefinedInput:j(tN)}),nN=R({type:re("PIECE"),toolName:y().check(er(1)),pieceMetadata:rN}),iN=R({type:re("none")}),oN=R({type:re("access_token"),accessToken:y()}),aN=R({type:re("api_key"),apiKey:y(),apiKeyHeader:y()}),sN=R({type:re("headers"),headers:pe(y(),y())}),uN=Hr("type",[iN,oN,aN,sN]),sh=R({type:re("FLOW"),toolName:y().check(er(1)),externalFlowId:y(),flowDisplayName:j(y())}),uh=R({type:re("MCP"),toolName:y().check(er(1)),serverUrl:Ff(),protocol:Pe(Ac),auth:uN}),ch=R({type:re("KNOWLEDGE_BASE"),toolName:y().check(er(1)),sourceType:Pe(wc),sourceId:y(),sourceName:y()}),cN=Hr("type",[nN,sh,uh,ch]),lN=R({displayName:y(),description:j(y()),type:Pe(Tc)}),lh=R({type:re("MARKDOWN"),markdown:y()}),qn={type:re("TOOL_CALL"),input:Fe(pe(y(),le())),output:j(le()),toolName:y(),status:Pe(Sc),toolCallId:y(),startTime:y(),endTime:j(y())},JZ=R(qn),ph=Hr("toolCallType",[R({...qn,toolCallType:re("PIECE"),pieceName:y(),pieceVersion:y(),actionName:y()}),R({...qn,toolCallType:re("FLOW"),displayName:y(),externalFlowId:y()}),R({...qn,toolCallType:re("MCP"),displayName:y(),serverUrl:y()}),R({...qn,toolCallType:re("KNOWLEDGE_BASE"),displayName:y(),sourceType:y()}),R({...qn,toolCallType:re("UNKNOWN"),displayName:y()})]),pN=ye([lh,ph]);var Ec=(i=>(i.IMAGE="image",i.TEXT="text",i))(Ec||{}),Ir=R({apiKey:y()}),dN=Ir,mN=R({apiKey:y(),apiKeyHash:y()}),fN=Ir,hN=Ir,gN=Ir,yN=Ir,bN=Ir,vN=Ir,_N=Ir,gh=R({accessKeyId:y().check(er(1)),secretAccessKey:y().check(er(1))}),xN=R({}),PN=R({}),wN=R({}),AN=R({}),TN=R({}),SN=R({}),yh=R({modelId:y(),modelName:y(),modelType:Pe(Ec)}),bh=R({apiKeyHeader:y(),baseUrl:y(),models:ge(yh),defaultHeaders:j(pe(y(),y()))}),vh=R({accountId:y(),gatewayId:y(),models:ge(yh),vertexProject:j(y()),vertexRegion:j(y())}),_h=R({resourceName:y(),apiVersion:Zr(Gr(e=>typeof e=="string"&&e.trim().length===0?void 0:e),j(y()))}),xh=R({region:y().check(er(1))}),EN=ye([dN,gN,yN,bN,vN,hN,fN,mN,gh,_N]),Ph=ye([bh,vh,_h,xh,xN,wN,AN,TN,PN,SN]),IN=R({id:y(),name:y(),type:Pe(Ec)}),$N=R({id:y(),name:y(),provider:Pe(Qi),config:Ph,enabledForChat:Re()}),RN=R({provider:Pe(Qi),config:Ph,auth:EN,platformId:y()});var eV={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},dh=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],kN=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],ON=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],mh=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],NN=["grok-4.20","grok-4.1-fast"],zN={openai:dh,anthropic:kN,google:mh,activepieces:[...ON.map(e=>`anthropic/${e}`),...dh.map(e=>`openai/${e}`),...mh.map(e=>`google/${e}`),...NN.map(e=>`x-ai/${e}`)]};var fh=128e3,CN={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function DN({provider:e}){return e?CN[e]??fh:fh}o(DN,"getMaxContextTokens");var hh={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},LN={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},UN=new Set(["anthropic","mistral"]);function ur(e){return{chatModels:zN[e],maxContextTokens:DN({provider:e}),defaultEmbeddingModel:hh[e],supportsEmbedding:hh[e]!==void 0,supportsImageGeneration:!UN.has(e),webSearch:LN[e]}}o(ur,"buildProviderCapabilities");var MN={openai:ur("openai"),anthropic:ur("anthropic"),openrouter:ur("openrouter"),azure:ur("azure"),google:ur("google"),"cloudflare-gateway":ur("cloudflare-gateway"),custom:ur("custom"),bedrock:ur("bedrock"),mistral:ur("mistral"),activepieces:ur("activepieces")};var qN=R({base64Url:y(),fileName:y(),extension:j(y())}),jN=R({mimeType:y(),url:y(),fileName:j(y())}),Ic=ye([qN,jN]);var BN=ye([R({type:re("file"),value:Ic}),R({type:re("markdown"),value:y(),files:j(ge(Ic))})]),FN=R({sessionId:y(),message:y(),files:j(ge(y()))});var Ah=(i=>(i.ON_NEW_RECORD="ON_NEW_RECORD",i.ON_UPDATE_RECORD="ON_UPDATE_RECORD",i))(Ah||{}),Th=(i=>(i.ENABLED="ENABLED",i.DISABLED="DISABLED",i))(Th||{}),$c=(a=>(a.RECORD_CREATED="RECORD_CREATED",a.RECORD_UPDATED="RECORD_UPDATED",a.RECORD_DELETED="RECORD_DELETED",a))($c||{});var HN=ye([R({...Ft,name:y(),externalId:y(),type:re("STATIC_DROPDOWN"),tableId:y(),projectId:y(),data:R({options:ge(R({value:y()}))})}),R({...Ft,name:y(),externalId:y(),type:ye([re("TEXT"),re("NUMBER"),re("DATE")]),tableId:y(),projectId:y()})]),GN=R({...Ft,name:y(),folderId:Fe(y()),projectId:y(),externalId:y(),status:Pc(Th),trigger:Pc(Ah)}),ZN=R({...Ft,tableId:y(),projectId:y(),cells:pe(y(),R({updated:y(),created:y(),value:le(),fieldName:y()}))}),VN=R({events:ge(Pe($c)),webhookUrl:y(),flowId:y()}),WN=R({fields:ge(R({id:y(),name:y()})),rows:ge(pe(y(),y())),name:y()}),KN=R({projectId:y(),limit:j(Bi.number()),cursor:j(y()),name:j(y()),externalIds:Na(y()),folderId:j(y()),folderIds:Na(y())}),JN=R({records:ge(ge(R({fieldId:y(),value:Eh()}))),tableId:y()}),XN=R({cells:j(ge(R({fieldId:y(),value:Eh()}))),tableId:y(),agentUpdate:j(Re())}),Sh=Hr("operator",[mn("eq"),mn("neq"),mn("gt"),mn("gte"),mn("lt"),mn("lte"),mn("co"),wh("exists"),wh("not_exists")]),YN=R({tableId:y(),limit:j(Bi.number()),cursor:j(y()),filters:Na(Sh)});function Eh(){return Zr(Gr(e=>e==null?e:String(e)),ji(y()))}o(Eh,"coerceToString");function mn(e){return R({fieldId:y(),operator:re(e),value:y()})}o(mn,"valueFilter");function wh(e){return R({fieldId:y(),operator:re(e)})}o(wh,"existenceFilter");var QN=R({status:j(gt()),body:j(le()),headers:j(pe(y(),y()))}),e0=R({...Ft,deleted:Fe(Vr),ownerId:y(),displayName:y(),platformId:y(),externalId:Fe(y())});var Ih=R({name:y(),description:j(y()),type:y(),required:Re()}),t0=R({pieceName:y(),triggerName:y(),input:R({toolName:y(),toolDescription:y(),inputSchema:ge(Ih),returnsResponse:Re()})});var $h="^[0-9]+\\.[0-9]+\\.[0-9]+$",vV=new RegExp($h),n0="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_V=y().check(Fr(new RegExp($h))),xV=y().check(Fr(new RegExp(n0))),i0=R({packageType:re("ARCHIVE"),pieceType:Pe(Ln),pieceName:y(),pieceVersion:y(),archiveId:y(),platformId:y()}),Rh=R({packageType:re("REGISTRY"),pieceType:re("OFFICIAL"),pieceName:y(),pieceVersion:y()}),kh=R({packageType:re("REGISTRY"),pieceType:re("CUSTOM"),pieceName:y(),pieceVersion:y(),platformId:y()}),PV=ye([Rh,kh]),wV=ye([i0,Rh,kh]);var o0=Hr("type",[R({type:re("CRON_EXPRESSION"),cronExpression:y(),timezone:y()}),R({type:re("INTERVAL"),intervalMs:Hf().check(Aa(6e4))})]),AV=R({...Ft,type:Pe(ct),projectId:y(),flowId:y(),triggerName:y(),schedule:Fe(o0),flowVersionId:y(),pieceName:y(),pieceVersion:y(),deleted:Fe(y()),simulate:Re()}),Oh=(O=>(O.UNKNOWN="UNKNOWN",O.FLOW_RUN_LOG="FLOW_RUN_LOG",O.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",O.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",O.FLOW_STEP_FILE="FLOW_STEP_FILE",O.SAMPLE_DATA="SAMPLE_DATA",O.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",O.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",O.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",O.PROJECT_RELEASE="PROJECT_RELEASE",O.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",O.PLATFORM_ASSET="PLATFORM_ASSET",O.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",O.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",O.KNOWLEDGE_BASE="KNOWLEDGE_BASE",O.FLOW_BUNDLE="FLOW_BUNDLE",O))(Oh||{}),Nh=(i=>(i.NONE="NONE",i.ZSTD="ZSTD",i))(Nh||{}),zh=(i=>(i.S3="S3",i.DB="DB",i))(zh||{}),TV=R({...Ft,projectId:Fe(y()),platformId:Fe(y()),type:Pe(Oh),compression:Pe(Nh),data:j(le()),location:Pe(zh),size:Fe(gt()),fileName:Fe(y()),s3Key:Fe(y()),metadata:Fe(pe(y(),y()))}),Ch=(a=>(a.ADMIN="ADMIN",a.MEMBER="MEMBER",a.OPERATOR="OPERATOR",a))(Ch||{}),Dh=(i=>(i.ACTIVE="ACTIVE",i.INACTIVE="INACTIVE",i))(Dh||{}),SV=R({id:y(),email:y(),firstName:y(),status:Pe(Dh),externalId:Fe(y()),platformId:Fe(y()),platformRole:Pe(Ch),lastName:y(),created:Vr,updated:Vr,lastActiveDate:Fe(Vr),imageUrl:Fe(y())});var kc=R({...Ie.shape,...ve(pe(y(),le()),"OBJECT").shape});var Mh=R({...Ie.shape,...ve(y(),"COLOR").shape});var Oc=ye([zt,Ar,Ra,Sr,Ct,Tr,bc,Fi,vc,Er,Zi,kc,Vi,Gi,Hi,Mh]),h={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let r=e.code.toString();return{...e,code:r,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var cr=R({displayName:y(),description:j(y())});var qh=R({username:y(),password:y()}),Nc=R({...cr.shape,username:R({displayName:y(),description:j(y())}),password:R({displayName:y(),description:j(y())}),...ve(qh,"BASIC_AUTH").shape});var c0=pe(y(),ye([zt,Ar,Er,Sr,Ct])),zc=R({...cr.shape,props:c0,...ve(le(),"CUSTOM_AUTH").shape});var fn=R({...cr.shape,...ve(R({auth:y()}),"SECRET_TEXT").shape});var l0=pe(y(),ye([zt,Ar,fn,Er,Sr,Ct,Tr,Ra])),jh=R({...cr.shape,props:l0,...ve(le(),"OIDC").shape});var Cc=(i=>(i.HEADER="HEADER",i.BODY="BODY",i))(Cc||{}),Bh=ye([zt,fn,Ct]),Fh=pe(y(),Bh),p0=R({props:j(pe(y(),Bh)),authUrl:y(),tokenUrl:y(),scope:ge(y()),prompt:j(ye([re("none"),re("consent"),re("login"),re("omit")])),pkce:j(Re()),pkceMethod:j(ye([re("plain"),re("S256")])),authorizationMethod:j(Pe(Cc)),grantType:j(ye([Pe(Ki),re(_c)])),extra:j(pe(y(),y()))}),Hh=R({access_token:y(),props:j(Fh),data:pe(y(),qi())}),Dc=R({...cr.shape,...p0.shape,...ve(Hh,"OAUTH2").shape});var jn=ye([Nc,zc,jh,Dc,fn]),eo="Connection",to={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||eo}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||eo,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||eo}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||eo}},None(){}};var i3={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var d0=R({...Ie.shape,...ve(le(),"CUSTOM").shape,code:y()});var m0=ye([Oc,jn]),Lc=pe(y(),m0),A3=pe(y(),Oc);var Gh=ye([R({strategy:re("CRON"),cronExpression:y()}),R({strategy:re("NONE")})]),Bn=class{constructor(r,i,a,u,c,p,m,v,_,A,k,U,b,E,z,O,F,Z,ae){this.name=r;this.displayName=i;this.description=a;this.requireAuth=u;this.props=c;this.type=p;this.handshakeConfiguration=m;this.onHandshake=v;this.renewConfiguration=_;this.onRenew=A;this.onEnable=k;this.onDisable=U;this.onStart=b;this.run=E;this.test=z;this.sampleData=O;this.testStrategy=F;this.outputSchema=Z;this.aiMetadata=ae}static{o(this,"ITrigger")}},nt=o(e=>{switch(e.type){case"WEBHOOK":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,yt(e.sampleData)&&yt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Zh="2",Ca="0.82.0";var Uc=class{constructor(r,i,a,u,c,p,m,v,_=Ca,A,k="",U){this.displayName=r;this.logoUrl=i;this.authors=a;this.events=u;this.categories=m;this.auth=v;this.minimumSupportedRelease=_;this.maximumSupportedRelease=A;this.description=k;this.deprecated=U;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Zh}),"getContextInfo");(!f0(_)||h0(_,Ca))&&(this.minimumSupportedRelease=Ca),c.forEach(b=>this._actions[b.name]=b),p.forEach(b=>this._triggers[b.name]=b)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(r){return this._actions[r]}getTrigger(r){return this._triggers[r]}actions(){return this._actions}triggers(){return this._triggers}},Vh=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((i,a,u)=>a===u.findIndex(c=>c.type===i.type)))throw new Error("Auth properties must be unique by type");return new Uc(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function f0(e){return/^\d+\.\d+\.\d+$/.test(e)}o(f0,"isValidSimpleSemver");function h0(e,r){let[i,a,u]=e.split(".").map(Number),[c,p,m]=r.split(".").map(Number);return i!==c?i<c:a!==p?a<p:u<m}o(h0,"isSemverLessThan");var g0=j(pe(y(),pe(y(),y()))),Wh=R({id:j(y()),name:y(),displayName:y(),logoUrl:y(),description:y(),authors:ge(y()),platformId:j(y()),directoryPath:j(y()),auth:j(ye([jn,ge(jn)])),version:y(),categories:j(ge(Pe(Un))),minimumSupportedRelease:j(y()),maximumSupportedRelease:j(y()),deprecated:j(Re()),i18n:g0}),y0=Pe(["human","ai","both"]),Kh=R({description:j(y()),idempotent:j(Re())}),Jh=R({name:y(),displayName:y(),description:y(),props:Lc,requireAuth:Re(),errorHandlingOptions:j(yc),outputSchema:j(Ia()),audience:j(y0),aiMetadata:j(Kh)}),Xh=R({name:y(),displayName:y(),description:y(),props:Lc,errorHandlingOptions:j(yc),type:Pe(ct),sampleData:le(),handshakeConfiguration:j(Ia()),renewConfiguration:j(Gh),testStrategy:Pe(Xi),outputSchema:j(Ia()),aiMetadata:j(Kh)}),b0=R({...Wh.shape,actions:pe(y(),Jh),triggers:pe(y(),Xh)}),v0=R({...Wh.shape,actions:gt(),triggers:gt(),suggestedActions:j(ge(Jh)),suggestedTriggers:j(ge(Xh))}),Yh=R({projectUsage:gt(),pieceType:Pe(Ln),packageType:Pe(Wi),platformId:j(y()),archiveId:j(y())}),A5=R({...b0.shape,...Yh.shape}),T5=R({...v0.shape,...Yh.shape}),S5=R({name:y(),version:y()});var _0=pn(require("path")),x0=pn(require("fs/promises"));var tg=require("node:stream");var Da=class{constructor(r,i){this.baseUrl=r;this.authenticationConverter=i}static{o(this,"BaseHttpClient")}getUrl(r){let i=new URL(`${this.baseUrl}${r.url}`),a=`${i.origin}${i.pathname}`,u=new URLSearchParams;return i.searchParams.forEach((c,p)=>{u.append(p,c)}),{urlWithoutQueryParams:a,queryParams:u}}getHeaders(r){let i={Accept:"application/json"};return r.authentication&&this.populateAuthentication(r.authentication,i),r.body&&(r.headers?.["Content-Type"]==="text/csv"?i["Content-Type"]="text/csv":i["Content-Type"]="application/json"),r.headers&&(i={...i,...r.headers}),i}populateAuthentication(r,i){this.authenticationConverter.convert(r,i)}};var La=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(r=new Mc,i=new qc){this.converters={BEARER_TOKEN:r,BASIC:i}}convert(r,i){return this.converters[r.type].convert(r,i)}},Mc=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(r,i){return i.Authorization=`Bearer ${r.token}`,i}},qc=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(r,i){let a=`${r.username}:${r.password}`,u=Buffer.from(a).toString("base64");return i.Authorization=`Basic ${u}`,i}};var Ua=class extends Error{constructor(i,a){let u=a.status||500,c=Buffer.isBuffer(a.responseBody)?a.responseBody.toString():a.responseBody;super(JSON.stringify({response:{status:u,body:c},request:{body:i}}));this.requestBody=i;this.status=u,this.responseBody=c}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Ma=class extends Da{static{o(this,"FetchHttpClient")}constructor(r="",i=new La){super(r,i)}async sendRequest(r,i){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:a,queryParams:u}=this.getUrl(r),c=this.getHeaders(r),p=r.queryParams??{};for(let[ae,Me]of Object.entries(p))u.append(ae,Me);let m=u.toString(),v=m?`${a}?${m}`:a,_=r.responseType??"json",A=r.followRedirects??!0,k=r.retries??0,{body:U,extraHeaders:b,isStream:E}=P0(r.body,c),z=A0({...c,...b}),O=await w0(async()=>{let ae=new AbortController,Me=r.timeout&&r.timeout>0?setTimeout(()=>ae.abort(),r.timeout):void 0;try{let et={method:r.method.toString(),headers:z,body:U,redirect:A?"follow":"manual",signal:ae.signal};return E&&(et.duplex="half"),i?.dispatcher!==void 0&&(et.dispatcher=i.dispatcher),await fetch(v,et)}finally{Me!==void 0&&clearTimeout(Me)}},k),F=A?300:400;if(O.status<200||O.status>=F){let ae=await Qh(O,_),Me=new Ua(r.body,{status:O.status,responseBody:ae});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Me),Me}let Z=await Qh(O,_);return{status:O.status,headers:T0(O.headers),body:Z}}};function P0(e,r){if(E0(e))return{body:void 0,extraHeaders:{},isStream:!1};if(S0(e)){let a=new tg.PassThrough;return e.on("error",u=>a.destroy(u)),e.pipe(a),{body:a,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(r["Content-Type"]??r["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(P0,"serializeBody");async function Qh(e,r){switch(r){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let i=await e.text();if(i.length===0)return;try{return JSON.parse(i)}catch{return i}}}}o(Qh,"parseResponseBody");async function w0(e,r){let i;for(let a=0;a<=r;a++)try{let u=await e();if(u.status>=500&&a<r){await eg(a);continue}return u}catch(u){if(i=u,a<r){await eg(a);continue}throw u}throw i}o(w0,"sendWithRetries");function eg(e){let r=Math.min(1e3*2**e,3e4);return new Promise(i=>setTimeout(i,r))}o(eg,"backoff");function A0(e){let r={};for(let[i,a]of Object.entries(e))a!==void 0&&(r[i.toLowerCase()]=Array.isArray(a)?a.join(", "):a);return r}o(A0,"normalizeHeaders");function T0(e){let r={};return e.forEach((i,a)=>{r[a]=i}),r}o(T0,"toHttpHeaders");function S0(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(S0,"isNodeFormData");function E0(e){return e==null}o(E0,"isNil");var lr=new Ma;var Fn=(p=>(p.GET="GET",p.POST="POST",p.PATCH="PATCH",p.PUT="PUT",p.DELETE="DELETE",p.HEAD="HEAD",p))(Fn||{});var fC=pn(require("fs")),sb=pn(ab());var hC={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function gC(e){let r=e.split(";")[0].trim().toLowerCase();return hC[r]??""}o(gC,"contentTypeToExtension");var yC=o(({baseUrl:e,relativePath:r})=>{let i=e.endsWith("/")?e:`${e}/`,a=r.startsWith("/")?r.slice(1):r;return`${i}${a}`},"joinBaseUrlWithRelativePath"),bC=o((e,r)=>{let i="https://api.example.com";try{let a=r?e(r):void 0;return(a?.endsWith("/")?a.slice(0,-1):a)??i}catch{return i}},"getBaseUrlForDescription");function ub({auth:e,baseUrl:r,authMapping:i,description:a,displayName:u,name:c,props:p,extraProps:m,authLocation:v="headers"}){return T({audience:"human",name:c||"custom_api_call",displayName:u||"Custom API Call",description:a||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:h.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:_})=>({url:h.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
23
|
+
}`;var _e=km(function(){return $e(g,Y+"return "+B).apply(e,x)});if(_e.source=B,Hu(_e))throw _e;return _e}o(WR,"template");function KR(t){return Oe(t).toLowerCase()}o(KR,"toLower");function JR(t){return Oe(t).toUpperCase()}o(JR,"toUpper");function XR(t,n,s){if(t=Oe(t),t&&(s||n===e))return Mp(t);if(!t||!(n=Rt(n)))return t;var l=Kt(t),d=Kt(n),g=qp(l,d),x=jp(l,d)+1;return Ur(l,g,x).join("")}o(XR,"trim");function YR(t,n,s){if(t=Oe(t),t&&(s||n===e))return t.slice(0,Fp(t)+1);if(!t||!(n=Rt(n)))return t;var l=Kt(t),d=jp(l,Kt(n))+1;return Ur(l,0,d).join("")}o(YR,"trimEnd");function QR(t,n,s){if(t=Oe(t),t&&(s||n===e))return t.replace(Hs,"");if(!t||!(n=Rt(n)))return t;var l=Kt(t),d=qp(l,Kt(n));return Ur(l,d).join("")}o(QR,"trimStart");function ek(t,n){var s=Ns,l=vn;if(Be(n)){var d="separator"in n?n.separator:d;s="length"in n?be(n.length):s,l="omission"in n?Rt(n.omission):l}t=Oe(t);var g=t.length;if(An(t)){var x=Kt(t);g=x.length}if(s>=g)return t;var w=s-Tn(l);if(w<1)return l;var I=x?Ur(x,0,w).join(""):t.slice(0,w);if(d===e)return I+l;if(x&&(w+=I.length-w),Gu(d)){if(t.slice(w).search(d)){var M,q=I;for(d.global||(d=su(d.source,Oe(sp.exec(d))+"g")),d.lastIndex=0;M=d.exec(q);)var B=M.index;I=I.slice(0,B===e?w:B)}}else if(t.indexOf(Rt(d),w)!=w){var V=I.lastIndexOf(d);V>-1&&(I=I.slice(0,V))}return I+l}o(ek,"truncate");function tk(t){return t=Oe(t),t&&fA.test(t)?t.replace(np,kT):t}o(tk,"unescape");var rk=kn(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),Ku=kd("toUpperCase");function Rm(t,n,s){return t=Oe(t),n=s?e:n,n===e?ST(t)?zT(t):yT(t):t.match(n)||[]}o(Rm,"words");var km=xe(function(t,n){try{return Et(t,e,n)}catch(s){return Hu(s)?s:new me(s)}}),nk=br(function(t,n){return It(n,function(s){s=Xt(s),ir(t,s,Bu(t[s],t))}),t});function ik(t){var n=t==null?0:t.length,s=ne();return t=n?qe(t,function(l){if(typeof l[1]!="function")throw new Lt(u);return[s(l[0]),l[1]]}):[],xe(function(l){for(var d=-1;++d<n;){var g=t[d];if(Et(g[0],this,l))return Et(g[1],this,l)}})}o(ik,"cond");function ok(t){return kS(Mt(t,A))}o(ok,"conforms");function Ju(t){return function(){return t}}o(Ju,"constant");function ak(t,n){return t==null||t!==t?n:t}o(ak,"defaultTo");var sk=Nd(),uk=Nd(!0);function wt(t){return t}o(wt,"identity");function Xu(t){return cd(typeof t=="function"?t:Mt(t,A))}o(Xu,"iteratee");function ck(t){return pd(Mt(t,A))}o(ck,"matches");function lk(t,n){return dd(t,Mt(n,A))}o(lk,"matchesProperty");var pk=xe(function(t,n){return function(s){return Ei(s,t,n)}}),dk=xe(function(t,n){return function(s){return Ei(t,s,n)}});function Yu(t,n,s){var l=rt(n),d=Ko(n,l);s==null&&!(Be(n)&&(d.length||!l.length))&&(s=n,n=t,t=this,d=Ko(n,rt(n)));var g=!(Be(s)&&"chain"in s)||!!s.chain,x=_r(t);return It(d,function(w){var I=n[w];t[w]=I,x&&(t.prototype[w]=function(){var M=this.__chain__;if(g||M){var q=t(this.__wrapped__),B=q.__actions__=_t(this.__actions__);return B.push({func:I,args:arguments,thisArg:t}),q.__chain__=M,q}return I.apply(t,kr([this.value()],arguments))})}),t}o(Yu,"mixin");function mk(){return tt._===this&&(tt._=qT),this}o(mk,"noConflict");function Qu(){}o(Qu,"noop");function fk(t){return t=be(t),xe(function(n){return md(n,t)})}o(fk,"nthArg");var hk=$u(qe),gk=$u(zp),yk=$u(eu);function Om(t){return Du(t)?tu(Xt(t)):WS(t)}o(Om,"property");function bk(t){return function(n){return t==null?e:sn(t,n)}}o(bk,"propertyOf");var vk=Cd(),_k=Cd(!0);function ec(){return[]}o(ec,"stubArray");function tc(){return!1}o(tc,"stubFalse");function xk(){return{}}o(xk,"stubObject");function Pk(){return""}o(Pk,"stubString");function wk(){return!0}o(wk,"stubTrue");function Ak(t,n){if(t=be(t),t<1||t>$r)return[];var s=nr,l=st(t,nr);n=ne(n),t-=nr;for(var d=iu(l,n);++s<t;)n(s);return d}o(Ak,"times");function Tk(t){return fe(t)?qe(t,Xt):kt(t)?[t]:_t(Xd(Oe(t)))}o(Tk,"toPath");function Sk(t){var n=++UT;return Oe(t)+n}o(Sk,"uniqueId");var Ek=ta(function(t,n){return t+n},0),Ik=Ru("ceil"),$k=ta(function(t,n){return t/n},1),Rk=Ru("floor");function kk(t){return t&&t.length?Wo(t,wt,hu):e}o(kk,"max");function Ok(t,n){return t&&t.length?Wo(t,ne(n,2),hu):e}o(Ok,"maxBy");function Nk(t){return Lp(t,wt)}o(Nk,"mean");function zk(t,n){return Lp(t,ne(n,2))}o(zk,"meanBy");function Ck(t){return t&&t.length?Wo(t,wt,vu):e}o(Ck,"min");function Dk(t,n){return t&&t.length?Wo(t,ne(n,2),vu):e}o(Dk,"minBy");var Lk=ta(function(t,n){return t*n},1),Uk=Ru("round"),Mk=ta(function(t,n){return t-n},0);function qk(t){return t&&t.length?nu(t,wt):0}o(qk,"sum");function jk(t,n){return t&&t.length?nu(t,ne(n,2)):0}return o(jk,"sumBy"),f.after=l$,f.ary=um,f.assign=X$,f.assignIn=Pm,f.assignInWith=wm,f.assignWith=Zu,f.at=Y$,f.before=cm,f.bind=Bu,f.bindAll=nk,f.bindKey=lm,f.castArray=P$,f.chain=om,f.chunk=kE,f.compact=OE,f.concat=NE,f.cond=ik,f.conforms=ok,f.constant=Ju,f.countBy=jI,f.create=Q$,f.curry=pm,f.curryRight=dm,f.debounce=mm,f.defaults=eR,f.defaultsDeep=tR,f.defer=p$,f.delay=d$,f.difference=zE,f.differenceBy=CE,f.differenceWith=DE,f.drop=LE,f.dropRight=UE,f.dropRightWhile=ME,f.dropWhile=qE,f.fill=jE,f.filter=FI,f.flatMap=ZI,f.flatMapDeep=VI,f.flatMapDepth=WI,f.flatten=tm,f.flattenDeep=BE,f.flattenDepth=FE,f.flip=m$,f.flow=sk,f.flowRight=uk,f.fromPairs=HE,f.functions=uR,f.functionsIn=cR,f.groupBy=KI,f.initial=ZE,f.intersection=VE,f.intersectionBy=WE,f.intersectionWith=KE,f.invert=pR,f.invertBy=dR,f.invokeMap=XI,f.iteratee=Xu,f.keyBy=YI,f.keys=rt,f.keysIn=Pt,f.map=ua,f.mapKeys=fR,f.mapValues=hR,f.matches=ck,f.matchesProperty=lk,f.memoize=la,f.merge=gR,f.mergeWith=Am,f.method=pk,f.methodOf=dk,f.mixin=Yu,f.negate=pa,f.nthArg=fk,f.omit=yR,f.omitBy=bR,f.once=f$,f.orderBy=QI,f.over=hk,f.overArgs=h$,f.overEvery=gk,f.overSome=yk,f.partial=Fu,f.partialRight=fm,f.partition=e$,f.pick=vR,f.pickBy=Tm,f.property=Om,f.propertyOf=bk,f.pull=QE,f.pullAll=nm,f.pullAllBy=eI,f.pullAllWith=tI,f.pullAt=rI,f.range=vk,f.rangeRight=_k,f.rearg=g$,f.reject=n$,f.remove=nI,f.rest=y$,f.reverse=qu,f.sampleSize=o$,f.set=xR,f.setWith=PR,f.shuffle=a$,f.slice=iI,f.sortBy=c$,f.sortedUniq=pI,f.sortedUniqBy=dI,f.split=GR,f.spread=b$,f.tail=mI,f.take=fI,f.takeRight=hI,f.takeRightWhile=gI,f.takeWhile=yI,f.tap=OI,f.throttle=v$,f.thru=sa,f.toArray=vm,f.toPairs=Sm,f.toPairsIn=Em,f.toPath=Tk,f.toPlainObject=xm,f.transform=wR,f.unary=_$,f.union=bI,f.unionBy=vI,f.unionWith=_I,f.uniq=xI,f.uniqBy=PI,f.uniqWith=wI,f.unset=AR,f.unzip=ju,f.unzipWith=im,f.update=TR,f.updateWith=SR,f.values=zn,f.valuesIn=ER,f.without=AI,f.words=Rm,f.wrap=x$,f.xor=TI,f.xorBy=SI,f.xorWith=EI,f.zip=II,f.zipObject=$I,f.zipObjectDeep=RI,f.zipWith=kI,f.entries=Sm,f.entriesIn=Em,f.extend=Pm,f.extendWith=wm,Yu(f,f),f.add=Ek,f.attempt=km,f.camelCase=kR,f.capitalize=Im,f.ceil=Ik,f.clamp=IR,f.clone=w$,f.cloneDeep=T$,f.cloneDeepWith=S$,f.cloneWith=A$,f.conformsTo=E$,f.deburr=$m,f.defaultTo=ak,f.divide=$k,f.endsWith=OR,f.eq=Yt,f.escape=NR,f.escapeRegExp=zR,f.every=BI,f.find=HI,f.findIndex=Qd,f.findKey=rR,f.findLast=GI,f.findLastIndex=em,f.findLastKey=nR,f.floor=Rk,f.forEach=am,f.forEachRight=sm,f.forIn=iR,f.forInRight=oR,f.forOwn=aR,f.forOwnRight=sR,f.get=Vu,f.gt=I$,f.gte=$$,f.has=lR,f.hasIn=Wu,f.head=rm,f.identity=wt,f.includes=JI,f.indexOf=GE,f.inRange=$R,f.invoke=mR,f.isArguments=ln,f.isArray=fe,f.isArrayBuffer=R$,f.isArrayLike=xt,f.isArrayLikeObject=We,f.isBoolean=k$,f.isBuffer=Mr,f.isDate=O$,f.isElement=N$,f.isEmpty=z$,f.isEqual=C$,f.isEqualWith=D$,f.isError=Hu,f.isFinite=L$,f.isFunction=_r,f.isInteger=hm,f.isLength=da,f.isMap=gm,f.isMatch=U$,f.isMatchWith=M$,f.isNaN=q$,f.isNative=j$,f.isNil=F$,f.isNull=B$,f.isNumber=ym,f.isObject=Be,f.isObjectLike=He,f.isPlainObject=Ni,f.isRegExp=Gu,f.isSafeInteger=H$,f.isSet=bm,f.isString=ma,f.isSymbol=kt,f.isTypedArray=Nn,f.isUndefined=G$,f.isWeakMap=Z$,f.isWeakSet=V$,f.join=JE,f.kebabCase=CR,f.last=jt,f.lastIndexOf=XE,f.lowerCase=DR,f.lowerFirst=LR,f.lt=W$,f.lte=K$,f.max=kk,f.maxBy=Ok,f.mean=Nk,f.meanBy=zk,f.min=Ck,f.minBy=Dk,f.stubArray=ec,f.stubFalse=tc,f.stubObject=xk,f.stubString=Pk,f.stubTrue=wk,f.multiply=Lk,f.nth=YE,f.noConflict=mk,f.noop=Qu,f.now=ca,f.pad=UR,f.padEnd=MR,f.padStart=qR,f.parseInt=jR,f.random=RR,f.reduce=t$,f.reduceRight=r$,f.repeat=BR,f.replace=FR,f.result=_R,f.round=Uk,f.runInContext=S,f.sample=i$,f.size=s$,f.snakeCase=HR,f.some=u$,f.sortedIndex=oI,f.sortedIndexBy=aI,f.sortedIndexOf=sI,f.sortedLastIndex=uI,f.sortedLastIndexBy=cI,f.sortedLastIndexOf=lI,f.startCase=ZR,f.startsWith=VR,f.subtract=Mk,f.sum=qk,f.sumBy=jk,f.template=WR,f.times=Ak,f.toFinite=xr,f.toInteger=be,f.toLength=_m,f.toLower=KR,f.toNumber=Bt,f.toSafeInteger=J$,f.toString=Oe,f.toUpper=JR,f.trim=XR,f.trimEnd=YR,f.trimStart=QR,f.truncate=ek,f.unescape=tk,f.uniqueId=Sk,f.upperCase=rk,f.upperFirst=Ku,f.each=am,f.eachRight=sm,f.first=rm,Yu(f,(function(){var t={};return or(f,function(n,s){ke.call(f.prototype,s)||(t[s]=n)}),t})(),{chain:!1}),f.VERSION=r,It(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){f[t].placeholder=f}),It(["drop","take"],function(t,n){Te.prototype[t]=function(s){s=s===e?1:Qe(be(s),0);var l=this.__filtered__&&!n?new Te(this):this.clone();return l.__filtered__?l.__takeCount__=st(s,l.__takeCount__):l.__views__.push({size:st(s,nr),type:t+(l.__dir__<0?"Right":"")}),l},Te.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),It(["filter","map","takeWhile"],function(t,n){var s=n+1,l=s==li||s==eA;Te.prototype[t]=function(d){var g=this.clone();return g.__iteratees__.push({iteratee:ne(d,3),type:s}),g.__filtered__=g.__filtered__||l,g}}),It(["head","last"],function(t,n){var s="take"+(n?"Right":"");Te.prototype[t]=function(){return this[s](1).value()[0]}}),It(["initial","tail"],function(t,n){var s="drop"+(n?"":"Right");Te.prototype[t]=function(){return this.__filtered__?new Te(this):this[s](1)}}),Te.prototype.compact=function(){return this.filter(wt)},Te.prototype.find=function(t){return this.filter(t).head()},Te.prototype.findLast=function(t){return this.reverse().find(t)},Te.prototype.invokeMap=xe(function(t,n){return typeof t=="function"?new Te(this):this.map(function(s){return Ei(s,t,n)})}),Te.prototype.reject=function(t){return this.filter(pa(ne(t)))},Te.prototype.slice=function(t,n){t=be(t);var s=this;return s.__filtered__&&(t>0||n<0)?new Te(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==e&&(n=be(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},Te.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Te.prototype.toArray=function(){return this.take(nr)},or(Te.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),l=/^(?:head|last)$/.test(n),d=f[l?"take"+(n=="last"?"Right":""):n],g=l||/^find/.test(n);d&&(f.prototype[n]=function(){var x=this.__wrapped__,w=l?[1]:arguments,I=x instanceof Te,M=w[0],q=I||fe(x),B=o(function(we){var Se=d.apply(f,kr([we],w));return l&&V?Se[0]:Se},"interceptor");q&&s&&typeof M=="function"&&M.length!=1&&(I=q=!1);var V=this.__chain__,Y=!!this.__actions__.length,ie=g&&!V,_e=I&&!Y;if(!g&&q){x=_e?x:new Te(this);var te=t.apply(x,w);return te.__actions__.push({func:sa,args:[B],thisArg:e}),new Ut(te,V)}return ie&&_e?t.apply(this,w):(te=this.thru(B),ie?l?te.value()[0]:te.value():te)})}),It(["pop","push","shift","sort","splice","unshift"],function(t){var n=No[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",l=/^(?:pop|shift)$/.test(t);f.prototype[t]=function(){var d=arguments;if(l&&!this.__chain__){var g=this.value();return n.apply(fe(g)?g:[],d)}return this[s](function(x){return n.apply(fe(x)?x:[],d)})}}),or(Te.prototype,function(t,n){var s=f[n];if(s){var l=s.name+"";ke.call(In,l)||(In[l]=[]),In[l].push({name:n,func:s})}}),In[ea(e,O).name]=[{name:"wrapper",func:e}],Te.prototype.clone=rS,Te.prototype.reverse=nS,Te.prototype.value=iS,f.prototype.at=NI,f.prototype.chain=zI,f.prototype.commit=CI,f.prototype.next=DI,f.prototype.plant=UI,f.prototype.reverse=MI,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=qI,f.prototype.first=f.prototype.head,_i&&(f.prototype[_i]=LI),f}),"runInContext"),Nr=CT();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(tt._=Nr,define(function(){return Nr})):tn?((tn.exports=Nr)._=Nr,Js._=Nr):tt._=Nr}).call(ni)});var px=L((ZX,lx)=>{var nx=_l(),TM=jl(),SM=ql(),ix=is(),{includes:EM,isBoolean:Ps,isInteger:ox,isNumber:Hl,isPlainObject:sx,isString:Jr,once:IM}=rx(),{KeyObject:$M,createSecretKey:RM,createPrivateKey:kM}=require("crypto"),ux=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];TM&&ux.splice(3,0,"PS256","PS384","PS512");var OM={expiresIn:{isValid:o(function(e){return ox(e)||Jr(e)&&e},"isValid"),message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:o(function(e){return ox(e)||Jr(e)&&e},"isValid"),message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:o(function(e){return Jr(e)||Array.isArray(e)},"isValid"),message:'"audience" must be a string or array'},algorithm:{isValid:EM.bind(null,ux),message:'"algorithm" must be a valid string enum value'},header:{isValid:sx,message:'"header" must be an object'},encoding:{isValid:Jr,message:'"encoding" must be a string'},issuer:{isValid:Jr,message:'"issuer" must be a string'},subject:{isValid:Jr,message:'"subject" must be a string'},jwtid:{isValid:Jr,message:'"jwtid" must be a string'},noTimestamp:{isValid:Ps,message:'"noTimestamp" must be a boolean'},keyid:{isValid:Jr,message:'"keyid" must be a string'},mutatePayload:{isValid:Ps,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:Ps,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:Ps,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},NM={iat:{isValid:Hl,message:'"iat" should be a number of seconds'},exp:{isValid:Hl,message:'"exp" should be a number of seconds'},nbf:{isValid:Hl,message:'"nbf" should be a number of seconds'}};function cx(e,r,i,a){if(!sx(i))throw new Error('Expected "'+a+'" to be a plain object.');Object.keys(i).forEach(function(u){let c=e[u];if(!c){if(!r)throw new Error('"'+u+'" is not allowed in "'+a+'"');return}if(!c.isValid(i[u]))throw new Error(c.message)})}o(cx,"validate");function zM(e){return cx(OM,!1,e,"options")}o(zM,"validateOptions");function CM(e){return cx(NM,!0,e,"payload")}o(CM,"validatePayload");var ax={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},DM=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];lx.exports=function(e,r,i,a){typeof i=="function"?(a=i,i={}):i=i||{};let u=typeof e=="object"&&!Buffer.isBuffer(e),c=Object.assign({alg:i.algorithm||"HS256",typ:u?"JWT":void 0,kid:i.keyid},i.header);function p(_){if(a)return a(_);throw _}if(o(p,"failure"),!r&&i.algorithm!=="none")return p(new Error("secretOrPrivateKey must have a value"));if(r!=null&&!(r instanceof $M))try{r=kM(r)}catch{try{r=RM(typeof r=="string"?Buffer.from(r):r)}catch{return p(new Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&r.type!=="secret")return p(new Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if(r.type!=="private")return p(new Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!i.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&r.asymmetricKeyDetails!==void 0&&r.asymmetricKeyDetails.modulusLength<2048)return p(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(typeof e>"u")return p(new Error("payload is required"));if(u){try{CM(e)}catch(_){return p(_)}i.mutatePayload||(e=Object.assign({},e))}else{let _=DM.filter(function(A){return typeof i[A]<"u"});if(_.length>0)return p(new Error("invalid "+_.join(",")+" option for "+typeof e+" payload"))}if(typeof e.exp<"u"&&typeof i.expiresIn<"u")return p(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(typeof e.nbf<"u"&&typeof i.notBefore<"u")return p(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{zM(i)}catch(_){return p(_)}if(!i.allowInvalidAsymmetricKeyTypes)try{SM(c.alg,r)}catch(_){return p(_)}let m=e.iat||Math.floor(Date.now()/1e3);if(i.noTimestamp?delete e.iat:u&&(e.iat=m),typeof i.notBefore<"u"){try{e.nbf=nx(i.notBefore,m)}catch(_){return p(_)}if(typeof e.nbf>"u")return p(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(typeof i.expiresIn<"u"&&typeof e=="object"){try{e.exp=nx(i.expiresIn,m)}catch(_){return p(_)}if(typeof e.exp>"u")return p(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(ax).forEach(function(_){let A=ax[_];if(typeof i[_]<"u"){if(typeof e[A]<"u")return p(new Error('Bad "options.'+_+'" option. The payload already has an "'+A+'" property.'));e[A]=i[_]}});let v=i.encoding||"utf8";if(typeof a=="function")a=a&&IM(a),ix.createSign({header:c,privateKey:r,payload:e,encoding:v}).once("error",a).once("done",function(_){if(!i.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&_.length<256)return a(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));a(null,_)});else{let _=ix.sign({header:c,payload:e,secret:r,encoding:v});if(!i.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&_.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return _}}});var mx=L((WX,dx)=>{dx.exports={decode:yl(),verify:tx(),sign:px(),JsonWebTokenError:uo(),NotBeforeError:bl(),TokenExpiredError:vl()}});var g1={};zm(g1,{github:()=>h1});module.exports=Vk(g1);var Wk=Object.freeze({status:"aborted"});function X(e,r,i){function a(m,v){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:v,constr:p,traits:new Set},enumerable:!1}),m._zod.traits.has(e))return;m._zod.traits.add(e),r(m,v);let _=p.prototype,A=Object.keys(_);for(let k=0;k<A.length;k++){let U=A[k];U in m||(m[U]=_[U].bind(m))}}o(a,"init");let u=i?.Parent??Object;class c extends u{static{o(this,"Definition")}}Object.defineProperty(c,"name",{value:e});function p(m){var v;let _=i?.Parent?new c:this;a(_,m),(v=_._zod).deferred??(v.deferred=[]);for(let A of _._zod.deferred)A();return _}return o(p,"_"),Object.defineProperty(p,"init",{value:a}),Object.defineProperty(p,Symbol.hasInstance,{value:o(m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e),"value")}),Object.defineProperty(p,"name",{value:e}),p}o(X,"$constructor");var sr=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},fa=class extends Error{static{o(this,"$ZodEncodeError")}constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}},rc={};function wr(e){return e&&Object.assign(rc,e),rc}o(wr,"config");function ic(e){let r=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,u])=>r.indexOf(+a)===-1).map(([a,u])=>u)}o(ic,"getEnumValues");function Lm(e,r){return typeof r=="bigint"?r.toString():r}o(Lm,"jsonStringifyReplacer");function ga(e){return{get value(){{let i=e();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}o(ga,"cached");function Um(e){return e==null}o(Um,"nullish");function ya(e){let r=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(r,i)}o(ya,"cleanRegex");var Dm=Symbol("evaluating");function Je(e,r,i){let a;Object.defineProperty(e,r,{get(){if(a!==Dm)return a===void 0&&(a=Dm,a=i()),a},set(u){Object.defineProperty(e,r,{value:u})},configurable:!0})}o(Je,"defineLazy");var oc="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ci(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ci,"isObject");var Kk=ga(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Mm(e){if(Ci(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(Ci(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}o(Mm,"isPlainObject");var qm=new Set(["string","number","symbol"]);function Cn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Cn,"escapeRegex");function ba(e,r,i){let a=new e._zod.constr(r??e._zod.def);return(!r||i?.parent)&&(a._zod.parent=e),a}o(ba,"clone");function je(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:o(()=>r,"error")};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:o(()=>r.error,"error")}:r}o(je,"normalizeParams");function jm(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}o(jm,"optionalKeys");var Bm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Dn(e,r=0){if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}o(Dn,"aborted");function qr(e,r){return r.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}o(qr,"prefixIssues");function ha(e){return typeof e=="string"?e:e?.message}o(ha,"unwrapMessage");function jr(e,r,i){let a={...e,path:e.path??[]};if(!e.message){let u=ha(e.inst?._zod.def?.error?.(e))??ha(r?.error?.(e))??ha(i.customError?.(e))??ha(i.localeError?.(e))??"Invalid input";a.message=u}return delete a.inst,delete a.continue,r?.reportInput||delete a.input,a}o(jr,"finalizeIssue");function Fm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Fm,"getLengthableOrigin");function ac(...e){let[r,i,a]=e;return typeof r=="string"?{message:r,code:"custom",input:i,inst:a}:{...r}}o(ac,"issue");var Hm=o((e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Lm,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Gm=X("$ZodError",Hm),Di=X("$ZodError",Hm,{Parent:Error});var Xk=o(e=>(r,i,a,u)=>{let c=a?Object.assign(a,{async:!1}):{async:!1},p=r._zod.run({value:i,issues:[]},c);if(p instanceof Promise)throw new sr;if(p.issues.length){let m=new(u?.Err??e)(p.issues.map(v=>jr(v,c,wr())));throw oc(m,u?.callee),m}return p.value},"_parse"),va=Xk(Di),Yk=o(e=>async(r,i,a,u)=>{let c=a?Object.assign(a,{async:!0}):{async:!0},p=r._zod.run({value:i,issues:[]},c);if(p instanceof Promise&&(p=await p),p.issues.length){let m=new(u?.Err??e)(p.issues.map(v=>jr(v,c,wr())));throw oc(m,u?.callee),m}return p.value},"_parseAsync"),_a=Yk(Di),Qk=o(e=>(r,i,a)=>{let u=a?{...a,async:!1}:{async:!1},c=r._zod.run({value:i,issues:[]},u);if(c instanceof Promise)throw new sr;return c.issues.length?{success:!1,error:new(e??Gm)(c.issues.map(p=>jr(p,u,wr())))}:{success:!0,data:c.value}},"_safeParse"),Li=Qk(Di),eO=o(e=>async(r,i,a)=>{let u=a?Object.assign(a,{async:!0}):{async:!0},c=r._zod.run({value:i,issues:[]},u);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(p=>jr(p,u,wr())))}:{success:!0,data:c.value}},"_safeParseAsync"),Ui=eO(Di);var tO="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",rO=new RegExp(`^${tO}$`);var Zm=o(e=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},"string"),Vm=/^-?\d+n?$/,Wm=/^-?\d+$/,sc=/^-?\d+(?:\.\d+)?$/,Km=/^(?:true|false)$/i;var Br=X("$ZodCheck",(e,r)=>{var i;e._zod??(e._zod={}),e._zod.def=r,(i=e._zod).onattach??(i.onattach=[])}),nO={number:"number",bigint:"bigint",object:"date"};var Jm=X("$ZodCheckGreaterThan",(e,r)=>{Br.init(e,r);let i=nO[typeof r.value];e._zod.onattach.push(a=>{let u=a._zod.bag,c=(r.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>c&&(r.inclusive?u.minimum=r.value:u.exclusiveMinimum=r.value)}),e._zod.check=a=>{(r.inclusive?a.value>=r.value:a.value>r.value)||a.issues.push({origin:i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:a.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}});var Xm=X("$ZodCheckNumberFormat",(e,r)=>{Br.init(e,r),r.format=r.format||"float64";let i=r.format?.includes("int"),a=i?"int":"number",[u,c]=Bm[r.format];e._zod.onattach.push(p=>{let m=p._zod.bag;m.format=r.format,m.minimum=u,m.maximum=c,i&&(m.pattern=Wm)}),e._zod.check=p=>{let m=p.value;if(i){if(!Number.isInteger(m)){p.issues.push({expected:a,format:r.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?p.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!r.abort}):p.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!r.abort});return}}m<u&&p.issues.push({origin:"number",input:m,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!r.abort}),m>c&&p.issues.push({origin:"number",input:m,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!r.abort})}});var Ym=X("$ZodCheckMinLength",(e,r)=>{var i;Br.init(e,r),(i=e._zod.def).when??(i.when=a=>{let u=a.value;return!Um(u)&&u.length!==void 0}),e._zod.onattach.push(a=>{let u=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>u&&(a._zod.bag.minimum=r.minimum)}),e._zod.check=a=>{let u=a.value;if(u.length>=r.minimum)return;let p=Fm(u);a.issues.push({origin:p,code:"too_small",minimum:r.minimum,inclusive:!0,input:u,inst:e,continue:!r.abort})}});var uc=X("$ZodCheckStringFormat",(e,r)=>{var i,a;Br.init(e,r),e._zod.onattach.push(u=>{let c=u._zod.bag;c.format=r.format,r.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(r.pattern))}),r.pattern?(i=e._zod).check??(i.check=u=>{r.pattern.lastIndex=0,!r.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:r.format,input:u.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(a=e._zod).check??(a.check=()=>{})}),Qm=X("$ZodCheckRegex",(e,r)=>{uc.init(e,r),e._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}});var tf={major:4,minor:3,patch:6};var Ge=X("$ZodType",(e,r)=>{var i;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=tf;let a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(let u of a)for(let c of u._zod.onattach)c(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((p,m,v)=>{let _=Dn(p),A;for(let k of m){if(k._zod.def.when){if(!k._zod.def.when(p))continue}else if(_)continue;let U=p.issues.length,b=k._zod.check(p);if(b instanceof Promise&&v?.async===!1)throw new sr;if(A||b instanceof Promise)A=(A??Promise.resolve()).then(async()=>{await b,p.issues.length!==U&&(_||(_=Dn(p,U)))});else{if(p.issues.length===U)continue;_||(_=Dn(p,U))}}return A?A.then(()=>p):p},"runChecks"),c=o((p,m,v)=>{if(Dn(p))return p.aborted=!0,p;let _=u(m,a,v);if(_ instanceof Promise){if(v.async===!1)throw new sr;return _.then(A=>e._zod.parse(A,v))}return e._zod.parse(_,v)},"handleCanaryResult");e._zod.run=(p,m)=>{if(m.skipChecks)return e._zod.parse(p,m);if(m.direction==="backward"){let _=e._zod.parse({value:p.value,issues:[]},{...m,skipChecks:!0});return _ instanceof Promise?_.then(A=>c(A,p,m)):c(_,p,m)}let v=e._zod.parse(p,m);if(v instanceof Promise){if(m.async===!1)throw new sr;return v.then(_=>u(_,a,m))}return u(v,a,m)}}Je(e,"~standard",()=>({validate:o(u=>{try{let c=Li(e,u);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return Ui(e,u).then(p=>p.success?{value:p.data}:{issues:p.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wa=X("$ZodString",(e,r)=>{Ge.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zm(e._zod.bag),e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),cc=X("$ZodStringFormat",(e,r)=>{uc.init(e,r),wa.init(e,r)});var sf=X("$ZodURL",(e,r)=>{cc.init(e,r),e._zod.check=i=>{try{let a=i.value.trim(),u=new URL(a);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(u.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:e,continue:!r.abort})),r.normalize?i.value=u.href:i.value=a;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort})}}});var lc=X("$ZodNumber",(e,r)=>{Ge.init(e,r),e._zod.pattern=e._zod.bag.pattern??sc,e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}let u=i.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return i;let c=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...c?{received:c}:{}}),i}}),uf=X("$ZodNumberFormat",(e,r)=>{Xm.init(e,r),lc.init(e,r)}),pc=X("$ZodBoolean",(e,r)=>{Ge.init(e,r),e._zod.pattern=Km,e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=!!i.value}catch{}let u=i.value;return typeof u=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),i}}),cf=X("$ZodBigInt",(e,r)=>{Ge.init(e,r),e._zod.pattern=Vm,e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:e}),i}});var lf=X("$ZodAny",(e,r)=>{Ge.init(e,r),e._zod.parse=i=>i}),pf=X("$ZodUnknown",(e,r)=>{Ge.init(e,r),e._zod.parse=i=>i});var df=X("$ZodVoid",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{let u=i.value;return typeof u>"u"||i.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),i}}),mf=X("$ZodDate",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{if(r.coerce)try{i.value=new Date(i.value)}catch{}let u=i.value,c=u instanceof Date;return c&&!Number.isNaN(u.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:u,...c?{received:"Invalid Date"}:{},inst:e}),i}});function rf(e,r,i){e.issues.length&&r.issues.push(...qr(i,e.issues)),r.value[i]=e.value}o(rf,"handleArrayResult");var ff=X("$ZodArray",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{let u=i.value;if(!Array.isArray(u))return i.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),i;i.value=Array(u.length);let c=[];for(let p=0;p<u.length;p++){let m=u[p],v=r.element._zod.run({value:m,issues:[]},a);v instanceof Promise?c.push(v.then(_=>rf(_,i,p))):rf(v,i,p)}return c.length?Promise.all(c).then(()=>i):i}});function Pa(e,r,i,a,u){if(e.issues.length){if(u&&!(i in a))return;r.issues.push(...qr(i,e.issues))}e.value===void 0?i in a&&(r.value[i]=void 0):r.value[i]=e.value}o(Pa,"handlePropertyResult");function iO(e){let r=Object.keys(e.shape);for(let a of r)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);let i=jm(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}o(iO,"normalizeDef");function oO(e,r,i,a,u,c){let p=[],m=u.keySet,v=u.catchall._zod,_=v.def.type,A=v.optout==="optional";for(let k in r){if(m.has(k))continue;if(_==="never"){p.push(k);continue}let U=v.run({value:r[k],issues:[]},a);U instanceof Promise?e.push(U.then(b=>Pa(b,i,k,r,A))):Pa(U,i,k,r,A)}return p.length&&i.issues.push({code:"unrecognized_keys",keys:p,input:r,inst:c}),e.length?Promise.all(e).then(()=>i):i}o(oO,"handleCatchall");var hf=X("$ZodObject",(e,r)=>{if(Ge.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let m=r.shape;Object.defineProperty(r,"shape",{get:o(()=>{let v={...m};return Object.defineProperty(r,"shape",{value:v}),v},"get")})}let a=ga(()=>iO(r));Je(e._zod,"propValues",()=>{let m=r.shape,v={};for(let _ in m){let A=m[_]._zod;if(A.values){v[_]??(v[_]=new Set);for(let k of A.values)v[_].add(k)}}return v});let u=Ci,c=r.catchall,p;e._zod.parse=(m,v)=>{p??(p=a.value);let _=m.value;if(!u(_))return m.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),m;m.value={};let A=[],k=p.shape;for(let U of p.keys){let b=k[U],E=b._zod.optout==="optional",z=b._zod.run({value:_[U],issues:[]},v);z instanceof Promise?A.push(z.then(O=>Pa(O,m,U,_,E))):Pa(z,m,U,_,E)}return c?oO(A,_,m,v,a.value,e):A.length?Promise.all(A).then(()=>m):m}});function nf(e,r,i,a){for(let c of e)if(c.issues.length===0)return r.value=c.value,r;let u=e.filter(c=>!Dn(c));return u.length===1?(r.value=u[0].value,u[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:e.map(c=>c.issues.map(p=>jr(p,a,wr())))}),r)}o(nf,"handleUnionResults");var dc=X("$ZodUnion",(e,r)=>{Ge.init(e,r),Je(e._zod,"optin",()=>r.options.some(u=>u._zod.optin==="optional")?"optional":void 0),Je(e._zod,"optout",()=>r.options.some(u=>u._zod.optout==="optional")?"optional":void 0),Je(e._zod,"values",()=>{if(r.options.every(u=>u._zod.values))return new Set(r.options.flatMap(u=>Array.from(u._zod.values)))}),Je(e._zod,"pattern",()=>{if(r.options.every(u=>u._zod.pattern)){let u=r.options.map(c=>c._zod.pattern);return new RegExp(`^(${u.map(c=>ya(c.source)).join("|")})$`)}});let i=r.options.length===1,a=r.options[0]._zod.run;e._zod.parse=(u,c)=>{if(i)return a(u,c);let p=!1,m=[];for(let v of r.options){let _=v._zod.run({value:u.value,issues:[]},c);if(_ instanceof Promise)m.push(_),p=!0;else{if(_.issues.length===0)return _;m.push(_)}}return p?Promise.all(m).then(v=>nf(v,u,e,c)):nf(m,u,e,c)}});var gf=X("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,dc.init(e,r);let i=e._zod.parse;Je(e._zod,"propValues",()=>{let u={};for(let c of r.options){let p=c._zod.propValues;if(!p||Object.keys(p).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(c)}"`);for(let[m,v]of Object.entries(p)){u[m]||(u[m]=new Set);for(let _ of v)u[m].add(_)}}return u});let a=ga(()=>{let u=r.options,c=new Map;for(let p of u){let m=p._zod.propValues?.[r.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(p)}"`);for(let v of m){if(c.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);c.set(v,p)}}return c});e._zod.parse=(u,c)=>{let p=u.value;if(!Ci(p))return u.issues.push({code:"invalid_type",expected:"object",input:p,inst:e}),u;let m=a.value.get(p?.[r.discriminator]);return m?m._zod.run(u,c):r.unionFallback?i(u,c):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:p,path:[r.discriminator],inst:e}),u)}});var yf=X("$ZodRecord",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{let u=i.value;if(!Mm(u))return i.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),i;let c=[],p=r.keyType._zod.values;if(p){i.value={};let m=new Set;for(let _ of p)if(typeof _=="string"||typeof _=="number"||typeof _=="symbol"){m.add(typeof _=="number"?_.toString():_);let A=r.valueType._zod.run({value:u[_],issues:[]},a);A instanceof Promise?c.push(A.then(k=>{k.issues.length&&i.issues.push(...qr(_,k.issues)),i.value[_]=k.value})):(A.issues.length&&i.issues.push(...qr(_,A.issues)),i.value[_]=A.value)}let v;for(let _ in u)m.has(_)||(v=v??[],v.push(_));v&&v.length>0&&i.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:v})}else{i.value={};for(let m of Reflect.ownKeys(u)){if(m==="__proto__")continue;let v=r.keyType._zod.run({value:m,issues:[]},a);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&sc.test(m)&&v.issues.length){let k=r.keyType._zod.run({value:Number(m),issues:[]},a);if(k instanceof Promise)throw new Error("Async schemas not supported in object keys currently");k.issues.length===0&&(v=k)}if(v.issues.length){r.mode==="loose"?i.value[m]=u[m]:i.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(k=>jr(k,a,wr())),input:m,path:[m],inst:e});continue}let A=r.valueType._zod.run({value:u[m],issues:[]},a);A instanceof Promise?c.push(A.then(k=>{k.issues.length&&i.issues.push(...qr(m,k.issues)),i.value[v.value]=k.value})):(A.issues.length&&i.issues.push(...qr(m,A.issues)),i.value[v.value]=A.value)}}return c.length?Promise.all(c).then(()=>i):i}});var bf=X("$ZodEnum",(e,r)=>{Ge.init(e,r);let i=ic(r.entries),a=new Set(i);e._zod.values=a,e._zod.pattern=new RegExp(`^(${i.filter(u=>qm.has(typeof u)).map(u=>typeof u=="string"?Cn(u):u.toString()).join("|")})$`),e._zod.parse=(u,c)=>{let p=u.value;return a.has(p)||u.issues.push({code:"invalid_value",values:i,input:p,inst:e}),u}}),vf=X("$ZodLiteral",(e,r)=>{if(Ge.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");let i=new Set(r.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.values.map(a=>typeof a=="string"?Cn(a):a?Cn(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,u)=>{let c=a.value;return i.has(c)||a.issues.push({code:"invalid_value",values:r.values,input:c,inst:e}),a}});var _f=X("$ZodTransform",(e,r)=>{Ge.init(e,r),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new fa(e.constructor.name);let u=r.transform(i.value,i);if(a.async)return(u instanceof Promise?u:Promise.resolve(u)).then(p=>(i.value=p,i));if(u instanceof Promise)throw new sr;return i.value=u,i}});function of(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}o(of,"handleOptionalResult");var xf=X("$ZodOptional",(e,r)=>{Ge.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Je(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Je(e._zod,"pattern",()=>{let i=r.innerType._zod.pattern;return i?new RegExp(`^(${ya(i.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(r.innerType._zod.optin==="optional"){let u=r.innerType._zod.run(i,a);return u instanceof Promise?u.then(c=>of(c,i.value)):of(u,i.value)}return i.value===void 0?i:r.innerType._zod.run(i,a)}});var Pf=X("$ZodNullable",(e,r)=>{Ge.init(e,r),Je(e._zod,"optin",()=>r.innerType._zod.optin),Je(e._zod,"optout",()=>r.innerType._zod.optout),Je(e._zod,"pattern",()=>{let i=r.innerType._zod.pattern;return i?new RegExp(`^(${ya(i.source)}|null)$`):void 0}),Je(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:r.innerType._zod.run(i,a)});var wf=X("$ZodPipe",(e,r)=>{Ge.init(e,r),Je(e._zod,"values",()=>r.in._zod.values),Je(e._zod,"optin",()=>r.in._zod.optin),Je(e._zod,"optout",()=>r.out._zod.optout),Je(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){let c=r.out._zod.run(i,a);return c instanceof Promise?c.then(p=>xa(p,r.in,a)):xa(c,r.in,a)}let u=r.in._zod.run(i,a);return u instanceof Promise?u.then(c=>xa(c,r.out,a)):xa(u,r.out,a)}});function xa(e,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},i)}o(xa,"handlePipeResult");var Af=X("$ZodCustom",(e,r)=>{Br.init(e,r),Ge.init(e,r),e._zod.parse=(i,a)=>i,e._zod.check=i=>{let a=i.value,u=r.fn(a);if(u instanceof Promise)return u.then(c=>af(c,i,a,e));af(u,i,a,e)}});function af(e,r,i,a){if(!e){let u={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(u.params=a._zod.def.params),r.issues.push(ac(u))}}o(af,"handleRefineResult");var Sf;var mc=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...i){let a=i[0];return this._map.set(r,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let i=this._map.get(r);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(r),this}get(r){let i=r._zod.parent;if(i){let a={...this.get(i)??{}};delete a.id;let u={...a,...this._map.get(r)};return Object.keys(u).length?u:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function Ef(){return new mc}o(Ef,"registry");(Sf=globalThis).__zod_globalRegistry??(Sf.__zod_globalRegistry=Ef());var fc=globalThis.__zod_globalRegistry;function If(e,r){return new e({type:"string",...je(r)})}o(If,"_string");function $f(e,r){return new e({type:"string",coerce:!0,...je(r)})}o($f,"_coercedString");function Rf(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...je(r)})}o(Rf,"_url");function kf(e,r){return new e({type:"number",checks:[],...je(r)})}o(kf,"_number");function Of(e,r){return new e({type:"number",coerce:!0,checks:[],...je(r)})}o(Of,"_coercedNumber");function Nf(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...je(r)})}o(Nf,"_int");function zf(e,r){return new e({type:"boolean",...je(r)})}o(zf,"_boolean");function Cf(e,r){return new e({type:"boolean",coerce:!0,...je(r)})}o(Cf,"_coercedBoolean");function Df(e,r){return new e({type:"bigint",coerce:!0,...je(r)})}o(Df,"_coercedBigint");function Lf(e){return new e({type:"any"})}o(Lf,"_any");function Uf(e){return new e({type:"unknown"})}o(Uf,"_unknown");function Mf(e,r){return new e({type:"void",...je(r)})}o(Mf,"_void");function qf(e,r){return new e({type:"date",coerce:!0,...je(r)})}o(qf,"_coercedDate");function Aa(e,r){return new Jm({check:"greater_than",...je(r),value:e,inclusive:!0})}o(Aa,"_gte");function er(e,r){return new Ym({check:"min_length",...je(r),minimum:e})}o(er,"_minLength");function Fr(e,r){return new Qm({check:"string_format",format:"regex",...je(r),pattern:e})}o(Fr,"_regex");function jf(e,r,i){let a=je(i);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:r,...a})}o(jf,"_custom");var Xe=X("ZodMiniType",(e,r)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ge.init(e,r),e.def=r,e.type=r.type,e.parse=(i,a)=>va(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>Li(e,i,a),e.parseAsync=async(i,a)=>_a(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>Ui(e,i,a),e.check=(...i)=>e.clone({...r,checks:[...r.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]},{parent:!0}),e.with=e.check,e.clone=(i,a)=>ba(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.apply=i=>i(e)}),Sa=X("ZodMiniString",(e,r)=>{wa.init(e,r),Xe.init(e,r)});function y(e){return If(Sa,e)}o(y,"string");var Bf=X("ZodMiniStringFormat",(e,r)=>{cc.init(e,r),Sa.init(e,r)});var bO=X("ZodMiniURL",(e,r)=>{sf.init(e,r),Bf.init(e,r)});function Ff(e){return Rf(bO,e)}o(Ff,"url");var Ea=X("ZodMiniNumber",(e,r)=>{lc.init(e,r),Xe.init(e,r)});function gt(e){return kf(Ea,e)}o(gt,"number");var vO=X("ZodMiniNumberFormat",(e,r)=>{uf.init(e,r),Ea.init(e,r)});function Hf(e){return Nf(vO,e)}o(Hf,"int");var hc=X("ZodMiniBoolean",(e,r)=>{pc.init(e,r),Xe.init(e,r)});function Re(e){return zf(hc,e)}o(Re,"boolean");var Gf=X("ZodMiniBigInt",(e,r)=>{cf.init(e,r),Xe.init(e,r)});var _O=X("ZodMiniAny",(e,r)=>{lf.init(e,r),Xe.init(e,r)});function qi(){return Lf(_O)}o(qi,"any");var xO=X("ZodMiniUnknown",(e,r)=>{pf.init(e,r),Xe.init(e,r)});function le(){return Uf(xO)}o(le,"unknown");var PO=X("ZodMiniVoid",(e,r)=>{df.init(e,r),Xe.init(e,r)});function Zf(e){return Mf(PO,e)}o(Zf,"_void");var Vf=X("ZodMiniDate",(e,r)=>{mf.init(e,r),Xe.init(e,r)});var wO=X("ZodMiniArray",(e,r)=>{ff.init(e,r),Xe.init(e,r)});function ge(e,r){return new wO({type:"array",element:e,...je(r)})}o(ge,"array");var AO=X("ZodMiniObject",(e,r)=>{hf.init(e,r),Xe.init(e,r),Je(e,"shape",()=>r.shape)});function R(e,r){let i={type:"object",shape:e??{},...je(r)};return new AO(i)}o(R,"object");var TO=X("ZodMiniUnion",(e,r)=>{dc.init(e,r),Xe.init(e,r)});function ye(e,r){return new TO({type:"union",options:e,...je(r)})}o(ye,"union");var SO=X("ZodMiniDiscriminatedUnion",(e,r)=>{gf.init(e,r),Xe.init(e,r)});function Hr(e,r,i){return new SO({type:"union",options:r,discriminator:e,...je(i)})}o(Hr,"discriminatedUnion");var EO=X("ZodMiniRecord",(e,r)=>{yf.init(e,r),Xe.init(e,r)});function pe(e,r,i){return new EO({type:"record",keyType:e,valueType:r,...je(i)})}o(pe,"record");var IO=X("ZodMiniEnum",(e,r)=>{bf.init(e,r),Xe.init(e,r),e.options=Object.values(r.entries)});function Pe(e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new IO({type:"enum",entries:i,...je(r)})}o(Pe,"_enum");var $O=X("ZodMiniLiteral",(e,r)=>{vf.init(e,r),Xe.init(e,r)});function re(e,r){return new $O({type:"literal",values:Array.isArray(e)?e:[e],...je(r)})}o(re,"literal");var RO=X("ZodMiniTransform",(e,r)=>{_f.init(e,r),Xe.init(e,r)});function Gr(e){return new RO({type:"transform",transform:e})}o(Gr,"transform");var kO=X("ZodMiniOptional",(e,r)=>{xf.init(e,r),Xe.init(e,r)});function j(e){return new kO({type:"optional",innerType:e})}o(j,"optional");var OO=X("ZodMiniNullable",(e,r)=>{Pf.init(e,r),Xe.init(e,r)});function ji(e){return new OO({type:"nullable",innerType:e})}o(ji,"nullable");var NO=X("ZodMiniPipe",(e,r)=>{wf.init(e,r),Xe.init(e,r)});function Zr(e,r){return new NO({type:"pipe",in:e,out:r})}o(Zr,"pipe");var zO=X("ZodMiniCustom",(e,r)=>{Af.init(e,r),Xe.init(e,r)});function Ia(e,r){return jf(zO,e??(()=>!0),r)}o(Ia,"custom");var Bi={};zm(Bi,{bigint:()=>qO,boolean:()=>MO,date:()=>jO,number:()=>UO,string:()=>LO});function LO(e){return $f(Sa,e)}o(LO,"string");function UO(e){return Of(Ea,e)}o(UO,"number");function MO(e){return Cf(hc,e)}o(MO,"boolean");function qO(e){return Df(Gf,e)}o(qO,"bigint");function jO(e){return qf(Vf,e)}o(jO,"date");var yc=R({retryOnFailure:R({defaultValue:j(Re()),hide:j(Re())}),continueOnFailure:R({defaultValue:j(Re()),hide:j(Re())})}),gc=class{constructor(r,i,a,u,c,p,m,v,_,A,k){this.name=r;this.displayName=i;this.description=a;this.props=u;this.run=c;this.test=p;this.requireAuth=m;this.errorHandlingOptions=v;this.outputSchema=_;this.audience=A;this.aiMetadata=k}static{o(this,"IAction")}},T=o(e=>new gc(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Ie=R({displayName:y(),description:j(y())}),ve=o((e,r)=>R({type:re(r),required:Re(),defaultValue:j(qi())}),"TPropertyValue");var zt=R({...Ie.shape,...ve(y(),"SHORT_TEXT").shape}),Ar=R({...Ie.shape,...ve(y(),"LONG_TEXT").shape});var Kf=R({label:y(),value:le()}),$a=R({disabled:j(Re()),placeholder:j(y()),options:ge(Kf)});var Ct=R({...Ie.shape,options:$a,...ve(le(),"STATIC_DROPDOWN").shape}),Tr=R({...Ie.shape,options:$a,...ve(ge(le()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var bc=R({...Ie.shape,...ve(le(),"DROPDOWN").shape,refreshers:ge(y())}),Fi=R({...Ie.shape,...ve(ge(le()),"MULTI_SELECT_DROPDOWN").shape,refreshers:ge(y())});var Sr=R({...Ie.shape,...ve(Re(),"CHECKBOX").shape});var Er=R({...Ie.shape,...ve(gt(),"NUMBER").shape});var Hi=R({...Ie.shape,streaming:j(Re()),...ve(le(),"FILE").shape});var Gi=R({...Ie.shape,...ve(y(),"DATE_TIME").shape});var Jf=pe(y(),ye([zt,Ar,Ct,Fi,Tr,Sr,Er,Hi,Gi])),Zi=R({...Ie.shape,properties:Jf,...ve(ge(le()),"ARRAY").shape});var Vi=R({...Ie.shape,...ve(ye([pe(y(),le())]),"JSON").shape});var Xf=ye([zt,Ct,Vi,Zi,Tr]),FO=pe(y(),Xf),vc=R({refreshers:ge(y()),...Ie.shape,...ve(le(),"DYNAMIC").shape});var Ra=R({...Ie.shape,...ve(Zf(),"MARKDOWN").shape});var Wi=(i=>(i.ARCHIVE="ARCHIVE",i.REGISTRY="REGISTRY",i))(Wi||{}),Ln=(i=>(i.CUSTOM="CUSTOM",i.OFFICIAL="OFFICIAL",i))(Ln||{}),Un=(F=>(F.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",F.COMMUNICATION="COMMUNICATION",F.COMMERCE="COMMERCE",F.CORE="CORE",F.UNIVERSAL_AI="UNIVERSAL_AI",F.FLOW_CONTROL="FLOW_CONTROL",F.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",F.ACCOUNTING="ACCOUNTING",F.PRODUCTIVITY="PRODUCTIVITY",F.CONTENT_AND_FILES="CONTENT_AND_FILES",F.DEVELOPER_TOOLS="DEVELOPER_TOOLS",F.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",F.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",F.HUMAN_RESOURCES="HUMAN_RESOURCES",F.PAYMENT_PROCESSING="PAYMENT_PROCESSING",F.MARKETING="MARKETING",F.SALES_AND_CRM="SALES_AND_CRM",F))(Un||{});var Ki=(i=>(i.AUTHORIZATION_CODE="authorization_code",i.CLIENT_CREDENTIALS="client_credentials",i))(Ki||{}),_c="both_client_credentials_and_authorization_code";var ct=(u=>(u.POLLING="POLLING",u.WEBHOOK="WEBHOOK",u.APP_WEBHOOK="APP_WEBHOOK",u.MANUAL="MANUAL",u))(ct||{}),Ji=(c=>(c.NONE="NONE",c.HEADER_PRESENT="HEADER_PRESENT",c.QUERY_PRESENT="QUERY_PRESENT",c.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",c.HEAD_REQUEST="HEAD_REQUEST",c))(Ji||{}),HO=R({strategy:Pe(Ji),paramName:j(y())}),Xi=(i=>(i.SIMULATION="SIMULATION",i.TEST_FUNCTION="TEST_FUNCTION",i))(Xi||{});var ka=(i=>(i.WEBSOCKET="WEBSOCKET",i.NONE="NONE",i))(ka||{}),Yf=R({status:j(gt()),body:j(le()),headers:j(pe(y(),y()))}),Qf=R({type:re("DELAY"),resumeDateTime:y(),requestIdToReply:j(y()),handlerId:j(y()),streamStepProgress:j(Pe(ka))}),eh=R({type:re("WEBHOOK"),requestId:y(),requestIdToReply:j(y()),response:Yf,handlerId:j(y()),streamStepProgress:j(Pe(ka))}),GO=ye([Qf,eh]);var ZO=R({body:le(),rawBody:j(le()),headers:pe(y(),y()),queryParams:pe(y(),y())});function yt(e){return e==null}o(yt,"isNil");function Yi(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(Yi,"isEmpty");function Oa(e,r){if(e==null)throw new Error(`${r} is null or undefined`)}o(Oa,"assertNotNullOrUndefined");var xc=pn(require("crypto"),1);var VO=128,dn,Mn,WO=o(e=>{!dn||dn.length<e?(dn=Buffer.allocUnsafe(e*VO),xc.default.randomFillSync(dn),Mn=0):Mn+e>dn.length&&(xc.default.randomFillSync(dn),Mn=0),Mn+=e},"fillPool"),KO=o(e=>(WO(e|=0),dn.subarray(Mn-e,Mn)),"random"),JO=o((e,r,i)=>{let a=(2<<31-Math.clz32(e.length-1|1))-1,u=Math.ceil(1.6*a*r/e.length);return(c=r)=>{let p="";for(;;){let m=i(u),v=u;for(;v--;)if(p+=e[m[v]&a]||"",p.length===c)return p}}},"customRandom"),rh=o((e,r=21)=>JO(e,r,KO),"customAlphabet");var XO="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",nh=21,JG=y().check(Fr(new RegExp(`^[0-9a-zA-Z]{${nh}}$`))),YO=rh(XO,nh);var Vr=Zr(Gr(e=>e instanceof Date?e.toISOString():e),y()),Ft={id:y(),created:Vr,updated:Vr},Fe=o(e=>j(ji(e)),"Nullable");function Pc(e){return j(ji(Pe(e)))}o(Pc,"NullableEnum");var QG=Zr(Gr(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),j(Re())),Na=o(e=>Zr(Gr(r=>Array.isArray(r)?r:r!==void 0?[r]:void 0),j(ge(e))),"OptionalArrayFromQuery");var rZ=pe(y(),le());var Qi=(A=>(A.OPENAI="openai",A.OPENROUTER="openrouter",A.ANTHROPIC="anthropic",A.AZURE="azure",A.GOOGLE="google",A.ACTIVEPIECES="activepieces",A.CLOUDFLARE_GATEWAY="cloudflare-gateway",A.CUSTOM="custom",A.BEDROCK="bedrock",A.MISTRAL="mistral",A))(Qi||{});var fZ=y().check(Fr(/^#[0-9A-Fa-f]{6}$/));var gZ=R({filename:y(),data:le(),type:re("file"),mimetype:j(y())});var QO=pn(oh());var wZ=R({...Ft,name:y(),permissions:ge(y()),platformId:Fe(y()),type:y(),userCount:j(gt())});var ah=(a=>(a.AGENT_DECIDE="agent-decide",a.CHOOSE_YOURSELF="choose-yourself",a.LEAVE_EMPTY="leave-empty",a))(ah||{}),wc=(i=>(i.FILE="FILE",i.TABLE="TABLE",i))(wc||{}),Ac=(a=>(a.SSE="sse",a.STREAMABLE_HTTP="streamable-http",a.SIMPLE_HTTP="http",a))(Ac||{});var Tc=(a=>(a.TEXT="text",a.NUMBER="number",a.BOOLEAN="boolean",a))(Tc||{});var Sc=(i=>(i.IN_PROGRESS="in-progress",i.COMPLETED="completed",i))(Sc||{});var eN=R({mode:Pe(ah),value:le()}),tN=R({auth:j(y()),fields:pe(y(),eN)}),rN=R({pieceName:y(),pieceVersion:y(),actionName:y(),predefinedInput:j(tN)}),nN=R({type:re("PIECE"),toolName:y().check(er(1)),pieceMetadata:rN}),iN=R({type:re("none")}),oN=R({type:re("access_token"),accessToken:y()}),aN=R({type:re("api_key"),apiKey:y(),apiKeyHeader:y()}),sN=R({type:re("headers"),headers:pe(y(),y())}),uN=Hr("type",[iN,oN,aN,sN]),sh=R({type:re("FLOW"),toolName:y().check(er(1)),externalFlowId:y(),flowDisplayName:j(y())}),uh=R({type:re("MCP"),toolName:y().check(er(1)),serverUrl:Ff(),protocol:Pe(Ac),auth:uN}),ch=R({type:re("KNOWLEDGE_BASE"),toolName:y().check(er(1)),sourceType:Pe(wc),sourceId:y(),sourceName:y()}),cN=Hr("type",[nN,sh,uh,ch]),lN=R({displayName:y(),description:j(y()),type:Pe(Tc)}),lh=R({type:re("MARKDOWN"),markdown:y()}),qn={type:re("TOOL_CALL"),input:Fe(pe(y(),le())),output:j(le()),toolName:y(),status:Pe(Sc),toolCallId:y(),startTime:y(),endTime:j(y())},JZ=R(qn),ph=Hr("toolCallType",[R({...qn,toolCallType:re("PIECE"),pieceName:y(),pieceVersion:y(),actionName:y()}),R({...qn,toolCallType:re("FLOW"),displayName:y(),externalFlowId:y()}),R({...qn,toolCallType:re("MCP"),displayName:y(),serverUrl:y()}),R({...qn,toolCallType:re("KNOWLEDGE_BASE"),displayName:y(),sourceType:y()}),R({...qn,toolCallType:re("UNKNOWN"),displayName:y()})]),pN=ye([lh,ph]);var Ec=(i=>(i.IMAGE="image",i.TEXT="text",i))(Ec||{}),Ir=R({apiKey:y()}),dN=Ir,mN=R({apiKey:y(),apiKeyHash:y()}),fN=Ir,hN=Ir,gN=Ir,yN=Ir,bN=Ir,vN=Ir,_N=Ir,gh=R({accessKeyId:y().check(er(1)),secretAccessKey:y().check(er(1))}),xN=R({}),PN=R({}),wN=R({}),AN=R({}),TN=R({}),SN=R({}),yh=R({modelId:y(),modelName:y(),modelType:Pe(Ec)}),bh=R({apiKeyHeader:y(),baseUrl:y(),models:ge(yh),defaultHeaders:j(pe(y(),y()))}),vh=R({accountId:y(),gatewayId:y(),models:ge(yh),vertexProject:j(y()),vertexRegion:j(y())}),_h=R({resourceName:y(),apiVersion:Zr(Gr(e=>typeof e=="string"&&e.trim().length===0?void 0:e),j(y()))}),xh=R({region:y().check(er(1))}),EN=ye([dN,gN,yN,bN,vN,hN,fN,mN,gh,_N]),Ph=ye([bh,vh,_h,xh,xN,wN,AN,TN,PN,SN]),IN=R({id:y(),name:y(),type:Pe(Ec)}),$N=R({id:y(),name:y(),provider:Pe(Qi),config:Ph,enabledForChat:Re()}),RN=R({provider:Pe(Qi),config:Ph,auth:EN,platformId:y()});var eV={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},dh=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],kN=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],ON=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],mh=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],NN=["grok-4.20","grok-4.1-fast"],zN={openai:dh,anthropic:kN,google:mh,activepieces:[...ON.map(e=>`anthropic/${e}`),...dh.map(e=>`openai/${e}`),...mh.map(e=>`google/${e}`),...NN.map(e=>`x-ai/${e}`)]};var fh=128e3,CN={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function DN({provider:e}){return e?CN[e]??fh:fh}o(DN,"getMaxContextTokens");var hh={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},LN={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},UN=new Set(["anthropic","mistral"]);function ur(e){return{chatModels:zN[e],maxContextTokens:DN({provider:e}),defaultEmbeddingModel:hh[e],supportsEmbedding:hh[e]!==void 0,supportsImageGeneration:!UN.has(e),webSearch:LN[e]}}o(ur,"buildProviderCapabilities");var MN={openai:ur("openai"),anthropic:ur("anthropic"),openrouter:ur("openrouter"),azure:ur("azure"),google:ur("google"),"cloudflare-gateway":ur("cloudflare-gateway"),custom:ur("custom"),bedrock:ur("bedrock"),mistral:ur("mistral"),activepieces:ur("activepieces")};var qN=R({base64Url:y(),fileName:y(),extension:j(y())}),jN=R({mimeType:y(),url:y(),fileName:j(y())}),Ic=ye([qN,jN]);var BN=ye([R({type:re("file"),value:Ic}),R({type:re("markdown"),value:y(),files:j(ge(Ic))})]),FN=R({sessionId:y(),message:y(),files:j(ge(y()))});var Ah=(i=>(i.ON_NEW_RECORD="ON_NEW_RECORD",i.ON_UPDATE_RECORD="ON_UPDATE_RECORD",i))(Ah||{}),Th=(i=>(i.ENABLED="ENABLED",i.DISABLED="DISABLED",i))(Th||{}),$c=(a=>(a.RECORD_CREATED="RECORD_CREATED",a.RECORD_UPDATED="RECORD_UPDATED",a.RECORD_DELETED="RECORD_DELETED",a))($c||{});var HN=ye([R({...Ft,name:y(),externalId:y(),type:re("STATIC_DROPDOWN"),tableId:y(),projectId:y(),data:R({options:ge(R({value:y()}))})}),R({...Ft,name:y(),externalId:y(),type:ye([re("TEXT"),re("NUMBER"),re("DATE")]),tableId:y(),projectId:y()})]),GN=R({...Ft,name:y(),folderId:Fe(y()),projectId:y(),externalId:y(),status:Pc(Th),trigger:Pc(Ah)}),ZN=R({...Ft,tableId:y(),projectId:y(),cells:pe(y(),R({updated:y(),created:y(),value:le(),fieldName:y()}))}),VN=R({events:ge(Pe($c)),webhookUrl:y(),flowId:y()}),WN=R({fields:ge(R({id:y(),name:y()})),rows:ge(pe(y(),y())),name:y()}),KN=R({projectId:y(),limit:j(Bi.number()),cursor:j(y()),name:j(y()),externalIds:Na(y()),folderId:j(y()),folderIds:Na(y())}),JN=R({records:ge(ge(R({fieldId:y(),value:Eh()}))),tableId:y()}),XN=R({cells:j(ge(R({fieldId:y(),value:Eh()}))),tableId:y(),agentUpdate:j(Re())}),Sh=Hr("operator",[mn("eq"),mn("neq"),mn("gt"),mn("gte"),mn("lt"),mn("lte"),mn("co"),wh("exists"),wh("not_exists")]),YN=R({tableId:y(),limit:j(Bi.number()),cursor:j(y()),filters:Na(Sh)});function Eh(){return Zr(Gr(e=>e==null?e:String(e)),ji(y()))}o(Eh,"coerceToString");function mn(e){return R({fieldId:y(),operator:re(e),value:y()})}o(mn,"valueFilter");function wh(e){return R({fieldId:y(),operator:re(e)})}o(wh,"existenceFilter");var QN=R({status:j(gt()),body:j(le()),headers:j(pe(y(),y()))}),ez=R({...Ft,deleted:Fe(Vr),ownerId:y(),displayName:y(),platformId:y(),externalId:Fe(y())});var Ih=R({name:y(),description:j(y()),type:y(),required:Re()}),tz=R({pieceName:y(),triggerName:y(),input:R({toolName:y(),toolDescription:y(),inputSchema:ge(Ih),returnsResponse:Re()})});var $h="^[0-9]+\\.[0-9]+\\.[0-9]+$",vV=new RegExp($h),nz="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_V=y().check(Fr(new RegExp($h))),xV=y().check(Fr(new RegExp(nz))),iz=R({packageType:re("ARCHIVE"),pieceType:Pe(Ln),pieceName:y(),pieceVersion:y(),archiveId:y(),platformId:y()}),Rh=R({packageType:re("REGISTRY"),pieceType:re("OFFICIAL"),pieceName:y(),pieceVersion:y()}),kh=R({packageType:re("REGISTRY"),pieceType:re("CUSTOM"),pieceName:y(),pieceVersion:y(),platformId:y()}),PV=ye([Rh,kh]),wV=ye([iz,Rh,kh]);var oz=Hr("type",[R({type:re("CRON_EXPRESSION"),cronExpression:y(),timezone:y()}),R({type:re("INTERVAL"),intervalMs:Hf().check(Aa(6e4))})]),AV=R({...Ft,type:Pe(ct),projectId:y(),flowId:y(),triggerName:y(),schedule:Fe(oz),flowVersionId:y(),pieceName:y(),pieceVersion:y(),deleted:Fe(y()),simulate:Re()}),Oh=(O=>(O.UNKNOWN="UNKNOWN",O.FLOW_RUN_LOG="FLOW_RUN_LOG",O.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",O.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",O.FLOW_STEP_FILE="FLOW_STEP_FILE",O.SAMPLE_DATA="SAMPLE_DATA",O.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",O.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",O.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",O.PROJECT_RELEASE="PROJECT_RELEASE",O.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",O.PLATFORM_ASSET="PLATFORM_ASSET",O.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",O.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",O.KNOWLEDGE_BASE="KNOWLEDGE_BASE",O.FLOW_BUNDLE="FLOW_BUNDLE",O))(Oh||{}),Nh=(i=>(i.NONE="NONE",i.ZSTD="ZSTD",i))(Nh||{}),zh=(i=>(i.S3="S3",i.DB="DB",i))(zh||{}),TV=R({...Ft,projectId:Fe(y()),platformId:Fe(y()),type:Pe(Oh),compression:Pe(Nh),data:j(le()),location:Pe(zh),size:Fe(gt()),fileName:Fe(y()),s3Key:Fe(y()),metadata:Fe(pe(y(),y()))}),Ch=(a=>(a.ADMIN="ADMIN",a.MEMBER="MEMBER",a.OPERATOR="OPERATOR",a))(Ch||{}),Dh=(i=>(i.ACTIVE="ACTIVE",i.INACTIVE="INACTIVE",i))(Dh||{}),SV=R({id:y(),email:y(),firstName:y(),status:Pe(Dh),externalId:Fe(y()),platformId:Fe(y()),platformRole:Pe(Ch),lastName:y(),created:Vr,updated:Vr,lastActiveDate:Fe(Vr),imageUrl:Fe(y())});var kc=R({...Ie.shape,...ve(pe(y(),le()),"OBJECT").shape});var Mh=R({...Ie.shape,...ve(y(),"COLOR").shape});var Oc=ye([zt,Ar,Ra,Sr,Ct,Tr,bc,Fi,vc,Er,Zi,kc,Vi,Gi,Hi,Mh]),h={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let r=e.code.toString();return{...e,code:r,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var cr=R({displayName:y(),description:j(y())});var qh=R({username:y(),password:y()}),Nc=R({...cr.shape,username:R({displayName:y(),description:j(y())}),password:R({displayName:y(),description:j(y())}),...ve(qh,"BASIC_AUTH").shape});var cz=pe(y(),ye([zt,Ar,Er,Sr,Ct])),zc=R({...cr.shape,props:cz,...ve(le(),"CUSTOM_AUTH").shape});var fn=R({...cr.shape,...ve(R({auth:y()}),"SECRET_TEXT").shape});var lz=pe(y(),ye([zt,Ar,fn,Er,Sr,Ct,Tr,Ra])),jh=R({...cr.shape,props:lz,...ve(le(),"OIDC").shape});var Cc=(i=>(i.HEADER="HEADER",i.BODY="BODY",i))(Cc||{}),Bh=ye([zt,fn,Ct]),Fh=pe(y(),Bh),pz=R({props:j(pe(y(),Bh)),authUrl:y(),tokenUrl:y(),scope:ge(y()),prompt:j(ye([re("none"),re("consent"),re("login"),re("omit")])),pkce:j(Re()),pkceMethod:j(ye([re("plain"),re("S256")])),authorizationMethod:j(Pe(Cc)),grantType:j(ye([Pe(Ki),re(_c)])),extra:j(pe(y(),y()))}),Hh=R({access_token:y(),props:j(Fh),data:pe(y(),qi())}),Dc=R({...cr.shape,...pz.shape,...ve(Hh,"OAUTH2").shape});var jn=ye([Nc,zc,jh,Dc,fn]),eo="Connection",to={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||eo}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||eo,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||eo}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||eo}},None(){}};var i3={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var dz=R({...Ie.shape,...ve(le(),"CUSTOM").shape,code:y()});var mz=ye([Oc,jn]),Lc=pe(y(),mz),A3=pe(y(),Oc);var Gh=ye([R({strategy:re("CRON"),cronExpression:y()}),R({strategy:re("NONE")})]),Bn=class{constructor(r,i,a,u,c,p,m,v,_,A,k,U,b,E,z,O,F,Z,ae){this.name=r;this.displayName=i;this.description=a;this.requireAuth=u;this.props=c;this.type=p;this.handshakeConfiguration=m;this.onHandshake=v;this.renewConfiguration=_;this.onRenew=A;this.onEnable=k;this.onDisable=U;this.onStart=b;this.run=E;this.test=z;this.sampleData=O;this.testStrategy=F;this.outputSchema=Z;this.aiMetadata=ae}static{o(this,"ITrigger")}},nt=o(e=>{switch(e.type){case"WEBHOOK":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Bn(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,yt(e.sampleData)&&yt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Zh="2",Ca="0.82.0";var Uc=class{constructor(r,i,a,u,c,p,m,v,_=Ca,A,k="",U){this.displayName=r;this.logoUrl=i;this.authors=a;this.events=u;this.categories=m;this.auth=v;this.minimumSupportedRelease=_;this.maximumSupportedRelease=A;this.description=k;this.deprecated=U;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Zh}),"getContextInfo");(!fz(_)||hz(_,Ca))&&(this.minimumSupportedRelease=Ca),c.forEach(b=>this._actions[b.name]=b),p.forEach(b=>this._triggers[b.name]=b)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(r){return this._actions[r]}getTrigger(r){return this._triggers[r]}actions(){return this._actions}triggers(){return this._triggers}},Vh=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((i,a,u)=>a===u.findIndex(c=>c.type===i.type)))throw new Error("Auth properties must be unique by type");return new Uc(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function fz(e){return/^\d+\.\d+\.\d+$/.test(e)}o(fz,"isValidSimpleSemver");function hz(e,r){let[i,a,u]=e.split(".").map(Number),[c,p,m]=r.split(".").map(Number);return i!==c?i<c:a!==p?a<p:u<m}o(hz,"isSemverLessThan");var gz=j(pe(y(),pe(y(),y()))),Wh=R({id:j(y()),name:y(),displayName:y(),logoUrl:y(),description:y(),authors:ge(y()),platformId:j(y()),directoryPath:j(y()),auth:j(ye([jn,ge(jn)])),version:y(),categories:j(ge(Pe(Un))),minimumSupportedRelease:j(y()),maximumSupportedRelease:j(y()),deprecated:j(Re()),i18n:gz}),yz=Pe(["human","ai","both"]),Kh=R({description:j(y()),idempotent:j(Re())}),Jh=R({name:y(),displayName:y(),description:y(),props:Lc,requireAuth:Re(),errorHandlingOptions:j(yc),outputSchema:j(Ia()),audience:j(yz),aiMetadata:j(Kh)}),Xh=R({name:y(),displayName:y(),description:y(),props:Lc,errorHandlingOptions:j(yc),type:Pe(ct),sampleData:le(),handshakeConfiguration:j(Ia()),renewConfiguration:j(Gh),testStrategy:Pe(Xi),outputSchema:j(Ia()),aiMetadata:j(Kh)}),bz=R({...Wh.shape,actions:pe(y(),Jh),triggers:pe(y(),Xh)}),vz=R({...Wh.shape,actions:gt(),triggers:gt(),suggestedActions:j(ge(Jh)),suggestedTriggers:j(ge(Xh))}),Yh=R({projectUsage:gt(),pieceType:Pe(Ln),packageType:Pe(Wi),platformId:j(y()),archiveId:j(y())}),A5=R({...bz.shape,...Yh.shape}),T5=R({...vz.shape,...Yh.shape}),S5=R({name:y(),version:y()});var _z=pn(require("path")),xz=pn(require("fs/promises"));var tg=require("node:stream");var Da=class{constructor(r,i){this.baseUrl=r;this.authenticationConverter=i}static{o(this,"BaseHttpClient")}getUrl(r){let i=new URL(`${this.baseUrl}${r.url}`),a=`${i.origin}${i.pathname}`,u=new URLSearchParams;return i.searchParams.forEach((c,p)=>{u.append(p,c)}),{urlWithoutQueryParams:a,queryParams:u}}getHeaders(r){let i={Accept:"application/json"};return r.authentication&&this.populateAuthentication(r.authentication,i),r.body&&(r.headers?.["Content-Type"]==="text/csv"?i["Content-Type"]="text/csv":i["Content-Type"]="application/json"),r.headers&&(i={...i,...r.headers}),i}populateAuthentication(r,i){this.authenticationConverter.convert(r,i)}};var La=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(r=new Mc,i=new qc){this.converters={BEARER_TOKEN:r,BASIC:i}}convert(r,i){return this.converters[r.type].convert(r,i)}},Mc=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(r,i){return i.Authorization=`Bearer ${r.token}`,i}},qc=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(r,i){let a=`${r.username}:${r.password}`,u=Buffer.from(a).toString("base64");return i.Authorization=`Basic ${u}`,i}};var Ua=class extends Error{constructor(i,a){let u=a.status||500,c=Buffer.isBuffer(a.responseBody)?a.responseBody.toString():a.responseBody;super(JSON.stringify({response:{status:u,body:c},request:{body:i}}));this.requestBody=i;this.status=u,this.responseBody=c}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Ma=class extends Da{static{o(this,"FetchHttpClient")}constructor(r="",i=new La){super(r,i)}async sendRequest(r,i){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:a,queryParams:u}=this.getUrl(r),c=this.getHeaders(r),p=r.queryParams??{};for(let[ae,Me]of Object.entries(p))u.append(ae,Me);let m=u.toString(),v=m?`${a}?${m}`:a,_=r.responseType??"json",A=r.followRedirects??!0,k=r.retries??0,{body:U,extraHeaders:b,isStream:E}=Pz(r.body,c),z=Az({...c,...b}),O=await wz(async()=>{let ae=new AbortController,Me=r.timeout&&r.timeout>0?setTimeout(()=>ae.abort(),r.timeout):void 0;try{let et={method:r.method.toString(),headers:z,body:U,redirect:A?"follow":"manual",signal:ae.signal};return E&&(et.duplex="half"),i?.dispatcher!==void 0&&(et.dispatcher=i.dispatcher),await fetch(v,et)}finally{Me!==void 0&&clearTimeout(Me)}},k),F=A?300:400;if(O.status<200||O.status>=F){let ae=await Qh(O,_),Me=new Ua(r.body,{status:O.status,responseBody:ae});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Me),Me}let Z=await Qh(O,_);return{status:O.status,headers:Tz(O.headers),body:Z}}};function Pz(e,r){if(Ez(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Sz(e)){let a=new tg.PassThrough;return e.on("error",u=>a.destroy(u)),e.pipe(a),{body:a,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(r["Content-Type"]??r["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(Pz,"serializeBody");async function Qh(e,r){switch(r){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let i=await e.text();if(i.length===0)return;try{return JSON.parse(i)}catch{return i}}}}o(Qh,"parseResponseBody");async function wz(e,r){let i;for(let a=0;a<=r;a++)try{let u=await e();if(u.status>=500&&a<r){await eg(a);continue}return u}catch(u){if(i=u,a<r){await eg(a);continue}throw u}throw i}o(wz,"sendWithRetries");function eg(e){let r=Math.min(1e3*2**e,3e4);return new Promise(i=>setTimeout(i,r))}o(eg,"backoff");function Az(e){let r={};for(let[i,a]of Object.entries(e))a!==void 0&&(r[i.toLowerCase()]=Array.isArray(a)?a.join(", "):a);return r}o(Az,"normalizeHeaders");function Tz(e){let r={};return e.forEach((i,a)=>{r[a]=i}),r}o(Tz,"toHttpHeaders");function Sz(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Sz,"isNodeFormData");function Ez(e){return e==null}o(Ez,"isNil");var lr=new Ma;var Fn=(p=>(p.GET="GET",p.POST="POST",p.PATCH="PATCH",p.PUT="PUT",p.DELETE="DELETE",p.HEAD="HEAD",p))(Fn||{});var fC=pn(require("fs")),sb=pn(ab());var hC={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function gC(e){let r=e.split(";")[0].trim().toLowerCase();return hC[r]??""}o(gC,"contentTypeToExtension");var yC=o(({baseUrl:e,relativePath:r})=>{let i=e.endsWith("/")?e:`${e}/`,a=r.startsWith("/")?r.slice(1):r;return`${i}${a}`},"joinBaseUrlWithRelativePath"),bC=o((e,r)=>{let i="https://api.example.com";try{let a=r?e(r):void 0;return(a?.endsWith("/")?a.slice(0,-1):a)??i}catch{return i}},"getBaseUrlForDescription");function ub({auth:e,baseUrl:r,authMapping:i,description:a,displayName:u,name:c,props:p,extraProps:m,authLocation:v="headers"}){return T({audience:"human",name:c||"custom_api_call",displayName:u||"Custom API Call",description:a||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:h.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:_})=>({url:h.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
24
24
|
i.e ${bC(r,_)}/resource or /resource`,required:!0,defaultValue:_?r(_):"",...p?.url??{}})}),"props")}),method:h.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Fn).map(_=>({label:_,value:_}))},...p?.method??{}}),headers:h.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...p?.headers??{}}),queryParams:h.Object({displayName:"Query Parameters",required:!0,...p?.queryParams??{}}),body_type:h.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:h.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:_})=>{if(!_)return{};let A=_,k={};switch(A){case"none":break;case"json":k.data=h.Json({displayName:"JSON Body",required:!0,...p?.body??{}});break;case"raw":k.data=h.LongText({displayName:"Raw Body",required:!0});break;case"form_data":k.data=h.Array({displayName:"Form Data",required:!0,properties:{fieldName:h.ShortText({displayName:"Field Name",required:!0}),fieldType:h.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:h.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:h.File({displayName:"File Field Value",required:!1})}});break}return k},"props")}),response_is_binary:h.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:h.Checkbox({displayName:"No Error on Failure",required:!1,...p?.failsafe??{}}),timeout:h.Number({displayName:"Timeout (in seconds)",required:!1,...p?.timeout??{}}),followRedirects:h.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...m},run:o(async _=>{let{method:A,url:k,headers:U,queryParams:b,body:E,body_type:z,failsafe:O,timeout:F,response_is_binary:Z,followRedirects:ae}=_.propsValue;Oa(A,"Method"),Oa(k,"URL");let Me=yt(i)?{}:await i(_.auth,_.propsValue),et=k.url,dt=et.startsWith("http://")||et.startsWith("https://")?et:yC({baseUrl:r(_.auth),relativePath:et}),Tt={method:A,url:dt,headers:{...U??{},...v==="headers"||!yt(v)?Me:{}},queryParams:{...v==="queryParams"?Me:{},...b??{}},timeout:F?F*1e3:0,followRedirects:ae};if(Z&&(Tt.responseType="arraybuffer"),E)if(z&&z!=="none"){let St=E.data;if(z==="form_data"){let Ns=St,vn=new sb.default;for(let{fieldName:_o,fieldType:xo,textFieldValue:li,fileFieldValue:pi}of Ns)xo==="text"&&!Yi(li)?vn.append(_o,li):xo==="file"&&!Yi(pi)&&vn.append(_o,pi.data,{filename:pi?.filename});Tt.body=vn,Tt.headers={...Tt.headers,...vn.getHeaders()}}else Tt.body=St}else z||(Tt.body=E);try{let St=await lr.sendRequest(Tt);return await vC(_.files,St.body,St.status,St.headers,Z)}catch(St){if(O)return St.errorMessage();throw St}},"run")})}o(ub,"createCustomApiCallAction");var vC=o(async(e,r,i,a,u)=>{let c;if(u&&_C(r)){let p=Array.isArray(a?.["content-type"])?a["content-type"][0]:a?.["content-type"],m=gC(p??"")||"txt",v;r instanceof ArrayBuffer?v=Buffer.from(new Uint8Array(r)):Buffer.isBuffer(r)?v=r:v=Buffer.from(r),c=await e.write({fileName:`output.${m}`,data:v})}else c=r;return{status:i,headers:a,body:c}},"handleBinaryResponse"),_C=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var hx=pn(mx());var ii={getBearerToken:o(async e=>{let r=e;return Vl(r)?UM(r.props):r.access_token},"getBearerToken")};function ws(e){return Vl(e)}o(ws,"isAppAuth");async function Gl(e){let r=e;if(Vl(r)){let a=As({appId:r.props.appId,privateKey:r.props.privateKey});return`${(await lr.sendRequest({method:"GET",url:"https://api.github.com/app",headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}})).body.slug}[bot]`}return(await lr.sendRequest({method:"GET",url:"https://api.github.com/user",headers:{Authorization:`Bearer ${r.access_token}`}})).body.login}o(Gl,"getAuthenticatedLogin");function As({appId:e,privateKey:r}){let i=Math.floor(Date.now()/1e3);return hx.default.sign({iat:i-MM,exp:i+qM,iss:e},LM(r),{algorithm:"RS256"})}o(As,"signGithubAppJwt");function LM(e){let r=e.replace(/\\n/g,`
|
|
25
25
|
`).trim();if(r.includes(`
|
|
26
26
|
`))return r;let i=r.match(/^(-----BEGIN [A-Z0-9 ]+-----)(.+?)(-----END [A-Z0-9 ]+-----)$/);if(!i)return r;let[,a,u,c]=i,p=u.replace(/\s+/g,"").match(/.{1,64}/g)?.join(`
|
|
@@ -72,7 +72,7 @@ I\u2019d like to close this discussion by June 4th. \r
|
|
|
72
72
|
url
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
}`;return await $({auth:e,method:"POST",resourceUri:"/graphql",body:{query:p}})}});var SP=T({auth:P,name:"add_labels_to_issue",displayName:"Add Labels to Issue",description:"Adds labels to an existing issue.",audience:"human",aiMetadata:{description:"Adds one or more labels to an existing issue (by number) in a repository, leaving any labels already on the issue in place. Use to tag or categorize an issue. Idempotent in effect: re-adding a label the issue already has does not duplicate it.",idempotent:!0},props:{repository:ee.repositoryDropdown,issue_number:ee.issueDropdown(!0),labels:ee.labelDropDown(!0)},outputSchema:Px,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u=r.issue_number,c=r.labels;return await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`,body:{labels:c}})}});var EP=T({auth:P,name:"create_branch",displayName:"Create Branch",description:"Creates a new branch on a repository.",audience:"human",aiMetadata:{description:"Creates a new branch in a repository pointing at the tip of a chosen source branch. Use to start a feature or working branch from an existing one. Not idempotent: a second call with the same branch name fails because the ref already exists.",idempotent:!1},props:{repository:ee.repositoryDropdown,source_branch:ee.branchDropdown("Source Branch","The source branch that will be used to create the new branch",!0),new_branch_name:h.ShortText({displayName:"New Branch Name",description:"The name for the new branch (e.g., 'feature/new-design').",required:!0})},outputSchema:Tx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,c=(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${r.source_branch}`})).body.commit.sha;return await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/git/refs`,body:{ref:`refs/heads/${r.new_branch_name}`,sha:c}})}});var IP=T({auth:P,name:"delete_branch",displayName:"Delete Branch",description:"Deletes a branch from a repository.",audience:"human",aiMetadata:{description:"Permanently deletes a branch (git ref under heads/) from a repository. Use to clean up a merged or stale branch. Effectively idempotent for the end state (the branch ends up gone), but a repeat call on an already-deleted branch returns a not-found error.",idempotent:!1},props:{repository:ee.repositoryDropdown,branch:ee.branchDropdown("Branch","",!0)},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u=r.branch;return await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/git/refs/heads/${u}`})}});var $P=T({auth:P,name:"update_issue",displayName:"Update Issue",description:"Updates an existing issue.",audience:"human",aiMetadata:{description:"Edits an existing issue (by number) in a repository, setting only the fields you provide \u2014 title, body, state (open/closed) and state reason, milestone, labels, or assignees. Use to modify, close, or reopen an issue. Idempotent: applying the same field values again leaves the issue in the same state. Note that labels and assignees here replace the existing set rather than append.",idempotent:!0},props:{repository:ee.repositoryDropdown,issue_number:ee.issueDropdown(),title:h.ShortText({displayName:"Title",required:!1}),body:h.LongText({displayName:"Body",required:!1}),state:h.StaticDropdown({displayName:"State",description:"The new state of the issue.",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),state_reason:h.StaticDropdown({displayName:"State Reason",description:"The reason for the state change. (Only used if State is changed).",required:!1,options:{options:[{label:"Completed",value:"completed"},{label:"Not Planned",value:"not_planned"},{label:"Reopened",value:"reopened"},{label:"Duplicate",value:"duplicate"}]}}),milestone:ee.milestoneDropdown(!1),labels:ee.labelDropDown(!1),assignees:ee.assigneeDropDown(!1)},outputSchema:ai,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u={};return r.title!==void 0&&(u.title=r.title),r.body!==void 0&&(u.body=r.body),r.state!==void 0&&(u.state=r.state),r.state_reason!==void 0&&(u.state_reason=r.state_reason),r.assignees!==void 0&&(u.assignees=r.assignees),r.labels!==void 0&&(u.labels=r.labels),r.milestone!==void 0&&(u.milestone=r.milestone),await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/issues/${r.issue_number}`,body:u})}});var RP=T({auth:P,name:"github_create_gist",displayName:"Create Gist",description:"Create a GitHub Gist. Requires an OAuth connection \u2014 Gists cannot be created with GitHub App authentication.",audience:"both",aiMetadata:{description:"Creates a GitHub Gist (a standalone code/text snippet) containing a single named file with the given content, public or secret. Use to share a snippet outside any repository. Requires an OAuth connection \u2014 it throws an error under GitHub App authentication. Not idempotent: each call creates a new gist.",idempotent:!1},props:{description:h.ShortText({displayName:"Description",description:"Description of the gist",required:!1}),public:h.Checkbox({displayName:"Public",description:"Whether the gist should be public",required:!0,defaultValue:!0}),filename:h.ShortText({displayName:"Filename",description:"Name of the file in the gist",required:!0}),content:h.LongText({displayName:"File Content",description:"Content of the file",required:!0})},outputSchema:Ex,async run({auth:e,propsValue:r}){if(ws(e))throw new Error("Create Gist is not available with GitHub App authentication. The GitHub Gists API requires a user OAuth token \u2014 App installation tokens cannot create gists. Use an OAuth connection instead.");let{description:i,public:a,filename:u,content:c}=r,p={description:i,public:a,files:{[u]:{content:c}}};return await $({auth:e,method:"POST",resourceUri:"/gists",body:p})}});var kP=T({auth:P,name:"find_branch",displayName:"Find Branch",description:"Finds a branch by name and returns its details.",audience:"both",aiMetadata:{description:"Looks up a branch in a repository by its exact name and reports whether it exists along with its details. Use to check for a branch or fetch its tip before acting on it; a missing branch is reported as not-found rather than raising an error. Read-only and idempotent.",idempotent:!0},props:{repository:ee.repositoryDropdown,branch:h.ShortText({displayName:"Branch Name",required:!0})},outputSchema:Sx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u=r.branch;try{return{found:!0,result:(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${u}`})).body}}catch(c){if(c.response.status===404)return{found:!1,result:{}};throw c}}});var OP=T({auth:P,name:"find_issue",displayName:"Find Issue",description:"Finds an issue based title.",audience:"both",aiMetadata:{description:"Searches a repository for an issue whose title matches the given text, filtered by state (open, closed, or all), and returns the top match plus whether any was found. Use to locate an issue by title when you do not have its number. Read-only and idempotent.",idempotent:!0},props:{repository:ee.repositoryDropdown,title:h.ShortText({displayName:"Title",required:!0}),state:h.StaticDropdown({displayName:"State",description:"Filter issues by their state.",required:!0,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}})},outputSchema:Ax,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,{state:u,title:c}=r,p={};r.state&&(p.state=r.state);let m=`repo:${i}/${a} is:issue in:title`;c&&(m+=` "${c}"`),u&&u!=="all"&&(m+=` state:${u}`);let v=await $({auth:e,method:"GET",resourceUri:"/search/issues",query:{q:m,per_page:1}});return{found:v.body.total_count>0,result:v.body.items}}});var NP=T({auth:P,name:"find_user",displayName:"Find User",description:"Finds a user by their login name.",audience:"both",aiMetadata:{description:"Looks up a GitHub user by their login (username) and reports whether they exist along with their public profile. Use to verify a username or fetch a user profile; an unknown username is reported as not-found rather than raising an error. Read-only and idempotent.",idempotent:!0},props:{username:h.ShortText({displayName:"Username",description:"The GitHub username (login) to look up.",required:!0})},outputSchema:Rx,async run({auth:e,propsValue:r}){let{username:i}=r;try{return{found:!0,result:(await $({auth:e,method:"GET",resourceUri:`/users/${i}`})).body}}catch(a){if(a.response.status===404)return{found:!1,result:{}};throw a}}});var zP=T({auth:P,name:"create_issue_ai",displayName:"Create Issue (Agent)",description:"Opens a new issue in a GitHub repository.",audience:"ai",aiMetadata:{description:"Opens a new issue in a GitHub repository (POST /repos/{owner}/{repo}/issues) with a title and optional body, labels, and assignees. Resolve owner/repo via List My Repositories or Search Repositories. Not idempotent: each call creates a separate issue even with identical input.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),title:h.ShortText({displayName:"Title",description:"The title of the issue.",required:!0}),body:h.LongText({displayName:"Body",description:"The body/description of the issue.",required:!1}),labels:h.Array({displayName:"Labels",description:"Label names to attach. Resolve via List Repository Labels.",required:!1}),assignees:h.Array({displayName:"Assignees",description:"User logins to assign. Resolve via List Assignees.",required:!1})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,title:u,body:c,labels:p,assignees:m}=r,v={title:u};c!==void 0&&(v.body=c),p&&p.length>0&&(v.labels=p),m&&m.length>0&&(v.assignees=m);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues`,body:v})).body}catch(_){let A=_?.response?.status;throw A===404?new Error(`Repository ${i}/${a} not found, or you lack access.`):A===403?new Error("Permission denied creating the issue (check repo write access / token scope)."):A===410?new Error("Issues are disabled for this repository."):_}}});var CP=T({auth:P,name:"get_issue_ai",displayName:"Get Issue (Agent)",description:"Fetches the full details of a single issue by number.",audience:"ai",aiMetadata:{description:"Fetches a single issue (GET /repos/{owner}/{repo}/issues/{issue_number}) by its number, returning its current state, title, body, labels, and assignees. Works on pull request numbers too (issues and PRs share the number space). Resolve issue numbers via List Repository Issues or Search Issues and Pull Requests. Read-only and idempotent.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue (or pull request) number. Resolve via List Repository Issues or Search Issues and Pull Requests.",required:!0})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues/${u}`})).body}catch(c){let p=c?.response?.status;throw p===404?new Error(`Issue #${u} not found in ${i}/${a}.`):p===403?new Error("Permission denied reading the issue."):c}}});var H=h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories, Search Repositories, or Get Authenticated User.",required:!0}),G=h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0});function C(e,r){let i=e?.response?.status;return i===404?new Error(`${r} not found, or you lack access.`):i===403?new Error(`Permission denied (status 403) \u2014 check write permission / token scope for ${r}.`):i===429?new Error("GitHub rate limit hit (status 429). Retry later."):i===422?new Error(`Unprocessable request (status 422) for ${r}: ${e?.response?.body?.message??"validation failed"}.`):e instanceof Error?e:new Error(String(e))}o(C,"githubError");var DP=T({auth:P,name:"list_repository_issues",displayName:"List Repository Issues (Agent)",description:"Lists issues in a repository with optional filters.",audience:"ai",aiMetadata:{description:"Lists issues in a repository (GET /repos/{owner}/{repo}/issues) with filters for state, labels, assignee, creator, milestone, since, and sort. NOTE: GitHub REST returns pull requests as issues too \u2014 items with a non-null pull_request field are PRs; filter them out if you only want issues. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}}),labels:h.ShortText({displayName:"Labels",description:"Comma-separated list of label names to filter by.",required:!1}),assignee:h.ShortText({displayName:"Assignee",description:'Filter by assignee login (or "none" / "*").',required:!1}),creator:h.ShortText({displayName:"Creator",description:"Filter by the login of the issue creator.",required:!1}),milestone:h.ShortText({displayName:"Milestone",description:'Milestone number, "none", or "*".',required:!1}),since:h.ShortText({displayName:"Since",description:"Only issues updated at or after this ISO 8601 timestamp.",required:!1}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Comments",value:"comments"}]}}),direction:h.StaticDropdown({displayName:"Direction",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}})},outputSchema:Kx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.state&&(u.state=r.state),r.labels&&(u.labels=r.labels),r.assignee&&(u.assignee=r.assignee),r.creator&&(u.creator=r.creator),r.milestone&&(u.milestone=r.milestone),r.since&&(u.since=r.since),r.sort&&(u.sort=r.sort),r.direction&&(u.direction=r.direction);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var LP=T({auth:P,name:"update_issue_ai",displayName:"Update Issue (Agent)",description:"Edits an existing issue, including closing or reopening it.",audience:"ai",aiMetadata:{description:"Edits an existing issue (PATCH /repos/{owner}/{repo}/issues/{issue_number}), setting only the fields you provide \u2014 title, body, state (open/closed) with state_reason, milestone (set Clear Milestone to remove it), labels, or assignees. Use to modify, close, or reopen an issue (no separate close action). Labels and assignees here REPLACE the existing set; use Add Labels to Issue / Add Assignees to Issue to append. Idempotent: applying the same field values again leaves the issue in the same state.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue number to update. Resolve via List Repository Issues.",required:!0}),title:h.ShortText({displayName:"Title",required:!1}),body:h.LongText({displayName:"Body",required:!1}),state:h.StaticDropdown({displayName:"State",description:"The new state of the issue (open or closed).",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),state_reason:h.StaticDropdown({displayName:"State Reason",description:"The reason for the state change (only used if State is set).",required:!1,options:{options:[{label:"Completed",value:"completed"},{label:"Not Planned",value:"not_planned"},{label:"Reopened",value:"reopened"},{label:"Duplicate",value:"duplicate"}]}}),milestone:h.Number({displayName:"Milestone Number",description:"Milestone number to associate. Resolve via List Milestones. To remove the issue's milestone instead, set Clear Milestone.",required:!1}),clear_milestone:h.Checkbox({displayName:"Clear Milestone",description:"Set to true to remove the issue's current milestone. Overrides Milestone Number.",required:!1}),labels:h.Array({displayName:"Labels",description:"Replaces the full label set. Resolve names via List Repository Labels.",required:!1}),assignees:h.Array({displayName:"Assignees",description:"Replaces the full assignee set (logins). Resolve via List Assignees.",required:!1})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c={};r.title!==void 0&&(c.title=r.title),r.body!==void 0&&(c.body=r.body),r.state!==void 0&&(c.state=r.state),r.state_reason!==void 0&&(c.state_reason=r.state_reason),r.clear_milestone?c.milestone=null:r.milestone!==void 0&&(c.milestone=r.milestone),r.labels!==void 0&&(c.labels=r.labels),r.assignees!==void 0&&(c.assignees=r.assignees);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/issues/${u}`,body:c})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Issue #${u} not found in ${i}/${a}.`):m===403?new Error("Permission denied updating the issue."):p}}});var UP=T({auth:P,name:"create_issue_comment_ai",displayName:"Create Issue Comment (Agent)",description:"Posts a comment on an issue or pull request.",audience:"ai",aiMetadata:{description:"Posts a comment on an issue (POST /repos/{owner}/{repo}/issues/{issue_number}/comments). Pull requests share the issue number space, so this also adds a general PR comment (for an inline code-review comment use Create Pull Request Review Comment instead). Not idempotent: each call appends a new comment.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number to comment on. Resolve via List Repository Issues / List Pull Requests.",required:!0}),body:h.LongText({displayName:"Comment Body",description:"The comment text to add.",required:!0})},outputSchema:kx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u,body:c}=r;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/comments`,body:{body:c}})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Issue #${u} not found in ${i}/${a}.`):m===403?new Error("Permission denied commenting on the issue."):p}}});var MP=T({auth:P,name:"list_issue_comments",displayName:"List Issue Comments (Agent)",description:"Lists the comments on an issue or pull request.",audience:"ai",aiMetadata:{description:"Lists the comment thread on an issue (GET /repos/{owner}/{repo}/issues/{issue_number}/comments). Works on pull request numbers too (issues and PRs share the number space). Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0})},outputSchema:Vx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues/${u}/comments`});return{items:c,count:c.length}}catch(c){throw C(c,`Issue #${u} in ${i}/${a}`)}}});var qP=T({auth:P,name:"lock_issue_ai",displayName:"Lock Issue (Agent)",description:"Locks an issue or pull request conversation.",audience:"ai",aiMetadata:{description:"Locks an issue (PUT /repos/{owner}/{repo}/issues/{issue_number}/lock) so only collaborators can comment, optionally recording a lock reason (off-topic, too heated, resolved, or spam). Works on pull request numbers too. Use Unlock Issue to reverse. Idempotent: re-locking an already-locked issue leaves it locked.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number to lock. Resolve via List Repository Issues.",required:!0}),lock_reason:h.StaticDropdown({displayName:"Lock Reason",description:"The reason for locking the issue.",required:!1,options:{options:[{label:"Off-topic",value:"off-topic"},{label:"Too heated",value:"too heated"},{label:"Resolved",value:"resolved"},{label:"Spam",value:"spam"}]}})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u,lock_reason:c}=r,p={};c!==void 0&&(p.lock_reason=c);try{return{success:!0,status:(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/issues/${u}/lock`,body:p})).status,locked:!0}}catch(m){let v=m?.response?.status;throw v===404?new Error(`Issue #${u} not found in ${i}/${a}.`):v===403?new Error("Permission denied locking the issue."):m}}});var jP=T({auth:P,name:"unlock_issue_ai",displayName:"Unlock Issue (Agent)",description:"Removes the conversation lock from an issue or pull request.",audience:"ai",aiMetadata:{description:"Removes the conversation lock from an issue (DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock) so anyone can comment again. Works on pull request numbers too. Idempotent: unlocking an already-unlocked issue leaves it unlocked.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number to unlock. Resolve via List Repository Issues.",required:!0})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/issues/${u}/lock`})).status,locked:!1}}catch(c){let p=c?.response?.status;throw p===404?new Error(`Issue #${u} not found in ${i}/${a}.`):p===403?new Error("Permission denied unlocking the issue."):c}}});var BP=T({auth:P,name:"add_labels_to_issue_ai",displayName:"Add Labels to Issue (Agent)",description:"Adds labels to an issue without removing existing ones.",audience:"ai",aiMetadata:{description:"Adds one or more labels to an existing issue (POST /repos/{owner}/{repo}/issues/{issue_number}/labels), leaving any labels already on the issue in place (ADDITIVE). To replace the whole set use Set Issue Labels; to remove one use Remove Label from Issue. Works on pull request numbers too. Resolve label names via List Repository Labels. Idempotent in effect: re-adding a label already present does not duplicate it.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),labels:h.Array({displayName:"Labels",description:"Label names to add. Resolve via List Repository Labels.",required:!0})},outputSchema:ci,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.labels;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`,body:{labels:c}})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Issue #${u} not found in ${i}/${a}.`):m===403?new Error("Permission denied adding labels."):p}}});var FP=T({auth:P,name:"remove_label_from_issue",displayName:"Remove Label from Issue (Agent)",description:"Detaches a single label from an issue or pull request.",audience:"ai",aiMetadata:{description:"Removes one label by name from an issue (DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}). Use Add Labels to Issue to attach or Set Issue Labels to replace the whole set. Works on pull request numbers too. Resolve current labels via List Issue Labels. Idempotent: a label that is already absent ends up absent (404 if it was never present).",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),name:h.ShortText({displayName:"Label Name",description:"The label to remove. Resolve current labels via List Issue Labels.",required:!0})},outputSchema:ci,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u,name:c}=r;try{return(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/issues/${u}/labels/${encodeURIComponent(c)}`})).body}catch(p){throw C(p,`Label "${c}" on issue #${u} in ${i}/${a}`)}}});var HP=T({auth:P,name:"set_issue_labels",displayName:"Set Issue Labels (Agent)",description:"Replaces the entire label set on an issue or pull request.",audience:"ai",aiMetadata:{description:"Replaces ALL labels on an issue with the provided set (PUT /repos/{owner}/{repo}/issues/{issue_number}/labels). Differs from Add Labels to Issue (additive): any label not in the list is removed. Pass an empty array to clear all labels. Works on pull request numbers too. Resolve names via List Repository Labels. Idempotent: re-applying the same set converges to that exact set.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),labels:h.Array({displayName:"Labels",description:"The complete label set to apply (replaces existing). Empty clears all. Resolve names via List Repository Labels.",required:!0})},outputSchema:ci,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.labels;try{return(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`,body:{labels:c}})).body}catch(p){throw C(p,`Issue #${u} in ${i}/${a}`)}}});var GP=T({auth:P,name:"list_issue_labels",displayName:"List Issue Labels (Agent)",description:"Lists the labels currently on an issue or pull request.",audience:"ai",aiMetadata:{description:"Lists the labels currently attached to an issue (GET /repos/{owner}/{repo}/issues/{issue_number}/labels). Use this to resolve which label names to pass to Remove Label from Issue. Works on pull request numbers too. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0})},outputSchema:Os,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`});return{items:c,count:c.length}}catch(c){throw C(c,`Issue #${u} in ${i}/${a}`)}}});var ZP=T({auth:P,name:"add_assignees_to_issue",displayName:"Add Assignees to Issue (Agent)",description:"Assigns users to an issue or pull request.",audience:"ai",aiMetadata:{description:"Assigns up to 10 users to an issue (POST /repos/{owner}/{repo}/issues/{issue_number}/assignees), keeping existing assignees (ADDITIVE). Works on pull request numbers too. Resolve assignable logins via List Assignees. Idempotent: re-adding an existing assignee is a no-op. Note: logins that cannot be assigned are silently ignored by GitHub.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),assignees:h.Array({displayName:"Assignees",description:"User logins to assign (max 10). Resolve via List Assignees.",required:!0})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.assignees;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/assignees`,body:{assignees:c}})).body}catch(p){throw C(p,`Issue #${u} in ${i}/${a}`)}}});var VP=T({auth:P,name:"remove_assignees_from_issue",displayName:"Remove Assignees from Issue (Agent)",description:"Unassigns users from an issue or pull request.",audience:"ai",aiMetadata:{description:"Removes the given users from an issue (DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees). Works on pull request numbers too. Idempotent: removing a user who is not assigned ends in the same state. Get current assignees via Get Issue.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),assignees:h.Array({displayName:"Assignees",description:"User logins to unassign.",required:!0})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.assignees;try{return(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/issues/${u}/assignees`,body:{assignees:c}})).body}catch(p){throw C(p,`Issue #${u} in ${i}/${a}`)}}});var WP=T({auth:P,name:"list_assignees",displayName:"List Assignees (Agent)",description:"Lists users who can be assigned to issues in a repository.",audience:"ai",aiMetadata:{description:"Lists the users assignable to issues and pull requests in a repository (GET /repos/{owner}/{repo}/assignees). Use to resolve valid logins for Add Assignees to Issue. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Bx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/assignees`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var KP=T({auth:P,name:"list_repository_labels",displayName:"List Repository Labels (Agent)",description:"Lists a repository's label vocabulary.",audience:"ai",aiMetadata:{description:"Lists all labels defined in a repository (GET /repos/{owner}/{repo}/labels). Use to resolve valid label names for Add Labels to Issue, Set Issue Labels, and Remove Label from Issue. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Os,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/labels`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var JP=T({auth:P,name:"create_label",displayName:"Create Label (Agent)",description:"Defines a new label in a repository.",audience:"ai",aiMetadata:{description:"Creates a new label in a repository (POST /repos/{owner}/{repo}/labels) with a name, hex color, and optional description. To change an existing label use Update Label. Not idempotent: a second call with the same name returns 422 (already exists).",idempotent:!1},props:{owner:H,repo:G,name:h.ShortText({displayName:"Name",description:"The label name.",required:!0}),color:h.ShortText({displayName:"Color",description:'Six-character hex color code without the leading "#" (e.g. "f29513").',required:!1}),description:h.ShortText({displayName:"Description",description:"Short description of the label.",required:!1})},outputSchema:Is,async run({auth:e,propsValue:r}){let{owner:i,repo:a,name:u,color:c,description:p}=r,m={name:u};c!==void 0&&(m.color=c),p!==void 0&&(m.description=p);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/labels`,body:m})).body}catch(v){throw C(v,`Label "${u}" in ${i}/${a}`)}}});var XP=T({auth:P,name:"update_label",displayName:"Update Label (Agent)",description:"Renames or recolors an existing repository label.",audience:"ai",aiMetadata:{description:"Updates an existing repository label by its current name (PATCH /repos/{owner}/{repo}/labels/{name}) \u2014 set a new name, color, or description. Resolve label names via List Repository Labels. Idempotent: applying the same values again leaves the label in the same state.",idempotent:!0},props:{owner:H,repo:G,name:h.ShortText({displayName:"Current Name",description:"The current label name to update. Resolve via List Repository Labels.",required:!0}),new_name:h.ShortText({displayName:"New Name",description:"New label name (leave empty to keep the current name).",required:!1}),color:h.ShortText({displayName:"Color",description:'Six-character hex color code without the leading "#" (e.g. "f29513").',required:!1}),description:h.ShortText({displayName:"Description",required:!1})},outputSchema:Is,async run({auth:e,propsValue:r}){let{owner:i,repo:a,name:u,new_name:c,color:p,description:m}=r,v={};c!==void 0&&(v.new_name=c),p!==void 0&&(v.color=p),m!==void 0&&(v.description=m);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/labels/${encodeURIComponent(u)}`,body:v})).body}catch(_){throw C(_,`Label "${u}" in ${i}/${a}`)}}});var YP=T({auth:P,name:"create_pull_request",displayName:"Create Pull Request (Agent)",description:"Opens a pull request between two branches.",audience:"ai",aiMetadata:{description:'Opens a pull request (POST /repos/{owner}/{repo}/pulls) from the head branch into the base branch, with a title and optional body. Set draft=true for a draft PR. For cross-fork PRs prefix head with the fork owner ("owner:branch"). Resolve branch names via List Branches. Not idempotent: each call opens a new PR.',idempotent:!1},props:{owner:H,repo:G,title:h.ShortText({displayName:"Title",required:!0}),head:h.ShortText({displayName:"Head Branch",description:'The branch with your changes (e.g. "feature/x"). For a fork use "fork-owner:branch".',required:!0}),base:h.ShortText({displayName:"Base Branch",description:'The branch to merge into (e.g. "main").',required:!0}),body:h.LongText({displayName:"Body",required:!1}),draft:h.Checkbox({displayName:"Draft",description:"Open as a draft pull request.",required:!1}),maintainer_can_modify:h.Checkbox({displayName:"Maintainer Can Modify",description:"Allow maintainers to edit the head branch.",required:!1})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,title:u,head:c,base:p,body:m,draft:v,maintainer_can_modify:_}=r,A={title:u,head:c,base:p};m!==void 0&&(A.body=m),v!==void 0&&(A.draft=v),_!==void 0&&(A.maintainer_can_modify=_);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls`,body:A})).body}catch(k){throw C(k,`Repository ${i}/${a}`)}}});var QP=T({auth:P,name:"get_pull_request",displayName:"Get Pull Request (Agent)",description:"Fetches a single pull request by number.",audience:"ai",aiMetadata:{description:"Fetches a single pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}), including its mergeable state and head/base commit SHAs (head.sha feeds Create Pull Request Review Comment). Resolve PR numbers via List Pull Requests. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}`})).body}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var ew=T({auth:P,name:"list_pull_requests",displayName:"List Pull Requests (Agent)",description:"Lists pull requests in a repository with optional filters.",audience:"ai",aiMetadata:{description:"Lists pull requests in a repository (GET /repos/{owner}/{repo}/pulls) filtered by state, head (user:branch), base branch, and sort. Returns all pages. For cross-repo or qualifier-based search use Search Issues and Pull Requests. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}}),head:h.ShortText({displayName:"Head",description:'Filter by head branch in the form "user:branch".',required:!1}),base:h.ShortText({displayName:"Base",description:"Filter by base branch name.",required:!1}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Popularity",value:"popularity"},{label:"Long Running",value:"long-running"}]}}),direction:h.StaticDropdown({displayName:"Direction",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}})},outputSchema:Jx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.state&&(u.state=r.state),r.head&&(u.head=r.head),r.base&&(u.base=r.base),r.sort&&(u.sort=r.sort),r.direction&&(u.direction=r.direction);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var tw=T({auth:P,name:"update_pull_request",displayName:"Update Pull Request (Agent)",description:"Edits a pull request, including closing or reopening it.",audience:"ai",aiMetadata:{description:"Edits a pull request (PATCH /repos/{owner}/{repo}/pulls/{pull_number}), setting only the fields you provide \u2014 title, body, state (open/closed), or base branch. Use to modify, close, or reopen a PR (no separate close action). Idempotent: applying the same values again leaves the PR in the same state.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),title:h.ShortText({displayName:"Title",required:!1}),body:h.LongText({displayName:"Body",required:!1}),state:h.StaticDropdown({displayName:"State",description:"Open or close the pull request.",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),base:h.ShortText({displayName:"Base Branch",description:"Change the base branch the PR targets.",required:!1})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r,c={};r.title!==void 0&&(c.title=r.title),r.body!==void 0&&(c.body=r.body),r.state!==void 0&&(c.state=r.state),r.base!==void 0&&(c.base=r.base);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/pulls/${u}`,body:c})).body}catch(p){throw C(p,`Pull request #${u} in ${i}/${a}`)}}});var rw=T({auth:P,name:"merge_pull_request",displayName:"Merge Pull Request (Agent)",description:"Merges an open pull request into its base branch.",audience:"ai",aiMetadata:{description:"Merges an open pull request into its base branch (PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge) using merge, squash, or rebase. DESTRUCTIVE and irreversible \u2014 it writes commits to the base branch. Optionally pin to a head sha so it only merges if the PR has not changed. Not idempotent: re-merging an already-merged PR returns 405.",idempotent:!1},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),merge_method:h.StaticDropdown({displayName:"Merge Method",required:!1,options:{options:[{label:"Merge",value:"merge"},{label:"Squash",value:"squash"},{label:"Rebase",value:"rebase"}]}}),commit_title:h.ShortText({displayName:"Commit Title",required:!1}),commit_message:h.LongText({displayName:"Commit Message",required:!1}),sha:h.ShortText({displayName:"Head SHA",description:"If set, the merge only proceeds when the PR head still matches this SHA (get via Get Pull Request).",required:!1})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u,merge_method:c,commit_title:p,commit_message:m,sha:v}=r,_={};c!==void 0&&(_.merge_method=c),p!==void 0&&(_.commit_title=p),m!==void 0&&(_.commit_message=m),v!==void 0&&(_.sha=v);try{return(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/pulls/${u}/merge`,body:_})).body}catch(A){let k=A?.response?.status;throw k===405?new Error(`Pull request #${u} is not mergeable (already merged, or merge blocked).`):k===409?new Error("Head SHA mismatch \u2014 the PR changed since you read the sha."):C(A,`Pull request #${u} in ${i}/${a}`)}}});var nw=T({auth:P,name:"list_pull_request_files",displayName:"List Pull Request Files (Agent)",description:"Lists the files changed in a pull request.",audience:"ai",aiMetadata:{description:"Lists the files changed in a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/files), with each file's status, additions/deletions, and patch. Use to find file paths for Create Pull Request Review Comment. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Xx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/files`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var iw=T({auth:P,name:"list_pull_request_commits",displayName:"List Pull Request Commits (Agent)",description:"Lists the commits in a pull request.",audience:"ai",aiMetadata:{description:"Lists the commits contained in a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/commits). Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:ks,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/commits`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var ow=T({auth:P,name:"create_pull_request_review",displayName:"Create Pull Request Review (Agent)",description:"Submits a review on a pull request.",audience:"ai",aiMetadata:{description:"Submits a review on a pull request (POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews) with an event of APPROVE, REQUEST_CHANGES, or COMMENT and an optional summary body. Omit the event to create a PENDING review. Optional inline comments array each needs path + position/line. For a single inline comment use Create Pull Request Review Comment instead. Not idempotent: each call adds a new review.",idempotent:!1},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),event:h.StaticDropdown({displayName:"Event",description:"The review action. Omit to leave the review pending.",required:!1,options:{options:[{label:"Approve",value:"APPROVE"},{label:"Request Changes",value:"REQUEST_CHANGES"},{label:"Comment",value:"COMMENT"}]}}),body:h.LongText({displayName:"Body",description:"The review summary text (required for REQUEST_CHANGES/COMMENT).",required:!1}),commit_id:h.ShortText({displayName:"Commit SHA",description:"The SHA the review applies to (defaults to the latest). Get via Get Pull Request.",required:!1}),comments:h.Json({displayName:"Inline Comments",description:'Optional array of inline comments, e.g. [{"path":"file.ts","position":5,"body":"..."}].',required:!1})},outputSchema:Ox,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u,event:c,body:p,commit_id:m,comments:v}=r,_={};c!==void 0&&(_.event=c),p!==void 0&&(_.body=p),m!==void 0&&(_.commit_id=m),v!==void 0&&(_.comments=v);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls/${u}/reviews`,body:_})).body}catch(A){throw C(A,`Pull request #${u} in ${i}/${a}`)}}});var aw=T({auth:P,name:"request_pull_request_reviewers",displayName:"Request Pull Request Reviewers (Agent)",description:"Requests reviews from users or teams on a pull request.",audience:"ai",aiMetadata:{description:"Requests reviews on a pull request (POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers) from user logins and/or team slugs. Provide at least one of reviewers or team_reviewers. Resolve logins via List Collaborators or Search Users. Idempotent: re-requesting an already-requested reviewer leaves the request in place.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),reviewers:h.Array({displayName:"Reviewers",description:"User logins to request a review from.",required:!1}),team_reviewers:h.Array({displayName:"Team Reviewers",description:"Team slugs to request a review from.",required:!1})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r,c={},p=r.reviewers,m=r.team_reviewers;p&&p.length>0&&(c.reviewers=p),m&&m.length>0&&(c.team_reviewers=m);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls/${u}/requested_reviewers`,body:c})).body}catch(v){throw C(v,`Pull request #${u} in ${i}/${a}`)}}});var sw=T({auth:P,name:"create_pull_request_review_comment_ai",displayName:"Create Pull Request Review Comment (Agent)",description:"Posts an inline review comment on a pull request.",audience:"ai",aiMetadata:{description:"Posts an inline review comment on a pull request (POST /repos/{owner}/{repo}/pulls/{pull_number}/comments), anchored to a commit SHA, file path, and diff position. Use to comment on a specific line of changed code (for a general PR comment use Create Issue Comment instead). Get commit_id/path via List Pull Request Files or Get Pull Request. Not idempotent: each call adds a new review comment.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),commit_id:h.ShortText({displayName:"Commit SHA",description:"The SHA of the commit to comment on. Get via Get Pull Request (head.sha) or List Pull Request Commits.",required:!0}),path:h.ShortText({displayName:"File Path",description:"The relative path of the file to comment on. Get via List Pull Request Files.",required:!0}),body:h.LongText({displayName:"Comment Body",description:"The content of the review comment.",required:!0}),position:h.Number({displayName:"Position",description:"The line index in the diff (counting from the first @@ hunk header) where the comment is placed.",required:!0})},outputSchema:Nx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u,commit_id:c,path:p,body:m,position:v}=r;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls/${u}/comments`,body:{commit_id:c,path:p,body:m,position:v}})).body}catch(_){let A=_?.response?.status;throw A===404?new Error(`Pull request #${u} not found in ${i}/${a}.`):A===422?new Error("Invalid review comment (check commit_id, path, and position match the PR diff)."):A===403?new Error("Permission denied creating the review comment."):_}}});var uw=T({auth:P,name:"list_pull_request_review_comments",displayName:"List Pull Request Review Comments (Agent)",description:"Lists inline review comments on a pull request.",audience:"ai",aiMetadata:{description:"Lists the inline (code-anchored) review comments on a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/comments). For general PR comments use List Issue Comments; for review summaries use List Pull Request Reviews. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Yx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/comments`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var cw=T({auth:P,name:"list_pull_request_reviews",displayName:"List Pull Request Reviews (Agent)",description:"Lists the reviews submitted on a pull request.",audience:"ai",aiMetadata:{description:"Lists the reviews on a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews), each with its state (APPROVED, CHANGES_REQUESTED, COMMENTED), body, and reviewer. For the inline code comments use List Pull Request Review Comments. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Qx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/reviews`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var lw=T({auth:P,name:"get_repository",displayName:"Get Repository (Agent)",description:"Fetches metadata for a single repository.",audience:"ai",aiMetadata:{description:"Fetches a single repository (GET /repos/{owner}/{repo}) including its default_branch, visibility, and your permissions. Use to discover the default branch before file or branch operations. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Xr,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}`})).body}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var pw=T({auth:P,name:"list_my_repositories",displayName:"List My Repositories (Agent)",description:"Lists repositories the connected account can access.",audience:"ai",aiMetadata:{description:"Lists the repositories the connected user can access (GET /user/repos) \u2014 the top-level resolver for owner/repo used by most other GitHub atomics. Filter by visibility, affiliation, and sort. Returns all pages. Under GitHub App auth the token is a bot, so this reflects the installation, not a user. Read-only and idempotent.",idempotent:!0},props:{visibility:h.StaticDropdown({displayName:"Visibility",required:!1,options:{options:[{label:"All",value:"all"},{label:"Public",value:"public"},{label:"Private",value:"private"}]}}),affiliation:h.ShortText({displayName:"Affiliation",description:"Comma-separated: owner, collaborator, organization_member.",required:!1}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Pushed",value:"pushed"},{label:"Full Name",value:"full_name"}]}})},outputSchema:Qr,async run({auth:e,propsValue:r}){let i={};r.visibility&&(i.visibility=r.visibility),r.affiliation&&(i.affiliation=r.affiliation),r.sort&&(i.sort=r.sort);try{let a=await oe({auth:e,method:"GET",resourceUri:"/user/repos",query:i});return{items:a,count:a.length}}catch(a){throw C(a,"The authenticated user")}}});var dw=T({auth:P,name:"list_user_repositories",displayName:"List User Repositories (Agent)",description:"Lists a specific user's public repositories.",audience:"ai",aiMetadata:{description:"Lists the public repositories owned by a specific user (GET /users/{username}/repos). For the connected account's own repos (including private) use List My Repositories. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{username:h.ShortText({displayName:"Username",description:"The user login whose repositories to list.",required:!0})},outputSchema:Qr,async run({auth:e,propsValue:r}){let{username:i}=r;try{let a=await oe({auth:e,method:"GET",resourceUri:`/users/${i}/repos`});return{items:a,count:a.length}}catch(a){throw C(a,`User "${i}"`)}}});var mw=T({auth:P,name:"list_organization_repositories",displayName:"List Organization Repositories (Agent)",description:"Lists the repositories in an organization.",audience:"ai",aiMetadata:{description:"Lists the repositories in an organization (GET /orgs/{org}/repos). Returns all pages. Read-only and idempotent.",idempotent:!0},props:{org:h.ShortText({displayName:"Organization",description:"The organization login.",required:!0})},outputSchema:Qr,async run({auth:e,propsValue:r}){let{org:i}=r;try{let a=await oe({auth:e,method:"GET",resourceUri:`/orgs/${i}/repos`});return{items:a,count:a.length}}catch(a){throw C(a,`Organization "${i}"`)}}});var fw=T({auth:P,name:"create_repository",displayName:"Create Repository (Agent)",description:"Creates a new repository for the authenticated user.",audience:"ai",aiMetadata:{description:"Creates a new repository under the connected user account (POST /user/repos). Set private and auto_init (adds an initial README) as needed. For an org-owned repo use Create Organization Repository. Not idempotent: a second call with the same name returns 422 (name already exists).",idempotent:!1},props:{name:h.ShortText({displayName:"Name",description:"The repository name.",required:!0}),description:h.ShortText({displayName:"Description",required:!1}),private:h.Checkbox({displayName:"Private",description:"Create as a private repository.",required:!1}),auto_init:h.Checkbox({displayName:"Auto Init",description:"Initialize with an empty README so the repo has a default branch.",required:!1})},outputSchema:Xr,async run({auth:e,propsValue:r}){let{name:i,description:a,auto_init:u}=r,c={name:i};a!==void 0&&(c.description=a),r.private!==void 0&&(c.private=r.private),u!==void 0&&(c.auto_init=u);try{return(await $({auth:e,method:"POST",resourceUri:"/user/repos",body:c})).body}catch(p){throw C(p,`Repository "${i}"`)}}});var hw=T({auth:P,name:"create_organization_repository",displayName:"Create Organization Repository (Agent)",description:"Creates a new repository inside an organization.",audience:"ai",aiMetadata:{description:"Creates a new repository owned by an organization (POST /orgs/{org}/repos). Requires organization write permission. Not idempotent: a second call with the same name returns 422 (name already exists).",idempotent:!1},props:{org:h.ShortText({displayName:"Organization",description:"The organization login that will own the repository.",required:!0}),name:h.ShortText({displayName:"Name",description:"The repository name.",required:!0}),description:h.ShortText({displayName:"Description",required:!1}),private:h.Checkbox({displayName:"Private",description:"Create as a private repository.",required:!1})},outputSchema:Xr,async run({auth:e,propsValue:r}){let{org:i,name:a,description:u}=r,c={name:a};u!==void 0&&(c.description=u),r.private!==void 0&&(c.private=r.private);try{return(await $({auth:e,method:"POST",resourceUri:`/orgs/${i}/repos`,body:c})).body}catch(p){throw C(p,`Organization "${i}"`)}}});var gw=T({auth:P,name:"update_repository",displayName:"Update Repository (Agent)",description:"Updates settings on a repository.",audience:"ai",aiMetadata:{description:"Updates a repository (PATCH /repos/{owner}/{repo}), setting only the fields you provide \u2014 name, description, private, default_branch, has_issues, or archived. Idempotent: applying the same values again leaves the repo in the same state. Archiving is reversible only via the GitHub UI/API by un-setting archived.",idempotent:!0},props:{owner:H,repo:G,name:h.ShortText({displayName:"Name",required:!1}),description:h.ShortText({displayName:"Description",required:!1}),private:h.Checkbox({displayName:"Private",required:!1}),default_branch:h.ShortText({displayName:"Default Branch",description:"Resolve via List Branches.",required:!1}),has_issues:h.Checkbox({displayName:"Has Issues",required:!1}),archived:h.Checkbox({displayName:"Archived",description:"Set true to archive the repository (read-only state).",required:!1})},outputSchema:Xr,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.name!==void 0&&(u.name=r.name),r.description!==void 0&&(u.description=r.description),r.private!==void 0&&(u.private=r.private),r.default_branch!==void 0&&(u.default_branch=r.default_branch),r.has_issues!==void 0&&(u.has_issues=r.has_issues),r.archived!==void 0&&(u.archived=r.archived);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}`,body:u})).body}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var yw=T({auth:P,name:"list_branches",displayName:"List Branches (Agent)",description:"Lists the branches in a repository.",audience:"ai",aiMetadata:{description:"Lists the branches in a repository (GET /repos/{owner}/{repo}/branches), each with its tip commit and protection flag. Use to resolve branch names for Create Branch, Create Pull Request, and file operations. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Hx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var bw=T({auth:P,name:"get_branch",displayName:"Get Branch (Agent)",description:"Fetches a single branch including its tip commit.",audience:"ai",aiMetadata:{description:"Fetches a single branch (GET /repos/{owner}/{repo}/branches/{branch}), including its tip commit SHA and protection settings. Use to read the head SHA before creating a branch or comparing. Resolve branch names via List Branches. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,branch:h.ShortText({displayName:"Branch",description:"The branch name. Resolve via List Branches.",required:!0})},outputSchema:Cx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,branch:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${u}`})).body}catch(c){throw C(c,`Branch "${u}" in ${i}/${a}`)}}});var vw=T({auth:P,name:"list_commits",displayName:"List Commits (Agent)",description:"Lists commits in a repository with optional filters.",audience:"ai",aiMetadata:{description:"Lists commits in a repository (GET /repos/{owner}/{repo}/commits) filtered by sha (branch or ref to start from), path, author, and since/until ISO 8601 timestamps. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,sha:h.ShortText({displayName:"SHA or Branch",description:"Branch name or commit SHA to start listing from.",required:!1}),path:h.ShortText({displayName:"Path",description:"Only commits touching this file path.",required:!1}),author:h.ShortText({displayName:"Author",description:"Filter by author login or email.",required:!1}),since:h.ShortText({displayName:"Since",description:"ISO 8601 timestamp lower bound.",required:!1}),until:h.ShortText({displayName:"Until",description:"ISO 8601 timestamp upper bound.",required:!1})},outputSchema:ks,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.sha&&(u.sha=r.sha),r.path&&(u.path=r.path),r.author&&(u.author=r.author),r.since&&(u.since=r.since),r.until&&(u.until=r.until);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/commits`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var _w=T({auth:P,name:"get_commit",displayName:"Get Commit (Agent)",description:"Fetches a single commit including its file changes.",audience:"ai",aiMetadata:{description:"Fetches a single commit (GET /repos/{owner}/{repo}/commits/{ref}) by SHA, branch, or tag, including its files, stats, and parents. Resolve refs via List Commits or List Branches. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,ref:h.ShortText({displayName:"Ref",description:"Commit SHA, branch name, or tag. Resolve via List Commits.",required:!0})},outputSchema:zx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,ref:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/commits/${u}`})).body}catch(c){throw C(c,`Commit "${u}" in ${i}/${a}`)}}});var xw=T({auth:P,name:"compare_commits",displayName:"Compare Commits (Agent)",description:"Compares two commits, branches, or tags.",audience:"ai",aiMetadata:{description:"Compares two refs (GET /repos/{owner}/{repo}/compare/{base}...{head}) and returns how far ahead/behind head is plus the changed files. Base and head can each be a branch, tag, or commit SHA. Resolve refs via List Branches or List Commits. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,base:h.ShortText({displayName:"Base",description:"The base ref (branch, tag, or SHA).",required:!0}),head:h.ShortText({displayName:"Head",description:"The head ref to compare against the base.",required:!0})},outputSchema:qx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,base:u,head:c}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/compare/${u}...${c}`})).body}catch(p){throw C(p,`Comparison ${u}...${c} in ${i}/${a}`)}}});var Pw=T({auth:P,name:"list_contributors",displayName:"List Contributors (Agent)",description:"Lists the contributors to a repository.",audience:"ai",aiMetadata:{description:"Lists the contributors to a repository (GET /repos/{owner}/{repo}/contributors) with each contributor's commit count. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Gx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/contributors`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var ww=T({auth:P,name:"list_languages",displayName:"List Languages (Agent)",description:"Returns the language byte-count map for a repository.",audience:"ai",aiMetadata:{description:"Returns the languages detected in a repository (GET /repos/{owner}/{repo}/languages) as a map of language name to byte count. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:jx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/languages`})).body}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Aw=T({auth:P,name:"list_tags",displayName:"List Tags (Agent)",description:"Lists the git tags in a repository.",audience:"ai",aiMetadata:{description:"Lists the git tags in a repository (GET /repos/{owner}/{repo}/tags), each with the commit it points at. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:tP,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/tags`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Tw=T({auth:P,name:"get_file_content",displayName:"Get File Content (Agent)",description:"Reads a file (or directory listing) from a repository.",audience:"ai",aiMetadata:{description:'Reads repository contents at a path (GET /repos/{owner}/{repo}/contents/{path}). For a file it returns base64 content plus the blob "sha" \u2014 that sha is REQUIRED to update an existing file (Create or Update File) or to delete it (Delete File). For a directory path it returns the listing. Optionally pin to a ref (branch/tag/SHA). Read-only and idempotent.',idempotent:!0},props:{owner:H,repo:G,path:h.ShortText({displayName:"Path",description:'File or directory path within the repo (e.g. "src/index.ts").',required:!0}),ref:h.ShortText({displayName:"Ref",description:"Optional branch, tag, or commit SHA (defaults to the default branch).",required:!1})},outputSchema:Lx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,path:u,ref:c}=r,p={};c&&(p.ref=c);try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/contents/${u.split("/").map(encodeURIComponent).join("/")}`,query:p})).body}catch(m){throw C(m,`Path "${u}" in ${i}/${a}`)}}});var Sw=T({auth:P,name:"create_or_update_file",displayName:"Create or Update File (Agent)",description:"Creates or updates a single file via a commit.",audience:"ai",aiMetadata:{description:'Creates or updates a file (PUT /repos/{owner}/{repo}/contents/{path}) by committing base64 content with a commit message. To UPDATE an existing file you MUST pass its current blob "sha" (obtain it via Get File Content) \u2014 without the sha GitHub returns 422. To create a new file, omit the sha. Optionally target a branch (defaults to the default branch). Idempotent: writing the same content/sha converges to the same file state.',idempotent:!0},props:{owner:H,repo:G,path:h.ShortText({displayName:"Path",description:'File path within the repo (e.g. "docs/readme.md").',required:!0}),message:h.ShortText({displayName:"Commit Message",required:!0}),content:h.LongText({displayName:"Content (base64)",description:"The new file content, base64-encoded.",required:!0}),sha:h.ShortText({displayName:"Blob SHA",description:"REQUIRED when updating an existing file \u2014 its current blob sha from Get File Content. Omit to create a new file.",required:!1}),branch:h.ShortText({displayName:"Branch",description:"Branch to commit to (defaults to the default branch).",required:!1})},outputSchema:Rs,async run({auth:e,propsValue:r}){let{owner:i,repo:a,path:u,message:c,content:p,sha:m,branch:v}=r,_={message:c,content:p};m!==void 0&&(_.sha=m),v!==void 0&&(_.branch=v);try{return(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/contents/${u.split("/").map(encodeURIComponent).join("/")}`,body:_})).body}catch(A){throw A?.response?.status===422?new Error(`Update failed for "${u}" \u2014 when updating an existing file you must pass its current blob sha (get it from Get File Content).`):C(A,`Path "${u}" in ${i}/${a}`)}}});var Ew=T({auth:P,name:"delete_file",displayName:"Delete File (Agent)",description:"Deletes a file from a repository via a commit.",audience:"ai",aiMetadata:{description:`Deletes a file (DELETE /repos/{owner}/{repo}/contents/{path}) by committing the removal. COMPOSITE: you must first call Get File Content on the same path to obtain the file's current blob "sha" and pass it here \u2014 the API rejects a delete without the correct sha. Optionally target a branch (defaults to the default branch). Destructive. Not idempotent: re-deleting a removed file returns 404.`,idempotent:!1},props:{owner:H,repo:G,path:h.ShortText({displayName:"Path",description:'File path to delete (e.g. "docs/old.md").',required:!0}),message:h.ShortText({displayName:"Commit Message",required:!0}),sha:h.ShortText({displayName:"Blob SHA",description:"The file's current blob sha \u2014 obtain it via Get File Content first.",required:!0}),branch:h.ShortText({displayName:"Branch",description:"Branch to commit to (defaults to the default branch).",required:!1})},outputSchema:Rs,async run({auth:e,propsValue:r}){let{owner:i,repo:a,path:u,message:c,sha:p,branch:m}=r,v={message:c,sha:p};m!==void 0&&(v.branch=m);try{return(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/contents/${u.split("/").map(encodeURIComponent).join("/")}`,body:v})).body}catch(_){let A=_?.response?.status;throw A===409||A===422?new Error(`Delete failed for "${u}" \u2014 the blob sha is missing or stale. Re-read it via Get File Content.`):C(_,`Path "${u}" in ${i}/${a}`)}}});var Iw=T({auth:P,name:"get_repository_tree",displayName:"Get Repository Tree (Agent)",description:"Lists the full file tree at a given ref.",audience:"ai",aiMetadata:{description:'Returns the git tree at a tree SHA or branch name (GET /repos/{owner}/{repo}/git/trees/{tree_sha}). Set recursive=true for the full nested file inventory. Complements Get File Content (single path/dir). The tree_sha can be a branch name like "main". Read-only and idempotent.',idempotent:!0},props:{owner:H,repo:G,tree_sha:h.ShortText({displayName:"Tree SHA or Branch",description:'A tree SHA or branch name (e.g. "main").',required:!0}),recursive:h.Checkbox({displayName:"Recursive",description:"Return the full nested tree instead of just the top level.",required:!1})},outputSchema:Dx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,tree_sha:u,recursive:c}=r,p={};c&&(p.recursive="1");try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/git/trees/${u}`,query:p})).body}catch(m){throw C(m,`Tree "${u}" in ${i}/${a}`)}}});var $w=T({auth:P,name:"create_branch_ai",displayName:"Create Branch (Agent)",description:"Creates a new branch from the tip of a source branch.",audience:"ai",aiMetadata:{description:"Creates a new branch pointing at the tip of a source branch. It first reads the source branch tip (GET /repos/{owner}/{repo}/branches/{source}) then creates the ref (POST /repos/{owner}/{repo}/git/refs with ref=refs/heads/<new_branch_name>). Resolve branch names via List Branches. Not idempotent: a second call with the same branch name fails because the ref already exists.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),source_branch:h.ShortText({displayName:"Source Branch",description:'The branch whose tip the new branch starts from (e.g. "main"). Resolve via List Branches.',required:!0}),new_branch_name:h.ShortText({displayName:"New Branch Name",description:"The name for the new branch (e.g. 'feature/new-design').",required:!0})},outputSchema:$s,async run({auth:e,propsValue:r}){let{owner:i,repo:a,source_branch:u,new_branch_name:c}=r;try{let m=(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${u}`})).body.commit.sha;return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/git/refs`,body:{ref:`refs/heads/${c}`,sha:m}})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Source branch "${u}" or repository ${i}/${a} not found.`):m===422?new Error(`Branch "${c}" already exists (or the ref is invalid).`):m===403?new Error("Permission denied creating the branch."):p}}});var Rw=T({auth:P,name:"get_reference",displayName:"Get Reference (Agent)",description:"Resolves a git ref to its commit SHA.",audience:"ai",aiMetadata:{description:'Resolves a git reference (GET /repos/{owner}/{repo}/git/ref/{ref}) such as "heads/main" or "tags/v1.0.0" to its object SHA. Use to obtain a commit sha for creating a branch. The ref must NOT include the leading "refs/". Read-only and idempotent.',idempotent:!0},props:{owner:H,repo:G,ref:h.ShortText({displayName:"Ref",description:'The ref without the "refs/" prefix, e.g. "heads/main".',required:!0})},outputSchema:$s,async run({auth:e,propsValue:r}){let{owner:i,repo:a,ref:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/git/ref/${u}`})).body}catch(c){throw C(c,`Ref "${u}" in ${i}/${a}`)}}});var kw=T({auth:P,name:"delete_branch_ai",displayName:"Delete Branch (Agent)",description:"Deletes a branch from a repository.",audience:"ai",aiMetadata:{description:"Permanently deletes a branch ref (DELETE /repos/{owner}/{repo}/git/refs/heads/{branch}). Use to clean up a merged or stale branch. Resolve branch names via List Branches. Not idempotent: a repeat call on an already-deleted branch returns a not-found error.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),branch:h.ShortText({displayName:"Branch",description:'The name of the branch to delete (e.g. "feature/old"). Resolve via List Branches.',required:!0})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,branch:u}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/git/refs/heads/${u}`})).status,deleted:u}}catch(c){let p=c?.response?.status;throw p===404||p===422?new Error(`Branch "${u}" not found in ${i}/${a} (it may already be deleted).`):p===403?new Error("Permission denied deleting the branch."):c}}});var Ow=T({auth:P,name:"search_repositories",displayName:"Search Repositories (Agent)",description:"Searches public/accessible repositories with a query.",audience:"ai",aiMetadata:{description:'Searches repositories (GET /search/repositories?q=) using GitHub query qualifiers like "language:", "stars:", "user:", "org:". Use to resolve owner/repo from a description. Returns a search result (total_count + items) capped at 1000 matches; pass page/per_page to page through. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'Search query with optional qualifiers, e.g. "topic:cli language:go stars:>100".',required:!0}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Stars",value:"stars"},{label:"Forks",value:"forks"},{label:"Help Wanted Issues",value:"help-wanted-issues"},{label:"Updated",value:"updated"}]}}),order:h.StaticDropdown({displayName:"Order",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:iP,async run({auth:e,propsValue:r}){let i={q:r.q};r.sort&&(i.sort=r.sort),r.order&&(i.order=r.order),r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/repositories",query:i})).body}catch(a){throw C(a,"Repository search")}}});var Nw=T({auth:P,name:"search_issues_and_pull_requests",displayName:"Search Issues and Pull Requests (Agent)",description:"Searches issues and PRs across repositories with a query.",audience:"ai",aiMetadata:{description:'Searches issues and pull requests (GET /search/issues?q=) using qualifiers like "repo:owner/name", "is:issue", "is:pr", "state:open", "author:", "label:", "assignee:". The primary cross-repo issue/PR finder. Returns a search result (total_count + items) capped at 1000. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'Search query, e.g. "repo:octocat/Hello-World is:issue is:open label:bug".',required:!0}),sort:h.ShortText({displayName:"Sort",description:"Sort field (e.g. comments, created, updated, reactions).",required:!1}),order:h.StaticDropdown({displayName:"Order",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:nP,async run({auth:e,propsValue:r}){let i={q:r.q};r.sort&&(i.sort=r.sort),r.order&&(i.order=r.order),r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/issues",query:i})).body}catch(a){throw C(a,"Issue/PR search")}}});var zw=T({auth:P,name:"search_code",displayName:"Search Code (Agent)",description:"Searches file contents across repositories.",audience:"ai",aiMetadata:{description:'Searches code (GET /search/code?q=) using qualifiers like "in:file", "repo:owner/name", "language:", "path:", "filename:". The query must include at least one search term. Returns a search result (total_count + items) capped at 1000. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'Code search query, e.g. "addClass in:file language:js repo:jquery/jquery".',required:!0}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:rP,async run({auth:e,propsValue:r}){let i={q:r.q};r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/code",query:i})).body}catch(a){throw C(a,"Code search")}}});var Cw=T({auth:P,name:"search_users",displayName:"Search Users (Agent)",description:"Searches GitHub users and organizations.",audience:"ai",aiMetadata:{description:'Searches users and organizations (GET /search/users?q=) using qualifiers like "type:user", "type:org", "location:", "language:". Use to resolve a login from a name. Returns a search result (total_count + items) capped at 1000. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'User search query, e.g. "tom repos:>10 location:london".',required:!0}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:oP,async run({auth:e,propsValue:r}){let i={q:r.q};r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/users",query:i})).body}catch(a){throw C(a,"User search")}}});var Dw=T({auth:P,name:"get_authenticated_user",displayName:"Get Authenticated User (Agent)",description:"Returns the profile of the connected account.",audience:"ai",aiMetadata:{description:'Returns the profile of the connected account (GET /user) \u2014 the "who am I" call whose login feeds self-scoped operations. Under GitHub App auth this reflects the bot identity (e.g. "app-name[bot]"), not a human user. Read-only and idempotent.',idempotent:!0},props:{},outputSchema:Mx,async run({auth:e}){try{return(await $({auth:e,method:"GET",resourceUri:"/user"})).body}catch(r){throw C(r,"The authenticated user")}}});var Lw=T({auth:P,name:"get_user",displayName:"Get User (Agent)",description:"Fetches a user's public profile by login.",audience:"ai",aiMetadata:{description:"Fetches a user's public profile (GET /users/{username}) \u2014 name, bio, public repo/follower counts, type (User or Organization). Resolve logins via Search Users. Read-only and idempotent.",idempotent:!0},props:{username:h.ShortText({displayName:"Username",description:"The user or organization login.",required:!0})},outputSchema:Ux,async run({auth:e,propsValue:r}){let{username:i}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/users/${i}`})).body}catch(a){throw C(a,`User "${i}"`)}}});var Uw=T({auth:P,name:"list_organization_members",displayName:"List Organization Members (Agent)",description:"Lists the members of an organization.",audience:"ai",aiMetadata:{description:"Lists the members of an organization (GET /orgs/{org}/members). Visibility is gated: private members appear only with org-read access (OAuth has it via admin:org); under GitHub App auth the bot lacks user-org context and may see a limited or empty list. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{org:h.ShortText({displayName:"Organization",description:"The organization login.",required:!0})},outputSchema:Fx,async run({auth:e,propsValue:r}){let{org:i}=r;try{let a=await oe({auth:e,method:"GET",resourceUri:`/orgs/${i}/members`});return{items:a,count:a.length}}catch(a){throw C(a,`Organization "${i}"`)}}});var Mw=T({auth:P,name:"create_release",displayName:"Create Release (Agent)",description:"Creates a release for a tag.",audience:"ai",aiMetadata:{description:"Creates a release (POST /repos/{owner}/{repo}/releases) for a tag. If the tag does not exist it is created from target_commitish (a branch or SHA, defaults to the default branch). Set draft/prerelease as needed. Not idempotent: each call creates a new release (and 422s if a release for the tag already exists).",idempotent:!1},props:{owner:H,repo:G,tag_name:h.ShortText({displayName:"Tag Name",description:'The git tag for this release (e.g. "v1.2.0").',required:!0}),name:h.ShortText({displayName:"Release Name",required:!1}),body:h.LongText({displayName:"Body",description:"Release notes.",required:!1}),target_commitish:h.ShortText({displayName:"Target Commitish",description:"Branch or SHA the tag is created from if it does not exist.",required:!1}),draft:h.Checkbox({displayName:"Draft",required:!1}),prerelease:h.Checkbox({displayName:"Prerelease",required:!1})},outputSchema:ui,async run({auth:e,propsValue:r}){let{owner:i,repo:a,tag_name:u,name:c,body:p,target_commitish:m,draft:v,prerelease:_}=r,A={tag_name:u};c!==void 0&&(A.name=c),p!==void 0&&(A.body=p),m!==void 0&&(A.target_commitish=m),v!==void 0&&(A.draft=v),_!==void 0&&(A.prerelease=_);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/releases`,body:A})).body}catch(k){throw C(k,`Repository ${i}/${a}`)}}});var qw=T({auth:P,name:"list_releases",displayName:"List Releases (Agent)",description:"Lists the releases in a repository.",audience:"ai",aiMetadata:{description:"Lists the releases in a repository (GET /repos/{owner}/{repo}/releases), newest first, including drafts and prereleases. For just the latest published one use Get Latest Release. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:eP,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/releases`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var jw=T({auth:P,name:"get_release",displayName:"Get Release (Agent)",description:"Fetches a single release by its id.",audience:"ai",aiMetadata:{description:"Fetches a single release by its numeric id (GET /repos/{owner}/{repo}/releases/{release_id}). Resolve the id via List Releases. For the latest published release use Get Latest Release. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,release_id:h.Number({displayName:"Release ID",description:"The numeric release id. Resolve via List Releases.",required:!0})},outputSchema:ui,async run({auth:e,propsValue:r}){let{owner:i,repo:a,release_id:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/releases/${u}`})).body}catch(c){throw C(c,`Release ${u} in ${i}/${a}`)}}});var Bw=T({auth:P,name:"get_latest_release",displayName:"Get Latest Release (Agent)",description:"Fetches the latest published release.",audience:"ai",aiMetadata:{description:"Fetches the latest published release (GET /repos/{owner}/{repo}/releases/latest) \u2014 the most recent non-draft, non-prerelease release by date. Returns 404 if the repo has no published release. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:ui,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/releases/latest`})).body}catch(u){throw C(u,`Latest release in ${i}/${a}`)}}});var Fw=T({auth:P,name:"list_collaborators",displayName:"List Collaborators (Agent)",description:"Lists the collaborators on a repository.",audience:"ai",aiMetadata:{description:"Lists the collaborators on a repository (GET /repos/{owner}/{repo}/collaborators) with each one's permission level. Use to resolve logins for Request Pull Request Reviewers or Remove Collaborator. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Zx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/collaborators`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Hw=T({auth:P,name:"add_collaborator",displayName:"Add Collaborator (Agent)",description:"Invites a user as a repository collaborator.",audience:"ai",aiMetadata:{description:"Adds (or invites) a user as a collaborator on a repository (PUT /repos/{owner}/{repo}/collaborators/{username}) with a permission level (pull, triage, push, maintain, admin). GRANTS ACCESS \u2014 requires repo-admin. Idempotent: re-adding with the same permission converges (a pending invite is created if the user must accept). Resolve logins via Search Users.",idempotent:!0},props:{owner:H,repo:G,username:h.ShortText({displayName:"Username",description:"The user login to add. Resolve via Search Users.",required:!0}),permission:h.StaticDropdown({displayName:"Permission",required:!1,options:{options:[{label:"Pull (read)",value:"pull"},{label:"Triage",value:"triage"},{label:"Push (write)",value:"push"},{label:"Maintain",value:"maintain"},{label:"Admin",value:"admin"}]}})},outputSchema:aP,async run({auth:e,propsValue:r}){let{owner:i,repo:a,username:u,permission:c}=r,p={};c!==void 0&&(p.permission=c);try{let m=await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/collaborators/${u}`,body:p});return m.body??{success:!0,status:m.status}}catch(m){throw C(m,`User "${u}" on ${i}/${a}`)}}});var Gw=T({auth:P,name:"remove_collaborator",displayName:"Remove Collaborator (Agent)",description:"Revokes a user's collaborator access to a repository.",audience:"ai",aiMetadata:{description:"Removes a collaborator from a repository (DELETE /repos/{owner}/{repo}/collaborators/{username}). REVOKES ACCESS \u2014 requires repo-admin. Idempotent: removing a user who is not a collaborator ends in the same state. Resolve current collaborators via List Collaborators.",idempotent:!0},props:{owner:H,repo:G,username:h.ShortText({displayName:"Username",description:"The user login to remove. Resolve via List Collaborators.",required:!0})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,username:u}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/collaborators/${u}`})).status,removed:u}}catch(c){throw C(c,`User "${u}" on ${i}/${a}`)}}});var Zw=T({auth:P,name:"create_milestone",displayName:"Create Milestone (Agent)",description:"Creates a milestone in a repository.",audience:"ai",aiMetadata:{description:"Creates a milestone (POST /repos/{owner}/{repo}/milestones) with a title and optional description, state, and due_on date. Not idempotent: each call creates a new milestone even with an identical title.",idempotent:!1},props:{owner:H,repo:G,title:h.ShortText({displayName:"Title",required:!0}),description:h.LongText({displayName:"Description",required:!1}),state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),due_on:h.ShortText({displayName:"Due On",description:"ISO 8601 timestamp for the due date.",required:!1})},outputSchema:si,async run({auth:e,propsValue:r}){let{owner:i,repo:a,title:u,description:c,state:p,due_on:m}=r,v={title:u};c!==void 0&&(v.description=c),p!==void 0&&(v.state=p),m!==void 0&&(v.due_on=m);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/milestones`,body:v})).body}catch(_){throw C(_,`Repository ${i}/${a}`)}}});var Vw=T({auth:P,name:"list_milestones",displayName:"List Milestones (Agent)",description:"Lists the milestones in a repository.",audience:"ai",aiMetadata:{description:"Lists the milestones in a repository (GET /repos/{owner}/{repo}/milestones) filtered by state. Use to resolve a milestone number for Update Issue. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}})},outputSchema:Wx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.state&&(u.state=r.state);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/milestones`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var Ww=T({auth:P,name:"get_milestone",displayName:"Get Milestone (Agent)",description:"Fetches a single milestone by number.",audience:"ai",aiMetadata:{description:"Fetches a single milestone (GET /repos/{owner}/{repo}/milestones/{milestone_number}) including its open/closed issue counts. Resolve the number via List Milestones. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,milestone_number:h.Number({displayName:"Milestone Number",description:"The milestone number. Resolve via List Milestones.",required:!0})},outputSchema:si,async run({auth:e,propsValue:r}){let{owner:i,repo:a,milestone_number:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/milestones/${u}`})).body}catch(c){throw C(c,`Milestone ${u} in ${i}/${a}`)}}});var Kw=T({auth:P,name:"update_milestone",displayName:"Update Milestone (Agent)",description:"Updates a milestone, including closing or reopening it.",audience:"ai",aiMetadata:{description:"Updates a milestone (PATCH /repos/{owner}/{repo}/milestones/{milestone_number}), setting only the fields you provide \u2014 title, state (open/closed), description, or due_on. Resolve the number via List Milestones. Idempotent: applying the same values again leaves the milestone in the same state.",idempotent:!0},props:{owner:H,repo:G,milestone_number:h.Number({displayName:"Milestone Number",description:"The milestone number. Resolve via List Milestones.",required:!0}),title:h.ShortText({displayName:"Title",required:!1}),state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),description:h.LongText({displayName:"Description",required:!1}),due_on:h.ShortText({displayName:"Due On",description:"ISO 8601 timestamp for the due date.",required:!1})},outputSchema:si,async run({auth:e,propsValue:r}){let{owner:i,repo:a,milestone_number:u}=r,c={};r.title!==void 0&&(c.title=r.title),r.state!==void 0&&(c.state=r.state),r.description!==void 0&&(c.description=r.description),r.due_on!==void 0&&(c.due_on=r.due_on);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/milestones/${u}`,body:c})).body}catch(p){throw C(p,`Milestone ${u} in ${i}/${a}`)}}});var Jw=T({auth:P,name:"star_repository",displayName:"Star Repository (Agent)",description:"Stars a repository for the connected user.",audience:"ai",aiMetadata:{description:"Stars a repository for the connected user (PUT /user/starred/{owner}/{repo}). User-context \u2014 not available under GitHub App auth (a bot has no stars). Idempotent: re-starring an already-starred repo keeps it starred.",idempotent:!0},props:{owner:H,repo:G},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return{success:!0,status:(await $({auth:e,method:"PUT",resourceUri:`/user/starred/${i}/${a}`})).status,starred:!0}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Xw=T({auth:P,name:"unstar_repository",displayName:"Unstar Repository (Agent)",description:"Removes a star from a repository for the connected user.",audience:"ai",aiMetadata:{description:"Removes the connected user's star from a repository (DELETE /user/starred/{owner}/{repo}). User-context \u2014 not available under GitHub App auth. Idempotent: unstarring an already-unstarred repo leaves it unstarred.",idempotent:!0},props:{owner:H,repo:G},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/user/starred/${i}/${a}`})).status,starred:!1}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Yw=T({auth:P,name:"list_starred_repositories",displayName:"List Starred Repositories (Agent)",description:"Lists the repositories the connected user has starred.",audience:"ai",aiMetadata:{description:"Lists the repositories the connected user has starred (GET /user/starred). User-context \u2014 under GitHub App auth there is no user, so it is empty/unavailable. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{},outputSchema:Qr,async run({auth:e}){try{let r=await oe({auth:e,method:"GET",resourceUri:"/user/starred"});return{items:r,count:r.length}}catch(r){throw C(r,"The authenticated user")}}});var Qw=T({auth:P,name:"check_repository_starred",displayName:"Check Repository Starred (Agent)",description:"Checks whether the connected user has starred a repository.",audience:"ai",aiMetadata:{description:"Checks whether the connected user has starred a repository (GET /user/starred/{owner}/{repo}; 204 = starred, 404 = not starred). Returns { starred: boolean }. User-context \u2014 unavailable under GitHub App auth. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return await $({auth:e,method:"GET",resourceUri:`/user/starred/${i}/${a}`}),{starred:!0}}catch(u){if(u?.response?.status===404)return{starred:!1};throw C(u,`Repository ${i}/${a}`)}}});var h1=Vh({displayName:"GitHub",description:"Developer platform that allows developers to create, store, manage and share their code",minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/github.png",categories:["DEVELOPER_TOOLS"],auth:P,actions:[sP,vP,_P,xP,uP,PP,wP,AP,TP,SP,EP,IP,$P,kP,OP,NP,RP,zP,CP,DP,LP,UP,MP,qP,jP,BP,FP,HP,GP,ZP,VP,WP,KP,JP,XP,YP,QP,ew,tw,rw,nw,iw,ow,aw,sw,uw,cw,lw,pw,dw,mw,fw,hw,gw,yw,bw,vw,_w,xw,Pw,ww,Aw,Tw,Sw,Ew,Iw,$w,Rw,kw,Ow,Nw,zw,Cw,Dw,Lw,Uw,Mw,qw,jw,Bw,Fw,Hw,Gw,Zw,Vw,Ww,Kw,Jw,Xw,Yw,Qw,ub({baseUrl:o(()=>"https://api.github.com","baseUrl"),auth:P,authMapping:o(async e=>({Authorization:`Bearer ${await ii.getBearerToken(e)}`}),"authMapping")})],authors:["kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud","tintinthedev","murex971","sanket-a11y"],triggers:bP});0&&(module.exports={github});
|
|
75
|
+
}`;return await $({auth:e,method:"POST",resourceUri:"/graphql",body:{query:p}})}});var SP=T({auth:P,name:"add_labels_to_issue",displayName:"Add Labels to Issue",description:"Adds labels to an existing issue.",audience:"human",aiMetadata:{description:"Adds one or more labels to an existing issue (by number) in a repository, leaving any labels already on the issue in place. Use to tag or categorize an issue. Idempotent in effect: re-adding a label the issue already has does not duplicate it.",idempotent:!0},props:{repository:ee.repositoryDropdown,issue_number:ee.issueDropdown(!0),labels:ee.labelDropDown(!0)},outputSchema:Px,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u=r.issue_number,c=r.labels;return await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`,body:{labels:c}})}});var EP=T({auth:P,name:"create_branch",displayName:"Create Branch",description:"Creates a new branch on a repository.",audience:"human",aiMetadata:{description:"Creates a new branch in a repository pointing at the tip of a chosen source branch. Use to start a feature or working branch from an existing one. Not idempotent: a second call with the same branch name fails because the ref already exists.",idempotent:!1},props:{repository:ee.repositoryDropdown,source_branch:ee.branchDropdown("Source Branch","The source branch that will be used to create the new branch",!0),new_branch_name:h.ShortText({displayName:"New Branch Name",description:"The name for the new branch (e.g., 'feature/new-design').",required:!0})},outputSchema:Tx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,c=(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${r.source_branch}`})).body.commit.sha;return await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/git/refs`,body:{ref:`refs/heads/${r.new_branch_name}`,sha:c}})}});var IP=T({auth:P,name:"delete_branch",displayName:"Delete Branch",description:"Deletes a branch from a repository.",audience:"human",aiMetadata:{description:"Permanently deletes a branch (git ref under heads/) from a repository. Use to clean up a merged or stale branch. Effectively idempotent for the end state (the branch ends up gone), but a repeat call on an already-deleted branch returns a not-found error.",idempotent:!1},props:{repository:ee.repositoryDropdown,branch:ee.branchDropdown("Branch","",!0)},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u=r.branch;return await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/git/refs/heads/${u}`})}});var $P=T({auth:P,name:"update_issue",displayName:"Update Issue",description:"Updates an existing issue.",audience:"human",aiMetadata:{description:"Edits an existing issue (by number) in a repository, setting only the fields you provide \u2014 title, body, state (open/closed) and state reason, milestone, labels, or assignees. Use to modify, close, or reopen an issue. Idempotent: applying the same field values again leaves the issue in the same state. Note that labels and assignees here replace the existing set rather than append.",idempotent:!0},props:{repository:ee.repositoryDropdown,issue_number:ee.issueDropdown(),title:h.ShortText({displayName:"Title",required:!1}),body:h.LongText({displayName:"Body",required:!1}),state:h.StaticDropdown({displayName:"State",description:"The new state of the issue.",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),state_reason:h.StaticDropdown({displayName:"State Reason",description:"The reason for the state change. (Only used if State is changed).",required:!1,options:{options:[{label:"Completed",value:"completed"},{label:"Not Planned",value:"not_planned"},{label:"Reopened",value:"reopened"},{label:"Duplicate",value:"duplicate"}]}}),milestone:ee.milestoneDropdown(!1),labels:ee.labelDropDown(!1),assignees:ee.assigneeDropDown(!1)},outputSchema:ai,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u={};return r.title!==void 0&&(u.title=r.title),r.body!==void 0&&(u.body=r.body),r.state!==void 0&&(u.state=r.state),r.state_reason!==void 0&&(u.state_reason=r.state_reason),r.assignees!==void 0&&(u.assignees=r.assignees),r.labels!==void 0&&(u.labels=r.labels),r.milestone!==void 0&&(u.milestone=r.milestone),await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/issues/${r.issue_number}`,body:u})}});var RP=T({auth:P,name:"github_create_gist",displayName:"Create Gist",description:"Create a GitHub Gist. Requires an OAuth connection \u2014 Gists cannot be created with GitHub App authentication.",audience:"both",aiMetadata:{description:"Creates a GitHub Gist (a standalone code/text snippet) containing a single named file with the given content, public or secret. Use to share a snippet outside any repository. Requires an OAuth connection \u2014 it throws an error under GitHub App authentication. Not idempotent: each call creates a new gist.",idempotent:!1},props:{description:h.ShortText({displayName:"Description",description:"Description of the gist",required:!1}),public:h.Checkbox({displayName:"Public",description:"Whether the gist should be public",required:!0,defaultValue:!0}),filename:h.ShortText({displayName:"Filename",description:"Name of the file in the gist",required:!0}),content:h.LongText({displayName:"File Content",description:"Content of the file",required:!0})},outputSchema:Ex,async run({auth:e,propsValue:r}){if(ws(e))throw new Error("Create Gist is not available with GitHub App authentication. The GitHub Gists API requires a user OAuth token \u2014 App installation tokens cannot create gists. Use an OAuth connection instead.");let{description:i,public:a,filename:u,content:c}=r,p={description:i,public:a,files:{[u]:{content:c}}};return await $({auth:e,method:"POST",resourceUri:"/gists",body:p})}});var kP=T({auth:P,name:"find_branch",displayName:"Find Branch",description:"Finds a branch by name and returns its details.",audience:"both",aiMetadata:{description:"Looks up a branch in a repository by its exact name and reports whether it exists along with its details. Use to check for a branch or fetch its tip before acting on it; a missing branch is reported as not-found rather than raising an error. Read-only and idempotent.",idempotent:!0},props:{repository:ee.repositoryDropdown,branch:h.ShortText({displayName:"Branch Name",required:!0})},outputSchema:Sx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,u=r.branch;try{return{found:!0,result:(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${u}`})).body}}catch(c){if(c.response.status===404)return{found:!1,result:{}};throw c}}});var OP=T({auth:P,name:"find_issue",displayName:"Find Issue",description:"Finds an issue based title.",audience:"both",aiMetadata:{description:"Searches a repository for an issue whose title matches the given text, filtered by state (open, closed, or all), and returns the top match plus whether any was found. Use to locate an issue by title when you do not have its number. Read-only and idempotent.",idempotent:!0},props:{repository:ee.repositoryDropdown,title:h.ShortText({displayName:"Title",required:!0}),state:h.StaticDropdown({displayName:"State",description:"Filter issues by their state.",required:!0,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}})},outputSchema:Ax,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r.repository,{state:u,title:c}=r,p={};r.state&&(p.state=r.state);let m=`repo:${i}/${a} is:issue in:title`;c&&(m+=` "${c}"`),u&&u!=="all"&&(m+=` state:${u}`);let v=await $({auth:e,method:"GET",resourceUri:"/search/issues",query:{q:m,per_page:1}});return{found:v.body.total_count>0,result:v.body.items}}});var NP=T({auth:P,name:"find_user",displayName:"Find User",description:"Finds a user by their login name.",audience:"both",aiMetadata:{description:"Looks up a GitHub user by their login (username) and reports whether they exist along with their public profile. Use to verify a username or fetch a user profile; an unknown username is reported as not-found rather than raising an error. Read-only and idempotent.",idempotent:!0},props:{username:h.ShortText({displayName:"Username",description:"The GitHub username (login) to look up.",required:!0})},outputSchema:Rx,async run({auth:e,propsValue:r}){let{username:i}=r;try{return{found:!0,result:(await $({auth:e,method:"GET",resourceUri:`/users/${i}`})).body}}catch(a){if(a.response.status===404)return{found:!1,result:{}};throw a}}});var zP=T({auth:P,name:"create_issue_ai",displayName:"Create Issue (Agent)",description:"Opens a new issue in a GitHub repository.",audience:"ai",aiMetadata:{description:"Opens a new issue in a GitHub repository (POST /repos/{owner}/{repo}/issues) with a title and optional body, labels, and assignees. Resolve owner/repo via List My Repositories or Search Repositories. Not idempotent: each call creates a separate issue even with identical input.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),title:h.ShortText({displayName:"Title",description:"The title of the issue.",required:!0}),body:h.LongText({displayName:"Body",description:"The body/description of the issue.",required:!1}),labels:h.Array({displayName:"Labels",description:"Label names to attach. Resolve via List Repository Labels.",required:!1}),assignees:h.Array({displayName:"Assignees",description:"User logins to assign. Resolve via List Assignees.",required:!1})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,title:u,body:c,labels:p,assignees:m}=r,v={title:u};c!==void 0&&(v.body=c),p&&p.length>0&&(v.labels=p),m&&m.length>0&&(v.assignees=m);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues`,body:v})).body}catch(_){let A=_?.response?.status;throw A===404?new Error(`Repository ${i}/${a} not found, or you lack access.`):A===403?new Error("Permission denied creating the issue (check repo write access / token scope)."):A===410?new Error("Issues are disabled for this repository."):_}}});var CP=T({auth:P,name:"get_issue_ai",displayName:"Get Issue (Agent)",description:"Fetches the full details of a single issue by number.",audience:"ai",aiMetadata:{description:"Fetches a single issue (GET /repos/{owner}/{repo}/issues/{issue_number}) by its number, returning its current state, title, body, labels, and assignees. Works on pull request numbers too (issues and PRs share the number space). Resolve issue numbers via List Repository Issues or Search Issues and Pull Requests. Read-only and idempotent.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue (or pull request) number. Resolve via List Repository Issues or Search Issues and Pull Requests.",required:!0})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues/${u}`})).body}catch(c){let p=c?.response?.status;throw p===404?new Error(`Issue #${u} not found in ${i}/${a}.`):p===403?new Error("Permission denied reading the issue."):c}}});var H=h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories, Search Repositories, or Get Authenticated User.",required:!0}),G=h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0});function C(e,r){let i=e?.response?.status;return i===404?new Error(`${r} not found, or you lack access.`):i===403?new Error(`Permission denied (status 403) \u2014 check write permission / token scope for ${r}.`):i===429?new Error("GitHub rate limit hit (status 429). Retry later."):i===422?new Error(`Unprocessable request (status 422) for ${r}: ${e?.response?.body?.message??"validation failed"}.`):e instanceof Error?e:new Error(String(e))}o(C,"githubError");var DP=T({auth:P,name:"list_repository_issues",displayName:"List Repository Issues (Agent)",description:"Lists issues in a repository with optional filters.",audience:"ai",aiMetadata:{description:"Lists issues in a repository (GET /repos/{owner}/{repo}/issues) with filters for state, labels, assignee, creator, milestone, since, and sort. NOTE: GitHub REST returns pull requests as issues too \u2014 items with a non-null pull_request field are PRs; filter them out if you only want issues. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}}),labels:h.ShortText({displayName:"Labels",description:"Comma-separated list of label names to filter by.",required:!1}),assignee:h.ShortText({displayName:"Assignee",description:'Filter by assignee login (or "none" / "*").',required:!1}),creator:h.ShortText({displayName:"Creator",description:"Filter by the login of the issue creator.",required:!1}),milestone:h.ShortText({displayName:"Milestone",description:'Milestone number, "none", or "*".',required:!1}),since:h.ShortText({displayName:"Since",description:"Only issues updated at or after this ISO 8601 timestamp.",required:!1}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Comments",value:"comments"}]}}),direction:h.StaticDropdown({displayName:"Direction",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}})},outputSchema:Kx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.state&&(u.state=r.state),r.labels&&(u.labels=r.labels),r.assignee&&(u.assignee=r.assignee),r.creator&&(u.creator=r.creator),r.milestone&&(u.milestone=r.milestone),r.since&&(u.since=r.since),r.sort&&(u.sort=r.sort),r.direction&&(u.direction=r.direction);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var LP=T({auth:P,name:"update_issue_ai",displayName:"Update Issue (Agent)",description:"Edits an existing issue, including closing or reopening it.",audience:"ai",aiMetadata:{description:"Edits an existing issue (PATCH /repos/{owner}/{repo}/issues/{issue_number}), setting only the fields you provide \u2014 title, body, state (open/closed) with state_reason, milestone (set Clear Milestone to remove it), labels, or assignees. Use to modify, close, or reopen an issue (no separate close action). Labels and assignees here REPLACE the existing set; use Add Labels to Issue / Add Assignees to Issue to append. Idempotent: applying the same field values again leaves the issue in the same state.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue number to update. Resolve via List Repository Issues.",required:!0}),title:h.ShortText({displayName:"Title",required:!1}),body:h.LongText({displayName:"Body",required:!1}),state:h.StaticDropdown({displayName:"State",description:"The new state of the issue (open or closed).",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),state_reason:h.StaticDropdown({displayName:"State Reason",description:"The reason for the state change (only used if State is set).",required:!1,options:{options:[{label:"Completed",value:"completed"},{label:"Not Planned",value:"not_planned"},{label:"Reopened",value:"reopened"},{label:"Duplicate",value:"duplicate"}]}}),milestone:h.Number({displayName:"Milestone Number",description:"Milestone number to associate. Resolve via List Milestones. To remove the issue's milestone instead, set Clear Milestone.",required:!1}),clear_milestone:h.Checkbox({displayName:"Clear Milestone",description:"Set to true to remove the issue's current milestone. Overrides Milestone Number.",required:!1}),labels:h.Array({displayName:"Labels",description:"Replaces the full label set. Resolve names via List Repository Labels.",required:!1}),assignees:h.Array({displayName:"Assignees",description:"Replaces the full assignee set (logins). Resolve via List Assignees.",required:!1})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c={};r.title!==void 0&&(c.title=r.title),r.body!==void 0&&(c.body=r.body),r.state!==void 0&&(c.state=r.state),r.state_reason!==void 0&&(c.state_reason=r.state_reason),r.clear_milestone?c.milestone=null:r.milestone!==void 0&&(c.milestone=r.milestone),r.labels!==void 0&&(c.labels=r.labels),r.assignees!==void 0&&(c.assignees=r.assignees);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/issues/${u}`,body:c})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Issue #${u} not found in ${i}/${a}.`):m===403?new Error("Permission denied updating the issue."):p}}});var UP=T({auth:P,name:"create_issue_comment_ai",displayName:"Create Issue Comment (Agent)",description:"Posts a comment on an issue or pull request.",audience:"ai",aiMetadata:{description:"Posts a comment on an issue (POST /repos/{owner}/{repo}/issues/{issue_number}/comments). Pull requests share the issue number space, so this also adds a general PR comment (for an inline code-review comment use Create Pull Request Review Comment instead). Not idempotent: each call appends a new comment.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number to comment on. Resolve via List Repository Issues / List Pull Requests.",required:!0}),body:h.LongText({displayName:"Comment Body",description:"The comment text to add.",required:!0})},outputSchema:kx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u,body:c}=r;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/comments`,body:{body:c}})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Issue #${u} not found in ${i}/${a}.`):m===403?new Error("Permission denied commenting on the issue."):p}}});var MP=T({auth:P,name:"list_issue_comments",displayName:"List Issue Comments (Agent)",description:"Lists the comments on an issue or pull request.",audience:"ai",aiMetadata:{description:"Lists the comment thread on an issue (GET /repos/{owner}/{repo}/issues/{issue_number}/comments). Works on pull request numbers too (issues and PRs share the number space). Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0})},outputSchema:Vx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues/${u}/comments`});return{items:c,count:c.length}}catch(c){throw C(c,`Issue #${u} in ${i}/${a}`)}}});var qP=T({auth:P,name:"lock_issue_ai",displayName:"Lock Issue (Agent)",description:"Locks an issue or pull request conversation.",audience:"ai",aiMetadata:{description:"Locks an issue (PUT /repos/{owner}/{repo}/issues/{issue_number}/lock) so only collaborators can comment, optionally recording a lock reason (off-topic, too heated, resolved, or spam). Works on pull request numbers too. Use Unlock Issue to reverse. Idempotent: re-locking an already-locked issue leaves it locked.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number to lock. Resolve via List Repository Issues.",required:!0}),lock_reason:h.StaticDropdown({displayName:"Lock Reason",description:"The reason for locking the issue.",required:!1,options:{options:[{label:"Off-topic",value:"off-topic"},{label:"Too heated",value:"too heated"},{label:"Resolved",value:"resolved"},{label:"Spam",value:"spam"}]}})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u,lock_reason:c}=r,p={};c!==void 0&&(p.lock_reason=c);try{return{success:!0,status:(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/issues/${u}/lock`,body:p})).status,locked:!0}}catch(m){let v=m?.response?.status;throw v===404?new Error(`Issue #${u} not found in ${i}/${a}.`):v===403?new Error("Permission denied locking the issue."):m}}});var jP=T({auth:P,name:"unlock_issue_ai",displayName:"Unlock Issue (Agent)",description:"Removes the conversation lock from an issue or pull request.",audience:"ai",aiMetadata:{description:"Removes the conversation lock from an issue (DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock) so anyone can comment again. Works on pull request numbers too. Idempotent: unlocking an already-unlocked issue leaves it unlocked.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number to unlock. Resolve via List Repository Issues.",required:!0})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/issues/${u}/lock`})).status,locked:!1}}catch(c){let p=c?.response?.status;throw p===404?new Error(`Issue #${u} not found in ${i}/${a}.`):p===403?new Error("Permission denied unlocking the issue."):c}}});var BP=T({auth:P,name:"add_labels_to_issue_ai",displayName:"Add Labels to Issue (Agent)",description:"Adds labels to an issue without removing existing ones.",audience:"ai",aiMetadata:{description:"Adds one or more labels to an existing issue (POST /repos/{owner}/{repo}/issues/{issue_number}/labels), leaving any labels already on the issue in place (ADDITIVE). To replace the whole set use Set Issue Labels; to remove one use Remove Label from Issue. Works on pull request numbers too. Resolve label names via List Repository Labels. Idempotent in effect: re-adding a label already present does not duplicate it.",idempotent:!0},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),labels:h.Array({displayName:"Labels",description:"Label names to add. Resolve via List Repository Labels.",required:!0})},outputSchema:ci,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.labels;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`,body:{labels:c}})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Issue #${u} not found in ${i}/${a}.`):m===403?new Error("Permission denied adding labels."):p}}});var FP=T({auth:P,name:"remove_label_from_issue",displayName:"Remove Label from Issue (Agent)",description:"Detaches a single label from an issue or pull request.",audience:"ai",aiMetadata:{description:"Removes one label by name from an issue (DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}). Use Add Labels to Issue to attach or Set Issue Labels to replace the whole set. Works on pull request numbers too. Resolve current labels via List Issue Labels. Idempotent: a label that is already absent ends up absent (404 if it was never present).",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),name:h.ShortText({displayName:"Label Name",description:"The label to remove. Resolve current labels via List Issue Labels.",required:!0})},outputSchema:ci,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u,name:c}=r;try{return(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/issues/${u}/labels/${encodeURIComponent(c)}`})).body}catch(p){throw C(p,`Label "${c}" on issue #${u} in ${i}/${a}`)}}});var HP=T({auth:P,name:"set_issue_labels",displayName:"Set Issue Labels (Agent)",description:"Replaces the entire label set on an issue or pull request.",audience:"ai",aiMetadata:{description:"Replaces ALL labels on an issue with the provided set (PUT /repos/{owner}/{repo}/issues/{issue_number}/labels). Differs from Add Labels to Issue (additive): any label not in the list is removed. Pass an empty array to clear all labels. Works on pull request numbers too. Resolve names via List Repository Labels. Idempotent: re-applying the same set converges to that exact set.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),labels:h.Array({displayName:"Labels",description:"The complete label set to apply (replaces existing). Empty clears all. Resolve names via List Repository Labels.",required:!0})},outputSchema:ci,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.labels;try{return(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`,body:{labels:c}})).body}catch(p){throw C(p,`Issue #${u} in ${i}/${a}`)}}});var GP=T({auth:P,name:"list_issue_labels",displayName:"List Issue Labels (Agent)",description:"Lists the labels currently on an issue or pull request.",audience:"ai",aiMetadata:{description:"Lists the labels currently attached to an issue (GET /repos/{owner}/{repo}/issues/{issue_number}/labels). Use this to resolve which label names to pass to Remove Label from Issue. Works on pull request numbers too. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0})},outputSchema:Os,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/issues/${u}/labels`});return{items:c,count:c.length}}catch(c){throw C(c,`Issue #${u} in ${i}/${a}`)}}});var ZP=T({auth:P,name:"add_assignees_to_issue",displayName:"Add Assignees to Issue (Agent)",description:"Assigns users to an issue or pull request.",audience:"ai",aiMetadata:{description:"Assigns up to 10 users to an issue (POST /repos/{owner}/{repo}/issues/{issue_number}/assignees), keeping existing assignees (ADDITIVE). Works on pull request numbers too. Resolve assignable logins via List Assignees. Idempotent: re-adding an existing assignee is a no-op. Note: logins that cannot be assigned are silently ignored by GitHub.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),assignees:h.Array({displayName:"Assignees",description:"User logins to assign (max 10). Resolve via List Assignees.",required:!0})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.assignees;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/issues/${u}/assignees`,body:{assignees:c}})).body}catch(p){throw C(p,`Issue #${u} in ${i}/${a}`)}}});var VP=T({auth:P,name:"remove_assignees_from_issue",displayName:"Remove Assignees from Issue (Agent)",description:"Unassigns users from an issue or pull request.",audience:"ai",aiMetadata:{description:"Removes the given users from an issue (DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees). Works on pull request numbers too. Idempotent: removing a user who is not assigned ends in the same state. Get current assignees via Get Issue.",idempotent:!0},props:{owner:H,repo:G,issue_number:h.Number({displayName:"Issue Number",description:"The issue or pull request number. Resolve via List Repository Issues.",required:!0}),assignees:h.Array({displayName:"Assignees",description:"User logins to unassign.",required:!0})},outputSchema:mr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,issue_number:u}=r,c=r.assignees;try{return(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/issues/${u}/assignees`,body:{assignees:c}})).body}catch(p){throw C(p,`Issue #${u} in ${i}/${a}`)}}});var WP=T({auth:P,name:"list_assignees",displayName:"List Assignees (Agent)",description:"Lists users who can be assigned to issues in a repository.",audience:"ai",aiMetadata:{description:"Lists the users assignable to issues and pull requests in a repository (GET /repos/{owner}/{repo}/assignees). Use to resolve valid logins for Add Assignees to Issue. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Bx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/assignees`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var KP=T({auth:P,name:"list_repository_labels",displayName:"List Repository Labels (Agent)",description:"Lists a repository's label vocabulary.",audience:"ai",aiMetadata:{description:"Lists all labels defined in a repository (GET /repos/{owner}/{repo}/labels). Use to resolve valid label names for Add Labels to Issue, Set Issue Labels, and Remove Label from Issue. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Os,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/labels`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var JP=T({auth:P,name:"create_label",displayName:"Create Label (Agent)",description:"Defines a new label in a repository.",audience:"ai",aiMetadata:{description:"Creates a new label in a repository (POST /repos/{owner}/{repo}/labels) with a name, hex color, and optional description. To change an existing label use Update Label. Not idempotent: a second call with the same name returns 422 (already exists).",idempotent:!1},props:{owner:H,repo:G,name:h.ShortText({displayName:"Name",description:"The label name.",required:!0}),color:h.ShortText({displayName:"Color",description:'Six-character hex color code without the leading "#" (e.g. "f29513").',required:!1}),description:h.ShortText({displayName:"Description",description:"Short description of the label.",required:!1})},outputSchema:Is,async run({auth:e,propsValue:r}){let{owner:i,repo:a,name:u,color:c,description:p}=r,m={name:u};c!==void 0&&(m.color=c),p!==void 0&&(m.description=p);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/labels`,body:m})).body}catch(v){throw C(v,`Label "${u}" in ${i}/${a}`)}}});var XP=T({auth:P,name:"update_label",displayName:"Update Label (Agent)",description:"Renames or recolors an existing repository label.",audience:"ai",aiMetadata:{description:"Updates an existing repository label by its current name (PATCH /repos/{owner}/{repo}/labels/{name}) \u2014 set a new name, color, or description. Resolve label names via List Repository Labels. Idempotent: applying the same values again leaves the label in the same state.",idempotent:!0},props:{owner:H,repo:G,name:h.ShortText({displayName:"Current Name",description:"The current label name to update. Resolve via List Repository Labels.",required:!0}),new_name:h.ShortText({displayName:"New Name",description:"New label name (leave empty to keep the current name).",required:!1}),color:h.ShortText({displayName:"Color",description:'Six-character hex color code without the leading "#" (e.g. "f29513").',required:!1}),description:h.ShortText({displayName:"Description",required:!1})},outputSchema:Is,async run({auth:e,propsValue:r}){let{owner:i,repo:a,name:u,new_name:c,color:p,description:m}=r,v={};c!==void 0&&(v.new_name=c),p!==void 0&&(v.color=p),m!==void 0&&(v.description=m);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/labels/${encodeURIComponent(u)}`,body:v})).body}catch(_){throw C(_,`Label "${u}" in ${i}/${a}`)}}});var YP=T({auth:P,name:"create_pull_request",displayName:"Create Pull Request (Agent)",description:"Opens a pull request between two branches.",audience:"ai",aiMetadata:{description:'Opens a pull request (POST /repos/{owner}/{repo}/pulls) from the head branch into the base branch, with a title and optional body. Set draft=true for a draft PR. For cross-fork PRs prefix head with the fork owner ("owner:branch"). Resolve branch names via List Branches. Not idempotent: each call opens a new PR.',idempotent:!1},props:{owner:H,repo:G,title:h.ShortText({displayName:"Title",required:!0}),head:h.ShortText({displayName:"Head Branch",description:'The branch with your changes (e.g. "feature/x"). For a fork use "fork-owner:branch".',required:!0}),base:h.ShortText({displayName:"Base Branch",description:'The branch to merge into (e.g. "main").',required:!0}),body:h.LongText({displayName:"Body",required:!1}),draft:h.Checkbox({displayName:"Draft",description:"Open as a draft pull request.",required:!1}),maintainer_can_modify:h.Checkbox({displayName:"Maintainer Can Modify",description:"Allow maintainers to edit the head branch.",required:!1})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,title:u,head:c,base:p,body:m,draft:v,maintainer_can_modify:_}=r,A={title:u,head:c,base:p};m!==void 0&&(A.body=m),v!==void 0&&(A.draft=v),_!==void 0&&(A.maintainer_can_modify=_);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls`,body:A})).body}catch(k){throw C(k,`Repository ${i}/${a}`)}}});var QP=T({auth:P,name:"get_pull_request",displayName:"Get Pull Request (Agent)",description:"Fetches a single pull request by number.",audience:"ai",aiMetadata:{description:"Fetches a single pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}), including its mergeable state and head/base commit SHAs (head.sha feeds Create Pull Request Review Comment). Resolve PR numbers via List Pull Requests. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}`})).body}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var ew=T({auth:P,name:"list_pull_requests",displayName:"List Pull Requests (Agent)",description:"Lists pull requests in a repository with optional filters.",audience:"ai",aiMetadata:{description:"Lists pull requests in a repository (GET /repos/{owner}/{repo}/pulls) filtered by state, head (user:branch), base branch, and sort. Returns all pages. For cross-repo or qualifier-based search use Search Issues and Pull Requests. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}}),head:h.ShortText({displayName:"Head",description:'Filter by head branch in the form "user:branch".',required:!1}),base:h.ShortText({displayName:"Base",description:"Filter by base branch name.",required:!1}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Popularity",value:"popularity"},{label:"Long Running",value:"long-running"}]}}),direction:h.StaticDropdown({displayName:"Direction",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}})},outputSchema:Jx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.state&&(u.state=r.state),r.head&&(u.head=r.head),r.base&&(u.base=r.base),r.sort&&(u.sort=r.sort),r.direction&&(u.direction=r.direction);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var tw=T({auth:P,name:"update_pull_request",displayName:"Update Pull Request (Agent)",description:"Edits a pull request, including closing or reopening it.",audience:"ai",aiMetadata:{description:"Edits a pull request (PATCH /repos/{owner}/{repo}/pulls/{pull_number}), setting only the fields you provide \u2014 title, body, state (open/closed), or base branch. Use to modify, close, or reopen a PR (no separate close action). Idempotent: applying the same values again leaves the PR in the same state.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),title:h.ShortText({displayName:"Title",required:!1}),body:h.LongText({displayName:"Body",required:!1}),state:h.StaticDropdown({displayName:"State",description:"Open or close the pull request.",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),base:h.ShortText({displayName:"Base Branch",description:"Change the base branch the PR targets.",required:!1})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r,c={};r.title!==void 0&&(c.title=r.title),r.body!==void 0&&(c.body=r.body),r.state!==void 0&&(c.state=r.state),r.base!==void 0&&(c.base=r.base);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/pulls/${u}`,body:c})).body}catch(p){throw C(p,`Pull request #${u} in ${i}/${a}`)}}});var rw=T({auth:P,name:"merge_pull_request",displayName:"Merge Pull Request (Agent)",description:"Merges an open pull request into its base branch.",audience:"ai",aiMetadata:{description:"Merges an open pull request into its base branch (PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge) using merge, squash, or rebase. DESTRUCTIVE and irreversible \u2014 it writes commits to the base branch. Optionally pin to a head sha so it only merges if the PR has not changed. Not idempotent: re-merging an already-merged PR returns 405.",idempotent:!1},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),merge_method:h.StaticDropdown({displayName:"Merge Method",required:!1,options:{options:[{label:"Merge",value:"merge"},{label:"Squash",value:"squash"},{label:"Rebase",value:"rebase"}]}}),commit_title:h.ShortText({displayName:"Commit Title",required:!1}),commit_message:h.LongText({displayName:"Commit Message",required:!1}),sha:h.ShortText({displayName:"Head SHA",description:"If set, the merge only proceeds when the PR head still matches this SHA (get via Get Pull Request).",required:!1})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u,merge_method:c,commit_title:p,commit_message:m,sha:v}=r,_={};c!==void 0&&(_.merge_method=c),p!==void 0&&(_.commit_title=p),m!==void 0&&(_.commit_message=m),v!==void 0&&(_.sha=v);try{return(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/pulls/${u}/merge`,body:_})).body}catch(A){let k=A?.response?.status;throw k===405?new Error(`Pull request #${u} is not mergeable (already merged, or merge blocked).`):k===409?new Error("Head SHA mismatch \u2014 the PR changed since you read the sha."):C(A,`Pull request #${u} in ${i}/${a}`)}}});var nw=T({auth:P,name:"list_pull_request_files",displayName:"List Pull Request Files (Agent)",description:"Lists the files changed in a pull request.",audience:"ai",aiMetadata:{description:"Lists the files changed in a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/files), with each file's status, additions/deletions, and patch. Use to find file paths for Create Pull Request Review Comment. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Xx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/files`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var iw=T({auth:P,name:"list_pull_request_commits",displayName:"List Pull Request Commits (Agent)",description:"Lists the commits in a pull request.",audience:"ai",aiMetadata:{description:"Lists the commits contained in a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/commits). Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:ks,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/commits`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var ow=T({auth:P,name:"create_pull_request_review",displayName:"Create Pull Request Review (Agent)",description:"Submits a review on a pull request.",audience:"ai",aiMetadata:{description:"Submits a review on a pull request (POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews) with an event of APPROVE, REQUEST_CHANGES, or COMMENT and an optional summary body. Omit the event to create a PENDING review. Optional inline comments array each needs path + position/line. For a single inline comment use Create Pull Request Review Comment instead. Not idempotent: each call adds a new review.",idempotent:!1},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),event:h.StaticDropdown({displayName:"Event",description:"The review action. Omit to leave the review pending.",required:!1,options:{options:[{label:"Approve",value:"APPROVE"},{label:"Request Changes",value:"REQUEST_CHANGES"},{label:"Comment",value:"COMMENT"}]}}),body:h.LongText({displayName:"Body",description:"The review summary text (required for REQUEST_CHANGES/COMMENT).",required:!1}),commit_id:h.ShortText({displayName:"Commit SHA",description:"The SHA the review applies to (defaults to the latest). Get via Get Pull Request.",required:!1}),comments:h.Json({displayName:"Inline Comments",description:'Optional array of inline comments, e.g. [{"path":"file.ts","position":5,"body":"..."}].',required:!1})},outputSchema:Ox,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u,event:c,body:p,commit_id:m,comments:v}=r,_={};c!==void 0&&(_.event=c),p!==void 0&&(_.body=p),m!==void 0&&(_.commit_id=m),v!==void 0&&(_.comments=v);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls/${u}/reviews`,body:_})).body}catch(A){throw C(A,`Pull request #${u} in ${i}/${a}`)}}});var aw=T({auth:P,name:"request_pull_request_reviewers",displayName:"Request Pull Request Reviewers (Agent)",description:"Requests reviews from users or teams on a pull request.",audience:"ai",aiMetadata:{description:"Requests reviews on a pull request (POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers) from user logins and/or team slugs. Provide at least one of reviewers or team_reviewers. Resolve logins via List Collaborators or Search Users. Idempotent: re-requesting an already-requested reviewer leaves the request in place.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),reviewers:h.Array({displayName:"Reviewers",description:"User logins to request a review from.",required:!1}),team_reviewers:h.Array({displayName:"Team Reviewers",description:"Team slugs to request a review from.",required:!1})},outputSchema:Yr,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r,c={},p=r.reviewers,m=r.team_reviewers;p&&p.length>0&&(c.reviewers=p),m&&m.length>0&&(c.team_reviewers=m);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls/${u}/requested_reviewers`,body:c})).body}catch(v){throw C(v,`Pull request #${u} in ${i}/${a}`)}}});var sw=T({auth:P,name:"create_pull_request_review_comment_ai",displayName:"Create Pull Request Review Comment (Agent)",description:"Posts an inline review comment on a pull request.",audience:"ai",aiMetadata:{description:"Posts an inline review comment on a pull request (POST /repos/{owner}/{repo}/pulls/{pull_number}/comments), anchored to a commit SHA, file path, and diff position. Use to comment on a specific line of changed code (for a general PR comment use Create Issue Comment instead). Get commit_id/path via List Pull Request Files or Get Pull Request. Not idempotent: each call adds a new review comment.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0}),commit_id:h.ShortText({displayName:"Commit SHA",description:"The SHA of the commit to comment on. Get via Get Pull Request (head.sha) or List Pull Request Commits.",required:!0}),path:h.ShortText({displayName:"File Path",description:"The relative path of the file to comment on. Get via List Pull Request Files.",required:!0}),body:h.LongText({displayName:"Comment Body",description:"The content of the review comment.",required:!0}),position:h.Number({displayName:"Position",description:"The line index in the diff (counting from the first @@ hunk header) where the comment is placed.",required:!0})},outputSchema:Nx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u,commit_id:c,path:p,body:m,position:v}=r;try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/pulls/${u}/comments`,body:{commit_id:c,path:p,body:m,position:v}})).body}catch(_){let A=_?.response?.status;throw A===404?new Error(`Pull request #${u} not found in ${i}/${a}.`):A===422?new Error("Invalid review comment (check commit_id, path, and position match the PR diff)."):A===403?new Error("Permission denied creating the review comment."):_}}});var uw=T({auth:P,name:"list_pull_request_review_comments",displayName:"List Pull Request Review Comments (Agent)",description:"Lists inline review comments on a pull request.",audience:"ai",aiMetadata:{description:"Lists the inline (code-anchored) review comments on a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/comments). For general PR comments use List Issue Comments; for review summaries use List Pull Request Reviews. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Yx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/comments`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var cw=T({auth:P,name:"list_pull_request_reviews",displayName:"List Pull Request Reviews (Agent)",description:"Lists the reviews submitted on a pull request.",audience:"ai",aiMetadata:{description:"Lists the reviews on a pull request (GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews), each with its state (APPROVED, CHANGES_REQUESTED, COMMENTED), body, and reviewer. For the inline code comments use List Pull Request Review Comments. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,pull_number:h.Number({displayName:"Pull Request Number",description:"The pull request number. Resolve via List Pull Requests.",required:!0})},outputSchema:Qx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,pull_number:u}=r;try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/pulls/${u}/reviews`});return{items:c,count:c.length}}catch(c){throw C(c,`Pull request #${u} in ${i}/${a}`)}}});var lw=T({auth:P,name:"get_repository",displayName:"Get Repository (Agent)",description:"Fetches metadata for a single repository.",audience:"ai",aiMetadata:{description:"Fetches a single repository (GET /repos/{owner}/{repo}) including its default_branch, visibility, and your permissions. Use to discover the default branch before file or branch operations. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Xr,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}`})).body}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var pw=T({auth:P,name:"list_my_repositories",displayName:"List My Repositories (Agent)",description:"Lists repositories the connected account can access.",audience:"ai",aiMetadata:{description:"Lists the repositories the connected user can access (GET /user/repos) \u2014 the top-level resolver for owner/repo used by most other GitHub atomics. Filter by visibility, affiliation, and sort. Returns all pages. Under GitHub App auth the token is a bot, so this reflects the installation, not a user. Read-only and idempotent.",idempotent:!0},props:{visibility:h.StaticDropdown({displayName:"Visibility",required:!1,options:{options:[{label:"All",value:"all"},{label:"Public",value:"public"},{label:"Private",value:"private"}]}}),affiliation:h.ShortText({displayName:"Affiliation",description:"Comma-separated: owner, collaborator, organization_member.",required:!1}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Pushed",value:"pushed"},{label:"Full Name",value:"full_name"}]}})},outputSchema:Qr,async run({auth:e,propsValue:r}){let i={};r.visibility&&(i.visibility=r.visibility),r.affiliation&&(i.affiliation=r.affiliation),r.sort&&(i.sort=r.sort);try{let a=await oe({auth:e,method:"GET",resourceUri:"/user/repos",query:i});return{items:a,count:a.length}}catch(a){throw C(a,"The authenticated user")}}});var dw=T({auth:P,name:"list_user_repositories",displayName:"List User Repositories (Agent)",description:"Lists a specific user's public repositories.",audience:"ai",aiMetadata:{description:"Lists the public repositories owned by a specific user (GET /users/{username}/repos). For the connected account's own repos (including private) use List My Repositories. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{username:h.ShortText({displayName:"Username",description:"The user login whose repositories to list.",required:!0})},outputSchema:Qr,async run({auth:e,propsValue:r}){let{username:i}=r;try{let a=await oe({auth:e,method:"GET",resourceUri:`/users/${i}/repos`});return{items:a,count:a.length}}catch(a){throw C(a,`User "${i}"`)}}});var mw=T({auth:P,name:"list_organization_repositories",displayName:"List Organization Repositories (Agent)",description:"Lists the repositories in an organization.",audience:"ai",aiMetadata:{description:"Lists the repositories in an organization (GET /orgs/{org}/repos). Returns all pages. Read-only and idempotent.",idempotent:!0},props:{org:h.ShortText({displayName:"Organization",description:"The organization login.",required:!0})},outputSchema:Qr,async run({auth:e,propsValue:r}){let{org:i}=r;try{let a=await oe({auth:e,method:"GET",resourceUri:`/orgs/${i}/repos`});return{items:a,count:a.length}}catch(a){throw C(a,`Organization "${i}"`)}}});var fw=T({auth:P,name:"create_repository",displayName:"Create Repository (Agent)",description:"Creates a new repository for the authenticated user.",audience:"ai",aiMetadata:{description:"Creates a new repository under the connected user account (POST /user/repos). Set private and auto_init (adds an initial README) as needed. For an org-owned repo use Create Organization Repository. Not idempotent: a second call with the same name returns 422 (name already exists).",idempotent:!1},props:{name:h.ShortText({displayName:"Name",description:"The repository name.",required:!0}),description:h.ShortText({displayName:"Description",required:!1}),private:h.Checkbox({displayName:"Private",description:"Create as a private repository.",required:!1}),auto_init:h.Checkbox({displayName:"Auto Init",description:"Initialize with an empty README so the repo has a default branch.",required:!1})},outputSchema:Xr,async run({auth:e,propsValue:r}){let{name:i,description:a,auto_init:u}=r,c={name:i};a!==void 0&&(c.description=a),r.private!==void 0&&(c.private=r.private),u!==void 0&&(c.auto_init=u);try{return(await $({auth:e,method:"POST",resourceUri:"/user/repos",body:c})).body}catch(p){throw C(p,`Repository "${i}"`)}}});var hw=T({auth:P,name:"create_organization_repository",displayName:"Create Organization Repository (Agent)",description:"Creates a new repository inside an organization.",audience:"ai",aiMetadata:{description:"Creates a new repository owned by an organization (POST /orgs/{org}/repos). Requires organization write permission. Not idempotent: a second call with the same name returns 422 (name already exists).",idempotent:!1},props:{org:h.ShortText({displayName:"Organization",description:"The organization login that will own the repository.",required:!0}),name:h.ShortText({displayName:"Name",description:"The repository name.",required:!0}),description:h.ShortText({displayName:"Description",required:!1}),private:h.Checkbox({displayName:"Private",description:"Create as a private repository.",required:!1})},outputSchema:Xr,async run({auth:e,propsValue:r}){let{org:i,name:a,description:u}=r,c={name:a};u!==void 0&&(c.description=u),r.private!==void 0&&(c.private=r.private);try{return(await $({auth:e,method:"POST",resourceUri:`/orgs/${i}/repos`,body:c})).body}catch(p){throw C(p,`Organization "${i}"`)}}});var gw=T({auth:P,name:"update_repository",displayName:"Update Repository (Agent)",description:"Updates settings on a repository.",audience:"ai",aiMetadata:{description:"Updates a repository (PATCH /repos/{owner}/{repo}), setting only the fields you provide \u2014 name, description, private, default_branch, has_issues, or archived. Idempotent: applying the same values again leaves the repo in the same state. Archiving is reversible only via the GitHub UI/API by un-setting archived.",idempotent:!0},props:{owner:H,repo:G,name:h.ShortText({displayName:"Name",required:!1}),description:h.ShortText({displayName:"Description",required:!1}),private:h.Checkbox({displayName:"Private",required:!1}),default_branch:h.ShortText({displayName:"Default Branch",description:"Resolve via List Branches.",required:!1}),has_issues:h.Checkbox({displayName:"Has Issues",required:!1}),archived:h.Checkbox({displayName:"Archived",description:"Set true to archive the repository (read-only state).",required:!1})},outputSchema:Xr,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.name!==void 0&&(u.name=r.name),r.description!==void 0&&(u.description=r.description),r.private!==void 0&&(u.private=r.private),r.default_branch!==void 0&&(u.default_branch=r.default_branch),r.has_issues!==void 0&&(u.has_issues=r.has_issues),r.archived!==void 0&&(u.archived=r.archived);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}`,body:u})).body}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var yw=T({auth:P,name:"list_branches",displayName:"List Branches (Agent)",description:"Lists the branches in a repository.",audience:"ai",aiMetadata:{description:"Lists the branches in a repository (GET /repos/{owner}/{repo}/branches), each with its tip commit and protection flag. Use to resolve branch names for Create Branch, Create Pull Request, and file operations. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Hx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var bw=T({auth:P,name:"get_branch",displayName:"Get Branch (Agent)",description:"Fetches a single branch including its tip commit.",audience:"ai",aiMetadata:{description:"Fetches a single branch (GET /repos/{owner}/{repo}/branches/{branch}), including its tip commit SHA and protection settings. Use to read the head SHA before creating a branch or comparing. Resolve branch names via List Branches. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,branch:h.ShortText({displayName:"Branch",description:"The branch name. Resolve via List Branches.",required:!0})},outputSchema:Cx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,branch:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${u}`})).body}catch(c){throw C(c,`Branch "${u}" in ${i}/${a}`)}}});var vw=T({auth:P,name:"list_commits",displayName:"List Commits (Agent)",description:"Lists commits in a repository with optional filters.",audience:"ai",aiMetadata:{description:"Lists commits in a repository (GET /repos/{owner}/{repo}/commits) filtered by sha (branch or ref to start from), path, author, and since/until ISO 8601 timestamps. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,sha:h.ShortText({displayName:"SHA or Branch",description:"Branch name or commit SHA to start listing from.",required:!1}),path:h.ShortText({displayName:"Path",description:"Only commits touching this file path.",required:!1}),author:h.ShortText({displayName:"Author",description:"Filter by author login or email.",required:!1}),since:h.ShortText({displayName:"Since",description:"ISO 8601 timestamp lower bound.",required:!1}),until:h.ShortText({displayName:"Until",description:"ISO 8601 timestamp upper bound.",required:!1})},outputSchema:ks,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.sha&&(u.sha=r.sha),r.path&&(u.path=r.path),r.author&&(u.author=r.author),r.since&&(u.since=r.since),r.until&&(u.until=r.until);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/commits`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var _w=T({auth:P,name:"get_commit",displayName:"Get Commit (Agent)",description:"Fetches a single commit including its file changes.",audience:"ai",aiMetadata:{description:"Fetches a single commit (GET /repos/{owner}/{repo}/commits/{ref}) by SHA, branch, or tag, including its files, stats, and parents. Resolve refs via List Commits or List Branches. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,ref:h.ShortText({displayName:"Ref",description:"Commit SHA, branch name, or tag. Resolve via List Commits.",required:!0})},outputSchema:zx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,ref:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/commits/${u}`})).body}catch(c){throw C(c,`Commit "${u}" in ${i}/${a}`)}}});var xw=T({auth:P,name:"compare_commits",displayName:"Compare Commits (Agent)",description:"Compares two commits, branches, or tags.",audience:"ai",aiMetadata:{description:"Compares two refs (GET /repos/{owner}/{repo}/compare/{base}...{head}) and returns how far ahead/behind head is plus the changed files. Base and head can each be a branch, tag, or commit SHA. Resolve refs via List Branches or List Commits. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,base:h.ShortText({displayName:"Base",description:"The base ref (branch, tag, or SHA).",required:!0}),head:h.ShortText({displayName:"Head",description:"The head ref to compare against the base.",required:!0})},outputSchema:qx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,base:u,head:c}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/compare/${u}...${c}`})).body}catch(p){throw C(p,`Comparison ${u}...${c} in ${i}/${a}`)}}});var Pw=T({auth:P,name:"list_contributors",displayName:"List Contributors (Agent)",description:"Lists the contributors to a repository.",audience:"ai",aiMetadata:{description:"Lists the contributors to a repository (GET /repos/{owner}/{repo}/contributors) with each contributor's commit count. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Gx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/contributors`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var ww=T({auth:P,name:"list_languages",displayName:"List Languages (Agent)",description:"Returns the language byte-count map for a repository.",audience:"ai",aiMetadata:{description:"Returns the languages detected in a repository (GET /repos/{owner}/{repo}/languages) as a map of language name to byte count. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:jx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/languages`})).body}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Aw=T({auth:P,name:"list_tags",displayName:"List Tags (Agent)",description:"Lists the git tags in a repository.",audience:"ai",aiMetadata:{description:"Lists the git tags in a repository (GET /repos/{owner}/{repo}/tags), each with the commit it points at. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:tP,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/tags`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Tw=T({auth:P,name:"get_file_content",displayName:"Get File Content (Agent)",description:"Reads a file (or directory listing) from a repository.",audience:"ai",aiMetadata:{description:'Reads repository contents at a path (GET /repos/{owner}/{repo}/contents/{path}). For a file it returns base64 content plus the blob "sha" \u2014 that sha is REQUIRED to update an existing file (Create or Update File) or to delete it (Delete File). For a directory path it returns the listing. Optionally pin to a ref (branch/tag/SHA). Read-only and idempotent.',idempotent:!0},props:{owner:H,repo:G,path:h.ShortText({displayName:"Path",description:'File or directory path within the repo (e.g. "src/index.ts").',required:!0}),ref:h.ShortText({displayName:"Ref",description:"Optional branch, tag, or commit SHA (defaults to the default branch).",required:!1})},outputSchema:Lx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,path:u,ref:c}=r,p={};c&&(p.ref=c);try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/contents/${u.split("/").map(encodeURIComponent).join("/")}`,query:p})).body}catch(m){throw C(m,`Path "${u}" in ${i}/${a}`)}}});var Sw=T({auth:P,name:"create_or_update_file",displayName:"Create or Update File (Agent)",description:"Creates or updates a single file via a commit.",audience:"ai",aiMetadata:{description:'Creates or updates a file (PUT /repos/{owner}/{repo}/contents/{path}) by committing base64 content with a commit message. To UPDATE an existing file you MUST pass its current blob "sha" (obtain it via Get File Content) \u2014 without the sha GitHub returns 422. To create a new file, omit the sha. Optionally target a branch (defaults to the default branch). Idempotent: writing the same content/sha converges to the same file state.',idempotent:!0},props:{owner:H,repo:G,path:h.ShortText({displayName:"Path",description:'File path within the repo (e.g. "docs/readme.md").',required:!0}),message:h.ShortText({displayName:"Commit Message",required:!0}),content:h.LongText({displayName:"Content (base64)",description:"The new file content, base64-encoded.",required:!0}),sha:h.ShortText({displayName:"Blob SHA",description:"REQUIRED when updating an existing file \u2014 its current blob sha from Get File Content. Omit to create a new file.",required:!1}),branch:h.ShortText({displayName:"Branch",description:"Branch to commit to (defaults to the default branch).",required:!1})},outputSchema:Rs,async run({auth:e,propsValue:r}){let{owner:i,repo:a,path:u,message:c,content:p,sha:m,branch:v}=r,_={message:c,content:p};m!==void 0&&(_.sha=m),v!==void 0&&(_.branch=v);try{return(await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/contents/${u.split("/").map(encodeURIComponent).join("/")}`,body:_})).body}catch(A){throw A?.response?.status===422?new Error(`Update failed for "${u}" \u2014 when updating an existing file you must pass its current blob sha (get it from Get File Content).`):C(A,`Path "${u}" in ${i}/${a}`)}}});var Ew=T({auth:P,name:"delete_file",displayName:"Delete File (Agent)",description:"Deletes a file from a repository via a commit.",audience:"ai",aiMetadata:{description:`Deletes a file (DELETE /repos/{owner}/{repo}/contents/{path}) by committing the removal. COMPOSITE: you must first call Get File Content on the same path to obtain the file's current blob "sha" and pass it here \u2014 the API rejects a delete without the correct sha. Optionally target a branch (defaults to the default branch). Destructive. Not idempotent: re-deleting a removed file returns 404.`,idempotent:!1},props:{owner:H,repo:G,path:h.ShortText({displayName:"Path",description:'File path to delete (e.g. "docs/old.md").',required:!0}),message:h.ShortText({displayName:"Commit Message",required:!0}),sha:h.ShortText({displayName:"Blob SHA",description:"The file's current blob sha \u2014 obtain it via Get File Content first.",required:!0}),branch:h.ShortText({displayName:"Branch",description:"Branch to commit to (defaults to the default branch).",required:!1})},outputSchema:Rs,async run({auth:e,propsValue:r}){let{owner:i,repo:a,path:u,message:c,sha:p,branch:m}=r,v={message:c,sha:p};m!==void 0&&(v.branch=m);try{return(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/contents/${u.split("/").map(encodeURIComponent).join("/")}`,body:v})).body}catch(_){let A=_?.response?.status;throw A===409||A===422?new Error(`Delete failed for "${u}" \u2014 the blob sha is missing or stale. Re-read it via Get File Content.`):C(_,`Path "${u}" in ${i}/${a}`)}}});var Iw=T({auth:P,name:"get_repository_tree",displayName:"Get Repository Tree (Agent)",description:"Lists the full file tree at a given ref.",audience:"ai",aiMetadata:{description:'Returns the git tree at a tree SHA or branch name (GET /repos/{owner}/{repo}/git/trees/{tree_sha}). Set recursive=true for the full nested file inventory. Complements Get File Content (single path/dir). The tree_sha can be a branch name like "main". Read-only and idempotent.',idempotent:!0},props:{owner:H,repo:G,tree_sha:h.ShortText({displayName:"Tree SHA or Branch",description:'A tree SHA or branch name (e.g. "main").',required:!0}),recursive:h.Checkbox({displayName:"Recursive",description:"Return the full nested tree instead of just the top level.",required:!1})},outputSchema:Dx,async run({auth:e,propsValue:r}){let{owner:i,repo:a,tree_sha:u,recursive:c}=r,p={};c&&(p.recursive="1");try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/git/trees/${u}`,query:p})).body}catch(m){throw C(m,`Tree "${u}" in ${i}/${a}`)}}});var $w=T({auth:P,name:"create_branch_ai",displayName:"Create Branch (Agent)",description:"Creates a new branch from the tip of a source branch.",audience:"ai",aiMetadata:{description:"Creates a new branch pointing at the tip of a source branch. It first reads the source branch tip (GET /repos/{owner}/{repo}/branches/{source}) then creates the ref (POST /repos/{owner}/{repo}/git/refs with ref=refs/heads/<new_branch_name>). Resolve branch names via List Branches. Not idempotent: a second call with the same branch name fails because the ref already exists.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),source_branch:h.ShortText({displayName:"Source Branch",description:'The branch whose tip the new branch starts from (e.g. "main"). Resolve via List Branches.',required:!0}),new_branch_name:h.ShortText({displayName:"New Branch Name",description:"The name for the new branch (e.g. 'feature/new-design').",required:!0})},outputSchema:$s,async run({auth:e,propsValue:r}){let{owner:i,repo:a,source_branch:u,new_branch_name:c}=r;try{let m=(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/branches/${u}`})).body.commit.sha;return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/git/refs`,body:{ref:`refs/heads/${c}`,sha:m}})).body}catch(p){let m=p?.response?.status;throw m===404?new Error(`Source branch "${u}" or repository ${i}/${a} not found.`):m===422?new Error(`Branch "${c}" already exists (or the ref is invalid).`):m===403?new Error("Permission denied creating the branch."):p}}});var Rw=T({auth:P,name:"get_reference",displayName:"Get Reference (Agent)",description:"Resolves a git ref to its commit SHA.",audience:"ai",aiMetadata:{description:'Resolves a git reference (GET /repos/{owner}/{repo}/git/ref/{ref}) such as "heads/main" or "tags/v1.0.0" to its object SHA. Use to obtain a commit sha for creating a branch. The ref must NOT include the leading "refs/". Read-only and idempotent.',idempotent:!0},props:{owner:H,repo:G,ref:h.ShortText({displayName:"Ref",description:'The ref without the "refs/" prefix, e.g. "heads/main".',required:!0})},outputSchema:$s,async run({auth:e,propsValue:r}){let{owner:i,repo:a,ref:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/git/ref/${u}`})).body}catch(c){throw C(c,`Ref "${u}" in ${i}/${a}`)}}});var kw=T({auth:P,name:"delete_branch_ai",displayName:"Delete Branch (Agent)",description:"Deletes a branch from a repository.",audience:"ai",aiMetadata:{description:"Permanently deletes a branch ref (DELETE /repos/{owner}/{repo}/git/refs/heads/{branch}). Use to clean up a merged or stale branch. Resolve branch names via List Branches. Not idempotent: a repeat call on an already-deleted branch returns a not-found error.",idempotent:!1},props:{owner:h.ShortText({displayName:"Owner",description:"Repository owner login (user or org). Resolve via List My Repositories or Search Repositories.",required:!0}),repo:h.ShortText({displayName:"Repository",description:"Repository name (without the owner prefix).",required:!0}),branch:h.ShortText({displayName:"Branch",description:'The name of the branch to delete (e.g. "feature/old"). Resolve via List Branches.',required:!0})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,branch:u}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/git/refs/heads/${u}`})).status,deleted:u}}catch(c){let p=c?.response?.status;throw p===404||p===422?new Error(`Branch "${u}" not found in ${i}/${a} (it may already be deleted).`):p===403?new Error("Permission denied deleting the branch."):c}}});var Ow=T({auth:P,name:"search_repositories",displayName:"Search Repositories (Agent)",description:"Searches public/accessible repositories with a query.",audience:"ai",aiMetadata:{description:'Searches repositories (GET /search/repositories?q=) using GitHub query qualifiers like "language:", "stars:", "user:", "org:". Use to resolve owner/repo from a description. Returns a search result (total_count + items) capped at 1000 matches; pass page/per_page to page through. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'Search query with optional qualifiers, e.g. "topic:cli language:go stars:>100".',required:!0}),sort:h.StaticDropdown({displayName:"Sort",required:!1,options:{options:[{label:"Stars",value:"stars"},{label:"Forks",value:"forks"},{label:"Help Wanted Issues",value:"help-wanted-issues"},{label:"Updated",value:"updated"}]}}),order:h.StaticDropdown({displayName:"Order",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:iP,async run({auth:e,propsValue:r}){let i={q:r.q};r.sort&&(i.sort=r.sort),r.order&&(i.order=r.order),r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/repositories",query:i})).body}catch(a){throw C(a,"Repository search")}}});var Nw=T({auth:P,name:"search_issues_and_pull_requests",displayName:"Search Issues and Pull Requests (Agent)",description:"Searches issues and PRs across repositories with a query.",audience:"ai",aiMetadata:{description:'Searches issues and pull requests (GET /search/issues?q=) using qualifiers like "repo:owner/name", "is:issue", "is:pr", "state:open", "author:", "label:", "assignee:". The primary cross-repo issue/PR finder. Returns a search result (total_count + items) capped at 1000. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'Search query, e.g. "repo:octocat/Hello-World is:issue is:open label:bug".',required:!0}),sort:h.ShortText({displayName:"Sort",description:"Sort field (e.g. comments, created, updated, reactions).",required:!1}),order:h.StaticDropdown({displayName:"Order",required:!1,options:{options:[{label:"Descending",value:"desc"},{label:"Ascending",value:"asc"}]}}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:nP,async run({auth:e,propsValue:r}){let i={q:r.q};r.sort&&(i.sort=r.sort),r.order&&(i.order=r.order),r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/issues",query:i})).body}catch(a){throw C(a,"Issue/PR search")}}});var zw=T({auth:P,name:"search_code",displayName:"Search Code (Agent)",description:"Searches file contents across repositories.",audience:"ai",aiMetadata:{description:'Searches code (GET /search/code?q=) using qualifiers like "in:file", "repo:owner/name", "language:", "path:", "filename:". The query must include at least one search term. Returns a search result (total_count + items) capped at 1000. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'Code search query, e.g. "addClass in:file language:js repo:jquery/jquery".',required:!0}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:rP,async run({auth:e,propsValue:r}){let i={q:r.q};r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/code",query:i})).body}catch(a){throw C(a,"Code search")}}});var Cw=T({auth:P,name:"search_users",displayName:"Search Users (Agent)",description:"Searches GitHub users and organizations.",audience:"ai",aiMetadata:{description:'Searches users and organizations (GET /search/users?q=) using qualifiers like "type:user", "type:org", "location:", "language:". Use to resolve a login from a name. Returns a search result (total_count + items) capped at 1000. Read-only and idempotent.',idempotent:!0},props:{q:h.ShortText({displayName:"Query",description:'User search query, e.g. "tom repos:>10 location:london".',required:!0}),per_page:h.Number({displayName:"Per Page",description:"Results per page (max 100).",required:!1}),page:h.Number({displayName:"Page",required:!1})},outputSchema:oP,async run({auth:e,propsValue:r}){let i={q:r.q};r.per_page&&(i.per_page=r.per_page),r.page&&(i.page=r.page);try{return(await $({auth:e,method:"GET",resourceUri:"/search/users",query:i})).body}catch(a){throw C(a,"User search")}}});var Dw=T({auth:P,name:"get_authenticated_user",displayName:"Get Authenticated User (Agent)",description:"Returns the profile of the connected account.",audience:"ai",aiMetadata:{description:'Returns the profile of the connected account (GET /user) \u2014 the "who am I" call whose login feeds self-scoped operations. Under GitHub App auth this reflects the bot identity (e.g. "app-name[bot]"), not a human user. Read-only and idempotent.',idempotent:!0},props:{},outputSchema:Mx,async run({auth:e}){try{return(await $({auth:e,method:"GET",resourceUri:"/user"})).body}catch(r){throw C(r,"The authenticated user")}}});var Lw=T({auth:P,name:"get_user",displayName:"Get User (Agent)",description:"Fetches a user's public profile by login.",audience:"ai",aiMetadata:{description:"Fetches a user's public profile (GET /users/{username}) \u2014 name, bio, public repo/follower counts, type (User or Organization). Resolve logins via Search Users. Read-only and idempotent.",idempotent:!0},props:{username:h.ShortText({displayName:"Username",description:"The user or organization login.",required:!0})},outputSchema:Ux,async run({auth:e,propsValue:r}){let{username:i}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/users/${i}`})).body}catch(a){throw C(a,`User "${i}"`)}}});var Uw=T({auth:P,name:"list_organization_members",displayName:"List Organization Members (Agent)",description:"Lists the members of an organization.",audience:"ai",aiMetadata:{description:"Lists the members of an organization (GET /orgs/{org}/members). Visibility is gated: private members appear only with org-read access (OAuth has it via admin:org); under GitHub App auth the bot lacks user-org context and may see a limited or empty list. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{org:h.ShortText({displayName:"Organization",description:"The organization login.",required:!0})},outputSchema:Fx,async run({auth:e,propsValue:r}){let{org:i}=r;try{let a=await oe({auth:e,method:"GET",resourceUri:`/orgs/${i}/members`});return{items:a,count:a.length}}catch(a){throw C(a,`Organization "${i}"`)}}});var Mw=T({auth:P,name:"create_release",displayName:"Create Release (Agent)",description:"Creates a release for a tag.",audience:"ai",aiMetadata:{description:"Creates a release (POST /repos/{owner}/{repo}/releases) for a tag. If the tag does not exist it is created from target_commitish (a branch or SHA, defaults to the default branch). Set draft/prerelease as needed. Not idempotent: each call creates a new release (and 422s if a release for the tag already exists).",idempotent:!1},props:{owner:H,repo:G,tag_name:h.ShortText({displayName:"Tag Name",description:'The git tag for this release (e.g. "v1.2.0").',required:!0}),name:h.ShortText({displayName:"Release Name",required:!1}),body:h.LongText({displayName:"Body",description:"Release notes.",required:!1}),target_commitish:h.ShortText({displayName:"Target Commitish",description:"Branch or SHA the tag is created from if it does not exist.",required:!1}),draft:h.Checkbox({displayName:"Draft",required:!1}),prerelease:h.Checkbox({displayName:"Prerelease",required:!1})},outputSchema:ui,async run({auth:e,propsValue:r}){let{owner:i,repo:a,tag_name:u,name:c,body:p,target_commitish:m,draft:v,prerelease:_}=r,A={tag_name:u};c!==void 0&&(A.name=c),p!==void 0&&(A.body=p),m!==void 0&&(A.target_commitish=m),v!==void 0&&(A.draft=v),_!==void 0&&(A.prerelease=_);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/releases`,body:A})).body}catch(k){throw C(k,`Repository ${i}/${a}`)}}});var qw=T({auth:P,name:"list_releases",displayName:"List Releases (Agent)",description:"Lists the releases in a repository.",audience:"ai",aiMetadata:{description:"Lists the releases in a repository (GET /repos/{owner}/{repo}/releases), newest first, including drafts and prereleases. For just the latest published one use Get Latest Release. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:eP,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/releases`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var jw=T({auth:P,name:"get_release",displayName:"Get Release (Agent)",description:"Fetches a single release by its id.",audience:"ai",aiMetadata:{description:"Fetches a single release by its numeric id (GET /repos/{owner}/{repo}/releases/{release_id}). Resolve the id via List Releases. For the latest published release use Get Latest Release. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,release_id:h.Number({displayName:"Release ID",description:"The numeric release id. Resolve via List Releases.",required:!0})},outputSchema:ui,async run({auth:e,propsValue:r}){let{owner:i,repo:a,release_id:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/releases/${u}`})).body}catch(c){throw C(c,`Release ${u} in ${i}/${a}`)}}});var Bw=T({auth:P,name:"get_latest_release",displayName:"Get Latest Release (Agent)",description:"Fetches the latest published release.",audience:"ai",aiMetadata:{description:"Fetches the latest published release (GET /repos/{owner}/{repo}/releases/latest) \u2014 the most recent non-draft, non-prerelease release by date. Returns 404 if the repo has no published release. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:ui,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/releases/latest`})).body}catch(u){throw C(u,`Latest release in ${i}/${a}`)}}});var Fw=T({auth:P,name:"list_collaborators",displayName:"List Collaborators (Agent)",description:"Lists the collaborators on a repository.",audience:"ai",aiMetadata:{description:"Lists the collaborators on a repository (GET /repos/{owner}/{repo}/collaborators) with each one's permission level. Use to resolve logins for Request Pull Request Reviewers or Remove Collaborator. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},outputSchema:Zx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{let u=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/collaborators`});return{items:u,count:u.length}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Hw=T({auth:P,name:"add_collaborator",displayName:"Add Collaborator (Agent)",description:"Invites a user as a repository collaborator.",audience:"ai",aiMetadata:{description:"Adds (or invites) a user as a collaborator on a repository (PUT /repos/{owner}/{repo}/collaborators/{username}) with a permission level (pull, triage, push, maintain, admin). GRANTS ACCESS \u2014 requires repo-admin. Idempotent: re-adding with the same permission converges (a pending invite is created if the user must accept). Resolve logins via Search Users.",idempotent:!0},props:{owner:H,repo:G,username:h.ShortText({displayName:"Username",description:"The user login to add. Resolve via Search Users.",required:!0}),permission:h.StaticDropdown({displayName:"Permission",required:!1,options:{options:[{label:"Pull (read)",value:"pull"},{label:"Triage",value:"triage"},{label:"Push (write)",value:"push"},{label:"Maintain",value:"maintain"},{label:"Admin",value:"admin"}]}})},outputSchema:aP,async run({auth:e,propsValue:r}){let{owner:i,repo:a,username:u,permission:c}=r,p={};c!==void 0&&(p.permission=c);try{let m=await $({auth:e,method:"PUT",resourceUri:`/repos/${i}/${a}/collaborators/${u}`,body:p});return m.body??{success:!0,status:m.status}}catch(m){throw C(m,`User "${u}" on ${i}/${a}`)}}});var Gw=T({auth:P,name:"remove_collaborator",displayName:"Remove Collaborator (Agent)",description:"Revokes a user's collaborator access to a repository.",audience:"ai",aiMetadata:{description:"Removes a collaborator from a repository (DELETE /repos/{owner}/{repo}/collaborators/{username}). REVOKES ACCESS \u2014 requires repo-admin. Idempotent: removing a user who is not a collaborator ends in the same state. Resolve current collaborators via List Collaborators.",idempotent:!0},props:{owner:H,repo:G,username:h.ShortText({displayName:"Username",description:"The user login to remove. Resolve via List Collaborators.",required:!0})},async run({auth:e,propsValue:r}){let{owner:i,repo:a,username:u}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/repos/${i}/${a}/collaborators/${u}`})).status,removed:u}}catch(c){throw C(c,`User "${u}" on ${i}/${a}`)}}});var Zw=T({auth:P,name:"create_milestone",displayName:"Create Milestone (Agent)",description:"Creates a milestone in a repository.",audience:"ai",aiMetadata:{description:"Creates a milestone (POST /repos/{owner}/{repo}/milestones) with a title and optional description, state, and due_on date. Not idempotent: each call creates a new milestone even with an identical title.",idempotent:!1},props:{owner:H,repo:G,title:h.ShortText({displayName:"Title",required:!0}),description:h.LongText({displayName:"Description",required:!1}),state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),due_on:h.ShortText({displayName:"Due On",description:"ISO 8601 timestamp for the due date.",required:!1})},outputSchema:si,async run({auth:e,propsValue:r}){let{owner:i,repo:a,title:u,description:c,state:p,due_on:m}=r,v={title:u};c!==void 0&&(v.description=c),p!==void 0&&(v.state=p),m!==void 0&&(v.due_on=m);try{return(await $({auth:e,method:"POST",resourceUri:`/repos/${i}/${a}/milestones`,body:v})).body}catch(_){throw C(_,`Repository ${i}/${a}`)}}});var Vw=T({auth:P,name:"list_milestones",displayName:"List Milestones (Agent)",description:"Lists the milestones in a repository.",audience:"ai",aiMetadata:{description:"Lists the milestones in a repository (GET /repos/{owner}/{repo}/milestones) filtered by state. Use to resolve a milestone number for Update Issue. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"},{label:"All",value:"all"}]}})},outputSchema:Wx,async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r,u={};r.state&&(u.state=r.state);try{let c=await oe({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/milestones`,query:u});return{items:c,count:c.length}}catch(c){throw C(c,`Repository ${i}/${a}`)}}});var Ww=T({auth:P,name:"get_milestone",displayName:"Get Milestone (Agent)",description:"Fetches a single milestone by number.",audience:"ai",aiMetadata:{description:"Fetches a single milestone (GET /repos/{owner}/{repo}/milestones/{milestone_number}) including its open/closed issue counts. Resolve the number via List Milestones. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G,milestone_number:h.Number({displayName:"Milestone Number",description:"The milestone number. Resolve via List Milestones.",required:!0})},outputSchema:si,async run({auth:e,propsValue:r}){let{owner:i,repo:a,milestone_number:u}=r;try{return(await $({auth:e,method:"GET",resourceUri:`/repos/${i}/${a}/milestones/${u}`})).body}catch(c){throw C(c,`Milestone ${u} in ${i}/${a}`)}}});var Kw=T({auth:P,name:"update_milestone",displayName:"Update Milestone (Agent)",description:"Updates a milestone, including closing or reopening it.",audience:"ai",aiMetadata:{description:"Updates a milestone (PATCH /repos/{owner}/{repo}/milestones/{milestone_number}), setting only the fields you provide \u2014 title, state (open/closed), description, or due_on. Resolve the number via List Milestones. Idempotent: applying the same values again leaves the milestone in the same state.",idempotent:!0},props:{owner:H,repo:G,milestone_number:h.Number({displayName:"Milestone Number",description:"The milestone number. Resolve via List Milestones.",required:!0}),title:h.ShortText({displayName:"Title",required:!1}),state:h.StaticDropdown({displayName:"State",required:!1,options:{options:[{label:"Open",value:"open"},{label:"Closed",value:"closed"}]}}),description:h.LongText({displayName:"Description",required:!1}),due_on:h.ShortText({displayName:"Due On",description:"ISO 8601 timestamp for the due date.",required:!1})},outputSchema:si,async run({auth:e,propsValue:r}){let{owner:i,repo:a,milestone_number:u}=r,c={};r.title!==void 0&&(c.title=r.title),r.state!==void 0&&(c.state=r.state),r.description!==void 0&&(c.description=r.description),r.due_on!==void 0&&(c.due_on=r.due_on);try{return(await $({auth:e,method:"PATCH",resourceUri:`/repos/${i}/${a}/milestones/${u}`,body:c})).body}catch(p){throw C(p,`Milestone ${u} in ${i}/${a}`)}}});var Jw=T({auth:P,name:"star_repository",displayName:"Star Repository (Agent)",description:"Stars a repository for the connected user.",audience:"ai",aiMetadata:{description:"Stars a repository for the connected user (PUT /user/starred/{owner}/{repo}). User-context \u2014 not available under GitHub App auth (a bot has no stars). Idempotent: re-starring an already-starred repo keeps it starred.",idempotent:!0},props:{owner:H,repo:G},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return{success:!0,status:(await $({auth:e,method:"PUT",resourceUri:`/user/starred/${i}/${a}`})).status,starred:!0}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Xw=T({auth:P,name:"unstar_repository",displayName:"Unstar Repository (Agent)",description:"Removes a star from a repository for the connected user.",audience:"ai",aiMetadata:{description:"Removes the connected user's star from a repository (DELETE /user/starred/{owner}/{repo}). User-context \u2014 not available under GitHub App auth. Idempotent: unstarring an already-unstarred repo leaves it unstarred.",idempotent:!0},props:{owner:H,repo:G},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return{success:!0,status:(await $({auth:e,method:"DELETE",resourceUri:`/user/starred/${i}/${a}`})).status,starred:!1}}catch(u){throw C(u,`Repository ${i}/${a}`)}}});var Yw=T({auth:P,name:"list_starred_repositories",displayName:"List Starred Repositories (Agent)",description:"Lists the repositories the connected user has starred.",audience:"ai",aiMetadata:{description:"Lists the repositories the connected user has starred (GET /user/starred). User-context \u2014 under GitHub App auth there is no user, so it is empty/unavailable. Returns all pages. Read-only and idempotent.",idempotent:!0},props:{},outputSchema:Qr,async run({auth:e}){try{let r=await oe({auth:e,method:"GET",resourceUri:"/user/starred"});return{items:r,count:r.length}}catch(r){throw C(r,"The authenticated user")}}});var Qw=T({auth:P,name:"check_repository_starred",displayName:"Check Repository Starred (Agent)",description:"Checks whether the connected user has starred a repository.",audience:"ai",aiMetadata:{description:"Checks whether the connected user has starred a repository (GET /user/starred/{owner}/{repo}; 204 = starred, 404 = not starred). Returns { starred: boolean }. User-context \u2014 unavailable under GitHub App auth. Read-only and idempotent.",idempotent:!0},props:{owner:H,repo:G},async run({auth:e,propsValue:r}){let{owner:i,repo:a}=r;try{return await $({auth:e,method:"GET",resourceUri:`/user/starred/${i}/${a}`}),{starred:!0}}catch(u){if(u?.response?.status===404)return{starred:!1};throw C(u,`Repository ${i}/${a}`)}}});var h1=Vh({displayName:"GitHub",description:"Developer platform that allows developers to create, store, manage and share their code",minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/github.png",categories:["DEVELOPER_TOOLS"],auth:P,actions:[sP,vP,_P,xP,uP,PP,wP,AP,TP,SP,EP,IP,$P,kP,OP,NP,RP,zP,CP,DP,LP,UP,MP,qP,jP,BP,FP,HP,GP,ZP,VP,WP,KP,JP,XP,YP,QP,ew,tw,rw,nw,iw,ow,aw,sw,uw,cw,lw,pw,dw,mw,fw,hw,gw,yw,bw,vw,_w,xw,Pw,ww,Aw,Tw,Sw,Ew,Iw,$w,Rw,kw,Ow,Nw,zw,Cw,Dw,Lw,Uw,Mw,qw,jw,Bw,Fw,Hw,Gw,Zw,Vw,Ww,Kw,Jw,Xw,Yw,Qw,ub({baseUrl:o(()=>"https://api.github.com","baseUrl"),auth:P,authMapping:o(async e=>({Authorization:`Bearer ${await ii.getBearerToken(e)}`}),"authMapping")})],authors:["kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud","tintinthedev","murex971","sanket-a11y"],triggers:bP});0&&(module.exports={github});
|
|
76
76
|
/*! Bundled license information:
|
|
77
77
|
|
|
78
78
|
mime-types/index.js:
|