@activepieces/piece-millionverifier 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "@activepieces/piece-millionverifier",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
- "types": "./src/index.d.ts",
7
- "dependencies": {
8
- "@activepieces/pieces-common": "0.12.3",
9
- "@activepieces/pieces-framework": "0.30.0",
10
- "@activepieces/shared": "0.87.1",
11
- "tslib": "2.3.0"
12
- },
13
- "scripts": {
14
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
15
- "lint": "eslint 'src/**/*.ts'"
16
- }
6
+ "dependencies": {},
7
+ "files": [
8
+ "src/index.js",
9
+ "package.json",
10
+ "src/i18n"
11
+ ]
17
12
  }
package/src/index.js CHANGED
@@ -1,19 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.millionverifier = void 0;
4
- const pieces_framework_1 = require("@activepieces/pieces-framework");
5
- const auth_1 = require("./lib/common/auth");
6
- const shared_1 = require("@activepieces/shared");
7
- const verify_email_1 = require("./lib/actions/verify-email");
8
- exports.millionverifier = (0, pieces_framework_1.createPiece)({
9
- displayName: 'MillionVerifier',
10
- auth: auth_1.millionVerifierAuth,
11
- minimumSupportedRelease: '0.36.1',
12
- logoUrl: 'https://cdn.activepieces.com/pieces/millionverifier.png',
13
- authors: ['sanket-a11y'],
14
- categories: [shared_1.PieceCategory.COMMUNICATION],
15
- description: 'MillionVerifier is an email verifier service and API',
16
- actions: [verify_email_1.verifyEmail],
17
- triggers: [],
18
- });
19
- //# sourceMappingURL=index.js.map
1
+ "use strict";var Po=Object.create;var be=Object.defineProperty;var Io=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var To=Object.getPrototypeOf,bo=Object.prototype.hasOwnProperty;var i=(e,t)=>be(e,"name",{value:t,configurable:!0});var Eo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),or=(e,t)=>{for(var r in t)be(e,r,{get:t[r],enumerable:!0})},ir=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $o(t))!bo.call(e,a)&&a!==r&&be(e,a,{get:()=>t[a],enumerable:!(o=Io(t,a))||o.enumerable});return e};var We=(e,t,r)=>(r=e!=null?Po(To(e)):{},ir(t||!e||!e.__esModule?be(r,"default",{value:e,enumerable:!0}):r,e)),zo=e=>ir(be({},"__esModule",{value:!0}),e);var Tn=Eo(($n,lt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},o=new RegExp("^0[0-7]+$","i"),a=new RegExp("^0x[a-f0-9]+$","i"),p="%[0-9a-z]{1,}",d="(?:[0-9a-f]+::?)+",f={zoneIndex:new RegExp(p,"i"),native:new RegExp(`^(::)?(${d})?([0-9a-f]+)?(::)?(${p})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${p})?)$`,"i"),transitional:new RegExp(`^((?:${d})|(?:::)(?:${d})?)${t}\\.${t}\\.${t}\\.${t}(${p})?$`,"i")};function x(s,c){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,l=-1,y=(s.match(f.zoneIndex)||[])[0],h,C;for(y&&(y=y.substring(1),s=s.replace(/%.+$/,""));(l=s.indexOf(":",l+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>c)return null;for(C=c-g,h=":";C--;)h+="0:";return s=s.replace("::",h),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),c=function(){let X=s.split(":"),ge=[];for(let vt=0;vt<X.length;vt++)ge.push(parseInt(X[vt],16));return ge}(),{parts:c,zoneId:y}}i(x,"expandIPv6");function _(s,c,g,l){if(s.length!==c.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let y=0,h;for(;l>0;){if(h=g-l,h<0&&(h=0),s[y]>>h!==c[y]>>h)return!1;l-=g,y+=1}return!0}i(_,"matchCIDR");function P(s){if(a.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(o.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}i(P,"parseIntAuto");function N(s,c){for(;s.length<c;)s=`0${s}`;return s}i(N,"padPart");let v={};v.IPv4=function(){function s(c){if(c.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,l;for(g=0;g<c.length;g++)if(l=c[g],!(0<=l&&l<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=c}return i(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(c,g){let l;if(g===void 0&&(l=c,c=l[0],g=l[1]),c.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return _(this.octets,c.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let c=0,g=!1,l={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},y,h,C;for(y=3;y>=0;y-=1)if(h=this.octets[y],h in l){if(C=l[h],g&&C!==0)return null;C!==8&&(g=!0),c+=C}else return null;return 32-c},s.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return v.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),v.IPv4.broadcastAddressFromCIDR=function(s){try{let c=this.parseCIDR(s),g=c[0].toByteArray(),l=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],h=0;for(;h<4;)y.push(parseInt(g[h],10)|parseInt(l[h],10)^255),h++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.isIPv4=function(s){return this.parser(s)!==null},v.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},v.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},v.IPv4.isValidFourPartDecimal=function(s){return!!(v.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},v.IPv4.isValidCIDRFourPartDecimal=function(s){let c=s.match(/^(.+)\/(\d+)$/);return!v.IPv4.isValidCIDR(s)||!c?!1:v.IPv4.isValidFourPartDecimal(c[1])},v.IPv4.networkAddressFromCIDR=function(s){let c,g,l,y,h;try{for(c=this.parseCIDR(s),l=c[0].toByteArray(),h=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],g=0;g<4;)y.push(parseInt(l[g],10)&parseInt(h[g],10)),g++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.parse=function(s){let c=this.parser(s);if(c===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(c)},v.IPv4.parseCIDR=function(s){let c;if(c=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(c[2]);if(g>=0&&g<=32){let l=[this.parse(c[1]),g];return Object.defineProperty(l,"toString",{value:i(function(){return this.join("/")},"value")}),l}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},v.IPv4.parser=function(s){let c,g,l;if(c=s.match(r.fourOctet))return function(){let y=c.slice(1,6),h=[];for(let C=0;C<y.length;C++)g=y[C],h.push(P(g));return h}();if(c=s.match(r.longValue)){if(l=P(c[1]),l>4294967295||l<0)throw new Error("ipaddr: address outside defined range");return function(){let y=[],h;for(h=0;h<=24;h+=8)y.push(l>>h&255);return y}().reverse()}else return(c=s.match(r.twoOctet))?function(){let y=c.slice(1,4),h=[];if(l=P(y[1]),l>16777215||l<0)throw new Error("ipaddr: address outside defined range");return h.push(P(y[0])),h.push(l>>16&255),h.push(l>>8&255),h.push(l&255),h}():(c=s.match(r.threeOctet))?function(){let y=c.slice(1,5),h=[];if(l=P(y[2]),l>65535||l<0)throw new Error("ipaddr: address outside defined range");return h.push(P(y[0])),h.push(P(y[1])),h.push(l>>8&255),h.push(l&255),h}():null},v.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let c=[0,0,0,0],g=0,l=Math.floor(s/8);for(;g<l;)c[g]=255,g++;return l<4&&(c[l]=Math.pow(2,s%8)-1<<8-s%8),new this(c)},v.IPv6=function(){function s(c,g){let l,y;if(c.length===16)for(this.parts=[],l=0;l<=14;l+=2)this.parts.push(c[l]<<8|c[l+1]);else if(c.length===8)this.parts=c;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(l=0;l<this.parts.length;l++)if(y=this.parts[l],!(0<=y&&y<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return i(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(c,g){let l;if(g===void 0&&(l=c,c=l[0],g=l[1]),c.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return _(this.parts,c.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let c=0,g=!1,l={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},y,h;for(let C=7;C>=0;C-=1)if(y=this.parts[C],y in l){if(h=l[y],g&&h!==0)return null;h!==16&&(g=!0),c+=h}else return null;return 128-c},s.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let c,g=[],l=this.parts;for(let y=0;y<l.length;y++)c=l[y],g.push(c>>8),g.push(c&255);return g},s.prototype.toFixedLengthString=function(){let c=function(){let l=[];for(let y=0;y<this.parts.length;y++)l.push(N(this.parts[y].toString(16),4));return l}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),c+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let c=this.parts.slice(-2),g=c[0],l=c[1];return new v.IPv4([g>>8,g&255,l>>8,l&255])},s.prototype.toNormalizedString=function(){let c=function(){let l=[];for(let y=0;y<this.parts.length;y++)l.push(this.parts[y].toString(16));return l}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),c+g},s.prototype.toRFC5952String=function(){let c=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),l=0,y=-1,h;for(;h=c.exec(g);)h[0].length>y&&(l=h.index,y=h[0].length);return y<0?g:`${g.substring(0,l)}::${g.substring(l+y)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),v.IPv6.broadcastAddressFromCIDR=function(s){try{let c=this.parseCIDR(s),g=c[0].toByteArray(),l=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],h=0;for(;h<16;)y.push(parseInt(g[h],10)|parseInt(l[h],10)^255),h++;return new this(y)}catch(c){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${c})`)}},v.IPv6.isIPv6=function(s){return this.parser(s)!==null},v.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let c=this.parser(s);return new this(c.parts,c.zoneId),!0}catch{return!1}},v.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},v.IPv6.networkAddressFromCIDR=function(s){let c,g,l,y,h;try{for(c=this.parseCIDR(s),l=c[0].toByteArray(),h=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],g=0;g<16;)y.push(parseInt(l[g],10)&parseInt(h[g],10)),g++;return new this(y)}catch(C){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${C})`)}},v.IPv6.parse=function(s){let c=this.parser(s);if(c.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(c.parts,c.zoneId)},v.IPv6.parseCIDR=function(s){let c,g,l;if((g=s.match(/^(.+)\/(\d+)$/))&&(c=parseInt(g[2]),c>=0&&c<=128))return l=[this.parse(g[1]),c],Object.defineProperty(l,"toString",{value:i(function(){return this.join("/")},"value")}),l;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},v.IPv6.parser=function(s){let c,g,l,y,h,C;if(l=s.match(f.deprecatedTransitional))return this.parser(`::ffff:${l[1]}`);if(f.native.test(s))return x(s,8);if((l=s.match(f.transitional))&&(C=l[6]||"",c=l[1],l[1].endsWith("::")||(c=c.slice(0,-1)),c=x(c+C,6),c.parts)){for(h=[parseInt(l[2]),parseInt(l[3]),parseInt(l[4]),parseInt(l[5])],g=0;g<h.length;g++)if(y=h[g],!(0<=y&&y<=255))return null;return c.parts.push(h[0]<<8|h[1]),c.parts.push(h[2]<<8|h[3]),{parts:c.parts,zoneId:c.zoneId}}return null},v.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,l=Math.floor(s/8);for(;g<l;)c[g]=255,g++;return l<16&&(c[l]=Math.pow(2,s%8)-1<<8-s%8),new this(c)},v.fromByteArray=function(s){let c=s.length;if(c===4)return new v.IPv4(s);if(c===16)return new v.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},v.isValid=function(s){return v.IPv6.isValid(s)||v.IPv4.isValid(s)},v.isValidCIDR=function(s){return v.IPv6.isValidCIDR(s)||v.IPv4.isValidCIDR(s)},v.parse=function(s){if(v.IPv6.isValid(s))return v.IPv6.parse(s);if(v.IPv4.isValid(s))return v.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},v.parseCIDR=function(s){try{return v.IPv6.parseCIDR(s)}catch{try{return v.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},v.process=function(s){let c=this.parse(s);return c.kind()==="ipv6"&&c.isIPv4MappedAddress()?c.toIPv4Address():c},v.subnetMatch=function(s,c,g){let l,y,h,C;g==null&&(g="unicast");for(y in c)if(Object.prototype.hasOwnProperty.call(c,y)){for(h=c[y],h[0]&&!(h[0]instanceof Array)&&(h=[h]),l=0;l<h.length;l++)if(C=h[l],s.kind()===C[0].kind()&&s.match.apply(s,C))return y}return g},typeof lt<"u"&&lt.exports?lt.exports=v:e.ipaddr=v})($n)});var os={};or(os,{millionverifier:()=>ns});module.exports=zo(os);var So=Object.freeze({status:"aborted"});function I(e,t,r){function o(f,x){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:x,constr:d,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,x);let _=d.prototype,P=Object.keys(_);for(let N=0;N<P.length;N++){let v=P[N];v in f||(f[v]=_[v].bind(f))}}i(o,"init");let a=r?.Parent??Object;class p extends a{static{i(this,"Definition")}}Object.defineProperty(p,"name",{value:e});function d(f){var x;let _=r?.Parent?new p:this;o(_,f),(x=_._zod).deferred??(x.deferred=[]);for(let P of _._zod.deferred)P();return _}return i(d,"_"),Object.defineProperty(d,"init",{value:o}),Object.defineProperty(d,Symbol.hasInstance,{value:i(f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e),"value")}),Object.defineProperty(d,"name",{value:e}),d}i(I,"$constructor");var Ao=Symbol("zod_brand"),q=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ge=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},xt={};function Q(e){return e&&Object.assign(xt,e),xt}i(Q,"config");function Pt(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,a])=>t.indexOf(+o)===-1).map(([o,a])=>a)}i(Pt,"getEnumValues");function sr(e,t){return typeof t=="bigint"?t.toString():t}i(sr,"jsonStringifyReplacer");function Je(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(Je,"cached");function ur(e){return e==null}i(ur,"nullish");function Xe(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(Xe,"cleanRegex");var ar=Symbol("evaluating");function B(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==ar)return o===void 0&&(o=ar,o=r()),o},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}i(B,"defineLazy");var It="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ee(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(Ee,"isObject");var ko=Je(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function cr(e){if(Ee(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ee(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(cr,"isPlainObject");var lr=new Set(["string","number","symbol"]);function ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ye,"escapeRegex");function qe(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}i(qe,"clone");function L(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:i(()=>t.error,"error")}:t}i(L,"normalizeParams");function pr(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(pr,"optionalKeys");var Oo={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 he(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}i(he,"aborted");function ie(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}i(ie,"prefixIssues");function Ke(e){return typeof e=="string"?e:e?.message}i(Ke,"unwrapMessage");function ae(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let a=Ke(e.inst?._zod.def?.error?.(e))??Ke(t?.error?.(e))??Ke(r.customError?.(e))??Ke(r.localeError?.(e))??"Invalid input";o.message=a}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}i(ae,"finalizeIssue");function dr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(dr,"getLengthableOrigin");function $t(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}i($t,"issue");var mr=i((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,sr,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),fr=I("$ZodError",mr),ze=I("$ZodError",mr,{Parent:Error});var wo=i(e=>(t,r,o,a)=>{let p=o?Object.assign(o,{async:!1}):{async:!1},d=t._zod.run({value:r,issues:[]},p);if(d instanceof Promise)throw new q;if(d.issues.length){let f=new(a?.Err??e)(d.issues.map(x=>ae(x,p,Q())));throw It(f,a?.callee),f}return d.value},"_parse"),Ye=wo(ze),Do=i(e=>async(t,r,o,a)=>{let p=o?Object.assign(o,{async:!0}):{async:!0},d=t._zod.run({value:r,issues:[]},p);if(d instanceof Promise&&(d=await d),d.issues.length){let f=new(a?.Err??e)(d.issues.map(x=>ae(x,p,Q())));throw It(f,a?.callee),f}return d.value},"_parseAsync"),Qe=Do(ze),No=i(e=>(t,r,o)=>{let a=o?{...o,async:!1}:{async:!1},p=t._zod.run({value:r,issues:[]},a);if(p instanceof Promise)throw new q;return p.issues.length?{success:!1,error:new(e??fr)(p.issues.map(d=>ae(d,a,Q())))}:{success:!0,data:p.value}},"_safeParse"),Se=No(ze),Co=i(e=>async(t,r,o)=>{let a=o?Object.assign(o,{async:!0}):{async:!0},p=t._zod.run({value:r,issues:[]},a);return p instanceof Promise&&(p=await p),p.issues.length?{success:!1,error:new e(p.issues.map(d=>ae(d,a,Q())))}:{success:!0,data:p.value}},"_safeParseAsync"),Ae=Co(ze);var Uo="(?:(?:\\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])))",Mo=new RegExp(`^${Uo}$`);var gr=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),yr=/^-?\d+n?$/;var Tt=/^-?\d+(?:\.\d+)?$/,hr=/^(?:true|false)$/i;var ve=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var vr=I("$ZodCheckMinLength",(e,t)=>{var r;ve.init(e,t),(r=e._zod.def).when??(r.when=o=>{let a=o.value;return!ur(a)&&a.length!==void 0}),e._zod.onattach.push(o=>{let a=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let a=o.value;if(a.length>=t.minimum)return;let d=dr(a);o.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}});var bt=I("$ZodCheckStringFormat",(e,t)=>{var r,o;ve.init(e,t),e._zod.onattach.push(a=>{let p=a._zod.bag;p.format=t.format,t.pattern&&(p.patterns??(p.patterns=new Set),p.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),xr=I("$ZodCheckRegex",(e,t)=>{bt.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 Pr={major:4,minor:3,patch:6};var Z=I("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pr;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let a of o)for(let p of a._zod.onattach)p(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let a=i((d,f,x)=>{let _=he(d),P;for(let N of f){if(N._zod.def.when){if(!N._zod.def.when(d))continue}else if(_)continue;let v=d.issues.length,s=N._zod.check(d);if(s instanceof Promise&&x?.async===!1)throw new q;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,d.issues.length!==v&&(_||(_=he(d,v)))});else{if(d.issues.length===v)continue;_||(_=he(d,v))}}return P?P.then(()=>d):d},"runChecks"),p=i((d,f,x)=>{if(he(d))return d.aborted=!0,d;let _=a(f,o,x);if(_ instanceof Promise){if(x.async===!1)throw new q;return _.then(P=>e._zod.parse(P,x))}return e._zod.parse(_,x)},"handleCanaryResult");e._zod.run=(d,f)=>{if(f.skipChecks)return e._zod.parse(d,f);if(f.direction==="backward"){let _=e._zod.parse({value:d.value,issues:[]},{...f,skipChecks:!0});return _ instanceof Promise?_.then(P=>p(P,d,f)):p(_,d,f)}let x=e._zod.parse(d,f);if(x instanceof Promise){if(f.async===!1)throw new q;return x.then(_=>a(_,o,f))}return a(x,o,f)}}B(e,"~standard",()=>({validate:i(a=>{try{let p=Se(e,a);return p.success?{value:p.data}:{issues:p.error?.issues}}catch{return Ae(e,a).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},"validate"),vendor:"zod",version:1}))}),rt=I("$ZodString",(e,t)=>{Z.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??gr(e._zod.bag),e._zod.parse=(r,o)=>{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}}),Et=I("$ZodStringFormat",(e,t)=>{bt.init(e,t),rt.init(e,t)});var Er=I("$ZodURL",(e,t)=>{Et.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),a=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.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(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.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=a.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var zr=I("$ZodNumber",(e,t)=>{Z.init(e,t),e._zod.pattern=e._zod.bag.pattern??Tt,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;let p=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...p?{received:p}:{}}),r}});var zt=I("$ZodBoolean",(e,t)=>{Z.init(e,t),e._zod.pattern=hr,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),r}}),Sr=I("$ZodBigInt",(e,t)=>{Z.init(e,t),e._zod.pattern=yr,e._zod.parse=(r,o)=>{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 Ar=I("$ZodAny",(e,t)=>{Z.init(e,t),e._zod.parse=r=>r}),kr=I("$ZodUnknown",(e,t)=>{Z.init(e,t),e._zod.parse=r=>r});var Or=I("$ZodVoid",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"void",code:"invalid_type",input:a,inst:e}),r}}),Rr=I("$ZodDate",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let a=r.value,p=a instanceof Date;return p&&!Number.isNaN(a.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:a,...p?{received:"Invalid Date"}:{},inst:e}),r}});function Ir(e,t,r){e.issues.length&&t.issues.push(...ie(r,e.issues)),t.value[r]=e.value}i(Ir,"handleArrayResult");var wr=I("$ZodArray",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);let p=[];for(let d=0;d<a.length;d++){let f=a[d],x=t.element._zod.run({value:f,issues:[]},o);x instanceof Promise?p.push(x.then(_=>Ir(_,r,d))):Ir(x,r,d)}return p.length?Promise.all(p).then(()=>r):r}});function tt(e,t,r,o,a){if(e.issues.length){if(a&&!(r in o))return;t.issues.push(...ie(r,e.issues))}e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}i(tt,"handlePropertyResult");function jo(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=pr(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(jo,"normalizeDef");function Lo(e,t,r,o,a,p){let d=[],f=a.keySet,x=a.catchall._zod,_=x.def.type,P=x.optout==="optional";for(let N in t){if(f.has(N))continue;if(_==="never"){d.push(N);continue}let v=x.run({value:t[N],issues:[]},o);v instanceof Promise?e.push(v.then(s=>tt(s,r,N,t,P))):tt(v,r,N,t,P)}return d.length&&r.issues.push({code:"unrecognized_keys",keys:d,input:t,inst:p}),e.length?Promise.all(e).then(()=>r):r}i(Lo,"handleCatchall");var Dr=I("$ZodObject",(e,t)=>{if(Z.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let f=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let x={...f};return Object.defineProperty(t,"shape",{value:x}),x},"get")})}let o=Je(()=>jo(t));B(e._zod,"propValues",()=>{let f=t.shape,x={};for(let _ in f){let P=f[_]._zod;if(P.values){x[_]??(x[_]=new Set);for(let N of P.values)x[_].add(N)}}return x});let a=Ee,p=t.catchall,d;e._zod.parse=(f,x)=>{d??(d=o.value);let _=f.value;if(!a(_))return f.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),f;f.value={};let P=[],N=d.shape;for(let v of d.keys){let s=N[v],c=s._zod.optout==="optional",g=s._zod.run({value:_[v],issues:[]},x);g instanceof Promise?P.push(g.then(l=>tt(l,f,v,_,c))):tt(g,f,v,_,c)}return p?Lo(P,_,f,x,o.value,e):P.length?Promise.all(P).then(()=>f):f}});function $r(e,t,r,o){for(let p of e)if(p.issues.length===0)return t.value=p.value,t;let a=e.filter(p=>!he(p));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(p=>p.issues.map(d=>ae(d,o,Q())))}),t)}i($r,"handleUnionResults");var St=I("$ZodUnion",(e,t)=>{Z.init(e,t),B(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),B(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),B(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),B(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){let a=t.options.map(p=>p._zod.pattern);return new RegExp(`^(${a.map(p=>Xe(p.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(a,p)=>{if(r)return o(a,p);let d=!1,f=[];for(let x of t.options){let _=x._zod.run({value:a.value,issues:[]},p);if(_ instanceof Promise)f.push(_),d=!0;else{if(_.issues.length===0)return _;f.push(_)}}return d?Promise.all(f).then(x=>$r(x,a,e,p)):$r(f,a,e,p)}});var Nr=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,St.init(e,t);let r=e._zod.parse;B(e._zod,"propValues",()=>{let a={};for(let p of t.options){let d=p._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(p)}"`);for(let[f,x]of Object.entries(d)){a[f]||(a[f]=new Set);for(let _ of x)a[f].add(_)}}return a});let o=Je(()=>{let a=t.options,p=new Map;for(let d of a){let f=d._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(d)}"`);for(let x of f){if(p.has(x))throw new Error(`Duplicate discriminator value "${String(x)}"`);p.set(x,d)}}return p});e._zod.parse=(a,p)=>{let d=a.value;if(!Ee(d))return a.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),a;let f=o.value.get(d?.[t.discriminator]);return f?f._zod.run(a,p):t.unionFallback?r(a,p):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:d,path:[t.discriminator],inst:e}),a)}});var Cr=I("$ZodRecord",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{let a=r.value;if(!cr(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),r;let p=[],d=t.keyType._zod.values;if(d){r.value={};let f=new Set;for(let _ of d)if(typeof _=="string"||typeof _=="number"||typeof _=="symbol"){f.add(typeof _=="number"?_.toString():_);let P=t.valueType._zod.run({value:a[_],issues:[]},o);P instanceof Promise?p.push(P.then(N=>{N.issues.length&&r.issues.push(...ie(_,N.issues)),r.value[_]=N.value})):(P.issues.length&&r.issues.push(...ie(_,P.issues)),r.value[_]=P.value)}let x;for(let _ in a)f.has(_)||(x=x??[],x.push(_));x&&x.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:x})}else{r.value={};for(let f of Reflect.ownKeys(a)){if(f==="__proto__")continue;let x=t.keyType._zod.run({value:f,issues:[]},o);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&Tt.test(f)&&x.issues.length){let N=t.keyType._zod.run({value:Number(f),issues:[]},o);if(N instanceof Promise)throw new Error("Async schemas not supported in object keys currently");N.issues.length===0&&(x=N)}if(x.issues.length){t.mode==="loose"?r.value[f]=a[f]:r.issues.push({code:"invalid_key",origin:"record",issues:x.issues.map(N=>ae(N,o,Q())),input:f,path:[f],inst:e});continue}let P=t.valueType._zod.run({value:a[f],issues:[]},o);P instanceof Promise?p.push(P.then(N=>{N.issues.length&&r.issues.push(...ie(f,N.issues)),r.value[x.value]=N.value})):(P.issues.length&&r.issues.push(...ie(f,P.issues)),r.value[x.value]=P.value)}}return p.length?Promise.all(p).then(()=>r):r}});var Ur=I("$ZodEnum",(e,t)=>{Z.init(e,t);let r=Pt(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(a=>lr.has(typeof a)).map(a=>typeof a=="string"?ye(a):a.toString()).join("|")})$`),e._zod.parse=(a,p)=>{let d=a.value;return o.has(d)||a.issues.push({code:"invalid_value",values:r,input:d,inst:e}),a}}),Mr=I("$ZodLiteral",(e,t)=>{if(Z.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(o=>typeof o=="string"?ye(o):o?ye(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,a)=>{let p=o.value;return r.has(p)||o.issues.push({code:"invalid_value",values:t.values,input:p,inst:e}),o}});var jr=I("$ZodTransform",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ge(e.constructor.name);let a=t.transform(r.value,r);if(o.async)return(a instanceof Promise?a:Promise.resolve(a)).then(d=>(r.value=d,r));if(a instanceof Promise)throw new q;return r.value=a,r}});function Tr(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(Tr,"handleOptionalResult");var Lr=I("$ZodOptional",(e,t)=>{Z.init(e,t),e._zod.optin="optional",e._zod.optout="optional",B(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),B(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Xe(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let a=t.innerType._zod.run(r,o);return a instanceof Promise?a.then(p=>Tr(p,r.value)):Tr(a,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}});var Zr=I("$ZodNullable",(e,t)=>{Z.init(e,t),B(e._zod,"optin",()=>t.innerType._zod.optin),B(e._zod,"optout",()=>t.innerType._zod.optout),B(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Xe(r.source)}|null)$`):void 0}),B(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)});var Fr=I("$ZodPipe",(e,t)=>{Z.init(e,t),B(e._zod,"values",()=>t.in._zod.values),B(e._zod,"optin",()=>t.in._zod.optin),B(e._zod,"optout",()=>t.out._zod.optout),B(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let p=t.out._zod.run(r,o);return p instanceof Promise?p.then(d=>et(d,t.in,o)):et(p,t.in,o)}let a=t.in._zod.run(r,o);return a instanceof Promise?a.then(p=>et(p,t.out,o)):et(a,t.out,o)}});function et(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(et,"handlePipeResult");var Br=I("$ZodCustom",(e,t)=>{ve.init(e,t),Z.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,a=t.fn(o);if(a instanceof Promise)return a.then(p=>br(p,r,o,e));br(a,r,o,e)}});function br(e,t,r,o){if(!e){let a={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(a.params=o._zod.def.params),t.issues.push($t(a))}}i(br,"handleRefineResult");var Hr,Vo=Symbol("ZodOutput"),Ho=Symbol("ZodInput"),At=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.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 o={...this.get(r)??{}};delete o.id;let a={...o,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Wr(){return new At}i(Wr,"registry");(Hr=globalThis).__zod_globalRegistry??(Hr.__zod_globalRegistry=Wr());var kt=globalThis.__zod_globalRegistry;function Gr(e,t){return new e({type:"string",...L(t)})}i(Gr,"_string");function Kr(e,t){return new e({type:"string",coerce:!0,...L(t)})}i(Kr,"_coercedString");function Jr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...L(t)})}i(Jr,"_url");function Xr(e,t){return new e({type:"number",checks:[],...L(t)})}i(Xr,"_number");function qr(e,t){return new e({type:"number",coerce:!0,checks:[],...L(t)})}i(qr,"_coercedNumber");function Yr(e,t){return new e({type:"boolean",...L(t)})}i(Yr,"_boolean");function Qr(e,t){return new e({type:"boolean",coerce:!0,...L(t)})}i(Qr,"_coercedBoolean");function en(e,t){return new e({type:"bigint",coerce:!0,...L(t)})}i(en,"_coercedBigint");function tn(e){return new e({type:"any"})}i(tn,"_any");function rn(e){return new e({type:"unknown"})}i(rn,"_unknown");function nn(e,t){return new e({type:"void",...L(t)})}i(nn,"_void");function on(e,t){return new e({type:"date",coerce:!0,...L(t)})}i(on,"_coercedDate");function J(e,t){return new vr({check:"min_length",...L(t),minimum:e})}i(J,"_minLength");function se(e,t){return new xr({check:"string_format",format:"regex",...L(t),pattern:e})}i(se,"_regex");function an(e,t,r){let o=L(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}i(an,"_custom");var V=I("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");Z.init(e,t),e.def=t,e.type=t.type,e.parse=(r,o)=>Ye(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Se(e,r,o),e.parseAsync=async(r,o)=>Qe(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Ae(e,r,o),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(r,o)=>qe(e,r,o),e.brand=()=>e,e.register=(r,o)=>(r.add(e,o),e),e.apply=r=>r(e)}),ot=I("ZodMiniString",(e,t)=>{rt.init(e,t),V.init(e,t)});function n(e){return Gr(ot,e)}i(n,"string");var sn=I("ZodMiniStringFormat",(e,t)=>{Et.init(e,t),ot.init(e,t)});var ti=I("ZodMiniURL",(e,t)=>{Er.init(e,t),sn.init(e,t)});function un(e){return Jr(ti,e)}i(un,"url");var Ot=I("ZodMiniNumber",(e,t)=>{zr.init(e,t),V.init(e,t)});function H(e){return Xr(Ot,e)}i(H,"number");var Rt=I("ZodMiniBoolean",(e,t)=>{zt.init(e,t),V.init(e,t)});function M(e){return Yr(Rt,e)}i(M,"boolean");var cn=I("ZodMiniBigInt",(e,t)=>{Sr.init(e,t),V.init(e,t)});var ri=I("ZodMiniAny",(e,t)=>{Ar.init(e,t),V.init(e,t)});function Oe(){return tn(ri)}i(Oe,"any");var ni=I("ZodMiniUnknown",(e,t)=>{kr.init(e,t),V.init(e,t)});function S(){return rn(ni)}i(S,"unknown");var oi=I("ZodMiniVoid",(e,t)=>{Or.init(e,t),V.init(e,t)});function ln(e){return nn(oi,e)}i(ln,"_void");var pn=I("ZodMiniDate",(e,t)=>{Rr.init(e,t),V.init(e,t)});var ii=I("ZodMiniArray",(e,t)=>{wr.init(e,t),V.init(e,t)});function O(e,t){return new ii({type:"array",element:e,...L(t)})}i(O,"array");var ai=I("ZodMiniObject",(e,t)=>{Dr.init(e,t),V.init(e,t),B(e,"shape",()=>t.shape)});function u(e,t){let r={type:"object",shape:e??{},...L(t)};return new ai(r)}i(u,"object");var si=I("ZodMiniUnion",(e,t)=>{St.init(e,t),V.init(e,t)});function R(e,t){return new si({type:"union",options:e,...L(t)})}i(R,"union");var ui=I("ZodMiniDiscriminatedUnion",(e,t)=>{Nr.init(e,t),V.init(e,t)});function xe(e,t,r){return new ui({type:"union",options:t,discriminator:e,...L(r)})}i(xe,"discriminatedUnion");var ci=I("ZodMiniRecord",(e,t)=>{Cr.init(e,t),V.init(e,t)});function A(e,t,r){return new ci({type:"record",keyType:e,valueType:t,...L(r)})}i(A,"record");var li=I("ZodMiniEnum",(e,t)=>{Ur.init(e,t),V.init(e,t),e.options=Object.values(t.entries)});function D(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new li({type:"enum",entries:r,...L(t)})}i(D,"_enum");var pi=I("ZodMiniLiteral",(e,t)=>{Mr.init(e,t),V.init(e,t)});function T(e,t){return new pi({type:"literal",values:Array.isArray(e)?e:[e],...L(t)})}i(T,"literal");var di=I("ZodMiniTransform",(e,t)=>{jr.init(e,t),V.init(e,t)});function ue(e){return new di({type:"transform",transform:e})}i(ue,"transform");var mi=I("ZodMiniOptional",(e,t)=>{Lr.init(e,t),V.init(e,t)});function m(e){return new mi({type:"optional",innerType:e})}i(m,"optional");var fi=I("ZodMiniNullable",(e,t)=>{Zr.init(e,t),V.init(e,t)});function Re(e){return new fi({type:"nullable",innerType:e})}i(Re,"nullable");var gi=I("ZodMiniPipe",(e,t)=>{Fr.init(e,t),V.init(e,t)});function ce(e,t){return new gi({type:"pipe",in:e,out:t})}i(ce,"pipe");var yi=I("ZodMiniCustom",(e,t)=>{Br.init(e,t),V.init(e,t)});function it(e,t){return an(yi,e??(()=>!0),t)}i(it,"custom");var we={};or(we,{bigint:()=>$i,boolean:()=>Ii,date:()=>Ti,number:()=>Pi,string:()=>_i});function _i(e){return Kr(ot,e)}i(_i,"string");function Pi(e){return qr(Ot,e)}i(Pi,"number");function Ii(e){return Qr(Rt,e)}i(Ii,"boolean");function $i(e){return en(cn,e)}i($i,"bigint");function Ti(e){return on(pn,e)}i(Ti,"date");var Dt=u({retryOnFailure:u({defaultValue:m(M()),hide:m(M())}),continueOnFailure:u({defaultValue:m(M()),hide:m(M())})}),wt=class{constructor(t,r,o,a,p,d,f,x,_,P,N){this.name=t;this.displayName=r;this.description=o;this.props=a;this.run=p;this.test=d;this.requireAuth=f;this.errorHandlingOptions=x;this.outputSchema=_;this.audience=P;this.aiMetadata=N}static{i(this,"IAction")}},mn=i(e=>new wt(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 U=u({displayName:n(),description:m(n())}),w=i((e,t)=>u({type:T(t),required:M(),defaultValue:m(Oe())}),"TPropertyValue");var W=u({...U.shape,...w(n(),"SHORT_TEXT").shape}),ee=u({...U.shape,...w(n(),"LONG_TEXT").shape});var fn=u({label:n(),value:S()}),at=u({disabled:m(M()),placeholder:m(n()),options:O(fn)});var G=u({...U.shape,options:at,...w(S(),"STATIC_DROPDOWN").shape}),te=u({...U.shape,options:at,...w(O(S()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Nt=u({...U.shape,...w(S(),"DROPDOWN").shape,refreshers:O(n())}),De=u({...U.shape,...w(O(S()),"MULTI_SELECT_DROPDOWN").shape,refreshers:O(n())});var re=u({...U.shape,...w(M(),"CHECKBOX").shape});var ne=u({...U.shape,...w(H(),"NUMBER").shape});var Ne=u({...U.shape,...w(S(),"FILE").shape});var Ce=u({...U.shape,...w(n(),"DATE_TIME").shape});var gn=A(n(),R([W,ee,G,De,te,re,ne,Ne,Ce])),Ue=u({...U.shape,properties:gn,...w(O(S()),"ARRAY").shape});var Me=u({...U.shape,...w(R([A(n(),S())]),"JSON").shape});var yn=R([W,G,Me,Ue,te]),Ei=A(n(),yn),Ct=u({refreshers:O(n()),...U.shape,...w(S(),"DYNAMIC").shape});var st=u({...U.shape,...w(ln(),"MARKDOWN").shape});var je=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(je||{}),_e=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(_e||{}),Pe=(y=>(y.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",y.COMMUNICATION="COMMUNICATION",y.COMMERCE="COMMERCE",y.CORE="CORE",y.UNIVERSAL_AI="UNIVERSAL_AI",y.FLOW_CONTROL="FLOW_CONTROL",y.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",y.ACCOUNTING="ACCOUNTING",y.PRODUCTIVITY="PRODUCTIVITY",y.CONTENT_AND_FILES="CONTENT_AND_FILES",y.DEVELOPER_TOOLS="DEVELOPER_TOOLS",y.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",y.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",y.HUMAN_RESOURCES="HUMAN_RESOURCES",y.PAYMENT_PROCESSING="PAYMENT_PROCESSING",y.MARKETING="MARKETING",y.SALES_AND_CRM="SALES_AND_CRM",y))(Pe||{});var Le=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Le||{}),Ut="both_client_credentials_and_authorization_code";var pe=(a=>(a.POLLING="POLLING",a.WEBHOOK="WEBHOOK",a.APP_WEBHOOK="APP_WEBHOOK",a.MANUAL="MANUAL",a))(pe||{}),Ze=(p=>(p.NONE="NONE",p.HEADER_PRESENT="HEADER_PRESENT",p.QUERY_PRESENT="QUERY_PRESENT",p.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",p.HEAD_REQUEST="HEAD_REQUEST",p))(Ze||{}),zi=u({strategy:D(Ze),paramName:m(n())}),Fe=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Fe||{});var ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(ut||{}),hn=u({status:m(H()),body:m(S()),headers:m(A(n(),n()))}),vn=u({type:T("DELAY"),resumeDateTime:n(),requestIdToReply:m(n()),handlerId:m(n()),streamStepProgress:m(D(ut))}),xn=u({type:T("WEBHOOK"),requestId:n(),requestIdToReply:m(n()),response:hn,handlerId:m(n()),streamStepProgress:m(D(ut))}),Si=R([vn,xn]);var Ai=u({body:S(),rawBody:m(S()),headers:A(n(),n()),queryParams:A(n(),n())});var Mt=We(require("crypto"),1);var ki=128,de,Ie,Oi=i(e=>{!de||de.length<e?(de=Buffer.allocUnsafe(e*ki),Mt.default.randomFillSync(de),Ie=0):Ie+e>de.length&&(Mt.default.randomFillSync(de),Ie=0),Ie+=e},"fillPool"),Ri=i(e=>(Oi(e|=0),de.subarray(Ie-e,Ie)),"random"),wi=i((e,t,r)=>{let o=(2<<31-Math.clz32(e.length-1|1))-1,a=Math.ceil(1.6*o*t/e.length);return(p=t)=>{let d="";for(;;){let f=r(a),x=a;for(;x--;)if(d+=e[f[x]&o]||"",d.length===p)return d}}},"customRandom"),Pn=i((e,t=21)=>wi(e,t,Ri),"customAlphabet");var Di="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",In=21,Zy=n().check(se(new RegExp(`^[0-9a-zA-Z]{${In}}$`))),Ni=Pn(Di,In);var le=ce(ue(e=>e instanceof Date?e.toISOString():e),n()),K={id:n(),created:le,updated:le},j=i(e=>m(Re(e)),"Nullable");function jt(e){return m(Re(D(e)))}i(jt,"NullableEnum");var Vy=ce(ue(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),m(M())),ct=i(e=>ce(ue(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),m(O(e))),"OptionalArrayFromQuery");var Gy=A(n(),S());var Ve=(P=>(P.OPENAI="openai",P.OPENROUTER="openrouter",P.ANTHROPIC="anthropic",P.AZURE="azure",P.GOOGLE="google",P.ACTIVEPIECES="activepieces",P.CLOUDFLARE_GATEWAY="cloudflare-gateway",P.CUSTOM="custom",P.BEDROCK="bedrock",P.MISTRAL="mistral",P))(Ve||{});var ih=n().check(se(/^#[0-9A-Fa-f]{6}$/));var sh=u({filename:n(),data:S(),type:T("file"),mimetype:m(n())});var Ci=We(Tn());var fh=u({...K,name:n(),permissions:O(n()),platformId:j(n()),type:n(),userCount:m(H())});var bn=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(bn||{}),Lt=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Lt||{}),Zt=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(Zt||{});var Ft=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(Ft||{});var Bt=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Bt||{});var Ui=u({mode:D(bn),value:S()}),Mi=u({auth:m(n()),fields:A(n(),Ui)}),ji=u({pieceName:n(),pieceVersion:n(),actionName:n(),predefinedInput:m(Mi)}),Li=u({type:T("PIECE"),toolName:n().check(J(1)),pieceMetadata:ji}),Zi=u({type:T("none")}),Fi=u({type:T("access_token"),accessToken:n()}),Bi=u({type:T("api_key"),apiKey:n(),apiKeyHeader:n()}),Vi=u({type:T("headers"),headers:A(n(),n())}),Hi=xe("type",[Zi,Fi,Bi,Vi]),En=u({type:T("FLOW"),toolName:n().check(J(1)),externalFlowId:n(),flowDisplayName:m(n())}),zn=u({type:T("MCP"),toolName:n().check(J(1)),serverUrl:un(),protocol:D(Zt),auth:Hi}),Sn=u({type:T("KNOWLEDGE_BASE"),toolName:n().check(J(1)),sourceType:D(Lt),sourceId:n(),sourceName:n()}),Wi=xe("type",[Li,En,zn,Sn]),Gi=u({displayName:n(),description:m(n()),type:D(Ft)}),An=u({type:T("MARKDOWN"),markdown:n()}),$e={type:T("TOOL_CALL"),input:j(A(n(),S())),output:m(S()),toolName:n(),status:D(Bt),toolCallId:n(),startTime:n(),endTime:m(n())},Zh=u($e),kn=xe("toolCallType",[u({...$e,toolCallType:T("PIECE"),pieceName:n(),pieceVersion:n(),actionName:n()}),u({...$e,toolCallType:T("FLOW"),displayName:n(),externalFlowId:n()}),u({...$e,toolCallType:T("MCP"),displayName:n(),serverUrl:n()}),u({...$e,toolCallType:T("KNOWLEDGE_BASE"),displayName:n(),sourceType:n()}),u({...$e,toolCallType:T("UNKNOWN"),displayName:n()})]),Ki=R([An,kn]);var Vt=(r=>(r.IMAGE="image",r.TEXT="text",r))(Vt||{}),oe=u({apiKey:n()}),Ji=oe,Xi=u({apiKey:n(),apiKeyHash:n()}),qi=oe,Yi=oe,Qi=oe,ea=oe,ta=oe,ra=oe,na=oe,On=u({accessKeyId:n().check(J(1)),secretAccessKey:n().check(J(1))}),oa=u({}),ia=u({}),aa=u({}),sa=u({}),ua=u({}),ca=u({}),Rn=u({modelId:n(),modelName:n(),modelType:D(Vt)}),wn=u({apiKeyHeader:n(),baseUrl:n(),models:O(Rn),defaultHeaders:m(A(n(),n()))}),Dn=u({accountId:n(),gatewayId:n(),models:O(Rn),vertexProject:m(n()),vertexRegion:m(n())}),Nn=u({resourceName:n(),apiVersion:ce(ue(e=>typeof e=="string"&&e.trim().length===0?void 0:e),m(n()))}),Cn=u({region:n().check(J(1))}),la=R([Ji,Qi,ea,ta,ra,Yi,qi,Xi,On,na]),Un=R([wn,Dn,Nn,Cn,oa,aa,sa,ua,ia,ca]),pa=u({id:n(),name:n(),type:D(Vt)}),da=u({id:n(),name:n(),provider:D(Ve),config:Un,enabledForChat:M()}),ma=u({provider:D(Ve),config:Un,auth:la,platformId:n()});var Hh={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var fa=u({base64Url:n(),fileName:n(),extension:m(n())}),ga=u({mimeType:n(),url:n(),fileName:m(n())}),Ht=R([fa,ga]);var ya=R([u({type:T("file"),value:Ht}),u({type:T("markdown"),value:n(),files:m(O(Ht))})]),ha=u({sessionId:n(),message:n(),files:m(O(n()))});var jn=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(jn||{}),Ln=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ln||{}),Wt=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(Wt||{});var va=R([u({...K,name:n(),externalId:n(),type:T("STATIC_DROPDOWN"),tableId:n(),projectId:n(),data:u({options:O(u({value:n()}))})}),u({...K,name:n(),externalId:n(),type:R([T("TEXT"),T("NUMBER"),T("DATE")]),tableId:n(),projectId:n()})]),xa=u({...K,name:n(),folderId:j(n()),projectId:n(),externalId:n(),status:jt(Ln),trigger:jt(jn)}),_a=u({...K,tableId:n(),projectId:n(),cells:A(n(),u({updated:n(),created:n(),value:S(),fieldName:n()}))}),Pa=u({events:O(D(Wt)),webhookUrl:n(),flowId:n()}),Ia=u({fields:O(u({id:n(),name:n()})),rows:O(A(n(),n())),name:n()}),$a=u({projectId:n(),limit:m(we.number()),cursor:m(n()),name:m(n()),externalIds:ct(n()),folderId:m(n()),folderIds:ct(n())}),Ta=u({records:O(O(u({fieldId:n(),value:Fn()}))),tableId:n()}),ba=u({cells:m(O(u({fieldId:n(),value:Fn()}))),tableId:n(),agentUpdate:m(M())}),Zn=xe("operator",[me("eq"),me("neq"),me("gt"),me("gte"),me("lt"),me("lte"),me("co"),Mn("exists"),Mn("not_exists")]),Ea=u({tableId:n(),limit:m(we.number()),cursor:m(n()),filters:ct(Zn)});function Fn(){return ce(ue(e=>e==null?e:String(e)),Re(n()))}i(Fn,"coerceToString");function me(e){return u({fieldId:n(),operator:T(e),value:n()})}i(me,"valueFilter");function Mn(e){return u({fieldId:n(),operator:T(e)})}i(Mn,"existenceFilter");var za=u({status:m(H()),body:m(S()),headers:m(A(n(),n()))}),Sa=u({...K,deleted:j(le),ownerId:n(),displayName:n(),platformId:n(),externalId:j(n())});var Bn=u({name:n(),description:m(n()),type:n(),required:M()}),Aa=u({pieceName:n(),triggerName:n(),input:u({toolName:n(),toolDescription:n(),inputSchema:O(Bn),returnsResponse:M()})});var Vn="^[0-9]+\\.[0-9]+\\.[0-9]+$",lv=new RegExp(Vn),Oa="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",pv=n().check(se(new RegExp(Vn))),dv=n().check(se(new RegExp(Oa))),Ra=u({packageType:T("ARCHIVE"),pieceType:D(_e),pieceName:n(),pieceVersion:n(),archiveId:n(),platformId:n()}),Hn=u({packageType:T("REGISTRY"),pieceType:T("OFFICIAL"),pieceName:n(),pieceVersion:n()}),Wn=u({packageType:T("REGISTRY"),pieceType:T("CUSTOM"),pieceName:n(),pieceVersion:n(),platformId:n()}),mv=R([Hn,Wn]),fv=R([Ra,Hn,Wn]),Gn=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(Gn||{}),wa=u({type:D(Gn),cronExpression:n(),timezone:n()}),gv=u({...K,type:D(pe),projectId:n(),flowId:n(),triggerName:n(),schedule:j(wa),flowVersionId:n(),pieceName:n(),pieceVersion:n(),deleted:j(n()),simulate:M()}),Kn=(l=>(l.UNKNOWN="UNKNOWN",l.FLOW_RUN_LOG="FLOW_RUN_LOG",l.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",l.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",l.FLOW_STEP_FILE="FLOW_STEP_FILE",l.SAMPLE_DATA="SAMPLE_DATA",l.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",l.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",l.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",l.PROJECT_RELEASE="PROJECT_RELEASE",l.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",l.PLATFORM_ASSET="PLATFORM_ASSET",l.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",l.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",l.KNOWLEDGE_BASE="KNOWLEDGE_BASE",l.FLOW_BUNDLE="FLOW_BUNDLE",l))(Kn||{}),Jn=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Jn||{}),Xn=(r=>(r.S3="S3",r.DB="DB",r))(Xn||{}),yv=u({...K,projectId:j(n()),platformId:j(n()),type:D(Kn),compression:D(Jn),data:m(S()),location:D(Xn),size:j(H()),fileName:j(n()),s3Key:j(n()),metadata:j(A(n(),n()))}),qn=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(qn||{}),Yn=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Yn||{}),hv=u({id:n(),email:n(),firstName:n(),status:D(Yn),externalId:j(n()),platformId:j(n()),platformRole:D(qn),lastName:n(),created:le,updated:le,lastActiveDate:j(le),imageUrl:j(n())});var Gt=u({...U.shape,...w(A(n(),S()),"OBJECT").shape});var ro=u({...U.shape,...w(n(),"COLOR").shape});var Kt=R([W,ee,st,re,G,te,Nt,De,Ct,ne,Ue,Gt,Me,Ce,Ne,ro]),pt={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 Y=u({displayName:n(),description:m(n())});var no=u({username:n(),password:n()}),Jt=u({...Y.shape,username:u({displayName:n(),description:m(n())}),password:u({displayName:n(),description:m(n())}),...w(no,"BASIC_AUTH").shape});var Ua=A(n(),R([W,ee,ne,re,G])),Xt=u({...Y.shape,props:Ua,...w(S(),"CUSTOM_AUTH").shape});var fe=u({...Y.shape,...w(u({auth:n()}),"SECRET_TEXT").shape});var Ma=A(n(),R([W,ee,fe,ne,re,G,te,st])),oo=u({...Y.shape,props:Ma,...w(S(),"OIDC").shape});var qt=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(qt||{}),io=R([W,fe,G]),ao=A(n(),io),ja=u({props:m(A(n(),io)),authUrl:n(),tokenUrl:n(),scope:O(n()),prompt:m(R([T("none"),T("consent"),T("login"),T("omit")])),pkce:m(M()),pkceMethod:m(R([T("plain"),T("S256")])),authorizationMethod:m(D(qt)),grantType:m(R([D(Le),T(Ut)])),extra:m(A(n(),n()))}),so=u({access_token:n(),props:m(ao),data:A(n(),Oe())}),Yt=u({...Y.shape,...ja.shape,...w(so,"OAUTH2").shape});var Te=R([Jt,Xt,oo,Yt,fe]),He="Connection",Qt={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||He}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||He,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||He}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||He}},None(){}};var Jx={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 La=u({...U.shape,...w(S(),"CUSTOM").shape,code:n()});var Fa=R([Kt,Te]),er=A(n(),Fa),g_=A(n(),Kt);var uo=R([u({strategy:T("CRON"),cronExpression:n()}),u({strategy:T("NONE")})]);var co="2",dt="0.82.0";var tr=class{constructor(t,r,o,a,p,d,f,x,_=dt,P,N=""){this.displayName=t;this.logoUrl=r;this.authors=o;this.events=a;this.categories=f;this.auth=x;this.minimumSupportedRelease=_;this.maximumSupportedRelease=P;this.description=N;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:co}),"getContextInfo");(!Ba(_)||Va(_,dt))&&(this.minimumSupportedRelease=dt),p.forEach(v=>this._actions[v.name]=v),d.forEach(v=>this._triggers[v.name]=v)}static{i(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},lo=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,o,a)=>o===a.findIndex(p=>p.type===r.type)))throw new Error("Auth properties must be unique by type");return new tr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function Ba(e){return/^\d+\.\d+\.\d+$/.test(e)}i(Ba,"isValidSimpleSemver");function Va(e,t){let[r,o,a]=e.split(".").map(Number),[p,d,f]=t.split(".").map(Number);return r!==p?r<p:o!==d?o<d:a<f}i(Va,"isSemverLessThan");var Ha=m(A(n(),A(n(),n()))),po=u({id:m(n()),name:n(),displayName:n(),logoUrl:n(),description:n(),authors:O(n()),platformId:m(n()),directoryPath:m(n()),auth:m(R([Te,O(Te)])),version:n(),categories:m(O(D(Pe))),minimumSupportedRelease:m(n()),maximumSupportedRelease:m(n()),i18n:Ha}),Wa=D(["human","ai","both"]),mo=u({description:m(n()),idempotent:m(M())}),fo=u({name:n(),displayName:n(),description:n(),props:er,requireAuth:M(),errorHandlingOptions:m(Dt),outputSchema:m(it()),audience:m(Wa),aiMetadata:m(mo)}),go=u({name:n(),displayName:n(),description:n(),props:er,errorHandlingOptions:m(Dt),type:D(pe),sampleData:S(),handshakeConfiguration:m(it()),renewConfiguration:m(uo),testStrategy:D(Fe),outputSchema:m(it()),aiMetadata:m(mo)}),Ga=u({...po.shape,actions:A(n(),fo),triggers:A(n(),go)}),Ka=u({...po.shape,actions:H(),triggers:H(),suggestedActions:m(O(go)),suggestedTriggers:m(O(fo))}),yo=u({projectUsage:H(),tags:m(O(n())),pieceType:D(_e),packageType:D(je),platformId:m(n()),archiveId:m(n())}),gP=u({...Ga.shape,...yo.shape}),yP=u({...Ka.shape,...yo.shape}),hP=u({name:n(),version:n()});var Ja=We(require("path")),Xa=We(require("fs/promises"));var mt=Qt.SecretText({displayName:"MillionVerifier API Key",description:`API Key for MillionVerifier.
2
+
3
+ API key you can find on this page: https://app.millionverifier.com/api
4
+
5
+ **Test API key for development:** \`API_KEY_FOR_TEST\`. This API key will return random results.`,required:!0});var ft=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),o=`${r.origin}${r.pathname}`,a=new URLSearchParams;return r.searchParams.forEach((p,d)=>{a.append(d,p)}),{urlWithoutQueryParams:o,queryParams:a}}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 gt=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new rr,r=new nr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},rr=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},nr=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let o=`${t.username}:${t.password}`,a=Buffer.from(o).toString("base64");return r.Authorization=`Basic ${a}`,r}};var yt=class extends Error{constructor(r,o){let a=o.status||500,p=Buffer.isBuffer(o.responseBody)?o.responseBody.toString():o.responseBody;super(JSON.stringify({response:{status:a,body:p},request:{body:r}}));this.requestBody=r;this.status=a,this.responseBody=p}static{i(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var ht=class extends ft{static{i(this,"FetchHttpClient")}constructor(t="",r=new gt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:o,queryParams:a}=this.getUrl(t),p=this.getHeaders(t),d=t.queryParams??{};for(let[C,X]of Object.entries(d))a.append(C,X);let f=a.toString(),x=f?`${o}?${f}`:o,_=t.responseType??"json",P=t.followRedirects??!0,N=t.retries??0,{body:v,extraHeaders:s,isStream:c}=qa(t.body,p),g=Qa({...p,...s}),l=await Ya(async()=>{let C=new AbortController,X=t.timeout&&t.timeout>0?setTimeout(()=>C.abort(),t.timeout):void 0;try{let ge={method:t.method.toString(),headers:g,body:v,redirect:P?"follow":"manual",signal:C.signal};return c&&(ge.duplex="half"),r?.dispatcher!==void 0&&(ge.dispatcher=r.dispatcher),await fetch(x,ge)}finally{X!==void 0&&clearTimeout(X)}},N),y=P?300:400;if(l.status<200||l.status>=y){let C=await ho(l,_),X=new yt(t.body,{status:l.status,responseBody:C});throw console.error("[HttpClient#(sanitized error message)] Request failed:",X),X}let h=await ho(l,_);return{status:l.status,headers:es(l.headers),body:h}}};function qa(e,t){return rs(e)?{body:void 0,extraHeaders:{},isStream:!1}:ts(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(qa,"serializeBody");async function ho(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(ho,"parseResponseBody");async function Ya(e,t){let r;for(let o=0;o<=t;o++)try{let a=await e();if(a.status>=500&&o<t){await vo(o);continue}return a}catch(a){if(r=a,o<t){await vo(o);continue}throw a}throw r}i(Ya,"sendWithRetries");function vo(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(vo,"backoff");function Qa(e){let t={};for(let[r,o]of Object.entries(e))o!==void 0&&(t[r]=Array.isArray(o)?o.join(", "):o);return t}i(Qa,"normalizeHeaders");function es(e){let t={};return e.forEach((r,o)=>{t[o]=r}),t}i(es,"toHttpHeaders");function ts(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i(ts,"isNodeFormData");function rs(e){return e==null}i(rs,"isNil");var xo=new ht;var _o=mn({auth:mt,name:"verifyEmail",displayName:"Verify Email",description:"Verify email address using Million Verifier API",audience:"both",aiMetadata:{description:"Validates a single email address against the MillionVerifier real-time API, returning its deliverability status (e.g. deliverable, undeliverable, risky). Use to check whether an email is valid and safe to send to before adding it to a list or sending mail. Requires one email address; the call is read-only and idempotent.",idempotent:!0},props:{email:pt.ShortText({displayName:"Email Address",description:"The email address to verify",required:!0}),timeout:pt.Number({displayName:"Timeout",description:"Timeout in seconds (default: 10)",required:!1,defaultValue:10})},async run(e){let{email:t,timeout:r=10}=e.propsValue,o=e.auth.secret_text,p=`https://millionverifier.com/api/v3/?${new URLSearchParams({api:o,email:t,timeout:r.toString()}).toString()}`;return(await xo.sendRequest({method:"GET",url:p})).body}});var ns=lo({displayName:"MillionVerifier",auth:mt,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/millionverifier.png",authors:["sanket-a11y"],categories:["COMMUNICATION"],description:"MillionVerifier is an email verifier service and API",actions:[_o],triggers:[]});0&&(module.exports={millionverifier});
package/src/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const millionverifier: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,mHAU1B,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,4CAAwD;AACxD,iDAAqD;AACrD,6DAAyD;AAE5C,QAAA,eAAe,GAAG,IAAA,8BAAW,EAAC;IACzC,WAAW,EAAE,iBAAiB;IAC9B,IAAI,EAAE,0BAAmB;IACzB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,yDAAyD;IAClE,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,CAAC;IACzC,WAAW,EAAE,sDAAsD;IACnE,OAAO,EAAE,CAAC,0BAAW,CAAC;IACtB,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const verifyEmail: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
4
- }>;
5
- //# sourceMappingURL=verify-email.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-email.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/verify-email.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;EAqCtB,CAAC"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.verifyEmail = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const pieces_common_1 = require("@activepieces/pieces-common");
8
- exports.verifyEmail = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.millionVerifierAuth,
10
- name: 'verifyEmail',
11
- displayName: 'Verify Email',
12
- description: 'Verify email address using Million Verifier API',
13
- audience: 'both',
14
- aiMetadata: { description: 'Validates a single email address against the MillionVerifier real-time API, returning its deliverability status (e.g. deliverable, undeliverable, risky). Use to check whether an email is valid and safe to send to before adding it to a list or sending mail. Requires one email address; the call is read-only and idempotent.', idempotent: true },
15
- props: {
16
- email: pieces_framework_1.Property.ShortText({
17
- displayName: 'Email Address',
18
- description: 'The email address to verify',
19
- required: true,
20
- }),
21
- timeout: pieces_framework_1.Property.Number({
22
- displayName: 'Timeout',
23
- description: 'Timeout in seconds (default: 10)',
24
- required: false,
25
- defaultValue: 10,
26
- }),
27
- },
28
- run(context) {
29
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
30
- const { email, timeout = 10 } = context.propsValue;
31
- const apiKey = context.auth.secret_text;
32
- const params = new URLSearchParams({
33
- api: apiKey,
34
- email: email,
35
- timeout: timeout.toString(),
36
- });
37
- const url = `https://millionverifier.com/api/v3/?${params.toString()}`;
38
- const response = yield pieces_common_1.httpClient.sendRequest({
39
- method: pieces_common_1.HttpMethod.GET,
40
- url: url,
41
- });
42
- return response.body;
43
- });
44
- },
45
- });
46
- //# sourceMappingURL=verify-email.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify-email.js","sourceRoot":"","sources":["../../../../src/lib/actions/verify-email.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAqD;AACrD,+DAAqE;AACxD,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,0BAAmB;IACzB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,iDAAiD;IAC9D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,oUAAoU,EAAE,UAAU,EAAE,IAAI,EAAE;IACnX,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACvB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,EAAE;SACjB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;YAExC,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;gBACjC,GAAG,EAAE,MAAM;gBACX,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;aAC5B,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,uCAAuC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;YACvE,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG;aACT,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const millionVerifierAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
2
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,mEAQ9B,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.millionVerifierAuth = void 0;
4
- const pieces_framework_1 = require("@activepieces/pieces-framework");
5
- exports.millionVerifierAuth = pieces_framework_1.PieceAuth.SecretText({
6
- displayName: 'MillionVerifier API Key',
7
- description: `API Key for MillionVerifier.
8
-
9
- API key you can find on this page: https://app.millionverifier.com/api
10
-
11
- **Test API key for development:** \`API_KEY_FOR_TEST\`. This API key will return random results.`,
12
- required: true,
13
- });
14
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE9C,QAAA,mBAAmB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACtD,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE;;;;iGAIkF;IAC/F,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}