@activepieces/piece-beebole 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.
- package/package.json +7 -12
- package/src/index.js +20 -44
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-company.d.ts +0 -5
- package/src/lib/actions/create-company.d.ts.map +0 -1
- package/src/lib/actions/create-company.js +0 -51
- package/src/lib/actions/create-company.js.map +0 -1
- package/src/lib/actions/create-multiple-time-entries.d.ts +0 -12
- package/src/lib/actions/create-multiple-time-entries.d.ts.map +0 -1
- package/src/lib/actions/create-multiple-time-entries.js +0 -141
- package/src/lib/actions/create-multiple-time-entries.js.map +0 -1
- package/src/lib/actions/create-person.d.ts +0 -8
- package/src/lib/actions/create-person.d.ts.map +0 -1
- package/src/lib/actions/create-person.js +0 -81
- package/src/lib/actions/create-person.js.map +0 -1
- package/src/lib/actions/create-project.d.ts +0 -7
- package/src/lib/actions/create-project.d.ts.map +0 -1
- package/src/lib/actions/create-project.js +0 -64
- package/src/lib/actions/create-project.js.map +0 -1
- package/src/lib/actions/create-subproject.d.ts +0 -6
- package/src/lib/actions/create-subproject.d.ts.map +0 -1
- package/src/lib/actions/create-subproject.js +0 -54
- package/src/lib/actions/create-subproject.js.map +0 -1
- package/src/lib/actions/deactivate-subproject.d.ts +0 -6
- package/src/lib/actions/deactivate-subproject.d.ts.map +0 -1
- package/src/lib/actions/deactivate-subproject.js +0 -56
- package/src/lib/actions/deactivate-subproject.js.map +0 -1
- package/src/lib/actions/delete-multiple-time-entries.d.ts +0 -5
- package/src/lib/actions/delete-multiple-time-entries.d.ts.map +0 -1
- package/src/lib/actions/delete-multiple-time-entries.js +0 -104
- package/src/lib/actions/delete-multiple-time-entries.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -2
- package/src/lib/common/auth.d.ts.map +0 -1
- package/src/lib/common/auth.js +0 -37
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -10
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -24
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -23
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -207
- package/src/lib/common/props.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-beebole",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@activepieces/pieces-common": "0.12.3",
|
|
12
|
-
"@activepieces/pieces-framework": "0.30.0",
|
|
13
|
-
"@activepieces/shared": "0.87.1",
|
|
14
|
-
"tslib": "2.6.2"
|
|
15
|
-
}
|
|
5
|
+
"dependencies": {},
|
|
6
|
+
"files": [
|
|
7
|
+
"src/index.js",
|
|
8
|
+
"package.json",
|
|
9
|
+
"src/i18n"
|
|
10
|
+
]
|
|
16
11
|
}
|
package/src/index.js
CHANGED
|
@@ -1,44 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const create_project_1 = require("./lib/actions/create-project");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
logoUrl: 'https://cdn.activepieces.com/pieces/beebole.png',
|
|
22
|
-
categories: [shared_1.PieceCategory.PRODUCTIVITY, shared_1.PieceCategory.HUMAN_RESOURCES],
|
|
23
|
-
authors: ['sanket-a11y'],
|
|
24
|
-
actions: [
|
|
25
|
-
create_person_1.createPersonAction,
|
|
26
|
-
create_company_1.createCompanyAction,
|
|
27
|
-
create_project_1.createProjectAction,
|
|
28
|
-
create_subproject_1.createSubprojectAction,
|
|
29
|
-
deactivate_subproject_1.deactivateSubprojectAction,
|
|
30
|
-
create_multiple_time_entries_1.createMultipleTimeEntriesAction,
|
|
31
|
-
delete_multiple_time_entries_1.deleteMultipleTimeEntriesAction,
|
|
32
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
33
|
-
baseUrl: () => 'https://beebole-apps.com/api/v2',
|
|
34
|
-
auth: auth_1.beeboleAuth,
|
|
35
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
-
return ({
|
|
37
|
-
Authorization: `Basic ${Buffer.from(`${auth}:x`).toString('base64')}`,
|
|
38
|
-
});
|
|
39
|
-
}),
|
|
40
|
-
}),
|
|
41
|
-
],
|
|
42
|
-
triggers: [],
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var Ms=Object.create;var Je=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var Bs=Object.getOwnPropertyNames;var Fs=Object.getPrototypeOf,Zs=Object.prototype.hasOwnProperty;var o=(e,t)=>Je(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ln=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},dn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bs(t))!Zs.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=Ls(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Ms(Fs(e)):{},dn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Vs=e=>dn(Je({},"__esModule",{value:!0}),e);var ko=E((zo,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")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,l){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let y=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],P,M;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)y++;if(s.substr(0,2)==="::"&&y--,s.substr(-2,2)==="::"&&y--,y>l)return null;for(M=l-y,P=":";M--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),l=function(){let ne=s.split(":"),se=[];for(let Ke=0;Ke<ne.length;Ke++)se.push(parseInt(ne[Ke],16));return se}(),{parts:l,zoneId:v}}o(f,"expandIPv6");function g(s,l,y,m){if(s.length!==l.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=y-m,P<0&&(P=0),s[v]>>P!==l[v]>>P)return!1;m-=y,v+=1}return!0}o(g,"matchCIDR");function _(s){if(i.test(s))return parseInt(s,16);if(s[0]==="0"&&!isNaN(parseInt(s[1],10))){if(n.test(s))return parseInt(s,8);throw new Error(`ipaddr: cannot parse ${s} as octal`)}return parseInt(s,10)}o(_,"parseIntAuto");function b(s,l){for(;s.length<l;)s=`0${s}`;return s}o(b,"padPart");let x={};x.IPv4=function(){function s(l){if(l.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,m;for(y=0;y<l.length;y++)if(m=l[y],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=l}return o(s,"IPv4"),s.prototype.SpecialRanges={unspecified:[[new s([0,0,0,0]),8]],broadcast:[[new s([255,255,255,255]),32]],multicast:[[new s([224,0,0,0]),4]],linkLocal:[[new s([169,254,0,0]),16]],loopback:[[new s([127,0,0,0]),8]],carrierGradeNat:[[new s([100,64,0,0]),10]],private:[[new s([10,0,0,0]),8],[new s([172,16,0,0]),12],[new s([192,168,0,0]),16]],reserved:[[new s([192,0,0,0]),24],[new s([192,0,2,0]),24],[new s([192,88,99,0]),24],[new s([198,18,0,0]),15],[new s([198,51,100,0]),24],[new s([203,0,113,0]),24],[new s([240,0,0,0]),4]],as112:[[new s([192,175,48,0]),24],[new s([192,31,196,0]),24]],amt:[[new s([192,52,193,0]),24]]},s.prototype.kind=function(){return"ipv4"},s.prototype.match=function(l,y){let m;if(y===void 0&&(m=l,l=m[0],y=m[1]),l.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return g(this.octets,l.octets,8,y)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,y=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,M;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(M=m[P],y&&M!==0)return null;M!==8&&(y=!0),l+=M}else return null;return 32-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){return this.octets.slice(0)},s.prototype.toIPv4MappedAddress=function(){return x.IPv6.parse(`::ffff:${this.toString()}`)},s.prototype.toNormalizedString=function(){return this.toString()},s.prototype.toString=function(){return this.octets.join(".")},s}(),x.IPv4.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),y=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let l=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!l?!1:x.IPv4.isValidFourPartDecimal(l[1])},x.IPv4.networkAddressFromCIDR=function(s){let l,y,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let l=this.parser(s);if(l===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(l)},x.IPv4.parseCIDR=function(s){let l;if(l=s.match(/^(.+)\/(\d+)$/)){let y=parseInt(l[2]);if(y>=0&&y<=32){let m=[this.parse(l[1]),y];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let l,y,m;if(l=s.match(r.fourOctet))return function(){let v=l.slice(1,6),P=[];for(let M=0;M<v.length;M++)y=v[M],P.push(_(y));return P}();if(l=s.match(r.longValue)){if(m=_(l[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return function(){let v=[],P;for(P=0;P<=24;P+=8)v.push(m>>P&255);return v}().reverse()}else return(l=s.match(r.twoOctet))?function(){let v=l.slice(1,4),P=[];if(m=_(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(m>>16&255),P.push(m>>8&255),P.push(m&255),P}():(l=s.match(r.threeOctet))?function(){let v=l.slice(1,5),P=[];if(m=_(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return P.push(_(v[0])),P.push(_(v[1])),P.push(m>>8&255),P.push(m&255),P}():null},x.IPv4.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>32)throw new Error("ipaddr: invalid IPv4 prefix length");let l=[0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)l[y]=255,y++;return m<4&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.IPv6=function(){function s(l,y){let m,v;if(l.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(l[m]<<8|l[m+1]);else if(l.length===8)this.parts=l;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(l,y){let m;if(y===void 0&&(m=l,l=m[0],y=m[1]),l.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return g(this.parts,l.parts,16,y)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,y=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in m){if(P=m[v],y&&P!==0)return null;P!==16&&(y=!0),l+=P}else return null;return 128-l},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let l,y=[],m=this.parts;for(let v=0;v<m.length;v++)l=m[v],y.push(l>>8),y.push(l&255);return y},s.prototype.toFixedLengthString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(b(this.parts[v].toString(16),4));return m}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),l+y},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let l=this.parts.slice(-2),y=l[0],m=l[1];return new x.IPv4([y>>8,y&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let l=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),l+y},s.prototype.toRFC5952String=function(){let l=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),m=0,v=-1,P;for(;P=l.exec(y);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?y:`${y.substring(0,m)}::${y.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),y=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(y[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(l){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${l})`)}},x.IPv6.isIPv6=function(s){return this.parser(s)!==null},x.IPv6.isValid=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{let l=this.parser(s);return new this(l.parts,l.zoneId),!0}catch{return!1}},x.IPv6.isValidCIDR=function(s){if(typeof s=="string"&&s.indexOf(":")===-1)return!1;try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv6.networkAddressFromCIDR=function(s){let l,y,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(m[y],10)&parseInt(P[y],10)),y++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},x.IPv6.parse=function(s){let l=this.parser(s);if(l.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(l.parts,l.zoneId)},x.IPv6.parseCIDR=function(s){let l,y,m;if((y=s.match(/^(.+)\/(\d+)$/))&&(l=parseInt(y[2]),l>=0&&l<=128))return m=[this.parse(y[1]),l],Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},x.IPv6.parser=function(s){let l,y,m,v,P,M;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return f(s,8);if((m=s.match(d.transitional))&&(M=m[6]||"",l=m[1],m[1].endsWith("::")||(l=l.slice(0,-1)),l=f(l+M,6),l.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],y=0;y<P.length;y++)if(v=P[y],!(0<=v&&v<=255))return null;return l.parts.push(P[0]<<8|P[1]),l.parts.push(P[2]<<8|P[3]),{parts:l.parts,zoneId:l.zoneId}}return null},x.IPv6.subnetMaskFromPrefixLength=function(s){if(s=parseInt(s),s<0||s>128)throw new Error("ipaddr: invalid IPv6 prefix length");let l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,m=Math.floor(s/8);for(;y<m;)l[y]=255,y++;return m<16&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.fromByteArray=function(s){let l=s.length;if(l===4)return new x.IPv4(s);if(l===16)return new x.IPv6(s);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},x.isValid=function(s){return x.IPv6.isValid(s)||x.IPv4.isValid(s)},x.isValidCIDR=function(s){return x.IPv6.isValidCIDR(s)||x.IPv4.isValidCIDR(s)},x.parse=function(s){if(x.IPv6.isValid(s))return x.IPv6.parse(s);if(x.IPv4.isValid(s))return x.IPv4.parse(s);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},x.parseCIDR=function(s){try{return x.IPv6.parseCIDR(s)}catch{try{return x.IPv4.parseCIDR(s)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},x.process=function(s){let l=this.parse(s);return l.kind()==="ipv6"&&l.isIPv4MappedAddress()?l.toIPv4Address():l},x.subnetMatch=function(s,l,y){let m,v,P,M;y==null&&(y="unicast");for(v in l)if(Object.prototype.hasOwnProperty.call(l,v)){for(P=l[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(M=P[m],s.kind()===M[0].kind()&&s.match.apply(s,M))return v}return y},typeof Lt<"u"&&Lt.exports?Lt.exports=x:e.ipaddr=x})(zo)});var $i=E((eA,Ei)=>{var Ii=require("stream").Stream,xp=require("util");Ei.exports=ce;function ce(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ce,"DelayedStream");xp.inherits(ce,Ii);ce.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(ce.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ce.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ce.prototype.resume=function(){this._released||this.release(),this.source.resume()};ce.prototype.pause=function(){this.source.pause()};ce.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ce.prototype.pipe=function(){var e=Ii.prototype.pipe.apply(this,arguments);return this.resume(),e};ce.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};ce.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var ki=E((rA,zi)=>{var _p=require("util"),Ai=require("stream").Stream,Si=$i();zi.exports=G;function G(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(G,"CombinedStream");_p.inherits(G,Ai);G.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};G.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};G.prototype.append=function(e){var t=G.isStreamLike(e);if(t){if(!(e instanceof Si)){var r=Si.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};G.prototype.pipe=function(e,t){return Ai.prototype.pipe.call(this,e,t),this.resume(),e};G.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};G.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=G.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};G.prototype._pipeNext=function(e){this._currentStream=e;var t=G.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};G.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};G.prototype.write=function(e){this.emit("data",e)};G.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};G.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};G.prototype.end=function(){this._reset(),this.emit("end")};G.prototype.destroy=function(){this._reset(),this.emit("close")};G.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};G.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};G.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};G.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Oi=E((oA,wi)=>{"use strict";wi.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var Di=E(re=>{"use strict";var qt=Oi(),Pp=require("path").extname,Ri=/^\s*([^;\s]*)(?:;|\s|$)/,bp=/^text\//i;re.charset=Ni;re.charsets={lookup:Ni};re.contentType=Tp;re.extension=Ip;re.extensions=Object.create(null);re.lookup=Ep;re.types=Object.create(null);$p(re.extensions,re.types);function Ni(e){if(!e||typeof e!="string")return!1;var t=Ri.exec(e),r=t&&qt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&bp.test(t[1])?"UTF-8":!1}o(Ni,"charset");function Tp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?re.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=re.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Tp,"contentType");function Ip(e){if(!e||typeof e!="string")return!1;var t=Ri.exec(e),r=t&&re.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ip,"extension");function Ep(e){if(!e||typeof e!="string")return!1;var t=Pp("x."+e).toLowerCase().substr(1);return t&&re.types[t]||!1}o(Ep,"lookup");function $p(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(qt).forEach(o(function(i){var u=qt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var f=c[d];if(t[f]){var g=r.indexOf(qt[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(g>_||g===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o($p,"populateMaps")});var Ui=E((sA,Ci)=>{Ci.exports=Sp;function Sp(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Sp,"defer")});var Br=E((cA,Mi)=>{var ji=Ui();Mi.exports=Ap;function Ap(e){var t=!1;return ji(function(){t=!0}),o(function(n,i){t?e(n,i):ji(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Ap,"async")});var Fr=E((lA,Li)=>{Li.exports=zp;function zp(e){Object.keys(e.jobs).forEach(kp.bind(e)),e.jobs={}}o(zp,"abort");function kp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(kp,"clean")});var Zr=E((mA,Fi)=>{var Bi=Br(),wp=Fr();Fi.exports=Op;function Op(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Rp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?wp(r):r.results[i]=c,n(u,r.results))})}o(Op,"iterate");function Rp(e,t,r,n){var i;return e.length==2?i=e(r,Bi(n)):i=e(r,t,Bi(n)),i}o(Rp,"runJob")});var Vr=E((gA,Zi)=>{Zi.exports=Np;function Np(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(i,u){return t(e[i],e[u])}),n}o(Np,"state")});var Hr=E((hA,Vi)=>{var Dp=Fr(),Cp=Br();Vi.exports=Up;function Up(e){Object.keys(this.jobs).length&&(this.index=this.size,Dp(this),Cp(e)(null,this.results))}o(Up,"terminator")});var qi=E((xA,Hi)=>{var jp=Zr(),Mp=Vr(),Lp=Hr();Hi.exports=Bp;function Bp(e,t,r){for(var n=Mp(e);n.index<(n.keyedList||e).length;)jp(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Lp.bind(n,r)}o(Bp,"parallel")});var qr=E((PA,Wt)=>{var Wi=Zr(),Fp=Vr(),Zp=Hr();Wt.exports=Vp;Wt.exports.ascending=Gi;Wt.exports.descending=Hp;function Vp(e,t,r,n){var i=Fp(e,r);return Wi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Wi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Zp.bind(i,n)}o(Vp,"serialOrdered");function Gi(e,t){return e<t?-1:e>t?1:0}o(Gi,"ascending");function Hp(e,t){return-1*Gi(e,t)}o(Hp,"descending")});var Ji=E((TA,Ki)=>{var qp=qr();Ki.exports=Wp;function Wp(e,t,r){return qp(e,t,null,r)}o(Wp,"serial")});var Yi=E((EA,Xi)=>{Xi.exports={parallel:qi(),serial:Ji(),serialOrdered:qr()}});var Wr=E(($A,Qi)=>{"use strict";Qi.exports=Object});var ta=E((SA,ea)=>{"use strict";ea.exports=Error});var na=E((AA,ra)=>{"use strict";ra.exports=EvalError});var ia=E((zA,oa)=>{"use strict";oa.exports=RangeError});var sa=E((kA,aa)=>{"use strict";aa.exports=ReferenceError});var ca=E((wA,ua)=>{"use strict";ua.exports=SyntaxError});var Gt=E((OA,pa)=>{"use strict";pa.exports=TypeError});var da=E((RA,la)=>{"use strict";la.exports=URIError});var fa=E((NA,ma)=>{"use strict";ma.exports=Math.abs});var ya=E((DA,ga)=>{"use strict";ga.exports=Math.floor});var va=E((CA,ha)=>{"use strict";ha.exports=Math.max});var _a=E((UA,xa)=>{"use strict";xa.exports=Math.min});var ba=E((jA,Pa)=>{"use strict";Pa.exports=Math.pow});var Ia=E((MA,Ta)=>{"use strict";Ta.exports=Math.round});var $a=E((LA,Ea)=>{"use strict";Ea.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Aa=E((FA,Sa)=>{"use strict";var Gp=$a();Sa.exports=o(function(t){return Gp(t)||t===0?t:t<0?-1:1},"sign")});var ka=E((VA,za)=>{"use strict";za.exports=Object.getOwnPropertyDescriptor});var Gr=E((HA,wa)=>{"use strict";var Kt=ka();if(Kt)try{Kt([],"length")}catch{Kt=null}wa.exports=Kt});var Ra=E((qA,Oa)=>{"use strict";var Jt=Object.defineProperty||!1;if(Jt)try{Jt({},"a",{value:1})}catch{Jt=!1}Oa.exports=Jt});var Kr=E((WA,Na)=>{"use strict";Na.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var Ua=E((KA,Ca)=>{"use strict";var Da=typeof Symbol<"u"&&Symbol,Kp=Kr();Ca.exports=o(function(){return typeof Da!="function"||typeof Symbol!="function"||typeof Da("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Kp()},"hasNativeSymbols")});var Jr=E((XA,ja)=>{"use strict";ja.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Xr=E((YA,Ma)=>{"use strict";var Jp=Wr();Ma.exports=Jp.getPrototypeOf||null});var Fa=E((QA,Ba)=>{"use strict";var Xp="Function.prototype.bind called on incompatible ",Yp=Object.prototype.toString,Qp=Math.max,el="[object Function]",La=o(function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var u=0;u<r.length;u+=1)n[u+t.length]=r[u];return n},"concatty"),tl=o(function(t,r){for(var n=[],i=r||0,u=0;i<t.length;i+=1,u+=1)n[u]=t[i];return n},"slicy"),rl=o(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Ba.exports=o(function(t){var r=this;if(typeof r!="function"||Yp.apply(r)!==el)throw new TypeError(Xp+r);for(var n=tl(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,La(n,arguments));return Object(_)===_?_:this}return r.apply(t,La(n,arguments))},"binder"),c=Qp(0,r.length-n.length),d=[],f=0;f<c;f++)d[f]="$"+f;if(i=Function("binder","return function ("+rl(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var g=o(function(){},"Empty");g.prototype=r.prototype,i.prototype=new g,g.prototype=null}return i},"bind")});var Ve=E((tz,Za)=>{"use strict";var nl=Fa();Za.exports=Function.prototype.bind||nl});var Xt=E((rz,Va)=>{"use strict";Va.exports=Function.prototype.call});var Yr=E((nz,Ha)=>{"use strict";Ha.exports=Function.prototype.apply});var Wa=E((oz,qa)=>{"use strict";qa.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ka=E((iz,Ga)=>{"use strict";var ol=Ve(),il=Yr(),al=Xt(),sl=Wa();Ga.exports=sl||ol.call(al,il)});var Xa=E((az,Ja)=>{"use strict";var ul=Ve(),cl=Gt(),pl=Xt(),ll=Ka();Ja.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new cl("a function is required");return ll(ul,pl,t)},"callBindBasic")});var ns=E((uz,rs)=>{"use strict";var dl=Xa(),Ya=Gr(),es;try{es=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Qr=!!es&&Ya&&Ya(Object.prototype,"__proto__"),ts=Object,Qa=ts.getPrototypeOf;rs.exports=Qr&&typeof Qr.get=="function"?dl([Qr.get]):typeof Qa=="function"?o(function(t){return Qa(t==null?t:ts(t))},"getDunder"):!1});var us=E((pz,ss)=>{"use strict";var os=Jr(),is=Xr(),as=ns();ss.exports=os?o(function(t){return os(t)},"getProto"):is?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return is(t)},"getProto"):as?o(function(t){return as(t)},"getProto"):null});var en=E((dz,cs)=>{"use strict";var ml=Function.prototype.call,fl=Object.prototype.hasOwnProperty,gl=Ve();cs.exports=gl.call(ml,fl)});var ys=E((mz,gs)=>{"use strict";var j,yl=Wr(),hl=ta(),vl=na(),xl=ia(),_l=sa(),Ge=ca(),We=Gt(),Pl=da(),bl=fa(),Tl=ya(),Il=va(),El=_a(),$l=ba(),Sl=Ia(),Al=Aa(),ms=Function,tn=o(function(e){try{return ms('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),vt=Gr(),zl=Ra(),rn=o(function(){throw new We},"throwTypeError"),kl=vt?function(){try{return arguments.callee,rn}catch{try{return vt(arguments,"callee").get}catch{return rn}}}():rn,He=Ua()(),Y=us(),wl=Xr(),Ol=Jr(),fs=Yr(),xt=Xt(),qe={},Rl=typeof Uint8Array>"u"||!Y?j:Y(Uint8Array),Oe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?j:ArrayBuffer,"%ArrayIteratorPrototype%":He&&Y?Y([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?j:Atomics,"%BigInt%":typeof BigInt>"u"?j:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?j:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?j:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?j:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":hl,"%eval%":eval,"%EvalError%":vl,"%Float16Array%":typeof Float16Array>"u"?j:Float16Array,"%Float32Array%":typeof Float32Array>"u"?j:Float32Array,"%Float64Array%":typeof Float64Array>"u"?j:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?j:FinalizationRegistry,"%Function%":ms,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?j:Int8Array,"%Int16Array%":typeof Int16Array>"u"?j:Int16Array,"%Int32Array%":typeof Int32Array>"u"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":He&&Y?Y(Y([][Symbol.iterator]())):j,"%JSON%":typeof JSON=="object"?JSON:j,"%Map%":typeof Map>"u"?j:Map,"%MapIteratorPrototype%":typeof Map>"u"||!He||!Y?j:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":yl,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?j:Promise,"%Proxy%":typeof Proxy>"u"?j:Proxy,"%RangeError%":xl,"%ReferenceError%":_l,"%Reflect%":typeof Reflect>"u"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?j:Set,"%SetIteratorPrototype%":typeof Set>"u"||!He||!Y?j:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":He&&Y?Y(""[Symbol.iterator]()):j,"%Symbol%":He?Symbol:j,"%SyntaxError%":Ge,"%ThrowTypeError%":kl,"%TypedArray%":Rl,"%TypeError%":We,"%Uint8Array%":typeof Uint8Array>"u"?j:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?j:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?j:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?j:Uint32Array,"%URIError%":Pl,"%WeakMap%":typeof WeakMap>"u"?j:WeakMap,"%WeakRef%":typeof WeakRef>"u"?j:WeakRef,"%WeakSet%":typeof WeakSet>"u"?j:WeakSet,"%Function.prototype.call%":xt,"%Function.prototype.apply%":fs,"%Object.defineProperty%":zl,"%Object.getPrototypeOf%":wl,"%Math.abs%":bl,"%Math.floor%":Tl,"%Math.max%":Il,"%Math.min%":El,"%Math.pow%":$l,"%Math.round%":Sl,"%Math.sign%":Al,"%Reflect.getPrototypeOf%":Ol};if(Y)try{null.error}catch(e){ps=Y(Y(e)),Oe["%Error.prototype%"]=ps}var ps,Nl=o(function e(t){var r;if(t==="%AsyncFunction%")r=tn("async function () {}");else if(t==="%GeneratorFunction%")r=tn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=tn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Y&&(r=Y(i.prototype))}return Oe[t]=r,r},"doEval"),ls={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_t=Ve(),Yt=en(),Dl=_t.call(xt,Array.prototype.concat),Cl=_t.call(fs,Array.prototype.splice),ds=_t.call(xt,String.prototype.replace),Qt=_t.call(xt,String.prototype.slice),Ul=_t.call(xt,RegExp.prototype.exec),jl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ml=/\\(\\)?/g,Ll=o(function(t){var r=Qt(t,0,1),n=Qt(t,-1);if(r==="%"&&n!=="%")throw new Ge("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ge("invalid intrinsic syntax, expected opening `%`");var i=[];return ds(t,jl,function(u,c,d,f){i[i.length]=d?ds(f,Ml,"$1"):c||u}),i},"stringToPath"),Bl=o(function(t,r){var n=t,i;if(Yt(ls,n)&&(i=ls[n],n="%"+i[0]+"%"),Yt(Oe,n)){var u=Oe[n];if(u===qe&&(u=Nl(n)),typeof u>"u"&&!r)throw new We("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ge("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");gs.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new We("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new We('"allowMissing" argument must be a boolean');if(Ul(/^%?[^%]*%?$/,t)===null)throw new Ge("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ll(t),i=n.length>0?n[0]:"",u=Bl("%"+i+"%",r),c=u.name,d=u.value,f=!1,g=u.alias;g&&(i=g[0],Cl(n,Dl([0,1],g)));for(var _=1,b=!0;_<n.length;_+=1){var x=n[_],s=Qt(x,0,1),l=Qt(x,-1);if((s==='"'||s==="'"||s==="`"||l==='"'||l==="'"||l==="`")&&s!==l)throw new Ge("property names with quotes must have matching quotes");if((x==="constructor"||!b)&&(f=!0),i+="."+x,c="%"+i+"%",Yt(Oe,c))d=Oe[c];else if(d!=null){if(!(x in d)){if(!r)throw new We("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&_+1>=n.length){var y=vt(d,x);b=!!y,b&&"get"in y&&!("originalValue"in y.get)?d=y.get:d=d[x]}else b=Yt(d,x),d=d[x];b&&!f&&(Oe[c]=d)}}return d},"GetIntrinsic")});var vs=E((gz,hs)=>{"use strict";var Fl=Kr();hs.exports=o(function(){return Fl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Ps=E((hz,_s)=>{"use strict";var Zl=ys(),xs=Zl("%Object.defineProperty%",!0),Vl=vs()(),Hl=en(),ql=Gt(),er=Vl?Symbol.toStringTag:null;_s.exports=o(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new ql("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");er&&(n||!Hl(t,er))&&(xs?xs(t,er,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[er]=r)},"setToStringTag")});var Ts=E((xz,bs)=>{"use strict";var Wl=Function.prototype.call,Gl=Object.prototype.hasOwnProperty,Kl=Ve();bs.exports=Kl.call(Wl,Gl)});var Es=E((_z,Is)=>{"use strict";Is.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var As=E((Pz,Ss)=>{"use strict";var sn=ki(),Jl=require("util"),nn=require("path"),Xl=require("http"),Yl=require("https"),Ql=require("url").parse,ed=require("fs"),td=require("stream").Stream,rd=require("crypto"),on=Di(),nd=Yi(),od=Ps(),$e=Ts(),an=Es();function $s(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o($s,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],sn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");Jl.inherits(L,sn);L.LINE_BREAK=`\r
|
|
2
|
+
`;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=sn.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&$e(t,"httpVersion"))&&!(t instanceof td))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){$e(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ed.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):$e(e,"httpVersion")?t(null,Number(e.headers["content-length"])):$e(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+$s(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&an(c,r.header);var d;for(var f in c)if($e(c,f)){if(d=c[f],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=f+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=nn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=nn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&$e(e,"httpVersion")&&(r=nn.basename(e.client._httpMessage.path||"")),r)return'filename="'+$s(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=on.lookup(e.name)),!r&&e&&e.path&&(r=on.lookup(e.path)),!r&&e&&e.readable&&$e(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=on.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)$e(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+rd.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}nd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Ql(e),n=an({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=an(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Yl.request(n):r=Xl.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var d,f=o(function(g,_){return r.removeListener("error",f),r.removeListener("response",d),t.call(this,g,_)},"callback");d=f.bind(this,null),r.on("error",f),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};od(L.prototype,"FormData");Ss.exports=L});var Td={};ln(Td,{beebole:()=>bd});module.exports=Vs(Td);var Hs=Object.freeze({status:"aborted"});function T(e,t,r){function n(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);let g=c.prototype,_=Object.keys(g);for(let b=0;b<_.length;b++){let x=_[b];x in d||(d[x]=g[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var f;let g=r?.Parent?new u:this;n(g,d),(f=g._zod).deferred??(f.deferred=[]);for(let _ of g._zod.deferred)_();return g}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(T,"$constructor");var qs=Symbol("zod_brand"),pe=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},rr={};function me(e){return e&&Object.assign(rr,e),rr}o(me,"config");function or(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}o(or,"getEnumValues");function fn(e,t){return typeof t=="bigint"?t.toString():t}o(fn,"jsonStringifyReplacer");function It(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(It,"cached");function gn(e){return e==null}o(gn,"nullish");function Et(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Et,"cleanRegex");var mn=Symbol("evaluating");function K(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==mn)return n===void 0&&(n=mn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(K,"defineLazy");var ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Xe,"isObject");var Ws=It(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function yn(e){if(Xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Xe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(yn,"isPlainObject");var hn=new Set(["string","number","symbol"]);function Ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Ne,"escapeRegex");function $t(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o($t,"clone");function H(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(H,"normalizeParams");function vn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(vn,"optionalKeys");var Gs={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function De(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(De,"aborted");function _e(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(_e,"prefixIssues");function Tt(e){return typeof e=="string"?e:e?.message}o(Tt,"unwrapMessage");function Pe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Pe,"finalizeIssue");function xn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(xn,"getLengthableOrigin");function ar(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ar,"issue");var _n=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Pn=T("$ZodError",_n),Ye=T("$ZodError",_n,{Parent:Error});var Js=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new pe;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>Pe(f,u,me())));throw ir(d,i?.callee),d}return c.value},"_parse"),St=Js(Ye),Xs=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>Pe(f,u,me())));throw ir(d,i?.callee),d}return c.value},"_parseAsync"),At=Xs(Ye),Ys=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new pe;return u.issues.length?{success:!1,error:new(e??Pn)(u.issues.map(c=>Pe(c,i,me())))}:{success:!0,data:u.value}},"_safeParse"),Qe=Ys(Ye),Qs=o(e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},u=t._zod.run({value:r,issues:[]},i);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Pe(c,i,me())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=Qs(Ye);var eu="(?:(?:\\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])))",tu=new RegExp(`^${eu}$`);var bn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Tn=/^-?\d+n?$/;var sr=/^-?\d+(?:\.\d+)?$/,In=/^(?:true|false)$/i;var Ce=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var En=T("$ZodCheckMinLength",(e,t)=>{var r;Ce.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!gn(i)&&i.length!==void 0}),e._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let i=n.value;if(i.length>=t.minimum)return;let c=xn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var ur=T("$ZodCheckStringFormat",(e,t)=>{var r,n;Ce.init(e,t),e._zod.onattach.push(i=>{let u=i._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),$n=T("$ZodCheckRegex",(e,t)=>{ur.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 An={major:4,minor:3,patch:6};var q=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=An;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,d,f)=>{let g=De(c),_;for(let b of d){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(g)continue;let x=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new pe;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(g||(g=De(c,x)))});else{if(c.issues.length===x)continue;g||(g=De(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,f)=>{if(De(c))return c.aborted=!0,c;let g=i(d,n,f);if(g instanceof Promise){if(f.async===!1)throw new pe;return g.then(_=>e._zod.parse(_,f))}return e._zod.parse(g,f)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let g=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return g instanceof Promise?g.then(_=>u(_,c,d)):u(g,c,d)}let f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new pe;return f.then(g=>i(g,n,d))}return i(f,n,d)}}K(e,"~standard",()=>({validate:o(i=>{try{let u=Qe(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return et(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),wt=T("$ZodString",(e,t)=>{q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),cr=T("$ZodStringFormat",(e,t)=>{ur.init(e,t),wt.init(e,t)});var Rn=T("$ZodURL",(e,t)=>{cr.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var Nn=T("$ZodNumber",(e,t)=>{q.init(e,t),e._zod.pattern=e._zod.bag.pattern??sr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var pr=T("$ZodBoolean",(e,t)=>{q.init(e,t),e._zod.pattern=In,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),Dn=T("$ZodBigInt",(e,t)=>{q.init(e,t),e._zod.pattern=Tn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var Cn=T("$ZodAny",(e,t)=>{q.init(e,t),e._zod.parse=r=>r}),Un=T("$ZodUnknown",(e,t)=>{q.init(e,t),e._zod.parse=r=>r});var jn=T("$ZodVoid",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Mn=T("$ZodDate",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function zn(e,t,r){e.issues.length&&t.issues.push(..._e(r,e.issues)),t.value[r]=e.value}o(zn,"handleArrayResult");var Ln=T("$ZodArray",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],f=t.element._zod.run({value:d,issues:[]},n);f instanceof Promise?u.push(f.then(g=>zn(g,r,c))):zn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function kt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(..._e(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(kt,"handlePropertyResult");function ru(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=vn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(ru,"normalizeDef");function nu(e,t,r,n,i,u){let c=[],d=i.keySet,f=i.catchall._zod,g=f.def.type,_=f.optout==="optional";for(let b in t){if(d.has(b))continue;if(g==="never"){c.push(b);continue}let x=f.run({value:t[b],issues:[]},n);x instanceof Promise?e.push(x.then(s=>kt(s,r,b,t,_))):kt(x,r,b,t,_)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(nu,"handleCatchall");var Bn=T("$ZodObject",(e,t)=>{if(q.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...d};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=It(()=>ru(t));K(e._zod,"propValues",()=>{let d=t.shape,f={};for(let g in d){let _=d[g]._zod;if(_.values){f[g]??(f[g]=new Set);for(let b of _.values)f[g].add(b)}}return f});let i=Xe,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let g=d.value;if(!i(g))return d.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),d;d.value={};let _=[],b=c.shape;for(let x of c.keys){let s=b[x],l=s._zod.optout==="optional",y=s._zod.run({value:g[x],issues:[]},f);y instanceof Promise?_.push(y.then(m=>kt(m,d,x,g,l))):kt(y,d,x,g,l)}return u?nu(_,g,d,f,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function kn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!De(u));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(u=>u.issues.map(c=>Pe(c,n,me())))}),t)}o(kn,"handleUnionResults");var lr=T("$ZodUnion",(e,t)=>{q.init(e,t),K(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),K(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),K(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),K(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Et(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let f of t.options){let g=f._zod.run({value:i.value,issues:[]},u);if(g instanceof Promise)d.push(g),c=!0;else{if(g.issues.length===0)return g;d.push(g)}}return c?Promise.all(d).then(f=>kn(f,i,e,u)):kn(d,i,e,u)}});var Fn=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lr.init(e,t);let r=e._zod.parse;K(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(let g of f)i[d].add(g)}}return i});let n=It(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of d){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Xe(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var Zn=T("$ZodRecord",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!yn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let d=new Set;for(let g of c)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){d.add(typeof g=="number"?g.toString():g);let _=t.valueType._zod.run({value:i[g],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(..._e(g,b.issues)),r.value[g]=b.value})):(_.issues.length&&r.issues.push(..._e(g,_.issues)),r.value[g]=_.value)}let f;for(let g in i)d.has(g)||(f=f??[],f.push(g));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&sr.test(d)&&f.issues.length){let b=t.keyType._zod.run({value:Number(d),issues:[]},n);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");b.issues.length===0&&(f=b)}if(f.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(b=>Pe(b,n,me())),input:d,path:[d],inst:e});continue}let _=t.valueType._zod.run({value:i[d],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(..._e(d,b.issues)),r.value[f.value]=b.value})):(_.issues.length&&r.issues.push(..._e(d,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Vn=T("$ZodEnum",(e,t)=>{q.init(e,t);let r=or(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>hn.has(typeof i)).map(i=>typeof i=="string"?Ne(i):i.toString()).join("|")})$`),e._zod.parse=(i,u)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:e}),i}}),Hn=T("$ZodLiteral",(e,t)=>{if(q.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ne(n):n?Ne(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let u=n.value;return r.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}});var qn=T("$ZodTransform",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new bt(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new pe;return r.value=i,r}});function wn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(wn,"handleOptionalResult");var Wn=T("$ZodOptional",(e,t)=>{q.init(e,t),e._zod.optin="optional",e._zod.optout="optional",K(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>wn(u,r.value)):wn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Gn=T("$ZodNullable",(e,t)=>{q.init(e,t),K(e._zod,"optin",()=>t.innerType._zod.optin),K(e._zod,"optout",()=>t.innerType._zod.optout),K(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Et(r.source)}|null)$`):void 0}),K(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Kn=T("$ZodPipe",(e,t)=>{q.init(e,t),K(e._zod,"values",()=>t.in._zod.values),K(e._zod,"optin",()=>t.in._zod.optin),K(e._zod,"optout",()=>t.out._zod.optout),K(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>zt(c,t.in,n)):zt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>zt(u,t.out,n)):zt(i,t.out,n)}});function zt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(zt,"handlePipeResult");var Jn=T("$ZodCustom",(e,t)=>{Ce.init(e,t),q.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>On(u,r,n,e));On(i,r,n,e)}});function On(e,t,r,n){if(!e){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(ar(i))}}o(On,"handleRefineResult");var Yn,su=Symbol("ZodOutput"),uu=Symbol("ZodInput"),dr=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Qn(){return new dr}o(Qn,"registry");(Yn=globalThis).__zod_globalRegistry??(Yn.__zod_globalRegistry=Qn());var mr=globalThis.__zod_globalRegistry;function eo(e,t){return new e({type:"string",...H(t)})}o(eo,"_string");function to(e,t){return new e({type:"string",coerce:!0,...H(t)})}o(to,"_coercedString");function ro(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}o(ro,"_url");function no(e,t){return new e({type:"number",checks:[],...H(t)})}o(no,"_number");function oo(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}o(oo,"_coercedNumber");function io(e,t){return new e({type:"boolean",...H(t)})}o(io,"_boolean");function ao(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}o(ao,"_coercedBoolean");function so(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}o(so,"_coercedBigint");function uo(e){return new e({type:"any"})}o(uo,"_any");function co(e){return new e({type:"unknown"})}o(co,"_unknown");function po(e,t){return new e({type:"void",...H(t)})}o(po,"_void");function lo(e,t){return new e({type:"date",coerce:!0,...H(t)})}o(lo,"_coercedDate");function ue(e,t){return new En({check:"min_length",...H(t),minimum:e})}o(ue,"_minLength");function be(e,t){return new $n({check:"string_format",format:"regex",...H(t),pattern:e})}o(be,"_regex");function mo(e,t,r){let n=H(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(mo,"_custom");var J=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");q.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>St(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>At(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$t(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Rt=T("ZodMiniString",(e,t)=>{wt.init(e,t),J.init(e,t)});function a(e){return eo(Rt,e)}o(a,"string");var fo=T("ZodMiniStringFormat",(e,t)=>{cr.init(e,t),Rt.init(e,t)});var vu=T("ZodMiniURL",(e,t)=>{Rn.init(e,t),fo.init(e,t)});function go(e){return ro(vu,e)}o(go,"url");var fr=T("ZodMiniNumber",(e,t)=>{Nn.init(e,t),J.init(e,t)});function te(e){return no(fr,e)}o(te,"number");var gr=T("ZodMiniBoolean",(e,t)=>{pr.init(e,t),J.init(e,t)});function F(e){return io(gr,e)}o(F,"boolean");var yo=T("ZodMiniBigInt",(e,t)=>{Dn.init(e,t),J.init(e,t)});var xu=T("ZodMiniAny",(e,t)=>{Cn.init(e,t),J.init(e,t)});function rt(){return uo(xu)}o(rt,"any");var _u=T("ZodMiniUnknown",(e,t)=>{Un.init(e,t),J.init(e,t)});function w(){return co(_u)}o(w,"unknown");var Pu=T("ZodMiniVoid",(e,t)=>{jn.init(e,t),J.init(e,t)});function ho(e){return po(Pu,e)}o(ho,"_void");var vo=T("ZodMiniDate",(e,t)=>{Mn.init(e,t),J.init(e,t)});var bu=T("ZodMiniArray",(e,t)=>{Ln.init(e,t),J.init(e,t)});function N(e,t){return new bu({type:"array",element:e,...H(t)})}o(N,"array");var Tu=T("ZodMiniObject",(e,t)=>{Bn.init(e,t),J.init(e,t),K(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new Tu(r)}o(p,"object");var Iu=T("ZodMiniUnion",(e,t)=>{lr.init(e,t),J.init(e,t)});function D(e,t){return new Iu({type:"union",options:e,...H(t)})}o(D,"union");var Eu=T("ZodMiniDiscriminatedUnion",(e,t)=>{Fn.init(e,t),J.init(e,t)});function Ue(e,t,r){return new Eu({type:"union",options:t,discriminator:e,...H(r)})}o(Ue,"discriminatedUnion");var $u=T("ZodMiniRecord",(e,t)=>{Zn.init(e,t),J.init(e,t)});function O(e,t,r){return new $u({type:"record",keyType:e,valueType:t,...H(r)})}o(O,"record");var Su=T("ZodMiniEnum",(e,t)=>{Vn.init(e,t),J.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Su({type:"enum",entries:r,...H(t)})}o(U,"_enum");var Au=T("ZodMiniLiteral",(e,t)=>{Hn.init(e,t),J.init(e,t)});function S(e,t){return new Au({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}o(S,"literal");var zu=T("ZodMiniTransform",(e,t)=>{qn.init(e,t),J.init(e,t)});function Te(e){return new zu({type:"transform",transform:e})}o(Te,"transform");var ku=T("ZodMiniOptional",(e,t)=>{Wn.init(e,t),J.init(e,t)});function h(e){return new ku({type:"optional",innerType:e})}o(h,"optional");var wu=T("ZodMiniNullable",(e,t)=>{Gn.init(e,t),J.init(e,t)});function nt(e){return new wu({type:"nullable",innerType:e})}o(nt,"nullable");var Ou=T("ZodMiniPipe",(e,t)=>{Kn.init(e,t),J.init(e,t)});function Ie(e,t){return new Ou({type:"pipe",in:e,out:t})}o(Ie,"pipe");var Ru=T("ZodMiniCustom",(e,t)=>{Jn.init(e,t),J.init(e,t)});function Nt(e,t){return mo(Ru,e??(()=>!0),t)}o(Nt,"custom");var ot={};ln(ot,{bigint:()=>Lu,boolean:()=>Mu,date:()=>Bu,number:()=>ju,string:()=>Uu});function Uu(e){return to(Rt,e)}o(Uu,"string");function ju(e){return oo(fr,e)}o(ju,"number");function Mu(e){return ao(gr,e)}o(Mu,"boolean");function Lu(e){return so(yo,e)}o(Lu,"bigint");function Bu(e){return lo(vo,e)}o(Bu,"date");var hr=p({retryOnFailure:p({defaultValue:h(F()),hide:h(F())}),continueOnFailure:p({defaultValue:h(F()),hide:h(F())})}),yr=class{constructor(t,r,n,i,u,c,d,f,g,_,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=g;this.audience=_;this.aiMetadata=b}static{o(this,"IAction")}},Q=o(e=>new yr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var B=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:S(t),required:F(),defaultValue:h(rt())}),"TPropertyValue");var oe=p({...B.shape,...C(a(),"SHORT_TEXT").shape}),fe=p({...B.shape,...C(a(),"LONG_TEXT").shape});var _o=p({label:a(),value:w()}),Dt=p({disabled:h(F()),placeholder:h(a()),options:N(_o)});var ie=p({...B.shape,options:Dt,...C(w(),"STATIC_DROPDOWN").shape}),ge=p({...B.shape,options:Dt,...C(N(w()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var vr=p({...B.shape,...C(w(),"DROPDOWN").shape,refreshers:N(a())}),it=p({...B.shape,...C(N(w()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ye=p({...B.shape,...C(F(),"CHECKBOX").shape});var he=p({...B.shape,...C(te(),"NUMBER").shape});var at=p({...B.shape,...C(w(),"FILE").shape});var st=p({...B.shape,...C(a(),"DATE_TIME").shape});var Po=O(a(),D([oe,fe,ie,it,ge,ye,he,at,st])),ut=p({...B.shape,properties:Po,...C(N(w()),"ARRAY").shape});var ct=p({...B.shape,...C(D([O(a(),w())]),"JSON").shape});var bo=D([oe,ie,ct,ut,ge]),Zu=O(a(),bo),xr=p({refreshers:N(a()),...B.shape,...C(w(),"DYNAMIC").shape});var Ct=p({...B.shape,...C(ho(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),je=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(je||{}),Me=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(Me||{});var lt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(lt||{}),_r="both_client_credentials_and_authorization_code";var Ae=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ae||{}),dt=(u=>(u.NONE="NONE",u.HEADER_PRESENT="HEADER_PRESENT",u.QUERY_PRESENT="QUERY_PRESENT",u.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",u.HEAD_REQUEST="HEAD_REQUEST",u))(dt||{}),Vu=p({strategy:U(dt),paramName:h(a())}),mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(mt||{});var Ut=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ut||{}),To=p({status:h(te()),body:h(w()),headers:h(O(a(),a()))}),Io=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Ut))}),Eo=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:To,handlerId:h(a()),streamStepProgress:h(U(Ut))}),Hu=D([Io,Eo]);var qu=p({body:w(),rawBody:h(w()),headers:O(a(),a()),queryParams:O(a(),a())});function ve(e){return e==null}o(ve,"isNil");function ft(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ft,"isEmpty");function jt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(jt,"assertNotNullOrUndefined");var Pr=Re(require("crypto"),1);var Wu=128,ze,Le,Gu=o(e=>{!ze||ze.length<e?(ze=Buffer.allocUnsafe(e*Wu),Pr.default.randomFillSync(ze),Le=0):Le+e>ze.length&&(Pr.default.randomFillSync(ze),Le=0),Le+=e},"fillPool"),Ku=o(e=>(Gu(e|=0),ze.subarray(Le-e,Le)),"random"),Ju=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),f=i;for(;f--;)if(c+=e[d[f]&n]||"",c.length===u)return c}}},"customRandom"),So=o((e,t=21)=>Ju(e,t,Ku),"customAlphabet");var Xu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ao=21,ab=a().check(be(new RegExp(`^[0-9a-zA-Z]{${Ao}}$`))),Yu=So(Xu,Ao);var Ee=Ie(Te(e=>e instanceof Date?e.toISOString():e),a()),ae={id:a(),created:Ee,updated:Ee},Z=o(e=>h(nt(e)),"Nullable");function br(e){return h(nt(U(e)))}o(br,"NullableEnum");var cb=Ie(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(F())),Mt=o(e=>Ie(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var db=O(a(),w());var gt=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(gt||{});var Ib=a().check(be(/^#[0-9A-Fa-f]{6}$/));var $b=p({filename:a(),data:w(),type:S("file"),mimetype:h(a())});var Qu=Re(ko());var Rb=p({...ae,name:a(),permissions:N(a()),platformId:Z(a()),type:a(),userCount:h(te())});var wo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(wo||{}),Tr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Tr||{}),Ir=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ir||{});var Er=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Er||{});var $r=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))($r||{});var ec=p({mode:U(wo),value:w()}),tc=p({auth:h(a()),fields:O(a(),ec)}),rc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(tc)}),nc=p({type:S("PIECE"),toolName:a().check(ue(1)),pieceMetadata:rc}),oc=p({type:S("none")}),ic=p({type:S("access_token"),accessToken:a()}),ac=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),sc=p({type:S("headers"),headers:O(a(),a())}),uc=Ue("type",[oc,ic,ac,sc]),Oo=p({type:S("FLOW"),toolName:a().check(ue(1)),externalFlowId:a(),flowDisplayName:h(a())}),Ro=p({type:S("MCP"),toolName:a().check(ue(1)),serverUrl:go(),protocol:U(Ir),auth:uc}),No=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ue(1)),sourceType:U(Tr),sourceId:a(),sourceName:a()}),cc=Ue("type",[nc,Oo,Ro,No]),pc=p({displayName:a(),description:h(a()),type:U(Er)}),Do=p({type:S("MARKDOWN"),markdown:a()}),Be={type:S("TOOL_CALL"),input:Z(O(a(),w())),output:h(w()),toolName:a(),status:U($r),toolCallId:a(),startTime:a(),endTime:h(a())},aT=p(Be),Co=Ue("toolCallType",[p({...Be,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Be,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),p({...Be,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),p({...Be,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Be,toolCallType:S("UNKNOWN"),displayName:a()})]),lc=D([Do,Co]);var Sr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Sr||{}),xe=p({apiKey:a()}),dc=xe,mc=p({apiKey:a(),apiKeyHash:a()}),fc=xe,gc=xe,yc=xe,hc=xe,vc=xe,xc=xe,_c=xe,Uo=p({accessKeyId:a().check(ue(1)),secretAccessKey:a().check(ue(1))}),Pc=p({}),bc=p({}),Tc=p({}),Ic=p({}),Ec=p({}),$c=p({}),jo=p({modelId:a(),modelName:a(),modelType:U(Sr)}),Mo=p({apiKeyHeader:a(),baseUrl:a(),models:N(jo),defaultHeaders:h(O(a(),a()))}),Lo=p({accountId:a(),gatewayId:a(),models:N(jo),vertexProject:h(a()),vertexRegion:h(a())}),Bo=p({resourceName:a(),apiVersion:Ie(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Fo=p({region:a().check(ue(1))}),Sc=D([dc,yc,hc,vc,xc,gc,fc,mc,Uo,_c]),Zo=D([Mo,Lo,Bo,Fo,Pc,Tc,Ic,Ec,bc,$c]),Ac=p({id:a(),name:a(),type:U(Sr)}),zc=p({id:a(),name:a(),provider:U(gt),config:Zo,enabledForChat:F()}),kc=p({provider:U(gt),config:Zo,auth:Sc,platformId:a()});var pT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var wc=p({base64Url:a(),fileName:a(),extension:h(a())}),Oc=p({mimeType:a(),url:a(),fileName:h(a())}),Ar=D([wc,Oc]);var Rc=D([p({type:S("file"),value:Ar}),p({type:S("markdown"),value:a(),files:h(N(Ar))})]),Nc=p({sessionId:a(),message:a(),files:h(N(a()))});var Ho=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ho||{}),qo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(qo||{}),zr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(zr||{});var Dc=D([p({...ae,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...ae,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Cc=p({...ae,name:a(),folderId:Z(a()),projectId:a(),externalId:a(),status:br(qo),trigger:br(Ho)}),Uc=p({...ae,tableId:a(),projectId:a(),cells:O(a(),p({updated:a(),created:a(),value:w(),fieldName:a()}))}),jc=p({events:N(U(zr)),webhookUrl:a(),flowId:a()}),Mc=p({fields:N(p({id:a(),name:a()})),rows:N(O(a(),a())),name:a()}),Lc=p({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:Mt(a()),folderId:h(a()),folderIds:Mt(a())}),Bc=p({records:N(N(p({fieldId:a(),value:Go()}))),tableId:a()}),Fc=p({cells:h(N(p({fieldId:a(),value:Go()}))),tableId:a(),agentUpdate:h(F())}),Wo=Ue("operator",[ke("eq"),ke("neq"),ke("gt"),ke("gte"),ke("lt"),ke("lte"),ke("co"),Vo("exists"),Vo("not_exists")]),Zc=p({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:Mt(Wo)});function Go(){return Ie(Te(e=>e==null?e:String(e)),nt(a()))}o(Go,"coerceToString");function ke(e){return p({fieldId:a(),operator:S(e),value:a()})}o(ke,"valueFilter");function Vo(e){return p({fieldId:a(),operator:S(e)})}o(Vo,"existenceFilter");var Vc=p({status:h(te()),body:h(w()),headers:h(O(a(),a()))}),Hc=p({...ae,deleted:Z(Ee),ownerId:a(),displayName:a(),platformId:a(),externalId:Z(a())});var Ko=p({name:a(),description:h(a()),type:a(),required:F()}),qc=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Ko),returnsResponse:F()})});var Jo="^[0-9]+\\.[0-9]+\\.[0-9]+$",zT=new RegExp(Jo),Gc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",kT=a().check(be(new RegExp(Jo))),wT=a().check(be(new RegExp(Gc))),Kc=p({packageType:S("ARCHIVE"),pieceType:U(je),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Xo=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Yo=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),OT=D([Xo,Yo]),RT=D([Kc,Xo,Yo]),Qo=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(Qo||{}),Jc=p({type:U(Qo),cronExpression:a(),timezone:a()}),NT=p({...ae,type:U(Ae),projectId:a(),flowId:a(),triggerName:a(),schedule:Z(Jc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:Z(a()),simulate:F()}),ei=(m=>(m.UNKNOWN="UNKNOWN",m.FLOW_RUN_LOG="FLOW_RUN_LOG",m.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",m.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",m.FLOW_STEP_FILE="FLOW_STEP_FILE",m.SAMPLE_DATA="SAMPLE_DATA",m.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",m.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",m.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",m.PROJECT_RELEASE="PROJECT_RELEASE",m.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",m.PLATFORM_ASSET="PLATFORM_ASSET",m.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",m.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",m.KNOWLEDGE_BASE="KNOWLEDGE_BASE",m.FLOW_BUNDLE="FLOW_BUNDLE",m))(ei||{}),ti=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(ti||{}),ri=(r=>(r.S3="S3",r.DB="DB",r))(ri||{}),DT=p({...ae,projectId:Z(a()),platformId:Z(a()),type:U(ei),compression:U(ti),data:h(w()),location:U(ri),size:Z(te()),fileName:Z(a()),s3Key:Z(a()),metadata:Z(O(a(),a()))}),ni=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ni||{}),oi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(oi||{}),CT=p({id:a(),email:a(),firstName:a(),status:U(oi),externalId:Z(a()),platformId:Z(a()),platformRole:U(ni),lastName:a(),created:Ee,updated:Ee,lastActiveDate:Z(Ee),imageUrl:Z(a())});var kr=p({...B.shape,...C(O(a(),w()),"OBJECT").shape});var ui=p({...B.shape,...C(a(),"COLOR").shape});var wr=D([oe,fe,Ct,ye,ie,ge,vr,it,xr,he,ut,kr,ct,st,at,ui]),$={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var le=p({displayName:a(),description:h(a())});var ci=p({username:a(),password:a()}),Or=p({...le.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(ci,"BASIC_AUTH").shape});var ep=O(a(),D([oe,fe,he,ye,ie])),Rr=p({...le.shape,props:ep,...C(w(),"CUSTOM_AUTH").shape});var we=p({...le.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var tp=O(a(),D([oe,fe,we,he,ye,ie,ge,Ct])),pi=p({...le.shape,props:tp,...C(w(),"OIDC").shape});var Nr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Nr||{}),li=D([oe,we,ie]),di=O(a(),li),rp=p({props:h(O(a(),li)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:h(F()),pkceMethod:h(D([S("plain"),S("S256")])),authorizationMethod:h(U(Nr)),grantType:h(D([U(lt),S(_r)])),extra:h(O(a(),a()))}),mi=p({access_token:a(),props:h(di),data:O(a(),rt())}),Dr=p({...le.shape,...rp.shape,...C(mi,"OAUTH2").shape});var Fe=D([Or,Rr,pi,Dr,we]),yt="Connection",Cr={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||yt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||yt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||yt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||yt}},None(){}};var fE={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 np=p({...B.shape,...C(w(),"CUSTOM").shape,code:a()});var op=D([wr,Fe]),Ur=O(a(),op),NE=O(a(),wr);var fi=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]);var gi="2",Bt="0.82.0";var jr=class{constructor(t,r,n,i,u,c,d,f,g=Bt,_,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=f;this.minimumSupportedRelease=g;this.maximumSupportedRelease=_;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:gi}),"getContextInfo");(!ip(g)||ap(g,Bt))&&(this.minimumSupportedRelease=Bt),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},yi=o(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,i)=>n===i.findIndex(u=>u.type===r.type)))throw new Error("Auth properties must be unique by type");return new jr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function ip(e){return/^\d+\.\d+\.\d+$/.test(e)}o(ip,"isValidSimpleSemver");function ap(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(ap,"isSemverLessThan");var sp=h(O(a(),O(a(),a()))),hi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Fe,N(Fe)])),version:a(),categories:h(N(U(Me))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:sp}),up=U(["human","ai","both"]),vi=p({description:h(a()),idempotent:h(F())}),xi=p({name:a(),displayName:a(),description:a(),props:Ur,requireAuth:F(),errorHandlingOptions:h(hr),outputSchema:h(Nt()),audience:h(up),aiMetadata:h(vi)}),_i=p({name:a(),displayName:a(),description:a(),props:Ur,errorHandlingOptions:h(hr),type:U(Ae),sampleData:w(),handshakeConfiguration:h(Nt()),renewConfiguration:h(fi),testStrategy:U(mt),outputSchema:h(Nt()),aiMetadata:h(vi)}),cp=p({...hi.shape,actions:O(a(),xi),triggers:O(a(),_i)}),pp=p({...hi.shape,actions:te(),triggers:te(),suggestedActions:h(N(_i)),suggestedTriggers:h(N(xi))}),Pi=p({projectUsage:te(),tags:h(N(a())),pieceType:U(je),packageType:U(pt),platformId:h(a()),archiveId:h(a())}),N$=p({...cp.shape,...Pi.shape}),D$=p({...pp.shape,...Pi.shape}),C$=p({name:a(),version:a()});var lp=Re(require("path")),dp=Re(require("fs/promises"));var Ft=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Zt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Mr,r=new Lr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Mr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Lr=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Vt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Ht=class extends Ft{static{o(this,"FetchHttpClient")}constructor(t="",r=new Zt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[M,ne]of Object.entries(c))i.append(M,ne);let d=i.toString(),f=d?`${n}?${d}`:n,g=t.responseType??"json",_=t.followRedirects??!0,b=t.retries??0,{body:x,extraHeaders:s,isStream:l}=mp(t.body,u),y=gp({...u,...s}),m=await fp(async()=>{let M=new AbortController,ne=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let se={method:t.method.toString(),headers:y,body:x,redirect:_?"follow":"manual",signal:M.signal};return l&&(se.duplex="half"),r?.dispatcher!==void 0&&(se.dispatcher=r.dispatcher),await fetch(f,se)}finally{ne!==void 0&&clearTimeout(ne)}},b),v=_?300:400;if(m.status<200||m.status>=v){let M=await bi(m,g),ne=new Vt(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",ne),ne}let P=await bi(m,g);return{status:m.status,headers:yp(m.headers),body:P}}};function mp(e,t){return vp(e)?{body:void 0,extraHeaders:{},isStream:!1}:hp(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(mp,"serializeBody");async function bi(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(bi,"parseResponseBody");async function fp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ti(n);continue}return i}catch(i){if(r=i,n<t){await Ti(n);continue}throw i}throw r}o(fp,"sendWithRetries");function Ti(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ti,"backoff");function gp(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(gp,"normalizeHeaders");function yp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(yp,"toHttpHeaders");function hp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(hp,"isNodeFormData");function vp(e){return e==null}o(vp,"isNil");var Ze=new Ht;var ht=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ht||{});var id=Re(require("fs")),zs=Re(As());var ad={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function sd(e){let t=e.split(";")[0].trim().toLowerCase();return ad[t]??""}o(sd,"contentTypeToExtension");var ud=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),cd=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function ks({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:f="headers"}){return Q({audience:"human",name:u||"custom_api_call",displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:$.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:g})=>({url:$.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${cd(t,g)}/resource or /resource`,required:!0,defaultValue:g?t(g):"",...c?.url??{}})}),"props")}),method:$.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(ht).map(g=>({label:g,value:g}))},...c?.method??{}}),headers:$.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:$.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:$.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:$.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:g})=>{if(!g)return{};let _=g,b={};switch(_){case"none":break;case"json":b.data=$.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":b.data=$.LongText({displayName:"Raw Body",required:!0});break;case"form_data":b.data=$.Array({displayName:"Form Data",required:!0,properties:{fieldName:$.ShortText({displayName:"Field Name",required:!0}),fieldType:$.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:$.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:$.File({displayName:"File Field Value",required:!1})}});break}return b},"props")}),response_is_binary:$.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:$.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:$.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:$.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async g=>{let{method:_,url:b,headers:x,queryParams:s,body:l,body_type:y,failsafe:m,timeout:v,response_is_binary:P,followRedirects:M}=g.propsValue;jt(_,"Method"),jt(b,"URL");let ne=ve(r)?{}:await r(g.auth,g.propsValue),se=b.url,Ke=se.startsWith("http://")||se.startsWith("https://")?se:ud({baseUrl:t(g.auth),relativePath:se}),Se={method:_,url:Ke,headers:{...x??{},...f==="headers"||!ve(f)?ne:{}},queryParams:{...f==="queryParams"?ne:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(P&&(Se.responseType="arraybuffer"),l)if(y&&y!=="none"){let de=l.data;if(y==="form_data"){let js=de,Pt=new zs.default;for(let{fieldName:un,fieldType:cn,textFieldValue:pn,fileFieldValue:tr}of js)cn==="text"&&!ft(pn)?Pt.append(un,pn):cn==="file"&&!ft(tr)&&Pt.append(un,tr.data,{filename:tr?.filename});Se.body=Pt,Se.headers={...Se.headers,...Pt.getHeaders()}}else Se.body=de}else y||(Se.body=l);try{let de=await Ze.sendRequest(Se);return await pd(g.files,de.body,de.status,de.headers,P)}catch(de){if(m)return de.errorMessage();throw de}},"run")})}o(ks,"createCustomApiCallAction");var pd=o(async(e,t,r,n,i)=>{let u;if(i&&ld(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=sd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),ld=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var V=Cr.SecretText({displayName:"API Token",description:`To get your Beebole API token:
|
|
4
|
+
|
|
5
|
+
1. Log in to your Beebole account at https://beebole-apps.com
|
|
6
|
+
2. Go to **Customize \u2192 API Token**
|
|
7
|
+
3. Generate a new API token
|
|
8
|
+
4. Copy the token and paste it below
|
|
9
|
+
|
|
10
|
+
Need help? See https://beebole.com/help/api`,required:!0,validate:o(async({auth:e})=>{try{return await Ze.sendRequest({method:"POST",url:"https://beebole-apps.com/api/v2",authentication:{type:"BASIC",username:e,password:"x"},body:{service:"company.list"}}),{valid:!0}}catch{return{valid:!1,error:"Invalid Beebole API token."}}},"validate")});var md="https://beebole-apps.com/api/v2";async function fd({token:e,body:t}){return await Ze.sendRequest({method:"POST",url:md,authentication:{type:"BASIC",username:e,password:"x"},body:t})}o(fd,"callBeebole");var X={call:fd};async function gd(e){return(await X.call({token:e,body:{service:"company.list"}})).body.companies??[]}o(gd,"listCompanies");async function yd(e,t){return(await X.call({token:e,body:{service:"project.list",company:{id:t}}})).body.projects??[]}o(yd,"listProjects");async function hd(e,t){return(await X.call({token:e,body:{service:"subproject.list",project:{id:t}}})).body.subprojects??[]}o(hd,"listSubprojects");async function vd(e,t){let r=await X.call({token:e,body:{service:"person.list",company:{id:t}}});return r.body.people??r.body.persons??[]}o(vd,"listPeople");async function xd(e){return(await X.call({token:e,body:{service:"absence.list"}})).body.absences??[]}o(xd,"listAbsences");var ee={companyDropdown:o(e=>$.Dropdown({auth:V,displayName:"Company",description:e.description??"Select the company (customer).",required:e.required,refreshers:[],options:o(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your Beebole account first."};try{return{disabled:!1,options:(await gd(t.secret_text)).filter(n=>n.active!==!1).map(n=>({label:n.name,value:n.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load companies. Check your API token."}}},"options")}),"companyDropdown"),projectDropdown:o(e=>$.Dropdown({auth:V,displayName:"Project",description:e.description??"Select the project. Choose a company first.",required:e.required,refreshers:["company"],options:o(async({auth:t,company:r})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your Beebole account first."};if(!r)return{disabled:!0,options:[],placeholder:"Please select a company first."};try{return{disabled:!1,options:(await yd(t.secret_text,r)).filter(i=>i.active!==!1).map(i=>({label:i.name,value:i.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load projects. Check your API token."}}},"options")}),"projectDropdown"),subprojectDropdown:o(e=>$.Dropdown({auth:V,displayName:"Subproject",description:e.description??"Select the subproject. Choose a project first.",required:e.required,refreshers:["project"],options:o(async({auth:t,project:r})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your Beebole account first."};if(!r)return{disabled:!0,options:[],placeholder:"Please select a project first."};try{return{disabled:!1,options:(await hd(t.secret_text,r)).filter(i=>i.active!==!1).map(i=>({label:i.name,value:i.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load subprojects. Check your API token."}}},"options")}),"subprojectDropdown"),personDropdown:o(e=>$.Dropdown({auth:V,displayName:"Person",description:e.description??"Select the person. Choose a company first.",required:e.required,refreshers:["company"],options:o(async({auth:t,company:r})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your Beebole account first."};if(!r)return{disabled:!0,options:[],placeholder:"Please select a company first."};try{return{disabled:!1,options:(await vd(t.secret_text,r)).filter(i=>i.active!==!1).map(i=>({label:i.email?`${i.name} (${i.email})`:i.name,value:i.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load people. Check your API token."}}},"options")}),"personDropdown"),absenceDropdown:o(e=>$.Dropdown({auth:V,displayName:"Absence Type",description:e.description??"Select the absence type (e.g. Vacation, Sick Leave).",required:e.required,refreshers:[],options:o(async({auth:t})=>{if(!t)return{disabled:!0,options:[],placeholder:"Please connect your Beebole account first."};try{return{disabled:!1,options:(await xd(t.secret_text)).filter(n=>n.active!==!1).map(n=>({label:n.name,value:n.id}))}}catch{return{disabled:!0,options:[],placeholder:"Failed to load absence types."}}},"options")}),"absenceDropdown")};var ws=Q({auth:V,name:"create_person",displayName:"Create Person",description:"Creates a new person in Beebole. An available license is required for the person to be active.",audience:"both",aiMetadata:{description:"Creates a person (employee, project lead, or admin) under a given company in Beebole, optionally emailing them a login invitation when an email is provided. Use to onboard a new team member or contact. Not idempotent: each call creates a new person record and may re-send an invite, with no de-duplication on name or email.",idempotent:!1},props:{company:ee.companyDropdown({required:!0,description:"The company this person belongs to."}),name:$.ShortText({displayName:"Full Name",description:'The full name of the person (e.g. "Jane Doe").',required:!0}),email:$.ShortText({displayName:"Email",description:"Email address. Required if you want to invite the person to log in to Beebole.",required:!1}),invite:$.Checkbox({displayName:"Send Invitation Email",description:"Send an invitation email so the person can log in to Beebole. Requires an email address.",required:!1,defaultValue:!1}),userGroup:$.StaticDropdown({displayName:"User Group",description:'The permission level for this person. "Employee" can log time; "Project Lead" can also manage projects; "Admin" has full access.',required:!1,defaultValue:"employee",options:{options:[{label:"Employee",value:"employee"},{label:"Project Lead",value:"project_lead"},{label:"Administrator",value:"admin"}]}})},async run(e){let t={name:e.propsValue.name,company:{id:e.propsValue.company}};e.propsValue.email&&(t.email=e.propsValue.email),e.propsValue.invite!==void 0&&(t.invite=e.propsValue.invite),e.propsValue.userGroup&&(t.userGroup=e.propsValue.userGroup);let r=await X.call({token:e.auth.secret_text,body:{service:"person.create",person:t}});if(r.body.status!=="ok")throw new Error(`Beebole returned an error: ${r.body.message??"Unknown error"}`);return r.body}});var Os=Q({auth:V,name:"create_company",displayName:"Create Company",description:"Creates a new company (customer) in Beebole.",audience:"both",aiMetadata:{description:"Creates a company in Beebole, either an external customer or, when marked internal/corporate, your own organization. Use as the top-level container before creating projects under it. Not idempotent: each call creates a new company even if one with the same name already exists.",idempotent:!1},props:{name:$.ShortText({displayName:"Company Name",description:"The name of the company (customer) to create.",required:!0}),corporate:$.Checkbox({displayName:"Internal Company",description:"Enable if this company represents your own organization (internal/corporate) rather than a customer.",required:!1,defaultValue:!1})},async run(e){let t=await X.call({token:e.auth.secret_text,body:{service:"company.create",company:{name:e.propsValue.name,corporate:e.propsValue.corporate??!1}}});if(t.body.status!=="ok")throw new Error(`Beebole returned an error: ${t.body.message??"Unknown error"}`);return t.body}});var Rs=Q({auth:V,name:"create_project",displayName:"Create Project",description:"Creates a new project under a company in Beebole.",audience:"both",aiMetadata:{description:"Creates a project owned by an existing company in Beebole, with an optional start date and description. Use after the company exists and before adding subprojects or logging time. Not idempotent: each call creates a new project even with identical details.",idempotent:!1},props:{company:ee.companyDropdown({required:!0,description:"The company (customer) that owns this project."}),name:$.ShortText({displayName:"Project Name",description:'The name of the new project (e.g. "Website Redesign").',required:!0}),startDate:$.ShortText({displayName:"Start Date",description:'The project start date in YYYY-MM-DD format (e.g. "2026-01-15"). Leave empty for no start date.',required:!1}),description:$.LongText({displayName:"Description",description:"Optional description of the project.",required:!1})},async run(e){let t={name:e.propsValue.name,company:{id:e.propsValue.company}};e.propsValue.startDate&&(t.startDate=e.propsValue.startDate),e.propsValue.description&&(t.description=e.propsValue.description);let r=await X.call({token:e.auth.secret_text,body:{service:"project.create",project:t}});if(r.body.status!=="ok")throw new Error(`Beebole returned an error: ${r.body.message??"Unknown error"}`);return r.body}});var Ns=Q({auth:V,name:"create_subproject",displayName:"Create Subproject",description:"Creates a new subproject under an existing project in Beebole.",audience:"both",aiMetadata:{description:"Creates a subproject inside an existing project (under its company) in Beebole. Use to break a project into work streams that time can be logged against. Not idempotent: each call creates a new subproject even with the same name.",idempotent:!1},props:{company:ee.companyDropdown({required:!0,description:"The company that owns the parent project."}),project:ee.projectDropdown({required:!0,description:"The project that will contain this subproject."}),name:$.ShortText({displayName:"Subproject Name",description:'The name of the new subproject (e.g. "Prototype", "Phase 1").',required:!0})},async run(e){let t=await X.call({token:e.auth.secret_text,body:{service:"subproject.create",subproject:{name:e.propsValue.name,project:{id:e.propsValue.project}}}});if(t.body.status!=="ok")throw new Error(`Beebole returned an error: ${t.body.message??"Unknown error"}`);return t.body}});var Ds=Q({auth:V,name:"deactivate_subproject",displayName:"Deactivate Subproject",description:"Marks a subproject as inactive in Beebole. Inactive subprojects are hidden from new time entries.",audience:"both",aiMetadata:{description:"Deactivates a subproject in Beebole so it is hidden from new time entries while existing entries are preserved. Use to retire a completed or unused work stream. Effectively idempotent: a subproject already inactive stays inactive, though the call still hits the API each time.",idempotent:!0},props:{company:ee.companyDropdown({required:!0,description:"The company that owns the project."}),project:ee.projectDropdown({required:!0,description:"The project containing the subproject to deactivate."}),subproject:ee.subprojectDropdown({required:!0,description:"The subproject to deactivate."})},async run(e){let t=await X.call({token:e.auth.secret_text,body:{service:"subproject.deactivate",id:e.propsValue.subproject}});if(t.body.status!=="ok")throw new Error(`Beebole returned an error: ${t.body.message??"Unknown error"}`);return{subproject_id:e.propsValue.subproject,project_id:e.propsValue.project,company_id:e.propsValue.company,status:t.body.status,deactivated:!0}}});var _d=/^\d{4}-\d{2}-\d{2}$/,Cs=Q({auth:V,name:"create_multiple_time_entries",displayName:"Create Multiple Time Entries",description:"Creates time entries (working time or absence) across multiple days in Beebole.",audience:"both",aiMetadata:{description:"Logs the same number of hours on each of several dates in Beebole, in one of two modes: working time against a chosen subproject, or an absence of a chosen type (e.g. vacation, sick leave). Use to bulk-log time across a date range; per-date failures are collected rather than aborting unless continue-on-error is disabled. Not idempotent: each call appends new time entries, so repeating it duplicates them.",idempotent:!1},props:{entryType:$.StaticDropdown({displayName:"Entry Type",description:"Choose whether you are logging working time on a subproject or an absence (e.g. vacation, sick leave).",required:!0,defaultValue:"working_time",options:{options:[{label:"Working Time",value:"working_time"},{label:"Absence",value:"absence"}]}}),absence:ee.absenceDropdown({required:!1,description:"The absence type (e.g. Vacation, Sick Leave) to log on the selected dates."}),company:ee.companyDropdown({required:!1,description:"The company that owns the project."}),project:ee.projectDropdown({required:!1,description:"The project containing the subproject."}),subproject:ee.subprojectDropdown({required:!1,description:"The subproject to log working time against."}),dates:$.Array({displayName:"Dates",description:'The dates to create time entries for, each in YYYY-MM-DD format (e.g. "2026-05-21").',required:!0}),hours:$.Number({displayName:"Hours per Day",description:"The number of hours to log for each date (e.g. 8 for a full working day).",required:!0,defaultValue:8}),comment:$.LongText({displayName:"Comment",description:"Optional comment applied to every created time entry.",required:!1}),continueOnError:$.Checkbox({displayName:"Continue on Error",description:"If enabled, a failure on one date will not stop creation for the remaining dates.",required:!1,defaultValue:!0})},async run(e){let{entryType:t,dates:r,hours:n,comment:i,continueOnError:u}=e.propsValue,c=r.map(b=>typeof b=="string"?b.trim():"").filter(b=>b.length>0);if(c.length===0)throw new Error("At least one date is required.");let d=c.filter(b=>!_d.test(b));if(d.length>0)throw new Error(`Invalid date format (expected YYYY-MM-DD): ${d.join(", ")}`);if(t==="absence"&&!e.propsValue.absence)throw new Error("Absence type is required when Entry Type is Absence.");if(t==="working_time"&&!e.propsValue.subproject)throw new Error("Subproject is required when Entry Type is Working Time.");let f={};t==="absence"?f.absence={id:e.propsValue.absence}:f.subproject={id:e.propsValue.subproject};let g=[],_=[];for(let b of c){let x={service:"time_entry.create",...f,date:b,hours:n};i&&(x.comment=i);try{let s=await X.call({token:e.auth.secret_text,body:x});if(s.body.status!=="ok")throw new Error(s.body.message??"Unknown error");let l=s.body.time_entry;g.push({time_entry_id:l?.id??null,date:b,hours:l?.hours??n,comment:l?.comment??i??null,status:"ok"})}catch(s){let l=s instanceof Error?s.message:String(s);if(!u)throw new Error(`Failed to create time entry for ${b}: ${l}`);_.push({date:b,error:l})}}return{created_count:g.length,failed_count:_.length,created:g,failed:_}}});var Pd=/^\d{4}-\d{2}-\d{2}$/,Us=Q({auth:V,name:"delete_multiple_time_entries",displayName:"Delete Multiple Time Entries",description:"Deletes multiple time entries (working time or absence) by their IDs and dates.",audience:"both",aiMetadata:{description:"Deletes a batch of time entries in Beebole, each identified by its numeric time-entry ID plus the date it was logged on. Use to remove previously created entries; per-entry failures are collected rather than aborting unless continue-on-error is disabled. Idempotent in effect: once an entry is deleted, re-running with the same IDs has no further effect (already-removed entries simply fail).",idempotent:!0},props:{entries:$.Array({displayName:"Time Entries to Delete",description:"List of time entries to delete. Each row requires the time entry ID and the date it was logged on (YYYY-MM-DD).",required:!0,properties:{id:$.Number({displayName:"Time Entry ID",description:'The numeric ID of the time entry to delete. You can get this from a "List Time Entries" step or the Beebole API response when the entry was created.',required:!0}),date:$.ShortText({displayName:"Date",description:'The date the entry was logged, in YYYY-MM-DD format (e.g. "2026-05-21").',required:!0})}}),continueOnError:$.Checkbox({displayName:"Continue on Error",description:"If enabled, a failure on one entry will not stop deletion for the remaining entries.",required:!1,defaultValue:!0})},async run(e){let{entries:t,continueOnError:r}=e.propsValue,n=t;if(!n||n.length===0)throw new Error("At least one time entry is required.");let i=[],u=[];for(let c of n){let d=typeof c.id=="string"?Number(c.id):c.id,f=typeof c.date=="string"?c.date.trim():"";if(!d||Number.isNaN(d)){let g="Missing or invalid time entry ID.";if(!r)throw new Error(g);u.push({time_entry_id:c.id??null,date:f||null,error:g});continue}if(!Pd.test(f)){let g=`Invalid date format (expected YYYY-MM-DD): "${f}"`;if(!r)throw new Error(g);u.push({time_entry_id:d,date:f||null,error:g});continue}try{let g=await X.call({token:e.auth.secret_text,body:{service:"time_entry.delete",id:d,date:f}});if(g.body.status!=="ok")throw new Error(g.body.message??"Unknown error");i.push({time_entry_id:d,date:f,status:"ok"})}catch(g){let _=g instanceof Error?g.message:String(g);if(!r)throw new Error(`Failed to delete time entry ${d} on ${f}: ${_}`);u.push({time_entry_id:d,date:f,error:_})}}return{deleted_count:i.length,failed_count:u.length,deleted:i,failed:u}}});var bd=yi({displayName:"Beebole",description:"Time tracking and project management. Create companies, projects, people, and log time entries.",auth:V,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/beebole.png",categories:["PRODUCTIVITY","HUMAN_RESOURCES"],authors:["sanket-a11y"],actions:[ws,Os,Rs,Ns,Ds,Cs,Us,ks({baseUrl:o(()=>"https://beebole-apps.com/api/v2","baseUrl"),auth:V,authMapping:o(async e=>({Authorization:`Basic ${Buffer.from(`${e}:x`).toString("base64")}`}),"authMapping")})],triggers:[]});0&&(module.exports={beebole});
|
|
11
|
+
/*! Bundled license information:
|
|
12
|
+
|
|
13
|
+
mime-types/index.js:
|
|
14
|
+
(*!
|
|
15
|
+
* mime-types
|
|
16
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
17
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
18
|
+
* MIT Licensed
|
|
19
|
+
*)
|
|
20
|
+
*/
|
package/src/index.d.ts
DELETED
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,OAAO,mHA4BlB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,+DAAwE;AACxE,+DAAiE;AACjE,iEAAmE;AACnE,iEAAmE;AACnE,uEAAyE;AACzE,+EAAiF;AACjF,6FAA6F;AAC7F,6FAA6F;AAC7F,4CAAgD;AAEnC,QAAA,OAAO,GAAG,IAAA,8BAAW,EAAC;IACjC,WAAW,EAAE,SAAS;IACtB,WAAW,EACT,iGAAiG;IACnG,IAAI,EAAE,kBAAW;IACjB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,iDAAiD;IAC1D,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,EAAE,sBAAa,CAAC,eAAe,CAAC;IACvE,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,OAAO,EAAE;QACP,kCAAkB;QAClB,oCAAmB;QACnB,oCAAmB;QACnB,0CAAsB;QACtB,kDAA0B;QAC1B,8DAA+B;QAC/B,8DAA+B;QAC/B,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,iCAAiC;YAChD,IAAI,EAAE,kBAAW;YACjB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CACjC,GAAG,IAAyB,IAAI,CACjC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;iBACvB,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const createCompanyAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
corporate: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=create-company.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-company.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-company.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,mBAAmB;;;EA0C9B,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCompanyAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const client_1 = require("../common/client");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
exports.createCompanyAction = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.beeboleAuth,
|
|
10
|
-
name: 'create_company',
|
|
11
|
-
displayName: 'Create Company',
|
|
12
|
-
description: 'Creates a new company (customer) in Beebole.',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: {
|
|
15
|
-
description: 'Creates a company in Beebole, either an external customer or, when marked internal/corporate, your own organization. Use as the top-level container before creating projects under it. Not idempotent: each call creates a new company even if one with the same name already exists.',
|
|
16
|
-
idempotent: false,
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
name: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Company Name',
|
|
21
|
-
description: 'The name of the company (customer) to create.',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
corporate: pieces_framework_1.Property.Checkbox({
|
|
25
|
-
displayName: 'Internal Company',
|
|
26
|
-
description: 'Enable if this company represents your own organization (internal/corporate) rather than a customer.',
|
|
27
|
-
required: false,
|
|
28
|
-
defaultValue: false,
|
|
29
|
-
}),
|
|
30
|
-
},
|
|
31
|
-
run(context) {
|
|
32
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
const response = yield client_1.beeboleClient.call({
|
|
35
|
-
token: context.auth.secret_text,
|
|
36
|
-
body: {
|
|
37
|
-
service: 'company.create',
|
|
38
|
-
company: {
|
|
39
|
-
name: context.propsValue.name,
|
|
40
|
-
corporate: (_a = context.propsValue.corporate) !== null && _a !== void 0 ? _a : false,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
if (response.body.status !== 'ok') {
|
|
45
|
-
throw new Error(`Beebole returned an error: ${(_b = response.body.message) !== null && _b !== void 0 ? _b : 'Unknown error'}`);
|
|
46
|
-
}
|
|
47
|
-
return response.body;
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=create-company.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-company.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-company.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,6CAAiD;AACjD,yCAA6C;AAahC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,uRAAuR;QACpS,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC3B,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,sGAAsG;YACnH,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,sBAAa,CAAC,IAAI,CAAwB;gBAC/D,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,IAAI,EAAE;oBACJ,OAAO,EAAE,gBAAgB;oBACzB,OAAO,EAAE;wBACP,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;wBAC7B,SAAS,EAAE,MAAA,OAAO,CAAC,UAAU,CAAC,SAAS,mCAAI,KAAK;qBACjD;iBACF;aACF,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;gBAClC,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAA,QAAQ,CAAC,IAAI,CAAC,OAAO,mCAAI,eAAe,EAAE,CAAC,CAAC;YAC5F,CAAC;YAGD,OAAO,QAAQ,CAAC,IAAI,CAAA;QACtB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const createMultipleTimeEntriesAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
entryType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
3
|
-
absence: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
4
|
-
company: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
5
|
-
project: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
6
|
-
subproject: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
7
|
-
dates: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
8
|
-
hours: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
9
|
-
comment: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
10
|
-
continueOnError: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=create-multiple-time-entries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-multiple-time-entries.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-multiple-time-entries.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,+BAA+B;;;;;;;;;;EA0J1C,CAAC"}
|