@activepieces/piece-sendpulse 0.1.5 → 0.1.6

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 (49) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +13 -56
  3. package/src/index.d.ts +0 -5
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/add-subscriber.d.ts +0 -13
  7. package/src/lib/actions/add-subscriber.d.ts.map +0 -1
  8. package/src/lib/actions/add-subscriber.js +0 -84
  9. package/src/lib/actions/add-subscriber.js.map +0 -1
  10. package/src/lib/actions/change-variable-for-subscriber.d.ts +0 -16
  11. package/src/lib/actions/change-variable-for-subscriber.d.ts.map +0 -1
  12. package/src/lib/actions/change-variable-for-subscriber.js +0 -146
  13. package/src/lib/actions/change-variable-for-subscriber.js.map +0 -1
  14. package/src/lib/actions/delete-contact.d.ts +0 -7
  15. package/src/lib/actions/delete-contact.d.ts.map +0 -1
  16. package/src/lib/actions/delete-contact.js +0 -51
  17. package/src/lib/actions/delete-contact.js.map +0 -1
  18. package/src/lib/actions/unsubscribe-user.d.ts +0 -11
  19. package/src/lib/actions/unsubscribe-user.d.ts.map +0 -1
  20. package/src/lib/actions/unsubscribe-user.js +0 -66
  21. package/src/lib/actions/unsubscribe-user.js.map +0 -1
  22. package/src/lib/actions/update-subscriber.d.ts +0 -13
  23. package/src/lib/actions/update-subscriber.d.ts.map +0 -1
  24. package/src/lib/actions/update-subscriber.js +0 -102
  25. package/src/lib/actions/update-subscriber.js.map +0 -1
  26. package/src/lib/common/auth.d.ts +0 -5
  27. package/src/lib/common/auth.d.ts.map +0 -1
  28. package/src/lib/common/auth.js +0 -38
  29. package/src/lib/common/auth.js.map +0 -1
  30. package/src/lib/common/client.d.ts +0 -14
  31. package/src/lib/common/client.d.ts.map +0 -1
  32. package/src/lib/common/client.js +0 -63
  33. package/src/lib/common/client.js.map +0 -1
  34. package/src/lib/common/props.d.ts +0 -5
  35. package/src/lib/common/props.d.ts.map +0 -1
  36. package/src/lib/common/props.js +0 -54
  37. package/src/lib/common/props.js.map +0 -1
  38. package/src/lib/triggers/new-subscriber.d.ts +0 -35
  39. package/src/lib/triggers/new-subscriber.d.ts.map +0 -1
  40. package/src/lib/triggers/new-subscriber.js +0 -120
  41. package/src/lib/triggers/new-subscriber.js.map +0 -1
  42. package/src/lib/triggers/new-unsubscriber.d.ts +0 -35
  43. package/src/lib/triggers/new-unsubscriber.d.ts.map +0 -1
  44. package/src/lib/triggers/new-unsubscriber.js +0 -124
  45. package/src/lib/triggers/new-unsubscriber.js.map +0 -1
  46. package/src/lib/triggers/updated-subscriber.d.ts +0 -35
  47. package/src/lib/triggers/updated-subscriber.d.ts.map +0 -1
  48. package/src/lib/triggers/updated-subscriber.js +0 -145
  49. package/src/lib/triggers/updated-subscriber.js.map +0 -1
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "@activepieces/piece-sendpulse",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
- "types": "./src/index.d.ts",
7
- "dependencies": {
8
- "@activepieces/pieces-common": "0.12.3",
9
- "@activepieces/pieces-framework": "0.30.0",
10
- "@activepieces/shared": "0.87.1",
11
- "tslib": "2.3.0"
12
- },
13
- "scripts": {
14
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
15
- "lint": "eslint 'src/**/*.ts'"
16
- }
6
+ "dependencies": {},
7
+ "files": [
8
+ "src/index.js",
9
+ "package.json",
10
+ "src/i18n"
11
+ ]
17
12
  }
package/src/index.js CHANGED
@@ -1,56 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendpulse = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const auth_1 = require("./lib/common/auth");
8
- const client_1 = require("./lib/common/client");
9
- const new_subscriber_1 = require("./lib/triggers/new-subscriber");
10
- const new_unsubscriber_1 = require("./lib/triggers/new-unsubscriber");
11
- const updated_subscriber_1 = require("./lib/triggers/updated-subscriber");
12
- const add_subscriber_1 = require("./lib/actions/add-subscriber");
13
- const change_variable_for_subscriber_1 = require("./lib/actions/change-variable-for-subscriber");
14
- const delete_contact_1 = require("./lib/actions/delete-contact");
15
- const unsubscribe_user_1 = require("./lib/actions/unsubscribe-user");
16
- const update_subscriber_1 = require("./lib/actions/update-subscriber");
17
- exports.sendpulse = (0, pieces_framework_1.createPiece)({
18
- displayName: 'SendPulse',
19
- auth: auth_1.sendpulseAuth,
20
- minimumSupportedRelease: '0.36.1',
21
- logoUrl: 'https://cdn.activepieces.com/pieces/sendpulse.png',
22
- authors: ['aryel780', 'onyedikachi-david'],
23
- actions: [
24
- add_subscriber_1.addSubscriberAction,
25
- change_variable_for_subscriber_1.changeVariableForSubscriberAction,
26
- delete_contact_1.deleteContactAction,
27
- unsubscribe_user_1.unsubscribeUserAction,
28
- update_subscriber_1.updateSubscriberAction,
29
- (0, pieces_common_1.createCustomApiCallAction)({
30
- auth: auth_1.sendpulseAuth,
31
- baseUrl: () => 'https://api.sendpulse.com',
32
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
33
- const typedAuth = auth.props;
34
- const token = yield (0, client_1.sendpulseApiCall)({
35
- method: pieces_common_1.HttpMethod.POST,
36
- auth: typedAuth,
37
- resourceUri: '/oauth/access_token',
38
- body: {
39
- grant_type: 'client_credentials',
40
- client_id: typedAuth.clientId,
41
- client_secret: typedAuth.clientSecret,
42
- },
43
- });
44
- return {
45
- Authorization: `Bearer ${token.access_token}`,
46
- };
47
- }),
48
- }),
49
- ],
50
- triggers: [
51
- new_subscriber_1.newSubscriberTrigger,
52
- new_unsubscriber_1.newUnsubscriberTrigger,
53
- updated_subscriber_1.updatedSubscriberTrigger
54
- ],
55
- });
56
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Vs=Object.create;var Ke=Object.defineProperty;var Hs=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,qs=Object.prototype.hasOwnProperty;var i=(e,t)=>Ke(e,"name",{value:t,configurable:!0});var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fn=(e,t)=>{for(var r in t)Ke(e,r,{get:t[r],enumerable:!0})},gn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ws(t))!qs.call(e,o)&&o!==r&&Ke(e,o,{get:()=>t[o],enumerable:!(n=Hs(t,o))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Vs(Gs(e)):{},gn(t||!e||!e.__esModule?Ke(r,"default",{value:e,enumerable:!0}):r,e)),Js=e=>gn(Ke({},"__esModule",{value:!0}),e);var Ro=$((Oo,Zt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",p={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,v=(u.match(p.zoneIndex)||[])[0],P,j;for(v&&(v=v.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 re=u.split(":"),se=[];for(let Je=0;Je<re.length;Je++)se.push(parseInt(re[Je],16));return se}(),{parts:d,zoneId:v}}i(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 v=0,P;for(;m>0;){if(P=y-m,P<0&&(P=0),u[v]>>P!==d[v]>>P)return!1;m-=y,v+=1}return!0}i(g,"matchCIDR");function x(u){if(o.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)}i(x,"parseIntAuto");function T(u,d){for(;u.length<d;)u=`0${u}`;return u}i(T,"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 i(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},v,P,j;for(v=3;v>=0;v-=1)if(P=this.octets[v],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(),v=[],P=0;for(;P<4;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}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,v,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}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:i(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 v=d.slice(1,6),P=[];for(let j=0;j<v.length;j++)y=v[j],P.push(x(y));return P}();if(d=u.match(r.longValue)){if(m=x(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(d=u.match(r.twoOctet))?function(){let v=d.slice(1,4),P=[];if(m=x(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(x(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(d=u.match(r.threeOctet))?function(){let v=d.slice(1,5),P=[];if(m=x(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(x(v[0])),P.push(x(v[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,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");y&&(this.zoneId=y)}return i(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},v,P;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(P=m[v],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 v=0;v<m.length;v++)d=m[v],y.push(d>>8),y.push(d&255);return y},u.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(T(this.parts[v].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 v=0;v<this.parts.length;v++)m.push(this.parts[v].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,v=-1,P;for(;P=d.exec(y);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?y:`${y.substring(0,m)}::${y.substring(m+v)}`},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(),v=[],P=0;for(;P<16;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}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,v,P;try{for(d=this.parseCIDR(u),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}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:i(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,v,P,j;if(m=u.match(p.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(p.native.test(u))return f(u,8);if((m=u.match(p.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(v=P[y],!(0<=v&&v<=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,v,P,j;y==null&&(y="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(P=d[v],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 v}return y},typeof Zt<"u"&&Zt.exports?Zt.exports=_:e.ipaddr=_})(Oo)});var zi=$((YS,Ai)=>{var Si=require("stream").Stream,Tl=require("util");Ai.exports=le;function le(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(le,"DelayedStream");Tl.inherits(le,Si);le.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(le.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});le.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};le.prototype.resume=function(){this._released||this.release(),this.source.resume()};le.prototype.pause=function(){this.source.pause()};le.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};le.prototype.pipe=function(){var e=Si.prototype.pipe.apply(this,arguments);return this.resume(),e};le.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)};le.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=$((eA,Oi)=>{var $l=require("util"),ki=require("stream").Stream,wi=zi();Oi.exports=q;function q(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}i(q,"CombinedStream");$l.inherits(q,ki);q.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};q.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};q.prototype.append=function(e){var t=q.isStreamLike(e);if(t){if(!(e instanceof wi)){var r=wi.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};q.prototype.pipe=function(e,t){return ki.prototype.pipe.call(this,e,t),this.resume(),e};q.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}};q.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=q.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};q.prototype._pipeNext=function(e){this._currentStream=e;var t=q.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()};q.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};q.prototype.write=function(e){this.emit("data",e)};q.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};q.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")};q.prototype.end=function(){this._reset(),this.emit("end")};q.prototype.destroy=function(){this._reset(),this.emit("close")};q.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};q.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};q.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)};q.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Di=$((rA,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=$(ee=>{"use strict";var Jt=Di(),El=require("path").extname,Ci=/^\s*([^;\s]*)(?:;|\s|$)/,Sl=/^text\//i;ee.charset=Ui;ee.charsets={lookup:Ui};ee.contentType=Al;ee.extension=zl;ee.extensions=Object.create(null);ee.lookup=wl;ee.types=Object.create(null);kl(ee.extensions,ee.types);function Ui(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&Jt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Sl.test(t[1])?"UTF-8":!1}i(Ui,"charset");function Al(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ee.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ee.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(Al,"contentType");function zl(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&ee.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(zl,"extension");function wl(e){if(!e||typeof e!="string")return!1;var t=El("x."+e).toLowerCase().substr(1);return t&&ee.types[t]||!1}i(wl,"lookup");function kl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Jt).forEach(i(function(o){var s=Jt[o],c=s.extensions;if(!(!c||!c.length)){e[o]=c;for(var p=0;p<c.length;p++){var f=c[p];if(t[f]){var g=r.indexOf(Jt[t[f]].source),x=r.indexOf(s.source);if(t[f]!=="application/octet-stream"&&(g>x||g===x&&t[f].substr(0,12)==="application/"))continue}t[f]=o}}},"forEachMimeType"))}i(kl,"populateMaps")});var Li=$((iA,ji)=>{ji.exports=Ol;function Ol(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(Ol,"defer")});var Vr=$((sA,Bi)=>{var Fi=Li();Bi.exports=Rl;function Rl(e){var t=!1;return Fi(function(){t=!0}),i(function(n,o){t?e(n,o):Fi(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(Rl,"async")});var Hr=$((cA,Zi)=>{Zi.exports=Nl;function Nl(e){Object.keys(e.jobs).forEach(Dl.bind(e)),e.jobs={}}i(Nl,"abort");function Dl(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(Dl,"clean")});var Wr=$((pA,Hi)=>{var Vi=Vr(),Cl=Hr();Hi.exports=Ul;function Ul(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=Ml(t,o,e[o],function(s,c){o in r.jobs&&(delete r.jobs[o],s?Cl(r):r.results[o]=c,n(s,r.results))})}i(Ul,"iterate");function Ml(e,t,r,n){var o;return e.length==2?o=e(r,Vi(n)):o=e(r,t,Vi(n)),o}i(Ml,"runJob")});var Gr=$((mA,Wi)=>{Wi.exports=jl;function jl(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,s){return t(e[o],e[s])}),n}i(jl,"state")});var qr=$((gA,Gi)=>{var Ll=Hr(),Fl=Vr();Gi.exports=Bl;function Bl(e){Object.keys(this.jobs).length&&(this.index=this.size,Ll(this),Fl(e)(null,this.results))}i(Bl,"terminator")});var Ji=$((hA,qi)=>{var Zl=Wr(),Vl=Gr(),Hl=qr();qi.exports=Wl;function Wl(e,t,r){for(var n=Vl(e);n.index<(n.keyedList||e).length;)Zl(e,t,n,function(o,s){if(o){r(o,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Hl.bind(n,r)}i(Wl,"parallel")});var Jr=$((xA,Kt)=>{var Ki=Wr(),Gl=Gr(),ql=qr();Kt.exports=Jl;Kt.exports.ascending=Xi;Kt.exports.descending=Kl;function Jl(e,t,r,n){var o=Gl(e,r);return Ki(e,t,o,i(function s(c,p){if(c){n(c,p);return}if(o.index++,o.index<(o.keyedList||e).length){Ki(e,t,o,s);return}n(null,o.results)},"iteratorHandler")),ql.bind(o,n)}i(Jl,"serialOrdered");function Xi(e,t){return e<t?-1:e>t?1:0}i(Xi,"ascending");function Kl(e,t){return-1*Xi(e,t)}i(Kl,"descending")});var Qi=$((PA,Yi)=>{var Xl=Jr();Yi.exports=Yl;function Yl(e,t,r){return Xl(e,t,null,r)}i(Yl,"serial")});var ta=$((IA,ea)=>{ea.exports={parallel:Ji(),serial:Qi(),serialOrdered:Jr()}});var Kr=$((TA,ra)=>{"use strict";ra.exports=Object});var oa=$(($A,na)=>{"use strict";na.exports=Error});var aa=$((EA,ia)=>{"use strict";ia.exports=EvalError});var ua=$((SA,sa)=>{"use strict";sa.exports=RangeError});var la=$((AA,ca)=>{"use strict";ca.exports=ReferenceError});var da=$((zA,pa)=>{"use strict";pa.exports=SyntaxError});var Xt=$((wA,ma)=>{"use strict";ma.exports=TypeError});var ga=$((kA,fa)=>{"use strict";fa.exports=URIError});var ha=$((OA,ya)=>{"use strict";ya.exports=Math.abs});var xa=$((RA,va)=>{"use strict";va.exports=Math.floor});var Pa=$((NA,_a)=>{"use strict";_a.exports=Math.max});var Ia=$((DA,ba)=>{"use strict";ba.exports=Math.min});var $a=$((CA,Ta)=>{"use strict";Ta.exports=Math.pow});var Sa=$((UA,Ea)=>{"use strict";Ea.exports=Math.round});var za=$((MA,Aa)=>{"use strict";Aa.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var ka=$((LA,wa)=>{"use strict";var Ql=za();wa.exports=i(function(t){return Ql(t)||t===0?t:t<0?-1:1},"sign")});var Ra=$((BA,Oa)=>{"use strict";Oa.exports=Object.getOwnPropertyDescriptor});var Xr=$((ZA,Na)=>{"use strict";var Yt=Ra();if(Yt)try{Yt([],"length")}catch{Yt=null}Na.exports=Yt});var Ca=$((VA,Da)=>{"use strict";var Qt=Object.defineProperty||!1;if(Qt)try{Qt({},"a",{value:1})}catch{Qt=!1}Da.exports=Qt});var Yr=$((HA,Ua)=>{"use strict";Ua.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var 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 p=Object.getOwnPropertyDescriptor(t,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0},"hasSymbols")});var La=$((GA,ja)=>{"use strict";var Ma=typeof Symbol<"u"&&Symbol,ep=Yr();ja.exports=i(function(){return typeof Ma!="function"||typeof Symbol!="function"||typeof Ma("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ep()},"hasNativeSymbols")});var Qr=$((JA,Fa)=>{"use strict";Fa.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var en=$((KA,Ba)=>{"use strict";var tp=Kr();Ba.exports=tp.getPrototypeOf||null});var Ha=$((XA,Va)=>{"use strict";var rp="Function.prototype.bind called on incompatible ",np=Object.prototype.toString,op=Math.max,ip="[object Function]",Za=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var s=0;s<r.length;s+=1)n[s+t.length]=r[s];return n},"concatty"),ap=i(function(t,r){for(var n=[],o=r||0,s=0;o<t.length;o+=1,s+=1)n[s]=t[o];return n},"slicy"),sp=i(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Va.exports=i(function(t){var r=this;if(typeof r!="function"||np.apply(r)!==ip)throw new TypeError(rp+r);for(var n=ap(arguments,1),o,s=i(function(){if(this instanceof o){var x=r.apply(this,Za(n,arguments));return Object(x)===x?x:this}return r.apply(t,Za(n,arguments))},"binder"),c=op(0,r.length-n.length),p=[],f=0;f<c;f++)p[f]="$"+f;if(o=Function("binder","return function ("+sp(p,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var g=i(function(){},"Empty");g.prototype=r.prototype,o.prototype=new g,g.prototype=null}return o},"bind")});var Ve=$((QA,Wa)=>{"use strict";var up=Ha();Wa.exports=Function.prototype.bind||up});var er=$((ez,Ga)=>{"use strict";Ga.exports=Function.prototype.call});var tn=$((tz,qa)=>{"use strict";qa.exports=Function.prototype.apply});var Ka=$((rz,Ja)=>{"use strict";Ja.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ya=$((nz,Xa)=>{"use strict";var cp=Ve(),lp=tn(),pp=er(),dp=Ka();Xa.exports=dp||cp.call(pp,lp)});var es=$((oz,Qa)=>{"use strict";var mp=Ve(),fp=Xt(),gp=er(),yp=Ya();Qa.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new fp("a function is required");return yp(mp,gp,t)},"callBindBasic")});var as=$((az,is)=>{"use strict";var hp=es(),ts=Xr(),ns;try{ns=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var rn=!!ns&&ts&&ts(Object.prototype,"__proto__"),os=Object,rs=os.getPrototypeOf;is.exports=rn&&typeof rn.get=="function"?hp([rn.get]):typeof rs=="function"?i(function(t){return rs(t==null?t:os(t))},"getDunder"):!1});var ps=$((uz,ls)=>{"use strict";var ss=Qr(),us=en(),cs=as();ls.exports=ss?i(function(t){return ss(t)},"getProto"):us?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return us(t)},"getProto"):cs?i(function(t){return cs(t)},"getProto"):null});var nn=$((lz,ds)=>{"use strict";var vp=Function.prototype.call,xp=Object.prototype.hasOwnProperty,_p=Ve();ds.exports=_p.call(vp,xp)});var xs=$((pz,vs)=>{"use strict";var M,Pp=Kr(),bp=oa(),Ip=aa(),Tp=ua(),$p=la(),qe=da(),Ge=Xt(),Ep=ga(),Sp=ha(),Ap=xa(),zp=Pa(),wp=Ia(),kp=$a(),Op=Sa(),Rp=ka(),ys=Function,on=i(function(e){try{return ys('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pt=Xr(),Np=Ca(),an=i(function(){throw new Ge},"throwTypeError"),Dp=Pt?function(){try{return arguments.callee,an}catch{try{return Pt(arguments,"callee").get}catch{return an}}}():an,He=La()(),Y=ps(),Cp=en(),Up=Qr(),hs=tn(),bt=er(),We={},Mp=typeof Uint8Array>"u"||!Y?M:Y(Uint8Array),Oe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Y?Y([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":bp,"%eval%":eval,"%EvalError%":Ip,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":ys,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&Y?Y(Y([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Y?M:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Pp,"%Object.getOwnPropertyDescriptor%":Pt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Tp,"%ReferenceError%":$p,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Y?M:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Y?Y(""[Symbol.iterator]()):M,"%Symbol%":He?Symbol:M,"%SyntaxError%":qe,"%ThrowTypeError%":Dp,"%TypedArray%":Mp,"%TypeError%":Ge,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":Ep,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":bt,"%Function.prototype.apply%":hs,"%Object.defineProperty%":Np,"%Object.getPrototypeOf%":Cp,"%Math.abs%":Sp,"%Math.floor%":Ap,"%Math.max%":zp,"%Math.min%":wp,"%Math.pow%":kp,"%Math.round%":Op,"%Math.sign%":Rp,"%Reflect.getPrototypeOf%":Up};if(Y)try{null.error}catch(e){ms=Y(Y(e)),Oe["%Error.prototype%"]=ms}var ms,jp=i(function e(t){var r;if(t==="%AsyncFunction%")r=on("async function () {}");else if(t==="%GeneratorFunction%")r=on("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=on("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Y&&(r=Y(o.prototype))}return Oe[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"]},It=Ve(),tr=nn(),Lp=It.call(bt,Array.prototype.concat),Fp=It.call(hs,Array.prototype.splice),gs=It.call(bt,String.prototype.replace),rr=It.call(bt,String.prototype.slice),Bp=It.call(bt,RegExp.prototype.exec),Zp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vp=/\\(\\)?/g,Hp=i(function(t){var r=rr(t,0,1),n=rr(t,-1);if(r==="%"&&n!=="%")throw new qe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qe("invalid intrinsic syntax, expected opening `%`");var o=[];return gs(t,Zp,function(s,c,p,f){o[o.length]=p?gs(f,Vp,"$1"):c||s}),o},"stringToPath"),Wp=i(function(t,r){var n=t,o;if(tr(fs,n)&&(o=fs[n],n="%"+o[0]+"%"),tr(Oe,n)){var s=Oe[n];if(s===We&&(s=jp(n)),typeof s>"u"&&!r)throw new Ge("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:s}}throw new qe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");vs.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new Ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ge('"allowMissing" argument must be a boolean');if(Bp(/^%?[^%]*%?$/,t)===null)throw new qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Hp(t),o=n.length>0?n[0]:"",s=Wp("%"+o+"%",r),c=s.name,p=s.value,f=!1,g=s.alias;g&&(o=g[0],Fp(n,Lp([0,1],g)));for(var x=1,T=!0;x<n.length;x+=1){var _=n[x],u=rr(_,0,1),d=rr(_,-1);if((u==='"'||u==="'"||u==="`"||d==='"'||d==="'"||d==="`")&&u!==d)throw new qe("property names with quotes must have matching quotes");if((_==="constructor"||!T)&&(f=!0),o+="."+_,c="%"+o+"%",tr(Oe,c))p=Oe[c];else if(p!=null){if(!(_ in p)){if(!r)throw new Ge("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pt&&x+1>=n.length){var y=Pt(p,_);T=!!y,T&&"get"in y&&!("originalValue"in y.get)?p=y.get:p=p[_]}else T=tr(p,_),p=p[_];T&&!f&&(Oe[c]=p)}}return p},"GetIntrinsic")});var Ps=$((mz,_s)=>{"use strict";var Gp=Yr();_s.exports=i(function(){return Gp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ts=$((gz,Is)=>{"use strict";var qp=xs(),bs=qp("%Object.defineProperty%",!0),Jp=Ps()(),Kp=nn(),Xp=Xt(),nr=Jp?Symbol.toStringTag:null;Is.exports=i(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new Xp("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");nr&&(n||!Kp(t,nr))&&(bs?bs(t,nr,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[nr]=r)},"setToStringTag")});var Es=$((hz,$s)=>{"use strict";var Yp=Function.prototype.call,Qp=Object.prototype.hasOwnProperty,ed=Ve();$s.exports=ed.call(Yp,Qp)});var As=$((vz,Ss)=>{"use strict";Ss.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ks=$((xz,ws)=>{"use strict";var ln=Ri(),td=require("util"),sn=require("path"),rd=require("http"),nd=require("https"),od=require("url").parse,id=require("fs"),ad=require("stream").Stream,sd=require("crypto"),un=Mi(),ud=ta(),cd=Ts(),Se=Es(),cn=As();function zs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(zs,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ln.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(L,"FormData");td.inherits(L,ln);L.LINE_BREAK=`\r
2
+ `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=ln.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),s=this._multiPartFooter();n(o),n(t),n(s),this._trackLength(o,t,r)};L.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)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Se(t,"httpVersion"))&&!(t instanceof ad))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Se(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):id.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):Se(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Se(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),s="",c={"Content-Disposition":["form-data",'name="'+zs(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&cn(c,r.header);var p;for(var f in c)if(Se(c,f)){if(p=c[f],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(s+=f+": "+p.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+s+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=sn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=sn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=sn.basename(e.client._httpMessage.path||"")),r)return'filename="'+zs(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=un.lookup(e.name)),!r&&e&&e.path&&(r=un.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=un.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Se(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.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(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+sd.randomBytes(12).toString("hex")};L.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};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.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}ud.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=od(e),n=cn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=cn(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=nd.request(n):r=rd.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 p,f=i(function(g,x){return r.removeListener("error",f),r.removeListener("response",p),t.call(this,g,x)},"callback");p=f.bind(this,null),r.on("error",f),r.on("response",p)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};cd(L.prototype,"FormData");ws.exports=L});var Pd={};fn(Pd,{sendpulse:()=>_d});module.exports=Js(Pd);var Ks=Object.freeze({status:"aborted"});function b(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 g=c.prototype,x=Object.keys(g);for(let T=0;T<x.length;T++){let _=x[T];_ in p||(p[_]=g[_].bind(p))}}i(n,"init");let o=r?.Parent??Object;class s extends o{static{i(this,"Definition")}}Object.defineProperty(s,"name",{value:e});function c(p){var f;let g=r?.Parent?new s:this;n(g,p),(f=g._zod).deferred??(f.deferred=[]);for(let x of g._zod.deferred)x();return g}return i(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:i(p=>r?.Parent&&p instanceof r.Parent?!0:p?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}i(b,"$constructor");var Xs=Symbol("zod_brand"),pe=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$t=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ar={};function ge(e){return e&&Object.assign(ar,e),ar}i(ge,"config");function ur(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}i(ur,"getEnumValues");function hn(e,t){return typeof t=="bigint"?t.toString():t}i(hn,"jsonStringifyReplacer");function St(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(St,"cached");function vn(e){return e==null}i(vn,"nullish");function At(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(At,"cleanRegex");var yn=Symbol("evaluating");function K(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==yn)return n===void 0&&(n=yn,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(K,"defineLazy");var cr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(Xe,"isObject");var Ys=St(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function xn(e){if(Xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Xe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(xn,"isPlainObject");var _n=new Set(["string","number","symbol"]);function Ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(Ne,"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}i(zt,"clone");function H(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:i(()=>t.error,"error")}:t}i(H,"normalizeParams");function Pn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(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 De(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}i(De,"aborted");function Pe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Pe,"prefixIssues");function Et(e){return typeof e=="string"?e:e?.message}i(Et,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Et(e.inst?._zod.def?.error?.(e))??Et(t?.error?.(e))??Et(r.customError?.(e))??Et(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(be,"finalizeIssue");function bn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(bn,"getLengthableOrigin");function lr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(lr,"issue");var In=i((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hn,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),Tn=b("$ZodError",In),Ye=b("$ZodError",In,{Parent:Error});var tu=i(e=>(t,r,n,o)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new pe;if(c.issues.length){let p=new(o?.Err??e)(c.issues.map(f=>be(f,s,ge())));throw cr(p,o?.callee),p}return c.value},"_parse"),wt=tu(Ye),ru=i(e=>async(t,r,n,o)=>{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 p=new(o?.Err??e)(c.issues.map(f=>be(f,s,ge())));throw cr(p,o?.callee),p}return c.value},"_parseAsync"),kt=ru(Ye),nu=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new pe;return s.issues.length?{success:!1,error:new(e??Tn)(s.issues.map(c=>be(c,o,ge())))}:{success:!0,data:s.value}},"_safeParse"),Qe=nu(Ye),ou=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(c=>be(c,o,ge())))}:{success:!0,data:s.value}},"_safeParseAsync"),et=ou(Ye);var iu="(?:(?:\\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])))",au=new RegExp(`^${iu}$`);var $n=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),En=/^-?\d+n?$/;var pr=/^-?\d+(?:\.\d+)?$/,Sn=/^(?:true|false)$/i;var Ce=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var An=b("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!vn(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let c=bn(o);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var dr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ce.init(e,t),e._zod.onattach.push(o=>{let s=o._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=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),zn=b("$ZodCheckRegex",(e,t)=>{dr.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 W=b("$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 o of n)for(let s of o._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 o=i((c,p,f)=>{let g=De(c),x;for(let T of p){if(T._zod.def.when){if(!T._zod.def.when(c))continue}else if(g)continue;let _=c.issues.length,u=T._zod.check(c);if(u instanceof Promise&&f?.async===!1)throw new pe;if(x||u instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await u,c.issues.length!==_&&(g||(g=De(c,_)))});else{if(c.issues.length===_)continue;g||(g=De(c,_))}}return x?x.then(()=>c):c},"runChecks"),s=i((c,p,f)=>{if(De(c))return c.aborted=!0,c;let g=o(p,n,f);if(g instanceof Promise){if(f.async===!1)throw new pe;return g.then(x=>e._zod.parse(x,f))}return e._zod.parse(g,f)},"handleCanaryResult");e._zod.run=(c,p)=>{if(p.skipChecks)return e._zod.parse(c,p);if(p.direction==="backward"){let g=e._zod.parse({value:c.value,issues:[]},{...p,skipChecks:!0});return g instanceof Promise?g.then(x=>s(x,c,p)):s(g,c,p)}let f=e._zod.parse(c,p);if(f instanceof Promise){if(p.async===!1)throw new pe;return f.then(g=>o(g,n,p))}return o(f,n,p)}}K(e,"~standard",()=>({validate:i(o=>{try{let s=Qe(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return et(e,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Nt=b("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$n(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}}),mr=b("$ZodStringFormat",(e,t)=>{dr.init(e,t),Nt.init(e,t)});var Cn=b("$ZodURL",(e,t)=>{mr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Un=b("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??pr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}});var fr=b("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=Sn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),Mn=b("$ZodBigInt",(e,t)=>{W.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 jn=b("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),Ln=b("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var Fn=b("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Bn=b("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,s=o instanceof Date;return s&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...s?{received:"Invalid Date"}:{},inst:e}),r}});function On(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}i(On,"handleArrayResult");var Zn=b("$ZodArray",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let s=[];for(let c=0;c<o.length;c++){let p=o[c],f=t.element._zod.run({value:p,issues:[]},n);f instanceof Promise?s.push(f.then(g=>On(g,r,c))):On(f,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function Rt(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Pe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(Rt,"handlePropertyResult");function su(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)}}i(su,"normalizeDef");function uu(e,t,r,n,o,s){let c=[],p=o.keySet,f=o.catchall._zod,g=f.def.type,x=f.optout==="optional";for(let T in t){if(p.has(T))continue;if(g==="never"){c.push(T);continue}let _=f.run({value:t[T],issues:[]},n);_ instanceof Promise?e.push(_.then(u=>Rt(u,r,T,t,x))):Rt(_,r,T,t,x)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}i(uu,"handleCatchall");var Vn=b("$ZodObject",(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let p=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let f={...p};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=St(()=>su(t));K(e._zod,"propValues",()=>{let p=t.shape,f={};for(let g in p){let x=p[g]._zod;if(x.values){f[g]??(f[g]=new Set);for(let T of x.values)f[g].add(T)}}return f});let o=Xe,s=t.catchall,c;e._zod.parse=(p,f)=>{c??(c=n.value);let g=p.value;if(!o(g))return p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p;p.value={};let x=[],T=c.shape;for(let _ of c.keys){let u=T[_],d=u._zod.optout==="optional",y=u._zod.run({value:g[_],issues:[]},f);y instanceof Promise?x.push(y.then(m=>Rt(m,p,_,g,d))):Rt(y,p,_,g,d)}return s?uu(x,g,p,f,n.value,e):x.length?Promise.all(x).then(()=>p):p}});function Rn(e,t,r,n){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let o=e.filter(s=>!De(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(c=>be(c,n,ge())))}),t)}i(Rn,"handleUnionResults");var gr=b("$ZodUnion",(e,t)=>{W.init(e,t),K(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),K(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),K(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),K(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>At(s.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(r)return n(o,s);let c=!1,p=[];for(let f of t.options){let g=f._zod.run({value:o.value,issues:[]},s);if(g instanceof Promise)p.push(g),c=!0;else{if(g.issues.length===0)return g;p.push(g)}}return c?Promise.all(p).then(f=>Rn(f,o,e,s)):Rn(p,o,e,s)}});var Hn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gr.init(e,t);let r=e._zod.parse;K(e._zod,"propValues",()=>{let o={};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[p,f]of Object.entries(c)){o[p]||(o[p]=new Set);for(let g of f)o[p].add(g)}}return o});let n=St(()=>{let o=t.options,s=new Map;for(let c of o){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(s.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);s.set(f,c)}}return s});e._zod.parse=(o,s)=>{let c=o.value;if(!Xe(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),o;let p=n.value.get(c?.[t.discriminator]);return p?p._zod.run(o,s):t.unionFallback?r(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),o)}});var Wn=b("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!xn(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let s=[],c=t.keyType._zod.values;if(c){r.value={};let p=new Set;for(let g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){p.add(typeof g=="number"?g.toString():g);let x=t.valueType._zod.run({value:o[g],issues:[]},n);x instanceof Promise?s.push(x.then(T=>{T.issues.length&&r.issues.push(...Pe(g,T.issues)),r.value[g]=T.value})):(x.issues.length&&r.issues.push(...Pe(g,x.issues)),r.value[g]=x.value)}let f;for(let g in o)p.has(g)||(f=f??[],f.push(g));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:f})}else{r.value={};for(let p of Reflect.ownKeys(o)){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"&&pr.test(p)&&f.issues.length){let T=t.keyType._zod.run({value:Number(p),issues:[]},n);if(T instanceof Promise)throw new Error("Async schemas not supported in object keys currently");T.issues.length===0&&(f=T)}if(f.issues.length){t.mode==="loose"?r.value[p]=o[p]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(T=>be(T,n,ge())),input:p,path:[p],inst:e});continue}let x=t.valueType._zod.run({value:o[p],issues:[]},n);x instanceof Promise?s.push(x.then(T=>{T.issues.length&&r.issues.push(...Pe(p,T.issues)),r.value[f.value]=T.value})):(x.issues.length&&r.issues.push(...Pe(p,x.issues)),r.value[f.value]=x.value)}}return s.length?Promise.all(s).then(()=>r):r}});var Gn=b("$ZodEnum",(e,t)=>{W.init(e,t);let r=ur(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>_n.has(typeof o)).map(o=>typeof o=="string"?Ne(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{let c=o.value;return n.has(c)||o.issues.push({code:"invalid_value",values:r,input:c,inst:e}),o}}),qn=b("$ZodLiteral",(e,t)=>{if(W.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"?Ne(n):n?Ne(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}});var Jn=b("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new $t(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(r.value=c,r));if(o instanceof Promise)throw new pe;return r.value=o,r}});function Nn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(Nn,"handleOptionalResult");var Kn=b("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",K(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${At(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>Nn(s,r.value)):Nn(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Xn=b("$ZodNullable",(e,t)=>{W.init(e,t),K(e._zod,"optin",()=>t.innerType._zod.optin),K(e._zod,"optout",()=>t.innerType._zod.optout),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${At(r.source)}|null)$`):void 0}),K(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 Yn=b("$ZodPipe",(e,t)=>{W.init(e,t),K(e._zod,"values",()=>t.in._zod.values),K(e._zod,"optin",()=>t.in._zod.optin),K(e._zod,"optout",()=>t.out._zod.optout),K(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=>Ot(c,t.in,n)):Ot(s,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>Ot(s,t.out,n)):Ot(o,t.out,n)}});function Ot(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(Ot,"handlePipeResult");var Qn=b("$ZodCustom",(e,t)=>{Ce.init(e,t),W.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>Dn(s,r,n,e));Dn(o,r,n,e)}});function Dn(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(lr(o))}}i(Dn,"handleRefineResult");var to,du=Symbol("ZodOutput"),mu=Symbol("ZodInput"),yr=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function ro(){return new yr}i(ro,"registry");(to=globalThis).__zod_globalRegistry??(to.__zod_globalRegistry=ro());var hr=globalThis.__zod_globalRegistry;function no(e,t){return new e({type:"string",...H(t)})}i(no,"_string");function oo(e,t){return new e({type:"string",coerce:!0,...H(t)})}i(oo,"_coercedString");function io(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}i(io,"_url");function ao(e,t){return new e({type:"number",checks:[],...H(t)})}i(ao,"_number");function so(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}i(so,"_coercedNumber");function uo(e,t){return new e({type:"boolean",...H(t)})}i(uo,"_boolean");function co(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}i(co,"_coercedBoolean");function lo(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}i(lo,"_coercedBigint");function po(e){return new e({type:"any"})}i(po,"_any");function mo(e){return new e({type:"unknown"})}i(mo,"_unknown");function fo(e,t){return new e({type:"void",...H(t)})}i(fo,"_void");function go(e,t){return new e({type:"date",coerce:!0,...H(t)})}i(go,"_coercedDate");function ue(e,t){return new An({check:"min_length",...H(t),minimum:e})}i(ue,"_minLength");function Ie(e,t){return new zn({check:"string_format",format:"regex",...H(t),pattern:e})}i(Ie,"_regex");function yo(e,t,r){let n=H(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(yo,"_custom");var X=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>kt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(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)}),Ct=b("ZodMiniString",(e,t)=>{Nt.init(e,t),X.init(e,t)});function a(e){return no(Ct,e)}i(a,"string");var ho=b("ZodMiniStringFormat",(e,t)=>{mr.init(e,t),Ct.init(e,t)});var Iu=b("ZodMiniURL",(e,t)=>{Cn.init(e,t),ho.init(e,t)});function vo(e){return io(Iu,e)}i(vo,"url");var vr=b("ZodMiniNumber",(e,t)=>{Un.init(e,t),X.init(e,t)});function Q(e){return ao(vr,e)}i(Q,"number");var xr=b("ZodMiniBoolean",(e,t)=>{fr.init(e,t),X.init(e,t)});function B(e){return uo(xr,e)}i(B,"boolean");var xo=b("ZodMiniBigInt",(e,t)=>{Mn.init(e,t),X.init(e,t)});var Tu=b("ZodMiniAny",(e,t)=>{jn.init(e,t),X.init(e,t)});function rt(){return po(Tu)}i(rt,"any");var $u=b("ZodMiniUnknown",(e,t)=>{Ln.init(e,t),X.init(e,t)});function w(){return mo($u)}i(w,"unknown");var Eu=b("ZodMiniVoid",(e,t)=>{Fn.init(e,t),X.init(e,t)});function _o(e){return fo(Eu,e)}i(_o,"_void");var Po=b("ZodMiniDate",(e,t)=>{Bn.init(e,t),X.init(e,t)});var Su=b("ZodMiniArray",(e,t)=>{Zn.init(e,t),X.init(e,t)});function R(e,t){return new Su({type:"array",element:e,...H(t)})}i(R,"array");var Au=b("ZodMiniObject",(e,t)=>{Vn.init(e,t),X.init(e,t),K(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...H(t)};return new Au(r)}i(l,"object");var zu=b("ZodMiniUnion",(e,t)=>{gr.init(e,t),X.init(e,t)});function N(e,t){return new zu({type:"union",options:e,...H(t)})}i(N,"union");var wu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Hn.init(e,t),X.init(e,t)});function Ue(e,t,r){return new wu({type:"union",options:t,discriminator:e,...H(r)})}i(Ue,"discriminatedUnion");var ku=b("ZodMiniRecord",(e,t)=>{Wn.init(e,t),X.init(e,t)});function k(e,t,r){return new ku({type:"record",keyType:e,valueType:t,...H(r)})}i(k,"record");var Ou=b("ZodMiniEnum",(e,t)=>{Gn.init(e,t),X.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 Ou({type:"enum",entries:r,...H(t)})}i(C,"_enum");var Ru=b("ZodMiniLiteral",(e,t)=>{qn.init(e,t),X.init(e,t)});function E(e,t){return new Ru({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}i(E,"literal");var Nu=b("ZodMiniTransform",(e,t)=>{Jn.init(e,t),X.init(e,t)});function Te(e){return new Nu({type:"transform",transform:e})}i(Te,"transform");var Du=b("ZodMiniOptional",(e,t)=>{Kn.init(e,t),X.init(e,t)});function h(e){return new Du({type:"optional",innerType:e})}i(h,"optional");var Cu=b("ZodMiniNullable",(e,t)=>{Xn.init(e,t),X.init(e,t)});function nt(e){return new Cu({type:"nullable",innerType:e})}i(nt,"nullable");var Uu=b("ZodMiniPipe",(e,t)=>{Yn.init(e,t),X.init(e,t)});function $e(e,t){return new Uu({type:"pipe",in:e,out:t})}i($e,"pipe");var Mu=b("ZodMiniCustom",(e,t)=>{Qn.init(e,t),X.init(e,t)});function Ut(e,t){return yo(Mu,e??(()=>!0),t)}i(Ut,"custom");var ot={};fn(ot,{bigint:()=>Hu,boolean:()=>Vu,date:()=>Wu,number:()=>Zu,string:()=>Bu});function Bu(e){return oo(Ct,e)}i(Bu,"string");function Zu(e){return so(vr,e)}i(Zu,"number");function Vu(e){return co(xr,e)}i(Vu,"boolean");function Hu(e){return lo(xo,e)}i(Hu,"bigint");function Wu(e){return go(Po,e)}i(Wu,"date");var Pr=l({retryOnFailure:l({defaultValue:h(B()),hide:h(B())}),continueOnFailure:l({defaultValue:h(B()),hide:h(B())})}),_r=class{constructor(t,r,n,o,s,c,p,f,g,x,T){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=s;this.test=c;this.requireAuth=p;this.errorHandlingOptions=f;this.outputSchema=g;this.audience=x;this.aiMetadata=T}static{i(this,"IAction")}},ie=i(e=>new _r(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 F=l({displayName:a(),description:h(a())}),D=i((e,t)=>l({type:E(t),required:B(),defaultValue:h(rt())}),"TPropertyValue");var ne=l({...F.shape,...D(a(),"SHORT_TEXT").shape}),ye=l({...F.shape,...D(a(),"LONG_TEXT").shape});var Io=l({label:a(),value:w()}),Mt=l({disabled:h(B()),placeholder:h(a()),options:R(Io)});var oe=l({...F.shape,options:Mt,...D(w(),"STATIC_DROPDOWN").shape}),he=l({...F.shape,options:Mt,...D(R(w()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var br=l({...F.shape,...D(w(),"DROPDOWN").shape,refreshers:R(a())}),it=l({...F.shape,...D(R(w()),"MULTI_SELECT_DROPDOWN").shape,refreshers:R(a())});var ve=l({...F.shape,...D(B(),"CHECKBOX").shape});var xe=l({...F.shape,...D(Q(),"NUMBER").shape});var at=l({...F.shape,...D(w(),"FILE").shape});var st=l({...F.shape,...D(a(),"DATE_TIME").shape});var To=k(a(),N([ne,ye,oe,it,he,ve,xe,at,st])),ut=l({...F.shape,properties:To,...D(R(w()),"ARRAY").shape});var ct=l({...F.shape,...D(N([k(a(),w())]),"JSON").shape});var $o=N([ne,oe,ct,ut,he]),qu=k(a(),$o),Ir=l({refreshers:R(a()),...F.shape,...D(w(),"DYNAMIC").shape});var jt=l({...F.shape,...D(_o(),"MARKDOWN").shape});var lt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(lt||{}),Me=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Me||{}),pt=(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))(pt||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),Tr="both_client_credentials_and_authorization_code";var de=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(de||{}),mt=(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))(mt||{}),Ju=l({strategy:C(mt),paramName:h(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Lt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lt||{}),Eo=l({status:h(Q()),body:h(w()),headers:h(k(a(),a()))}),So=l({type:E("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(C(Lt))}),Ao=l({type:E("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Eo,handlerId:h(a()),streamStepProgress:h(C(Lt))}),Ku=N([So,Ao]);var Xu=l({body:w(),rawBody:h(w()),headers:k(a(),a()),queryParams:k(a(),a())});function ce(e){return e==null}i(ce,"isNil");function gt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}i(gt,"isEmpty");function Ft(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(Ft,"assertNotNullOrUndefined");var $r=Re(require("crypto"),1);var Yu=128,ze,je,Qu=i(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*Yu),$r.default.randomFillSync(ze),je=0):je+e>ze.length&&($r.default.randomFillSync(ze),je=0),je+=e},"fillPool"),ec=i(e=>(Qu(e|=0),ze.subarray(je-e,je)),"random"),tc=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(s=t)=>{let c="";for(;;){let p=r(o),f=o;for(;f--;)if(c+=e[p[f]&n]||"",c.length===s)return c}}},"customRandom"),wo=i((e,t=21)=>tc(e,t,ec),"customAlphabet");var rc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,ob=a().check(Ie(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),nc=wo(rc,ko);var Ee=$e(Te(e=>e instanceof Date?e.toISOString():e),a()),ae={id:a(),created:Ee,updated:Ee},V=i(e=>h(nt(e)),"Nullable");function Er(e){return h(nt(C(e)))}i(Er,"NullableEnum");var sb=$e(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Bt=i(e=>$e(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(R(e))),"OptionalArrayFromQuery");var lb=k(a(),w());var yt=(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))(yt||{});var bb=a().check(Ie(/^#[0-9A-Fa-f]{6}$/));var Tb=l({filename:a(),data:w(),type:E("file"),mimetype:h(a())});var oc=Re(Ro());var kb=l({...ae,name:a(),permissions:R(a()),platformId:V(a()),type:a(),userCount:h(Q())});var No=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(No||{}),Sr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Sr||{}),Ar=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ar||{});var zr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(zr||{});var wr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(wr||{});var ic=l({mode:C(No),value:w()}),ac=l({auth:h(a()),fields:k(a(),ic)}),sc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(ac)}),uc=l({type:E("PIECE"),toolName:a().check(ue(1)),pieceMetadata:sc}),cc=l({type:E("none")}),lc=l({type:E("access_token"),accessToken:a()}),pc=l({type:E("api_key"),apiKey:a(),apiKeyHeader:a()}),dc=l({type:E("headers"),headers:k(a(),a())}),mc=Ue("type",[cc,lc,pc,dc]),Do=l({type:E("FLOW"),toolName:a().check(ue(1)),externalFlowId:a(),flowDisplayName:h(a())}),Co=l({type:E("MCP"),toolName:a().check(ue(1)),serverUrl:vo(),protocol:C(Ar),auth:mc}),Uo=l({type:E("KNOWLEDGE_BASE"),toolName:a().check(ue(1)),sourceType:C(Sr),sourceId:a(),sourceName:a()}),fc=Ue("type",[uc,Do,Co,Uo]),gc=l({displayName:a(),description:h(a()),type:C(zr)}),Mo=l({type:E("MARKDOWN"),markdown:a()}),Le={type:E("TOOL_CALL"),input:V(k(a(),w())),output:h(w()),toolName:a(),status:C(wr),toolCallId:a(),startTime:a(),endTime:h(a())},oI=l(Le),jo=Ue("toolCallType",[l({...Le,toolCallType:E("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...Le,toolCallType:E("FLOW"),displayName:a(),externalFlowId:a()}),l({...Le,toolCallType:E("MCP"),displayName:a(),serverUrl:a()}),l({...Le,toolCallType:E("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...Le,toolCallType:E("UNKNOWN"),displayName:a()})]),yc=N([Mo,jo]);var kr=(r=>(r.IMAGE="image",r.TEXT="text",r))(kr||{}),_e=l({apiKey:a()}),hc=_e,vc=l({apiKey:a(),apiKeyHash:a()}),xc=_e,_c=_e,Pc=_e,bc=_e,Ic=_e,Tc=_e,$c=_e,Lo=l({accessKeyId:a().check(ue(1)),secretAccessKey:a().check(ue(1))}),Ec=l({}),Sc=l({}),Ac=l({}),zc=l({}),wc=l({}),kc=l({}),Fo=l({modelId:a(),modelName:a(),modelType:C(kr)}),Bo=l({apiKeyHeader:a(),baseUrl:a(),models:R(Fo),defaultHeaders:h(k(a(),a()))}),Zo=l({accountId:a(),gatewayId:a(),models:R(Fo),vertexProject:h(a()),vertexRegion:h(a())}),Vo=l({resourceName:a(),apiVersion:$e(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Ho=l({region:a().check(ue(1))}),Oc=N([hc,Pc,bc,Ic,Tc,_c,xc,vc,Lo,$c]),Wo=N([Bo,Zo,Vo,Ho,Ec,Ac,zc,wc,Sc,kc]),Rc=l({id:a(),name:a(),type:C(kr)}),Nc=l({id:a(),name:a(),provider:C(yt),config:Wo,enabledForChat:B()}),Dc=l({provider:C(yt),config:Wo,auth:Oc,platformId:a()});var uI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Cc=l({base64Url:a(),fileName:a(),extension:h(a())}),Uc=l({mimeType:a(),url:a(),fileName:h(a())}),Or=N([Cc,Uc]);var Mc=N([l({type:E("file"),value:Or}),l({type:E("markdown"),value:a(),files:h(R(Or))})]),jc=l({sessionId:a(),message:a(),files:h(R(a()))});var qo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(qo||{}),Jo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Jo||{}),Rr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Rr||{});var Lc=N([l({...ae,name:a(),externalId:a(),type:E("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:R(l({value:a()}))})}),l({...ae,name:a(),externalId:a(),type:N([E("TEXT"),E("NUMBER"),E("DATE")]),tableId:a(),projectId:a()})]),Fc=l({...ae,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Er(Jo),trigger:Er(qo)}),Bc=l({...ae,tableId:a(),projectId:a(),cells:k(a(),l({updated:a(),created:a(),value:w(),fieldName:a()}))}),Zc=l({events:R(C(Rr)),webhookUrl:a(),flowId:a()}),Vc=l({fields:R(l({id:a(),name:a()})),rows:R(k(a(),a())),name:a()}),Hc=l({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:Bt(a()),folderId:h(a()),folderIds:Bt(a())}),Wc=l({records:R(R(l({fieldId:a(),value:Xo()}))),tableId:a()}),Gc=l({cells:h(R(l({fieldId:a(),value:Xo()}))),tableId:a(),agentUpdate:h(B())}),Ko=Ue("operator",[we("eq"),we("neq"),we("gt"),we("gte"),we("lt"),we("lte"),we("co"),Go("exists"),Go("not_exists")]),qc=l({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:Bt(Ko)});function Xo(){return $e(Te(e=>e==null?e:String(e)),nt(a()))}i(Xo,"coerceToString");function we(e){return l({fieldId:a(),operator:E(e),value:a()})}i(we,"valueFilter");function Go(e){return l({fieldId:a(),operator:E(e)})}i(Go,"existenceFilter");var Jc=l({status:h(Q()),body:h(w()),headers:h(k(a(),a()))}),Kc=l({...ae,deleted:V(Ee),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var Yo=l({name:a(),description:h(a()),type:a(),required:B()}),Xc=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:R(Yo),returnsResponse:B()})});var Qo="^[0-9]+\\.[0-9]+\\.[0-9]+$",SI=new RegExp(Qo),Qc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",AI=a().check(Ie(new RegExp(Qo))),zI=a().check(Ie(new RegExp(Qc))),el=l({packageType:E("ARCHIVE"),pieceType:C(Me),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ei=l({packageType:E("REGISTRY"),pieceType:E("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ti=l({packageType:E("REGISTRY"),pieceType:E("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),wI=N([ei,ti]),kI=N([el,ei,ti]),ri=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ri||{}),tl=l({type:C(ri),cronExpression:a(),timezone:a()}),OI=l({...ae,type:C(de),projectId:a(),flowId:a(),triggerName:a(),schedule:V(tl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),ni=(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))(ni||{}),oi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(oi||{}),ii=(r=>(r.S3="S3",r.DB="DB",r))(ii||{}),RI=l({...ae,projectId:V(a()),platformId:V(a()),type:C(ni),compression:C(oi),data:h(w()),location:C(ii),size:V(Q()),fileName:V(a()),s3Key:V(a()),metadata:V(k(a(),a()))}),ai=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ai||{}),si=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(si||{}),NI=l({id:a(),email:a(),firstName:a(),status:C(si),externalId:V(a()),platformId:V(a()),platformRole:C(ai),lastName:a(),created:Ee,updated:Ee,lastActiveDate:V(Ee),imageUrl:V(a())});var Nr=l({...F.shape,...D(k(a(),w()),"OBJECT").shape});var pi=l({...F.shape,...D(a(),"COLOR").shape});var Dr=N([ne,ye,jt,ve,oe,he,br,it,Ir,xe,ut,Nr,ct,st,at,pi]),U={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var me=l({displayName:a(),description:h(a())});var di=l({username:a(),password:a()}),Cr=l({...me.shape,username:l({displayName:a(),description:h(a())}),password:l({displayName:a(),description:h(a())}),...D(di,"BASIC_AUTH").shape});var il=k(a(),N([ne,ye,xe,ve,oe])),Ur=l({...me.shape,props:il,...D(w(),"CUSTOM_AUTH").shape});var ke=l({...me.shape,...D(l({auth:a()}),"SECRET_TEXT").shape});var al=k(a(),N([ne,ye,ke,xe,ve,oe,he,jt])),mi=l({...me.shape,props:al,...D(w(),"OIDC").shape});var Mr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Mr||{}),fi=N([ne,ke,oe]),gi=k(a(),fi),sl=l({props:h(k(a(),fi)),authUrl:a(),tokenUrl:a(),scope:R(a()),prompt:h(N([E("none"),E("consent"),E("login"),E("omit")])),pkce:h(B()),pkceMethod:h(N([E("plain"),E("S256")])),authorizationMethod:h(C(Mr)),grantType:h(N([C(dt),E(Tr)])),extra:h(k(a(),a()))}),yi=l({access_token:a(),props:h(gi),data:k(a(),rt())}),jr=l({...me.shape,...sl.shape,...D(yi,"OAUTH2").shape});var Fe=N([Cr,Ur,mi,jr,ke]),ht="Connection",vt={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||ht}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||ht,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||ht}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||ht}},None(){}};var d$={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 ul=l({...F.shape,...D(w(),"CUSTOM").shape,code:a()});var cl=N([Dr,Fe]),Lr=k(a(),cl),O$=k(a(),Dr);var hi=N([l({strategy:E("CRON"),cronExpression:a()}),l({strategy:E("NONE")})]),Be=class{constructor(t,r,n,o,s,c,p,f,g,x,T,_,u,d,y,m,v,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=s;this.type=c;this.handshakeConfiguration=p;this.onHandshake=f;this.renewConfiguration=g;this.onRenew=x;this.onEnable=T;this.onDisable=_;this.onStart=u;this.run=d;this.test=y;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=j}static{i(this,"ITrigger")}},Ze=i(e=>{switch(e.type){case"WEBHOOK":return new Be(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 Be(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 Be(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 Be(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,ce(e.sampleData)&&ce(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var vi="2",Vt="0.82.0";var Fr=class{constructor(t,r,n,o,s,c,p,f,g=Vt,x,T=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=p;this.auth=f;this.minimumSupportedRelease=g;this.maximumSupportedRelease=x;this.description=T;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:vi}),"getContextInfo");(!ll(g)||pl(g,Vt))&&(this.minimumSupportedRelease=Vt),s.forEach(_=>this._actions[_.name]=_),c.forEach(_=>this._triggers[_.name]=_)}static{i(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},xi=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new Fr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function ll(e){return/^\d+\.\d+\.\d+$/.test(e)}i(ll,"isValidSimpleSemver");function pl(e,t){let[r,n,o]=e.split(".").map(Number),[s,c,p]=t.split(".").map(Number);return r!==s?r<s:n!==c?n<c:o<p}i(pl,"isSemverLessThan");var dl=h(k(a(),k(a(),a()))),_i=l({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:R(a()),platformId:h(a()),directoryPath:h(a()),auth:h(N([Fe,R(Fe)])),version:a(),categories:h(R(C(pt))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:dl}),ml=C(["human","ai","both"]),Pi=l({description:h(a()),idempotent:h(B())}),bi=l({name:a(),displayName:a(),description:a(),props:Lr,requireAuth:B(),errorHandlingOptions:h(Pr),outputSchema:h(Ut()),audience:h(ml),aiMetadata:h(Pi)}),Ii=l({name:a(),displayName:a(),description:a(),props:Lr,errorHandlingOptions:h(Pr),type:C(de),sampleData:w(),handshakeConfiguration:h(Ut()),renewConfiguration:h(hi),testStrategy:C(ft),outputSchema:h(Ut()),aiMetadata:h(Pi)}),fl=l({..._i.shape,actions:k(a(),bi),triggers:k(a(),Ii)}),gl=l({..._i.shape,actions:Q(),triggers:Q(),suggestedActions:h(R(Ii)),suggestedTriggers:h(R(bi))}),Ti=l({projectUsage:Q(),tags:h(R(a())),pieceType:C(Me),packageType:C(lt),platformId:h(a()),archiveId:h(a())}),OE=l({...fl.shape,...Ti.shape}),RE=l({...gl.shape,...Ti.shape}),NE=l({name:a(),version:a()});var yl=Re(require("path")),hl=Re(require("fs/promises"));var Ht=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((s,c)=>{o.append(c,s)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Wt=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Br,r=new Zr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Br=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Zr=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var Gt=class extends Error{constructor(r,n){let o=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:s},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=s}static{i(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var qt=class extends Ht{static{i(this,"FetchHttpClient")}constructor(t="",r=new Wt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),s=this.getHeaders(t),c=t.queryParams??{};for(let[j,re]of Object.entries(c))o.append(j,re);let p=o.toString(),f=p?`${n}?${p}`:n,g=t.responseType??"json",x=t.followRedirects??!0,T=t.retries??0,{body:_,extraHeaders:u,isStream:d}=vl(t.body,s),y=_l({...s,...u}),m=await xl(async()=>{let j=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let se={method:t.method.toString(),headers:y,body:_,redirect:x?"follow":"manual",signal:j.signal};return d&&(se.duplex="half"),r?.dispatcher!==void 0&&(se.dispatcher=r.dispatcher),await fetch(f,se)}finally{re!==void 0&&clearTimeout(re)}},T),v=x?300:400;if(m.status<200||m.status>=v){let j=await $i(m,g),re=new Gt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let P=await $i(m,g);return{status:m.status,headers:Pl(m.headers),body:P}}};function vl(e,t){return Il(e)?{body:void 0,extraHeaders:{},isStream:!1}:bl(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(vl,"serializeBody");async function $i(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i($i,"parseResponseBody");async function xl(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Ei(n);continue}return o}catch(o){if(r=o,n<t){await Ei(n);continue}throw o}throw r}i(xl,"sendWithRetries");function Ei(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Ei,"backoff");function _l(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}i(_l,"normalizeHeaders");function Pl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(Pl,"toHttpHeaders");function bl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i(bl,"isNodeFormData");function Il(e){return e==null}i(Il,"isNil");var xt=new qt;var _t=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(_t||{});var ld=Re(require("fs")),Os=Re(ks());var pd={"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 dd(e){let t=e.split(";")[0].trim().toLowerCase();return pd[t]??""}i(dd,"contentTypeToExtension");var md=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),fd=i((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Rs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:s,props:c,extraProps:p,authLocation:f="headers"}){return ie({audience:"human",name:s||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:U.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:g})=>({url:U.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${fd(t,g)}/resource or /resource`,required:!0,defaultValue:g?t(g):"",...c?.url??{}})}),"props")}),method:U.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(_t).map(g=>({label:g,value:g}))},...c?.method??{}}),headers:U.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:U.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:U.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:U.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:g})=>{if(!g)return{};let x=g,T={};switch(x){case"none":break;case"json":T.data=U.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":T.data=U.LongText({displayName:"Raw Body",required:!0});break;case"form_data":T.data=U.Array({displayName:"Form Data",required:!0,properties:{fieldName:U.ShortText({displayName:"Field Name",required:!0}),fieldType:U.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:U.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:U.File({displayName:"File Field Value",required:!1})}});break}return T},"props")}),response_is_binary:U.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:U.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:U.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:U.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...p},run:i(async g=>{let{method:x,url:T,headers:_,queryParams:u,body:d,body_type:y,failsafe:m,timeout:v,response_is_binary:P,followRedirects:j}=g.propsValue;Ft(x,"Method"),Ft(T,"URL");let re=ce(r)?{}:await r(g.auth,g.propsValue),se=T.url,Je=se.startsWith("http://")||se.startsWith("https://")?se:md({baseUrl:t(g.auth),relativePath:se}),Ae={method:x,url:Je,headers:{..._??{},...f==="headers"||!ce(f)?re:{}},queryParams:{...f==="queryParams"?re:{},...u??{}},timeout:v?v*1e3:0,followRedirects:j};if(P&&(Ae.responseType="arraybuffer"),d)if(y&&y!=="none"){let fe=d.data;if(y==="form_data"){let Zs=fe,Tt=new Os.default;for(let{fieldName:pn,fieldType:dn,textFieldValue:mn,fileFieldValue:ir}of Zs)dn==="text"&&!gt(mn)?Tt.append(pn,mn):dn==="file"&&!gt(ir)&&Tt.append(pn,ir.data,{filename:ir?.filename});Ae.body=Tt,Ae.headers={...Ae.headers,...Tt.getHeaders()}}else Ae.body=fe}else y||(Ae.body=d);try{let fe=await xt.sendRequest(Ae);return await gd(g.files,fe.body,fe.status,fe.headers,P)}catch(fe){if(m)return fe.errorMessage();throw fe}},"run")})}i(Rs,"createCustomApiCallAction");var gd=i(async(e,t,r,n,o)=>{let s;if(o&&yd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],p=dd(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.${p}`,data:f})}else s=t;return{status:r,headers:n,body:s}},"handleBinaryResponse"),yd=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var or=null,Ns=0;async function hd(e){if(or&&Date.now()<Ns)return or;let t=await xt.sendRequest({method:"POST",url:"https://api.sendpulse.com/oauth/access_token",headers:{"Content-Type":"application/json"},body:{grant_type:"client_credentials",client_id:e.clientId,client_secret:e.clientSecret}});return or=t.body.access_token,Ns=Date.now()+t.body.expires_in*1e3-30*1e3,or}i(hd,"getAccessToken");async function Z({method:e,resourceUri:t,query:r,body:n,auth:o}){let s=await hd(o),c={};if(r)for(let[f,g]of Object.entries(r))g!=null&&(c[f]=String(g));let p={method:e,url:`https://api.sendpulse.com${t}`,headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},queryParams:c,body:n};try{return(await xt.sendRequest(p)).body}catch(f){let g=f.response?.status,x=f.response?.data?.message||f.message||"Unknown error";throw new Error(`SendPulse API Error (${g||"Unknown"}): ${x}`)}}i(Z,"sendpulseApiCall");var J=vt.CustomAuth({description:"Enter your SendPulse client credentials",props:{clientId:vt.SecretText({displayName:"Client ID",required:!0}),clientSecret:vt.SecretText({displayName:"Client Secret",required:!0})},validate:i(async({auth:e})=>{try{return await Z({method:"GET",resourceUri:"/addressbooks",auth:e}),{valid:!0}}catch{return{valid:!1,error:"Invalid Client ID or Client Secret"}}},"validate"),required:!0});var te=U.Dropdown({auth:J,displayName:"Mailing List",description:"Select one of your SendPulse mailing lists",required:!0,refreshers:[],options:i(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your SendPulse account."};let t=e.props;try{let r=await Z({auth:e.props,method:"GET",resourceUri:"/addressbooks?limit=100&offset=0"});return r.length?{disabled:!1,options:r.map(n=>({label:`${n.name} (${n.status_explain})`,value:n.id}))}:{disabled:!0,options:[],placeholder:"No mailing lists found in your account."}}catch(r){return{disabled:!0,options:[],placeholder:`Failed to load mailing lists: ${r.message}`}}},"options")});var Ds=Ze({auth:J,name:"new_subscriber",displayName:"New Subscriber",description:"Fires when new subscriber is added",aiMetadata:{description:"Fires when a new email contact is added to the selected SendPulse mailing list (address book), via any source such as a subscription form or import. Each event represents one newly added subscriber and includes their email, source, and variables."},type:"WEBHOOK",props:{mailingListId:te},async onEnable(e){let{mailingListId:t}=e.propsValue;try{let r=await Z({method:"POST",auth:e.auth.props,resourceUri:"/v2/email-service/webhook",body:{url:e.webhookUrl,actions:["new_emails"]}});if(r.success&&r.data?.length>0){let n=r.data.find(o=>o.action==="new_emails");n&&(await e.store.put("webhook_id",n.id),await e.store.put("mailing_list_id",t))}else throw new Error("Failed to create webhook")}catch(r){throw new Error(`Failed to enable new subscriber trigger: ${r.message}`)}},async onDisable(e){try{let t=await e.store.get("webhook_id");t&&(await Z({method:"DELETE",auth:e.auth.props,resourceUri:`/v2/email-service/webhook/${t}`}),await e.store.delete("webhook_id"),await e.store.delete("mailing_list_id"))}catch(t){console.warn("Failed to delete webhook during disable:",t)}},async run(e){let t=await e.store.get("mailing_list_id"),r=e.payload.body,n=Array.isArray(r)?r:[r],o=[];for(let s of n)s.event==="new_emails"&&s.book_id===t&&o.push({id:`${s.email}_${s.timestamp}`,email:s.email,mailingListId:s.book_id,source:s.source,variables:s.variables||{},addedAt:new Date(parseInt(s.timestamp)*1e3).toISOString(),timestamp:s.timestamp});return o},async test(){return[{id:"demo@example.com_1496827625",email:"demo@example.com",mailingListId:"123456",source:"address book",variables:{},addedAt:new Date().toISOString(),timestamp:"1496827625"}]},sampleData:{id:"subscriber@example.com_1496827625",email:"subscriber@example.com",mailingListId:"123456",source:"subscription form",variables:{name:"John Doe"},addedAt:"2023-06-01T12:00:00.000Z",timestamp:"1496827625"}});var Cs=Ze({auth:J,name:"new_unsubscriber",displayName:"New Unsubscriber",description:"Fires when subscriber unsubscribes",aiMetadata:{description:"Fires when a contact unsubscribes from the selected SendPulse mailing list (address book). Each event represents one unsubscribe and includes the email, the reason if provided, and whether they opted out of all lists."},type:"WEBHOOK",props:{mailingListId:te},async onEnable(e){let{mailingListId:t}=e.propsValue;try{let r=await Z({method:"POST",auth:e.auth.props,resourceUri:"/v2/email-service/webhook",body:{url:e.webhookUrl,actions:["unsubscribe"]}});if(r.success&&r.data?.length>0){let n=r.data.find(o=>o.action==="unsubscribe");n&&(await e.store.put("webhook_id",n.id),await e.store.put("mailing_list_id",t))}else throw new Error("Failed to create webhook")}catch(r){throw new Error(`Failed to enable unsubscriber trigger: ${r.message}`)}},async onDisable(e){try{let t=await e.store.get("webhook_id");t&&(await Z({method:"DELETE",auth:e.auth.props,resourceUri:`/v2/email-service/webhook/${t}`}),await e.store.delete("webhook_id"),await e.store.delete("mailing_list_id"))}catch(t){console.warn("Failed to delete webhook during disable:",t)}},async run(e){let t=await e.store.get("mailing_list_id"),r=e.payload.body,n=Array.isArray(r)?r:[r],o=[];for(let s of n)s.event==="unsubscribe"&&s.book_id===t&&o.push({id:`${s.email}_${s.timestamp}`,email:s.email,mailingListId:s.book_id,taskId:s.task_id,fromAll:s.from_all==="1",reason:s.reason||"No reason provided",categories:s.categories||"",unsubscribedAt:new Date(parseInt(s.timestamp)*1e3).toISOString(),timestamp:s.timestamp});return o},async test(){return[{id:"test-unsubscribe@example.com_1496827872",email:"test-unsubscribe@example.com",mailingListId:"123456",taskId:"3668141",fromAll:!0,reason:"User clicked unsubscribe link",categories:"",unsubscribedAt:new Date().toISOString(),timestamp:"1496827872"}]},sampleData:{id:"unsub@example.com_1496827872",email:"unsub@example.com",mailingListId:"123456",taskId:"3668141",fromAll:!1,reason:"Manual unsubscribe",categories:"newsletter",unsubscribedAt:"2023-06-01T12:30:00.000Z",timestamp:"1496827872"}});function vd(e,t){let r={},n=new Set([...Object.keys(e),...Object.keys(t)]);for(let o of n)JSON.stringify(e[o])!==JSON.stringify(t[o])&&(r[o]={from:e[o],to:t[o]});return r}i(vd,"detectChanges");var Us=Ze({auth:J,name:"updated_subscriber",displayName:"Updated Subscriber",description:"Fires when subscriber details change (polling)",aiMetadata:{description:"Polls the selected SendPulse mailing list (address book) and fires when an existing subscriber's details or variables change between checks. Each event represents one changed contact and includes the previous data, current data, and a diff of the changed fields."},type:"POLLING",props:{mailingListId:te},async onEnable(e){await e.store.put("mailing_list_id",String(e.propsValue.mailingListId)),await e.store.put("last_check",Date.now().toString())},async onDisable(e){await e.store.delete("mailing_list_id"),await e.store.delete("last_check"),await e.store.delete("subscribers_cache")},async run(e){let t=await e.store.get("mailing_list_id");if(!t)return[];try{let r=await Z({method:"GET",auth:e.auth.props,resourceUri:`/addressbooks/${t}/emails`}),n=await e.store.get("subscribers_cache");if(!n)return await e.store.put("subscribers_cache",JSON.stringify(r)),[];let o=JSON.parse(n),s=[];for(let c of r){let p=o.find(f=>f.email===c.email);p&&JSON.stringify(c)!==JSON.stringify(p)&&s.push({id:`${c.email}_${Date.now()}`,email:c.email,mailingListId:t,previousData:p,currentData:c,updatedAt:new Date().toISOString(),changes:vd(p,c)})}return await e.store.put("subscribers_cache",JSON.stringify(r)),await e.store.put("last_check",Date.now().toString()),s}catch(r){return console.error("Error checking for subscriber updates:",r),[]}},async test(){return[{id:"test-updated@example.com_1234567890",email:"test-updated@example.com",mailingListId:"123456",previousData:{email:"test-updated@example.com",variables:{name:"Old Name"}},currentData:{email:"test-updated@example.com",variables:{name:"New Name"}},updatedAt:new Date().toISOString(),changes:{"variables.name":{from:"Old Name",to:"New Name"}}}]},sampleData:{id:"updated-user@example.com_1234567890",email:"updated-user@example.com",mailingListId:"123456",previousData:{email:"updated-user@example.com",variables:{phone:"+1234567890",name:"John"}},currentData:{email:"updated-user@example.com",variables:{phone:"+0987654321",name:"John Updated"}},updatedAt:"2023-06-01T12:30:00.000Z",changes:{"variables.phone":{from:"+1234567890",to:"+0987654321"},"variables.name":{from:"John",to:"John Updated"}}}});var Ms=ie({auth:J,name:"add-subscriber",displayName:"Add Subscriber",description:"Add subscriber to mailing list",audience:"both",aiMetadata:{description:"Adds an email contact to a specific SendPulse mailing list (address book), optionally attaching subscriber variables (e.g. name, phone) and numeric tag IDs. Use to enroll a new contact into a list; requires the target mailing list ID and a valid email. Not idempotent \u2014 each call re-submits the contact to the list.",idempotent:!1},props:{mailingListId:te,email:U.ShortText({displayName:"Email Address",description:"Subscriber email address",required:!0}),variables:U.Object({displayName:"Variables",description:"Optional subscriber variables (e.g., name, phone)",required:!1}),tags:U.Array({displayName:"Tag IDs",description:"Optional tag IDs to assign",required:!1})},async run(e){let{mailingListId:t,email:r,variables:n,tags:o}=e.propsValue;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))throw new Error(`Invalid email format: ${r}`);let c={email:r};n&&Object.keys(n).length>0&&(c.variables=n);let p={emails:[c]};if(o&&o.length>0){let f=o.map(g=>{let x=Number(g);if(isNaN(x))throw new Error(`Invalid tag ID: ${g}. Tag IDs must be numbers.`);return x});p.tags=f}try{if((await Z({method:"POST",auth:e.auth.props,resourceUri:`/addressbooks/${t}/emails`,body:p})).result===!0)return{success:!0,message:"Subscriber added successfully",email:r,variables:n||{},mailingListId:t,tags:p.tags||[]};throw new Error("SendPulse API returned failure")}catch(f){throw new Error(`Failed to add subscriber: ${f.message||"Unknown error"}`)}}});var xd=U.Dropdown({auth:J,displayName:"Variable Name",description:"Select variable to update",required:!0,refreshers:["mailingListId"],options:i(async({auth:e,mailingListId:t})=>{if(!e||!t)return{disabled:!0,options:[],placeholder:"Please select a mailing list first"};try{let r=await Z({auth:e,method:"GET",resourceUri:`/addressbooks/${t}/variables`});return r.length?{disabled:!1,options:r.filter(n=>n.name!=="email").map(n=>({label:`${n.name} (${n.type})`,value:n.name}))}:{disabled:!0,options:[],placeholder:"No variables found in this mailing list"}}catch(r){return{disabled:!0,options:[],placeholder:`Failed to load variables: ${r.message}`}}},"options")}),js=ie({auth:J,name:"change-variable-for-subscriber",displayName:"Change Variable for Subscriber",description:"Update subscriber variable",audience:"both",aiMetadata:{description:"Sets a single named variable (custom field) to a given value for one subscriber, identified by email, within a specific SendPulse mailing list. Use to overwrite a single field value; the variable must already exist on the list and its type (number/date) is validated against the value. Idempotent \u2014 repeating with the same value leaves the field unchanged.",idempotent:!0},props:{mailingListId:te,email:U.ShortText({displayName:"Email Address",description:"Subscriber email address",required:!0}),variableName:xd,variableValue:U.ShortText({displayName:"Variable Value",description:"New value for the variable",required:!0})},async run(e){let{mailingListId:t,email:r,variableName:n,variableValue:o}=e.propsValue;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))throw new Error(`Invalid email format: ${r}`);let c=null;try{let g=(await Z({auth:e.auth.props,method:"GET",resourceUri:`/addressbooks/${t}/variables`})).find(x=>x.name===n);g&&(c=g.type)}catch{}if(c){if(c==="number"&&isNaN(Number(o)))throw new Error(`Variable "${n}" expects a number, but got: ${o}`);if(c==="date"&&!/^\d{4}-\d{2}-\d{2}$/.test(o)&&!Date.parse(o))throw new Error(`Variable "${n}" expects a date format (YYYY-MM-DD), but got: ${o}`)}let p={email:r,variables:[{name:n,value:o}]};try{if((await Z({method:"POST",auth:e.auth.props,resourceUri:`/addressbooks/${t}/emails/variable`,body:p})).result)return{success:!0,message:`Variable "${n}" updated for ${r}`,email:r,variableName:n,variableValue:o,variableType:c};throw new Error("SendPulse API returned failure")}catch(f){throw new Error(`Failed to update variable: ${f.message||"Unknown error"}`)}}});var Ls=ie({auth:J,name:"delete-contact",displayName:"Delete Contact",description:"Permanently delete contact from all mailing lists",audience:"both",aiMetadata:{description:"Permanently removes a contact, identified by email, from every SendPulse mailing list (address book) in the account at once. Use to fully purge a contact rather than unsubscribe from a single list. Destructive but idempotent \u2014 once deleted, repeating the call leaves the contact absent.",idempotent:!0},props:{email:U.ShortText({displayName:"Email Address",description:"Email address to delete from all mailing lists",required:!0})},async run(e){let{email:t}=e.propsValue;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))throw new Error(`Invalid email format: ${t}`);try{if((await Z({method:"DELETE",auth:e.auth.props,resourceUri:`/emails/${encodeURIComponent(t)}`})).result)return{success:!0,message:`Contact ${t} deleted from all mailing lists`,email:t};throw new Error("SendPulse API returned failure")}catch(n){throw new Error(`Failed to delete contact: ${n.message||"Unknown error"}`)}}});var Fs=ie({auth:J,name:"unsubscribe-user",displayName:"Unsubscribe User",description:"Remove subscribers from mailing list",audience:"both",aiMetadata:{description:"Unsubscribes one or more email addresses (up to 100 per call) from a single specified SendPulse mailing list, leaving them in other lists. Use to opt contacts out of one list rather than purge them account-wide. Idempotent \u2014 repeating leaves the same contacts unsubscribed from that list.",idempotent:!0},props:{mailingListId:te,emails:U.Array({displayName:"Email Addresses",description:"Email addresses to unsubscribe (max 100)",required:!0})},async run(e){let{mailingListId:t,emails:r}=e.propsValue;if(r.length===0)throw new Error("At least one email address is required");if(r.length>100)throw new Error("Maximum 100 email addresses allowed per request");let n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,o=r.filter(c=>!n.test(c));if(o.length>0)throw new Error(`Invalid email format(s): ${o.join(", ")}`);let s={emails:r};try{if((await Z({method:"DELETE",auth:e.auth.props,resourceUri:`/addressbooks/${t}/emails`,body:s})).result)return{success:!0,message:`${r.length} subscriber(s) unsubscribed successfully`,unsubscribed:r,mailingListId:t,count:r.length};throw new Error("Unsubscription failed - API returned failure")}catch(c){throw new Error(`Failed to unsubscribe users: ${c.message||"Unknown error"}`)}}});var Bs=ie({auth:J,name:"update-subscriber",displayName:"Update Subscriber",description:"Update subscriber details and variables",audience:"both",aiMetadata:{description:"Updates an existing subscriber, identified by email, within a specific SendPulse mailing list by setting their phone number and/or one or more variables (custom fields) to new values. Use to overwrite a contact's details; at least one of phone or variables must be supplied. Idempotent \u2014 repeating with the same values leaves the contact unchanged.",idempotent:!0},props:{mailingListId:te,email:U.ShortText({displayName:"Email Address",description:"Email address of the subscriber to update",required:!0}),phone:U.ShortText({displayName:"Phone Number",description:"New phone number (optional)",required:!1}),variables:U.Object({displayName:"Variables",description:"Subscriber variables to update (e.g., name, custom fields)",required:!1})},async run(e){let{mailingListId:t,email:r,phone:n,variables:o}=e.propsValue,s=[],c=!1;if(n)try{(await Z({method:"PUT",auth:e.auth.props,resourceUri:`/addressbooks/${t}/phone`,body:{email:r,phone:n}})).result?(s.push({type:"phone",success:!0,value:n}),c=!0):s.push({type:"phone",success:!1,error:"API returned failure"})}catch(g){s.push({type:"phone",success:!1,error:g.message})}if(o&&Object.keys(o).length>0){let g=Object.entries(o).map(([x,T])=>({name:x,value:String(T)}));try{(await Z({method:"POST",auth:e.auth.props,resourceUri:`/addressbooks/${t}/emails/variable`,body:{email:r,variables:g}})).result?(s.push({type:"variables",success:!0,count:g.length}),c=!0):s.push({type:"variables",success:!1,error:"API returned failure"})}catch(x){s.push({type:"variables",success:!1,error:x.message})}}if(!c&&!n&&(!o||Object.keys(o).length===0))throw new Error("No updates provided. Please specify phone number or variables to update.");let p=s.filter(g=>g.success),f=s.filter(g=>!g.success);if(p.length===0)throw new Error(`All updates failed: ${f.map(g=>g.error).join(", ")}`);return{success:!0,message:`Subscriber ${r} updated successfully`,email:r,updates:s,hasFailures:f.length>0}}});var _d=xi({displayName:"SendPulse",auth:J,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/sendpulse.png",authors:["aryel780","onyedikachi-david"],actions:[Ms,js,Ls,Fs,Bs,Rs({auth:J,baseUrl:i(()=>"https://api.sendpulse.com","baseUrl"),authMapping:i(async e=>{let t=e.props;return{Authorization:`Bearer ${(await Z({method:"POST",auth:t,resourceUri:"/oauth/access_token",body:{grant_type:"client_credentials",client_id:t.clientId,client_secret:t.clientSecret}})).access_token}`}},"authMapping")})],triggers:[Ds,Cs,Us]});0&&(module.exports={sendpulse});
4
+ /*! Bundled license information:
5
+
6
+ mime-types/index.js:
7
+ (*!
8
+ * mime-types
9
+ * Copyright(c) 2014 Jonathan Ong
10
+ * Copyright(c) 2015 Douglas Christopher Wilson
11
+ * MIT Licensed
12
+ *)
13
+ */
package/src/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare const sendpulse: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- }>>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,SAAS;;;GAuCpB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAGqC;AACrC,qEAA6D;AAC7D,4CAAkD;AAClD,gDAAuD;AACvD,kEAAqE;AACrE,sEAAyE;AACzE,0EAA6E;AAC7E,iEAAmE;AACnE,iGAAiG;AACjG,iEAAmE;AACnE,qEAAuE;AACvE,uEAAyE;AAE5D,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,oBAAa;IACnB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,CAAC,UAAU,EAAE,mBAAmB,CAAC;IAC1C,OAAO,EAAE;QACP,oCAAmB;QACnB,kEAAiC;QACjC,oCAAmB;QACnB,wCAAqB;QACrB,0CAAsB;QACtB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,oBAAa;YACnB,OAAO,EAAE,GAAG,EAAE,CAAC,2BAA2B;YAC1C,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;gBAC7B,MAAM,KAAK,GAAG,MAAM,IAAA,yBAAgB,EAA2B;oBAC7D,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,qBAAqB;oBAClC,IAAI,EAAE;wBACJ,UAAU,EAAE,oBAAoB;wBAChC,SAAS,EAAE,SAAS,CAAC,QAAQ;wBAC7B,aAAa,EAAE,SAAS,CAAC,YAAY;qBACtC;iBACF,CAAC,CAAC;gBAEH,OAAO;oBACL,aAAa,EAAE,UAAU,KAAK,CAAC,YAAY,EAAE;iBAC9C,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE;QACR,qCAAoB;QACpB,yCAAsB;QACtB,6CAAwB;KACzB;CACF,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- export declare const addSubscriberAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- }>, {
5
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
7
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
- variables: import("@activepieces/pieces-framework").ObjectProperty<false>;
11
- tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
12
- }>;
13
- //# sourceMappingURL=add-subscriber.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-subscriber.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-subscriber.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB;;;;;;;;;;;EA8E9B,CAAC"}
@@ -1,84 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addSubscriberAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_common_1 = require("@activepieces/pieces-common");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const client_1 = require("../common/client");
8
- const auth_1 = require("../common/auth");
9
- const props_1 = require("../common/props");
10
- exports.addSubscriberAction = (0, pieces_framework_1.createAction)({
11
- auth: auth_1.sendpulseAuth,
12
- name: 'add-subscriber',
13
- displayName: 'Add Subscriber',
14
- description: 'Add subscriber to mailing list',
15
- audience: 'both',
16
- aiMetadata: { description: 'Adds an email contact to a specific SendPulse mailing list (address book), optionally attaching subscriber variables (e.g. name, phone) and numeric tag IDs. Use to enroll a new contact into a list; requires the target mailing list ID and a valid email. Not idempotent — each call re-submits the contact to the list.', idempotent: false },
17
- props: {
18
- mailingListId: props_1.mailingListDropdown,
19
- email: pieces_framework_1.Property.ShortText({
20
- displayName: 'Email Address',
21
- description: 'Subscriber email address',
22
- required: true,
23
- }),
24
- variables: pieces_framework_1.Property.Object({
25
- displayName: 'Variables',
26
- description: 'Optional subscriber variables (e.g., name, phone)',
27
- required: false,
28
- }),
29
- tags: pieces_framework_1.Property.Array({
30
- displayName: 'Tag IDs',
31
- description: 'Optional tag IDs to assign',
32
- required: false,
33
- }),
34
- },
35
- run(context) {
36
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
37
- const { mailingListId, email, variables, tags } = context.propsValue;
38
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
39
- if (!emailRegex.test(email)) {
40
- throw new Error(`Invalid email format: ${email}`);
41
- }
42
- const emailObject = { email };
43
- if (variables && Object.keys(variables).length > 0) {
44
- emailObject.variables = variables;
45
- }
46
- const requestBody = {
47
- emails: [emailObject],
48
- };
49
- if (tags && tags.length > 0) {
50
- const tagNumbers = tags.map((tag) => {
51
- const num = Number(tag);
52
- if (isNaN(num)) {
53
- throw new Error(`Invalid tag ID: ${tag}. Tag IDs must be numbers.`);
54
- }
55
- return num;
56
- });
57
- requestBody.tags = tagNumbers;
58
- }
59
- try {
60
- const result = yield (0, client_1.sendpulseApiCall)({
61
- method: pieces_common_1.HttpMethod.POST,
62
- auth: context.auth.props,
63
- resourceUri: `/addressbooks/${mailingListId}/emails`,
64
- body: requestBody,
65
- });
66
- if (result.result === true) {
67
- return {
68
- success: true,
69
- message: 'Subscriber added successfully',
70
- email,
71
- variables: variables || {},
72
- mailingListId,
73
- tags: requestBody.tags || [],
74
- };
75
- }
76
- throw new Error('SendPulse API returned failure');
77
- }
78
- catch (error) {
79
- throw new Error(`Failed to add subscriber: ${error.message || 'Unknown error'}`);
80
- }
81
- });
82
- },
83
- });
84
- //# sourceMappingURL=add-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-subscriber.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-subscriber.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AACxE,6CAAoD;AACpD,yCAA+C;AAC/C,2CAAsD;AAEzC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,gCAAgC;IAC7C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,6TAA6T,EAAE,UAAU,EAAE,KAAK,EAAE;IAC7W,KAAK,EAAE;QACL,aAAa,EAAE,2BAAmB;QAClC,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACnB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IAEK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAErE,MAAM,UAAU,GAAG,4BAA4B,CAAC;YAChD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,KAAK,EAAE,CAAC,CAAC;YACpD,CAAC;YAED,MAAM,WAAW,GAAQ,EAAE,KAAK,EAAE,CAAC;YACnC,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnD,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;YACpC,CAAC;YAED,MAAM,WAAW,GAAQ;gBACvB,MAAM,EAAE,CAAC,WAAW,CAAC;aACtB,CAAC;YAEF,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;oBAClC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;oBACxB,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,mBAAmB,GAAG,4BAA4B,CAAC,CAAC;oBACtE,CAAC;oBACD,OAAO,GAAG,CAAC;gBACb,CAAC,CAAC,CAAC;gBACH,WAAW,CAAC,IAAI,GAAG,UAAU,CAAC;YAChC,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAgB,EAAsB;oBACzD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;oBACxB,WAAW,EAAE,iBAAiB,aAAa,SAAS;oBACpD,IAAI,EAAE,WAAW;iBAClB,CAAC,CAAC;gBAEH,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;oBAC3B,OAAO;wBACL,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,+BAA+B;wBACxC,KAAK;wBACL,SAAS,EAAE,SAAS,IAAI,EAAE;wBAC1B,aAAa;wBACb,IAAI,EAAE,WAAW,CAAC,IAAI,IAAI,EAAE;qBAC7B,CAAC;gBACJ,CAAC;gBAED,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE,CAAC,CAAC;YACnF,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,16 +0,0 @@
1
- export declare const changeVariableForSubscriberAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- }>, {
5
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
7
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
- variableName: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
11
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>>;
14
- variableValue: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
- }>;
16
- //# sourceMappingURL=change-variable-for-subscriber.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-variable-for-subscriber.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/change-variable-for-subscriber.ts"],"names":[],"mappings":"AA4DA,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;EA6F5C,CAAC"}