@activepieces/piece-google-tasks 0.4.6 → 0.5.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-google-tasks",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "main": "./src/index.js",
5
5
  "dependencies": {},
6
6
  "files": [
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var js=Object.create;var Ke=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var Fs=Object.getOwnPropertyNames;var Bs=Object.getPrototypeOf,Vs=Object.prototype.hasOwnProperty;var o=(e,t)=>Ke(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Ke(e,r,{get:t[r],enumerable:!0})},fn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fs(t))!Vs.call(e,i)&&i!==r&&Ke(e,i,{get:()=>t[i],enumerable:!(n=Ls(t,i))||n.enumerable});return e};var Oe=(e,t,r)=>(r=e!=null?js(Bs(e)):{},fn(t||!e||!e.__esModule?Ke(r,"default",{value:e,enumerable:!0}):r,e)),Zs=e=>fn(Ke({},"__esModule",{value:!0}),e);var wo=E((Oo,Lt)=>{(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"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",p={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(p.zoneIndex)||[])[0],_,M;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(M=d-g,_=":";M--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=function(){let ee=s.split(":"),ie=[];for(let qe=0;qe<ee.length;qe++)ie.push(parseInt(ee[qe],16));return ie}(),{parts:d,zoneId:v}}o(f,"expandIPv6");function y(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,_;for(;m>0;){if(_=g-m,_<0&&(_=0),s[v]>>_!==d[v]>>_)return!1;m-=g,v+=1}return!0}o(y,"matchCIDR");function x(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(x,"parseIntAuto");function b(s,d){for(;s.length<d;)s=`0${s}`;return s}o(b,"padPart");let P={};P.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,_,M;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(M=m[_],g&&M!==0)return null;M!==8&&(g=!0),d+=M}else return null;return 32-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return P.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),P.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<4;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.isIPv4=function(s){return this.parser(s)!==null},P.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},P.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv4.isValidFourPartDecimal=function(s){return!!(P.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},P.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!P.IPv4.isValidCIDR(s)||!d?!1:P.IPv4.isValidFourPartDecimal(d[1])},P.IPv4.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},P.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},P.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},P.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return function(){let v=d.slice(1,6),_=[];for(let M=0;M<v.length;M++)g=v[M],_.push(x(g));return _}();if(d=s.match(r.longValue)){if(m=x(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],_;for(_=0;_<=24;_+=8)v.push(m>>_&255);return v}().reverse()}else return(d=s.match(r.twoOctet))?function(){let v=d.slice(1,4),_=[];if(m=x(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_}():(d=s.match(r.threeOctet))?function(){let v=d.slice(1,5),_=[];if(m=x(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(x(v[0])),_.push(x(v[1])),_.push(m>>8&255),_.push(m&255),_}():null},P.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.IPv6=function(){function s(d,g){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={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},v,_;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(_=m[v],g&&_!==0)return null;_!==16&&(g=!0),d+=_}else return null;return 128-d},s.prototype.range=function(){return P.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(b(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new P.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,_;for(;_=d.exec(g);)_[0].length>v&&(m=_.index,v=_[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),P.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<16;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},P.IPv6.isIPv6=function(s){return this.parser(s)!==null},P.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},P.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},P.IPv6.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},P.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},P.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},P.IPv6.parser=function(s){let d,g,m,v,_,M;if(m=s.match(p.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(p.native.test(s))return f(s,8);if((m=s.match(p.transitional))&&(M=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+M,6),d.parts)){for(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<_.length;g++)if(v=_[g],!(0<=v&&v<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[3]),{parts:d.parts,zoneId:d.zoneId}}return null},P.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},P.fromByteArray=function(s){let d=s.length;if(d===4)return new P.IPv4(s);if(d===16)return new P.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},P.isValid=function(s){return P.IPv6.isValid(s)||P.IPv4.isValid(s)},P.isValidCIDR=function(s){return P.IPv6.isValidCIDR(s)||P.IPv4.isValidCIDR(s)},P.parse=function(s){if(P.IPv6.isValid(s))return P.IPv6.parse(s);if(P.IPv4.isValid(s))return P.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},P.parseCIDR=function(s){try{return P.IPv6.parseCIDR(s)}catch{try{return P.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},P.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},P.subnetMatch=function(s,d,g){let m,v,_,M;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(_=d[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(M=_[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return g},typeof Lt<"u"&&Lt.exports?Lt.exports=P:e.ipaddr=P})(Oo)});var zi=E((GS,Ai)=>{var Si=require("stream").Stream,xl=require("util");Ai.exports=se;function se(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(se,"DelayedStream");xl.inherits(se,Si);se.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(se.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});se.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};se.prototype.resume=function(){this._released||this.release(),this.source.resume()};se.prototype.pause=function(){this.source.pause()};se.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};se.prototype.pipe=function(){var e=Si.prototype.pipe.apply(this,arguments);return this.resume(),e};se.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)};se.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 Ri=E((KS,wi)=>{var Pl=require("util"),Oi=require("stream").Stream,ki=zi();wi.exports=G;function G(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(G,"CombinedStream");Pl.inherits(G,Oi);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof ki)){var r=ki.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};G.prototype.pipe=function(e,t){return Oi.prototype.pipe.call(this,e,t),this.resume(),e};G.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}};G.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=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.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()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.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")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.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)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Di=E((XS,Ni)=>{"use strict";Ni.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 Mi=E(Q=>{"use strict";var Gt=Di(),_l=require("path").extname,Ci=/^\s*([^;\s]*)(?:;|\s|$)/,bl=/^text\//i;Q.charset=Ui;Q.charsets={lookup:Ui};Q.contentType=Tl;Q.extension=Il;Q.extensions=Object.create(null);Q.lookup=El;Q.types=Object.create(null);$l(Q.extensions,Q.types);function Ui(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&Gt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&bl.test(t[1])?"UTF-8":!1}o(Ui,"charset");function Tl(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Q.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Q.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Tl,"contentType");function Il(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&Q.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Il,"extension");function El(e){if(!e||typeof e!="string")return!1;var t=_l("x."+e).toLowerCase().substr(1);return t&&Q.types[t]||!1}o(El,"lookup");function $l(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Gt).forEach(o(function(i){var u=Gt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var p=0;p<c.length;p++){var f=c[p];if(t[f]){var y=r.indexOf(Gt[t[f]].source),x=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>x||y===x&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o($l,"populateMaps")});var Li=E((eA,ji)=>{ji.exports=Sl;function Sl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Sl,"defer")});var Vr=E((rA,Bi)=>{var Fi=Li();Bi.exports=Al;function Al(e){var t=!1;return Fi(function(){t=!0}),o(function(n,i){t?e(n,i):Fi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Al,"async")});var Zr=E((oA,Vi)=>{Vi.exports=zl;function zl(e){Object.keys(e.jobs).forEach(kl.bind(e)),e.jobs={}}o(zl,"abort");function kl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(kl,"clean")});var Hr=E((aA,Hi)=>{var Zi=Vr(),Ol=Zr();Hi.exports=wl;function wl(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Rl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Ol(r):r.results[i]=c,n(u,r.results))})}o(wl,"iterate");function Rl(e,t,r,n){var i;return e.length==2?i=e(r,Zi(n)):i=e(r,t,Zi(n)),i}o(Rl,"runJob")});var Wr=E((uA,Wi)=>{Wi.exports=Nl;function Nl(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(i,u){return t(e[i],e[u])}),n}o(Nl,"state")});var Gr=E((lA,Gi)=>{var Dl=Zr(),Cl=Vr();Gi.exports=Ul;function Ul(e){Object.keys(this.jobs).length&&(this.index=this.size,Dl(this),Cl(e)(null,this.results))}o(Ul,"terminator")});var Ki=E((dA,qi)=>{var Ml=Hr(),jl=Wr(),Ll=Gr();qi.exports=Fl;function Fl(e,t,r){for(var n=jl(e);n.index<(n.keyedList||e).length;)Ml(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Ll.bind(n,r)}o(Fl,"parallel")});var qr=E((fA,qt)=>{var Ji=Hr(),Bl=Wr(),Vl=Gr();qt.exports=Zl;qt.exports.ascending=Xi;qt.exports.descending=Hl;function Zl(e,t,r,n){var i=Bl(e,r);return Ji(e,t,i,o(function u(c,p){if(c){n(c,p);return}if(i.index++,i.index<(i.keyedList||e).length){Ji(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Vl.bind(i,n)}o(Zl,"serialOrdered");function Xi(e,t){return e<t?-1:e>t?1:0}o(Xi,"ascending");function Hl(e,t){return-1*Xi(e,t)}o(Hl,"descending")});var Qi=E((yA,Yi)=>{var Wl=qr();Yi.exports=Gl;function Gl(e,t,r){return Wl(e,t,null,r)}o(Gl,"serial")});var ta=E((vA,ea)=>{ea.exports={parallel:Ki(),serial:Qi(),serialOrdered:qr()}});var Kr=E((xA,ra)=>{"use strict";ra.exports=Object});var oa=E((PA,na)=>{"use strict";na.exports=Error});var aa=E((_A,ia)=>{"use strict";ia.exports=EvalError});var ua=E((bA,sa)=>{"use strict";sa.exports=RangeError});var la=E((TA,ca)=>{"use strict";ca.exports=ReferenceError});var da=E((IA,pa)=>{"use strict";pa.exports=SyntaxError});var Kt=E((EA,ma)=>{"use strict";ma.exports=TypeError});var ga=E(($A,fa)=>{"use strict";fa.exports=URIError});var ha=E((SA,ya)=>{"use strict";ya.exports=Math.abs});var xa=E((AA,va)=>{"use strict";va.exports=Math.floor});var _a=E((zA,Pa)=>{"use strict";Pa.exports=Math.max});var Ta=E((kA,ba)=>{"use strict";ba.exports=Math.min});var Ea=E((OA,Ia)=>{"use strict";Ia.exports=Math.pow});var Sa=E((wA,$a)=>{"use strict";$a.exports=Math.round});var za=E((RA,Aa)=>{"use strict";Aa.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Oa=E((DA,ka)=>{"use strict";var ql=za();ka.exports=o(function(t){return ql(t)||t===0?t:t<0?-1:1},"sign")});var Ra=E((UA,wa)=>{"use strict";wa.exports=Object.getOwnPropertyDescriptor});var Jr=E((MA,Na)=>{"use strict";var Jt=Ra();if(Jt)try{Jt([],"length")}catch{Jt=null}Na.exports=Jt});var Ca=E((jA,Da)=>{"use strict";var Xt=Object.defineProperty||!1;if(Xt)try{Xt({},"a",{value:1})}catch{Xt=!1}Da.exports=Xt});var Xr=E((LA,Ua)=>{"use strict";Ua.exports=o(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 i=42;t[r]=i;for(var u 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 c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(t,r);if(p.value!==i||p.enumerable!==!0)return!1}return!0},"hasSymbols")});var La=E((BA,ja)=>{"use strict";var Ma=typeof Symbol<"u"&&Symbol,Kl=Xr();ja.exports=o(function(){return typeof Ma!="function"||typeof Symbol!="function"||typeof Ma("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Kl()},"hasNativeSymbols")});var Yr=E((ZA,Fa)=>{"use strict";Fa.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Qr=E((HA,Ba)=>{"use strict";var Jl=Kr();Ba.exports=Jl.getPrototypeOf||null});var Ha=E((WA,Za)=>{"use strict";var Xl="Function.prototype.bind called on incompatible ",Yl=Object.prototype.toString,Ql=Math.max,ep="[object Function]",Va=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),tp=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),rp=o(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");Za.exports=o(function(t){var r=this;if(typeof r!="function"||Yl.apply(r)!==ep)throw new TypeError(Xl+r);for(var n=tp(arguments,1),i,u=o(function(){if(this instanceof i){var x=r.apply(this,Va(n,arguments));return Object(x)===x?x:this}return r.apply(t,Va(n,arguments))},"binder"),c=Ql(0,r.length-n.length),p=[],f=0;f<c;f++)p[f]="$"+f;if(i=Function("binder","return function ("+rp(p,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var Ve=E((qA,Wa)=>{"use strict";var np=Ha();Wa.exports=Function.prototype.bind||np});var Yt=E((KA,Ga)=>{"use strict";Ga.exports=Function.prototype.call});var en=E((JA,qa)=>{"use strict";qa.exports=Function.prototype.apply});var Ja=E((XA,Ka)=>{"use strict";Ka.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ya=E((YA,Xa)=>{"use strict";var op=Ve(),ip=en(),ap=Yt(),sp=Ja();Xa.exports=sp||op.call(ap,ip)});var es=E((QA,Qa)=>{"use strict";var up=Ve(),cp=Kt(),lp=Yt(),pp=Ya();Qa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new cp("a function is required");return pp(up,lp,t)},"callBindBasic")});var as=E((tz,is)=>{"use strict";var dp=es(),ts=Jr(),ns;try{ns=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var tn=!!ns&&ts&&ts(Object.prototype,"__proto__"),os=Object,rs=os.getPrototypeOf;is.exports=tn&&typeof tn.get=="function"?dp([tn.get]):typeof rs=="function"?o(function(t){return rs(t==null?t:os(t))},"getDunder"):!1});var ps=E((nz,ls)=>{"use strict";var ss=Yr(),us=Qr(),cs=as();ls.exports=ss?o(function(t){return ss(t)},"getProto"):us?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return us(t)},"getProto"):cs?o(function(t){return cs(t)},"getProto"):null});var rn=E((iz,ds)=>{"use strict";var mp=Function.prototype.call,fp=Object.prototype.hasOwnProperty,gp=Ve();ds.exports=gp.call(mp,fp)});var xs=E((az,vs)=>{"use strict";var U,yp=Kr(),hp=oa(),vp=aa(),xp=ua(),Pp=la(),Ge=da(),We=Kt(),_p=ga(),bp=ha(),Tp=xa(),Ip=_a(),Ep=Ta(),$p=Ea(),Sp=Sa(),Ap=Oa(),ys=Function,nn=o(function(e){try{return ys('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),yt=Jr(),zp=Ca(),on=o(function(){throw new We},"throwTypeError"),kp=yt?function(){try{return arguments.callee,on}catch{try{return yt(arguments,"callee").get}catch{return on}}}():on,Ze=La()(),J=ps(),Op=Qr(),wp=Yr(),hs=en(),ht=Yt(),He={},Rp=typeof Uint8Array>"u"||!J?U:J(Uint8Array),ke={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?U:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?U:ArrayBuffer,"%ArrayIteratorPrototype%":Ze&&J?J([][Symbol.iterator]()):U,"%AsyncFromSyncIteratorPrototype%":U,"%AsyncFunction%":He,"%AsyncGenerator%":He,"%AsyncGeneratorFunction%":He,"%AsyncIteratorPrototype%":He,"%Atomics%":typeof Atomics>"u"?U:Atomics,"%BigInt%":typeof BigInt>"u"?U:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?U:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?U:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?U:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":hp,"%eval%":eval,"%EvalError%":vp,"%Float16Array%":typeof Float16Array>"u"?U:Float16Array,"%Float32Array%":typeof Float32Array>"u"?U:Float32Array,"%Float64Array%":typeof Float64Array>"u"?U:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?U:FinalizationRegistry,"%Function%":ys,"%GeneratorFunction%":He,"%Int8Array%":typeof Int8Array>"u"?U:Int8Array,"%Int16Array%":typeof Int16Array>"u"?U:Int16Array,"%Int32Array%":typeof Int32Array>"u"?U:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ze&&J?J(J([][Symbol.iterator]())):U,"%JSON%":typeof JSON=="object"?JSON:U,"%Map%":typeof Map>"u"?U:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ze||!J?U:J(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":yp,"%Object.getOwnPropertyDescriptor%":yt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?U:Promise,"%Proxy%":typeof Proxy>"u"?U:Proxy,"%RangeError%":xp,"%ReferenceError%":Pp,"%Reflect%":typeof Reflect>"u"?U:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?U:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ze||!J?U:J(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?U:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ze&&J?J(""[Symbol.iterator]()):U,"%Symbol%":Ze?Symbol:U,"%SyntaxError%":Ge,"%ThrowTypeError%":kp,"%TypedArray%":Rp,"%TypeError%":We,"%Uint8Array%":typeof Uint8Array>"u"?U:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?U:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?U:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?U:Uint32Array,"%URIError%":_p,"%WeakMap%":typeof WeakMap>"u"?U:WeakMap,"%WeakRef%":typeof WeakRef>"u"?U:WeakRef,"%WeakSet%":typeof WeakSet>"u"?U:WeakSet,"%Function.prototype.call%":ht,"%Function.prototype.apply%":hs,"%Object.defineProperty%":zp,"%Object.getPrototypeOf%":Op,"%Math.abs%":bp,"%Math.floor%":Tp,"%Math.max%":Ip,"%Math.min%":Ep,"%Math.pow%":$p,"%Math.round%":Sp,"%Math.sign%":Ap,"%Reflect.getPrototypeOf%":wp};if(J)try{null.error}catch(e){ms=J(J(e)),ke["%Error.prototype%"]=ms}var ms,Np=o(function e(t){var r;if(t==="%AsyncFunction%")r=nn("async function () {}");else if(t==="%GeneratorFunction%")r=nn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=nn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&J&&(r=J(i.prototype))}return ke[t]=r,r},"doEval"),fs={__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"]},vt=Ve(),Qt=rn(),Dp=vt.call(ht,Array.prototype.concat),Cp=vt.call(hs,Array.prototype.splice),gs=vt.call(ht,String.prototype.replace),er=vt.call(ht,String.prototype.slice),Up=vt.call(ht,RegExp.prototype.exec),Mp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,jp=/\\(\\)?/g,Lp=o(function(t){var r=er(t,0,1),n=er(t,-1);if(r==="%"&&n!=="%")throw new Ge("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ge("invalid intrinsic syntax, expected opening `%`");var i=[];return gs(t,Mp,function(u,c,p,f){i[i.length]=p?gs(f,jp,"$1"):c||u}),i},"stringToPath"),Fp=o(function(t,r){var n=t,i;if(Qt(fs,n)&&(i=fs[n],n="%"+i[0]+"%"),Qt(ke,n)){var u=ke[n];if(u===He&&(u=Np(n)),typeof u>"u"&&!r)throw new We("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ge("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");vs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new We("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new We('"allowMissing" argument must be a boolean');if(Up(/^%?[^%]*%?$/,t)===null)throw new Ge("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Lp(t),i=n.length>0?n[0]:"",u=Fp("%"+i+"%",r),c=u.name,p=u.value,f=!1,y=u.alias;y&&(i=y[0],Cp(n,Dp([0,1],y)));for(var x=1,b=!0;x<n.length;x+=1){var P=n[x],s=er(P,0,1),d=er(P,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Ge("property names with quotes must have matching quotes");if((P==="constructor"||!b)&&(f=!0),i+="."+P,c="%"+i+"%",Qt(ke,c))p=ke[c];else if(p!=null){if(!(P in p)){if(!r)throw new We("base intrinsic for "+t+" exists, but the property is not available.");return}if(yt&&x+1>=n.length){var g=yt(p,P);b=!!g,b&&"get"in g&&!("originalValue"in g.get)?p=g.get:p=p[P]}else b=Qt(p,P),p=p[P];b&&!f&&(ke[c]=p)}}return p},"GetIntrinsic")});var _s=E((uz,Ps)=>{"use strict";var Bp=Xr();Ps.exports=o(function(){return Bp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Is=E((lz,Ts)=>{"use strict";var Vp=xs(),bs=Vp("%Object.defineProperty%",!0),Zp=_s()(),Hp=rn(),Wp=Kt(),tr=Zp?Symbol.toStringTag:null;Ts.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Wp("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tr&&(n||!Hp(t,tr))&&(bs?bs(t,tr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[tr]=r)},"setToStringTag")});var $s=E((dz,Es)=>{"use strict";var Gp=Function.prototype.call,qp=Object.prototype.hasOwnProperty,Kp=Ve();Es.exports=Kp.call(Gp,qp)});var As=E((mz,Ss)=>{"use strict";Ss.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Os=E((fz,ks)=>{"use strict";var cn=Ri(),Jp=require("util"),an=require("path"),Xp=require("http"),Yp=require("https"),Qp=require("url").parse,ed=require("fs"),td=require("stream").Stream,rd=require("crypto"),sn=Mi(),nd=ta(),od=Is(),Ee=$s(),un=As();function zs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(zs,"escapeHeaderParam");function j(e){if(!(this instanceof j))return new j(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],cn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(j,"FormData");Jp.inherits(j,cn);j.LINE_BREAK=`\r
2
- `;j.DEFAULT_CONTENT_TYPE="application/octet-stream";j.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=cn.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 i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};j.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)+j.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ee(t,"httpVersion"))&&!(t instanceof td))&&(r.knownLength||this._valuesToMeasure.push(t))};j.prototype._lengthRetriever=function(e,t){Ee(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ed.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ee(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ee(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};j.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+zs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&un(c,r.header);var p;for(var f in c)if(Ee(c,f)){if(p=c[f],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(u+=f+": "+p.join("; ")+j.LINE_BREAK)}return"--"+this.getBoundary()+j.LINE_BREAK+u+j.LINE_BREAK};j.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=an.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=an.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ee(e,"httpVersion")&&(r=an.basename(e.client._httpMessage.path||"")),r)return'filename="'+zs(r)+'"'};j.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=sn.lookup(e.name)),!r&&e&&e.path&&(r=sn.lookup(e.path)),!r&&e&&e.readable&&Ee(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=sn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=j.DEFAULT_CONTENT_TYPE),r};j.prototype._multiPartFooter=function(){return function(e){var t=j.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};j.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+j.LINE_BREAK};j.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ee(e,t)&&(r[t.toLowerCase()]=e[t]);return r};j.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};j.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};j.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(j.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};j.prototype._generateBoundary=function(){this._boundary="--------------------------"+rd.randomBytes(12).toString("hex")};j.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};j.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};j.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}nd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};j.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Qp(e),n=un({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=un(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Yp.request(n):r=Xp.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var p,f=o(function(y,x){return r.removeListener("error",f),r.removeListener("response",p),t.call(this,y,x)},"callback");p=f.bind(this,null),r.on("error",f),r.on("response",p)}}.bind(this)),r};j.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};j.prototype.toString=function(){return"[object FormData]"};od(j.prototype,"FormData");ks.exports=j});var yd={};mn(yd,{googleTasks:()=>gd});module.exports=Zs(yd);var Hs=Object.freeze({status:"aborted"});function T(e,t,r){function n(p,f){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),t(p,f);let y=c.prototype,x=Object.keys(y);for(let b=0;b<x.length;b++){let P=x[b];P in p||(p[P]=y[P].bind(p))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(p){var f;let y=r?.Parent?new u:this;n(y,p),(f=y._zod).deferred??(f.deferred=[]);for(let x of y._zod.deferred)x();return y}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(T,"$constructor");var Ws=Symbol("zod_brand"),ue=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},_t=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},or={};function pe(e){return e&&Object.assign(or,e),or}o(pe,"config");function ar(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(ar,"getEnumValues");function yn(e,t){return typeof t=="bigint"?t.toString():t}o(yn,"jsonStringifyReplacer");function Tt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Tt,"cached");function hn(e){return e==null}o(hn,"nullish");function It(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(It,"cleanRegex");var gn=Symbol("evaluating");function q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==gn)return n===void 0&&(n=gn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(q,"defineLazy");var sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Je(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Je,"isObject");var Gs=Tt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function vn(e){if(Je(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Je(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(vn,"isPlainObject");var xn=new Set(["string","number","symbol"]);function we(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(we,"escapeRegex");function Et(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Et,"clone");function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>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:o(()=>t.error,"error")}:t}o(Z,"normalizeParams");function Pn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Pn,"optionalKeys");var qs={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 Re(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}o(Re,"aborted");function ve(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(ve,"prefixIssues");function bt(e){return typeof e=="string"?e:e?.message}o(bt,"unwrapMessage");function xe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=bt(e.inst?._zod.def?.error?.(e))??bt(t?.error?.(e))??bt(r.customError?.(e))??bt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(xe,"finalizeIssue");function _n(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(_n,"getLengthableOrigin");function ur(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ur,"issue");var bn=o((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,yn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Tn=T("$ZodError",bn),Xe=T("$ZodError",bn,{Parent:Error});var Js=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new ue;if(c.issues.length){let p=new(i?.Err??e)(c.issues.map(f=>xe(f,u,pe())));throw sr(p,i?.callee),p}return c.value},"_parse"),$t=Js(Xe),Xs=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let p=new(i?.Err??e)(c.issues.map(f=>xe(f,u,pe())));throw sr(p,i?.callee),p}return c.value},"_parseAsync"),St=Xs(Xe),Ys=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new ue;return u.issues.length?{success:!1,error:new(e??Tn)(u.issues.map(c=>xe(c,i,pe())))}:{success:!0,data:u.value}},"_safeParse"),Ye=Ys(Xe),Qs=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>xe(c,i,pe())))}:{success:!0,data:u.value}},"_safeParseAsync"),Qe=Qs(Xe);var eu="(?:(?:\\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])))",tu=new RegExp(`^${eu}$`);var In=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),En=/^-?\d+n?$/;var cr=/^-?\d+(?:\.\d+)?$/,$n=/^(?:true|false)$/i;var Ne=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Sn=T("$ZodCheckMinLength",(e,t)=>{var r;Ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!hn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=_n(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var lr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ne.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),An=T("$ZodCheckRegex",(e,t)=>{lr.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 kn={major:4,minor:3,patch:6};var H=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,p,f)=>{let y=Re(c),x;for(let b of p){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(y)continue;let P=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new ue;if(x||s instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await s,c.issues.length!==P&&(y||(y=Re(c,P)))});else{if(c.issues.length===P)continue;y||(y=Re(c,P))}}return x?x.then(()=>c):c},"runChecks"),u=o((c,p,f)=>{if(Re(c))return c.aborted=!0,c;let y=i(p,n,f);if(y instanceof Promise){if(f.async===!1)throw new ue;return y.then(x=>e._zod.parse(x,f))}return e._zod.parse(y,f)},"handleCanaryResult");e._zod.run=(c,p)=>{if(p.skipChecks)return e._zod.parse(c,p);if(p.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...p,skipChecks:!0});return y instanceof Promise?y.then(x=>u(x,c,p)):u(y,c,p)}let f=e._zod.parse(c,p);if(f instanceof Promise){if(p.async===!1)throw new ue;return f.then(y=>i(y,n,p))}return i(f,n,p)}}q(e,"~standard",()=>({validate:o(i=>{try{let u=Ye(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return Qe(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kt=T("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??In(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}}),pr=T("$ZodStringFormat",(e,t)=>{lr.init(e,t),kt.init(e,t)});var Dn=T("$ZodURL",(e,t)=>{pr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.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=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Cn=T("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??cr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var dr=T("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=$n,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Un=T("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=En,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 Mn=T("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),jn=T("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Ln=T("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Fn=T("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function On(e,t,r){e.issues.length&&t.issues.push(...ve(r,e.issues)),t.value[r]=e.value}o(On,"handleArrayResult");var Bn=T("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let p=i[c],f=t.element._zod.run({value:p,issues:[]},n);f instanceof Promise?u.push(f.then(y=>On(y,r,c))):On(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function zt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...ve(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(zt,"handlePropertyResult");function ru(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=Pn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(ru,"normalizeDef");function nu(e,t,r,n,i,u){let c=[],p=i.keySet,f=i.catchall._zod,y=f.def.type,x=f.optout==="optional";for(let b in t){if(p.has(b))continue;if(y==="never"){c.push(b);continue}let P=f.run({value:t[b],issues:[]},n);P instanceof Promise?e.push(P.then(s=>zt(s,r,b,t,x))):zt(P,r,b,t,x)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(nu,"handleCatchall");var Vn=T("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let p=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...p};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Tt(()=>ru(t));q(e._zod,"propValues",()=>{let p=t.shape,f={};for(let y in p){let x=p[y]._zod;if(x.values){f[y]??(f[y]=new Set);for(let b of x.values)f[y].add(b)}}return f});let i=Je,u=t.catchall,c;e._zod.parse=(p,f)=>{c??(c=n.value);let y=p.value;if(!i(y))return p.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),p;p.value={};let x=[],b=c.shape;for(let P of c.keys){let s=b[P],d=s._zod.optout==="optional",g=s._zod.run({value:y[P],issues:[]},f);g instanceof Promise?x.push(g.then(m=>zt(m,p,P,y,d))):zt(g,p,P,y,d)}return u?nu(x,y,p,f,n.value,e):x.length?Promise.all(x).then(()=>p):p}});function wn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!Re(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>xe(c,n,pe())))}),t)}o(wn,"handleUnionResults");var mr=T("$ZodUnion",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),q(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),q(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),q(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>It(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,p=[];for(let f of t.options){let y=f._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)p.push(y),c=!0;else{if(y.issues.length===0)return y;p.push(y)}}return c?Promise.all(p).then(f=>wn(f,i,e,u)):wn(p,i,e,u)}});var Zn=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,mr.init(e,t);let r=e._zod.parse;q(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[p,f]of Object.entries(c)){i[p]||(i[p]=new Set);for(let y of f)i[p].add(y)}}return i});let n=Tt(()=>{let i=t.options,u=new Map;for(let c of i){let p=c._zod.propValues?.[t.discriminator];if(!p||p.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of p){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Je(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let p=n.value.get(c?.[t.discriminator]);return p?p._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Hn=T("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!vn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let p=new Set;for(let y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){p.add(typeof y=="number"?y.toString():y);let x=t.valueType._zod.run({value:i[y],issues:[]},n);x instanceof Promise?u.push(x.then(b=>{b.issues.length&&r.issues.push(...ve(y,b.issues)),r.value[y]=b.value})):(x.issues.length&&r.issues.push(...ve(y,x.issues)),r.value[y]=x.value)}let f;for(let y in i)p.has(y)||(f=f??[],f.push(y));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let p of Reflect.ownKeys(i)){if(p==="__proto__")continue;let f=t.keyType._zod.run({value:p,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&cr.test(p)&&f.issues.length){let b=t.keyType._zod.run({value:Number(p),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(f=b)}if(f.issues.length){t.mode==="loose"?r.value[p]=i[p]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(b=>xe(b,n,pe())),input:p,path:[p],inst:e});continue}let x=t.valueType._zod.run({value:i[p],issues:[]},n);x instanceof Promise?u.push(x.then(b=>{b.issues.length&&r.issues.push(...ve(p,b.issues)),r.value[f.value]=b.value})):(x.issues.length&&r.issues.push(...ve(p,x.issues)),r.value[f.value]=x.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Wn=T("$ZodEnum",(e,t)=>{H.init(e,t);let r=ar(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>xn.has(typeof i)).map(i=>typeof i=="string"?we(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),Gn=T("$ZodLiteral",(e,t)=>{if(H.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"?we(n):n?we(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var qn=T("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new _t(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new ue;return r.value=i,r}});function Rn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Rn,"handleOptionalResult");var Kn=T("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${It(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Rn(u,r.value)):Rn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Jn=T("$ZodNullable",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${It(r.source)}|null)$`):void 0}),q(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 Xn=T("$ZodPipe",(e,t)=>{H.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),q(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>At(c,t.in,n)):At(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>At(u,t.out,n)):At(i,t.out,n)}});function At(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(At,"handlePipeResult");var Yn=T("$ZodCustom",(e,t)=>{Ne.init(e,t),H.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Nn(u,r,n,e));Nn(i,r,n,e)}});function Nn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(ur(i))}}o(Nn,"handleRefineResult");var eo,su=Symbol("ZodOutput"),uu=Symbol("ZodInput"),fr=class{static{o(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 i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function to(){return new fr}o(to,"registry");(eo=globalThis).__zod_globalRegistry??(eo.__zod_globalRegistry=to());var gr=globalThis.__zod_globalRegistry;function ro(e,t){return new e({type:"string",...Z(t)})}o(ro,"_string");function no(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(no,"_coercedString");function oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(oo,"_url");function io(e,t){return new e({type:"number",checks:[],...Z(t)})}o(io,"_number");function ao(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(ao,"_coercedNumber");function so(e,t){return new e({type:"boolean",...Z(t)})}o(so,"_boolean");function uo(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(uo,"_coercedBoolean");function co(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(co,"_coercedBigint");function lo(e){return new e({type:"any"})}o(lo,"_any");function po(e){return new e({type:"unknown"})}o(po,"_unknown");function mo(e,t){return new e({type:"void",...Z(t)})}o(mo,"_void");function fo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(fo,"_coercedDate");function ae(e,t){return new Sn({check:"min_length",...Z(t),minimum:e})}o(ae,"_minLength");function Pe(e,t){return new An({check:"string_format",format:"regex",...Z(t),pattern:e})}o(Pe,"_regex");function go(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(go,"_custom");var K=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>$t(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Ye(e,r,n),e.parseAsync=async(r,n)=>St(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Qe(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)=>Et(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),wt=T("ZodMiniString",(e,t)=>{kt.init(e,t),K.init(e,t)});function a(e){return ro(wt,e)}o(a,"string");var yo=T("ZodMiniStringFormat",(e,t)=>{pr.init(e,t),wt.init(e,t)});var vu=T("ZodMiniURL",(e,t)=>{Dn.init(e,t),yo.init(e,t)});function ho(e){return oo(vu,e)}o(ho,"url");var yr=T("ZodMiniNumber",(e,t)=>{Cn.init(e,t),K.init(e,t)});function Y(e){return io(yr,e)}o(Y,"number");var hr=T("ZodMiniBoolean",(e,t)=>{dr.init(e,t),K.init(e,t)});function F(e){return so(hr,e)}o(F,"boolean");var vo=T("ZodMiniBigInt",(e,t)=>{Un.init(e,t),K.init(e,t)});var xu=T("ZodMiniAny",(e,t)=>{Mn.init(e,t),K.init(e,t)});function tt(){return lo(xu)}o(tt,"any");var Pu=T("ZodMiniUnknown",(e,t)=>{jn.init(e,t),K.init(e,t)});function k(){return po(Pu)}o(k,"unknown");var _u=T("ZodMiniVoid",(e,t)=>{Ln.init(e,t),K.init(e,t)});function xo(e){return mo(_u,e)}o(xo,"_void");var Po=T("ZodMiniDate",(e,t)=>{Fn.init(e,t),K.init(e,t)});var bu=T("ZodMiniArray",(e,t)=>{Bn.init(e,t),K.init(e,t)});function R(e,t){return new bu({type:"array",element:e,...Z(t)})}o(R,"array");var Tu=T("ZodMiniObject",(e,t)=>{Vn.init(e,t),K.init(e,t),q(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Tu(r)}o(l,"object");var Iu=T("ZodMiniUnion",(e,t)=>{mr.init(e,t),K.init(e,t)});function N(e,t){return new Iu({type:"union",options:e,...Z(t)})}o(N,"union");var Eu=T("ZodMiniDiscriminatedUnion",(e,t)=>{Zn.init(e,t),K.init(e,t)});function De(e,t,r){return new Eu({type:"union",options:t,discriminator:e,...Z(r)})}o(De,"discriminatedUnion");var $u=T("ZodMiniRecord",(e,t)=>{Hn.init(e,t),K.init(e,t)});function O(e,t,r){return new $u({type:"record",keyType:e,valueType:t,...Z(r)})}o(O,"record");var Su=T("ZodMiniEnum",(e,t)=>{Wn.init(e,t),K.init(e,t),e.options=Object.values(t.entries)});function C(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Su({type:"enum",entries:r,...Z(t)})}o(C,"_enum");var Au=T("ZodMiniLiteral",(e,t)=>{Gn.init(e,t),K.init(e,t)});function $(e,t){return new Au({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o($,"literal");var zu=T("ZodMiniTransform",(e,t)=>{qn.init(e,t),K.init(e,t)});function _e(e){return new zu({type:"transform",transform:e})}o(_e,"transform");var ku=T("ZodMiniOptional",(e,t)=>{Kn.init(e,t),K.init(e,t)});function h(e){return new ku({type:"optional",innerType:e})}o(h,"optional");var Ou=T("ZodMiniNullable",(e,t)=>{Jn.init(e,t),K.init(e,t)});function rt(e){return new Ou({type:"nullable",innerType:e})}o(rt,"nullable");var wu=T("ZodMiniPipe",(e,t)=>{Xn.init(e,t),K.init(e,t)});function be(e,t){return new wu({type:"pipe",in:e,out:t})}o(be,"pipe");var Ru=T("ZodMiniCustom",(e,t)=>{Yn.init(e,t),K.init(e,t)});function Rt(e,t){return go(Ru,e??(()=>!0),t)}o(Rt,"custom");var nt={};mn(nt,{bigint:()=>Lu,boolean:()=>ju,date:()=>Fu,number:()=>Mu,string:()=>Uu});function Uu(e){return no(wt,e)}o(Uu,"string");function Mu(e){return ao(yr,e)}o(Mu,"number");function ju(e){return uo(hr,e)}o(ju,"boolean");function Lu(e){return co(vo,e)}o(Lu,"bigint");function Fu(e){return fo(Po,e)}o(Fu,"date");var xr=l({retryOnFailure:l({defaultValue:h(F()),hide:h(F())}),continueOnFailure:l({defaultValue:h(F()),hide:h(F())})}),vr=class{constructor(t,r,n,i,u,c,p,f,y,x,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=p;this.errorHandlingOptions=f;this.outputSchema=y;this.audience=x;this.aiMetadata=b}static{o(this,"IAction")}},Nt=o(e=>new vr(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 L=l({displayName:a(),description:h(a())}),D=o((e,t)=>l({type:$(t),required:F(),defaultValue:h(tt())}),"TPropertyValue");var te=l({...L.shape,...D(a(),"SHORT_TEXT").shape}),de=l({...L.shape,...D(a(),"LONG_TEXT").shape});var bo=l({label:a(),value:k()}),Dt=l({disabled:h(F()),placeholder:h(a()),options:R(bo)});var re=l({...L.shape,options:Dt,...D(k(),"STATIC_DROPDOWN").shape}),me=l({...L.shape,options:Dt,...D(R(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Pr=l({...L.shape,...D(k(),"DROPDOWN").shape,refreshers:R(a())}),ot=l({...L.shape,...D(R(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:R(a())});var fe=l({...L.shape,...D(F(),"CHECKBOX").shape});var ge=l({...L.shape,...D(Y(),"NUMBER").shape});var it=l({...L.shape,...D(k(),"FILE").shape});var at=l({...L.shape,...D(a(),"DATE_TIME").shape});var To=O(a(),N([te,de,re,ot,me,fe,ge,it,at])),st=l({...L.shape,properties:To,...D(R(k()),"ARRAY").shape});var ut=l({...L.shape,...D(N([O(a(),k())]),"JSON").shape});var Io=N([te,re,ut,st,me]),Vu=O(a(),Io),_r=l({refreshers:R(a()),...L.shape,...D(k(),"DYNAMIC").shape});var Ct=l({...L.shape,...D(xo(),"MARKDOWN").shape});var ct=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ct||{}),Ce=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ce||{}),Ue=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Ue||{});var lt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(lt||{}),br="both_client_credentials_and_authorization_code";var Te=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Te||{}),pt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(pt||{}),Zu=l({strategy:C(pt),paramName:h(a())}),dt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(dt||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),Eo=l({status:h(Y()),body:h(k()),headers:h(O(a(),a()))}),$o=l({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(C(Ut))}),So=l({type:$("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Eo,handlerId:h(a()),streamStepProgress:h(C(Ut))}),Hu=N([$o,So]);var Wu=l({body:k(),rawBody:h(k()),headers:O(a(),a()),queryParams:O(a(),a())});function X(e){return e==null}o(X,"isNil");function mt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(mt,"isEmpty");function Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Mt,"assertNotNullOrUndefined");var Tr=Oe(require("crypto"),1);var Gu=128,Se,Me,qu=o(e=>{!Se||Se.length<e?(Se=Buffer.allocUnsafe(e*Gu),Tr.default.randomFillSync(Se),Me=0):Me+e>Se.length&&(Tr.default.randomFillSync(Se),Me=0),Me+=e},"fillPool"),Ku=o(e=>(qu(e|=0),Se.subarray(Me-e,Me)),"random"),Ju=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let p=r(i),f=i;for(;f--;)if(c+=e[p[f]&n]||"",c.length===u)return c}}},"customRandom"),zo=o((e,t=21)=>Ju(e,t,Ku),"customAlphabet");var Xu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,Q_=a().check(Pe(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),Yu=zo(Xu,ko);var Ie=be(_e(e=>e instanceof Date?e.toISOString():e),a()),oe={id:a(),created:Ie,updated:Ie},V=o(e=>h(rt(e)),"Nullable");function Ir(e){return h(rt(C(e)))}o(Ir,"NullableEnum");var rb=be(_e(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(F())),jt=o(e=>be(_e(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(R(e))),"OptionalArrayFromQuery");var ib=O(a(),k());var ft=(x=>(x.OPENAI="openai",x.OPENROUTER="openrouter",x.ANTHROPIC="anthropic",x.AZURE="azure",x.GOOGLE="google",x.ACTIVEPIECES="activepieces",x.CLOUDFLARE_GATEWAY="cloudflare-gateway",x.CUSTOM="custom",x.BEDROCK="bedrock",x.MISTRAL="mistral",x))(ft||{});var hb=a().check(Pe(/^#[0-9A-Fa-f]{6}$/));var xb=l({filename:a(),data:k(),type:$("file"),mimetype:h(a())});var Qu=Oe(wo());var $b=l({...oe,name:a(),permissions:R(a()),platformId:V(a()),type:a(),userCount:h(Y())});var Ro=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ro||{}),Er=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Er||{}),$r=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))($r||{});var Sr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Sr||{});var Ar=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Ar||{});var ec=l({mode:C(Ro),value:k()}),tc=l({auth:h(a()),fields:O(a(),ec)}),rc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(tc)}),nc=l({type:$("PIECE"),toolName:a().check(ae(1)),pieceMetadata:rc}),oc=l({type:$("none")}),ic=l({type:$("access_token"),accessToken:a()}),ac=l({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),sc=l({type:$("headers"),headers:O(a(),a())}),uc=De("type",[oc,ic,ac,sc]),No=l({type:$("FLOW"),toolName:a().check(ae(1)),externalFlowId:a(),flowDisplayName:h(a())}),Do=l({type:$("MCP"),toolName:a().check(ae(1)),serverUrl:ho(),protocol:C($r),auth:uc}),Co=l({type:$("KNOWLEDGE_BASE"),toolName:a().check(ae(1)),sourceType:C(Er),sourceId:a(),sourceName:a()}),cc=De("type",[nc,No,Do,Co]),lc=l({displayName:a(),description:h(a()),type:C(Sr)}),Uo=l({type:$("MARKDOWN"),markdown:a()}),je={type:$("TOOL_CALL"),input:V(O(a(),k())),output:h(k()),toolName:a(),status:C(Ar),toolCallId:a(),startTime:a(),endTime:h(a())},Qb=l(je),Mo=De("toolCallType",[l({...je,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...je,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),l({...je,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),l({...je,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...je,toolCallType:$("UNKNOWN"),displayName:a()})]),pc=N([Uo,Mo]);var zr=(r=>(r.IMAGE="image",r.TEXT="text",r))(zr||{}),ye=l({apiKey:a()}),dc=ye,mc=l({apiKey:a(),apiKeyHash:a()}),fc=ye,gc=ye,yc=ye,hc=ye,vc=ye,xc=ye,Pc=ye,jo=l({accessKeyId:a().check(ae(1)),secretAccessKey:a().check(ae(1))}),_c=l({}),bc=l({}),Tc=l({}),Ic=l({}),Ec=l({}),$c=l({}),Lo=l({modelId:a(),modelName:a(),modelType:C(zr)}),Fo=l({apiKeyHeader:a(),baseUrl:a(),models:R(Lo),defaultHeaders:h(O(a(),a()))}),Bo=l({accountId:a(),gatewayId:a(),models:R(Lo),vertexProject:h(a()),vertexRegion:h(a())}),Vo=l({resourceName:a(),apiVersion:be(_e(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Zo=l({region:a().check(ae(1))}),Sc=N([dc,yc,hc,vc,xc,gc,fc,mc,jo,Pc]),Ho=N([Fo,Bo,Vo,Zo,_c,Tc,Ic,Ec,bc,$c]),Ac=l({id:a(),name:a(),type:C(zr)}),zc=l({id:a(),name:a(),provider:C(ft),config:Ho,enabledForChat:F()}),kc=l({provider:C(ft),config:Ho,auth:Sc,platformId:a()});var nT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Oc=l({base64Url:a(),fileName:a(),extension:h(a())}),wc=l({mimeType:a(),url:a(),fileName:h(a())}),kr=N([Oc,wc]);var Rc=N([l({type:$("file"),value:kr}),l({type:$("markdown"),value:a(),files:h(R(kr))})]),Nc=l({sessionId:a(),message:a(),files:h(R(a()))});var Go=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Go||{}),qo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(qo||{}),Or=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Or||{});var Dc=N([l({...oe,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:R(l({value:a()}))})}),l({...oe,name:a(),externalId:a(),type:N([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),Cc=l({...oe,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Ir(qo),trigger:Ir(Go)}),Uc=l({...oe,tableId:a(),projectId:a(),cells:O(a(),l({updated:a(),created:a(),value:k(),fieldName:a()}))}),Mc=l({events:R(C(Or)),webhookUrl:a(),flowId:a()}),jc=l({fields:R(l({id:a(),name:a()})),rows:R(O(a(),a())),name:a()}),Lc=l({projectId:a(),limit:h(nt.number()),cursor:h(a()),name:h(a()),externalIds:jt(a()),folderId:h(a()),folderIds:jt(a())}),Fc=l({records:R(R(l({fieldId:a(),value:Jo()}))),tableId:a()}),Bc=l({cells:h(R(l({fieldId:a(),value:Jo()}))),tableId:a(),agentUpdate:h(F())}),Ko=De("operator",[Ae("eq"),Ae("neq"),Ae("gt"),Ae("gte"),Ae("lt"),Ae("lte"),Ae("co"),Wo("exists"),Wo("not_exists")]),Vc=l({tableId:a(),limit:h(nt.number()),cursor:h(a()),filters:jt(Ko)});function Jo(){return be(_e(e=>e==null?e:String(e)),rt(a()))}o(Jo,"coerceToString");function Ae(e){return l({fieldId:a(),operator:$(e),value:a()})}o(Ae,"valueFilter");function Wo(e){return l({fieldId:a(),operator:$(e)})}o(Wo,"existenceFilter");var Zc=l({status:h(Y()),body:h(k()),headers:h(O(a(),a()))}),Hc=l({...oe,deleted:V(Ie),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var Xo=l({name:a(),description:h(a()),type:a(),required:F()}),Wc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:R(Xo),returnsResponse:F()})});var Yo="^[0-9]+\\.[0-9]+\\.[0-9]+$",bT=new RegExp(Yo),qc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",TT=a().check(Pe(new RegExp(Yo))),IT=a().check(Pe(new RegExp(qc))),Kc=l({packageType:$("ARCHIVE"),pieceType:C(Ce),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Qo=l({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ei=l({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),ET=N([Qo,ei]),$T=N([Kc,Qo,ei]),ti=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ti||{}),Jc=l({type:C(ti),cronExpression:a(),timezone:a()}),ST=l({...oe,type:C(Te),projectId:a(),flowId:a(),triggerName:a(),schedule:V(Jc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:F()}),ri=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(ri||{}),ni=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ni||{}),oi=(r=>(r.S3="S3",r.DB="DB",r))(oi||{}),AT=l({...oe,projectId:V(a()),platformId:V(a()),type:C(ri),compression:C(ni),data:h(k()),location:C(oi),size:V(Y()),fileName:V(a()),s3Key:V(a()),metadata:V(O(a(),a()))}),ii=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ii||{}),ai=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ai||{}),zT=l({id:a(),email:a(),firstName:a(),status:C(ai),externalId:V(a()),platformId:V(a()),platformRole:C(ii),lastName:a(),created:Ie,updated:Ie,lastActiveDate:V(Ie),imageUrl:V(a())});var wr=l({...L.shape,...D(O(a(),k()),"OBJECT").shape});var li=l({...L.shape,...D(a(),"COLOR").shape});var Rr=N([te,de,Ct,fe,re,me,Pr,ot,_r,ge,st,wr,ut,at,it,li]),B={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 ce=l({displayName:a(),description:h(a())});var pi=l({username:a(),password:a()}),Nr=l({...ce.shape,username:l({displayName:a(),description:h(a())}),password:l({displayName:a(),description:h(a())}),...D(pi,"BASIC_AUTH").shape});var el=O(a(),N([te,de,ge,fe,re])),Dr=l({...ce.shape,props:el,...D(k(),"CUSTOM_AUTH").shape});var ze=l({...ce.shape,...D(l({auth:a()}),"SECRET_TEXT").shape});var tl=O(a(),N([te,de,ze,ge,fe,re,me,Ct])),di=l({...ce.shape,props:tl,...D(k(),"OIDC").shape});var Cr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Cr||{}),mi=N([te,ze,re]),fi=O(a(),mi),rl=l({props:h(O(a(),mi)),authUrl:a(),tokenUrl:a(),scope:R(a()),prompt:h(N([$("none"),$("consent"),$("login"),$("omit")])),pkce:h(F()),pkceMethod:h(N([$("plain"),$("S256")])),authorizationMethod:h(C(Cr)),grantType:h(N([C(lt),$(br)])),extra:h(O(a(),a()))}),gi=l({access_token:a(),props:h(fi),data:O(a(),tt())}),Ur=l({...ce.shape,...rl.shape,...D(gi,"OAUTH2").shape});var Le=N([Nr,Dr,di,Ur,ze]),gt="Connection",Mr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||gt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||gt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||gt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||gt}},None(){}};var sE={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 nl=l({...L.shape,...D(k(),"CUSTOM").shape,code:a()});var ol=N([Rr,Le]),jr=O(a(),ol),SE=O(a(),Rr);var yi=N([l({strategy:$("CRON"),cronExpression:a()}),l({strategy:$("NONE")})]),Fe=class{constructor(t,r,n,i,u,c,p,f,y,x,b,P,s,d,g,m,v,_,M){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=p;this.onHandshake=f;this.renewConfiguration=y;this.onRenew=x;this.onEnable=b;this.onDisable=P;this.onStart=s;this.run=d;this.test=g;this.sampleData=m;this.testStrategy=v;this.outputSchema=_;this.aiMetadata=M}static{o(this,"ITrigger")}},hi=o(e=>{switch(e.type){case"WEBHOOK":return new Fe(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 Fe(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 Fe(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 Fe(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,X(e.sampleData)&&X(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var vi="2",Ft="0.82.0";var Lr=class{constructor(t,r,n,i,u,c,p,f,y=Ft,x,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=p;this.auth=f;this.minimumSupportedRelease=y;this.maximumSupportedRelease=x;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:vi}),"getContextInfo");(!il(y)||al(y,Ft))&&(this.minimumSupportedRelease=Ft),u.forEach(P=>this._actions[P.name]=P),c.forEach(P=>this._triggers[P.name]=P)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},xi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new Lr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function il(e){return/^\d+\.\d+\.\d+$/.test(e)}o(il,"isValidSimpleSemver");function al(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,p]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<p}o(al,"isSemverLessThan");var sl=h(O(a(),O(a(),a()))),Pi=l({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:R(a()),platformId:h(a()),directoryPath:h(a()),auth:h(N([Le,R(Le)])),version:a(),categories:h(R(C(Ue))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:sl}),ul=C(["human","ai","both"]),_i=l({description:h(a()),idempotent:h(F())}),bi=l({name:a(),displayName:a(),description:a(),props:jr,requireAuth:F(),errorHandlingOptions:h(xr),outputSchema:h(Rt()),audience:h(ul),aiMetadata:h(_i)}),Ti=l({name:a(),displayName:a(),description:a(),props:jr,errorHandlingOptions:h(xr),type:C(Te),sampleData:k(),handshakeConfiguration:h(Rt()),renewConfiguration:h(yi),testStrategy:C(dt),outputSchema:h(Rt()),aiMetadata:h(_i)}),cl=l({...Pi.shape,actions:O(a(),bi),triggers:O(a(),Ti)}),ll=l({...Pi.shape,actions:Y(),triggers:Y(),suggestedActions:h(R(Ti)),suggestedTriggers:h(R(bi))}),Ii=l({projectUsage:Y(),tags:h(R(a())),pieceType:C(Ce),packageType:C(ct),platformId:h(a()),archiveId:h(a())}),S$=l({...cl.shape,...Ii.shape}),A$=l({...ll.shape,...Ii.shape}),z$=l({name:a(),version:a()});var pl=Oe(require("path")),dl=Oe(require("fs/promises"));var Bt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}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 Vt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Fr,r=new Br){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Fr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Br=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Zt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Ht=class extends Bt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Vt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[M,ee]of Object.entries(c))i.append(M,ee);let p=i.toString(),f=p?`${n}?${p}`:n,y=t.responseType??"json",x=t.followRedirects??!0,b=t.retries??0,{body:P,extraHeaders:s,isStream:d}=ml(t.body,u),g=gl({...u,...s}),m=await fl(async()=>{let M=new AbortController,ee=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let ie={method:t.method.toString(),headers:g,body:P,redirect:x?"follow":"manual",signal:M.signal};return d&&(ie.duplex="half"),r?.dispatcher!==void 0&&(ie.dispatcher=r.dispatcher),await fetch(f,ie)}finally{ee!==void 0&&clearTimeout(ee)}},b),v=x?300:400;if(m.status<200||m.status>=v){let M=await Ei(m,y),ee=new Zt(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ee),ee}let _=await Ei(m,y);return{status:m.status,headers:yl(m.headers),body:_}}};function ml(e,t){return vl(e)?{body:void 0,extraHeaders:{},isStream:!1}:hl(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}}o(ml,"serializeBody");async function Ei(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}}}}o(Ei,"parseResponseBody");async function fl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await $i(n);continue}return i}catch(i){if(r=i,n<t){await $i(n);continue}throw i}throw r}o(fl,"sendWithRetries");function $i(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o($i,"backoff");function gl(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(gl,"normalizeHeaders");function yl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(yl,"toHttpHeaders");function hl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(hl,"isNodeFormData");function vl(e){return e==null}o(vl,"isNil");var Be=new Ht;var Wt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Wt||{});var id=Oe(require("fs")),ws=Oe(Os());var ad={"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 sd(e){let t=e.split(";")[0].trim().toLowerCase();return ad[t]??""}o(sd,"contentTypeToExtension");var ud=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),cd=o((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 Rs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:p,authLocation:f="headers"}){return Nt({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:B.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:B.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
- i.e ${cd(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:B.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Wt).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:B.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:B.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:B.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:B.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let x=y,b={};switch(x){case"none":break;case"json":b.data=B.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=B.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=B.Array({displayName:"Form Data",required:!0,properties:{fieldName:B.ShortText({displayName:"Field Name",required:!0}),fieldType:B.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:B.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:B.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:B.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:B.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:B.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:B.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...p},run:o(async y=>{let{method:x,url:b,headers:P,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:_,followRedirects:M}=y.propsValue;Mt(x,"Method"),Mt(b,"URL");let ee=X(r)?{}:await r(y.auth,y.propsValue),ie=b.url,qe=ie.startsWith("http://")||ie.startsWith("https://")?ie:ud({baseUrl:t(y.auth),relativePath:ie}),$e={method:x,url:qe,headers:{...P??{},...f==="headers"||!X(f)?ee:{}},queryParams:{...f==="queryParams"?ee:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(_&&($e.responseType="arraybuffer"),d)if(g&&g!=="none"){let le=d.data;if(g==="form_data"){let Ms=le,Pt=new ws.default;for(let{fieldName:ln,fieldType:pn,textFieldValue:dn,fileFieldValue:nr}of Ms)pn==="text"&&!mt(dn)?Pt.append(ln,dn):pn==="file"&&!mt(nr)&&Pt.append(ln,nr.data,{filename:nr?.filename});$e.body=Pt,$e.headers={...$e.headers,...Pt.getHeaders()}}else $e.body=le}else g||($e.body=d);try{let le=await Be.sendRequest($e);return await ld(y.files,le.body,le.status,le.headers,_)}catch(le){if(m)return le.errorMessage();throw le}},"run")})}o(Rs,"createCustomApiCallAction");var ld=o(async(e,t,r,n,i)=>{let u;if(i&&pd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],p=sd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${p}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),pd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var xt={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:u,server:c}){switch(e.strategy){case 0:{let p=await t.get("lastPoll");if(X(p))throw new Error("lastPoll doesn't exist in the store.");let f=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:p,server:c}),y=f.reduce((x,b)=>Math.max(x,b.epochMilliSeconds),p);return await t.put("lastPoll",y),f.filter(x=>x.epochMilliSeconds>p).map(x=>x.data)}case 1:{let p=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:p,files:u,server:c}),y=f.findIndex(P=>P.id===p),x=[];X(p)||y==-1?x=f??[]:x=f?.slice(0,y)??[],X(i)||(x=x.slice(-i));let b=x?.[0]?.id;return X(b)||await t.put("lastItem",b),x.map(P=>P.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let c=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;X(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:u}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:u});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:u});break}}return dd(c.map(p=>p.data))}};function dd(e){return e.length<=5?e:e.slice(0,5)}o(dd,"getFirstFiveOrAll");var he=Mr.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:["https://www.googleapis.com/auth/tasks"]});var ne={baseUrl:"https://tasks.googleapis.com",tasksList:B.Dropdown({displayName:"Tasks List",auth:he,refreshers:[],required:!0,options:o(async({auth:e})=>e?{disabled:!1,options:(await md(e)).map(n=>({label:n.title,value:n.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),title:B.ShortText({displayName:"Title",required:!0}),notes:B.LongText({displayName:"Notes",required:!1}),due:B.DateTime({displayName:"Due Date",description:"Due date of the task (YYYY-MM-DD)",required:!1}),completed:B.Checkbox({displayName:"Completed",description:"Mark task as completed",required:!1})};async function md(e){let t={method:"GET",url:`${ne.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:e.access_token}};return(await Be.sendRequest(t)).body.items}o(md,"getLists");async function Ns(e,t){let r={method:"GET",url:`${ne.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token}};return(await Be.sendRequest(r)).body.items}o(Ns,"getTasks");async function Ds(e,t,r){let n={method:"POST",url:`${ne.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},body:r};return Be.sendRequest(n)}o(Ds,"createTask");var Cs=Nt({auth:he,name:"add_task",description:"Add a new task to a specified task list",audience:"both",aiMetadata:{description:"Creates a new task in a specific Google Tasks list, with optional notes, due date, and a completed flag. Use to add a to-do item for the authenticated user; requires a valid task-list ID (resolve it first if you only have a list name). Not idempotent: each call appends a separate task even with identical input.",idempotent:!1},displayName:"Add Task",props:{tasks_list:ne.tasksList,title:ne.title,notes:ne.notes,due:ne.due,completed:ne.completed},async run({auth:e,propsValue:t}){let r={kind:"tasks#task",status:t.completed?"completed":"needsAction",title:t.title,completed:t.completed?new Date().toISOString():"",notes:t.notes,due:t.due?`${new Date(t.due).toISOString().split("T")[0]}T00:00:00Z`:void 0};return Ds(e,t.tasks_list,r)}});var fd={tasks_list:ne.tasksList},rr={strategy:0,items:o(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>(await Ns(e,t.tasks_list)).filter(u=>Date.parse(u.updated)>r).map(u=>({epochMilliSeconds:Date.parse(u.updated),data:u})),"items")},Us=hi({auth:he,name:"new_task",displayName:"New Task",description:"Triggers when a task is created",aiMetadata:{description:"Fires when a task in the selected Google Tasks list is newly created or updated since the last poll, emitting the task that changed. Use to react to additions or edits in a specific task list."},type:"POLLING",props:fd,sampleData:{},async test(e){let t=e.store,r=e.auth,n=e.propsValue;return await xt.test(rr,{store:t,auth:r,propsValue:n,files:e.files})},async onEnable(e){let t=e.store,r=e.auth,n=e.propsValue;await xt.onEnable(rr,{store:t,auth:r,propsValue:n})},async onDisable(e){let t=e.store,r=e.auth,n=e.propsValue;await xt.onEnable(rr,{store:t,auth:r,propsValue:n})},async run(e){let t=e.store,r=e.auth,n=e.propsValue;return await xt.poll(rr,{store:t,auth:r,propsValue:n,files:e.files})}});var gd=xi({minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/google-tasks.png",categories:["PRODUCTIVITY"],actions:[Cs,Rs({baseUrl:o(()=>ne.baseUrl,"baseUrl"),auth:he,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],displayName:"Google Tasks",description:"Task list management application",authors:["Salem-Alaa","kishanprmr","MoShizzle","khaledmashaly","abuaboud"],triggers:[Us],auth:he});0&&(module.exports={googleTasks});
1
+ "use strict";var _u=Object.create;var et=Object.defineProperty;var Pu=Object.getOwnPropertyDescriptor;var Tu=Object.getOwnPropertyNames;var bu=Object.getPrototypeOf,Iu=Object.prototype.hasOwnProperty;var o=(e,t)=>et(e,"name",{value:t,configurable:!0});var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},xn=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},_n=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Tu(t))!Iu.call(e,i)&&i!==r&&et(e,i,{get:()=>t[i],enumerable:!(n=Pu(t,i))||n.enumerable});return e};var Le=(e,t,r)=>(r=e!=null?_u(bu(e)):{},_n(t||!e||!e.__esModule?et(r,"default",{value:e,enumerable:!0}):r,e)),Eu=e=>_n(et({},"__esModule",{value:!0}),e);var Zo=S((Vo,Gt)=>{(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"),i=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${s})?$`,"i")};function f(u,d){if(u.indexOf("::")!==u.lastIndexOf("::"))return null;let y=0,m=-1,x=(u.match(l.zoneIndex)||[])[0],P,j;for(x&&(x=x.substring(1),u=u.replace(/%.+$/,""));(m=u.indexOf(":",m+1))>=0;)y++;if(u.substr(0,2)==="::"&&y--,u.substr(-2,2)==="::"&&y--,y>d)return null;for(j=d-y,P=":";j--;)P+="0:";return u=u.replace("::",P),u[0]===":"&&(u=u.slice(1)),u[u.length-1]===":"&&(u=u.slice(0,-1)),d=(function(){let oe=u.split(":"),ce=[];for(let Qe=0;Qe<oe.length;Qe++)ce.push(parseInt(oe[Qe],16));return ce})(),{parts:d,zoneId:x}}o(f,"expandIPv6");function g(u,d,y,m){if(u.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,P;for(;m>0;){if(P=y-m,P<0&&(P=0),u[x]>>P!==d[x]>>P)return!1;m-=y,x+=1}return!0}o(g,"matchCIDR");function v(u){if(i.test(u))return parseInt(u,16);if(u[0]==="0"&&!isNaN(parseInt(u[1],10))){if(n.test(u))return parseInt(u,8);throw new Error(`ipaddr: cannot parse ${u} as octal`)}return parseInt(u,10)}o(v,"parseIntAuto");function b(u,d){for(;u.length<d;)u=`0${u}`;return u}o(b,"padPart");let _={};_.IPv4=(function(){function u(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<d.length;y++)if(m=d[y],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return o(u,"IPv4"),u.prototype.SpecialRanges={unspecified:[[new u([0,0,0,0]),8]],broadcast:[[new u([255,255,255,255]),32]],multicast:[[new u([224,0,0,0]),4]],linkLocal:[[new u([169,254,0,0]),16]],loopback:[[new u([127,0,0,0]),8]],carrierGradeNat:[[new u([100,64,0,0]),10]],private:[[new u([10,0,0,0]),8],[new u([172,16,0,0]),12],[new u([192,168,0,0]),16]],reserved:[[new u([192,0,0,0]),24],[new u([192,0,2,0]),24],[new u([192,88,99,0]),24],[new u([198,18,0,0]),15],[new u([198,51,100,0]),24],[new u([203,0,113,0]),24],[new u([240,0,0,0]),4]],as112:[[new u([192,175,48,0]),24],[new u([192,31,196,0]),24]],amt:[[new u([192,52,193,0]),24]]},u.prototype.kind=function(){return"ipv4"},u.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,d.octets,8,y)},u.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,P,j;for(x=3;x>=0;x-=1)if(P=this.octets[x],P in m){if(j=m[P],y&&j!==0)return null;j!==8&&(y=!0),d+=j}else return null;return 32-d},u.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},u.prototype.toByteArray=function(){return this.octets.slice(0)},u.prototype.toIPv4MappedAddress=function(){return _.IPv6.parse(`::ffff:${this.toString()}`)},u.prototype.toNormalizedString=function(){return this.toString()},u.prototype.toString=function(){return this.octets.join(".")},u})(),_.IPv4.broadcastAddressFromCIDR=function(u){try{let d=this.parseCIDR(u),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],P=0;for(;P<4;)x.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.isIPv4=function(u){return this.parser(u)!==null},_.IPv4.isValid=function(u){try{return new this(this.parser(u)),!0}catch{return!1}},_.IPv4.isValidCIDR=function(u){try{return this.parseCIDR(u),!0}catch{return!1}},_.IPv4.isValidFourPartDecimal=function(u){return!!(_.IPv4.isValid(u)&&u.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},_.IPv4.isValidCIDRFourPartDecimal=function(u){let d=u.match(/^(.+)\/(\d+)$/);return!_.IPv4.isValidCIDR(u)||!d?!1:_.IPv4.isValidFourPartDecimal(d[1])},_.IPv4.networkAddressFromCIDR=function(u){let d,y,m,x,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],y=0;y<4;)x.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.parse=function(u){let d=this.parser(u);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},_.IPv4.parseCIDR=function(u){let d;if(d=u.match(/^(.+)\/(\d+)$/)){let y=parseInt(d[2]);if(y>=0&&y<=32){let m=[this.parse(d[1]),y];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},_.IPv4.parser=function(u){let d,y,m;if(d=u.match(r.fourOctet))return(function(){let x=d.slice(1,6),P=[];for(let j=0;j<x.length;j++)y=x[j],P.push(v(y));return P})();if(d=u.match(r.longValue)){if(m=v(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],P;for(P=0;P<=24;P+=8)x.push(m>>P&255);return x})().reverse()}else return(d=u.match(r.twoOctet))?(function(){let x=d.slice(1,4),P=[];if(m=v(x[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(v(x[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P})():(d=u.match(r.threeOctet))?(function(){let x=d.slice(1,5),P=[];if(m=v(x[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(v(x[0])),P.push(v(x[1])),P.push(m>>8&255),P.push(m&255),P})():null},_.IPv4.subnetMaskFromPrefixLength=function(u){if(u=parseInt(u),u<0||u>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],y=0,m=Math.floor(u/8);for(;y<m;)d[y]=255,y++;return m<4&&(d[m]=Math.pow(2,u%8)-1<<8-u%8),new this(d)},_.IPv6=(function(){function u(d,y){let m,x;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(x=this.parts[m],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return o(u,"IPv6"),u.prototype.SpecialRanges={unspecified:[new u([0,0,0,0,0,0,0,0]),128],linkLocal:[new u([65152,0,0,0,0,0,0,0]),10],multicast:[new u([65280,0,0,0,0,0,0,0]),8],loopback:[new u([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new u([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new u([0,0,0,0,0,65535,0,0]),96],discard:[new u([256,0,0,0,0,0,0,0]),64],rfc6145:[new u([0,0,0,0,65535,0,0,0]),96],rfc6052:[new u([100,65435,0,0,0,0,0,0]),96],"6to4":[new u([8194,0,0,0,0,0,0,0]),16],teredo:[new u([8193,0,0,0,0,0,0,0]),32],benchmarking:[new u([8193,2,0,0,0,0,0,0]),48],amt:[new u([8193,3,0,0,0,0,0,0]),32],as112v6:[[new u([8193,4,274,0,0,0,0,0]),48],[new u([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new u([8193,16,0,0,0,0,0,0]),28],orchid2:[new u([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new u([8193,48,0,0,0,0,0,0]),28],reserved:[[new u([8193,0,0,0,0,0,0,0]),23],[new u([8193,3512,0,0,0,0,0,0]),32]]},u.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},u.prototype.kind=function(){return"ipv6"},u.prototype.match=function(d,y){let m;if(y===void 0&&(m=d,d=m[0],y=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,d.parts,16,y)},u.prototype.prefixLengthFromSubnetMask=function(){let d=0,y=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},x,P;for(let j=7;j>=0;j-=1)if(x=this.parts[j],x in m){if(P=m[x],y&&P!==0)return null;P!==16&&(y=!0),d+=P}else return null;return 128-d},u.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},u.prototype.toByteArray=function(){let d,y=[],m=this.parts;for(let x=0;x<m.length;x++)d=m[x],y.push(d>>8),y.push(d&255);return y},u.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let x=0;x<this.parts.length;x++)m.push(b(this.parts[x].toString(16),4));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},u.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),y=d[0],m=d[1];return new _.IPv4([y>>8,y&255,m>>8,m&255])},u.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let x=0;x<this.parts.length;x++)m.push(this.parts[x].toString(16));return m}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),d+y},u.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,x=-1,P;for(;P=d.exec(y);)P[0].length>x&&(m=P.index,x=P[0].length);return x<0?y:`${y.substring(0,m)}::${y.substring(m+x)}`},u.prototype.toString=function(){return this.toRFC5952String()},u})(),_.IPv6.broadcastAddressFromCIDR=function(u){try{let d=this.parseCIDR(u),y=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],P=0;for(;P<16;)x.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(x)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},_.IPv6.isIPv6=function(u){return this.parser(u)!==null},_.IPv6.isValid=function(u){if(typeof u=="string"&&u.indexOf(":")===-1)return!1;try{let d=this.parser(u);return new this(d.parts,d.zoneId),!0}catch{return!1}},_.IPv6.isValidCIDR=function(u){if(typeof u=="string"&&u.indexOf(":")===-1)return!1;try{return this.parseCIDR(u),!0}catch{return!1}},_.IPv6.networkAddressFromCIDR=function(u){let d,y,m,x,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),x=[],y=0;y<16;)x.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(x)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},_.IPv6.parse=function(u){let d=this.parser(u);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},_.IPv6.parseCIDR=function(u){let d,y,m;if((y=u.match(/^(.+)\/(\d+)$/))&&(d=parseInt(y[2]),d>=0&&d<=128))return m=[this.parse(y[1]),d],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},_.IPv6.parser=function(u){let d,y,m,x,P,j;if(m=u.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(u))return f(u,8);if((m=u.match(l.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+j,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(x=P[y],!(0<=x&&x<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.zoneId}}return null},_.IPv6.subnetMaskFromPrefixLength=function(u){if(u=parseInt(u),u<0||u>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,m=Math.floor(u/8);for(;y<m;)d[y]=255,y++;return m<16&&(d[m]=Math.pow(2,u%8)-1<<8-u%8),new this(d)},_.fromByteArray=function(u){let d=u.length;if(d===4)return new _.IPv4(u);if(d===16)return new _.IPv6(u);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},_.isValid=function(u){return _.IPv6.isValid(u)||_.IPv4.isValid(u)},_.isValidCIDR=function(u){return _.IPv6.isValidCIDR(u)||_.IPv4.isValidCIDR(u)},_.parse=function(u){if(_.IPv6.isValid(u))return _.IPv6.parse(u);if(_.IPv4.isValid(u))return _.IPv4.parse(u);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},_.parseCIDR=function(u){try{return _.IPv6.parseCIDR(u)}catch{try{return _.IPv4.parseCIDR(u)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},_.process=function(u){let d=this.parse(u);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},_.subnetMatch=function(u,d,y){let m,x,P,j;y==null&&(y="unicast");for(x in d)if(Object.prototype.hasOwnProperty.call(d,x)){for(P=d[x],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],u.kind()===j[0].kind()&&u.match.apply(u,j))return x}return y},typeof Gt<"u"&&Gt.exports?Gt.exports=_:e.ipaddr=_})(Vo)});var Hi=S((j$,Zi)=>{var Vi=require("stream").Stream,ap=require("util");Zi.exports=pe;function pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(pe,"DelayedStream");ap.inherits(pe,Vi);pe.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};pe.prototype.pause=function(){this.source.pause()};pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};pe.prototype.pipe=function(){var e=Vi.prototype.pipe.apply(this,arguments);return this.resume(),e};pe.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)};pe.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 Ki=S((B$,Wi)=>{var sp=require("util"),qi=require("stream").Stream,Gi=Hi();Wi.exports=X;function X(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(X,"CombinedStream");sp.inherits(X,qi);X.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};X.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};X.prototype.append=function(e){var t=X.isStreamLike(e);if(t){if(!(e instanceof Gi)){var r=Gi.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};X.prototype.pipe=function(e,t){return qi.prototype.pipe.call(this,e,t),this.resume(),e};X.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}};X.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=X.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};X.prototype._pipeNext=function(e){this._currentStream=e;var t=X.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()};X.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};X.prototype.write=function(e){this.emit("data",e)};X.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};X.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")};X.prototype.end=function(){this._reset(),this.emit("end")};X.prototype.destroy=function(){this._reset(),this.emit("close")};X.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};X.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};X.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)};X.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Xi=S((Z$,Ji)=>{"use strict";Ji.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 ea=S(ne=>{"use strict";var Yt=Xi(),up=require("path").extname,Yi=/^\s*([^;\s]*)(?:;|\s|$)/,cp=/^text\//i;ne.charset=Qi;ne.charsets={lookup:Qi};ne.contentType=lp;ne.extension=pp;ne.extensions=Object.create(null);ne.lookup=dp;ne.types=Object.create(null);mp(ne.extensions,ne.types);function Qi(e){if(!e||typeof e!="string")return!1;var t=Yi.exec(e),r=t&&Yt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&cp.test(t[1])?"UTF-8":!1}o(Qi,"charset");function lp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ne.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ne.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(lp,"contentType");function pp(e){if(!e||typeof e!="string")return!1;var t=Yi.exec(e),r=t&&ne.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(pp,"extension");function dp(e){if(!e||typeof e!="string")return!1;var t=up("x."+e).toLowerCase().substr(1);return t&&ne.types[t]||!1}o(dp,"lookup");function mp(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Yt).forEach(o(function(i){var s=Yt[i],c=s.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var g=r.indexOf(Yt[t[f]].source),v=r.indexOf(s.source);if(t[f]!=="application/octet-stream"&&(g>v||g===v&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(mp,"populateMaps")});var ra=S((q$,ta)=>{ta.exports=fp;function fp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(fp,"defer")});var Kr=S((K$,oa)=>{var na=ra();oa.exports=gp;function gp(e){var t=!1;return na(function(){t=!0}),o(function(n,i){t?e(n,i):na(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(gp,"async")});var Jr=S((X$,ia)=>{ia.exports=yp;function yp(e){Object.keys(e.jobs).forEach(hp.bind(e)),e.jobs={}}o(yp,"abort");function hp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(hp,"clean")});var Xr=S((Q$,sa)=>{var aa=Kr(),vp=Jr();sa.exports=xp;function xp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=_p(t,i,e[i],function(s,c){i in r.jobs&&(delete r.jobs[i],s?vp(r):r.results[i]=c,n(s,r.results))})}o(xp,"iterate");function _p(e,t,r,n){var i;return e.length==2?i=e(r,aa(n)):i=e(r,t,aa(n)),i}o(_p,"runJob")});var Yr=S((tk,ua)=>{ua.exports=Pp;function Pp(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(i,s){return t(e[i],e[s])}),n}o(Pp,"state")});var Qr=S((nk,ca)=>{var Tp=Jr(),bp=Kr();ca.exports=Ip;function Ip(e){Object.keys(this.jobs).length&&(this.index=this.size,Tp(this),bp(e)(null,this.results))}o(Ip,"terminator")});var pa=S((ik,la)=>{var Ep=Xr(),Sp=Yr(),Ap=Qr();la.exports=$p;function $p(e,t,r){for(var n=Sp(e);n.index<(n.keyedList||e).length;)Ep(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Ap.bind(n,r)}o($p,"parallel")});var en=S((sk,Qt)=>{var da=Xr(),kp=Yr(),zp=Qr();Qt.exports=Op;Qt.exports.ascending=ma;Qt.exports.descending=wp;function Op(e,t,r,n){var i=kp(e,r);return da(e,t,i,o(function s(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){da(e,t,i,s);return}n(null,i.results)},"iteratorHandler")),zp.bind(i,n)}o(Op,"serialOrdered");function ma(e,t){return e<t?-1:e>t?1:0}o(ma,"ascending");function wp(e,t){return-1*ma(e,t)}o(wp,"descending")});var ga=S((ck,fa)=>{var Rp=en();fa.exports=Np;function Np(e,t,r){return Rp(e,t,null,r)}o(Np,"serial")});var ha=S((pk,ya)=>{ya.exports={parallel:pa(),serial:ga(),serialOrdered:en()}});var tn=S((dk,va)=>{"use strict";va.exports=Object});var _a=S((mk,xa)=>{"use strict";xa.exports=Error});var Ta=S((fk,Pa)=>{"use strict";Pa.exports=EvalError});var Ia=S((gk,ba)=>{"use strict";ba.exports=RangeError});var Sa=S((yk,Ea)=>{"use strict";Ea.exports=ReferenceError});var $a=S((hk,Aa)=>{"use strict";Aa.exports=SyntaxError});var er=S((vk,ka)=>{"use strict";ka.exports=TypeError});var Oa=S((xk,za)=>{"use strict";za.exports=URIError});var Ra=S((_k,wa)=>{"use strict";wa.exports=Math.abs});var Da=S((Pk,Na)=>{"use strict";Na.exports=Math.floor});var Ua=S((Tk,Ca)=>{"use strict";Ca.exports=Math.max});var La=S((bk,Ma)=>{"use strict";Ma.exports=Math.min});var Fa=S((Ik,ja)=>{"use strict";ja.exports=Math.pow});var Va=S((Ek,Ba)=>{"use strict";Ba.exports=Math.round});var Ha=S((Sk,Za)=>{"use strict";Za.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var qa=S(($k,Ga)=>{"use strict";var Dp=Ha();Ga.exports=o(function(t){return Dp(t)||t===0?t:t<0?-1:1},"sign")});var Ka=S((zk,Wa)=>{"use strict";Wa.exports=Object.getOwnPropertyDescriptor});var rn=S((Ok,Ja)=>{"use strict";var tr=Ka();if(tr)try{tr([],"length")}catch{tr=null}Ja.exports=tr});var Ya=S((wk,Xa)=>{"use strict";var rr=Object.defineProperty||!1;if(rr)try{rr({},"a",{value:1})}catch{rr=!1}Xa.exports=rr});var nn=S((Rk,Qa)=>{"use strict";Qa.exports=o(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 i=42;t[r]=i;for(var s 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 c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var rs=S((Dk,ts)=>{"use strict";var es=typeof Symbol<"u"&&Symbol,Cp=nn();ts.exports=o(function(){return typeof es!="function"||typeof Symbol!="function"||typeof es("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Cp()},"hasNativeSymbols")});var on=S((Uk,ns)=>{"use strict";ns.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var an=S((Mk,os)=>{"use strict";var Up=tn();os.exports=Up.getPrototypeOf||null});var ss=S((Lk,as)=>{"use strict";var Mp="Function.prototype.bind called on incompatible ",Lp=Object.prototype.toString,jp=Math.max,Fp="[object Function]",is=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var s=0;s<r.length;s+=1)n[s+t.length]=r[s];return n},"concatty"),Bp=o(function(t,r){for(var n=[],i=r||0,s=0;i<t.length;i+=1,s+=1)n[s]=t[i];return n},"slicy"),Vp=o(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");as.exports=o(function(t){var r=this;if(typeof r!="function"||Lp.apply(r)!==Fp)throw new TypeError(Mp+r);for(var n=Bp(arguments,1),i,s=o(function(){if(this instanceof i){var v=r.apply(this,is(n,arguments));return Object(v)===v?v:this}return r.apply(t,is(n,arguments))},"binder"),c=jp(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+Vp(l,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var g=o(function(){},"Empty");g.prototype=r.prototype,i.prototype=new g,g.prototype=null}return i},"bind")});var We=S((Fk,us)=>{"use strict";var Zp=ss();us.exports=Function.prototype.bind||Zp});var nr=S((Bk,cs)=>{"use strict";cs.exports=Function.prototype.call});var sn=S((Vk,ls)=>{"use strict";ls.exports=Function.prototype.apply});var ds=S((Zk,ps)=>{"use strict";ps.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var fs=S((Hk,ms)=>{"use strict";var Hp=We(),Gp=sn(),qp=nr(),Wp=ds();ms.exports=Wp||Hp.call(qp,Gp)});var ys=S((Gk,gs)=>{"use strict";var Kp=We(),Jp=er(),Xp=nr(),Yp=fs();gs.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Jp("a function is required");return Yp(Kp,Xp,t)},"callBindBasic")});var Ts=S((Wk,Ps)=>{"use strict";var Qp=ys(),hs=rn(),xs;try{xs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var un=!!xs&&hs&&hs(Object.prototype,"__proto__"),_s=Object,vs=_s.getPrototypeOf;Ps.exports=un&&typeof un.get=="function"?Qp([un.get]):typeof vs=="function"?o(function(t){return vs(t==null?t:_s(t))},"getDunder"):!1});var As=S((Jk,Ss)=>{"use strict";var bs=on(),Is=an(),Es=Ts();Ss.exports=bs?o(function(t){return bs(t)},"getProto"):Is?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Is(t)},"getProto"):Es?o(function(t){return Es(t)},"getProto"):null});var cn=S((Yk,$s)=>{"use strict";var ed=Function.prototype.call,td=Object.prototype.hasOwnProperty,rd=We();$s.exports=rd.call(ed,td)});var Ds=S((Qk,Ns)=>{"use strict";var L,nd=tn(),od=_a(),id=Ta(),ad=Ia(),sd=Sa(),Ye=$a(),Xe=er(),ud=Oa(),cd=Ra(),ld=Da(),pd=Ua(),dd=La(),md=Fa(),fd=Va(),gd=qa(),ws=Function,ln=o(function(e){try{return ws('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pt=rn(),yd=Ya(),pn=o(function(){throw new Xe},"throwTypeError"),hd=Pt?(function(){try{return arguments.callee,pn}catch{try{return Pt(arguments,"callee").get}catch{return pn}}})():pn,Ke=rs()(),te=As(),vd=an(),xd=on(),Rs=sn(),Tt=nr(),Je={},_d=typeof Uint8Array>"u"||!te?L:te(Uint8Array),Me={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":Ke&&te?te([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":od,"%eval%":eval,"%EvalError%":id,"%Float16Array%":typeof Float16Array>"u"?L:Float16Array,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":ws,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ke&&te?te(te([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ke||!te?L:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":nd,"%Object.getOwnPropertyDescriptor%":Pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":ad,"%ReferenceError%":sd,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ke||!te?L:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ke&&te?te(""[Symbol.iterator]()):L,"%Symbol%":Ke?Symbol:L,"%SyntaxError%":Ye,"%ThrowTypeError%":hd,"%TypedArray%":_d,"%TypeError%":Xe,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":ud,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":Tt,"%Function.prototype.apply%":Rs,"%Object.defineProperty%":yd,"%Object.getPrototypeOf%":vd,"%Math.abs%":cd,"%Math.floor%":ld,"%Math.max%":pd,"%Math.min%":dd,"%Math.pow%":md,"%Math.round%":fd,"%Math.sign%":gd,"%Reflect.getPrototypeOf%":xd};if(te)try{null.error}catch(e){ks=te(te(e)),Me["%Error.prototype%"]=ks}var ks,Pd=o(function e(t){var r;if(t==="%AsyncFunction%")r=ln("async function () {}");else if(t==="%GeneratorFunction%")r=ln("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=ln("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&te&&(r=te(i.prototype))}return Me[t]=r,r},"doEval"),zs={__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"]},bt=We(),or=cn(),Td=bt.call(Tt,Array.prototype.concat),bd=bt.call(Rs,Array.prototype.splice),Os=bt.call(Tt,String.prototype.replace),ir=bt.call(Tt,String.prototype.slice),Id=bt.call(Tt,RegExp.prototype.exec),Ed=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Sd=/\\(\\)?/g,Ad=o(function(t){var r=ir(t,0,1),n=ir(t,-1);if(r==="%"&&n!=="%")throw new Ye("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ye("invalid intrinsic syntax, expected opening `%`");var i=[];return Os(t,Ed,function(s,c,l,f){i[i.length]=l?Os(f,Sd,"$1"):c||s}),i},"stringToPath"),$d=o(function(t,r){var n=t,i;if(or(zs,n)&&(i=zs[n],n="%"+i[0]+"%"),or(Me,n)){var s=Me[n];if(s===Je&&(s=Pd(n)),typeof s>"u"&&!r)throw new Xe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Ye("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ns.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Xe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Xe('"allowMissing" argument must be a boolean');if(Id(/^%?[^%]*%?$/,t)===null)throw new Ye("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ad(t),i=n.length>0?n[0]:"",s=$d("%"+i+"%",r),c=s.name,l=s.value,f=!1,g=s.alias;g&&(i=g[0],bd(n,Td([0,1],g)));for(var v=1,b=!0;v<n.length;v+=1){var _=n[v],u=ir(_,0,1),d=ir(_,-1);if((u==='"'||u==="'"||u==="`"||d==='"'||d==="'"||d==="`")&&u!==d)throw new Ye("property names with quotes must have matching quotes");if((_==="constructor"||!b)&&(f=!0),i+="."+_,c="%"+i+"%",or(Me,c))l=Me[c];else if(l!=null){if(!(_ in l)){if(!r)throw new Xe("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pt&&v+1>=n.length){var y=Pt(l,_);b=!!y,b&&"get"in y&&!("originalValue"in y.get)?l=y.get:l=l[_]}else b=or(l,_),l=l[_];b&&!f&&(Me[c]=l)}}return l},"GetIntrinsic")});var Us=S((tz,Cs)=>{"use strict";var kd=nn();Cs.exports=o(function(){return kd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var js=S((nz,Ls)=>{"use strict";var zd=Ds(),Ms=zd("%Object.defineProperty%",!0),Od=Us()(),wd=cn(),Rd=er(),ar=Od?Symbol.toStringTag:null;Ls.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Rd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ar&&(n||!wd(t,ar))&&(Ms?Ms(t,ar,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[ar]=r)},"setToStringTag")});var Bs=S((iz,Fs)=>{"use strict";var Nd=Function.prototype.call,Dd=Object.prototype.hasOwnProperty,Cd=We();Fs.exports=Cd.call(Nd,Dd)});var Zs=S((az,Vs)=>{"use strict";Vs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var qs=S((sz,Gs)=>{"use strict";var gn=Ki(),Ud=require("util"),dn=require("path"),Md=require("http"),Ld=require("https"),jd=require("url").parse,Fd=require("fs"),Bd=require("stream").Stream,Vd=require("crypto"),mn=ea(),Zd=ha(),Hd=js(),Oe=Bs(),fn=Zs();function Hs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Hs,"escapeHeaderParam");function F(e){if(!(this instanceof F))return new F(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],gn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(F,"FormData");Ud.inherits(F,gn);F.LINE_BREAK=`\r
2
+ `;F.DEFAULT_CONTENT_TYPE="application/octet-stream";F.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=gn.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 i=this._multiPartHeader(e,t,r),s=this._multiPartFooter();n(i),n(t),n(s),this._trackLength(i,t,r)};F.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)+F.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Oe(t,"httpVersion"))&&!(t instanceof Bd))&&(r.knownLength||this._valuesToMeasure.push(t))};F.prototype._lengthRetriever=function(e,t){Oe(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Fd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Oe(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Oe(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};F.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),s="",c={"Content-Disposition":["form-data",'name="'+Hs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&fn(c,r.header);var l;for(var f in c)if(Oe(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(s+=f+": "+l.join("; ")+F.LINE_BREAK)}return"--"+this.getBoundary()+F.LINE_BREAK+s+F.LINE_BREAK};F.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=dn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=dn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Oe(e,"httpVersion")&&(r=dn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Hs(r)+'"'};F.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=mn.lookup(e.name)),!r&&e&&e.path&&(r=mn.lookup(e.path)),!r&&e&&e.readable&&Oe(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=mn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=F.DEFAULT_CONTENT_TYPE),r};F.prototype._multiPartFooter=function(){return function(e){var t=F.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};F.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+F.LINE_BREAK};F.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Oe(e,t)&&(r[t.toLowerCase()]=e[t]);return r};F.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};F.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};F.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(F.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};F.prototype._generateBoundary=function(){this._boundary="--------------------------"+Vd.randomBytes(12).toString("hex")};F.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};F.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};F.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}Zd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};F.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=jd(e),n=fn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=fn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Ld.request(n):r=Md.request(n),this.getLength(function(s,c){if(s&&s!=="Unknown stream"){this._error(s);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=o(function(g,v){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,g,v)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};F.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};F.prototype.toString=function(){return"[object FormData]"};Hd(F.prototype,"FormData");Gs.exports=F});var im={};xn(im,{googleTasks:()=>om});module.exports=Eu(im);var Su=Object.freeze({status:"aborted"});function T(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let g=c.prototype,v=Object.keys(g);for(let b=0;b<v.length;b++){let _=v[b];_ in l||(l[_]=g[_].bind(l))}}o(n,"init");let i=r?.Parent??Object;class s extends i{static{o(this,"Definition")}}Object.defineProperty(s,"name",{value:e});function c(l){var f;let g=r?.Parent?new s:this;n(g,l),(f=g._zod).deferred??(f.deferred=[]);for(let v of g._zod.deferred)v();return g}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(T,"$constructor");var de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},St=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},lr={};function ye(e){return e&&Object.assign(lr,e),lr}o(ye,"config");function dr(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(dr,"getEnumValues");function Tn(e,t){return typeof t=="bigint"?t.toString():t}o(Tn,"jsonStringifyReplacer");function $t(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o($t,"cached");function bn(e){return e==null}o(bn,"nullish");function kt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(kt,"cleanRegex");var Pn=Symbol("evaluating");function Y(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Pn)return n===void 0&&(n=Pn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(Y,"defineLazy");var mr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(tt,"isObject");var Au=$t(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function In(e){if(tt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(tt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(In,"isPlainObject");var En=new Set(["string","number","symbol"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(je,"escapeRegex");function zt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(zt,"clone");function H(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>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:o(()=>t.error,"error")}:t}o(H,"normalizeParams");function Sn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Sn,"optionalKeys");var An={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 Fe(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}o(Fe,"aborted");function Te(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Te,"prefixIssues");function At(e){return typeof e=="string"?e:e?.message}o(At,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=At(e.inst?._zod.def?.error?.(e))??At(t?.error?.(e))??At(r.customError?.(e))??At(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(be,"finalizeIssue");function $n(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o($n,"getLengthableOrigin");function fr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(fr,"issue");var kn=o((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,Tn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),zn=T("$ZodError",kn),rt=T("$ZodError",kn,{Parent:Error});var ku=o(e=>(t,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new de;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>be(f,s,ye())));throw mr(l,i?.callee),l}return c.value},"_parse"),Ot=ku(rt),zu=o(e=>async(t,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>be(f,s,ye())));throw mr(l,i?.callee),l}return c.value},"_parseAsync"),wt=zu(rt),Ou=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new de;return s.issues.length?{success:!1,error:new(e??zn)(s.issues.map(c=>be(c,i,ye())))}:{success:!0,data:s.value}},"_safeParse"),nt=Ou(rt),wu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(c=>be(c,i,ye())))}:{success:!0,data:s.value}},"_safeParseAsync"),ot=wu(rt);var Ru="(?:(?:\\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])))",Nu=new RegExp(`^${Ru}$`);var On=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),wn=/^-?\d+n?$/,Rn=/^-?\d+$/,gr=/^-?\d+(?:\.\d+)?$/,Nn=/^(?:true|false)$/i;var Ie=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Du={number:"number",bigint:"bigint",object:"date"};var Dn=T("$ZodCheckGreaterThan",(e,t)=>{Ie.init(e,t);let r=Du[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.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 Cn=T("$ZodCheckNumberFormat",(e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,s]=An[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=s,r&&(l.pattern=Rn)}),e._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,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}):c.issues.push({input:l,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}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>s&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}});var Un=T("$ZodCheckMinLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!bn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=$n(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var yr=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ie.init(e,t),e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Mn=T("$ZodCheckRegex",(e,t)=>{yr.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 jn={major:4,minor:3,patch:6};var q=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,l,f)=>{let g=Fe(c),v;for(let b of l){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(g)continue;let _=c.issues.length,u=b._zod.check(c);if(u instanceof Promise&&f?.async===!1)throw new de;if(v||u instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await u,c.issues.length!==_&&(g||(g=Fe(c,_)))});else{if(c.issues.length===_)continue;g||(g=Fe(c,_))}}return v?v.then(()=>c):c},"runChecks"),s=o((c,l,f)=>{if(Fe(c))return c.aborted=!0,c;let g=i(l,n,f);if(g instanceof Promise){if(f.async===!1)throw new de;return g.then(v=>e._zod.parse(v,f))}return e._zod.parse(g,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let g=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return g instanceof Promise?g.then(v=>s(v,c,l)):s(g,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new de;return f.then(g=>i(g,n,l))}return i(f,n,l)}}Y(e,"~standard",()=>({validate:o(i=>{try{let s=nt(e,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return ot(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Dt=T("$ZodString",(e,t)=>{q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??On(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}}),hr=T("$ZodStringFormat",(e,t)=>{yr.init(e,t),Dt.init(e,t)});var Hn=T("$ZodURL",(e,t)=>{hr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.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=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var vr=T("$ZodNumber",(e,t)=>{q.init(e,t),e._zod.pattern=e._zod.bag.pattern??gr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),Gn=T("$ZodNumberFormat",(e,t)=>{Cn.init(e,t),vr.init(e,t)}),xr=T("$ZodBoolean",(e,t)=>{q.init(e,t),e._zod.pattern=Nn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),qn=T("$ZodBigInt",(e,t)=>{q.init(e,t),e._zod.pattern=wn,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 Wn=T("$ZodAny",(e,t)=>{q.init(e,t),e._zod.parse=r=>r}),Kn=T("$ZodUnknown",(e,t)=>{q.init(e,t),e._zod.parse=r=>r});var Jn=T("$ZodVoid",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Xn=T("$ZodDate",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:e}),r}});function Fn(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}o(Fn,"handleArrayResult");var Yn=T("$ZodArray",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let s=[];for(let c=0;c<i.length;c++){let l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?s.push(f.then(g=>Fn(g,r,c))):Fn(f,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function Nt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Te(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Nt,"handlePropertyResult");function Cu(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=Sn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(Cu,"normalizeDef");function Uu(e,t,r,n,i,s){let c=[],l=i.keySet,f=i.catchall._zod,g=f.def.type,v=f.optout==="optional";for(let b in t){if(l.has(b))continue;if(g==="never"){c.push(b);continue}let _=f.run({value:t[b],issues:[]},n);_ instanceof Promise?e.push(_.then(u=>Nt(u,r,b,t,v))):Nt(_,r,b,t,v)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}o(Uu,"handleCatchall");var Qn=T("$ZodObject",(e,t)=>{if(q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=$t(()=>Cu(t));Y(e._zod,"propValues",()=>{let l=t.shape,f={};for(let g in l){let v=l[g]._zod;if(v.values){f[g]??(f[g]=new Set);for(let b of v.values)f[g].add(b)}}return f});let i=tt,s=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let g=l.value;if(!i(g))return l.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),l;l.value={};let v=[],b=c.shape;for(let _ of c.keys){let u=b[_],d=u._zod.optout==="optional",y=u._zod.run({value:g[_],issues:[]},f);y instanceof Promise?v.push(y.then(m=>Nt(m,l,_,g,d))):Nt(y,l,_,g,d)}return s?Uu(v,g,l,f,n.value,e):v.length?Promise.all(v).then(()=>l):l}});function Bn(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let i=e.filter(s=>!Fe(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(c=>be(c,n,ye())))}),t)}o(Bn,"handleUnionResults");var _r=T("$ZodUnion",(e,t)=>{q.init(e,t),Y(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Y(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Y(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Y(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>kt(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(r)return n(i,s);let c=!1,l=[];for(let f of t.options){let g=f._zod.run({value:i.value,issues:[]},s);if(g instanceof Promise)l.push(g),c=!0;else{if(g.issues.length===0)return g;l.push(g)}}return c?Promise.all(l).then(f=>Bn(f,i,e,s)):Bn(l,i,e,s)}});var eo=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_r.init(e,t);let r=e._zod.parse;Y(e._zod,"propValues",()=>{let i={};for(let s of t.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let g of f)i[l].add(g)}}return i});let n=$t(()=>{let i=t.options,s=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(s.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);s.set(f,c)}}return s});e._zod.parse=(i,s)=>{let c=i.value;if(!tt(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(i,s):t.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var to=T("$ZodRecord",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!In(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let s=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){l.add(typeof g=="number"?g.toString():g);let v=t.valueType._zod.run({value:i[g],issues:[]},n);v instanceof Promise?s.push(v.then(b=>{b.issues.length&&r.issues.push(...Te(g,b.issues)),r.value[g]=b.value})):(v.issues.length&&r.issues.push(...Te(g,v.issues)),r.value[g]=v.value)}let f;for(let g in i)l.has(g)||(f=f??[],f.push(g));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&gr.test(l)&&f.issues.length){let b=t.keyType._zod.run({value:Number(l),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(f=b)}if(f.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(b=>be(b,n,ye())),input:l,path:[l],inst:e});continue}let v=t.valueType._zod.run({value:i[l],issues:[]},n);v instanceof Promise?s.push(v.then(b=>{b.issues.length&&r.issues.push(...Te(l,b.issues)),r.value[f.value]=b.value})):(v.issues.length&&r.issues.push(...Te(l,v.issues)),r.value[f.value]=v.value)}}return s.length?Promise.all(s).then(()=>r):r}});var ro=T("$ZodEnum",(e,t)=>{q.init(e,t);let r=dr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>En.has(typeof i)).map(i=>typeof i=="string"?je(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),no=T("$ZodLiteral",(e,t)=>{if(q.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"?je(n):n?je(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}});var oo=T("$ZodTransform",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new St(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new de;return r.value=i,r}});function Vn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Vn,"handleOptionalResult");var io=T("$ZodOptional",(e,t)=>{q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${kt(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>Vn(s,r.value)):Vn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var ao=T("$ZodNullable",(e,t)=>{q.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${kt(r.source)}|null)$`):void 0}),Y(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 so=T("$ZodPipe",(e,t)=>{q.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=t.out._zod.run(r,n);return s instanceof Promise?s.then(c=>Rt(c,t.in,n)):Rt(s,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Rt(s,t.out,n)):Rt(i,t.out,n)}});function Rt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(Rt,"handlePipeResult");var uo=T("$ZodCustom",(e,t)=>{Ie.init(e,t),q.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(s=>Zn(s,r,n,e));Zn(i,r,n,e)}});function Zn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(fr(i))}}o(Zn,"handleRefineResult");var lo;var Pr=class{static{o(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 i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function po(){return new Pr}o(po,"registry");(lo=globalThis).__zod_globalRegistry??(lo.__zod_globalRegistry=po());var Tr=globalThis.__zod_globalRegistry;function mo(e,t){return new e({type:"string",...H(t)})}o(mo,"_string");function fo(e,t){return new e({type:"string",coerce:!0,...H(t)})}o(fo,"_coercedString");function go(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}o(go,"_url");function yo(e,t){return new e({type:"number",checks:[],...H(t)})}o(yo,"_number");function ho(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}o(ho,"_coercedNumber");function vo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}o(vo,"_int");function xo(e,t){return new e({type:"boolean",...H(t)})}o(xo,"_boolean");function _o(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}o(_o,"_coercedBoolean");function Po(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}o(Po,"_coercedBigint");function To(e){return new e({type:"any"})}o(To,"_any");function bo(e){return new e({type:"unknown"})}o(bo,"_unknown");function Io(e,t){return new e({type:"void",...H(t)})}o(Io,"_void");function Eo(e,t){return new e({type:"date",coerce:!0,...H(t)})}o(Eo,"_coercedDate");function Ct(e,t){return new Dn({check:"greater_than",...H(t),value:e,inclusive:!0})}o(Ct,"_gte");function le(e,t){return new Un({check:"min_length",...H(t),minimum:e})}o(le,"_minLength");function Ee(e,t){return new Mn({check:"string_format",format:"regex",...H(t),pattern:e})}o(Ee,"_regex");function So(e,t,r){let n=H(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(So,"_custom");var Q=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");q.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>Ot(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>nt(e,r,n),e.parseAsync=async(r,n)=>wt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>ot(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)=>zt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Mt=T("ZodMiniString",(e,t)=>{Dt.init(e,t),Q.init(e,t)});function a(e){return mo(Mt,e)}o(a,"string");var Ao=T("ZodMiniStringFormat",(e,t)=>{hr.init(e,t),Mt.init(e,t)});var Ju=T("ZodMiniURL",(e,t)=>{Hn.init(e,t),Ao.init(e,t)});function $o(e){return go(Ju,e)}o($o,"url");var Lt=T("ZodMiniNumber",(e,t)=>{vr.init(e,t),Q.init(e,t)});function re(e){return yo(Lt,e)}o(re,"number");var Xu=T("ZodMiniNumberFormat",(e,t)=>{Gn.init(e,t),Lt.init(e,t)});function ko(e){return vo(Xu,e)}o(ko,"int");var br=T("ZodMiniBoolean",(e,t)=>{xr.init(e,t),Q.init(e,t)});function V(e){return xo(br,e)}o(V,"boolean");var zo=T("ZodMiniBigInt",(e,t)=>{qn.init(e,t),Q.init(e,t)});var Yu=T("ZodMiniAny",(e,t)=>{Wn.init(e,t),Q.init(e,t)});function at(){return To(Yu)}o(at,"any");var Qu=T("ZodMiniUnknown",(e,t)=>{Kn.init(e,t),Q.init(e,t)});function O(){return bo(Qu)}o(O,"unknown");var ec=T("ZodMiniVoid",(e,t)=>{Jn.init(e,t),Q.init(e,t)});function Oo(e){return Io(ec,e)}o(Oo,"_void");var wo=T("ZodMiniDate",(e,t)=>{Xn.init(e,t),Q.init(e,t)});var tc=T("ZodMiniArray",(e,t)=>{Yn.init(e,t),Q.init(e,t)});function N(e,t){return new tc({type:"array",element:e,...H(t)})}o(N,"array");var rc=T("ZodMiniObject",(e,t)=>{Qn.init(e,t),Q.init(e,t),Y(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new rc(r)}o(p,"object");var nc=T("ZodMiniUnion",(e,t)=>{_r.init(e,t),Q.init(e,t)});function D(e,t){return new nc({type:"union",options:e,...H(t)})}o(D,"union");var oc=T("ZodMiniDiscriminatedUnion",(e,t)=>{eo.init(e,t),Q.init(e,t)});function Se(e,t,r){return new oc({type:"union",options:t,discriminator:e,...H(r)})}o(Se,"discriminatedUnion");var ic=T("ZodMiniRecord",(e,t)=>{to.init(e,t),Q.init(e,t)});function w(e,t,r){return new ic({type:"record",keyType:e,valueType:t,...H(r)})}o(w,"record");var ac=T("ZodMiniEnum",(e,t)=>{ro.init(e,t),Q.init(e,t),e.options=Object.values(t.entries)});function M(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ac({type:"enum",entries:r,...H(t)})}o(M,"_enum");var sc=T("ZodMiniLiteral",(e,t)=>{no.init(e,t),Q.init(e,t)});function A(e,t){return new sc({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}o(A,"literal");var uc=T("ZodMiniTransform",(e,t)=>{oo.init(e,t),Q.init(e,t)});function Ae(e){return new uc({type:"transform",transform:e})}o(Ae,"transform");var cc=T("ZodMiniOptional",(e,t)=>{io.init(e,t),Q.init(e,t)});function h(e){return new cc({type:"optional",innerType:e})}o(h,"optional");var lc=T("ZodMiniNullable",(e,t)=>{ao.init(e,t),Q.init(e,t)});function st(e){return new lc({type:"nullable",innerType:e})}o(st,"nullable");var pc=T("ZodMiniPipe",(e,t)=>{so.init(e,t),Q.init(e,t)});function $e(e,t){return new pc({type:"pipe",in:e,out:t})}o($e,"pipe");var dc=T("ZodMiniCustom",(e,t)=>{uo.init(e,t),Q.init(e,t)});function jt(e,t){return So(dc,e??(()=>!0),t)}o(jt,"custom");var ut={};xn(ut,{bigint:()=>vc,boolean:()=>hc,date:()=>xc,number:()=>yc,string:()=>gc});function gc(e){return fo(Mt,e)}o(gc,"string");function yc(e){return ho(Lt,e)}o(yc,"number");function hc(e){return _o(br,e)}o(hc,"boolean");function vc(e){return Po(zo,e)}o(vc,"bigint");function xc(e){return Eo(wo,e)}o(xc,"date");var Er=p({retryOnFailure:p({defaultValue:h(V()),hide:h(V())}),continueOnFailure:p({defaultValue:h(V()),hide:h(V())})}),Ir=class{constructor(t,r,n,i,s,c,l,f,g,v,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=s;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=g;this.audience=v;this.aiMetadata=b}static{o(this,"IAction")}},W=o(e=>new Ir(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 B=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:A(t),required:V(),defaultValue:h(at())}),"TPropertyValue");var ie=p({...B.shape,...C(a(),"SHORT_TEXT").shape}),he=p({...B.shape,...C(a(),"LONG_TEXT").shape});var No=p({label:a(),value:O()}),Ft=p({disabled:h(V()),placeholder:h(a()),options:N(No)});var ae=p({...B.shape,options:Ft,...C(O(),"STATIC_DROPDOWN").shape}),ve=p({...B.shape,options:Ft,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Sr=p({...B.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),ct=p({...B.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var xe=p({...B.shape,...C(V(),"CHECKBOX").shape});var _e=p({...B.shape,...C(re(),"NUMBER").shape});var lt=p({...B.shape,streaming:h(V()),...C(O(),"FILE").shape});var pt=p({...B.shape,...C(a(),"DATE_TIME").shape});var Do=w(a(),D([ie,he,ae,ct,ve,xe,_e,lt,pt])),dt=p({...B.shape,properties:Do,...C(N(O()),"ARRAY").shape});var mt=p({...B.shape,...C(D([w(a(),O())]),"JSON").shape});var Co=D([ie,ae,mt,dt,ve]),Pc=w(a(),Co),Ar=p({refreshers:N(a()),...B.shape,...C(O(),"DYNAMIC").shape});var Bt=p({...B.shape,...C(Oo(),"MARKDOWN").shape});var ft=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ft||{}),Be=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Be||{}),Ve=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(Ve||{});var gt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(gt||{}),$r="both_client_credentials_and_authorization_code";var ke=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ke||{}),yt=(s=>(s.NONE="NONE",s.HEADER_PRESENT="HEADER_PRESENT",s.QUERY_PRESENT="QUERY_PRESENT",s.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",s.HEAD_REQUEST="HEAD_REQUEST",s))(yt||{}),Tc=p({strategy:M(yt),paramName:h(a())}),ht=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ht||{});var Vt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Vt||{}),Uo=p({status:h(re()),body:h(O()),headers:h(w(a(),a()))}),Mo=p({type:A("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(M(Vt))}),Lo=p({type:A("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Uo,handlerId:h(a()),streamStepProgress:h(M(Vt))}),bc=D([Mo,Lo]);var Ic=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function ee(e){return e==null}o(ee,"isNil");function vt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(vt,"isEmpty");function Zt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Zt,"assertNotNullOrUndefined");var kr=Le(require("crypto"),1);var Ec=128,De,Ze,Sc=o(e=>{!De||De.length<e?(De=Buffer.allocUnsafe(e*Ec),kr.default.randomFillSync(De),Ze=0):Ze+e>De.length&&(kr.default.randomFillSync(De),Ze=0),Ze+=e},"fillPool"),Ac=o(e=>(Sc(e|=0),De.subarray(Ze-e,Ze)),"random"),$c=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(s=t)=>{let c="";for(;;){let l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===s)return c}}},"customRandom"),Fo=o((e,t=21)=>$c(e,t,Ac),"customAlphabet");var kc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bo=21,jT=a().check(Ee(new RegExp(`^[0-9a-zA-Z]{${Bo}}$`))),zc=Fo(kc,Bo);var ze=$e(Ae(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:ze,updated:ze},G=o(e=>h(st(e)),"Nullable");function zr(e){return h(st(M(e)))}o(zr,"NullableEnum");var VT=$e(Ae(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(V())),Ht=o(e=>$e(Ae(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var GT=w(a(),O());var xt=(v=>(v.OPENAI="openai",v.OPENROUTER="openrouter",v.ANTHROPIC="anthropic",v.AZURE="azure",v.GOOGLE="google",v.ACTIVEPIECES="activepieces",v.CLOUDFLARE_GATEWAY="cloudflare-gateway",v.CUSTOM="custom",v.BEDROCK="bedrock",v.MISTRAL="mistral",v))(xt||{});var ob=a().check(Ee(/^#[0-9A-Fa-f]{6}$/));var ab=p({filename:a(),data:O(),type:A("file"),mimetype:h(a())});var Oc=Le(Zo());var mb=p({...se,name:a(),permissions:N(a()),platformId:G(a()),type:a(),userCount:h(re())});var Ho=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ho||{}),Or=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Or||{}),wr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(wr||{});var Rr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Rr||{});var Nr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Nr||{});var wc=p({mode:M(Ho),value:O()}),Rc=p({auth:h(a()),fields:w(a(),wc)}),Nc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(Rc)}),Dc=p({type:A("PIECE"),toolName:a().check(le(1)),pieceMetadata:Nc}),Cc=p({type:A("none")}),Uc=p({type:A("access_token"),accessToken:a()}),Mc=p({type:A("api_key"),apiKey:a(),apiKeyHeader:a()}),Lc=p({type:A("headers"),headers:w(a(),a())}),jc=Se("type",[Cc,Uc,Mc,Lc]),Go=p({type:A("FLOW"),toolName:a().check(le(1)),externalFlowId:a(),flowDisplayName:h(a())}),qo=p({type:A("MCP"),toolName:a().check(le(1)),serverUrl:$o(),protocol:M(wr),auth:jc}),Wo=p({type:A("KNOWLEDGE_BASE"),toolName:a().check(le(1)),sourceType:M(Or),sourceId:a(),sourceName:a()}),Fc=Se("type",[Dc,Go,qo,Wo]),Bc=p({displayName:a(),description:h(a()),type:M(Rr)}),Ko=p({type:A("MARKDOWN"),markdown:a()}),He={type:A("TOOL_CALL"),input:G(w(a(),O())),output:h(O()),toolName:a(),status:M(Nr),toolCallId:a(),startTime:a(),endTime:h(a())},Zb=p(He),Jo=Se("toolCallType",[p({...He,toolCallType:A("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...He,toolCallType:A("FLOW"),displayName:a(),externalFlowId:a()}),p({...He,toolCallType:A("MCP"),displayName:a(),serverUrl:a()}),p({...He,toolCallType:A("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...He,toolCallType:A("UNKNOWN"),displayName:a()})]),Vc=D([Ko,Jo]);var Dr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Dr||{}),Pe=p({apiKey:a()}),Zc=Pe,Hc=p({apiKey:a(),apiKeyHash:a()}),Gc=Pe,qc=Pe,Wc=Pe,Kc=Pe,Jc=Pe,Xc=Pe,Yc=Pe,ti=p({accessKeyId:a().check(le(1)),secretAccessKey:a().check(le(1))}),Qc=p({}),el=p({}),tl=p({}),rl=p({}),nl=p({}),ol=p({}),ri=p({modelId:a(),modelName:a(),modelType:M(Dr)}),ni=p({apiKeyHeader:a(),baseUrl:a(),models:N(ri),defaultHeaders:h(w(a(),a()))}),oi=p({accountId:a(),gatewayId:a(),models:N(ri),vertexProject:h(a()),vertexRegion:h(a())}),ii=p({resourceName:a(),apiVersion:$e(Ae(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),ai=p({region:a().check(le(1))}),il=D([Zc,Wc,Kc,Jc,Xc,qc,Gc,Hc,ti,Yc]),si=D([ni,oi,ii,ai,Qc,tl,rl,nl,el,ol]),al=p({id:a(),name:a(),type:M(Dr)}),sl=p({id:a(),name:a(),provider:M(xt),config:si,enabledForChat:V()}),ul=p({provider:M(xt),config:si,auth:il,platformId:a()});var Wb={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Xo=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],cl=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],ll=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Yo=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],pl=["grok-4.20","grok-4.1-fast"],dl={openai:Xo,anthropic:cl,google:Yo,activepieces:[...ll.map(e=>`anthropic/${e}`),...Xo.map(e=>`openai/${e}`),...Yo.map(e=>`google/${e}`),...pl.map(e=>`x-ai/${e}`)]};var Qo=128e3,ml={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function fl({provider:e}){return e?ml[e]??Qo:Qo}o(fl,"getMaxContextTokens");var ei={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"},gl={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},yl=new Set(["anthropic","mistral"]);function me(e){return{chatModels:dl[e],maxContextTokens:fl({provider:e}),defaultEmbeddingModel:ei[e],supportsEmbedding:ei[e]!==void 0,supportsImageGeneration:!yl.has(e),webSearch:gl[e]}}o(me,"buildProviderCapabilities");var hl={openai:me("openai"),anthropic:me("anthropic"),openrouter:me("openrouter"),azure:me("azure"),google:me("google"),"cloudflare-gateway":me("cloudflare-gateway"),custom:me("custom"),bedrock:me("bedrock"),mistral:me("mistral"),activepieces:me("activepieces")};var vl=p({base64Url:a(),fileName:a(),extension:h(a())}),xl=p({mimeType:a(),url:a(),fileName:h(a())}),Cr=D([vl,xl]);var _l=D([p({type:A("file"),value:Cr}),p({type:A("markdown"),value:a(),files:h(N(Cr))})]),Pl=p({sessionId:a(),message:a(),files:h(N(a()))});var ci=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ci||{}),li=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(li||{}),Ur=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Ur||{});var Tl=D([p({...se,name:a(),externalId:a(),type:A("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([A("TEXT"),A("NUMBER"),A("DATE")]),tableId:a(),projectId:a()})]),bl=p({...se,name:a(),folderId:G(a()),projectId:a(),externalId:a(),status:zr(li),trigger:zr(ci)}),Il=p({...se,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),El=p({events:N(M(Ur)),webhookUrl:a(),flowId:a()}),Sl=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),Al=p({projectId:a(),limit:h(ut.number()),cursor:h(a()),name:h(a()),externalIds:Ht(a()),folderId:h(a()),folderIds:Ht(a())}),$l=p({records:N(N(p({fieldId:a(),value:di()}))),tableId:a()}),kl=p({cells:h(N(p({fieldId:a(),value:di()}))),tableId:a(),agentUpdate:h(V())}),pi=Se("operator",[Ce("eq"),Ce("neq"),Ce("gt"),Ce("gte"),Ce("lt"),Ce("lte"),Ce("co"),ui("exists"),ui("not_exists")]),zl=p({tableId:a(),limit:h(ut.number()),cursor:h(a()),filters:Ht(pi)});function di(){return $e(Ae(e=>e==null?e:String(e)),st(a()))}o(di,"coerceToString");function Ce(e){return p({fieldId:a(),operator:A(e),value:a()})}o(Ce,"valueFilter");function ui(e){return p({fieldId:a(),operator:A(e)})}o(ui,"existenceFilter");var Ol=p({status:h(re()),body:h(O()),headers:h(w(a(),a()))}),wl=p({...se,deleted:G(ze),ownerId:a(),displayName:a(),platformId:a(),externalId:G(a())});var mi=p({name:a(),description:h(a()),type:a(),required:V()}),Rl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(mi),returnsResponse:V()})});var fi="^[0-9]+\\.[0-9]+\\.[0-9]+$",mI=new RegExp(fi),Dl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",fI=a().check(Ee(new RegExp(fi))),gI=a().check(Ee(new RegExp(Dl))),Cl=p({packageType:A("ARCHIVE"),pieceType:M(Be),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),gi=p({packageType:A("REGISTRY"),pieceType:A("OFFICIAL"),pieceName:a(),pieceVersion:a()}),yi=p({packageType:A("REGISTRY"),pieceType:A("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),yI=D([gi,yi]),hI=D([Cl,gi,yi]);var Ul=Se("type",[p({type:A("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:A("INTERVAL"),intervalMs:ko().check(Ct(6e4))})]),vI=p({...se,type:M(ke),projectId:a(),flowId:a(),triggerName:a(),schedule:G(Ul),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:G(a()),simulate:V()}),hi=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(hi||{}),vi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(vi||{}),xi=(r=>(r.S3="S3",r.DB="DB",r))(xi||{}),xI=p({...se,projectId:G(a()),platformId:G(a()),type:M(hi),compression:M(vi),data:h(O()),location:M(xi),size:G(re()),fileName:G(a()),s3Key:G(a()),metadata:G(w(a(),a()))}),_i=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(_i||{}),Pi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Pi||{}),_I=p({id:a(),email:a(),firstName:a(),status:M(Pi),externalId:G(a()),platformId:G(a()),platformRole:M(_i),lastName:a(),created:ze,updated:ze,lastActiveDate:G(ze),imageUrl:G(a())});var Mr=p({...B.shape,...C(w(a(),O()),"OBJECT").shape});var Ei=p({...B.shape,...C(a(),"COLOR").shape});var Lr=D([ie,he,Bt,xe,ae,ve,Sr,ct,Ar,_e,dt,Mr,mt,pt,lt,Ei]),I={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 fe=p({displayName:a(),description:h(a())});var Si=p({username:a(),password:a()}),jr=p({...fe.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(Si,"BASIC_AUTH").shape});var Fl=w(a(),D([ie,he,_e,xe,ae])),Fr=p({...fe.shape,props:Fl,...C(O(),"CUSTOM_AUTH").shape});var Ue=p({...fe.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var Bl=w(a(),D([ie,he,Ue,_e,xe,ae,ve,Bt])),Ai=p({...fe.shape,props:Bl,...C(O(),"OIDC").shape});var Br=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Br||{}),$i=D([ie,Ue,ae]),ki=w(a(),$i),Vl=p({props:h(w(a(),$i)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([A("none"),A("consent"),A("login"),A("omit")])),pkce:h(V()),pkceMethod:h(D([A("plain"),A("S256")])),authorizationMethod:h(M(Br)),grantType:h(D([M(gt),A($r)])),extra:h(w(a(),a()))}),zi=p({access_token:a(),props:h(ki),data:w(a(),at())}),Vr=p({...fe.shape,...Vl.shape,...C(zi,"OAUTH2").shape});var Ge=D([jr,Fr,Ai,Vr,Ue]),_t="Connection",Zr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||_t}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||_t,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||_t}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||_t}},None(){}};var YE={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 Zl=p({...B.shape,...C(O(),"CUSTOM").shape,code:a()});var Hl=D([Lr,Ge]),Hr=w(a(),Hl),vS=w(a(),Lr);var Oi=D([p({strategy:A("CRON"),cronExpression:a()}),p({strategy:A("NONE")})]),qe=class{constructor(t,r,n,i,s,c,l,f,g,v,b,_,u,d,y,m,x,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=s;this.type=c;this.handshakeConfiguration=l;this.onHandshake=f;this.renewConfiguration=g;this.onRenew=v;this.onEnable=b;this.onDisable=_;this.onStart=u;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=x;this.outputSchema=P;this.aiMetadata=j}static{o(this,"ITrigger")}},wi=o(e=>{switch(e.type){case"WEBHOOK":return new qe(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 qe(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 qe(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 qe(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,ee(e.sampleData)&&ee(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Ri="2",qt="0.82.0";var Gr=class{constructor(t,r,n,i,s,c,l,f,g=qt,v,b="",_){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=g;this.maximumSupportedRelease=v;this.description=b;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ri}),"getContextInfo");(!Gl(g)||ql(g,qt))&&(this.minimumSupportedRelease=qt),s.forEach(u=>this._actions[u.name]=u),c.forEach(u=>this._triggers[u.name]=u)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Ni=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new Gr(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 Gl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Gl,"isValidSimpleSemver");function ql(e,t){let[r,n,i]=e.split(".").map(Number),[s,c,l]=t.split(".").map(Number);return r!==s?r<s:n!==c?n<c:i<l}o(ql,"isSemverLessThan");var Wl=h(w(a(),w(a(),a()))),Di=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Ge,N(Ge)])),version:a(),categories:h(N(M(Ve))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(V()),i18n:Wl}),Kl=M(["human","ai","both"]),Ci=p({description:h(a()),idempotent:h(V())}),Ui=p({name:a(),displayName:a(),description:a(),props:Hr,requireAuth:V(),errorHandlingOptions:h(Er),outputSchema:h(jt()),audience:h(Kl),aiMetadata:h(Ci)}),Mi=p({name:a(),displayName:a(),description:a(),props:Hr,errorHandlingOptions:h(Er),type:M(ke),sampleData:O(),handshakeConfiguration:h(jt()),renewConfiguration:h(Oi),testStrategy:M(ht),outputSchema:h(jt()),aiMetadata:h(Ci)}),Jl=p({...Di.shape,actions:w(a(),Ui),triggers:w(a(),Mi)}),Xl=p({...Di.shape,actions:re(),triggers:re(),suggestedActions:h(N(Ui)),suggestedTriggers:h(N(Mi))}),Li=p({projectUsage:re(),pieceType:M(Be),packageType:M(ft),platformId:h(a()),archiveId:h(a())}),vA=p({...Jl.shape,...Li.shape}),xA=p({...Xl.shape,...Li.shape}),_A=p({name:a(),version:a()});var Yl=Le(require("path")),Ql=Le(require("fs/promises"));var Bi=require("node:stream");var Wt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((s,c)=>{i.append(c,s)}),{urlWithoutQueryParams:n,queryParams:i}}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 Kt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new qr,r=new Wr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},qr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Wr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Jt=class extends Error{constructor(r,n){let i=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:s},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=s}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Xt=class extends Wt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Kt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),s=this.getHeaders(t),c=t.queryParams??{};for(let[j,oe]of Object.entries(c))i.append(j,oe);let l=i.toString(),f=l?`${n}?${l}`:n,g=t.responseType??"json",v=t.followRedirects??!0,b=t.retries??0,{body:_,extraHeaders:u,isStream:d}=ep(t.body,s),y=rp({...s,...u}),m=await tp(async()=>{let j=new AbortController,oe=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ce={method:t.method.toString(),headers:y,body:_,redirect:v?"follow":"manual",signal:j.signal};return d&&(ce.duplex="half"),r?.dispatcher!==void 0&&(ce.dispatcher=r.dispatcher),await fetch(f,ce)}finally{oe!==void 0&&clearTimeout(oe)}},b),x=v?300:400;if(m.status<200||m.status>=x){let j=await ji(m,g),oe=new Jt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",oe),oe}let P=await ji(m,g);return{status:m.status,headers:np(m.headers),body:P}}};function ep(e,t){if(ip(e))return{body:void 0,extraHeaders:{},isStream:!1};if(op(e)){let n=new Bi.PassThrough;return e.on("error",i=>n.destroy(i)),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}}o(ep,"serializeBody");async function ji(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}}}}o(ji,"parseResponseBody");async function tp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Fi(n);continue}return i}catch(i){if(r=i,n<t){await Fi(n);continue}throw i}throw r}o(tp,"sendWithRetries");function Fi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Fi,"backoff");function rp(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}o(rp,"normalizeHeaders");function np(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(np,"toHttpHeaders");function op(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(op,"isNodeFormData");function ip(e){return e==null}o(ip,"isNil");var J=new Xt;var ue=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ue||{});var Gd=Le(require("fs")),Ws=Le(qs());var qd={"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 Wd(e){let t=e.split(";")[0].trim().toLowerCase();return qd[t]??""}o(Wd,"contentTypeToExtension");var Kd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Jd=o((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 Ks({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:s,props:c,extraProps:l,authLocation:f="headers"}){return W({audience:"human",name:s||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:I.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:g})=>({url:I.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${Jd(t,g)}/resource or /resource`,required:!0,defaultValue:g?t(g):"",...c?.url??{}})}),"props")}),method:I.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ue).map(g=>({label:g,value:g}))},...c?.method??{}}),headers:I.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:I.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:I.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:I.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:g})=>{if(!g)return{};let v=g,b={};switch(v){case"none":break;case"json":b.data=I.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=I.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=I.Array({displayName:"Form Data",required:!0,properties:{fieldName:I.ShortText({displayName:"Field Name",required:!0}),fieldType:I.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:I.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:I.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:I.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:I.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:I.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:I.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async g=>{let{method:v,url:b,headers:_,queryParams:u,body:d,body_type:y,failsafe:m,timeout:x,response_is_binary:P,followRedirects:j}=g.propsValue;Zt(v,"Method"),Zt(b,"URL");let oe=ee(r)?{}:await r(g.auth,g.propsValue),ce=b.url,Qe=ce.startsWith("http://")||ce.startsWith("https://")?ce:Kd({baseUrl:t(g.auth),relativePath:ce}),Ne={method:v,url:Qe,headers:{..._??{},...f==="headers"||!ee(f)?oe:{}},queryParams:{...f==="queryParams"?oe:{},...u??{}},timeout:x?x*1e3:0,followRedirects:j};if(P&&(Ne.responseType="arraybuffer"),d)if(y&&y!=="none"){let ge=d.data;if(y==="form_data"){let xu=ge,Et=new Ws.default;for(let{fieldName:yn,fieldType:hn,textFieldValue:vn,fileFieldValue:cr}of xu)hn==="text"&&!vt(vn)?Et.append(yn,vn):hn==="file"&&!vt(cr)&&Et.append(yn,cr.data,{filename:cr?.filename});Ne.body=Et,Ne.headers={...Ne.headers,...Et.getHeaders()}}else Ne.body=ge}else y||(Ne.body=d);try{let ge=await J.sendRequest(Ne);return await Xd(g.files,ge.body,ge.status,ge.headers,P)}catch(ge){if(m)return ge.errorMessage();throw ge}},"run")})}o(Ks,"createCustomApiCallAction");var Xd=o(async(e,t,r,n,i)=>{let s;if(i&&Yd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=Wd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),s=await e.write({fileName:`output.${l}`,data:f})}else s=t;return{status:r,headers:n,body:s}},"handleBinaryResponse"),Yd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var It={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:i,files:s,server:c}){switch(e.strategy){case 0:{let l=await t.get("lastPoll");if(ee(l))throw new Error("lastPoll doesn't exist in the store.");let f=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:l,server:c}),g=f.reduce((v,b)=>Math.max(v,b.epochMilliSeconds),l);return await t.put("lastPoll",g),f.filter(v=>v.epochMilliSeconds>l).map(v=>v.data)}case 1:{let l=await t.get("lastItem"),f=await e.items({store:t,auth:r,propsValue:n,lastItemId:l,files:s,server:c}),g=f.findIndex(_=>_.id===l),v=[];ee(l)||g==-1?v=f??[]:v=f?.slice(0,g)??[],ee(i)||(v=v.slice(-i));let b=v?.[0]?.id;return ee(b)||await t.put("lastItem",b),v.map(_=>_.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:i}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let c=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;ee(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:i,server:s}){let c=[];switch(e.strategy){case 0:{c=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{c=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:i,server:s});break}}return Qd(c.map(l=>l.data))}};function Qd(e){return e.length<=5?e:e.slice(0,5)}o(Qd,"getFirstFiveOrAll");var Z=Zr.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:["https://www.googleapis.com/auth/tasks"]});var U={baseUrl:"https://tasks.googleapis.com",tasksList:I.Dropdown({displayName:"Tasks List",auth:Z,refreshers:[],required:!0,options:o(async({auth:e})=>e?{disabled:!1,options:(await em(e)).map(n=>({label:n.title,value:n.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),title:I.ShortText({displayName:"Title",required:!0}),notes:I.LongText({displayName:"Notes",required:!1}),due:I.DateTime({displayName:"Due Date",description:"Due date of the task (YYYY-MM-DD)",required:!1}),completed:I.Checkbox({displayName:"Completed",description:"Mark task as completed",required:!1})};async function em(e){let t={method:"GET",url:`${U.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:e.access_token}};return(await J.sendRequest(t)).body.items}o(em,"getLists");async function sr(e,t,r){let n={method:"GET",url:`${U.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},queryParams:r};return(await J.sendRequest(n)).body.items??[]}o(sr,"getTasks");async function Js(e,t,r){let n={method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${t}/tasks`,authentication:{type:"BEARER_TOKEN",token:e.access_token},body:r};return J.sendRequest(n)}o(Js,"createTask");var Re=[{key:"title",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Task ID"},{key:"notes",label:"Notes"},{key:"due",label:"Due Date",format:"date"},{key:"completed",label:"Completed At",format:"datetime"},{key:"updated",label:"Updated At",format:"datetime"},{key:"parent",label:"Parent Task ID"},{key:"position",label:"Position"},{key:"webViewLink",label:"Task Link",format:"url"}],tm=[{key:"title",label:"Title"},{key:"id",label:"Task List ID"},{key:"updated",label:"Updated At",format:"datetime"}],Xs={fields:Re},Ys={fields:Re},Qs={fields:Re},eu={fields:Re},tu={fields:Re},ru={fields:[{key:"body",label:"Task",value:"body",children:Re}]},nu={fields:[{key:"tasks",label:"Tasks",listItems:Re,labelKey:"title"},{key:"count",label:"Count",format:"number"}]},ou={fields:[{key:"taskLists",label:"Task Lists",listItems:tm,labelKey:"title"},{key:"count",label:"Count",format:"number"}]},iu={fields:[{key:"cleared",label:"Cleared",format:"boolean"}]},au={fields:[{key:"deleted",label:"Deleted",format:"boolean"},{key:"alreadyAbsent",label:"Already Absent",format:"boolean"}]},su={fields:Re};var uu=W({auth:Z,name:"add_task",description:"Add a new task to a specified task list",audience:"human",aiMetadata:{description:"Creates a new task in a specific Google Tasks list, with optional notes, due date, and a completed flag. Use to add a to-do item for the authenticated user; requires a valid task-list ID (resolve it first if you only have a list name). Not idempotent: each call appends a separate task even with identical input.",idempotent:!1},displayName:"Add Task",outputSchema:ru,props:{tasks_list:U.tasksList,title:U.title,notes:U.notes,due:U.due,completed:U.completed},async run({auth:e,propsValue:t}){let r={kind:"tasks#task",status:t.completed?"completed":"needsAction",title:t.title,completed:t.completed?new Date().toISOString():"",notes:t.notes,due:t.due?`${new Date(t.due).toISOString().split("T")[0]}T00:00:00Z`:void 0};return Js(e,t.tasks_list,r)}});var cu=W({auth:Z,name:"find_tasks",displayName:"Find Tasks",description:"Search and list tasks in a task list with optional date-range and status filters.",audience:"ai",aiMetadata:{description:"List tasks in a task list, filtered by due/completed/updated date ranges and status. The piece is otherwise write-only \u2014 call this first to find a task's id before completing, updating, or deleting it. Read-only.",idempotent:!0},outputSchema:nu,props:{tasks_list:U.tasksList,show_completed:I.Checkbox({displayName:"Show Completed",description:"Include completed tasks in results. Defaults to true.",required:!1,defaultValue:!0}),show_hidden:I.Checkbox({displayName:"Show Hidden",description:"Include hidden tasks (tasks that have been completed and a day has passed). Defaults to false.",required:!1,defaultValue:!1}),due_min:I.DateTime({displayName:"Due Date From",description:"Return tasks due on or after this date. RFC 3339 timestamp, e.g. 2026-06-01T00:00:00Z.",required:!1}),due_max:I.DateTime({displayName:"Due Date To",description:"Return tasks due before this date (exclusive). RFC 3339 timestamp, e.g. 2026-07-01T00:00:00Z.",required:!1}),completed_min:I.DateTime({displayName:"Completed Date From",description:"Return tasks completed on or after this date. RFC 3339 timestamp.",required:!1}),completed_max:I.DateTime({displayName:"Completed Date To",description:"Return tasks completed before this date (exclusive). RFC 3339 timestamp.",required:!1}),updated_min:I.DateTime({displayName:"Updated Since",description:'Return tasks last modified on or after this date. Useful for "since last run" incremental reads. RFC 3339 timestamp.',required:!1}),max_results:I.Number({displayName:"Max Results",description:"Maximum number of tasks to return (1\u2013100). Defaults to 20 when omitted.",required:!1})},async run({auth:e,propsValue:t}){let r=e,n={};t.show_completed!==void 0&&t.show_completed!==null&&(n.showCompleted=t.show_completed),t.show_hidden!==void 0&&t.show_hidden!==null&&(n.showHidden=t.show_hidden),t.due_min&&(n.dueMin=new Date(t.due_min).toISOString()),t.due_max&&(n.dueMax=new Date(t.due_max).toISOString()),t.completed_min&&(n.completedMin=new Date(t.completed_min).toISOString()),t.completed_max&&(n.completedMax=new Date(t.completed_max).toISOString()),t.updated_min&&(n.updatedMin=new Date(t.updated_min).toISOString()),t.max_results&&(n.maxResults=t.max_results);let i=await sr(r,t.tasks_list,n);return{tasks:i,count:i.length}}});var lu=W({auth:Z,name:"complete_task",displayName:"Mark Task Complete",description:"Mark an existing task as completed.",audience:"ai",aiMetadata:{description:"Mark an existing task as completed (by task id). Idempotent \u2014 re-completing a done task is a no-op. Use Update Task to reopen or edit other fields.",idempotent:!0},outputSchema:Ys,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to mark as completed. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;return(await J.sendRequest({method:"PATCH",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:{status:"completed"}})).body}});var pu=W({auth:Z,name:"update_task",displayName:"Update Task",description:"Edit an existing task \u2014 title, notes, due date, or status.",audience:"ai",aiMetadata:{description:"Edit an existing task's title, notes, due date, or status (e.g. rename, change due date, reopen). Partial update \u2014 only provided fields change. Not idempotent (use Mark Task Complete for the common complete case).",idempotent:!1},outputSchema:tu,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to update. Obtain the id from Find Tasks.",required:!0}),title:I.ShortText({displayName:"Title",description:"New title for the task.",required:!1}),notes:I.LongText({displayName:"Notes",description:"New notes / description for the task.",required:!1}),due:I.DateTime({displayName:"Due Date",description:"New due date for the task. RFC 3339 timestamp, e.g. 2026-07-15T00:00:00Z.",required:!1}),status:I.StaticDropdown({displayName:"Status",description:"Task status. To simply complete a task prefer Mark Task Complete; set needsAction here to reopen a completed task.",required:!1,options:{options:[{label:"Needs Action",value:"needsAction"},{label:"Completed",value:"completed"}]}})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i,title:s,notes:c,due:l,status:f}=t,g={};return s!=null&&s!==""&&(g.title=s),c!=null&&(g.notes=c),l!=null&&(g.due=`${new Date(l).toISOString().split("T")[0]}T00:00:00Z`),f!=null&&(g.status=f),(await J.sendRequest({method:"PATCH",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:g})).body}});var du=W({auth:Z,name:"delete_task",displayName:"Delete Task",description:"Permanently delete a task by ID.",audience:"ai",aiMetadata:{description:"Delete a task by id. Idempotent \u2014 deleting an already-removed task succeeds (converges to absent).",idempotent:!0},outputSchema:au,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to delete. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;try{await J.sendRequest({method:"DELETE",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token}})}catch(s){if(s?.response?.status===404||s?.status===404)return{deleted:!0,alreadyAbsent:!0};throw s}return{deleted:!0,alreadyAbsent:!1}}});var mu=W({auth:Z,name:"create_task",displayName:"Create Task",description:"Create a new task in a task list, optionally as a subtask and/or positioned after a sibling.",audience:"ai",aiMetadata:{description:"Create a new task in a task list, optionally as a subtask of a parent task (parent_task_id) and/or positioned after a sibling (previous_task_id); resolve those ids via Find Tasks. Use to add a single to-do; for marking an existing task done use Mark Task Complete. Not idempotent \u2014 each call creates a separate task.",idempotent:!1},outputSchema:Qs,props:{tasks_list:U.tasksList,title:U.title,notes:U.notes,due_date:U.due,parent_task_id:I.ShortText({displayName:"Parent Task ID",description:"Make this a subtask of the task with this id (must be in the same list). Obtain the id from Find Tasks. Omit to create a top-level task.",required:!1}),previous_task_id:I.ShortText({displayName:"Previous Task ID",description:"Place the new task immediately after the sibling with this id. Obtain the id from Find Tasks. Omit to place it first among its siblings.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,title:i,notes:s,due_date:c,parent_task_id:l,previous_task_id:f}=t,g={kind:"tasks#task",status:"needsAction",title:i,notes:s,due:c?`${new Date(c).toISOString().split("T")[0]}T00:00:00Z`:void 0},v={};l&&(v.parent=l),f&&(v.previous=f);let b={method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks`,authentication:{type:"BEARER_TOKEN",token:r.access_token},body:g,queryParams:v};return(await J.sendRequest(b)).body}});var fu=W({auth:Z,name:"get_task",displayName:"Get Task",description:"Fetch a single task by its ID.",audience:"ai",aiMetadata:{description:"Fetch a single task's full details (title, notes, due, status, parent, position, links) by its id. Use when you already have a specific task id and want its current state; to find tasks by criteria use Find Tasks instead. Read-only.",idempotent:!0},outputSchema:Xs,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to fetch. Obtain the id from Find Tasks.",required:!0})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i}=t;return(await J.sendRequest({method:"GET",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}`,authentication:{type:"BEARER_TOKEN",token:r.access_token}})).body}});var gu=W({auth:Z,name:"move_task",displayName:"Move Task",description:"Reposition or reparent a task within its list, or move it to another list.",audience:"ai",aiMetadata:{description:"Move a task to a new position within its list \u2014 reparent it under another task (parent_task_id) and/or place it after a sibling (previous_task_id); omit both to move it to the top level. Optionally move it to a different list (destination_tasklist_id). All ids come from Find Tasks, and parent/previous must reference tasks in the destination list. Use this for reordering/nesting; use Update Task to change a task's fields. Not idempotent \u2014 position depends on current order.",idempotent:!1},outputSchema:eu,props:{tasks_list:U.tasksList,task_id:I.ShortText({displayName:"Task ID",description:"The ID of the task to move. Obtain the id from Find Tasks.",required:!0}),parent_task_id:I.ShortText({displayName:"Parent Task ID",description:"Reparent the task under the task with this id (must be in the destination list). Obtain the id from Find Tasks. Omit to move it to the top level.",required:!1}),previous_task_id:I.ShortText({displayName:"Previous Task ID",description:"Place the task immediately after the sibling with this id (must be in the destination list). Obtain the id from Find Tasks. Omit to place it first among its siblings; to move it to the end, pass the last sibling's id (read the current order with Find Tasks).",required:!1}),destination_tasklist_id:I.ShortText({displayName:"Destination Task List ID",description:"Move the task to this task list. Omit to keep it in the current list. Recurring tasks cannot be moved between lists.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n,task_id:i,parent_task_id:s,previous_task_id:c,destination_tasklist_id:l}=t,f={};s&&(f.parent=s),c&&(f.previous=c),l&&(f.destinationTasklist=l);let g={method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${n}/tasks/${i}/move`,authentication:{type:"BEARER_TOKEN",token:r.access_token},queryParams:f};return(await J.sendRequest(g)).body}});var yu=W({auth:Z,name:"clear_completed_tasks",displayName:"Clear Completed Tasks",description:"Hide all completed tasks in a task list.",audience:"ai",aiMetadata:{description:"Hide all completed tasks in a task list (they are marked hidden and drop out of the default view, not permanently deleted). Use to tidy a list after a batch of completions. Affects every completed task at once \u2014 there is no per-task selection; to remove a single task use Delete Task. Not idempotent \u2014 operates on whatever is completed at call time.",idempotent:!1},outputSchema:iu,props:{tasks_list:U.tasksList},async run({auth:e,propsValue:t}){let r=e,{tasks_list:n}=t;return await J.sendRequest({method:"POST",url:`${U.baseUrl}/tasks/v1/lists/${n}/clear`,authentication:{type:"BEARER_TOKEN",token:r.access_token}}),{cleared:!0}}});var hu=W({auth:Z,name:"list_task_lists",displayName:"List Task Lists",description:"List the authenticated user's task lists (id and title).",audience:"ai",aiMetadata:{description:"List the authenticated user's task lists, returning each list's id and title. Use to resolve a list name to its id before operating on tasks, or to discover available lists. Read-only.",idempotent:!0},outputSchema:ou,props:{max_results:I.Number({displayName:"Max Results",description:"Maximum number of task lists to return (1\u2013100). Defaults to 20 when omitted.",required:!1})},async run({auth:e,propsValue:t}){let r=e,{max_results:n}=t,i={};n&&(i.maxResults=String(n));let s={method:"GET",url:`${U.baseUrl}/tasks/v1/users/@me/lists`,authentication:{type:"BEARER_TOKEN",token:r.access_token},queryParams:i},l=(await J.sendRequest(s)).body.items??[];return{taskLists:l,count:l.length}}});var nm={tasks_list:U.tasksList},ur={strategy:0,items:o(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>(await sr(e,t.tasks_list)).filter(s=>Date.parse(s.updated??"0")>r).map(s=>({epochMilliSeconds:Date.parse(s.updated??"0"),data:s})),"items")},vu=wi({auth:Z,name:"new_task",displayName:"New Task",description:"Triggers when a task is created",aiMetadata:{description:"Fires when a task in the selected Google Tasks list is newly created or updated since the last poll, emitting the task that changed. Use to react to additions or edits in a specific task list."},type:"POLLING",props:nm,outputSchema:su,sampleData:{},async test(e){let t=e.store,r=e.auth,n=e.propsValue;return await It.test(ur,{store:t,auth:r,propsValue:n,files:e.files})},async onEnable(e){let t=e.store,r=e.auth,n=e.propsValue;await It.onEnable(ur,{store:t,auth:r,propsValue:n})},async onDisable(e){let t=e.store,r=e.auth,n=e.propsValue;await It.onEnable(ur,{store:t,auth:r,propsValue:n})},async run(e){let t=e.store,r=e.auth,n=e.propsValue;return await It.poll(ur,{store:t,auth:r,propsValue:n,files:e.files})}});var om=Ni({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-tasks.png",categories:["PRODUCTIVITY"],actions:[uu,cu,lu,pu,du,mu,fu,gu,yu,hu,Ks({baseUrl:o(()=>U.baseUrl,"baseUrl"),auth:Z,authMapping:o(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],displayName:"Google Tasks",description:"Task list management application",authors:["Salem-Alaa","kishanprmr","MoShizzle","khaledmashaly","abuaboud"],triggers:[vu],auth:Z});0&&(module.exports={googleTasks});
4
4
  /*! Bundled license information:
5
5
 
6
6
  mime-types/index.js: