@activepieces/piece-deftform 0.0.3 → 0.0.5

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 (45) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +28 -46
  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-form-response.d.ts +0 -5
  7. package/src/lib/actions/add-form-response.d.ts.map +0 -1
  8. package/src/lib/actions/add-form-response.js +0 -40
  9. package/src/lib/actions/add-form-response.js.map +0 -1
  10. package/src/lib/actions/get-all-forms.d.ts +0 -2
  11. package/src/lib/actions/get-all-forms.d.ts.map +0 -1
  12. package/src/lib/actions/get-all-forms.js +0 -52
  13. package/src/lib/actions/get-all-forms.js.map +0 -1
  14. package/src/lib/actions/get-form-fields.d.ts +0 -4
  15. package/src/lib/actions/get-form-fields.d.ts.map +0 -1
  16. package/src/lib/actions/get-form-fields.js +0 -42
  17. package/src/lib/actions/get-form-fields.js.map +0 -1
  18. package/src/lib/actions/get-form-responses.d.ts +0 -4
  19. package/src/lib/actions/get-form-responses.d.ts.map +0 -1
  20. package/src/lib/actions/get-form-responses.js +0 -42
  21. package/src/lib/actions/get-form-responses.js.map +0 -1
  22. package/src/lib/actions/get-submission-pdf.d.ts +0 -4
  23. package/src/lib/actions/get-submission-pdf.d.ts.map +0 -1
  24. package/src/lib/actions/get-submission-pdf.js +0 -36
  25. package/src/lib/actions/get-submission-pdf.js.map +0 -1
  26. package/src/lib/actions/get-workspace.d.ts +0 -2
  27. package/src/lib/actions/get-workspace.d.ts.map +0 -1
  28. package/src/lib/actions/get-workspace.js +0 -26
  29. package/src/lib/actions/get-workspace.js.map +0 -1
  30. package/src/lib/actions/update-form-settings.d.ts +0 -43
  31. package/src/lib/actions/update-form-settings.d.ts.map +0 -1
  32. package/src/lib/actions/update-form-settings.js +0 -284
  33. package/src/lib/actions/update-form-settings.js.map +0 -1
  34. package/src/lib/auth.d.ts +0 -2
  35. package/src/lib/auth.d.ts.map +0 -1
  36. package/src/lib/auth.js +0 -38
  37. package/src/lib/auth.js.map +0 -1
  38. package/src/lib/common/index.d.ts +0 -18
  39. package/src/lib/common/index.d.ts.map +0 -1
  40. package/src/lib/common/index.js +0 -85
  41. package/src/lib/common/index.js.map +0 -1
  42. package/src/lib/triggers/new-form-response.d.ts +0 -11
  43. package/src/lib/triggers/new-form-response.d.ts.map +0 -1
  44. package/src/lib/triggers/new-form-response.js +0 -49
  45. package/src/lib/triggers/new-form-response.js.map +0 -1
package/package.json CHANGED
@@ -1,16 +1,11 @@
1
1
  {
2
2
  "name": "@activepieces/piece-deftform",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "main": "./src/index.js",
5
- "types": "./src/index.d.ts",
6
- "scripts": {
7
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
8
- "lint": "eslint 'src/**/*.ts'"
9
- },
10
- "dependencies": {
11
- "@activepieces/pieces-common": "0.12.3",
12
- "@activepieces/pieces-framework": "0.29.0",
13
- "@activepieces/shared": "0.82.0",
14
- "tslib": "2.6.2"
15
- }
5
+ "dependencies": {},
6
+ "files": [
7
+ "src/index.js",
8
+ "package.json",
9
+ "src/i18n"
10
+ ]
16
11
  }
package/src/index.js CHANGED
@@ -1,46 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deftform = exports.deftformAuth = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const shared_1 = require("@activepieces/shared");
8
- const auth_1 = require("./lib/auth");
9
- Object.defineProperty(exports, "deftformAuth", { enumerable: true, get: function () { return auth_1.deftformAuth; } });
10
- const get_workspace_1 = require("./lib/actions/get-workspace");
11
- const get_all_forms_1 = require("./lib/actions/get-all-forms");
12
- const get_form_fields_1 = require("./lib/actions/get-form-fields");
13
- const get_form_responses_1 = require("./lib/actions/get-form-responses");
14
- const get_submission_pdf_1 = require("./lib/actions/get-submission-pdf");
15
- const add_form_response_1 = require("./lib/actions/add-form-response");
16
- const update_form_settings_1 = require("./lib/actions/update-form-settings");
17
- const new_form_response_1 = require("./lib/triggers/new-form-response");
18
- exports.deftform = (0, pieces_framework_1.createPiece)({
19
- displayName: 'Deftform',
20
- description: 'Build powerful forms and automate your workflow with Deftform.',
21
- minimumSupportedRelease: '0.36.1',
22
- logoUrl: 'https://cdn.activepieces.com/pieces/deftform.png',
23
- categories: [shared_1.PieceCategory.FORMS_AND_SURVEYS],
24
- auth: auth_1.deftformAuth,
25
- authors: ['cumonvip1'],
26
- actions: [
27
- get_workspace_1.getWorkspaceDetails,
28
- get_all_forms_1.getAllForms,
29
- get_form_fields_1.getFormFields,
30
- get_form_responses_1.getFormResponses,
31
- get_submission_pdf_1.getSubmissionPdf,
32
- add_form_response_1.addFormResponse,
33
- update_form_settings_1.updateFormSettings,
34
- (0, pieces_common_1.createCustomApiCallAction)({
35
- baseUrl: () => 'https://deftform.com/api/v1',
36
- auth: auth_1.deftformAuth,
37
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
38
- return ({
39
- Authorization: `Bearer ${auth}`,
40
- });
41
- }),
42
- }),
43
- ],
44
- triggers: [new_form_response_1.newFormResponseTrigger],
45
- });
46
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Vs=Object.create;var Xe=Object.defineProperty;var Zs=Object.getOwnPropertyDescriptor;var Hs=Object.getOwnPropertyNames;var Ws=Object.getPrototypeOf,Gs=Object.prototype.hasOwnProperty;var o=(e,t)=>Xe(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mn=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},fn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hs(t))!Gs.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(n=Zs(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Vs(Ws(e)):{},fn(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),qs=e=>fn(Xe({},"__esModule",{value:!0}),e);var wo=E((Oo,Ft)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={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,l){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,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>l)return null;for(j=l-g,P=":";j--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),l=function(){let re=s.split(":"),ae=[];for(let Je=0;Je<re.length;Je++)ae.push(parseInt(re[Je],16));return ae}(),{parts:l,zoneId:v}}o(f,"expandIPv6");function h(s,l,g,m){if(s.length!==l.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=g-m,P<0&&(P=0),s[v]>>P!==l[v]>>P)return!1;m-=g,v+=1}return!0}o(h,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function $(s,l){for(;s.length<l;)s=`0${s}`;return s}o($,"padPart");let x={};x.IPv4=function(){function s(l){if(l.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<l.length;g++)if(m=l[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=l}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(l,g){let m;if(g===void 0&&(m=l,l=m[0],g=m[1]),l.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,l.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,j;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(j=m[P],g&&j!==0)return null;j!==8&&(g=!0),l+=j}else return null;return 32-l},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 l=this.parseCIDR(s),g=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},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 l=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!l?!1:x.IPv4.isValidFourPartDecimal(l[1])},x.IPv4.networkAddressFromCIDR=function(s){let l,g,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(P[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 l=this.parser(s);if(l===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(l)},x.IPv4.parseCIDR=function(s){let l;if(l=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(l[2]);if(g>=0&&g<=32){let m=[this.parse(l[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let l,g,m;if(l=s.match(r.fourOctet))return function(){let v=l.slice(1,6),P=[];for(let j=0;j<v.length;j++)g=v[j],P.push(_(g));return P}();if(l=s.match(r.longValue)){if(m=_(l[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(l=s.match(r.twoOctet))?function(){let v=l.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(l=s.match(r.threeOctet))?function(){let v=l.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let l=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)l[g]=255,g++;return m<4&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.IPv6=function(){function s(l,g){let m,v;if(l.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(l[m]<<8|l[m+1]);else if(l.length===8)this.parts=l;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(l,g){let m;if(g===void 0&&(m=l,l=m[0],g=m[1]),l.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,l.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let l=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,P;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(P=m[v],g&&P!==0)return null;P!==16&&(g=!0),l+=P}else return null;return 128-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let l,g=[],m=this.parts;for(let v=0;v<m.length;v++)l=m[v],g.push(l>>8),g.push(l&255);return g},s.prototype.toFixedLengthString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push($(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),l+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let l=this.parts.slice(-2),g=l[0],m=l[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let l=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}`),l+g},s.prototype.toRFC5952String=function(){let l=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,P;for(;P=l.exec(g);)P[0].length>v&&(m=P.index,v=P[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 l=this.parseCIDR(s),g=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(l){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${l})`)}},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 l=this.parser(s);return new this(l.parts,l.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 l,g,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(P[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 l=this.parser(s);if(l.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(l.parts,l.zoneId)},x.IPv6.parseCIDR=function(s){let l,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(l=parseInt(g[2]),l>=0&&l<=128))return m=[this.parse(g[1]),l],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let l,g,m,v,P,j;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return f(s,8);if((m=s.match(d.transitional))&&(j=m[6]||"",l=m[1],m[1].endsWith("::")||(l=l.slice(0,-1)),l=f(l+j,6),l.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<P.length;g++)if(v=P[g],!(0<=v&&v<=255))return null;return l.parts.push(P[0]<<8|P[1]),l.parts.push(P[2]<<8|P[3]),{parts:l.parts,zoneId:l.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 l=[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;)l[g]=255,g++;return m<16&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.fromByteArray=function(s){let l=s.length;if(l===4)return new x.IPv4(s);if(l===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 l=this.parse(s);return l.kind()==="ipv6"&&l.isIPv4MappedAddress()?l.toIPv4Address():l},x.subnetMatch=function(s,l,g){let m,v,P,j;g==null&&(g="unicast");for(v in l)if(Object.prototype.hasOwnProperty.call(l,v)){for(P=l[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return g},typeof Ft<"u"&&Ft.exports?Ft.exports=x:e.ipaddr=x})(Oo)});var zi=E((XS,Ai)=>{var Si=require("stream").Stream,Ip=require("util");Ai.exports=ce;function ce(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ce,"DelayedStream");Ip.inherits(ce,Si);ce.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ce.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ce.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ce.prototype.resume=function(){this._released||this.release(),this.source.resume()};ce.prototype.pause=function(){this.source.pause()};ce.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ce.prototype.pipe=function(){var e=Si.prototype.pipe.apply(this,arguments);return this.resume(),e};ce.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};ce.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Ri=E((QS,wi)=>{var Tp=require("util"),Oi=require("stream").Stream,ki=zi();wi.exports=G;function G(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(G,"CombinedStream");Tp.inherits(G,Oi);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof ki)){var r=ki.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};G.prototype.pipe=function(e,t){return Oi.prototype.pipe.call(this,e,t),this.resume(),e};G.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};G.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Di=E((tA,Ni)=>{"use strict";Ni.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var Mi=E(te=>{"use strict";var Gt=Di(),Ep=require("path").extname,Ci=/^\s*([^;\s]*)(?:;|\s|$)/,$p=/^text\//i;te.charset=Ui;te.charsets={lookup:Ui};te.contentType=Sp;te.extension=Ap;te.extensions=Object.create(null);te.lookup=zp;te.types=Object.create(null);kp(te.extensions,te.types);function Ui(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&Gt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&$p.test(t[1])?"UTF-8":!1}o(Ui,"charset");function Sp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Sp,"contentType");function Ap(e){if(!e||typeof e!="string")return!1;var t=Ci.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ap,"extension");function zp(e){if(!e||typeof e!="string")return!1;var t=Ep("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(zp,"lookup");function kp(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Gt).forEach(o(function(i){var u=Gt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var f=c[d];if(t[f]){var h=r.indexOf(Gt[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(h>_||h===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(kp,"populateMaps")});var Li=E((oA,ji)=>{ji.exports=Op;function Op(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Op,"defer")});var Br=E((aA,Bi)=>{var Fi=Li();Bi.exports=wp;function wp(e){var t=!1;return Fi(function(){t=!0}),o(function(n,i){t?e(n,i):Fi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(wp,"async")});var Vr=E((uA,Vi)=>{Vi.exports=Rp;function Rp(e){Object.keys(e.jobs).forEach(Np.bind(e)),e.jobs={}}o(Rp,"abort");function Np(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Np,"clean")});var Zr=E((pA,Hi)=>{var Zi=Br(),Dp=Vr();Hi.exports=Cp;function Cp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Up(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?Dp(r):r.results[i]=c,n(u,r.results))})}o(Cp,"iterate");function Up(e,t,r,n){var i;return e.length==2?i=e(r,Zi(n)):i=e(r,t,Zi(n)),i}o(Up,"runJob")});var Hr=E((dA,Wi)=>{Wi.exports=Mp;function Mp(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(Mp,"state")});var Wr=E((fA,Gi)=>{var jp=Vr(),Lp=Br();Gi.exports=Fp;function Fp(e){Object.keys(this.jobs).length&&(this.index=this.size,jp(this),Lp(e)(null,this.results))}o(Fp,"terminator")});var Ki=E((yA,qi)=>{var Bp=Zr(),Vp=Hr(),Zp=Wr();qi.exports=Hp;function Hp(e,t,r){for(var n=Vp(e);n.index<(n.keyedList||e).length;)Bp(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Zp.bind(n,r)}o(Hp,"parallel")});var Gr=E((vA,qt)=>{var Ji=Zr(),Wp=Hr(),Gp=Wr();qt.exports=qp;qt.exports.ascending=Xi;qt.exports.descending=Kp;function qp(e,t,r,n){var i=Wp(e,r);return Ji(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Ji(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Gp.bind(i,n)}o(qp,"serialOrdered");function Xi(e,t){return e<t?-1:e>t?1:0}o(Xi,"ascending");function Kp(e,t){return-1*Xi(e,t)}o(Kp,"descending")});var Qi=E((_A,Yi)=>{var Jp=Gr();Yi.exports=Xp;function Xp(e,t,r){return Jp(e,t,null,r)}o(Xp,"serial")});var ta=E((bA,ea)=>{ea.exports={parallel:Ki(),serial:Qi(),serialOrdered:Gr()}});var qr=E((IA,ra)=>{"use strict";ra.exports=Object});var oa=E((TA,na)=>{"use strict";na.exports=Error});var aa=E((EA,ia)=>{"use strict";ia.exports=EvalError});var ua=E(($A,sa)=>{"use strict";sa.exports=RangeError});var pa=E((SA,ca)=>{"use strict";ca.exports=ReferenceError});var da=E((AA,la)=>{"use strict";la.exports=SyntaxError});var Kt=E((zA,ma)=>{"use strict";ma.exports=TypeError});var ga=E((kA,fa)=>{"use strict";fa.exports=URIError});var ha=E((OA,ya)=>{"use strict";ya.exports=Math.abs});var xa=E((wA,va)=>{"use strict";va.exports=Math.floor});var Pa=E((RA,_a)=>{"use strict";_a.exports=Math.max});var Ia=E((NA,ba)=>{"use strict";ba.exports=Math.min});var Ea=E((DA,Ta)=>{"use strict";Ta.exports=Math.pow});var Sa=E((CA,$a)=>{"use strict";$a.exports=Math.round});var za=E((UA,Aa)=>{"use strict";Aa.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Oa=E((jA,ka)=>{"use strict";var Yp=za();ka.exports=o(function(t){return Yp(t)||t===0?t:t<0?-1:1},"sign")});var Ra=E((FA,wa)=>{"use strict";wa.exports=Object.getOwnPropertyDescriptor});var Kr=E((BA,Na)=>{"use strict";var Jt=Ra();if(Jt)try{Jt([],"length")}catch{Jt=null}Na.exports=Jt});var Ca=E((VA,Da)=>{"use strict";var Xt=Object.defineProperty||!1;if(Xt)try{Xt({},"a",{value:1})}catch{Xt=!1}Da.exports=Xt});var Jr=E((ZA,Ua)=>{"use strict";Ua.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var La=E((WA,ja)=>{"use strict";var Ma=typeof Symbol<"u"&&Symbol,Qp=Jr();ja.exports=o(function(){return typeof Ma!="function"||typeof Symbol!="function"||typeof Ma("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Qp()},"hasNativeSymbols")});var Xr=E((qA,Fa)=>{"use strict";Fa.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Yr=E((KA,Ba)=>{"use strict";var el=qr();Ba.exports=el.getPrototypeOf||null});var Ha=E((JA,Za)=>{"use strict";var tl="Function.prototype.bind called on incompatible ",rl=Object.prototype.toString,nl=Math.max,ol="[object Function]",Va=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),il=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),al=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Za.exports=o(function(t){var r=this;if(typeof r!="function"||rl.apply(r)!==ol)throw new TypeError(tl+r);for(var n=il(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Va(n,arguments));return Object(_)===_?_:this}return r.apply(t,Va(n,arguments))},"binder"),c=nl(0,r.length-n.length),d=[],f=0;f<c;f++)d[f]="$"+f;if(i=Function("binder","return function ("+al(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var He=E((YA,Wa)=>{"use strict";var sl=Ha();Wa.exports=Function.prototype.bind||sl});var Yt=E((QA,Ga)=>{"use strict";Ga.exports=Function.prototype.call});var Qr=E((ez,qa)=>{"use strict";qa.exports=Function.prototype.apply});var Ja=E((tz,Ka)=>{"use strict";Ka.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ya=E((rz,Xa)=>{"use strict";var ul=He(),cl=Qr(),pl=Yt(),ll=Ja();Xa.exports=ll||ul.call(pl,cl)});var es=E((nz,Qa)=>{"use strict";var dl=He(),ml=Kt(),fl=Yt(),gl=Ya();Qa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new ml("a function is required");return gl(dl,fl,t)},"callBindBasic")});var as=E((iz,is)=>{"use strict";var yl=es(),ts=Kr(),ns;try{ns=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var en=!!ns&&ts&&ts(Object.prototype,"__proto__"),os=Object,rs=os.getPrototypeOf;is.exports=en&&typeof en.get=="function"?yl([en.get]):typeof rs=="function"?o(function(t){return rs(t==null?t:os(t))},"getDunder"):!1});var ls=E((sz,ps)=>{"use strict";var ss=Xr(),us=Yr(),cs=as();ps.exports=ss?o(function(t){return ss(t)},"getProto"):us?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return us(t)},"getProto"):cs?o(function(t){return cs(t)},"getProto"):null});var tn=E((cz,ds)=>{"use strict";var hl=Function.prototype.call,vl=Object.prototype.hasOwnProperty,xl=He();ds.exports=xl.call(hl,vl)});var xs=E((pz,vs)=>{"use strict";var M,_l=qr(),Pl=oa(),bl=aa(),Il=ua(),Tl=pa(),Ke=da(),qe=Kt(),El=ga(),$l=ha(),Sl=xa(),Al=Pa(),zl=Ia(),kl=Ea(),Ol=Sa(),wl=Oa(),ys=Function,rn=o(function(e){try{return ys('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),xt=Kr(),Rl=Ca(),nn=o(function(){throw new qe},"throwTypeError"),Nl=xt?function(){try{return arguments.callee,nn}catch{try{return xt(arguments,"callee").get}catch{return nn}}}():nn,We=La()(),X=ls(),Dl=Yr(),Cl=Xr(),hs=Qr(),_t=Yt(),Ge={},Ul=typeof Uint8Array>"u"||!X?M:X(Uint8Array),we={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":We&&X?X([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%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%":Pl,"%eval%":eval,"%EvalError%":bl,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":ys,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&X?X(X([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!X?M:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_l,"%Object.getOwnPropertyDescriptor%":xt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Il,"%ReferenceError%":Tl,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!X?M:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&X?X(""[Symbol.iterator]()):M,"%Symbol%":We?Symbol:M,"%SyntaxError%":Ke,"%ThrowTypeError%":Nl,"%TypedArray%":Ul,"%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%":El,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":_t,"%Function.prototype.apply%":hs,"%Object.defineProperty%":Rl,"%Object.getPrototypeOf%":Dl,"%Math.abs%":$l,"%Math.floor%":Sl,"%Math.max%":Al,"%Math.min%":zl,"%Math.pow%":kl,"%Math.round%":Ol,"%Math.sign%":wl,"%Reflect.getPrototypeOf%":Cl};if(X)try{null.error}catch(e){ms=X(X(e)),we["%Error.prototype%"]=ms}var ms,Ml=o(function e(t){var r;if(t==="%AsyncFunction%")r=rn("async function () {}");else if(t==="%GeneratorFunction%")r=rn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=rn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&X&&(r=X(i.prototype))}return we[t]=r,r},"doEval"),fs={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Pt=He(),Qt=tn(),jl=Pt.call(_t,Array.prototype.concat),Ll=Pt.call(hs,Array.prototype.splice),gs=Pt.call(_t,String.prototype.replace),er=Pt.call(_t,String.prototype.slice),Fl=Pt.call(_t,RegExp.prototype.exec),Bl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vl=/\\(\\)?/g,Zl=o(function(t){var r=er(t,0,1),n=er(t,-1);if(r==="%"&&n!=="%")throw new Ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ke("invalid intrinsic syntax, expected opening `%`");var i=[];return gs(t,Bl,function(u,c,d,f){i[i.length]=d?gs(f,Vl,"$1"):c||u}),i},"stringToPath"),Hl=o(function(t,r){var n=t,i;if(Qt(fs,n)&&(i=fs[n],n="%"+i[0]+"%"),Qt(we,n)){var u=we[n];if(u===Ge&&(u=Ml(n)),typeof u>"u"&&!r)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ke("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");vs.exports=o(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(Fl(/^%?[^%]*%?$/,t)===null)throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Zl(t),i=n.length>0?n[0]:"",u=Hl("%"+i+"%",r),c=u.name,d=u.value,f=!1,h=u.alias;h&&(i=h[0],Ll(n,jl([0,1],h)));for(var _=1,$=!0;_<n.length;_+=1){var x=n[_],s=er(x,0,1),l=er(x,-1);if((s==='"'||s==="'"||s==="`"||l==='"'||l==="'"||l==="`")&&s!==l)throw new Ke("property names with quotes must have matching quotes");if((x==="constructor"||!$)&&(f=!0),i+="."+x,c="%"+i+"%",Qt(we,c))d=we[c];else if(d!=null){if(!(x in d)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(xt&&_+1>=n.length){var g=xt(d,x);$=!!g,$&&"get"in g&&!("originalValue"in g.get)?d=g.get:d=d[x]}else $=Qt(d,x),d=d[x];$&&!f&&(we[c]=d)}}return d},"GetIntrinsic")});var Ps=E((dz,_s)=>{"use strict";var Wl=Jr();_s.exports=o(function(){return Wl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ts=E((fz,Is)=>{"use strict";var Gl=xs(),bs=Gl("%Object.defineProperty%",!0),ql=Ps()(),Kl=tn(),Jl=Kt(),tr=ql?Symbol.toStringTag:null;Is.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Jl("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");tr&&(n||!Kl(t,tr))&&(bs?bs(t,tr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[tr]=r)},"setToStringTag")});var $s=E((yz,Es)=>{"use strict";var Xl=Function.prototype.call,Yl=Object.prototype.hasOwnProperty,Ql=He();Es.exports=Ql.call(Xl,Yl)});var As=E((hz,Ss)=>{"use strict";Ss.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Os=E((vz,ks)=>{"use strict";var un=Ri(),ed=require("util"),on=require("path"),td=require("http"),rd=require("https"),nd=require("url").parse,od=require("fs"),id=require("stream").Stream,ad=require("crypto"),an=Mi(),sd=ta(),ud=Ts(),$e=$s(),sn=As();function zs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(zs,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],un.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");ed.inherits(L,un);L.LINE_BREAK=`\r
2
+ `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=un.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&$e(t,"httpVersion"))&&!(t instanceof id))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){$e(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):od.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):$e(e,"httpVersion")?t(null,Number(e.headers["content-length"])):$e(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+zs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&sn(c,r.header);var d;for(var f in c)if($e(c,f)){if(d=c[f],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=f+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=on.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=on.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&$e(e,"httpVersion")&&(r=on.basename(e.client._httpMessage.path||"")),r)return'filename="'+zs(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=an.lookup(e.name)),!r&&e&&e.path&&(r=an.lookup(e.path)),!r&&e&&e.readable&&$e(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=an.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)$e(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+ad.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}sd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=nd(e),n=sn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=sn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=rd.request(n):r=td.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 d,f=o(function(h,_){return r.removeListener("error",f),r.removeListener("response",d),t.call(this,h,_)},"callback");d=f.bind(this,null),r.on("error",f),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};ud(L.prototype,"FormData");ks.exports=L});var _d={};mn(_d,{deftform:()=>xd,deftformAuth:()=>q});module.exports=qs(_d);var Ks=Object.freeze({status:"aborted"});function I(e,t,r){function n(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);let h=c.prototype,_=Object.keys(h);for(let $=0;$<_.length;$++){let x=_[$];x in d||(d[x]=h[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var f;let h=r?.Parent?new u:this;n(h,d),(f=h._zod).deferred??(f.deferred=[]);for(let _ of h._zod.deferred)_();return h}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(I,"$constructor");var Js=Symbol("zod_brand"),pe=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},It=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},nr={};function me(e){return e&&Object.assign(nr,e),nr}o(me,"config");function ir(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(ir,"getEnumValues");function yn(e,t){return typeof t=="bigint"?t.toString():t}o(yn,"jsonStringifyReplacer");function Et(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Et,"cached");function hn(e){return e==null}o(hn,"nullish");function $t(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o($t,"cleanRegex");var gn=Symbol("evaluating");function K(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==gn)return n===void 0&&(n=gn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(K,"defineLazy");var ar="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ye(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Ye,"isObject");var Xs=Et(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function vn(e){if(Ye(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ye(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(vn,"isPlainObject");var xn=new Set(["string","number","symbol"]);function Ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ne,"escapeRegex");function St(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(St,"clone");function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(Z,"normalizeParams");function _n(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(_n,"optionalKeys");var Ys={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function De(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(De,"aborted");function xe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(xe,"prefixIssues");function Tt(e){return typeof e=="string"?e:e?.message}o(Tt,"unwrapMessage");function _e(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(_e,"finalizeIssue");function Pn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Pn,"getLengthableOrigin");function sr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(sr,"issue");var bn=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,yn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),In=I("$ZodError",bn),Qe=I("$ZodError",bn,{Parent:Error});var eu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new pe;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>_e(f,u,me())));throw ar(d,i?.callee),d}return c.value},"_parse"),At=eu(Qe),tu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>_e(f,u,me())));throw ar(d,i?.callee),d}return c.value},"_parseAsync"),zt=tu(Qe),ru=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new pe;return u.issues.length?{success:!1,error:new(e??In)(u.issues.map(c=>_e(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),et=ru(Qe),nu=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>_e(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),tt=nu(Qe);var ou="(?:(?:\\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])))",iu=new RegExp(`^${ou}$`);var Tn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),En=/^-?\d+n?$/;var ur=/^-?\d+(?:\.\d+)?$/,$n=/^(?:true|false)$/i;var Ce=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Sn=I("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!hn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=Pn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var cr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;Ce.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),An=I("$ZodCheckRegex",(e,t)=>{cr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var kn={major:4,minor:3,patch:6};var H=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 i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,d,f)=>{let h=De(c),_;for(let $ of d){if($._zod.def.when){if(!$._zod.def.when(c))continue}else if(h)continue;let x=c.issues.length,s=$._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new pe;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(h||(h=De(c,x)))});else{if(c.issues.length===x)continue;h||(h=De(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,f)=>{if(De(c))return c.aborted=!0,c;let h=i(d,n,f);if(h instanceof Promise){if(f.async===!1)throw new pe;return h.then(_=>e._zod.parse(_,f))}return e._zod.parse(h,f)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(_=>u(_,c,d)):u(h,c,d)}let f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new pe;return f.then(h=>i(h,n,d))}return i(f,n,d)}}K(e,"~standard",()=>({validate:o(i=>{try{let u=et(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wt=I("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),pr=I("$ZodStringFormat",(e,t)=>{cr.init(e,t),wt.init(e,t)});var Dn=I("$ZodURL",(e,t)=>{pr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Cn=I("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var lr=I("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=$n,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Un=I("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=En,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Mn=I("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),jn=I("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Ln=I("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Fn=I("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function On(e,t,r){e.issues.length&&t.issues.push(...xe(r,e.issues)),t.value[r]=e.value}o(On,"handleArrayResult");var Bn=I("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],f=t.element._zod.run({value:d,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 Ot(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...xe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Ot,"handlePropertyResult");function au(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)}}o(au,"normalizeDef");function su(e,t,r,n,i,u){let c=[],d=i.keySet,f=i.catchall._zod,h=f.def.type,_=f.optout==="optional";for(let $ in t){if(d.has($))continue;if(h==="never"){c.push($);continue}let x=f.run({value:t[$],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Ot(s,r,$,t,_))):Ot(x,r,$,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(su,"handleCatchall");var Vn=I("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...d};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Et(()=>au(t));K(e._zod,"propValues",()=>{let d=t.shape,f={};for(let h in d){let _=d[h]._zod;if(_.values){f[h]??(f[h]=new Set);for(let $ of _.values)f[h].add($)}}return f});let i=Ye,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};let _=[],$=c.shape;for(let x of c.keys){let s=$[x],l=s._zod.optout==="optional",g=s._zod.run({value:h[x],issues:[]},f);g instanceof Promise?_.push(g.then(m=>Ot(m,d,x,h,l))):Ot(g,d,x,h,l)}return u?su(_,h,d,f,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function wn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!De(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>_e(c,n,me())))}),t)}o(wn,"handleUnionResults");var dr=I("$ZodUnion",(e,t)=>{H.init(e,t),K(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),K(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),K(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),K(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>$t(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let f of t.options){let h=f._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(f=>wn(f,i,e,u)):wn(d,i,e,u)}});var Zn=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,dr.init(e,t);let r=e._zod.parse;K(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(let h of f)i[d].add(h)}}return i});let n=Et(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of d){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Ye(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Hn=I("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!vn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let d=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let _=t.valueType._zod.run({value:i[h],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(...xe(h,$.issues)),r.value[h]=$.value})):(_.issues.length&&r.issues.push(...xe(h,_.issues)),r.value[h]=_.value)}let f;for(let h in i)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&ur.test(d)&&f.issues.length){let $=t.keyType._zod.run({value:Number(d),issues:[]},n);if($ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");$.issues.length===0&&(f=$)}if(f.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map($=>_e($,n,me())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then($=>{$.issues.length&&r.issues.push(...xe(d,$.issues)),r.value[f.value]=$.value})):(_.issues.length&&r.issues.push(...xe(d,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Wn=I("$ZodEnum",(e,t)=>{H.init(e,t);let r=ir(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>xn.has(typeof i)).map(i=>typeof i=="string"?Ne(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),Gn=I("$ZodLiteral",(e,t)=>{if(H.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ne(n):n?Ne(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var qn=I("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new It(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new pe;return r.value=i,r}});function Rn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Rn,"handleOptionalResult");var Kn=I("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",K(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>Rn(u,r.value)):Rn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Jn=I("$ZodNullable",(e,t)=>{H.init(e,t),K(e._zod,"optin",()=>t.innerType._zod.optin),K(e._zod,"optout",()=>t.innerType._zod.optout),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)}|null)$`):void 0}),K(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Xn=I("$ZodPipe",(e,t)=>{H.init(e,t),K(e._zod,"values",()=>t.in._zod.values),K(e._zod,"optin",()=>t.in._zod.optin),K(e._zod,"optout",()=>t.out._zod.optout),K(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>kt(c,t.in,n)):kt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>kt(u,t.out,n)):kt(i,t.out,n)}});function kt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(kt,"handlePipeResult");var Yn=I("$ZodCustom",(e,t)=>{Ce.init(e,t),H.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>Nn(u,r,n,e));Nn(i,r,n,e)}});function Nn(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(sr(i))}}o(Nn,"handleRefineResult");var eo,lu=Symbol("ZodOutput"),du=Symbol("ZodInput"),mr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function to(){return new mr}o(to,"registry");(eo=globalThis).__zod_globalRegistry??(eo.__zod_globalRegistry=to());var fr=globalThis.__zod_globalRegistry;function ro(e,t){return new e({type:"string",...Z(t)})}o(ro,"_string");function no(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(no,"_coercedString");function oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(oo,"_url");function io(e,t){return new e({type:"number",checks:[],...Z(t)})}o(io,"_number");function ao(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(ao,"_coercedNumber");function so(e,t){return new e({type:"boolean",...Z(t)})}o(so,"_boolean");function uo(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(uo,"_coercedBoolean");function co(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(co,"_coercedBigint");function po(e){return new e({type:"any"})}o(po,"_any");function lo(e){return new e({type:"unknown"})}o(lo,"_unknown");function mo(e,t){return new e({type:"void",...Z(t)})}o(mo,"_void");function fo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(fo,"_coercedDate");function se(e,t){return new Sn({check:"min_length",...Z(t),minimum:e})}o(se,"_minLength");function Pe(e,t){return new An({check:"string_format",format:"regex",...Z(t),pattern:e})}o(Pe,"_regex");function go(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(go,"_custom");var J=I("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>At(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>et(e,r,n),e.parseAsync=async(r,n)=>zt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>tt(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)=>St(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Nt=I("ZodMiniString",(e,t)=>{wt.init(e,t),J.init(e,t)});function a(e){return ro(Nt,e)}o(a,"string");var yo=I("ZodMiniStringFormat",(e,t)=>{pr.init(e,t),Nt.init(e,t)});var bu=I("ZodMiniURL",(e,t)=>{Dn.init(e,t),yo.init(e,t)});function ho(e){return oo(bu,e)}o(ho,"url");var gr=I("ZodMiniNumber",(e,t)=>{Cn.init(e,t),J.init(e,t)});function Q(e){return io(gr,e)}o(Q,"number");var yr=I("ZodMiniBoolean",(e,t)=>{lr.init(e,t),J.init(e,t)});function B(e){return so(yr,e)}o(B,"boolean");var vo=I("ZodMiniBigInt",(e,t)=>{Un.init(e,t),J.init(e,t)});var Iu=I("ZodMiniAny",(e,t)=>{Mn.init(e,t),J.init(e,t)});function nt(){return po(Iu)}o(nt,"any");var Tu=I("ZodMiniUnknown",(e,t)=>{jn.init(e,t),J.init(e,t)});function O(){return lo(Tu)}o(O,"unknown");var Eu=I("ZodMiniVoid",(e,t)=>{Ln.init(e,t),J.init(e,t)});function xo(e){return mo(Eu,e)}o(xo,"_void");var _o=I("ZodMiniDate",(e,t)=>{Fn.init(e,t),J.init(e,t)});var $u=I("ZodMiniArray",(e,t)=>{Bn.init(e,t),J.init(e,t)});function N(e,t){return new $u({type:"array",element:e,...Z(t)})}o(N,"array");var Su=I("ZodMiniObject",(e,t)=>{Vn.init(e,t),J.init(e,t),K(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Su(r)}o(p,"object");var Au=I("ZodMiniUnion",(e,t)=>{dr.init(e,t),J.init(e,t)});function D(e,t){return new Au({type:"union",options:e,...Z(t)})}o(D,"union");var zu=I("ZodMiniDiscriminatedUnion",(e,t)=>{Zn.init(e,t),J.init(e,t)});function Ue(e,t,r){return new zu({type:"union",options:t,discriminator:e,...Z(r)})}o(Ue,"discriminatedUnion");var ku=I("ZodMiniRecord",(e,t)=>{Hn.init(e,t),J.init(e,t)});function w(e,t,r){return new ku({type:"record",keyType:e,valueType:t,...Z(r)})}o(w,"record");var Ou=I("ZodMiniEnum",(e,t)=>{Wn.init(e,t),J.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 Ou({type:"enum",entries:r,...Z(t)})}o(U,"_enum");var wu=I("ZodMiniLiteral",(e,t)=>{Gn.init(e,t),J.init(e,t)});function S(e,t){return new wu({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o(S,"literal");var Ru=I("ZodMiniTransform",(e,t)=>{qn.init(e,t),J.init(e,t)});function be(e){return new Ru({type:"transform",transform:e})}o(be,"transform");var Nu=I("ZodMiniOptional",(e,t)=>{Kn.init(e,t),J.init(e,t)});function y(e){return new Nu({type:"optional",innerType:e})}o(y,"optional");var Du=I("ZodMiniNullable",(e,t)=>{Jn.init(e,t),J.init(e,t)});function ot(e){return new Du({type:"nullable",innerType:e})}o(ot,"nullable");var Cu=I("ZodMiniPipe",(e,t)=>{Xn.init(e,t),J.init(e,t)});function Ie(e,t){return new Cu({type:"pipe",in:e,out:t})}o(Ie,"pipe");var Uu=I("ZodMiniCustom",(e,t)=>{Yn.init(e,t),J.init(e,t)});function Dt(e,t){return go(Uu,e??(()=>!0),t)}o(Dt,"custom");var it={};mn(it,{bigint:()=>Zu,boolean:()=>Vu,date:()=>Hu,number:()=>Bu,string:()=>Fu});function Fu(e){return no(Nt,e)}o(Fu,"string");function Bu(e){return ao(gr,e)}o(Bu,"number");function Vu(e){return uo(yr,e)}o(Vu,"boolean");function Zu(e){return co(vo,e)}o(Zu,"bigint");function Hu(e){return fo(_o,e)}o(Hu,"date");var vr=p({retryOnFailure:p({defaultValue:y(B()),hide:y(B())}),continueOnFailure:p({defaultValue:y(B()),hide:y(B())})}),hr=class{constructor(t,r,n,i,u,c,d,f,h,_,$){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=h;this.audience=_;this.aiMetadata=$}static{o(this,"IAction")}},Y=o(e=>new hr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:y(a())}),C=o((e,t)=>p({type:S(t),required:B(),defaultValue:y(nt())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),fe=p({...F.shape,...C(a(),"LONG_TEXT").shape});var bo=p({label:a(),value:O()}),Ct=p({disabled:y(B()),placeholder:y(a()),options:N(bo)});var oe=p({...F.shape,options:Ct,...C(O(),"STATIC_DROPDOWN").shape}),ge=p({...F.shape,options:Ct,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var xr=p({...F.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),at=p({...F.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ye=p({...F.shape,...C(B(),"CHECKBOX").shape});var he=p({...F.shape,...C(Q(),"NUMBER").shape});var st=p({...F.shape,...C(O(),"FILE").shape});var ut=p({...F.shape,...C(a(),"DATE_TIME").shape});var Io=w(a(),D([ne,fe,oe,at,ge,ye,he,st,ut])),ct=p({...F.shape,properties:Io,...C(N(O()),"ARRAY").shape});var pt=p({...F.shape,...C(D([w(a(),O())]),"JSON").shape});var To=D([ne,oe,pt,ct,ge]),Gu=w(a(),To),_r=p({refreshers:N(a()),...F.shape,...C(O(),"DYNAMIC").shape});var Ut=p({...F.shape,...C(xo(),"MARKDOWN").shape});var lt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(lt||{}),Me=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Me||{}),je=(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))(je||{});var dt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(dt||{}),Pr="both_client_credentials_and_authorization_code";var Te=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Te||{}),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||{}),qu=p({strategy:U(mt),paramName:y(a())}),ft=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(ft||{});var Mt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Mt||{}),Eo=p({status:y(Q()),body:y(O()),headers:y(w(a(),a()))}),$o=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(U(Mt))}),So=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:Eo,handlerId:y(a()),streamStepProgress:y(U(Mt))}),Ku=D([$o,So]);var Ju=p({body:O(),rawBody:y(O()),headers:w(a(),a()),queryParams:w(a(),a())});function ue(e){return e==null}o(ue,"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}o(gt,"isEmpty");function jt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(jt,"assertNotNullOrUndefined");var br=Re(require("crypto"),1);var Xu=128,ze,Le,Yu=o(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*Xu),br.default.randomFillSync(ze),Le=0):Le+e>ze.length&&(br.default.randomFillSync(ze),Le=0),Le+=e},"fillPool"),Qu=o(e=>(Yu(e|=0),ze.subarray(Le-e,Le)),"random"),ec=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),f=i;for(;f--;)if(c+=e[d[f]&n]||"",c.length===u)return c}}},"customRandom"),zo=o((e,t=21)=>ec(e,t,Qu),"customAlphabet");var tc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ko=21,nb=a().check(Pe(new RegExp(`^[0-9a-zA-Z]{${ko}}$`))),rc=zo(tc,ko);var Ee=Ie(be(e=>e instanceof Date?e.toISOString():e),a()),ie={id:a(),created:Ee,updated:Ee},V=o(e=>y(ot(e)),"Nullable");function Ir(e){return y(ot(U(e)))}o(Ir,"NullableEnum");var ab=Ie(be(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(B())),Lt=o(e=>Ie(be(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(N(e))),"OptionalArrayFromQuery");var cb=w(a(),O());var yt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(yt||{});var Pb=a().check(Pe(/^#[0-9A-Fa-f]{6}$/));var Ib=p({filename:a(),data:O(),type:S("file"),mimetype:y(a())});var nc=Re(wo());var kb=p({...ie,name:a(),permissions:N(a()),platformId:V(a()),type:a(),userCount:y(Q())});var Ro=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Ro||{}),Tr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Tr||{}),Er=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Er||{});var $r=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))($r||{});var Sr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Sr||{});var oc=p({mode:U(Ro),value:O()}),ic=p({auth:y(a()),fields:w(a(),oc)}),ac=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(ic)}),sc=p({type:S("PIECE"),toolName:a().check(se(1)),pieceMetadata:ac}),uc=p({type:S("none")}),cc=p({type:S("access_token"),accessToken:a()}),pc=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),lc=p({type:S("headers"),headers:w(a(),a())}),dc=Ue("type",[uc,cc,pc,lc]),No=p({type:S("FLOW"),toolName:a().check(se(1)),externalFlowId:a(),flowDisplayName:y(a())}),Do=p({type:S("MCP"),toolName:a().check(se(1)),serverUrl:ho(),protocol:U(Er),auth:dc}),Co=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(se(1)),sourceType:U(Tr),sourceId:a(),sourceName:a()}),mc=Ue("type",[sc,No,Do,Co]),fc=p({displayName:a(),description:y(a()),type:U($r)}),Uo=p({type:S("MARKDOWN"),markdown:a()}),Fe={type:S("TOOL_CALL"),input:V(w(a(),O())),output:y(O()),toolName:a(),status:U(Sr),toolCallId:a(),startTime:a(),endTime:y(a())},nI=p(Fe),Mo=Ue("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()})]),gc=D([Uo,Mo]);var Ar=(r=>(r.IMAGE="image",r.TEXT="text",r))(Ar||{}),ve=p({apiKey:a()}),yc=ve,hc=p({apiKey:a(),apiKeyHash:a()}),vc=ve,xc=ve,_c=ve,Pc=ve,bc=ve,Ic=ve,Tc=ve,jo=p({accessKeyId:a().check(se(1)),secretAccessKey:a().check(se(1))}),Ec=p({}),$c=p({}),Sc=p({}),Ac=p({}),zc=p({}),kc=p({}),Lo=p({modelId:a(),modelName:a(),modelType:U(Ar)}),Fo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Lo),defaultHeaders:y(w(a(),a()))}),Bo=p({accountId:a(),gatewayId:a(),models:N(Lo),vertexProject:y(a()),vertexRegion:y(a())}),Vo=p({resourceName:a(),apiVersion:Ie(be(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),Zo=p({region:a().check(se(1))}),Oc=D([yc,_c,Pc,bc,Ic,xc,vc,hc,jo,Tc]),Ho=D([Fo,Bo,Vo,Zo,Ec,Sc,Ac,zc,$c,kc]),wc=p({id:a(),name:a(),type:U(Ar)}),Rc=p({id:a(),name:a(),provider:U(yt),config:Ho,enabledForChat:B()}),Nc=p({provider:U(yt),config:Ho,auth:Oc,platformId:a()});var sI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Dc=p({base64Url:a(),fileName:a(),extension:y(a())}),Cc=p({mimeType:a(),url:a(),fileName:y(a())}),zr=D([Dc,Cc]);var Uc=D([p({type:S("file"),value:zr}),p({type:S("markdown"),value:a(),files:y(N(zr))})]),Mc=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||{}),qo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(qo||{}),kr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(kr||{});var jc=D([p({...ie,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ie,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Lc=p({...ie,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Ir(qo),trigger:Ir(Go)}),Fc=p({...ie,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),Bc=p({events:N(U(kr)),webhookUrl:a(),flowId:a()}),Vc=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),Zc=p({projectId:a(),limit:y(it.number()),cursor:y(a()),name:y(a()),externalIds:Lt(a()),folderId:y(a()),folderIds:Lt(a())}),Hc=p({records:N(N(p({fieldId:a(),value:Jo()}))),tableId:a()}),Wc=p({cells:y(N(p({fieldId:a(),value:Jo()}))),tableId:a(),agentUpdate:y(B())}),Ko=Ue("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),Wo("exists"),Wo("not_exists")]),Gc=p({tableId:a(),limit:y(it.number()),cursor:y(a()),filters:Lt(Ko)});function Jo(){return Ie(be(e=>e==null?e:String(e)),ot(a()))}o(Jo,"coerceToString");function ke(e){return p({fieldId:a(),operator:S(e),value:a()})}o(ke,"valueFilter");function Wo(e){return p({fieldId:a(),operator:S(e)})}o(Wo,"existenceFilter");var qc=p({status:y(Q()),body:y(O()),headers:y(w(a(),a()))}),Kc=p({...ie,deleted:V(Ee),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var Xo=p({name:a(),description:y(a()),type:a(),required:B()}),Jc=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Xo),returnsResponse:B()})});var Yo="^[0-9]+\\.[0-9]+\\.[0-9]+$",$I=new RegExp(Yo),Yc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",SI=a().check(Pe(new RegExp(Yo))),AI=a().check(Pe(new RegExp(Yc))),Qc=p({packageType:S("ARCHIVE"),pieceType:U(Me),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Qo=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ei=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),zI=D([Qo,ei]),kI=D([Qc,Qo,ei]),ti=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(ti||{}),ep=p({type:U(ti),cronExpression:a(),timezone:a()}),OI=p({...ie,type:U(Te),projectId:a(),flowId:a(),triggerName:a(),schedule:V(ep),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),ri=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(ri||{}),ni=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ni||{}),oi=(r=>(r.S3="S3",r.DB="DB",r))(oi||{}),wI=p({...ie,projectId:V(a()),platformId:V(a()),type:U(ri),compression:U(ni),data:y(O()),location:U(oi),size:V(Q()),fileName:V(a()),s3Key:V(a()),metadata:V(w(a(),a()))}),ii=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ii||{}),ai=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ai||{}),RI=p({id:a(),email:a(),firstName:a(),status:U(ai),externalId:V(a()),platformId:V(a()),platformRole:U(ii),lastName:a(),created:Ee,updated:Ee,lastActiveDate:V(Ee),imageUrl:V(a())});var Or=p({...F.shape,...C(w(a(),O()),"OBJECT").shape});var pi=p({...F.shape,...C(a(),"COLOR").shape});var wr=D([ne,fe,Ut,ye,oe,ge,xr,at,_r,he,ct,Or,pt,ut,st,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 le=p({displayName:a(),description:y(a())});var li=p({username:a(),password:a()}),Rr=p({...le.shape,username:p({displayName:a(),description:y(a())}),password:p({displayName:a(),description:y(a())}),...C(li,"BASIC_AUTH").shape});var op=w(a(),D([ne,fe,he,ye,oe])),Nr=p({...le.shape,props:op,...C(O(),"CUSTOM_AUTH").shape});var Oe=p({...le.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var ip=w(a(),D([ne,fe,Oe,he,ye,oe,ge,Ut])),di=p({...le.shape,props:ip,...C(O(),"OIDC").shape});var Dr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Dr||{}),mi=D([ne,Oe,oe]),fi=w(a(),mi),ap=p({props:y(w(a(),mi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:y(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:y(B()),pkceMethod:y(D([S("plain"),S("S256")])),authorizationMethod:y(U(Dr)),grantType:y(D([U(dt),S(Pr)])),extra:y(w(a(),a()))}),gi=p({access_token:a(),props:y(fi),data:w(a(),nt())}),Cr=p({...le.shape,...ap.shape,...C(gi,"OAUTH2").shape});var Be=D([Rr,Nr,di,Cr,Oe]),ht="Connection",Ur={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 lE={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 sp=p({...F.shape,...C(O(),"CUSTOM").shape,code:a()});var up=D([wr,Be]),Mr=w(a(),up),OE=w(a(),wr);var yi=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]),Ve=class{constructor(t,r,n,i,u,c,d,f,h,_,$,x,s,l,g,m,v,P,j){this.name=t;this.displayName=r;this.description=n;this.requireAuth=i;this.props=u;this.type=c;this.handshakeConfiguration=d;this.onHandshake=f;this.renewConfiguration=h;this.onRenew=_;this.onEnable=$;this.onDisable=x;this.onStart=s;this.run=l;this.test=g;this.sampleData=m;this.testStrategy=v;this.outputSchema=P;this.aiMetadata=j}static{o(this,"ITrigger")}},hi=o(e=>{switch(e.type){case"WEBHOOK":return new Ve(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 Ve(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 Ve(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 Ve(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,ue(e.sampleData)&&ue(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var vi="2",Bt="0.82.0";var jr=class{constructor(t,r,n,i,u,c,d,f,h=Bt,_,$=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=f;this.minimumSupportedRelease=h;this.maximumSupportedRelease=_;this.description=$;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:vi}),"getContextInfo");(!cp(h)||pp(h,Bt))&&(this.minimumSupportedRelease=Bt),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},xi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new 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 cp(e){return/^\d+\.\d+\.\d+$/.test(e)}o(cp,"isValidSimpleSemver");function pp(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(pp,"isSemverLessThan");var lp=y(w(a(),w(a(),a()))),_i=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(je))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),i18n:lp}),dp=U(["human","ai","both"]),Pi=p({description:y(a()),idempotent:y(B())}),bi=p({name:a(),displayName:a(),description:a(),props:Mr,requireAuth:B(),errorHandlingOptions:y(vr),outputSchema:y(Dt()),audience:y(dp),aiMetadata:y(Pi)}),Ii=p({name:a(),displayName:a(),description:a(),props:Mr,errorHandlingOptions:y(vr),type:U(Te),sampleData:O(),handshakeConfiguration:y(Dt()),renewConfiguration:y(yi),testStrategy:U(ft),outputSchema:y(Dt()),aiMetadata:y(Pi)}),mp=p({..._i.shape,actions:w(a(),bi),triggers:w(a(),Ii)}),fp=p({..._i.shape,actions:Q(),triggers:Q(),suggestedActions:y(N(Ii)),suggestedTriggers:y(N(bi))}),Ti=p({projectUsage:Q(),tags:y(N(a())),pieceType:U(Me),packageType:U(lt),platformId:y(a()),archiveId:y(a())}),O$=p({...mp.shape,...Ti.shape}),w$=p({...fp.shape,...Ti.shape}),R$=p({name:a(),version:a()});var gp=Re(require("path")),yp=Re(require("fs/promises"));var Vt=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Zt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Lr,r=new Fr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Lr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Fr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Ht=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Wt=class extends Vt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Zt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,re]of Object.entries(c))i.append(j,re);let d=i.toString(),f=d?`${n}?${d}`:n,h=t.responseType??"json",_=t.followRedirects??!0,$=t.retries??0,{body:x,extraHeaders:s,isStream:l}=hp(t.body,u),g=xp({...u,...s}),m=await vp(async()=>{let j=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ae={method:t.method.toString(),headers:g,body:x,redirect:_?"follow":"manual",signal:j.signal};return l&&(ae.duplex="half"),r?.dispatcher!==void 0&&(ae.dispatcher=r.dispatcher),await fetch(f,ae)}finally{re!==void 0&&clearTimeout(re)}},$),v=_?300:400;if(m.status<200||m.status>=v){let j=await Ei(m,h),re=new Ht(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let P=await Ei(m,h);return{status:m.status,headers:_p(m.headers),body:P}}};function hp(e,t){return bp(e)?{body:void 0,extraHeaders:{},isStream:!1}:Pp(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(hp,"serializeBody");async function Ei(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Ei,"parseResponseBody");async function vp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await $i(n);continue}return i}catch(i){if(r=i,n<t){await $i(n);continue}throw i}throw r}o(vp,"sendWithRetries");function $i(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o($i,"backoff");function xp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(xp,"normalizeHeaders");function _p(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(_p,"toHttpHeaders");function Pp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Pp,"isNodeFormData");function bp(e){return e==null}o(bp,"isNil");var Ze=new Wt;var vt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(vt||{});var cd=Re(require("fs")),ws=Re(Os());var pd={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function ld(e){let t=e.split(";")[0].trim().toLowerCase();return pd[t]??""}o(ld,"contentTypeToExtension");var dd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),md=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Rs({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:f="headers"}){return Y({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:b.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth: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 ${md(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(vt).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:o(async({body_type:h})=>{if(!h)return{};let _=h,$={};switch(_){case"none":break;case"json":$.data=b.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":$.data=b.LongText({displayName:"Raw Body",required:!0});break;case"form_data":$.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 $},"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}),...d},run:o(async h=>{let{method:_,url:$,headers:x,queryParams:s,body:l,body_type:g,failsafe:m,timeout:v,response_is_binary:P,followRedirects:j}=h.propsValue;jt(_,"Method"),jt($,"URL");let re=ue(r)?{}:await r(h.auth,h.propsValue),ae=$.url,Je=ae.startsWith("http://")||ae.startsWith("https://")?ae:dd({baseUrl:t(h.auth),relativePath:ae}),Ae={method:_,url:Je,headers:{...x??{},...f==="headers"||!ue(f)?re:{}},queryParams:{...f==="queryParams"?re:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(P&&(Ae.responseType="arraybuffer"),l)if(g&&g!=="none"){let de=l.data;if(g==="form_data"){let Bs=de,bt=new ws.default;for(let{fieldName:pn,fieldType:ln,textFieldValue:dn,fileFieldValue:rr}of Bs)ln==="text"&&!gt(dn)?bt.append(pn,dn):ln==="file"&&!gt(rr)&&bt.append(pn,rr.data,{filename:rr?.filename});Ae.body=bt,Ae.headers={...Ae.headers,...bt.getHeaders()}}else Ae.body=de}else g||(Ae.body=l);try{let de=await Ze.sendRequest(Ae);return await fd(h.files,de.body,de.status,de.headers,P)}catch(de){if(m)return de.errorMessage();throw de}},"run")})}o(Rs,"createCustomApiCallAction");var fd=o(async(e,t,r,n,i)=>{let u;if(i&&gd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=ld(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.${d}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),gd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var q=Ur.SecretText({displayName:"API Key",description:`To get your Deftform API key:
4
+ 1. Log in to your Deftform workspace at https://deftform.com
5
+ 2. Go to **Settings > API** (https://deftform.com/settings/api)
6
+ 3. Click **Create API Key**
7
+ 4. Copy the key and paste it here
8
+
9
+ Need help? See https://deftform.com/docs/api`,required:!0,validate:o(async({auth:e})=>{try{return await Ze.sendRequest({method:"GET",url:"https://deftform.com/api/v1/workspace",headers:{Accept:"application/json","Content-Type":"application/json"},authentication:{type:"BEARER_TOKEN",token:e}}),{valid:!0}}catch{return{valid:!1,error:"Invalid API Key. Make sure you copied the full key from Deftform."}}},"validate")});var hd="https://deftform.com/api/v1";async function ee({token:e,method:t,path:r,body:n,queryParams:i}){return await Ze.sendRequest({method:t,url:`${hd}${r}`,headers:{Accept:"application/json","Content-Type":"application/json"},authentication:{type:"BEARER_TOKEN",token:e},queryParams:i,body:n})}o(ee,"deftformApiCall");function cn(e,t=""){let r={};for(let[n,i]of Object.entries(e)){let u=t?`${t}_${n}`:n;i==null?r[u]=null:Array.isArray(i)?r[u]=i.map(c=>typeof c=="object"?JSON.stringify(c):String(c)).join(", "):typeof i=="object"?Object.assign(r,cn(i,u)):r[u]=i}return r}o(cn,"flattenObject");var Se={formDropdown:b.Dropdown({displayName:"Form",description:"Select the form to use",refreshers:[],required:!0,auth:q,options:o(async({auth:e})=>{if(!e)return{disabled:!0,options:[],placeholder:"Please connect your account first"};try{return{disabled:!1,options:(await ee({token:e.secret_text,method:"GET",path:"/forms"})).body.data.map(r=>({label:r.name,value:r.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load forms. Check your connection."}}},"options")})};var Ns=Y({auth:q,name:"get_workspace_details",displayName:"Get Workspace Details",description:"Retrieves all information about your Deftform workspace. Useful as a connection test.",audience:"both",aiMetadata:{description:"Fetch the Deftform workspace details (plan, limits, account-level settings). Use it to confirm the connection works or to read workspace-level context before working with forms. Read-only and idempotent; takes no input.",idempotent:!0},props:{},async run(e){let t=await ee({token:e.auth.secret_text,method:"GET",path:"/workspace"});return cn(t.body)}});var Ds=Y({auth:q,name:"get_all_forms",displayName:"Get All Forms and Fields",description:"Lists all forms in your workspace, including their fields.",audience:"both",aiMetadata:{description:"List every form in the workspace along with each form fields and metadata (id, name, slug, closed status, response limit). Use it to discover available forms and their ids before targeting a specific form. Read-only and idempotent; takes no input.",idempotent:!0},props:{},async run(e){return(await ee({token:e.auth.secret_text,method:"GET",path:"/forms"})).body.data.map(r=>{let n=r,i=Array.isArray(n.fields)?n.fields:[];return{id:n.id??null,name:n.name??null,description:n.description??null,is_closed:n.is_closed??null,slug:n.slug??null,created_at:n.created_at??null,updated_at:n.updated_at??null,fields_count:i.length,fields:i.map(u=>({id:u.id??null,label:u.label??u.name??null,type:u.type??null})),responses_limit:n.responses_limit??null,admin_email_subject:n.admin_email_subject??null}})}});var Cs=Y({auth:q,name:"get_form_fields",displayName:"Get Form Fields",description:"Retrieves only the fields of a specific form. Great for understanding the structure before building automations.",audience:"both",aiMetadata:{description:"Fetch the field definitions of one form (label, type, required flag, options, validation). Use it to learn a form schema before submitting a response with Add Form Response, since that action keys values by field UUID. Requires the form id. Read-only and idempotent.",idempotent:!0},props:{formId:Se.formDropdown},async run(e){return(await ee({token:e.auth.secret_text,method:"GET",path:`/forms/${e.propsValue.formId}/fields`})).body.data.map(r=>{let n=r;return{id:n.id??null,name:n.name??null,label:n.label??null,type:n.type??null,required:n.required??null,options:Array.isArray(n.options)?n.options:null,default_value:n.default_value??null,placeholder:n.placeholder??null,validation:n.validation??null}})}});var Us=Y({auth:q,name:"get_form_responses",displayName:"Get Form Responses",description:"Retrieves all submissions (responses) for a specific form. Useful for reporting and data exports.",audience:"both",aiMetadata:{description:"Retrieve all submitted responses for one form, with each response answers flattened by field key plus submission metadata (id, uuid, number, timestamps). Use it for reporting, exports, or to look up a response UUID needed by Get Submission PDF. Requires the form id. Read-only and idempotent.",idempotent:!0},props:{formId:Se.formDropdown},async run(e){return(await ee({token:e.auth.secret_text,method:"GET",path:`/responses/${e.propsValue.formId}`})).body.data.map(r=>{let n=r,i={},u=n.responses;if(u)for(let c of u){let d=c.value;i[c.key]=Array.isArray(d)?d.map(f=>typeof f=="object"&&f!==null?JSON.stringify(f):String(f)).join(", "):d??null}return{...i,id:n.id??null,uuid:n.uuid??null,number:n.number??null,number_formatted:n.number_formatted??null,form_id:n.form_id??null,created_at:n.created_at??null,updated_at:n.updated_at??null}})}});var Ms=Y({auth:q,name:"get_submission_pdf",displayName:"Get Submission PDF",description:"Generates a PDF download link for a specific form submission by its unique response UUID.",audience:"both",aiMetadata:{description:"Get a downloadable PDF link for a single form submission, identified by its response UUID (obtainable from Get Form Responses). Use it when you need a printable or shareable copy of one response. Read-only and idempotent.",idempotent:!0},props:{responseUuid:b.ShortText({displayName:"Response UUID",description:"The unique identifier of the submission. You can find this in the form responses list.",required:!0})},async run(e){let t=await ee({token:e.auth.secret_text,method:"GET",path:`/response/${e.propsValue.responseUuid}/pdf`});return{pdf_url:t.body.data?.pdf_url??t.body.data?.url??null,response_uuid:e.propsValue.responseUuid}}});var js=Y({auth:q,name:"add_form_response",displayName:"Add Form Response",description:`Submits a new response programmatically to a form.
10
+ **Note:** This does **not** trigger email notifications to the form admin, unlike regular public submissions.`,audience:"both",aiMetadata:{description:"Programmatically submit a new response to a form. Use it to record form data on behalf of a respondent without going through the public form page; note it does not send the usual admin email notification. Requires the form id and a response-data object keyed by field UUID (use Get Form Fields to resolve UUIDs). Not idempotent: each call creates a separate submission.",idempotent:!1},props:{formId:Se.formDropdown,responseData:b.Object({displayName:"Response Data",description:"Key-value pairs where each key is the field UUID and the value is the user input.",required:!0})},async run(e){let t=await ee({token:e.auth.secret_text,method:"POST",path:`/forms/${e.propsValue.formId}/response`,body:{data:e.propsValue.responseData}});return{id:t.body.data?.id??null,uuid:t.body.data?.uuid??null,message:"Response submitted successfully."}}});var Ls=Y({auth:q,name:"update_form_settings",displayName:"Update Form Settings",description:"Updates any combination of form settings via a single call \u2014 from title and status to integrations, SEO, and security.",audience:"both",aiMetadata:{description:"Update one form configuration in a single call, covering any subset of general info, after-submission behaviour, admin/respondent email, SEO, integration toggles (Slack, Discord, Google Sheets, HubSpot), security/CAPTCHA, layout, and submission numbering. Only the fields you provide are changed; omitted fields are left untouched. Requires the form id. Idempotent: re-sending the same values leaves the form in the same state.",idempotent:!0},props:{formId:Se.formDropdown,generalHeader:b.MarkDown({value:"## General Settings"}),name:b.ShortText({displayName:"Form Name",description:"New display name of the form. Leave empty to keep the current value.",required:!1}),description:b.LongText({displayName:"Form Description",description:"New description shown on the public form page.",required:!1}),isClosed:b.Checkbox({displayName:"Close Form",description:"When checked, the form stops accepting new submissions.",required:!1}),responsesLimit:b.Number({displayName:"Responses Limit",description:"Maximum number of submissions allowed. Leave empty for unlimited responses.",required:!1}),afterSubmissionHeader:b.MarkDown({value:"## After-Submission Behaviour"}),afterMessage:b.LongText({displayName:"After-Submission Message",description:"Message shown on screen after the user submits the form.",required:!1}),afterRedirectUrl:b.ShortText({displayName:"After-Submission Redirect URL",description:"URL to redirect the respondent to after submission (instead of showing a message).",required:!1}),afterRedirectDelay:b.Number({displayName:"Redirect Delay (seconds)",description:"Number of seconds to wait before redirecting. Leave empty for instant redirect.",required:!1}),ctaLabel:b.ShortText({displayName:"CTA Label",description:'Text on the primary button shown after submission (e.g. "Download").',required:!1}),ctaLabelContinue:b.ShortText({displayName:"CTA Label Continue",description:'Text on the secondary button shown after submission (e.g. "Next").',required:!1}),closedMessage:b.LongText({displayName:"Closed Form Message",description:"Message shown when a user tries to access a closed form.",required:!1}),adminEmailHeader:b.MarkDown({value:"## Admin Notification Email"}),adminEmailSubject:b.ShortText({displayName:"Notification Email Subject",description:"Subject line of the email sent to admins on each new submission.",required:!1}),adminEmailNote:b.LongText({displayName:"Notification Email Note",description:"Custom note added to the top of the admin notification email.",required:!1}),adminEmailAttachPdf:b.Checkbox({displayName:"Attach Submission PDF",description:"Attach a PDF version of the submission to the admin email.",required:!1}),includeResponseInEmail:b.Checkbox({displayName:"Include Response in Email",description:"Include the full response data in the admin notification body.",required:!1}),afterMessageEmail:b.LongText({displayName:"Respondent Confirmation Email Message",description:"Message sent to the respondent in their confirmation email (if enabled).",required:!1}),afterMessageEmailSubject:b.ShortText({displayName:"Respondent Confirmation Email Subject",description:"Subject line of the confirmation email sent to the respondent.",required:!1}),seoHeader:b.MarkDown({value:"## SEO Settings"}),seoTitle:b.ShortText({displayName:"SEO Title",description:"Custom HTML title tag for the public form page.",required:!1}),seoDescription:b.ShortText({displayName:"SEO Description",description:"Meta description for the public form page.",required:!1}),seoAllowBots:b.Checkbox({displayName:"Allow Search-Engine Bots",description:"When checked, search engines may index the public form page.",required:!1}),integrationsHeader:b.MarkDown({value:"## Integrations"}),discordEnabled:b.Checkbox({displayName:"Discord Notifications",description:"When checked, a notification is sent to the configured Discord channel on each submission.",required:!1}),slackEnabled:b.Checkbox({displayName:"Slack Notifications",description:"When checked, a notification is sent to the configured Slack channel on each submission.",required:!1}),googleSheetsEnabled:b.Checkbox({displayName:"Google Sheets Integration",description:"When checked, submissions are automatically synced to Google Sheets.",required:!1}),hubspotEnabled:b.Checkbox({displayName:"HubSpot Integration",description:"When checked, submissions are pushed to HubSpot as contacts or deals.",required:!1}),securityHeader:b.MarkDown({value:"## Security"}),captcha:b.StaticDropdown({displayName:"CAPTCHA",description:"Protection against spam bots.",required:!1,options:{options:[{label:"ALTCHA",value:"altcha"},{label:"Turnstile (Cloudflare)",value:"turnstile"},{label:"reCAPTCHA",value:"recaptcha"},{label:"None",value:"none"}]}}),captureLocation:b.Checkbox({displayName:"Capture Location",description:"Record the respondent location (IP-based geolocation).",required:!1}),layoutHeader:b.MarkDown({value:"## Layout & Display"}),showFormTitle:b.Checkbox({displayName:"Show Form Title",description:"Display the form title at the top of the public page.",required:!1}),showMultipageProgress:b.Checkbox({displayName:"Show Multi-Page Progress",description:"Show a progress bar when the form has multiple pages.",required:!1}),aiSummaryEnabled:b.Checkbox({displayName:"AI Summary",description:"Enable the AI-powered summary on the form dashboard.",required:!1}),sendPdfToRespondent:b.Checkbox({displayName:"Send PDF to Respondent",description:"Attach a PDF version of the submission to the respondent confirmation email.",required:!1}),numberHeader:b.MarkDown({value:"## Submission Numbering"}),numberPrefix:b.ShortText({displayName:"Number Prefix",description:'Text added before the submission number (e.g. "INV-").',required:!1}),numberSuffix:b.ShortText({displayName:"Number Suffix",description:'Text added after the submission number (e.g. "-A").',required:!1})},async run(e){let t={};e.propsValue.name!==void 0&&(t.name=e.propsValue.name),e.propsValue.description!==void 0&&(t.description=e.propsValue.description),e.propsValue.isClosed!==void 0&&(t.is_closed=e.propsValue.isClosed),e.propsValue.responsesLimit!==void 0&&(t.responses_limit=e.propsValue.responsesLimit),e.propsValue.afterMessage!==void 0&&(t.after_message=e.propsValue.afterMessage),e.propsValue.afterRedirectUrl!==void 0&&(t.after_redirect_url=e.propsValue.afterRedirectUrl),e.propsValue.afterRedirectDelay!==void 0&&(t.after_redirect_delay=e.propsValue.afterRedirectDelay),e.propsValue.ctaLabel!==void 0&&(t.cta_label=e.propsValue.ctaLabel),e.propsValue.ctaLabelContinue!==void 0&&(t.cta_label_continue=e.propsValue.ctaLabelContinue),e.propsValue.closedMessage!==void 0&&(t.closed_message=e.propsValue.closedMessage),e.propsValue.adminEmailSubject!==void 0&&(t.admin_email_subject=e.propsValue.adminEmailSubject),e.propsValue.adminEmailNote!==void 0&&(t.admin_email_note=e.propsValue.adminEmailNote),e.propsValue.adminEmailAttachPdf!==void 0&&(t.admin_email_attach_pdf=e.propsValue.adminEmailAttachPdf),e.propsValue.includeResponseInEmail!==void 0&&(t.include_response_in_email=e.propsValue.includeResponseInEmail),e.propsValue.afterMessageEmail!==void 0&&(t.after_message_email=e.propsValue.afterMessageEmail),e.propsValue.afterMessageEmailSubject!==void 0&&(t.after_message_email_subject=e.propsValue.afterMessageEmailSubject),e.propsValue.seoTitle!==void 0&&(t.seo_title=e.propsValue.seoTitle),e.propsValue.seoDescription!==void 0&&(t.seo_description=e.propsValue.seoDescription),e.propsValue.seoAllowBots!==void 0&&(t.seo_allow_bots=e.propsValue.seoAllowBots),e.propsValue.discordEnabled!==void 0&&(t.discord_enabled=e.propsValue.discordEnabled),e.propsValue.slackEnabled!==void 0&&(t.slack_enabled=e.propsValue.slackEnabled),e.propsValue.googleSheetsEnabled!==void 0&&(t.google_sheets_enabled=e.propsValue.googleSheetsEnabled),e.propsValue.hubspotEnabled!==void 0&&(t.hubspot_enabled=e.propsValue.hubspotEnabled),e.propsValue.captcha!==void 0&&(t.captcha=e.propsValue.captcha),e.propsValue.captureLocation!==void 0&&(t.capture_location=e.propsValue.captureLocation),e.propsValue.showFormTitle!==void 0&&(t.show_formtitle=e.propsValue.showFormTitle),e.propsValue.showMultipageProgress!==void 0&&(t.show_multipage_progress=e.propsValue.showMultipageProgress),e.propsValue.aiSummaryEnabled!==void 0&&(t.ai_summary_enabled=e.propsValue.aiSummaryEnabled),e.propsValue.sendPdfToRespondent!==void 0&&(t.send_pdf_to_respondent=e.propsValue.sendPdfToRespondent),e.propsValue.numberPrefix!==void 0&&(t.number_prefix=e.propsValue.numberPrefix),e.propsValue.numberSuffix!==void 0&&(t.number_suffix=e.propsValue.numberSuffix);let r=await ee({token:e.auth.secret_text,method:"POST",path:`/forms/${e.propsValue.formId}/settings`,body:t});return{id:r.body.data?.id??null,name:r.body.data?.name??null,updated_at:r.body.data?.updated_at??null}}});var vd=`
11
+ **Setup instructions:**
12
+ 1. In your Deftform workspace go to **Settings \u2192 Notifications / Connections**.
13
+ 2. Under **Webhook**, click **ADD ENDPOINT** and paste the URL below:
14
+ \`\`\`
15
+ {{webhookUrl}}
16
+ \`\`\`
17
+ 3. Save the endpoint, then open the form you want to watch, go to its **Notifications / Connections** tab, and enable the webhook you just created.
18
+ `,Fs=hi({auth:q,name:"new_form_response",displayName:"New Form Response",description:"Triggers instantly when a new response is submitted to a Deftform form.",aiMetadata:{description:"Fires when a new response is submitted to a watched Deftform form, delivering the submitted answers. Requires a webhook endpoint to be configured manually in the Deftform workspace settings and enabled on the target form."},props:{instructions:b.MarkDown({value:vd})},sampleData:{data:[[{label:"Full name",response:"John Doe",uuid:"6403fc2b-6d52-4231-b63f-db6ea9f651dd",custom_key:"full_name"},{label:"Email address",response:"john@example.com",uuid:"6403fc2b-6d52-4231-b63f-db6ea9f651de",custom_key:"email_address"}]]},type:"WEBHOOK",async onEnable(e){},async onDisable(e){},async run(e){return[e.payload.body]}});var xd=xi({displayName:"Deftform",description:"Build powerful forms and automate your workflow with Deftform.",minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/deftform.png",categories:["FORMS_AND_SURVEYS"],auth:q,authors:["cumonvip1"],actions:[Ns,Ds,Cs,Us,Ms,js,Ls,Rs({baseUrl:o(()=>"https://deftform.com/api/v1","baseUrl"),auth:q,authMapping:o(async e=>({Authorization:`Bearer ${e}`}),"authMapping")})],triggers:[Fs]});0&&(module.exports={deftform,deftformAuth});
19
+ /*! Bundled license information:
20
+
21
+ mime-types/index.js:
22
+ (*!
23
+ * mime-types
24
+ * Copyright(c) 2014 Jonathan Ong
25
+ * Copyright(c) 2015 Douglas Christopher Wilson
26
+ * MIT Licensed
27
+ *)
28
+ */
package/src/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { deftformAuth } from './lib/auth';
2
- export { deftformAuth };
3
- export declare const deftform: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAU1C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,eAAO,MAAM,QAAQ,mHAyBnB,CAAC"}
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,+DAAwE;AACxE,iDAAqD;AACrD,qCAA0C;AAUjC,6FAVA,mBAAY,OAUA;AATrB,+DAAkE;AAClE,+DAA0D;AAC1D,mEAA8D;AAC9D,yEAAoE;AACpE,yEAAoE;AACpE,uEAAkE;AAClE,6EAAwE;AACxE,wEAA0E;AAI7D,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAChC,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,gEAAgE;IAC7E,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,UAAU,EAAE,CAAC,sBAAa,CAAC,iBAAiB,CAAC;IAC7C,IAAI,EAAE,mBAAY;IAClB,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,OAAO,EAAE;QACL,mCAAmB;QACnB,2BAAW;QACX,+BAAa;QACb,qCAAgB;QAChB,qCAAgB;QAChB,mCAAe;QACf,yCAAkB;QAClB,IAAA,yCAAyB,EAAC;YACtB,OAAO,EAAE,GAAG,EAAE,CAAC,6BAA6B;YAC5C,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC1B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAClC,CAAC,CAAA;cAAA;SACL,CAAC;KACL;IACD,QAAQ,EAAE,CAAC,0CAAsB,CAAC;CACrC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const addFormResponse: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- formId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- responseData: import("@activepieces/pieces-framework").ObjectProperty<true>;
4
- }>;
5
- //# sourceMappingURL=add-form-response.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-form-response.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-form-response.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;EA4B1B,CAAC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addFormResponse = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.addFormResponse = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'add_form_response',
12
- displayName: 'Add Form Response',
13
- description: `Submits a new response programmatically to a form.
14
- **Note:** This does **not** trigger email notifications to the form admin, unlike regular public submissions.`,
15
- props: {
16
- formId: common_1.DeftformCommon.formDropdown,
17
- responseData: pieces_framework_1.Property.Object({
18
- displayName: 'Response Data',
19
- description: 'Key-value pairs where each key is the field UUID and the value is the user input.',
20
- required: true,
21
- }),
22
- },
23
- run(context) {
24
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
- var _a, _b, _c, _d;
26
- const response = yield (0, common_1.deftformApiCall)({
27
- token: context.auth.secret_text,
28
- method: pieces_common_1.HttpMethod.POST,
29
- path: `/forms/${context.propsValue.formId}/response`,
30
- body: { data: context.propsValue.responseData },
31
- });
32
- return {
33
- id: (_b = (_a = response.body.data) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
34
- uuid: (_d = (_c = response.body.data) === null || _c === void 0 ? void 0 : _c.uuid) !== null && _d !== void 0 ? _d : null,
35
- message: 'Response submitted successfully.',
36
- };
37
- });
38
- },
39
- });
40
- //# sourceMappingURL=add-form-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-form-response.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-form-response.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,kCAAuC;AACvC,sCAA4D;AAE/C,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE;8GAC6F;IAC1G,KAAK,EAAE;QACH,MAAM,EAAE,uBAAc,CAAC,YAAY;QACnC,YAAY,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,mFAAmF;YAChG,QAAQ,EAAE,IAAI;SACjB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAA4C;gBAC9E,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,UAAU,OAAO,CAAC,UAAU,CAAC,MAAM,WAAW;gBACpD,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE;aAClD,CAAC,CAAC;YAEH,OAAO;gBACH,EAAE,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,0CAAE,EAAE,mCAAI,IAAI;gBAClC,IAAI,EAAE,MAAA,MAAA,QAAQ,CAAC,IAAI,CAAC,IAAI,0CAAE,IAAI,mCAAI,IAAI;gBACtC,OAAO,EAAE,kCAAkC;aAC9C,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getAllForms: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
2
- //# sourceMappingURL=get-all-forms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-all-forms.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-all-forms.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,yHAqCtB,CAAC"}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAllForms = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../auth");
8
- const common_1 = require("../common");
9
- exports.getAllForms = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.deftformAuth,
11
- name: 'get_all_forms',
12
- displayName: 'Get All Forms and Fields',
13
- description: 'Lists all forms in your workspace, including their fields.',
14
- props: {},
15
- run(context) {
16
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
- const response = yield (0, common_1.deftformApiCall)({
18
- token: context.auth.secret_text,
19
- method: pieces_common_1.HttpMethod.GET,
20
- path: '/forms',
21
- });
22
- return response.body.data.map((form) => {
23
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
24
- const f = form;
25
- const fieldsRaw = Array.isArray(f['fields'])
26
- ? f['fields']
27
- : [];
28
- return {
29
- id: (_a = f['id']) !== null && _a !== void 0 ? _a : null,
30
- name: (_b = f['name']) !== null && _b !== void 0 ? _b : null,
31
- description: (_c = f['description']) !== null && _c !== void 0 ? _c : null,
32
- is_closed: (_d = f['is_closed']) !== null && _d !== void 0 ? _d : null,
33
- slug: (_e = f['slug']) !== null && _e !== void 0 ? _e : null,
34
- created_at: (_f = f['created_at']) !== null && _f !== void 0 ? _f : null,
35
- updated_at: (_g = f['updated_at']) !== null && _g !== void 0 ? _g : null,
36
- fields_count: fieldsRaw.length,
37
- fields: fieldsRaw.map((field) => {
38
- var _a, _b, _c, _d;
39
- return ({
40
- id: (_a = field['id']) !== null && _a !== void 0 ? _a : null,
41
- label: (_c = (_b = field['label']) !== null && _b !== void 0 ? _b : field['name']) !== null && _c !== void 0 ? _c : null,
42
- type: (_d = field['type']) !== null && _d !== void 0 ? _d : null,
43
- });
44
- }),
45
- responses_limit: (_h = f['responses_limit']) !== null && _h !== void 0 ? _h : null,
46
- admin_email_subject: (_j = f['admin_email_subject']) !== null && _j !== void 0 ? _j : null,
47
- };
48
- });
49
- });
50
- },
51
- });
52
- //# sourceMappingURL=get-all-forms.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-all-forms.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-all-forms.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,kCAAuC;AACvC,sCAA4C;AAE/B,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,4DAA4D;IACzE,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAsB;gBACxD,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,QAAQ;aACjB,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;gBACnC,MAAM,CAAC,GAAG,IAA+B,CAAC;gBAC1C,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;oBACxC,CAAC,CAAE,CAAC,CAAC,QAAQ,CAA+B;oBAC5C,CAAC,CAAC,EAAE,CAAC;gBACT,OAAO;oBACH,EAAE,EAAE,MAAA,CAAC,CAAC,IAAI,CAAC,mCAAI,IAAI;oBACnB,IAAI,EAAE,MAAA,CAAC,CAAC,MAAM,CAAC,mCAAI,IAAI;oBACvB,WAAW,EAAE,MAAA,CAAC,CAAC,aAAa,CAAC,mCAAI,IAAI;oBACrC,SAAS,EAAE,MAAA,CAAC,CAAC,WAAW,CAAC,mCAAI,IAAI;oBACjC,IAAI,EAAE,MAAA,CAAC,CAAC,MAAM,CAAC,mCAAI,IAAI;oBACvB,UAAU,EAAE,MAAA,CAAC,CAAC,YAAY,CAAC,mCAAI,IAAI;oBACnC,UAAU,EAAE,MAAA,CAAC,CAAC,YAAY,CAAC,mCAAI,IAAI;oBACnC,YAAY,EAAE,SAAS,CAAC,MAAM;oBAC9B,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;;wBAAC,OAAA,CAAC;4BAC9B,EAAE,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,mCAAI,IAAI;4BACvB,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,OAAO,CAAC,mCAAI,KAAK,CAAC,MAAM,CAAC,mCAAI,IAAI;4BAC9C,IAAI,EAAE,MAAA,KAAK,CAAC,MAAM,CAAC,mCAAI,IAAI;yBAC9B,CAAC,CAAA;qBAAA,CAAC;oBACH,eAAe,EAAE,MAAA,CAAC,CAAC,iBAAiB,CAAC,mCAAI,IAAI;oBAC7C,mBAAmB,EAAE,MAAA,CAAC,CAAC,qBAAqB,CAAC,mCAAI,IAAI;iBACxD,CAAC;YACN,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const getFormFields: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- formId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=get-form-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-form-fields.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-form-fields.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;EA8BxB,CAAC"}