@activepieces/piece-microsoft-365-planner 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -4
- package/src/index.js +5 -5
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-microsoft-365-planner",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"@microsoft/microsoft-graph-types": "2.40.0"
|
|
8
|
-
},
|
|
6
|
+
"dependencies": {},
|
|
9
7
|
"files": [
|
|
10
8
|
"src/index.js",
|
|
11
9
|
"package.json",
|
package/src/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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 i=(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),uo=(e,t)=>{for(var r in t)Zt(e,r,{get:t[r],enumerable:!0})},Bi=(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 Ne=(e,t,r)=>(r=e!=null?qp(Kp(e)):{},Bi(t||!e||!e.__esModule?Zt(r,"default",{value:e,enumerable:!0}):r,e)),oe=e=>Bi(Zt({},"__esModule",{value:!0}),e);var is=b((os,Br)=>{(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"),a="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`,"i")};function p(l,f){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let y=0,h=-1,_=(l.match(u.zoneIndex)||[])[0],T,V;for(_&&(_=_.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)y++;if(l.substr(0,2)==="::"&&y--,l.substr(-2,2)==="::"&&y--,y>f)return null;for(V=f-y,T=":";V--;)T+="0:";return l=l.replace("::",T),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),f=function(){let fe=l.split(":"),xe=[];for(let Ce=0;Ce<fe.length;Ce++)xe.push(parseInt(fe[Ce],16));return xe}(),{parts:f,zoneId:_}}i(p,"expandIPv6");function d(l,f,y,h){if(l.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let _=0,T;for(;h>0;){if(T=y-h,T<0&&(T=0),l[_]>>T!==f[_]>>T)return!1;h-=y,_+=1}return!0}i(d,"matchCIDR");function g(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)}i(g,"parseIntAuto");function x(l,f){for(;l.length<f;)l=`0${l}`;return l}i(x,"padPart");let v={};v.IPv4=function(){function l(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,h;for(y=0;y<f.length;y++)if(h=f[y],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return i(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,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,f.octets,8,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},_,T,V;for(_=3;_>=0;_-=1)if(T=this.octets[_],T in h){if(V=h[T],y&&V!==0)return null;V!==8&&(y=!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),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],T=0;for(;T<4;)_.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(_)}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,y,h,_,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],y=0;y<4;)_.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(_)}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 y=parseInt(f[2]);if(y>=0&&y<=32){let h=[this.parse(f[1]),y];return Object.defineProperty(h,"toString",{value:i(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,y,h;if(f=l.match(r.fourOctet))return function(){let _=f.slice(1,6),T=[];for(let V=0;V<_.length;V++)y=_[V],T.push(g(y));return T}();if(f=l.match(r.longValue)){if(h=g(f[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return function(){let _=[],T;for(T=0;T<=24;T+=8)_.push(h>>T&255);return _}().reverse()}else return(f=l.match(r.twoOctet))?function(){let _=f.slice(1,4),T=[];if(h=g(_[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(_[0])),T.push(h>>16&255),T.push(h>>8&255),T.push(h&255),T}():(f=l.match(r.threeOctet))?function(){let _=f.slice(1,5),T=[];if(h=g(_[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(_[0])),T.push(g(_[1])),T.push(h>>8&255),T.push(h&255),T}():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],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;return h<4&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.IPv6=function(){function l(f,y){let h,_;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(_=this.parts[h],!(0<=_&&_<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return i(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,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,f.parts,16,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!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},_,T;for(let V=7;V>=0;V-=1)if(_=this.parts[V],_ in h){if(T=h[_],y&&T!==0)return null;T!==16&&(y=!0),f+=T}else return null;return 128-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let f,y=[],h=this.parts;for(let _=0;_<h.length;_++)f=h[_],y.push(f>>8),y.push(f&255);return y},l.prototype.toFixedLengthString=function(){let f=function(){let h=[];for(let _=0;_<this.parts.length;_++)h.push(x(this.parts[_].toString(16),4));return h}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},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),y=f[0],h=f[1];return new v.IPv4([y>>8,y&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let f=function(){let h=[];for(let _=0;_<this.parts.length;_++)h.push(this.parts[_].toString(16));return h}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},l.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),h=0,_=-1,T;for(;T=f.exec(y);)T[0].length>_&&(h=T.index,_=T[0].length);return _<0?y:`${y.substring(0,h)}::${y.substring(h+_)}`},l.prototype.toString=function(){return this.toRFC5952String()},l}(),v.IPv6.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],T=0;for(;T<16;)_.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(_)}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,y,h,_,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],y=0;y<16;)_.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(_)}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,y,h;if((y=l.match(/^(.+)\/(\d+)$/))&&(f=parseInt(y[2]),f>=0&&f<=128))return h=[this.parse(y[1]),f],Object.defineProperty(h,"toString",{value:i(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,y,h,_,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]||"",f=h[1],h[1].endsWith("::")||(f=f.slice(0,-1)),f=p(f+V,6),f.parts)){for(T=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],y=0;y<T.length;y++)if(_=T[y],!(0<=_&&_<=255))return null;return f.parts.push(T[0]<<8|T[1]),f.parts.push(T[2]<<8|T[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],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;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,y){let h,_,T,V;y==null&&(y="unicast");for(_ in f)if(Object.prototype.hasOwnProperty.call(f,_)){for(T=f[_],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 _}return y},typeof Br<"u"&&Br.exports?Br.exports=v:e.ipaddr=v})(os)});var ae={};uo(ae,{__addDisposableResource:()=>Iu,__assign:()=>Hr,__asyncDelegator:()=>yu,__asyncGenerator:()=>hu,__asyncValues:()=>vu,__await:()=>$t,__awaiter:()=>lu,__classPrivateFieldGet:()=>bu,__classPrivateFieldIn:()=>Eu,__classPrivateFieldSet:()=>Tu,__createBinding:()=>qr,__decorate:()=>nu,__disposeResources:()=>Su,__esDecorate:()=>iu,__exportStar:()=>du,__extends:()=>tu,__generator:()=>pu,__importDefault:()=>xu,__importStar:()=>Pu,__makeTemplateObject:()=>_u,__metadata:()=>cu,__param:()=>ou,__propKey:()=>su,__read:()=>Ko,__rest:()=>ru,__rewriteRelativeImportExtension:()=>Au,__runInitializers:()=>au,__setFunctionName:()=>uu,__spread:()=>fu,__spreadArray:()=>gu,__spreadArrays:()=>mu,__values:()=>Zr,default:()=>Tm});function tu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Go(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function ru(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 nu(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function ou(e,t){return function(r,n){t(r,n,e)}}function iu(e,t,r,n,o,a){function s(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}i(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,g=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),x,v=!1,l=r.length-1;l>=0;l--){var f={};for(var y in n)f[y]=y==="access"?{}:n[y];for(var y in n.access)f.access[y]=n.access[y];f.addInitializer=function(_){if(v)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(_||null))};var h=(0,r[l])(u==="accessor"?{get:g.get,set:g.set}:g[p],f);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(x=s(h.get))&&(g.get=x),(x=s(h.set))&&(g.set=x),(x=s(h.init))&&o.unshift(x)}else(x=s(h))&&(u==="field"?o.unshift(x):g[p]=x)}d&&Object.defineProperty(d,n.name,g),v=!0}function au(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 su(e){return typeof e=="symbol"?e:"".concat(e)}function uu(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 cu(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function lu(e,t,r,n){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,s){function u(g){try{d(n.next(g))}catch(x){s(x)}}i(u,"fulfilled");function p(g){try{d(n.throw(g))}catch(x){s(x)}}i(p,"rejected");function d(g){g.done?a(g.value):o(g.value).then(u,p)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function pu(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,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(g){return p([d,g])}}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&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=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(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(g){d=[6,g],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function du(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&qr(t,e,r)}function Zr(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:i(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 Ko(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.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 a}function fu(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ko(arguments[t]));return e}function mu(){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 a=arguments[t],s=0,u=a.length;s<u;s++,o++)n[o]=a[s];return n}function gu(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function $t(e){return this instanceof $t?(this.v=e,this):new $t(e)}function hu(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];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,x)}}function u(l,f){n[l]&&(o[l]=function(y){return new Promise(function(h,_){a.push([l,y,h,_])>1||p(l,y)})},f&&(o[l]=f(o[l])))}function p(l,f){try{d(n[l](f))}catch(y){v(a[0][3],y)}}function d(l){l.value instanceof $t?Promise.resolve(l.value.v).then(g,x):v(a[0][2],l)}function g(l){p("next",l)}function x(l){p("throw",l)}function v(l,f){l(f),a.shift(),a.length&&p(a[0][0],a[0][1])}}function yu(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,a){t[o]=e[o]?function(s){return(r=!r)?{value:$t(e[o](s)),done:!1}:a?a(s):s}:a}}function vu(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 Zr=="function"?Zr(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(u,p){s=e[a](s),o(u,p,s.done,s.value)})}}function o(a,s,u,p){Promise.resolve(p).then(function(d){a({value:d,done:u})},s)}}function _u(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Pu(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Wo(e),n=0;n<r.length;n++)r[n]!=="default"&&qr(t,e,r[n]);return xm(t,e),t}function xu(e){return e&&e.__esModule?e:{default:e}}function bu(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 Tu(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 Eu(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 Iu(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=i(function(){try{o.call(this)}catch(a){return Promise.reject(a)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Su(e){function t(a){e.error=e.hasError?new bm(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}i(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 a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).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 i(o,"next"),o()}function Au(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,a,s){return n?t?".jsx":".js":o&&(!a||!s)?r:o+a+"."+s.toLowerCase()+"js"}):e}var Go,Hr,qr,xm,Wo,bm,Tm,se=Xp(()=>{Go=i(function(e,t){return Go=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])},Go(e,t)},"extendStatics");i(tu,"__extends");Hr=i(function(){return Hr=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),Hr.apply(this,arguments)},"__assign");i(ru,"__rest");i(nu,"__decorate");i(ou,"__param");i(iu,"__esDecorate");i(au,"__runInitializers");i(su,"__propKey");i(uu,"__setFunctionName");i(cu,"__metadata");i(lu,"__awaiter");i(pu,"__generator");qr=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:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};i(du,"__exportStar");i(Zr,"__values");i(Ko,"__read");i(fu,"__spread");i(mu,"__spreadArrays");i(gu,"__spreadArray");i($t,"__await");i(hu,"__asyncGenerator");i(yu,"__asyncDelegator");i(vu,"__asyncValues");i(_u,"__makeTemplateObject");xm=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Wo=i(function(e){return Wo=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Wo(e)},"ownKeys");i(Pu,"__importStar");i(xu,"__importDefault");i(bu,"__classPrivateFieldGet");i(Tu,"__classPrivateFieldSet");i(Eu,"__classPrivateFieldIn");i(Iu,"__addDisposableResource");bm=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(Su,"__disposeResources");i(Au,"__rewriteRelativeImportExtension");Tm={__extends:tu,__assign:Hr,__rest:ru,__decorate:nu,__param:ou,__esDecorate:iu,__runInitializers:au,__propKey:su,__setFunctionName:uu,__metadata:cu,__awaiter:lu,__generator:pu,__createBinding:qr,__exportStar:du,__values:Zr,__read:Ko,__spread:fu,__spreadArrays:mu,__spreadArray:gu,__await:$t,__asyncGenerator:hu,__asyncDelegator:yu,__asyncValues:vu,__makeTemplateObject:_u,__importStar:Pu,__importDefault:xu,__classPrivateFieldGet:bu,__classPrivateFieldSet:Tu,__classPrivateFieldIn:Eu,__addDisposableResource:Iu,__disposeResources:Su,__rewriteRelativeImportExtension:Au}});var mr=b(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.RequestMethod=void 0;var $u;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})($u||(Gr.RequestMethod=$u={}))});var wu=b(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.BatchRequestContent=void 0;var wt=(se(),oe(ae)),Jo=mr(),Em=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,a=t;o<a.length;o++){var s=a[o];this.addRequest(s)}}}return i(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=i(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=i(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 g=p;for(p=u.next();!p.done;){var x=p.value[1];if(x.dependsOn===void 0||x.dependsOn.length!==1||x.dependsOn[0]!==g.value[1].id)return!1;g=p,p=u.next()}return!0},"isSerial"),o=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1],g;if(d.dependsOn===void 0||d.dependsOn.length===0)g=d.id;else if(d.dependsOn.length===1){var x=d.dependsOn[0];if(x!==d.id&&s.has(x))g=x;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)&&g!==v.id||v.dependsOn!==void 0&&v.dependsOn.length!==0&&(v.dependsOn.length===1&&(v.id===g||v.dependsOn[0]!==g)||v.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var a=new Error("Empty requests map, Please provide at least one request.");throw a.name="Empty Requests Error",a}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return wt.__awaiter(this,void 0,void 0,function(){var r,n,o,a;return wt.__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===Jo.RequestMethod.PATCH||t.method===Jo.RequestMethod.POST||t.method===Jo.RequestMethod.PUT?(a=r,[4,e.getRequestBody(t)]):[3,2];case 1:a.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return wt.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p,d;return wt.__generator(this,function(g){switch(g.label){case 0:r=!1,g.label=1;case 1:return g.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=g.sent(),r=!0,[3,4];case 3:return a=g.sent(),[3,4];case 4:if(r)return[3,12];g.label=5;case 5:return g.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=g.sent(),u=new FileReader,[4,new Promise(function(x){u.addEventListener("load",function(){var v=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),f=l.exec(v);x(f[4])},!1),u.readAsDataURL(s)})];case 7:return n=g.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=g.sent(),n=p.toString("base64"),g.label=10;case 10:return r=!0,[3,12];case 11:return d=g.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 a=o.value[1].dependsOn;if(typeof a<"u"){var s=a.indexOf(t);s!==-1&&a.splice(s,1),a.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return wt.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,a,s,u;return wt.__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 i=(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}},po=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},Zi=(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 Ne=(e,t,r)=>(r=e!=null?sd(ld(e)):{},Zi(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e)),ie=e=>Zi(qt({},"__esModule",{value:!0}),e);var ms=b((fs,qr)=>{(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"),a="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`,"i")};function p(l,f){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let y=0,h=-1,P=(l.match(u.zoneIndex)||[])[0],T,H;for(P&&(P=P.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)y++;if(l.substr(0,2)==="::"&&y--,l.substr(-2,2)==="::"&&y--,y>f)return null;for(H=f-y,T=":";H--;)T+="0:";return l=l.replace("::",T),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),f=(function(){let fe=l.split(":"),xe=[];for(let Ce=0;Ce<fe.length;Ce++)xe.push(parseInt(fe[Ce],16));return xe})(),{parts:f,zoneId:P}}i(p,"expandIPv6");function d(l,f,y,h){if(l.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let P=0,T;for(;h>0;){if(T=y-h,T<0&&(T=0),l[P]>>T!==f[P]>>T)return!1;h-=y,P+=1}return!0}i(d,"matchCIDR");function g(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)}i(g,"parseIntAuto");function x(l,f){for(;l.length<f;)l=`0${l}`;return l}i(x,"padPart");let v={};v.IPv4=(function(){function l(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,h;for(y=0;y<f.length;y++)if(h=f[y],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return i(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,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,f.octets,8,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},P,T,H;for(P=3;P>=0;P-=1)if(T=this.octets[P],T in h){if(H=h[T],y&&H!==0)return null;H!==8&&(y=!0),f+=H}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),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),P=[],T=0;for(;T<4;)P.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(P)}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,y,h,P,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),P=[],y=0;y<4;)P.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(P)}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 y=parseInt(f[2]);if(y>=0&&y<=32){let h=[this.parse(f[1]),y];return Object.defineProperty(h,"toString",{value:i(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,y,h;if(f=l.match(r.fourOctet))return(function(){let P=f.slice(1,6),T=[];for(let H=0;H<P.length;H++)y=P[H],T.push(g(y));return T})();if(f=l.match(r.longValue)){if(h=g(f[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return(function(){let P=[],T;for(T=0;T<=24;T+=8)P.push(h>>T&255);return P})().reverse()}else return(f=l.match(r.twoOctet))?(function(){let P=f.slice(1,4),T=[];if(h=g(P[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(P[0])),T.push(h>>16&255),T.push(h>>8&255),T.push(h&255),T})():(f=l.match(r.threeOctet))?(function(){let P=f.slice(1,5),T=[];if(h=g(P[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(P[0])),T.push(g(P[1])),T.push(h>>8&255),T.push(h&255),T})():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],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;return h<4&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.IPv6=(function(){function l(f,y){let h,P;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(P=this.parts[h],!(0<=P&&P<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return i(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,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,f.parts,16,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!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},P,T;for(let H=7;H>=0;H-=1)if(P=this.parts[H],P in h){if(T=h[P],y&&T!==0)return null;T!==16&&(y=!0),f+=T}else return null;return 128-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let f,y=[],h=this.parts;for(let P=0;P<h.length;P++)f=h[P],y.push(f>>8),y.push(f&255);return y},l.prototype.toFixedLengthString=function(){let f=(function(){let h=[];for(let P=0;P<this.parts.length;P++)h.push(x(this.parts[P].toString(16),4));return h}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},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),y=f[0],h=f[1];return new v.IPv4([y>>8,y&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let f=(function(){let h=[];for(let P=0;P<this.parts.length;P++)h.push(this.parts[P].toString(16));return h}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},l.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),h=0,P=-1,T;for(;T=f.exec(y);)T[0].length>P&&(h=T.index,P=T[0].length);return P<0?y:`${y.substring(0,h)}::${y.substring(h+P)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),v.IPv6.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),P=[],T=0;for(;T<16;)P.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(P)}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,y,h,P,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),P=[],y=0;y<16;)P.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(P)}catch(H){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${H})`)}},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,y,h;if((y=l.match(/^(.+)\/(\d+)$/))&&(f=parseInt(y[2]),f>=0&&f<=128))return h=[this.parse(y[1]),f],Object.defineProperty(h,"toString",{value:i(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,y,h,P,T,H;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))&&(H=h[6]||"",f=h[1],h[1].endsWith("::")||(f=f.slice(0,-1)),f=p(f+H,6),f.parts)){for(T=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],y=0;y<T.length;y++)if(P=T[y],!(0<=P&&P<=255))return null;return f.parts.push(T[0]<<8|T[1]),f.parts.push(T[2]<<8|T[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],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;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,y){let h,P,T,H;y==null&&(y="unicast");for(P in f)if(Object.prototype.hasOwnProperty.call(f,P)){for(T=f[P],T[0]&&!(T[0]instanceof Array)&&(T=[T]),h=0;h<T.length;h++)if(H=T[h],l.kind()===H[0].kind()&&l.match.apply(l,H))return P}return y},typeof qr<"u"&&qr.exports?qr.exports=v:e.ipaddr=v})(fs)});var se={};po(se,{__addDisposableResource:()=>Mu,__assign:()=>Wr,__asyncDelegator:()=>Ou,__asyncGenerator:()=>wu,__asyncValues:()=>zu,__await:()=>wt,__awaiter:()=>Tu,__classPrivateFieldGet:()=>Cu,__classPrivateFieldIn:()=>Uu,__classPrivateFieldSet:()=>Nu,__createBinding:()=>Jr,__decorate:()=>hu,__disposeResources:()=>Lu,__esDecorate:()=>vu,__exportStar:()=>Iu,__extends:()=>mu,__generator:()=>Eu,__importDefault:()=>Du,__importStar:()=>ku,__makeTemplateObject:()=>Ru,__metadata:()=>bu,__param:()=>yu,__propKey:()=>Pu,__read:()=>Yo,__rest:()=>gu,__rewriteRelativeImportExtension:()=>ju,__runInitializers:()=>_u,__setFunctionName:()=>xu,__spread:()=>Au,__spreadArray:()=>$u,__spreadArrays:()=>Su,__values:()=>Kr,default:()=>Zm});function mu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jo(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function gu(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 hu(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function yu(e,t){return function(r,n){t(r,n,e)}}function vu(e,t,r,n,o,a){function s(P){if(P!==void 0&&typeof P!="function")throw new TypeError("Function expected");return P}i(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,g=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),x,v=!1,l=r.length-1;l>=0;l--){var f={};for(var y in n)f[y]=y==="access"?{}:n[y];for(var y in n.access)f.access[y]=n.access[y];f.addInitializer=function(P){if(v)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(P||null))};var h=(0,r[l])(u==="accessor"?{get:g.get,set:g.set}:g[p],f);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(x=s(h.get))&&(g.get=x),(x=s(h.set))&&(g.set=x),(x=s(h.init))&&o.unshift(x)}else(x=s(h))&&(u==="field"?o.unshift(x):g[p]=x)}d&&Object.defineProperty(d,n.name,g),v=!0}function _u(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 Pu(e){return typeof e=="symbol"?e:"".concat(e)}function xu(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 bu(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Tu(e,t,r,n){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,s){function u(g){try{d(n.next(g))}catch(x){s(x)}}i(u,"fulfilled");function p(g){try{d(n.throw(g))}catch(x){s(x)}}i(p,"rejected");function d(g){g.done?a(g.value):o(g.value).then(u,p)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function Eu(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,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(g){return p([d,g])}}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&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=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(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(g){d=[6,g],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Iu(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Jr(t,e,r)}function Kr(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:i(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 Yo(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.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 a}function Au(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Yo(arguments[t]));return e}function Su(){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 a=arguments[t],s=0,u=a.length;s<u;s++,o++)n[o]=a[s];return n}function $u(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function wt(e){return this instanceof wt?(this.v=e,this):new wt(e)}function wu(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];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,x)}}function u(l,f){n[l]&&(o[l]=function(y){return new Promise(function(h,P){a.push([l,y,h,P])>1||p(l,y)})},f&&(o[l]=f(o[l])))}function p(l,f){try{d(n[l](f))}catch(y){v(a[0][3],y)}}function d(l){l.value instanceof wt?Promise.resolve(l.value.v).then(g,x):v(a[0][2],l)}function g(l){p("next",l)}function x(l){p("throw",l)}function v(l,f){l(f),a.shift(),a.length&&p(a[0][0],a[0][1])}}function Ou(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,a){t[o]=e[o]?function(s){return(r=!r)?{value:wt(e[o](s)),done:!1}:a?a(s):s}:a}}function zu(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 Kr=="function"?Kr(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(u,p){s=e[a](s),o(u,p,s.done,s.value)})}}function o(a,s,u,p){Promise.resolve(p).then(function(d){a({value:d,done:u})},s)}}function Ru(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function ku(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Xo(e),n=0;n<r.length;n++)r[n]!=="default"&&Jr(t,e,r[n]);return Hm(t,e),t}function Du(e){return e&&e.__esModule?e:{default:e}}function Cu(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 Nu(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 Uu(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 Mu(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=i(function(){try{o.call(this)}catch(a){return Promise.reject(a)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Lu(e){function t(a){e.error=e.hasError?new Vm(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}i(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 a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).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 i(o,"next"),o()}function ju(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,a,s){return n?t?".jsx":".js":o&&(!a||!s)?r:o+a+"."+s.toLowerCase()+"js"}):e}var Jo,Wr,Jr,Hm,Xo,Vm,Zm,ue=dd(()=>{Jo=i(function(e,t){return Jo=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])},Jo(e,t)},"extendStatics");i(mu,"__extends");Wr=i(function(){return Wr=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),Wr.apply(this,arguments)},"__assign");i(gu,"__rest");i(hu,"__decorate");i(yu,"__param");i(vu,"__esDecorate");i(_u,"__runInitializers");i(Pu,"__propKey");i(xu,"__setFunctionName");i(bu,"__metadata");i(Tu,"__awaiter");i(Eu,"__generator");Jr=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:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});i(Iu,"__exportStar");i(Kr,"__values");i(Yo,"__read");i(Au,"__spread");i(Su,"__spreadArrays");i($u,"__spreadArray");i(wt,"__await");i(wu,"__asyncGenerator");i(Ou,"__asyncDelegator");i(zu,"__asyncValues");i(Ru,"__makeTemplateObject");Hm=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Xo=i(function(e){return Xo=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Xo(e)},"ownKeys");i(ku,"__importStar");i(Du,"__importDefault");i(Cu,"__classPrivateFieldGet");i(Nu,"__classPrivateFieldSet");i(Uu,"__classPrivateFieldIn");i(Mu,"__addDisposableResource");Vm=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(Lu,"__disposeResources");i(ju,"__rewriteRelativeImportExtension");Zm={__extends:mu,__assign:Wr,__rest:gu,__decorate:hu,__param:yu,__esDecorate:vu,__runInitializers:_u,__propKey:Pu,__setFunctionName:xu,__metadata:bu,__awaiter:Tu,__generator:Eu,__createBinding:Jr,__exportStar:Iu,__values:Kr,__read:Yo,__spread:Au,__spreadArrays:Su,__spreadArray:$u,__await:wt,__asyncGenerator:wu,__asyncDelegator:Ou,__asyncValues:zu,__makeTemplateObject:Ru,__importStar:ku,__importDefault:Du,__classPrivateFieldGet:Cu,__classPrivateFieldSet:Nu,__classPrivateFieldIn:Uu,__addDisposableResource:Mu,__disposeResources:Lu,__rewriteRelativeImportExtension:ju}});var gr=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.RequestMethod=void 0;var Fu;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(Fu||(Xr.RequestMethod=Fu={}))});var Bu=b(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.BatchRequestContent=void 0;var Ot=(ue(),ie(se)),Qo=gr(),qm=(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,a=t;o<a.length;o++){var s=a[o];this.addRequest(s)}}}return i(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=i(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=i(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 g=p;for(p=u.next();!p.done;){var x=p.value[1];if(x.dependsOn===void 0||x.dependsOn.length!==1||x.dependsOn[0]!==g.value[1].id)return!1;g=p,p=u.next()}return!0},"isSerial"),o=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1],g;if(d.dependsOn===void 0||d.dependsOn.length===0)g=d.id;else if(d.dependsOn.length===1){var x=d.dependsOn[0];if(x!==d.id&&s.has(x))g=x;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)&&g!==v.id||v.dependsOn!==void 0&&v.dependsOn.length!==0&&(v.dependsOn.length===1&&(v.id===g||v.dependsOn[0]!==g)||v.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var a=new Error("Empty requests map, Please provide at least one request.");throw a.name="Empty Requests Error",a}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return Ot.__awaiter(this,void 0,void 0,function(){var r,n,o,a;return Ot.__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===Qo.RequestMethod.PATCH||t.method===Qo.RequestMethod.POST||t.method===Qo.RequestMethod.PUT?(a=r,[4,e.getRequestBody(t)]):[3,2];case 1:a.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return Ot.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p,d;return Ot.__generator(this,function(g){switch(g.label){case 0:r=!1,g.label=1;case 1:return g.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=g.sent(),r=!0,[3,4];case 3:return a=g.sent(),[3,4];case 4:if(r)return[3,12];g.label=5;case 5:return g.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=g.sent(),u=new FileReader,[4,new Promise(function(x){u.addEventListener("load",function(){var v=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),f=l.exec(v);x(f[4])},!1),u.readAsDataURL(s)})];case 7:return n=g.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=g.sent(),n=p.toString("base64"),g.label=10;case 10:return r=!0,[3,12];case 11:return d=g.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 a=o.value[1].dependsOn;if(typeof a<"u"){var s=a.indexOf(t);s!==-1&&a.splice(s,1),a.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return Ot.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,a,s,u;return Ot.__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:
|
|
2
2
|
1. Parallel - no individual request states a dependency in the dependsOn property.
|
|
3
3
|
2. Serial - all individual requests depend on the previous individual request.
|
|
4
|
-
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]:(a=o.value[1],[4,e.getRequestData(a.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(a.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=a.id,a.dependsOn!==void 0&&a.dependsOn.length>0&&(s.dependsOn=a.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 a=this.requests.entries(),s=void 0,u=a.next();!u.done&&u.value[1].id!==t;)s=u,u=a.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}();Wr.BatchRequestContent=Em});var Ou=b(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.BatchResponseContent=void 0;var Im=(se(),oe(ae)),Sm=function(){function e(t){this.responses=new Map,this.update(t)}return i(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 Im.__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}();Kr.BatchResponseContent=Sm});var Xo=b(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.GRAPH_URLS=tt.GRAPH_BASE_URL=tt.GRAPH_API_VERSION=void 0;tt.GRAPH_API_VERSION="v1.0";tt.GRAPH_BASE_URL="https://graph.microsoft.com/";tt.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(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.GraphClientError=void 0;var Am=(se(),oe(ae)),$m=function(e){Am.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return i(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t}(Error);Jr.GraphClientError=$m});var Xr=b(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isCustomHost=ze.isGraphURL=ze.serializeContent=ze.urlJoin=ze.oDataQueryNames=void 0;var wm=Xo(),Om=qe();ze.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var zm=i(function(e){var t=i(function(a){return a.replace(/\/+$/,"")},"removePostSlash"),r=i(function(a){return a.replace(/^\/+/,"")},"removePreSlash"),n=i(function(a,s){return[t(a),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");ze.urlJoin=zm;var Rm=i(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");ze.serializeContent=Rm;var km=i(function(e){return zu(e)},"isGraphURL");ze.isGraphURL=km;var Dm=i(function(e,t){return t.forEach(function(r){return Cm(r)}),zu(e,t)},"isCustomHost");ze.isCustomHost=Dm;var zu=i(function(e,t){if(t===void 0&&(t=wm.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"),Cm=i(function(e){if(e.indexOf("/")!==-1)throw new Om.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 rt=b(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.MiddlewareControl=void 0;var Nm=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],a=o.constructor;this.middlewareOptions.set(a,o)}}return i(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e}();Yr.MiddlewareControl=Nm});var Ot=b(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.cloneRequestWithNewUrl=Re.appendRequestHeader=Re.setRequestHeader=Re.getRequestHeader=Re.generateUUID=void 0;var Ru=(se(),oe(ae)),Um=i(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");Re.generateUUID=Um;var Mm=i(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,a=0,s=o.length;a<s;a++)if(o[a][0]===r){n=o[a][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Re.getRequestHeader=Mm;var Lm=i(function(e,t,r,n){var o,a;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,(a={},a[r]=n,a))},"setRequestHeader");Re.setRequestHeader=Lm;var jm=i(function(e,t,r,n){var o,a;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=(a={},a[r]=n,a):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Re.appendRequestHeader=jm;var Fm=i(function(e,t){return Ru.__awaiter(void 0,void 0,void 0,function(){var r,n,o,a,s,u,p,d,g,x,v,l,f;return Ru.__generator(this,function(y){switch(y.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=y.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=y.sent(),y.label=4;case 4:return r=n,o=t.method,a=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,g=t.cache,x=t.redirect,v=t.integrity,l=t.keepalive,f=t.signal,[2,new Request(e,{method:o,headers:a,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:g,redirect:x,integrity:v,keepalive:l,signal:f})]}})})},"cloneRequestWithNewUrl");Re.cloneRequestWithNewUrl=Fm});var Yo=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.AuthenticationHandlerOptions=void 0;var Bm=function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return i(e,"AuthenticationHandlerOptions"),e}();Qr.AuthenticationHandlerOptions=Bm});var Rt=b(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.TelemetryHandlerOptions=zt.FeatureUsageFlag=void 0;var ku=rt(),Qo;(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"})(Qo||(zt.FeatureUsageFlag=Qo={}));var Vm=function(){function e(){this.featureUsage=Qo.NONE}return i(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof ku.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new ku.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}();zt.TelemetryHandlerOptions=Vm});var tn=b(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.AuthenticationHandler=void 0;var Du=(se(),oe(ae)),Cu=Xr(),Hm=rt(),Zm=Ot(),qm=Yo(),Nu=Rt(),Gm=function(){function e(t){this.authenticationProvider=t}return i(e,"AuthenticationHandler"),e.prototype.execute=function(t){return Du.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u;return Du.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Cu.isGraphURL)(r)||t.customHosts&&(0,Cu.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof Hm.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(qm.AuthenticationHandlerOptions)),o=void 0,a=void 0,n&&(o=n.authenticationProvider,a=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(a)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,Zm.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),Nu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Nu.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}();en.AuthenticationHandler=Gm});var nn=b(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.HTTPMessageHandler=void 0;var Uu=(se(),oe(ae)),Wm=function(){function e(){}return i(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return Uu.__awaiter(this,void 0,void 0,function(){var r;return Uu.__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}();rn.HTTPMessageHandler=Wm});var gr=b(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.RetryHandlerOptions=void 0;var Km=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 i(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}();on.RetryHandlerOptions=Km});var sn=b(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.RetryHandler=void 0;var kt=(se(),oe(ae)),ei=mr(),Jm=rt(),Mu=Ot(),Lu=gr(),ju=Rt(),Xm=function(){function e(t){t===void 0&&(t=new Lu.RetryHandlerOptions),this.options=t}return i(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===ei.RequestMethod.PUT||n===ei.RequestMethod.PATCH||n===ei.RequestMethod.POST;if(o){var a=(0,Mu.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(a)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=i(function(){return Number(Math.random().toFixed(3))},"getRandomness"),a=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return a!==null?Number.isNaN(Number(a))?s=Math.round((new Date(a).getTime()-Date.now())/1e3):s=Number(a):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 kt.__awaiter(this,void 0,void 0,function(){var r;return kt.__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 Jm.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Lu.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return kt.__awaiter(this,void 0,void 0,function(){var o;return kt.__generator(this,function(a){switch(a.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return a.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,Mu.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 a.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,a.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return kt.__awaiter(this,void 0,void 0,function(){var r,n;return kt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),ju.TelemetryHandlerOptions.updateFeatureUsageFlag(t,ju.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}();an.RetryHandler=Xm});var hr=b(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.RedirectHandlerOptions=void 0;var Ym=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 i(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e}();un.RedirectHandlerOptions=Ym});var ln=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.RedirectHandler=void 0;var Dt=(se(),oe(ae)),Qm=mr(),eg=rt(),tg=Ot(),ti=hr(),Fu=Rt(),rg=function(){function e(t){t===void 0&&(t=new ti.RedirectHandlerOptions),this.options=t}return i(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),a,s;o!==null&&(a=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof a<"u"&&typeof s<"u"&&a!==s},e.prototype.updateRequestUrl=function(t,r){return Dt.__awaiter(this,void 0,void 0,function(){var n,o;return Dt.__generator(this,function(a){switch(a.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,tg.cloneRequestWithNewUrl)(t,r.request)];case 2:o=a.sent(),a.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof eg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(ti.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new ti.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return Dt.__awaiter(this,void 0,void 0,function(){var o,a;return Dt.__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=Qm.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return a=this.getLocationHeader(o),!this.isRelativeURL(a)&&this.shouldDropAuthorizationHeader(o.url,a)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(a,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 Dt.__awaiter(this,void 0,void 0,function(){var r,n;return Dt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,Fu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Fu.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}();cn.RedirectHandler=rg});var Bu=b(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.PACKAGE_VERSION=void 0;pn.PACKAGE_VERSION="3.0.7"});var mn=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.TelemetryHandler=void 0;var Vu=(se(),oe(ae)),Hu=Xr(),ng=Bu(),og=rt(),dn=Ot(),ig=Rt(),ag=function(){function e(){}return i(e,"TelemetryHandler"),e.prototype.execute=function(t){return Vu.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s;return Vu.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Hu.isGraphURL)(r)||t.customHosts&&(0,Hu.isCustomHost)(r,t.customHosts)?(n=(0,dn.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,dn.generateUUID)(),(0,dn.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat(ng.PACKAGE_VERSION),a=void 0,t.middlewareControl instanceof og.MiddlewareControl&&(a=t.middlewareControl.getMiddlewareOptions(ig.TelemetryHandlerOptions)),a&&(s=a.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,dn.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}();fn.TelemetryHandler=ag});var Zu=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.MiddlewareFactory=void 0;var sg=tn(),ug=nn(),cg=hr(),lg=gr(),pg=ln(),dg=sn(),fg=mn(),mg=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),gg=function(){function e(){}return i(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new sg.AuthenticationHandler(t),o=new dg.RetryHandler(new lg.RetryHandlerOptions),a=new fg.TelemetryHandler,s=new ug.HTTPMessageHandler;if(r.push(n),r.push(o),mg()){var u=new pg.RedirectHandler(new cg.RedirectHandlerOptions);r.push(u)}return r.push(a),r.push(s),r},e}();gn.MiddlewareFactory=gg});var yn=b(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.ChaosStrategy=void 0;var qu;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(qu||(hn.ChaosStrategy=qu={}))});var ri=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.ChaosHandlerOptions=void 0;var hg=yn(),yg=function(){function e(t,r,n,o,a,s){if(t===void 0&&(t=hg.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=a,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return i(e,"ChaosHandlerOptions"),e}();vn.ChaosHandlerOptions=yg});var Gu=b(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.httpStatusCode=Ct.methodStatusCode=void 0;Ct.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]};Ct.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 Ju=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ChaosHandler=void 0;var _n=(se(),oe(ae)),vg=rt(),_g=Ot(),Wu=Gu(),ni=ri(),Ku=yn(),Pg=function(){function e(t,r){t===void 0&&(t=new ni.ChaosHandlerOptions),this.options=t,this.manualMap=r}return i(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 a=Wu.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:a,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,_g.generateUUID)(),a=new Date,s=this.createResponseHeaders(t,o,a.toString()),u=this.createResponseBody(t,o,a.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 _n.__awaiter(this,void 0,void 0,function(){return _n.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===Ku.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=Wu.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===Ku.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var a=this.getRelativeURL(r);this.manualMap.get(a)!==void 0?this.manualMap.get(a).get(n)!==void 0&&(t.statusCode=this.manualMap.get(a).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(a)&&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 vg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(ni.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new ni.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return _n.__awaiter(this,void 0,void 0,function(){var r;return _n.__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}();Pn.ChaosHandler=Pg});var yr=b(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.ResponseType=void 0;var Xu;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(Xu||(xn.ResponseType=Xu={}))});var ii=b(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.GraphResponseHandler=Nt.DocumentType=void 0;var bn=(se(),oe(ae)),pt=yr(),oi;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})(oi||(Nt.DocumentType=oi={}));var Tn;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Tn||(Tn={}));var En;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})(En||(En={}));var xg=function(){function e(){}return i(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(a){try{var s=new DOMParser,u=s.parseFromString(a,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return bn.__awaiter(this,void 0,void 0,function(){var n,o,a,s;return bn.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),a=r,a){case pt.ResponseType.ARRAYBUFFER:return[3,1];case pt.ResponseType.BLOB:return[3,3];case pt.ResponseType.DOCUMENT:return[3,5];case pt.ResponseType.JSON:return[3,7];case pt.ResponseType.STREAM:return[3,9];case pt.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,oi.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(En.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp(En.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Tn.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Tn.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 bn.__awaiter(this,void 0,void 0,function(){var o;return bn.__generator(this,function(a){switch(a.label){case 0:return r!==pt.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=a.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;a.label=3;case 3:return[2]}})})},e}();Nt.GraphResponseHandler=xg});var ai=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.Range=void 0;var bg=function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return i(e,"Range"),e}();In.Range=bg});var si=b(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.UploadResult=void 0;var Tg=function(){function e(t,r){this._location=r,this._responseBody=t}return i(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:i(function(){return this._location},"get"),set:i(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:i(function(){return this._responseBody},"get"),set:i(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e}();Sn.UploadResult=Tg});var ci=b($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.LargeFileUploadTask=void 0;var Ie=(se(),oe(ae)),ui=qe(),Eg=ii(),Yu=yr(),An=ai(),Ig=si(),Sg=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 ui.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 An.Range(0,this.options.rangeSize-1)}return i(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Ie.__awaiter(this,void 0,void 0,function(){var a,s;return Ie.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return a=u.sent(),s={url:a.uploadUrl,expiry:new Date(a.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new An.Range;var n=r.split("-"),o=parseInt(n[0],10),a=parseInt(n[1],10);return Number.isNaN(a)&&(a=this.file.size-1),new An.Range(o,a)},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 An.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 ui.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 Ie.__awaiter(this,void 0,void 0,function(){var t,r,n,o,a,s,u;return Ie.__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(a=p.sent(),!a)throw new ui.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,Eg.GraphResponseHandler.getResponse(a)];case 4:return s=p.sent(),a.status===201||a.status===200&&s.id?(this.reportProgress(t,r),[2,Ig.UploadResult.CreateUploadResult(s,a.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 Ie.__awaiter(this,void 0,void 0,function(){return Ie.__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 Ie.__awaiter(this,void 0,void 0,function(){return Ie.__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(Yu.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(Yu.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__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 Ie.__awaiter(this,void 0,void 0,function(){return Ie.__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}();$n.LargeFileUploadTask=Sg});var li=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.FileUpload=void 0;var Ag=qe(),$g=function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Ag.GraphClientError("Please provide the upload content, name of the file and size of the file")}return i(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e}();wn.FileUpload=$g});var pi=b(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.getValidRangeSize=void 0;var wg=5*1024*1024,Og=i(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),zg=i(function(e){e===void 0&&(e=wg);var t=60*1024*1024;return e>t&&(e=t),Og(e)},"getValidRangeSize");On.getValidRangeSize=zg});var ec=b(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.OneDriveLargeFileUploadTask=void 0;var Ge=(se(),oe(ae)),Qu=qe(),Rg=li(),kg=ci(),Dg=pi(),Cg=function(e){Ge.__extends(t,e);function t(r,n,o,a){return e.call(this,r,n,o,a)||this}return i(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,a;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),a=o.size;else if(typeof File<"u"&&r instanceof File)o=r,a=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;a=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:a}},t.create=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var a,s,u;return Ge.__generator(this,function(p){if(!r||!n||!o)throw new Qu.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return a=o.fileName,s=t.getFileInfo(n,a),u=new Rg.FileUpload(s.content,a,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var a,s,u,p;return Ge.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new Qu.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return a=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,a,s)];case 1:return u=d.sent(),p=(0,Dg.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 a;return Ge.__generator(this,function(s){return a={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,a)]})})},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(a){switch(a.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,a.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t}(kg.LargeFileUploadTask);zn.OneDriveLargeFileUploadTask=Cg});var rc=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.StreamUpload=void 0;var tc=(se(),oe(ae)),vr=qe(),Ng=function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new vr.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return i(e,"StreamUpload"),e.prototype.sliceFile=function(t){return tc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p;return tc.__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 vr.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,a=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===a)return[2,this.previousSlice.fileSlice];if(t.maxValue===a)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,a+1)),r=t.maxValue-a}}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 vr.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 a=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new vr.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,a.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(a));if(!r.content||!r.content.readable)return o(new vr.GraphClientError("Error encountered while reading the stream during the upload"))})})},e}();Rn.StreamUpload=Ng});var nc=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.PageIterator=void 0;var Ut=(se(),oe(ae)),Ug=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 i(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 Ut.__awaiter(this,void 0,void 0,function(){var t,r;return Ut.__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 Ut.__awaiter(this,void 0,void 0,function(){var t;return Ut.__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 Ut.__awaiter(this,void 0,void 0,function(){return Ut.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e}();kn.PageIterator=Ug});var di=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.CustomAuthenticationProvider=void 0;var Dn=(se(),oe(ae)),oc=qe(),Mg=function(){function e(t){this.provider=t}return i(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Dn.__awaiter(this,void 0,void 0,function(){var t=this;return Dn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(a,s){return Dn.__awaiter(t,void 0,void 0,function(){var u,p;return Dn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return a||(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",a=new oc.GraphClientError(u)),[4,oc.GraphClientError.setGraphClientError(a)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e}();Cn.CustomAuthenticationProvider=Mg});var fi=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.GraphError=void 0;var Lg=(se(),oe(ae)),jg=function(e){Lg.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var a=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(a,t.prototype),a.statusCode=r,a.code=null,a.requestId=null,a.date=new Date,a.body=null,a.stack=o?o.stack:a.stack,a}return i(t,"GraphError"),t}(Error);Nn.GraphError=jg});var ac=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.GraphErrorHandler=void 0;var ic=(se(),oe(ae)),mi=fi(),Fg=function(){function e(){}return i(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new mi.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,a=new mi.GraphError(r,o.message);return a.code=o.code,o.innerError!==void 0&&(a.requestId=o.innerError["request-id"],a.date=new Date(o.innerError.date)),a.body=JSON.stringify(o),a.headers=n?.headers,a},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),ic.__awaiter(this,void 0,void 0,function(){var a;return ic.__generator(this,function(s){if(t&&t.error?a=e.constructErrorFromResponse(t,r,o):t instanceof Error?a=e.constructError(t,r,o):(a=new mi.GraphError(r),a.body=t),typeof n=="function")n(a,null);else return[2,a];return[2]})})},e}();Un.GraphErrorHandler=Fg});var gi=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.GraphRequest=void 0;var re=(se(),oe(ae)),Bg=qe(),Vg=ac(),_r=Xr(),Hg=ii(),Zg=rt(),dt=mr(),qg=yr(),Gg=function(){function e(t,r,n){var o=this;this.parsePath=function(a){if(a.indexOf("https://")!==-1){a=a.replace("https://","");var s=a.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+a.substring(0,s),a=a.substring(s+1,a.length));var u=a.indexOf("/");u!==-1&&(o.urlComponents.version=a.substring(0,u),a=a.substring(u+1,a.length))}a.charAt(0)==="/"&&(a=a.substr(1));var p=a.indexOf("?");if(p===-1)o.urlComponents.path=a;else{o.urlComponents.path=a.substr(0,p);for(var d=a.substring(p+1,a.length).split("&"),g=0,x=d;g<x.length;g++){var v=x[g];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 i(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,_r.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,a=t.otherURLQueryOptions;o<a.length;o++){var s=a[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 a=o[n];this.parseQueryParamenterString(a)}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(_r.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 a,s,u,p,d,g,x,v;return re.__generator(this,function(l){switch(l.label){case 0:s=new Zg.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(),a=p.response,[4,Hg.GraphResponseHandler.getResponse(a,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(g=l.sent(),g instanceof Bg.GraphClientError)throw g;return x=void 0,a&&(x=a.status),[4,Vg.GraphErrorHandler.getError(g,x,n,a)];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(a){switch(a.label){case 0:return r=this.buildFullUrl(),n={method:dt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=a.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,a;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:dt.RequestMethod.POST,body:(0,_r.serializeContent)(t)},a=t&&t.constructor&&t.constructor.name,a==="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(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:dt.RequestMethod.PUT,body:(0,_r.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:dt.RequestMethod.PATCH,body:(0,_r.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.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:dt.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:dt.RequestMethod.GET},this.responseType(qg.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(a){switch(a.label){case 0:return n=this.buildFullUrl(),o={method:dt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e}();Mn.GraphRequest=Gg});var hi=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.HTTPClient=void 0;var sc=(se(),oe(ae)),Wg=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 i(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 sc.__awaiter(this,void 0,void 0,function(){var r;return sc.__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}();Ln.HTTPClient=Wg});var cc=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.HTTPClientFactory=void 0;var Kg=(se(),oe(ae)),uc=hi(),Jg=tn(),Xg=nn(),Yg=hr(),Qg=gr(),eh=ln(),th=sn(),rh=mn(),nh=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),oh=function(){function e(){}return i(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new Jg.AuthenticationHandler(t),n=new th.RetryHandler(new Qg.RetryHandlerOptions),o=new rh.TelemetryHandler,a=new Xg.HTTPMessageHandler;if(r.setNext(n),nh()){var s=new eh.RedirectHandler(new Yg.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(a),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(uc.HTTPClient.bind.apply(uc.HTTPClient,Kg.__spreadArray([void 0],t,!1)))},e}();jn.HTTPClientFactory=oh});var lc=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.validatePolyFilling=void 0;var ih=i(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");Fn.validatePolyFilling=ih});var fc=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Client=void 0;var ah=(se(),oe(ae)),pc=Xo(),sh=di(),uh=gi(),dc=hi(),ch=cc(),lh=lc(),ph=function(){function e(t){this.config={baseUrl:pc.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:pc.GRAPH_API_VERSION},(0,lh.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=ch.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(dc.HTTPClient.bind.apply(dc.HTTPClient,ah.__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 i(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new sh.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new uh.GraphRequest(this.httpClient,this.config,t)},e}();Bn.Client=ph});var gc=b($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ResponseType=$.GraphRequest=$.GraphClientError=$.GraphError=$.CustomAuthenticationProvider=$.Client=$.PageIterator=$.Range=$.UploadResult=$.FileUpload=$.StreamUpload=$.getValidRangeSize=$.OneDriveLargeFileUploadTask=$.LargeFileUploadTask=$.ChaosHandler=$.ChaosStrategy=$.ChaosHandlerOptions=$.TelemetryHandlerOptions=$.FeatureUsageFlag=$.RedirectHandlerOptions=$.RetryHandlerOptions=$.AuthenticationHandlerOptions=$.MiddlewareFactory=$.TelemetryHandler=$.RedirectHandler=$.RetryHandler=$.HTTPMessageHandler=$.AuthenticationHandler=$.BatchResponseContent=$.BatchRequestContent=void 0;var dh=wu();Object.defineProperty($,"BatchRequestContent",{enumerable:!0,get:i(function(){return dh.BatchRequestContent},"get")});var fh=Ou();Object.defineProperty($,"BatchResponseContent",{enumerable:!0,get:i(function(){return fh.BatchResponseContent},"get")});var mh=tn();Object.defineProperty($,"AuthenticationHandler",{enumerable:!0,get:i(function(){return mh.AuthenticationHandler},"get")});var gh=nn();Object.defineProperty($,"HTTPMessageHandler",{enumerable:!0,get:i(function(){return gh.HTTPMessageHandler},"get")});var hh=sn();Object.defineProperty($,"RetryHandler",{enumerable:!0,get:i(function(){return hh.RetryHandler},"get")});var yh=ln();Object.defineProperty($,"RedirectHandler",{enumerable:!0,get:i(function(){return yh.RedirectHandler},"get")});var vh=mn();Object.defineProperty($,"TelemetryHandler",{enumerable:!0,get:i(function(){return vh.TelemetryHandler},"get")});var _h=Zu();Object.defineProperty($,"MiddlewareFactory",{enumerable:!0,get:i(function(){return _h.MiddlewareFactory},"get")});var Ph=Yo();Object.defineProperty($,"AuthenticationHandlerOptions",{enumerable:!0,get:i(function(){return Ph.AuthenticationHandlerOptions},"get")});var xh=gr();Object.defineProperty($,"RetryHandlerOptions",{enumerable:!0,get:i(function(){return xh.RetryHandlerOptions},"get")});var bh=hr();Object.defineProperty($,"RedirectHandlerOptions",{enumerable:!0,get:i(function(){return bh.RedirectHandlerOptions},"get")});var mc=Rt();Object.defineProperty($,"FeatureUsageFlag",{enumerable:!0,get:i(function(){return mc.FeatureUsageFlag},"get")});Object.defineProperty($,"TelemetryHandlerOptions",{enumerable:!0,get:i(function(){return mc.TelemetryHandlerOptions},"get")});var Th=ri();Object.defineProperty($,"ChaosHandlerOptions",{enumerable:!0,get:i(function(){return Th.ChaosHandlerOptions},"get")});var Eh=yn();Object.defineProperty($,"ChaosStrategy",{enumerable:!0,get:i(function(){return Eh.ChaosStrategy},"get")});var Ih=Ju();Object.defineProperty($,"ChaosHandler",{enumerable:!0,get:i(function(){return Ih.ChaosHandler},"get")});var Sh=ci();Object.defineProperty($,"LargeFileUploadTask",{enumerable:!0,get:i(function(){return Sh.LargeFileUploadTask},"get")});var Ah=ec();Object.defineProperty($,"OneDriveLargeFileUploadTask",{enumerable:!0,get:i(function(){return Ah.OneDriveLargeFileUploadTask},"get")});var $h=pi();Object.defineProperty($,"getValidRangeSize",{enumerable:!0,get:i(function(){return $h.getValidRangeSize},"get")});var wh=rc();Object.defineProperty($,"StreamUpload",{enumerable:!0,get:i(function(){return wh.StreamUpload},"get")});var Oh=li();Object.defineProperty($,"FileUpload",{enumerable:!0,get:i(function(){return Oh.FileUpload},"get")});var zh=si();Object.defineProperty($,"UploadResult",{enumerable:!0,get:i(function(){return zh.UploadResult},"get")});var Rh=ai();Object.defineProperty($,"Range",{enumerable:!0,get:i(function(){return Rh.Range},"get")});var kh=nc();Object.defineProperty($,"PageIterator",{enumerable:!0,get:i(function(){return kh.PageIterator},"get")});var Dh=fc();Object.defineProperty($,"Client",{enumerable:!0,get:i(function(){return Dh.Client},"get")});var Ch=di();Object.defineProperty($,"CustomAuthenticationProvider",{enumerable:!0,get:i(function(){return Ch.CustomAuthenticationProvider},"get")});var Nh=fi();Object.defineProperty($,"GraphError",{enumerable:!0,get:i(function(){return Nh.GraphError},"get")});var Uh=qe();Object.defineProperty($,"GraphClientError",{enumerable:!0,get:i(function(){return Uh.GraphClientError},"get")});var Mh=gi();Object.defineProperty($,"GraphRequest",{enumerable:!0,get:i(function(){return Mh.GraphRequest},"get")});var Lh=yr();Object.defineProperty($,"ResponseType",{enumerable:!0,get:i(function(){return Lh.ResponseType},"get")})});var Dc=b((YN,kc)=>{var Rc=require("stream").Stream,Gh=require("util");kc.exports=De;function De(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(De,"DelayedStream");Gh.inherits(De,Rc);De.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(De.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});De.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};De.prototype.resume=function(){this._released||this.release(),this.source.resume()};De.prototype.pause=function(){this.source.pause()};De.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};De.prototype.pipe=function(){var e=Rc.prototype.pipe.apply(this,arguments);return this.resume(),e};De.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)};De.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 Mc=b((e0,Uc)=>{var Wh=require("util"),Nc=require("stream").Stream,Cc=Dc();Uc.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}i(de,"CombinedStream");Wh.inherits(de,Nc);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 Cc)){var r=Cc.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 Nc.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 jc=b((r0,Lc)=>{"use strict";Lc.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 Vc=b(Se=>{"use strict";var Kn=jc(),Kh=require("path").extname,Fc=/^\s*([^;\s]*)(?:;|\s|$)/,Jh=/^text\//i;Se.charset=Bc;Se.charsets={lookup:Bc};Se.contentType=Xh;Se.extension=Yh;Se.extensions=Object.create(null);Se.lookup=Qh;Se.types=Object.create(null);ey(Se.extensions,Se.types);function Bc(e){if(!e||typeof e!="string")return!1;var t=Fc.exec(e),r=t&&Kn[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Jh.test(t[1])?"UTF-8":!1}i(Bc,"charset");function Xh(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Se.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Se.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(Xh,"contentType");function Yh(e){if(!e||typeof e!="string")return!1;var t=Fc.exec(e),r=t&&Se.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(Yh,"extension");function Qh(e){if(!e||typeof e!="string")return!1;var t=Kh("x."+e).toLowerCase().substr(1);return t&&Se.types[t]||!1}i(Qh,"lookup");function ey(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Kn).forEach(i(function(o){var a=Kn[o],s=a.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(Kn[t[p]].source),g=r.indexOf(a.source);if(t[p]!=="application/octet-stream"&&(d>g||d===g&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}i(ey,"populateMaps")});var Zc=b((i0,Hc)=>{Hc.exports=ty;function ty(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(ty,"defer")});var Pi=b((s0,Gc)=>{var qc=Zc();Gc.exports=ry;function ry(e){var t=!1;return qc(function(){t=!0}),i(function(n,o){t?e(n,o):qc(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(ry,"async")});var xi=b((c0,Wc)=>{Wc.exports=ny;function ny(e){Object.keys(e.jobs).forEach(oy.bind(e)),e.jobs={}}i(ny,"abort");function oy(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(oy,"clean")});var bi=b((p0,Jc)=>{var Kc=Pi(),iy=xi();Jc.exports=ay;function ay(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=sy(t,o,e[o],function(a,s){o in r.jobs&&(delete r.jobs[o],a?iy(r):r.results[o]=s,n(a,r.results))})}i(ay,"iterate");function sy(e,t,r,n){var o;return e.length==2?o=e(r,Kc(n)):o=e(r,t,Kc(n)),o}i(sy,"runJob")});var Ti=b((f0,Xc)=>{Xc.exports=uy;function uy(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,a){return t(e[o],e[a])}),n}i(uy,"state")});var Ei=b((g0,Yc)=>{var cy=xi(),ly=Pi();Yc.exports=py;function py(e){Object.keys(this.jobs).length&&(this.index=this.size,cy(this),ly(e)(null,this.results))}i(py,"terminator")});var el=b((y0,Qc)=>{var dy=bi(),fy=Ti(),my=Ei();Qc.exports=gy;function gy(e,t,r){for(var n=fy(e);n.index<(n.keyedList||e).length;)dy(e,t,n,function(o,a){if(o){r(o,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return my.bind(n,r)}i(gy,"parallel")});var Ii=b((_0,Jn)=>{var tl=bi(),hy=Ti(),yy=Ei();Jn.exports=vy;Jn.exports.ascending=rl;Jn.exports.descending=_y;function vy(e,t,r,n){var o=hy(e,r);return tl(e,t,o,i(function a(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){tl(e,t,o,a);return}n(null,o.results)},"iteratorHandler")),yy.bind(o,n)}i(vy,"serialOrdered");function rl(e,t){return e<t?-1:e>t?1:0}i(rl,"ascending");function _y(e,t){return-1*rl(e,t)}i(_y,"descending")});var ol=b((x0,nl)=>{var Py=Ii();nl.exports=xy;function xy(e,t,r){return Py(e,t,null,r)}i(xy,"serial")});var al=b((T0,il)=>{il.exports={parallel:el(),serial:ol(),serialOrdered:Ii()}});var Si=b((E0,sl)=>{"use strict";sl.exports=Object});var cl=b((I0,ul)=>{"use strict";ul.exports=Error});var pl=b((S0,ll)=>{"use strict";ll.exports=EvalError});var fl=b((A0,dl)=>{"use strict";dl.exports=RangeError});var gl=b(($0,ml)=>{"use strict";ml.exports=ReferenceError});var yl=b((w0,hl)=>{"use strict";hl.exports=SyntaxError});var Xn=b((O0,vl)=>{"use strict";vl.exports=TypeError});var Pl=b((z0,_l)=>{"use strict";_l.exports=URIError});var bl=b((R0,xl)=>{"use strict";xl.exports=Math.abs});var El=b((k0,Tl)=>{"use strict";Tl.exports=Math.floor});var Sl=b((D0,Il)=>{"use strict";Il.exports=Math.max});var $l=b((C0,Al)=>{"use strict";Al.exports=Math.min});var Ol=b((N0,wl)=>{"use strict";wl.exports=Math.pow});var Rl=b((U0,zl)=>{"use strict";zl.exports=Math.round});var Dl=b((M0,kl)=>{"use strict";kl.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Nl=b((j0,Cl)=>{"use strict";var by=Dl();Cl.exports=i(function(t){return by(t)||t===0?t:t<0?-1:1},"sign")});var Ml=b((B0,Ul)=>{"use strict";Ul.exports=Object.getOwnPropertyDescriptor});var Ai=b((V0,Ll)=>{"use strict";var Yn=Ml();if(Yn)try{Yn([],"length")}catch{Yn=null}Ll.exports=Yn});var Fl=b((H0,jl)=>{"use strict";var Qn=Object.defineProperty||!1;if(Qn)try{Qn({},"a",{value:1})}catch{Qn=!1}jl.exports=Qn});var $i=b((Z0,Bl)=>{"use strict";Bl.exports=i(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 a 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 Zl=b((G0,Hl)=>{"use strict";var Vl=typeof Symbol<"u"&&Symbol,Ty=$i();Hl.exports=i(function(){return typeof Vl!="function"||typeof Symbol!="function"||typeof Vl("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ty()},"hasNativeSymbols")});var wi=b((K0,ql)=>{"use strict";ql.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Oi=b((J0,Gl)=>{"use strict";var Ey=Si();Gl.exports=Ey.getPrototypeOf||null});var Jl=b((X0,Kl)=>{"use strict";var Iy="Function.prototype.bind called on incompatible ",Sy=Object.prototype.toString,Ay=Math.max,$y="[object Function]",Wl=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},"concatty"),wy=i(function(t,r){for(var n=[],o=r||0,a=0;o<t.length;o+=1,a+=1)n[a]=t[o];return n},"slicy"),Oy=i(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");Kl.exports=i(function(t){var r=this;if(typeof r!="function"||Sy.apply(r)!==$y)throw new TypeError(Iy+r);for(var n=wy(arguments,1),o,a=i(function(){if(this instanceof o){var g=r.apply(this,Wl(n,arguments));return Object(g)===g?g:this}return r.apply(t,Wl(n,arguments))},"binder"),s=Ay(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Oy(u,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var d=i(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var Mt=b((Q0,Xl)=>{"use strict";var zy=Jl();Xl.exports=Function.prototype.bind||zy});var eo=b((eU,Yl)=>{"use strict";Yl.exports=Function.prototype.call});var zi=b((tU,Ql)=>{"use strict";Ql.exports=Function.prototype.apply});var tp=b((rU,ep)=>{"use strict";ep.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var np=b((nU,rp)=>{"use strict";var Ry=Mt(),ky=zi(),Dy=eo(),Cy=tp();rp.exports=Cy||Ry.call(Dy,ky)});var ip=b((oU,op)=>{"use strict";var Ny=Mt(),Uy=Xn(),My=eo(),Ly=np();op.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new Uy("a function is required");return Ly(Ny,My,t)},"callBindBasic")});var pp=b((aU,lp)=>{"use strict";var jy=ip(),ap=Ai(),up;try{up=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ri=!!up&&ap&&ap(Object.prototype,"__proto__"),cp=Object,sp=cp.getPrototypeOf;lp.exports=Ri&&typeof Ri.get=="function"?jy([Ri.get]):typeof sp=="function"?i(function(t){return sp(t==null?t:cp(t))},"getDunder"):!1});var hp=b((uU,gp)=>{"use strict";var dp=wi(),fp=Oi(),mp=pp();gp.exports=dp?i(function(t){return dp(t)},"getProto"):fp?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return fp(t)},"getProto"):mp?i(function(t){return mp(t)},"getProto"):null});var ki=b((lU,yp)=>{"use strict";var Fy=Function.prototype.call,By=Object.prototype.hasOwnProperty,Vy=Mt();yp.exports=Vy.call(Fy,By)});var Ep=b((pU,Tp)=>{"use strict";var J,Hy=Si(),Zy=cl(),qy=pl(),Gy=fl(),Wy=gl(),Bt=yl(),Ft=Xn(),Ky=Pl(),Jy=bl(),Xy=El(),Yy=Sl(),Qy=$l(),ev=Ol(),tv=Rl(),rv=Nl(),xp=Function,Di=i(function(e){try{return xp('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pr=Ai(),nv=Fl(),Ci=i(function(){throw new Ft},"throwTypeError"),ov=Pr?function(){try{return arguments.callee,Ci}catch{try{return Pr(arguments,"callee").get}catch{return Ci}}}():Ci,Lt=Zl()(),ve=hp(),iv=Oi(),av=wi(),bp=zi(),xr=eo(),jt={},sv=typeof Uint8Array>"u"||!ve?J:ve(Uint8Array),ft={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?J:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?J:ArrayBuffer,"%ArrayIteratorPrototype%":Lt&&ve?ve([][Symbol.iterator]()):J,"%AsyncFromSyncIteratorPrototype%":J,"%AsyncFunction%":jt,"%AsyncGenerator%":jt,"%AsyncGeneratorFunction%":jt,"%AsyncIteratorPrototype%":jt,"%Atomics%":typeof Atomics>"u"?J:Atomics,"%BigInt%":typeof BigInt>"u"?J:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?J:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?J:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?J:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Zy,"%eval%":eval,"%EvalError%":qy,"%Float16Array%":typeof Float16Array>"u"?J:Float16Array,"%Float32Array%":typeof Float32Array>"u"?J:Float32Array,"%Float64Array%":typeof Float64Array>"u"?J:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?J:FinalizationRegistry,"%Function%":xp,"%GeneratorFunction%":jt,"%Int8Array%":typeof Int8Array>"u"?J:Int8Array,"%Int16Array%":typeof Int16Array>"u"?J:Int16Array,"%Int32Array%":typeof Int32Array>"u"?J:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Lt&&ve?ve(ve([][Symbol.iterator]())):J,"%JSON%":typeof JSON=="object"?JSON:J,"%Map%":typeof Map>"u"?J:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Lt||!ve?J:ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Hy,"%Object.getOwnPropertyDescriptor%":Pr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":Gy,"%ReferenceError%":Wy,"%Reflect%":typeof Reflect>"u"?J:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?J:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Lt||!ve?J:ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?J:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Lt&&ve?ve(""[Symbol.iterator]()):J,"%Symbol%":Lt?Symbol:J,"%SyntaxError%":Bt,"%ThrowTypeError%":ov,"%TypedArray%":sv,"%TypeError%":Ft,"%Uint8Array%":typeof Uint8Array>"u"?J:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?J:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?J:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?J:Uint32Array,"%URIError%":Ky,"%WeakMap%":typeof WeakMap>"u"?J:WeakMap,"%WeakRef%":typeof WeakRef>"u"?J:WeakRef,"%WeakSet%":typeof WeakSet>"u"?J:WeakSet,"%Function.prototype.call%":xr,"%Function.prototype.apply%":bp,"%Object.defineProperty%":nv,"%Object.getPrototypeOf%":iv,"%Math.abs%":Jy,"%Math.floor%":Xy,"%Math.max%":Yy,"%Math.min%":Qy,"%Math.pow%":ev,"%Math.round%":tv,"%Math.sign%":rv,"%Reflect.getPrototypeOf%":av};if(ve)try{null.error}catch(e){vp=ve(ve(e)),ft["%Error.prototype%"]=vp}var vp,uv=i(function e(t){var r;if(t==="%AsyncFunction%")r=Di("async function () {}");else if(t==="%GeneratorFunction%")r=Di("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Di("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 ft[t]=r,r},"doEval"),_p={__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"]},br=Mt(),to=ki(),cv=br.call(xr,Array.prototype.concat),lv=br.call(bp,Array.prototype.splice),Pp=br.call(xr,String.prototype.replace),ro=br.call(xr,String.prototype.slice),pv=br.call(xr,RegExp.prototype.exec),dv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fv=/\\(\\)?/g,mv=i(function(t){var r=ro(t,0,1),n=ro(t,-1);if(r==="%"&&n!=="%")throw new Bt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Bt("invalid intrinsic syntax, expected opening `%`");var o=[];return Pp(t,dv,function(a,s,u,p){o[o.length]=u?Pp(p,fv,"$1"):s||a}),o},"stringToPath"),gv=i(function(t,r){var n=t,o;if(to(_p,n)&&(o=_p[n],n="%"+o[0]+"%"),to(ft,n)){var a=ft[n];if(a===jt&&(a=uv(n)),typeof a>"u"&&!r)throw new Ft("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Bt("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Tp.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new Ft("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ft('"allowMissing" argument must be a boolean');if(pv(/^%?[^%]*%?$/,t)===null)throw new Bt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=mv(t),o=n.length>0?n[0]:"",a=gv("%"+o+"%",r),s=a.name,u=a.value,p=!1,d=a.alias;d&&(o=d[0],lv(n,cv([0,1],d)));for(var g=1,x=!0;g<n.length;g+=1){var v=n[g],l=ro(v,0,1),f=ro(v,-1);if((l==='"'||l==="'"||l==="`"||f==='"'||f==="'"||f==="`")&&l!==f)throw new Bt("property names with quotes must have matching quotes");if((v==="constructor"||!x)&&(p=!0),o+="."+v,s="%"+o+"%",to(ft,s))u=ft[s];else if(u!=null){if(!(v in u)){if(!r)throw new Ft("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pr&&g+1>=n.length){var y=Pr(u,v);x=!!y,x&&"get"in y&&!("originalValue"in y.get)?u=y.get:u=u[v]}else x=to(u,v),u=u[v];x&&!p&&(ft[s]=u)}}return u},"GetIntrinsic")});var Sp=b((fU,Ip)=>{"use strict";var hv=$i();Ip.exports=i(function(){return hv()&&!!Symbol.toStringTag},"hasToStringTagShams")});var wp=b((gU,$p)=>{"use strict";var yv=Ep(),Ap=yv("%Object.defineProperty%",!0),vv=Sp()(),_v=ki(),Pv=Xn(),no=vv?Symbol.toStringTag:null;$p.exports=i(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 Pv("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");no&&(n||!_v(t,no))&&(Ap?Ap(t,no,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[no]=r)},"setToStringTag")});var zp=b((yU,Op)=>{"use strict";var xv=Function.prototype.call,bv=Object.prototype.hasOwnProperty,Tv=Mt();Op.exports=Tv.call(xv,bv)});var kp=b((vU,Rp)=>{"use strict";Rp.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Np=b((_U,Cp)=>{"use strict";var Li=Mc(),Ev=require("util"),Ni=require("path"),Iv=require("http"),Sv=require("https"),Av=require("url").parse,$v=require("fs"),wv=require("stream").Stream,Ov=require("crypto"),Ui=Vc(),zv=al(),Rv=wp(),ot=zp(),Mi=kp();function Dp(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(Dp,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Li.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(X,"FormData");Ev.inherits(X,Li);X.LINE_BREAK=`\r
|
|
5
|
-
`;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Li.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),a=this._multiPartFooter();n(o),n(t),n(a),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 wv))&&(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)):$v.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),a="",s={"Content-Disposition":["form-data",'name="'+Dp(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&Mi(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&&(a+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+a+X.LINE_BREAK};X.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=Ni.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=Ni.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ot(e,"httpVersion")&&(r=Ni.basename(e.client._httpMessage.path||"")),r)return'filename="'+Dp(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=Ui.lookup(e.name)),!r&&e&&e.path&&(r=Ui.lookup(e.path)),!r&&e&&e.readable&&ot(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Ui.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="--------------------------"+Ov.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}zv.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=Av(e),n=Mi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=Mi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Sv.request(n):r=Iv.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=i(function(d,g){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,g)},"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]"};Rv(X.prototype,"FormData");Cp.exports=X});var oo=b((ji,Fi)=>{(function(e,t){typeof ji=="object"&&typeof Fi<"u"?Fi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(ji,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",s="hour",u="day",p="week",d="month",g="quarter",x="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=/\[([^\]]+)]|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:i(function(j){var S=["th","st","nd","rd"],E=j%100;return"["+j+(S[(E-20)%10]||S[E]||S[0])+"]"},"ordinal")},_=i(function(j,S,E){var w=String(j);return!w||w.length>=S?j:""+Array(S+1-w.length).join(E)+j},"m"),T={s:_,z:i(function(j){var S=-j.utcOffset(),E=Math.abs(S),w=Math.floor(E/60),A=E%60;return(S<=0?"+":"-")+_(w,2,"0")+":"+_(A,2,"0")},"z"),m:i(function j(S,E){if(S.date()<E.date())return-j(E,S);var w=12*(E.year()-S.year())+(E.month()-S.month()),A=S.clone().add(w,d),H=E-A<0,Z=S.clone().add(w+(H?-1:1),d);return+(-(w+(E-A)/(H?A-Z:Z-A))||0)},"t"),a:i(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:i(function(j){return{M:d,y:x,w:p,d:u,D:v,h:s,m:a,s:o,ms:n,Q:g}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(j){return j===void 0},"u")},V="en",fe={};fe[V]=h;var xe=i(function(j){return j instanceof mt},"p"),Ce=i(function j(S,E,w){var A;if(!S)return V;if(typeof S=="string"){var H=S.toLowerCase();fe[H]&&(A=H),E&&(fe[H]=E,A=H);var Z=S.split("-");if(!A&&Z.length>1)return j(Z[0])}else{var te=S.name;fe[te]=S,A=te}return!w&&A&&(V=A),A||!w&&V},"t"),ee=i(function(j,S){if(xe(j))return j.clone();var E=typeof S=="object"?S:{};return E.date=j,E.args=arguments,new mt(E)},"w"),W=T;W.l=Ce,W.i=xe,W.w=function(j,S){return ee(j,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var mt=function(){function j(E){this.$L=Ce(E.locale,null,!0),this.parse(E)}i(j,"M");var S=j.prototype;return S.parse=function(E){this.$d=function(w){var A=w.date,H=w.utc;if(A===null)return new Date(NaN);if(W.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var Z=A.match(f);if(Z){var te=Z[2]-1||0,me=(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,me)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)}}return new Date(A)}(E),this.$x=E.x||{},this.init()},S.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},S.$utils=function(){return W},S.isValid=function(){return this.$d.toString()!==l},S.isSame=function(E,w){var A=ee(E);return this.startOf(w)<=A&&A<=this.endOf(w)},S.isAfter=function(E,w){return ee(E)<this.startOf(w)},S.isBefore=function(E,w){return this.endOf(w)<ee(E)},S.$g=function(E,w,A){return W.u(E)?this[w]:this.set(A,E)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(E,w){var A=this,H=!!W.u(w)||w,Z=W.p(E),te=i(function(st,Ee){var We=W.w(A.$u?Date.UTC(A.$y,Ee,st):new Date(A.$y,Ee,st),A);return H?We:We.endOf(u)},"l"),me=i(function(st,Ee){return W.w(A.toDate()[st].apply(A.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(Ee)),A)},"$"),ye=this.$W,Pe=this.$M,we=this.$D,gt="set"+(this.$u?"UTC":"");switch(Z){case x:return H?te(1,0):te(31,11);case d:return H?te(1,Pe):te(0,Pe+1);case p:var at=this.$locale().weekStart||0,Vt=(ye<at?ye+7:ye)-at;return te(H?we-Vt:we+(6-Vt),Pe);case u:case v:return me(gt+"Hours",0);case s:return me(gt+"Minutes",1);case a:return me(gt+"Seconds",2);case o:return me(gt+"Milliseconds",3);default:return this.clone()}},S.endOf=function(E){return this.startOf(E,!1)},S.$set=function(E,w){var A,H=W.p(E),Z="set"+(this.$u?"UTC":""),te=(A={},A[u]=Z+"Date",A[v]=Z+"Date",A[d]=Z+"Month",A[x]=Z+"FullYear",A[s]=Z+"Hours",A[a]=Z+"Minutes",A[o]=Z+"Seconds",A[n]=Z+"Milliseconds",A)[H],me=H===u?this.$D+(w-this.$W):w;if(H===d||H===x){var ye=this.clone().set(v,1);ye.$d[te](me),ye.init(),this.$d=ye.set(v,Math.min(this.$D,ye.daysInMonth())).$d}else te&&this.$d[te](me);return this.init(),this},S.set=function(E,w){return this.clone().$set(E,w)},S.get=function(E){return this[W.p(E)]()},S.add=function(E,w){var A,H=this;E=Number(E);var Z=W.p(w),te=i(function(Pe){var we=ee(H);return W.w(we.date(we.date()+Math.round(Pe*E)),H)},"y");if(Z===d)return this.set(d,this.$M+E);if(Z===x)return this.set(x,this.$y+E);if(Z===u)return te(1);if(Z===p)return te(7);var me=(A={},A[a]=t,A[s]=r,A[o]=e,A)[Z]||1,ye=this.$d.getTime()+E*me;return W.w(ye,this)},S.subtract=function(E,w){return this.add(-1*E,w)},S.format=function(E){var w=this,A=this.$locale();if(!this.isValid())return A.invalidDate||l;var H=E||"YYYY-MM-DDTHH:mm:ssZ",Z=W.z(this),te=this.$H,me=this.$m,ye=this.$M,Pe=A.weekdays,we=A.months,gt=A.meridiem,at=i(function(Ee,We,Ht,Tr){return Ee&&(Ee[We]||Ee(w,H))||Ht[We].slice(0,Tr)},"h"),Vt=i(function(Ee){return W.s(te%12||12,Ee,"0")},"d"),st=gt||function(Ee,We,Ht){var Tr=Ee<12?"AM":"PM";return Ht?Tr.toLowerCase():Tr};return H.replace(y,function(Ee,We){return We||function(Ht){switch(Ht){case"YY":return String(w.$y).slice(-2);case"YYYY":return W.s(w.$y,4,"0");case"M":return ye+1;case"MM":return W.s(ye+1,2,"0");case"MMM":return at(A.monthsShort,ye,we,3);case"MMMM":return at(we,ye);case"D":return w.$D;case"DD":return W.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return at(A.weekdaysMin,w.$W,Pe,2);case"ddd":return at(A.weekdaysShort,w.$W,Pe,3);case"dddd":return Pe[w.$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 st(te,me,!0);case"A":return st(te,me,!1);case"m":return String(me);case"mm":return W.s(me,2,"0");case"s":return String(w.$s);case"ss":return W.s(w.$s,2,"0");case"SSS":return W.s(w.$ms,3,"0");case"Z":return Z}return null}(Ee)||Z.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(E,w,A){var H,Z=this,te=W.p(w),me=ee(E),ye=(me.utcOffset()-this.utcOffset())*t,Pe=this-me,we=i(function(){return W.m(Z,me)},"D");switch(te){case x:H=we()/12;break;case d:H=we();break;case g:H=we()/3;break;case p:H=(Pe-ye)/6048e5;break;case u:H=(Pe-ye)/864e5;break;case s:H=Pe/r;break;case a:H=Pe/t;break;case o:H=Pe/e;break;default:H=Pe}return A?H:W.a(H)},S.daysInMonth=function(){return this.endOf(d).$D},S.$locale=function(){return fe[this.$L]},S.locale=function(E,w){if(!E)return this.$L;var A=this.clone(),H=Ce(E,w,!0);return H&&(A.$L=H),A},S.clone=function(){return W.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},j}(),it=mt.prototype;return ee.prototype=it,[["$ms",n],["$s",o],["$m",a],["$H",s],["$W",u],["$M",d],["$y",x],["$D",v]].forEach(function(j){it[j[1]]=function(S){return this.$g(S,j[0],j[1])}}),ee.extend=function(j,S){return j.$i||(j(S,mt,ee),j.$i=!0),ee},ee.locale=Ce,ee.isDayjs=xe,ee.unix=function(j){return ee(1e3*j)},ee.en=fe[V],ee.Ls=fe,ee.p={},ee})});var Hv={};uo(Hv,{microsoft365Planner:()=>Vv});module.exports=oe(Hv);var Yp=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,g=Object.keys(d);for(let x=0;x<g.length;x++){let v=g[x];v in u||(u[v]=d[v].bind(u))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:e});function s(u){var p;let d=r?.Parent?new a:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let g of d._zod.deferred)g();return d}return i(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}i(O,"$constructor");var Qp=Symbol("zod_brand"),Ue=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Er=class extends Error{static{i(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}i(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)}i(po,"getEnumValues");function Hi(e,t){return typeof t=="bigint"?t.toString():t}i(Hi,"jsonStringifyReplacer");function Sr(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(Sr,"cached");function Zi(e){return e==null}i(Zi,"nullish");function Ar(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(Ar,"cleanRegex");var Vi=Symbol("evaluating");function ge(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Vi)return n===void 0&&(n=Vi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(ge,"defineLazy");var fo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(qt,"isObject");var ed=Sr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function qi(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)}i(qi,"isPlainObject");var Gi=new Set(["string","number","symbol"]);function ht(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ht,"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}i($r,"clone");function ue(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>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:i(()=>t.error,"error")}:t}i(ue,"normalizeParams");function Wi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(Wi,"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 yt(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}i(yt,"aborted");function Ke(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Ke,"prefixIssues");function Ir(e){return typeof e=="string"?e:e?.message}i(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}i(Je,"finalizeIssue");function Ki(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(Ki,"getLengthableOrigin");function mo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(mo,"issue");var Ji=i((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,Hi,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),Xi=O("$ZodError",Ji),Gt=O("$ZodError",Ji,{Parent:Error});var nd=i(e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ue;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Je(p,a,je())));throw fo(u,o?.callee),u}return s.value},"_parse"),wr=nd(Gt),od=i(e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Je(p,a,je())));throw fo(u,o?.callee),u}return s.value},"_parseAsync"),Or=od(Gt),id=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ue;return a.issues.length?{success:!1,error:new(e??Xi)(a.issues.map(s=>Je(s,o,je())))}:{success:!0,data:a.value}},"_safeParse"),Wt=id(Gt),ad=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Je(s,o,je())))}:{success:!0,data:a.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 Yi=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Qi=/^-?\d+n?$/;var go=/^-?\d+(?:\.\d+)?$/,ea=/^(?:true|false)$/i;var vt=O("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var ta=O("$ZodCheckMinLength",(e,t)=>{var r;vt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Zi(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=Ki(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;vt.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),ra=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 oa={major:4,minor:3,patch:6};var ce=O("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=oa;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((s,u,p)=>{let d=yt(s),g;for(let x of u){if(x._zod.def.when){if(!x._zod.def.when(s))continue}else if(d)continue;let v=s.issues.length,l=x._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new Ue;if(g||l instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await l,s.issues.length!==v&&(d||(d=yt(s,v)))});else{if(s.issues.length===v)continue;d||(d=yt(s,v))}}return g?g.then(()=>s):s},"runChecks"),a=i((s,u,p)=>{if(yt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new Ue;return d.then(g=>e._zod.parse(g,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(g=>a(g,s,u)):a(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new Ue;return p.then(d=>o(d,n,u))}return o(p,n,u)}}ge(e,"~standard",()=>({validate:i(o=>{try{let a=Wt(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Kt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kr=O("$ZodString",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Yi(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),kr.init(e,t)});var ca=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 la=O("$ZodNumber",(e,t)=>{ce.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 a=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,...a?{received:a}:{}}),r}});var vo=O("$ZodBoolean",(e,t)=>{ce.init(e,t),e._zod.pattern=ea,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}}),pa=O("$ZodBigInt",(e,t)=>{ce.init(e,t),e._zod.pattern=Qi,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 da=O("$ZodAny",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r}),fa=O("$ZodUnknown",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r});var ma=O("$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}}),ga=O("$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,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function ia(e,t,r){e.issues.length&&t.issues.push(...Ke(r,e.issues)),t.value[r]=e.value}i(ia,"handleArrayResult");var ha=O("$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 a=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?a.push(p.then(d=>ia(d,r,s))):ia(p,r,s)}return a.length?Promise.all(a).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}i(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=Wi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(cd,"normalizeDef");function ld(e,t,r,n,o,a){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,g=p.optout==="optional";for(let x in t){if(u.has(x))continue;if(d==="never"){s.push(x);continue}let v=p.run({value:t[x],issues:[]},n);v instanceof Promise?e.push(v.then(l=>Rr(l,r,x,t,g))):Rr(v,r,x,t,g)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}i(ld,"handleCatchall");var ya=O("$ZodObject",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=Sr(()=>cd(t));ge(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let g=u[d]._zod;if(g.values){p[d]??(p[d]=new Set);for(let x of g.values)p[d].add(x)}}return p});let o=qt,a=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 g=[],x=s.shape;for(let v of s.keys){let l=x[v],f=l._zod.optout==="optional",y=l._zod.run({value:d[v],issues:[]},p);y instanceof Promise?g.push(y.then(h=>Rr(h,u,v,d,f))):Rr(y,u,v,d,f)}return a?ld(g,d,u,p,n.value,e):g.length?Promise.all(g).then(()=>u):u}});function aa(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!yt(a));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(a=>a.issues.map(s=>Je(s,n,je())))}),t)}i(aa,"handleUnionResults");var _o=O("$ZodUnion",(e,t)=>{ce.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(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>Ar(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},a);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=>aa(p,o,e,a)):aa(u,o,e,a)}});var va=O("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_o.init(e,t);let r=e._zod.parse;ge(e._zod,"propValues",()=>{let o={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);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=Sr(()=>{let o=t.options,a=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(a.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);a.set(p,s)}}return a});e._zod.parse=(o,a)=>{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,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var _a=O("$ZodRecord",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!qi(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],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 g=t.valueType._zod.run({value:o[d],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Ke(d,x.issues)),r.value[d]=x.value})):(g.issues.length&&r.issues.push(...Ke(d,g.issues)),r.value[d]=g.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 x=t.keyType._zod.run({value:Number(u),issues:[]},n);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(p=x)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(x=>Je(x,n,je())),input:u,path:[u],inst:e});continue}let g=t.valueType._zod.run({value:o[u],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Ke(u,x.issues)),r.value[p.value]=x.value})):(g.issues.length&&r.issues.push(...Ke(u,g.issues)),r.value[p.value]=g.value)}}return a.length?Promise.all(a).then(()=>r):r}});var Pa=O("$ZodEnum",(e,t)=>{ce.init(e,t);let r=po(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Gi.has(typeof o)).map(o=>typeof o=="string"?ht(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),xa=O("$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"?ht(n):n?ht(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}});var ba=O("$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 Ue;return r.value=o,r}});function sa(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(sa,"handleOptionalResult");var Ta=O("$ZodOptional",(e,t)=>{ce.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(`^(${Ar(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(a=>sa(a,r.value)):sa(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Ea=O("$ZodNullable",(e,t)=>{ce.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(`^(${Ar(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 Ia=O("$ZodPipe",(e,t)=>{ce.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 a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>zr(s,t.in,n)):zr(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>zr(a,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)}i(zr,"handlePipeResult");var Sa=O("$ZodCustom",(e,t)=>{vt.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(a=>ua(a,r,n,e));ua(o,r,n,e)}});function ua(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(mo(o))}}i(ua,"handleRefineResult");var $a,md=Symbol("ZodOutput"),gd=Symbol("ZodInput"),Po=class{static{i(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 wa(){return new Po}i(wa,"registry");($a=globalThis).__zod_globalRegistry??($a.__zod_globalRegistry=wa());var xo=globalThis.__zod_globalRegistry;function Oa(e,t){return new e({type:"string",...ue(t)})}i(Oa,"_string");function za(e,t){return new e({type:"string",coerce:!0,...ue(t)})}i(za,"_coercedString");function Ra(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(t)})}i(Ra,"_url");function ka(e,t){return new e({type:"number",checks:[],...ue(t)})}i(ka,"_number");function Da(e,t){return new e({type:"number",coerce:!0,checks:[],...ue(t)})}i(Da,"_coercedNumber");function Ca(e,t){return new e({type:"boolean",...ue(t)})}i(Ca,"_boolean");function Na(e,t){return new e({type:"boolean",coerce:!0,...ue(t)})}i(Na,"_coercedBoolean");function Ua(e,t){return new e({type:"bigint",coerce:!0,...ue(t)})}i(Ua,"_coercedBigint");function Ma(e){return new e({type:"any"})}i(Ma,"_any");function La(e){return new e({type:"unknown"})}i(La,"_unknown");function ja(e,t){return new e({type:"void",...ue(t)})}i(ja,"_void");function Fa(e,t){return new e({type:"date",coerce:!0,...ue(t)})}i(Fa,"_coercedDate");function ke(e,t){return new ta({check:"min_length",...ue(t),minimum:e})}i(ke,"_minLength");function Xe(e,t){return new ra({check:"string_format",format:"regex",...ue(t),pattern:e})}i(Xe,"_regex");function Ba(e,t,r){let n=ue(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(Ba,"_custom");var he=O("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=O("ZodMiniString",(e,t)=>{kr.init(e,t),he.init(e,t)});function c(e){return Oa(Cr,e)}i(c,"string");var Va=O("ZodMiniStringFormat",(e,t)=>{yo.init(e,t),Cr.init(e,t)});var Id=O("ZodMiniURL",(e,t)=>{ca.init(e,t),Va.init(e,t)});function Ha(e){return Ra(Id,e)}i(Ha,"url");var bo=O("ZodMiniNumber",(e,t)=>{la.init(e,t),he.init(e,t)});function be(e){return ka(bo,e)}i(be,"number");var To=O("ZodMiniBoolean",(e,t)=>{vo.init(e,t),he.init(e,t)});function Q(e){return Ca(To,e)}i(Q,"boolean");var Za=O("ZodMiniBigInt",(e,t)=>{pa.init(e,t),he.init(e,t)});var Sd=O("ZodMiniAny",(e,t)=>{da.init(e,t),he.init(e,t)});function Xt(){return Ma(Sd)}i(Xt,"any");var Ad=O("ZodMiniUnknown",(e,t)=>{fa.init(e,t),he.init(e,t)});function U(){return La(Ad)}i(U,"unknown");var $d=O("ZodMiniVoid",(e,t)=>{ma.init(e,t),he.init(e,t)});function qa(e){return ja($d,e)}i(qa,"_void");var Ga=O("ZodMiniDate",(e,t)=>{ga.init(e,t),he.init(e,t)});var wd=O("ZodMiniArray",(e,t)=>{ha.init(e,t),he.init(e,t)});function F(e,t){return new wd({type:"array",element:e,...ue(t)})}i(F,"array");var Od=O("ZodMiniObject",(e,t)=>{ya.init(e,t),he.init(e,t),ge(e,"shape",()=>t.shape)});function m(e,t){let r={type:"object",shape:e??{},...ue(t)};return new Od(r)}i(m,"object");var zd=O("ZodMiniUnion",(e,t)=>{_o.init(e,t),he.init(e,t)});function B(e,t){return new zd({type:"union",options:e,...ue(t)})}i(B,"union");var Rd=O("ZodMiniDiscriminatedUnion",(e,t)=>{va.init(e,t),he.init(e,t)});function _t(e,t,r){return new Rd({type:"union",options:t,discriminator:e,...ue(r)})}i(_t,"discriminatedUnion");var kd=O("ZodMiniRecord",(e,t)=>{_a.init(e,t),he.init(e,t)});function M(e,t,r){return new kd({type:"record",keyType:e,valueType:t,...ue(r)})}i(M,"record");var Dd=O("ZodMiniEnum",(e,t)=>{Pa.init(e,t),he.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)})}i(G,"_enum");var Cd=O("ZodMiniLiteral",(e,t)=>{xa.init(e,t),he.init(e,t)});function k(e,t){return new Cd({type:"literal",values:Array.isArray(e)?e:[e],...ue(t)})}i(k,"literal");var Nd=O("ZodMiniTransform",(e,t)=>{ba.init(e,t),he.init(e,t)});function Ye(e){return new Nd({type:"transform",transform:e})}i(Ye,"transform");var Ud=O("ZodMiniOptional",(e,t)=>{Ta.init(e,t),he.init(e,t)});function P(e){return new Ud({type:"optional",innerType:e})}i(P,"optional");var Md=O("ZodMiniNullable",(e,t)=>{Ea.init(e,t),he.init(e,t)});function Yt(e){return new Md({type:"nullable",innerType:e})}i(Yt,"nullable");var Ld=O("ZodMiniPipe",(e,t)=>{Ia.init(e,t),he.init(e,t)});function Qe(e,t){return new Ld({type:"pipe",in:e,out:t})}i(Qe,"pipe");var jd=O("ZodMiniCustom",(e,t)=>{Sa.init(e,t),he.init(e,t)});function Nr(e,t){return Ba(jd,e??(()=>!0),t)}i(Nr,"custom");var Qt={};uo(Qt,{bigint:()=>Gd,boolean:()=>qd,date:()=>Wd,number:()=>Zd,string:()=>Hd});function Hd(e){return za(Cr,e)}i(Hd,"string");function Zd(e){return Da(bo,e)}i(Zd,"number");function qd(e){return Na(To,e)}i(qd,"boolean");function Gd(e){return Ua(Za,e)}i(Gd,"bigint");function Wd(e){return Fa(Ga,e)}i(Wd,"date");var Io=m({retryOnFailure:m({defaultValue:P(Q()),hide:P(Q())}),continueOnFailure:m({defaultValue:P(Q()),hide:P(Q())})}),Eo=class{constructor(t,r,n,o,a,s,u,p,d,g,x){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=a;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=g;this.aiMetadata=x}static{i(this,"IAction")}},ne=i(e=>new Eo(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=m({displayName:c(),description:P(c())}),q=i((e,t)=>m({type:k(t),required:Q(),defaultValue:P(Xt())}),"TPropertyValue");var Ae=m({...Y.shape,...q(c(),"SHORT_TEXT").shape}),Fe=m({...Y.shape,...q(c(),"LONG_TEXT").shape});var Ka=m({label:c(),value:U()}),Ur=m({disabled:P(Q()),placeholder:P(c()),options:F(Ka)});var $e=m({...Y.shape,options:Ur,...q(U(),"STATIC_DROPDOWN").shape}),Be=m({...Y.shape,options:Ur,...q(F(U()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var So=m({...Y.shape,...q(U(),"DROPDOWN").shape,refreshers:F(c())}),er=m({...Y.shape,...q(F(U()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=m({...Y.shape,...q(Q(),"CHECKBOX").shape});var He=m({...Y.shape,...q(be(),"NUMBER").shape});var tr=m({...Y.shape,...q(U(),"FILE").shape});var rr=m({...Y.shape,...q(c(),"DATE_TIME").shape});var Ja=M(c(),B([Ae,Fe,$e,er,Be,Ve,He,tr,rr])),nr=m({...Y.shape,properties:Ja,...q(F(U()),"ARRAY").shape});var or=m({...Y.shape,...q(B([M(c(),U())]),"JSON").shape});var Xa=B([Ae,$e,or,nr,Be]),Jd=M(c(),Xa),Ao=m({refreshers:F(c()),...Y.shape,...q(U(),"DYNAMIC").shape});var Mr=m({...Y.shape,...q(qa(),"MARKDOWN").shape});var ir=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ir||{}),Pt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Pt||{}),ar=(_=>(_.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",_.COMMUNICATION="COMMUNICATION",_.COMMERCE="COMMERCE",_.CORE="CORE",_.UNIVERSAL_AI="UNIVERSAL_AI",_.FLOW_CONTROL="FLOW_CONTROL",_.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",_.ACCOUNTING="ACCOUNTING",_.PRODUCTIVITY="PRODUCTIVITY",_.CONTENT_AND_FILES="CONTENT_AND_FILES",_.DEVELOPER_TOOLS="DEVELOPER_TOOLS",_.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",_.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",_.HUMAN_RESOURCES="HUMAN_RESOURCES",_.PAYMENT_PROCESSING="PAYMENT_PROCESSING",_.MARKETING="MARKETING",_.SALES_AND_CRM="SALES_AND_CRM",_))(ar||{});var sr=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(sr||{}),$o="both_client_credentials_and_authorization_code";var Me=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Me||{}),ur=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))(ur||{}),Xd=m({strategy:G(ur),paramName:P(c())}),cr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(cr||{});var Lr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lr||{}),Ya=m({status:P(be()),body:P(U()),headers:P(M(c(),c()))}),Qa=m({type:k("DELAY"),resumeDateTime:c(),requestIdToReply:P(c()),handlerId:P(c()),streamStepProgress:P(G(Lr))}),es=m({type:k("WEBHOOK"),requestId:c(),requestIdToReply:P(c()),response:Ya,handlerId:P(c()),streamStepProgress:P(G(Lr))}),Yd=B([Qa,es]);var Qd=m({body:U(),rawBody:P(U()),headers:M(c(),c()),queryParams:M(c(),c())});function _e(e){return e==null}i(_e,"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}i(lr,"isEmpty");function jr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(jr,"assertNotNullOrUndefined");var wo=Ne(require("crypto"),1);var ef=128,ut,xt,tf=i(e=>{!ut||ut.length<e?(ut=Buffer.allocUnsafe(e*ef),wo.default.randomFillSync(ut),xt=0):xt+e>ut.length&&(wo.default.randomFillSync(ut),xt=0),xt+=e},"fillPool"),rf=i(e=>(tf(e|=0),ut.subarray(xt-e,xt)),"random"),nf=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===a)return s}}},"customRandom"),rs=i((e,t=21)=>nf(e,t,rf),"customAlphabet");var of="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ns=21,S$=c().check(Xe(new RegExp(`^[0-9a-zA-Z]{${ns}}$`))),af=rs(of,ns);var et=Qe(Ye(e=>e instanceof Date?e.toISOString():e),c()),Oe={id:c(),created:et,updated:et},ie=i(e=>P(Yt(e)),"Nullable");function Oo(e){return P(Yt(G(e)))}i(Oo,"NullableEnum");var w$=Qe(Ye(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),P(Q())),Fr=i(e=>Qe(Ye(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),P(F(e))),"OptionalArrayFromQuery");var R$=M(c(),U());var pr=(g=>(g.OPENAI="openai",g.OPENROUTER="openrouter",g.ANTHROPIC="anthropic",g.AZURE="azure",g.GOOGLE="google",g.ACTIVEPIECES="activepieces",g.CLOUDFLARE_GATEWAY="cloudflare-gateway",g.CUSTOM="custom",g.BEDROCK="bedrock",g.MISTRAL="mistral",g))(pr||{});var H$=c().check(Xe(/^#[0-9A-Fa-f]{6}$/));var q$=m({filename:c(),data:U(),type:k("file"),mimetype:P(c())});var sf=Ne(is());var Q$=m({...Oe,name:c(),permissions:F(c()),platformId:ie(c()),type:c(),userCount:P(be())});var as=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(as||{}),zo=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(zo||{}),Ro=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ro||{});var ko=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(ko||{});var Do=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Do||{});var uf=m({mode:G(as),value:U()}),cf=m({auth:P(c()),fields:M(c(),uf)}),lf=m({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:P(cf)}),pf=m({type:k("PIECE"),toolName:c().check(ke(1)),pieceMetadata:lf}),df=m({type:k("none")}),ff=m({type:k("access_token"),accessToken:c()}),mf=m({type:k("api_key"),apiKey:c(),apiKeyHeader:c()}),gf=m({type:k("headers"),headers:M(c(),c())}),hf=_t("type",[df,ff,mf,gf]),ss=m({type:k("FLOW"),toolName:c().check(ke(1)),externalFlowId:c(),flowDisplayName:P(c())}),us=m({type:k("MCP"),toolName:c().check(ke(1)),serverUrl:Ha(),protocol:G(Ro),auth:hf}),cs=m({type:k("KNOWLEDGE_BASE"),toolName:c().check(ke(1)),sourceType:G(zo),sourceId:c(),sourceName:c()}),yf=_t("type",[pf,ss,us,cs]),vf=m({displayName:c(),description:P(c()),type:G(ko)}),ls=m({type:k("MARKDOWN"),markdown:c()}),bt={type:k("TOOL_CALL"),input:ie(M(c(),U())),output:P(U()),toolName:c(),status:G(Do),toolCallId:c(),startTime:c(),endTime:P(c())},Sw=m(bt),ps=_t("toolCallType",[m({...bt,toolCallType:k("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),m({...bt,toolCallType:k("FLOW"),displayName:c(),externalFlowId:c()}),m({...bt,toolCallType:k("MCP"),displayName:c(),serverUrl:c()}),m({...bt,toolCallType:k("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),m({...bt,toolCallType:k("UNKNOWN"),displayName:c()})]),_f=B([ls,ps]);var Co=(r=>(r.IMAGE="image",r.TEXT="text",r))(Co||{}),Ze=m({apiKey:c()}),Pf=Ze,xf=m({apiKey:c(),apiKeyHash:c()}),bf=Ze,Tf=Ze,Ef=Ze,If=Ze,Sf=Ze,Af=Ze,$f=Ze,ds=m({accessKeyId:c().check(ke(1)),secretAccessKey:c().check(ke(1))}),wf=m({}),Of=m({}),zf=m({}),Rf=m({}),kf=m({}),Df=m({}),fs=m({modelId:c(),modelName:c(),modelType:G(Co)}),ms=m({apiKeyHeader:c(),baseUrl:c(),models:F(fs),defaultHeaders:P(M(c(),c()))}),gs=m({accountId:c(),gatewayId:c(),models:F(fs),vertexProject:P(c()),vertexRegion:P(c())}),hs=m({resourceName:c(),apiVersion:Qe(Ye(e=>typeof e=="string"&&e.trim().length===0?void 0:e),P(c()))}),ys=m({region:c().check(ke(1))}),Cf=B([Pf,Ef,If,Sf,Af,Tf,bf,xf,ds,$f]),vs=B([ms,gs,hs,ys,wf,zf,Rf,kf,Of,Df]),Nf=m({id:c(),name:c(),type:G(Co)}),Uf=m({id:c(),name:c(),provider:G(pr),config:vs,enabledForChat:Q()}),Mf=m({provider:G(pr),config:vs,auth:Cf,platformId:c()});var Ow={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Lf=m({base64Url:c(),fileName:c(),extension:P(c())}),jf=m({mimeType:c(),url:c(),fileName:P(c())}),No=B([Lf,jf]);var Ff=B([m({type:k("file"),value:No}),m({type:k("markdown"),value:c(),files:P(F(No))})]),Bf=m({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||{}),xs=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(xs||{}),Uo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Uo||{});var Vf=B([m({...Oe,name:c(),externalId:c(),type:k("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:m({options:F(m({value:c()}))})}),m({...Oe,name:c(),externalId:c(),type:B([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:c(),projectId:c()})]),Hf=m({...Oe,name:c(),folderId:ie(c()),projectId:c(),externalId:c(),status:Oo(xs),trigger:Oo(Ps)}),Zf=m({...Oe,tableId:c(),projectId:c(),cells:M(c(),m({updated:c(),created:c(),value:U(),fieldName:c()}))}),qf=m({events:F(G(Uo)),webhookUrl:c(),flowId:c()}),Gf=m({fields:F(m({id:c(),name:c()})),rows:F(M(c(),c())),name:c()}),Wf=m({projectId:c(),limit:P(Qt.number()),cursor:P(c()),name:P(c()),externalIds:Fr(c()),folderId:P(c()),folderIds:Fr(c())}),Kf=m({records:F(F(m({fieldId:c(),value:Ts()}))),tableId:c()}),Jf=m({cells:P(F(m({fieldId:c(),value:Ts()}))),tableId:c(),agentUpdate:P(Q())}),bs=_t("operator",[ct("eq"),ct("neq"),ct("gt"),ct("gte"),ct("lt"),ct("lte"),ct("co"),_s("exists"),_s("not_exists")]),Xf=m({tableId:c(),limit:P(Qt.number()),cursor:P(c()),filters:Fr(bs)});function Ts(){return Qe(Ye(e=>e==null?e:String(e)),Yt(c()))}i(Ts,"coerceToString");function ct(e){return m({fieldId:c(),operator:k(e),value:c()})}i(ct,"valueFilter");function _s(e){return m({fieldId:c(),operator:k(e)})}i(_s,"existenceFilter");var Yf=m({status:P(be()),body:P(U()),headers:P(M(c(),c()))}),Qf=m({...Oe,deleted:ie(et),ownerId:c(),displayName:c(),platformId:c(),externalId:ie(c())});var Es=m({name:c(),description:P(c()),type:c(),required:Q()}),em=m({pieceName:c(),triggerName:c(),input:m({toolName:c(),toolDescription:c(),inputSchema:F(Es),returnsResponse:Q()})});var Is="^[0-9]+\\.[0-9]+\\.[0-9]+$",Kw=new RegExp(Is),rm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",Jw=c().check(Xe(new RegExp(Is))),Xw=c().check(Xe(new RegExp(rm))),nm=m({packageType:k("ARCHIVE"),pieceType:G(Pt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),Ss=m({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:c(),pieceVersion:c()}),As=m({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),Yw=B([Ss,As]),Qw=B([nm,Ss,As]),$s=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))($s||{}),om=m({type:G($s),cronExpression:c(),timezone:c()}),eO=m({...Oe,type:G(Me),projectId:c(),flowId:c(),triggerName:c(),schedule:ie(om),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:ie(c()),simulate:Q()}),ws=(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))(ws||{}),Os=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Os||{}),zs=(r=>(r.S3="S3",r.DB="DB",r))(zs||{}),tO=m({...Oe,projectId:ie(c()),platformId:ie(c()),type:G(ws),compression:G(Os),data:P(U()),location:G(zs),size:ie(be()),fileName:ie(c()),s3Key:ie(c()),metadata:ie(M(c(),c()))}),Rs=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Rs||{}),ks=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ks||{}),rO=m({id:c(),email:c(),firstName:c(),status:G(ks),externalId:ie(c()),platformId:ie(c()),platformRole:G(Rs),lastName:c(),created:et,updated:et,lastActiveDate:ie(et),imageUrl:ie(c())});var Mo=m({...Y.shape,...q(M(c(),U()),"OBJECT").shape});var Us=m({...Y.shape,...q(c(),"COLOR").shape});var Lo=B([Ae,Fe,Mr,Ve,$e,Be,So,er,Ao,He,nr,Mo,or,rr,tr,Us]),R={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 Le=m({displayName:c(),description:P(c())});var Ms=m({username:c(),password:c()}),jo=m({...Le.shape,username:m({displayName:c(),description:P(c())}),password:m({displayName:c(),description:P(c())}),...q(Ms,"BASIC_AUTH").shape});var um=M(c(),B([Ae,Fe,He,Ve,$e])),Fo=m({...Le.shape,props:um,...q(U(),"CUSTOM_AUTH").shape});var lt=m({...Le.shape,...q(m({auth:c()}),"SECRET_TEXT").shape});var cm=M(c(),B([Ae,Fe,lt,He,Ve,$e,Be,Mr])),Ls=m({...Le.shape,props:cm,...q(U(),"OIDC").shape});var Bo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Bo||{}),js=B([Ae,lt,$e]),Fs=M(c(),js),lm=m({props:P(M(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(Bo)),grantType:P(B([G(sr),k($o)])),extra:P(M(c(),c()))}),Bs=m({access_token:c(),props:P(Fs),data:M(c(),Xt())}),Vo=m({...Le.shape,...lm.shape,...q(Bs,"OAUTH2").shape});var Tt=B([jo,Fo,Ls,Vo,lt]),dr="Connection",Ho={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 Dz={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=m({...Y.shape,...q(U(),"CUSTOM").shape,code:c()});var dm=B([Lo,Tt]),Zo=M(c(),dm),eR=M(c(),Lo);var Vs=B([m({strategy:k("CRON"),cronExpression:c()}),m({strategy:k("NONE")})]),Et=class{constructor(t,r,n,o,a,s,u,p,d,g,x,v,l,f,y,h,_,T,V){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=a;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=g;this.onEnable=x;this.onDisable=v;this.onStart=l;this.run=f;this.test=y;this.sampleData=h;this.testStrategy=_;this.outputSchema=T;this.aiMetadata=V}static{i(this,"ITrigger")}},It=i(e=>{switch(e.type){case"WEBHOOK":return new Et(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 Et(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 Et(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 Et(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,_e(e.sampleData)&&_e(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Hs="2",Vr="0.82.0";var qo=class{constructor(t,r,n,o,a,s,u,p,d=Vr,g,x=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=g;this.description=x;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:Hs}),"getContextInfo");(!fm(d)||mm(d,Vr))&&(this.minimumSupportedRelease=Vr),a.forEach(v=>this._actions[v.name]=v),s.forEach(v=>this._triggers[v.name]=v)}static{i(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=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new qo(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)}i(fm,"isValidSimpleSemver");function mm(e,t){let[r,n,o]=e.split(".").map(Number),[a,s,u]=t.split(".").map(Number);return r!==a?r<a:n!==s?n<s:o<u}i(mm,"isSemverLessThan");var gm=P(M(c(),M(c(),c()))),qs=m({id:P(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:P(c()),directoryPath:P(c()),auth:P(B([Tt,F(Tt)])),version:c(),categories:P(F(G(ar))),minimumSupportedRelease:P(c()),maximumSupportedRelease:P(c()),i18n:gm}),hm=G(["human","ai","both"]),Gs=m({description:P(c()),idempotent:P(Q())}),Ws=m({name:c(),displayName:c(),description:c(),props:Zo,requireAuth:Q(),errorHandlingOptions:P(Io),outputSchema:P(Nr()),audience:P(hm),aiMetadata:P(Gs)}),Ks=m({name:c(),displayName:c(),description:c(),props:Zo,errorHandlingOptions:P(Io),type:G(Me),sampleData:U(),handshakeConfiguration:P(Nr()),renewConfiguration:P(Vs),testStrategy:G(cr),outputSchema:P(Nr()),aiMetadata:P(Gs)}),ym=m({...qs.shape,actions:M(c(),Ws),triggers:M(c(),Ks)}),vm=m({...qs.shape,actions:be(),triggers:be(),suggestedActions:P(F(Ks)),suggestedTriggers:P(F(Ws))}),Js=m({projectUsage:be(),tags:P(F(c())),pieceType:G(Pt),packageType:G(ir),platformId:P(c()),archiveId:P(c())}),ek=m({...ym.shape,...Js.shape}),tk=m({...vm.shape,...Js.shape}),rk=m({name:c(),version:c()});var _m=Ne(require("path")),Pm=Ne(require("fs/promises"));var fr="login.microsoftonline.com",Ys="login.microsoftonline.us",Xs={[fr]:"https://graph.microsoft.com",[Ys]:"https://graph.microsoft.us"},Qs=R.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:fr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:fr},{label:"US Government (GCC High)",value:Ys}]}});function eu(e){return e??fr}i(eu,"resolveCloudHost");function St(e){return eu(e.props?.cloud)}i(St,"getMicrosoftCloudFromAuth");function At(e){let t=eu(e);return Xs[t]??Xs[fr]}i(At,"getGraphBaseUrl");var hc=Ne(gc());var jh=`
|
|
4
|
+
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]:(a=o.value[1],[4,e.getRequestData(a.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(a.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=a.id,a.dependsOn!==void 0&&a.dependsOn.length>0&&(s.dependsOn=a.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 a=this.requests.entries(),s=void 0,u=a.next();!u.done&&u.value[1].id!==t;)s=u,u=a.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})();Yr.BatchRequestContent=qm});var Hu=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.BatchResponseContent=void 0;var Gm=(ue(),ie(se)),Wm=(function(){function e(t){this.responses=new Map,this.update(t)}return i(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 Gm.__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})();Qr.BatchResponseContent=Wm});var ei=b(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.GRAPH_URLS=ot.GRAPH_BASE_URL=ot.GRAPH_API_VERSION=void 0;ot.GRAPH_API_VERSION="v1.0";ot.GRAPH_BASE_URL="https://graph.microsoft.com/";ot.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(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.GraphClientError=void 0;var Km=(ue(),ie(se)),Jm=(function(e){Km.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return i(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t})(Error);en.GraphClientError=Jm});var tn=b(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isCustomHost=ze.isGraphURL=ze.serializeContent=ze.urlJoin=ze.oDataQueryNames=void 0;var Xm=ei(),Ym=Ge();ze.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var Qm=i(function(e){var t=i(function(a){return a.replace(/\/+$/,"")},"removePostSlash"),r=i(function(a){return a.replace(/^\/+/,"")},"removePreSlash"),n=i(function(a,s){return[t(a),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");ze.urlJoin=Qm;var eg=i(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");ze.serializeContent=eg;var tg=i(function(e){return Vu(e)},"isGraphURL");ze.isGraphURL=tg;var rg=i(function(e,t){return t.forEach(function(r){return ng(r)}),Vu(e,t)},"isCustomHost");ze.isCustomHost=rg;var Vu=i(function(e,t){if(t===void 0&&(t=Xm.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"),ng=i(function(e){if(e.indexOf("/")!==-1)throw new Ym.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 it=b(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.MiddlewareControl=void 0;var og=(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],a=o.constructor;this.middlewareOptions.set(a,o)}}return i(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e})();rn.MiddlewareControl=og});var zt=b(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.cloneRequestWithNewUrl=Re.appendRequestHeader=Re.setRequestHeader=Re.getRequestHeader=Re.generateUUID=void 0;var Zu=(ue(),ie(se)),ig=i(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");Re.generateUUID=ig;var ag=i(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,a=0,s=o.length;a<s;a++)if(o[a][0]===r){n=o[a][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Re.getRequestHeader=ag;var sg=i(function(e,t,r,n){var o,a;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,(a={},a[r]=n,a))},"setRequestHeader");Re.setRequestHeader=sg;var ug=i(function(e,t,r,n){var o,a;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=(a={},a[r]=n,a):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Re.appendRequestHeader=ug;var cg=i(function(e,t){return Zu.__awaiter(void 0,void 0,void 0,function(){var r,n,o,a,s,u,p,d,g,x,v,l,f;return Zu.__generator(this,function(y){switch(y.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=y.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=y.sent(),y.label=4;case 4:return r=n,o=t.method,a=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,g=t.cache,x=t.redirect,v=t.integrity,l=t.keepalive,f=t.signal,[2,new Request(e,{method:o,headers:a,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:g,redirect:x,integrity:v,keepalive:l,signal:f})]}})})},"cloneRequestWithNewUrl");Re.cloneRequestWithNewUrl=cg});var ti=b(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.AuthenticationHandlerOptions=void 0;var lg=(function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return i(e,"AuthenticationHandlerOptions"),e})();nn.AuthenticationHandlerOptions=lg});var kt=b(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TelemetryHandlerOptions=Rt.FeatureUsageFlag=void 0;var qu=it(),ri;(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"})(ri||(Rt.FeatureUsageFlag=ri={}));var pg=(function(){function e(){this.featureUsage=ri.NONE}return i(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof qu.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new qu.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})();Rt.TelemetryHandlerOptions=pg});var an=b(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.AuthenticationHandler=void 0;var Gu=(ue(),ie(se)),Wu=tn(),dg=it(),fg=zt(),mg=ti(),Ku=kt(),gg=(function(){function e(t){this.authenticationProvider=t}return i(e,"AuthenticationHandler"),e.prototype.execute=function(t){return Gu.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u;return Gu.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Wu.isGraphURL)(r)||t.customHosts&&(0,Wu.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof dg.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(mg.AuthenticationHandlerOptions)),o=void 0,a=void 0,n&&(o=n.authenticationProvider,a=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(a)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,fg.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),Ku.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Ku.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})();on.AuthenticationHandler=gg});var un=b(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.HTTPMessageHandler=void 0;var Ju=(ue(),ie(se)),hg=(function(){function e(){}return i(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return Ju.__awaiter(this,void 0,void 0,function(){var r;return Ju.__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})();sn.HTTPMessageHandler=hg});var hr=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.RetryHandlerOptions=void 0;var yg=(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 i(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})();cn.RetryHandlerOptions=yg});var pn=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.RetryHandler=void 0;var Dt=(ue(),ie(se)),ni=gr(),vg=it(),Xu=zt(),Yu=hr(),Qu=kt(),_g=(function(){function e(t){t===void 0&&(t=new Yu.RetryHandlerOptions),this.options=t}return i(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===ni.RequestMethod.PUT||n===ni.RequestMethod.PATCH||n===ni.RequestMethod.POST;if(o){var a=(0,Xu.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(a)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=i(function(){return Number(Math.random().toFixed(3))},"getRandomness"),a=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return a!==null?Number.isNaN(Number(a))?s=Math.round((new Date(a).getTime()-Date.now())/1e3):s=Number(a):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 Dt.__awaiter(this,void 0,void 0,function(){var r;return Dt.__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 vg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Yu.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return Dt.__awaiter(this,void 0,void 0,function(){var o;return Dt.__generator(this,function(a){switch(a.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return a.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,Xu.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 a.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,a.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n;return Dt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),Qu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Qu.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})();ln.RetryHandler=_g});var yr=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.RedirectHandlerOptions=void 0;var Pg=(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 i(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e})();dn.RedirectHandlerOptions=Pg});var mn=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.RedirectHandler=void 0;var Ct=(ue(),ie(se)),xg=gr(),bg=it(),Tg=zt(),oi=yr(),ec=kt(),Eg=(function(){function e(t){t===void 0&&(t=new oi.RedirectHandlerOptions),this.options=t}return i(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),a,s;o!==null&&(a=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof a<"u"&&typeof s<"u"&&a!==s},e.prototype.updateRequestUrl=function(t,r){return Ct.__awaiter(this,void 0,void 0,function(){var n,o;return Ct.__generator(this,function(a){switch(a.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,Tg.cloneRequestWithNewUrl)(t,r.request)];case 2:o=a.sent(),a.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof bg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(oi.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new oi.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return Ct.__awaiter(this,void 0,void 0,function(){var o,a;return Ct.__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=xg.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return a=this.getLocationHeader(o),!this.isRelativeURL(a)&&this.shouldDropAuthorizationHeader(o.url,a)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(a,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 Ct.__awaiter(this,void 0,void 0,function(){var r,n;return Ct.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,ec.TelemetryHandlerOptions.updateFeatureUsageFlag(t,ec.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})();fn.RedirectHandler=Eg});var tc=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.PACKAGE_VERSION=void 0;gn.PACKAGE_VERSION="3.0.7"});var vn=b(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.TelemetryHandler=void 0;var rc=(ue(),ie(se)),nc=tn(),Ig=tc(),Ag=it(),hn=zt(),Sg=kt(),$g=(function(){function e(){}return i(e,"TelemetryHandler"),e.prototype.execute=function(t){return rc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s;return rc.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,nc.isGraphURL)(r)||t.customHosts&&(0,nc.isCustomHost)(r,t.customHosts)?(n=(0,hn.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,hn.generateUUID)(),(0,hn.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat(Ig.PACKAGE_VERSION),a=void 0,t.middlewareControl instanceof Ag.MiddlewareControl&&(a=t.middlewareControl.getMiddlewareOptions(Sg.TelemetryHandlerOptions)),a&&(s=a.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,hn.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})();yn.TelemetryHandler=$g});var oc=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.MiddlewareFactory=void 0;var wg=an(),Og=un(),zg=yr(),Rg=hr(),kg=mn(),Dg=pn(),Cg=vn(),Ng=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Ug=(function(){function e(){}return i(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new wg.AuthenticationHandler(t),o=new Dg.RetryHandler(new Rg.RetryHandlerOptions),a=new Cg.TelemetryHandler,s=new Og.HTTPMessageHandler;if(r.push(n),r.push(o),Ng()){var u=new kg.RedirectHandler(new zg.RedirectHandlerOptions);r.push(u)}return r.push(a),r.push(s),r},e})();_n.MiddlewareFactory=Ug});var xn=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ChaosStrategy=void 0;var ic;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(ic||(Pn.ChaosStrategy=ic={}))});var ii=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ChaosHandlerOptions=void 0;var Mg=xn(),Lg=(function(){function e(t,r,n,o,a,s){if(t===void 0&&(t=Mg.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=a,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return i(e,"ChaosHandlerOptions"),e})();bn.ChaosHandlerOptions=Lg});var ac=b(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.httpStatusCode=Nt.methodStatusCode=void 0;Nt.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]};Nt.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 cc=b(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.ChaosHandler=void 0;var Tn=(ue(),ie(se)),jg=it(),Fg=zt(),sc=ac(),ai=ii(),uc=xn(),Bg=(function(){function e(t,r){t===void 0&&(t=new ai.ChaosHandlerOptions),this.options=t,this.manualMap=r}return i(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 a=sc.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:a,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,Fg.generateUUID)(),a=new Date,s=this.createResponseHeaders(t,o,a.toString()),u=this.createResponseBody(t,o,a.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 Tn.__awaiter(this,void 0,void 0,function(){return Tn.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===uc.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=sc.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===uc.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var a=this.getRelativeURL(r);this.manualMap.get(a)!==void 0?this.manualMap.get(a).get(n)!==void 0&&(t.statusCode=this.manualMap.get(a).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(a)&&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 jg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(ai.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new ai.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return Tn.__awaiter(this,void 0,void 0,function(){var r;return Tn.__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})();En.ChaosHandler=Bg});var vr=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.ResponseType=void 0;var lc;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(lc||(In.ResponseType=lc={}))});var ui=b(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.GraphResponseHandler=Ut.DocumentType=void 0;var An=(ue(),ie(se)),mt=vr(),si;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})(si||(Ut.DocumentType=si={}));var Sn;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Sn||(Sn={}));var $n;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})($n||($n={}));var Hg=(function(){function e(){}return i(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(a){try{var s=new DOMParser,u=s.parseFromString(a,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return An.__awaiter(this,void 0,void 0,function(){var n,o,a,s;return An.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),a=r,a){case mt.ResponseType.ARRAYBUFFER:return[3,1];case mt.ResponseType.BLOB:return[3,3];case mt.ResponseType.DOCUMENT:return[3,5];case mt.ResponseType.JSON:return[3,7];case mt.ResponseType.STREAM:return[3,9];case mt.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,si.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($n.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp($n.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Sn.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Sn.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 An.__awaiter(this,void 0,void 0,function(){var o;return An.__generator(this,function(a){switch(a.label){case 0:return r!==mt.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=a.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;a.label=3;case 3:return[2]}})})},e})();Ut.GraphResponseHandler=Hg});var ci=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.Range=void 0;var Vg=(function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return i(e,"Range"),e})();wn.Range=Vg});var li=b(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.UploadResult=void 0;var Zg=(function(){function e(t,r){this._location=r,this._responseBody=t}return i(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:i(function(){return this._location},"get"),set:i(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:i(function(){return this._responseBody},"get"),set:i(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e})();On.UploadResult=Zg});var di=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.LargeFileUploadTask=void 0;var Ie=(ue(),ie(se)),pi=Ge(),qg=ui(),pc=vr(),zn=ci(),Gg=li(),Wg=(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 pi.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 zn.Range(0,this.options.rangeSize-1)}return i(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Ie.__awaiter(this,void 0,void 0,function(){var a,s;return Ie.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return a=u.sent(),s={url:a.uploadUrl,expiry:new Date(a.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new zn.Range;var n=r.split("-"),o=parseInt(n[0],10),a=parseInt(n[1],10);return Number.isNaN(a)&&(a=this.file.size-1),new zn.Range(o,a)},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 zn.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 pi.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 Ie.__awaiter(this,void 0,void 0,function(){var t,r,n,o,a,s,u;return Ie.__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(a=p.sent(),!a)throw new pi.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,qg.GraphResponseHandler.getResponse(a)];case 4:return s=p.sent(),a.status===201||a.status===200&&s.id?(this.reportProgress(t,r),[2,Gg.UploadResult.CreateUploadResult(s,a.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 Ie.__awaiter(this,void 0,void 0,function(){return Ie.__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 Ie.__awaiter(this,void 0,void 0,function(){return Ie.__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(pc.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(pc.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__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 Ie.__awaiter(this,void 0,void 0,function(){return Ie.__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})();Rn.LargeFileUploadTask=Wg});var fi=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.FileUpload=void 0;var Kg=Ge(),Jg=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Kg.GraphClientError("Please provide the upload content, name of the file and size of the file")}return i(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e})();kn.FileUpload=Jg});var mi=b(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.getValidRangeSize=void 0;var Xg=5*1024*1024,Yg=i(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),Qg=i(function(e){e===void 0&&(e=Xg);var t=60*1024*1024;return e>t&&(e=t),Yg(e)},"getValidRangeSize");Dn.getValidRangeSize=Qg});var fc=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.OneDriveLargeFileUploadTask=void 0;var We=(ue(),ie(se)),dc=Ge(),eh=fi(),th=di(),rh=mi(),nh=(function(e){We.__extends(t,e);function t(r,n,o,a){return e.call(this,r,n,o,a)||this}return i(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,a;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),a=o.size;else if(typeof File<"u"&&r instanceof File)o=r,a=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;a=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:a}},t.create=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var a,s,u;return We.__generator(this,function(p){if(!r||!n||!o)throw new dc.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return a=o.fileName,s=t.getFileInfo(n,a),u=new eh.FileUpload(s.content,a,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var a,s,u,p;return We.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new dc.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return a=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,a,s)];case 1:return u=d.sent(),p=(0,rh.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 a;return We.__generator(this,function(s){return a={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,a)]})})},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(a){switch(a.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,a.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t})(th.LargeFileUploadTask);Cn.OneDriveLargeFileUploadTask=nh});var gc=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.StreamUpload=void 0;var mc=(ue(),ie(se)),_r=Ge(),oh=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new _r.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return i(e,"StreamUpload"),e.prototype.sliceFile=function(t){return mc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p;return mc.__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 _r.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,a=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===a)return[2,this.previousSlice.fileSlice];if(t.maxValue===a)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,a+1)),r=t.maxValue-a}}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 _r.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 a=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new _r.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,a.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(a));if(!r.content||!r.content.readable)return o(new _r.GraphClientError("Error encountered while reading the stream during the upload"))})})},e})();Nn.StreamUpload=oh});var hc=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.PageIterator=void 0;var Mt=(ue(),ie(se)),ih=(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 i(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 Mt.__awaiter(this,void 0,void 0,function(){var t,r;return Mt.__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 Mt.__awaiter(this,void 0,void 0,function(){var t;return Mt.__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 Mt.__awaiter(this,void 0,void 0,function(){return Mt.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e})();Un.PageIterator=ih});var gi=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.CustomAuthenticationProvider=void 0;var Mn=(ue(),ie(se)),yc=Ge(),ah=(function(){function e(t){this.provider=t}return i(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Mn.__awaiter(this,void 0,void 0,function(){var t=this;return Mn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(a,s){return Mn.__awaiter(t,void 0,void 0,function(){var u,p;return Mn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return a||(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",a=new yc.GraphClientError(u)),[4,yc.GraphClientError.setGraphClientError(a)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e})();Ln.CustomAuthenticationProvider=ah});var hi=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphError=void 0;var sh=(ue(),ie(se)),uh=(function(e){sh.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var a=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(a,t.prototype),a.statusCode=r,a.code=null,a.requestId=null,a.date=new Date,a.body=null,a.stack=o?o.stack:a.stack,a}return i(t,"GraphError"),t})(Error);jn.GraphError=uh});var _c=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.GraphErrorHandler=void 0;var vc=(ue(),ie(se)),yi=hi(),ch=(function(){function e(){}return i(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new yi.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,a=new yi.GraphError(r,o.message);return a.code=o.code,o.innerError!==void 0&&(a.requestId=o.innerError["request-id"],a.date=new Date(o.innerError.date)),a.body=JSON.stringify(o),a.headers=n?.headers,a},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),vc.__awaiter(this,void 0,void 0,function(){var a;return vc.__generator(this,function(s){if(t&&t.error?a=e.constructErrorFromResponse(t,r,o):t instanceof Error?a=e.constructError(t,r,o):(a=new yi.GraphError(r),a.body=t),typeof n=="function")n(a,null);else return[2,a];return[2]})})},e})();Fn.GraphErrorHandler=ch});var vi=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.GraphRequest=void 0;var re=(ue(),ie(se)),lh=Ge(),ph=_c(),Pr=tn(),dh=ui(),fh=it(),gt=gr(),mh=vr(),gh=(function(){function e(t,r,n){var o=this;this.parsePath=function(a){if(a.indexOf("https://")!==-1){a=a.replace("https://","");var s=a.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+a.substring(0,s),a=a.substring(s+1,a.length));var u=a.indexOf("/");u!==-1&&(o.urlComponents.version=a.substring(0,u),a=a.substring(u+1,a.length))}a.charAt(0)==="/"&&(a=a.substr(1));var p=a.indexOf("?");if(p===-1)o.urlComponents.path=a;else{o.urlComponents.path=a.substr(0,p);for(var d=a.substring(p+1,a.length).split("&"),g=0,x=d;g<x.length;g++){var v=x[g];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 i(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,a=t.otherURLQueryOptions;o<a.length;o++){var s=a[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 a=o[n];this.parseQueryParamenterString(a)}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 a,s,u,p,d,g,x,v;return re.__generator(this,function(l){switch(l.label){case 0:s=new fh.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(),a=p.response,[4,dh.GraphResponseHandler.getResponse(a,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(g=l.sent(),g instanceof lh.GraphClientError)throw g;return x=void 0,a&&(x=a.status),[4,ph.GraphErrorHandler.getError(g,x,n,a)];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(a){switch(a.label){case 0:return r=this.buildFullUrl(),n={method:gt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=a.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,a;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:gt.RequestMethod.POST,body:(0,Pr.serializeContent)(t)},a=t&&t.constructor&&t.constructor.name,a==="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(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:gt.RequestMethod.PUT,body:(0,Pr.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:gt.RequestMethod.PATCH,body:(0,Pr.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.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:gt.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:gt.RequestMethod.GET},this.responseType(mh.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(a){switch(a.label){case 0:return n=this.buildFullUrl(),o={method:gt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e})();Bn.GraphRequest=gh});var _i=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.HTTPClient=void 0;var Pc=(ue(),ie(se)),hh=(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 i(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 Pc.__awaiter(this,void 0,void 0,function(){var r;return Pc.__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})();Hn.HTTPClient=hh});var bc=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.HTTPClientFactory=void 0;var yh=(ue(),ie(se)),xc=_i(),vh=an(),_h=un(),Ph=yr(),xh=hr(),bh=mn(),Th=pn(),Eh=vn(),Ih=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Ah=(function(){function e(){}return i(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new vh.AuthenticationHandler(t),n=new Th.RetryHandler(new xh.RetryHandlerOptions),o=new Eh.TelemetryHandler,a=new _h.HTTPMessageHandler;if(r.setNext(n),Ih()){var s=new bh.RedirectHandler(new Ph.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(a),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(xc.HTTPClient.bind.apply(xc.HTTPClient,yh.__spreadArray([void 0],t,!1)))},e})();Vn.HTTPClientFactory=Ah});var Tc=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.validatePolyFilling=void 0;var Sh=i(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");Zn.validatePolyFilling=Sh});var Ac=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.Client=void 0;var $h=(ue(),ie(se)),Ec=ei(),wh=gi(),Oh=vi(),Ic=_i(),zh=bc(),Rh=Tc(),kh=(function(){function e(t){this.config={baseUrl:Ec.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:Ec.GRAPH_API_VERSION},(0,Rh.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=zh.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(Ic.HTTPClient.bind.apply(Ic.HTTPClient,$h.__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 i(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new wh.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new Oh.GraphRequest(this.httpClient,this.config,t)},e})();qn.Client=kh});var $c=b($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ResponseType=$.GraphRequest=$.GraphClientError=$.GraphError=$.CustomAuthenticationProvider=$.Client=$.PageIterator=$.Range=$.UploadResult=$.FileUpload=$.StreamUpload=$.getValidRangeSize=$.OneDriveLargeFileUploadTask=$.LargeFileUploadTask=$.ChaosHandler=$.ChaosStrategy=$.ChaosHandlerOptions=$.TelemetryHandlerOptions=$.FeatureUsageFlag=$.RedirectHandlerOptions=$.RetryHandlerOptions=$.AuthenticationHandlerOptions=$.MiddlewareFactory=$.TelemetryHandler=$.RedirectHandler=$.RetryHandler=$.HTTPMessageHandler=$.AuthenticationHandler=$.BatchResponseContent=$.BatchRequestContent=void 0;var Dh=Bu();Object.defineProperty($,"BatchRequestContent",{enumerable:!0,get:i(function(){return Dh.BatchRequestContent},"get")});var Ch=Hu();Object.defineProperty($,"BatchResponseContent",{enumerable:!0,get:i(function(){return Ch.BatchResponseContent},"get")});var Nh=an();Object.defineProperty($,"AuthenticationHandler",{enumerable:!0,get:i(function(){return Nh.AuthenticationHandler},"get")});var Uh=un();Object.defineProperty($,"HTTPMessageHandler",{enumerable:!0,get:i(function(){return Uh.HTTPMessageHandler},"get")});var Mh=pn();Object.defineProperty($,"RetryHandler",{enumerable:!0,get:i(function(){return Mh.RetryHandler},"get")});var Lh=mn();Object.defineProperty($,"RedirectHandler",{enumerable:!0,get:i(function(){return Lh.RedirectHandler},"get")});var jh=vn();Object.defineProperty($,"TelemetryHandler",{enumerable:!0,get:i(function(){return jh.TelemetryHandler},"get")});var Fh=oc();Object.defineProperty($,"MiddlewareFactory",{enumerable:!0,get:i(function(){return Fh.MiddlewareFactory},"get")});var Bh=ti();Object.defineProperty($,"AuthenticationHandlerOptions",{enumerable:!0,get:i(function(){return Bh.AuthenticationHandlerOptions},"get")});var Hh=hr();Object.defineProperty($,"RetryHandlerOptions",{enumerable:!0,get:i(function(){return Hh.RetryHandlerOptions},"get")});var Vh=yr();Object.defineProperty($,"RedirectHandlerOptions",{enumerable:!0,get:i(function(){return Vh.RedirectHandlerOptions},"get")});var Sc=kt();Object.defineProperty($,"FeatureUsageFlag",{enumerable:!0,get:i(function(){return Sc.FeatureUsageFlag},"get")});Object.defineProperty($,"TelemetryHandlerOptions",{enumerable:!0,get:i(function(){return Sc.TelemetryHandlerOptions},"get")});var Zh=ii();Object.defineProperty($,"ChaosHandlerOptions",{enumerable:!0,get:i(function(){return Zh.ChaosHandlerOptions},"get")});var qh=xn();Object.defineProperty($,"ChaosStrategy",{enumerable:!0,get:i(function(){return qh.ChaosStrategy},"get")});var Gh=cc();Object.defineProperty($,"ChaosHandler",{enumerable:!0,get:i(function(){return Gh.ChaosHandler},"get")});var Wh=di();Object.defineProperty($,"LargeFileUploadTask",{enumerable:!0,get:i(function(){return Wh.LargeFileUploadTask},"get")});var Kh=fc();Object.defineProperty($,"OneDriveLargeFileUploadTask",{enumerable:!0,get:i(function(){return Kh.OneDriveLargeFileUploadTask},"get")});var Jh=mi();Object.defineProperty($,"getValidRangeSize",{enumerable:!0,get:i(function(){return Jh.getValidRangeSize},"get")});var Xh=gc();Object.defineProperty($,"StreamUpload",{enumerable:!0,get:i(function(){return Xh.StreamUpload},"get")});var Yh=fi();Object.defineProperty($,"FileUpload",{enumerable:!0,get:i(function(){return Yh.FileUpload},"get")});var Qh=li();Object.defineProperty($,"UploadResult",{enumerable:!0,get:i(function(){return Qh.UploadResult},"get")});var ey=ci();Object.defineProperty($,"Range",{enumerable:!0,get:i(function(){return ey.Range},"get")});var ty=hc();Object.defineProperty($,"PageIterator",{enumerable:!0,get:i(function(){return ty.PageIterator},"get")});var ry=Ac();Object.defineProperty($,"Client",{enumerable:!0,get:i(function(){return ry.Client},"get")});var ny=gi();Object.defineProperty($,"CustomAuthenticationProvider",{enumerable:!0,get:i(function(){return ny.CustomAuthenticationProvider},"get")});var oy=hi();Object.defineProperty($,"GraphError",{enumerable:!0,get:i(function(){return oy.GraphError},"get")});var iy=Ge();Object.defineProperty($,"GraphClientError",{enumerable:!0,get:i(function(){return iy.GraphClientError},"get")});var ay=vi();Object.defineProperty($,"GraphRequest",{enumerable:!0,get:i(function(){return ay.GraphRequest},"get")});var sy=vr();Object.defineProperty($,"ResponseType",{enumerable:!0,get:i(function(){return sy.ResponseType},"get")})});var Kc=b((S0,Wc)=>{var Gc=require("stream").Stream,hy=require("util");Wc.exports=De;function De(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(De,"DelayedStream");hy.inherits(De,Gc);De.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(De.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});De.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};De.prototype.resume=function(){this._released||this.release(),this.source.resume()};De.prototype.pause=function(){this.source.pause()};De.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};De.prototype.pipe=function(){var e=Gc.prototype.pipe.apply(this,arguments);return this.resume(),e};De.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)};De.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 Qc=b((w0,Yc)=>{var yy=require("util"),Xc=require("stream").Stream,Jc=Kc();Yc.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}i(de,"CombinedStream");yy.inherits(de,Xc);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 Jc)){var r=Jc.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 Xc.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 tl=b((z0,el)=>{"use strict";el.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 ol=b(Ae=>{"use strict";var Yn=tl(),vy=require("path").extname,rl=/^\s*([^;\s]*)(?:;|\s|$)/,_y=/^text\//i;Ae.charset=nl;Ae.charsets={lookup:nl};Ae.contentType=Py;Ae.extension=xy;Ae.extensions=Object.create(null);Ae.lookup=by;Ae.types=Object.create(null);Ty(Ae.extensions,Ae.types);function nl(e){if(!e||typeof e!="string")return!1;var t=rl.exec(e),r=t&&Yn[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&_y.test(t[1])?"UTF-8":!1}i(nl,"charset");function Py(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ae.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ae.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(Py,"contentType");function xy(e){if(!e||typeof e!="string")return!1;var t=rl.exec(e),r=t&&Ae.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(xy,"extension");function by(e){if(!e||typeof e!="string")return!1;var t=vy("x."+e).toLowerCase().substr(1);return t&&Ae.types[t]||!1}i(by,"lookup");function Ty(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Yn).forEach(i(function(o){var a=Yn[o],s=a.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(Yn[t[p]].source),g=r.indexOf(a.source);if(t[p]!=="application/octet-stream"&&(d>g||d===g&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}i(Ty,"populateMaps")});var al=b((D0,il)=>{il.exports=Ey;function Ey(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(Ey,"defer")});var Ti=b((N0,ul)=>{var sl=al();ul.exports=Iy;function Iy(e){var t=!1;return sl(function(){t=!0}),i(function(n,o){t?e(n,o):sl(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(Iy,"async")});var Ei=b((M0,cl)=>{cl.exports=Ay;function Ay(e){Object.keys(e.jobs).forEach(Sy.bind(e)),e.jobs={}}i(Ay,"abort");function Sy(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(Sy,"clean")});var Ii=b((j0,pl)=>{var ll=Ti(),$y=Ei();pl.exports=wy;function wy(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=Oy(t,o,e[o],function(a,s){o in r.jobs&&(delete r.jobs[o],a?$y(r):r.results[o]=s,n(a,r.results))})}i(wy,"iterate");function Oy(e,t,r,n){var o;return e.length==2?o=e(r,ll(n)):o=e(r,t,ll(n)),o}i(Oy,"runJob")});var Ai=b((B0,dl)=>{dl.exports=zy;function zy(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,a){return t(e[o],e[a])}),n}i(zy,"state")});var Si=b((V0,fl)=>{var Ry=Ei(),ky=Ti();fl.exports=Dy;function Dy(e){Object.keys(this.jobs).length&&(this.index=this.size,Ry(this),ky(e)(null,this.results))}i(Dy,"terminator")});var gl=b((q0,ml)=>{var Cy=Ii(),Ny=Ai(),Uy=Si();ml.exports=My;function My(e,t,r){for(var n=Ny(e);n.index<(n.keyedList||e).length;)Cy(e,t,n,function(o,a){if(o){r(o,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Uy.bind(n,r)}i(My,"parallel")});var $i=b((W0,Qn)=>{var hl=Ii(),Ly=Ai(),jy=Si();Qn.exports=Fy;Qn.exports.ascending=yl;Qn.exports.descending=By;function Fy(e,t,r,n){var o=Ly(e,r);return hl(e,t,o,i(function a(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){hl(e,t,o,a);return}n(null,o.results)},"iteratorHandler")),jy.bind(o,n)}i(Fy,"serialOrdered");function yl(e,t){return e<t?-1:e>t?1:0}i(yl,"ascending");function By(e,t){return-1*yl(e,t)}i(By,"descending")});var _l=b((J0,vl)=>{var Hy=$i();vl.exports=Vy;function Vy(e,t,r){return Hy(e,t,null,r)}i(Vy,"serial")});var xl=b((Y0,Pl)=>{Pl.exports={parallel:gl(),serial:_l(),serialOrdered:$i()}});var wi=b((Q0,bl)=>{"use strict";bl.exports=Object});var El=b((eU,Tl)=>{"use strict";Tl.exports=Error});var Al=b((tU,Il)=>{"use strict";Il.exports=EvalError});var $l=b((rU,Sl)=>{"use strict";Sl.exports=RangeError});var Ol=b((nU,wl)=>{"use strict";wl.exports=ReferenceError});var Rl=b((oU,zl)=>{"use strict";zl.exports=SyntaxError});var eo=b((iU,kl)=>{"use strict";kl.exports=TypeError});var Cl=b((aU,Dl)=>{"use strict";Dl.exports=URIError});var Ul=b((sU,Nl)=>{"use strict";Nl.exports=Math.abs});var Ll=b((uU,Ml)=>{"use strict";Ml.exports=Math.floor});var Fl=b((cU,jl)=>{"use strict";jl.exports=Math.max});var Hl=b((lU,Bl)=>{"use strict";Bl.exports=Math.min});var Zl=b((pU,Vl)=>{"use strict";Vl.exports=Math.pow});var Gl=b((dU,ql)=>{"use strict";ql.exports=Math.round});var Kl=b((fU,Wl)=>{"use strict";Wl.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Xl=b((gU,Jl)=>{"use strict";var Zy=Kl();Jl.exports=i(function(t){return Zy(t)||t===0?t:t<0?-1:1},"sign")});var Ql=b((yU,Yl)=>{"use strict";Yl.exports=Object.getOwnPropertyDescriptor});var Oi=b((vU,ep)=>{"use strict";var to=Ql();if(to)try{to([],"length")}catch{to=null}ep.exports=to});var rp=b((_U,tp)=>{"use strict";var ro=Object.defineProperty||!1;if(ro)try{ro({},"a",{value:1})}catch{ro=!1}tp.exports=ro});var zi=b((PU,np)=>{"use strict";np.exports=i(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 a 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 ap=b((bU,ip)=>{"use strict";var op=typeof Symbol<"u"&&Symbol,qy=zi();ip.exports=i(function(){return typeof op!="function"||typeof Symbol!="function"||typeof op("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qy()},"hasNativeSymbols")});var Ri=b((EU,sp)=>{"use strict";sp.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var ki=b((IU,up)=>{"use strict";var Gy=wi();up.exports=Gy.getPrototypeOf||null});var pp=b((AU,lp)=>{"use strict";var Wy="Function.prototype.bind called on incompatible ",Ky=Object.prototype.toString,Jy=Math.max,Xy="[object Function]",cp=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},"concatty"),Yy=i(function(t,r){for(var n=[],o=r||0,a=0;o<t.length;o+=1,a+=1)n[a]=t[o];return n},"slicy"),Qy=i(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");lp.exports=i(function(t){var r=this;if(typeof r!="function"||Ky.apply(r)!==Xy)throw new TypeError(Wy+r);for(var n=Yy(arguments,1),o,a=i(function(){if(this instanceof o){var g=r.apply(this,cp(n,arguments));return Object(g)===g?g:this}return r.apply(t,cp(n,arguments))},"binder"),s=Jy(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Qy(u,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var d=i(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var Lt=b(($U,dp)=>{"use strict";var ev=pp();dp.exports=Function.prototype.bind||ev});var no=b((wU,fp)=>{"use strict";fp.exports=Function.prototype.call});var Di=b((OU,mp)=>{"use strict";mp.exports=Function.prototype.apply});var hp=b((zU,gp)=>{"use strict";gp.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var vp=b((RU,yp)=>{"use strict";var tv=Lt(),rv=Di(),nv=no(),ov=hp();yp.exports=ov||tv.call(nv,rv)});var Pp=b((kU,_p)=>{"use strict";var iv=Lt(),av=eo(),sv=no(),uv=vp();_p.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new av("a function is required");return uv(iv,sv,t)},"callBindBasic")});var Ap=b((CU,Ip)=>{"use strict";var cv=Pp(),xp=Oi(),Tp;try{Tp=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ci=!!Tp&&xp&&xp(Object.prototype,"__proto__"),Ep=Object,bp=Ep.getPrototypeOf;Ip.exports=Ci&&typeof Ci.get=="function"?cv([Ci.get]):typeof bp=="function"?i(function(t){return bp(t==null?t:Ep(t))},"getDunder"):!1});var zp=b((UU,Op)=>{"use strict";var Sp=Ri(),$p=ki(),wp=Ap();Op.exports=Sp?i(function(t){return Sp(t)},"getProto"):$p?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return $p(t)},"getProto"):wp?i(function(t){return wp(t)},"getProto"):null});var Ni=b((LU,Rp)=>{"use strict";var lv=Function.prototype.call,pv=Object.prototype.hasOwnProperty,dv=Lt();Rp.exports=dv.call(lv,pv)});var Lp=b((jU,Mp)=>{"use strict";var J,fv=wi(),mv=El(),gv=Al(),hv=$l(),yv=Ol(),Ht=Rl(),Bt=eo(),vv=Cl(),_v=Ul(),Pv=Ll(),xv=Fl(),bv=Hl(),Tv=Zl(),Ev=Gl(),Iv=Xl(),Np=Function,Ui=i(function(e){try{return Np('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),br=Oi(),Av=rp(),Mi=i(function(){throw new Bt},"throwTypeError"),Sv=br?(function(){try{return arguments.callee,Mi}catch{try{return br(arguments,"callee").get}catch{return Mi}}})():Mi,jt=ap()(),_e=zp(),$v=ki(),wv=Ri(),Up=Di(),Tr=no(),Ft={},Ov=typeof Uint8Array>"u"||!_e?J:_e(Uint8Array),ht={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?J:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?J:ArrayBuffer,"%ArrayIteratorPrototype%":jt&&_e?_e([][Symbol.iterator]()):J,"%AsyncFromSyncIteratorPrototype%":J,"%AsyncFunction%":Ft,"%AsyncGenerator%":Ft,"%AsyncGeneratorFunction%":Ft,"%AsyncIteratorPrototype%":Ft,"%Atomics%":typeof Atomics>"u"?J:Atomics,"%BigInt%":typeof BigInt>"u"?J:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?J:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?J:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?J:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":mv,"%eval%":eval,"%EvalError%":gv,"%Float16Array%":typeof Float16Array>"u"?J:Float16Array,"%Float32Array%":typeof Float32Array>"u"?J:Float32Array,"%Float64Array%":typeof Float64Array>"u"?J:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?J:FinalizationRegistry,"%Function%":Np,"%GeneratorFunction%":Ft,"%Int8Array%":typeof Int8Array>"u"?J:Int8Array,"%Int16Array%":typeof Int16Array>"u"?J:Int16Array,"%Int32Array%":typeof Int32Array>"u"?J:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":jt&&_e?_e(_e([][Symbol.iterator]())):J,"%JSON%":typeof JSON=="object"?JSON:J,"%Map%":typeof Map>"u"?J:Map,"%MapIteratorPrototype%":typeof Map>"u"||!jt||!_e?J:_e(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":fv,"%Object.getOwnPropertyDescriptor%":br,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":hv,"%ReferenceError%":yv,"%Reflect%":typeof Reflect>"u"?J:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?J:Set,"%SetIteratorPrototype%":typeof Set>"u"||!jt||!_e?J:_e(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?J:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":jt&&_e?_e(""[Symbol.iterator]()):J,"%Symbol%":jt?Symbol:J,"%SyntaxError%":Ht,"%ThrowTypeError%":Sv,"%TypedArray%":Ov,"%TypeError%":Bt,"%Uint8Array%":typeof Uint8Array>"u"?J:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?J:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?J:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?J:Uint32Array,"%URIError%":vv,"%WeakMap%":typeof WeakMap>"u"?J:WeakMap,"%WeakRef%":typeof WeakRef>"u"?J:WeakRef,"%WeakSet%":typeof WeakSet>"u"?J:WeakSet,"%Function.prototype.call%":Tr,"%Function.prototype.apply%":Up,"%Object.defineProperty%":Av,"%Object.getPrototypeOf%":$v,"%Math.abs%":_v,"%Math.floor%":Pv,"%Math.max%":xv,"%Math.min%":bv,"%Math.pow%":Tv,"%Math.round%":Ev,"%Math.sign%":Iv,"%Reflect.getPrototypeOf%":wv};if(_e)try{null.error}catch(e){kp=_e(_e(e)),ht["%Error.prototype%"]=kp}var kp,zv=i(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&&_e&&(r=_e(o.prototype))}return ht[t]=r,r},"doEval"),Dp={__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"]},Er=Lt(),oo=Ni(),Rv=Er.call(Tr,Array.prototype.concat),kv=Er.call(Up,Array.prototype.splice),Cp=Er.call(Tr,String.prototype.replace),io=Er.call(Tr,String.prototype.slice),Dv=Er.call(Tr,RegExp.prototype.exec),Cv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nv=/\\(\\)?/g,Uv=i(function(t){var r=io(t,0,1),n=io(t,-1);if(r==="%"&&n!=="%")throw new Ht("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ht("invalid intrinsic syntax, expected opening `%`");var o=[];return Cp(t,Cv,function(a,s,u,p){o[o.length]=u?Cp(p,Nv,"$1"):s||a}),o},"stringToPath"),Mv=i(function(t,r){var n=t,o;if(oo(Dp,n)&&(o=Dp[n],n="%"+o[0]+"%"),oo(ht,n)){var a=ht[n];if(a===Ft&&(a=zv(n)),typeof a>"u"&&!r)throw new Bt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Ht("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Mp.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new Bt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Bt('"allowMissing" argument must be a boolean');if(Dv(/^%?[^%]*%?$/,t)===null)throw new Ht("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Uv(t),o=n.length>0?n[0]:"",a=Mv("%"+o+"%",r),s=a.name,u=a.value,p=!1,d=a.alias;d&&(o=d[0],kv(n,Rv([0,1],d)));for(var g=1,x=!0;g<n.length;g+=1){var v=n[g],l=io(v,0,1),f=io(v,-1);if((l==='"'||l==="'"||l==="`"||f==='"'||f==="'"||f==="`")&&l!==f)throw new Ht("property names with quotes must have matching quotes");if((v==="constructor"||!x)&&(p=!0),o+="."+v,s="%"+o+"%",oo(ht,s))u=ht[s];else if(u!=null){if(!(v in u)){if(!r)throw new Bt("base intrinsic for "+t+" exists, but the property is not available.");return}if(br&&g+1>=n.length){var y=br(u,v);x=!!y,x&&"get"in y&&!("originalValue"in y.get)?u=y.get:u=u[v]}else x=oo(u,v),u=u[v];x&&!p&&(ht[s]=u)}}return u},"GetIntrinsic")});var Fp=b((BU,jp)=>{"use strict";var Lv=zi();jp.exports=i(function(){return Lv()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Vp=b((VU,Hp)=>{"use strict";var jv=Lp(),Bp=jv("%Object.defineProperty%",!0),Fv=Fp()(),Bv=Ni(),Hv=eo(),ao=Fv?Symbol.toStringTag:null;Hp.exports=i(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 Hv("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ao&&(n||!Bv(t,ao))&&(Bp?Bp(t,ao,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[ao]=r)},"setToStringTag")});var qp=b((qU,Zp)=>{"use strict";var Vv=Function.prototype.call,Zv=Object.prototype.hasOwnProperty,qv=Lt();Zp.exports=qv.call(Vv,Zv)});var Wp=b((GU,Gp)=>{"use strict";Gp.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Xp=b((WU,Jp)=>{"use strict";var Bi=Qc(),Gv=require("util"),Li=require("path"),Wv=require("http"),Kv=require("https"),Jv=require("url").parse,Xv=require("fs"),Yv=require("stream").Stream,Qv=require("crypto"),ji=ol(),e_=xl(),t_=Vp(),st=qp(),Fi=Wp();function Kp(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(Kp,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Bi.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(X,"FormData");Gv.inherits(X,Bi);X.LINE_BREAK=`\r
|
|
5
|
+
`;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Bi.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),a=this._multiPartFooter();n(o),n(t),n(a),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&&st(t,"httpVersion"))&&!(t instanceof Yv))&&(r.knownLength||this._valuesToMeasure.push(t))};X.prototype._lengthRetriever=function(e,t){st(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Xv.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):st(e,"httpVersion")?t(null,Number(e.headers["content-length"])):st(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),a="",s={"Content-Disposition":["form-data",'name="'+Kp(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&Fi(s,r.header);var u;for(var p in s)if(st(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(a+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+a+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&&st(e,"httpVersion")&&(r=Li.basename(e.client._httpMessage.path||"")),r)return'filename="'+Kp(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=ji.lookup(e.name)),!r&&e&&e.path&&(r=ji.lookup(e.path)),!r&&e&&e.readable&&st(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=ji.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)st(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="--------------------------"+Qv.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}e_.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=Jv(e),n=Fi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=Fi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Kv.request(n):r=Wv.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=i(function(d,g){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,g)},"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]"};t_(X.prototype,"FormData");Jp.exports=X});var so=b((Hi,Vi)=>{(function(e,t){typeof Hi=="object"&&typeof Vi<"u"?Vi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Hi,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",s="hour",u="day",p="week",d="month",g="quarter",x="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=/\[([^\]]+)]|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:i(function(j){var A=["th","st","nd","rd"],E=j%100;return"["+j+(A[(E-20)%10]||A[E]||A[0])+"]"},"ordinal")},P=i(function(j,A,E){var O=String(j);return!O||O.length>=A?j:""+Array(A+1-O.length).join(E)+j},"m"),T={s:P,z:i(function(j){var A=-j.utcOffset(),E=Math.abs(A),O=Math.floor(E/60),S=E%60;return(A<=0?"+":"-")+P(O,2,"0")+":"+P(S,2,"0")},"z"),m:i(function j(A,E){if(A.date()<E.date())return-j(E,A);var O=12*(E.year()-A.year())+(E.month()-A.month()),S=A.clone().add(O,d),V=E-S<0,Z=A.clone().add(O+(V?-1:1),d);return+(-(O+(E-S)/(V?S-Z:Z-S))||0)},"t"),a:i(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:i(function(j){return{M:d,y:x,w:p,d:u,D:v,h:s,m:a,s:o,ms:n,Q:g}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(j){return j===void 0},"u")},H="en",fe={};fe[H]=h;var xe=i(function(j){return j instanceof yt},"p"),Ce=i(function j(A,E,O){var S;if(!A)return H;if(typeof A=="string"){var V=A.toLowerCase();fe[V]&&(S=V),E&&(fe[V]=E,S=V);var Z=A.split("-");if(!S&&Z.length>1)return j(Z[0])}else{var te=A.name;fe[te]=A,S=te}return!O&&S&&(H=S),S||!O&&H},"t"),ee=i(function(j,A){if(xe(j))return j.clone();var E=typeof A=="object"?A:{};return E.date=j,E.args=arguments,new yt(E)},"w"),G=T;G.l=Ce,G.i=xe,G.w=function(j,A){return ee(j,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var yt=(function(){function j(E){this.$L=Ce(E.locale,null,!0),this.parse(E)}i(j,"M");var A=j.prototype;return A.parse=function(E){this.$d=(function(O){var S=O.date,V=O.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,me=(Z[7]||"0").substring(0,3);return V?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)}}return new Date(S)})(E),this.$x=E.x||{},this.init()},A.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},A.$utils=function(){return G},A.isValid=function(){return this.$d.toString()!==l},A.isSame=function(E,O){var S=ee(E);return this.startOf(O)<=S&&S<=this.endOf(O)},A.isAfter=function(E,O){return ee(E)<this.startOf(O)},A.isBefore=function(E,O){return this.endOf(O)<ee(E)},A.$g=function(E,O,S){return G.u(E)?this[O]:this.set(S,E)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(E,O){var S=this,V=!!G.u(O)||O,Z=G.p(E),te=i(function(lt,Ee){var Ke=G.w(S.$u?Date.UTC(S.$y,Ee,lt):new Date(S.$y,Ee,lt),S);return V?Ke:Ke.endOf(u)},"l"),me=i(function(lt,Ee){return G.w(S.toDate()[lt].apply(S.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(Ee)),S)},"$"),ve=this.$W,Pe=this.$M,we=this.$D,vt="set"+(this.$u?"UTC":"");switch(Z){case x:return V?te(1,0):te(31,11);case d:return V?te(1,Pe):te(0,Pe+1);case p:var ct=this.$locale().weekStart||0,Vt=(ve<ct?ve+7:ve)-ct;return te(V?we-Vt:we+(6-Vt),Pe);case u:case v:return me(vt+"Hours",0);case s:return me(vt+"Minutes",1);case a:return me(vt+"Seconds",2);case o:return me(vt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(E){return this.startOf(E,!1)},A.$set=function(E,O){var S,V=G.p(E),Z="set"+(this.$u?"UTC":""),te=(S={},S[u]=Z+"Date",S[v]=Z+"Date",S[d]=Z+"Month",S[x]=Z+"FullYear",S[s]=Z+"Hours",S[a]=Z+"Minutes",S[o]=Z+"Seconds",S[n]=Z+"Milliseconds",S)[V],me=V===u?this.$D+(O-this.$W):O;if(V===d||V===x){var ve=this.clone().set(v,1);ve.$d[te](me),ve.init(),this.$d=ve.set(v,Math.min(this.$D,ve.daysInMonth())).$d}else te&&this.$d[te](me);return this.init(),this},A.set=function(E,O){return this.clone().$set(E,O)},A.get=function(E){return this[G.p(E)]()},A.add=function(E,O){var S,V=this;E=Number(E);var Z=G.p(O),te=i(function(Pe){var we=ee(V);return G.w(we.date(we.date()+Math.round(Pe*E)),V)},"y");if(Z===d)return this.set(d,this.$M+E);if(Z===x)return this.set(x,this.$y+E);if(Z===u)return te(1);if(Z===p)return te(7);var me=(S={},S[a]=t,S[s]=r,S[o]=e,S)[Z]||1,ve=this.$d.getTime()+E*me;return G.w(ve,this)},A.subtract=function(E,O){return this.add(-1*E,O)},A.format=function(E){var O=this,S=this.$locale();if(!this.isValid())return S.invalidDate||l;var V=E||"YYYY-MM-DDTHH:mm:ssZ",Z=G.z(this),te=this.$H,me=this.$m,ve=this.$M,Pe=S.weekdays,we=S.months,vt=S.meridiem,ct=i(function(Ee,Ke,Zt,Ir){return Ee&&(Ee[Ke]||Ee(O,V))||Zt[Ke].slice(0,Ir)},"h"),Vt=i(function(Ee){return G.s(te%12||12,Ee,"0")},"d"),lt=vt||function(Ee,Ke,Zt){var Ir=Ee<12?"AM":"PM";return Zt?Ir.toLowerCase():Ir};return V.replace(y,(function(Ee,Ke){return Ke||(function(Zt){switch(Zt){case"YY":return String(O.$y).slice(-2);case"YYYY":return G.s(O.$y,4,"0");case"M":return ve+1;case"MM":return G.s(ve+1,2,"0");case"MMM":return ct(S.monthsShort,ve,we,3);case"MMMM":return ct(we,ve);case"D":return O.$D;case"DD":return G.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return ct(S.weekdaysMin,O.$W,Pe,2);case"ddd":return ct(S.weekdaysShort,O.$W,Pe,3);case"dddd":return Pe[O.$W];case"H":return String(te);case"HH":return G.s(te,2,"0");case"h":return Vt(1);case"hh":return Vt(2);case"a":return lt(te,me,!0);case"A":return lt(te,me,!1);case"m":return String(me);case"mm":return G.s(me,2,"0");case"s":return String(O.$s);case"ss":return G.s(O.$s,2,"0");case"SSS":return G.s(O.$ms,3,"0");case"Z":return Z}return null})(Ee)||Z.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(E,O,S){var V,Z=this,te=G.p(O),me=ee(E),ve=(me.utcOffset()-this.utcOffset())*t,Pe=this-me,we=i(function(){return G.m(Z,me)},"D");switch(te){case x:V=we()/12;break;case d:V=we();break;case g:V=we()/3;break;case p:V=(Pe-ve)/6048e5;break;case u:V=(Pe-ve)/864e5;break;case s:V=Pe/r;break;case a:V=Pe/t;break;case o:V=Pe/e;break;default:V=Pe}return S?V:G.a(V)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return fe[this.$L]},A.locale=function(E,O){if(!E)return this.$L;var S=this.clone(),V=Ce(E,O,!0);return V&&(S.$L=V),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})(),ut=yt.prototype;return ee.prototype=ut,[["$ms",n],["$s",o],["$m",a],["$H",s],["$W",u],["$M",d],["$y",x],["$D",v]].forEach((function(j){ut[j[1]]=function(A){return this.$g(A,j[0],j[1])}})),ee.extend=function(j,A){return j.$i||(j(A,yt,ee),j.$i=!0),ee},ee.locale=Ce,ee.isDayjs=xe,ee.unix=function(j){return ee(1e3*j)},ee.en=fe[H],ee.Ls=fe,ee.p={},ee}))});var f_={};po(f_,{microsoft365Planner:()=>d_});module.exports=ie(f_);var fd=Object.freeze({status:"aborted"});function w(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,g=Object.keys(d);for(let x=0;x<g.length;x++){let v=g[x];v in u||(u[v]=d[v].bind(u))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:e});function s(u){var p;let d=r?.Parent?new a:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let g of d._zod.deferred)g();return d}return i(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}i(w,"$constructor");var Ue=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},fo={};function Fe(e){return e&&Object.assign(fo,e),fo}i(Fe,"config");function go(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)}i(go,"getEnumValues");function Gi(e,t){return typeof t=="bigint"?t.toString():t}i(Gi,"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")}}}i($r,"cached");function Wi(e){return e==null}i(Wi,"nullish");function wr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(wr,"cleanRegex");var qi=Symbol("evaluating");function he(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==qi)return n===void 0&&(n=qi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(he,"defineLazy");var ho="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(Gt,"isObject");var md=$r(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ki(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)}i(Ki,"isPlainObject");var Ji=new Set(["string","number","symbol"]);function _t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(_t,"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}i(Or,"clone");function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>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:i(()=>t.error,"error")}:t}i(ne,"normalizeParams");function Xi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(Xi,"optionalKeys");var Yi={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 Pt(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}i(Pt,"aborted");function Je(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Je,"prefixIssues");function Sr(e){return typeof e=="string"?e:e?.message}i(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}i(Xe,"finalizeIssue");function Qi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(Qi,"getLengthableOrigin");function yo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(yo,"issue");var ea=i((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,Gi,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),ta=w("$ZodError",ea),Wt=w("$ZodError",ea,{Parent:Error});var hd=i(e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ue;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,a,Fe())));throw ho(u,o?.callee),u}return s.value},"_parse"),zr=hd(Wt),yd=i(e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,a,Fe())));throw ho(u,o?.callee),u}return s.value},"_parseAsync"),Rr=yd(Wt),vd=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ue;return a.issues.length?{success:!1,error:new(e??ta)(a.issues.map(s=>Xe(s,o,Fe())))}:{success:!0,data:a.value}},"_safeParse"),Kt=vd(Wt),_d=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Xe(s,o,Fe())))}:{success:!0,data:a.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 ra=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),na=/^-?\d+n?$/,oa=/^-?\d+$/,vo=/^-?\d+(?:\.\d+)?$/,ia=/^(?:true|false)$/i;var Ye=w("$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 aa=w("$ZodCheckGreaterThan",(e,t)=>{Ye.init(e,t);let r=bd[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(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 sa=w("$ZodCheckNumberFormat",(e,t)=>{Ye.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,a]=Yi[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=a,r&&(u.pattern=oa)}),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>a&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}});var ua=w("$ZodCheckMinLength",(e,t)=>{var r;Ye.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Wi(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=Qi(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var _o=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Ye.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),ca=w("$ZodCheckRegex",(e,t)=>{_o.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 pa={major:4,minor:3,patch:6};var ce=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pa;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((s,u,p)=>{let d=Pt(s),g;for(let x of u){if(x._zod.def.when){if(!x._zod.def.when(s))continue}else if(d)continue;let v=s.issues.length,l=x._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new Ue;if(g||l instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await l,s.issues.length!==v&&(d||(d=Pt(s,v)))});else{if(s.issues.length===v)continue;d||(d=Pt(s,v))}}return g?g.then(()=>s):s},"runChecks"),a=i((s,u,p)=>{if(Pt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new Ue;return d.then(g=>e._zod.parse(g,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(g=>a(g,s,u)):a(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new Ue;return p.then(d=>o(d,n,u))}return o(p,n,u)}}he(e,"~standard",()=>({validate:i(o=>{try{let a=Kt(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Jt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Cr=w("$ZodString",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ra(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}}),Po=w("$ZodStringFormat",(e,t)=>{_o.init(e,t),Cr.init(e,t)});var ha=w("$ZodURL",(e,t)=>{Po.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 xo=w("$ZodNumber",(e,t)=>{ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??vo,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 a=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,...a?{received:a}:{}}),r}}),ya=w("$ZodNumberFormat",(e,t)=>{sa.init(e,t),xo.init(e,t)}),bo=w("$ZodBoolean",(e,t)=>{ce.init(e,t),e._zod.pattern=ia,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}}),va=w("$ZodBigInt",(e,t)=>{ce.init(e,t),e._zod.pattern=na,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 _a=w("$ZodAny",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r}),Pa=w("$ZodUnknown",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r});var xa=w("$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}}),ba=w("$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,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function da(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues)),t.value[r]=e.value}i(da,"handleArrayResult");var Ta=w("$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 a=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?a.push(p.then(d=>da(d,r,s))):da(p,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function Dr(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}i(Dr,"handlePropertyResult");function Td(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=Xi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(Td,"normalizeDef");function Ed(e,t,r,n,o,a){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,g=p.optout==="optional";for(let x in t){if(u.has(x))continue;if(d==="never"){s.push(x);continue}let v=p.run({value:t[x],issues:[]},n);v instanceof Promise?e.push(v.then(l=>Dr(l,r,x,t,g))):Dr(v,r,x,t,g)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}i(Ed,"handleCatchall");var Ea=w("$ZodObject",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=$r(()=>Td(t));he(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let g=u[d]._zod;if(g.values){p[d]??(p[d]=new Set);for(let x of g.values)p[d].add(x)}}return p});let o=Gt,a=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 g=[],x=s.shape;for(let v of s.keys){let l=x[v],f=l._zod.optout==="optional",y=l._zod.run({value:d[v],issues:[]},p);y instanceof Promise?g.push(y.then(h=>Dr(h,u,v,d,f))):Dr(y,u,v,d,f)}return a?Ed(g,d,u,p,n.value,e):g.length?Promise.all(g).then(()=>u):u}});function fa(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!Pt(a));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(a=>a.issues.map(s=>Xe(s,n,Fe())))}),t)}i(fa,"handleUnionResults");var To=w("$ZodUnion",(e,t)=>{ce.init(e,t),he(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),he(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),he(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),he(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>wr(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},a);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,a)):fa(u,o,e,a)}});var Ia=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,To.init(e,t);let r=e._zod.parse;he(e._zod,"propValues",()=>{let o={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);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,a=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(a.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);a.set(p,s)}}return a});e._zod.parse=(o,a)=>{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,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var Aa=w("$ZodRecord",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Ki(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],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 g=t.valueType._zod.run({value:o[d],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Je(d,x.issues)),r.value[d]=x.value})):(g.issues.length&&r.issues.push(...Je(d,g.issues)),r.value[d]=g.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"&&vo.test(u)&&p.issues.length){let x=t.keyType._zod.run({value:Number(u),issues:[]},n);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(p=x)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(x=>Xe(x,n,Fe())),input:u,path:[u],inst:e});continue}let g=t.valueType._zod.run({value:o[u],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Je(u,x.issues)),r.value[p.value]=x.value})):(g.issues.length&&r.issues.push(...Je(u,g.issues)),r.value[p.value]=g.value)}}return a.length?Promise.all(a).then(()=>r):r}});var Sa=w("$ZodEnum",(e,t)=>{ce.init(e,t);let r=go(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Ji.has(typeof o)).map(o=>typeof o=="string"?_t(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),$a=w("$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"?_t(n):n?_t(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}});var wa=w("$ZodTransform",(e,t)=>{ce.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 Ue;return r.value=o,r}});function ma(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(ma,"handleOptionalResult");var Oa=w("$ZodOptional",(e,t)=>{ce.init(e,t),e._zod.optin="optional",e._zod.optout="optional",he(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),he(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(a=>ma(a,r.value)):ma(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var za=w("$ZodNullable",(e,t)=>{ce.init(e,t),he(e._zod,"optin",()=>t.innerType._zod.optin),he(e._zod,"optout",()=>t.innerType._zod.optout),he(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)}|null)$`):void 0}),he(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 Ra=w("$ZodPipe",(e,t)=>{ce.init(e,t),he(e._zod,"values",()=>t.in._zod.values),he(e._zod,"optin",()=>t.in._zod.optin),he(e._zod,"optout",()=>t.out._zod.optout),he(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>kr(s,t.in,n)):kr(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>kr(a,t.out,n)):kr(o,t.out,n)}});function kr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(kr,"handlePipeResult");var ka=w("$ZodCustom",(e,t)=>{Ye.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(a=>ga(a,r,n,e));ga(o,r,n,e)}});function ga(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(yo(o))}}i(ga,"handleRefineResult");var Ca;var Eo=class{static{i(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 Na(){return new Eo}i(Na,"registry");(Ca=globalThis).__zod_globalRegistry??(Ca.__zod_globalRegistry=Na());var Io=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...ne(t)})}i(Ua,"_string");function Ma(e,t){return new e({type:"string",coerce:!0,...ne(t)})}i(Ma,"_coercedString");function La(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ne(t)})}i(La,"_url");function ja(e,t){return new e({type:"number",checks:[],...ne(t)})}i(ja,"_number");function Fa(e,t){return new e({type:"number",coerce:!0,checks:[],...ne(t)})}i(Fa,"_coercedNumber");function Ba(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ne(t)})}i(Ba,"_int");function Ha(e,t){return new e({type:"boolean",...ne(t)})}i(Ha,"_boolean");function Va(e,t){return new e({type:"boolean",coerce:!0,...ne(t)})}i(Va,"_coercedBoolean");function Za(e,t){return new e({type:"bigint",coerce:!0,...ne(t)})}i(Za,"_coercedBigint");function qa(e){return new e({type:"any"})}i(qa,"_any");function Ga(e){return new e({type:"unknown"})}i(Ga,"_unknown");function Wa(e,t){return new e({type:"void",...ne(t)})}i(Wa,"_void");function Ka(e,t){return new e({type:"date",coerce:!0,...ne(t)})}i(Ka,"_coercedDate");function Nr(e,t){return new aa({check:"greater_than",...ne(t),value:e,inclusive:!0})}i(Nr,"_gte");function ke(e,t){return new ua({check:"min_length",...ne(t),minimum:e})}i(ke,"_minLength");function Qe(e,t){return new ca({check:"string_format",format:"regex",...ne(t),pattern:e})}i(Qe,"_regex");function Ja(e,t,r){let n=ne(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(Ja,"_custom");var ye=w("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)=>zr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Kt(e,r,n),e.parseAsync=async(r,n)=>Rr(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)}),Mr=w("ZodMiniString",(e,t)=>{Cr.init(e,t),ye.init(e,t)});function c(e){return Ua(Mr,e)}i(c,"string");var Xa=w("ZodMiniStringFormat",(e,t)=>{Po.init(e,t),Mr.init(e,t)});var Ud=w("ZodMiniURL",(e,t)=>{ha.init(e,t),Xa.init(e,t)});function Ya(e){return La(Ud,e)}i(Ya,"url");var Lr=w("ZodMiniNumber",(e,t)=>{xo.init(e,t),ye.init(e,t)});function be(e){return ja(Lr,e)}i(be,"number");var Md=w("ZodMiniNumberFormat",(e,t)=>{ya.init(e,t),Lr.init(e,t)});function Qa(e){return Ba(Md,e)}i(Qa,"int");var Ao=w("ZodMiniBoolean",(e,t)=>{bo.init(e,t),ye.init(e,t)});function Y(e){return Ha(Ao,e)}i(Y,"boolean");var es=w("ZodMiniBigInt",(e,t)=>{va.init(e,t),ye.init(e,t)});var Ld=w("ZodMiniAny",(e,t)=>{_a.init(e,t),ye.init(e,t)});function Yt(){return qa(Ld)}i(Yt,"any");var jd=w("ZodMiniUnknown",(e,t)=>{Pa.init(e,t),ye.init(e,t)});function U(){return Ga(jd)}i(U,"unknown");var Fd=w("ZodMiniVoid",(e,t)=>{xa.init(e,t),ye.init(e,t)});function ts(e){return Wa(Fd,e)}i(ts,"_void");var rs=w("ZodMiniDate",(e,t)=>{ba.init(e,t),ye.init(e,t)});var Bd=w("ZodMiniArray",(e,t)=>{Ta.init(e,t),ye.init(e,t)});function F(e,t){return new Bd({type:"array",element:e,...ne(t)})}i(F,"array");var Hd=w("ZodMiniObject",(e,t)=>{Ea.init(e,t),ye.init(e,t),he(e,"shape",()=>t.shape)});function m(e,t){let r={type:"object",shape:e??{},...ne(t)};return new Hd(r)}i(m,"object");var Vd=w("ZodMiniUnion",(e,t)=>{To.init(e,t),ye.init(e,t)});function B(e,t){return new Vd({type:"union",options:e,...ne(t)})}i(B,"union");var Zd=w("ZodMiniDiscriminatedUnion",(e,t)=>{Ia.init(e,t),ye.init(e,t)});function et(e,t,r){return new Zd({type:"union",options:t,discriminator:e,...ne(r)})}i(et,"discriminatedUnion");var qd=w("ZodMiniRecord",(e,t)=>{Aa.init(e,t),ye.init(e,t)});function M(e,t,r){return new qd({type:"record",keyType:e,valueType:t,...ne(r)})}i(M,"record");var Gd=w("ZodMiniEnum",(e,t)=>{Sa.init(e,t),ye.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)})}i(W,"_enum");var Wd=w("ZodMiniLiteral",(e,t)=>{$a.init(e,t),ye.init(e,t)});function k(e,t){return new Wd({type:"literal",values:Array.isArray(e)?e:[e],...ne(t)})}i(k,"literal");var Kd=w("ZodMiniTransform",(e,t)=>{wa.init(e,t),ye.init(e,t)});function tt(e){return new Kd({type:"transform",transform:e})}i(tt,"transform");var Jd=w("ZodMiniOptional",(e,t)=>{Oa.init(e,t),ye.init(e,t)});function _(e){return new Jd({type:"optional",innerType:e})}i(_,"optional");var Xd=w("ZodMiniNullable",(e,t)=>{za.init(e,t),ye.init(e,t)});function Qt(e){return new Xd({type:"nullable",innerType:e})}i(Qt,"nullable");var Yd=w("ZodMiniPipe",(e,t)=>{Ra.init(e,t),ye.init(e,t)});function rt(e,t){return new Yd({type:"pipe",in:e,out:t})}i(rt,"pipe");var Qd=w("ZodMiniCustom",(e,t)=>{ka.init(e,t),ye.init(e,t)});function jr(e,t){return Ja(Qd,e??(()=>!0),t)}i(jr,"custom");var er={};po(er,{bigint:()=>af,boolean:()=>of,date:()=>sf,number:()=>nf,string:()=>rf});function rf(e){return Ma(Mr,e)}i(rf,"string");function nf(e){return Fa(Lr,e)}i(nf,"number");function of(e){return Va(Ao,e)}i(of,"boolean");function af(e){return Za(es,e)}i(af,"bigint");function sf(e){return Ka(rs,e)}i(sf,"date");var $o=m({retryOnFailure:m({defaultValue:_(Y()),hide:_(Y())}),continueOnFailure:m({defaultValue:_(Y()),hide:_(Y())})}),So=class{constructor(t,r,n,o,a,s,u,p,d,g,x){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=a;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=g;this.aiMetadata=x}static{i(this,"IAction")}},oe=i(e=>new So(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=m({displayName:c(),description:_(c())}),q=i((e,t)=>m({type:k(t),required:Y(),defaultValue:_(Yt())}),"TPropertyValue");var Se=m({...Q.shape,...q(c(),"SHORT_TEXT").shape}),Be=m({...Q.shape,...q(c(),"LONG_TEXT").shape});var os=m({label:c(),value:U()}),Fr=m({disabled:_(Y()),placeholder:_(c()),options:F(os)});var $e=m({...Q.shape,options:Fr,...q(U(),"STATIC_DROPDOWN").shape}),He=m({...Q.shape,options:Fr,...q(F(U()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var wo=m({...Q.shape,...q(U(),"DROPDOWN").shape,refreshers:F(c())}),tr=m({...Q.shape,...q(F(U()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=m({...Q.shape,...q(Y(),"CHECKBOX").shape});var Ze=m({...Q.shape,...q(be(),"NUMBER").shape});var rr=m({...Q.shape,streaming:_(Y()),...q(U(),"FILE").shape});var nr=m({...Q.shape,...q(c(),"DATE_TIME").shape});var is=M(c(),B([Se,Be,$e,tr,He,Ve,Ze,rr,nr])),or=m({...Q.shape,properties:is,...q(F(U()),"ARRAY").shape});var ir=m({...Q.shape,...q(B([M(c(),U())]),"JSON").shape});var as=B([Se,$e,ir,or,He]),cf=M(c(),as),Oo=m({refreshers:F(c()),...Q.shape,...q(U(),"DYNAMIC").shape});var Br=m({...Q.shape,...q(ts(),"MARKDOWN").shape});var ar=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ar||{}),xt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(xt||{}),sr=(P=>(P.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",P.COMMUNICATION="COMMUNICATION",P.COMMERCE="COMMERCE",P.CORE="CORE",P.UNIVERSAL_AI="UNIVERSAL_AI",P.FLOW_CONTROL="FLOW_CONTROL",P.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",P.ACCOUNTING="ACCOUNTING",P.PRODUCTIVITY="PRODUCTIVITY",P.CONTENT_AND_FILES="CONTENT_AND_FILES",P.DEVELOPER_TOOLS="DEVELOPER_TOOLS",P.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",P.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",P.HUMAN_RESOURCES="HUMAN_RESOURCES",P.PAYMENT_PROCESSING="PAYMENT_PROCESSING",P.MARKETING="MARKETING",P.SALES_AND_CRM="SALES_AND_CRM",P))(sr||{});var ur=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ur||{}),zo="both_client_credentials_and_authorization_code";var Me=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Me||{}),cr=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))(cr||{}),lf=m({strategy:W(cr),paramName:_(c())}),lr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(lr||{});var Hr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Hr||{}),ss=m({status:_(be()),body:_(U()),headers:_(M(c(),c()))}),us=m({type:k("DELAY"),resumeDateTime:c(),requestIdToReply:_(c()),handlerId:_(c()),streamStepProgress:_(W(Hr))}),cs=m({type:k("WEBHOOK"),requestId:c(),requestIdToReply:_(c()),response:ss,handlerId:_(c()),streamStepProgress:_(W(Hr))}),pf=B([us,cs]);var df=m({body:U(),rawBody:_(U()),headers:M(c(),c()),queryParams:M(c(),c())});function ge(e){return e==null}i(ge,"isNil");function pr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}i(pr,"isEmpty");function Vr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(Vr,"assertNotNullOrUndefined");var Ro=Ne(require("crypto"),1);var ff=128,pt,bt,mf=i(e=>{!pt||pt.length<e?(pt=Buffer.allocUnsafe(e*ff),Ro.default.randomFillSync(pt),bt=0):bt+e>pt.length&&(Ro.default.randomFillSync(pt),bt=0),bt+=e},"fillPool"),gf=i(e=>(mf(e|=0),pt.subarray(bt-e,bt)),"random"),hf=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===a)return s}}},"customRandom"),ps=i((e,t=21)=>hf(e,t,gf),"customAlphabet");var yf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ds=21,G$=c().check(Qe(new RegExp(`^[0-9a-zA-Z]{${ds}}$`))),vf=ps(yf,ds);var nt=rt(tt(e=>e instanceof Date?e.toISOString():e),c()),Oe={id:c(),created:nt,updated:nt},ae=i(e=>_(Qt(e)),"Nullable");function ko(e){return _(Qt(W(e)))}i(ko,"NullableEnum");var J$=rt(tt(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),_(Y())),Zr=i(e=>rt(tt(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),_(F(e))),"OptionalArrayFromQuery");var Q$=M(c(),U());var dr=(g=>(g.OPENAI="openai",g.OPENROUTER="openrouter",g.ANTHROPIC="anthropic",g.AZURE="azure",g.GOOGLE="google",g.ACTIVEPIECES="activepieces",g.CLOUDFLARE_GATEWAY="cloudflare-gateway",g.CUSTOM="custom",g.BEDROCK="bedrock",g.MISTRAL="mistral",g))(dr||{});var pw=c().check(Qe(/^#[0-9A-Fa-f]{6}$/));var fw=m({filename:c(),data:U(),type:k("file"),mimetype:_(c())});var _f=Ne(ms());var Pw=m({...Oe,name:c(),permissions:F(c()),platformId:ae(c()),type:c(),userCount:_(be())});var gs=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(gs||{}),Do=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Do||{}),Co=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Co||{});var No=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(No||{});var Uo=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Uo||{});var Pf=m({mode:W(gs),value:U()}),xf=m({auth:_(c()),fields:M(c(),Pf)}),bf=m({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:_(xf)}),Tf=m({type:k("PIECE"),toolName:c().check(ke(1)),pieceMetadata:bf}),Ef=m({type:k("none")}),If=m({type:k("access_token"),accessToken:c()}),Af=m({type:k("api_key"),apiKey:c(),apiKeyHeader:c()}),Sf=m({type:k("headers"),headers:M(c(),c())}),$f=et("type",[Ef,If,Af,Sf]),hs=m({type:k("FLOW"),toolName:c().check(ke(1)),externalFlowId:c(),flowDisplayName:_(c())}),ys=m({type:k("MCP"),toolName:c().check(ke(1)),serverUrl:Ya(),protocol:W(Co),auth:$f}),vs=m({type:k("KNOWLEDGE_BASE"),toolName:c().check(ke(1)),sourceType:W(Do),sourceId:c(),sourceName:c()}),wf=et("type",[Tf,hs,ys,vs]),Of=m({displayName:c(),description:_(c()),type:W(No)}),_s=m({type:k("MARKDOWN"),markdown:c()}),Tt={type:k("TOOL_CALL"),input:ae(M(c(),U())),output:_(U()),toolName:c(),status:W(Uo),toolCallId:c(),startTime:c(),endTime:_(c())},Xw=m(Tt),Ps=et("toolCallType",[m({...Tt,toolCallType:k("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),m({...Tt,toolCallType:k("FLOW"),displayName:c(),externalFlowId:c()}),m({...Tt,toolCallType:k("MCP"),displayName:c(),serverUrl:c()}),m({...Tt,toolCallType:k("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),m({...Tt,toolCallType:k("UNKNOWN"),displayName:c()})]),zf=B([_s,Ps]);var Mo=(r=>(r.IMAGE="image",r.TEXT="text",r))(Mo||{}),qe=m({apiKey:c()}),Rf=qe,kf=m({apiKey:c(),apiKeyHash:c()}),Df=qe,Cf=qe,Nf=qe,Uf=qe,Mf=qe,Lf=qe,jf=qe,Is=m({accessKeyId:c().check(ke(1)),secretAccessKey:c().check(ke(1))}),Ff=m({}),Bf=m({}),Hf=m({}),Vf=m({}),Zf=m({}),qf=m({}),As=m({modelId:c(),modelName:c(),modelType:W(Mo)}),Ss=m({apiKeyHeader:c(),baseUrl:c(),models:F(As),defaultHeaders:_(M(c(),c()))}),$s=m({accountId:c(),gatewayId:c(),models:F(As),vertexProject:_(c()),vertexRegion:_(c())}),ws=m({resourceName:c(),apiVersion:rt(tt(e=>typeof e=="string"&&e.trim().length===0?void 0:e),_(c()))}),Os=m({region:c().check(ke(1))}),Gf=B([Rf,Nf,Uf,Mf,Lf,Cf,Df,kf,Is,jf]),zs=B([Ss,$s,ws,Os,Ff,Hf,Vf,Zf,Bf,qf]),Wf=m({id:c(),name:c(),type:W(Mo)}),Kf=m({id:c(),name:c(),provider:W(dr),config:zs,enabledForChat:Y()}),Jf=m({provider:W(dr),config:zs,auth:Gf,platformId:c()});var tO={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},xs=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Xf=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Yf=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],bs=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Qf=["grok-4.20","grok-4.1-fast"],em={openai:xs,anthropic:Xf,google:bs,activepieces:[...Yf.map(e=>`anthropic/${e}`),...xs.map(e=>`openai/${e}`),...bs.map(e=>`google/${e}`),...Qf.map(e=>`x-ai/${e}`)]};var Ts=128e3,tm={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function rm({provider:e}){return e?tm[e]??Ts:Ts}i(rm,"getMaxContextTokens");var Es={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"},nm={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},om=new Set(["anthropic","mistral"]);function Le(e){return{chatModels:em[e],maxContextTokens:rm({provider:e}),defaultEmbeddingModel:Es[e],supportsEmbedding:Es[e]!==void 0,supportsImageGeneration:!om.has(e),webSearch:nm[e]}}i(Le,"buildProviderCapabilities");var im={openai:Le("openai"),anthropic:Le("anthropic"),openrouter:Le("openrouter"),azure:Le("azure"),google:Le("google"),"cloudflare-gateway":Le("cloudflare-gateway"),custom:Le("custom"),bedrock:Le("bedrock"),mistral:Le("mistral"),activepieces:Le("activepieces")};var am=m({base64Url:c(),fileName:c(),extension:_(c())}),sm=m({mimeType:c(),url:c(),fileName:_(c())}),Lo=B([am,sm]);var um=B([m({type:k("file"),value:Lo}),m({type:k("markdown"),value:c(),files:_(F(Lo))})]),cm=m({sessionId:c(),message:c(),files:_(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||{}),jo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(jo||{});var lm=B([m({...Oe,name:c(),externalId:c(),type:k("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:m({options:F(m({value:c()}))})}),m({...Oe,name:c(),externalId:c(),type:B([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:c(),projectId:c()})]),pm=m({...Oe,name:c(),folderId:ae(c()),projectId:c(),externalId:c(),status:ko(Ds),trigger:ko(ks)}),dm=m({...Oe,tableId:c(),projectId:c(),cells:M(c(),m({updated:c(),created:c(),value:U(),fieldName:c()}))}),fm=m({events:F(W(jo)),webhookUrl:c(),flowId:c()}),mm=m({fields:F(m({id:c(),name:c()})),rows:F(M(c(),c())),name:c()}),gm=m({projectId:c(),limit:_(er.number()),cursor:_(c()),name:_(c()),externalIds:Zr(c()),folderId:_(c()),folderIds:Zr(c())}),hm=m({records:F(F(m({fieldId:c(),value:Ns()}))),tableId:c()}),ym=m({cells:_(F(m({fieldId:c(),value:Ns()}))),tableId:c(),agentUpdate:_(Y())}),Cs=et("operator",[dt("eq"),dt("neq"),dt("gt"),dt("gte"),dt("lt"),dt("lte"),dt("co"),Rs("exists"),Rs("not_exists")]),vm=m({tableId:c(),limit:_(er.number()),cursor:_(c()),filters:Zr(Cs)});function Ns(){return rt(tt(e=>e==null?e:String(e)),Qt(c()))}i(Ns,"coerceToString");function dt(e){return m({fieldId:c(),operator:k(e),value:c()})}i(dt,"valueFilter");function Rs(e){return m({fieldId:c(),operator:k(e)})}i(Rs,"existenceFilter");var _m=m({status:_(be()),body:_(U()),headers:_(M(c(),c()))}),Pm=m({...Oe,deleted:ae(nt),ownerId:c(),displayName:c(),platformId:c(),externalId:ae(c())});var Us=m({name:c(),description:_(c()),type:c(),required:Y()}),xm=m({pieceName:c(),triggerName:c(),input:m({toolName:c(),toolDescription:c(),inputSchema:F(Us),returnsResponse:Y()})});var Ms="^[0-9]+\\.[0-9]+\\.[0-9]+$",PO=new RegExp(Ms),Tm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",xO=c().check(Qe(new RegExp(Ms))),bO=c().check(Qe(new RegExp(Tm))),Em=m({packageType:k("ARCHIVE"),pieceType:W(xt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),Ls=m({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:c(),pieceVersion:c()}),js=m({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),TO=B([Ls,js]),EO=B([Em,Ls,js]);var Im=et("type",[m({type:k("CRON_EXPRESSION"),cronExpression:c(),timezone:c()}),m({type:k("INTERVAL"),intervalMs:Qa().check(Nr(6e4))})]),IO=m({...Oe,type:W(Me),projectId:c(),flowId:c(),triggerName:c(),schedule:ae(Im),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:ae(c()),simulate:Y()}),Fs=(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))(Fs||{}),Bs=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Bs||{}),Hs=(r=>(r.S3="S3",r.DB="DB",r))(Hs||{}),AO=m({...Oe,projectId:ae(c()),platformId:ae(c()),type:W(Fs),compression:W(Bs),data:_(U()),location:W(Hs),size:ae(be()),fileName:ae(c()),s3Key:ae(c()),metadata:ae(M(c(),c()))}),Vs=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Vs||{}),Zs=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Zs||{}),SO=m({id:c(),email:c(),firstName:c(),status:W(Zs),externalId:ae(c()),platformId:ae(c()),platformRole:W(Vs),lastName:c(),created:nt,updated:nt,lastActiveDate:ae(nt),imageUrl:ae(c())});var Fo=m({...Q.shape,...q(M(c(),U()),"OBJECT").shape});var Ks=m({...Q.shape,...q(c(),"COLOR").shape});var Bo=B([Se,Be,Br,Ve,$e,He,wo,tr,Oo,Ze,or,Fo,ir,nr,rr,Ks]),R={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 je=m({displayName:c(),description:_(c()),hasConnectionIdentifier:_(Y())});var Js=m({username:c(),password:c()}),Ho=m({...je.shape,username:m({displayName:c(),description:_(c())}),password:m({displayName:c(),description:_(c())}),...q(Js,"BASIC_AUTH").shape});var wm=M(c(),B([Se,Be,Ze,Ve,$e])),Vo=m({...je.shape,props:wm,...q(U(),"CUSTOM_AUTH").shape});var ft=m({...je.shape,...q(m({auth:c()}),"SECRET_TEXT").shape});var Om=M(c(),B([Se,Be,ft,Ze,Ve,$e,He,Br])),Xs=m({...je.shape,props:Om,...q(U(),"OIDC").shape});var Zo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Zo||{}),Ys=B([Se,ft,$e]),Qs=M(c(),Ys),zm=m({props:_(M(c(),Ys)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:_(B([k("none"),k("consent"),k("login"),k("omit")])),pkce:_(Y()),pkceMethod:_(B([k("plain"),k("S256")])),authorizationMethod:_(W(Zo)),grantType:_(B([W(ur),k(zo)])),extra:_(M(c(),c()))}),eu=m({access_token:c(),props:_(Qs),data:M(c(),Yt())}),qo=m({...je.shape,...zm.shape,...q(eu,"OAUTH2").shape});var Et=B([Ho,Vo,Xs,qo,ft]),fr="Connection",Go={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||fr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||fr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||fr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||fr}},None(){}};var iR={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 Rm=m({...Q.shape,...q(U(),"CUSTOM").shape,code:c()});var km=B([Bo,Et]),Wo=M(c(),km),IR=M(c(),Bo);var tu=B([m({strategy:k("CRON"),cronExpression:c()}),m({strategy:k("NONE")})]),It=class{constructor(t,r,n,o,a,s,u,p,d,g,x,v,l,f,y,h,P,T,H){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=a;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=g;this.onEnable=x;this.onDisable=v;this.onStart=l;this.run=f;this.test=y;this.sampleData=h;this.testStrategy=P;this.outputSchema=T;this.aiMetadata=H}static{i(this,"ITrigger")}},At=i(e=>{switch(e.type){case"WEBHOOK":return new It(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 It(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 It(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 It(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,ge(e.sampleData)&&ge(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var ru="2",Gr="0.82.0";var Ko=class{constructor(t,r,n,o,a,s,u,p,d=Gr,g,x="",v){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=g;this.description=x;this.deprecated=v;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:ru}),"getContextInfo");(!Cm(d)||Nm(d,Gr))&&(this.minimumSupportedRelease=Gr),a.forEach(l=>this._actions[l.name]=l),s.forEach(l=>this._triggers[l.name]=l)}static{i(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:Dm(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=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new Ko(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 Dm(e){if(e!==void 0)return Array.isArray(e)?e.map(nu):nu(e)}i(Dm,"withConnectionIdentifierFlag");function nu(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}i(nu,"flagConnectionIdentifier");function Cm(e){return/^\d+\.\d+\.\d+$/.test(e)}i(Cm,"isValidSimpleSemver");function Nm(e,t){let[r,n,o]=e.split(".").map(Number),[a,s,u]=t.split(".").map(Number);return r!==a?r<a:n!==s?n<s:o<u}i(Nm,"isSemverLessThan");var Um=_(M(c(),M(c(),c()))),iu=m({id:_(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:_(c()),directoryPath:_(c()),auth:_(B([Et,F(Et)])),version:c(),categories:_(F(W(sr))),minimumSupportedRelease:_(c()),maximumSupportedRelease:_(c()),deprecated:_(Y()),i18n:Um}),Mm=W(["human","ai","both"]),au=m({description:_(c()),idempotent:_(Y())}),su=m({name:c(),displayName:c(),description:c(),props:Wo,requireAuth:Y(),errorHandlingOptions:_($o),outputSchema:_(jr()),audience:_(Mm),aiMetadata:_(au)}),uu=m({name:c(),displayName:c(),description:c(),props:Wo,errorHandlingOptions:_($o),type:W(Me),sampleData:U(),handshakeConfiguration:_(jr()),renewConfiguration:_(tu),testStrategy:W(lr),outputSchema:_(jr()),aiMetadata:_(au)}),Lm=m({...iu.shape,actions:M(c(),su),triggers:M(c(),uu)}),jm=m({...iu.shape,actions:be(),triggers:be(),suggestedActions:_(F(su)),suggestedTriggers:_(F(uu))}),cu=m({projectUsage:be(),pieceType:W(xt),packageType:W(ar),platformId:_(c()),archiveId:_(c())}),Ik=m({...Lm.shape,...cu.shape}),Ak=m({...jm.shape,...cu.shape}),Sk=m({name:c(),version:c()});var Fm=Ne(require("path")),Bm=Ne(require("fs/promises"));var mr="login.microsoftonline.com",pu="login.microsoftonline.us",lu={[mr]:"https://graph.microsoft.com",[pu]:"https://graph.microsoft.us"},du=R.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:mr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:mr},{label:"US Government (GCC High)",value:pu}]}});function fu(e){return e??mr}i(fu,"resolveCloudHost");function St(e){return fu(e.props?.cloud)}i(St,"getMicrosoftCloudFromAuth");function $t(e){let t=fu(e);return lu[t]??lu[mr]}i($t,"getGraphBaseUrl");var wc=Ne($c());var uy=`
|
|
6
6
|
If you'd like to use your own custom Azure app instead of the default app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
|
|
7
7
|
set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:
|
|
8
8
|
- Group.Read.All
|
|
9
9
|
- Tasks.ReadWrite
|
|
10
|
-
- User.Read`,K=Ho.OAuth2({description:jh,props:{cloud:Qs},authUrl:"https://{cloud}/common/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/common/oauth2/v2.0/token",required:!0,scope:["Tasks.ReadWrite","User.Read","Group.Read.All"],prompt:"omit"}),I={endpoints:{createPlan:"/planner/plans",listPlans:"/me/planner/plans",listGroups:"/groups",planDetail:i(e=>`/planner/plans/${e}`,"planDetail"),listBuckets:i(e=>`/planner/plans/${e}/buckets`,"listBuckets"),listPlanTasks:i(e=>`/planner/plans/${e}/tasks`,"listPlanTasks"),createBucket:"/planner/buckets",bucketDetail:i(e=>`/planner/buckets/${e}`,"bucketDetail"),createTask:"/planner/tasks",deleteTask:i(e=>`/planner/tasks/${e}`,"deleteTask")},getClient:i(({auth:e})=>{let t=St(e);return hc.Client.initWithMiddleware({authProvider:{getAccessToken:i(async()=>e.access_token,"getAccessToken")},baseUrl:At(t)})},"getClient"),getUser:i(async({auth:e})=>await I.getClient({auth:e}).api("/me").get(),"getUser"),getEtag:i(async({auth:e,id:t,endpointType:r})=>{let n=I.getClient({auth:e}),o=I.endpoints[r],a=o(t);return(await n.api(a).get())["@odata.etag"]},"getEtag"),listUsers:i(async({auth:e})=>(await I.getClient({auth:e}).api("/users").get()).value,"listUsers"),listGroups:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listGroups).get()).value,"listGroups"),listPlans:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listPlans).get()).value,"listPlans"),listBuckets:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listBuckets(t)).get()).value,"listBuckets"),listTasks:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listPlanTasks(t)).get()).value,"listTasks"),createPlan:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createPlan).create(t),"createPlan"),createBucket:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createBucket).create(t),"createBucket"),updateBucket:i(async({auth:e,id:t,name:r,orderHint:n})=>{let o=I.getClient({auth:e}),a=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await o.api(I.endpoints.bucketDetail(t)).header("If-Match",a).update({name:r,orderHint:n}),{success:!0}},"updateBucket"),deleteTask:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await r.api(I.endpoints.deleteTask(t)).header("If-Match",n).delete(),{success:!0}},"deleteTask"),createTask:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createTask).create(t),"createTask"),updateTask:i(async({auth:e,id:t,...r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await n.api(I.endpoints.deleteTask(t)).header("If-Match",o).update(r),{success:!0}},"updateTask"),deleteBucket:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await r.api(I.endpoints.bucketDetail(t)).header("If-Match",n).delete(),{success:!0}},"deleteBucket"),updatePlan:i(async({auth:e,id:t,title:r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"planDetail"});return await n.api(I.endpoints.planDetail(t)).header("If-Match",o).update({title:r}),{success:!0}},"updatePlan"),getBucketDetails:i(async({auth:e,bucketId:t})=>await I.getClient({auth:e}).api(I.endpoints.bucketDetail(t)).get(),"getBucketDetails")};var yc=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Group",description:"Select the Grroup",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listGroups({auth:t})).map(n=>({label:n.displayName??"",value:n.id??""})),disabled:!1,placeholder:"Select a group"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"groupDropdown"),pe=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Plan",description:"Select the plan",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listPlans({auth:t})).map(n=>({label:n.title??"",value:n.id??""})),disabled:!1,placeholder:"Select a plan"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"PlanDropdown"),nt=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Bucket",description:"Select the bucket",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>{if(!t)return{options:[],disabled:!0,placeholder:"Please select an authentication first"};if(!r)return{options:[],disabled:!0,placeholder:"Please select a plan first"};let n=await I.listBuckets({auth:t,planId:r});return console.log("Buckets:",JSON.stringify(n)),{options:n.map(o=>({label:o.name??"",value:o.id??""})),disabled:!1,placeholder:"Select a bucket"}},"options")}),"BucketDropdown"),Vn=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Task",description:"Select the task",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>t?r?{options:(await I.listTasks({auth:t,planId:r})).map(o=>({label:o.title??"",value:o.id??""})),disabled:!1,placeholder:"Select a task"}:{options:[],disabled:!0,placeholder:"Please select a plan first"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"TaskDropdown"),Hn=i(({required:e=!1})=>R.ShortText({displayName:"Order Hint",description:"Hint used to order items of this type in a list. The format is defined as outlined here: https://learn.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0",required:e}),"OrderHintProperty");var vc=ne({auth:K,name:"createBucket",displayName:"Create Bucket",description:"Create a bucket (category) under a plan.",audience:"both",aiMetadata:{description:"Creates a new bucket (a column/category for grouping tasks) under an existing Planner plan, identified by plan ID. Use to organize tasks within a plan. Each call adds another bucket, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),name:R.ShortText({displayName:"Bucket Name",description:"The name of the bucket to be created",required:!0}),orderHint:Hn({required:!1})},async run({auth:e,propsValue:t}){return await I.createBucket({auth:e,...t})}});var _c=ne({auth:K,name:"createPlan",displayName:"Create Plan",description:"Create a new planner plan",audience:"both",aiMetadata:{description:"Creates a new Microsoft 365 Planner plan with the given title, owned by a specified Microsoft 365 group. Use to set up a fresh planning board before adding buckets or tasks. The group must already exist; each call creates a separate plan, so it is not idempotent.",idempotent:!1},props:{groupId:yc({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the plan",required:!0})},async run({auth:e,propsValue:t}){let r=St(e),o={container:{url:`${At(r)}/v1.0/groups/${t.groupId}`},title:t.title};return await I.createPlan({auth:e,...o})}});var Pc=ne({auth:K,name:"createTask",displayName:"Create Task",description:"Create a new planner task with title, assignments, due date, etc.",audience:"both",aiMetadata:{description:"Creates a new task in a Planner plan, optionally placing it in a bucket and setting assignees, due/start dates, priority, and percent complete. Use to add work items to a plan. Each call creates a separate task, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),bucketId:nt({required:!1}),title:R.ShortText({displayName:"Title",description:"The title of the task to be created",required:!0}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,auth:K,refreshers:["auth"],options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let r={...t,assignments:t.assignments?Object.fromEntries(t.assignments.map(n=>[n,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0,dueDateTime:t.dueDateTime?new Date(t.dueDateTime).toISOString():void 0,startDateTime:t.startDateTime?new Date(t.startDateTime).toISOString():void 0};return await I.createTask({auth:e,...r})}});var xc=ne({auth:K,name:"deleteBucket",displayName:"Delete Bucket",description:"Delete an existing bucket.",audience:"both",aiMetadata:{description:"Permanently deletes a bucket from a Planner plan by bucket ID. Use to remove a category and stop grouping tasks under it. Destructive and not idempotent; once removed, repeating the call fails because the bucket no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:nt({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Bucket id is required");return await I.deleteBucket({auth:e,id:t})}});var bc=ne({auth:K,name:"deleteTask",displayName:"Delete Task",description:"Remove a specific task by ID.",audience:"both",aiMetadata:{description:"Permanently deletes a task from a Planner plan by task ID. Use to remove a work item. Destructive and not idempotent; once removed, repeating the call fails because the task no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:Vn({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Task id is required");return await I.deleteTask({auth:e,id:t})}});var Tc=ne({auth:K,name:"findAPlan",displayName:"Find a Plan",description:"Finds a plan by field.",audience:"both",aiMetadata:{description:"Searches across the authenticated user's Planner plans and returns those whose title contains the given text (case-insensitive substring match). Use to resolve a plan name into its plan ID before acting on it. Read-only and idempotent; the title input is required.",idempotent:!0},props:{title:R.ShortText({displayName:"Title",description:"The title of the plan to search for",required:!0})},async run({auth:e,propsValue:{title:t}}){return(await I.listPlans({auth:e})).filter(n=>n.title&&n.title.toLowerCase().includes(t.toLowerCase()))}});var Ec=ne({auth:K,name:"findTask",displayName:"Find Task",description:"Find task by fields.",audience:"both",aiMetadata:{description:"Searches the tasks of a given Planner plan and returns those whose title contains the given text (case-insensitive substring match). Use to locate a task ID within a known plan. Read-only and idempotent; both plan ID and title are required.",idempotent:!0},props:{planId:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the task to search for",required:!0})},async run({auth:e,propsValue:{title:t,planId:r}}){if(!r)throw new Error("Plan ID is required to fetch tasks.");return(await I.listTasks({auth:e,planId:r})).filter(o=>o.title&&o.title.toLowerCase().includes(t.toLowerCase()))}});var Ic=ne({auth:K,name:"getABucket",displayName:"Get a Bucket",description:"Retrieve details about a specific bucket.",audience:"both",aiMetadata:{description:"Retrieves the details of a single Planner bucket by its bucket ID (within a known plan). Use to inspect a bucket's current name and order hint. Read-only and idempotent.",idempotent:!0},props:{planId:pe({required:!0}),bucketId:nt({required:!0})},async run({auth:e,propsValue:{bucketId:t}}){if(!t)throw new Error("Bucket ID is required to fetch bucket details.");return await I.getBucketDetails({auth:e,bucketId:t})}});var Sc=ne({auth:K,name:"updateBucket",displayName:"Update Bucket",description:"Modify bucket\u2019s name or properties.",audience:"both",aiMetadata:{description:"Updates an existing bucket's name and/or order hint, identified by bucket ID within a plan. Use to rename or reorder a bucket. Idempotent: applying the same field values repeatedly leaves the bucket in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:nt({required:!0}),name:R.ShortText({displayName:"Name",description:"The new name of the bucket",required:!1}),orderHint:Hn({required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Bucket ID is required to update a bucket.");return await I.updateBucket({auth:e,id:n,...o})}});var Ac=ne({auth:K,name:"updatePlan",displayName:"Update Plan",description:"modify metadata of a plan (e.g. title changes).",audience:"both",aiMetadata:{description:"Updates an existing Planner plan's title, identified by plan ID. Use to rename a plan. Idempotent: setting the same title repeatedly leaves the plan in the same end state.",idempotent:!0},props:{id:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the plan",required:!0})},async run({auth:e,propsValue:{id:t,title:r}}){if(!t)throw new Error("Plan id is required");return await I.updatePlan({auth:e,id:t,title:r})}});var $c=ne({auth:K,name:"updateTask",displayName:"Update Task",description:"Modify existing task fields: title, due date, assignments, descriptions.",audience:"both",aiMetadata:{description:"Updates fields on an existing Planner task identified by task ID, such as title, assignees, due/start dates, priority, and percent complete. Use to edit a task; only provided fields are changed. Idempotent: applying the same field values repeatedly leaves the task in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:Vn({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the task",required:!1}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,refreshers:["auth"],auth:K,options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Task ID is required to update a task.");let a={...o,assignments:o.assignments?Object.fromEntries(o.assignments.map(s=>[s,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0};return await I.updateTask({auth:e,id:n,...a})}});var Zn=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,s)=>{o.append(s,a)}),{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 qn=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new yi,r=new vi){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},yi=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},vi=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var Gn=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(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 Wn=class extends Zn{static{i(this,"FetchHttpClient")}constructor(t="",r=new qn){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),a=this.getHeaders(t),s=t.queryParams??{};for(let[V,fe]of Object.entries(s))o.append(V,fe);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",g=t.followRedirects??!0,x=t.retries??0,{body:v,extraHeaders:l,isStream:f}=Fh(t.body,a),y=Vh({...a,...l}),h=await Bh(async()=>{let V=new AbortController,fe=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:y,body:v,redirect:g?"follow":"manual",signal:V.signal};return f&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(p,xe)}finally{fe!==void 0&&clearTimeout(fe)}},x),_=g?300:400;if(h.status<200||h.status>=_){let V=await wc(h,d),fe=new Gn(t.body,{status:h.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",fe),fe}let T=await wc(h,d);return{status:h.status,headers:Hh(h.headers),body:T}}};function Fh(e,t){return qh(e)?{body:void 0,extraHeaders:{},isStream:!1}:Zh(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}}i(Fh,"serializeBody");async function wc(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}}}}i(wc,"parseResponseBody");async function Bh(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Oc(n);continue}return o}catch(o){if(r=o,n<t){await Oc(n);continue}throw o}throw r}i(Bh,"sendWithRetries");function Oc(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Oc,"backoff");function Vh(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}i(Vh,"normalizeHeaders");function Hh(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(Hh,"toHttpHeaders");function Zh(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i(Zh,"isNodeFormData");function qh(e){return e==null}i(qh,"isNil");var zc=new Wn;var _i=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(_i||{});var kv=Ne(require("fs")),Up=Ne(Np());var Dv={"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 Cv(e){let t=e.split(";")[0].trim().toLowerCase();return Dv[t]??""}i(Cv,"contentTypeToExtension");var Nv=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Uv=i((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 Mp({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:a,props:s,extraProps:u,authLocation:p="headers"}){return ne({audience:"human",name:a||"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:R.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:d})=>({url:R.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
11
|
-
i.e ${
|
|
10
|
+
- User.Read`,K=Go.OAuth2({description:uy,props:{cloud:du},authUrl:"https://{cloud}/common/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/common/oauth2/v2.0/token",required:!0,scope:["Tasks.ReadWrite","User.Read","Group.Read.All","openid","email","profile"],prompt:"omit"}),I={endpoints:{createPlan:"/planner/plans",listPlans:"/me/planner/plans",listGroups:"/groups",planDetail:i(e=>`/planner/plans/${e}`,"planDetail"),listBuckets:i(e=>`/planner/plans/${e}/buckets`,"listBuckets"),listPlanTasks:i(e=>`/planner/plans/${e}/tasks`,"listPlanTasks"),createBucket:"/planner/buckets",bucketDetail:i(e=>`/planner/buckets/${e}`,"bucketDetail"),createTask:"/planner/tasks",deleteTask:i(e=>`/planner/tasks/${e}`,"deleteTask")},getClient:i(({auth:e})=>{let t=St(e);return wc.Client.initWithMiddleware({authProvider:{getAccessToken:i(async()=>e.access_token,"getAccessToken")},baseUrl:$t(t)})},"getClient"),getUser:i(async({auth:e})=>await I.getClient({auth:e}).api("/me").get(),"getUser"),getEtag:i(async({auth:e,id:t,endpointType:r})=>{let n=I.getClient({auth:e}),o=I.endpoints[r],a=o(t);return(await n.api(a).get())["@odata.etag"]},"getEtag"),listUsers:i(async({auth:e})=>(await I.getClient({auth:e}).api("/users").get()).value,"listUsers"),listGroups:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listGroups).get()).value,"listGroups"),listPlans:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listPlans).get()).value,"listPlans"),listBuckets:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listBuckets(t)).get()).value,"listBuckets"),listTasks:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listPlanTasks(t)).get()).value,"listTasks"),createPlan:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createPlan).create(t),"createPlan"),createBucket:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createBucket).create(t),"createBucket"),updateBucket:i(async({auth:e,id:t,name:r,orderHint:n})=>{let o=I.getClient({auth:e}),a=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await o.api(I.endpoints.bucketDetail(t)).header("If-Match",a).update({name:r,orderHint:n}),{success:!0}},"updateBucket"),deleteTask:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await r.api(I.endpoints.deleteTask(t)).header("If-Match",n).delete(),{success:!0}},"deleteTask"),createTask:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createTask).create(t),"createTask"),updateTask:i(async({auth:e,id:t,...r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await n.api(I.endpoints.deleteTask(t)).header("If-Match",o).update(r),{success:!0}},"updateTask"),deleteBucket:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await r.api(I.endpoints.bucketDetail(t)).header("If-Match",n).delete(),{success:!0}},"deleteBucket"),updatePlan:i(async({auth:e,id:t,title:r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"planDetail"});return await n.api(I.endpoints.planDetail(t)).header("If-Match",o).update({title:r}),{success:!0}},"updatePlan"),getBucketDetails:i(async({auth:e,bucketId:t})=>await I.getClient({auth:e}).api(I.endpoints.bucketDetail(t)).get(),"getBucketDetails")};var Oc=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Group",description:"Select the Grroup",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listGroups({auth:t})).map(n=>({label:n.displayName??"",value:n.id??""})),disabled:!1,placeholder:"Select a group"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"groupDropdown"),pe=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Plan",description:"Select the plan",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listPlans({auth:t})).map(n=>({label:n.title??"",value:n.id??""})),disabled:!1,placeholder:"Select a plan"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"PlanDropdown"),at=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Bucket",description:"Select the bucket",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>{if(!t)return{options:[],disabled:!0,placeholder:"Please select an authentication first"};if(!r)return{options:[],disabled:!0,placeholder:"Please select a plan first"};let n=await I.listBuckets({auth:t,planId:r});return console.log("Buckets:",JSON.stringify(n)),{options:n.map(o=>({label:o.name??"",value:o.id??""})),disabled:!1,placeholder:"Select a bucket"}},"options")}),"BucketDropdown"),Gn=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Task",description:"Select the task",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>t?r?{options:(await I.listTasks({auth:t,planId:r})).map(o=>({label:o.title??"",value:o.id??""})),disabled:!1,placeholder:"Select a task"}:{options:[],disabled:!0,placeholder:"Please select a plan first"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"TaskDropdown"),Wn=i(({required:e=!1})=>R.ShortText({displayName:"Order Hint",description:"Hint used to order items of this type in a list. The format is defined as outlined here: https://learn.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0",required:e}),"OrderHintProperty");var zc=oe({auth:K,name:"createBucket",displayName:"Create Bucket",description:"Create a bucket (category) under a plan.",audience:"both",aiMetadata:{description:"Creates a new bucket (a column/category for grouping tasks) under an existing Planner plan, identified by plan ID. Use to organize tasks within a plan. Each call adds another bucket, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),name:R.ShortText({displayName:"Bucket Name",description:"The name of the bucket to be created",required:!0}),orderHint:Wn({required:!1})},async run({auth:e,propsValue:t}){return await I.createBucket({auth:e,...t})}});var Rc=oe({auth:K,name:"createPlan",displayName:"Create Plan",description:"Create a new planner plan",audience:"both",aiMetadata:{description:"Creates a new Microsoft 365 Planner plan with the given title, owned by a specified Microsoft 365 group. Use to set up a fresh planning board before adding buckets or tasks. The group must already exist; each call creates a separate plan, so it is not idempotent.",idempotent:!1},props:{groupId:Oc({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the plan",required:!0})},async run({auth:e,propsValue:t}){let r=St(e),o={container:{url:`${$t(r)}/v1.0/groups/${t.groupId}`},title:t.title};return await I.createPlan({auth:e,...o})}});var kc=oe({auth:K,name:"createTask",displayName:"Create Task",description:"Create a new planner task with title, assignments, due date, etc.",audience:"both",aiMetadata:{description:"Creates a new task in a Planner plan, optionally placing it in a bucket and setting assignees, due/start dates, priority, and percent complete. Use to add work items to a plan. Each call creates a separate task, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),bucketId:at({required:!1}),title:R.ShortText({displayName:"Title",description:"The title of the task to be created",required:!0}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,auth:K,refreshers:["auth"],options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let r={...t,assignments:t.assignments?Object.fromEntries(t.assignments.map(n=>[n,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0,dueDateTime:t.dueDateTime?new Date(t.dueDateTime).toISOString():void 0,startDateTime:t.startDateTime?new Date(t.startDateTime).toISOString():void 0};return await I.createTask({auth:e,...r})}});var Dc=oe({auth:K,name:"deleteBucket",displayName:"Delete Bucket",description:"Delete an existing bucket.",audience:"both",aiMetadata:{description:"Permanently deletes a bucket from a Planner plan by bucket ID. Use to remove a category and stop grouping tasks under it. Destructive and not idempotent; once removed, repeating the call fails because the bucket no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:at({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Bucket id is required");return await I.deleteBucket({auth:e,id:t})}});var Cc=oe({auth:K,name:"deleteTask",displayName:"Delete Task",description:"Remove a specific task by ID.",audience:"both",aiMetadata:{description:"Permanently deletes a task from a Planner plan by task ID. Use to remove a work item. Destructive and not idempotent; once removed, repeating the call fails because the task no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:Gn({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Task id is required");return await I.deleteTask({auth:e,id:t})}});var Nc=oe({auth:K,name:"findAPlan",displayName:"Find a Plan",description:"Finds a plan by field.",audience:"both",aiMetadata:{description:"Searches across the authenticated user's Planner plans and returns those whose title contains the given text (case-insensitive substring match). Use to resolve a plan name into its plan ID before acting on it. Read-only and idempotent; the title input is required.",idempotent:!0},props:{title:R.ShortText({displayName:"Title",description:"The title of the plan to search for",required:!0})},async run({auth:e,propsValue:{title:t}}){return(await I.listPlans({auth:e})).filter(n=>n.title&&n.title.toLowerCase().includes(t.toLowerCase()))}});var Uc=oe({auth:K,name:"findTask",displayName:"Find Task",description:"Find task by fields.",audience:"both",aiMetadata:{description:"Searches the tasks of a given Planner plan and returns those whose title contains the given text (case-insensitive substring match). Use to locate a task ID within a known plan. Read-only and idempotent; both plan ID and title are required.",idempotent:!0},props:{planId:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the task to search for",required:!0})},async run({auth:e,propsValue:{title:t,planId:r}}){if(!r)throw new Error("Plan ID is required to fetch tasks.");return(await I.listTasks({auth:e,planId:r})).filter(o=>o.title&&o.title.toLowerCase().includes(t.toLowerCase()))}});var Mc=oe({auth:K,name:"getABucket",displayName:"Get a Bucket",description:"Retrieve details about a specific bucket.",audience:"both",aiMetadata:{description:"Retrieves the details of a single Planner bucket by its bucket ID (within a known plan). Use to inspect a bucket's current name and order hint. Read-only and idempotent.",idempotent:!0},props:{planId:pe({required:!0}),bucketId:at({required:!0})},async run({auth:e,propsValue:{bucketId:t}}){if(!t)throw new Error("Bucket ID is required to fetch bucket details.");return await I.getBucketDetails({auth:e,bucketId:t})}});var Lc=oe({auth:K,name:"updateBucket",displayName:"Update Bucket",description:"Modify bucket\u2019s name or properties.",audience:"both",aiMetadata:{description:"Updates an existing bucket's name and/or order hint, identified by bucket ID within a plan. Use to rename or reorder a bucket. Idempotent: applying the same field values repeatedly leaves the bucket in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:at({required:!0}),name:R.ShortText({displayName:"Name",description:"The new name of the bucket",required:!1}),orderHint:Wn({required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Bucket ID is required to update a bucket.");return await I.updateBucket({auth:e,id:n,...o})}});var jc=oe({auth:K,name:"updatePlan",displayName:"Update Plan",description:"modify metadata of a plan (e.g. title changes).",audience:"both",aiMetadata:{description:"Updates an existing Planner plan's title, identified by plan ID. Use to rename a plan. Idempotent: setting the same title repeatedly leaves the plan in the same end state.",idempotent:!0},props:{id:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the plan",required:!0})},async run({auth:e,propsValue:{id:t,title:r}}){if(!t)throw new Error("Plan id is required");return await I.updatePlan({auth:e,id:t,title:r})}});var Fc=oe({auth:K,name:"updateTask",displayName:"Update Task",description:"Modify existing task fields: title, due date, assignments, descriptions.",audience:"both",aiMetadata:{description:"Updates fields on an existing Planner task identified by task ID, such as title, assignees, due/start dates, priority, and percent complete. Use to edit a task; only provided fields are changed. Idempotent: applying the same field values repeatedly leaves the task in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:Gn({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the task",required:!1}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,refreshers:["auth"],auth:K,options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Task ID is required to update a task.");let a={...o,assignments:o.assignments?Object.fromEntries(o.assignments.map(s=>[s,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0};return await I.updateTask({auth:e,id:n,...a})}});var Zc=require("node:stream");var Kn=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,s)=>{o.append(s,a)}),{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 Jn=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Pi,r=new xi){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Pi=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},xi=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var xr=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(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 Bc({error:e,requestBody:t}){return e instanceof xr?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}i(Bc,"toFailsafeOutput");var bi=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(bi||{});var Xn=class extends Kn{static{i(this,"FetchHttpClient")}constructor(t="",r=new Jn){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),a=this.getHeaders(t),s=t.queryParams??{};for(let[H,fe]of Object.entries(s))o.append(H,fe);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",g=t.followRedirects??!0,x=t.retries??0,{body:v,extraHeaders:l,isStream:f}=cy(t.method)?ly(t.body,a):{body:void 0,extraHeaders:{},isStream:!1},y=dy({...a,...l}),h=await py(async()=>{let H=new AbortController,fe=t.timeout&&t.timeout>0?setTimeout(()=>H.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:y,body:v,redirect:g?"follow":"manual",signal:H.signal};return f&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(p,xe)}finally{fe!==void 0&&clearTimeout(fe)}},x),P=g?300:400;if(h.status<200||h.status>=P){let H=await Hc(h,d),fe=new xr(t.body,{status:h.status,responseBody:H});throw console.error("[HttpClient#(sanitized error message)] Request failed:",fe),fe}let T=await Hc(h,d);return{status:h.status,headers:fy(h.headers),body:T}}};function cy(e){return e!=="GET"&&e!=="HEAD"}i(cy,"acceptsRequestBody");function ly(e,t){if(gy(e))return{body:void 0,extraHeaders:{},isStream:!1};if(my(e)){let n=new Zc.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}}i(ly,"serializeBody");async function Hc(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}}}}i(Hc,"parseResponseBody");async function py(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Vc(n);continue}return o}catch(o){if(r=o,n<t){await Vc(n);continue}throw o}throw r}i(py,"sendWithRetries");function Vc(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Vc,"backoff");function dy(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}i(dy,"normalizeHeaders");function fy(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(fy,"toHttpHeaders");function my(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}i(my,"isNodeFormData");function gy(e){return e==null}i(gy,"isNil");var qc=new Xn;var r_=Ne(require("fs")),Yp=Ne(Xp());var n_={"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 o_(e){let t=e.split(";")[0].trim().toLowerCase();return n_[t]??""}i(o_,"contentTypeToExtension");var i_=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),a_=i((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 Qp({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:a,props:s,extraProps:u,authLocation:p="headers"}){return oe({audience:"human",name:a||"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:R.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:d})=>({url:R.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
11
|
+
i.e ${a_(t,d)}/resource or /resource`,required:!0,defaultValue:d?t(d):"",...s?.url??{}})}),"props")}),method:R.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(bi).map(d=>({label:d,value:d}))},...s?.method??{}}),headers:R.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...s?.headers??{}}),queryParams:R.Object({displayName:"Query Parameters",required:!0,...s?.queryParams??{}}),body_type:R.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:R.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:d})=>{if(!d)return{};let g=d,x={};switch(g){case"none":break;case"json":x.data=R.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":x.data=R.LongText({displayName:"Raw Body",required:!0});break;case"form_data":x.data=R.Array({displayName:"Form Data",required:!0,properties:{fieldName:R.ShortText({displayName:"Field Name",required:!0}),fieldType:R.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:R.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:R.File({displayName:"File Field Value",required:!1})}});break}return x},"props")}),response_is_binary:R.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:R.Checkbox({displayName:"No Error on Failure",required:!1,...s?.failsafe??{}}),timeout:R.Number({displayName:"Timeout (in seconds)",required:!1,...s?.timeout??{}}),followRedirects:R.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...u},run:i(async d=>{let{method:g,url:x,headers:v,queryParams:l,body:f,body_type:y,failsafe:h,timeout:P,response_is_binary:T,followRedirects:H}=d.propsValue;Vr(g,"Method"),Vr(x,"URL");let fe=ge(r)?{}:await r(d.auth,d.propsValue),xe=x.url,Ce=xe.startsWith("http://")||xe.startsWith("https://")?xe:i_({baseUrl:t(d.auth),relativePath:xe}),ee={method:g,url:Ce,headers:{...v??{},...p==="headers"||!ge(p)?fe:{}},queryParams:{...p==="queryParams"?fe:{},...l??{}},timeout:P?P*1e3:0,followRedirects:H};if(T&&(ee.responseType="arraybuffer"),f)if(y&&y!=="none"){let G=f.data;if(y==="form_data"){let yt=G,ut=new Yp.default;for(let{fieldName:j,fieldType:A,textFieldValue:E,fileFieldValue:O}of yt)A==="text"&&!pr(E)?ut.append(j,E):A==="file"&&!pr(O)&&ut.append(j,O.data,{filename:O?.filename});ee.body=ut,ee.headers={...ee.headers,...ut.getHeaders()}}else ee.body=G}else y||(ee.body=f);try{let G=await qc.sendRequest(ee);return await s_(d.files,G.body,G.status,G.headers,T)}catch(G){if(h)return Bc({error:G,requestBody:ee.body});throw G}},"run")})}i(Qp,"createCustomApiCallAction");var s_=i(async(e,t,r,n,o)=>{let a;if(o&&u_(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=o_(s??"")||"txt",p;t instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?p=t:p=Buffer.from(t),a=await e.write({fileName:`output.${u}`,data:p})}else a=t;return{status:r,headers:n,body:a}},"handleBinaryResponse"),u_=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Te={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:a,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(ge(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((g,x)=>Math.max(g,x.epochMilliSeconds),u);return await t.put("lastPoll",d),p.filter(g=>g.epochMilliSeconds>u).map(g=>g.data)}case 1:{let u=await t.get("lastItem"),p=await e.items({store:t,auth:r,propsValue:n,lastItemId:u,files:a,server:s}),d=p.findIndex(v=>v.id===u),g=[];ge(u)||d==-1?g=p??[]:g=p?.slice(0,d)??[],ge(o)||(g=g.slice(-o));let x=g?.[0]?.id;return ge(x)||await t.put("lastItem",x),g.map(v=>v.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o,isRepublish:a}){switch(e.strategy){case 0:{if(a&&!ge(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(a&&!ge(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;ge(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:a}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:a});break}case 1:{s=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:a});break}}return c_(s.map(u=>u.data))}};function c_(e){return e.length<=5?e:e.slice(0,5)}i(c_,"getFirstFiveOrAll");var td=Ne(so());var uo={strategy:0,items:i(async({auth:e})=>(await I.listPlans({auth:e})).map(r=>({epochMilliSeconds:(0,td.default)(r.createdDateTime).valueOf(),data:r})),"items")},rd=At({auth:K,name:"newPlanCreated",displayName:"New Plan Created",description:"Triggers when a new Plan is created in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a new plan is created in Microsoft 365 Planner across the authenticated user's accessible plans. Polls periodically and emits each newly created plan."},props:{},sampleData:{},type:"POLLING",async test(e){return await Te.test(uo,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(uo,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(uo,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(uo,e)}});var nd=Ne(so());var l_={planId:pe({required:!0})},co={strategy:0,items:i(async({auth:e,propsValue:{planId:t}})=>{if(!t)return[];let r=await I.getUser({auth:e});if(!r||!r.id)throw new Error("Unable to fetch authenticated user details.");return(await I.listTasks({auth:e,planId:t})).filter(o=>{let a=String(r.id);return o.assignments&&Object.prototype.hasOwnProperty.call(o.assignments,a)}).map(o=>({epochMilliSeconds:(0,nd.default)(o.createdDateTime).valueOf(),data:o}))},"items")},od=At({auth:K,name:"newTaskAssignedToUser",displayName:"New Task Assigned to User",description:"Triggers when a Task is assigned to the authenticated user in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a task within a specified Planner plan is assigned to the authenticated (connected) user. Polls periodically and emits each new task in that plan where the current user is among the assignees."},props:l_,sampleData:{},type:"POLLING",async test(e){return await Te.test(co,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(co,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(co,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(co,e)}});var id=Ne(so());var p_={planId:pe({required:!0})},lo={strategy:0,items:i(async({auth:e,propsValue:{planId:t}})=>t?(await I.listTasks({auth:e,planId:t})).map(n=>({epochMilliSeconds:(0,id.default)(n.createdDateTime).valueOf(),data:n})):[],"items")},ad=At({auth:K,name:"newTaskCreated",displayName:"New Task Created",description:"Triggers when a new Task is created in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a new task is created within a specified Planner plan. Polls periodically and emits each newly created task for the configured plan."},props:p_,sampleData:{"@odata.etag":'W/"JzEtVGFzayAgQEBAffEBAQEBAQEBARCc="',planId:"s58lztas2UyCXSffEjnlVRgWUAFMLw",bucketId:"xZ2RCz88uE6BffffftN-0TKffPGUAB-pQ",title:"test task 123",orderHint:"8584411578775238762",assigneePriority:"",percentComplete:0,startDateTime:null,createdDateTime:"2025-10-14T13:36:47.953708Z",dueDateTime:null,hasDescription:!1,previewType:"automatic",completedDateTime:null,referenceCount:0,checklistItemCount:0,activeChecklistItemCount:0,conversationThreadId:null,priority:5,id:"wvG9lNxhuUO2JuedF9-rimUAFsBA",completedBy:null,createdBy:{user:{displayName:null,id:"90b3720d-f459-42c1-a02e-6471a1ecb068"},application:{displayName:null,id:"5ea0744c-62fa-4a19-99be-99f0869d3182"}},appliedCategories:{},assignments:{}},type:"POLLING",async test(e){return await Te.test(lo,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(lo,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(lo,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(lo,e)}});var d_=ou({displayName:"Microsoft 365 Planner",description:"Microsoft 365 Planner is part of the Microsoft 365 suite, offering lightweight task and bucket-based planning for teams. This integration supports creating plans, buckets, tasks, fetching them, deleting them, and custom API calls.",auth:K,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/microsoft-365-planner.png",authors:["LuizDMM","sanket-a11y"],actions:[Rc,zc,kc,Dc,Cc,jc,Lc,Fc,Nc,Mc,Uc,Qp({auth:K,baseUrl:i(e=>{let t=St(e);return $t(t)+"/v1.0/"},"baseUrl"),authMapping:i(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[rd,ad,od]});0&&(module.exports={microsoft365Planner});
|
|
12
12
|
/*! Bundled license information:
|
|
13
13
|
|
|
14
14
|
mime-types/index.js:
|