@activepieces/piece-microsoft-outlook 0.5.0 → 0.5.2

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/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";var qp=Object.create;var Zt=Object.defineProperty;var Gp=Object.getOwnPropertyDescriptor;var Wp=Object.getOwnPropertyNames;var Kp=Object.getPrototypeOf,Jp=Object.prototype.hasOwnProperty;var a=(e,t)=>Zt(e,"name",{value:t,configurable:!0});var Xp=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),io=(e,t)=>{for(var r in t)Zt(e,r,{get:t[r],enumerable:!0})},Vi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wp(t))!Jp.call(e,o)&&o!==r&&Zt(e,o,{get:()=>t[o],enumerable:!(n=Gp(t,o))||n.enumerable});return e};var ze=(e,t,r)=>(r=e!=null?qp(Kp(e)):{},Vi(t||!e||!e.__esModule?Zt(r,"default",{value:e,enumerable:!0}):r,e)),oe=e=>Vi(Zt({},"__esModule",{value:!0}),e);var as=b((is,Fr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),i="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(i,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${i})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${i})?$`,"i")};function p(l,m){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let _=0,h=-1,x=(l.match(u.zoneIndex)||[])[0],T,V;for(x&&(x=x.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)_++;if(l.substr(0,2)==="::"&&_--,l.substr(-2,2)==="::"&&_--,_>m)return null;for(V=m-_,T=":";V--;)T+="0:";return l=l.replace("::",T),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),m=function(){let de=l.split(":"),xe=[];for(let De=0;De<de.length;De++)xe.push(parseInt(de[De],16));return xe}(),{parts:m,zoneId:x}}a(p,"expandIPv6");function d(l,m,_,h){if(l.length!==m.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,T;for(;h>0;){if(T=_-h,T<0&&(T=0),l[x]>>T!==m[x]>>T)return!1;h-=_,x+=1}return!0}a(d,"matchCIDR");function f(l){if(o.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}a(f,"parseIntAuto");function v(l,m){for(;l.length<m;)l=`0${l}`;return l}a(v,"padPart");let y={};y.IPv4=function(){function l(m){if(m.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let _,h;for(_=0;_<m.length;_++)if(h=m[_],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=m}return a(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(m,_){let h;if(_===void 0&&(h=m,m=h[0],_=h[1]),m.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,m.octets,8,_)},l.prototype.prefixLengthFromSubnetMask=function(){let m=0,_=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,T,V;for(x=3;x>=0;x-=1)if(T=this.octets[x],T in h){if(V=h[T],_&&V!==0)return null;V!==8&&(_=!0),m+=V}else return null;return 32-m},l.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return y.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l}(),y.IPv4.broadcastAddressFromCIDR=function(l){try{let m=this.parseCIDR(l),_=m[0].toByteArray(),h=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],T=0;for(;T<4;)x.push(parseInt(_[T],10)|parseInt(h[T],10)^255),T++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.isIPv4=function(l){return this.parser(l)!==null},y.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},y.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},y.IPv4.isValidFourPartDecimal=function(l){return!!(y.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},y.IPv4.isValidCIDRFourPartDecimal=function(l){let m=l.match(/^(.+)\/(\d+)$/);return!y.IPv4.isValidCIDR(l)||!m?!1:y.IPv4.isValidFourPartDecimal(m[1])},y.IPv4.networkAddressFromCIDR=function(l){let m,_,h,x,T;try{for(m=this.parseCIDR(l),h=m[0].toByteArray(),T=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],_=0;_<4;)x.push(parseInt(h[_],10)&parseInt(T[_],10)),_++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},y.IPv4.parse=function(l){let m=this.parser(l);if(m===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(m)},y.IPv4.parseCIDR=function(l){let m;if(m=l.match(/^(.+)\/(\d+)$/)){let _=parseInt(m[2]);if(_>=0&&_<=32){let h=[this.parse(m[1]),_];return Object.defineProperty(h,"toString",{value:a(function(){return this.join("/")},"value")}),h}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},y.IPv4.parser=function(l){let m,_,h;if(m=l.match(r.fourOctet))return function(){let x=m.slice(1,6),T=[];for(let V=0;V<x.length;V++)_=x[V],T.push(f(_));return T}();if(m=l.match(r.longValue)){if(h=f(m[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return function(){let x=[],T;for(T=0;T<=24;T+=8)x.push(h>>T&255);return x}().reverse()}else return(m=l.match(r.twoOctet))?function(){let x=m.slice(1,4),T=[];if(h=f(x[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return T.push(f(x[0])),T.push(h>>16&255),T.push(h>>8&255),T.push(h&255),T}():(m=l.match(r.threeOctet))?function(){let x=m.slice(1,5),T=[];if(h=f(x[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return T.push(f(x[0])),T.push(f(x[1])),T.push(h>>8&255),T.push(h&255),T}():null},y.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let m=[0,0,0,0],_=0,h=Math.floor(l/8);for(;_<h;)m[_]=255,_++;return h<4&&(m[h]=Math.pow(2,l%8)-1<<8-l%8),new this(m)},y.IPv6=function(){function l(m,_){let h,x;if(m.length===16)for(this.parts=[],h=0;h<=14;h+=2)this.parts.push(m[h]<<8|m[h+1]);else if(m.length===8)this.parts=m;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(h=0;h<this.parts.length;h++)if(x=this.parts[h],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");_&&(this.zoneId=_)}return a(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(m,_){let h;if(_===void 0&&(h=m,m=h[0],_=h[1]),m.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,m.parts,16,_)},l.prototype.prefixLengthFromSubnetMask=function(){let m=0,_=!1,h={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},x,T;for(let V=7;V>=0;V-=1)if(x=this.parts[V],x in h){if(T=h[x],_&&T!==0)return null;T!==16&&(_=!0),m+=T}else return null;return 128-m},l.prototype.range=function(){return y.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let m,_=[],h=this.parts;for(let x=0;x<h.length;x++)m=h[x],_.push(m>>8),_.push(m&255);return _},l.prototype.toFixedLengthString=function(){let m=function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(v(this.parts[x].toString(16),4));return h}.call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),m+_},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let m=this.parts.slice(-2),_=m[0],h=m[1];return new y.IPv4([_>>8,_&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let m=function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(this.parts[x].toString(16));return h}.call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),m+_},l.prototype.toRFC5952String=function(){let m=/((^|:)(0(:|$)){2,})/g,_=this.toNormalizedString(),h=0,x=-1,T;for(;T=m.exec(_);)T[0].length>x&&(h=T.index,x=T[0].length);return x<0?_:`${_.substring(0,h)}::${_.substring(h+x)}`},l.prototype.toString=function(){return this.toRFC5952String()},l}(),y.IPv6.broadcastAddressFromCIDR=function(l){try{let m=this.parseCIDR(l),_=m[0].toByteArray(),h=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],T=0;for(;T<16;)x.push(parseInt(_[T],10)|parseInt(h[T],10)^255),T++;return new this(x)}catch(m){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${m})`)}},y.IPv6.isIPv6=function(l){return this.parser(l)!==null},y.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let m=this.parser(l);return new this(m.parts,m.zoneId),!0}catch{return!1}},y.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},y.IPv6.networkAddressFromCIDR=function(l){let m,_,h,x,T;try{for(m=this.parseCIDR(l),h=m[0].toByteArray(),T=this.subnetMaskFromPrefixLength(m[1]).toByteArray(),x=[],_=0;_<16;)x.push(parseInt(h[_],10)&parseInt(T[_],10)),_++;return new this(x)}catch(V){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${V})`)}},y.IPv6.parse=function(l){let m=this.parser(l);if(m.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(m.parts,m.zoneId)},y.IPv6.parseCIDR=function(l){let m,_,h;if((_=l.match(/^(.+)\/(\d+)$/))&&(m=parseInt(_[2]),m>=0&&m<=128))return h=[this.parse(_[1]),m],Object.defineProperty(h,"toString",{value:a(function(){return this.join("/")},"value")}),h;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},y.IPv6.parser=function(l){let m,_,h,x,T,V;if(h=l.match(u.deprecatedTransitional))return this.parser(`::ffff:${h[1]}`);if(u.native.test(l))return p(l,8);if((h=l.match(u.transitional))&&(V=h[6]||"",m=h[1],h[1].endsWith("::")||(m=m.slice(0,-1)),m=p(m+V,6),m.parts)){for(T=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],_=0;_<T.length;_++)if(x=T[_],!(0<=x&&x<=255))return null;return m.parts.push(T[0]<<8|T[1]),m.parts.push(T[2]<<8|T[3]),{parts:m.parts,zoneId:m.zoneId}}return null},y.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0,h=Math.floor(l/8);for(;_<h;)m[_]=255,_++;return h<16&&(m[h]=Math.pow(2,l%8)-1<<8-l%8),new this(m)},y.fromByteArray=function(l){let m=l.length;if(m===4)return new y.IPv4(l);if(m===16)return new y.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},y.isValid=function(l){return y.IPv6.isValid(l)||y.IPv4.isValid(l)},y.isValidCIDR=function(l){return y.IPv6.isValidCIDR(l)||y.IPv4.isValidCIDR(l)},y.parse=function(l){if(y.IPv6.isValid(l))return y.IPv6.parse(l);if(y.IPv4.isValid(l))return y.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},y.parseCIDR=function(l){try{return y.IPv6.parseCIDR(l)}catch{try{return y.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},y.process=function(l){let m=this.parse(l);return m.kind()==="ipv6"&&m.isIPv4MappedAddress()?m.toIPv4Address():m},y.subnetMatch=function(l,m,_){let h,x,T,V;_==null&&(_="unicast");for(x in m)if(Object.prototype.hasOwnProperty.call(m,x)){for(T=m[x],T[0]&&!(T[0]instanceof Array)&&(T=[T]),h=0;h<T.length;h++)if(V=T[h],l.kind()===V[0].kind()&&l.match.apply(l,V))return x}return _},typeof Fr<"u"&&Fr.exports?Fr.exports=y:e.ipaddr=y})(is)});var ru=b((ED,tu)=>{var eu=require("stream").Stream,Sm=require("util");tu.exports=ke;function ke(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(ke,"DelayedStream");Sm.inherits(ke,eu);ke.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ke.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});ke.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ke.prototype.resume=function(){this._released||this.release(),this.source.resume()};ke.prototype.pause=function(){this.source.pause()};ke.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ke.prototype.pipe=function(){var e=eu.prototype.pipe.apply(this,arguments);return this.resume(),e};ke.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)};ke.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 au=b((AD,iu)=>{var $m=require("util"),ou=require("stream").Stream,nu=ru();iu.exports=pe;function pe(){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}a(pe,"CombinedStream");$m.inherits(pe,ou);pe.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};pe.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};pe.prototype.append=function(e){var t=pe.isStreamLike(e);if(t){if(!(e instanceof nu)){var r=nu.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};pe.prototype.pipe=function(e,t){return ou.prototype.pipe.call(this,e,t),this.resume(),e};pe.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}};pe.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=pe.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};pe.prototype._pipeNext=function(e){this._currentStream=e;var t=pe.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};pe.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};pe.prototype.write=function(e){this.emit("data",e)};pe.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};pe.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")};pe.prototype.end=function(){this._reset(),this.emit("end")};pe.prototype.destroy=function(){this._reset(),this.emit("close")};pe.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};pe.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};pe.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};pe.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var uu=b(($D,su)=>{"use strict";su.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 pu=b(Te=>{"use strict";var Gr=uu(),wm=require("path").extname,cu=/^\s*([^;\s]*)(?:;|\s|$)/,Om=/^text\//i;Te.charset=lu;Te.charsets={lookup:lu};Te.contentType=zm;Te.extension=Rm;Te.extensions=Object.create(null);Te.lookup=km;Te.types=Object.create(null);Dm(Te.extensions,Te.types);function lu(e){if(!e||typeof e!="string")return!1;var t=cu.exec(e),r=t&&Gr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Om.test(t[1])?"UTF-8":!1}a(lu,"charset");function zm(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}a(zm,"contentType");function Rm(e){if(!e||typeof e!="string")return!1;var t=cu.exec(e),r=t&&Te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}a(Rm,"extension");function km(e){if(!e||typeof e!="string")return!1;var t=wm("x."+e).toLowerCase().substr(1);return t&&Te.types[t]||!1}a(km,"lookup");function Dm(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Gr).forEach(a(function(o){var i=Gr[o],s=i.extensions;if(!(!s||!s.length)){e[o]=s;for(var u=0;u<s.length;u++){var p=s[u];if(t[p]){var d=r.indexOf(Gr[t[p]].source),f=r.indexOf(i.source);if(t[p]!=="application/octet-stream"&&(d>f||d===f&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}a(Dm,"populateMaps")});var fu=b((zD,du)=>{du.exports=Cm;function Cm(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(Cm,"defer")});var Wo=b((kD,gu)=>{var mu=fu();gu.exports=Nm;function Nm(e){var t=!1;return mu(function(){t=!0}),a(function(n,o){t?e(n,o):mu(a(function(){e(n,o)},"nextTick_callback"))},"async_callback")}a(Nm,"async")});var Ko=b((CD,hu)=>{hu.exports=Mm;function Mm(e){Object.keys(e.jobs).forEach(Um.bind(e)),e.jobs={}}a(Mm,"abort");function Um(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(Um,"clean")});var Jo=b((MD,vu)=>{var yu=Wo(),Lm=Ko();vu.exports=jm;function jm(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=Fm(t,o,e[o],function(i,s){o in r.jobs&&(delete r.jobs[o],i?Lm(r):r.results[o]=s,n(i,r.results))})}a(jm,"iterate");function Fm(e,t,r,n){var o;return e.length==2?o=e(r,yu(n)):o=e(r,t,yu(n)),o}a(Fm,"runJob")});var Xo=b((LD,_u)=>{_u.exports=Bm;function Bm(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,i){return t(e[o],e[i])}),n}a(Bm,"state")});var Yo=b((FD,xu)=>{var Vm=Ko(),Hm=Wo();xu.exports=Zm;function Zm(e){Object.keys(this.jobs).length&&(this.index=this.size,Vm(this),Hm(e)(null,this.results))}a(Zm,"terminator")});var bu=b((VD,Pu)=>{var qm=Jo(),Gm=Xo(),Wm=Yo();Pu.exports=Km;function Km(e,t,r){for(var n=Gm(e);n.index<(n.keyedList||e).length;)qm(e,t,n,function(o,i){if(o){r(o,i);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Wm.bind(n,r)}a(Km,"parallel")});var Qo=b((ZD,Wr)=>{var Tu=Jo(),Jm=Xo(),Xm=Yo();Wr.exports=Ym;Wr.exports.ascending=Eu;Wr.exports.descending=Qm;function Ym(e,t,r,n){var o=Jm(e,r);return Tu(e,t,o,a(function i(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){Tu(e,t,o,i);return}n(null,o.results)},"iteratorHandler")),Xm.bind(o,n)}a(Ym,"serialOrdered");function Eu(e,t){return e<t?-1:e>t?1:0}a(Eu,"ascending");function Qm(e,t){return-1*Eu(e,t)}a(Qm,"descending")});var Au=b((GD,Iu)=>{var eg=Qo();Iu.exports=tg;function tg(e,t,r){return eg(e,t,null,r)}a(tg,"serial")});var $u=b((KD,Su)=>{Su.exports={parallel:bu(),serial:Au(),serialOrdered:Qo()}});var ei=b((JD,wu)=>{"use strict";wu.exports=Object});var zu=b((XD,Ou)=>{"use strict";Ou.exports=Error});var ku=b((YD,Ru)=>{"use strict";Ru.exports=EvalError});var Cu=b((QD,Du)=>{"use strict";Du.exports=RangeError});var Mu=b((eC,Nu)=>{"use strict";Nu.exports=ReferenceError});var Lu=b((tC,Uu)=>{"use strict";Uu.exports=SyntaxError});var Kr=b((rC,ju)=>{"use strict";ju.exports=TypeError});var Bu=b((nC,Fu)=>{"use strict";Fu.exports=URIError});var Hu=b((oC,Vu)=>{"use strict";Vu.exports=Math.abs});var qu=b((iC,Zu)=>{"use strict";Zu.exports=Math.floor});var Wu=b((aC,Gu)=>{"use strict";Gu.exports=Math.max});var Ju=b((sC,Ku)=>{"use strict";Ku.exports=Math.min});var Yu=b((uC,Xu)=>{"use strict";Xu.exports=Math.pow});var ec=b((cC,Qu)=>{"use strict";Qu.exports=Math.round});var rc=b((lC,tc)=>{"use strict";tc.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var oc=b((dC,nc)=>{"use strict";var rg=rc();nc.exports=a(function(t){return rg(t)||t===0?t:t<0?-1:1},"sign")});var ac=b((mC,ic)=>{"use strict";ic.exports=Object.getOwnPropertyDescriptor});var ti=b((gC,sc)=>{"use strict";var Jr=ac();if(Jr)try{Jr([],"length")}catch{Jr=null}sc.exports=Jr});var cc=b((hC,uc)=>{"use strict";var Xr=Object.defineProperty||!1;if(Xr)try{Xr({},"a",{value:1})}catch{Xr=!1}uc.exports=Xr});var ri=b((yC,lc)=>{"use strict";lc.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var fc=b((_C,dc)=>{"use strict";var pc=typeof Symbol<"u"&&Symbol,ng=ri();dc.exports=a(function(){return typeof pc!="function"||typeof Symbol!="function"||typeof pc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ng()},"hasNativeSymbols")});var ni=b((PC,mc)=>{"use strict";mc.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var oi=b((bC,gc)=>{"use strict";var og=ei();gc.exports=og.getPrototypeOf||null});var vc=b((TC,yc)=>{"use strict";var ig="Function.prototype.bind called on incompatible ",ag=Object.prototype.toString,sg=Math.max,ug="[object Function]",hc=a(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},"concatty"),cg=a(function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},"slicy"),lg=a(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");yc.exports=a(function(t){var r=this;if(typeof r!="function"||ag.apply(r)!==ug)throw new TypeError(ig+r);for(var n=cg(arguments,1),o,i=a(function(){if(this instanceof o){var f=r.apply(this,hc(n,arguments));return Object(f)===f?f:this}return r.apply(t,hc(n,arguments))},"binder"),s=sg(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+lg(u,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var d=a(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var $t=b((IC,_c)=>{"use strict";var pg=vc();_c.exports=Function.prototype.bind||pg});var Yr=b((AC,xc)=>{"use strict";xc.exports=Function.prototype.call});var ii=b((SC,Pc)=>{"use strict";Pc.exports=Function.prototype.apply});var Tc=b(($C,bc)=>{"use strict";bc.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ic=b((wC,Ec)=>{"use strict";var dg=$t(),fg=ii(),mg=Yr(),gg=Tc();Ec.exports=gg||dg.call(mg,fg)});var Sc=b((OC,Ac)=>{"use strict";var hg=$t(),yg=Kr(),vg=Yr(),_g=Ic();Ac.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new yg("a function is required");return _g(hg,vg,t)},"callBindBasic")});var kc=b((RC,Rc)=>{"use strict";var xg=Sc(),$c=ti(),Oc;try{Oc=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var ai=!!Oc&&$c&&$c(Object.prototype,"__proto__"),zc=Object,wc=zc.getPrototypeOf;Rc.exports=ai&&typeof ai.get=="function"?xg([ai.get]):typeof wc=="function"?a(function(t){return wc(t==null?t:zc(t))},"getDunder"):!1});var Uc=b((DC,Mc)=>{"use strict";var Dc=ni(),Cc=oi(),Nc=kc();Mc.exports=Dc?a(function(t){return Dc(t)},"getProto"):Cc?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Cc(t)},"getProto"):Nc?a(function(t){return Nc(t)},"getProto"):null});var si=b((NC,Lc)=>{"use strict";var Pg=Function.prototype.call,bg=Object.prototype.hasOwnProperty,Tg=$t();Lc.exports=Tg.call(Pg,bg)});var qc=b((MC,Zc)=>{"use strict";var K,Eg=ei(),Ig=zu(),Ag=ku(),Sg=Cu(),$g=Mu(),Rt=Lu(),zt=Kr(),wg=Bu(),Og=Hu(),zg=qu(),Rg=Wu(),kg=Ju(),Dg=Yu(),Cg=ec(),Ng=oc(),Vc=Function,ui=a(function(e){try{return Vc('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),dr=ti(),Mg=cc(),ci=a(function(){throw new zt},"throwTypeError"),Ug=dr?function(){try{return arguments.callee,ci}catch{try{return dr(arguments,"callee").get}catch{return ci}}}():ci,wt=fc()(),ve=Uc(),Lg=oi(),jg=ni(),Hc=ii(),fr=Yr(),Ot={},Fg=typeof Uint8Array>"u"||!ve?K:ve(Uint8Array),dt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":wt&&ve?ve([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":Ot,"%AsyncGenerator%":Ot,"%AsyncGeneratorFunction%":Ot,"%AsyncIteratorPrototype%":Ot,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ig,"%eval%":eval,"%EvalError%":Ag,"%Float16Array%":typeof Float16Array>"u"?K:Float16Array,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":Vc,"%GeneratorFunction%":Ot,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wt&&ve?ve(ve([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!wt||!ve?K:ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Eg,"%Object.getOwnPropertyDescriptor%":dr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":Sg,"%ReferenceError%":$g,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!wt||!ve?K:ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wt&&ve?ve(""[Symbol.iterator]()):K,"%Symbol%":wt?Symbol:K,"%SyntaxError%":Rt,"%ThrowTypeError%":Ug,"%TypedArray%":Fg,"%TypeError%":zt,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":wg,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet,"%Function.prototype.call%":fr,"%Function.prototype.apply%":Hc,"%Object.defineProperty%":Mg,"%Object.getPrototypeOf%":Lg,"%Math.abs%":Og,"%Math.floor%":zg,"%Math.max%":Rg,"%Math.min%":kg,"%Math.pow%":Dg,"%Math.round%":Cg,"%Math.sign%":Ng,"%Reflect.getPrototypeOf%":jg};if(ve)try{null.error}catch(e){jc=ve(ve(e)),dt["%Error.prototype%"]=jc}var jc,Bg=a(function e(t){var r;if(t==="%AsyncFunction%")r=ui("async function () {}");else if(t==="%GeneratorFunction%")r=ui("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=ui("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ve&&(r=ve(o.prototype))}return dt[t]=r,r},"doEval"),Fc={__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"]},mr=$t(),Qr=si(),Vg=mr.call(fr,Array.prototype.concat),Hg=mr.call(Hc,Array.prototype.splice),Bc=mr.call(fr,String.prototype.replace),en=mr.call(fr,String.prototype.slice),Zg=mr.call(fr,RegExp.prototype.exec),qg=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gg=/\\(\\)?/g,Wg=a(function(t){var r=en(t,0,1),n=en(t,-1);if(r==="%"&&n!=="%")throw new Rt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Rt("invalid intrinsic syntax, expected opening `%`");var o=[];return Bc(t,qg,function(i,s,u,p){o[o.length]=u?Bc(p,Gg,"$1"):s||i}),o},"stringToPath"),Kg=a(function(t,r){var n=t,o;if(Qr(Fc,n)&&(o=Fc[n],n="%"+o[0]+"%"),Qr(dt,n)){var i=dt[n];if(i===Ot&&(i=Bg(n)),typeof i>"u"&&!r)throw new zt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Rt("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Zc.exports=a(function(t,r){if(typeof t!="string"||t.length===0)throw new zt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new zt('"allowMissing" argument must be a boolean');if(Zg(/^%?[^%]*%?$/,t)===null)throw new Rt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wg(t),o=n.length>0?n[0]:"",i=Kg("%"+o+"%",r),s=i.name,u=i.value,p=!1,d=i.alias;d&&(o=d[0],Hg(n,Vg([0,1],d)));for(var f=1,v=!0;f<n.length;f+=1){var y=n[f],l=en(y,0,1),m=en(y,-1);if((l==='"'||l==="'"||l==="`"||m==='"'||m==="'"||m==="`")&&l!==m)throw new Rt("property names with quotes must have matching quotes");if((y==="constructor"||!v)&&(p=!0),o+="."+y,s="%"+o+"%",Qr(dt,s))u=dt[s];else if(u!=null){if(!(y in u)){if(!r)throw new zt("base intrinsic for "+t+" exists, but the property is not available.");return}if(dr&&f+1>=n.length){var _=dr(u,y);v=!!_,v&&"get"in _&&!("originalValue"in _.get)?u=_.get:u=u[y]}else v=Qr(u,y),u=u[y];v&&!p&&(dt[s]=u)}}return u},"GetIntrinsic")});var Wc=b((LC,Gc)=>{"use strict";var Jg=ri();Gc.exports=a(function(){return Jg()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Xc=b((FC,Jc)=>{"use strict";var Xg=qc(),Kc=Xg("%Object.defineProperty%",!0),Yg=Wc()(),Qg=si(),eh=Kr(),tn=Yg?Symbol.toStringTag:null;Jc.exports=a(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new eh("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tn&&(n||!Qg(t,tn))&&(Kc?Kc(t,tn,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[tn]=r)},"setToStringTag")});var Qc=b((VC,Yc)=>{"use strict";var th=Function.prototype.call,rh=Object.prototype.hasOwnProperty,nh=$t();Yc.exports=nh.call(th,rh)});var tl=b((HC,el)=>{"use strict";el.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ol=b((ZC,nl)=>{"use strict";var fi=au(),oh=require("util"),li=require("path"),ih=require("http"),ah=require("https"),sh=require("url").parse,uh=require("fs"),ch=require("stream").Stream,lh=require("crypto"),pi=pu(),ph=$u(),dh=Xc(),tt=Qc(),di=tl();function rl(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(rl,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],fi.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(X,"FormData");oh.inherits(X,fi);X.LINE_BREAK=`\r
2
- `;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=fi.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),i=this._multiPartFooter();n(o),n(t),n(i),this._trackLength(o,t,r)};X.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+X.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&tt(t,"httpVersion"))&&!(t instanceof ch))&&(r.knownLength||this._valuesToMeasure.push(t))};X.prototype._lengthRetriever=function(e,t){tt(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):uh.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):tt(e,"httpVersion")?t(null,Number(e.headers["content-length"])):tt(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};X.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),i="",s={"Content-Disposition":["form-data",'name="'+rl(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&di(s,r.header);var u;for(var p in s)if(tt(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+i+X.LINE_BREAK};X.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=li.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=li.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&tt(e,"httpVersion")&&(r=li.basename(e.client._httpMessage.path||"")),r)return'filename="'+rl(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=pi.lookup(e.name)),!r&&e&&e.path&&(r=pi.lookup(e.path)),!r&&e&&e.readable&&tt(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=pi.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=X.DEFAULT_CONTENT_TYPE),r};X.prototype._multiPartFooter=function(){return function(e){var t=X.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};X.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+X.LINE_BREAK};X.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)tt(e,t)&&(r[t.toLowerCase()]=e[t]);return r};X.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};X.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};X.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(X.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};X.prototype._generateBoundary=function(){this._boundary="--------------------------"+lh.randomBytes(12).toString("hex")};X.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};X.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};X.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}ph.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};X.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=sh(e),n=di({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=di(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=ah.request(n):r=ih.request(n),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=a(function(d,f){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,f)},"callback");u=p.bind(this,null),r.on("error",p),r.on("response",u)}}.bind(this)),r};X.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};X.prototype.toString=function(){return"[object FormData]"};dh(X.prototype,"FormData");nl.exports=X});var ae={};io(ae,{__addDisposableResource:()=>Ul,__assign:()=>nn,__asyncDelegator:()=>Ol,__asyncGenerator:()=>wl,__asyncValues:()=>zl,__await:()=>kt,__awaiter:()=>Tl,__classPrivateFieldGet:()=>Cl,__classPrivateFieldIn:()=>Ml,__classPrivateFieldSet:()=>Nl,__createBinding:()=>an,__decorate:()=>hl,__disposeResources:()=>Ll,__esDecorate:()=>vl,__exportStar:()=>Il,__extends:()=>ml,__generator:()=>El,__importDefault:()=>Dl,__importStar:()=>kl,__makeTemplateObject:()=>Rl,__metadata:()=>bl,__param:()=>yl,__propKey:()=>xl,__read:()=>hi,__rest:()=>gl,__rewriteRelativeImportExtension:()=>jl,__runInitializers:()=>_l,__setFunctionName:()=>Pl,__spread:()=>Al,__spreadArray:()=>$l,__spreadArrays:()=>Sl,__values:()=>on,default:()=>Ih});function ml(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mi(e,t);function r(){this.constructor=e}a(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function gl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function hl(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function yl(e,t){return function(r,n){t(r,n,e)}}function vl(e,t,r,n,o,i){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}a(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),v,y=!1,l=r.length-1;l>=0;l--){var m={};for(var _ in n)m[_]=_==="access"?{}:n[_];for(var _ in n.access)m.access[_]=n.access[_];m.addInitializer=function(x){if(y)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(x||null))};var h=(0,r[l])(u==="accessor"?{get:f.get,set:f.set}:f[p],m);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(v=s(h.get))&&(f.get=v),(v=s(h.set))&&(f.set=v),(v=s(h.init))&&o.unshift(v)}else(v=s(h))&&(u==="field"?o.unshift(v):f[p]=v)}d&&Object.defineProperty(d,n.name,f),y=!0}function _l(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function xl(e){return typeof e=="symbol"?e:"".concat(e)}function Pl(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function bl(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Tl(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return a(o,"adopt"),new(r||(r=Promise))(function(i,s){function u(f){try{d(n.next(f))}catch(v){s(v)}}a(u,"fulfilled");function p(f){try{d(n.throw(f))}catch(v){s(v)}}a(p,"rejected");function d(f){f.done?i(f.value):o(f.value).then(u,p)}a(d,"step"),d((n=n.apply(e,t||[])).next())})}function El(e,t){var r={label:0,sent:a(function(){if(i[0]&1)throw i[1];return i[1]},"sent"),trys:[],ops:[]},n,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(f){return p([d,f])}}function p(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){r.label=d[1];break}if(d[0]===6&&r.label<i[1]){r.label=i[1],i=d;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(d);break}i[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(f){d=[6,f],o=0}finally{n=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Il(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&an(t,e,r)}function on(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:a(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function hi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function Al(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hi(arguments[t]));return e}function Sl(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,o++)n[o]=i[s];return n}function $l(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function kt(e){return this instanceof kt?(this.v=e,this):new kt(e)}function wl(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(l){return function(m){return Promise.resolve(m).then(l,v)}}function u(l,m){n[l]&&(o[l]=function(_){return new Promise(function(h,x){i.push([l,_,h,x])>1||p(l,_)})},m&&(o[l]=m(o[l])))}function p(l,m){try{d(n[l](m))}catch(_){y(i[0][3],_)}}function d(l){l.value instanceof kt?Promise.resolve(l.value.v).then(f,v):y(i[0][2],l)}function f(l){p("next",l)}function v(l){p("throw",l)}function y(l,m){l(m),i.shift(),i.length&&p(i[0][0],i[0][1])}}function Ol(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(s){return(r=!r)?{value:kt(e[o](s)),done:!1}:i?i(s):s}:i}}function zl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof on=="function"?on(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(u,p){s=e[i](s),o(u,p,s.done,s.value)})}}function o(i,s,u,p){Promise.resolve(p).then(function(d){i({value:d,done:u})},s)}}function Rl(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function kl(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=gi(e),n=0;n<r.length;n++)r[n]!=="default"&&an(t,e,r[n]);return Th(t,e),t}function Dl(e){return e&&e.__esModule?e:{default:e}}function Cl(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Nl(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Ml(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Ul(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=a(function(){try{o.call(this)}catch(i){return Promise.reject(i)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Ll(e){function t(i){e.error=e.hasError?new Eh(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}a(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(s){return t(s),o()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a(o,"next"),o()}function jl(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,i,s){return n?t?".jsx":".js":o&&(!i||!s)?r:o+i+"."+s.toLowerCase()+"js"}):e}var mi,nn,an,Th,gi,Eh,Ih,se=Xp(()=>{mi=a(function(e,t){return mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},mi(e,t)},"extendStatics");a(ml,"__extends");nn=a(function(){return nn=Object.assign||a(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},"__assign"),nn.apply(this,arguments)},"__assign");a(gl,"__rest");a(hl,"__decorate");a(yl,"__param");a(vl,"__esDecorate");a(_l,"__runInitializers");a(xl,"__propKey");a(Pl,"__setFunctionName");a(bl,"__metadata");a(Tl,"__awaiter");a(El,"__generator");an=Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};a(Il,"__exportStar");a(on,"__values");a(hi,"__read");a(Al,"__spread");a(Sl,"__spreadArrays");a($l,"__spreadArray");a(kt,"__await");a(wl,"__asyncGenerator");a(Ol,"__asyncDelegator");a(zl,"__asyncValues");a(Rl,"__makeTemplateObject");Th=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},gi=a(function(e){return gi=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},gi(e)},"ownKeys");a(kl,"__importStar");a(Dl,"__importDefault");a(Cl,"__classPrivateFieldGet");a(Nl,"__classPrivateFieldSet");a(Ml,"__classPrivateFieldIn");a(Ul,"__addDisposableResource");Eh=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};a(Ll,"__disposeResources");a(jl,"__rewriteRelativeImportExtension");Ih={__extends:ml,__assign:nn,__rest:gl,__decorate:hl,__param:yl,__esDecorate:vl,__runInitializers:_l,__propKey:xl,__setFunctionName:Pl,__metadata:bl,__awaiter:Tl,__generator:El,__createBinding:an,__exportStar:Il,__values:on,__read:hi,__spread:Al,__spreadArrays:Sl,__spreadArray:$l,__await:kt,__asyncGenerator:wl,__asyncDelegator:Ol,__asyncValues:zl,__makeTemplateObject:Rl,__importStar:kl,__importDefault:Dl,__classPrivateFieldGet:Cl,__classPrivateFieldSet:Nl,__classPrivateFieldIn:Ml,__addDisposableResource:Ul,__disposeResources:Ll,__rewriteRelativeImportExtension:jl}});var hr=b(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.RequestMethod=void 0;var Fl;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(Fl||(sn.RequestMethod=Fl={}))});var Bl=b(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.BatchRequestContent=void 0;var Dt=(se(),oe(ae)),yi=hr(),Ah=function(){function e(t){if(this.requests=new Map,typeof t<"u"){var r=e.requestLimit;if(t.length>r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}for(var o=0,i=t;o<i.length;o++){var s=i[o];this.addRequest(s)}}}return a(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=a(function(s){for(var u=s.entries(),p=u.next();!p.done;){var d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;p=u.next()}return!0},"isParallel"),n=a(function(s){var u=s.entries(),p=u.next(),d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;var f=p;for(p=u.next();!p.done;){var v=p.value[1];if(v.dependsOn===void 0||v.dependsOn.length!==1||v.dependsOn[0]!==f.value[1].id)return!1;f=p,p=u.next()}return!0},"isSerial"),o=a(function(s){var u=s.entries(),p=u.next(),d=p.value[1],f;if(d.dependsOn===void 0||d.dependsOn.length===0)f=d.id;else if(d.dependsOn.length===1){var v=d.dependsOn[0];if(v!==d.id&&s.has(v))f=v;else return!1}else return!1;for(p=u.next();!p.done;){var y=p.value[1];if((y.dependsOn===void 0||y.dependsOn.length===0)&&f!==y.id||y.dependsOn!==void 0&&y.dependsOn.length!==0&&(y.dependsOn.length===1&&(y.id===f||y.dependsOn[0]!==f)||y.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var i=new Error("Empty requests map, Please provide at least one request.");throw i.name="Empty Requests Error",i}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n,o,i;return Dt.__generator(this,function(s){switch(s.label){case 0:return r={url:""},n=new RegExp("^https?://"),r.url=n.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,r.method=t.method,o={},t.headers.forEach(function(u,p){o[p]=u}),Object.keys(o).length&&(r.headers=o),t.method===yi.RequestMethod.PATCH||t.method===yi.RequestMethod.POST||t.method===yi.RequestMethod.PUT?(i=r,[4,e.getRequestBody(t)]):[3,2];case 1:i.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u,p,d;return Dt.__generator(this,function(f){switch(f.label){case 0:r=!1,f.label=1;case 1:return f.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=f.sent(),r=!0,[3,4];case 3:return i=f.sent(),[3,4];case 4:if(r)return[3,12];f.label=5;case 5:return f.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=f.sent(),u=new FileReader,[4,new Promise(function(v){u.addEventListener("load",function(){var y=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),m=l.exec(y);v(m[4])},!1),u.readAsDataURL(s)})];case 7:return n=f.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=f.sent(),n=p.toString("base64"),f.label=10;case 10:return r=!0,[3,12];case 11:return d=f.sent(),[3,12];case 12:return[2,n]}})})},e.prototype.addRequest=function(t){var r=e.requestLimit;if(t.id===""){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}if(this.requests.has(t.id)){var n=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw n.name="Duplicate RequestId Error",n}return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(t){for(var r=this.requests.delete(t),n=this.requests.entries(),o=n.next();!o.done;){var i=o.value[1].dependsOn;if(typeof i<"u"){var s=i.indexOf(t);s!==-1&&i.splice(s,1),i.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return Dt.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,i,s,u;return Dt.__generator(this,function(p){switch(p.label){case 0:if(t=[],r={requests:t},n=this.requests.entries(),o=n.next(),o.done)throw u=new Error("No requests added yet, Please add at least one request."),u.name="Empty Payload",u;if(!e.validateDependencies(this.requests))throw u=new Error(`Invalid dependency found, Dependency should be:
1
+ "use strict";var sd=Object.create;var qt=Object.defineProperty;var ud=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ld=Object.getPrototypeOf,pd=Object.prototype.hasOwnProperty;var a=(e,t)=>qt(e,"name",{value:t,configurable:!0});var dd=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},uo=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},qi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cd(t))!pd.call(e,o)&&o!==r&&qt(e,o,{get:()=>t[o],enumerable:!(n=ud(t,o))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?sd(ld(e)):{},qi(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e)),ie=e=>qi(qt({},"__esModule",{value:!0}),e);var gs=b((fs,Zr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),i="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(i,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${i})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${i})?$`,"i")};function p(l,f){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let _=0,h=-1,x=(l.match(u.zoneIndex)||[])[0],E,V;for(x&&(x=x.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)_++;if(l.substr(0,2)==="::"&&_--,l.substr(-2,2)==="::"&&_--,_>f)return null;for(V=f-_,E=":";V--;)E+="0:";return l=l.replace("::",E),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),f=(function(){let me=l.split(":"),Pe=[];for(let ke=0;ke<me.length;ke++)Pe.push(parseInt(me[ke],16));return Pe})(),{parts:f,zoneId:x}}a(p,"expandIPv6");function d(l,f,_,h){if(l.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,E;for(;h>0;){if(E=_-h,E<0&&(E=0),l[x]>>E!==f[x]>>E)return!1;h-=_,x+=1}return!0}a(d,"matchCIDR");function m(l){if(o.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}a(m,"parseIntAuto");function y(l,f){for(;l.length<f;)l=`0${l}`;return l}a(y,"padPart");let v={};v.IPv4=(function(){function l(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let _,h;for(_=0;_<f.length;_++)if(h=f[_],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return a(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(f,_){let h;if(_===void 0&&(h=f,f=h[0],_=h[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,f.octets,8,_)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,_=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,E,V;for(x=3;x>=0;x-=1)if(E=this.octets[x],E in h){if(V=h[E],_&&V!==0)return null;V!==8&&(_=!0),f+=V}else return null;return 32-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return v.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l})(),v.IPv4.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),_=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],E=0;for(;E<4;)x.push(parseInt(_[E],10)|parseInt(h[E],10)^255),E++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.isIPv4=function(l){return this.parser(l)!==null},v.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},v.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv4.isValidFourPartDecimal=function(l){return!!(v.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},v.IPv4.isValidCIDRFourPartDecimal=function(l){let f=l.match(/^(.+)\/(\d+)$/);return!v.IPv4.isValidCIDR(l)||!f?!1:v.IPv4.isValidFourPartDecimal(f[1])},v.IPv4.networkAddressFromCIDR=function(l){let f,_,h,x,E;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),E=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],_=0;_<4;)x.push(parseInt(h[_],10)&parseInt(E[_],10)),_++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.parse=function(l){let f=this.parser(l);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},v.IPv4.parseCIDR=function(l){let f;if(f=l.match(/^(.+)\/(\d+)$/)){let _=parseInt(f[2]);if(_>=0&&_<=32){let h=[this.parse(f[1]),_];return Object.defineProperty(h,"toString",{value:a(function(){return this.join("/")},"value")}),h}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},v.IPv4.parser=function(l){let f,_,h;if(f=l.match(r.fourOctet))return(function(){let x=f.slice(1,6),E=[];for(let V=0;V<x.length;V++)_=x[V],E.push(m(_));return E})();if(f=l.match(r.longValue)){if(h=m(f[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],E;for(E=0;E<=24;E+=8)x.push(h>>E&255);return x})().reverse()}else return(f=l.match(r.twoOctet))?(function(){let x=f.slice(1,4),E=[];if(h=m(x[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return E.push(m(x[0])),E.push(h>>16&255),E.push(h>>8&255),E.push(h&255),E})():(f=l.match(r.threeOctet))?(function(){let x=f.slice(1,5),E=[];if(h=m(x[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return E.push(m(x[0])),E.push(m(x[1])),E.push(h>>8&255),E.push(h&255),E})():null},v.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],_=0,h=Math.floor(l/8);for(;_<h;)f[_]=255,_++;return h<4&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.IPv6=(function(){function l(f,_){let h,x;if(f.length===16)for(this.parts=[],h=0;h<=14;h+=2)this.parts.push(f[h]<<8|f[h+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(h=0;h<this.parts.length;h++)if(x=this.parts[h],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");_&&(this.zoneId=_)}return a(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(f,_){let h;if(_===void 0&&(h=f,f=h[0],_=h[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,f.parts,16,_)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,_=!1,h={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},x,E;for(let V=7;V>=0;V-=1)if(x=this.parts[V],x in h){if(E=h[x],_&&E!==0)return null;E!==16&&(_=!0),f+=E}else return null;return 128-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let f,_=[],h=this.parts;for(let x=0;x<h.length;x++)f=h[x],_.push(f>>8),_.push(f&255);return _},l.prototype.toFixedLengthString=function(){let f=(function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(y(this.parts[x].toString(16),4));return h}).call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),f+_},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),_=f[0],h=f[1];return new v.IPv4([_>>8,_&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let f=(function(){let h=[];for(let x=0;x<this.parts.length;x++)h.push(this.parts[x].toString(16));return h}).call(this).join(":"),_="";return this.zoneId&&(_=`%${this.zoneId}`),f+_},l.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,_=this.toNormalizedString(),h=0,x=-1,E;for(;E=f.exec(_);)E[0].length>x&&(h=E.index,x=E[0].length);return x<0?_:`${_.substring(0,h)}::${_.substring(h+x)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),v.IPv6.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),_=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],E=0;for(;E<16;)x.push(parseInt(_[E],10)|parseInt(h[E],10)^255),E++;return new this(x)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},v.IPv6.isIPv6=function(l){return this.parser(l)!==null},v.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let f=this.parser(l);return new this(f.parts,f.zoneId),!0}catch{return!1}},v.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv6.networkAddressFromCIDR=function(l){let f,_,h,x,E;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),E=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),x=[],_=0;_<16;)x.push(parseInt(h[_],10)&parseInt(E[_],10)),_++;return new this(x)}catch(V){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${V})`)}},v.IPv6.parse=function(l){let f=this.parser(l);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},v.IPv6.parseCIDR=function(l){let f,_,h;if((_=l.match(/^(.+)\/(\d+)$/))&&(f=parseInt(_[2]),f>=0&&f<=128))return h=[this.parse(_[1]),f],Object.defineProperty(h,"toString",{value:a(function(){return this.join("/")},"value")}),h;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},v.IPv6.parser=function(l){let f,_,h,x,E,V;if(h=l.match(u.deprecatedTransitional))return this.parser(`::ffff:${h[1]}`);if(u.native.test(l))return p(l,8);if((h=l.match(u.transitional))&&(V=h[6]||"",f=h[1],h[1].endsWith("::")||(f=f.slice(0,-1)),f=p(f+V,6),f.parts)){for(E=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],_=0;_<E.length;_++)if(x=E[_],!(0<=x&&x<=255))return null;return f.parts.push(E[0]<<8|E[1]),f.parts.push(E[2]<<8|E[3]),{parts:f.parts,zoneId:f.zoneId}}return null},v.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0,h=Math.floor(l/8);for(;_<h;)f[_]=255,_++;return h<16&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.fromByteArray=function(l){let f=l.length;if(f===4)return new v.IPv4(l);if(f===16)return new v.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},v.isValid=function(l){return v.IPv6.isValid(l)||v.IPv4.isValid(l)},v.isValidCIDR=function(l){return v.IPv6.isValidCIDR(l)||v.IPv4.isValidCIDR(l)},v.parse=function(l){if(v.IPv6.isValid(l))return v.IPv6.parse(l);if(v.IPv4.isValid(l))return v.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},v.parseCIDR=function(l){try{return v.IPv6.parseCIDR(l)}catch{try{return v.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},v.process=function(l){let f=this.parse(l);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},v.subnetMatch=function(l,f,_){let h,x,E,V;_==null&&(_="unicast");for(x in f)if(Object.prototype.hasOwnProperty.call(f,x)){for(E=f[x],E[0]&&!(E[0]instanceof Array)&&(E=[E]),h=0;h<E.length;h++)if(V=E[h],l.kind()===V[0].kind()&&l.match.apply(l,V))return x}return _},typeof Zr<"u"&&Zr.exports?Zr.exports=v:e.ipaddr=v})(fs)});var yu=b((Qk,hu)=>{var gu=require("stream").Stream,Jf=require("util");hu.exports=Ce;function Ce(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(Ce,"DelayedStream");Jf.inherits(Ce,gu);Ce.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Ce.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});Ce.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ce.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ce.prototype.pause=function(){this.source.pause()};Ce.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Ce.prototype.pipe=function(){var e=gu.prototype.pipe.apply(this,arguments);return this.resume(),e};Ce.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)};Ce.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 xu=b((tD,Pu)=>{var Xf=require("util"),_u=require("stream").Stream,vu=yu();Pu.exports=de;function de(){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}a(de,"CombinedStream");Xf.inherits(de,_u);de.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};de.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};de.prototype.append=function(e){var t=de.isStreamLike(e);if(t){if(!(e instanceof vu)){var r=vu.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};de.prototype.pipe=function(e,t){return _u.prototype.pipe.call(this,e,t),this.resume(),e};de.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}};de.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=de.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};de.prototype._pipeNext=function(e){this._currentStream=e;var t=de.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};de.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};de.prototype.write=function(e){this.emit("data",e)};de.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};de.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")};de.prototype.end=function(){this._reset(),this.emit("end")};de.prototype.destroy=function(){this._reset(),this.emit("close")};de.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};de.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};de.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};de.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Eu=b((nD,bu)=>{"use strict";bu.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 Au=b(Ee=>{"use strict";var Jr=Eu(),Yf=require("path").extname,Tu=/^\s*([^;\s]*)(?:;|\s|$)/,Qf=/^text\//i;Ee.charset=Iu;Ee.charsets={lookup:Iu};Ee.contentType=eg;Ee.extension=tg;Ee.extensions=Object.create(null);Ee.lookup=rg;Ee.types=Object.create(null);ng(Ee.extensions,Ee.types);function Iu(e){if(!e||typeof e!="string")return!1;var t=Tu.exec(e),r=t&&Jr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Qf.test(t[1])?"UTF-8":!1}a(Iu,"charset");function eg(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ee.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ee.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}a(eg,"contentType");function tg(e){if(!e||typeof e!="string")return!1;var t=Tu.exec(e),r=t&&Ee.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}a(tg,"extension");function rg(e){if(!e||typeof e!="string")return!1;var t=Yf("x."+e).toLowerCase().substr(1);return t&&Ee.types[t]||!1}a(rg,"lookup");function ng(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Jr).forEach(a(function(o){var i=Jr[o],s=i.extensions;if(!(!s||!s.length)){e[o]=s;for(var u=0;u<s.length;u++){var p=s[u];if(t[p]){var d=r.indexOf(Jr[t[p]].source),m=r.indexOf(i.source);if(t[p]!=="application/octet-stream"&&(d>m||d===m&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}a(ng,"populateMaps")});var $u=b((aD,Su)=>{Su.exports=og;function og(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(og,"defer")});var Xo=b((uD,Ou)=>{var wu=$u();Ou.exports=ig;function ig(e){var t=!1;return wu(function(){t=!0}),a(function(n,o){t?e(n,o):wu(a(function(){e(n,o)},"nextTick_callback"))},"async_callback")}a(ig,"async")});var Yo=b((lD,Ru)=>{Ru.exports=ag;function ag(e){Object.keys(e.jobs).forEach(sg.bind(e)),e.jobs={}}a(ag,"abort");function sg(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(sg,"clean")});var Qo=b((dD,Cu)=>{var zu=Xo(),ug=Yo();Cu.exports=cg;function cg(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=lg(t,o,e[o],function(i,s){o in r.jobs&&(delete r.jobs[o],i?ug(r):r.results[o]=s,n(i,r.results))})}a(cg,"iterate");function lg(e,t,r,n){var o;return e.length==2?o=e(r,zu(n)):o=e(r,t,zu(n)),o}a(lg,"runJob")});var ei=b((fD,ku)=>{ku.exports=pg;function pg(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,i){return t(e[o],e[i])}),n}a(pg,"state")});var ti=b((hD,Du)=>{var dg=Yo(),mg=Xo();Du.exports=fg;function fg(e){Object.keys(this.jobs).length&&(this.index=this.size,dg(this),mg(e)(null,this.results))}a(fg,"terminator")});var Mu=b((vD,Nu)=>{var gg=Qo(),hg=ei(),yg=ti();Nu.exports=vg;function vg(e,t,r){for(var n=hg(e);n.index<(n.keyedList||e).length;)gg(e,t,n,function(o,i){if(o){r(o,i);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return yg.bind(n,r)}a(vg,"parallel")});var ri=b((PD,Xr)=>{var Uu=Qo(),_g=ei(),Pg=ti();Xr.exports=xg;Xr.exports.ascending=Lu;Xr.exports.descending=bg;function xg(e,t,r,n){var o=_g(e,r);return Uu(e,t,o,a(function i(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){Uu(e,t,o,i);return}n(null,o.results)},"iteratorHandler")),Pg.bind(o,n)}a(xg,"serialOrdered");function Lu(e,t){return e<t?-1:e>t?1:0}a(Lu,"ascending");function bg(e,t){return-1*Lu(e,t)}a(bg,"descending")});var Fu=b((bD,ju)=>{var Eg=ri();ju.exports=Tg;function Tg(e,t,r){return Eg(e,t,null,r)}a(Tg,"serial")});var Vu=b((TD,Bu)=>{Bu.exports={parallel:Mu(),serial:Fu(),serialOrdered:ri()}});var ni=b((ID,Hu)=>{"use strict";Hu.exports=Object});var qu=b((AD,Zu)=>{"use strict";Zu.exports=Error});var Wu=b((SD,Gu)=>{"use strict";Gu.exports=EvalError});var Ju=b(($D,Ku)=>{"use strict";Ku.exports=RangeError});var Yu=b((wD,Xu)=>{"use strict";Xu.exports=ReferenceError});var ec=b((OD,Qu)=>{"use strict";Qu.exports=SyntaxError});var Yr=b((RD,tc)=>{"use strict";tc.exports=TypeError});var nc=b((zD,rc)=>{"use strict";rc.exports=URIError});var ic=b((CD,oc)=>{"use strict";oc.exports=Math.abs});var sc=b((kD,ac)=>{"use strict";ac.exports=Math.floor});var cc=b((DD,uc)=>{"use strict";uc.exports=Math.max});var pc=b((ND,lc)=>{"use strict";lc.exports=Math.min});var mc=b((MD,dc)=>{"use strict";dc.exports=Math.pow});var gc=b((UD,fc)=>{"use strict";fc.exports=Math.round});var yc=b((LD,hc)=>{"use strict";hc.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var _c=b((FD,vc)=>{"use strict";var Ig=yc();vc.exports=a(function(t){return Ig(t)||t===0?t:t<0?-1:1},"sign")});var xc=b((VD,Pc)=>{"use strict";Pc.exports=Object.getOwnPropertyDescriptor});var oi=b((HD,bc)=>{"use strict";var Qr=xc();if(Qr)try{Qr([],"length")}catch{Qr=null}bc.exports=Qr});var Tc=b((ZD,Ec)=>{"use strict";var en=Object.defineProperty||!1;if(en)try{en({},"a",{value:1})}catch{en=!1}Ec.exports=en});var ii=b((qD,Ic)=>{"use strict";Ic.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var $c=b((WD,Sc)=>{"use strict";var Ac=typeof Symbol<"u"&&Symbol,Ag=ii();Sc.exports=a(function(){return typeof Ac!="function"||typeof Symbol!="function"||typeof Ac("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ag()},"hasNativeSymbols")});var ai=b((JD,wc)=>{"use strict";wc.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var si=b((XD,Oc)=>{"use strict";var Sg=ni();Oc.exports=Sg.getPrototypeOf||null});var Cc=b((YD,zc)=>{"use strict";var $g="Function.prototype.bind called on incompatible ",wg=Object.prototype.toString,Og=Math.max,Rg="[object Function]",Rc=a(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},"concatty"),zg=a(function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},"slicy"),Cg=a(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");zc.exports=a(function(t){var r=this;if(typeof r!="function"||wg.apply(r)!==Rg)throw new TypeError($g+r);for(var n=zg(arguments,1),o,i=a(function(){if(this instanceof o){var m=r.apply(this,Rc(n,arguments));return Object(m)===m?m:this}return r.apply(t,Rc(n,arguments))},"binder"),s=Og(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Cg(u,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var d=a(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var wt=b((eN,kc)=>{"use strict";var kg=Cc();kc.exports=Function.prototype.bind||kg});var tn=b((tN,Dc)=>{"use strict";Dc.exports=Function.prototype.call});var ui=b((rN,Nc)=>{"use strict";Nc.exports=Function.prototype.apply});var Uc=b((nN,Mc)=>{"use strict";Mc.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var jc=b((oN,Lc)=>{"use strict";var Dg=wt(),Ng=ui(),Mg=tn(),Ug=Uc();Lc.exports=Ug||Dg.call(Mg,Ng)});var Bc=b((iN,Fc)=>{"use strict";var Lg=wt(),jg=Yr(),Fg=tn(),Bg=jc();Fc.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new jg("a function is required");return Bg(Lg,Fg,t)},"callBindBasic")});var Wc=b((sN,Gc)=>{"use strict";var Vg=Bc(),Vc=oi(),Zc;try{Zc=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var ci=!!Zc&&Vc&&Vc(Object.prototype,"__proto__"),qc=Object,Hc=qc.getPrototypeOf;Gc.exports=ci&&typeof ci.get=="function"?Vg([ci.get]):typeof Hc=="function"?a(function(t){return Hc(t==null?t:qc(t))},"getDunder"):!1});var Qc=b((cN,Yc)=>{"use strict";var Kc=ai(),Jc=si(),Xc=Wc();Yc.exports=Kc?a(function(t){return Kc(t)},"getProto"):Jc?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Jc(t)},"getProto"):Xc?a(function(t){return Xc(t)},"getProto"):null});var li=b((pN,el)=>{"use strict";var Hg=Function.prototype.call,Zg=Object.prototype.hasOwnProperty,qg=wt();el.exports=qg.call(Hg,Zg)});var sl=b((dN,al)=>{"use strict";var K,Gg=ni(),Wg=qu(),Kg=Wu(),Jg=Ju(),Xg=Yu(),Ct=ec(),zt=Yr(),Yg=nc(),Qg=ic(),eh=sc(),th=cc(),rh=pc(),nh=mc(),oh=gc(),ih=_c(),ol=Function,pi=a(function(e){try{return ol('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),fr=oi(),ah=Tc(),di=a(function(){throw new zt},"throwTypeError"),sh=fr?(function(){try{return arguments.callee,di}catch{try{return fr(arguments,"callee").get}catch{return di}}})():di,Ot=$c()(),ve=Qc(),uh=si(),ch=ai(),il=ui(),gr=tn(),Rt={},lh=typeof Uint8Array>"u"||!ve?K:ve(Uint8Array),gt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":Ot&&ve?ve([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":Rt,"%AsyncGenerator%":Rt,"%AsyncGeneratorFunction%":Rt,"%AsyncIteratorPrototype%":Rt,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wg,"%eval%":eval,"%EvalError%":Kg,"%Float16Array%":typeof Float16Array>"u"?K:Float16Array,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":ol,"%GeneratorFunction%":Rt,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ot&&ve?ve(ve([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ot||!ve?K:ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Gg,"%Object.getOwnPropertyDescriptor%":fr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":Jg,"%ReferenceError%":Xg,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ot||!ve?K:ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ot&&ve?ve(""[Symbol.iterator]()):K,"%Symbol%":Ot?Symbol:K,"%SyntaxError%":Ct,"%ThrowTypeError%":sh,"%TypedArray%":lh,"%TypeError%":zt,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":Yg,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet,"%Function.prototype.call%":gr,"%Function.prototype.apply%":il,"%Object.defineProperty%":ah,"%Object.getPrototypeOf%":uh,"%Math.abs%":Qg,"%Math.floor%":eh,"%Math.max%":th,"%Math.min%":rh,"%Math.pow%":nh,"%Math.round%":oh,"%Math.sign%":ih,"%Reflect.getPrototypeOf%":ch};if(ve)try{null.error}catch(e){tl=ve(ve(e)),gt["%Error.prototype%"]=tl}var tl,ph=a(function e(t){var r;if(t==="%AsyncFunction%")r=pi("async function () {}");else if(t==="%GeneratorFunction%")r=pi("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=pi("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ve&&(r=ve(o.prototype))}return gt[t]=r,r},"doEval"),rl={__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"]},hr=wt(),rn=li(),dh=hr.call(gr,Array.prototype.concat),mh=hr.call(il,Array.prototype.splice),nl=hr.call(gr,String.prototype.replace),nn=hr.call(gr,String.prototype.slice),fh=hr.call(gr,RegExp.prototype.exec),gh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hh=/\\(\\)?/g,yh=a(function(t){var r=nn(t,0,1),n=nn(t,-1);if(r==="%"&&n!=="%")throw new Ct("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ct("invalid intrinsic syntax, expected opening `%`");var o=[];return nl(t,gh,function(i,s,u,p){o[o.length]=u?nl(p,hh,"$1"):s||i}),o},"stringToPath"),vh=a(function(t,r){var n=t,o;if(rn(rl,n)&&(o=rl[n],n="%"+o[0]+"%"),rn(gt,n)){var i=gt[n];if(i===Rt&&(i=ph(n)),typeof i>"u"&&!r)throw new zt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ct("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");al.exports=a(function(t,r){if(typeof t!="string"||t.length===0)throw new zt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new zt('"allowMissing" argument must be a boolean');if(fh(/^%?[^%]*%?$/,t)===null)throw new Ct("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=yh(t),o=n.length>0?n[0]:"",i=vh("%"+o+"%",r),s=i.name,u=i.value,p=!1,d=i.alias;d&&(o=d[0],mh(n,dh([0,1],d)));for(var m=1,y=!0;m<n.length;m+=1){var v=n[m],l=nn(v,0,1),f=nn(v,-1);if((l==='"'||l==="'"||l==="`"||f==='"'||f==="'"||f==="`")&&l!==f)throw new Ct("property names with quotes must have matching quotes");if((v==="constructor"||!y)&&(p=!0),o+="."+v,s="%"+o+"%",rn(gt,s))u=gt[s];else if(u!=null){if(!(v in u)){if(!r)throw new zt("base intrinsic for "+t+" exists, but the property is not available.");return}if(fr&&m+1>=n.length){var _=fr(u,v);y=!!_,y&&"get"in _&&!("originalValue"in _.get)?u=_.get:u=u[v]}else y=rn(u,v),u=u[v];y&&!p&&(gt[s]=u)}}return u},"GetIntrinsic")});var cl=b((fN,ul)=>{"use strict";var _h=ii();ul.exports=a(function(){return _h()&&!!Symbol.toStringTag},"hasToStringTagShams")});var dl=b((hN,pl)=>{"use strict";var Ph=sl(),ll=Ph("%Object.defineProperty%",!0),xh=cl()(),bh=li(),Eh=Yr(),on=xh?Symbol.toStringTag:null;pl.exports=a(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new Eh("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");on&&(n||!bh(t,on))&&(ll?ll(t,on,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[on]=r)},"setToStringTag")});var fl=b((vN,ml)=>{"use strict";var Th=Function.prototype.call,Ih=Object.prototype.hasOwnProperty,Ah=wt();ml.exports=Ah.call(Th,Ih)});var hl=b((_N,gl)=>{"use strict";gl.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var _l=b((PN,vl)=>{"use strict";var hi=xu(),Sh=require("util"),mi=require("path"),$h=require("http"),wh=require("https"),Oh=require("url").parse,Rh=require("fs"),zh=require("stream").Stream,Ch=require("crypto"),fi=Au(),kh=Vu(),Dh=dl(),ot=fl(),gi=hl();function yl(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(yl,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],hi.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(X,"FormData");Sh.inherits(X,hi);X.LINE_BREAK=`\r
2
+ `;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=hi.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),i=this._multiPartFooter();n(o),n(t),n(i),this._trackLength(o,t,r)};X.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+X.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&ot(t,"httpVersion"))&&!(t instanceof zh))&&(r.knownLength||this._valuesToMeasure.push(t))};X.prototype._lengthRetriever=function(e,t){ot(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Rh.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):ot(e,"httpVersion")?t(null,Number(e.headers["content-length"])):ot(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};X.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),i="",s={"Content-Disposition":["form-data",'name="'+yl(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&gi(s,r.header);var u;for(var p in s)if(ot(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+i+X.LINE_BREAK};X.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=mi.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=mi.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ot(e,"httpVersion")&&(r=mi.basename(e.client._httpMessage.path||"")),r)return'filename="'+yl(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=fi.lookup(e.name)),!r&&e&&e.path&&(r=fi.lookup(e.path)),!r&&e&&e.readable&&ot(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=fi.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=X.DEFAULT_CONTENT_TYPE),r};X.prototype._multiPartFooter=function(){return function(e){var t=X.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};X.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+X.LINE_BREAK};X.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)ot(e,t)&&(r[t.toLowerCase()]=e[t]);return r};X.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};X.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};X.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(X.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};X.prototype._generateBoundary=function(){this._boundary="--------------------------"+Ch.randomBytes(12).toString("hex")};X.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};X.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};X.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}kh.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};X.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=Oh(e),n=gi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=gi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=wh.request(n):r=$h.request(n),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=a(function(d,m){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,m)},"callback");u=p.bind(this,null),r.on("error",p),r.on("response",u)}}.bind(this)),r};X.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};X.prototype.toString=function(){return"[object FormData]"};Dh(X.prototype,"FormData");vl.exports=X});var ue={};uo(ue,{__addDisposableResource:()=>Ql,__assign:()=>sn,__asyncDelegator:()=>Zl,__asyncGenerator:()=>Hl,__asyncValues:()=>ql,__await:()=>kt,__awaiter:()=>Ul,__classPrivateFieldGet:()=>Jl,__classPrivateFieldIn:()=>Yl,__classPrivateFieldSet:()=>Xl,__createBinding:()=>cn,__decorate:()=>Rl,__disposeResources:()=>ep,__esDecorate:()=>Cl,__exportStar:()=>jl,__extends:()=>wl,__generator:()=>Ll,__importDefault:()=>Kl,__importStar:()=>Wl,__makeTemplateObject:()=>Gl,__metadata:()=>Ml,__param:()=>zl,__propKey:()=>Dl,__read:()=>_i,__rest:()=>Ol,__rewriteRelativeImportExtension:()=>tp,__runInitializers:()=>kl,__setFunctionName:()=>Nl,__spread:()=>Fl,__spreadArray:()=>Vl,__spreadArrays:()=>Bl,__values:()=>un,default:()=>Wh});function wl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yi(e,t);function r(){this.constructor=e}a(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Ol(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Rl(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function zl(e,t){return function(r,n){t(r,n,e)}}function Cl(e,t,r,n,o,i){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}a(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,m=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),y,v=!1,l=r.length-1;l>=0;l--){var f={};for(var _ in n)f[_]=_==="access"?{}:n[_];for(var _ in n.access)f.access[_]=n.access[_];f.addInitializer=function(x){if(v)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(x||null))};var h=(0,r[l])(u==="accessor"?{get:m.get,set:m.set}:m[p],f);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(y=s(h.get))&&(m.get=y),(y=s(h.set))&&(m.set=y),(y=s(h.init))&&o.unshift(y)}else(y=s(h))&&(u==="field"?o.unshift(y):m[p]=y)}d&&Object.defineProperty(d,n.name,m),v=!0}function kl(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function Dl(e){return typeof e=="symbol"?e:"".concat(e)}function Nl(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Ml(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ul(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return a(o,"adopt"),new(r||(r=Promise))(function(i,s){function u(m){try{d(n.next(m))}catch(y){s(y)}}a(u,"fulfilled");function p(m){try{d(n.throw(m))}catch(y){s(y)}}a(p,"rejected");function d(m){m.done?i(m.value):o(m.value).then(u,p)}a(d,"step"),d((n=n.apply(e,t||[])).next())})}function Ll(e,t){var r={label:0,sent:a(function(){if(i[0]&1)throw i[1];return i[1]},"sent"),trys:[],ops:[]},n,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(m){return p([d,m])}}function p(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){r.label=d[1];break}if(d[0]===6&&r.label<i[1]){r.label=i[1],i=d;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(d);break}i[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(m){d=[6,m],o=0}finally{n=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function jl(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&cn(t,e,r)}function un(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:a(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _i(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function Fl(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_i(arguments[t]));return e}function Bl(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],s=0,u=i.length;s<u;s++,o++)n[o]=i[s];return n}function Vl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function kt(e){return this instanceof kt?(this.v=e,this):new kt(e)}function Hl(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(l){return function(f){return Promise.resolve(f).then(l,y)}}function u(l,f){n[l]&&(o[l]=function(_){return new Promise(function(h,x){i.push([l,_,h,x])>1||p(l,_)})},f&&(o[l]=f(o[l])))}function p(l,f){try{d(n[l](f))}catch(_){v(i[0][3],_)}}function d(l){l.value instanceof kt?Promise.resolve(l.value.v).then(m,y):v(i[0][2],l)}function m(l){p("next",l)}function y(l){p("throw",l)}function v(l,f){l(f),i.shift(),i.length&&p(i[0][0],i[0][1])}}function Zl(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(s){return(r=!r)?{value:kt(e[o](s)),done:!1}:i?i(s):s}:i}}function ql(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof un=="function"?un(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(u,p){s=e[i](s),o(u,p,s.done,s.value)})}}function o(i,s,u,p){Promise.resolve(p).then(function(d){i({value:d,done:u})},s)}}function Gl(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Wl(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=vi(e),n=0;n<r.length;n++)r[n]!=="default"&&cn(t,e,r[n]);return qh(t,e),t}function Kl(e){return e&&e.__esModule?e:{default:e}}function Jl(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Xl(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Yl(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Ql(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=a(function(){try{o.call(this)}catch(i){return Promise.reject(i)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function ep(e){function t(i){e.error=e.hasError?new Gh(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}a(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(o,function(s){return t(s),o()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a(o,"next"),o()}function tp(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,i,s){return n?t?".jsx":".js":o&&(!i||!s)?r:o+i+"."+s.toLowerCase()+"js"}):e}var yi,sn,cn,qh,vi,Gh,Wh,ce=dd(()=>{yi=a(function(e,t){return yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},yi(e,t)},"extendStatics");a(wl,"__extends");sn=a(function(){return sn=Object.assign||a(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},"__assign"),sn.apply(this,arguments)},"__assign");a(Ol,"__rest");a(Rl,"__decorate");a(zl,"__param");a(Cl,"__esDecorate");a(kl,"__runInitializers");a(Dl,"__propKey");a(Nl,"__setFunctionName");a(Ml,"__metadata");a(Ul,"__awaiter");a(Ll,"__generator");cn=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});a(jl,"__exportStar");a(un,"__values");a(_i,"__read");a(Fl,"__spread");a(Bl,"__spreadArrays");a(Vl,"__spreadArray");a(kt,"__await");a(Hl,"__asyncGenerator");a(Zl,"__asyncDelegator");a(ql,"__asyncValues");a(Gl,"__makeTemplateObject");qh=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},vi=a(function(e){return vi=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},vi(e)},"ownKeys");a(Wl,"__importStar");a(Kl,"__importDefault");a(Jl,"__classPrivateFieldGet");a(Xl,"__classPrivateFieldSet");a(Yl,"__classPrivateFieldIn");a(Ql,"__addDisposableResource");Gh=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};a(ep,"__disposeResources");a(tp,"__rewriteRelativeImportExtension");Wh={__extends:wl,__assign:sn,__rest:Ol,__decorate:Rl,__param:zl,__esDecorate:Cl,__runInitializers:kl,__propKey:Dl,__setFunctionName:Nl,__metadata:Ml,__awaiter:Ul,__generator:Ll,__createBinding:cn,__exportStar:jl,__values:un,__read:_i,__spread:Fl,__spreadArrays:Bl,__spreadArray:Vl,__await:kt,__asyncGenerator:Hl,__asyncDelegator:Zl,__asyncValues:ql,__makeTemplateObject:Gl,__importStar:Wl,__importDefault:Kl,__classPrivateFieldGet:Jl,__classPrivateFieldSet:Xl,__classPrivateFieldIn:Yl,__addDisposableResource:Ql,__disposeResources:ep,__rewriteRelativeImportExtension:tp}});var vr=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.RequestMethod=void 0;var rp;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(rp||(ln.RequestMethod=rp={}))});var np=b(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.BatchRequestContent=void 0;var Dt=(ce(),ie(ue)),Pi=vr(),Kh=(function(){function e(t){if(this.requests=new Map,typeof t<"u"){var r=e.requestLimit;if(t.length>r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}for(var o=0,i=t;o<i.length;o++){var s=i[o];this.addRequest(s)}}}return a(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=a(function(s){for(var u=s.entries(),p=u.next();!p.done;){var d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;p=u.next()}return!0},"isParallel"),n=a(function(s){var u=s.entries(),p=u.next(),d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;var m=p;for(p=u.next();!p.done;){var y=p.value[1];if(y.dependsOn===void 0||y.dependsOn.length!==1||y.dependsOn[0]!==m.value[1].id)return!1;m=p,p=u.next()}return!0},"isSerial"),o=a(function(s){var u=s.entries(),p=u.next(),d=p.value[1],m;if(d.dependsOn===void 0||d.dependsOn.length===0)m=d.id;else if(d.dependsOn.length===1){var y=d.dependsOn[0];if(y!==d.id&&s.has(y))m=y;else return!1}else return!1;for(p=u.next();!p.done;){var v=p.value[1];if((v.dependsOn===void 0||v.dependsOn.length===0)&&m!==v.id||v.dependsOn!==void 0&&v.dependsOn.length!==0&&(v.dependsOn.length===1&&(v.id===m||v.dependsOn[0]!==m)||v.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var i=new Error("Empty requests map, Please provide at least one request.");throw i.name="Empty Requests Error",i}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n,o,i;return Dt.__generator(this,function(s){switch(s.label){case 0:return r={url:""},n=new RegExp("^https?://"),r.url=n.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,r.method=t.method,o={},t.headers.forEach(function(u,p){o[p]=u}),Object.keys(o).length&&(r.headers=o),t.method===Pi.RequestMethod.PATCH||t.method===Pi.RequestMethod.POST||t.method===Pi.RequestMethod.PUT?(i=r,[4,e.getRequestBody(t)]):[3,2];case 1:i.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u,p,d;return Dt.__generator(this,function(m){switch(m.label){case 0:r=!1,m.label=1;case 1:return m.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=m.sent(),r=!0,[3,4];case 3:return i=m.sent(),[3,4];case 4:if(r)return[3,12];m.label=5;case 5:return m.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=m.sent(),u=new FileReader,[4,new Promise(function(y){u.addEventListener("load",function(){var v=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),f=l.exec(v);y(f[4])},!1),u.readAsDataURL(s)})];case 7:return n=m.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=m.sent(),n=p.toString("base64"),m.label=10;case 10:return r=!0,[3,12];case 11:return d=m.sent(),[3,12];case 12:return[2,n]}})})},e.prototype.addRequest=function(t){var r=e.requestLimit;if(t.id===""){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}if(this.requests.has(t.id)){var n=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw n.name="Duplicate RequestId Error",n}return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(t){for(var r=this.requests.delete(t),n=this.requests.entries(),o=n.next();!o.done;){var i=o.value[1].dependsOn;if(typeof i<"u"){var s=i.indexOf(t);s!==-1&&i.splice(s,1),i.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return Dt.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,i,s,u;return Dt.__generator(this,function(p){switch(p.label){case 0:if(t=[],r={requests:t},n=this.requests.entries(),o=n.next(),o.done)throw u=new Error("No requests added yet, Please add at least one request."),u.name="Empty Payload",u;if(!e.validateDependencies(this.requests))throw u=new Error(`Invalid dependency found, Dependency should be:
3
3
  1. Parallel - no individual request states a dependency in the dependsOn property.
4
4
  2. Serial - all individual requests depend on the previous individual request.
5
- 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`),u.name="Invalid Dependency",u;p.label=1;case 1:return o.done?[3,3]:(i=o.value[1],[4,e.getRequestData(i.request)]);case 2:if(s=p.sent(),s.body!==void 0&&(s.headers===void 0||s.headers["content-type"]===void 0))throw u=new Error("Content-type header is not mentioned for request #".concat(i.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=i.id,i.dependsOn!==void 0&&i.dependsOn.length>0&&(s.dependsOn=i.dependsOn),t.push(s),o=n.next(),[3,1];case 3:return r.requests=t,[2,r]}})})},e.prototype.addDependency=function(t,r){if(!this.requests.has(t)){var n=new Error("Dependent ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependent",n}if(typeof r<"u"&&!this.requests.has(r)){var n=new Error("Dependency ".concat(r," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(typeof r<"u"){var o=this.requests.get(t);if(o.dependsOn===void 0&&(o.dependsOn=[]),o.dependsOn.indexOf(r)!==-1){var n=new Error("Dependency ".concat(r," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}o.dependsOn.push(r)}else{for(var i=this.requests.entries(),s=void 0,u=i.next();!u.done&&u.value[1].id!==t;)s=u,u=i.next();if(typeof s<"u"){var p=s.value[0];if(u.value[1].dependsOn===void 0&&(u.value[1].dependsOn=[]),u.value[1].dependsOn.indexOf(p)!==-1){var n=new Error("Dependency ".concat(p," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}u.value[1].dependsOn.push(p)}else{var n=new Error("Can't add dependency ".concat(r,", There is only a dependent request in the batch"));throw n.name="Invalid Dependency Addition",n}}},e.prototype.removeDependency=function(t,r){var n=this.requests.get(t);if(typeof n>"u"||n.dependsOn===void 0||n.dependsOn.length===0)return!1;if(typeof r<"u"){var o=n.dependsOn.indexOf(r);return o===-1?!1:(n.dependsOn.splice(o,1),!0)}else return delete n.dependsOn,!0},e.requestLimit=20,e}();un.BatchRequestContent=Ah});var Vl=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.BatchResponseContent=void 0;var Sh=(se(),oe(ae)),$h=function(){function e(t){this.responses=new Map,this.update(t)}return a(e,"BatchResponseContent"),e.prototype.createResponseObject=function(t){var r=t.body,n={};if(n.status=t.status,t.statusText!==void 0&&(n.statusText=t.statusText),n.headers=t.headers,n.headers!==void 0&&n.headers["Content-Type"]!==void 0&&n.headers["Content-Type"].split(";")[0]==="application/json"){var o=JSON.stringify(r);return new Response(o,n)}return new Response(r,n)},e.prototype.update=function(t){this.nextLink=t["@odata.nextLink"];for(var r=t.responses,n=0,o=r.length;n<o;n++)this.responses.set(r[n].id,this.createResponseObject(r[n]))},e.prototype.getResponseById=function(t){return this.responses.get(t)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var t,r;return Sh.__generator(this,function(n){switch(n.label){case 0:t=this.responses.entries(),r=t.next(),n.label=1;case 1:return r.done?[3,3]:[4,r.value];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e}();cn.BatchResponseContent=$h});var vi=b(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.GRAPH_URLS=rt.GRAPH_BASE_URL=rt.GRAPH_API_VERSION=void 0;rt.GRAPH_API_VERSION="v1.0";rt.GRAPH_BASE_URL="https://graph.microsoft.com/";rt.GRAPH_URLS=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"])});var qe=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.GraphClientError=void 0;var wh=(se(),oe(ae)),Oh=function(e){wh.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return a(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t}(Error);ln.GraphClientError=Oh});var pn=b(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.isCustomHost=we.isGraphURL=we.serializeContent=we.urlJoin=we.oDataQueryNames=void 0;var zh=vi(),Rh=qe();we.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var kh=a(function(e){var t=a(function(i){return i.replace(/\/+$/,"")},"removePostSlash"),r=a(function(i){return i.replace(/^\/+/,"")},"removePreSlash"),n=a(function(i,s){return[t(i),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");we.urlJoin=kh;var Dh=a(function(e){var t=e&&e.constructor&&e.constructor.name;if(t==="Buffer"||t==="Blob"||t==="File"||t==="FormData"||typeof e=="string")return e;if(t==="ArrayBuffer")e=Buffer.from(e);else if(t==="Int8Array"||t==="Int16Array"||t==="Int32Array"||t==="Uint8Array"||t==="Uint16Array"||t==="Uint32Array"||t==="Uint8ClampedArray"||t==="Float32Array"||t==="Float64Array"||t==="DataView")e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch{throw new Error("Unable to stringify the content")}return e},"serializeContent");we.serializeContent=Dh;var Ch=a(function(e){return Hl(e)},"isGraphURL");we.isGraphURL=Ch;var Nh=a(function(e,t){return t.forEach(function(r){return Mh(r)}),Hl(e,t)},"isCustomHost");we.isCustomHost=Nh;var Hl=a(function(e,t){if(t===void 0&&(t=zh.GRAPH_URLS),e=e.toLowerCase(),e.indexOf("https://")!==-1){e=e.replace("https://","");var r=e.indexOf(":"),n=e.indexOf("/"),o="";if(n!==-1)return r!==-1&&r<n?(o=e.substring(0,r),t.has(o)):(o=e.substring(0,n),t.has(o))}return!1},"isValidEndpoint"),Mh=a(function(e){if(e.indexOf("/")!==-1)throw new Rh.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")},"isCustomHostValid")});var nt=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.MiddlewareControl=void 0;var Uh=function(){function e(t){t===void 0&&(t=[]),this.middlewareOptions=new Map;for(var r=0,n=t;r<n.length;r++){var o=n[r],i=o.constructor;this.middlewareOptions.set(i,o)}}return a(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e}();dn.MiddlewareControl=Uh});var Ct=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.cloneRequestWithNewUrl=Oe.appendRequestHeader=Oe.setRequestHeader=Oe.getRequestHeader=Oe.generateUUID=void 0;var Zl=(se(),oe(ae)),Lh=a(function(){for(var e="",t=0;t<32;t++)(t===8||t===12||t===16||t===20)&&(e+="-"),e+=Math.floor(Math.random()*16).toString(16);return e},"generateUUID");Oe.generateUUID=Lh;var jh=a(function(e,t,r){var n=null;if(typeof Request<"u"&&e instanceof Request)n=e.headers.get(r);else if(typeof t<"u"&&t.headers!==void 0)if(typeof Headers<"u"&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var o=t.headers,i=0,s=o.length;i<s;i++)if(o[i][0]===r){n=o[i][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Oe.getRequestHeader=jh;var Fh=a(function(e,t,r,n){var o,i;if(typeof Request<"u"&&e instanceof Request)e.headers.set(r,n);else if(typeof t<"u")if(t.headers===void 0)t.headers=new Headers((o={},o[r]=n,o));else if(typeof Headers<"u"&&t.headers instanceof Headers)t.headers.set(r,n);else if(t.headers instanceof Array){for(var s=0,u=t.headers.length;s<u;s++){var p=t.headers[s];if(p[0]===r){p[1]=n;break}}s===u&&t.headers.push([r,n])}else Object.assign(t.headers,(i={},i[r]=n,i))},"setRequestHeader");Oe.setRequestHeader=Fh;var Bh=a(function(e,t,r,n){var o,i;typeof Request<"u"&&e instanceof Request?e.headers.append(r,n):typeof t<"u"&&(t.headers===void 0?t.headers=new Headers((o={},o[r]=n,o)):typeof Headers<"u"&&t.headers instanceof Headers?t.headers.append(r,n):t.headers instanceof Array?t.headers.push([r,n]):t.headers===void 0?t.headers=(i={},i[r]=n,i):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Oe.appendRequestHeader=Bh;var Vh=a(function(e,t){return Zl.__awaiter(void 0,void 0,void 0,function(){var r,n,o,i,s,u,p,d,f,v,y,l,m;return Zl.__generator(this,function(_){switch(_.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=_.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=_.sent(),_.label=4;case 4:return r=n,o=t.method,i=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,f=t.cache,v=t.redirect,y=t.integrity,l=t.keepalive,m=t.signal,[2,new Request(e,{method:o,headers:i,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:f,redirect:v,integrity:y,keepalive:l,signal:m})]}})})},"cloneRequestWithNewUrl");Oe.cloneRequestWithNewUrl=Vh});var _i=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.AuthenticationHandlerOptions=void 0;var Hh=function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return a(e,"AuthenticationHandlerOptions"),e}();fn.AuthenticationHandlerOptions=Hh});var Mt=b(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.TelemetryHandlerOptions=Nt.FeatureUsageFlag=void 0;var ql=nt(),xi;(function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"})(xi||(Nt.FeatureUsageFlag=xi={}));var Zh=function(){function e(){this.featureUsage=xi.NONE}return a(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof ql.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new ql.MiddlewareControl,typeof n>"u"&&(n=new e,t.middlewareControl.setMiddlewareOptions(e,n)),n.setFeatureUsage(r)},e.prototype.setFeatureUsage=function(t){this.featureUsage=this.featureUsage|t},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e}();Nt.TelemetryHandlerOptions=Zh});var gn=b(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.AuthenticationHandler=void 0;var Gl=(se(),oe(ae)),Wl=pn(),qh=nt(),Gh=Ct(),Wh=_i(),Kl=Mt(),Kh=function(){function e(t){this.authenticationProvider=t}return a(e,"AuthenticationHandler"),e.prototype.execute=function(t){return Gl.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u;return Gl.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Wl.isGraphURL)(r)||t.customHosts&&(0,Wl.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof qh.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(Wh.AuthenticationHandlerOptions)),o=void 0,i=void 0,n&&(o=n.authenticationProvider,i=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(i)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,Gh.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),Kl.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Kl.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[3,3];case 2:t.options.headers&&delete t.options.headers[e.AUTHORIZATION_HEADER],p.label=3;case 3:return[4,this.nextMiddleware.execute(t)];case 4:return[2,p.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.AUTHORIZATION_HEADER="Authorization",e}();mn.AuthenticationHandler=Kh});var yn=b(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.HTTPMessageHandler=void 0;var Jl=(se(),oe(ae)),Jh=function(){function e(){}return a(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return Jl.__awaiter(this,void 0,void 0,function(){var r;return Jl.__generator(this,function(n){switch(n.label){case 0:return r=t,[4,fetch(t.request,t.options)];case 1:return r.response=n.sent(),[2]}})})},e}();hn.HTTPMessageHandler=Jh});var yr=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.RetryHandlerOptions=void 0;var Xh=function(){function e(t,r,n){if(t===void 0&&(t=e.DEFAULT_DELAY),r===void 0&&(r=e.DEFAULT_MAX_RETRIES),n===void 0&&(n=e.defaultShouldRetry),t>e.MAX_DELAY&&r>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t>e.MAX_DELAY){var o=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw o.name="MaxLimitExceeded",o}else if(r>e.MAX_MAX_RETRIES){var o=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t<0&&r<0){var o=new Error("Delay and MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}else if(t<0){var o=new Error("Delay should not be negative");throw o.name="MinExpectationNotMet",o}else if(r<0){var o=new Error("MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(r,e.MAX_MAX_RETRIES),this.shouldRetry=n}return a(e,"RetryHandlerOptions"),e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.defaultShouldRetry=function(){return!0},e}();vn.RetryHandlerOptions=Xh});var xn=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.RetryHandler=void 0;var Ut=(se(),oe(ae)),Pi=hr(),Yh=nt(),Xl=Ct(),Yl=yr(),Ql=Mt(),Qh=function(){function e(t){t===void 0&&(t=new Yl.RetryHandlerOptions),this.options=t}return a(e,"RetryHandler"),e.prototype.isRetry=function(t){return e.RETRY_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.isBuffered=function(t,r){var n=typeof t=="string"?r.method:t.method,o=n===Pi.RequestMethod.PUT||n===Pi.RequestMethod.PATCH||n===Pi.RequestMethod.POST;if(o){var i=(0,Xl.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(i)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=a(function(){return Number(Math.random().toFixed(3))},"getRandomness"),i=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return i!==null?Number.isNaN(Number(i))?s=Math.round((new Date(i).getTime()-Date.now())/1e3):s=Number(i):s=r>=2?this.getExponentialBackOffTime(r)+n+o():n+o(),Math.min(s,this.options.getMaxDelay()+o())},e.prototype.getExponentialBackOffTime=function(t){return Math.round(1/2*(Math.pow(2,t)-1))},e.prototype.sleep=function(t){return Ut.__awaiter(this,void 0,void 0,function(){var r;return Ut.__generator(this,function(n){return r=t*1e3,[2,new Promise(function(o){return setTimeout(o,r)})]})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Yh.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Yl.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return Ut.__awaiter(this,void 0,void 0,function(){var o;return Ut.__generator(this,function(i){switch(i.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return i.sent(),r<n.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&n.shouldRetry(n.delay,r,t.request,t.options,t.response)?(++r,(0,Xl.setRequestHeader)(t.request,t.options,e.RETRY_ATTEMPT_HEADER,r.toString()),o=this.getDelay(t.response,r,n.delay),[4,this.sleep(o)]):[3,4];case 2:return i.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,i.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return Ut.__awaiter(this,void 0,void 0,function(){var r,n;return Ut.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),Ql.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Ql.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e}();_n.RetryHandler=Qh});var vr=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.RedirectHandlerOptions=void 0;var ey=function(){function e(t,r){if(t===void 0&&(t=e.DEFAULT_MAX_REDIRECTS),r===void 0&&(r=e.defaultShouldRedirect),t>e.MAX_MAX_REDIRECTS){var n=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw n.name="MaxLimitExceeded",n}if(t<0){var n=new Error("MaxRedirects should not be negative");throw n.name="MinExpectationNotMet",n}this.maxRedirects=t,this.shouldRedirect=r}return a(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e}();Pn.RedirectHandlerOptions=ey});var Tn=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.RedirectHandler=void 0;var Lt=(se(),oe(ae)),ty=hr(),ry=nt(),ny=Ct(),bi=vr(),ep=Mt(),oy=function(){function e(t){t===void 0&&(t=new bi.RedirectHandlerOptions),this.options=t}return a(e,"RedirectHandler"),e.prototype.isRedirect=function(t){return e.REDIRECT_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(t){return t.indexOf("://")===-1},e.prototype.shouldDropAuthorizationHeader=function(t,r){var n=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=n.exec(t),i,s;o!==null&&(i=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof i<"u"&&typeof s<"u"&&i!==s},e.prototype.updateRequestUrl=function(t,r){return Lt.__awaiter(this,void 0,void 0,function(){var n,o;return Lt.__generator(this,function(i){switch(i.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,ny.cloneRequestWithNewUrl)(t,r.request)];case 2:o=i.sent(),i.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof ry.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(bi.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new bi.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return Lt.__awaiter(this,void 0,void 0,function(){var o,i;return Lt.__generator(this,function(s){switch(s.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return s.sent(),o=t.response,r<n.maxRedirects&&this.isRedirect(o)&&this.hasLocationHeader(o)&&n.shouldRedirect(o)?(++r,o.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=ty.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return i=this.getLocationHeader(o),!this.isRelativeURL(i)&&this.shouldDropAuthorizationHeader(o.url,i)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(i,t)];case 3:s.sent(),s.label=4;case 4:return[4,this.executeWithRedirect(t,r,n)];case 5:return s.sent(),[3,7];case 6:return[2];case 7:return[2]}})})},e.prototype.execute=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r,n;return Lt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,ep.TelemetryHandlerOptions.updateFeatureUsageFlag(t,ep.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e}();bn.RedirectHandler=oy});var tp=b(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.PACKAGE_VERSION=void 0;En.PACKAGE_VERSION="3.0.7"});var Sn=b(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.TelemetryHandler=void 0;var rp=(se(),oe(ae)),np=pn(),iy=tp(),ay=nt(),In=Ct(),sy=Mt(),uy=function(){function e(){}return a(e,"TelemetryHandler"),e.prototype.execute=function(t){return rp.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s;return rp.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,np.isGraphURL)(r)||t.customHosts&&(0,np.isCustomHost)(r,t.customHosts)?(n=(0,In.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,In.generateUUID)(),(0,In.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat(iy.PACKAGE_VERSION),i=void 0,t.middlewareControl instanceof ay.MiddlewareControl&&(i=t.middlewareControl.getMiddlewareOptions(sy.TelemetryHandlerOptions)),i&&(s=i.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,In.appendRequestHeader)(t.request,t.options,e.SDK_VERSION_HEADER,o)):(delete t.options.headers[e.CLIENT_REQUEST_ID_HEADER],delete t.options.headers[e.SDK_VERSION_HEADER]),[4,this.nextMiddleware.execute(t)];case 1:return[2,u.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e}();An.TelemetryHandler=uy});var op=b($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.MiddlewareFactory=void 0;var cy=gn(),ly=yn(),py=vr(),dy=yr(),fy=Tn(),my=xn(),gy=Sn(),hy=a(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),yy=function(){function e(){}return a(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new cy.AuthenticationHandler(t),o=new my.RetryHandler(new dy.RetryHandlerOptions),i=new gy.TelemetryHandler,s=new ly.HTTPMessageHandler;if(r.push(n),r.push(o),hy()){var u=new fy.RedirectHandler(new py.RedirectHandlerOptions);r.push(u)}return r.push(i),r.push(s),r},e}();$n.MiddlewareFactory=yy});var On=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.ChaosStrategy=void 0;var ip;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(ip||(wn.ChaosStrategy=ip={}))});var Ti=b(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ChaosHandlerOptions=void 0;var vy=On(),_y=function(){function e(t,r,n,o,i,s){if(t===void 0&&(t=vy.ChaosStrategy.RANDOM),r===void 0&&(r="Some error Happened"),this.chaosStrategy=t,this.statusCode=n,this.statusMessage=r,this.chaosPercentage=o!==void 0?o:10,this.responseBody=i,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return a(e,"ChaosHandlerOptions"),e}();zn.ChaosHandlerOptions=_y});var ap=b(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.httpStatusCode=jt.methodStatusCode=void 0;jt.methodStatusCode={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]};jt.httpStatusCode={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var cp=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.ChaosHandler=void 0;var Rn=(se(),oe(ae)),xy=nt(),Py=Ct(),sp=ap(),Ei=Ti(),up=On(),by=function(){function e(t,r){t===void 0&&(t=new Ei.ChaosHandlerOptions),this.options=t,this.manualMap=r}return a(e,"ChaosHandler"),e.prototype.createResponseHeaders=function(t,r,n){var o=t.headers?new Headers(t.headers):new Headers;return o.append("Cache-Control","no-store"),o.append("request-id",r),o.append("client-request-id",r),o.append("x-ms-ags-diagnostic",""),o.append("Date",n),o.append("Strict-Transport-Security",""),t.statusCode===429&&o.append("retry-after","3"),o},e.prototype.createResponseBody=function(t,r,n){if(t.responseBody)return t.responseBody;var o;if(t.statusCode>=400){var i=sp.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:i,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,Py.generateUUID)(),i=new Date,s=this.createResponseHeaders(t,o,i.toString()),u=this.createResponseBody(t,o,i.toString()),p={url:n,status:t.statusCode,statusText:t.statusMessage,headers:s};r.response=new Response(typeof u=="string"?u:JSON.stringify(u),p)},e.prototype.sendRequest=function(t,r){return Rn.__awaiter(this,void 0,void 0,function(){return Rn.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===up.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(Math.random()*100)<t.chaosPercentage?(this.createResponse(t,r),[3,3]):[3,1];case 1:return this.nextMiddleware?[4,this.nextMiddleware.execute(r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.getRandomStatusCode=function(t){var r=sp.methodStatusCode[t];return r[Math.floor(Math.random()*r.length)]},e.prototype.getRelativeURL=function(t){var r=/https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/,n;return r.exec(t)!==null&&(n=r.exec(t)[1]),n},e.prototype.setStatusCode=function(t,r,n){var o=this;if(t.chaosStrategy===up.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var i=this.getRelativeURL(r);this.manualMap.get(i)!==void 0?this.manualMap.get(i).get(n)!==void 0&&(t.statusCode=this.manualMap.get(i).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(i)&&o.manualMap.get(u).get(n)!==void 0&&(t.statusCode=o.manualMap.get(u).get(n))})}}else t.statusCode=this.getRandomStatusCode(n)},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof xy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(Ei.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new Ei.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return Rn.__awaiter(this,void 0,void 0,function(){var r;return Rn.__generator(this,function(n){switch(n.label){case 0:return r=this.getOptions(t),[4,this.sendRequest(r,t)];case 1:return[2,n.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e}();kn.ChaosHandler=by});var _r=b(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ResponseType=void 0;var lp;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(lp||(Dn.ResponseType=lp={}))});var Ai=b(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.GraphResponseHandler=Ft.DocumentType=void 0;var Cn=(se(),oe(ae)),ft=_r(),Ii;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})(Ii||(Ft.DocumentType=Ii={}));var Nn;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Nn||(Nn={}));var Mn;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})(Mn||(Mn={}));var Ty=function(){function e(){}return a(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(i){try{var s=new DOMParser,u=s.parseFromString(i,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return Cn.__awaiter(this,void 0,void 0,function(){var n,o,i,s;return Cn.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),i=r,i){case ft.ResponseType.ARRAYBUFFER:return[3,1];case ft.ResponseType.BLOB:return[3,3];case ft.ResponseType.DOCUMENT:return[3,5];case ft.ResponseType.JSON:return[3,7];case ft.ResponseType.STREAM:return[3,9];case ft.ResponseType.TEXT:return[3,11]}return[3,13];case 1:return[4,t.arrayBuffer()];case 2:return n=u.sent(),[3,24];case 3:return[4,t.blob()];case 4:return n=u.sent(),[3,24];case 5:return[4,e.parseDocumentResponse(t,Ii.TEXT_XML)];case 6:return n=u.sent(),[3,24];case 7:return[4,t.json()];case 8:return n=u.sent(),[3,24];case 9:return[4,Promise.resolve(t.body)];case 10:return n=u.sent(),[3,24];case 11:return[4,t.text()];case 12:return n=u.sent(),[3,24];case 13:return o===null?[3,22]:(s=o.split(";")[0],new RegExp(Mn.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp(Mn.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Nn.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Nn.APPLICATION_JSON?[3,20]:[4,t.json()];case 19:return n=u.sent(),[3,21];case 20:n=Promise.resolve(t.body),u.label=21;case 21:return[3,23];case 22:n=Promise.resolve(t.body),u.label=23;case 23:return[3,24];case 24:return[2,n]}})})},e.getResponse=function(t,r,n){return Cn.__awaiter(this,void 0,void 0,function(){var o;return Cn.__generator(this,function(i){switch(i.label){case 0:return r!==ft.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=i.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;i.label=3;case 3:return[2]}})})},e}();Ft.GraphResponseHandler=Ty});var Si=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.Range=void 0;var Ey=function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return a(e,"Range"),e}();Un.Range=Ey});var $i=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.UploadResult=void 0;var Iy=function(){function e(t,r){this._location=r,this._responseBody=t}return a(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:a(function(){return this._location},"get"),set:a(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:a(function(){return this._responseBody},"get"),set:a(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e}();Ln.UploadResult=Iy});var Oi=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.LargeFileUploadTask=void 0;var Ee=(se(),oe(ae)),wi=qe(),Ay=Ai(),pp=_r(),jn=Si(),Sy=$i(),$y=function(){function e(t,r,n,o){if(o===void 0&&(o={}),this.DEFAULT_FILE_SIZE=5*1024*1024,this.client=t,r.sliceFile)this.file=r;else throw new wi.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=r,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=n,this.nextRange=new jn.Range(0,this.options.rangeSize-1)}return a(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Ee.__awaiter(this,void 0,void 0,function(){var i,s;return Ee.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return i=u.sent(),s={url:i.uploadUrl,expiry:new Date(i.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new jn.Range;var n=r.split("-"),o=parseInt(n[0],10),i=parseInt(n[1],10);return Number.isNaN(i)&&(i=this.file.size-1),new jn.Range(o,i)},e.prototype.updateTaskStatus=function(t){this.uploadSession.expiry=new Date(t.expirationDateTime),this.nextRange=this.parseRange(t.nextExpectedRanges)},e.prototype.getNextRange=function(){if(this.nextRange.minValue===-1)return this.nextRange;var t=this.nextRange.minValue,r=t+this.options.rangeSize-1;return r>=this.file.size&&(r=this.file.size-1),new jn.Range(t,r)},e.prototype.sliceFile=function(t){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(t.minValue,t.maxValue+1);throw new wi.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")},e.prototype.upload=function(){return Ee.__awaiter(this,void 0,void 0,function(){var t,r,n,o,i,s,u;return Ee.__generator(this,function(p){switch(p.label){case 0:t=this.options&&this.options.uploadEventHandlers,p.label=1;case 1:if(this.uploadSession.isCancelled)return[3,5];if(r=this.getNextRange(),r.maxValue===-1)throw n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"),n.name="Invalid Session",n;return[4,this.file.sliceFile(r)];case 2:return o=p.sent(),[4,this.uploadSliceGetRawResponse(o,r,this.file.size)];case 3:if(i=p.sent(),!i)throw new wi.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,Ay.GraphResponseHandler.getResponse(i)];case 4:return s=p.sent(),i.status===201||i.status===200&&s.id?(this.reportProgress(t,r),[2,Sy.UploadResult.CreateUploadResult(s,i.headers)]):(u={expirationDateTime:s.expirationDateTime||s.ExpirationDateTime,nextExpectedRanges:s.NextExpectedRanges||s.nextExpectedRanges},this.updateTaskStatus(u),this.reportProgress(t,r),[3,1]);case 5:return[2]}})})},e.prototype.reportProgress=function(t,r){t&&t.progress&&t.progress(r,t.extraCallbackParam)},e.prototype.uploadSlice=function(t,r,n){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.uploadSliceGetRawResponse=function(t,r,n){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(pp.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Ee.__awaiter(this,void 0,void 0,function(){var t;return Ee.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(pp.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Ee.__awaiter(this,void 0,void 0,function(){var t;return Ee.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).get()];case 1:return t=r.sent(),this.updateTaskStatus(t),[2,t]}})})},e.prototype.resume=function(){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(t){switch(t.label){case 0:return[4,this.getStatus()];case 1:return t.sent(),[4,this.upload()];case 2:return[2,t.sent()]}})})},e.prototype.getUploadSession=function(){return this.uploadSession},e}();Fn.LargeFileUploadTask=$y});var zi=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.FileUpload=void 0;var wy=qe(),Oy=function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new wy.GraphClientError("Please provide the upload content, name of the file and size of the file")}return a(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e}();Bn.FileUpload=Oy});var Ri=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.getValidRangeSize=void 0;var zy=5*1024*1024,Ry=a(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),ky=a(function(e){e===void 0&&(e=zy);var t=60*1024*1024;return e>t&&(e=t),Ry(e)},"getValidRangeSize");Vn.getValidRangeSize=ky});var fp=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.OneDriveLargeFileUploadTask=void 0;var Ge=(se(),oe(ae)),dp=qe(),Dy=zi(),Cy=Oi(),Ny=Ri(),My=function(e){Ge.__extends(t,e);function t(r,n,o,i){return e.call(this,r,n,o,i)||this}return a(t,"OneDriveLargeFileUploadTask"),t.constructCreateSessionUrl=function(r,n){return n===void 0&&(n=t.DEFAULT_UPLOAD_PATH),r=r.trim(),n=n.trim(),n===""&&(n="/"),n[0]!=="/"&&(n="/".concat(n)),n[n.length-1]!=="/"&&(n="".concat(n,"/")),"/me/drive/root:".concat(n.split("/").map(function(o){return encodeURIComponent(o)}).join("/")).concat(encodeURIComponent(r),":/createUploadSession")},t.getFileInfo=function(r,n){var o,i;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),i=o.size;else if(typeof File<"u"&&r instanceof File)o=r,i=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;i=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:i}},t.create=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var i,s,u;return Ge.__generator(this,function(p){if(!r||!n||!o)throw new dp.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return i=o.fileName,s=t.getFileInfo(n,i),u=new Dy.FileUpload(s.content,i,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var i,s,u,p;return Ge.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new dp.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return i=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,i,s)];case 1:return u=d.sent(),p=(0,Ny.getValidRangeSize)(o.rangeSize),[2,new t(r,n,u,{rangeSize:p,uploadEventHandlers:o.uploadEventHandlers})]}})})},t.createUploadSession=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var i;return Ge.__generator(this,function(s){return i={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,i)]})})},t.prototype.commit=function(r,n){return n===void 0&&(n="rename"),Ge.__awaiter(this,void 0,void 0,function(){var o;return Ge.__generator(this,function(i){switch(i.label){case 0:return o={name:this.file.name,"@microsoft.graph.conflictBehavior":n,"@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(r).put(o)];case 1:return[2,i.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t}(Cy.LargeFileUploadTask);Hn.OneDriveLargeFileUploadTask=My});var gp=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.StreamUpload=void 0;var mp=(se(),oe(ae)),xr=qe(),Uy=function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new xr.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return a(e,"StreamUpload"),e.prototype.sliceFile=function(t){return mp.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u,p;return mp.__generator(this,function(d){switch(d.label){case 0:if(r=t.maxValue-t.minValue+1,n=[],this.previousSlice){if(t.minValue<this.previousSlice.range.minValue)throw new xr.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file.");if(t.minValue<this.previousSlice.range.maxValue){if(o=this.previousSlice.range.minValue,i=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===i)return[2,this.previousSlice.fileSlice];if(t.maxValue===i)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,i+1)),r=t.maxValue-i}}return this.content&&this.content.readable?this.content.readableLength>=r?(n.push(this.content.read(r)),[3,3]):[3,1]:[3,4];case 1:return u=(s=n).push,[4,this.readNBytesFromStream(r)];case 2:u.apply(s,[d.sent()]),d.label=3;case 3:return[3,5];case 4:throw new xr.GraphClientError("Stream is not readable.");case 5:return p=Buffer.concat(n),this.previousSlice={fileSlice:p,range:t},[2,p]}})})},e.prototype.readNBytesFromStream=function(t){var r=this;return new Promise(function(n,o){var i=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new xr.GraphClientError("Stream ended before reading required range size"))}),r.content.on("readable",function(){for(var p;u<t&&(p=r.content.read(s))!==null;)u+=p.length,i.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(i));if(!r.content||!r.content.readable)return o(new xr.GraphClientError("Error encountered while reading the stream during the upload"))})})},e}();Zn.StreamUpload=Uy});var hp=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.PageIterator=void 0;var Bt=(se(),oe(ae)),Ly=function(){function e(t,r,n,o){this.client=t,this.collection=r.value,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],this.callback=n,this.cursor=0,this.complete=!1,this.requestOptions=o}return a(e,"PageIterator"),e.prototype.iterationHelper=function(){if(this.collection===void 0)return!1;for(var t=!0;t&&this.cursor<this.collection.length;){var r=this.collection[this.cursor];t=this.callback(r),this.cursor++}return t},e.prototype.fetchAndUpdateNextPageData=function(){return Bt.__awaiter(this,void 0,void 0,function(){var t,r;return Bt.__generator(this,function(n){switch(n.label){case 0:return t=this.client.api(this.nextLink),this.requestOptions&&(this.requestOptions.headers&&(t=t.headers(this.requestOptions.headers)),this.requestOptions.middlewareOptions&&(t=t.middlewareOptions(this.requestOptions.middlewareOptions)),this.requestOptions.options&&(t=t.options(this.requestOptions.options))),[4,t.get()];case 1:return r=n.sent(),this.collection=r.value,this.cursor=0,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return Bt.__awaiter(this,void 0,void 0,function(){var t;return Bt.__generator(this,function(r){switch(r.label){case 0:t=this.iterationHelper(),r.label=1;case 1:return t?this.nextLink===void 0?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return r.sent(),t=this.iterationHelper(),[3,4];case 3:t=!1,r.label=4;case 4:return[3,1];case 5:return this.nextLink===void 0&&this.cursor>=this.collection.length&&(this.complete=!0),[2]}})})},e.prototype.resume=function(){return Bt.__awaiter(this,void 0,void 0,function(){return Bt.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e}();qn.PageIterator=Ly});var ki=b(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.CustomAuthenticationProvider=void 0;var Gn=(se(),oe(ae)),yp=qe(),jy=function(){function e(t){this.provider=t}return a(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Gn.__awaiter(this,void 0,void 0,function(){var t=this;return Gn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(i,s){return Gn.__awaiter(t,void 0,void 0,function(){var u,p;return Gn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return i||(u="Access token is undefined or empty. Please provide a valid token. For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md",i=new yp.GraphClientError(u)),[4,yp.GraphClientError.setGraphClientError(i)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e}();Wn.CustomAuthenticationProvider=jy});var Di=b(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.GraphError=void 0;var Fy=(se(),oe(ae)),By=function(e){Fy.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var i=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(i,t.prototype),i.statusCode=r,i.code=null,i.requestId=null,i.date=new Date,i.body=null,i.stack=o?o.stack:i.stack,i}return a(t,"GraphError"),t}(Error);Kn.GraphError=By});var _p=b(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.GraphErrorHandler=void 0;var vp=(se(),oe(ae)),Ci=Di(),Vy=function(){function e(){}return a(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new Ci.GraphError(r,"",t);return t.name!==void 0&&(o.code=t.name),o.body=t.toString(),o.date=new Date,o.headers=n?.headers,o},e.constructErrorFromResponse=function(t,r,n){var o=t.error,i=new Ci.GraphError(r,o.message);return i.code=o.code,o.innerError!==void 0&&(i.requestId=o.innerError["request-id"],i.date=new Date(o.innerError.date)),i.body=JSON.stringify(o),i.headers=n?.headers,i},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),vp.__awaiter(this,void 0,void 0,function(){var i;return vp.__generator(this,function(s){if(t&&t.error?i=e.constructErrorFromResponse(t,r,o):t instanceof Error?i=e.constructError(t,r,o):(i=new Ci.GraphError(r),i.body=t),typeof n=="function")n(i,null);else return[2,i];return[2]})})},e}();Jn.GraphErrorHandler=Vy});var Ni=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.GraphRequest=void 0;var re=(se(),oe(ae)),Hy=qe(),Zy=_p(),Pr=pn(),qy=Ai(),Gy=nt(),mt=hr(),Wy=_r(),Ky=function(){function e(t,r,n){var o=this;this.parsePath=function(i){if(i.indexOf("https://")!==-1){i=i.replace("https://","");var s=i.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+i.substring(0,s),i=i.substring(s+1,i.length));var u=i.indexOf("/");u!==-1&&(o.urlComponents.version=i.substring(0,u),i=i.substring(u+1,i.length))}i.charAt(0)==="/"&&(i=i.substr(1));var p=i.indexOf("?");if(p===-1)o.urlComponents.path=i;else{o.urlComponents.path=i.substr(0,p);for(var d=i.substring(p+1,i.length).split("&"),f=0,v=d;f<v.length;f++){var y=v[f];o.parseQueryParameter(y)}}},this.httpClient=t,this.config=r,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return a(e,"GraphRequest"),e.prototype.addCsvQueryParameter=function(t,r,n){this.urlComponents.oDataQueryParams[t]=this.urlComponents.oDataQueryParams[t]?this.urlComponents.oDataQueryParams[t]+",":"";var o=[];n.length>1&&typeof r=="string"?o=Array.prototype.slice.call(n):typeof r=="string"?o.push(r):o=o.concat(r),this.urlComponents.oDataQueryParams[t]+=o.join(",")},e.prototype.buildFullUrl=function(){var t=(0,Pr.urlJoin)([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(t),t},e.prototype.createQueryString=function(){var t=this.urlComponents,r=[];if(Object.keys(t.oDataQueryParams).length!==0)for(var n in t.oDataQueryParams)Object.prototype.hasOwnProperty.call(t.oDataQueryParams,n)&&r.push(n+"="+t.oDataQueryParams[n]);if(Object.keys(t.otherURLQueryParams).length!==0)for(var n in t.otherURLQueryParams)Object.prototype.hasOwnProperty.call(t.otherURLQueryParams,n)&&r.push(n+"="+t.otherURLQueryParams[n]);if(t.otherURLQueryOptions.length!==0)for(var o=0,i=t.otherURLQueryOptions;o<i.length;o++){var s=i[o];r.push(s)}return r.length>0?"?"+r.join("&"):""},e.prototype.parseQueryParameter=function(t){if(typeof t=="string")if(t.charAt(0)==="?"&&(t=t.substring(1)),t.indexOf("&")!==-1)for(var r=t.split("&"),n=0,o=r;n<o.length;n++){var i=o[n];this.parseQueryParamenterString(i)}else this.parseQueryParamenterString(t);else if(t.constructor===Object)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.setURLComponentsQueryParamater(s,t[s]);return this},e.prototype.parseQueryParamenterString=function(t){if(this.isValidQueryKeyValuePair(t)){var r=t.indexOf("="),n=t.substring(0,r),o=t.substring(r+1);this.setURLComponentsQueryParamater(n,o)}else this.urlComponents.otherURLQueryOptions.push(t)},e.prototype.setURLComponentsQueryParamater=function(t,r){if(Pr.oDataQueryNames.indexOf(t)!==-1){var n=this.urlComponents.oDataQueryParams[t],o=n&&(t==="$expand"||t==="$select"||t==="$orderby");this.urlComponents.oDataQueryParams[t]=o?n+","+r:r}else this.urlComponents.otherURLQueryParams[t]=r},e.prototype.isValidQueryKeyValuePair=function(t){var r=t.indexOf("=");if(r===-1)return!1;var n=t.indexOf("(");return!(n!==-1&&t.indexOf("(")<r)},e.prototype.updateRequestOptions=function(t){var r=re.__assign({},t.headers);if(this.config.fetchOptions!==void 0){var n=re.__assign({},this.config.fetchOptions);Object.assign(t,n),typeof this.config.fetchOptions.headers!==void 0&&(t.headers=re.__assign({},this.config.fetchOptions.headers))}Object.assign(t,this._options),t.headers!==void 0&&Object.assign(r,t.headers),Object.assign(r,this._headers),t.headers=r},e.prototype.send=function(t,r,n){var o;return re.__awaiter(this,void 0,void 0,function(){var i,s,u,p,d,f,v,y;return re.__generator(this,function(l){switch(l.label){case 0:s=new Gy.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(r),u=(o=this.config)===null||o===void 0?void 0:o.customHosts,l.label=1;case 1:return l.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:t,options:r,middlewareControl:s,customHosts:u})];case 2:return p=l.sent(),i=p.response,[4,qy.GraphResponseHandler.getResponse(i,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(f=l.sent(),f instanceof Hy.GraphClientError)throw f;return v=void 0,i&&(v=i.status),[4,Zy.GraphErrorHandler.getError(f,v,n,i)];case 5:throw y=l.sent(),y;case 6:return[2]}})})},e.prototype.setHeaderContentType=function(){if(!this._headers){this.header("Content-Type","application/json");return}for(var t=Object.keys(this._headers),r=0,n=t;r<n.length;r++){var o=n[r];if(o.toLowerCase()==="content-type")return}this.header("Content-Type","application/json")},e.prototype.header=function(t,r){return this._headers[t]=r,this},e.prototype.headers=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._headers[r]=t[r]);return this},e.prototype.option=function(t,r){return this._options[t]=r,this},e.prototype.options=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._options[r]=t[r]);return this},e.prototype.middlewareOptions=function(t){return this._middlewareOptions=t,this},e.prototype.version=function(t){return this.urlComponents.version=t,this},e.prototype.responseType=function(t){return this._responseType=t,this},e.prototype.select=function(t){return this.addCsvQueryParameter("$select",t,arguments),this},e.prototype.expand=function(t){return this.addCsvQueryParameter("$expand",t,arguments),this},e.prototype.orderby=function(t){return this.addCsvQueryParameter("$orderby",t,arguments),this},e.prototype.filter=function(t){return this.urlComponents.oDataQueryParams.$filter=t,this},e.prototype.search=function(t){return this.urlComponents.oDataQueryParams.$search=t,this},e.prototype.top=function(t){return this.urlComponents.oDataQueryParams.$top=t,this},e.prototype.skip=function(t){return this.urlComponents.oDataQueryParams.$skip=t,this},e.prototype.skipToken=function(t){return this.urlComponents.oDataQueryParams.$skipToken=t,this},e.prototype.count=function(t){return t===void 0&&(t=!0),this.urlComponents.oDataQueryParams.$count=t.toString(),this},e.prototype.query=function(t){return this.parseQueryParameter(t)},e.prototype.get=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n,o;return re.__generator(this,function(i){switch(i.label){case 0:return r=this.buildFullUrl(),n={method:mt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=i.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,i;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:mt.RequestMethod.POST,body:(0,Pr.serializeContent)(t)},i=t&&t.constructor&&t.constructor.name,i==="FormData"?o.headers={}:(this.setHeaderContentType(),o.headers=this._headers),[4,this.send(n,o,r)];case 1:return[2,s.sent()]}})})},e.prototype.create=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.post(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.put=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:mt.RequestMethod.PUT,body:(0,Pr.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:mt.RequestMethod.PATCH,body:(0,Pr.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e.prototype.update=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.patch(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.delete=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:mt.RequestMethod.DELETE},[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.del=function(t){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(r){switch(r.label){case 0:return[4,this.delete(t)];case 1:return[2,r.sent()]}})})},e.prototype.getStream=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:mt.RequestMethod.GET},this.responseType(Wy.ResponseType.STREAM),[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.putStream=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),o={method:mt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e}();Xn.GraphRequest=Ky});var Mi=b(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.HTTPClient=void 0;var xp=(se(),oe(ae)),Jy=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!t||!t.length){var n=new Error;throw n.name="InvalidMiddlewareChain",n.message="Please provide a default middleware chain or custom middleware chain",n}this.setMiddleware.apply(this,t)}return a(e,"HTTPClient"),e.prototype.setMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.length>1?this.parseMiddleWareArray(t):this.middleware=t[0]},e.prototype.parseMiddleWareArray=function(t){t.forEach(function(r,n){n<t.length-1&&r.setNext(t[n+1])}),this.middleware=t[0]},e.prototype.sendRequest=function(t){return xp.__awaiter(this,void 0,void 0,function(){var r;return xp.__generator(this,function(n){switch(n.label){case 0:if(typeof t.request=="string"&&t.options===void 0)throw r=new Error,r.name="InvalidRequestOptions",r.message="Unable to execute the middleware, Please provide valid options for a request",r;return[4,this.middleware.execute(t)];case 1:return n.sent(),[2,t]}})})},e}();Yn.HTTPClient=Jy});var bp=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.HTTPClientFactory=void 0;var Xy=(se(),oe(ae)),Pp=Mi(),Yy=gn(),Qy=yn(),ev=vr(),tv=yr(),rv=Tn(),nv=xn(),ov=Sn(),iv=a(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),av=function(){function e(){}return a(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new Yy.AuthenticationHandler(t),n=new nv.RetryHandler(new tv.RetryHandlerOptions),o=new ov.TelemetryHandler,i=new Qy.HTTPMessageHandler;if(r.setNext(n),iv()){var s=new rv.RedirectHandler(new ev.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(i),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(Pp.HTTPClient.bind.apply(Pp.HTTPClient,Xy.__spreadArray([void 0],t,!1)))},e}();Qn.HTTPClientFactory=av});var Tp=b(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.validatePolyFilling=void 0;var sv=a(function(){if(typeof Promise>"u"&&typeof fetch>"u"){var e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}else if(typeof Promise>"u"){var e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}else if(typeof fetch>"u"){var e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}return!0},"validatePolyFilling");eo.validatePolyFilling=sv});var Ap=b(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.Client=void 0;var uv=(se(),oe(ae)),Ep=vi(),cv=ki(),lv=Ni(),Ip=Mi(),pv=bp(),dv=Tp(),fv=function(){function e(t){this.config={baseUrl:Ep.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:Ep.GRAPH_API_VERSION},(0,dv.validatePolyFilling)();for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.config[r]=t[r]);var n;if(t.authProvider!==void 0&&t.middleware!==void 0){var o=new Error;throw o.name="AmbiguityInInitialization",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",o}else if(t.authProvider!==void 0)n=pv.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(Ip.HTTPClient.bind.apply(Ip.HTTPClient,uv.__spreadArray([void 0],[].concat(t.middleware),!1)));else{var o=new Error;throw o.name="InvalidMiddlewareChain",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",o}this.httpClient=n}return a(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new cv.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new lv.GraphRequest(this.httpClient,this.config,t)},e}();to.Client=fv});var $p=b(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.ResponseType=w.GraphRequest=w.GraphClientError=w.GraphError=w.CustomAuthenticationProvider=w.Client=w.PageIterator=w.Range=w.UploadResult=w.FileUpload=w.StreamUpload=w.getValidRangeSize=w.OneDriveLargeFileUploadTask=w.LargeFileUploadTask=w.ChaosHandler=w.ChaosStrategy=w.ChaosHandlerOptions=w.TelemetryHandlerOptions=w.FeatureUsageFlag=w.RedirectHandlerOptions=w.RetryHandlerOptions=w.AuthenticationHandlerOptions=w.MiddlewareFactory=w.TelemetryHandler=w.RedirectHandler=w.RetryHandler=w.HTTPMessageHandler=w.AuthenticationHandler=w.BatchResponseContent=w.BatchRequestContent=void 0;var mv=Bl();Object.defineProperty(w,"BatchRequestContent",{enumerable:!0,get:a(function(){return mv.BatchRequestContent},"get")});var gv=Vl();Object.defineProperty(w,"BatchResponseContent",{enumerable:!0,get:a(function(){return gv.BatchResponseContent},"get")});var hv=gn();Object.defineProperty(w,"AuthenticationHandler",{enumerable:!0,get:a(function(){return hv.AuthenticationHandler},"get")});var yv=yn();Object.defineProperty(w,"HTTPMessageHandler",{enumerable:!0,get:a(function(){return yv.HTTPMessageHandler},"get")});var vv=xn();Object.defineProperty(w,"RetryHandler",{enumerable:!0,get:a(function(){return vv.RetryHandler},"get")});var _v=Tn();Object.defineProperty(w,"RedirectHandler",{enumerable:!0,get:a(function(){return _v.RedirectHandler},"get")});var xv=Sn();Object.defineProperty(w,"TelemetryHandler",{enumerable:!0,get:a(function(){return xv.TelemetryHandler},"get")});var Pv=op();Object.defineProperty(w,"MiddlewareFactory",{enumerable:!0,get:a(function(){return Pv.MiddlewareFactory},"get")});var bv=_i();Object.defineProperty(w,"AuthenticationHandlerOptions",{enumerable:!0,get:a(function(){return bv.AuthenticationHandlerOptions},"get")});var Tv=yr();Object.defineProperty(w,"RetryHandlerOptions",{enumerable:!0,get:a(function(){return Tv.RetryHandlerOptions},"get")});var Ev=vr();Object.defineProperty(w,"RedirectHandlerOptions",{enumerable:!0,get:a(function(){return Ev.RedirectHandlerOptions},"get")});var Sp=Mt();Object.defineProperty(w,"FeatureUsageFlag",{enumerable:!0,get:a(function(){return Sp.FeatureUsageFlag},"get")});Object.defineProperty(w,"TelemetryHandlerOptions",{enumerable:!0,get:a(function(){return Sp.TelemetryHandlerOptions},"get")});var Iv=Ti();Object.defineProperty(w,"ChaosHandlerOptions",{enumerable:!0,get:a(function(){return Iv.ChaosHandlerOptions},"get")});var Av=On();Object.defineProperty(w,"ChaosStrategy",{enumerable:!0,get:a(function(){return Av.ChaosStrategy},"get")});var Sv=cp();Object.defineProperty(w,"ChaosHandler",{enumerable:!0,get:a(function(){return Sv.ChaosHandler},"get")});var $v=Oi();Object.defineProperty(w,"LargeFileUploadTask",{enumerable:!0,get:a(function(){return $v.LargeFileUploadTask},"get")});var wv=fp();Object.defineProperty(w,"OneDriveLargeFileUploadTask",{enumerable:!0,get:a(function(){return wv.OneDriveLargeFileUploadTask},"get")});var Ov=Ri();Object.defineProperty(w,"getValidRangeSize",{enumerable:!0,get:a(function(){return Ov.getValidRangeSize},"get")});var zv=gp();Object.defineProperty(w,"StreamUpload",{enumerable:!0,get:a(function(){return zv.StreamUpload},"get")});var Rv=zi();Object.defineProperty(w,"FileUpload",{enumerable:!0,get:a(function(){return Rv.FileUpload},"get")});var kv=$i();Object.defineProperty(w,"UploadResult",{enumerable:!0,get:a(function(){return kv.UploadResult},"get")});var Dv=Si();Object.defineProperty(w,"Range",{enumerable:!0,get:a(function(){return Dv.Range},"get")});var Cv=hp();Object.defineProperty(w,"PageIterator",{enumerable:!0,get:a(function(){return Cv.PageIterator},"get")});var Nv=Ap();Object.defineProperty(w,"Client",{enumerable:!0,get:a(function(){return Nv.Client},"get")});var Mv=ki();Object.defineProperty(w,"CustomAuthenticationProvider",{enumerable:!0,get:a(function(){return Mv.CustomAuthenticationProvider},"get")});var Uv=Di();Object.defineProperty(w,"GraphError",{enumerable:!0,get:a(function(){return Uv.GraphError},"get")});var Lv=qe();Object.defineProperty(w,"GraphClientError",{enumerable:!0,get:a(function(){return Lv.GraphClientError},"get")});var jv=Ni();Object.defineProperty(w,"GraphRequest",{enumerable:!0,get:a(function(){return jv.GraphRequest},"get")});var Fv=_r();Object.defineProperty(w,"ResponseType",{enumerable:!0,get:a(function(){return Fv.ResponseType},"get")})});var br=b((Ui,Li)=>{(function(e,t){typeof Ui=="object"&&typeof Li<"u"?Li.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Ui,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",u="day",p="week",d="month",f="quarter",v="year",y="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(j){var A=["th","st","nd","rd"],I=j%100;return"["+j+(A[(I-20)%10]||A[I]||A[0])+"]"},"ordinal")},x=a(function(j,A,I){var O=String(j);return!O||O.length>=A?j:""+Array(A+1-O.length).join(I)+j},"m"),T={s:x,z:a(function(j){var A=-j.utcOffset(),I=Math.abs(A),O=Math.floor(I/60),S=I%60;return(A<=0?"+":"-")+x(O,2,"0")+":"+x(S,2,"0")},"z"),m:a(function j(A,I){if(A.date()<I.date())return-j(I,A);var O=12*(I.year()-A.year())+(I.month()-A.month()),S=A.clone().add(O,d),H=I-S<0,Z=A.clone().add(O+(H?-1:1),d);return+(-(O+(I-S)/(H?S-Z:Z-S))||0)},"t"),a:a(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:a(function(j){return{M:d,y:v,w:p,d:u,D:y,h:s,m:i,s:o,ms:n,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(j){return j===void 0},"u")},V="en",de={};de[V]=h;var xe=a(function(j){return j instanceof gt},"p"),De=a(function j(A,I,O){var S;if(!A)return V;if(typeof A=="string"){var H=A.toLowerCase();de[H]&&(S=H),I&&(de[H]=I,S=H);var Z=A.split("-");if(!S&&Z.length>1)return j(Z[0])}else{var te=A.name;de[te]=A,S=te}return!O&&S&&(V=S),S||!O&&V},"t"),ee=a(function(j,A){if(xe(j))return j.clone();var I=typeof A=="object"?A:{};return I.date=j,I.args=arguments,new gt(I)},"w"),W=T;W.l=De,W.i=xe,W.w=function(j,A){return ee(j,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var gt=function(){function j(I){this.$L=De(I.locale,null,!0),this.parse(I)}a(j,"M");var A=j.prototype;return A.parse=function(I){this.$d=function(O){var S=O.date,H=O.utc;if(S===null)return new Date(NaN);if(W.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var Z=S.match(m);if(Z){var te=Z[2]-1||0,fe=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,fe)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,fe)}}return new Date(S)}(I),this.$x=I.x||{},this.init()},A.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},A.$utils=function(){return W},A.isValid=function(){return this.$d.toString()!==l},A.isSame=function(I,O){var S=ee(I);return this.startOf(O)<=S&&S<=this.endOf(O)},A.isAfter=function(I,O){return ee(I)<this.startOf(O)},A.isBefore=function(I,O){return this.endOf(O)<ee(I)},A.$g=function(I,O,S){return W.u(I)?this[O]:this.set(S,I)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(I,O){var S=this,H=!!W.u(O)||O,Z=W.p(I),te=a(function(ut,be){var We=W.w(S.$u?Date.UTC(S.$y,be,ut):new Date(S.$y,be,ut),S);return H?We:We.endOf(u)},"l"),fe=a(function(ut,be){return W.w(S.toDate()[ut].apply(S.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(be)),S)},"$"),ye=this.$W,_e=this.$M,Se=this.$D,ht="set"+(this.$u?"UTC":"");switch(Z){case v:return H?te(1,0):te(31,11);case d:return H?te(1,_e):te(0,_e+1);case p:var st=this.$locale().weekStart||0,Vt=(ye<st?ye+7:ye)-st;return te(H?Se-Vt:Se+(6-Vt),_e);case u:case y:return fe(ht+"Hours",0);case s:return fe(ht+"Minutes",1);case i:return fe(ht+"Seconds",2);case o:return fe(ht+"Milliseconds",3);default:return this.clone()}},A.endOf=function(I){return this.startOf(I,!1)},A.$set=function(I,O){var S,H=W.p(I),Z="set"+(this.$u?"UTC":""),te=(S={},S[u]=Z+"Date",S[y]=Z+"Date",S[d]=Z+"Month",S[v]=Z+"FullYear",S[s]=Z+"Hours",S[i]=Z+"Minutes",S[o]=Z+"Seconds",S[n]=Z+"Milliseconds",S)[H],fe=H===u?this.$D+(O-this.$W):O;if(H===d||H===v){var ye=this.clone().set(y,1);ye.$d[te](fe),ye.init(),this.$d=ye.set(y,Math.min(this.$D,ye.daysInMonth())).$d}else te&&this.$d[te](fe);return this.init(),this},A.set=function(I,O){return this.clone().$set(I,O)},A.get=function(I){return this[W.p(I)]()},A.add=function(I,O){var S,H=this;I=Number(I);var Z=W.p(O),te=a(function(_e){var Se=ee(H);return W.w(Se.date(Se.date()+Math.round(_e*I)),H)},"y");if(Z===d)return this.set(d,this.$M+I);if(Z===v)return this.set(v,this.$y+I);if(Z===u)return te(1);if(Z===p)return te(7);var fe=(S={},S[i]=t,S[s]=r,S[o]=e,S)[Z]||1,ye=this.$d.getTime()+I*fe;return W.w(ye,this)},A.subtract=function(I,O){return this.add(-1*I,O)},A.format=function(I){var O=this,S=this.$locale();if(!this.isValid())return S.invalidDate||l;var H=I||"YYYY-MM-DDTHH:mm:ssZ",Z=W.z(this),te=this.$H,fe=this.$m,ye=this.$M,_e=S.weekdays,Se=S.months,ht=S.meridiem,st=a(function(be,We,Ht,Tr){return be&&(be[We]||be(O,H))||Ht[We].slice(0,Tr)},"h"),Vt=a(function(be){return W.s(te%12||12,be,"0")},"d"),ut=ht||function(be,We,Ht){var Tr=be<12?"AM":"PM";return Ht?Tr.toLowerCase():Tr};return H.replace(_,function(be,We){return We||function(Ht){switch(Ht){case"YY":return String(O.$y).slice(-2);case"YYYY":return W.s(O.$y,4,"0");case"M":return ye+1;case"MM":return W.s(ye+1,2,"0");case"MMM":return st(S.monthsShort,ye,Se,3);case"MMMM":return st(Se,ye);case"D":return O.$D;case"DD":return W.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return st(S.weekdaysMin,O.$W,_e,2);case"ddd":return st(S.weekdaysShort,O.$W,_e,3);case"dddd":return _e[O.$W];case"H":return String(te);case"HH":return W.s(te,2,"0");case"h":return Vt(1);case"hh":return Vt(2);case"a":return ut(te,fe,!0);case"A":return ut(te,fe,!1);case"m":return String(fe);case"mm":return W.s(fe,2,"0");case"s":return String(O.$s);case"ss":return W.s(O.$s,2,"0");case"SSS":return W.s(O.$ms,3,"0");case"Z":return Z}return null}(be)||Z.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(I,O,S){var H,Z=this,te=W.p(O),fe=ee(I),ye=(fe.utcOffset()-this.utcOffset())*t,_e=this-fe,Se=a(function(){return W.m(Z,fe)},"D");switch(te){case v:H=Se()/12;break;case d:H=Se();break;case f:H=Se()/3;break;case p:H=(_e-ye)/6048e5;break;case u:H=(_e-ye)/864e5;break;case s:H=_e/r;break;case i:H=_e/t;break;case o:H=_e/e;break;default:H=_e}return S?H:W.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return de[this.$L]},A.locale=function(I,O){if(!I)return this.$L;var S=this.clone(),H=De(I,O,!0);return H&&(S.$L=H),S},A.clone=function(){return W.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},j}(),at=gt.prototype;return ee.prototype=at,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",u],["$M",d],["$y",v],["$D",y]].forEach(function(j){at[j[1]]=function(A){return this.$g(A,j[0],j[1])}}),ee.extend=function(j,A){return j.$i||(j(A,gt,ee),j.$i=!0),ee},ee.locale=De,ee.isDayjs=xe,ee.unix=function(j){return ee(1e3*j)},ee.en=de[V],ee.Ls=de,ee.p={},ee})});var Wv={};io(Wv,{microsoftOutlook:()=>Gv});module.exports=oe(Wv);var Yp=Object.freeze({status:"aborted"});function z(e,t,r){function n(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let d=s.prototype,f=Object.keys(d);for(let v=0;v<f.length;v++){let y=f[v];y in u||(u[y]=d[y].bind(u))}}a(n,"init");let o=r?.Parent??Object;class i extends o{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function s(u){var p;let d=r?.Parent?new i:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let f of d._zod.deferred)f();return d}return a(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(z,"$constructor");var Qp=Symbol("zod_brand"),Ce=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Er=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ao={};function Le(e){return e&&Object.assign(ao,e),ao}a(Le,"config");function uo(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}a(uo,"getEnumValues");function Zi(e,t){return typeof t=="bigint"?t.toString():t}a(Zi,"jsonStringifyReplacer");function Ar(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a(Ar,"cached");function qi(e){return e==null}a(qi,"nullish");function Sr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}a(Sr,"cleanRegex");var Hi=Symbol("evaluating");function me(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Hi)return n===void 0&&(n=Hi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}a(me,"defineLazy");var co="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(qt,"isObject");var ed=Ar(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Gi(e){if(qt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(qt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(Gi,"isPlainObject");var Wi=new Set(["string","number","symbol"]);function yt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(yt,"escapeRegex");function $r(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}a($r,"clone");function ue(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(ue,"normalizeParams");function Ki(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Ki,"optionalKeys");var td={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 vt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}a(vt,"aborted");function Ke(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}a(Ke,"prefixIssues");function Ir(e){return typeof e=="string"?e:e?.message}a(Ir,"unwrapMessage");function Je(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Ir(e.inst?._zod.def?.error?.(e))??Ir(t?.error?.(e))??Ir(r.customError?.(e))??Ir(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}a(Je,"finalizeIssue");function Ji(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(Ji,"getLengthableOrigin");function lo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}a(lo,"issue");var Xi=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Zi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),Yi=z("$ZodError",Xi),Gt=z("$ZodError",Xi,{Parent:Error});var nd=a(e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Ce;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Je(p,i,Le())));throw co(u,o?.callee),u}return s.value},"_parse"),wr=nd(Gt),od=a(e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Je(p,i,Le())));throw co(u,o?.callee),u}return s.value},"_parseAsync"),Or=od(Gt),id=a(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Ce;return i.issues.length?{success:!1,error:new(e??Yi)(i.issues.map(s=>Je(s,o,Le())))}:{success:!0,data:i.value}},"_safeParse"),Wt=id(Gt),ad=a(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Je(s,o,Le())))}:{success:!0,data:i.value}},"_safeParseAsync"),Kt=ad(Gt);var sd="(?:(?:\\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])))",ud=new RegExp(`^${sd}$`);var Qi=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),ea=/^-?\d+n?$/;var po=/^-?\d+(?:\.\d+)?$/,ta=/^(?:true|false)$/i;var _t=z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var ra=z("$ZodCheckMinLength",(e,t)=>{var r;_t.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!qi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=Ji(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var fo=z("$ZodCheckStringFormat",(e,t)=>{var r,n;_t.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),na=z("$ZodCheckRegex",(e,t)=>{fo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var ia={major:4,minor:3,patch:6};var ce=z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ia;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=a((s,u,p)=>{let d=vt(s),f;for(let v of u){if(v._zod.def.when){if(!v._zod.def.when(s))continue}else if(d)continue;let y=s.issues.length,l=v._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new Ce;if(f||l instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await l,s.issues.length!==y&&(d||(d=vt(s,y)))});else{if(s.issues.length===y)continue;d||(d=vt(s,y))}}return f?f.then(()=>s):s},"runChecks"),i=a((s,u,p)=>{if(vt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new Ce;return d.then(f=>e._zod.parse(f,p))}return e._zod.parse(d,p)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(f=>i(f,s,u)):i(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new Ce;return p.then(d=>o(d,n,u))}return o(p,n,u)}}me(e,"~standard",()=>({validate:a(o=>{try{let i=Wt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Kt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kr=z("$ZodString",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Qi(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),mo=z("$ZodStringFormat",(e,t)=>{fo.init(e,t),kr.init(e,t)});var la=z("$ZodURL",(e,t)=>{mo.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var pa=z("$ZodNumber",(e,t)=>{ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??po,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}});var go=z("$ZodBoolean",(e,t)=>{ce.init(e,t),e._zod.pattern=ta,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),da=z("$ZodBigInt",(e,t)=>{ce.init(e,t),e._zod.pattern=ea,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var fa=z("$ZodAny",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r}),ma=z("$ZodUnknown",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r});var ga=z("$ZodVoid",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),ha=z("$ZodDate",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function aa(e,t,r){e.issues.length&&t.issues.push(...Ke(r,e.issues)),t.value[r]=e.value}a(aa,"handleArrayResult");var ya=z("$ZodArray",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?i.push(p.then(d=>aa(d,r,s))):aa(p,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Rr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Ke(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}a(Rr,"handlePropertyResult");function cd(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Ki(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}a(cd,"normalizeDef");function ld(e,t,r,n,o,i){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,f=p.optout==="optional";for(let v in t){if(u.has(v))continue;if(d==="never"){s.push(v);continue}let y=p.run({value:t[v],issues:[]},n);y instanceof Promise?e.push(y.then(l=>Rr(l,r,v,t,f))):Rr(y,r,v,t,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}a(ld,"handleCatchall");var va=z("$ZodObject",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=Ar(()=>cd(t));me(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let f=u[d]._zod;if(f.values){p[d]??(p[d]=new Set);for(let v of f.values)p[d].add(v)}}return p});let o=qt,i=t.catchall,s;e._zod.parse=(u,p)=>{s??(s=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let f=[],v=s.shape;for(let y of s.keys){let l=v[y],m=l._zod.optout==="optional",_=l._zod.run({value:d[y],issues:[]},p);_ instanceof Promise?f.push(_.then(h=>Rr(h,u,y,d,m))):Rr(_,u,y,d,m)}return i?ld(f,d,u,p,n.value,e):f.length?Promise.all(f).then(()=>u):u}});function sa(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!vt(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Je(s,n,Le())))}),t)}a(sa,"handleUnionResults");var ho=z("$ZodUnion",(e,t)=>{ce.init(e,t),me(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),me(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),me(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),me(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Sr(i.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},i);if(d instanceof Promise)u.push(d),s=!0;else{if(d.issues.length===0)return d;u.push(d)}}return s?Promise.all(u).then(p=>sa(p,o,e,i)):sa(u,o,e,i)}});var _a=z("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ho.init(e,t);let r=e._zod.parse;me(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,p]of Object.entries(s)){o[u]||(o[u]=new Set);for(let d of p)o[u].add(d)}}return o});let n=Ar(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let p of u){if(i.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);i.set(p,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!qt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var xa=z("$ZodRecord",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Gi(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let f=t.valueType._zod.run({value:o[d],issues:[]},n);f instanceof Promise?i.push(f.then(v=>{v.issues.length&&r.issues.push(...Ke(d,v.issues)),r.value[d]=v.value})):(f.issues.length&&r.issues.push(...Ke(d,f.issues)),r.value[d]=f.value)}let p;for(let d in o)u.has(d)||(p=p??[],p.push(d));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&po.test(u)&&p.issues.length){let v=t.keyType._zod.run({value:Number(u),issues:[]},n);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(p=v)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(v=>Je(v,n,Le())),input:u,path:[u],inst:e});continue}let f=t.valueType._zod.run({value:o[u],issues:[]},n);f instanceof Promise?i.push(f.then(v=>{v.issues.length&&r.issues.push(...Ke(u,v.issues)),r.value[p.value]=v.value})):(f.issues.length&&r.issues.push(...Ke(u,f.issues)),r.value[p.value]=f.value)}}return i.length?Promise.all(i).then(()=>r):r}});var Pa=z("$ZodEnum",(e,t)=>{ce.init(e,t);let r=uo(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Wi.has(typeof o)).map(o=>typeof o=="string"?yt(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),ba=z("$ZodLiteral",(e,t)=>{if(ce.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?yt(n):n?yt(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}});var Ta=z("$ZodTransform",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Er(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Ce;return r.value=o,r}});function ua(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(ua,"handleOptionalResult");var Ea=z("$ZodOptional",(e,t)=>{ce.init(e,t),e._zod.optin="optional",e._zod.optout="optional",me(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),me(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Sr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ua(i,r.value)):ua(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Ia=z("$ZodNullable",(e,t)=>{ce.init(e,t),me(e._zod,"optin",()=>t.innerType._zod.optin),me(e._zod,"optout",()=>t.innerType._zod.optout),me(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Sr(r.source)}|null)$`):void 0}),me(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Aa=z("$ZodPipe",(e,t)=>{ce.init(e,t),me(e._zod,"values",()=>t.in._zod.values),me(e._zod,"optin",()=>t.in._zod.optin),me(e._zod,"optout",()=>t.out._zod.optout),me(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>zr(s,t.in,n)):zr(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>zr(i,t.out,n)):zr(o,t.out,n)}});function zr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}a(zr,"handlePipeResult");var Sa=z("$ZodCustom",(e,t)=>{_t.init(e,t),ce.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>ca(i,r,n,e));ca(o,r,n,e)}});function ca(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(lo(o))}}a(ca,"handleRefineResult");var wa,md=Symbol("ZodOutput"),gd=Symbol("ZodInput"),yo=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Oa(){return new yo}a(Oa,"registry");(wa=globalThis).__zod_globalRegistry??(wa.__zod_globalRegistry=Oa());var vo=globalThis.__zod_globalRegistry;function za(e,t){return new e({type:"string",...ue(t)})}a(za,"_string");function Ra(e,t){return new e({type:"string",coerce:!0,...ue(t)})}a(Ra,"_coercedString");function ka(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(t)})}a(ka,"_url");function Da(e,t){return new e({type:"number",checks:[],...ue(t)})}a(Da,"_number");function Ca(e,t){return new e({type:"number",coerce:!0,checks:[],...ue(t)})}a(Ca,"_coercedNumber");function Na(e,t){return new e({type:"boolean",...ue(t)})}a(Na,"_boolean");function Ma(e,t){return new e({type:"boolean",coerce:!0,...ue(t)})}a(Ma,"_coercedBoolean");function Ua(e,t){return new e({type:"bigint",coerce:!0,...ue(t)})}a(Ua,"_coercedBigint");function La(e){return new e({type:"any"})}a(La,"_any");function ja(e){return new e({type:"unknown"})}a(ja,"_unknown");function Fa(e,t){return new e({type:"void",...ue(t)})}a(Fa,"_void");function Ba(e,t){return new e({type:"date",coerce:!0,...ue(t)})}a(Ba,"_coercedDate");function Re(e,t){return new ra({check:"min_length",...ue(t),minimum:e})}a(Re,"_minLength");function Xe(e,t){return new na({check:"string_format",format:"regex",...ue(t),pattern:e})}a(Xe,"_regex");function Va(e,t,r){let n=ue(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}a(Va,"_custom");var ge=z("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ce.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Wt(e,r,n),e.parseAsync=async(r,n)=>Or(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Kt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$r(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Cr=z("ZodMiniString",(e,t)=>{kr.init(e,t),ge.init(e,t)});function c(e){return za(Cr,e)}a(c,"string");var Ha=z("ZodMiniStringFormat",(e,t)=>{mo.init(e,t),Cr.init(e,t)});var Id=z("ZodMiniURL",(e,t)=>{la.init(e,t),Ha.init(e,t)});function Za(e){return ka(Id,e)}a(Za,"url");var _o=z("ZodMiniNumber",(e,t)=>{pa.init(e,t),ge.init(e,t)});function Pe(e){return Da(_o,e)}a(Pe,"number");var xo=z("ZodMiniBoolean",(e,t)=>{go.init(e,t),ge.init(e,t)});function Q(e){return Na(xo,e)}a(Q,"boolean");var qa=z("ZodMiniBigInt",(e,t)=>{da.init(e,t),ge.init(e,t)});var Ad=z("ZodMiniAny",(e,t)=>{fa.init(e,t),ge.init(e,t)});function Xt(){return La(Ad)}a(Xt,"any");var Sd=z("ZodMiniUnknown",(e,t)=>{ma.init(e,t),ge.init(e,t)});function M(){return ja(Sd)}a(M,"unknown");var $d=z("ZodMiniVoid",(e,t)=>{ga.init(e,t),ge.init(e,t)});function Ga(e){return Fa($d,e)}a(Ga,"_void");var Wa=z("ZodMiniDate",(e,t)=>{ha.init(e,t),ge.init(e,t)});var wd=z("ZodMiniArray",(e,t)=>{ya.init(e,t),ge.init(e,t)});function F(e,t){return new wd({type:"array",element:e,...ue(t)})}a(F,"array");var Od=z("ZodMiniObject",(e,t)=>{va.init(e,t),ge.init(e,t),me(e,"shape",()=>t.shape)});function g(e,t){let r={type:"object",shape:e??{},...ue(t)};return new Od(r)}a(g,"object");var zd=z("ZodMiniUnion",(e,t)=>{ho.init(e,t),ge.init(e,t)});function B(e,t){return new zd({type:"union",options:e,...ue(t)})}a(B,"union");var Rd=z("ZodMiniDiscriminatedUnion",(e,t)=>{_a.init(e,t),ge.init(e,t)});function xt(e,t,r){return new Rd({type:"union",options:t,discriminator:e,...ue(r)})}a(xt,"discriminatedUnion");var kd=z("ZodMiniRecord",(e,t)=>{xa.init(e,t),ge.init(e,t)});function U(e,t,r){return new kd({type:"record",keyType:e,valueType:t,...ue(r)})}a(U,"record");var Dd=z("ZodMiniEnum",(e,t)=>{Pa.init(e,t),ge.init(e,t),e.options=Object.values(t.entries)});function G(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Dd({type:"enum",entries:r,...ue(t)})}a(G,"_enum");var Cd=z("ZodMiniLiteral",(e,t)=>{ba.init(e,t),ge.init(e,t)});function k(e,t){return new Cd({type:"literal",values:Array.isArray(e)?e:[e],...ue(t)})}a(k,"literal");var Nd=z("ZodMiniTransform",(e,t)=>{Ta.init(e,t),ge.init(e,t)});function Ye(e){return new Nd({type:"transform",transform:e})}a(Ye,"transform");var Md=z("ZodMiniOptional",(e,t)=>{Ea.init(e,t),ge.init(e,t)});function P(e){return new Md({type:"optional",innerType:e})}a(P,"optional");var Ud=z("ZodMiniNullable",(e,t)=>{Ia.init(e,t),ge.init(e,t)});function Yt(e){return new Ud({type:"nullable",innerType:e})}a(Yt,"nullable");var Ld=z("ZodMiniPipe",(e,t)=>{Aa.init(e,t),ge.init(e,t)});function Qe(e,t){return new Ld({type:"pipe",in:e,out:t})}a(Qe,"pipe");var jd=z("ZodMiniCustom",(e,t)=>{Sa.init(e,t),ge.init(e,t)});function Nr(e,t){return Va(jd,e??(()=>!0),t)}a(Nr,"custom");var Qt={};io(Qt,{bigint:()=>Gd,boolean:()=>qd,date:()=>Wd,number:()=>Zd,string:()=>Hd});function Hd(e){return Ra(Cr,e)}a(Hd,"string");function Zd(e){return Ca(_o,e)}a(Zd,"number");function qd(e){return Ma(xo,e)}a(qd,"boolean");function Gd(e){return Ua(qa,e)}a(Gd,"bigint");function Wd(e){return Ba(Wa,e)}a(Wd,"date");var bo=g({retryOnFailure:g({defaultValue:P(Q()),hide:P(Q())}),continueOnFailure:g({defaultValue:P(Q()),hide:P(Q())})}),Po=class{constructor(t,r,n,o,i,s,u,p,d,f,v){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=i;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=f;this.aiMetadata=v}static{a(this,"IAction")}},ne=a(e=>new Po(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 Y=g({displayName:c(),description:P(c())}),q=a((e,t)=>g({type:k(t),required:Q(),defaultValue:P(Xt())}),"TPropertyValue");var Ie=g({...Y.shape,...q(c(),"SHORT_TEXT").shape}),je=g({...Y.shape,...q(c(),"LONG_TEXT").shape});var Ja=g({label:c(),value:M()}),Mr=g({disabled:P(Q()),placeholder:P(c()),options:F(Ja)});var Ae=g({...Y.shape,options:Mr,...q(M(),"STATIC_DROPDOWN").shape}),Fe=g({...Y.shape,options:Mr,...q(F(M()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var To=g({...Y.shape,...q(M(),"DROPDOWN").shape,refreshers:F(c())}),er=g({...Y.shape,...q(F(M()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Be=g({...Y.shape,...q(Q(),"CHECKBOX").shape});var Ve=g({...Y.shape,...q(Pe(),"NUMBER").shape});var tr=g({...Y.shape,...q(M(),"FILE").shape});var rr=g({...Y.shape,...q(c(),"DATE_TIME").shape});var Xa=U(c(),B([Ie,je,Ae,er,Fe,Be,Ve,tr,rr])),nr=g({...Y.shape,properties:Xa,...q(F(M()),"ARRAY").shape});var or=g({...Y.shape,...q(B([U(c(),M())]),"JSON").shape});var Ya=B([Ie,Ae,or,nr,Fe]),Jd=U(c(),Ya),Eo=g({refreshers:F(c()),...Y.shape,...q(M(),"DYNAMIC").shape});var Ur=g({...Y.shape,...q(Ga(),"MARKDOWN").shape});var ir=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ir||{}),Pt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Pt||{}),bt=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(bt||{});var ar=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ar||{}),Io="both_client_credentials_and_authorization_code";var Ne=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Ne||{}),sr=(i=>(i.NONE="NONE",i.HEADER_PRESENT="HEADER_PRESENT",i.QUERY_PRESENT="QUERY_PRESENT",i.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",i.HEAD_REQUEST="HEAD_REQUEST",i))(sr||{}),Xd=g({strategy:G(sr),paramName:P(c())}),ur=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ur||{});var Lr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lr||{}),Qa=g({status:P(Pe()),body:P(M()),headers:P(U(c(),c()))}),es=g({type:k("DELAY"),resumeDateTime:c(),requestIdToReply:P(c()),handlerId:P(c()),streamStepProgress:P(G(Lr))}),ts=g({type:k("WEBHOOK"),requestId:c(),requestIdToReply:P(c()),response:Qa,handlerId:P(c()),streamStepProgress:P(G(Lr))}),Yd=B([es,ts]);var Qd=g({body:M(),rawBody:P(M()),headers:U(c(),c()),queryParams:U(c(),c())});function he(e){return e==null}a(he,"isNil");function cr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(cr,"isEmpty");function He(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(He,"assertNotNullOrUndefined");var Ao=ze(require("crypto"),1);var ef=128,ct,Tt,tf=a(e=>{!ct||ct.length<e?(ct=Buffer.allocUnsafe(e*ef),Ao.default.randomFillSync(ct),Tt=0):Tt+e>ct.length&&(Ao.default.randomFillSync(ct),Tt=0),Tt+=e},"fillPool"),rf=a(e=>(tf(e|=0),ct.subarray(Tt-e,Tt)),"random"),nf=a((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===i)return s}}},"customRandom"),ns=a((e,t=21)=>nf(e,t,rf),"customAlphabet");var of="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",os=21,O$=c().check(Xe(new RegExp(`^[0-9a-zA-Z]{${os}}$`))),af=ns(of,os);var et=Qe(Ye(e=>e instanceof Date?e.toISOString():e),c()),$e={id:c(),created:et,updated:et},ie=a(e=>P(Yt(e)),"Nullable");function So(e){return P(Yt(G(e)))}a(So,"NullableEnum");var k$=Qe(Ye(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),P(Q())),jr=a(e=>Qe(Ye(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),P(F(e))),"OptionalArrayFromQuery");var N$=U(c(),M());var lr=(f=>(f.OPENAI="openai",f.OPENROUTER="openrouter",f.ANTHROPIC="anthropic",f.AZURE="azure",f.GOOGLE="google",f.ACTIVEPIECES="activepieces",f.CLOUDFLARE_GATEWAY="cloudflare-gateway",f.CUSTOM="custom",f.BEDROCK="bedrock",f.MISTRAL="mistral",f))(lr||{});var W$=c().check(Xe(/^#[0-9A-Fa-f]{6}$/));var J$=g({filename:c(),data:M(),type:k("file"),mimetype:P(c())});var sf=ze(as());var nw=g({...$e,name:c(),permissions:F(c()),platformId:ie(c()),type:c(),userCount:P(Pe())});var ss=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(ss||{}),$o=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))($o||{}),wo=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(wo||{});var Oo=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Oo||{});var zo=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(zo||{});var uf=g({mode:G(ss),value:M()}),cf=g({auth:P(c()),fields:U(c(),uf)}),lf=g({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:P(cf)}),pf=g({type:k("PIECE"),toolName:c().check(Re(1)),pieceMetadata:lf}),df=g({type:k("none")}),ff=g({type:k("access_token"),accessToken:c()}),mf=g({type:k("api_key"),apiKey:c(),apiKeyHeader:c()}),gf=g({type:k("headers"),headers:U(c(),c())}),hf=xt("type",[df,ff,mf,gf]),us=g({type:k("FLOW"),toolName:c().check(Re(1)),externalFlowId:c(),flowDisplayName:P(c())}),cs=g({type:k("MCP"),toolName:c().check(Re(1)),serverUrl:Za(),protocol:G(wo),auth:hf}),ls=g({type:k("KNOWLEDGE_BASE"),toolName:c().check(Re(1)),sourceType:G($o),sourceId:c(),sourceName:c()}),yf=xt("type",[pf,us,cs,ls]),vf=g({displayName:c(),description:P(c()),type:G(Oo)}),ps=g({type:k("MARKDOWN"),markdown:c()}),Et={type:k("TOOL_CALL"),input:ie(U(c(),M())),output:P(M()),toolName:c(),status:G(zo),toolCallId:c(),startTime:c(),endTime:P(c())},Ow=g(Et),ds=xt("toolCallType",[g({...Et,toolCallType:k("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),g({...Et,toolCallType:k("FLOW"),displayName:c(),externalFlowId:c()}),g({...Et,toolCallType:k("MCP"),displayName:c(),serverUrl:c()}),g({...Et,toolCallType:k("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),g({...Et,toolCallType:k("UNKNOWN"),displayName:c()})]),_f=B([ps,ds]);var Ro=(r=>(r.IMAGE="image",r.TEXT="text",r))(Ro||{}),Ze=g({apiKey:c()}),xf=Ze,Pf=g({apiKey:c(),apiKeyHash:c()}),bf=Ze,Tf=Ze,Ef=Ze,If=Ze,Af=Ze,Sf=Ze,$f=Ze,fs=g({accessKeyId:c().check(Re(1)),secretAccessKey:c().check(Re(1))}),wf=g({}),Of=g({}),zf=g({}),Rf=g({}),kf=g({}),Df=g({}),ms=g({modelId:c(),modelName:c(),modelType:G(Ro)}),gs=g({apiKeyHeader:c(),baseUrl:c(),models:F(ms),defaultHeaders:P(U(c(),c()))}),hs=g({accountId:c(),gatewayId:c(),models:F(ms),vertexProject:P(c()),vertexRegion:P(c())}),ys=g({resourceName:c(),apiVersion:Qe(Ye(e=>typeof e=="string"&&e.trim().length===0?void 0:e),P(c()))}),vs=g({region:c().check(Re(1))}),Cf=B([xf,Ef,If,Af,Sf,Tf,bf,Pf,fs,$f]),_s=B([gs,hs,ys,vs,wf,zf,Rf,kf,Of,Df]),Nf=g({id:c(),name:c(),type:G(Ro)}),Mf=g({id:c(),name:c(),provider:G(lr),config:_s,enabledForChat:Q()}),Uf=g({provider:G(lr),config:_s,auth:Cf,platformId:c()});var Dw={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Lf=g({base64Url:c(),fileName:c(),extension:P(c())}),jf=g({mimeType:c(),url:c(),fileName:P(c())}),ko=B([Lf,jf]);var Ff=B([g({type:k("file"),value:ko}),g({type:k("markdown"),value:c(),files:P(F(ko))})]),Bf=g({sessionId:c(),message:c(),files:P(F(c()))});var Ps=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ps||{}),bs=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(bs||{}),Do=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Do||{});var Vf=B([g({...$e,name:c(),externalId:c(),type:k("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:g({options:F(g({value:c()}))})}),g({...$e,name:c(),externalId:c(),type:B([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:c(),projectId:c()})]),Hf=g({...$e,name:c(),folderId:ie(c()),projectId:c(),externalId:c(),status:So(bs),trigger:So(Ps)}),Zf=g({...$e,tableId:c(),projectId:c(),cells:U(c(),g({updated:c(),created:c(),value:M(),fieldName:c()}))}),qf=g({events:F(G(Do)),webhookUrl:c(),flowId:c()}),Gf=g({fields:F(g({id:c(),name:c()})),rows:F(U(c(),c())),name:c()}),Wf=g({projectId:c(),limit:P(Qt.number()),cursor:P(c()),name:P(c()),externalIds:jr(c()),folderId:P(c()),folderIds:jr(c())}),Kf=g({records:F(F(g({fieldId:c(),value:Es()}))),tableId:c()}),Jf=g({cells:P(F(g({fieldId:c(),value:Es()}))),tableId:c(),agentUpdate:P(Q())}),Ts=xt("operator",[lt("eq"),lt("neq"),lt("gt"),lt("gte"),lt("lt"),lt("lte"),lt("co"),xs("exists"),xs("not_exists")]),Xf=g({tableId:c(),limit:P(Qt.number()),cursor:P(c()),filters:jr(Ts)});function Es(){return Qe(Ye(e=>e==null?e:String(e)),Yt(c()))}a(Es,"coerceToString");function lt(e){return g({fieldId:c(),operator:k(e),value:c()})}a(lt,"valueFilter");function xs(e){return g({fieldId:c(),operator:k(e)})}a(xs,"existenceFilter");var Yf=g({status:P(Pe()),body:P(M()),headers:P(U(c(),c()))}),Qf=g({...$e,deleted:ie(et),ownerId:c(),displayName:c(),platformId:c(),externalId:ie(c())});var Is=g({name:c(),description:P(c()),type:c(),required:Q()}),em=g({pieceName:c(),triggerName:c(),input:g({toolName:c(),toolDescription:c(),inputSchema:F(Is),returnsResponse:Q()})});var As="^[0-9]+\\.[0-9]+\\.[0-9]+$",Qw=new RegExp(As),rm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",eO=c().check(Xe(new RegExp(As))),tO=c().check(Xe(new RegExp(rm))),nm=g({packageType:k("ARCHIVE"),pieceType:G(Pt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),Ss=g({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:c(),pieceVersion:c()}),$s=g({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),rO=B([Ss,$s]),nO=B([nm,Ss,$s]),ws=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ws||{}),om=g({type:G(ws),cronExpression:c(),timezone:c()}),oO=g({...$e,type:G(Ne),projectId:c(),flowId:c(),triggerName:c(),schedule:ie(om),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:ie(c()),simulate:Q()}),Os=(h=>(h.UNKNOWN="UNKNOWN",h.FLOW_RUN_LOG="FLOW_RUN_LOG",h.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",h.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",h.FLOW_STEP_FILE="FLOW_STEP_FILE",h.SAMPLE_DATA="SAMPLE_DATA",h.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",h.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",h.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",h.PROJECT_RELEASE="PROJECT_RELEASE",h.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",h.PLATFORM_ASSET="PLATFORM_ASSET",h.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",h.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",h.KNOWLEDGE_BASE="KNOWLEDGE_BASE",h.FLOW_BUNDLE="FLOW_BUNDLE",h))(Os||{}),zs=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(zs||{}),Rs=(r=>(r.S3="S3",r.DB="DB",r))(Rs||{}),iO=g({...$e,projectId:ie(c()),platformId:ie(c()),type:G(Os),compression:G(zs),data:P(M()),location:G(Rs),size:ie(Pe()),fileName:ie(c()),s3Key:ie(c()),metadata:ie(U(c(),c()))}),ks=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ks||{}),Ds=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Ds||{}),aO=g({id:c(),email:c(),firstName:c(),status:G(Ds),externalId:ie(c()),platformId:ie(c()),platformRole:G(ks),lastName:c(),created:et,updated:et,lastActiveDate:ie(et),imageUrl:ie(c())});var No=g({...Y.shape,...q(U(c(),M()),"OBJECT").shape});var Ms=g({...Y.shape,...q(c(),"COLOR").shape});var Mo=B([Ie,je,Ur,Be,Ae,Fe,To,er,Eo,Ve,nr,No,or,rr,tr,Ms]),E={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 t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Me=g({displayName:c(),description:P(c())});var Us=g({username:c(),password:c()}),Uo=g({...Me.shape,username:g({displayName:c(),description:P(c())}),password:g({displayName:c(),description:P(c())}),...q(Us,"BASIC_AUTH").shape});var um=U(c(),B([Ie,je,Ve,Be,Ae])),Lo=g({...Me.shape,props:um,...q(M(),"CUSTOM_AUTH").shape});var pt=g({...Me.shape,...q(g({auth:c()}),"SECRET_TEXT").shape});var cm=U(c(),B([Ie,je,pt,Ve,Be,Ae,Fe,Ur])),Ls=g({...Me.shape,props:cm,...q(M(),"OIDC").shape});var jo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(jo||{}),js=B([Ie,pt,Ae]),Fs=U(c(),js),lm=g({props:P(U(c(),js)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:P(B([k("none"),k("consent"),k("login"),k("omit")])),pkce:P(Q()),pkceMethod:P(B([k("plain"),k("S256")])),authorizationMethod:P(G(jo)),grantType:P(B([G(ar),k(Io)])),extra:P(U(c(),c()))}),Bs=g({access_token:c(),props:P(Fs),data:U(c(),Xt())}),Fo=g({...Me.shape,...lm.shape,...q(Bs,"OAUTH2").shape});var It=B([Uo,Lo,Ls,Fo,pt]),pr="Connection",Bo={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||pr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||pr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||pr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||pr}},None(){}};var Uz={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 pm=g({...Y.shape,...q(M(),"CUSTOM").shape,code:c()});var dm=B([Mo,It]),Vo=U(c(),dm),oR=U(c(),Mo);var Vs=B([g({strategy:k("CRON"),cronExpression:c()}),g({strategy:k("NONE")})]),At=class{constructor(t,r,n,o,i,s,u,p,d,f,v,y,l,m,_,h,x,T,V){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=f;this.onEnable=v;this.onDisable=y;this.onStart=l;this.run=m;this.test=_;this.sampleData=h;this.testStrategy=x;this.outputSchema=T;this.aiMetadata=V}static{a(this,"ITrigger")}},St=a(e=>{switch(e.type){case"WEBHOOK":return new At(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 At(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 At(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 At(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,he(e.sampleData)&&he(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Hs="2",Br="0.82.0";var Ho=class{constructor(t,r,n,o,i,s,u,p,d=Br,f,v=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=f;this.description=v;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:Hs}),"getContextInfo");(!fm(d)||mm(d,Br))&&(this.minimumSupportedRelease=Br),i.forEach(y=>this._actions[y.name]=y),s.forEach(y=>this._triggers[y.name]=y)}static{a(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,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Zs=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(i=>i.type===r.type)))throw new Error("Auth properties must be unique by type");return new Ho(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function fm(e){return/^\d+\.\d+\.\d+$/.test(e)}a(fm,"isValidSimpleSemver");function mm(e,t){let[r,n,o]=e.split(".").map(Number),[i,s,u]=t.split(".").map(Number);return r!==i?r<i:n!==s?n<s:o<u}a(mm,"isSemverLessThan");var gm=P(U(c(),U(c(),c()))),qs=g({id:P(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:P(c()),directoryPath:P(c()),auth:P(B([It,F(It)])),version:c(),categories:P(F(G(bt))),minimumSupportedRelease:P(c()),maximumSupportedRelease:P(c()),i18n:gm}),hm=G(["human","ai","both"]),Gs=g({description:P(c()),idempotent:P(Q())}),Ws=g({name:c(),displayName:c(),description:c(),props:Vo,requireAuth:Q(),errorHandlingOptions:P(bo),outputSchema:P(Nr()),audience:P(hm),aiMetadata:P(Gs)}),Ks=g({name:c(),displayName:c(),description:c(),props:Vo,errorHandlingOptions:P(bo),type:G(Ne),sampleData:M(),handshakeConfiguration:P(Nr()),renewConfiguration:P(Vs),testStrategy:G(ur),outputSchema:P(Nr()),aiMetadata:P(Gs)}),ym=g({...qs.shape,actions:U(c(),Ws),triggers:U(c(),Ks)}),vm=g({...qs.shape,actions:Pe(),triggers:Pe(),suggestedActions:P(F(Ks)),suggestedTriggers:P(F(Ws))}),Js=g({projectUsage:Pe(),tags:P(F(c())),pieceType:G(Pt),packageType:G(ir),platformId:P(c()),archiveId:P(c())}),ok=g({...ym.shape,...Js.shape}),ik=g({...vm.shape,...Js.shape}),ak=g({name:c(),version:c()});var _m=ze(require("path")),xm=ze(require("fs/promises"));var Vr=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{a(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((i,s)=>{o.append(s,i)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Hr=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new Zo,r=new qo){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Zo=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},qo=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var Zr=class extends Error{constructor(r,n){let o=n.status||500,i=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:i},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=i}static{a(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 qr=class extends Vr{static{a(this,"FetchHttpClient")}constructor(t="",r=new Hr){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),i=this.getHeaders(t),s=t.queryParams??{};for(let[V,de]of Object.entries(s))o.append(V,de);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",f=t.followRedirects??!0,v=t.retries??0,{body:y,extraHeaders:l,isStream:m}=Pm(t.body,i),_=Tm({...i,...l}),h=await bm(async()=>{let V=new AbortController,de=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:_,body:y,redirect:f?"follow":"manual",signal:V.signal};return m&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(p,xe)}finally{de!==void 0&&clearTimeout(de)}},v),x=f?300:400;if(h.status<200||h.status>=x){let V=await Xs(h,d),de=new Zr(t.body,{status:h.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",de),de}let T=await Xs(h,d);return{status:h.status,headers:Em(h.headers),body:T}}};function Pm(e,t){return Am(e)?{body:void 0,extraHeaders:{},isStream:!1}:Im(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}: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}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(Pm,"serializeBody");async function Xs(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}a(Xs,"parseResponseBody");async function bm(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Ys(n);continue}return o}catch(o){if(r=o,n<t){await Ys(n);continue}throw o}throw r}a(bm,"sendWithRetries");function Ys(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}a(Ys,"backoff");function Tm(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}a(Tm,"normalizeHeaders");function Em(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}a(Em,"toHttpHeaders");function Im(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}a(Im,"isNodeFormData");function Am(e){return e==null}a(Am,"isNil");var Qs=new qr;var Go=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Go||{});var fh=ze(require("fs")),il=ze(ol());var mh={"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 gh(e){let t=e.split(";")[0].trim().toLowerCase();return mh[t]??""}a(gh,"contentTypeToExtension");var hh=a(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),yh=a((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function al({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:i,props:s,extraProps:u,authLocation:p="headers"}){return ne({audience:"human",name:i||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:E.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:d})=>({url:E.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
6
- i.e ${yh(t,d)}/resource or /resource`,required:!0,defaultValue:d?t(d):"",...s?.url??{}})}),"props")}),method:E.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Go).map(d=>({label:d,value:d}))},...s?.method??{}}),headers:E.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...s?.headers??{}}),queryParams:E.Object({displayName:"Query Parameters",required:!0,...s?.queryParams??{}}),body_type:E.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:E.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:a(async({body_type:d})=>{if(!d)return{};let f=d,v={};switch(f){case"none":break;case"json":v.data=E.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":v.data=E.LongText({displayName:"Raw Body",required:!0});break;case"form_data":v.data=E.Array({displayName:"Form Data",required:!0,properties:{fieldName:E.ShortText({displayName:"Field Name",required:!0}),fieldType:E.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:E.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:E.File({displayName:"File Field Value",required:!1})}});break}return v},"props")}),response_is_binary:E.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:E.Checkbox({displayName:"No Error on Failure",required:!1,...s?.failsafe??{}}),timeout:E.Number({displayName:"Timeout (in seconds)",required:!1,...s?.timeout??{}}),followRedirects:E.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...u},run:a(async d=>{let{method:f,url:v,headers:y,queryParams:l,body:m,body_type:_,failsafe:h,timeout:x,response_is_binary:T,followRedirects:V}=d.propsValue;He(f,"Method"),He(v,"URL");let de=he(r)?{}:await r(d.auth,d.propsValue),xe=v.url,De=xe.startsWith("http://")||xe.startsWith("https://")?xe:hh({baseUrl:t(d.auth),relativePath:xe}),ee={method:f,url:De,headers:{...y??{},...p==="headers"||!he(p)?de:{}},queryParams:{...p==="queryParams"?de:{},...l??{}},timeout:x?x*1e3:0,followRedirects:V};if(T&&(ee.responseType="arraybuffer"),m)if(_&&_!=="none"){let W=m.data;if(_==="form_data"){let gt=W,at=new il.default;for(let{fieldName:j,fieldType:A,textFieldValue:I,fileFieldValue:O}of gt)A==="text"&&!cr(I)?at.append(j,I):A==="file"&&!cr(O)&&at.append(j,O.data,{filename:O?.filename});ee.body=at,ee.headers={...ee.headers,...at.getHeaders()}}else ee.body=W}else _||(ee.body=m);try{let W=await Qs.sendRequest(ee);return await vh(d.files,W.body,W.status,W.headers,T)}catch(W){if(h)return W.errorMessage();throw W}},"run")})}a(al,"createCustomApiCallAction");var vh=a(async(e,t,r,n,o)=>{let i;if(o&&_h(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=gh(s??"")||"txt",p;t instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?p=t:p=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:p})}else i=t;return{status:r,headers:n,body:i}},"handleBinaryResponse"),_h=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Ue={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:i,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(he(u))throw new Error("lastPoll doesn't exist in the store.");let p=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:u,server:s}),d=p.reduce((f,v)=>Math.max(f,v.epochMilliSeconds),u);return await t.put("lastPoll",d),p.filter(f=>f.epochMilliSeconds>u).map(f=>f.data)}case 1:{let u=await t.get("lastItem"),p=await e.items({store:t,auth:r,propsValue:n,lastItemId:u,files:i,server:s}),d=p.findIndex(y=>y.id===u),f=[];he(u)||d==-1?f=p??[]:f=p?.slice(0,d)??[],he(o)||(f=f.slice(-o));let v=f?.[0]?.id;return he(v)||await t.put("lastItem",v),f.map(y=>y.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let s=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;he(s)?await t.delete("lastItem"):await t.put("lastItem",s);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:o,server:i}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:i});break}case 1:{s=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:i});break}}return xh(s.map(u=>u.data))}};function xh(e){return e.length<=5?e:e.slice(0,5)}a(xh,"getFirstFiveOrAll");var gr="login.microsoftonline.com",cl="login.microsoftonline.us",sl="Mail.ReadWrite Mail.Send Calendars.Read offline_access User.Read",Ph="https://graph.microsoft.com/.default",bh="https://graph.microsoft.us/.default",ul={[gr]:"https://graph.microsoft.com",[cl]:"https://graph.microsoft.us"},ll=E.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:gr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:gr},{label:"US Government (GCC High)",value:cl}]}}),pl=E.StaticDropdown({displayName:"Access Mode",description:"Pick the option matching your Grant Type. Use a Delegated option with the Authorization Code grant (acts as the signed-in user). Use an App-only option with the Client Credentials grant (acts as the application \u2014 also set Tenant ID and Mailbox), choosing the one that matches your Cloud Environment.",required:!0,defaultValue:sl,options:{disabled:!1,options:[{label:"Delegated \u2014 Commercial (Global)",value:sl},{label:"App-only \u2014 Commercial (Global)",value:Ph},{label:"App-only \u2014 US Government (GCC High)",value:bh}]}});function dl(e){return e??gr}a(dl,"resolveCloudHost");function fl(e){return dl(e.props?.cloud)}a(fl,"getMicrosoftCloudFromAuth");function rn(e){let t=dl(e);return ul[t]??ul[gr]}a(rn,"getGraphBaseUrl");var wp=ze($p());function Bv(e){let t=fl(e);return wp.Client.initWithMiddleware({authProvider:{getAccessToken:a(()=>Promise.resolve(e.access_token),"getAccessToken")},baseUrl:rn(t)})}a(Bv,"createClient");function Vv(e){let t=e.props?.mailbox?.trim();return t?`/users/${encodeURIComponent(t)}`:"/me"}a(Vv,"mailboxPrefix");var $={createClient:Bv,mailboxPrefix:Vv};var Hv=`
5
+ 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`),u.name="Invalid Dependency",u;p.label=1;case 1:return o.done?[3,3]:(i=o.value[1],[4,e.getRequestData(i.request)]);case 2:if(s=p.sent(),s.body!==void 0&&(s.headers===void 0||s.headers["content-type"]===void 0))throw u=new Error("Content-type header is not mentioned for request #".concat(i.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=i.id,i.dependsOn!==void 0&&i.dependsOn.length>0&&(s.dependsOn=i.dependsOn),t.push(s),o=n.next(),[3,1];case 3:return r.requests=t,[2,r]}})})},e.prototype.addDependency=function(t,r){if(!this.requests.has(t)){var n=new Error("Dependent ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependent",n}if(typeof r<"u"&&!this.requests.has(r)){var n=new Error("Dependency ".concat(r," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(typeof r<"u"){var o=this.requests.get(t);if(o.dependsOn===void 0&&(o.dependsOn=[]),o.dependsOn.indexOf(r)!==-1){var n=new Error("Dependency ".concat(r," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}o.dependsOn.push(r)}else{for(var i=this.requests.entries(),s=void 0,u=i.next();!u.done&&u.value[1].id!==t;)s=u,u=i.next();if(typeof s<"u"){var p=s.value[0];if(u.value[1].dependsOn===void 0&&(u.value[1].dependsOn=[]),u.value[1].dependsOn.indexOf(p)!==-1){var n=new Error("Dependency ".concat(p," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}u.value[1].dependsOn.push(p)}else{var n=new Error("Can't add dependency ".concat(r,", There is only a dependent request in the batch"));throw n.name="Invalid Dependency Addition",n}}},e.prototype.removeDependency=function(t,r){var n=this.requests.get(t);if(typeof n>"u"||n.dependsOn===void 0||n.dependsOn.length===0)return!1;if(typeof r<"u"){var o=n.dependsOn.indexOf(r);return o===-1?!1:(n.dependsOn.splice(o,1),!0)}else return delete n.dependsOn,!0},e.requestLimit=20,e})();pn.BatchRequestContent=Kh});var op=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.BatchResponseContent=void 0;var Jh=(ce(),ie(ue)),Xh=(function(){function e(t){this.responses=new Map,this.update(t)}return a(e,"BatchResponseContent"),e.prototype.createResponseObject=function(t){var r=t.body,n={};if(n.status=t.status,t.statusText!==void 0&&(n.statusText=t.statusText),n.headers=t.headers,n.headers!==void 0&&n.headers["Content-Type"]!==void 0&&n.headers["Content-Type"].split(";")[0]==="application/json"){var o=JSON.stringify(r);return new Response(o,n)}return new Response(r,n)},e.prototype.update=function(t){this.nextLink=t["@odata.nextLink"];for(var r=t.responses,n=0,o=r.length;n<o;n++)this.responses.set(r[n].id,this.createResponseObject(r[n]))},e.prototype.getResponseById=function(t){return this.responses.get(t)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var t,r;return Jh.__generator(this,function(n){switch(n.label){case 0:t=this.responses.entries(),r=t.next(),n.label=1;case 1:return r.done?[3,3]:[4,r.value];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e})();dn.BatchResponseContent=Xh});var xi=b(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.GRAPH_URLS=it.GRAPH_BASE_URL=it.GRAPH_API_VERSION=void 0;it.GRAPH_API_VERSION="v1.0";it.GRAPH_BASE_URL="https://graph.microsoft.com/";it.GRAPH_URLS=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"])});var Ge=b(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.GraphClientError=void 0;var Yh=(ce(),ie(ue)),Qh=(function(e){Yh.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return a(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t})(Error);mn.GraphClientError=Qh});var fn=b(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.isCustomHost=we.isGraphURL=we.serializeContent=we.urlJoin=we.oDataQueryNames=void 0;var ey=xi(),ty=Ge();we.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var ry=a(function(e){var t=a(function(i){return i.replace(/\/+$/,"")},"removePostSlash"),r=a(function(i){return i.replace(/^\/+/,"")},"removePreSlash"),n=a(function(i,s){return[t(i),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");we.urlJoin=ry;var ny=a(function(e){var t=e&&e.constructor&&e.constructor.name;if(t==="Buffer"||t==="Blob"||t==="File"||t==="FormData"||typeof e=="string")return e;if(t==="ArrayBuffer")e=Buffer.from(e);else if(t==="Int8Array"||t==="Int16Array"||t==="Int32Array"||t==="Uint8Array"||t==="Uint16Array"||t==="Uint32Array"||t==="Uint8ClampedArray"||t==="Float32Array"||t==="Float64Array"||t==="DataView")e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch{throw new Error("Unable to stringify the content")}return e},"serializeContent");we.serializeContent=ny;var oy=a(function(e){return ip(e)},"isGraphURL");we.isGraphURL=oy;var iy=a(function(e,t){return t.forEach(function(r){return ay(r)}),ip(e,t)},"isCustomHost");we.isCustomHost=iy;var ip=a(function(e,t){if(t===void 0&&(t=ey.GRAPH_URLS),e=e.toLowerCase(),e.indexOf("https://")!==-1){e=e.replace("https://","");var r=e.indexOf(":"),n=e.indexOf("/"),o="";if(n!==-1)return r!==-1&&r<n?(o=e.substring(0,r),t.has(o)):(o=e.substring(0,n),t.has(o))}return!1},"isValidEndpoint"),ay=a(function(e){if(e.indexOf("/")!==-1)throw new ty.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")},"isCustomHostValid")});var at=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.MiddlewareControl=void 0;var sy=(function(){function e(t){t===void 0&&(t=[]),this.middlewareOptions=new Map;for(var r=0,n=t;r<n.length;r++){var o=n[r],i=o.constructor;this.middlewareOptions.set(i,o)}}return a(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e})();gn.MiddlewareControl=sy});var Nt=b(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.cloneRequestWithNewUrl=Oe.appendRequestHeader=Oe.setRequestHeader=Oe.getRequestHeader=Oe.generateUUID=void 0;var ap=(ce(),ie(ue)),uy=a(function(){for(var e="",t=0;t<32;t++)(t===8||t===12||t===16||t===20)&&(e+="-"),e+=Math.floor(Math.random()*16).toString(16);return e},"generateUUID");Oe.generateUUID=uy;var cy=a(function(e,t,r){var n=null;if(typeof Request<"u"&&e instanceof Request)n=e.headers.get(r);else if(typeof t<"u"&&t.headers!==void 0)if(typeof Headers<"u"&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var o=t.headers,i=0,s=o.length;i<s;i++)if(o[i][0]===r){n=o[i][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Oe.getRequestHeader=cy;var ly=a(function(e,t,r,n){var o,i;if(typeof Request<"u"&&e instanceof Request)e.headers.set(r,n);else if(typeof t<"u")if(t.headers===void 0)t.headers=new Headers((o={},o[r]=n,o));else if(typeof Headers<"u"&&t.headers instanceof Headers)t.headers.set(r,n);else if(t.headers instanceof Array){for(var s=0,u=t.headers.length;s<u;s++){var p=t.headers[s];if(p[0]===r){p[1]=n;break}}s===u&&t.headers.push([r,n])}else Object.assign(t.headers,(i={},i[r]=n,i))},"setRequestHeader");Oe.setRequestHeader=ly;var py=a(function(e,t,r,n){var o,i;typeof Request<"u"&&e instanceof Request?e.headers.append(r,n):typeof t<"u"&&(t.headers===void 0?t.headers=new Headers((o={},o[r]=n,o)):typeof Headers<"u"&&t.headers instanceof Headers?t.headers.append(r,n):t.headers instanceof Array?t.headers.push([r,n]):t.headers===void 0?t.headers=(i={},i[r]=n,i):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Oe.appendRequestHeader=py;var dy=a(function(e,t){return ap.__awaiter(void 0,void 0,void 0,function(){var r,n,o,i,s,u,p,d,m,y,v,l,f;return ap.__generator(this,function(_){switch(_.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=_.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=_.sent(),_.label=4;case 4:return r=n,o=t.method,i=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,m=t.cache,y=t.redirect,v=t.integrity,l=t.keepalive,f=t.signal,[2,new Request(e,{method:o,headers:i,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:m,redirect:y,integrity:v,keepalive:l,signal:f})]}})})},"cloneRequestWithNewUrl");Oe.cloneRequestWithNewUrl=dy});var bi=b(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.AuthenticationHandlerOptions=void 0;var my=(function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return a(e,"AuthenticationHandlerOptions"),e})();hn.AuthenticationHandlerOptions=my});var Ut=b(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TelemetryHandlerOptions=Mt.FeatureUsageFlag=void 0;var sp=at(),Ei;(function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"})(Ei||(Mt.FeatureUsageFlag=Ei={}));var fy=(function(){function e(){this.featureUsage=Ei.NONE}return a(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof sp.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new sp.MiddlewareControl,typeof n>"u"&&(n=new e,t.middlewareControl.setMiddlewareOptions(e,n)),n.setFeatureUsage(r)},e.prototype.setFeatureUsage=function(t){this.featureUsage=this.featureUsage|t},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e})();Mt.TelemetryHandlerOptions=fy});var vn=b(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.AuthenticationHandler=void 0;var up=(ce(),ie(ue)),cp=fn(),gy=at(),hy=Nt(),yy=bi(),lp=Ut(),vy=(function(){function e(t){this.authenticationProvider=t}return a(e,"AuthenticationHandler"),e.prototype.execute=function(t){return up.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u;return up.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,cp.isGraphURL)(r)||t.customHosts&&(0,cp.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof gy.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(yy.AuthenticationHandlerOptions)),o=void 0,i=void 0,n&&(o=n.authenticationProvider,i=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(i)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,hy.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),lp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,lp.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[3,3];case 2:t.options.headers&&delete t.options.headers[e.AUTHORIZATION_HEADER],p.label=3;case 3:return[4,this.nextMiddleware.execute(t)];case 4:return[2,p.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.AUTHORIZATION_HEADER="Authorization",e})();yn.AuthenticationHandler=vy});var Pn=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.HTTPMessageHandler=void 0;var pp=(ce(),ie(ue)),_y=(function(){function e(){}return a(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return pp.__awaiter(this,void 0,void 0,function(){var r;return pp.__generator(this,function(n){switch(n.label){case 0:return r=t,[4,fetch(t.request,t.options)];case 1:return r.response=n.sent(),[2]}})})},e})();_n.HTTPMessageHandler=_y});var _r=b(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.RetryHandlerOptions=void 0;var Py=(function(){function e(t,r,n){if(t===void 0&&(t=e.DEFAULT_DELAY),r===void 0&&(r=e.DEFAULT_MAX_RETRIES),n===void 0&&(n=e.defaultShouldRetry),t>e.MAX_DELAY&&r>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t>e.MAX_DELAY){var o=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw o.name="MaxLimitExceeded",o}else if(r>e.MAX_MAX_RETRIES){var o=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t<0&&r<0){var o=new Error("Delay and MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}else if(t<0){var o=new Error("Delay should not be negative");throw o.name="MinExpectationNotMet",o}else if(r<0){var o=new Error("MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(r,e.MAX_MAX_RETRIES),this.shouldRetry=n}return a(e,"RetryHandlerOptions"),e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.defaultShouldRetry=function(){return!0},e})();xn.RetryHandlerOptions=Py});var En=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.RetryHandler=void 0;var Lt=(ce(),ie(ue)),Ti=vr(),xy=at(),dp=Nt(),mp=_r(),fp=Ut(),by=(function(){function e(t){t===void 0&&(t=new mp.RetryHandlerOptions),this.options=t}return a(e,"RetryHandler"),e.prototype.isRetry=function(t){return e.RETRY_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.isBuffered=function(t,r){var n=typeof t=="string"?r.method:t.method,o=n===Ti.RequestMethod.PUT||n===Ti.RequestMethod.PATCH||n===Ti.RequestMethod.POST;if(o){var i=(0,dp.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(i)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=a(function(){return Number(Math.random().toFixed(3))},"getRandomness"),i=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return i!==null?Number.isNaN(Number(i))?s=Math.round((new Date(i).getTime()-Date.now())/1e3):s=Number(i):s=r>=2?this.getExponentialBackOffTime(r)+n+o():n+o(),Math.min(s,this.options.getMaxDelay()+o())},e.prototype.getExponentialBackOffTime=function(t){return Math.round(1/2*(Math.pow(2,t)-1))},e.prototype.sleep=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r;return Lt.__generator(this,function(n){return r=t*1e3,[2,new Promise(function(o){return setTimeout(o,r)})]})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof xy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new mp.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return Lt.__awaiter(this,void 0,void 0,function(){var o;return Lt.__generator(this,function(i){switch(i.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return i.sent(),r<n.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&n.shouldRetry(n.delay,r,t.request,t.options,t.response)?(++r,(0,dp.setRequestHeader)(t.request,t.options,e.RETRY_ATTEMPT_HEADER,r.toString()),o=this.getDelay(t.response,r,n.delay),[4,this.sleep(o)]):[3,4];case 2:return i.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,i.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return Lt.__awaiter(this,void 0,void 0,function(){var r,n;return Lt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),fp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,fp.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e})();bn.RetryHandler=by});var Pr=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.RedirectHandlerOptions=void 0;var Ey=(function(){function e(t,r){if(t===void 0&&(t=e.DEFAULT_MAX_REDIRECTS),r===void 0&&(r=e.defaultShouldRedirect),t>e.MAX_MAX_REDIRECTS){var n=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw n.name="MaxLimitExceeded",n}if(t<0){var n=new Error("MaxRedirects should not be negative");throw n.name="MinExpectationNotMet",n}this.maxRedirects=t,this.shouldRedirect=r}return a(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e})();Tn.RedirectHandlerOptions=Ey});var An=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.RedirectHandler=void 0;var jt=(ce(),ie(ue)),Ty=vr(),Iy=at(),Ay=Nt(),Ii=Pr(),gp=Ut(),Sy=(function(){function e(t){t===void 0&&(t=new Ii.RedirectHandlerOptions),this.options=t}return a(e,"RedirectHandler"),e.prototype.isRedirect=function(t){return e.REDIRECT_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(t){return t.indexOf("://")===-1},e.prototype.shouldDropAuthorizationHeader=function(t,r){var n=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=n.exec(t),i,s;o!==null&&(i=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof i<"u"&&typeof s<"u"&&i!==s},e.prototype.updateRequestUrl=function(t,r){return jt.__awaiter(this,void 0,void 0,function(){var n,o;return jt.__generator(this,function(i){switch(i.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,Ay.cloneRequestWithNewUrl)(t,r.request)];case 2:o=i.sent(),i.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Iy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(Ii.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new Ii.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return jt.__awaiter(this,void 0,void 0,function(){var o,i;return jt.__generator(this,function(s){switch(s.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return s.sent(),o=t.response,r<n.maxRedirects&&this.isRedirect(o)&&this.hasLocationHeader(o)&&n.shouldRedirect(o)?(++r,o.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=Ty.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return i=this.getLocationHeader(o),!this.isRelativeURL(i)&&this.shouldDropAuthorizationHeader(o.url,i)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(i,t)];case 3:s.sent(),s.label=4;case 4:return[4,this.executeWithRedirect(t,r,n)];case 5:return s.sent(),[3,7];case 6:return[2];case 7:return[2]}})})},e.prototype.execute=function(t){return jt.__awaiter(this,void 0,void 0,function(){var r,n;return jt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,gp.TelemetryHandlerOptions.updateFeatureUsageFlag(t,gp.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e})();In.RedirectHandler=Sy});var hp=b(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.PACKAGE_VERSION=void 0;Sn.PACKAGE_VERSION="3.0.7"});var On=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.TelemetryHandler=void 0;var yp=(ce(),ie(ue)),vp=fn(),$y=hp(),wy=at(),$n=Nt(),Oy=Ut(),Ry=(function(){function e(){}return a(e,"TelemetryHandler"),e.prototype.execute=function(t){return yp.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s;return yp.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,vp.isGraphURL)(r)||t.customHosts&&(0,vp.isCustomHost)(r,t.customHosts)?(n=(0,$n.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,$n.generateUUID)(),(0,$n.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat($y.PACKAGE_VERSION),i=void 0,t.middlewareControl instanceof wy.MiddlewareControl&&(i=t.middlewareControl.getMiddlewareOptions(Oy.TelemetryHandlerOptions)),i&&(s=i.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,$n.appendRequestHeader)(t.request,t.options,e.SDK_VERSION_HEADER,o)):(delete t.options.headers[e.CLIENT_REQUEST_ID_HEADER],delete t.options.headers[e.SDK_VERSION_HEADER]),[4,this.nextMiddleware.execute(t)];case 1:return[2,u.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e})();wn.TelemetryHandler=Ry});var _p=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.MiddlewareFactory=void 0;var zy=vn(),Cy=Pn(),ky=Pr(),Dy=_r(),Ny=An(),My=En(),Uy=On(),Ly=a(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),jy=(function(){function e(){}return a(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new zy.AuthenticationHandler(t),o=new My.RetryHandler(new Dy.RetryHandlerOptions),i=new Uy.TelemetryHandler,s=new Cy.HTTPMessageHandler;if(r.push(n),r.push(o),Ly()){var u=new Ny.RedirectHandler(new ky.RedirectHandlerOptions);r.push(u)}return r.push(i),r.push(s),r},e})();Rn.MiddlewareFactory=jy});var Cn=b(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ChaosStrategy=void 0;var Pp;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(Pp||(zn.ChaosStrategy=Pp={}))});var Ai=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.ChaosHandlerOptions=void 0;var Fy=Cn(),By=(function(){function e(t,r,n,o,i,s){if(t===void 0&&(t=Fy.ChaosStrategy.RANDOM),r===void 0&&(r="Some error Happened"),this.chaosStrategy=t,this.statusCode=n,this.statusMessage=r,this.chaosPercentage=o!==void 0?o:10,this.responseBody=i,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return a(e,"ChaosHandlerOptions"),e})();kn.ChaosHandlerOptions=By});var xp=b(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.httpStatusCode=Ft.methodStatusCode=void 0;Ft.methodStatusCode={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]};Ft.httpStatusCode={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var Tp=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.ChaosHandler=void 0;var Dn=(ce(),ie(ue)),Vy=at(),Hy=Nt(),bp=xp(),Si=Ai(),Ep=Cn(),Zy=(function(){function e(t,r){t===void 0&&(t=new Si.ChaosHandlerOptions),this.options=t,this.manualMap=r}return a(e,"ChaosHandler"),e.prototype.createResponseHeaders=function(t,r,n){var o=t.headers?new Headers(t.headers):new Headers;return o.append("Cache-Control","no-store"),o.append("request-id",r),o.append("client-request-id",r),o.append("x-ms-ags-diagnostic",""),o.append("Date",n),o.append("Strict-Transport-Security",""),t.statusCode===429&&o.append("retry-after","3"),o},e.prototype.createResponseBody=function(t,r,n){if(t.responseBody)return t.responseBody;var o;if(t.statusCode>=400){var i=bp.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:i,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,Hy.generateUUID)(),i=new Date,s=this.createResponseHeaders(t,o,i.toString()),u=this.createResponseBody(t,o,i.toString()),p={url:n,status:t.statusCode,statusText:t.statusMessage,headers:s};r.response=new Response(typeof u=="string"?u:JSON.stringify(u),p)},e.prototype.sendRequest=function(t,r){return Dn.__awaiter(this,void 0,void 0,function(){return Dn.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===Ep.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(Math.random()*100)<t.chaosPercentage?(this.createResponse(t,r),[3,3]):[3,1];case 1:return this.nextMiddleware?[4,this.nextMiddleware.execute(r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.getRandomStatusCode=function(t){var r=bp.methodStatusCode[t];return r[Math.floor(Math.random()*r.length)]},e.prototype.getRelativeURL=function(t){var r=/https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/,n;return r.exec(t)!==null&&(n=r.exec(t)[1]),n},e.prototype.setStatusCode=function(t,r,n){var o=this;if(t.chaosStrategy===Ep.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var i=this.getRelativeURL(r);this.manualMap.get(i)!==void 0?this.manualMap.get(i).get(n)!==void 0&&(t.statusCode=this.manualMap.get(i).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(i)&&o.manualMap.get(u).get(n)!==void 0&&(t.statusCode=o.manualMap.get(u).get(n))})}}else t.statusCode=this.getRandomStatusCode(n)},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Vy.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(Si.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new Si.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return Dn.__awaiter(this,void 0,void 0,function(){var r;return Dn.__generator(this,function(n){switch(n.label){case 0:return r=this.getOptions(t),[4,this.sendRequest(r,t)];case 1:return[2,n.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e})();Nn.ChaosHandler=Zy});var xr=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ResponseType=void 0;var Ip;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(Ip||(Mn.ResponseType=Ip={}))});var wi=b(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.GraphResponseHandler=Bt.DocumentType=void 0;var Un=(ce(),ie(ue)),ht=xr(),$i;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})($i||(Bt.DocumentType=$i={}));var Ln;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Ln||(Ln={}));var jn;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})(jn||(jn={}));var qy=(function(){function e(){}return a(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(i){try{var s=new DOMParser,u=s.parseFromString(i,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return Un.__awaiter(this,void 0,void 0,function(){var n,o,i,s;return Un.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),i=r,i){case ht.ResponseType.ARRAYBUFFER:return[3,1];case ht.ResponseType.BLOB:return[3,3];case ht.ResponseType.DOCUMENT:return[3,5];case ht.ResponseType.JSON:return[3,7];case ht.ResponseType.STREAM:return[3,9];case ht.ResponseType.TEXT:return[3,11]}return[3,13];case 1:return[4,t.arrayBuffer()];case 2:return n=u.sent(),[3,24];case 3:return[4,t.blob()];case 4:return n=u.sent(),[3,24];case 5:return[4,e.parseDocumentResponse(t,$i.TEXT_XML)];case 6:return n=u.sent(),[3,24];case 7:return[4,t.json()];case 8:return n=u.sent(),[3,24];case 9:return[4,Promise.resolve(t.body)];case 10:return n=u.sent(),[3,24];case 11:return[4,t.text()];case 12:return n=u.sent(),[3,24];case 13:return o===null?[3,22]:(s=o.split(";")[0],new RegExp(jn.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp(jn.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Ln.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Ln.APPLICATION_JSON?[3,20]:[4,t.json()];case 19:return n=u.sent(),[3,21];case 20:n=Promise.resolve(t.body),u.label=21;case 21:return[3,23];case 22:n=Promise.resolve(t.body),u.label=23;case 23:return[3,24];case 24:return[2,n]}})})},e.getResponse=function(t,r,n){return Un.__awaiter(this,void 0,void 0,function(){var o;return Un.__generator(this,function(i){switch(i.label){case 0:return r!==ht.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=i.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;i.label=3;case 3:return[2]}})})},e})();Bt.GraphResponseHandler=qy});var Oi=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.Range=void 0;var Gy=(function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return a(e,"Range"),e})();Fn.Range=Gy});var Ri=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.UploadResult=void 0;var Wy=(function(){function e(t,r){this._location=r,this._responseBody=t}return a(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:a(function(){return this._location},"get"),set:a(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:a(function(){return this._responseBody},"get"),set:a(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e})();Bn.UploadResult=Wy});var Ci=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.LargeFileUploadTask=void 0;var Te=(ce(),ie(ue)),zi=Ge(),Ky=wi(),Ap=xr(),Vn=Oi(),Jy=Ri(),Xy=(function(){function e(t,r,n,o){if(o===void 0&&(o={}),this.DEFAULT_FILE_SIZE=5*1024*1024,this.client=t,r.sliceFile)this.file=r;else throw new zi.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=r,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=n,this.nextRange=new Vn.Range(0,this.options.rangeSize-1)}return a(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Te.__awaiter(this,void 0,void 0,function(){var i,s;return Te.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return i=u.sent(),s={url:i.uploadUrl,expiry:new Date(i.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new Vn.Range;var n=r.split("-"),o=parseInt(n[0],10),i=parseInt(n[1],10);return Number.isNaN(i)&&(i=this.file.size-1),new Vn.Range(o,i)},e.prototype.updateTaskStatus=function(t){this.uploadSession.expiry=new Date(t.expirationDateTime),this.nextRange=this.parseRange(t.nextExpectedRanges)},e.prototype.getNextRange=function(){if(this.nextRange.minValue===-1)return this.nextRange;var t=this.nextRange.minValue,r=t+this.options.rangeSize-1;return r>=this.file.size&&(r=this.file.size-1),new Vn.Range(t,r)},e.prototype.sliceFile=function(t){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(t.minValue,t.maxValue+1);throw new zi.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")},e.prototype.upload=function(){return Te.__awaiter(this,void 0,void 0,function(){var t,r,n,o,i,s,u;return Te.__generator(this,function(p){switch(p.label){case 0:t=this.options&&this.options.uploadEventHandlers,p.label=1;case 1:if(this.uploadSession.isCancelled)return[3,5];if(r=this.getNextRange(),r.maxValue===-1)throw n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"),n.name="Invalid Session",n;return[4,this.file.sliceFile(r)];case 2:return o=p.sent(),[4,this.uploadSliceGetRawResponse(o,r,this.file.size)];case 3:if(i=p.sent(),!i)throw new zi.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,Ky.GraphResponseHandler.getResponse(i)];case 4:return s=p.sent(),i.status===201||i.status===200&&s.id?(this.reportProgress(t,r),[2,Jy.UploadResult.CreateUploadResult(s,i.headers)]):(u={expirationDateTime:s.expirationDateTime||s.ExpirationDateTime,nextExpectedRanges:s.NextExpectedRanges||s.nextExpectedRanges},this.updateTaskStatus(u),this.reportProgress(t,r),[3,1]);case 5:return[2]}})})},e.prototype.reportProgress=function(t,r){t&&t.progress&&t.progress(r,t.extraCallbackParam)},e.prototype.uploadSlice=function(t,r,n){return Te.__awaiter(this,void 0,void 0,function(){return Te.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.uploadSliceGetRawResponse=function(t,r,n){return Te.__awaiter(this,void 0,void 0,function(){return Te.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(Ap.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Te.__awaiter(this,void 0,void 0,function(){var t;return Te.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(Ap.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Te.__awaiter(this,void 0,void 0,function(){var t;return Te.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).get()];case 1:return t=r.sent(),this.updateTaskStatus(t),[2,t]}})})},e.prototype.resume=function(){return Te.__awaiter(this,void 0,void 0,function(){return Te.__generator(this,function(t){switch(t.label){case 0:return[4,this.getStatus()];case 1:return t.sent(),[4,this.upload()];case 2:return[2,t.sent()]}})})},e.prototype.getUploadSession=function(){return this.uploadSession},e})();Hn.LargeFileUploadTask=Xy});var ki=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.FileUpload=void 0;var Yy=Ge(),Qy=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Yy.GraphClientError("Please provide the upload content, name of the file and size of the file")}return a(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e})();Zn.FileUpload=Qy});var Di=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.getValidRangeSize=void 0;var ev=5*1024*1024,tv=a(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),rv=a(function(e){e===void 0&&(e=ev);var t=60*1024*1024;return e>t&&(e=t),tv(e)},"getValidRangeSize");qn.getValidRangeSize=rv});var $p=b(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.OneDriveLargeFileUploadTask=void 0;var We=(ce(),ie(ue)),Sp=Ge(),nv=ki(),ov=Ci(),iv=Di(),av=(function(e){We.__extends(t,e);function t(r,n,o,i){return e.call(this,r,n,o,i)||this}return a(t,"OneDriveLargeFileUploadTask"),t.constructCreateSessionUrl=function(r,n){return n===void 0&&(n=t.DEFAULT_UPLOAD_PATH),r=r.trim(),n=n.trim(),n===""&&(n="/"),n[0]!=="/"&&(n="/".concat(n)),n[n.length-1]!=="/"&&(n="".concat(n,"/")),"/me/drive/root:".concat(n.split("/").map(function(o){return encodeURIComponent(o)}).join("/")).concat(encodeURIComponent(r),":/createUploadSession")},t.getFileInfo=function(r,n){var o,i;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),i=o.size;else if(typeof File<"u"&&r instanceof File)o=r,i=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;i=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:i}},t.create=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var i,s,u;return We.__generator(this,function(p){if(!r||!n||!o)throw new Sp.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return i=o.fileName,s=t.getFileInfo(n,i),u=new nv.FileUpload(s.content,i,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var i,s,u,p;return We.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new Sp.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return i=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,i,s)];case 1:return u=d.sent(),p=(0,iv.getValidRangeSize)(o.rangeSize),[2,new t(r,n,u,{rangeSize:p,uploadEventHandlers:o.uploadEventHandlers})]}})})},t.createUploadSession=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var i;return We.__generator(this,function(s){return i={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,i)]})})},t.prototype.commit=function(r,n){return n===void 0&&(n="rename"),We.__awaiter(this,void 0,void 0,function(){var o;return We.__generator(this,function(i){switch(i.label){case 0:return o={name:this.file.name,"@microsoft.graph.conflictBehavior":n,"@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(r).put(o)];case 1:return[2,i.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t})(ov.LargeFileUploadTask);Gn.OneDriveLargeFileUploadTask=av});var Op=b(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.StreamUpload=void 0;var wp=(ce(),ie(ue)),br=Ge(),sv=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new br.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return a(e,"StreamUpload"),e.prototype.sliceFile=function(t){return wp.__awaiter(this,void 0,void 0,function(){var r,n,o,i,s,u,p;return wp.__generator(this,function(d){switch(d.label){case 0:if(r=t.maxValue-t.minValue+1,n=[],this.previousSlice){if(t.minValue<this.previousSlice.range.minValue)throw new br.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file.");if(t.minValue<this.previousSlice.range.maxValue){if(o=this.previousSlice.range.minValue,i=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===i)return[2,this.previousSlice.fileSlice];if(t.maxValue===i)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,i+1)),r=t.maxValue-i}}return this.content&&this.content.readable?this.content.readableLength>=r?(n.push(this.content.read(r)),[3,3]):[3,1]:[3,4];case 1:return u=(s=n).push,[4,this.readNBytesFromStream(r)];case 2:u.apply(s,[d.sent()]),d.label=3;case 3:return[3,5];case 4:throw new br.GraphClientError("Stream is not readable.");case 5:return p=Buffer.concat(n),this.previousSlice={fileSlice:p,range:t},[2,p]}})})},e.prototype.readNBytesFromStream=function(t){var r=this;return new Promise(function(n,o){var i=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new br.GraphClientError("Stream ended before reading required range size"))}),r.content.on("readable",function(){for(var p;u<t&&(p=r.content.read(s))!==null;)u+=p.length,i.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(i));if(!r.content||!r.content.readable)return o(new br.GraphClientError("Error encountered while reading the stream during the upload"))})})},e})();Wn.StreamUpload=sv});var Rp=b(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.PageIterator=void 0;var Vt=(ce(),ie(ue)),uv=(function(){function e(t,r,n,o){this.client=t,this.collection=r.value,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],this.callback=n,this.cursor=0,this.complete=!1,this.requestOptions=o}return a(e,"PageIterator"),e.prototype.iterationHelper=function(){if(this.collection===void 0)return!1;for(var t=!0;t&&this.cursor<this.collection.length;){var r=this.collection[this.cursor];t=this.callback(r),this.cursor++}return t},e.prototype.fetchAndUpdateNextPageData=function(){return Vt.__awaiter(this,void 0,void 0,function(){var t,r;return Vt.__generator(this,function(n){switch(n.label){case 0:return t=this.client.api(this.nextLink),this.requestOptions&&(this.requestOptions.headers&&(t=t.headers(this.requestOptions.headers)),this.requestOptions.middlewareOptions&&(t=t.middlewareOptions(this.requestOptions.middlewareOptions)),this.requestOptions.options&&(t=t.options(this.requestOptions.options))),[4,t.get()];case 1:return r=n.sent(),this.collection=r.value,this.cursor=0,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return Vt.__awaiter(this,void 0,void 0,function(){var t;return Vt.__generator(this,function(r){switch(r.label){case 0:t=this.iterationHelper(),r.label=1;case 1:return t?this.nextLink===void 0?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return r.sent(),t=this.iterationHelper(),[3,4];case 3:t=!1,r.label=4;case 4:return[3,1];case 5:return this.nextLink===void 0&&this.cursor>=this.collection.length&&(this.complete=!0),[2]}})})},e.prototype.resume=function(){return Vt.__awaiter(this,void 0,void 0,function(){return Vt.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e})();Kn.PageIterator=uv});var Ni=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.CustomAuthenticationProvider=void 0;var Jn=(ce(),ie(ue)),zp=Ge(),cv=(function(){function e(t){this.provider=t}return a(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Jn.__awaiter(this,void 0,void 0,function(){var t=this;return Jn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(i,s){return Jn.__awaiter(t,void 0,void 0,function(){var u,p;return Jn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return i||(u="Access token is undefined or empty. Please provide a valid token. For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md",i=new zp.GraphClientError(u)),[4,zp.GraphClientError.setGraphClientError(i)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e})();Xn.CustomAuthenticationProvider=cv});var Mi=b(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.GraphError=void 0;var lv=(ce(),ie(ue)),pv=(function(e){lv.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var i=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(i,t.prototype),i.statusCode=r,i.code=null,i.requestId=null,i.date=new Date,i.body=null,i.stack=o?o.stack:i.stack,i}return a(t,"GraphError"),t})(Error);Yn.GraphError=pv});var kp=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.GraphErrorHandler=void 0;var Cp=(ce(),ie(ue)),Ui=Mi(),dv=(function(){function e(){}return a(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new Ui.GraphError(r,"",t);return t.name!==void 0&&(o.code=t.name),o.body=t.toString(),o.date=new Date,o.headers=n?.headers,o},e.constructErrorFromResponse=function(t,r,n){var o=t.error,i=new Ui.GraphError(r,o.message);return i.code=o.code,o.innerError!==void 0&&(i.requestId=o.innerError["request-id"],i.date=new Date(o.innerError.date)),i.body=JSON.stringify(o),i.headers=n?.headers,i},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),Cp.__awaiter(this,void 0,void 0,function(){var i;return Cp.__generator(this,function(s){if(t&&t.error?i=e.constructErrorFromResponse(t,r,o):t instanceof Error?i=e.constructError(t,r,o):(i=new Ui.GraphError(r),i.body=t),typeof n=="function")n(i,null);else return[2,i];return[2]})})},e})();Qn.GraphErrorHandler=dv});var Li=b(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.GraphRequest=void 0;var re=(ce(),ie(ue)),mv=Ge(),fv=kp(),Er=fn(),gv=wi(),hv=at(),yt=vr(),yv=xr(),vv=(function(){function e(t,r,n){var o=this;this.parsePath=function(i){if(i.indexOf("https://")!==-1){i=i.replace("https://","");var s=i.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+i.substring(0,s),i=i.substring(s+1,i.length));var u=i.indexOf("/");u!==-1&&(o.urlComponents.version=i.substring(0,u),i=i.substring(u+1,i.length))}i.charAt(0)==="/"&&(i=i.substr(1));var p=i.indexOf("?");if(p===-1)o.urlComponents.path=i;else{o.urlComponents.path=i.substr(0,p);for(var d=i.substring(p+1,i.length).split("&"),m=0,y=d;m<y.length;m++){var v=y[m];o.parseQueryParameter(v)}}},this.httpClient=t,this.config=r,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return a(e,"GraphRequest"),e.prototype.addCsvQueryParameter=function(t,r,n){this.urlComponents.oDataQueryParams[t]=this.urlComponents.oDataQueryParams[t]?this.urlComponents.oDataQueryParams[t]+",":"";var o=[];n.length>1&&typeof r=="string"?o=Array.prototype.slice.call(n):typeof r=="string"?o.push(r):o=o.concat(r),this.urlComponents.oDataQueryParams[t]+=o.join(",")},e.prototype.buildFullUrl=function(){var t=(0,Er.urlJoin)([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(t),t},e.prototype.createQueryString=function(){var t=this.urlComponents,r=[];if(Object.keys(t.oDataQueryParams).length!==0)for(var n in t.oDataQueryParams)Object.prototype.hasOwnProperty.call(t.oDataQueryParams,n)&&r.push(n+"="+t.oDataQueryParams[n]);if(Object.keys(t.otherURLQueryParams).length!==0)for(var n in t.otherURLQueryParams)Object.prototype.hasOwnProperty.call(t.otherURLQueryParams,n)&&r.push(n+"="+t.otherURLQueryParams[n]);if(t.otherURLQueryOptions.length!==0)for(var o=0,i=t.otherURLQueryOptions;o<i.length;o++){var s=i[o];r.push(s)}return r.length>0?"?"+r.join("&"):""},e.prototype.parseQueryParameter=function(t){if(typeof t=="string")if(t.charAt(0)==="?"&&(t=t.substring(1)),t.indexOf("&")!==-1)for(var r=t.split("&"),n=0,o=r;n<o.length;n++){var i=o[n];this.parseQueryParamenterString(i)}else this.parseQueryParamenterString(t);else if(t.constructor===Object)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.setURLComponentsQueryParamater(s,t[s]);return this},e.prototype.parseQueryParamenterString=function(t){if(this.isValidQueryKeyValuePair(t)){var r=t.indexOf("="),n=t.substring(0,r),o=t.substring(r+1);this.setURLComponentsQueryParamater(n,o)}else this.urlComponents.otherURLQueryOptions.push(t)},e.prototype.setURLComponentsQueryParamater=function(t,r){if(Er.oDataQueryNames.indexOf(t)!==-1){var n=this.urlComponents.oDataQueryParams[t],o=n&&(t==="$expand"||t==="$select"||t==="$orderby");this.urlComponents.oDataQueryParams[t]=o?n+","+r:r}else this.urlComponents.otherURLQueryParams[t]=r},e.prototype.isValidQueryKeyValuePair=function(t){var r=t.indexOf("=");if(r===-1)return!1;var n=t.indexOf("(");return!(n!==-1&&t.indexOf("(")<r)},e.prototype.updateRequestOptions=function(t){var r=re.__assign({},t.headers);if(this.config.fetchOptions!==void 0){var n=re.__assign({},this.config.fetchOptions);Object.assign(t,n),typeof this.config.fetchOptions.headers!==void 0&&(t.headers=re.__assign({},this.config.fetchOptions.headers))}Object.assign(t,this._options),t.headers!==void 0&&Object.assign(r,t.headers),Object.assign(r,this._headers),t.headers=r},e.prototype.send=function(t,r,n){var o;return re.__awaiter(this,void 0,void 0,function(){var i,s,u,p,d,m,y,v;return re.__generator(this,function(l){switch(l.label){case 0:s=new hv.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(r),u=(o=this.config)===null||o===void 0?void 0:o.customHosts,l.label=1;case 1:return l.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:t,options:r,middlewareControl:s,customHosts:u})];case 2:return p=l.sent(),i=p.response,[4,gv.GraphResponseHandler.getResponse(i,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(m=l.sent(),m instanceof mv.GraphClientError)throw m;return y=void 0,i&&(y=i.status),[4,fv.GraphErrorHandler.getError(m,y,n,i)];case 5:throw v=l.sent(),v;case 6:return[2]}})})},e.prototype.setHeaderContentType=function(){if(!this._headers){this.header("Content-Type","application/json");return}for(var t=Object.keys(this._headers),r=0,n=t;r<n.length;r++){var o=n[r];if(o.toLowerCase()==="content-type")return}this.header("Content-Type","application/json")},e.prototype.header=function(t,r){return this._headers[t]=r,this},e.prototype.headers=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._headers[r]=t[r]);return this},e.prototype.option=function(t,r){return this._options[t]=r,this},e.prototype.options=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._options[r]=t[r]);return this},e.prototype.middlewareOptions=function(t){return this._middlewareOptions=t,this},e.prototype.version=function(t){return this.urlComponents.version=t,this},e.prototype.responseType=function(t){return this._responseType=t,this},e.prototype.select=function(t){return this.addCsvQueryParameter("$select",t,arguments),this},e.prototype.expand=function(t){return this.addCsvQueryParameter("$expand",t,arguments),this},e.prototype.orderby=function(t){return this.addCsvQueryParameter("$orderby",t,arguments),this},e.prototype.filter=function(t){return this.urlComponents.oDataQueryParams.$filter=t,this},e.prototype.search=function(t){return this.urlComponents.oDataQueryParams.$search=t,this},e.prototype.top=function(t){return this.urlComponents.oDataQueryParams.$top=t,this},e.prototype.skip=function(t){return this.urlComponents.oDataQueryParams.$skip=t,this},e.prototype.skipToken=function(t){return this.urlComponents.oDataQueryParams.$skipToken=t,this},e.prototype.count=function(t){return t===void 0&&(t=!0),this.urlComponents.oDataQueryParams.$count=t.toString(),this},e.prototype.query=function(t){return this.parseQueryParameter(t)},e.prototype.get=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n,o;return re.__generator(this,function(i){switch(i.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=i.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,i;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:yt.RequestMethod.POST,body:(0,Er.serializeContent)(t)},i=t&&t.constructor&&t.constructor.name,i==="FormData"?o.headers={}:(this.setHeaderContentType(),o.headers=this._headers),[4,this.send(n,o,r)];case 1:return[2,s.sent()]}})})},e.prototype.create=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.post(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.put=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:yt.RequestMethod.PUT,body:(0,Er.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:yt.RequestMethod.PATCH,body:(0,Er.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e.prototype.update=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.patch(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.delete=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.DELETE},[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.del=function(t){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(r){switch(r.label){case 0:return[4,this.delete(t)];case 1:return[2,r.sent()]}})})},e.prototype.getStream=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:yt.RequestMethod.GET},this.responseType(yv.ResponseType.STREAM),[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.putStream=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(i){switch(i.label){case 0:return n=this.buildFullUrl(),o={method:yt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,i.sent()]}})})},e})();eo.GraphRequest=vv});var ji=b(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.HTTPClient=void 0;var Dp=(ce(),ie(ue)),_v=(function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!t||!t.length){var n=new Error;throw n.name="InvalidMiddlewareChain",n.message="Please provide a default middleware chain or custom middleware chain",n}this.setMiddleware.apply(this,t)}return a(e,"HTTPClient"),e.prototype.setMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.length>1?this.parseMiddleWareArray(t):this.middleware=t[0]},e.prototype.parseMiddleWareArray=function(t){t.forEach(function(r,n){n<t.length-1&&r.setNext(t[n+1])}),this.middleware=t[0]},e.prototype.sendRequest=function(t){return Dp.__awaiter(this,void 0,void 0,function(){var r;return Dp.__generator(this,function(n){switch(n.label){case 0:if(typeof t.request=="string"&&t.options===void 0)throw r=new Error,r.name="InvalidRequestOptions",r.message="Unable to execute the middleware, Please provide valid options for a request",r;return[4,this.middleware.execute(t)];case 1:return n.sent(),[2,t]}})})},e})();to.HTTPClient=_v});var Mp=b(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.HTTPClientFactory=void 0;var Pv=(ce(),ie(ue)),Np=ji(),xv=vn(),bv=Pn(),Ev=Pr(),Tv=_r(),Iv=An(),Av=En(),Sv=On(),$v=a(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),wv=(function(){function e(){}return a(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new xv.AuthenticationHandler(t),n=new Av.RetryHandler(new Tv.RetryHandlerOptions),o=new Sv.TelemetryHandler,i=new bv.HTTPMessageHandler;if(r.setNext(n),$v()){var s=new Iv.RedirectHandler(new Ev.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(i),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(Np.HTTPClient.bind.apply(Np.HTTPClient,Pv.__spreadArray([void 0],t,!1)))},e})();ro.HTTPClientFactory=wv});var Up=b(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.validatePolyFilling=void 0;var Ov=a(function(){if(typeof Promise>"u"&&typeof fetch>"u"){var e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}else if(typeof Promise>"u"){var e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}else if(typeof fetch>"u"){var e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}return!0},"validatePolyFilling");no.validatePolyFilling=Ov});var Fp=b(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.Client=void 0;var Rv=(ce(),ie(ue)),Lp=xi(),zv=Ni(),Cv=Li(),jp=ji(),kv=Mp(),Dv=Up(),Nv=(function(){function e(t){this.config={baseUrl:Lp.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:Lp.GRAPH_API_VERSION},(0,Dv.validatePolyFilling)();for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.config[r]=t[r]);var n;if(t.authProvider!==void 0&&t.middleware!==void 0){var o=new Error;throw o.name="AmbiguityInInitialization",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",o}else if(t.authProvider!==void 0)n=kv.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(jp.HTTPClient.bind.apply(jp.HTTPClient,Rv.__spreadArray([void 0],[].concat(t.middleware),!1)));else{var o=new Error;throw o.name="InvalidMiddlewareChain",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",o}this.httpClient=n}return a(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new zv.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new Cv.GraphRequest(this.httpClient,this.config,t)},e})();oo.Client=Nv});var Vp=b(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.ResponseType=w.GraphRequest=w.GraphClientError=w.GraphError=w.CustomAuthenticationProvider=w.Client=w.PageIterator=w.Range=w.UploadResult=w.FileUpload=w.StreamUpload=w.getValidRangeSize=w.OneDriveLargeFileUploadTask=w.LargeFileUploadTask=w.ChaosHandler=w.ChaosStrategy=w.ChaosHandlerOptions=w.TelemetryHandlerOptions=w.FeatureUsageFlag=w.RedirectHandlerOptions=w.RetryHandlerOptions=w.AuthenticationHandlerOptions=w.MiddlewareFactory=w.TelemetryHandler=w.RedirectHandler=w.RetryHandler=w.HTTPMessageHandler=w.AuthenticationHandler=w.BatchResponseContent=w.BatchRequestContent=void 0;var Mv=np();Object.defineProperty(w,"BatchRequestContent",{enumerable:!0,get:a(function(){return Mv.BatchRequestContent},"get")});var Uv=op();Object.defineProperty(w,"BatchResponseContent",{enumerable:!0,get:a(function(){return Uv.BatchResponseContent},"get")});var Lv=vn();Object.defineProperty(w,"AuthenticationHandler",{enumerable:!0,get:a(function(){return Lv.AuthenticationHandler},"get")});var jv=Pn();Object.defineProperty(w,"HTTPMessageHandler",{enumerable:!0,get:a(function(){return jv.HTTPMessageHandler},"get")});var Fv=En();Object.defineProperty(w,"RetryHandler",{enumerable:!0,get:a(function(){return Fv.RetryHandler},"get")});var Bv=An();Object.defineProperty(w,"RedirectHandler",{enumerable:!0,get:a(function(){return Bv.RedirectHandler},"get")});var Vv=On();Object.defineProperty(w,"TelemetryHandler",{enumerable:!0,get:a(function(){return Vv.TelemetryHandler},"get")});var Hv=_p();Object.defineProperty(w,"MiddlewareFactory",{enumerable:!0,get:a(function(){return Hv.MiddlewareFactory},"get")});var Zv=bi();Object.defineProperty(w,"AuthenticationHandlerOptions",{enumerable:!0,get:a(function(){return Zv.AuthenticationHandlerOptions},"get")});var qv=_r();Object.defineProperty(w,"RetryHandlerOptions",{enumerable:!0,get:a(function(){return qv.RetryHandlerOptions},"get")});var Gv=Pr();Object.defineProperty(w,"RedirectHandlerOptions",{enumerable:!0,get:a(function(){return Gv.RedirectHandlerOptions},"get")});var Bp=Ut();Object.defineProperty(w,"FeatureUsageFlag",{enumerable:!0,get:a(function(){return Bp.FeatureUsageFlag},"get")});Object.defineProperty(w,"TelemetryHandlerOptions",{enumerable:!0,get:a(function(){return Bp.TelemetryHandlerOptions},"get")});var Wv=Ai();Object.defineProperty(w,"ChaosHandlerOptions",{enumerable:!0,get:a(function(){return Wv.ChaosHandlerOptions},"get")});var Kv=Cn();Object.defineProperty(w,"ChaosStrategy",{enumerable:!0,get:a(function(){return Kv.ChaosStrategy},"get")});var Jv=Tp();Object.defineProperty(w,"ChaosHandler",{enumerable:!0,get:a(function(){return Jv.ChaosHandler},"get")});var Xv=Ci();Object.defineProperty(w,"LargeFileUploadTask",{enumerable:!0,get:a(function(){return Xv.LargeFileUploadTask},"get")});var Yv=$p();Object.defineProperty(w,"OneDriveLargeFileUploadTask",{enumerable:!0,get:a(function(){return Yv.OneDriveLargeFileUploadTask},"get")});var Qv=Di();Object.defineProperty(w,"getValidRangeSize",{enumerable:!0,get:a(function(){return Qv.getValidRangeSize},"get")});var e_=Op();Object.defineProperty(w,"StreamUpload",{enumerable:!0,get:a(function(){return e_.StreamUpload},"get")});var t_=ki();Object.defineProperty(w,"FileUpload",{enumerable:!0,get:a(function(){return t_.FileUpload},"get")});var r_=Ri();Object.defineProperty(w,"UploadResult",{enumerable:!0,get:a(function(){return r_.UploadResult},"get")});var n_=Oi();Object.defineProperty(w,"Range",{enumerable:!0,get:a(function(){return n_.Range},"get")});var o_=Rp();Object.defineProperty(w,"PageIterator",{enumerable:!0,get:a(function(){return o_.PageIterator},"get")});var i_=Fp();Object.defineProperty(w,"Client",{enumerable:!0,get:a(function(){return i_.Client},"get")});var a_=Ni();Object.defineProperty(w,"CustomAuthenticationProvider",{enumerable:!0,get:a(function(){return a_.CustomAuthenticationProvider},"get")});var s_=Mi();Object.defineProperty(w,"GraphError",{enumerable:!0,get:a(function(){return s_.GraphError},"get")});var u_=Ge();Object.defineProperty(w,"GraphClientError",{enumerable:!0,get:a(function(){return u_.GraphClientError},"get")});var c_=Li();Object.defineProperty(w,"GraphRequest",{enumerable:!0,get:a(function(){return c_.GraphRequest},"get")});var l_=xr();Object.defineProperty(w,"ResponseType",{enumerable:!0,get:a(function(){return l_.ResponseType},"get")})});var Tr=b((Fi,Bi)=>{(function(e,t){typeof Fi=="object"&&typeof Bi<"u"?Bi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Fi,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",u="day",p="week",d="month",m="quarter",y="year",v="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(j){var A=["th","st","nd","rd"],I=j%100;return"["+j+(A[(I-20)%10]||A[I]||A[0])+"]"},"ordinal")},x=a(function(j,A,I){var R=String(j);return!R||R.length>=A?j:""+Array(A+1-R.length).join(I)+j},"m"),E={s:x,z:a(function(j){var A=-j.utcOffset(),I=Math.abs(A),R=Math.floor(I/60),S=I%60;return(A<=0?"+":"-")+x(R,2,"0")+":"+x(S,2,"0")},"z"),m:a(function j(A,I){if(A.date()<I.date())return-j(I,A);var R=12*(I.year()-A.year())+(I.month()-A.month()),S=A.clone().add(R,d),H=I-S<0,Z=A.clone().add(R+(H?-1:1),d);return+(-(R+(I-S)/(H?S-Z:Z-S))||0)},"t"),a:a(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:a(function(j){return{M:d,y,w:p,d:u,D:v,h:s,m:i,s:o,ms:n,Q:m}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(j){return j===void 0},"u")},V="en",me={};me[V]=h;var Pe=a(function(j){return j instanceof vt},"p"),ke=a(function j(A,I,R){var S;if(!A)return V;if(typeof A=="string"){var H=A.toLowerCase();me[H]&&(S=H),I&&(me[H]=I,S=H);var Z=A.split("-");if(!S&&Z.length>1)return j(Z[0])}else{var te=A.name;me[te]=A,S=te}return!R&&S&&(V=S),S||!R&&V},"t"),ee=a(function(j,A){if(Pe(j))return j.clone();var I=typeof A=="object"?A:{};return I.date=j,I.args=arguments,new vt(I)},"w"),G=E;G.l=ke,G.i=Pe,G.w=function(j,A){return ee(j,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var vt=(function(){function j(I){this.$L=ke(I.locale,null,!0),this.parse(I)}a(j,"M");var A=j.prototype;return A.parse=function(I){this.$d=(function(R){var S=R.date,H=R.utc;if(S===null)return new Date(NaN);if(G.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var Z=S.match(f);if(Z){var te=Z[2]-1||0,fe=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,fe)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,fe)}}return new Date(S)})(I),this.$x=I.x||{},this.init()},A.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},A.$utils=function(){return G},A.isValid=function(){return this.$d.toString()!==l},A.isSame=function(I,R){var S=ee(I);return this.startOf(R)<=S&&S<=this.endOf(R)},A.isAfter=function(I,R){return ee(I)<this.startOf(R)},A.isBefore=function(I,R){return this.endOf(R)<ee(I)},A.$g=function(I,R,S){return G.u(I)?this[R]:this.set(S,I)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(I,R){var S=this,H=!!G.u(R)||R,Z=G.p(I),te=a(function(pt,be){var Ke=G.w(S.$u?Date.UTC(S.$y,be,pt):new Date(S.$y,be,pt),S);return H?Ke:Ke.endOf(u)},"l"),fe=a(function(pt,be){return G.w(S.toDate()[pt].apply(S.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(be)),S)},"$"),ye=this.$W,_e=this.$M,Se=this.$D,_t="set"+(this.$u?"UTC":"");switch(Z){case y:return H?te(1,0):te(31,11);case d:return H?te(1,_e):te(0,_e+1);case p:var lt=this.$locale().weekStart||0,Ht=(ye<lt?ye+7:ye)-lt;return te(H?Se-Ht:Se+(6-Ht),_e);case u:case v:return fe(_t+"Hours",0);case s:return fe(_t+"Minutes",1);case i:return fe(_t+"Seconds",2);case o:return fe(_t+"Milliseconds",3);default:return this.clone()}},A.endOf=function(I){return this.startOf(I,!1)},A.$set=function(I,R){var S,H=G.p(I),Z="set"+(this.$u?"UTC":""),te=(S={},S[u]=Z+"Date",S[v]=Z+"Date",S[d]=Z+"Month",S[y]=Z+"FullYear",S[s]=Z+"Hours",S[i]=Z+"Minutes",S[o]=Z+"Seconds",S[n]=Z+"Milliseconds",S)[H],fe=H===u?this.$D+(R-this.$W):R;if(H===d||H===y){var ye=this.clone().set(v,1);ye.$d[te](fe),ye.init(),this.$d=ye.set(v,Math.min(this.$D,ye.daysInMonth())).$d}else te&&this.$d[te](fe);return this.init(),this},A.set=function(I,R){return this.clone().$set(I,R)},A.get=function(I){return this[G.p(I)]()},A.add=function(I,R){var S,H=this;I=Number(I);var Z=G.p(R),te=a(function(_e){var Se=ee(H);return G.w(Se.date(Se.date()+Math.round(_e*I)),H)},"y");if(Z===d)return this.set(d,this.$M+I);if(Z===y)return this.set(y,this.$y+I);if(Z===u)return te(1);if(Z===p)return te(7);var fe=(S={},S[i]=t,S[s]=r,S[o]=e,S)[Z]||1,ye=this.$d.getTime()+I*fe;return G.w(ye,this)},A.subtract=function(I,R){return this.add(-1*I,R)},A.format=function(I){var R=this,S=this.$locale();if(!this.isValid())return S.invalidDate||l;var H=I||"YYYY-MM-DDTHH:mm:ssZ",Z=G.z(this),te=this.$H,fe=this.$m,ye=this.$M,_e=S.weekdays,Se=S.months,_t=S.meridiem,lt=a(function(be,Ke,Zt,Ir){return be&&(be[Ke]||be(R,H))||Zt[Ke].slice(0,Ir)},"h"),Ht=a(function(be){return G.s(te%12||12,be,"0")},"d"),pt=_t||function(be,Ke,Zt){var Ir=be<12?"AM":"PM";return Zt?Ir.toLowerCase():Ir};return H.replace(_,(function(be,Ke){return Ke||(function(Zt){switch(Zt){case"YY":return String(R.$y).slice(-2);case"YYYY":return G.s(R.$y,4,"0");case"M":return ye+1;case"MM":return G.s(ye+1,2,"0");case"MMM":return lt(S.monthsShort,ye,Se,3);case"MMMM":return lt(Se,ye);case"D":return R.$D;case"DD":return G.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return lt(S.weekdaysMin,R.$W,_e,2);case"ddd":return lt(S.weekdaysShort,R.$W,_e,3);case"dddd":return _e[R.$W];case"H":return String(te);case"HH":return G.s(te,2,"0");case"h":return Ht(1);case"hh":return Ht(2);case"a":return pt(te,fe,!0);case"A":return pt(te,fe,!1);case"m":return String(fe);case"mm":return G.s(fe,2,"0");case"s":return String(R.$s);case"ss":return G.s(R.$s,2,"0");case"SSS":return G.s(R.$ms,3,"0");case"Z":return Z}return null})(be)||Z.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(I,R,S){var H,Z=this,te=G.p(R),fe=ee(I),ye=(fe.utcOffset()-this.utcOffset())*t,_e=this-fe,Se=a(function(){return G.m(Z,fe)},"D");switch(te){case y:H=Se()/12;break;case d:H=Se();break;case m:H=Se()/3;break;case p:H=(_e-ye)/6048e5;break;case u:H=(_e-ye)/864e5;break;case s:H=_e/r;break;case i:H=_e/t;break;case o:H=_e/e;break;default:H=_e}return S?H:G.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return me[this.$L]},A.locale=function(I,R){if(!I)return this.$L;var S=this.clone(),H=ke(I,R,!0);return H&&(S.$L=H),S},A.clone=function(){return G.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},j})(),ct=vt.prototype;return ee.prototype=ct,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",u],["$M",d],["$y",y],["$D",v]].forEach((function(j){ct[j[1]]=function(A){return this.$g(A,j[0],j[1])}})),ee.extend=function(j,A){return j.$i||(j(A,vt,ee),j.$i=!0),ee},ee.locale=ke,ee.isDayjs=Pe,ee.unix=function(j){return ee(1e3*j)},ee.en=me[V],ee.Ls=me,ee.p={},ee}))});var y_={};uo(y_,{microsoftOutlook:()=>h_});module.exports=ie(y_);var md=Object.freeze({status:"aborted"});function O(e,t,r){function n(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let d=s.prototype,m=Object.keys(d);for(let y=0;y<m.length;y++){let v=m[y];v in u||(u[v]=d[v].bind(u))}}a(n,"init");let o=r?.Parent??Object;class i extends o{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function s(u){var p;let d=r?.Parent?new i:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let m of d._zod.deferred)m();return d}return a(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(O,"$constructor");var De=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},co={};function je(e){return e&&Object.assign(co,e),co}a(je,"config");function po(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}a(po,"getEnumValues");function Wi(e,t){return typeof t=="bigint"?t.toString():t}a(Wi,"jsonStringifyReplacer");function $r(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a($r,"cached");function Ki(e){return e==null}a(Ki,"nullish");function wr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}a(wr,"cleanRegex");var Gi=Symbol("evaluating");function ge(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Gi)return n===void 0&&(n=Gi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}a(ge,"defineLazy");var mo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Gt,"isObject");var fd=$r(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ji(e){if(Gt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Gt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(Ji,"isPlainObject");var Xi=new Set(["string","number","symbol"]);function Pt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Pt,"escapeRegex");function Or(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}a(Or,"clone");function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(ne,"normalizeParams");function Yi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Yi,"optionalKeys");var Qi={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 xt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}a(xt,"aborted");function Je(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}a(Je,"prefixIssues");function Sr(e){return typeof e=="string"?e:e?.message}a(Sr,"unwrapMessage");function Xe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Sr(e.inst?._zod.def?.error?.(e))??Sr(t?.error?.(e))??Sr(r.customError?.(e))??Sr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}a(Xe,"finalizeIssue");function ea(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(ea,"getLengthableOrigin");function fo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}a(fo,"issue");var ta=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),ra=O("$ZodError",ta),Wt=O("$ZodError",ta,{Parent:Error});var hd=a(e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new De;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,i,je())));throw mo(u,o?.callee),u}return s.value},"_parse"),Rr=hd(Wt),yd=a(e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,i,je())));throw mo(u,o?.callee),u}return s.value},"_parseAsync"),zr=yd(Wt),vd=a(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new De;return i.issues.length?{success:!1,error:new(e??ra)(i.issues.map(s=>Xe(s,o,je())))}:{success:!0,data:i.value}},"_safeParse"),Kt=vd(Wt),_d=a(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Xe(s,o,je())))}:{success:!0,data:i.value}},"_safeParseAsync"),Jt=_d(Wt);var Pd="(?:(?:\\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])))",xd=new RegExp(`^${Pd}$`);var na=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),oa=/^-?\d+n?$/,ia=/^-?\d+$/,go=/^-?\d+(?:\.\d+)?$/,aa=/^(?:true|false)$/i;var Ye=O("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),bd={number:"number",bigint:"bigint",object:"date"};var sa=O("$ZodCheckGreaterThan",(e,t)=>{Ye.init(e,t);let r=bd[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var ua=O("$ZodCheckNumberFormat",(e,t)=>{Ye.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Qi[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,r&&(u.pattern=ia)}),e._zod.check=s=>{let u=s.value;if(r){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var ca=O("$ZodCheckMinLength",(e,t)=>{var r;Ye.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ki(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=ea(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var ho=O("$ZodCheckStringFormat",(e,t)=>{var r,n;Ye.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),la=O("$ZodCheckRegex",(e,t)=>{ho.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var da={major:4,minor:3,patch:6};var le=O("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=da;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=a((s,u,p)=>{let d=xt(s),m;for(let y of u){if(y._zod.def.when){if(!y._zod.def.when(s))continue}else if(d)continue;let v=s.issues.length,l=y._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new De;if(m||l instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await l,s.issues.length!==v&&(d||(d=xt(s,v)))});else{if(s.issues.length===v)continue;d||(d=xt(s,v))}}return m?m.then(()=>s):s},"runChecks"),i=a((s,u,p)=>{if(xt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new De;return d.then(m=>e._zod.parse(m,p))}return e._zod.parse(d,p)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(m=>i(m,s,u)):i(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new De;return p.then(d=>o(d,n,u))}return o(p,n,u)}}ge(e,"~standard",()=>({validate:a(o=>{try{let i=Kt(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Jt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Dr=O("$ZodString",(e,t)=>{le.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??na(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yo=O("$ZodStringFormat",(e,t)=>{ho.init(e,t),Dr.init(e,t)});var ya=O("$ZodURL",(e,t)=>{yo.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var vo=O("$ZodNumber",(e,t)=>{le.init(e,t),e._zod.pattern=e._zod.bag.pattern??go,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),va=O("$ZodNumberFormat",(e,t)=>{ua.init(e,t),vo.init(e,t)}),_o=O("$ZodBoolean",(e,t)=>{le.init(e,t),e._zod.pattern=aa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),_a=O("$ZodBigInt",(e,t)=>{le.init(e,t),e._zod.pattern=oa,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Pa=O("$ZodAny",(e,t)=>{le.init(e,t),e._zod.parse=r=>r}),xa=O("$ZodUnknown",(e,t)=>{le.init(e,t),e._zod.parse=r=>r});var ba=O("$ZodVoid",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Ea=O("$ZodDate",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function ma(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues)),t.value[r]=e.value}a(ma,"handleArrayResult");var Ta=O("$ZodArray",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?i.push(p.then(d=>ma(d,r,s))):ma(p,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function kr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Je(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}a(kr,"handlePropertyResult");function Ed(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Yi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}a(Ed,"normalizeDef");function Td(e,t,r,n,o,i){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,m=p.optout==="optional";for(let y in t){if(u.has(y))continue;if(d==="never"){s.push(y);continue}let v=p.run({value:t[y],issues:[]},n);v instanceof Promise?e.push(v.then(l=>kr(l,r,y,t,m))):kr(v,r,y,t,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}a(Td,"handleCatchall");var Ia=O("$ZodObject",(e,t)=>{if(le.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=$r(()=>Ed(t));ge(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let m=u[d]._zod;if(m.values){p[d]??(p[d]=new Set);for(let y of m.values)p[d].add(y)}}return p});let o=Gt,i=t.catchall,s;e._zod.parse=(u,p)=>{s??(s=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let m=[],y=s.shape;for(let v of s.keys){let l=y[v],f=l._zod.optout==="optional",_=l._zod.run({value:d[v],issues:[]},p);_ instanceof Promise?m.push(_.then(h=>kr(h,u,v,d,f))):kr(_,u,v,d,f)}return i?Td(m,d,u,p,n.value,e):m.length?Promise.all(m).then(()=>u):u}});function fa(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!xt(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Xe(s,n,je())))}),t)}a(fa,"handleUnionResults");var Po=O("$ZodUnion",(e,t)=>{le.init(e,t),ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>wr(i.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},i);if(d instanceof Promise)u.push(d),s=!0;else{if(d.issues.length===0)return d;u.push(d)}}return s?Promise.all(u).then(p=>fa(p,o,e,i)):fa(u,o,e,i)}});var Aa=O("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Po.init(e,t);let r=e._zod.parse;ge(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,p]of Object.entries(s)){o[u]||(o[u]=new Set);for(let d of p)o[u].add(d)}}return o});let n=$r(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let p of u){if(i.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);i.set(p,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!Gt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var Sa=O("$ZodRecord",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Ji(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let m=t.valueType._zod.run({value:o[d],issues:[]},n);m instanceof Promise?i.push(m.then(y=>{y.issues.length&&r.issues.push(...Je(d,y.issues)),r.value[d]=y.value})):(m.issues.length&&r.issues.push(...Je(d,m.issues)),r.value[d]=m.value)}let p;for(let d in o)u.has(d)||(p=p??[],p.push(d));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&go.test(u)&&p.issues.length){let y=t.keyType._zod.run({value:Number(u),issues:[]},n);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(p=y)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(y=>Xe(y,n,je())),input:u,path:[u],inst:e});continue}let m=t.valueType._zod.run({value:o[u],issues:[]},n);m instanceof Promise?i.push(m.then(y=>{y.issues.length&&r.issues.push(...Je(u,y.issues)),r.value[p.value]=y.value})):(m.issues.length&&r.issues.push(...Je(u,m.issues)),r.value[p.value]=m.value)}}return i.length?Promise.all(i).then(()=>r):r}});var $a=O("$ZodEnum",(e,t)=>{le.init(e,t);let r=po(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Xi.has(typeof o)).map(o=>typeof o=="string"?Pt(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),wa=O("$ZodLiteral",(e,t)=>{if(le.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Pt(n):n?Pt(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}});var Oa=O("$ZodTransform",(e,t)=>{le.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ar(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new De;return r.value=o,r}});function ga(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(ga,"handleOptionalResult");var Ra=O("$ZodOptional",(e,t)=>{le.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ga(i,r.value)):ga(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var za=O("$ZodNullable",(e,t)=>{le.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)}|null)$`):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Ca=O("$ZodPipe",(e,t)=>{le.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Cr(s,t.in,n)):Cr(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Cr(i,t.out,n)):Cr(o,t.out,n)}});function Cr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}a(Cr,"handlePipeResult");var ka=O("$ZodCustom",(e,t)=>{Ye.init(e,t),le.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>ha(i,r,n,e));ha(o,r,n,e)}});function ha(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(fo(o))}}a(ha,"handleRefineResult");var Na;var xo=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ma(){return new xo}a(Ma,"registry");(Na=globalThis).__zod_globalRegistry??(Na.__zod_globalRegistry=Ma());var bo=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...ne(t)})}a(Ua,"_string");function La(e,t){return new e({type:"string",coerce:!0,...ne(t)})}a(La,"_coercedString");function ja(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ne(t)})}a(ja,"_url");function Fa(e,t){return new e({type:"number",checks:[],...ne(t)})}a(Fa,"_number");function Ba(e,t){return new e({type:"number",coerce:!0,checks:[],...ne(t)})}a(Ba,"_coercedNumber");function Va(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ne(t)})}a(Va,"_int");function Ha(e,t){return new e({type:"boolean",...ne(t)})}a(Ha,"_boolean");function Za(e,t){return new e({type:"boolean",coerce:!0,...ne(t)})}a(Za,"_coercedBoolean");function qa(e,t){return new e({type:"bigint",coerce:!0,...ne(t)})}a(qa,"_coercedBigint");function Ga(e){return new e({type:"any"})}a(Ga,"_any");function Wa(e){return new e({type:"unknown"})}a(Wa,"_unknown");function Ka(e,t){return new e({type:"void",...ne(t)})}a(Ka,"_void");function Ja(e,t){return new e({type:"date",coerce:!0,...ne(t)})}a(Ja,"_coercedDate");function Nr(e,t){return new sa({check:"greater_than",...ne(t),value:e,inclusive:!0})}a(Nr,"_gte");function ze(e,t){return new ca({check:"min_length",...ne(t),minimum:e})}a(ze,"_minLength");function Qe(e,t){return new la({check:"string_format",format:"regex",...ne(t),pattern:e})}a(Qe,"_regex");function Xa(e,t,r){let n=ne(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}a(Xa,"_custom");var he=O("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");le.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>Rr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Kt(e,r,n),e.parseAsync=async(r,n)=>zr(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Jt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>Or(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Ur=O("ZodMiniString",(e,t)=>{Dr.init(e,t),he.init(e,t)});function c(e){return Ua(Ur,e)}a(c,"string");var Ya=O("ZodMiniStringFormat",(e,t)=>{yo.init(e,t),Ur.init(e,t)});var Md=O("ZodMiniURL",(e,t)=>{ya.init(e,t),Ya.init(e,t)});function Qa(e){return ja(Md,e)}a(Qa,"url");var Lr=O("ZodMiniNumber",(e,t)=>{vo.init(e,t),he.init(e,t)});function xe(e){return Fa(Lr,e)}a(xe,"number");var Ud=O("ZodMiniNumberFormat",(e,t)=>{va.init(e,t),Lr.init(e,t)});function es(e){return Va(Ud,e)}a(es,"int");var Eo=O("ZodMiniBoolean",(e,t)=>{_o.init(e,t),he.init(e,t)});function Y(e){return Ha(Eo,e)}a(Y,"boolean");var ts=O("ZodMiniBigInt",(e,t)=>{_a.init(e,t),he.init(e,t)});var Ld=O("ZodMiniAny",(e,t)=>{Pa.init(e,t),he.init(e,t)});function Yt(){return Ga(Ld)}a(Yt,"any");var jd=O("ZodMiniUnknown",(e,t)=>{xa.init(e,t),he.init(e,t)});function M(){return Wa(jd)}a(M,"unknown");var Fd=O("ZodMiniVoid",(e,t)=>{ba.init(e,t),he.init(e,t)});function rs(e){return Ka(Fd,e)}a(rs,"_void");var ns=O("ZodMiniDate",(e,t)=>{Ea.init(e,t),he.init(e,t)});var Bd=O("ZodMiniArray",(e,t)=>{Ta.init(e,t),he.init(e,t)});function F(e,t){return new Bd({type:"array",element:e,...ne(t)})}a(F,"array");var Vd=O("ZodMiniObject",(e,t)=>{Ia.init(e,t),he.init(e,t),ge(e,"shape",()=>t.shape)});function g(e,t){let r={type:"object",shape:e??{},...ne(t)};return new Vd(r)}a(g,"object");var Hd=O("ZodMiniUnion",(e,t)=>{Po.init(e,t),he.init(e,t)});function B(e,t){return new Hd({type:"union",options:e,...ne(t)})}a(B,"union");var Zd=O("ZodMiniDiscriminatedUnion",(e,t)=>{Aa.init(e,t),he.init(e,t)});function et(e,t,r){return new Zd({type:"union",options:t,discriminator:e,...ne(r)})}a(et,"discriminatedUnion");var qd=O("ZodMiniRecord",(e,t)=>{Sa.init(e,t),he.init(e,t)});function U(e,t,r){return new qd({type:"record",keyType:e,valueType:t,...ne(r)})}a(U,"record");var Gd=O("ZodMiniEnum",(e,t)=>{$a.init(e,t),he.init(e,t),e.options=Object.values(t.entries)});function W(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Gd({type:"enum",entries:r,...ne(t)})}a(W,"_enum");var Wd=O("ZodMiniLiteral",(e,t)=>{wa.init(e,t),he.init(e,t)});function C(e,t){return new Wd({type:"literal",values:Array.isArray(e)?e:[e],...ne(t)})}a(C,"literal");var Kd=O("ZodMiniTransform",(e,t)=>{Oa.init(e,t),he.init(e,t)});function tt(e){return new Kd({type:"transform",transform:e})}a(tt,"transform");var Jd=O("ZodMiniOptional",(e,t)=>{Ra.init(e,t),he.init(e,t)});function P(e){return new Jd({type:"optional",innerType:e})}a(P,"optional");var Xd=O("ZodMiniNullable",(e,t)=>{za.init(e,t),he.init(e,t)});function Qt(e){return new Xd({type:"nullable",innerType:e})}a(Qt,"nullable");var Yd=O("ZodMiniPipe",(e,t)=>{Ca.init(e,t),he.init(e,t)});function rt(e,t){return new Yd({type:"pipe",in:e,out:t})}a(rt,"pipe");var Qd=O("ZodMiniCustom",(e,t)=>{ka.init(e,t),he.init(e,t)});function jr(e,t){return Xa(Qd,e??(()=>!0),t)}a(jr,"custom");var er={};uo(er,{bigint:()=>im,boolean:()=>om,date:()=>am,number:()=>nm,string:()=>rm});function rm(e){return La(Ur,e)}a(rm,"string");function nm(e){return Ba(Lr,e)}a(nm,"number");function om(e){return Za(Eo,e)}a(om,"boolean");function im(e){return qa(ts,e)}a(im,"bigint");function am(e){return Ja(ns,e)}a(am,"date");var Io=g({retryOnFailure:g({defaultValue:P(Y()),hide:P(Y())}),continueOnFailure:g({defaultValue:P(Y()),hide:P(Y())})}),To=class{constructor(t,r,n,o,i,s,u,p,d,m,y){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=i;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=m;this.aiMetadata=y}static{a(this,"IAction")}},oe=a(e=>new To(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 Q=g({displayName:c(),description:P(c())}),q=a((e,t)=>g({type:C(t),required:Y(),defaultValue:P(Yt())}),"TPropertyValue");var Ie=g({...Q.shape,...q(c(),"SHORT_TEXT").shape}),Fe=g({...Q.shape,...q(c(),"LONG_TEXT").shape});var is=g({label:c(),value:M()}),Fr=g({disabled:P(Y()),placeholder:P(c()),options:F(is)});var Ae=g({...Q.shape,options:Fr,...q(M(),"STATIC_DROPDOWN").shape}),Be=g({...Q.shape,options:Fr,...q(F(M()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Ao=g({...Q.shape,...q(M(),"DROPDOWN").shape,refreshers:F(c())}),tr=g({...Q.shape,...q(F(M()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=g({...Q.shape,...q(Y(),"CHECKBOX").shape});var He=g({...Q.shape,...q(xe(),"NUMBER").shape});var rr=g({...Q.shape,streaming:P(Y()),...q(M(),"FILE").shape});var nr=g({...Q.shape,...q(c(),"DATE_TIME").shape});var as=U(c(),B([Ie,Fe,Ae,tr,Be,Ve,He,rr,nr])),or=g({...Q.shape,properties:as,...q(F(M()),"ARRAY").shape});var ir=g({...Q.shape,...q(B([U(c(),M())]),"JSON").shape});var ss=B([Ie,Ae,ir,or,Be]),um=U(c(),ss),So=g({refreshers:F(c()),...Q.shape,...q(M(),"DYNAMIC").shape});var Br=g({...Q.shape,...q(rs(),"MARKDOWN").shape});var ar=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ar||{}),bt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(bt||{}),Et=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(Et||{});var sr=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(sr||{}),$o="both_client_credentials_and_authorization_code";var Ne=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Ne||{}),ur=(i=>(i.NONE="NONE",i.HEADER_PRESENT="HEADER_PRESENT",i.QUERY_PRESENT="QUERY_PRESENT",i.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",i.HEAD_REQUEST="HEAD_REQUEST",i))(ur||{}),cm=g({strategy:W(ur),paramName:P(c())}),cr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(cr||{});var Vr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Vr||{}),us=g({status:P(xe()),body:P(M()),headers:P(U(c(),c()))}),cs=g({type:C("DELAY"),resumeDateTime:c(),requestIdToReply:P(c()),handlerId:P(c()),streamStepProgress:P(W(Vr))}),ls=g({type:C("WEBHOOK"),requestId:c(),requestIdToReply:P(c()),response:us,handlerId:P(c()),streamStepProgress:P(W(Vr))}),lm=B([cs,ls]);var pm=g({body:M(),rawBody:P(M()),headers:U(c(),c()),queryParams:U(c(),c())});function ae(e){return e==null}a(ae,"isNil");function lr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(lr,"isEmpty");function Ze(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(Ze,"assertNotNullOrUndefined");var wo=Re(require("crypto"),1);var dm=128,dt,Tt,mm=a(e=>{!dt||dt.length<e?(dt=Buffer.allocUnsafe(e*dm),wo.default.randomFillSync(dt),Tt=0):Tt+e>dt.length&&(wo.default.randomFillSync(dt),Tt=0),Tt+=e},"fillPool"),fm=a(e=>(mm(e|=0),dt.subarray(Tt-e,Tt)),"random"),gm=a((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===i)return s}}},"customRandom"),ds=a((e,t=21)=>gm(e,t,fm),"customAlphabet");var hm="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ms=21,X$=c().check(Qe(new RegExp(`^[0-9a-zA-Z]{${ms}}$`))),ym=ds(hm,ms);var nt=rt(tt(e=>e instanceof Date?e.toISOString():e),c()),$e={id:c(),created:nt,updated:nt},se=a(e=>P(Qt(e)),"Nullable");function Oo(e){return P(Qt(W(e)))}a(Oo,"NullableEnum");var ew=rt(tt(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),P(Y())),Hr=a(e=>rt(tt(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),P(F(e))),"OptionalArrayFromQuery");var nw=U(c(),M());var pr=(m=>(m.OPENAI="openai",m.OPENROUTER="openrouter",m.ANTHROPIC="anthropic",m.AZURE="azure",m.GOOGLE="google",m.ACTIVEPIECES="activepieces",m.CLOUDFLARE_GATEWAY="cloudflare-gateway",m.CUSTOM="custom",m.BEDROCK="bedrock",m.MISTRAL="mistral",m))(pr||{});var gw=c().check(Qe(/^#[0-9A-Fa-f]{6}$/));var yw=g({filename:c(),data:M(),type:C("file"),mimetype:P(c())});var vm=Re(gs());var Tw=g({...$e,name:c(),permissions:F(c()),platformId:se(c()),type:c(),userCount:P(xe())});var hs=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(hs||{}),Ro=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Ro||{}),zo=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(zo||{});var Co=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Co||{});var ko=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(ko||{});var _m=g({mode:W(hs),value:M()}),Pm=g({auth:P(c()),fields:U(c(),_m)}),xm=g({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:P(Pm)}),bm=g({type:C("PIECE"),toolName:c().check(ze(1)),pieceMetadata:xm}),Em=g({type:C("none")}),Tm=g({type:C("access_token"),accessToken:c()}),Im=g({type:C("api_key"),apiKey:c(),apiKeyHeader:c()}),Am=g({type:C("headers"),headers:U(c(),c())}),Sm=et("type",[Em,Tm,Im,Am]),ys=g({type:C("FLOW"),toolName:c().check(ze(1)),externalFlowId:c(),flowDisplayName:P(c())}),vs=g({type:C("MCP"),toolName:c().check(ze(1)),serverUrl:Qa(),protocol:W(zo),auth:Sm}),_s=g({type:C("KNOWLEDGE_BASE"),toolName:c().check(ze(1)),sourceType:W(Ro),sourceId:c(),sourceName:c()}),$m=et("type",[bm,ys,vs,_s]),wm=g({displayName:c(),description:P(c()),type:W(Co)}),Ps=g({type:C("MARKDOWN"),markdown:c()}),It={type:C("TOOL_CALL"),input:se(U(c(),M())),output:P(M()),toolName:c(),status:W(ko),toolCallId:c(),startTime:c(),endTime:P(c())},tO=g(It),xs=et("toolCallType",[g({...It,toolCallType:C("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),g({...It,toolCallType:C("FLOW"),displayName:c(),externalFlowId:c()}),g({...It,toolCallType:C("MCP"),displayName:c(),serverUrl:c()}),g({...It,toolCallType:C("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),g({...It,toolCallType:C("UNKNOWN"),displayName:c()})]),Om=B([Ps,xs]);var Do=(r=>(r.IMAGE="image",r.TEXT="text",r))(Do||{}),qe=g({apiKey:c()}),Rm=qe,zm=g({apiKey:c(),apiKeyHash:c()}),Cm=qe,km=qe,Dm=qe,Nm=qe,Mm=qe,Um=qe,Lm=qe,As=g({accessKeyId:c().check(ze(1)),secretAccessKey:c().check(ze(1))}),jm=g({}),Fm=g({}),Bm=g({}),Vm=g({}),Hm=g({}),Zm=g({}),Ss=g({modelId:c(),modelName:c(),modelType:W(Do)}),$s=g({apiKeyHeader:c(),baseUrl:c(),models:F(Ss),defaultHeaders:P(U(c(),c()))}),ws=g({accountId:c(),gatewayId:c(),models:F(Ss),vertexProject:P(c()),vertexRegion:P(c())}),Os=g({resourceName:c(),apiVersion:rt(tt(e=>typeof e=="string"&&e.trim().length===0?void 0:e),P(c()))}),Rs=g({region:c().check(ze(1))}),qm=B([Rm,Dm,Nm,Mm,Um,km,Cm,zm,As,Lm]),zs=B([$s,ws,Os,Rs,jm,Bm,Vm,Hm,Fm,Zm]),Gm=g({id:c(),name:c(),type:W(Do)}),Wm=g({id:c(),name:c(),provider:W(pr),config:zs,enabledForChat:Y()}),Km=g({provider:W(pr),config:zs,auth:qm,platformId:c()});var iO={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},bs=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Jm=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Xm=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Es=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Ym=["grok-4.20","grok-4.1-fast"],Qm={openai:bs,anthropic:Jm,google:Es,activepieces:[...Xm.map(e=>`anthropic/${e}`),...bs.map(e=>`openai/${e}`),...Es.map(e=>`google/${e}`),...Ym.map(e=>`x-ai/${e}`)]};var Ts=128e3,ef={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function tf({provider:e}){return e?ef[e]??Ts:Ts}a(tf,"getMaxContextTokens");var Is={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"},rf={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},nf=new Set(["anthropic","mistral"]);function Me(e){return{chatModels:Qm[e],maxContextTokens:tf({provider:e}),defaultEmbeddingModel:Is[e],supportsEmbedding:Is[e]!==void 0,supportsImageGeneration:!nf.has(e),webSearch:rf[e]}}a(Me,"buildProviderCapabilities");var of={openai:Me("openai"),anthropic:Me("anthropic"),openrouter:Me("openrouter"),azure:Me("azure"),google:Me("google"),"cloudflare-gateway":Me("cloudflare-gateway"),custom:Me("custom"),bedrock:Me("bedrock"),mistral:Me("mistral"),activepieces:Me("activepieces")};var af=g({base64Url:c(),fileName:c(),extension:P(c())}),sf=g({mimeType:c(),url:c(),fileName:P(c())}),No=B([af,sf]);var uf=B([g({type:C("file"),value:No}),g({type:C("markdown"),value:c(),files:P(F(No))})]),cf=g({sessionId:c(),message:c(),files:P(F(c()))});var ks=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ks||{}),Ds=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ds||{}),Mo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Mo||{});var lf=B([g({...$e,name:c(),externalId:c(),type:C("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:g({options:F(g({value:c()}))})}),g({...$e,name:c(),externalId:c(),type:B([C("TEXT"),C("NUMBER"),C("DATE")]),tableId:c(),projectId:c()})]),pf=g({...$e,name:c(),folderId:se(c()),projectId:c(),externalId:c(),status:Oo(Ds),trigger:Oo(ks)}),df=g({...$e,tableId:c(),projectId:c(),cells:U(c(),g({updated:c(),created:c(),value:M(),fieldName:c()}))}),mf=g({events:F(W(Mo)),webhookUrl:c(),flowId:c()}),ff=g({fields:F(g({id:c(),name:c()})),rows:F(U(c(),c())),name:c()}),gf=g({projectId:c(),limit:P(er.number()),cursor:P(c()),name:P(c()),externalIds:Hr(c()),folderId:P(c()),folderIds:Hr(c())}),hf=g({records:F(F(g({fieldId:c(),value:Ms()}))),tableId:c()}),yf=g({cells:P(F(g({fieldId:c(),value:Ms()}))),tableId:c(),agentUpdate:P(Y())}),Ns=et("operator",[mt("eq"),mt("neq"),mt("gt"),mt("gte"),mt("lt"),mt("lte"),mt("co"),Cs("exists"),Cs("not_exists")]),vf=g({tableId:c(),limit:P(er.number()),cursor:P(c()),filters:Hr(Ns)});function Ms(){return rt(tt(e=>e==null?e:String(e)),Qt(c()))}a(Ms,"coerceToString");function mt(e){return g({fieldId:c(),operator:C(e),value:c()})}a(mt,"valueFilter");function Cs(e){return g({fieldId:c(),operator:C(e)})}a(Cs,"existenceFilter");var _f=g({status:P(xe()),body:P(M()),headers:P(U(c(),c()))}),Pf=g({...$e,deleted:se(nt),ownerId:c(),displayName:c(),platformId:c(),externalId:se(c())});var Us=g({name:c(),description:P(c()),type:c(),required:Y()}),xf=g({pieceName:c(),triggerName:c(),input:g({toolName:c(),toolDescription:c(),inputSchema:F(Us),returnsResponse:Y()})});var Ls="^[0-9]+\\.[0-9]+\\.[0-9]+$",TO=new RegExp(Ls),Ef="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",IO=c().check(Qe(new RegExp(Ls))),AO=c().check(Qe(new RegExp(Ef))),Tf=g({packageType:C("ARCHIVE"),pieceType:W(bt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),js=g({packageType:C("REGISTRY"),pieceType:C("OFFICIAL"),pieceName:c(),pieceVersion:c()}),Fs=g({packageType:C("REGISTRY"),pieceType:C("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),SO=B([js,Fs]),$O=B([Tf,js,Fs]);var If=et("type",[g({type:C("CRON_EXPRESSION"),cronExpression:c(),timezone:c()}),g({type:C("INTERVAL"),intervalMs:es().check(Nr(6e4))})]),wO=g({...$e,type:W(Ne),projectId:c(),flowId:c(),triggerName:c(),schedule:se(If),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:se(c()),simulate:Y()}),Bs=(h=>(h.UNKNOWN="UNKNOWN",h.FLOW_RUN_LOG="FLOW_RUN_LOG",h.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",h.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",h.FLOW_STEP_FILE="FLOW_STEP_FILE",h.SAMPLE_DATA="SAMPLE_DATA",h.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",h.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",h.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",h.PROJECT_RELEASE="PROJECT_RELEASE",h.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",h.PLATFORM_ASSET="PLATFORM_ASSET",h.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",h.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",h.KNOWLEDGE_BASE="KNOWLEDGE_BASE",h.FLOW_BUNDLE="FLOW_BUNDLE",h))(Bs||{}),Vs=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Vs||{}),Hs=(r=>(r.S3="S3",r.DB="DB",r))(Hs||{}),OO=g({...$e,projectId:se(c()),platformId:se(c()),type:W(Bs),compression:W(Vs),data:P(M()),location:W(Hs),size:se(xe()),fileName:se(c()),s3Key:se(c()),metadata:se(U(c(),c()))}),Zs=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Zs||{}),qs=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(qs||{}),RO=g({id:c(),email:c(),firstName:c(),status:W(qs),externalId:se(c()),platformId:se(c()),platformRole:W(Zs),lastName:c(),created:nt,updated:nt,lastActiveDate:se(nt),imageUrl:se(c())});var Lo=g({...Q.shape,...q(U(c(),M()),"OBJECT").shape});var Ks=g({...Q.shape,...q(c(),"COLOR").shape});var jo=B([Ie,Fe,Br,Ve,Ae,Be,Ao,tr,So,He,or,Lo,ir,nr,rr,Ks]),T={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 t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Ue=g({displayName:c(),description:P(c()),hasConnectionIdentifier:P(Y())});var Js=g({username:c(),password:c()}),Fo=g({...Ue.shape,username:g({displayName:c(),description:P(c())}),password:g({displayName:c(),description:P(c())}),...q(Js,"BASIC_AUTH").shape});var wf=U(c(),B([Ie,Fe,He,Ve,Ae])),Bo=g({...Ue.shape,props:wf,...q(M(),"CUSTOM_AUTH").shape});var ft=g({...Ue.shape,...q(g({auth:c()}),"SECRET_TEXT").shape});var Of=U(c(),B([Ie,Fe,ft,He,Ve,Ae,Be,Br])),Xs=g({...Ue.shape,props:Of,...q(M(),"OIDC").shape});var Vo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Vo||{}),Ys=B([Ie,ft,Ae]),Qs=U(c(),Ys),Rf=g({props:P(U(c(),Ys)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:P(B([C("none"),C("consent"),C("login"),C("omit")])),pkce:P(Y()),pkceMethod:P(B([C("plain"),C("S256")])),authorizationMethod:P(W(Vo)),grantType:P(B([W(sr),C($o)])),extra:P(U(c(),c()))}),eu=g({access_token:c(),props:P(Qs),data:U(c(),Yt())}),Ho=g({...Ue.shape,...Rf.shape,...q(eu,"OAUTH2").shape});var At=B([Fo,Bo,Xs,Ho,ft]),dr="Connection",Zo={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||dr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||dr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||dr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||dr}},None(){}};var cz={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 zf=g({...Q.shape,...q(M(),"CUSTOM").shape,code:c()});var Cf=B([jo,At]),qo=U(c(),Cf),wz=U(c(),jo);var tu=B([g({strategy:C("CRON"),cronExpression:c()}),g({strategy:C("NONE")})]),St=class{constructor(t,r,n,o,i,s,u,p,d,m,y,v,l,f,_,h,x,E,V){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=m;this.onEnable=y;this.onDisable=v;this.onStart=l;this.run=f;this.test=_;this.sampleData=h;this.testStrategy=x;this.outputSchema=E;this.aiMetadata=V}static{a(this,"ITrigger")}},$t=a(e=>{switch(e.type){case"WEBHOOK":return new St(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 St(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 St(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 St(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,ae(e.sampleData)&&ae(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var ru="2",qr="0.82.0";var Go=class{constructor(t,r,n,o,i,s,u,p,d=qr,m,y="",v){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=m;this.description=y;this.deprecated=v;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:ru}),"getContextInfo");(!Df(d)||Nf(d,qr))&&(this.minimumSupportedRelease=qr),i.forEach(l=>this._actions[l.name]=l),s.forEach(l=>this._triggers[l.name]=l)}static{a(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:kf(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},ou=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(i=>i.type===r.type)))throw new Error("Auth properties must be unique by type");return new Go(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 kf(e){if(e!==void 0)return Array.isArray(e)?e.map(nu):nu(e)}a(kf,"withConnectionIdentifierFlag");function nu(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(nu,"flagConnectionIdentifier");function Df(e){return/^\d+\.\d+\.\d+$/.test(e)}a(Df,"isValidSimpleSemver");function Nf(e,t){let[r,n,o]=e.split(".").map(Number),[i,s,u]=t.split(".").map(Number);return r!==i?r<i:n!==s?n<s:o<u}a(Nf,"isSemverLessThan");var Mf=P(U(c(),U(c(),c()))),iu=g({id:P(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:P(c()),directoryPath:P(c()),auth:P(B([At,F(At)])),version:c(),categories:P(F(W(Et))),minimumSupportedRelease:P(c()),maximumSupportedRelease:P(c()),deprecated:P(Y()),i18n:Mf}),Uf=W(["human","ai","both"]),au=g({description:P(c()),idempotent:P(Y())}),su=g({name:c(),displayName:c(),description:c(),props:qo,requireAuth:Y(),errorHandlingOptions:P(Io),outputSchema:P(jr()),audience:P(Uf),aiMetadata:P(au)}),uu=g({name:c(),displayName:c(),description:c(),props:qo,errorHandlingOptions:P(Io),type:W(Ne),sampleData:M(),handshakeConfiguration:P(jr()),renewConfiguration:P(tu),testStrategy:W(cr),outputSchema:P(jr()),aiMetadata:P(au)}),Lf=g({...iu.shape,actions:U(c(),su),triggers:U(c(),uu)}),jf=g({...iu.shape,actions:xe(),triggers:xe(),suggestedActions:P(F(su)),suggestedTriggers:P(F(uu))}),cu=g({projectUsage:xe(),pieceType:W(bt),packageType:W(ar),platformId:P(c()),archiveId:P(c())}),wC=g({...Lf.shape,...cu.shape}),OC=g({...jf.shape,...cu.shape}),RC=g({name:c(),version:c()});var Ff=Re(require("path")),Bf=Re(require("fs/promises"));var mu=require("node:stream");var Gr=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{a(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((i,s)=>{o.append(s,i)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Wr=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new Wo,r=new Ko){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Wo=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Ko=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var mr=class extends Error{constructor(r,n){let o=n.status||500,i=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:i},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=i}static{a(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}}};function lu({error:e,requestBody:t}){return e instanceof mr?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(lu,"toFailsafeOutput");var Jo=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Jo||{});var Kr=class extends Gr{static{a(this,"FetchHttpClient")}constructor(t="",r=new Wr){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),i=this.getHeaders(t),s=t.queryParams??{};for(let[V,me]of Object.entries(s))o.append(V,me);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",m=t.followRedirects??!0,y=t.retries??0,{body:v,extraHeaders:l,isStream:f}=Vf(t.method)?Hf(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},_=qf({...i,...l}),h=await Zf(async()=>{let V=new AbortController,me=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let Pe={method:t.method.toString(),headers:_,body:v,redirect:m?"follow":"manual",signal:V.signal};return f&&(Pe.duplex="half"),r?.dispatcher!==void 0&&(Pe.dispatcher=r.dispatcher),await fetch(p,Pe)}finally{me!==void 0&&clearTimeout(me)}},y),x=m?300:400;if(h.status<200||h.status>=x){let V=await pu(h,d),me=new mr(t.body,{status:h.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",me),me}let E=await pu(h,d);return{status:h.status,headers:Gf(h.headers),body:E}}};function Vf(e){return e!=="GET"&&e!=="HEAD"}a(Vf,"acceptsRequestBody");function Hf(e,t){if(Kf(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Wf(e)){let n=new mu.PassThrough;return e.on("error",o=>n.destroy(o)),e.pipe(n),{body:n,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}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(Hf,"serializeBody");async function pu(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}a(pu,"parseResponseBody");async function Zf(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await du(n);continue}return o}catch(o){if(r=o,n<t){await du(n);continue}throw o}throw r}a(Zf,"sendWithRetries");function du(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}a(du,"backoff");function qf(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}a(qf,"normalizeHeaders");function Gf(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}a(Gf,"toHttpHeaders");function Wf(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(Wf,"isNodeFormData");function Kf(e){return e==null}a(Kf,"isNil");var fu=new Kr;var Nh=Re(require("fs")),Pl=Re(_l());var Mh={"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 Uh(e){let t=e.split(";")[0].trim().toLowerCase();return Mh[t]??""}a(Uh,"contentTypeToExtension");var Lh=a(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),jh=a((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function xl({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:i,props:s,extraProps:u,authLocation:p="headers"}){return oe({audience:"human",name:i||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:T.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:d})=>({url:T.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
6
+ i.e ${jh(t,d)}/resource or /resource`,required:!0,defaultValue:d?t(d):"",...s?.url??{}})}),"props")}),method:T.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Jo).map(d=>({label:d,value:d}))},...s?.method??{}}),headers:T.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...s?.headers??{}}),queryParams:T.Object({displayName:"Query Parameters",required:!0,...s?.queryParams??{}}),body_type:T.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:T.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:a(async({body_type:d})=>{if(!d)return{};let m=d,y={};switch(m){case"none":break;case"json":y.data=T.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":y.data=T.LongText({displayName:"Raw Body",required:!0});break;case"form_data":y.data=T.Array({displayName:"Form Data",required:!0,properties:{fieldName:T.ShortText({displayName:"Field Name",required:!0}),fieldType:T.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:T.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:T.File({displayName:"File Field Value",required:!1})}});break}return y},"props")}),response_is_binary:T.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:T.Checkbox({displayName:"No Error on Failure",required:!1,...s?.failsafe??{}}),timeout:T.Number({displayName:"Timeout (in seconds)",required:!1,...s?.timeout??{}}),followRedirects:T.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...u},run:a(async d=>{let{method:m,url:y,headers:v,queryParams:l,body:f,body_type:_,failsafe:h,timeout:x,response_is_binary:E,followRedirects:V}=d.propsValue;Ze(m,"Method"),Ze(y,"URL");let me=ae(r)?{}:await r(d.auth,d.propsValue),Pe=y.url,ke=Pe.startsWith("http://")||Pe.startsWith("https://")?Pe:Lh({baseUrl:t(d.auth),relativePath:Pe}),ee={method:m,url:ke,headers:{...v??{},...p==="headers"||!ae(p)?me:{}},queryParams:{...p==="queryParams"?me:{},...l??{}},timeout:x?x*1e3:0,followRedirects:V};if(E&&(ee.responseType="arraybuffer"),f)if(_&&_!=="none"){let G=f.data;if(_==="form_data"){let vt=G,ct=new Pl.default;for(let{fieldName:j,fieldType:A,textFieldValue:I,fileFieldValue:R}of vt)A==="text"&&!lr(I)?ct.append(j,I):A==="file"&&!lr(R)&&ct.append(j,R.data,{filename:R?.filename});ee.body=ct,ee.headers={...ee.headers,...ct.getHeaders()}}else ee.body=G}else _||(ee.body=f);try{let G=await fu.sendRequest(ee);return await Fh(d.files,G.body,G.status,G.headers,E)}catch(G){if(h)return lu({error:G,requestBody:ee.body});throw G}},"run")})}a(xl,"createCustomApiCallAction");var Fh=a(async(e,t,r,n,o)=>{let i;if(o&&Bh(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=Uh(s??"")||"txt",p;t instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?p=t:p=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:p})}else i=t;return{status:r,headers:n,body:i}},"handleBinaryResponse"),Bh=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Le={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:i,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(ae(u))throw new Error("lastPoll doesn't exist in the store.");let p=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:u,server:s}),d=p.reduce((m,y)=>Math.max(m,y.epochMilliSeconds),u);return await t.put("lastPoll",d),p.filter(m=>m.epochMilliSeconds>u).map(m=>m.data)}case 1:{let u=await t.get("lastItem"),p=await e.items({store:t,auth:r,propsValue:n,lastItemId:u,files:i,server:s}),d=p.findIndex(v=>v.id===u),m=[];ae(u)||d==-1?m=p??[]:m=p?.slice(0,d)??[],ae(o)||(m=m.slice(-o));let y=m?.[0]?.id;return ae(y)||await t.put("lastItem",y),m.map(v=>v.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o,isRepublish:i}){switch(e.strategy){case 0:{if(i&&!ae(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!ae(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;ae(u)?await t.delete("lastItem"):await t.put("lastItem",u);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:o,server:i}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:i});break}case 1:{s=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:i});break}}return Vh(s.map(u=>u.data))}};function Vh(e){return e.length<=5?e:e.slice(0,5)}a(Vh,"getFirstFiveOrAll");var yr="login.microsoftonline.com",Tl="login.microsoftonline.us",bl="Mail.ReadWrite Mail.Send Calendars.Read offline_access User.Read openid email profile",Hh="https://graph.microsoft.com/.default",Zh="https://graph.microsoft.us/.default",El={[yr]:"https://graph.microsoft.com",[Tl]:"https://graph.microsoft.us"},Il=T.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:yr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:yr},{label:"US Government (GCC High)",value:Tl}]}}),Al=T.StaticDropdown({displayName:"Access Mode",description:"Pick the option matching your Grant Type. Use a Delegated option with the Authorization Code grant (acts as the signed-in user). Use an App-only option with the Client Credentials grant (acts as the application \u2014 also set Tenant ID and Mailbox), choosing the one that matches your Cloud Environment.",required:!0,defaultValue:bl,options:{disabled:!1,options:[{label:"Delegated \u2014 Commercial (Global)",value:bl},{label:"App-only \u2014 Commercial (Global)",value:Hh},{label:"App-only \u2014 US Government (GCC High)",value:Zh}]}});function Sl(e){return e??yr}a(Sl,"resolveCloudHost");function $l(e){return Sl(e.props?.cloud)}a($l,"getMicrosoftCloudFromAuth");function an(e){let t=Sl(e);return El[t]??El[yr]}a(an,"getGraphBaseUrl");var Hp=Re(Vp());function p_(e){let t=$l(e);return Hp.Client.initWithMiddleware({authProvider:{getAccessToken:a(()=>Promise.resolve(e.access_token),"getAccessToken")},baseUrl:an(t)})}a(p_,"createClient");function d_(e){let t=e.props?.mailbox?.trim();return t?`/users/${encodeURIComponent(t)}`:"/me"}a(d_,"mailboxPrefix");var $={createClient:p_,mailboxPrefix:d_};var m_=`
7
7
  This connection supports two access modes. Pick the matching **Grant Type** and **Access Mode** below.
8
8
 
9
9
  **Delegated (Authorization Code)** \u2014 acts as the signed-in user. Keep **Access Mode** on the Delegated option, leave **Mailbox** blank, and keep **Tenant ID** as \`common\`. If you use your own Azure app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application), set the **Redirect URI** to {{redirectUrl}} and add these **Microsoft Graph (Delegated) permissions**:
@@ -18,7 +18,7 @@ This connection supports two access modes. Pick the matching **Grant Type** and
18
18
  - Mail.Send
19
19
 
20
20
  For app-only, Microsoft grants tenant-wide mailbox access by default \u2014 scope it to specific mailboxes with an [ApplicationAccessPolicy](https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access).
21
- `,J=Bo.OAuth2({description:Hv,grantType:"both_client_credentials_and_authorization_code",props:{cloud:ll,accessMode:pl,tenant:E.ShortText({displayName:"Tenant ID",description:'Use "common" for the default delegated multi-tenant flow. For app-only (Client Credentials), set this to your Directory (tenant) ID.',required:!0,defaultValue:"common"}),mailbox:E.ShortText({displayName:"Mailbox (App-only)",description:"Email/UPN or user object ID of the mailbox to act on. Required for app-only (Client Credentials). Leave blank for delegated access (acts as the signed-in user).",required:!1})},authUrl:"https://{cloud}/{tenant}/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/{tenant}/oauth2/v2.0/token",required:!0,scope:["{accessMode}"],prompt:"omit",validate:a(async({auth:e})=>{try{let t=e;return await $.createClient(t).api(`${$.mailboxPrefix(t)}/mailFolders/inbox`).get(),{valid:!0}}catch(t){return{valid:!1,error:Zv(t)}}},"validate")});function Zv(e){if(typeof e=="object"&&e!==null){let t=[];if("statusCode"in e&&e.statusCode&&t.push(`HTTP ${String(e.statusCode)}`),"code"in e&&e.code&&t.push(String(e.code)),"message"in e&&e.message&&t.push(String(e.message)),"body"in e&&e.body){let r=e.body;t.push(typeof r=="string"?r.slice(0,800):JSON.stringify(r).slice(0,800))}if(t.length>0)return t.join(" | ")}return e instanceof Error&&e.message?e.message:"Unknown error while validating the connection."}a(Zv,"describeGraphError");var ot=a(e=>E.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"messageIdDropdown"),Op=a(e=>E.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders/drafts/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"draftMessageIdDropdown"),it=a(e=>E.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders`).get()).value.map(s=>({label:s.displayName||s.id||"Unknown",value:s.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),"mailFolderIdDropdown");var zp=ne({auth:J,name:"addLabelToEmail",displayName:"Add Label to Email",description:"Adds a category (label) to an email message.",audience:"both",aiMetadata:{description:"Adds one or more Outlook categories (labels) to a specific message, merging them with any categories already present. Use this to tag or classify an email. Idempotent: re-adding the same categories leaves the message unchanged since duplicates are de-duplicated.",idempotent:!0},props:{messageId:ot({displayName:"Email",description:"Select the email message to add the label to.",required:!0}),categories:E.Array({displayName:"Categories",description:"Categories to add to the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),i=(await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[],s=[...new Set([...i,...r])];return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var Rp=ne({auth:J,name:"createDraftEmail",displayName:"Create Draft Email",description:"Creates a draft email message.",audience:"both",aiMetadata:{description:"Creates a new unsent draft email in the Outlook mailbox with recipients, subject, body, and optional attachments. Use this to stage a message for later review or sending (pair with Send Draft Email). Not idempotent: each call creates a separate draft.",idempotent:!1},props:{recipients:E.Array({displayName:"To Email(s)",required:!0}),ccRecipients:E.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:E.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:E.ShortText({displayName:"Subject",required:!0}),bodyFormat:E.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:E.LongText({displayName:"Body",required:!0}),attachments:E.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:E.File({displayName:"File",required:!0}),fileName:E.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:i,body:s,bodyFormat:u}=e.propsValue,p={subject:i,body:{content:s,contentType:u},toRecipients:t.map(v=>({emailAddress:{address:v}})),ccRecipients:r.map(v=>({emailAddress:{address:v}})),bccRecipients:n.map(v=>({emailAddress:{address:v}})),attachments:o.map(v=>({"@odata.type":"#microsoft.graph.fileAttachment",name:v.fileName||v.file.filename,contentBytes:v.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages`).post(p)}});var kp=ne({auth:J,name:"downloadAttachment",displayName:"Download Attachment",description:"Download attachments from a specific email message.",audience:"both",aiMetadata:{description:"Fetches all file attachments from a specific Outlook message (by message ID) and writes them to storage for downstream steps. Use this after locating a message to retrieve its attached files. Requires a valid message ID; idempotent since it only reads.",idempotent:!0},props:{messageId:E.ShortText({displayName:"Message ID",description:"The ID of the email message containing the attachment.",required:!0})},async run(e){let{messageId:t}=e.propsValue,n=await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/attachments`).get(),o=[];for(let i of n.value)i.name&&i.contentBytes&&o.push({...i,file:await e.files.write({fileName:i.name||"test.png",data:Buffer.from(i.contentBytes,"base64")})});return o}});var ji=ze(br());var Dp=ne({auth:J,name:"findEmail",displayName:"Find Email",description:"Searches for emails using full-text search.",audience:"both",aiMetadata:{description:"Searches the Outlook mailbox for messages matching a full-text query (supports field syntax like from:, subject:, hasAttachments:), optionally scoped to one folder and capped by a max-results count. Use this to locate emails and obtain their message IDs for follow-up actions. Idempotent read-only lookup.",idempotent:!0},props:{searchQuery:E.ShortText({displayName:"Search Query",description:'Search terms to find emails (e.g., "from:john@example.com", "subject:urgent", "hasAttachments:true")',required:!0}),folderId:it({displayName:"Folder",description:"Search in a specific folder. Leave empty to search all folders.",required:!1}),top:E.Number({displayName:"Max Results",description:"Maximum number of results to return (1-1000).",required:!1,defaultValue:25})},async run(e){let{searchQuery:t,folderId:r,top:n}=e.propsValue,o=$.createClient(e.auth),i=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=`$search="${t}"`,u=n?`$top=${Math.min(Math.max(n,1),1e3)}`:"$top=25",p=["id","subject","from","toRecipients","receivedDateTime"].join(","),d=[s,u,p].filter(Boolean).join("&"),f=`${i}?${d}`,v={ConsistencyLevel:"eventual",Prefer:'outlook.body-content-type="text"'},y=await o.api(f).headers(v).get(),l=y.value,m=y["@odata.nextLink"];return t&&l.sort((_,h)=>(0,ji.default)(h.receivedDateTime).valueOf()-(0,ji.default)(_.receivedDateTime).valueOf()),{found:l.length>0,result:l,hasMore:!!m,nextPageUrl:m,totalCount:l.length}}});var Cp=ne({auth:J,name:"forwardEmail",displayName:"Forward Email",description:"Forwards an email message.",audience:"both",aiMetadata:{description:"Forwards an existing Outlook message (by message ID) to new recipients, preserving the original body and attachments and prepending an optional comment. Use this to pass an existing email along rather than composing a new one. Not idempotent: each call sends a new forwarded email.",idempotent:!1},props:{messageId:ot({displayName:"Email",description:"Select the email message to forward.",required:!0}),recipients:E.Array({displayName:"To Email(s)",required:!0}),comment:E.LongText({displayName:"Comment",description:"Optional comment to include with the forwarded message.",required:!1})},async run(e){let{messageId:t,comment:r}=e.propsValue,n=e.propsValue.recipients,o=$.createClient(e.auth),i=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get(),s={toRecipients:n.map(p=>({emailAddress:{address:p}})),body:{contentType:"html",content:(r??"")+"<br><br>"+i.body.content},attachments:i.attachments},u=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}/forward`).post({message:s});return{success:!0,message:"Email forwarded successfully.",messageId:u.id,...u}}});var Np=ne({auth:J,name:"moveEmailToFolder",displayName:"Move Email to Folder",description:"Moves an email message to a specific folder.",audience:"both",aiMetadata:{description:"Moves a specific Outlook message into a chosen mail folder. Use this to organize, archive, or route an email after processing it. Note: the move assigns a new message ID, so re-running with the original ID will fail once moved.",idempotent:!1},props:{messageId:ot({displayName:"Email",description:"Select the email message to move.",required:!0}),destinationFolderId:it({displayName:"Destination Folder",description:"The folder to move the email to.",required:!0})},async run(e){let{messageId:t,destinationFolderId:r}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/move`).post({destinationId:r})}});var Mp=ne({auth:J,name:"removeLabelFromEmail",displayName:"Remove Label from Email",description:"Removes a category (label) from an email message.",audience:"both",aiMetadata:{description:"Removes one or more Outlook categories (labels) from a specific message, leaving any other categories intact. Use this to untag or reclassify an email. Idempotent: re-running with the same categories yields the same final label set.",idempotent:!0},props:{messageId:ot({displayName:"Email",description:"Select the email message to remove the label from.",required:!0}),categories:E.Array({displayName:"Categories to Remove",description:"Categories to remove from the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),s=((await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[]).filter(p=>!r.includes(p));return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var Up=ne({auth:J,name:"reply-email",displayName:"Reply to Email",description:"Reply to an outlook email.",audience:"both",aiMetadata:{description:"Replies to an existing Outlook message (identified by message ID), supporting added CC/BCC recipients and attachments. Set the Create Draft flag to stage the reply without sending; otherwise it is sent immediately. Not idempotent when sending: each call creates and dispatches a new reply.",idempotent:!1},props:{messageId:E.Dropdown({auth:J,displayName:"Email",description:"Select the email message to reply to.",required:!0,refreshers:[],options:a(async({auth:e})=>{if(!e)return{disabled:!0,options:[]};let t=$.createClient(e);try{return{disabled:!1,options:(await t.api(`${$.mailboxPrefix(e)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(o=>({label:`${o.subject||"No Subject"} - ${o.from?.emailAddress?.name||o.from?.emailAddress?.address||"Unknown Sender"}`,value:o.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),bodyFormat:E.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),replyBody:E.LongText({displayName:"Reply Body",required:!0}),ccRecipients:E.Array({displayName:"CC Recipients",required:!1}),bccRecipients:E.Array({displayName:"BCC Recipients",required:!1}),attachments:E.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:E.File({displayName:"File",required:!0}),fileName:E.ShortText({displayName:"File Name",required:!1})}}),draft:E.Checkbox({displayName:"Create Draft",description:"If enabled, creates draft without sending.",required:!0,defaultValue:!1})},async run(e){let{replyBody:t,bodyFormat:r,messageId:n,draft:o}=e.propsValue,i=e.propsValue.ccRecipients,s=e.propsValue.bccRecipients,u=e.propsValue.attachments,p={body:{content:t,contentType:r},ccRecipients:i.map(f=>({emailAddress:{address:f}})),bccRecipients:s.map(f=>({emailAddress:{address:f}})),attachments:u.map(f=>({"@odata.type":"#microsoft.graph.fileAttachment",name:f.fileName||f.file.filename,contentBytes:f.file.base64}))},d=$.createClient(e.auth);try{let v=(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${n}/createReply`).post({message:p})).id;return o?{success:!0,message:"Draft created successfully.",draftId:v,draftLink:`https://outlook.office.com/mail/drafts/id/${v}`}:(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${v}/send`).post({}),{success:!0,message:"Reply sent successfully.",draftId:v})}catch(f){console.error("Reply Email Error:",f);let v=f instanceof Error?f.message:"Unknown error";throw new Error(v)}}});var Lp=ne({auth:J,name:"sendDraftEmail",displayName:"Send Draft Email",description:"Sends a draft email message.",audience:"both",aiMetadata:{description:"Sends an existing draft email (identified by draft message ID) from the Outlook mailbox. Use this to dispatch a draft previously staged by Create Draft Email or a draft reply. Not idempotent: once sent the draft no longer exists, so re-running with the same ID will fail.",idempotent:!1},props:{messageId:Op({displayName:"Draft Email",description:"Select the draft email message to send.",required:!0})},async run(e){let{messageId:t}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/send`).post({}),{success:!0,message:"Draft sent successfully.",messageId:t}}});var jp=ne({auth:J,name:"send-email",displayName:"Send Email",description:"Sends an email using Microsoft Outlook.",audience:"both",aiMetadata:{description:"Composes and sends a new email from the authenticated Outlook mailbox to the given recipients, with optional CC/BCC and file attachments. Use this to send a fresh message (not a reply or forward). Not idempotent: each call dispatches a new email and saves a copy to Sent Items.",idempotent:!1},props:{recipients:E.Array({displayName:"To Email(s)",required:!0}),ccRecipients:E.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:E.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:E.ShortText({displayName:"Subject",required:!0}),bodyFormat:E.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:E.LongText({displayName:"Body",required:!0}),attachments:E.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:E.File({displayName:"File",required:!0}),fileName:E.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:i,body:s,bodyFormat:u}=e.propsValue,p={subject:i,body:{content:s,contentType:u},toRecipients:t.map(v=>({emailAddress:{address:v}})),ccRecipients:r.map(v=>({emailAddress:{address:v}})),bccRecipients:n.map(v=>({emailAddress:{address:v}})),attachments:o.map(v=>({"@odata.type":"#microsoft.graph.fileAttachment",name:v.fileName||v.file.filename,contentBytes:v.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:p,saveToSentItems:"true"})}});var ro=ze(br());async function Fp(e,t,r,n,o,i){let s=[];for(let u of r){if(i&&u.sender?.emailAddress?.address&&!u.sender.emailAddress.address.toLowerCase().includes(i.toLowerCase()))continue;let p=await e.api(`${t}/messages/${u.id}/attachments`).get();for(let d of p.value){let{contentBytes:f,...v}=d;if(!(o&&d.name&&!d.name.toLowerCase().includes(o.toLowerCase()))&&d.name&&f){let y=await n.write({fileName:d.name,data:Buffer.from(f,"base64")});s.push({file:y,messageId:u.id,messageSubject:u.subject,messageSender:u.sender,messageReceivedDateTime:u.receivedDateTime,parentFolderId:u.parentFolderId,...v})}}}return s}a(Fp,"enrichAttachments");var Bp=St({auth:J,name:"newAttachment",displayName:"New Attachment",description:"Triggers when a new email containing one or more attachments arrives.",aiMetadata:{description:"Fires once per attachment when a new email carrying one or more file attachments arrives, optionally scoped to a folder, sender, or attachment-name filter. Each fire represents a single attachment from a newly received message."},props:{folderId:it({displayName:"Folder",description:"Monitor attachments in a specific folder. Leave empty to monitor all folders.",required:!1}),sender:E.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),attachmentNameFilter:E.ShortText({displayName:"Attachment Name Filter",description:"Filter attachments by name (contains). Leave empty to include all attachments.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await e.store.put("lastPoll",Date.now())},async onDisable(e){},async test(e){let{folderId:t,attachmentNameFilter:r,sender:n}=e.propsValue,o=$.createClient(e.auth),i=t?`${$.mailboxPrefix(e.auth)}/mailFolders/${t}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=await o.api(`${i}?$filter=hasAttachments eq true`).top(10).get();return(await Fp(o,$.mailboxPrefix(e.auth),s.value,e.files,r,n)).map(d=>({epochMilliSeconds:(0,ro.default)(d.messageReceivedDateTime).valueOf(),data:d})).map(d=>d.data)},async run(e){let t=await e.store.get("lastPoll");if(he(t))throw new Error("lastPoll doesn't exist in the store.");let{folderId:r,attachmentNameFilter:n,sender:o}=e.propsValue,i=$.createClient(e.auth),s=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,u=await i.api(`${s}?$filter=receivedDateTime gt ${(0,ro.default)(t).toISOString()} and hasAttachments eq true`).orderby("receivedDateTime desc").get(),p=[];for(;u.value.length>0&&(p.push(...u.value),u["@odata.nextLink"]);)u=await i.api(u["@odata.nextLink"]).get();let f=(await Fp(i,$.mailboxPrefix(e.auth),p,e.files,n,o)).map(y=>({epochMilliSeconds:(0,ro.default)(y.messageReceivedDateTime).valueOf(),data:y})),v=f.reduce((y,l)=>Math.max(y,l.epochMilliSeconds),t);return await e.store.put("lastPoll",v),f.filter(y=>y.epochMilliSeconds>t).map(y=>y.data)}});var Fi=ze(br());var no={strategy:0,items:a(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],i=r.folderId,s=t===0?"$top=10":`$filter=createdDateTime gt ${(0,Fi.default)(t).toISOString()}`,u=await n.api(`${$.mailboxPrefix(e)}/mailFolders/${i}/messages?${s}`).orderby("createdDateTime desc").get();if(t===0)for(let p of u.value)o.push(p);else for(;u.value.length>0;){for(let p of u.value)o.push(p);if(u["@odata.nextLink"])u=await n.api(u["@odata.nextLink"]).get();else break}return o.map(p=>({epochMilliSeconds:(0,Fi.default)(p.createdDateTime).valueOf(),data:p}))},"items")},Vp=St({auth:J,name:"newEmailInFolder",displayName:"New Email in Folder",description:"Triggers when a new email is delivered into the specified folder.",aiMetadata:{description:"Fires when a new message appears in the chosen Outlook mail folder. Each fire represents one new email added to that folder."},props:{folderId:it({displayName:"Folder",description:"",required:!0})},sampleData:{},type:"POLLING",async onEnable(e){await Ue.onEnable(no,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await Ue.onDisable(no,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await Ue.test(no,e)},async run(e){return await Ue.poll(no,e)}});var Bi=ze(br());var oo={strategy:0,items:a(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],i=t===0?"$top=10":`$filter=receivedDateTime gt ${(0,Bi.default)(t).toISOString()}`,s=await n.api(`${$.mailboxPrefix(e)}/mailFolders/inbox/messages?${i}`).orderby("receivedDateTime desc").get();if(t===0)for(let p of s.value)o.push(p);else for(;s.value.length>0;){for(let p of s.value)o.push(p);if(s["@odata.nextLink"])s=await n.api(s["@odata.nextLink"]).get();else break}let u=o;return r?.sender&&(u=u.filter(p=>{let d=p.from?.emailAddress?.address?.toLowerCase(),f=r.sender?.toLowerCase();return d===f})),r?.recipient&&(u=u.filter(p=>p.toRecipients?.some(f=>{let v=f.emailAddress?.address?.toLowerCase(),y=r.recipient?.toLowerCase();return v===y}))),u.map(p=>({epochMilliSeconds:(0,Bi.default)(p.receivedDateTime).valueOf(),data:p}))},"items")},Hp=St({auth:J,name:"newEmail",displayName:"New Email",description:"Triggers when a new email is received in the inbox.",aiMetadata:{description:"Fires when a new message arrives in the mailbox Inbox, optionally narrowed to a specific sender and/or recipient address. Each fire represents one newly received email."},props:{sender:E.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),recipient:E.ShortText({displayName:"To (Recipient Email)",description:"Filter emails to a specific recipient (optional). Leave empty to for all recipients.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await Ue.onEnable(oo,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await Ue.onDisable(oo,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await Ue.test(oo,e)},async run(e){return await Ue.poll(oo,e)}});var Zp=ne({auth:J,name:"request_approval_in_mail",displayName:"Request Approval in Email",description:"Send approval request email and then wait until the email is approved or disapproved",audience:"both",aiMetadata:{description:"Sends an email with a single link to a confirmation page where the recipient chooses Approve or Disapprove, then pauses the flow until they respond, resuming with the decision. Use this as a human-in-the-loop approval gate before proceeding. Not idempotent: each call sends a new email and creates a new pending waitpoint.",idempotent:!1},props:{recipients:E.ShortText({displayName:"To Email Address",description:"The email address of the recipient who will receive the approval request.",required:!0}),subject:E.ShortText({displayName:"Subject",description:"The subject of the approval request email.",required:!0}),body:E.LongText({displayName:"Body",description:"The main content of the email. You can include details about the approval request here in the html format or plain text.",required:!0})},async run(e){if(e.executionType==="BEGIN")try{let t=e.auth.access_token,r=e.propsValue.recipients,{subject:n,body:o}=e.propsValue;He(t,"token"),He(r,"recipients"),He(n,"subject"),He(o,"body");let i=await e.run.createWaitpoint({type:"WEBHOOK"}),s=`${i.resumeUrl}/confirm`,u=`
21
+ `,J=Zo.OAuth2({description:m_,grantType:"both_client_credentials_and_authorization_code",props:{cloud:Il,accessMode:Al,tenant:T.ShortText({displayName:"Tenant ID",description:'Use "common" for the default delegated multi-tenant flow. For app-only (Client Credentials), set this to your Directory (tenant) ID.',required:!0,defaultValue:"common"}),mailbox:T.ShortText({displayName:"Mailbox (App-only)",description:"Email/UPN or user object ID of the mailbox to act on. Required for app-only (Client Credentials). Leave blank for delegated access (acts as the signed-in user).",required:!1})},authUrl:"https://{cloud}/{tenant}/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/{tenant}/oauth2/v2.0/token",required:!0,scope:["{accessMode}"],prompt:"omit",validate:a(async({auth:e})=>{try{let t=e;return await $.createClient(t).api(`${$.mailboxPrefix(t)}/mailFolders/inbox`).get(),{valid:!0}}catch(t){return{valid:!1,error:f_(t)}}},"validate")});function f_(e){if(typeof e=="object"&&e!==null){let t=[];if("statusCode"in e&&e.statusCode&&t.push(`HTTP ${String(e.statusCode)}`),"code"in e&&e.code&&t.push(String(e.code)),"message"in e&&e.message&&t.push(String(e.message)),"body"in e&&e.body){let r=e.body;t.push(typeof r=="string"?r.slice(0,800):JSON.stringify(r).slice(0,800))}if(t.length>0)return t.join(" | ")}return e instanceof Error&&e.message?e.message:"Unknown error while validating the connection."}a(f_,"describeGraphError");var st=a(e=>T.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"messageIdDropdown"),Zp=a(e=>T.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders/drafts/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(s=>({label:`${s.subject||"No Subject"}`,value:s.id}))}}catch{return{disabled:!0,options:[]}}},"options")}),"draftMessageIdDropdown"),ut=a(e=>T.Dropdown({auth:J,displayName:e.displayName,description:e.description,required:e.required,refreshers:[],options:a(async({auth:t})=>{if(!t)return{placeholder:"Please connect your account first.",disabled:!0,options:[]};let r=t,n=$.createClient(r);try{return{disabled:!1,options:(await n.api(`${$.mailboxPrefix(r)}/mailFolders`).get()).value.map(s=>({label:s.displayName||s.id||"Unknown",value:s.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),"mailFolderIdDropdown");var qp=oe({auth:J,name:"addLabelToEmail",displayName:"Add Label to Email",description:"Adds a category (label) to an email message.",audience:"both",aiMetadata:{description:"Adds one or more Outlook categories (labels) to a specific message, merging them with any categories already present. Use this to tag or classify an email. Idempotent: re-adding the same categories leaves the message unchanged since duplicates are de-duplicated.",idempotent:!0},props:{messageId:st({displayName:"Email",description:"Select the email message to add the label to.",required:!0}),categories:T.Array({displayName:"Categories",description:"Categories to add to the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),i=(await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[],s=[...new Set([...i,...r])];return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var Gp=oe({auth:J,name:"createDraftEmail",displayName:"Create Draft Email",description:"Creates a draft email message.",audience:"both",aiMetadata:{description:"Creates a new unsent draft email in the Outlook mailbox with recipients, subject, body, and optional attachments. Use this to stage a message for later review or sending (pair with Send Draft Email). Not idempotent: each call creates a separate draft.",idempotent:!1},props:{recipients:T.Array({displayName:"To Email(s)",required:!0}),ccRecipients:T.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:T.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:T.ShortText({displayName:"Subject",required:!0}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:T.LongText({displayName:"Body",required:!0}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:i,body:s,bodyFormat:u}=e.propsValue,p={subject:i,body:{content:s,contentType:u},toRecipients:t.map(y=>({emailAddress:{address:y}})),ccRecipients:r.map(y=>({emailAddress:{address:y}})),bccRecipients:n.map(y=>({emailAddress:{address:y}})),attachments:o.map(y=>({"@odata.type":"#microsoft.graph.fileAttachment",name:y.fileName||y.file.filename,contentBytes:y.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages`).post(p)}});var Wp=oe({auth:J,name:"downloadAttachment",displayName:"Download Attachment",description:"Download attachments from a specific email message.",audience:"both",aiMetadata:{description:"Fetches all file attachments from a specific Outlook message (by message ID) and writes them to storage for downstream steps. Use this after locating a message to retrieve its attached files. Requires a valid message ID; idempotent since it only reads.",idempotent:!0},props:{messageId:T.ShortText({displayName:"Message ID",description:"The ID of the email message containing the attachment.",required:!0})},async run(e){let{messageId:t}=e.propsValue,n=await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/attachments`).get(),o=[];for(let i of n.value)i.name&&i.contentBytes&&o.push({...i,file:await e.files.write({fileName:i.name||"test.png",data:Buffer.from(i.contentBytes,"base64")})});return o}});var Vi=Re(Tr());var Kp=oe({auth:J,name:"findEmail",displayName:"Find Email",description:"Searches for emails using full-text search.",audience:"both",aiMetadata:{description:"Searches the Outlook mailbox for messages matching a full-text query (supports field syntax like from:, subject:, hasAttachments:), optionally scoped to one folder and capped by a max-results count. Use this to locate emails and obtain their message IDs for follow-up actions. Idempotent read-only lookup.",idempotent:!0},props:{searchQuery:T.ShortText({displayName:"Search Query",description:'Search terms to find emails (e.g., "from:john@example.com", "subject:urgent", "hasAttachments:true")',required:!0}),folderId:ut({displayName:"Folder",description:"Search in a specific folder. Leave empty to search all folders.",required:!1}),top:T.Number({displayName:"Max Results",description:"Maximum number of results to return (1-1000).",required:!1,defaultValue:25})},async run(e){let{searchQuery:t,folderId:r,top:n}=e.propsValue,o=$.createClient(e.auth),i=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=`$search="${t}"`,u=n?`$top=${Math.min(Math.max(n,1),1e3)}`:"$top=25",p=["id","subject","from","toRecipients","receivedDateTime"].join(","),d=[s,u,p].filter(Boolean).join("&"),m=`${i}?${d}`,y={ConsistencyLevel:"eventual",Prefer:'outlook.body-content-type="text"'},v=await o.api(m).headers(y).get(),l=v.value,f=v["@odata.nextLink"];return t&&l.sort((_,h)=>(0,Vi.default)(h.receivedDateTime).valueOf()-(0,Vi.default)(_.receivedDateTime).valueOf()),{found:l.length>0,result:l,hasMore:!!f,nextPageUrl:f,totalCount:l.length}}});var Jp=oe({auth:J,name:"forwardEmail",displayName:"Forward Email",description:"Forwards an email message.",audience:"both",aiMetadata:{description:"Forwards an existing Outlook message (by message ID) to new recipients, preserving the original body and attachments and prepending an optional comment. Use this to pass an existing email along rather than composing a new one. Not idempotent: each call sends a new forwarded email.",idempotent:!1},props:{messageId:st({displayName:"Email",description:"Select the email message to forward.",required:!0}),recipients:T.Array({displayName:"To Email(s)",required:!0}),comment:T.LongText({displayName:"Comment",description:"Optional comment to include with the forwarded message.",required:!1})},async run(e){let{messageId:t,comment:r}=e.propsValue,n=e.propsValue.recipients,o=$.createClient(e.auth),i=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get(),s={toRecipients:n.map(p=>({emailAddress:{address:p}})),body:{contentType:"html",content:(r??"")+"<br><br>"+i.body.content},attachments:i.attachments},u=await o.api(`${$.mailboxPrefix(e.auth)}/messages/${t}/forward`).post({message:s});return{success:!0,message:"Email forwarded successfully.",messageId:u.id,...u}}});var Xp=oe({auth:J,name:"moveEmailToFolder",displayName:"Move Email to Folder",description:"Moves an email message to a specific folder.",audience:"both",aiMetadata:{description:"Moves a specific Outlook message into a chosen mail folder. Use this to organize, archive, or route an email after processing it. Note: the move assigns a new message ID, so re-running with the original ID will fail once moved.",idempotent:!1},props:{messageId:st({displayName:"Email",description:"Select the email message to move.",required:!0}),destinationFolderId:ut({displayName:"Destination Folder",description:"The folder to move the email to.",required:!0})},async run(e){let{messageId:t,destinationFolderId:r}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/move`).post({destinationId:r})}});var Yp=oe({auth:J,name:"removeLabelFromEmail",displayName:"Remove Label from Email",description:"Removes a category (label) from an email message.",audience:"both",aiMetadata:{description:"Removes one or more Outlook categories (labels) from a specific message, leaving any other categories intact. Use this to untag or reclassify an email. Idempotent: re-running with the same categories yields the same final label set.",idempotent:!0},props:{messageId:st({displayName:"Email",description:"Select the email message to remove the label from.",required:!0}),categories:T.Array({displayName:"Categories to Remove",description:"Categories to remove from the email.",required:!0})},async run(e){let{messageId:t,categories:r}=e.propsValue,n=$.createClient(e.auth),s=((await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).get()).categories||[]).filter(p=>!r.includes(p));return await n.api(`${$.mailboxPrefix(e.auth)}/messages/${t}`).patch({categories:s})}});var Qp=oe({auth:J,name:"reply-email",displayName:"Reply to Email",description:"Reply to an outlook email.",audience:"both",aiMetadata:{description:"Replies to an existing Outlook message (identified by message ID), supporting added CC/BCC recipients and attachments. Set the Create Draft flag to stage the reply without sending; otherwise it is sent immediately. Not idempotent when sending: each call creates and dispatches a new reply.",idempotent:!1},props:{messageId:T.Dropdown({auth:J,displayName:"Email",description:"Select the email message to reply to.",required:!0,refreshers:[],options:a(async({auth:e})=>{if(!e)return{disabled:!0,options:[]};let t=$.createClient(e);try{return{disabled:!1,options:(await t.api(`${$.mailboxPrefix(e)}/messages?$top=50&$select=id,subject,from,receivedDateTime`).orderby("receivedDateTime desc").get()).value.map(o=>({label:`${o.subject||"No Subject"} - ${o.from?.emailAddress?.name||o.from?.emailAddress?.address||"Unknown Sender"}`,value:o.id||""}))}}catch{return{disabled:!0,options:[]}}},"options")}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),replyBody:T.LongText({displayName:"Reply Body",required:!0}),ccRecipients:T.Array({displayName:"CC Recipients",required:!1}),bccRecipients:T.Array({displayName:"BCC Recipients",required:!1}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}}),draft:T.Checkbox({displayName:"Create Draft",description:"If enabled, creates draft without sending.",required:!0,defaultValue:!1})},async run(e){let{replyBody:t,bodyFormat:r,messageId:n,draft:o}=e.propsValue,i=e.propsValue.ccRecipients,s=e.propsValue.bccRecipients,u=e.propsValue.attachments,p={body:{content:t,contentType:r},ccRecipients:i.map(m=>({emailAddress:{address:m}})),bccRecipients:s.map(m=>({emailAddress:{address:m}})),attachments:u.map(m=>({"@odata.type":"#microsoft.graph.fileAttachment",name:m.fileName||m.file.filename,contentBytes:m.file.base64}))},d=$.createClient(e.auth);try{let y=(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${n}/createReply`).post({message:p})).id;return o?{success:!0,message:"Draft created successfully.",draftId:y,draftLink:`https://outlook.office.com/mail/drafts/id/${y}`}:(await d.api(`${$.mailboxPrefix(e.auth)}/messages/${y}/send`).post({}),{success:!0,message:"Reply sent successfully.",draftId:y})}catch(m){console.error("Reply Email Error:",m);let y=m instanceof Error?m.message:"Unknown error";throw new Error(y)}}});var ed=oe({auth:J,name:"sendDraftEmail",displayName:"Send Draft Email",description:"Sends a draft email message.",audience:"both",aiMetadata:{description:"Sends an existing draft email (identified by draft message ID) from the Outlook mailbox. Use this to dispatch a draft previously staged by Create Draft Email or a draft reply. Not idempotent: once sent the draft no longer exists, so re-running with the same ID will fail.",idempotent:!1},props:{messageId:Zp({displayName:"Draft Email",description:"Select the draft email message to send.",required:!0})},async run(e){let{messageId:t}=e.propsValue;return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/messages/${t}/send`).post({}),{success:!0,message:"Draft sent successfully.",messageId:t}}});var td=oe({auth:J,name:"send-email",displayName:"Send Email",description:"Sends an email using Microsoft Outlook.",audience:"both",aiMetadata:{description:"Composes and sends a new email from the authenticated Outlook mailbox to the given recipients, with optional CC/BCC and file attachments. Use this to send a fresh message (not a reply or forward). Not idempotent: each call dispatches a new email and saves a copy to Sent Items.",idempotent:!1},props:{recipients:T.Array({displayName:"To Email(s)",required:!0}),ccRecipients:T.Array({displayName:"CC Email(s)",required:!1,defaultValue:[]}),bccRecipients:T.Array({displayName:"BCC Email(s)",required:!1,defaultValue:[]}),subject:T.ShortText({displayName:"Subject",required:!0}),bodyFormat:T.StaticDropdown({displayName:"Body Format",required:!0,defaultValue:"text",options:{disabled:!1,options:[{label:"HTML",value:"html"},{label:"Text",value:"text"}]}}),body:T.LongText({displayName:"Body",required:!0}),attachments:T.Array({displayName:"Attachments",required:!1,defaultValue:[],properties:{file:T.File({displayName:"File",required:!0}),fileName:T.ShortText({displayName:"File Name",required:!1})}})},async run(e){let t=e.propsValue.recipients,r=e.propsValue.ccRecipients,n=e.propsValue.bccRecipients,o=e.propsValue.attachments,{subject:i,body:s,bodyFormat:u}=e.propsValue,p={subject:i,body:{content:s,contentType:u},toRecipients:t.map(y=>({emailAddress:{address:y}})),ccRecipients:r.map(y=>({emailAddress:{address:y}})),bccRecipients:n.map(y=>({emailAddress:{address:y}})),attachments:o.map(y=>({"@odata.type":"#microsoft.graph.fileAttachment",name:y.fileName||y.file.filename,contentBytes:y.file.base64}))};return await $.createClient(e.auth).api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:p,saveToSentItems:"true"})}});var io=Re(Tr());async function rd(e,t,r,n,o,i){let s=[];for(let u of r){if(i&&u.sender?.emailAddress?.address&&!u.sender.emailAddress.address.toLowerCase().includes(i.toLowerCase()))continue;let p=await e.api(`${t}/messages/${u.id}/attachments`).get();for(let d of p.value){let{contentBytes:m,...y}=d;if(!(o&&d.name&&!d.name.toLowerCase().includes(o.toLowerCase()))&&d.name&&m){let v=await n.write({fileName:d.name,data:Buffer.from(m,"base64")});s.push({file:v,messageId:u.id,messageSubject:u.subject,messageSender:u.sender,messageReceivedDateTime:u.receivedDateTime,parentFolderId:u.parentFolderId,...y})}}}return s}a(rd,"enrichAttachments");var nd=$t({auth:J,name:"newAttachment",displayName:"New Attachment",description:"Triggers when a new email containing one or more attachments arrives.",aiMetadata:{description:"Fires once per attachment when a new email carrying one or more file attachments arrives, optionally scoped to a folder, sender, or attachment-name filter. Each fire represents a single attachment from a newly received message."},props:{folderId:ut({displayName:"Folder",description:"Monitor attachments in a specific folder. Leave empty to monitor all folders.",required:!1}),sender:T.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),attachmentNameFilter:T.ShortText({displayName:"Attachment Name Filter",description:"Filter attachments by name (contains). Leave empty to include all attachments.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await e.store.put("lastPoll",Date.now())},async onDisable(e){},async test(e){let{folderId:t,attachmentNameFilter:r,sender:n}=e.propsValue,o=$.createClient(e.auth),i=t?`${$.mailboxPrefix(e.auth)}/mailFolders/${t}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,s=await o.api(`${i}?$filter=hasAttachments eq true`).top(10).get();return(await rd(o,$.mailboxPrefix(e.auth),s.value,e.files,r,n)).map(d=>({epochMilliSeconds:(0,io.default)(d.messageReceivedDateTime).valueOf(),data:d})).map(d=>d.data)},async run(e){let t=await e.store.get("lastPoll");if(ae(t))throw new Error("lastPoll doesn't exist in the store.");let{folderId:r,attachmentNameFilter:n,sender:o}=e.propsValue,i=$.createClient(e.auth),s=r?`${$.mailboxPrefix(e.auth)}/mailFolders/${r}/messages`:`${$.mailboxPrefix(e.auth)}/messages`,u=await i.api(`${s}?$filter=receivedDateTime gt ${(0,io.default)(t).toISOString()} and hasAttachments eq true`).orderby("receivedDateTime desc").get(),p=[];for(;u.value.length>0&&(p.push(...u.value),u["@odata.nextLink"]);)u=await i.api(u["@odata.nextLink"]).get();let m=(await rd(i,$.mailboxPrefix(e.auth),p,e.files,n,o)).map(v=>({epochMilliSeconds:(0,io.default)(v.messageReceivedDateTime).valueOf(),data:v})),y=m.reduce((v,l)=>Math.max(v,l.epochMilliSeconds),t);return await e.store.put("lastPoll",y),m.filter(v=>v.epochMilliSeconds>t).map(v=>v.data)}});var Hi=Re(Tr());var ao={strategy:0,items:a(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],i=r.folderId,s=t===0?"$top=10":`$filter=createdDateTime gt ${(0,Hi.default)(t).toISOString()}`,u=await n.api(`${$.mailboxPrefix(e)}/mailFolders/${i}/messages?${s}`).orderby("createdDateTime desc").get();if(t===0)for(let p of u.value)o.push(p);else for(;u.value.length>0;){for(let p of u.value)o.push(p);if(u["@odata.nextLink"])u=await n.api(u["@odata.nextLink"]).get();else break}return o.map(p=>({epochMilliSeconds:(0,Hi.default)(p.createdDateTime).valueOf(),data:p}))},"items")},od=$t({auth:J,name:"newEmailInFolder",displayName:"New Email in Folder",description:"Triggers when a new email is delivered into the specified folder.",aiMetadata:{description:"Fires when a new message appears in the chosen Outlook mail folder. Each fire represents one new email added to that folder."},props:{folderId:ut({displayName:"Folder",description:"",required:!0})},sampleData:{},type:"POLLING",async onEnable(e){await Le.onEnable(ao,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await Le.onDisable(ao,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await Le.test(ao,e)},async run(e){return await Le.poll(ao,e)}});var Zi=Re(Tr());var so={strategy:0,items:a(async({auth:e,lastFetchEpochMS:t,propsValue:r})=>{let n=$.createClient(e),o=[],i=t===0?"$top=10":`$filter=receivedDateTime gt ${(0,Zi.default)(t).toISOString()}`,s=await n.api(`${$.mailboxPrefix(e)}/mailFolders/inbox/messages?${i}`).orderby("receivedDateTime desc").get();if(t===0)for(let p of s.value)o.push(p);else for(;s.value.length>0;){for(let p of s.value)o.push(p);if(s["@odata.nextLink"])s=await n.api(s["@odata.nextLink"]).get();else break}let u=o;return r?.sender&&(u=u.filter(p=>{let d=p.from?.emailAddress?.address?.toLowerCase(),m=r.sender?.toLowerCase();return d===m})),r?.recipient&&(u=u.filter(p=>p.toRecipients?.some(m=>{let y=m.emailAddress?.address?.toLowerCase(),v=r.recipient?.toLowerCase();return y===v}))),u.map(p=>({epochMilliSeconds:(0,Zi.default)(p.receivedDateTime).valueOf(),data:p}))},"items")},id=$t({auth:J,name:"newEmail",displayName:"New Email",description:"Triggers when a new email is received in the inbox.",aiMetadata:{description:"Fires when a new message arrives in the mailbox Inbox, optionally narrowed to a specific sender and/or recipient address. Each fire represents one newly received email."},props:{sender:T.ShortText({displayName:"From (Sender Email)",description:"Filter emails from a specific sender (optional). Leave empty to for all senders.",required:!1}),recipient:T.ShortText({displayName:"To (Recipient Email)",description:"Filter emails to a specific recipient (optional). Leave empty to for all recipients.",required:!1})},sampleData:{},type:"POLLING",async onEnable(e){await Le.onEnable(so,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await Le.onDisable(so,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async test(e){return await Le.test(so,e)},async run(e){return await Le.poll(so,e)}});var ad=oe({auth:J,name:"request_approval_in_mail",displayName:"Request Approval in Email",description:"Send approval request email and then wait until the email is approved or disapproved",audience:"both",aiMetadata:{description:"Sends an email with a single link to a confirmation page where the recipient chooses Approve or Disapprove, then pauses the flow until they respond, resuming with the decision. Use this as a human-in-the-loop approval gate before proceeding. Not idempotent: each call sends a new email and creates a new pending waitpoint.",idempotent:!1},props:{recipients:T.ShortText({displayName:"To Email Address",description:"The email address of the recipient who will receive the approval request.",required:!0}),subject:T.ShortText({displayName:"Subject",description:"The subject of the approval request email.",required:!0}),body:T.LongText({displayName:"Body",description:"The main content of the email. You can include details about the approval request here in the html format or plain text.",required:!0})},async run(e){if(e.executionType==="BEGIN")try{let t=e.auth.access_token,r=e.propsValue.recipients,{subject:n,body:o}=e.propsValue;Ze(t,"token"),Ze(r,"recipients"),Ze(n,"subject"),Ze(o,"body");let i=await e.run.createWaitpoint({type:"WEBHOOK"}),s=`${i.resumeUrl}/confirm`,u=`
22
22
  <div>
23
23
  <p>${o}</p>
24
24
  <br />
@@ -26,7 +26,7 @@ For app-only, Microsoft grants tenant-wide mailbox access by default \u2014 scop
26
26
  <a href="${s}" style="display: inline-block; padding: 10px 20px; background-color: #6e41e2; color: white; text-decoration: none; border-radius: 4px;">Review &amp; Respond</a>
27
27
  </p>
28
28
  </div>
29
- `,p=$.createClient(e.auth),d={subject:n,body:{content:u,contentType:"html"},toRecipients:[{emailAddress:{address:r}}]},f=await p.api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:d,saveToSentItems:!0});return e.run.waitForWaitpoint(i.id),{approved:!1}}catch(t){throw console.error("[RequestApprovalEmail] Error during BEGIN execution:",t),t}else return{approved:e.resumePayload.queryParams.action==="approve"}}});var Gv=Zs({displayName:"Microsoft Outlook",auth:J,minimumSupportedRelease:"0.87.0",logoUrl:"https://cdn.activepieces.com/pieces/microsoft-outlook.png",categories:["PRODUCTIVITY"],authors:["lucaslimasouza","kishanprmr","sanket-a11y"],actions:[jp,kp,Up,Rp,zp,Mp,Zp,Np,Lp,Cp,Dp,al({auth:J,baseUrl:a(e=>{let t=e.props?.cloud;return rn(t)+"/v1.0/"},"baseUrl"),authMapping:a(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[Hp,Vp,Bp]});0&&(module.exports={microsoftOutlook});
29
+ `,p=$.createClient(e.auth),d={subject:n,body:{content:u,contentType:"html"},toRecipients:[{emailAddress:{address:r}}]},m=await p.api(`${$.mailboxPrefix(e.auth)}/sendMail`).post({message:d,saveToSentItems:!0});return e.run.waitForWaitpoint(i.id),{approved:!1}}catch(t){throw console.error("[RequestApprovalEmail] Error during BEGIN execution:",t),t}else return{approved:e.resumePayload.queryParams.action==="approve"}}});var h_=ou({displayName:"Microsoft Outlook",auth:J,minimumSupportedRelease:"0.87.0",logoUrl:"https://cdn.activepieces.com/pieces/microsoft-outlook.png",categories:["PRODUCTIVITY"],authors:["lucaslimasouza","kishanprmr","sanket-a11y"],actions:[td,Wp,Qp,Gp,qp,Yp,ad,Xp,ed,Jp,Kp,xl({auth:J,baseUrl:a(e=>{let t=e.props?.cloud;return an(t)+"/v1.0/"},"baseUrl"),authMapping:a(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[id,od,nd]});0&&(module.exports={microsoftOutlook});
30
30
  /*! Bundled license information:
31
31
 
32
32
  mime-types/index.js: