@activepieces/piece-respond-io 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 (77) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +118 -59
  3. package/src/index.d.ts +0 -4
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/add-comment-to-conversation.d.ts +0 -9
  7. package/src/lib/actions/add-comment-to-conversation.d.ts.map +0 -1
  8. package/src/lib/actions/add-comment-to-conversation.js +0 -45
  9. package/src/lib/actions/add-comment-to-conversation.js.map +0 -1
  10. package/src/lib/actions/add-tag-to-contact.d.ts +0 -9
  11. package/src/lib/actions/add-tag-to-contact.d.ts.map +0 -1
  12. package/src/lib/actions/add-tag-to-contact.js +0 -57
  13. package/src/lib/actions/add-tag-to-contact.js.map +0 -1
  14. package/src/lib/actions/assign-or-unassign-conversation.d.ts +0 -26
  15. package/src/lib/actions/assign-or-unassign-conversation.d.ts.map +0 -1
  16. package/src/lib/actions/assign-or-unassign-conversation.js +0 -46
  17. package/src/lib/actions/assign-or-unassign-conversation.js.map +0 -1
  18. package/src/lib/actions/create-contact.d.ts +0 -14
  19. package/src/lib/actions/create-contact.d.ts.map +0 -1
  20. package/src/lib/actions/create-contact.js +0 -129
  21. package/src/lib/actions/create-contact.js.map +0 -1
  22. package/src/lib/actions/create-or-update-contact.d.ts +0 -14
  23. package/src/lib/actions/create-or-update-contact.d.ts.map +0 -1
  24. package/src/lib/actions/create-or-update-contact.js +0 -131
  25. package/src/lib/actions/create-or-update-contact.js.map +0 -1
  26. package/src/lib/actions/delete-contact.d.ts +0 -8
  27. package/src/lib/actions/delete-contact.d.ts.map +0 -1
  28. package/src/lib/actions/delete-contact.js +0 -31
  29. package/src/lib/actions/delete-contact.js.map +0 -1
  30. package/src/lib/actions/find-contact.d.ts +0 -9
  31. package/src/lib/actions/find-contact.d.ts.map +0 -1
  32. package/src/lib/actions/find-contact.js +0 -68
  33. package/src/lib/actions/find-contact.js.map +0 -1
  34. package/src/lib/actions/open-conversation.d.ts +0 -8
  35. package/src/lib/actions/open-conversation.d.ts.map +0 -1
  36. package/src/lib/actions/open-conversation.js +0 -34
  37. package/src/lib/actions/open-conversation.js.map +0 -1
  38. package/src/lib/common/auth.d.ts +0 -5
  39. package/src/lib/common/auth.d.ts.map +0 -1
  40. package/src/lib/common/auth.js +0 -49
  41. package/src/lib/common/auth.js.map +0 -1
  42. package/src/lib/common/client.d.ts +0 -11
  43. package/src/lib/common/client.d.ts.map +0 -1
  44. package/src/lib/common/client.js +0 -56
  45. package/src/lib/common/client.js.map +0 -1
  46. package/src/lib/common/props.d.ts +0 -7
  47. package/src/lib/common/props.d.ts.map +0 -1
  48. package/src/lib/common/props.js +0 -119
  49. package/src/lib/common/props.js.map +0 -1
  50. package/src/lib/triggers/contact-tag-updated.d.ts +0 -19
  51. package/src/lib/triggers/contact-tag-updated.d.ts.map +0 -1
  52. package/src/lib/triggers/contact-tag-updated.js +0 -50
  53. package/src/lib/triggers/contact-tag-updated.js.map +0 -1
  54. package/src/lib/triggers/contact-updated.d.ts +0 -19
  55. package/src/lib/triggers/contact-updated.d.ts.map +0 -1
  56. package/src/lib/triggers/contact-updated.js +0 -50
  57. package/src/lib/triggers/contact-updated.js.map +0 -1
  58. package/src/lib/triggers/conversation-closed.d.ts +0 -19
  59. package/src/lib/triggers/conversation-closed.d.ts.map +0 -1
  60. package/src/lib/triggers/conversation-closed.js +0 -50
  61. package/src/lib/triggers/conversation-closed.js.map +0 -1
  62. package/src/lib/triggers/conversation-opened.d.ts +0 -19
  63. package/src/lib/triggers/conversation-opened.d.ts.map +0 -1
  64. package/src/lib/triggers/conversation-opened.js +0 -87
  65. package/src/lib/triggers/conversation-opened.js.map +0 -1
  66. package/src/lib/triggers/new-contact.d.ts +0 -19
  67. package/src/lib/triggers/new-contact.d.ts.map +0 -1
  68. package/src/lib/triggers/new-contact.js +0 -50
  69. package/src/lib/triggers/new-contact.js.map +0 -1
  70. package/src/lib/triggers/new-incoming-message.d.ts +0 -19
  71. package/src/lib/triggers/new-incoming-message.d.ts.map +0 -1
  72. package/src/lib/triggers/new-incoming-message.js +0 -50
  73. package/src/lib/triggers/new-incoming-message.js.map +0 -1
  74. package/src/lib/triggers/new-outgoing-message.d.ts +0 -19
  75. package/src/lib/triggers/new-outgoing-message.d.ts.map +0 -1
  76. package/src/lib/triggers/new-outgoing-message.js +0 -50
  77. package/src/lib/triggers/new-outgoing-message.js.map +0 -1
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "@activepieces/piece-respond-io",
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,59 +1,118 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.respondIo = 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 add_comment_to_conversation_1 = require("./lib/actions/add-comment-to-conversation");
9
- const add_tag_to_contact_1 = require("./lib/actions/add-tag-to-contact");
10
- const assign_or_unassign_conversation_1 = require("./lib/actions/assign-or-unassign-conversation");
11
- const create_contact_1 = require("./lib/actions/create-contact");
12
- const create_or_update_contact_1 = require("./lib/actions/create-or-update-contact");
13
- const delete_contact_1 = require("./lib/actions/delete-contact");
14
- const find_contact_1 = require("./lib/actions/find-contact");
15
- const open_conversation_1 = require("./lib/actions/open-conversation");
16
- const contact_tag_updated_1 = require("./lib/triggers/contact-tag-updated");
17
- const contact_updated_1 = require("./lib/triggers/contact-updated");
18
- const conversation_closed_1 = require("./lib/triggers/conversation-closed");
19
- const conversation_opened_1 = require("./lib/triggers/conversation-opened");
20
- const new_contact_1 = require("./lib/triggers/new-contact");
21
- const new_incoming_message_1 = require("./lib/triggers/new-incoming-message");
22
- const new_outgoing_message_1 = require("./lib/triggers/new-outgoing-message");
23
- exports.respondIo = (0, pieces_framework_1.createPiece)({
24
- displayName: 'Respond.io',
25
- auth: auth_1.respondIoAuth,
26
- minimumSupportedRelease: '0.36.1',
27
- logoUrl: 'https://cdn.activepieces.com/pieces/respond-io.png',
28
- authors: ['aryel780'],
29
- actions: [
30
- add_comment_to_conversation_1.addCommentToConversation,
31
- add_tag_to_contact_1.addTagToContact,
32
- assign_or_unassign_conversation_1.assignOrUnassignConversation,
33
- create_contact_1.createContact,
34
- create_or_update_contact_1.createOrUpdateContact,
35
- delete_contact_1.deleteContact,
36
- find_contact_1.findContact,
37
- open_conversation_1.openConversation,
38
- (0, pieces_common_1.createCustomApiCallAction)({
39
- auth: auth_1.respondIoAuth,
40
- baseUrl: () => 'https://api.respond.io/v2',
41
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
42
- const { token } = auth.props;
43
- return {
44
- Authorization: `Bearer ${token}`,
45
- };
46
- }),
47
- }),
48
- ],
49
- triggers: [
50
- contact_tag_updated_1.contactTagUpdatedTrigger,
51
- contact_updated_1.contactUpdatedTrigger,
52
- conversation_closed_1.conversationClosedTrigger,
53
- conversation_opened_1.conversationOpenedTrigger,
54
- new_contact_1.newContactTrigger,
55
- new_incoming_message_1.newIncomingMessageTrigger,
56
- new_outgoing_message_1.newOutgoingMessageTrigger,
57
- ],
58
- });
59
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Js=Object.create;var Je=Object.defineProperty;var Xs=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Qs=Object.getPrototypeOf,eu=Object.prototype.hasOwnProperty;var i=(e,t)=>Je(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)Je(e,r,{get:t[r],enumerable:!0})},gn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ys(t))!eu.call(e,o)&&o!==r&&Je(e,o,{get:()=>t[o],enumerable:!(n=Xs(t,o))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?Js(Qs(e)):{},gn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),tu=e=>gn(Je({},"__esModule",{value:!0}),e);var Ro=$((Oo,jt)=>{(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"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],_,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(j=d-g,_=":";j--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=function(){let oe=s.split(":"),ue=[];for(let Ke=0;Ke<oe.length;Ke++)ue.push(parseInt(oe[Ke],16));return ue}(),{parts:d,zoneId:v}}i(f,"expandIPv6");function h(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,_;for(;m>0;){if(_=g-m,_<0&&(_=0),s[v]>>_!==d[v]>>_)return!1;m-=g,v+=1}return!0}i(h,"matchCIDR");function P(s){if(o.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}i(P,"parseIntAuto");function E(s,d){for(;s.length<d;)s=`0${s}`;return s}i(E,"padPart");let x={};x.IPv4=function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}return i(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,_,j;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(j=m[_],g&&j!==0)return null;j!==8&&(g=!0),d+=j}else return null;return 32-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<4;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!d?!1:x.IPv4.isValidFourPartDecimal(d[1])},x.IPv4.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},x.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:i(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return function(){let v=d.slice(1,6),_=[];for(let j=0;j<v.length;j++)g=v[j],_.push(P(g));return _}();if(d=s.match(r.longValue)){if(m=P(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],_;for(_=0;_<=24;_+=8)v.push(m>>_&255);return v}().reverse()}else return(d=s.match(r.twoOctet))?function(){let v=d.slice(1,4),_=[];if(m=P(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(P(v[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_}():(d=s.match(r.threeOctet))?function(){let v=d.slice(1,5),_=[];if(m=P(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(P(v[0])),_.push(P(v[1])),_.push(m>>8&255),_.push(m&255),_}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.IPv6=function(){function s(d,g){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return i(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,_;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(_=m[v],g&&_!==0)return null;_!==16&&(g=!0),d+=_}else return null;return 128-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(E(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,_;for(;_=d.exec(g);)_[0].length>v&&(m=_.index,v=_[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],_=0;for(;_<16;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let d=this.parser(s);return new this(d.parts,d.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let d,g,m,v,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},x.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],Object.defineProperty(m,"toString",{value:i(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let d,g,m,v,_,j;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return f(s,8);if((m=s.match(l.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+j,6),d.parts)){for(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<_.length;g++)if(v=_[g],!(0<=v&&v<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[3]),{parts:d.parts,zoneId:d.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.fromByteArray=function(s){let d=s.length;if(d===4)return new x.IPv4(s);if(d===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},x.subnetMatch=function(s,d,g){let m,v,_,j;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(_=d[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(j=_[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return g},typeof jt<"u"&&jt.exports?jt.exports=x:e.ipaddr=x})(Oo)});var Ai=$((rA,Si)=>{var Ei=require("stream").Stream,wp=require("util");Si.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");wp.inherits(le,Ei);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=Ei.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 Oi=$((oA,ki)=>{var kp=require("util"),wi=require("stream").Stream,zi=Ai();ki.exports=G;function G(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}i(G,"CombinedStream");kp.inherits(G,wi);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof zi)){var r=zi.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};G.prototype.pipe=function(e,t){return wi.prototype.pipe.call(this,e,t),this.resume(),e};G.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};G.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Ni=$((aA,Ri)=>{"use strict";Ri.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 Ui=$(ne=>{"use strict";var Gt=Ni(),Op=require("path").extname,Di=/^\s*([^;\s]*)(?:;|\s|$)/,Rp=/^text\//i;ne.charset=Ci;ne.charsets={lookup:Ci};ne.contentType=Np;ne.extension=Dp;ne.extensions=Object.create(null);ne.lookup=Cp;ne.types=Object.create(null);Up(ne.extensions,ne.types);function Ci(e){if(!e||typeof e!="string")return!1;var t=Di.exec(e),r=t&&Gt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Rp.test(t[1])?"UTF-8":!1}i(Ci,"charset");function Np(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?ne.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=ne.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(Np,"contentType");function Dp(e){if(!e||typeof e!="string")return!1;var t=Di.exec(e),r=t&&ne.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(Dp,"extension");function Cp(e){if(!e||typeof e!="string")return!1;var t=Op("x."+e).toLowerCase().substr(1);return t&&ne.types[t]||!1}i(Cp,"lookup");function Up(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Gt).forEach(i(function(o){var u=Gt[o],c=u.extensions;if(!(!c||!c.length)){e[o]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var h=r.indexOf(Gt[t[f]].source),P=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(h>P||h===P&&t[f].substr(0,12)==="application/"))continue}t[f]=o}}},"forEachMimeType"))}i(Up,"populateMaps")});var Li=$((cA,Mi)=>{Mi.exports=Mp;function Mp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(Mp,"defer")});var Vr=$((lA,Fi)=>{var ji=Li();Fi.exports=Lp;function Lp(e){var t=!1;return ji(function(){t=!0}),i(function(n,o){t?e(n,o):ji(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(Lp,"async")});var Hr=$((mA,Bi)=>{Bi.exports=jp;function jp(e){Object.keys(e.jobs).forEach(Fp.bind(e)),e.jobs={}}i(jp,"abort");function Fp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(Fp,"clean")});var Wr=$((gA,Vi)=>{var Zi=Vr(),Bp=Hr();Vi.exports=Zp;function Zp(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=Vp(t,o,e[o],function(u,c){o in r.jobs&&(delete r.jobs[o],u?Bp(r):r.results[o]=c,n(u,r.results))})}i(Zp,"iterate");function Vp(e,t,r,n){var o;return e.length==2?o=e(r,Zi(n)):o=e(r,t,Zi(n)),o}i(Vp,"runJob")});var qr=$((hA,Hi)=>{Hi.exports=Hp;function Hp(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,u){return t(e[o],e[u])}),n}i(Hp,"state")});var Gr=$((xA,Wi)=>{var Wp=Hr(),qp=Vr();Wi.exports=Gp;function Gp(e){Object.keys(this.jobs).length&&(this.index=this.size,Wp(this),qp(e)(null,this.results))}i(Gp,"terminator")});var Gi=$((_A,qi)=>{var Kp=Wr(),Jp=qr(),Xp=Gr();qi.exports=Yp;function Yp(e,t,r){for(var n=Jp(e);n.index<(n.keyedList||e).length;)Kp(e,t,n,function(o,u){if(o){r(o,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Xp.bind(n,r)}i(Yp,"parallel")});var Kr=$((IA,Kt)=>{var Ki=Wr(),Qp=qr(),el=Gr();Kt.exports=tl;Kt.exports.ascending=Ji;Kt.exports.descending=rl;function tl(e,t,r,n){var o=Qp(e,r);return Ki(e,t,o,i(function u(c,l){if(c){n(c,l);return}if(o.index++,o.index<(o.keyedList||e).length){Ki(e,t,o,u);return}n(null,o.results)},"iteratorHandler")),el.bind(o,n)}i(tl,"serialOrdered");function Ji(e,t){return e<t?-1:e>t?1:0}i(Ji,"ascending");function rl(e,t){return-1*Ji(e,t)}i(rl,"descending")});var Yi=$(($A,Xi)=>{var nl=Kr();Xi.exports=ol;function ol(e,t,r){return nl(e,t,null,r)}i(ol,"serial")});var ea=$((SA,Qi)=>{Qi.exports={parallel:Gi(),serial:Yi(),serialOrdered:Kr()}});var Jr=$((AA,ta)=>{"use strict";ta.exports=Object});var na=$((zA,ra)=>{"use strict";ra.exports=Error});var ia=$((wA,oa)=>{"use strict";oa.exports=EvalError});var sa=$((kA,aa)=>{"use strict";aa.exports=RangeError});var ca=$((OA,ua)=>{"use strict";ua.exports=ReferenceError});var la=$((RA,pa)=>{"use strict";pa.exports=SyntaxError});var Jt=$((NA,da)=>{"use strict";da.exports=TypeError});var fa=$((DA,ma)=>{"use strict";ma.exports=URIError});var ya=$((CA,ga)=>{"use strict";ga.exports=Math.abs});var va=$((UA,ha)=>{"use strict";ha.exports=Math.floor});var Pa=$((MA,xa)=>{"use strict";xa.exports=Math.max});var ba=$((LA,_a)=>{"use strict";_a.exports=Math.min});var Ta=$((jA,Ia)=>{"use strict";Ia.exports=Math.pow});var Ea=$((FA,$a)=>{"use strict";$a.exports=Math.round});var Aa=$((BA,Sa)=>{"use strict";Sa.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var wa=$((VA,za)=>{"use strict";var il=Aa();za.exports=i(function(t){return il(t)||t===0?t:t<0?-1:1},"sign")});var Oa=$((WA,ka)=>{"use strict";ka.exports=Object.getOwnPropertyDescriptor});var Xr=$((qA,Ra)=>{"use strict";var Xt=Oa();if(Xt)try{Xt([],"length")}catch{Xt=null}Ra.exports=Xt});var Da=$((GA,Na)=>{"use strict";var Yt=Object.defineProperty||!1;if(Yt)try{Yt({},"a",{value:1})}catch{Yt=!1}Na.exports=Yt});var Yr=$((KA,Ca)=>{"use strict";Ca.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 u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var La=$((XA,Ma)=>{"use strict";var Ua=typeof Symbol<"u"&&Symbol,al=Yr();Ma.exports=i(function(){return typeof Ua!="function"||typeof Symbol!="function"||typeof Ua("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:al()},"hasNativeSymbols")});var Qr=$((QA,ja)=>{"use strict";ja.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var en=$((ez,Fa)=>{"use strict";var sl=Jr();Fa.exports=sl.getPrototypeOf||null});var Va=$((tz,Za)=>{"use strict";var ul="Function.prototype.bind called on incompatible ",cl=Object.prototype.toString,pl=Math.max,ll="[object Function]",Ba=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),dl=i(function(t,r){for(var n=[],o=r||0,u=0;o<t.length;o+=1,u+=1)n[u]=t[o];return n},"slicy"),ml=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");Za.exports=i(function(t){var r=this;if(typeof r!="function"||cl.apply(r)!==ll)throw new TypeError(ul+r);for(var n=dl(arguments,1),o,u=i(function(){if(this instanceof o){var P=r.apply(this,Ba(n,arguments));return Object(P)===P?P:this}return r.apply(t,Ba(n,arguments))},"binder"),c=pl(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(o=Function("binder","return function ("+ml(l,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=i(function(){},"Empty");h.prototype=r.prototype,o.prototype=new h,h.prototype=null}return o},"bind")});var Ve=$((nz,Ha)=>{"use strict";var fl=Va();Ha.exports=Function.prototype.bind||fl});var Qt=$((oz,Wa)=>{"use strict";Wa.exports=Function.prototype.call});var tn=$((iz,qa)=>{"use strict";qa.exports=Function.prototype.apply});var Ka=$((az,Ga)=>{"use strict";Ga.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Xa=$((sz,Ja)=>{"use strict";var gl=Ve(),yl=tn(),hl=Qt(),vl=Ka();Ja.exports=vl||gl.call(hl,yl)});var Qa=$((uz,Ya)=>{"use strict";var xl=Ve(),Pl=Jt(),_l=Qt(),bl=Xa();Ya.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new Pl("a function is required");return bl(xl,_l,t)},"callBindBasic")});var is=$((pz,os)=>{"use strict";var Il=Qa(),es=Xr(),rs;try{rs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var rn=!!rs&&es&&es(Object.prototype,"__proto__"),ns=Object,ts=ns.getPrototypeOf;os.exports=rn&&typeof rn.get=="function"?Il([rn.get]):typeof ts=="function"?i(function(t){return ts(t==null?t:ns(t))},"getDunder"):!1});var ps=$((dz,cs)=>{"use strict";var as=Qr(),ss=en(),us=is();cs.exports=as?i(function(t){return as(t)},"getProto"):ss?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return ss(t)},"getProto"):us?i(function(t){return us(t)},"getProto"):null});var nn=$((fz,ls)=>{"use strict";var Tl=Function.prototype.call,$l=Object.prototype.hasOwnProperty,El=Ve();ls.exports=El.call(Tl,$l)});var vs=$((gz,hs)=>{"use strict";var M,Sl=Jr(),Al=na(),zl=ia(),wl=sa(),kl=ca(),Ge=la(),qe=Jt(),Ol=fa(),Rl=ya(),Nl=va(),Dl=Pa(),Cl=ba(),Ul=Ta(),Ml=Ea(),Ll=wa(),gs=Function,on=i(function(e){try{return gs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Xr(),jl=Da(),an=i(function(){throw new qe},"throwTypeError"),Fl=vt?function(){try{return arguments.callee,an}catch{try{return vt(arguments,"callee").get}catch{return an}}}():an,He=La()(),Q=ps(),Bl=en(),Zl=Qr(),ys=tn(),xt=Qt(),We={},Vl=typeof Uint8Array>"u"||!Q?M:Q(Uint8Array),Re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Q?Q([][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%":Al,"%eval%":eval,"%EvalError%":zl,"%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%":gs,"%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&&Q?Q(Q([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Q?M:Q(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Sl,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":wl,"%ReferenceError%":kl,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Q?M:Q(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Q?Q(""[Symbol.iterator]()):M,"%Symbol%":He?Symbol:M,"%SyntaxError%":Ge,"%ThrowTypeError%":Fl,"%TypedArray%":Vl,"%TypeError%":qe,"%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%":Ol,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":ys,"%Object.defineProperty%":jl,"%Object.getPrototypeOf%":Bl,"%Math.abs%":Rl,"%Math.floor%":Nl,"%Math.max%":Dl,"%Math.min%":Cl,"%Math.pow%":Ul,"%Math.round%":Ml,"%Math.sign%":Ll,"%Reflect.getPrototypeOf%":Zl};if(Q)try{null.error}catch(e){ds=Q(Q(e)),Re["%Error.prototype%"]=ds}var ds,Hl=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&&Q&&(r=Q(o.prototype))}return Re[t]=r,r},"doEval"),ms={__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"]},Pt=Ve(),er=nn(),Wl=Pt.call(xt,Array.prototype.concat),ql=Pt.call(ys,Array.prototype.splice),fs=Pt.call(xt,String.prototype.replace),tr=Pt.call(xt,String.prototype.slice),Gl=Pt.call(xt,RegExp.prototype.exec),Kl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Jl=/\\(\\)?/g,Xl=i(function(t){var r=tr(t,0,1),n=tr(t,-1);if(r==="%"&&n!=="%")throw new Ge("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ge("invalid intrinsic syntax, expected opening `%`");var o=[];return fs(t,Kl,function(u,c,l,f){o[o.length]=l?fs(f,Jl,"$1"):c||u}),o},"stringToPath"),Yl=i(function(t,r){var n=t,o;if(er(ms,n)&&(o=ms[n],n="%"+o[0]+"%"),er(Re,n)){var u=Re[n];if(u===We&&(u=Hl(n)),typeof u>"u"&&!r)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:u}}throw new Ge("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");hs.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Gl(/^%?[^%]*%?$/,t)===null)throw new Ge("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Xl(t),o=n.length>0?n[0]:"",u=Yl("%"+o+"%",r),c=u.name,l=u.value,f=!1,h=u.alias;h&&(o=h[0],ql(n,Wl([0,1],h)));for(var P=1,E=!0;P<n.length;P+=1){var x=n[P],s=tr(x,0,1),d=tr(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Ge("property names with quotes must have matching quotes");if((x==="constructor"||!E)&&(f=!0),o+="."+x,c="%"+o+"%",er(Re,c))l=Re[c];else if(l!=null){if(!(x in l)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&P+1>=n.length){var g=vt(l,x);E=!!g,E&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[x]}else E=er(l,x),l=l[x];E&&!f&&(Re[c]=l)}}return l},"GetIntrinsic")});var Ps=$((hz,xs)=>{"use strict";var Ql=Yr();xs.exports=i(function(){return Ql()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Is=$((xz,bs)=>{"use strict";var ed=vs(),_s=ed("%Object.defineProperty%",!0),td=Ps()(),rd=nn(),nd=Jt(),rr=td?Symbol.toStringTag:null;bs.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 nd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");rr&&(n||!rd(t,rr))&&(_s?_s(t,rr,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[rr]=r)},"setToStringTag")});var $s=$((_z,Ts)=>{"use strict";var od=Function.prototype.call,id=Object.prototype.hasOwnProperty,ad=Ve();Ts.exports=ad.call(od,id)});var Ss=$((bz,Es)=>{"use strict";Es.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var ws=$((Iz,zs)=>{"use strict";var pn=Oi(),sd=require("util"),sn=require("path"),ud=require("http"),cd=require("https"),pd=require("url").parse,ld=require("fs"),dd=require("stream").Stream,md=require("crypto"),un=Ui(),fd=ea(),gd=Is(),Ae=$s(),cn=Ss();function As(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(As,"escapeHeaderParam");function F(e){if(!(this instanceof F))return new F(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],pn.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(F,"FormData");sd.inherits(F,pn);F.LINE_BREAK=`\r
2
+ `;F.DEFAULT_CONTENT_TYPE="application/octet-stream";F.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=pn.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),u=this._multiPartFooter();n(o),n(t),n(u),this._trackLength(o,t,r)};F.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+F.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ae(t,"httpVersion"))&&!(t instanceof dd))&&(r.knownLength||this._valuesToMeasure.push(t))};F.prototype._lengthRetriever=function(e,t){Ae(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ld.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):Ae(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ae(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};F.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+As(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&cn(c,r.header);var l;for(var f in c)if(Ae(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.join("; ")+F.LINE_BREAK)}return"--"+this.getBoundary()+F.LINE_BREAK+u+F.LINE_BREAK};F.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&&Ae(e,"httpVersion")&&(r=sn.basename(e.client._httpMessage.path||"")),r)return'filename="'+As(r)+'"'};F.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&&Ae(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=F.DEFAULT_CONTENT_TYPE),r};F.prototype._multiPartFooter=function(){return function(e){var t=F.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};F.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+F.LINE_BREAK};F.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ae(e,t)&&(r[t.toLowerCase()]=e[t]);return r};F.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};F.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};F.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(F.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};F.prototype._generateBoundary=function(){this._boundary="--------------------------"+md.randomBytes(12).toString("hex")};F.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};F.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};F.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}fd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};F.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=pd(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=cd.request(n):r=ud.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var l,f=i(function(h,P){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,h,P)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};F.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};F.prototype.toString=function(){return"[object FormData]"};gd(F.prototype,"FormData");zs.exports=F});var $d={};fn($d,{respondIo:()=>Td});module.exports=tu($d);var ru=Object.freeze({status:"aborted"});function I(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let h=c.prototype,P=Object.keys(h);for(let E=0;E<P.length;E++){let x=P[E];x in l||(l[x]=h[x].bind(l))}}i(n,"init");let o=r?.Parent??Object;class u extends o{static{i(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var f;let h=r?.Parent?new u:this;n(h,l),(f=h._zod).deferred??(f.deferred=[]);for(let P of h._zod.deferred)P();return h}return i(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:i(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}i(I,"$constructor");var nu=Symbol("zod_brand"),de=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},or={};function ye(e){return e&&Object.assign(or,e),or}i(ye,"config");function ar(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(ar,"getEnumValues");function hn(e,t){return typeof t=="bigint"?t.toString():t}i(hn,"jsonStringifyReplacer");function Tt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(Tt,"cached");function vn(e){return e==null}i(vn,"nullish");function $t(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i($t,"cleanRegex");var yn=Symbol("evaluating");function J(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(J,"defineLazy");var sr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(Xe,"isObject");var ou=Tt(()=>{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 Pn=new Set(["string","number","symbol"]);function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(De,"escapeRegex");function Et(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}i(Et,"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 _n(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(_n,"optionalKeys");var iu={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 Ce(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(Ce,"aborted");function be(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(be,"prefixIssues");function It(e){return typeof e=="string"?e:e?.message}i(It,"unwrapMessage");function Ie(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=It(e.inst?._zod.def?.error?.(e))??It(t?.error?.(e))??It(r.customError?.(e))??It(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(Ie,"finalizeIssue");function bn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(bn,"getLengthableOrigin");function ur(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(ur,"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=I("$ZodError",In),Ye=I("$ZodError",In,{Parent:Error});var su=i(e=>(t,r,n,o)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new de;if(c.issues.length){let l=new(o?.Err??e)(c.issues.map(f=>Ie(f,u,ye())));throw sr(l,o?.callee),l}return c.value},"_parse"),St=su(Ye),uu=i(e=>async(t,r,n,o)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let l=new(o?.Err??e)(c.issues.map(f=>Ie(f,u,ye())));throw sr(l,o?.callee),l}return c.value},"_parseAsync"),At=uu(Ye),cu=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},o);if(u instanceof Promise)throw new de;return u.issues.length?{success:!1,error:new(e??Tn)(u.issues.map(c=>Ie(c,o,ye())))}:{success:!0,data:u.value}},"_safeParse"),Qe=cu(Ye),pu=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Ie(c,o,ye())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=pu(Ye);var lu="(?:(?:\\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])))",du=new RegExp(`^${lu}$`);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 cr=/^-?\d+(?:\.\d+)?$/,Sn=/^(?:true|false)$/i;var Ue=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var An=I("$ZodCheckMinLength",(e,t)=>{var r;Ue.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 pr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.init(e,t),e._zod.onattach.push(o=>{let u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=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=I("$ZodCheckRegex",(e,t)=>{pr.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=I("$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 u of o._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((c,l,f)=>{let h=Ce(c),P;for(let E of l){if(E._zod.def.when){if(!E._zod.def.when(c))continue}else if(h)continue;let x=c.issues.length,s=E._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new de;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(h||(h=Ce(c,x)))});else{if(c.issues.length===x)continue;h||(h=Ce(c,x))}}return P?P.then(()=>c):c},"runChecks"),u=i((c,l,f)=>{if(Ce(c))return c.aborted=!0,c;let h=o(l,n,f);if(h instanceof Promise){if(f.async===!1)throw new de;return h.then(P=>e._zod.parse(P,f))}return e._zod.parse(h,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return h instanceof Promise?h.then(P=>u(P,c,l)):u(h,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new de;return f.then(h=>o(h,n,l))}return o(f,n,l)}}J(e,"~standard",()=>({validate:i(o=>{try{let u=Qe(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return et(e,o).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kt=I("$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}}),lr=I("$ZodStringFormat",(e,t)=>{pr.init(e,t),kt.init(e,t)});var Cn=I("$ZodURL",(e,t)=>{lr.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=I("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??cr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let u=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,...u?{received:u}:{}}),r}});var dr=I("$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=I("$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 Ln=I("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=r=>r}),jn=I("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=r=>r});var Fn=I("$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=I("$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,u=o instanceof Date;return u&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...u?{received:"Invalid Date"}:{},inst:e}),r}});function On(e,t,r){e.issues.length&&t.issues.push(...be(r,e.issues)),t.value[r]=e.value}i(On,"handleArrayResult");var Zn=I("$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 u=[];for(let c=0;c<o.length;c++){let l=o[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?u.push(f.then(h=>On(h,r,c))):On(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function wt(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...be(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(wt,"handlePropertyResult");function mu(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=_n(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(mu,"normalizeDef");function fu(e,t,r,n,o,u){let c=[],l=o.keySet,f=o.catchall._zod,h=f.def.type,P=f.optout==="optional";for(let E in t){if(l.has(E))continue;if(h==="never"){c.push(E);continue}let x=f.run({value:t[E],issues:[]},n);x instanceof Promise?e.push(x.then(s=>wt(s,r,E,t,P))):wt(x,r,E,t,P)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}i(fu,"handleCatchall");var Vn=I("$ZodObject",(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Tt(()=>mu(t));J(e._zod,"propValues",()=>{let l=t.shape,f={};for(let h in l){let P=l[h]._zod;if(P.values){f[h]??(f[h]=new Set);for(let E of P.values)f[h].add(E)}}return f});let o=Xe,u=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let h=l.value;if(!o(h))return l.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),l;l.value={};let P=[],E=c.shape;for(let x of c.keys){let s=E[x],d=s._zod.optout==="optional",g=s._zod.run({value:h[x],issues:[]},f);g instanceof Promise?P.push(g.then(m=>wt(m,l,x,h,d))):wt(g,l,x,h,d)}return u?fu(P,h,l,f,n.value,e):P.length?Promise.all(P).then(()=>l):l}});function Rn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let o=e.filter(u=>!Ce(u));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(u=>u.issues.map(c=>Ie(c,n,ye())))}),t)}i(Rn,"handleUnionResults");var mr=I("$ZodUnion",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),J(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),J(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),J(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>$t(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(r)return n(o,u);let c=!1,l=[];for(let f of t.options){let h=f._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)l.push(h),c=!0;else{if(h.issues.length===0)return h;l.push(h)}}return c?Promise.all(l).then(f=>Rn(f,o,e,u)):Rn(l,o,e,u)}});var Hn=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,mr.init(e,t);let r=e._zod.parse;J(e._zod,"propValues",()=>{let o={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[l,f]of Object.entries(c)){o[l]||(o[l]=new Set);for(let h of f)o[l].add(h)}}return o});let n=Tt(()=>{let o=t.options,u=new Map;for(let c of o){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(o,u)=>{let c=o.value;if(!Xe(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),o;let l=n.value.get(c?.[t.discriminator]);return l?l._zod.run(o,u):t.unionFallback?r(o,u):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),o)}});var Wn=I("$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 u=[],c=t.keyType._zod.values;if(c){r.value={};let l=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){l.add(typeof h=="number"?h.toString():h);let P=t.valueType._zod.run({value:o[h],issues:[]},n);P instanceof Promise?u.push(P.then(E=>{E.issues.length&&r.issues.push(...be(h,E.issues)),r.value[h]=E.value})):(P.issues.length&&r.issues.push(...be(h,P.issues)),r.value[h]=P.value)}let f;for(let h in o)l.has(h)||(f=f??[],f.push(h));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(o)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&cr.test(l)&&f.issues.length){let E=t.keyType._zod.run({value:Number(l),issues:[]},n);if(E instanceof Promise)throw new Error("Async schemas not supported in object keys currently");E.issues.length===0&&(f=E)}if(f.issues.length){t.mode==="loose"?r.value[l]=o[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(E=>Ie(E,n,ye())),input:l,path:[l],inst:e});continue}let P=t.valueType._zod.run({value:o[l],issues:[]},n);P instanceof Promise?u.push(P.then(E=>{E.issues.length&&r.issues.push(...be(l,E.issues)),r.value[f.value]=E.value})):(P.issues.length&&r.issues.push(...be(l,P.issues)),r.value[f.value]=P.value)}}return u.length?Promise.all(u).then(()=>r):r}});var qn=I("$ZodEnum",(e,t)=>{W.init(e,t);let r=ar(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Pn.has(typeof o)).map(o=>typeof o=="string"?De(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{let c=o.value;return n.has(c)||o.issues.push({code:"invalid_value",values:r,input:c,inst:e}),o}}),Gn=I("$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"?De(n):n?De(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var Kn=I("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(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 de;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 Jn=I("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",J(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(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(u=>Nn(u,r.value)):Nn(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Xn=I("$ZodNullable",(e,t)=>{W.init(e,t),J(e._zod,"optin",()=>t.innerType._zod.optin),J(e._zod,"optout",()=>t.innerType._zod.optout),J(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)}|null)$`):void 0}),J(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=I("$ZodPipe",(e,t)=>{W.init(e,t),J(e._zod,"values",()=>t.in._zod.values),J(e._zod,"optin",()=>t.in._zod.optin),J(e._zod,"optout",()=>t.out._zod.optout),J(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(u=>zt(u,t.out,n)):zt(o,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(zt,"handlePipeResult");var Qn=I("$ZodCustom",(e,t)=>{Ue.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(u=>Dn(u,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(ur(o))}}i(Dn,"handleRefineResult");var to,vu=Symbol("ZodOutput"),xu=Symbol("ZodInput"),fr=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 fr}i(ro,"registry");(to=globalThis).__zod_globalRegistry??(to.__zod_globalRegistry=ro());var gr=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 po(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}i(po,"_coercedBigint");function lo(e){return new e({type:"any"})}i(lo,"_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 ce(e,t){return new An({check:"min_length",...H(t),minimum:e})}i(ce,"_minLength");function Te(e,t){return new zn({check:"string_format",format:"regex",...H(t),pattern:e})}i(Te,"_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=I("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)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>At(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)=>Et(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=I("ZodMiniString",(e,t)=>{kt.init(e,t),X.init(e,t)});function a(e){return no(Rt,e)}i(a,"string");var ho=I("ZodMiniStringFormat",(e,t)=>{lr.init(e,t),Rt.init(e,t)});var zu=I("ZodMiniURL",(e,t)=>{Cn.init(e,t),ho.init(e,t)});function vo(e){return io(zu,e)}i(vo,"url");var yr=I("ZodMiniNumber",(e,t)=>{Un.init(e,t),X.init(e,t)});function ee(e){return ao(yr,e)}i(ee,"number");var hr=I("ZodMiniBoolean",(e,t)=>{dr.init(e,t),X.init(e,t)});function Z(e){return uo(hr,e)}i(Z,"boolean");var xo=I("ZodMiniBigInt",(e,t)=>{Mn.init(e,t),X.init(e,t)});var wu=I("ZodMiniAny",(e,t)=>{Ln.init(e,t),X.init(e,t)});function rt(){return lo(wu)}i(rt,"any");var ku=I("ZodMiniUnknown",(e,t)=>{jn.init(e,t),X.init(e,t)});function k(){return mo(ku)}i(k,"unknown");var Ou=I("ZodMiniVoid",(e,t)=>{Fn.init(e,t),X.init(e,t)});function Po(e){return fo(Ou,e)}i(Po,"_void");var _o=I("ZodMiniDate",(e,t)=>{Bn.init(e,t),X.init(e,t)});var Ru=I("ZodMiniArray",(e,t)=>{Zn.init(e,t),X.init(e,t)});function N(e,t){return new Ru({type:"array",element:e,...H(t)})}i(N,"array");var Nu=I("ZodMiniObject",(e,t)=>{Vn.init(e,t),X.init(e,t),J(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new Nu(r)}i(p,"object");var Du=I("ZodMiniUnion",(e,t)=>{mr.init(e,t),X.init(e,t)});function D(e,t){return new Du({type:"union",options:e,...H(t)})}i(D,"union");var Cu=I("ZodMiniDiscriminatedUnion",(e,t)=>{Hn.init(e,t),X.init(e,t)});function Me(e,t,r){return new Cu({type:"union",options:t,discriminator:e,...H(r)})}i(Me,"discriminatedUnion");var Uu=I("ZodMiniRecord",(e,t)=>{Wn.init(e,t),X.init(e,t)});function O(e,t,r){return new Uu({type:"record",keyType:e,valueType:t,...H(r)})}i(O,"record");var Mu=I("ZodMiniEnum",(e,t)=>{qn.init(e,t),X.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Mu({type:"enum",entries:r,...H(t)})}i(U,"_enum");var Lu=I("ZodMiniLiteral",(e,t)=>{Gn.init(e,t),X.init(e,t)});function S(e,t){return new Lu({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}i(S,"literal");var ju=I("ZodMiniTransform",(e,t)=>{Kn.init(e,t),X.init(e,t)});function $e(e){return new ju({type:"transform",transform:e})}i($e,"transform");var Fu=I("ZodMiniOptional",(e,t)=>{Jn.init(e,t),X.init(e,t)});function y(e){return new Fu({type:"optional",innerType:e})}i(y,"optional");var Bu=I("ZodMiniNullable",(e,t)=>{Xn.init(e,t),X.init(e,t)});function nt(e){return new Bu({type:"nullable",innerType:e})}i(nt,"nullable");var Zu=I("ZodMiniPipe",(e,t)=>{Yn.init(e,t),X.init(e,t)});function Ee(e,t){return new Zu({type:"pipe",in:e,out:t})}i(Ee,"pipe");var Vu=I("ZodMiniCustom",(e,t)=>{Qn.init(e,t),X.init(e,t)});function Nt(e,t){return yo(Vu,e??(()=>!0),t)}i(Nt,"custom");var ot={};fn(ot,{bigint:()=>Xu,boolean:()=>Ju,date:()=>Yu,number:()=>Ku,string:()=>Gu});function Gu(e){return oo(Rt,e)}i(Gu,"string");function Ku(e){return so(yr,e)}i(Ku,"number");function Ju(e){return co(hr,e)}i(Ju,"boolean");function Xu(e){return po(xo,e)}i(Xu,"bigint");function Yu(e){return go(_o,e)}i(Yu,"date");var xr=p({retryOnFailure:p({defaultValue:y(Z()),hide:y(Z())}),continueOnFailure:p({defaultValue:y(Z()),hide:y(Z())})}),vr=class{constructor(t,r,n,o,u,c,l,f,h,P,E){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=h;this.audience=P;this.aiMetadata=E}static{i(this,"IAction")}},Y=i(e=>new vr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var B=p({displayName:a(),description:y(a())}),C=i((e,t)=>p({type:S(t),required:Z(),defaultValue:y(rt())}),"TPropertyValue");var ie=p({...B.shape,...C(a(),"SHORT_TEXT").shape}),he=p({...B.shape,...C(a(),"LONG_TEXT").shape});var Io=p({label:a(),value:k()}),Dt=p({disabled:y(Z()),placeholder:y(a()),options:N(Io)});var ae=p({...B.shape,options:Dt,...C(k(),"STATIC_DROPDOWN").shape}),ve=p({...B.shape,options:Dt,...C(N(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Pr=p({...B.shape,...C(k(),"DROPDOWN").shape,refreshers:N(a())}),it=p({...B.shape,...C(N(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var xe=p({...B.shape,...C(Z(),"CHECKBOX").shape});var Pe=p({...B.shape,...C(ee(),"NUMBER").shape});var at=p({...B.shape,...C(k(),"FILE").shape});var st=p({...B.shape,...C(a(),"DATE_TIME").shape});var To=O(a(),D([ie,he,ae,it,ve,xe,Pe,at,st])),ut=p({...B.shape,properties:To,...C(N(k()),"ARRAY").shape});var ct=p({...B.shape,...C(D([O(a(),k())]),"JSON").shape});var $o=D([ie,ae,ct,ut,ve]),ec=O(a(),$o),_r=p({refreshers:N(a()),...B.shape,...C(k(),"DYNAMIC").shape});var Ct=p({...B.shape,...C(Po(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),Le=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Le||{}),lt=(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))(lt||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),br="both_client_credentials_and_authorization_code";var te=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(te||{}),mt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(mt||{}),tc=p({strategy:U(mt),paramName:y(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),Eo=p({status:y(ee()),body:y(k()),headers:y(O(a(),a()))}),So=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(U(Ut))}),Ao=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:Eo,handlerId:y(a()),streamStepProgress:y(U(Ut))}),rc=D([So,Ao]);var nc=p({body:k(),rawBody:y(k()),headers:O(a(),a()),queryParams:O(a(),a())});function pe(e){return e==null}i(pe,"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 Mt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(Mt,"assertNotNullOrUndefined");var Ir=Ne(require("crypto"),1);var oc=128,we,je,ic=i(e=>{!we||we.length<e?(we=Buffer.allocUnsafe(e*oc),Ir.default.randomFillSync(we),je=0):je+e>we.length&&(Ir.default.randomFillSync(we),je=0),je+=e},"fillPool"),ac=i(e=>(ic(e|=0),we.subarray(je-e,je)),"random"),sc=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(u=t)=>{let c="";for(;;){let l=r(o),f=o;for(;f--;)if(c+=e[l[f]&n]||"",c.length===u)return c}}},"customRandom"),wo=i((e,t=21)=>sc(e,t,ac),"customAlphabet");var uc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,ub=a().check(Te(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),cc=wo(uc,ko);var Se=Ee($e(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:Se,updated:Se},V=i(e=>y(nt(e)),"Nullable");function Tr(e){return y(nt(U(e)))}i(Tr,"NullableEnum");var lb=Ee($e(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(Z())),Lt=i(e=>Ee($e(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(N(e))),"OptionalArrayFromQuery");var fb=O(a(),k());var yt=(P=>(P.OPENAI="openai",P.OPENROUTER="openrouter",P.ANTHROPIC="anthropic",P.AZURE="azure",P.GOOGLE="google",P.ACTIVEPIECES="activepieces",P.CLOUDFLARE_GATEWAY="cloudflare-gateway",P.CUSTOM="custom",P.BEDROCK="bedrock",P.MISTRAL="mistral",P))(yt||{});var Eb=a().check(Te(/^#[0-9A-Fa-f]{6}$/));var Ab=p({filename:a(),data:k(),type:S("file"),mimetype:y(a())});var pc=Ne(Ro());var Db=p({...se,name:a(),permissions:N(a()),platformId:V(a()),type:a(),userCount:y(ee())});var No=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(No||{}),$r=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))($r||{}),Er=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Er||{});var Sr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Sr||{});var Ar=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Ar||{});var lc=p({mode:U(No),value:k()}),dc=p({auth:y(a()),fields:O(a(),lc)}),mc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(dc)}),fc=p({type:S("PIECE"),toolName:a().check(ce(1)),pieceMetadata:mc}),gc=p({type:S("none")}),yc=p({type:S("access_token"),accessToken:a()}),hc=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),vc=p({type:S("headers"),headers:O(a(),a())}),xc=Me("type",[gc,yc,hc,vc]),Do=p({type:S("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:y(a())}),Co=p({type:S("MCP"),toolName:a().check(ce(1)),serverUrl:vo(),protocol:U(Er),auth:xc}),Uo=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U($r),sourceId:a(),sourceName:a()}),Pc=Me("type",[fc,Do,Co,Uo]),_c=p({displayName:a(),description:y(a()),type:U(Sr)}),Mo=p({type:S("MARKDOWN"),markdown:a()}),Fe={type:S("TOOL_CALL"),input:V(O(a(),k())),output:y(k()),toolName:a(),status:U(Ar),toolCallId:a(),startTime:a(),endTime:y(a())},uI=p(Fe),Lo=Me("toolCallType",[p({...Fe,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Fe,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),p({...Fe,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),p({...Fe,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Fe,toolCallType:S("UNKNOWN"),displayName:a()})]),bc=D([Mo,Lo]);var zr=(r=>(r.IMAGE="image",r.TEXT="text",r))(zr||{}),_e=p({apiKey:a()}),Ic=_e,Tc=p({apiKey:a(),apiKeyHash:a()}),$c=_e,Ec=_e,Sc=_e,Ac=_e,zc=_e,wc=_e,kc=_e,jo=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),Oc=p({}),Rc=p({}),Nc=p({}),Dc=p({}),Cc=p({}),Uc=p({}),Fo=p({modelId:a(),modelName:a(),modelType:U(zr)}),Bo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Fo),defaultHeaders:y(O(a(),a()))}),Zo=p({accountId:a(),gatewayId:a(),models:N(Fo),vertexProject:y(a()),vertexRegion:y(a())}),Vo=p({resourceName:a(),apiVersion:Ee($e(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),Ho=p({region:a().check(ce(1))}),Mc=D([Ic,Sc,Ac,zc,wc,Ec,$c,Tc,jo,kc]),Wo=D([Bo,Zo,Vo,Ho,Oc,Nc,Dc,Cc,Rc,Uc]),Lc=p({id:a(),name:a(),type:U(zr)}),jc=p({id:a(),name:a(),provider:U(yt),config:Wo,enabledForChat:Z()}),Fc=p({provider:U(yt),config:Wo,auth:Mc,platformId:a()});var dI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Bc=p({base64Url:a(),fileName:a(),extension:y(a())}),Zc=p({mimeType:a(),url:a(),fileName:y(a())}),wr=D([Bc,Zc]);var Vc=D([p({type:S("file"),value:wr}),p({type:S("markdown"),value:a(),files:y(N(wr))})]),Hc=p({sessionId:a(),message:a(),files:y(N(a()))});var Go=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Go||{}),Ko=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ko||{}),kr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(kr||{});var Wc=D([p({...se,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),qc=p({...se,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Tr(Ko),trigger:Tr(Go)}),Gc=p({...se,tableId:a(),projectId:a(),cells:O(a(),p({updated:a(),created:a(),value:k(),fieldName:a()}))}),Kc=p({events:N(U(kr)),webhookUrl:a(),flowId:a()}),Jc=p({fields:N(p({id:a(),name:a()})),rows:N(O(a(),a())),name:a()}),Xc=p({projectId:a(),limit:y(ot.number()),cursor:y(a()),name:y(a()),externalIds:Lt(a()),folderId:y(a()),folderIds:Lt(a())}),Yc=p({records:N(N(p({fieldId:a(),value:Xo()}))),tableId:a()}),Qc=p({cells:y(N(p({fieldId:a(),value:Xo()}))),tableId:a(),agentUpdate:y(Z())}),Jo=Me("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),qo("exists"),qo("not_exists")]),ep=p({tableId:a(),limit:y(ot.number()),cursor:y(a()),filters:Lt(Jo)});function Xo(){return Ee($e(e=>e==null?e:String(e)),nt(a()))}i(Xo,"coerceToString");function ke(e){return p({fieldId:a(),operator:S(e),value:a()})}i(ke,"valueFilter");function qo(e){return p({fieldId:a(),operator:S(e)})}i(qo,"existenceFilter");var tp=p({status:y(ee()),body:y(k()),headers:y(O(a(),a()))}),rp=p({...se,deleted:V(Se),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var Yo=p({name:a(),description:y(a()),type:a(),required:Z()}),np=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Yo),returnsResponse:Z()})});var Qo="^[0-9]+\\.[0-9]+\\.[0-9]+$",kI=new RegExp(Qo),ip="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",OI=a().check(Te(new RegExp(Qo))),RI=a().check(Te(new RegExp(ip))),ap=p({packageType:S("ARCHIVE"),pieceType:U(Le),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),ei=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ti=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),NI=D([ei,ti]),DI=D([ap,ei,ti]),ri=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ri||{}),sp=p({type:U(ri),cronExpression:a(),timezone:a()}),CI=p({...se,type:U(te),projectId:a(),flowId:a(),triggerName:a(),schedule:V(sp),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:Z()}),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||{}),UI=p({...se,projectId:V(a()),platformId:V(a()),type:U(ni),compression:U(oi),data:y(k()),location:U(ii),size:V(ee()),fileName:V(a()),s3Key:V(a()),metadata:V(O(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||{}),MI=p({id:a(),email:a(),firstName:a(),status:U(si),externalId:V(a()),platformId:V(a()),platformRole:U(ai),lastName:a(),created:Se,updated:Se,lastActiveDate:V(Se),imageUrl:V(a())});var Rr=p({...B.shape,...C(O(a(),k()),"OBJECT").shape});var pi=p({...B.shape,...C(a(),"COLOR").shape});var Nr=D([ie,he,Ct,xe,ae,ve,Pr,it,_r,Pe,ut,Rr,ct,st,at,pi]),b={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var me=p({displayName:a(),description:y(a())});var li=p({username:a(),password:a()}),Dr=p({...me.shape,username:p({displayName:a(),description:y(a())}),password:p({displayName:a(),description:y(a())}),...C(li,"BASIC_AUTH").shape});var lp=O(a(),D([ie,he,Pe,xe,ae])),Cr=p({...me.shape,props:lp,...C(k(),"CUSTOM_AUTH").shape});var Oe=p({...me.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var dp=O(a(),D([ie,he,Oe,Pe,xe,ae,ve,Ct])),di=p({...me.shape,props:dp,...C(k(),"OIDC").shape});var Ur=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Ur||{}),mi=D([ie,Oe,ae]),fi=O(a(),mi),mp=p({props:y(O(a(),mi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:y(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:y(Z()),pkceMethod:y(D([S("plain"),S("S256")])),authorizationMethod:y(U(Ur)),grantType:y(D([U(dt),S(br)])),extra:y(O(a(),a()))}),gi=p({access_token:a(),props:y(fi),data:O(a(),rt())}),Mr=p({...me.shape,...mp.shape,...C(gi,"OAUTH2").shape});var Be=D([Dr,Cr,di,Mr,Oe]),ht="Connection",Ft={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 y$={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 fp=p({...B.shape,...C(k(),"CUSTOM").shape,code:a()});var gp=D([Nr,Be]),Lr=O(a(),gp),C$=O(a(),Nr);var yi=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]),Ze=class{constructor(t,r,n,o,u,c,l,f,h,P,E,x,s,d,g,m,v,_,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=u;this.type=c;this.handshakeConfiguration=l;this.onHandshake=f;this.renewConfiguration=h;this.onRenew=P;this.onEnable=E;this.onDisable=x;this.onStart=s;this.run=d;this.test=g;this.sampleData=m;this.testStrategy=v;this.outputSchema=_;this.aiMetadata=j}static{i(this,"ITrigger")}},re=i(e=>{switch(e.type){case"WEBHOOK":return new Ze(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 Ze(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 Ze(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 Ze(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,pe(e.sampleData)&&pe(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var hi="2",Bt="0.82.0";var jr=class{constructor(t,r,n,o,u,c,l,f,h=Bt,P,E=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=l;this.auth=f;this.minimumSupportedRelease=h;this.maximumSupportedRelease=P;this.description=E;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:hi}),"getContextInfo");(!yp(h)||hp(h,Bt))&&(this.minimumSupportedRelease=Bt),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}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}},vi=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new jr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function yp(e){return/^\d+\.\d+\.\d+$/.test(e)}i(yp,"isValidSimpleSemver");function hp(e,t){let[r,n,o]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:o<l}i(hp,"isSemverLessThan");var vp=y(O(a(),O(a(),a()))),xi=p({id:y(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:y(a()),directoryPath:y(a()),auth:y(D([Be,N(Be)])),version:a(),categories:y(N(U(lt))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),i18n:vp}),xp=U(["human","ai","both"]),Pi=p({description:y(a()),idempotent:y(Z())}),_i=p({name:a(),displayName:a(),description:a(),props:Lr,requireAuth:Z(),errorHandlingOptions:y(xr),outputSchema:y(Nt()),audience:y(xp),aiMetadata:y(Pi)}),bi=p({name:a(),displayName:a(),description:a(),props:Lr,errorHandlingOptions:y(xr),type:U(te),sampleData:k(),handshakeConfiguration:y(Nt()),renewConfiguration:y(yi),testStrategy:U(ft),outputSchema:y(Nt()),aiMetadata:y(Pi)}),Pp=p({...xi.shape,actions:O(a(),_i),triggers:O(a(),bi)}),_p=p({...xi.shape,actions:ee(),triggers:ee(),suggestedActions:y(N(bi)),suggestedTriggers:y(N(_i))}),Ii=p({projectUsage:ee(),tags:y(N(a())),pieceType:U(Le),packageType:U(pt),platformId:y(a()),archiveId:y(a())}),CE=p({...Pp.shape,...Ii.shape}),UE=p({..._p.shape,...Ii.shape}),ME=p({name:a(),version:a()});var bp=Ne(require("path")),Ip=Ne(require("fs/promises"));var Zt=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((u,c)=>{o.append(c,u)}),{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 Vt=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Fr,r=new Br){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Fr=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Br=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 Ht=class extends Error{constructor(r,n){let o=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:u},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=u}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 Wt=class extends Zt{static{i(this,"FetchHttpClient")}constructor(t="",r=new Vt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,oe]of Object.entries(c))o.append(j,oe);let l=o.toString(),f=l?`${n}?${l}`:n,h=t.responseType??"json",P=t.followRedirects??!0,E=t.retries??0,{body:x,extraHeaders:s,isStream:d}=Tp(t.body,u),g=Ep({...u,...s}),m=await $p(async()=>{let j=new AbortController,oe=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ue={method:t.method.toString(),headers:g,body:x,redirect:P?"follow":"manual",signal:j.signal};return d&&(ue.duplex="half"),r?.dispatcher!==void 0&&(ue.dispatcher=r.dispatcher),await fetch(f,ue)}finally{oe!==void 0&&clearTimeout(oe)}},E),v=P?300:400;if(m.status<200||m.status>=v){let j=await Ti(m,h),oe=new Ht(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",oe),oe}let _=await Ti(m,h);return{status:m.status,headers:Sp(m.headers),body:_}}};function Tp(e,t){return zp(e)?{body:void 0,extraHeaders:{},isStream:!1}:Ap(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(Tp,"serializeBody");async function Ti(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(Ti,"parseResponseBody");async function $p(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await $i(n);continue}return o}catch(o){if(r=o,n<t){await $i(n);continue}throw o}throw r}i($p,"sendWithRetries");function $i(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i($i,"backoff");function Ep(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(Ep,"normalizeHeaders");function Sp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(Sp,"toHttpHeaders");function Ap(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i(Ap,"isNodeFormData");function zp(e){return e==null}i(zp,"isNil");var qt=new Wt;var Zr=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Zr||{});var yd=Ne(require("fs")),ks=Ne(ws());var hd={"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 vd(e){let t=e.split(";")[0].trim().toLowerCase();return hd[t]??""}i(vd,"contentTypeToExtension");var xd=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Pd=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 Os({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:u,props:c,extraProps:l,authLocation:f="headers"}){return Y({audience:"human",name:u||"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:b.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:h})=>({url:b.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${Pd(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...c?.url??{}})}),"props")}),method:b.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Zr).map(h=>({label:h,value:h}))},...c?.method??{}}),headers:b.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:b.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:b.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:b.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:h})=>{if(!h)return{};let P=h,E={};switch(P){case"none":break;case"json":E.data=b.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":E.data=b.LongText({displayName:"Raw Body",required:!0});break;case"form_data":E.data=b.Array({displayName:"Form Data",required:!0,properties:{fieldName:b.ShortText({displayName:"Field Name",required:!0}),fieldType:b.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:b.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:b.File({displayName:"File Field Value",required:!1})}});break}return E},"props")}),response_is_binary:b.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:b.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:b.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:b.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:i(async h=>{let{method:P,url:E,headers:x,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:_,followRedirects:j}=h.propsValue;Mt(P,"Method"),Mt(E,"URL");let oe=pe(r)?{}:await r(h.auth,h.propsValue),ue=E.url,Ke=ue.startsWith("http://")||ue.startsWith("https://")?ue:xd({baseUrl:t(h.auth),relativePath:ue}),ze={method:P,url:Ke,headers:{...x??{},...f==="headers"||!pe(f)?oe:{}},queryParams:{...f==="queryParams"?oe:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(_&&(ze.responseType="arraybuffer"),d)if(g&&g!=="none"){let ge=d.data;if(g==="form_data"){let Ks=ge,_t=new ks.default;for(let{fieldName:ln,fieldType:dn,textFieldValue:mn,fileFieldValue:nr}of Ks)dn==="text"&&!gt(mn)?_t.append(ln,mn):dn==="file"&&!gt(nr)&&_t.append(ln,nr.data,{filename:nr?.filename});ze.body=_t,ze.headers={...ze.headers,..._t.getHeaders()}}else ze.body=ge}else g||(ze.body=d);try{let ge=await qt.sendRequest(ze);return await _d(h.files,ge.body,ge.status,ge.headers,_)}catch(ge){if(m)return ge.errorMessage();throw ge}},"run")})}i(Os,"createCustomApiCallAction");var _d=i(async(e,t,r,n,o)=>{let u;if(o&&bd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=vd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),bd=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");async function K({method:e,url:t,body:r,auth:n}){let o={method:e,url:`https://api.respond.io/v2${t}`,authentication:{type:"BEARER_TOKEN",token:n.props.token},headers:{"Content-Type":"application/json",accept:"application/json"},body:r};try{return(await qt.sendRequest(o)).body}catch(u){let c=u,l=c.response?.status,f=c.response?.body?.message||"No details provided";switch(l){case 400:throw new Error(`Bad Request: The request format is incorrect or missing required data. Please check your input values. Details: ${f}`);case 401:throw new Error(`Authentication Error: Your API token is invalid or expired. Please check your Respond.io API token in the connection settings. Details: ${f}`);case 403:throw new Error(`Access Forbidden: Your API token doesn't have permission for this operation. Please check your Respond.io account permissions. Details: ${f}`);case 404:throw new Error(`Resource Not Found: The requested contact, conversation, or resource doesn't exist in your Respond.io workspace. Details: ${f}`);case 409:throw new Error(`Conflict: The resource already exists or there's a data conflict. This often happens when trying to create a contact with an existing identifier. Details: ${f}`);case 429:throw new Error(`Rate Limit Exceeded: Too many requests to Respond.io API. Please wait a moment before trying again. Details: ${f}`);case 449:throw new Error(`Request Failed: The request could not be completed. This may be a temporary issue with Respond.io services. Please try again later. Details: ${f}`);case 500:throw new Error(`Server Error: Respond.io is experiencing technical difficulties. Please try again later or contact Respond.io support. Details: ${f}`);default:{let h=c.message||"Unknown error occurred";throw new Error(`Respond.io API Error (Status ${l||"Unknown"}): ${f||h}`)}}}}i(K,"respondIoApiCall");var Id=Ft.SecretText({displayName:"API Token",description:"Your Respond.io API v2 Token.",required:!0}),L=Ft.CustomAuth({description:`
4
+ Please follow these steps to get your Respond.io API token:
5
+
6
+ 1. Log in to your Respond.io account.
7
+ 2. In the left sidebar, navigate to Settings.
8
+ 3. Under Workspace Settings, click on Integrations.
9
+ 4. Locate and click on the Developer API option.
10
+ 5. Within the Developer API section, find your API key or generate a new one if needed.`,props:{token:Id},validate:i(async({auth:e})=>{try{return await K({method:"GET",url:"/space/user",auth:{type:"CUSTOM_AUTH",props:e}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API Token"}}},"validate"),required:!0});var fe=b.Dropdown({auth:L,displayName:"Contact",description:"Select the contact.",required:!0,refreshers:["auth"],options:i(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Connect your Respond.io account first"};try{let r=(await K({auth:e,method:"POST",url:"/contact/list",body:{search:"",filter:{$and:[]},timezone:"UTC"}})).items;return r.length===0?{disabled:!0,options:[],placeholder:"No contacts found in your workspace."}:{disabled:!1,options:r.map(n=>{let o=n.email||n.phone||`ID: ${n.id}`;return{label:`${n.firstName||""} ${n.lastName||""} (${o})`.trim(),value:`id:${n.id}`}})}}catch(t){let r=t instanceof Error?t.message:"Unknown error occurred";return{disabled:!0,options:[],placeholder:`Error loading contacts: ${r}`}}},"options")}),Rs=b.Dropdown({auth:L,displayName:"Assignee",description:"Select the user to assign the conversation to.",required:!0,refreshers:["auth"],options:i(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Connect your Respond.io account first"};try{let r=(await K({auth:e,method:"GET",url:"/space/user"})).items;return r.length===0?{disabled:!0,options:[],placeholder:"No users found in your workspace."}:{disabled:!1,options:[{label:"Unassigned",value:"null"},...r.map(n=>({label:`${n.firstName} ${n.lastName} (${n.email})`,value:n.id.toString()}))]}}catch(t){let r=t instanceof Error?t.message:"Unknown error occurred";return{disabled:!0,options:[],placeholder:`Error loading users: ${r}`}}},"options")});var Ns=Y({auth:L,name:"add_comment_to_conversation",displayName:"Add Comment to Conversation",description:"Add an internal comment/note to a conversation in Respond.io.",audience:"both",aiMetadata:{description:"Posts an internal comment (note visible to team members, not the contact) on a contact's conversation in Respond.io. Use to leave context for agents rather than to message the contact. Requires the contact identifier and comment text (max 1000 chars); supports @-mentioning users via {{@user.ID}}. Not idempotent \u2014 each call appends another comment.",idempotent:!1},props:{identifier:fe,text:b.LongText({displayName:"Comment Text",description:"The internal comment to add (max 1000 characters). You can mention users with {{@user.ID}} format where ID is the user ID.",required:!0})},async run({propsValue:e,auth:t}){let{identifier:r,text:n}=e;if(!n||n.trim().length===0)throw new Error("Comment text is required and cannot be empty.");if(n.length>1e3)throw new Error(`Comment text is too long (${n.length} characters). Maximum allowed is 1000 characters.`);return await K({method:"POST",url:`/contact/${r}/comment`,auth:t,body:{text:n.trim()}})}});var Ds=Y({auth:L,name:"add_tag_to_contact",displayName:"Add Tag to Contact",description:"Add one or multiple tags to a contact in Respond.io.",audience:"both",aiMetadata:{description:"Adds one or more tags to a Respond.io contact, identified by the contact identifier. Use to label or segment a contact. Accepts 1-10 tag names per call. Idempotent on the resulting tag set \u2014 re-adding a tag the contact already has leaves it unchanged.",idempotent:!0},props:{identifier:fe,tags:b.Array({displayName:"Tags",description:"Tags to add to the contact (minimum 1, maximum 10 tags).",required:!0,properties:{tag:b.ShortText({displayName:"Tag Name",description:"Name of the tag to add.",required:!0})}})},async run({propsValue:e,auth:t}){let{identifier:r,tags:n}=e;if(!n||!Array.isArray(n)||n.length===0)throw new Error("At least one tag is required.");if(n.length>10)throw new Error("Maximum of 10 tags allowed per request.");let o=n.map(u=>u.tag).filter(u=>u&&u.trim()).map(u=>u.trim());if(o.length===0)throw new Error("At least one valid tag name is required.");return await K({method:"POST",url:`/contact/${r}/tag`,auth:t,body:o})}});var Cs=Y({auth:L,name:"assign_or_unassign_conversation",displayName:"Assign or Unassign Conversation",description:"Assign or unassign a conversation to/from a team member in Respond.io.",audience:"both",aiMetadata:{description:"Sets (or clears) the assignee on a contact's conversation in Respond.io. Two modes: provide a user to assign, or leave the assignee empty to unassign. Use to route a conversation to a specific agent or remove ownership. Idempotent \u2014 re-applying the same assignee leaves the conversation in the same state.",idempotent:!0},props:{identifier:fe,assignee:{...Rs,description:"Select the user to assign the conversation to. Leave empty to unassign.",required:!1}},async run({propsValue:e,auth:t}){let{identifier:r,assignee:n}=e,o=null;if(n&&n.trim()!==""&&n!=="null"){let u=parseInt(n,10);isNaN(u)?o=n:o=u}return await K({method:"POST",url:`/contact/${r}/conversation/assignee`,auth:t,body:{assignee:o}})}});var Us=Y({auth:L,name:"create_contact",displayName:"Create Contact",description:"Create a new contact record in Respond.io.",audience:"both",aiMetadata:{description:"Creates a new contact in Respond.io, keyed by a unique identifier in `email:...` or `phone:...` form. Use only when adding a brand-new contact; if the contact may already exist, prefer Create or Update Contact, which upserts. Requires the identifier and first name; optional email, phone, language, country, profile picture, and custom fields. Not idempotent \u2014 intended to create a fresh record.",idempotent:!1},props:{identifier:b.ShortText({displayName:"Identifier",description:"Must be a unique identifier for the new contact. Use format: `email:user@example.com` or `phone:+60123456789`.",required:!0}),firstName:b.ShortText({displayName:"First Name",required:!0}),lastName:b.ShortText({displayName:"Last Name",required:!1}),email:b.ShortText({displayName:"Email",description:"The email address of the contact.",required:!1}),phone:b.ShortText({displayName:"Phone",description:"The phone number of the contact (in E.164 format).",required:!1}),language:b.ShortText({displayName:"Language",description:'Language code (e.g., "en", "es") following ISO 639-1.',required:!1}),profilePic:b.ShortText({displayName:"Profile Picture URL",description:"A direct URL to the contact's profile picture.",required:!1}),countryCode:b.ShortText({displayName:"Country Code",description:'Country code (e.g., "US", "MY") following ISO 3166-1 alpha-2.',required:!1}),customFields:b.Array({displayName:"Custom Fields",description:"Add custom fields for the contact.",required:!1,properties:{name:b.ShortText({displayName:"Field Name",description:'Name of the custom field (e.g., "Company Website", "Department").',required:!0}),value:b.ShortText({displayName:"Field Value",description:`Value of the custom field. Format based on field type:
11
+ - Text: "string" (use quotation marks)
12
+ - Number: 123 (without quotation marks)
13
+ - Email: "user@domain.com"
14
+ - URL: "https://example.com"
15
+ - Date: "yyyy-mm-dd"
16
+ - Time: "HH:MM" (24H format)
17
+ - Checkbox: "true" or "false"`,required:!1})}})},async run({propsValue:e,auth:t}){let{identifier:r,customFields:n,...o}=e;if(o.email&&o.email.trim()&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o.email))throw new Error("Invalid email format. Please provide a valid email address.");if(o.phone&&o.phone.trim()&&!/^\+[1-9]\d{1,14}$/.test(o.phone))throw new Error("Invalid phone format. Please provide phone number in E.164 format (e.g., +60123456789).");if(o.profilePic&&o.profilePic.trim()&&!/^https?:\/\/[^\s$.?#].[^\s]*$/.test(o.profilePic))throw new Error("Invalid profile picture URL format. Please provide a valid HTTP/HTTPS URL.");if(o.language&&o.language.trim()&&!/^[a-z]{2}$/.test(o.language))throw new Error('Invalid language code. Please provide a valid ISO 639-1 two-letter language code (e.g., "en", "es").');if(o.countryCode&&o.countryCode.trim()&&!/^[A-Z]{2}$/.test(o.countryCode))throw new Error('Invalid country code. Please provide a valid ISO 3166-1 alpha-2 two-letter country code (e.g., "US", "MY").');let u={};for(let[c,l]of Object.entries(o))l!=null&&(u[c]=l);return n&&Array.isArray(n)&&n.length>0&&(u.custom_fields=n.filter(c=>c.name&&c.name.trim()).map(c=>({name:c.name,value:c.value||null}))),await K({method:"POST",url:`/contact/${r}`,auth:t,body:u})}});var Ms=Y({auth:L,name:"create_or_update_contact",displayName:"Create or Update Contact",description:"Create a new contact or update an existing one by email, phone, or ID.",audience:"both",aiMetadata:{description:"Upserts a Respond.io contact keyed by a unique identifier in `id:...`, `email:...`, or `phone:...` form: updates the matching contact if it exists, otherwise creates one. Prefer this over Create Contact when the contact may already exist. Requires the identifier and first name; optional email, phone, language, country, profile picture, and custom fields. Idempotent \u2014 repeating with the same input converges to the same record.",idempotent:!0},props:{identifier:b.ShortText({displayName:"Identifier",description:"Identifier for the contact. Use format: `id:123`, `email:user@example.com`, or `phone:+60123456789`. If contact exists, it will be updated; if not, a new one will be created.",required:!0}),firstName:b.ShortText({displayName:"First Name",required:!0}),lastName:b.ShortText({displayName:"Last Name",required:!1}),email:b.ShortText({displayName:"Email",description:"The email address of the contact.",required:!1}),phone:b.ShortText({displayName:"Phone",description:"The phone number of the contact (in E.164 format).",required:!1}),language:b.ShortText({displayName:"Language",description:'Language code (e.g., "en", "es") following ISO 639-1.',required:!1}),profilePic:b.ShortText({displayName:"Profile Picture URL",description:"A direct URL to the contact's profile picture.",required:!1}),countryCode:b.ShortText({displayName:"Country Code",description:'Country code (e.g., "US", "MY") following ISO 3166-1 alpha-2.',required:!1}),customFields:b.Array({displayName:"Custom Fields",description:"Add custom fields for the contact.",required:!1,properties:{name:b.ShortText({displayName:"Field Name",description:'Name of the custom field (e.g., "Company Website", "Department").',required:!0}),value:b.ShortText({displayName:"Field Value",description:`Value of the custom field. Format based on field type:
18
+ - Text: "string" (use quotation marks)
19
+ - Number: 123 (without quotation marks)
20
+ - Email: "user@domain.com"
21
+ - URL: "https://example.com"
22
+ - Date: "yyyy-mm-dd"
23
+ - Time: "HH:MM" (24H format)
24
+ - Checkbox: "true" or "false"`,required:!1})}})},async run({propsValue:e,auth:t}){let{identifier:r,customFields:n,...o}=e;if(o.email&&o.email.trim()&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o.email))throw new Error("Invalid email format. Please provide a valid email address.");if(o.phone&&o.phone.trim()&&!/^\+[1-9]\d{1,14}$/.test(o.phone))throw new Error("Invalid phone format. Please provide phone number in E.164 format (e.g., +60123456789).");if(o.profilePic&&o.profilePic.trim()&&!/^https?:\/\/[^\s$.?#].[^\s]*$/.test(o.profilePic))throw new Error("Invalid profile picture URL format. Please provide a valid HTTP/HTTPS URL.");if(o.language&&o.language.trim()&&!/^[a-z]{2}$/.test(o.language))throw new Error('Invalid language code. Please provide a valid ISO 639-1 two-letter language code (e.g., "en", "es").');if(o.countryCode&&o.countryCode.trim()&&!/^[A-Z]{2}$/.test(o.countryCode))throw new Error('Invalid country code. Please provide a valid ISO 3166-1 alpha-2 two-letter country code (e.g., "US", "MY").');let u={};for(let[c,l]of Object.entries(o))l!=null&&(u[c]=l);return n&&Array.isArray(n)&&n.length>0&&(u.custom_fields=n.filter(c=>c.name&&c.name.trim()).map(c=>({name:c.name,value:c.value||null}))),await K({method:"POST",url:`/contact/create_or_update/${r}`,auth:t,body:u})}});var Ls=Y({auth:L,name:"delete_contact",displayName:"Delete Contact",description:"Permanently delete a contact from Respond.io.",audience:"both",aiMetadata:{description:"Permanently deletes a contact from Respond.io, identified by the contact identifier. Destructive and irreversible \u2014 use only when the contact should be fully removed. Idempotent on end state: once deleted, repeating leaves the contact absent.",idempotent:!0},props:{identifier:fe},async run({propsValue:e,auth:t}){let{identifier:r}=e;return await K({method:"DELETE",url:`/contact/${r}`,auth:t})}});var js=Y({auth:L,name:"find_contact",displayName:"Find Contact",description:"Search for contacts by name, email, or phone number in Respond.io.",audience:"both",aiMetadata:{description:"Searches Respond.io contacts by a free-text term matching name, email, or phone, returning matching contacts. Use to resolve a contact to its ID before acting on it, or to look up contacts. Supports a result limit (1-99, default 10) and cursor-based pagination. Read-only and idempotent.",idempotent:!0},props:{search:b.ShortText({displayName:"Search Term",description:"The value to search for (e.g., email address, phone number, or name).",required:!0}),timezone:b.ShortText({displayName:"Timezone",description:'Timezone for the search (e.g., "Asia/Kuala_Lumpur"). Optional.',required:!1}),limit:b.Number({displayName:"Result Limit",description:"Number of contacts to return (1-99). Default is 10.",required:!1,defaultValue:10}),cursorId:b.Number({displayName:"Cursor ID",description:"Contact ID to start from for pagination. Optional.",required:!1})},async run({propsValue:e,auth:t}){let{search:r,timezone:n,limit:o=10,cursorId:u}=e;if(o<1||o>=100)throw new Error("Limit must be between 1 and 99.");let c=[`limit=${o}`];u&&c.push(`cursorId=${u}`);let l={search:r,filter:{$and:[]}};return n&&(l.timezone=n),await K({method:"POST",url:`/contact/list?${c.join("&")}`,auth:t,body:l})}});var Fs=Y({auth:L,name:"open_conversation",displayName:"Open Conversation",description:"Mark a conversation as open in Respond.io.",audience:"both",aiMetadata:{description:"Sets a contact's conversation status to open in Respond.io, identified by the contact identifier. Use to (re)open a conversation so it appears in active queues. Idempotent \u2014 opening an already-open conversation leaves it open.",idempotent:!0},props:{identifier:fe},async run({propsValue:e,auth:t}){let{identifier:r}=e;return await K({method:"POST",url:`/contact/${r}/conversation/status`,auth:t,body:{status:"open"}})}});var Bs=re({name:"contact_tag_updated",displayName:"Contact Tag Updated",description:"Triggers when a tag is added or removed from a contact in Respond.io.",aiMetadata:{description:"Fires when a contact's tags change \u2014 a tag is added to or removed from a contact in Respond.io. Delivers the affected contact and its updated tag set. Requires manually configuring a contact.tag.updated webhook in Respond.io."},auth:L,props:{webhookInstructions:b.MarkDown({value:`
25
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
26
+
27
+ 1. Login to your Respond.io account.
28
+ 2. Go to Settings > Integrations > Webhooks.
29
+ 3. Click on "Add Webhook" or "Create New Webhook".
30
+ 4. Add the following URL in the **Webhook URL** field:
31
+ \`\`\`text
32
+ {{webhookUrl}}
33
+ \`\`\`
34
+ 5. Select **contact.tag.updated** from the event types.
35
+ 6. Click Save to create the webhook.
36
+ `})},type:"WEBHOOK",sampleData:void 0,async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var Zs=re({name:"contact_updated",displayName:"Contact Updated",description:"Triggers when an existing contact is updated in Respond.io.",aiMetadata:{description:"Fires when an existing Respond.io contact's details change (e.g. name, email, phone, custom fields), delivering the updated contact. Does not fire on contact creation \u2014 use the New Contact trigger for that. Requires manually configuring a contact.updated webhook in Respond.io."},auth:L,props:{webhookInstructions:b.MarkDown({value:`
37
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
38
+
39
+ 1. Login to your Respond.io account.
40
+ 2. Go to Settings > Integrations > Webhooks.
41
+ 3. Click on "Add Webhook" or "Create New Webhook".
42
+ 4. Add the following URL in the **Webhook URL** field:
43
+ \`\`\`text
44
+ {{webhookUrl}}
45
+ \`\`\`
46
+ 5. Select **contact.updated** from the event types.
47
+ 6. Click Save to create the webhook.
48
+ `})},type:"WEBHOOK",sampleData:void 0,async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var Vs=re({name:"conversation_closed",displayName:"Conversation Closed",description:"Triggers when a conversation is closed.",aiMetadata:{description:"Fires when a conversation is closed in Respond.io, delivering the contact and conversation that was closed. Use to run follow-up actions after a conversation is resolved. Requires manually configuring a conversation.closed webhook in Respond.io."},auth:L,props:{webhookInstructions:b.MarkDown({value:`
49
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
50
+
51
+ 1. Login to your Respond.io account.
52
+ 2. Go to Settings > Integrations > Webhooks.
53
+ 3. Click on "Add Webhook" or "Create New Webhook".
54
+ 4. Add the following URL in the **Webhook URL** field:
55
+ \`\`\`text
56
+ {{webhookUrl}}
57
+ \`\`\`
58
+ 5. Select **conversation.closed** from the event types.
59
+ 6. Click Save to create the webhook.
60
+ `})},type:"WEBHOOK",sampleData:void 0,async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var Hs=re({auth:L,name:"conversation_opened",displayName:"Conversation Opened",description:"Triggers when a new conversation is opened.",aiMetadata:{description:"Fires when a conversation is opened in Respond.io, delivering the contact and conversation details (including source and first incoming message). Use to start a workflow when a new conversation begins. Requires manually configuring a conversation.opened webhook in Respond.io."},type:"WEBHOOK",props:{webhookInstructions:b.MarkDown({value:`
61
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
62
+
63
+ 1. Login to your Respond.io account.
64
+ 2. Go to Settings > Integrations > Webhooks.
65
+ 3. Click on "Add Webhook" or "Create New Webhook".
66
+ 4. Add the following URL in the **Webhook URL** field:
67
+ \`\`\`text
68
+ {{webhookUrl}}
69
+ \`\`\`
70
+ 5. Select **conversation.opened** from the event types.
71
+ 6. Click Save to create the webhook.
72
+ `})},async onEnable(e){},async onDisable(e){},async run(e){let t=e.payload.body;return t.event_type!=="conversation.opened"?[]:[t]},async test(){return[{event_type:"conversation.opened",event_id:"8b9c2905-7a38-4aad-a6b7-b9120dc140fe",contact:{id:1,firstName:"John",lastName:"Doe",phone:"+60123456789",email:"johndoe@sample.com",language:"en",profilePic:"https://cdn.chatapi.net/johndoe.png",countryCode:"MY",status:"open",assignee:{id:2,firstName:"John",lastName:"Doe",email:"johndoe@sample.com"},created_at:1663274081},conversation:{source:"api",conversationOpenedAt:1663274081,firstIncomingMessage:"hello",firstIncomingMessageChannelId:1}}]},sampleData:{}});var Ws=re({name:"new_contact",displayName:"New Contact",description:"Triggers when a new contact is created in Respond.io.",aiMetadata:{description:"Fires when a new contact is created in Respond.io, delivering the newly created contact. Use to react to contact onboarding; for changes to existing contacts use the Contact Updated trigger instead. Requires manually configuring a contact.created webhook in Respond.io."},auth:L,props:{webhookInstructions:b.MarkDown({value:`
73
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
74
+
75
+ 1. Login to your Respond.io account.
76
+ 2. Go to Settings > Integrations > Webhooks.
77
+ 3. Click on "Add Webhook" or "Create New Webhook".
78
+ 4. Add the following URL in the **Webhook URL** field:
79
+ \`\`\`text
80
+ {{webhookUrl}}
81
+ \`\`\`
82
+ 5. Select **contact.created** from the event types.
83
+ 6. Click Save to create the webhook.
84
+ `})},type:"WEBHOOK",sampleData:void 0,async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var qs=re({name:"new_incoming_message",displayName:"New Incoming Message",description:"Triggers when a new message is received from a contact.",aiMetadata:{description:"Fires when a contact sends an inbound message into Respond.io, delivering the message and its contact. Use to react to incoming customer messages; for messages sent out from Respond.io use the New Outgoing Message trigger. Requires manually configuring a message.received webhook in Respond.io."},auth:L,props:{webhookInstructions:b.MarkDown({value:`
85
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
86
+
87
+ 1. Login to your Respond.io account.
88
+ 2. Go to Settings > Integrations > Webhooks.
89
+ 3. Click on "Add Webhook" or "Create New Webhook".
90
+ 4. Add the following URL in the **Webhook URL** field:
91
+ \`\`\`text
92
+ {{webhookUrl}}
93
+ \`\`\`
94
+ 5. Select **message.received** from the event types.
95
+ 6. Click Save to create the webhook.
96
+ `})},type:"WEBHOOK",sampleData:void 0,async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var Gs=re({name:"new_outgoing_message",displayName:"New Outgoing Message",description:"Triggers when a message is sent from Respond.io.",aiMetadata:{description:"Fires when a message is sent out from Respond.io to a contact (by an agent, automation, or API), delivering the message and its contact. Use to react to outbound messages; for messages received from contacts use the New Incoming Message trigger. Requires manually configuring a message.sent webhook in Respond.io."},auth:L,props:{webhookInstructions:b.MarkDown({value:`
97
+ To use this trigger, you need to manually set up a webhook in your Respond.io account:
98
+
99
+ 1. Login to your Respond.io account.
100
+ 2. Go to Settings > Integrations > Webhooks.
101
+ 3. Click on "Add Webhook" or "Create New Webhook".
102
+ 4. Add the following URL in the **Webhook URL** field:
103
+ \`\`\`text
104
+ {{webhookUrl}}
105
+ \`\`\`
106
+ 5. Select **message.sent** from the event types.
107
+ 6. Click Save to create the webhook.
108
+ `})},type:"WEBHOOK",sampleData:void 0,async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var Td=vi({displayName:"Respond.io",auth:L,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/respond-io.png",authors:["aryel780"],actions:[Ns,Ds,Cs,Us,Ms,Ls,js,Fs,Os({auth:L,baseUrl:i(()=>"https://api.respond.io/v2","baseUrl"),authMapping:i(async e=>{let{token:t}=e.props;return{Authorization:`Bearer ${t}`}},"authMapping")})],triggers:[Bs,Zs,Vs,Hs,Ws,qs,Gs]});0&&(module.exports={respondIo});
109
+ /*! Bundled license information:
110
+
111
+ mime-types/index.js:
112
+ (*!
113
+ * mime-types
114
+ * Copyright(c) 2014 Jonathan Ong
115
+ * Copyright(c) 2015 Douglas Christopher Wilson
116
+ * MIT Licensed
117
+ *)
118
+ */
package/src/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const respondIo: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- }>>;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,SAAS;;GAmCpB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAA6D;AAC7D,4CAAkD;AAClD,2FAAqF;AACrF,yEAAmE;AACnE,mGAA6F;AAC7F,iEAA6D;AAC7D,qFAA+E;AAC/E,iEAA6D;AAC7D,6DAAyD;AACzD,uEAAmE;AACnE,4EAA8E;AAC9E,oEAAuE;AACvE,4EAA+E;AAC/E,4EAA+E;AAC/E,4DAA+D;AAC/D,8EAAgF;AAChF,8EAAgF;AAEnE,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,oBAAa;IACnB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,OAAO,EAAE;QACP,sDAAwB;QACxB,oCAAe;QACf,8DAA4B;QAC5B,8BAAa;QACb,gDAAqB;QACrB,8BAAa;QACb,0BAAW;QACX,oCAAgB;QAChB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,oBAAa;YACnB,OAAO,EAAE,GAAG,EAAE,CAAC,2BAA2B;YAC1C,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;gBAC7B,OAAO;oBACL,aAAa,EAAE,UAAU,KAAK,EAAE;iBACjC,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE;QACR,8CAAwB;QACxB,uCAAqB;QACrB,+CAAyB;QACzB,+CAAyB;QACzB,+BAAiB;QACjB,gDAAyB;QACzB,gDAAyB;KAC1B;CACF,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const addCommentToConversation: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- }>, {
4
- identifier: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
5
- token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
6
- }>>;
7
- text: import("@activepieces/pieces-framework").LongTextProperty<true>;
8
- }>;
9
- //# sourceMappingURL=add-comment-to-conversation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-comment-to-conversation.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-comment-to-conversation.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB;;;;;;;EAmCnC,CAAC"}