@activepieces/piece-millionverifier 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-millionverifier",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "dependencies": {},
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
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.
1
+ "use strict";var No=Object.create;var Se=Object.defineProperty;var Do=Object.getOwnPropertyDescriptor;var Co=Object.getOwnPropertyNames;var Uo=Object.getPrototypeOf,Mo=Object.prototype.hasOwnProperty;var i=(e,t)=>Se(e,"name",{value:t,configurable:!0});var Lo=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},sr=(e,t)=>{for(var r in t)Se(e,r,{get:t[r],enumerable:!0})},ur=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Co(t))!Mo.call(e,a)&&a!==r&&Se(e,a,{get:()=>t[a],enumerable:!(o=Do(t,a))||o.enumerable});return e};var We=(e,t,r)=>(r=e!=null?No(Uo(e)):{},ur(t||!e||!e.__esModule?Se(r,"default",{value:e,enumerable:!0}):r,e)),jo=e=>ur(Se({},"__esModule",{value:!0}),e);var wn=Lo((Rn,mt)=>{(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"),l="%[0-9a-z]{1,}",d="(?:[0-9a-f]+::?)+",m={zoneIndex:new RegExp(l,"i"),native:new RegExp(`^(::)?(${d})?([0-9a-f]+)?(::)?(${l})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${l})?)$`,"i"),transitional:new RegExp(`^((?:${d})|(?:::)(?:${d})?)${t}\\.${t}\\.${t}\\.${t}(${l})?$`,"i")};function v(s,c){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,p=-1,y=(s.match(m.zoneIndex)||[])[0],h,C;for(y&&(y=y.substring(1),s=s.replace(/%.+$/,""));(p=s.indexOf(":",p+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(":"),xe=[];for(let Pt=0;Pt<X.length;Pt++)xe.push(parseInt(X[Pt],16));return xe})(),{parts:c,zoneId:y}}i(v,"expandIPv6");function x(s,c,g,p){if(s.length!==c.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let y=0,h;for(;p>0;){if(h=g-p,h<0&&(h=0),s[y]>>h!==c[y]>>h)return!1;p-=g,y+=1}return!0}i(x,"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 D(s,c){for(;s.length<c;)s=`0${s}`;return s}i(D,"padPart");let _={};_.IPv4=(function(){function s(c){if(c.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,p;for(g=0;g<c.length;g++)if(p=c[g],!(0<=p&&p<=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 p;if(g===void 0&&(p=c,c=p[0],g=p[1]),c.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return x(this.octets,c.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let c=0,g=!1,p={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 p){if(C=p[h],g&&C!==0)return null;C!==8&&(g=!0),c+=C}else return null;return 32-c},s.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return _.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s})(),_.IPv4.broadcastAddressFromCIDR=function(s){try{let c=this.parseCIDR(s),g=c[0].toByteArray(),p=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],h=0;for(;h<4;)y.push(parseInt(g[h],10)|parseInt(p[h],10)^255),h++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.IPv4.isIPv4=function(s){return this.parser(s)!==null},_.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},_.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},_.IPv4.isValidFourPartDecimal=function(s){return!!(_.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},_.IPv4.isValidCIDRFourPartDecimal=function(s){let c=s.match(/^(.+)\/(\d+)$/);return!_.IPv4.isValidCIDR(s)||!c?!1:_.IPv4.isValidFourPartDecimal(c[1])},_.IPv4.networkAddressFromCIDR=function(s){let c,g,p,y,h;try{for(c=this.parseCIDR(s),p=c[0].toByteArray(),h=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],g=0;g<4;)y.push(parseInt(p[g],10)&parseInt(h[g],10)),g++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},_.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)},_.IPv4.parseCIDR=function(s){let c;if(c=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(c[2]);if(g>=0&&g<=32){let p=[this.parse(c[1]),g];return Object.defineProperty(p,"toString",{value:i(function(){return this.join("/")},"value")}),p}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},_.IPv4.parser=function(s){let c,g,p;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(p=P(c[1]),p>4294967295||p<0)throw new Error("ipaddr: address outside defined range");return(function(){let y=[],h;for(h=0;h<=24;h+=8)y.push(p>>h&255);return y})().reverse()}else return(c=s.match(r.twoOctet))?(function(){let y=c.slice(1,4),h=[];if(p=P(y[1]),p>16777215||p<0)throw new Error("ipaddr: address outside defined range");return h.push(P(y[0])),h.push(p>>16&255),h.push(p>>8&255),h.push(p&255),h})():(c=s.match(r.threeOctet))?(function(){let y=c.slice(1,5),h=[];if(p=P(y[2]),p>65535||p<0)throw new Error("ipaddr: address outside defined range");return h.push(P(y[0])),h.push(P(y[1])),h.push(p>>8&255),h.push(p&255),h})():null},_.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,p=Math.floor(s/8);for(;g<p;)c[g]=255,g++;return p<4&&(c[p]=Math.pow(2,s%8)-1<<8-s%8),new this(c)},_.IPv6=(function(){function s(c,g){let p,y;if(c.length===16)for(this.parts=[],p=0;p<=14;p+=2)this.parts.push(c[p]<<8|c[p+1]);else if(c.length===8)this.parts=c;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(p=0;p<this.parts.length;p++)if(y=this.parts[p],!(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 p;if(g===void 0&&(p=c,c=p[0],g=p[1]),c.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return x(this.parts,c.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let c=0,g=!1,p={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 p){if(h=p[y],g&&h!==0)return null;h!==16&&(g=!0),c+=h}else return null;return 128-c},s.prototype.range=function(){return _.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let c,g=[],p=this.parts;for(let y=0;y<p.length;y++)c=p[y],g.push(c>>8),g.push(c&255);return g},s.prototype.toFixedLengthString=function(){let c=(function(){let p=[];for(let y=0;y<this.parts.length;y++)p.push(D(this.parts[y].toString(16),4));return p}).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],p=c[1];return new _.IPv4([g>>8,g&255,p>>8,p&255])},s.prototype.toNormalizedString=function(){let c=(function(){let p=[];for(let y=0;y<this.parts.length;y++)p.push(this.parts[y].toString(16));return p}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),c+g},s.prototype.toRFC5952String=function(){let c=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),p=0,y=-1,h;for(;h=c.exec(g);)h[0].length>y&&(p=h.index,y=h[0].length);return y<0?g:`${g.substring(0,p)}::${g.substring(p+y)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),_.IPv6.broadcastAddressFromCIDR=function(s){try{let c=this.parseCIDR(s),g=c[0].toByteArray(),p=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],h=0;for(;h<16;)y.push(parseInt(g[h],10)|parseInt(p[h],10)^255),h++;return new this(y)}catch(c){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${c})`)}},_.IPv6.isIPv6=function(s){return this.parser(s)!==null},_.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}},_.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},_.IPv6.networkAddressFromCIDR=function(s){let c,g,p,y,h;try{for(c=this.parseCIDR(s),p=c[0].toByteArray(),h=this.subnetMaskFromPrefixLength(c[1]).toByteArray(),y=[],g=0;g<16;)y.push(parseInt(p[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})`)}},_.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)},_.IPv6.parseCIDR=function(s){let c,g,p;if((g=s.match(/^(.+)\/(\d+)$/))&&(c=parseInt(g[2]),c>=0&&c<=128))return p=[this.parse(g[1]),c],Object.defineProperty(p,"toString",{value:i(function(){return this.join("/")},"value")}),p;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},_.IPv6.parser=function(s){let c,g,p,y,h,C;if(p=s.match(m.deprecatedTransitional))return this.parser(`::ffff:${p[1]}`);if(m.native.test(s))return v(s,8);if((p=s.match(m.transitional))&&(C=p[6]||"",c=p[1],p[1].endsWith("::")||(c=c.slice(0,-1)),c=v(c+C,6),c.parts)){for(h=[parseInt(p[2]),parseInt(p[3]),parseInt(p[4]),parseInt(p[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},_.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,p=Math.floor(s/8);for(;g<p;)c[g]=255,g++;return p<16&&(c[p]=Math.pow(2,s%8)-1<<8-s%8),new this(c)},_.fromByteArray=function(s){let c=s.length;if(c===4)return new _.IPv4(s);if(c===16)return new _.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},_.isValid=function(s){return _.IPv6.isValid(s)||_.IPv4.isValid(s)},_.isValidCIDR=function(s){return _.IPv6.isValidCIDR(s)||_.IPv4.isValidCIDR(s)},_.parse=function(s){if(_.IPv6.isValid(s))return _.IPv6.parse(s);if(_.IPv4.isValid(s))return _.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},_.parseCIDR=function(s){try{return _.IPv6.parseCIDR(s)}catch{try{return _.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},_.process=function(s){let c=this.parse(s);return c.kind()==="ipv6"&&c.isIPv4MappedAddress()?c.toIPv4Address():c},_.subnetMatch=function(s,c,g){let p,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]),p=0;p<h.length;p++)if(C=h[p],s.kind()===C[0].kind()&&s.match.apply(s,C))return y}return g},typeof mt<"u"&&mt.exports?mt.exports=_:e.ipaddr=_})(Rn)});var Es={};sr(Es,{millionverifier:()=>Ts});module.exports=jo(Es);var Zo=Object.freeze({status:"aborted"});function I(e,t,r){function o(m,v){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:v,constr:d,traits:new Set},enumerable:!1}),m._zod.traits.has(e))return;m._zod.traits.add(e),t(m,v);let x=d.prototype,P=Object.keys(x);for(let D=0;D<P.length;D++){let _=P[D];_ in m||(m[_]=x[_].bind(m))}}i(o,"init");let a=r?.Parent??Object;class l extends a{static{i(this,"Definition")}}Object.defineProperty(l,"name",{value:e});function d(m){var v;let x=r?.Parent?new l:this;o(x,m),(v=x._zod).deferred??(v.deferred=[]);for(let P of x._zod.deferred)P();return x}return i(d,"_"),Object.defineProperty(d,"init",{value:o}),Object.defineProperty(d,Symbol.hasInstance,{value:i(m=>r?.Parent&&m instanceof r.Parent?!0:m?._zod?.traits?.has(e),"value")}),Object.defineProperty(d,"name",{value:e}),d}i(I,"$constructor");var q=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ke=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},It={};function ee(e){return e&&Object.assign(It,e),It}i(ee,"config");function Et(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(Et,"getEnumValues");function lr(e,t){return typeof t=="bigint"?t.toString():t}i(lr,"jsonStringifyReplacer");function Xe(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(Xe,"cached");function pr(e){return e==null}i(pr,"nullish");function qe(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(qe,"cleanRegex");var cr=Symbol("evaluating");function B(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==cr)return o===void 0&&(o=cr,o=r()),o},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}i(B,"defineLazy");var $t="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ze(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(ze,"isObject");var Fo=Xe(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function dr(e){if(ze(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(ze(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(dr,"isPlainObject");var mr=new Set(["string","number","symbol"]);function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(_e,"escapeRegex");function Ye(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}i(Ye,"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 fr(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(fr,"optionalKeys");var gr={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 Pe(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(Pe,"aborted");function ae(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}i(ae,"prefixIssues");function Je(e){return typeof e=="string"?e:e?.message}i(Je,"unwrapMessage");function se(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let a=Je(e.inst?._zod.def?.error?.(e))??Je(t?.error?.(e))??Je(r.customError?.(e))??Je(r.localeError?.(e))??"Invalid input";o.message=a}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}i(se,"finalizeIssue");function yr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(yr,"getLengthableOrigin");function bt(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}i(bt,"issue");var hr=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,lr,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),vr=I("$ZodError",hr),Ae=I("$ZodError",hr,{Parent:Error});var Vo=i(e=>(t,r,o,a)=>{let l=o?Object.assign(o,{async:!1}):{async:!1},d=t._zod.run({value:r,issues:[]},l);if(d instanceof Promise)throw new q;if(d.issues.length){let m=new(a?.Err??e)(d.issues.map(v=>se(v,l,ee())));throw $t(m,a?.callee),m}return d.value},"_parse"),Qe=Vo(Ae),Ho=i(e=>async(t,r,o,a)=>{let l=o?Object.assign(o,{async:!0}):{async:!0},d=t._zod.run({value:r,issues:[]},l);if(d instanceof Promise&&(d=await d),d.issues.length){let m=new(a?.Err??e)(d.issues.map(v=>se(v,l,ee())));throw $t(m,a?.callee),m}return d.value},"_parseAsync"),et=Ho(Ae),Go=i(e=>(t,r,o)=>{let a=o?{...o,async:!1}:{async:!1},l=t._zod.run({value:r,issues:[]},a);if(l instanceof Promise)throw new q;return l.issues.length?{success:!1,error:new(e??vr)(l.issues.map(d=>se(d,a,ee())))}:{success:!0,data:l.value}},"_safeParse"),Oe=Go(Ae),Wo=i(e=>async(t,r,o)=>{let a=o?Object.assign(o,{async:!0}):{async:!0},l=t._zod.run({value:r,issues:[]},a);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(d=>se(d,a,ee())))}:{success:!0,data:l.value}},"_safeParseAsync"),ke=Wo(Ae);var Ko="(?:(?:\\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])))",Jo=new RegExp(`^${Ko}$`);var xr=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),_r=/^-?\d+n?$/,Pr=/^-?\d+$/,St=/^-?\d+(?:\.\d+)?$/,Ir=/^(?:true|false)$/i;var ue=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Xo={number:"number",bigint:"bigint",object:"date"};var Tr=I("$ZodCheckGreaterThan",(e,t)=>{ue.init(e,t);let r=Xo[typeof t.value];e._zod.onattach.push(o=>{let a=o._zod.bag,l=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var Er=I("$ZodCheckNumberFormat",(e,t)=>{ue.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[a,l]=gr[t.format];e._zod.onattach.push(d=>{let m=d._zod.bag;m.format=t.format,m.minimum=a,m.maximum=l,r&&(m.pattern=Pr)}),e._zod.check=d=>{let m=d.value;if(r){if(!Number.isInteger(m)){d.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?d.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):d.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}m<a&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),m>l&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}});var $r=I("$ZodCheckMinLength",(e,t)=>{var r;ue.init(e,t),(r=e._zod.def).when??(r.when=o=>{let a=o.value;return!pr(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=yr(a);o.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}});var zt=I("$ZodCheckStringFormat",(e,t)=>{var r,o;ue.init(e,t),e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.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=()=>{})}),br=I("$ZodCheckRegex",(e,t)=>{zt.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 zr={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=zr;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let a of o)for(let l of a._zod.onattach)l(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,m,v)=>{let x=Pe(d),P;for(let D of m){if(D._zod.def.when){if(!D._zod.def.when(d))continue}else if(x)continue;let _=d.issues.length,s=D._zod.check(d);if(s instanceof Promise&&v?.async===!1)throw new q;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,d.issues.length!==_&&(x||(x=Pe(d,_)))});else{if(d.issues.length===_)continue;x||(x=Pe(d,_))}}return P?P.then(()=>d):d},"runChecks"),l=i((d,m,v)=>{if(Pe(d))return d.aborted=!0,d;let x=a(m,o,v);if(x instanceof Promise){if(v.async===!1)throw new q;return x.then(P=>e._zod.parse(P,v))}return e._zod.parse(x,v)},"handleCanaryResult");e._zod.run=(d,m)=>{if(m.skipChecks)return e._zod.parse(d,m);if(m.direction==="backward"){let x=e._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return x instanceof Promise?x.then(P=>l(P,d,m)):l(x,d,m)}let v=e._zod.parse(d,m);if(v instanceof Promise){if(m.async===!1)throw new q;return v.then(x=>a(x,o,m))}return a(v,o,m)}}B(e,"~standard",()=>({validate:i(a=>{try{let l=Oe(e,a);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return ke(e,a).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},"validate"),vendor:"zod",version:1}))}),nt=I("$ZodString",(e,t)=>{Z.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??xr(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}}),At=I("$ZodStringFormat",(e,t)=>{zt.init(e,t),nt.init(e,t)});var wr=I("$ZodURL",(e,t)=>{At.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 Ot=I("$ZodNumber",(e,t)=>{Z.init(e,t),e._zod.pattern=e._zod.bag.pattern??St,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 l=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,...l?{received:l}:{}}),r}}),Nr=I("$ZodNumberFormat",(e,t)=>{Er.init(e,t),Ot.init(e,t)}),kt=I("$ZodBoolean",(e,t)=>{Z.init(e,t),e._zod.pattern=Ir,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}}),Dr=I("$ZodBigInt",(e,t)=>{Z.init(e,t),e._zod.pattern=_r,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 Cr=I("$ZodAny",(e,t)=>{Z.init(e,t),e._zod.parse=r=>r}),Ur=I("$ZodUnknown",(e,t)=>{Z.init(e,t),e._zod.parse=r=>r});var Mr=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}}),Lr=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,l=a instanceof Date;return l&&!Number.isNaN(a.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:a,...l?{received:"Invalid Date"}:{},inst:e}),r}});function Ar(e,t,r){e.issues.length&&t.issues.push(...ae(r,e.issues)),t.value[r]=e.value}i(Ar,"handleArrayResult");var jr=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 l=[];for(let d=0;d<a.length;d++){let m=a[d],v=t.element._zod.run({value:m,issues:[]},o);v instanceof Promise?l.push(v.then(x=>Ar(x,r,d))):Ar(v,r,d)}return l.length?Promise.all(l).then(()=>r):r}});function rt(e,t,r,o,a){if(e.issues.length){if(a&&!(r in o))return;t.issues.push(...ae(r,e.issues))}e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}i(rt,"handlePropertyResult");function qo(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=fr(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(qo,"normalizeDef");function Yo(e,t,r,o,a,l){let d=[],m=a.keySet,v=a.catchall._zod,x=v.def.type,P=v.optout==="optional";for(let D in t){if(m.has(D))continue;if(x==="never"){d.push(D);continue}let _=v.run({value:t[D],issues:[]},o);_ instanceof Promise?e.push(_.then(s=>rt(s,r,D,t,P))):rt(_,r,D,t,P)}return d.length&&r.issues.push({code:"unrecognized_keys",keys:d,input:t,inst:l}),e.length?Promise.all(e).then(()=>r):r}i(Yo,"handleCatchall");var Zr=I("$ZodObject",(e,t)=>{if(Z.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let m=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let v={...m};return Object.defineProperty(t,"shape",{value:v}),v},"get")})}let o=Xe(()=>qo(t));B(e._zod,"propValues",()=>{let m=t.shape,v={};for(let x in m){let P=m[x]._zod;if(P.values){v[x]??(v[x]=new Set);for(let D of P.values)v[x].add(D)}}return v});let a=ze,l=t.catchall,d;e._zod.parse=(m,v)=>{d??(d=o.value);let x=m.value;if(!a(x))return m.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),m;m.value={};let P=[],D=d.shape;for(let _ of d.keys){let s=D[_],c=s._zod.optout==="optional",g=s._zod.run({value:x[_],issues:[]},v);g instanceof Promise?P.push(g.then(p=>rt(p,m,_,x,c))):rt(g,m,_,x,c)}return l?Yo(P,x,m,v,o.value,e):P.length?Promise.all(P).then(()=>m):m}});function Or(e,t,r,o){for(let l of e)if(l.issues.length===0)return t.value=l.value,t;let a=e.filter(l=>!Pe(l));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(l=>l.issues.map(d=>se(d,o,ee())))}),t)}i(Or,"handleUnionResults");var Rt=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(l=>l._zod.pattern);return new RegExp(`^(${a.map(l=>qe(l.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(a,l)=>{if(r)return o(a,l);let d=!1,m=[];for(let v of t.options){let x=v._zod.run({value:a.value,issues:[]},l);if(x instanceof Promise)m.push(x),d=!0;else{if(x.issues.length===0)return x;m.push(x)}}return d?Promise.all(m).then(v=>Or(v,a,e,l)):Or(m,a,e,l)}});var Fr=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Rt.init(e,t);let r=e._zod.parse;B(e._zod,"propValues",()=>{let a={};for(let l of t.options){let d=l._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(let[m,v]of Object.entries(d)){a[m]||(a[m]=new Set);for(let x of v)a[m].add(x)}}return a});let o=Xe(()=>{let a=t.options,l=new Map;for(let d of a){let m=d._zod.propValues?.[t.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(d)}"`);for(let v of m){if(l.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);l.set(v,d)}}return l});e._zod.parse=(a,l)=>{let d=a.value;if(!ze(d))return a.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),a;let m=o.value.get(d?.[t.discriminator]);return m?m._zod.run(a,l):t.unionFallback?r(a,l):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:d,path:[t.discriminator],inst:e}),a)}});var Br=I("$ZodRecord",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{let a=r.value;if(!dr(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),r;let l=[],d=t.keyType._zod.values;if(d){r.value={};let m=new Set;for(let x of d)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){m.add(typeof x=="number"?x.toString():x);let P=t.valueType._zod.run({value:a[x],issues:[]},o);P instanceof Promise?l.push(P.then(D=>{D.issues.length&&r.issues.push(...ae(x,D.issues)),r.value[x]=D.value})):(P.issues.length&&r.issues.push(...ae(x,P.issues)),r.value[x]=P.value)}let v;for(let x in a)m.has(x)||(v=v??[],v.push(x));v&&v.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:v})}else{r.value={};for(let m of Reflect.ownKeys(a)){if(m==="__proto__")continue;let v=t.keyType._zod.run({value:m,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&St.test(m)&&v.issues.length){let D=t.keyType._zod.run({value:Number(m),issues:[]},o);if(D instanceof Promise)throw new Error("Async schemas not supported in object keys currently");D.issues.length===0&&(v=D)}if(v.issues.length){t.mode==="loose"?r.value[m]=a[m]:r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(D=>se(D,o,ee())),input:m,path:[m],inst:e});continue}let P=t.valueType._zod.run({value:a[m],issues:[]},o);P instanceof Promise?l.push(P.then(D=>{D.issues.length&&r.issues.push(...ae(m,D.issues)),r.value[v.value]=D.value})):(P.issues.length&&r.issues.push(...ae(m,P.issues)),r.value[v.value]=P.value)}}return l.length?Promise.all(l).then(()=>r):r}});var Vr=I("$ZodEnum",(e,t)=>{Z.init(e,t);let r=Et(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(a=>mr.has(typeof a)).map(a=>typeof a=="string"?_e(a):a.toString()).join("|")})$`),e._zod.parse=(a,l)=>{let d=a.value;return o.has(d)||a.issues.push({code:"invalid_value",values:r,input:d,inst:e}),a}}),Hr=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"?_e(o):o?_e(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,a)=>{let l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),o}});var Gr=I("$ZodTransform",(e,t)=>{Z.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ke(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 kr(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(kr,"handleOptionalResult");var Wr=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(`^(${qe(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(l=>kr(l,r.value)):kr(a,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}});var Kr=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(`^(${qe(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 Jr=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 l=t.out._zod.run(r,o);return l instanceof Promise?l.then(d=>tt(d,t.in,o)):tt(l,t.in,o)}let a=t.in._zod.run(r,o);return a instanceof Promise?a.then(l=>tt(l,t.out,o)):tt(a,t.out,o)}});function tt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(tt,"handlePipeResult");var Xr=I("$ZodCustom",(e,t)=>{ue.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(l=>Rr(l,r,o,e));Rr(a,r,o,e)}});function Rr(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(bt(a))}}i(Rr,"handleRefineResult");var Yr;var wt=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 Qr(){return new wt}i(Qr,"registry");(Yr=globalThis).__zod_globalRegistry??(Yr.__zod_globalRegistry=Qr());var Nt=globalThis.__zod_globalRegistry;function en(e,t){return new e({type:"string",...L(t)})}i(en,"_string");function tn(e,t){return new e({type:"string",coerce:!0,...L(t)})}i(tn,"_coercedString");function rn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...L(t)})}i(rn,"_url");function nn(e,t){return new e({type:"number",checks:[],...L(t)})}i(nn,"_number");function on(e,t){return new e({type:"number",coerce:!0,checks:[],...L(t)})}i(on,"_coercedNumber");function an(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...L(t)})}i(an,"_int");function sn(e,t){return new e({type:"boolean",...L(t)})}i(sn,"_boolean");function un(e,t){return new e({type:"boolean",coerce:!0,...L(t)})}i(un,"_coercedBoolean");function cn(e,t){return new e({type:"bigint",coerce:!0,...L(t)})}i(cn,"_coercedBigint");function ln(e){return new e({type:"any"})}i(ln,"_any");function pn(e){return new e({type:"unknown"})}i(pn,"_unknown");function dn(e,t){return new e({type:"void",...L(t)})}i(dn,"_void");function mn(e,t){return new e({type:"date",coerce:!0,...L(t)})}i(mn,"_coercedDate");function ot(e,t){return new Tr({check:"greater_than",...L(t),value:e,inclusive:!0})}i(ot,"_gte");function J(e,t){return new $r({check:"min_length",...L(t),minimum:e})}i(J,"_minLength");function ce(e,t){return new br({check:"string_format",format:"regex",...L(t),pattern:e})}i(ce,"_regex");function fn(e,t,r){let o=L(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}i(fn,"_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)=>Qe(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Oe(e,r,o),e.parseAsync=async(r,o)=>et(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>ke(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)=>Ye(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.apply=r=>r(e)}),at=I("ZodMiniString",(e,t)=>{nt.init(e,t),V.init(e,t)});function n(e){return en(at,e)}i(n,"string");var gn=I("ZodMiniStringFormat",(e,t)=>{At.init(e,t),at.init(e,t)});var pi=I("ZodMiniURL",(e,t)=>{wr.init(e,t),gn.init(e,t)});function yn(e){return rn(pi,e)}i(yn,"url");var st=I("ZodMiniNumber",(e,t)=>{Ot.init(e,t),V.init(e,t)});function H(e){return nn(st,e)}i(H,"number");var di=I("ZodMiniNumberFormat",(e,t)=>{Nr.init(e,t),st.init(e,t)});function hn(e){return an(di,e)}i(hn,"int");var Dt=I("ZodMiniBoolean",(e,t)=>{kt.init(e,t),V.init(e,t)});function M(e){return sn(Dt,e)}i(M,"boolean");var vn=I("ZodMiniBigInt",(e,t)=>{Dr.init(e,t),V.init(e,t)});var mi=I("ZodMiniAny",(e,t)=>{Cr.init(e,t),V.init(e,t)});function we(){return ln(mi)}i(we,"any");var fi=I("ZodMiniUnknown",(e,t)=>{Ur.init(e,t),V.init(e,t)});function z(){return pn(fi)}i(z,"unknown");var gi=I("ZodMiniVoid",(e,t)=>{Mr.init(e,t),V.init(e,t)});function xn(e){return dn(gi,e)}i(xn,"_void");var _n=I("ZodMiniDate",(e,t)=>{Lr.init(e,t),V.init(e,t)});var yi=I("ZodMiniArray",(e,t)=>{jr.init(e,t),V.init(e,t)});function k(e,t){return new yi({type:"array",element:e,...L(t)})}i(k,"array");var hi=I("ZodMiniObject",(e,t)=>{Zr.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 hi(r)}i(u,"object");var vi=I("ZodMiniUnion",(e,t)=>{Rt.init(e,t),V.init(e,t)});function R(e,t){return new vi({type:"union",options:e,...L(t)})}i(R,"union");var xi=I("ZodMiniDiscriminatedUnion",(e,t)=>{Fr.init(e,t),V.init(e,t)});function le(e,t,r){return new xi({type:"union",options:t,discriminator:e,...L(r)})}i(le,"discriminatedUnion");var _i=I("ZodMiniRecord",(e,t)=>{Br.init(e,t),V.init(e,t)});function A(e,t,r){return new _i({type:"record",keyType:e,valueType:t,...L(r)})}i(A,"record");var Pi=I("ZodMiniEnum",(e,t)=>{Vr.init(e,t),V.init(e,t),e.options=Object.values(t.entries)});function N(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Pi({type:"enum",entries:r,...L(t)})}i(N,"_enum");var Ii=I("ZodMiniLiteral",(e,t)=>{Hr.init(e,t),V.init(e,t)});function E(e,t){return new Ii({type:"literal",values:Array.isArray(e)?e:[e],...L(t)})}i(E,"literal");var Ti=I("ZodMiniTransform",(e,t)=>{Gr.init(e,t),V.init(e,t)});function pe(e){return new Ti({type:"transform",transform:e})}i(pe,"transform");var Ei=I("ZodMiniOptional",(e,t)=>{Wr.init(e,t),V.init(e,t)});function f(e){return new Ei({type:"optional",innerType:e})}i(f,"optional");var $i=I("ZodMiniNullable",(e,t)=>{Kr.init(e,t),V.init(e,t)});function Ne(e){return new $i({type:"nullable",innerType:e})}i(Ne,"nullable");var bi=I("ZodMiniPipe",(e,t)=>{Jr.init(e,t),V.init(e,t)});function de(e,t){return new bi({type:"pipe",in:e,out:t})}i(de,"pipe");var Si=I("ZodMiniCustom",(e,t)=>{Xr.init(e,t),V.init(e,t)});function ut(e,t){return fn(Si,e??(()=>!0),t)}i(ut,"custom");var De={};sr(De,{bigint:()=>wi,boolean:()=>Ri,date:()=>Ni,number:()=>ki,string:()=>Oi});function Oi(e){return tn(at,e)}i(Oi,"string");function ki(e){return on(st,e)}i(ki,"number");function Ri(e){return un(Dt,e)}i(Ri,"boolean");function wi(e){return cn(vn,e)}i(wi,"bigint");function Ni(e){return mn(_n,e)}i(Ni,"date");var Ut=u({retryOnFailure:u({defaultValue:f(M()),hide:f(M())}),continueOnFailure:u({defaultValue:f(M()),hide:f(M())})}),Ct=class{constructor(t,r,o,a,l,d,m,v,x,P,D){this.name=t;this.displayName=r;this.description=o;this.props=a;this.run=l;this.test=d;this.requireAuth=m;this.errorHandlingOptions=v;this.outputSchema=x;this.audience=P;this.aiMetadata=D}static{i(this,"IAction")}},In=i(e=>new Ct(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:f(n())}),w=i((e,t)=>u({type:E(t),required:M(),defaultValue:f(we())}),"TPropertyValue");var G=u({...U.shape,...w(n(),"SHORT_TEXT").shape}),te=u({...U.shape,...w(n(),"LONG_TEXT").shape});var Tn=u({label:n(),value:z()}),ct=u({disabled:f(M()),placeholder:f(n()),options:k(Tn)});var W=u({...U.shape,options:ct,...w(z(),"STATIC_DROPDOWN").shape}),re=u({...U.shape,options:ct,...w(k(z()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Mt=u({...U.shape,...w(z(),"DROPDOWN").shape,refreshers:k(n())}),Ce=u({...U.shape,...w(k(z()),"MULTI_SELECT_DROPDOWN").shape,refreshers:k(n())});var ne=u({...U.shape,...w(M(),"CHECKBOX").shape});var oe=u({...U.shape,...w(H(),"NUMBER").shape});var Ue=u({...U.shape,streaming:f(M()),...w(z(),"FILE").shape});var Me=u({...U.shape,...w(n(),"DATE_TIME").shape});var En=A(n(),R([G,te,W,Ce,re,ne,oe,Ue,Me])),Le=u({...U.shape,properties:En,...w(k(z()),"ARRAY").shape});var je=u({...U.shape,...w(R([A(n(),z())]),"JSON").shape});var $n=R([G,W,je,Le,re]),Ci=A(n(),$n),Lt=u({refreshers:k(n()),...U.shape,...w(z(),"DYNAMIC").shape});var lt=u({...U.shape,...w(xn(),"MARKDOWN").shape});var Ze=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Ze||{}),Ie=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ie||{}),Te=(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))(Te||{});var Fe=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Fe||{}),jt="both_client_credentials_and_authorization_code";var fe=(a=>(a.POLLING="POLLING",a.WEBHOOK="WEBHOOK",a.APP_WEBHOOK="APP_WEBHOOK",a.MANUAL="MANUAL",a))(fe||{}),Be=(l=>(l.NONE="NONE",l.HEADER_PRESENT="HEADER_PRESENT",l.QUERY_PRESENT="QUERY_PRESENT",l.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",l.HEAD_REQUEST="HEAD_REQUEST",l))(Be||{}),Ui=u({strategy:N(Be),paramName:f(n())}),Ve=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Ve||{});var pt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(pt||{}),bn=u({status:f(H()),body:f(z()),headers:f(A(n(),n()))}),Sn=u({type:E("DELAY"),resumeDateTime:n(),requestIdToReply:f(n()),handlerId:f(n()),streamStepProgress:f(N(pt))}),zn=u({type:E("WEBHOOK"),requestId:n(),requestIdToReply:f(n()),response:bn,handlerId:f(n()),streamStepProgress:f(N(pt))}),Mi=R([Sn,zn]);var Li=u({body:z(),rawBody:f(z()),headers:A(n(),n()),queryParams:A(n(),n())});var Zt=We(require("crypto"),1);var ji=128,ye,Ee,Zi=i(e=>{!ye||ye.length<e?(ye=Buffer.allocUnsafe(e*ji),Zt.default.randomFillSync(ye),Ee=0):Ee+e>ye.length&&(Zt.default.randomFillSync(ye),Ee=0),Ee+=e},"fillPool"),Fi=i(e=>(Zi(e|=0),ye.subarray(Ee-e,Ee)),"random"),Bi=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(l=t)=>{let d="";for(;;){let m=r(a),v=a;for(;v--;)if(d+=e[m[v]&o]||"",d.length===l)return d}}},"customRandom"),On=i((e,t=21)=>Bi(e,t,Fi),"customAlphabet");var Vi="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",kn=21,ih=n().check(ce(new RegExp(`^[0-9a-zA-Z]{${kn}}$`))),Hi=On(Vi,kn);var me=de(pe(e=>e instanceof Date?e.toISOString():e),n()),K={id:n(),created:me,updated:me},j=i(e=>f(Ne(e)),"Nullable");function Ft(e){return f(Ne(N(e)))}i(Ft,"NullableEnum");var uh=de(pe(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),f(M())),dt=i(e=>de(pe(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),f(k(e))),"OptionalArrayFromQuery");var ph=A(n(),z());var He=(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))(He||{});var Th=n().check(ce(/^#[0-9A-Fa-f]{6}$/));var $h=u({filename:n(),data:z(),type:E("file"),mimetype:f(n())});var Gi=We(wn());var Rh=u({...K,name:n(),permissions:k(n()),platformId:j(n()),type:n(),userCount:f(H())});var Nn=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(Nn||{}),Bt=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Bt||{}),Vt=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(Vt||{});var Ht=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(Ht||{});var Gt=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Gt||{});var Wi=u({mode:N(Nn),value:z()}),Ki=u({auth:f(n()),fields:A(n(),Wi)}),Ji=u({pieceName:n(),pieceVersion:n(),actionName:n(),predefinedInput:f(Ki)}),Xi=u({type:E("PIECE"),toolName:n().check(J(1)),pieceMetadata:Ji}),qi=u({type:E("none")}),Yi=u({type:E("access_token"),accessToken:n()}),Qi=u({type:E("api_key"),apiKey:n(),apiKeyHeader:n()}),ea=u({type:E("headers"),headers:A(n(),n())}),ta=le("type",[qi,Yi,Qi,ea]),Dn=u({type:E("FLOW"),toolName:n().check(J(1)),externalFlowId:n(),flowDisplayName:f(n())}),Cn=u({type:E("MCP"),toolName:n().check(J(1)),serverUrl:yn(),protocol:N(Vt),auth:ta}),Un=u({type:E("KNOWLEDGE_BASE"),toolName:n().check(J(1)),sourceType:N(Bt),sourceId:n(),sourceName:n()}),ra=le("type",[Xi,Dn,Cn,Un]),na=u({displayName:n(),description:f(n()),type:N(Ht)}),Mn=u({type:E("MARKDOWN"),markdown:n()}),$e={type:E("TOOL_CALL"),input:j(A(n(),z())),output:f(z()),toolName:n(),status:N(Gt),toolCallId:n(),startTime:n(),endTime:f(n())},cv=u($e),Ln=le("toolCallType",[u({...$e,toolCallType:E("PIECE"),pieceName:n(),pieceVersion:n(),actionName:n()}),u({...$e,toolCallType:E("FLOW"),displayName:n(),externalFlowId:n()}),u({...$e,toolCallType:E("MCP"),displayName:n(),serverUrl:n()}),u({...$e,toolCallType:E("KNOWLEDGE_BASE"),displayName:n(),sourceType:n()}),u({...$e,toolCallType:E("UNKNOWN"),displayName:n()})]),oa=R([Mn,Ln]);var Wt=(r=>(r.IMAGE="image",r.TEXT="text",r))(Wt||{}),ie=u({apiKey:n()}),ia=ie,aa=u({apiKey:n(),apiKeyHash:n()}),sa=ie,ua=ie,ca=ie,la=ie,pa=ie,da=ie,ma=ie,Vn=u({accessKeyId:n().check(J(1)),secretAccessKey:n().check(J(1))}),fa=u({}),ga=u({}),ya=u({}),ha=u({}),va=u({}),xa=u({}),Hn=u({modelId:n(),modelName:n(),modelType:N(Wt)}),Gn=u({apiKeyHeader:n(),baseUrl:n(),models:k(Hn),defaultHeaders:f(A(n(),n()))}),Wn=u({accountId:n(),gatewayId:n(),models:k(Hn),vertexProject:f(n()),vertexRegion:f(n())}),Kn=u({resourceName:n(),apiVersion:de(pe(e=>typeof e=="string"&&e.trim().length===0?void 0:e),f(n()))}),Jn=u({region:n().check(J(1))}),_a=R([ia,ca,la,pa,da,ua,sa,aa,Vn,ma]),Xn=R([Gn,Wn,Kn,Jn,fa,ya,ha,va,ga,xa]),Pa=u({id:n(),name:n(),type:N(Wt)}),Ia=u({id:n(),name:n(),provider:N(He),config:Xn,enabledForChat:M()}),Ta=u({provider:N(He),config:Xn,auth:_a,platformId:n()});var mv={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},jn=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Ea=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],$a=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Zn=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],ba=["grok-4.20","grok-4.1-fast"],Sa={openai:jn,anthropic:Ea,google:Zn,activepieces:[...$a.map(e=>`anthropic/${e}`),...jn.map(e=>`openai/${e}`),...Zn.map(e=>`google/${e}`),...ba.map(e=>`x-ai/${e}`)]};var Fn=128e3,za={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function Aa({provider:e}){return e?za[e]??Fn:Fn}i(Aa,"getMaxContextTokens");var Bn={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},Oa={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},ka=new Set(["anthropic","mistral"]);function Y(e){return{chatModels:Sa[e],maxContextTokens:Aa({provider:e}),defaultEmbeddingModel:Bn[e],supportsEmbedding:Bn[e]!==void 0,supportsImageGeneration:!ka.has(e),webSearch:Oa[e]}}i(Y,"buildProviderCapabilities");var Ra={openai:Y("openai"),anthropic:Y("anthropic"),openrouter:Y("openrouter"),azure:Y("azure"),google:Y("google"),"cloudflare-gateway":Y("cloudflare-gateway"),custom:Y("custom"),bedrock:Y("bedrock"),mistral:Y("mistral"),activepieces:Y("activepieces")};var wa=u({base64Url:n(),fileName:n(),extension:f(n())}),Na=u({mimeType:n(),url:n(),fileName:f(n())}),Kt=R([wa,Na]);var Da=R([u({type:E("file"),value:Kt}),u({type:E("markdown"),value:n(),files:f(k(Kt))})]),Ca=u({sessionId:n(),message:n(),files:f(k(n()))});var Yn=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Yn||{}),Qn=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Qn||{}),Jt=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(Jt||{});var Ua=R([u({...K,name:n(),externalId:n(),type:E("STATIC_DROPDOWN"),tableId:n(),projectId:n(),data:u({options:k(u({value:n()}))})}),u({...K,name:n(),externalId:n(),type:R([E("TEXT"),E("NUMBER"),E("DATE")]),tableId:n(),projectId:n()})]),Ma=u({...K,name:n(),folderId:j(n()),projectId:n(),externalId:n(),status:Ft(Qn),trigger:Ft(Yn)}),La=u({...K,tableId:n(),projectId:n(),cells:A(n(),u({updated:n(),created:n(),value:z(),fieldName:n()}))}),ja=u({events:k(N(Jt)),webhookUrl:n(),flowId:n()}),Za=u({fields:k(u({id:n(),name:n()})),rows:k(A(n(),n())),name:n()}),Fa=u({projectId:n(),limit:f(De.number()),cursor:f(n()),name:f(n()),externalIds:dt(n()),folderId:f(n()),folderIds:dt(n())}),Ba=u({records:k(k(u({fieldId:n(),value:to()}))),tableId:n()}),Va=u({cells:f(k(u({fieldId:n(),value:to()}))),tableId:n(),agentUpdate:f(M())}),eo=le("operator",[he("eq"),he("neq"),he("gt"),he("gte"),he("lt"),he("lte"),he("co"),qn("exists"),qn("not_exists")]),Ha=u({tableId:n(),limit:f(De.number()),cursor:f(n()),filters:dt(eo)});function to(){return de(pe(e=>e==null?e:String(e)),Ne(n()))}i(to,"coerceToString");function he(e){return u({fieldId:n(),operator:E(e),value:n()})}i(he,"valueFilter");function qn(e){return u({fieldId:n(),operator:E(e)})}i(qn,"existenceFilter");var Ga=u({status:f(H()),body:f(z()),headers:f(A(n(),n()))}),Wa=u({...K,deleted:j(me),ownerId:n(),displayName:n(),platformId:n(),externalId:j(n())});var ro=u({name:n(),description:f(n()),type:n(),required:M()}),Ka=u({pieceName:n(),triggerName:n(),input:u({toolName:n(),toolDescription:n(),inputSchema:k(ro),returnsResponse:M()})});var no="^[0-9]+\\.[0-9]+\\.[0-9]+$",Rv=new RegExp(no),Xa="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",wv=n().check(ce(new RegExp(no))),Nv=n().check(ce(new RegExp(Xa))),qa=u({packageType:E("ARCHIVE"),pieceType:N(Ie),pieceName:n(),pieceVersion:n(),archiveId:n(),platformId:n()}),oo=u({packageType:E("REGISTRY"),pieceType:E("OFFICIAL"),pieceName:n(),pieceVersion:n()}),io=u({packageType:E("REGISTRY"),pieceType:E("CUSTOM"),pieceName:n(),pieceVersion:n(),platformId:n()}),Dv=R([oo,io]),Cv=R([qa,oo,io]);var Ya=le("type",[u({type:E("CRON_EXPRESSION"),cronExpression:n(),timezone:n()}),u({type:E("INTERVAL"),intervalMs:hn().check(ot(6e4))})]),Uv=u({...K,type:N(fe),projectId:n(),flowId:n(),triggerName:n(),schedule:j(Ya),flowVersionId:n(),pieceName:n(),pieceVersion:n(),deleted:j(n()),simulate:M()}),ao=(p=>(p.UNKNOWN="UNKNOWN",p.FLOW_RUN_LOG="FLOW_RUN_LOG",p.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",p.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",p.FLOW_STEP_FILE="FLOW_STEP_FILE",p.SAMPLE_DATA="SAMPLE_DATA",p.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",p.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",p.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",p.PROJECT_RELEASE="PROJECT_RELEASE",p.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",p.PLATFORM_ASSET="PLATFORM_ASSET",p.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",p.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",p.KNOWLEDGE_BASE="KNOWLEDGE_BASE",p.FLOW_BUNDLE="FLOW_BUNDLE",p))(ao||{}),so=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(so||{}),uo=(r=>(r.S3="S3",r.DB="DB",r))(uo||{}),Mv=u({...K,projectId:j(n()),platformId:j(n()),type:N(ao),compression:N(so),data:f(z()),location:N(uo),size:j(H()),fileName:j(n()),s3Key:j(n()),metadata:j(A(n(),n()))}),co=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(co||{}),lo=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(lo||{}),Lv=u({id:n(),email:n(),firstName:n(),status:N(lo),externalId:j(n()),platformId:j(n()),platformRole:N(co),lastName:n(),created:me,updated:me,lastActiveDate:j(me),imageUrl:j(n())});var Xt=u({...U.shape,...w(A(n(),z()),"OBJECT").shape});var go=u({...U.shape,...w(n(),"COLOR").shape});var qt=R([G,te,lt,ne,W,re,Mt,Ce,Lt,oe,Le,Xt,je,Me,Ue,go]),ft={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 Q=u({displayName:n(),description:f(n())});var yo=u({username:n(),password:n()}),Yt=u({...Q.shape,username:u({displayName:n(),description:f(n())}),password:u({displayName:n(),description:f(n())}),...w(yo,"BASIC_AUTH").shape});var rs=A(n(),R([G,te,oe,ne,W])),Qt=u({...Q.shape,props:rs,...w(z(),"CUSTOM_AUTH").shape});var ve=u({...Q.shape,...w(u({auth:n()}),"SECRET_TEXT").shape});var ns=A(n(),R([G,te,ve,oe,ne,W,re,lt])),ho=u({...Q.shape,props:ns,...w(z(),"OIDC").shape});var er=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(er||{}),vo=R([G,ve,W]),xo=A(n(),vo),os=u({props:f(A(n(),vo)),authUrl:n(),tokenUrl:n(),scope:k(n()),prompt:f(R([E("none"),E("consent"),E("login"),E("omit")])),pkce:f(M()),pkceMethod:f(R([E("plain"),E("S256")])),authorizationMethod:f(N(er)),grantType:f(R([N(Fe),E(jt)])),extra:f(A(n(),n()))}),_o=u({access_token:n(),props:f(xo),data:A(n(),we())}),tr=u({...Q.shape,...os.shape,...w(_o,"OAUTH2").shape});var be=R([Yt,Qt,ho,tr,ve]),Ge="Connection",rr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Ge}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Ge,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Ge}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Ge}},None(){}};var h_={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 is=u({...U.shape,...w(z(),"CUSTOM").shape,code:n()});var ss=R([qt,be]),nr=A(n(),ss),U_=A(n(),qt);var Po=R([u({strategy:E("CRON"),cronExpression:n()}),u({strategy:E("NONE")})]);var Io="2",gt="0.82.0";var or=class{constructor(t,r,o,a,l,d,m,v,x=gt,P,D="",_){this.displayName=t;this.logoUrl=r;this.authors=o;this.events=a;this.categories=m;this.auth=v;this.minimumSupportedRelease=x;this.maximumSupportedRelease=P;this.description=D;this.deprecated=_;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:Io}),"getContextInfo");(!us(x)||cs(x,gt))&&(this.minimumSupportedRelease=gt),l.forEach(s=>this._actions[s.name]=s),d.forEach(s=>this._triggers[s.name]=s)}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,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},To=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,o,a)=>o===a.findIndex(l=>l.type===r.type)))throw new Error("Auth properties must be unique by type");return new or(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function us(e){return/^\d+\.\d+\.\d+$/.test(e)}i(us,"isValidSimpleSemver");function cs(e,t){let[r,o,a]=e.split(".").map(Number),[l,d,m]=t.split(".").map(Number);return r!==l?r<l:o!==d?o<d:a<m}i(cs,"isSemverLessThan");var ls=f(A(n(),A(n(),n()))),Eo=u({id:f(n()),name:n(),displayName:n(),logoUrl:n(),description:n(),authors:k(n()),platformId:f(n()),directoryPath:f(n()),auth:f(R([be,k(be)])),version:n(),categories:f(k(N(Te))),minimumSupportedRelease:f(n()),maximumSupportedRelease:f(n()),deprecated:f(M()),i18n:ls}),ps=N(["human","ai","both"]),$o=u({description:f(n()),idempotent:f(M())}),bo=u({name:n(),displayName:n(),description:n(),props:nr,requireAuth:M(),errorHandlingOptions:f(Ut),outputSchema:f(ut()),audience:f(ps),aiMetadata:f($o)}),So=u({name:n(),displayName:n(),description:n(),props:nr,errorHandlingOptions:f(Ut),type:N(fe),sampleData:z(),handshakeConfiguration:f(ut()),renewConfiguration:f(Po),testStrategy:N(Ve),outputSchema:f(ut()),aiMetadata:f($o)}),ds=u({...Eo.shape,actions:A(n(),bo),triggers:A(n(),So)}),ms=u({...Eo.shape,actions:H(),triggers:H(),suggestedActions:f(k(bo)),suggestedTriggers:f(k(So))}),zo=u({projectUsage:H(),pieceType:N(Ie),packageType:N(Ze),platformId:f(n()),archiveId:f(n())}),UP=u({...ds.shape,...zo.shape}),MP=u({...ms.shape,...zo.shape}),LP=u({name:n(),version:n()});var fs=We(require("path")),gs=We(require("fs/promises"));var yt=rr.SecretText({displayName:"MillionVerifier API Key",description:`API Key for MillionVerifier.
2
2
 
3
3
  API key you can find on this page: https://app.millionverifier.com/api
4
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});
5
+ **Test API key for development:** \`API_KEY_FOR_TEST\`. This API key will return random results.`,required:!0});var ko=require("node:stream");var ht=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),o=`${r.origin}${r.pathname}`,a=new URLSearchParams;return r.searchParams.forEach((l,d)=>{a.append(d,l)}),{urlWithoutQueryParams:o,queryParams:a}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var vt=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new ir,r=new ar){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},ir=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},ar=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 xt=class extends Error{constructor(r,o){let a=o.status||500,l=Buffer.isBuffer(o.responseBody)?o.responseBody.toString():o.responseBody;super(JSON.stringify({response:{status:a,body:l},request:{body:r}}));this.requestBody=r;this.status=a,this.responseBody=l}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 _t=class extends ht{static{i(this,"FetchHttpClient")}constructor(t="",r=new vt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:o,queryParams:a}=this.getUrl(t),l=this.getHeaders(t),d=t.queryParams??{};for(let[C,X]of Object.entries(d))a.append(C,X);let m=a.toString(),v=m?`${o}?${m}`:o,x=t.responseType??"json",P=t.followRedirects??!0,D=t.retries??0,{body:_,extraHeaders:s,isStream:c}=ys(t.method)?hs(t.body,l):{body:void 0,extraHeaders:{},isStream:!1},g=xs({...l,...s}),p=await vs(async()=>{let C=new AbortController,X=t.timeout&&t.timeout>0?setTimeout(()=>C.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:g,body:_,redirect:P?"follow":"manual",signal:C.signal};return c&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(v,xe)}finally{X!==void 0&&clearTimeout(X)}},D),y=P?300:400;if(p.status<200||p.status>=y){let C=await Ao(p,x),X=new xt(t.body,{status:p.status,responseBody:C});throw console.error("[HttpClient#(sanitized error message)] Request failed:",X),X}let h=await Ao(p,x);return{status:p.status,headers:_s(p.headers),body:h}}};function ys(e){return e!=="GET"&&e!=="HEAD"}i(ys,"acceptsRequestBody");function hs(e,t){if(Is(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Ps(e)){let o=new ko.PassThrough;return e.on("error",a=>o.destroy(a)),e.pipe(o),{body:o,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(hs,"serializeBody");async function Ao(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(Ao,"parseResponseBody");async function vs(e,t){let r;for(let o=0;o<=t;o++)try{let a=await e();if(a.status>=500&&o<t){await Oo(o);continue}return a}catch(a){if(r=a,o<t){await Oo(o);continue}throw a}throw r}i(vs,"sendWithRetries");function Oo(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Oo,"backoff");function xs(e){let t={};for(let[r,o]of Object.entries(e))o!==void 0&&(t[r.toLowerCase()]=Array.isArray(o)?o.join(", "):o);return t}i(xs,"normalizeHeaders");function _s(e){let t={};return e.forEach((r,o)=>{t[o]=r}),t}i(_s,"toHttpHeaders");function Ps(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}i(Ps,"isNodeFormData");function Is(e){return e==null}i(Is,"isNil");var Ro=new _t;var wo=In({auth:yt,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:ft.ShortText({displayName:"Email Address",description:"The email address to verify",required:!0}),timeout:ft.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,l=`https://millionverifier.com/api/v3/?${new URLSearchParams({api:o,email:t,timeout:r.toString()}).toString()}`;return(await Ro.sendRequest({method:"GET",url:l})).body}});var Ts=To({displayName:"MillionVerifier",auth:yt,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:[wo],triggers:[]});0&&(module.exports={millionverifier});