@activepieces/piece-alai 0.1.2 → 0.1.4
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 -22
- package/src/i18n/de.json +105 -0
- package/src/i18n/es.json +105 -0
- package/src/i18n/fr.json +105 -0
- package/src/i18n/ja.json +105 -0
- package/src/i18n/nl.json +105 -0
- package/src/i18n/pt.json +105 -0
- package/src/i18n/translation.json +105 -0
- package/src/i18n/zh.json +105 -0
- package/src/index.js +20 -43
- package/README.md +0 -7
- package/src/index.d.ts +0 -3
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-slide.d.ts +0 -12
- package/src/lib/actions/add-slide.js +0 -77
- package/src/lib/actions/add-slide.js.map +0 -1
- package/src/lib/actions/delete-presentation.d.ts +0 -5
- package/src/lib/actions/delete-presentation.js +0 -34
- package/src/lib/actions/delete-presentation.js.map +0 -1
- package/src/lib/actions/export-presentation.d.ts +0 -8
- package/src/lib/actions/export-presentation.js +0 -94
- package/src/lib/actions/export-presentation.js.map +0 -1
- package/src/lib/actions/generate-presentation.d.ts +0 -17
- package/src/lib/actions/generate-presentation.js +0 -216
- package/src/lib/actions/generate-presentation.js.map +0 -1
- package/src/lib/actions/get-generation.d.ts +0 -5
- package/src/lib/actions/get-generation.js +0 -35
- package/src/lib/actions/get-generation.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -3
- package/src/lib/common/auth.js +0 -49
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -3
- package/src/lib/common/props.js +0 -36
- package/src/lib/common/props.js.map +0 -1
package/src/index.js
CHANGED
|
@@ -1,43 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const export_presentation_1 = require("./lib/actions/export-presentation");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
categories: [
|
|
22
|
-
shared_1.PieceCategory.CONTENT_AND_FILES,
|
|
23
|
-
shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE,
|
|
24
|
-
],
|
|
25
|
-
actions: [
|
|
26
|
-
generate_presentation_1.generatePresentation,
|
|
27
|
-
get_generation_1.getGeneration,
|
|
28
|
-
export_presentation_1.exportPresentation,
|
|
29
|
-
add_slide_1.addSlide,
|
|
30
|
-
delete_presentation_1.deletePresentation,
|
|
31
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
32
|
-
auth: auth_1.alaiAuth,
|
|
33
|
-
baseUrl: () => 'https://slides-api.getalai.com/api/v1',
|
|
34
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
-
return {
|
|
36
|
-
Authorization: `Bearer ${auth.props.apiKey}`,
|
|
37
|
-
};
|
|
38
|
-
}),
|
|
39
|
-
}),
|
|
40
|
-
],
|
|
41
|
-
triggers: [],
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var Ms=Object.create;var Je=Object.defineProperty;var js=Object.getOwnPropertyDescriptor;var Ls=Object.getOwnPropertyNames;var Fs=Object.getPrototypeOf,Bs=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),cn=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},pn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ls(t))!Bs.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=js(t,i))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?Ms(Fs(e)):{},pn(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Zs=e=>pn(Je({},"__esModule",{value:!0}),e);var Ao=E((So,jt)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),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 g(s,l){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let f=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;)f++;if(s.substr(0,2)==="::"&&f--,s.substr(-2,2)==="::"&&f--,f>l)return null;for(M=l-f,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 Y=s.split(":"),re=[];for(let Ae=0;Ae<Y.length;Ae++)re.push(parseInt(Y[Ae],16));return re}(),{parts:l,zoneId:v}}o(g,"expandIPv6");function y(s,l,f,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=f-m,P<0&&(P=0),s[v]>>P!==l[v]>>P)return!1;m-=f,v+=1}return!0}o(y,"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 f,m;for(f=0;f<l.length;f++)if(m=l[f],!(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,f){let m;if(f===void 0&&(m=l,l=m[0],f=m[1]),l.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,l.octets,8,f)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,f=!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],f&&M!==0)return null;M!==8&&(f=!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),f=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(f[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,f,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],f=0;f<4;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;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 f=parseInt(l[2]);if(f>=0&&f<=32){let m=[this.parse(l[1]),f];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,f,m;if(l=s.match(r.fourOctet))return function(){let v=l.slice(1,6),P=[];for(let M=0;M<v.length;M++)f=v[M],P.push(_(f));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],f=0,m=Math.floor(s/8);for(;f<m;)l[f]=255,f++;return m<4&&(l[m]=Math.pow(2,s%8)-1<<8-s%8),new this(l)},x.IPv6=function(){function s(l,f){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");f&&(this.zoneId=f)}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,f){let m;if(f===void 0&&(m=l,l=m[0],f=m[1]),l.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,l.parts,16,f)},s.prototype.prefixLengthFromSubnetMask=function(){let l=0,f=!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],f&&P!==0)return null;P!==16&&(f=!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,f=[],m=this.parts;for(let v=0;v<m.length;v++)l=m[v],f.push(l>>8),f.push(l&255);return f},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(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),l+f},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),f=l[0],m=l[1];return new x.IPv4([f>>8,f&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(":"),f="";return this.zoneId&&(f=`%${this.zoneId}`),l+f},s.prototype.toRFC5952String=function(){let l=/((^|:)(0(:|$)){2,})/g,f=this.toNormalizedString(),m=0,v=-1,P;for(;P=l.exec(f);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?f:`${f.substring(0,m)}::${f.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s}(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let l=this.parseCIDR(s),f=l[0].toByteArray(),m=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(f[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,f,m,v,P;try{for(l=this.parseCIDR(s),m=l[0].toByteArray(),P=this.subnetMaskFromPrefixLength(l[1]).toByteArray(),v=[],f=0;f<16;)v.push(parseInt(m[f],10)&parseInt(P[f],10)),f++;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,f,m;if((f=s.match(/^(.+)\/(\d+)$/))&&(l=parseInt(f[2]),l>=0&&l<=128))return m=[this.parse(f[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,f,m,v,P,M;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return g(s,8);if((m=s.match(d.transitional))&&(M=m[6]||"",l=m[1],m[1].endsWith("::")||(l=l.slice(0,-1)),l=g(l+M,6),l.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],f=0;f<P.length;f++)if(v=P[f],!(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],f=0,m=Math.floor(s/8);for(;f<m;)l[f]=255,f++;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,f){let m,v,P,M;f==null&&(f="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 f},typeof jt<"u"&&jt.exports?jt.exports=x:e.ipaddr=x})(So)});var Ti=E((VS,Ii)=>{var bi=require("stream").Stream,vp=require("util");Ii.exports=pe;function pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(pe,"DelayedStream");vp.inherits(pe,bi);pe.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(pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};pe.prototype.pause=function(){this.source.pause()};pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};pe.prototype.pipe=function(){var e=bi.prototype.pipe.apply(this,arguments);return this.resume(),e};pe.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)};pe.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 Ai=E((WS,Si)=>{var xp=require("util"),$i=require("stream").Stream,Ei=Ti();Si.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");xp.inherits(G,$i);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 Ei)){var r=Ei.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 $i.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 ki=E((qS,zi)=>{"use strict";zi.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 Ri=E(te=>{"use strict";var Ht=ki(),_p=require("path").extname,Oi=/^\s*([^;\s]*)(?:;|\s|$)/,Pp=/^text\//i;te.charset=wi;te.charsets={lookup:wi};te.contentType=bp;te.extension=Ip;te.extensions=Object.create(null);te.lookup=Tp;te.types=Object.create(null);Ep(te.extensions,te.types);function wi(e){if(!e||typeof e!="string")return!1;var t=Oi.exec(e),r=t&&Ht[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Pp.test(t[1])?"UTF-8":!1}o(wi,"charset");function bp(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?te.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=te.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(bp,"contentType");function Ip(e){if(!e||typeof e!="string")return!1;var t=Oi.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ip,"extension");function Tp(e){if(!e||typeof e!="string")return!1;var t=_p("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(Tp,"lookup");function Ep(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Ht).forEach(o(function(i){var u=Ht[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var g=c[d];if(t[g]){var y=r.indexOf(Ht[t[g]].source),_=r.indexOf(u.source);if(t[g]!=="application/octet-stream"&&(y>_||y===_&&t[g].substr(0,12)==="application/"))continue}t[g]=i}}},"forEachMimeType"))}o(Ep,"populateMaps")});var Di=E((XS,Ni)=>{Ni.exports=$p;function $p(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o($p,"defer")});var jr=E((QS,Ui)=>{var Ci=Di();Ui.exports=Sp;function Sp(e){var t=!1;return Ci(function(){t=!0}),o(function(n,i){t?e(n,i):Ci(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Sp,"async")});var Lr=E((tA,Mi)=>{Mi.exports=Ap;function Ap(e){Object.keys(e.jobs).forEach(zp.bind(e)),e.jobs={}}o(Ap,"abort");function zp(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(zp,"clean")});var Fr=E((nA,Li)=>{var ji=jr(),kp=Lr();Li.exports=Op;function Op(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=wp(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?kp(r):r.results[i]=c,n(u,r.results))})}o(Op,"iterate");function wp(e,t,r,n){var i;return e.length==2?i=e(r,ji(n)):i=e(r,t,ji(n)),i}o(wp,"runJob")});var Br=E((iA,Fi)=>{Fi.exports=Rp;function Rp(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(Rp,"state")});var Zr=E((sA,Bi)=>{var Np=Lr(),Dp=jr();Bi.exports=Cp;function Cp(e){Object.keys(this.jobs).length&&(this.index=this.size,Np(this),Dp(e)(null,this.results))}o(Cp,"terminator")});var Vi=E((cA,Zi)=>{var Up=Fr(),Mp=Br(),jp=Zr();Zi.exports=Lp;function Lp(e,t,r){for(var n=Mp(e);n.index<(n.keyedList||e).length;)Up(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 jp.bind(n,r)}o(Lp,"parallel")});var Vr=E((lA,Wt)=>{var Hi=Fr(),Fp=Br(),Bp=Zr();Wt.exports=Zp;Wt.exports.ascending=Wi;Wt.exports.descending=Vp;function Zp(e,t,r,n){var i=Fp(e,r);return Hi(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){Hi(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Bp.bind(i,n)}o(Zp,"serialOrdered");function Wi(e,t){return e<t?-1:e>t?1:0}o(Wi,"ascending");function Vp(e,t){return-1*Wi(e,t)}o(Vp,"descending")});var qi=E((mA,Gi)=>{var Hp=Vr();Gi.exports=Wp;function Wp(e,t,r){return Hp(e,t,null,r)}o(Wp,"serial")});var Ji=E((gA,Ki)=>{Ki.exports={parallel:Vi(),serial:qi(),serialOrdered:Vr()}});var Hr=E((yA,Xi)=>{"use strict";Xi.exports=Object});var Qi=E((hA,Yi)=>{"use strict";Yi.exports=Error});var ta=E((vA,ea)=>{"use strict";ea.exports=EvalError});var na=E((xA,ra)=>{"use strict";ra.exports=RangeError});var ia=E((_A,oa)=>{"use strict";oa.exports=ReferenceError});var sa=E((PA,aa)=>{"use strict";aa.exports=SyntaxError});var Gt=E((bA,ua)=>{"use strict";ua.exports=TypeError});var pa=E((IA,ca)=>{"use strict";ca.exports=URIError});var da=E((TA,la)=>{"use strict";la.exports=Math.abs});var fa=E((EA,ma)=>{"use strict";ma.exports=Math.floor});var ya=E(($A,ga)=>{"use strict";ga.exports=Math.max});var va=E((SA,ha)=>{"use strict";ha.exports=Math.min});var _a=E((AA,xa)=>{"use strict";xa.exports=Math.pow});var ba=E((zA,Pa)=>{"use strict";Pa.exports=Math.round});var Ta=E((kA,Ia)=>{"use strict";Ia.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var $a=E((wA,Ea)=>{"use strict";var Gp=Ta();Ea.exports=o(function(t){return Gp(t)||t===0?t:t<0?-1:1},"sign")});var Aa=E((NA,Sa)=>{"use strict";Sa.exports=Object.getOwnPropertyDescriptor});var Wr=E((DA,za)=>{"use strict";var qt=Aa();if(qt)try{qt([],"length")}catch{qt=null}za.exports=qt});var Oa=E((CA,ka)=>{"use strict";var Kt=Object.defineProperty||!1;if(Kt)try{Kt({},"a",{value:1})}catch{Kt=!1}ka.exports=Kt});var Gr=E((UA,wa)=>{"use strict";wa.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 Da=E((jA,Na)=>{"use strict";var Ra=typeof Symbol<"u"&&Symbol,qp=Gr();Na.exports=o(function(){return typeof Ra!="function"||typeof Symbol!="function"||typeof Ra("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qp()},"hasNativeSymbols")});var qr=E((FA,Ca)=>{"use strict";Ca.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Kr=E((BA,Ua)=>{"use strict";var Kp=Hr();Ua.exports=Kp.getPrototypeOf||null});var La=E((ZA,ja)=>{"use strict";var Jp="Function.prototype.bind called on incompatible ",Xp=Object.prototype.toString,Yp=Math.max,Qp="[object Function]",Ma=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"),el=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"),tl=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");ja.exports=o(function(t){var r=this;if(typeof r!="function"||Xp.apply(r)!==Qp)throw new TypeError(Jp+r);for(var n=el(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Ma(n,arguments));return Object(_)===_?_:this}return r.apply(t,Ma(n,arguments))},"binder"),c=Yp(0,r.length-n.length),d=[],g=0;g<c;g++)d[g]="$"+g;if(i=Function("binder","return function ("+tl(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var y=o(function(){},"Empty");y.prototype=r.prototype,i.prototype=new y,y.prototype=null}return i},"bind")});var He=E((HA,Fa)=>{"use strict";var rl=La();Fa.exports=Function.prototype.bind||rl});var Jt=E((WA,Ba)=>{"use strict";Ba.exports=Function.prototype.call});var Jr=E((GA,Za)=>{"use strict";Za.exports=Function.prototype.apply});var Ha=E((qA,Va)=>{"use strict";Va.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Ga=E((KA,Wa)=>{"use strict";var nl=He(),ol=Jr(),il=Jt(),al=Ha();Wa.exports=al||nl.call(il,ol)});var Ka=E((JA,qa)=>{"use strict";var sl=He(),ul=Gt(),cl=Jt(),pl=Ga();qa.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new ul("a function is required");return pl(sl,cl,t)},"callBindBasic")});var ts=E((YA,es)=>{"use strict";var ll=Ka(),Ja=Wr(),Ya;try{Ya=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Xr=!!Ya&&Ja&&Ja(Object.prototype,"__proto__"),Qa=Object,Xa=Qa.getPrototypeOf;es.exports=Xr&&typeof Xr.get=="function"?ll([Xr.get]):typeof Xa=="function"?o(function(t){return Xa(t==null?t:Qa(t))},"getDunder"):!1});var as=E((ez,is)=>{"use strict";var rs=qr(),ns=Kr(),os=ts();is.exports=rs?o(function(t){return rs(t)},"getProto"):ns?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return ns(t)},"getProto"):os?o(function(t){return os(t)},"getProto"):null});var Yr=E((rz,ss)=>{"use strict";var dl=Function.prototype.call,ml=Object.prototype.hasOwnProperty,fl=He();ss.exports=fl.call(dl,ml)});var fs=E((nz,ms)=>{"use strict";var j,gl=Hr(),yl=Qi(),hl=ta(),vl=na(),xl=ia(),Ke=sa(),qe=Gt(),_l=pa(),Pl=da(),bl=fa(),Il=ya(),Tl=va(),El=_a(),$l=ba(),Sl=$a(),ls=Function,Qr=o(function(e){try{return ls('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),ht=Wr(),Al=Oa(),en=o(function(){throw new qe},"throwTypeError"),zl=ht?function(){try{return arguments.callee,en}catch{try{return ht(arguments,"callee").get}catch{return en}}}():en,We=Da()(),X=as(),kl=Kr(),Ol=qr(),ds=Jr(),vt=Jt(),Ge={},wl=typeof Uint8Array>"u"||!X?j:X(Uint8Array),Re={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?j:ArrayBuffer,"%ArrayIteratorPrototype%":We&&X?X([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%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%":yl,"%eval%":eval,"%EvalError%":hl,"%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%":ls,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?j:Int8Array,"%Int16Array%":typeof Int16Array>"u"?j:Int16Array,"%Int32Array%":typeof Int32Array>"u"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&X?X(X([][Symbol.iterator]())):j,"%JSON%":typeof JSON=="object"?JSON:j,"%Map%":typeof Map>"u"?j:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!X?j:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":gl,"%Object.getOwnPropertyDescriptor%":ht,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?j:Promise,"%Proxy%":typeof Proxy>"u"?j:Proxy,"%RangeError%":vl,"%ReferenceError%":xl,"%Reflect%":typeof Reflect>"u"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?j:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!X?j:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&X?X(""[Symbol.iterator]()):j,"%Symbol%":We?Symbol:j,"%SyntaxError%":Ke,"%ThrowTypeError%":zl,"%TypedArray%":wl,"%TypeError%":qe,"%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%":_l,"%WeakMap%":typeof WeakMap>"u"?j:WeakMap,"%WeakRef%":typeof WeakRef>"u"?j:WeakRef,"%WeakSet%":typeof WeakSet>"u"?j:WeakSet,"%Function.prototype.call%":vt,"%Function.prototype.apply%":ds,"%Object.defineProperty%":Al,"%Object.getPrototypeOf%":kl,"%Math.abs%":Pl,"%Math.floor%":bl,"%Math.max%":Il,"%Math.min%":Tl,"%Math.pow%":El,"%Math.round%":$l,"%Math.sign%":Sl,"%Reflect.getPrototypeOf%":Ol};if(X)try{null.error}catch(e){us=X(X(e)),Re["%Error.prototype%"]=us}var us,Rl=o(function e(t){var r;if(t==="%AsyncFunction%")r=Qr("async function () {}");else if(t==="%GeneratorFunction%")r=Qr("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Qr("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&X&&(r=X(i.prototype))}return Re[t]=r,r},"doEval"),cs={__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"]},xt=He(),Xt=Yr(),Nl=xt.call(vt,Array.prototype.concat),Dl=xt.call(ds,Array.prototype.splice),ps=xt.call(vt,String.prototype.replace),Yt=xt.call(vt,String.prototype.slice),Cl=xt.call(vt,RegExp.prototype.exec),Ul=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ml=/\\(\\)?/g,jl=o(function(t){var r=Yt(t,0,1),n=Yt(t,-1);if(r==="%"&&n!=="%")throw new Ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ke("invalid intrinsic syntax, expected opening `%`");var i=[];return ps(t,Ul,function(u,c,d,g){i[i.length]=d?ps(g,Ml,"$1"):c||u}),i},"stringToPath"),Ll=o(function(t,r){var n=t,i;if(Xt(cs,n)&&(i=cs[n],n="%"+i[0]+"%"),Xt(Re,n)){var u=Re[n];if(u===Ge&&(u=Rl(n)),typeof u>"u"&&!r)throw new qe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Ke("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");ms.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new qe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new qe('"allowMissing" argument must be a boolean');if(Cl(/^%?[^%]*%?$/,t)===null)throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=jl(t),i=n.length>0?n[0]:"",u=Ll("%"+i+"%",r),c=u.name,d=u.value,g=!1,y=u.alias;y&&(i=y[0],Dl(n,Nl([0,1],y)));for(var _=1,b=!0;_<n.length;_+=1){var x=n[_],s=Yt(x,0,1),l=Yt(x,-1);if((s==='"'||s==="'"||s==="`"||l==='"'||l==="'"||l==="`")&&s!==l)throw new Ke("property names with quotes must have matching quotes");if((x==="constructor"||!b)&&(g=!0),i+="."+x,c="%"+i+"%",Xt(Re,c))d=Re[c];else if(d!=null){if(!(x in d)){if(!r)throw new qe("base intrinsic for "+t+" exists, but the property is not available.");return}if(ht&&_+1>=n.length){var f=ht(d,x);b=!!f,b&&"get"in f&&!("originalValue"in f.get)?d=f.get:d=d[x]}else b=Xt(d,x),d=d[x];b&&!g&&(Re[c]=d)}}return d},"GetIntrinsic")});var ys=E((iz,gs)=>{"use strict";var Fl=Gr();gs.exports=o(function(){return Fl()&&!!Symbol.toStringTag},"hasToStringTagShams")});var xs=E((sz,vs)=>{"use strict";var Bl=fs(),hs=Bl("%Object.defineProperty%",!0),Zl=ys()(),Vl=Yr(),Hl=Gt(),Qt=Zl?Symbol.toStringTag:null;vs.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 Hl("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Qt&&(n||!Vl(t,Qt))&&(hs?hs(t,Qt,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[Qt]=r)},"setToStringTag")});var Ps=E((cz,_s)=>{"use strict";var Wl=Function.prototype.call,Gl=Object.prototype.hasOwnProperty,ql=He();_s.exports=ql.call(Wl,Gl)});var Is=E((pz,bs)=>{"use strict";bs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var $s=E((lz,Es)=>{"use strict";var on=Ai(),Kl=require("util"),tn=require("path"),Jl=require("http"),Xl=require("https"),Yl=require("url").parse,Ql=require("fs"),ed=require("stream").Stream,td=require("crypto"),rn=Ri(),rd=Ji(),nd=xs(),Se=Ps(),nn=Is();function Ts(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ts,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],on.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");Kl.inherits(L,on);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=on.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&&Se(t,"httpVersion"))&&!(t instanceof ed))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Se(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Ql.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Se(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Se(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="'+Ts(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&nn(c,r.header);var d;for(var g in c)if(Se(c,g)){if(d=c[g],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=g+": "+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=tn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=tn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Se(e,"httpVersion")&&(r=tn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ts(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=rn.lookup(e.name)),!r&&e&&e.path&&(r=rn.lookup(e.path)),!r&&e&&e.readable&&Se(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=rn.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)Se(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="--------------------------"+td.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}rd.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=Yl(e),n=nn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=nn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Xl.request(n):r=Jl.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,g=o(function(y,_){return r.removeListener("error",g),r.removeListener("response",d),t.call(this,y,_)},"callback");d=g.bind(this,null),r.on("error",g),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]"};nd(L.prototype,"FormData");Es.exports=L});var md={};cn(md,{alai:()=>dd});module.exports=Zs(md);var Vs=Object.freeze({status:"aborted"});function I(e,t,r){function n(d,g){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:g,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,g);let y=c.prototype,_=Object.keys(y);for(let b=0;b<_.length;b++){let x=_[b];x in d||(d[x]=y[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 g;let y=r?.Parent?new u:this;n(y,d),(g=y._zod).deferred??(g.deferred=[]);for(let _ of y._zod.deferred)_();return y}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(I,"$constructor");var Hs=Symbol("zod_brand"),le=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Pt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},tr={};function fe(e){return e&&Object.assign(tr,e),tr}o(fe,"config");function nr(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(nr,"getEnumValues");function dn(e,t){return typeof t=="bigint"?t.toString():t}o(dn,"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 mn(e){return e==null}o(mn,"nullish");function Tt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Tt,"cleanRegex");var ln=Symbol("evaluating");function q(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==ln)return n===void 0&&(n=ln,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(q,"defineLazy");var or="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 fn(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(fn,"isPlainObject");var gn=new Set(["string","number","symbol"]);function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(De,"escapeRegex");function Et(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Et,"clone");function V(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(V,"normalizeParams");function yn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(yn,"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 Ce(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}o(Ce,"aborted");function Pe(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Pe,"prefixIssues");function bt(e){return typeof e=="string"?e:e?.message}o(bt,"unwrapMessage");function be(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=bt(e.inst?._zod.def?.error?.(e))??bt(t?.error?.(e))??bt(r.customError?.(e))??bt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(be,"finalizeIssue");function hn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(hn,"getLengthableOrigin");function ir(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(ir,"issue");var vn=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,dn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),xn=I("$ZodError",vn),Ye=I("$ZodError",vn,{Parent:Error});var Ks=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 le;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(g=>be(g,u,fe())));throw or(d,i?.callee),d}return c.value},"_parse"),$t=Ks(Ye),Js=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(g=>be(g,u,fe())));throw or(d,i?.callee),d}return c.value},"_parseAsync"),St=Js(Ye),Xs=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 le;return u.issues.length?{success:!1,error:new(e??xn)(u.issues.map(c=>be(c,i,fe())))}:{success:!0,data:u.value}},"_safeParse"),Qe=Xs(Ye),Ys=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=>be(c,i,fe())))}:{success:!0,data:u.value}},"_safeParseAsync"),et=Ys(Ye);var Qs="(?:(?:\\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])))",eu=new RegExp(`^${Qs}$`);var _n=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Pn=/^-?\d+n?$/;var ar=/^-?\d+(?:\.\d+)?$/,bn=/^(?:true|false)$/i;var Ue=I("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var In=I("$ZodCheckMinLength",(e,t)=>{var r;Ue.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!mn(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=hn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var sr=I("$ZodCheckStringFormat",(e,t)=>{var r,n;Ue.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=()=>{})}),Tn=I("$ZodCheckRegex",(e,t)=>{sr.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 $n={major:4,minor:3,patch:6};var H=I("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=$n;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,g)=>{let y=Ce(c),_;for(let b of d){if(b._zod.def.when){if(!b._zod.def.when(c))continue}else if(y)continue;let x=c.issues.length,s=b._zod.check(c);if(s instanceof Promise&&g?.async===!1)throw new le;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(y||(y=Ce(c,x)))});else{if(c.issues.length===x)continue;y||(y=Ce(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,d,g)=>{if(Ce(c))return c.aborted=!0,c;let y=i(d,n,g);if(y instanceof Promise){if(g.async===!1)throw new le;return y.then(_=>e._zod.parse(_,g))}return e._zod.parse(y,g)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return y instanceof Promise?y.then(_=>u(_,c,d)):u(y,c,d)}let g=e._zod.parse(c,d);if(g instanceof Promise){if(d.async===!1)throw new le;return g.then(y=>i(y,n,d))}return i(g,n,d)}}q(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}))}),kt=I("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_n(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ur=I("$ZodStringFormat",(e,t)=>{sr.init(e,t),kt.init(e,t)});var On=I("$ZodURL",(e,t)=>{ur.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 wn=I("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??ar,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 cr=I("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=bn,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}}),Rn=I("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=Pn,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 Nn=I("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Dn=I("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var Cn=I("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),r}}),Un=I("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,u=i instanceof Date;return u&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...u?{received:"Invalid Date"}:{},inst:e}),r}});function Sn(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}o(Sn,"handleArrayResult");var Mn=I("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],g=t.element._zod.run({value:d,issues:[]},n);g instanceof Promise?u.push(g.then(y=>Sn(y,r,c))):Sn(g,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function zt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Pe(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(zt,"handlePropertyResult");function tu(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=yn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(tu,"normalizeDef");function ru(e,t,r,n,i,u){let c=[],d=i.keySet,g=i.catchall._zod,y=g.def.type,_=g.optout==="optional";for(let b in t){if(d.has(b))continue;if(y==="never"){c.push(b);continue}let x=g.run({value:t[b],issues:[]},n);x instanceof Promise?e.push(x.then(s=>zt(s,r,b,t,_))):zt(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(ru,"handleCatchall");var jn=I("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let g={...d};return Object.defineProperty(t,"shape",{value:g}),g},"get")})}let n=It(()=>tu(t));q(e._zod,"propValues",()=>{let d=t.shape,g={};for(let y in d){let _=d[y]._zod;if(_.values){g[y]??(g[y]=new Set);for(let b of _.values)g[y].add(b)}}return g});let i=Xe,u=t.catchall,c;e._zod.parse=(d,g)=>{c??(c=n.value);let y=d.value;if(!i(y))return d.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),d;d.value={};let _=[],b=c.shape;for(let x of c.keys){let s=b[x],l=s._zod.optout==="optional",f=s._zod.run({value:y[x],issues:[]},g);f instanceof Promise?_.push(f.then(m=>zt(m,d,x,y,l))):zt(f,d,x,y,l)}return u?ru(_,y,d,g,n.value,e):_.length?Promise.all(_).then(()=>d):d}});function An(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=>!Ce(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=>be(c,n,fe())))}),t)}o(An,"handleUnionResults");var pr=I("$ZodUnion",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),q(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),q(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),q(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=>Tt(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 g of t.options){let y=g._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)d.push(y),c=!0;else{if(y.issues.length===0)return y;d.push(y)}}return c?Promise.all(d).then(g=>An(g,i,e,u)):An(d,i,e,u)}});var Ln=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,pr.init(e,t);let r=e._zod.parse;q(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,g]of Object.entries(c)){i[d]||(i[d]=new Set);for(let y of g)i[d].add(y)}}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 g of d){if(u.has(g))throw new Error(`Duplicate discriminator value "${String(g)}"`);u.set(g,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 Fn=I("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!fn(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 y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){d.add(typeof y=="number"?y.toString():y);let _=t.valueType._zod.run({value:i[y],issues:[]},n);_ instanceof Promise?u.push(_.then(b=>{b.issues.length&&r.issues.push(...Pe(y,b.issues)),r.value[y]=b.value})):(_.issues.length&&r.issues.push(...Pe(y,_.issues)),r.value[y]=_.value)}let g;for(let y in i)d.has(y)||(g=g??[],g.push(y));g&&g.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:g})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let g=t.keyType._zod.run({value:d,issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&ar.test(d)&&g.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&&(g=b)}if(g.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(b=>be(b,n,fe())),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(...Pe(d,b.issues)),r.value[g.value]=b.value})):(_.issues.length&&r.issues.push(...Pe(d,_.issues)),r.value[g.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Bn=I("$ZodEnum",(e,t)=>{H.init(e,t);let r=nr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>gn.has(typeof i)).map(i=>typeof i=="string"?De(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}}),Zn=I("$ZodLiteral",(e,t)=>{if(H.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?De(n):n?De(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 Vn=I("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Pt(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 le;return r.value=i,r}});function zn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(zn,"handleOptionalResult");var Hn=I("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",q(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Tt(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=>zn(u,r.value)):zn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Wn=I("$ZodNullable",(e,t)=>{H.init(e,t),q(e._zod,"optin",()=>t.innerType._zod.optin),q(e._zod,"optout",()=>t.innerType._zod.optout),q(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Tt(r.source)}|null)$`):void 0}),q(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 Gn=I("$ZodPipe",(e,t)=>{H.init(e,t),q(e._zod,"values",()=>t.in._zod.values),q(e._zod,"optin",()=>t.in._zod.optin),q(e._zod,"optout",()=>t.out._zod.optout),q(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=>At(c,t.in,n)):At(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>At(u,t.out,n)):At(i,t.out,n)}});function At(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(At,"handlePipeResult");var qn=I("$ZodCustom",(e,t)=>{Ue.init(e,t),H.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(u=>kn(u,r,n,e));kn(i,r,n,e)}});function kn(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(ir(i))}}o(kn,"handleRefineResult");var Jn,au=Symbol("ZodOutput"),su=Symbol("ZodInput"),lr=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 Xn(){return new lr}o(Xn,"registry");(Jn=globalThis).__zod_globalRegistry??(Jn.__zod_globalRegistry=Xn());var dr=globalThis.__zod_globalRegistry;function Yn(e,t){return new e({type:"string",...V(t)})}o(Yn,"_string");function Qn(e,t){return new e({type:"string",coerce:!0,...V(t)})}o(Qn,"_coercedString");function eo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}o(eo,"_url");function to(e,t){return new e({type:"number",checks:[],...V(t)})}o(to,"_number");function ro(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}o(ro,"_coercedNumber");function no(e,t){return new e({type:"boolean",...V(t)})}o(no,"_boolean");function oo(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}o(oo,"_coercedBoolean");function io(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}o(io,"_coercedBigint");function ao(e){return new e({type:"any"})}o(ao,"_any");function so(e){return new e({type:"unknown"})}o(so,"_unknown");function uo(e,t){return new e({type:"void",...V(t)})}o(uo,"_void");function co(e,t){return new e({type:"date",coerce:!0,...V(t)})}o(co,"_coercedDate");function ce(e,t){return new In({check:"min_length",...V(t),minimum:e})}o(ce,"_minLength");function Ie(e,t){return new Tn({check:"string_format",format:"regex",...V(t),pattern:e})}o(Ie,"_regex");function po(e,t,r){let n=V(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(po,"_custom");var K=I("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>$t(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Qe(e,r,n),e.parseAsync=async(r,n)=>St(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>et(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>Et(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),wt=I("ZodMiniString",(e,t)=>{kt.init(e,t),K.init(e,t)});function a(e){return Yn(wt,e)}o(a,"string");var lo=I("ZodMiniStringFormat",(e,t)=>{ur.init(e,t),wt.init(e,t)});var hu=I("ZodMiniURL",(e,t)=>{On.init(e,t),lo.init(e,t)});function mo(e){return eo(hu,e)}o(mo,"url");var mr=I("ZodMiniNumber",(e,t)=>{wn.init(e,t),K.init(e,t)});function Q(e){return to(mr,e)}o(Q,"number");var fr=I("ZodMiniBoolean",(e,t)=>{cr.init(e,t),K.init(e,t)});function B(e){return no(fr,e)}o(B,"boolean");var fo=I("ZodMiniBigInt",(e,t)=>{Rn.init(e,t),K.init(e,t)});var vu=I("ZodMiniAny",(e,t)=>{Nn.init(e,t),K.init(e,t)});function rt(){return ao(vu)}o(rt,"any");var xu=I("ZodMiniUnknown",(e,t)=>{Dn.init(e,t),K.init(e,t)});function O(){return so(xu)}o(O,"unknown");var _u=I("ZodMiniVoid",(e,t)=>{Cn.init(e,t),K.init(e,t)});function go(e){return uo(_u,e)}o(go,"_void");var yo=I("ZodMiniDate",(e,t)=>{Un.init(e,t),K.init(e,t)});var Pu=I("ZodMiniArray",(e,t)=>{Mn.init(e,t),K.init(e,t)});function N(e,t){return new Pu({type:"array",element:e,...V(t)})}o(N,"array");var bu=I("ZodMiniObject",(e,t)=>{jn.init(e,t),K.init(e,t),q(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...V(t)};return new bu(r)}o(p,"object");var Iu=I("ZodMiniUnion",(e,t)=>{pr.init(e,t),K.init(e,t)});function D(e,t){return new Iu({type:"union",options:e,...V(t)})}o(D,"union");var Tu=I("ZodMiniDiscriminatedUnion",(e,t)=>{Ln.init(e,t),K.init(e,t)});function Me(e,t,r){return new Tu({type:"union",options:t,discriminator:e,...V(r)})}o(Me,"discriminatedUnion");var Eu=I("ZodMiniRecord",(e,t)=>{Fn.init(e,t),K.init(e,t)});function w(e,t,r){return new Eu({type:"record",keyType:e,valueType:t,...V(r)})}o(w,"record");var $u=I("ZodMiniEnum",(e,t)=>{Bn.init(e,t),K.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 $u({type:"enum",entries:r,...V(t)})}o(U,"_enum");var Su=I("ZodMiniLiteral",(e,t)=>{Zn.init(e,t),K.init(e,t)});function S(e,t){return new Su({type:"literal",values:Array.isArray(e)?e:[e],...V(t)})}o(S,"literal");var Au=I("ZodMiniTransform",(e,t)=>{Vn.init(e,t),K.init(e,t)});function Te(e){return new Au({type:"transform",transform:e})}o(Te,"transform");var zu=I("ZodMiniOptional",(e,t)=>{Hn.init(e,t),K.init(e,t)});function h(e){return new zu({type:"optional",innerType:e})}o(h,"optional");var ku=I("ZodMiniNullable",(e,t)=>{Wn.init(e,t),K.init(e,t)});function nt(e){return new ku({type:"nullable",innerType:e})}o(nt,"nullable");var Ou=I("ZodMiniPipe",(e,t)=>{Gn.init(e,t),K.init(e,t)});function Ee(e,t){return new Ou({type:"pipe",in:e,out:t})}o(Ee,"pipe");var wu=I("ZodMiniCustom",(e,t)=>{qn.init(e,t),K.init(e,t)});function Rt(e,t){return po(wu,e??(()=>!0),t)}o(Rt,"custom");var ot={};cn(ot,{bigint:()=>ju,boolean:()=>Mu,date:()=>Lu,number:()=>Uu,string:()=>Cu});function Cu(e){return Qn(wt,e)}o(Cu,"string");function Uu(e){return ro(mr,e)}o(Uu,"number");function Mu(e){return oo(fr,e)}o(Mu,"boolean");function ju(e){return io(fo,e)}o(ju,"bigint");function Lu(e){return co(yo,e)}o(Lu,"date");var yr=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),gr=class{constructor(t,r,n,i,u,c,d,g,y,_,b){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=g;this.outputSchema=y;this.audience=_;this.aiMetadata=b}static{o(this,"IAction")}},ae=o(e=>new gr(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var F=p({displayName:a(),description:h(a())}),C=o((e,t)=>p({type:S(t),required:B(),defaultValue:h(rt())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ge=p({...F.shape,...C(a(),"LONG_TEXT").shape});var vo=p({label:a(),value:O()}),Nt=p({disabled:h(B()),placeholder:h(a()),options:N(vo)});var oe=p({...F.shape,options:Nt,...C(O(),"STATIC_DROPDOWN").shape}),ye=p({...F.shape,options:Nt,...C(N(O()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var hr=p({...F.shape,...C(O(),"DROPDOWN").shape,refreshers:N(a())}),it=p({...F.shape,...C(N(O()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var he=p({...F.shape,...C(B(),"CHECKBOX").shape});var ve=p({...F.shape,...C(Q(),"NUMBER").shape});var at=p({...F.shape,...C(O(),"FILE").shape});var st=p({...F.shape,...C(a(),"DATE_TIME").shape});var xo=w(a(),D([ne,ge,oe,it,ye,he,ve,at,st])),ut=p({...F.shape,properties:xo,...C(N(O()),"ARRAY").shape});var ct=p({...F.shape,...C(D([w(a(),O())]),"JSON").shape});var _o=D([ne,oe,ct,ut,ye]),Bu=w(a(),_o),vr=p({refreshers:N(a()),...F.shape,...C(O(),"DYNAMIC").shape});var Dt=p({...F.shape,...C(go(),"MARKDOWN").shape});var pt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(pt||{}),je=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(je||{}),Le=(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))(Le||{});var lt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(lt||{}),xr="both_client_credentials_and_authorization_code";var ze=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(ze||{}),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||{}),Zu=p({strategy:U(dt),paramName:h(a())}),mt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(mt||{});var Ct=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ct||{}),Po=p({status:h(Q()),body:h(O()),headers:h(w(a(),a()))}),bo=p({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Ct))}),Io=p({type:S("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Po,handlerId:h(a()),streamStepProgress:h(U(Ct))}),Vu=D([bo,Io]);var Hu=p({body:O(),rawBody:h(O()),headers:w(a(),a()),queryParams:w(a(),a())});function xe(e){return e==null}o(xe,"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 Ut(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ut,"assertNotNullOrUndefined");var _r=Ne(require("crypto"),1);var Wu=128,ke,Fe,Gu=o(e=>{!ke||ke.length<e?(ke=Buffer.allocUnsafe(e*Wu),_r.default.randomFillSync(ke),Fe=0):Fe+e>ke.length&&(_r.default.randomFillSync(ke),Fe=0),Fe+=e},"fillPool"),qu=o(e=>(Gu(e|=0),ke.subarray(Fe-e,Fe)),"random"),Ku=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),g=i;for(;g--;)if(c+=e[d[g]&n]||"",c.length===u)return c}}},"customRandom"),Eo=o((e,t=21)=>Ku(e,t,qu),"customAlphabet");var Ju="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$o=21,JP=a().check(Ie(new RegExp(`^[0-9a-zA-Z]{${$o}}$`))),Xu=Eo(Ju,$o);var $e=Ee(Te(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:$e,updated:$e},Z=o(e=>h(nt(e)),"Nullable");function Pr(e){return h(nt(U(e)))}o(Pr,"NullableEnum");var QP=Ee(Te(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Mt=o(e=>Ee(Te(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var rb=w(a(),O());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 fb=a().check(Ie(/^#[0-9A-Fa-f]{6}$/));var yb=p({filename:a(),data:O(),type:S("file"),mimetype:h(a())});var Yu=Ne(Ao());var Ib=p({...se,name:a(),permissions:N(a()),platformId:Z(a()),type:a(),userCount:h(Q())});var zo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(zo||{}),br=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(br||{}),Ir=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ir||{});var Tr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Tr||{});var Er=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Er||{});var Qu=p({mode:U(zo),value:O()}),ec=p({auth:h(a()),fields:w(a(),Qu)}),tc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(ec)}),rc=p({type:S("PIECE"),toolName:a().check(ce(1)),pieceMetadata:tc}),nc=p({type:S("none")}),oc=p({type:S("access_token"),accessToken:a()}),ic=p({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),ac=p({type:S("headers"),headers:w(a(),a())}),sc=Me("type",[nc,oc,ic,ac]),ko=p({type:S("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:h(a())}),Oo=p({type:S("MCP"),toolName:a().check(ce(1)),serverUrl:mo(),protocol:U(Ir),auth:sc}),wo=p({type:S("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U(br),sourceId:a(),sourceName:a()}),uc=Me("type",[rc,ko,Oo,wo]),cc=p({displayName:a(),description:h(a()),type:U(Tr)}),Ro=p({type:S("MARKDOWN"),markdown:a()}),Be={type:S("TOOL_CALL"),input:Z(w(a(),O())),output:h(O()),toolName:a(),status:U(Er),toolCallId:a(),startTime:a(),endTime:h(a())},Jb=p(Be),No=Me("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()})]),pc=D([Ro,No]);var $r=(r=>(r.IMAGE="image",r.TEXT="text",r))($r||{}),_e=p({apiKey:a()}),lc=_e,dc=p({apiKey:a(),apiKeyHash:a()}),mc=_e,fc=_e,gc=_e,yc=_e,hc=_e,vc=_e,xc=_e,Do=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),_c=p({}),Pc=p({}),bc=p({}),Ic=p({}),Tc=p({}),Ec=p({}),Co=p({modelId:a(),modelName:a(),modelType:U($r)}),Uo=p({apiKeyHeader:a(),baseUrl:a(),models:N(Co),defaultHeaders:h(w(a(),a()))}),Mo=p({accountId:a(),gatewayId:a(),models:N(Co),vertexProject:h(a()),vertexRegion:h(a())}),jo=p({resourceName:a(),apiVersion:Ee(Te(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Lo=p({region:a().check(ce(1))}),$c=D([lc,gc,yc,hc,vc,fc,mc,dc,Do,xc]),Fo=D([Uo,Mo,jo,Lo,_c,bc,Ic,Tc,Pc,Ec]),Sc=p({id:a(),name:a(),type:U($r)}),Ac=p({id:a(),name:a(),provider:U(gt),config:Fo,enabledForChat:B()}),zc=p({provider:U(gt),config:Fo,auth:$c,platformId:a()});var eI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var kc=p({base64Url:a(),fileName:a(),extension:h(a())}),Oc=p({mimeType:a(),url:a(),fileName:h(a())}),Sr=D([kc,Oc]);var wc=D([p({type:S("file"),value:Sr}),p({type:S("markdown"),value:a(),files:h(N(Sr))})]),Rc=p({sessionId:a(),message:a(),files:h(N(a()))});var Zo=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Zo||{}),Vo=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Vo||{}),Ar=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Ar||{});var Nc=D([p({...se,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),Dc=p({...se,name:a(),folderId:Z(a()),projectId:a(),externalId:a(),status:Pr(Vo),trigger:Pr(Zo)}),Cc=p({...se,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:O(),fieldName:a()}))}),Uc=p({events:N(U(Ar)),webhookUrl:a(),flowId:a()}),Mc=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),jc=p({projectId:a(),limit:h(ot.number()),cursor:h(a()),name:h(a()),externalIds:Mt(a()),folderId:h(a()),folderIds:Mt(a())}),Lc=p({records:N(N(p({fieldId:a(),value:Wo()}))),tableId:a()}),Fc=p({cells:h(N(p({fieldId:a(),value:Wo()}))),tableId:a(),agentUpdate:h(B())}),Ho=Me("operator",[Oe("eq"),Oe("neq"),Oe("gt"),Oe("gte"),Oe("lt"),Oe("lte"),Oe("co"),Bo("exists"),Bo("not_exists")]),Bc=p({tableId:a(),limit:h(ot.number()),cursor:h(a()),filters:Mt(Ho)});function Wo(){return Ee(Te(e=>e==null?e:String(e)),nt(a()))}o(Wo,"coerceToString");function Oe(e){return p({fieldId:a(),operator:S(e),value:a()})}o(Oe,"valueFilter");function Bo(e){return p({fieldId:a(),operator:S(e)})}o(Bo,"existenceFilter");var Zc=p({status:h(Q()),body:h(O()),headers:h(w(a(),a()))}),Vc=p({...se,deleted:Z($e),ownerId:a(),displayName:a(),platformId:a(),externalId:Z(a())});var Go=p({name:a(),description:h(a()),type:a(),required:B()}),Hc=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(Go),returnsResponse:B()})});var qo="^[0-9]+\\.[0-9]+\\.[0-9]+$",xI=new RegExp(qo),Gc="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_I=a().check(Ie(new RegExp(qo))),PI=a().check(Ie(new RegExp(Gc))),qc=p({packageType:S("ARCHIVE"),pieceType:U(je),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),Ko=p({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),Jo=p({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),bI=D([Ko,Jo]),II=D([qc,Ko,Jo]),Xo=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(Xo||{}),Kc=p({type:U(Xo),cronExpression:a(),timezone:a()}),TI=p({...se,type:U(ze),projectId:a(),flowId:a(),triggerName:a(),schedule:Z(Kc),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:Z(a()),simulate:B()}),Yo=(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))(Yo||{}),Qo=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Qo||{}),ei=(r=>(r.S3="S3",r.DB="DB",r))(ei||{}),EI=p({...se,projectId:Z(a()),platformId:Z(a()),type:U(Yo),compression:U(Qo),data:h(O()),location:U(ei),size:Z(Q()),fileName:Z(a()),s3Key:Z(a()),metadata:Z(w(a(),a()))}),ti=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(ti||{}),ri=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ri||{}),$I=p({id:a(),email:a(),firstName:a(),status:U(ri),externalId:Z(a()),platformId:Z(a()),platformRole:U(ti),lastName:a(),created:$e,updated:$e,lastActiveDate:Z($e),imageUrl:Z(a())});var zr=p({...F.shape,...C(w(a(),O()),"OBJECT").shape});var ai=p({...F.shape,...C(a(),"COLOR").shape});var kr=D([ne,ge,Dt,he,oe,ye,hr,it,vr,ve,ut,zr,ct,st,at,ai]),$={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 de=p({displayName:a(),description:h(a())});var si=p({username:a(),password:a()}),Or=p({...de.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(si,"BASIC_AUTH").shape});var Qc=w(a(),D([ne,ge,ve,he,oe])),wr=p({...de.shape,props:Qc,...C(O(),"CUSTOM_AUTH").shape});var we=p({...de.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var ep=w(a(),D([ne,ge,we,ve,he,oe,ye,Dt])),ui=p({...de.shape,props:ep,...C(O(),"OIDC").shape});var Rr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Rr||{}),ci=D([ne,we,oe]),pi=w(a(),ci),tp=p({props:h(w(a(),ci)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([S("none"),S("consent"),S("login"),S("omit")])),pkce:h(B()),pkceMethod:h(D([S("plain"),S("S256")])),authorizationMethod:h(U(Rr)),grantType:h(D([U(lt),S(xr)])),extra:h(w(a(),a()))}),li=p({access_token:a(),props:h(pi),data:w(a(),rt())}),Nr=p({...de.shape,...tp.shape,...C(li,"OAUTH2").shape});var Ze=D([Or,wr,ui,Nr,we]),yt="Connection",Lt={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 oE={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 rp=p({...F.shape,...C(O(),"CUSTOM").shape,code:a()});var np=D([kr,Ze]),Dr=w(a(),np),TE=w(a(),kr);var di=D([p({strategy:S("CRON"),cronExpression:a()}),p({strategy:S("NONE")})]);var mi="2",Ft="0.82.0";var Cr=class{constructor(t,r,n,i,u,c,d,g,y=Ft,_,b=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=g;this.minimumSupportedRelease=y;this.maximumSupportedRelease=_;this.description=b;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:mi}),"getContextInfo");(!op(y)||ip(y,Ft))&&(this.minimumSupportedRelease=Ft),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}},fi=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 Cr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function op(e){return/^\d+\.\d+\.\d+$/.test(e)}o(op,"isValidSimpleSemver");function ip(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(ip,"isSemverLessThan");var ap=h(w(a(),w(a(),a()))),gi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Ze,N(Ze)])),version:a(),categories:h(N(U(Le))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),i18n:ap}),sp=U(["human","ai","both"]),yi=p({description:h(a()),idempotent:h(B())}),hi=p({name:a(),displayName:a(),description:a(),props:Dr,requireAuth:B(),errorHandlingOptions:h(yr),outputSchema:h(Rt()),audience:h(sp),aiMetadata:h(yi)}),vi=p({name:a(),displayName:a(),description:a(),props:Dr,errorHandlingOptions:h(yr),type:U(ze),sampleData:O(),handshakeConfiguration:h(Rt()),renewConfiguration:h(di),testStrategy:U(mt),outputSchema:h(Rt()),aiMetadata:h(yi)}),up=p({...gi.shape,actions:w(a(),hi),triggers:w(a(),vi)}),cp=p({...gi.shape,actions:Q(),triggers:Q(),suggestedActions:h(N(vi)),suggestedTriggers:h(N(hi))}),xi=p({projectUsage:Q(),tags:h(N(a())),pieceType:U(je),packageType:U(pt),platformId:h(a()),archiveId:h(a())}),T$=p({...up.shape,...xi.shape}),E$=p({...cp.shape,...xi.shape}),$$=p({name:a(),version:a()});var pp=Ne(require("path")),lp=Ne(require("fs/promises"));var Bt=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 Ur,r=new Mr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Ur=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Mr=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 Ve=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 Vt=class extends Bt{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,Y]of Object.entries(c))i.append(M,Y);let d=i.toString(),g=d?`${n}?${d}`:n,y=t.responseType??"json",_=t.followRedirects??!0,b=t.retries??0,{body:x,extraHeaders:s,isStream:l}=dp(t.body,u),f=fp({...u,...s}),m=await mp(async()=>{let M=new AbortController,Y=t.timeout&&t.timeout>0?setTimeout(()=>M.abort(),t.timeout):void 0;try{let re={method:t.method.toString(),headers:f,body:x,redirect:_?"follow":"manual",signal:M.signal};return l&&(re.duplex="half"),r?.dispatcher!==void 0&&(re.dispatcher=r.dispatcher),await fetch(g,re)}finally{Y!==void 0&&clearTimeout(Y)}},b),v=_?300:400;if(m.status<200||m.status>=v){let M=await _i(m,y),Y=new Ve(t.body,{status:m.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Y),Y}let P=await _i(m,y);return{status:m.status,headers:gp(m.headers),body:P}}};function dp(e,t){return hp(e)?{body:void 0,extraHeaders:{},isStream:!1}:yp(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(dp,"serializeBody");async function _i(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(_i,"parseResponseBody");async function mp(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Pi(n);continue}return i}catch(i){if(r=i,n<t){await Pi(n);continue}throw i}throw r}o(mp,"sendWithRetries");function Pi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Pi,"backoff");function fp(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(fp,"normalizeHeaders");function gp(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(gp,"toHttpHeaders");function yp(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(yp,"isNodeFormData");function hp(e){return e==null}o(hp,"isNil");var J=new Vt;var me=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(me||{});var od=Ne(require("fs")),Ss=Ne($s());var id={"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 ad(e){let t=e.split(";")[0].trim().toLowerCase();return id[t]??""}o(ad,"contentTypeToExtension");var sd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),ud=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 As({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:g="headers"}){return ae({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:y})=>({url:$.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${ud(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:$.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(me).map(y=>({label:y,value:y}))},...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:y})=>{if(!y)return{};let _=y,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 y=>{let{method:_,url:b,headers:x,queryParams:s,body:l,body_type:f,failsafe:m,timeout:v,response_is_binary:P,followRedirects:M}=y.propsValue;Ut(_,"Method"),Ut(b,"URL");let Y=xe(r)?{}:await r(y.auth,y.propsValue),re=b.url,Ae=re.startsWith("http://")||re.startsWith("https://")?re:sd({baseUrl:t(y.auth),relativePath:re}),ue={method:_,url:Ae,headers:{...x??{},...g==="headers"||!xe(g)?Y:{}},queryParams:{...g==="queryParams"?Y:{},...s??{}},timeout:v?v*1e3:0,followRedirects:M};if(P&&(ue.responseType="arraybuffer"),l)if(f&&f!=="none"){let ie=l.data;if(f==="form_data"){let Us=ie,_t=new Ss.default;for(let{fieldName:an,fieldType:sn,textFieldValue:un,fileFieldValue:er}of Us)sn==="text"&&!ft(un)?_t.append(an,un):sn==="file"&&!ft(er)&&_t.append(an,er.data,{filename:er?.filename});ue.body=_t,ue.headers={...ue.headers,..._t.getHeaders()}}else ue.body=ie}else f||(ue.body=l);try{let ie=await J.sendRequest(ue);return await cd(y.files,ie.body,ie.status,ie.headers,P)}catch(ie){if(m)return ie.errorMessage();throw ie}},"run")})}o(As,"createCustomApiCallAction");var cd=o(async(e,t,r,n,i)=>{let u;if(i&&pd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=ad(c??"")||"txt",g;t instanceof ArrayBuffer?g=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?g=t:g=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:g})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),pd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var ld=`
|
|
4
|
+
Follow these steps to get your Alai API Key:
|
|
5
|
+
|
|
6
|
+
1. Go to [**https://getalai.com/api**](https://getalai.com/api) and sign up or log in.
|
|
7
|
+
2. Navigate to the **API Keys** section.
|
|
8
|
+
3. Click **Create API Key** and give it a name (e.g., "Activepieces").
|
|
9
|
+
4. Copy the key and paste it below.
|
|
10
|
+
`,ee=Lt.CustomAuth({description:ld,required:!0,props:{apiKey:Lt.SecretText({displayName:"API Key",description:"Paste your API key here.",required:!0})},async validate(e){let t=e.auth.apiKey;try{return await J.sendRequest({method:"GET",url:"https://slides-api.getalai.com/api/v1/ping",headers:{Authorization:`Bearer ${t}`}}),{valid:!0}}catch(r){return r instanceof Ve&&r.response.status===401?{valid:!1,error:"Invalid API Key"}:{valid:!1,error:"Failed to connect to Alai API"}}}});var zs=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),ks=ae({auth:ee,name:"generatePresentation",displayName:"Generate Presentation",description:"Create a new AI-generated presentation from text.",audience:"both",aiMetadata:{description:"Generate a brand-new presentation from input text via the Alai AI API, with optional controls for tone, slide count, text density, theme, and AI images. Use this to turn raw text into slides. By default it returns immediately with a generation_id (poll Get Generation for status); set Wait for Completion to block until the deck finishes (up to Max Wait Time). Not idempotent: each call starts a new generation.",idempotent:!1},props:{inputText:$.LongText({displayName:"Input Text",description:"The text content to generate a presentation from.",required:!0}),additionalInstructions:$.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the presentation should be generated.",required:!1}),exportFormats:$.StaticMultiSelectDropdown({displayName:"Export Formats",description:"Formats to export the presentation in after generation.",required:!1,options:{options:[{label:"Link",value:"link"},{label:"PDF",value:"pdf"},{label:"PowerPoint (PPTX)",value:"ppt"}]}}),title:$.ShortText({displayName:"Title",description:"A title for the presentation. If not provided, one will be generated.",required:!1}),themeId:$.ShortText({displayName:"Theme ID",description:"The ID of the presentation theme to use. If not provided, a default theme will be applied.",required:!1}),slideRange:$.ShortText({displayName:"Slide Range",description:"Target slide count: auto, 1, 2-5, 6-10, 11-15, 16-20, 21-25, 26-50.",required:!1}),tone:$.StaticDropdown({displayName:"Tone",description:"The tone of voice for the presentation content.",required:!1,options:{options:[{label:"Default",value:"DEFAULT"},{label:"Professional",value:"PROFESSIONAL"},{label:"Casual",value:"CASUAL"},{label:"Technical",value:"TECHNICAL"},{label:"Educational",value:"EDUCATIONAL"},{label:"Inspirational",value:"INSPIRATIONAL"},{label:"Narrative",value:"NARRATIVE"},{label:"Persuasive",value:"PERSUASIVE"},{label:"Authoritative",value:"AUTHORITATIVE"},{label:"Empathetic",value:"EMPATHETIC"}]}}),contentMode:$.StaticDropdown({displayName:"Content Mode",description:"How the input text should be handled.",required:!1,options:{options:[{label:"Preserve",value:"PRESERVE"},{label:"Condense",value:"CONDENSE"},{label:"Enhance",value:"ENHANCE"},{label:"Custom",value:"CUSTOM"}]}}),amountMode:$.StaticDropdown({displayName:"Text Density",description:"The amount of text to include per slide.",required:!1,options:{options:[{label:"Minimal",value:"MINIMAL"},{label:"Essential",value:"ESSENTIAL"},{label:"Balanced",value:"BALANCED"},{label:"Detailed",value:"DETAILED"}]}}),includeAiImages:$.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the presentation.",required:!1,defaultValue:!0}),imageStyle:$.StaticDropdown({displayName:"Image Style",description:"The style for AI-generated images.",required:!1,options:{options:[{label:"Auto",value:"auto"},{label:"Realistic",value:"realistic"},{label:"Artistic",value:"artistic"},{label:"Cartoon",value:"cartoon"},{label:"3D",value:"three_d"}]}}),waitForCompletion:$.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:$.Number({displayName:"Max Wait Time (seconds)",description:"Maximum time to wait for completion (default 300 seconds / 5 minutes).",required:!1,defaultValue:300})},async run(e){let{inputText:t,additionalInstructions:r,exportFormats:n,title:i,themeId:u,slideRange:c,tone:d,contentMode:g,amountMode:y,includeAiImages:_,imageStyle:b,waitForCompletion:x,maxWaitTime:s}=e.propsValue,l={input_text:t};r&&(l.additional_instructions=r),n&&n.length>0?l.export_formats=n:l.export_formats=["link"];let f={};i&&(f.title=i),u&&(f.theme_id=u),c&&(f.slide_range=c),Object.keys(f).length>0&&(l.presentation_options=f);let m={};d&&(m.tone=d),g&&(m.content_mode=g),y&&(m.amount_mode=y),Object.keys(m).length>0&&(l.text_options=m);let v={};_!=null&&(v.include_ai_images=_),b&&(v.style=b),Object.keys(v).length>0&&(l.image_options=v);let P=await J.sendRequest({method:"POST",url:"https://slides-api.getalai.com/api/v1/generations",headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:l}),M=P.body?.generation_id;if(!M)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(P.body)}`);if(!x)return P.body;await zs(1e3);let Y=(s||300)*1e3,re=Date.now(),Ae=5e3;for(;Date.now()-re<Y;){let ue=await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${M}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),ie=ue.body?.status;if(ie==="completed")return ue.body;if(ie==="failed")throw new Error(`Generation failed: ${ue.body?.error||"Unknown error"}`);await zs(Ae)}throw new Error(`Generation timed out after ${s||300} seconds`)}});var Os=ae({auth:ee,name:"getGeneration",displayName:"Get Generation",description:"Fetch the status and result of a generation job.",audience:"both",aiMetadata:{description:"Look up the current status and result of an Alai generation job by its generation_id (returned by Generate Presentation or Export Presentation). Use this to poll for completion or retrieve the finished output and export links. Read-only and idempotent. Requires a valid generation_id.",idempotent:!0},props:{generationId:$.ShortText({displayName:"Generation ID",description:'The ID of the generation job (from the "Generate Presentation" action).',required:!0})},async run(e){let{generationId:t}=e.propsValue;return(await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${t}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,Accept:"application/json"}})).body}});var ws=o(e=>new Promise(t=>setTimeout(t,e)),"sleep"),Rs=ae({auth:ee,name:"exportPresentation",displayName:"Export Presentation",description:"Export a presentation in the specified formats.",audience:"both",aiMetadata:{description:"Export an existing Alai presentation into one or more formats (link, PDF, and/or PPTX) by its presentation ID. Use this to render a deck for download or sharing. By default it returns immediately with a generation_id (poll Get Generation for status); set Wait for Completion to block until the export finishes (up to Max Wait Time). Not idempotent: each call kicks off a new export job. Requires the presentation ID and at least one export format.",idempotent:!1},props:{presentationId:$.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to export.",required:!0}),exportFormats:$.StaticMultiSelectDropdown({displayName:"Export Formats",description:"Formats to export the presentation in.",required:!0,options:{options:[{label:"Link",value:"link"},{label:"PDF",value:"pdf"},{label:"PowerPoint (PPTX)",value:"ppt"}]}}),waitForCompletion:$.Checkbox({displayName:"Wait for Completion",description:"Wait for the presentation generation to complete before returning.",required:!1,defaultValue:!1}),maxWaitTime:$.Number({displayName:"Max Wait Time (seconds)",description:"Maximum time to wait for completion (default 300 seconds / 5 minutes).",required:!1,defaultValue:300})},async run(e){let{presentationId:t,exportFormats:r,waitForCompletion:n,maxWaitTime:i}=e.propsValue,u=await J.sendRequest({method:"POST",url:`https://slides-api.getalai.com/api/v1/presentations/${t}/exports`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:{export_formats:r}}),c=u.body?.generation_id;if(!c)throw new Error(`Failed to get generation_id from response: ${JSON.stringify(u.body)}`);if(!n)return u.body;await ws(1e3);let d=(i||300)*1e3,g=Date.now(),y=5e3;for(;Date.now()-g<d;){let _=await J.sendRequest({method:"GET",url:`https://slides-api.getalai.com/api/v1/generations/${c}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}}),b=_.body?.status;if(b==="completed")return _.body;if(b==="failed")throw new Error(`Generation failed: ${_.body?.error||"Unknown error"}`);await ws(y)}throw new Error(`Generation timed out after ${i||300} seconds`)}});var Ns=$.Dropdown({auth:ee,displayName:"Presentation",description:"Select a presentation",required:!0,refreshers:[],options:o(async({auth:e})=>{if(!e)return{options:[]};let r=(await J.sendRequest({method:"GET",url:"https://slides-api.getalai.com/api/v1/presentations",headers:{Authorization:`Bearer ${e.props.apiKey}`,Accept:"application/json"}})).body?.presentations||[];return{disabled:r.length===0,options:r.map(n=>({label:n.title,value:n.presentation_id}))}},"options")});var Ds=ae({auth:ee,name:"addSlide",displayName:"Add Slide",description:"Add a new slide to an existing presentation.",audience:"both",aiMetadata:{description:'Generate and insert a new AI-authored slide into an existing Alai presentation, given the presentation ID and the slide content/topic; optional slide order controls where it lands (a numeric index, or "end" to append). Use this to extend a deck after it has been generated. Not idempotent: each call appends another slide.',idempotent:!1},props:{presentationId:Ns,slide_context:$.LongText({displayName:"Slide Context",description:"The content or topic for the slide to be generated.",required:!0}),additionalInstructions:$.LongText({displayName:"Additional Instructions",description:"Extra instructions for how the slide should be generated.",required:!1}),slide_order:$.ShortText({displayName:"Slide Order",description:'The position to insert the new slide (e.g., "0" for the first slide, "end" to add at the end).',required:!1}),includeAiImages:$.Checkbox({displayName:"Include AI Images",description:"Whether to include AI-generated images in the slide.",required:!1,defaultValue:!0}),imageStyle:$.ShortText({displayName:"Image Style",description:"The style for AI-generated images.",required:!1})},async run(e){let{presentationId:t,slide_context:r,additionalInstructions:n,slide_order:i,includeAiImages:u,imageStyle:c}=e.propsValue,d={};n&&(d.additional_instructions=n),i&&(d.slide_order=isNaN(Number(i))?i:Number(i)),u?d.num_image_variants=c?2:1:d.num_image_variants=0;let g={slide_context:r,options:d,export_formats:["link"]};return(await J.sendRequest({method:"POST",url:`https://slides-api.getalai.com/api/v1/presentations/${t}/slides`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`,"Content-Type":"application/json"},body:g})).body}});var Cs=ae({auth:ee,name:"deletePresentation",displayName:"Delete Presentation",description:"Delete a presentation by its ID.",audience:"both",aiMetadata:{description:"Permanently delete an Alai presentation by its ID. Use this to remove a deck the user no longer needs. Destructive but idempotent: once deleted, repeating the call with the same ID leaves the same end state. Requires the presentation ID.",idempotent:!0},props:{presentationId:$.ShortText({displayName:"Presentation ID",description:"The ID of the presentation to delete.",required:!0})},async run(e){let{presentationId:t}=e.propsValue;return(await J.sendRequest({method:"DELETE",url:`https://slides-api.getalai.com/api/v1/presentations/${t}`,headers:{Authorization:`Bearer ${e.auth.props.apiKey}`}})).body}});var dd=fi({displayName:"Alai",auth:ee,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/alai.png",authors:["getalai","sanket-a11y"],description:"AI-powered presentation generation API. Create, export, and manage professional presentations from text.",categories:["CONTENT_AND_FILES","ARTIFICIAL_INTELLIGENCE"],actions:[ks,Os,Rs,Ds,Cs,As({auth:ee,baseUrl:o(()=>"https://slides-api.getalai.com/api/v1","baseUrl"),authMapping:o(async e=>({Authorization:`Bearer ${e.props.apiKey}`}),"authMapping")})],triggers:[]});0&&(module.exports={alai});
|
|
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/README.md
DELETED
package/src/index.d.ts
DELETED
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/alai/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,4CAA6C;AAC7C,+EAA2E;AAC3E,iEAA6D;AAC7D,2EAAuE;AACvE,uDAAmD;AACnD,2EAAuE;AACvE,+DAAwE;AAE3D,QAAA,IAAI,GAAG,IAAA,8BAAW,EAAC;IAC9B,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,eAAQ;IACd,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,8CAA8C;IACvD,OAAO,EAAE,CAAC,SAAS,EAAC,aAAa,CAAC;IAClC,WAAW,EACT,0GAA0G;IAC5G,UAAU,EAAE;QACV,sBAAa,CAAC,iBAAiB;QAC/B,sBAAa,CAAC,uBAAuB;KACtC;IACD,OAAO,EAAE;QACP,4CAAoB;QACpB,8BAAa;QACb,wCAAkB;QAClB,oBAAQ;QACR,wCAAkB;QAClB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,eAAQ;YACd,OAAO,EAAE,GAAG,EAAE,CAAC,uCAAuC;YACtD,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,aAAa,EAAE,UAAU,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;iBAC7C,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const addSlide: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
presentationId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
6
|
-
}>>;
|
|
7
|
-
slide_context: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
8
|
-
additionalInstructions: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
9
|
-
slide_order: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
-
includeAiImages: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
11
|
-
imageStyle: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
-
}>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addSlide = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const props_1 = require("../common/props");
|
|
9
|
-
exports.addSlide = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.alaiAuth,
|
|
11
|
-
name: 'addSlide',
|
|
12
|
-
displayName: 'Add Slide',
|
|
13
|
-
description: 'Add a new slide to an existing presentation.',
|
|
14
|
-
props: {
|
|
15
|
-
presentationId: props_1.presentationId,
|
|
16
|
-
slide_context: pieces_framework_1.Property.LongText({
|
|
17
|
-
displayName: 'Slide Context',
|
|
18
|
-
description: 'The content or topic for the slide to be generated.',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
additionalInstructions: pieces_framework_1.Property.LongText({
|
|
22
|
-
displayName: 'Additional Instructions',
|
|
23
|
-
description: 'Extra instructions for how the slide should be generated.',
|
|
24
|
-
required: false,
|
|
25
|
-
}),
|
|
26
|
-
slide_order: pieces_framework_1.Property.ShortText({
|
|
27
|
-
displayName: 'Slide Order',
|
|
28
|
-
description: 'The position to insert the new slide (e.g., "0" for the first slide, "end" to add at the end).',
|
|
29
|
-
required: false,
|
|
30
|
-
}),
|
|
31
|
-
includeAiImages: pieces_framework_1.Property.Checkbox({
|
|
32
|
-
displayName: 'Include AI Images',
|
|
33
|
-
description: 'Whether to include AI-generated images in the slide.',
|
|
34
|
-
required: false,
|
|
35
|
-
defaultValue: true,
|
|
36
|
-
}),
|
|
37
|
-
imageStyle: pieces_framework_1.Property.ShortText({
|
|
38
|
-
displayName: 'Image Style',
|
|
39
|
-
description: 'The style for AI-generated images.',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
run(context) {
|
|
44
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const { presentationId, slide_context, additionalInstructions, slide_order, includeAiImages, imageStyle } = context.propsValue;
|
|
46
|
-
const options = {};
|
|
47
|
-
if (additionalInstructions) {
|
|
48
|
-
options['additional_instructions'] = additionalInstructions;
|
|
49
|
-
}
|
|
50
|
-
if (slide_order) {
|
|
51
|
-
options['slide_order'] = isNaN(Number(slide_order)) ? slide_order : Number(slide_order);
|
|
52
|
-
}
|
|
53
|
-
if (includeAiImages) {
|
|
54
|
-
options['num_image_variants'] = imageStyle ? 2 : 1;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
options['num_image_variants'] = 0;
|
|
58
|
-
}
|
|
59
|
-
const body = {
|
|
60
|
-
slide_context: slide_context,
|
|
61
|
-
options,
|
|
62
|
-
export_formats: ['link'],
|
|
63
|
-
};
|
|
64
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
65
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
66
|
-
url: `https://slides-api.getalai.com/api/v1/presentations/${presentationId}/slides`,
|
|
67
|
-
headers: {
|
|
68
|
-
Authorization: `Bearer ${context.auth.props.apiKey}`,
|
|
69
|
-
'Content-Type': 'application/json',
|
|
70
|
-
},
|
|
71
|
-
body,
|
|
72
|
-
});
|
|
73
|
-
return response.body;
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
//# sourceMappingURL=add-slide.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-slide.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/alai/src/lib/actions/add-slide.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,yCAA0C;AAC1C,2CAAiD;AAEpC,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,8CAA8C;IAC3D,KAAK,EAAE;QACL,cAAc,EAAE,sBAAc;QAC9B,aAAa,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC/B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,sBAAsB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACxC,WAAW,EAAE,yBAAyB;YACtC,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,gGAAgG;YAC7G,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACjC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,sBAAsB,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,GACvG,OAAO,CAAC,UAAU,CAAC;YAErB,MAAM,OAAO,GAA4B,EAAE,CAAC;YAC5C,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,OAAO,CAAC,yBAAyB,CAAC,GAAG,sBAAsB,CAAC;YAC9D,CAAC;YACD,IAAI,WAAW,EAAE,CAAC;gBAChB,OAAO,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC1F,CAAC;YACD,IAAI,eAAe,EAAE,CAAC;gBACpB,OAAO,CAAC,oBAAoB,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;YACpC,CAAC;YAED,MAAM,IAAI,GAA4B;gBACpC,aAAa,EAAE,aAAa;gBAC5B,OAAO;gBACP,cAAc,EAAE,CAAC,MAAM,CAAC;aACzB,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,uDAAuD,cAAc,SAAS;gBACnF,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;oBACpD,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const deletePresentation: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
presentationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deletePresentation = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
exports.deletePresentation = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.alaiAuth,
|
|
10
|
-
name: 'deletePresentation',
|
|
11
|
-
displayName: 'Delete Presentation',
|
|
12
|
-
description: 'Delete a presentation by its ID.',
|
|
13
|
-
props: {
|
|
14
|
-
presentationId: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Presentation ID',
|
|
16
|
-
description: 'The ID of the presentation to delete.',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
},
|
|
20
|
-
run(context) {
|
|
21
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const { presentationId } = context.propsValue;
|
|
23
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
24
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
25
|
-
url: `https://slides-api.getalai.com/api/v1/presentations/${presentationId}`,
|
|
26
|
-
headers: {
|
|
27
|
-
Authorization: `Bearer ${context.auth.props.apiKey}`,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
return response.body;
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=delete-presentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-presentation.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/alai/src/lib/actions/delete-presentation.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,yCAA0C;AAE7B,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,kCAAkC;IAC/C,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC9C,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,uDAAuD,cAAc,EAAE;gBAC5E,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;iBACrD;aACF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const exportPresentation: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>, {
|
|
4
|
-
presentationId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
exportFormats: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, true>;
|
|
6
|
-
waitForCompletion: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
-
maxWaitTime: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
-
}>;
|