@activepieces/piece-mistral-ai 0.2.3 → 0.2.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 -13
- package/src/index.js +15 -37
- package/src/index.d.ts +0 -7
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-chat-completion.d.ts +0 -20
- package/src/lib/actions/create-chat-completion.d.ts.map +0 -1
- package/src/lib/actions/create-chat-completion.js +0 -85
- package/src/lib/actions/create-chat-completion.js.map +0 -1
- package/src/lib/actions/create-embeddings.d.ts +0 -10
- package/src/lib/actions/create-embeddings.d.ts.map +0 -1
- package/src/lib/actions/create-embeddings.js +0 -76
- package/src/lib/actions/create-embeddings.js.map +0 -1
- package/src/lib/actions/list-models.d.ts +0 -7
- package/src/lib/actions/list-models.d.ts.map +0 -1
- package/src/lib/actions/list-models.js +0 -34
- package/src/lib/actions/list-models.js.map +0 -1
- package/src/lib/actions/run-ocr.d.ts +0 -16
- package/src/lib/actions/run-ocr.d.ts.map +0 -1
- package/src/lib/actions/run-ocr.js +0 -203
- package/src/lib/actions/run-ocr.js.map +0 -1
- package/src/lib/actions/upload-file.d.ts +0 -10
- package/src/lib/actions/upload-file.d.ts.map +0 -1
- package/src/lib/actions/upload-file.js +0 -81
- package/src/lib/actions/upload-file.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -7
- package/src/lib/common/auth.d.ts.map +0 -1
- package/src/lib/common/auth.js +0 -100
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -8
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -67
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/common/request.d.ts +0 -13
- package/src/lib/common/request.d.ts.map +0 -1
- package/src/lib/common/request.js +0 -30
- package/src/lib/common/request.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-mistral-ai",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@activepieces/pieces-common": "0.12.4",
|
|
12
|
-
"@activepieces/pieces-framework": "0.30.0",
|
|
13
|
-
"@activepieces/shared": "0.92.0",
|
|
14
|
-
"form-data": "4.0.4",
|
|
15
|
-
"tslib": "2.6.2"
|
|
16
|
-
}
|
|
5
|
+
"dependencies": {},
|
|
6
|
+
"files": [
|
|
7
|
+
"src/index.js",
|
|
8
|
+
"package.json",
|
|
9
|
+
"src/i18n"
|
|
10
|
+
]
|
|
17
11
|
}
|
package/src/index.js
CHANGED
|
@@ -1,37 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mistralAi = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
displayName: "Mistral AI",
|
|
17
|
-
description: "Mistral AI provides state-of-the-art open-weight and hosted language models for text generation, embeddings, and reasoning tasks.",
|
|
18
|
-
auth: auth_1.mistralAuth,
|
|
19
|
-
minimumSupportedRelease: "0.36.1",
|
|
20
|
-
logoUrl: "https://cdn.activepieces.com/pieces/mistral-ai.png",
|
|
21
|
-
authors: ["sparkybug"],
|
|
22
|
-
categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
|
|
23
|
-
actions: [
|
|
24
|
-
create_chat_completion_1.createChatCompletion,
|
|
25
|
-
create_embeddings_1.createEmbeddings,
|
|
26
|
-
upload_file_1.uploadFile,
|
|
27
|
-
run_ocr_1.runOcr,
|
|
28
|
-
list_models_1.listModels,
|
|
29
|
-
(0, pieces_common_1.createCustomApiCallAction)({
|
|
30
|
-
auth: auth_1.mistralAuth,
|
|
31
|
-
baseUrl: (auth) => (auth ? request_1.mistralRequest.getConfig(auth).baseUrl : 'https://api.mistral.ai/v1'),
|
|
32
|
-
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return request_1.mistralRequest.getConfig(auth).headers; }),
|
|
33
|
-
}),
|
|
34
|
-
],
|
|
35
|
-
triggers: [],
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var Js=Object.create;var Ye=Object.defineProperty;var Xs=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Qs=Object.getPrototypeOf,eu=Object.prototype.hasOwnProperty;var o=(e,t)=>Ye(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},gn=(e,t)=>{for(var r in t)Ye(e,r,{get:t[r],enumerable:!0})},yn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ys(t))!eu.call(e,i)&&i!==r&&Ye(e,i,{get:()=>t[i],enumerable:!(n=Xs(t,i))||n.enumerable});return e};var Re=(e,t,r)=>(r=e!=null?Js(Qs(e)):{},yn(t||!e||!e.__esModule?Ye(r,"default",{value:e,enumerable:!0}):r,e)),tu=e=>yn(Ye({},"__esModule",{value:!0}),e);var Lo=E((jo,Zt)=>{(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]+::?)+",l={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,d){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(l.zoneIndex)||[])[0],P,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>d)return null;for(j=d-g,P=":";j--;)P+="0:";return s=s.replace("::",P),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let re=s.split(":"),ue=[];for(let Xe=0;Xe<re.length;Xe++)ue.push(parseInt(re[Xe],16));return ue})(),{parts:d,zoneId:v}}o(f,"expandIPv6");function y(s,d,g,m){if(s.length!==d.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,P;for(;m>0;){if(P=g-m,P<0&&(P=0),s[v]>>P!==d[v]>>P)return!1;m-=g,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 I(s,d){for(;s.length<d;)s=`0${s}`;return s}o(I,"padPart");let x={};x.IPv4=(function(){function s(d){if(d.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<d.length;g++)if(m=d[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=d}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(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return y(this.octets,d.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,P,j;for(v=3;v>=0;v-=1)if(P=this.octets[v],P in m){if(j=m[P],g&&j!==0)return null;j!==8&&(g=!0),d+=j}else return null;return 32-d},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 d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<4;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.isIPv4=function(s){return this.parser(s)!==null},x.IPv4.isValid=function(s){try{return new this(this.parser(s)),!0}catch{return!1}},x.IPv4.isValidCIDR=function(s){try{return this.parseCIDR(s),!0}catch{return!1}},x.IPv4.isValidFourPartDecimal=function(s){return!!(x.IPv4.isValid(s)&&s.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},x.IPv4.isValidCIDRFourPartDecimal=function(s){let d=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!d?!1:x.IPv4.isValidFourPartDecimal(d[1])},x.IPv4.networkAddressFromCIDR=function(s){let d,g,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},x.IPv4.parse=function(s){let d=this.parser(s);if(d===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(d)},x.IPv4.parseCIDR=function(s){let d;if(d=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(d[2]);if(g>=0&&g<=32){let m=[this.parse(d[1]),g];return Object.defineProperty(m,"toString",{value:o(function(){return this.join("/")},"value")}),m}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},x.IPv4.parser=function(s){let d,g,m;if(d=s.match(r.fourOctet))return(function(){let v=d.slice(1,6),P=[];for(let j=0;j<v.length;j++)g=v[j],P.push(_(g));return P})();if(d=s.match(r.longValue)){if(m=_(d[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(d=s.match(r.twoOctet))?(function(){let v=d.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})():(d=s.match(r.threeOctet))?(function(){let v=d.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 d=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<4&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.IPv6=(function(){function s(d,g){let m,v;if(d.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(d[m]<<8|d[m+1]);else if(d.length===8)this.parts=d;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=0;m<this.parts.length;m++)if(v=this.parts[m],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");g&&(this.zoneId=g)}return o(s,"IPv6"),s.prototype.SpecialRanges={unspecified:[new s([0,0,0,0,0,0,0,0]),128],linkLocal:[new s([65152,0,0,0,0,0,0,0]),10],multicast:[new s([65280,0,0,0,0,0,0,0]),8],loopback:[new s([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new s([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new s([0,0,0,0,0,65535,0,0]),96],discard:[new s([256,0,0,0,0,0,0,0]),64],rfc6145:[new s([0,0,0,0,65535,0,0,0]),96],rfc6052:[new s([100,65435,0,0,0,0,0,0]),96],"6to4":[new s([8194,0,0,0,0,0,0,0]),16],teredo:[new s([8193,0,0,0,0,0,0,0]),32],benchmarking:[new s([8193,2,0,0,0,0,0,0]),48],amt:[new s([8193,3,0,0,0,0,0,0]),32],as112v6:[[new s([8193,4,274,0,0,0,0,0]),48],[new s([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new s([8193,16,0,0,0,0,0,0]),28],orchid2:[new s([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new s([8193,48,0,0,0,0,0,0]),28],reserved:[[new s([8193,0,0,0,0,0,0,0]),23],[new s([8193,3512,0,0,0,0,0,0]),32]]},s.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},s.prototype.kind=function(){return"ipv6"},s.prototype.match=function(d,g){let m;if(g===void 0&&(m=d,d=m[0],g=m[1]),d.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return y(this.parts,d.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let d=0,g=!1,m={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,P;for(let j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(P=m[v],g&&P!==0)return null;P!==16&&(g=!0),d+=P}else return null;return 128-d},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let d,g=[],m=this.parts;for(let v=0;v<m.length;v++)d=m[v],g.push(d>>8),g.push(d&255);return g},s.prototype.toFixedLengthString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(I(this.parts[v].toString(16),4));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let d=this.parts.slice(-2),g=d[0],m=d[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let d=(function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push(this.parts[v].toString(16));return m}).call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),d+g},s.prototype.toRFC5952String=function(){let d=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,P;for(;P=d.exec(g);)P[0].length>v&&(m=P.index,v=P[0].length);return v<0?g:`${g.substring(0,m)}::${g.substring(m+v)}`},s.prototype.toString=function(){return this.toRFC5952String()},s})(),x.IPv6.broadcastAddressFromCIDR=function(s){try{let d=this.parseCIDR(s),g=d[0].toByteArray(),m=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],P=0;for(;P<16;)v.push(parseInt(g[P],10)|parseInt(m[P],10)^255),P++;return new this(v)}catch(d){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${d})`)}},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 d=this.parser(s);return new this(d.parts,d.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 d,g,m,v,P;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),P=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(P[g],10)),g++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.IPv6.parse=function(s){let d=this.parser(s);if(d.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(d.parts,d.zoneId)},x.IPv6.parseCIDR=function(s){let d,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(d=parseInt(g[2]),d>=0&&d<=128))return m=[this.parse(g[1]),d],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 d,g,m,v,P,j;if(m=s.match(l.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(l.native.test(s))return f(s,8);if((m=s.match(l.transitional))&&(j=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+j,6),d.parts)){for(P=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<P.length;g++)if(v=P[g],!(0<=v&&v<=255))return null;return d.parts.push(P[0]<<8|P[1]),d.parts.push(P[2]<<8|P[3]),{parts:d.parts,zoneId:d.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 d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)d[g]=255,g++;return m<16&&(d[m]=Math.pow(2,s%8)-1<<8-s%8),new this(d)},x.fromByteArray=function(s){let d=s.length;if(d===4)return new x.IPv4(s);if(d===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 d=this.parse(s);return d.kind()==="ipv6"&&d.isIPv4MappedAddress()?d.toIPv4Address():d},x.subnetMatch=function(s,d,g){let m,v,P,j;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(P=d[v],P[0]&&!(P[0]instanceof Array)&&(P=[P]),m=0;m<P.length;m++)if(j=P[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return g},typeof Zt<"u"&&Zt.exports?Zt.exports=x:e.ipaddr=x})(jo)});var Di=E((lA,Ni)=>{var Ri=require("stream").Stream,Sl=require("util");Ni.exports=le;function le(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(le,"DelayedStream");Sl.inherits(le,Ri);le.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(le.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});le.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};le.prototype.resume=function(){this._released||this.release(),this.source.resume()};le.prototype.pause=function(){this.source.pause()};le.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};le.prototype.pipe=function(){var e=Ri.prototype.pipe.apply(this,arguments);return this.resume(),e};le.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)};le.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 ji=E((dA,Mi)=>{var Al=require("util"),Ui=require("stream").Stream,Ci=Di();Mi.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");Al.inherits(G,Ui);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 Ci)){var r=Ci.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 Ui.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 Fi=E((fA,Li)=>{"use strict";Li.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 Vi=E(te=>{"use strict";var Kt=Fi(),zl=require("path").extname,Bi=/^\s*([^;\s]*)(?:;|\s|$)/,kl=/^text\//i;te.charset=Zi;te.charsets={lookup:Zi};te.contentType=wl;te.extension=Ol;te.extensions=Object.create(null);te.lookup=Rl;te.types=Object.create(null);Nl(te.extensions,te.types);function Zi(e){if(!e||typeof e!="string")return!1;var t=Bi.exec(e),r=t&&Kt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&kl.test(t[1])?"UTF-8":!1}o(Zi,"charset");function wl(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(wl,"contentType");function Ol(e){if(!e||typeof e!="string")return!1;var t=Bi.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Ol,"extension");function Rl(e){if(!e||typeof e!="string")return!1;var t=zl("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(Rl,"lookup");function Nl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Kt).forEach(o(function(i){var u=Kt[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var l=0;l<c.length;l++){var f=c[l];if(t[f]){var y=r.indexOf(Kt[t[f]].source),_=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>_||y===_&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(Nl,"populateMaps")});var qi=E((hA,Hi)=>{Hi.exports=Dl;function Dl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Dl,"defer")});var Vr=E((xA,Wi)=>{var Gi=qi();Wi.exports=Cl;function Cl(e){var t=!1;return Gi(function(){t=!0}),o(function(n,i){t?e(n,i):Gi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Cl,"async")});var Hr=E((PA,Ki)=>{Ki.exports=Ul;function Ul(e){Object.keys(e.jobs).forEach(Ml.bind(e)),e.jobs={}}o(Ul,"abort");function Ml(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(Ml,"clean")});var qr=E((IA,Xi)=>{var Ji=Vr(),jl=Hr();Xi.exports=Ll;function Ll(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Fl(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?jl(r):r.results[i]=c,n(u,r.results))})}o(Ll,"iterate");function Fl(e,t,r,n){var i;return e.length==2?i=e(r,Ji(n)):i=e(r,t,Ji(n)),i}o(Fl,"runJob")});var Gr=E((EA,Yi)=>{Yi.exports=Bl;function Bl(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(Bl,"state")});var Wr=E((SA,Qi)=>{var Zl=Hr(),Vl=Vr();Qi.exports=Hl;function Hl(e){Object.keys(this.jobs).length&&(this.index=this.size,Zl(this),Vl(e)(null,this.results))}o(Hl,"terminator")});var ta=E((zA,ea)=>{var ql=qr(),Gl=Gr(),Wl=Wr();ea.exports=Kl;function Kl(e,t,r){for(var n=Gl(e);n.index<(n.keyedList||e).length;)ql(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 Wl.bind(n,r)}o(Kl,"parallel")});var Kr=E((wA,Jt)=>{var ra=qr(),Jl=Gr(),Xl=Wr();Jt.exports=Yl;Jt.exports.ascending=na;Jt.exports.descending=Ql;function Yl(e,t,r,n){var i=Jl(e,r);return ra(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){ra(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),Xl.bind(i,n)}o(Yl,"serialOrdered");function na(e,t){return e<t?-1:e>t?1:0}o(na,"ascending");function Ql(e,t){return-1*na(e,t)}o(Ql,"descending")});var ia=E((RA,oa)=>{var ep=Kr();oa.exports=tp;function tp(e,t,r){return ep(e,t,null,r)}o(tp,"serial")});var sa=E((DA,aa)=>{aa.exports={parallel:ta(),serial:ia(),serialOrdered:Kr()}});var Jr=E((CA,ua)=>{"use strict";ua.exports=Object});var la=E((UA,ca)=>{"use strict";ca.exports=Error});var da=E((MA,pa)=>{"use strict";pa.exports=EvalError});var fa=E((jA,ma)=>{"use strict";ma.exports=RangeError});var ya=E((LA,ga)=>{"use strict";ga.exports=ReferenceError});var va=E((FA,ha)=>{"use strict";ha.exports=SyntaxError});var Xt=E((BA,xa)=>{"use strict";xa.exports=TypeError});var Pa=E((ZA,_a)=>{"use strict";_a.exports=URIError});var Ia=E((VA,ba)=>{"use strict";ba.exports=Math.abs});var Ea=E((HA,Ta)=>{"use strict";Ta.exports=Math.floor});var Sa=E((qA,$a)=>{"use strict";$a.exports=Math.max});var za=E((GA,Aa)=>{"use strict";Aa.exports=Math.min});var wa=E((WA,ka)=>{"use strict";ka.exports=Math.pow});var Ra=E((KA,Oa)=>{"use strict";Oa.exports=Math.round});var Da=E((JA,Na)=>{"use strict";Na.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Ua=E((YA,Ca)=>{"use strict";var rp=Da();Ca.exports=o(function(t){return rp(t)||t===0?t:t<0?-1:1},"sign")});var ja=E((ez,Ma)=>{"use strict";Ma.exports=Object.getOwnPropertyDescriptor});var Xr=E((tz,La)=>{"use strict";var Yt=ja();if(Yt)try{Yt([],"length")}catch{Yt=null}La.exports=Yt});var Ba=E((rz,Fa)=>{"use strict";var Qt=Object.defineProperty||!1;if(Qt)try{Qt({},"a",{value:1})}catch{Qt=!1}Fa.exports=Qt});var Yr=E((nz,Za)=>{"use strict";Za.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 l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},"hasSymbols")});var qa=E((iz,Ha)=>{"use strict";var Va=typeof Symbol<"u"&&Symbol,np=Yr();Ha.exports=o(function(){return typeof Va!="function"||typeof Symbol!="function"||typeof Va("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:np()},"hasNativeSymbols")});var Qr=E((sz,Ga)=>{"use strict";Ga.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var en=E((uz,Wa)=>{"use strict";var op=Jr();Wa.exports=op.getPrototypeOf||null});var Xa=E((cz,Ja)=>{"use strict";var ip="Function.prototype.bind called on incompatible ",ap=Object.prototype.toString,sp=Math.max,up="[object Function]",Ka=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"),cp=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"),lp=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"||ap.apply(r)!==up)throw new TypeError(ip+r);for(var n=cp(arguments,1),i,u=o(function(){if(this instanceof i){var _=r.apply(this,Ka(n,arguments));return Object(_)===_?_:this}return r.apply(t,Ka(n,arguments))},"binder"),c=sp(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+lp(l,",")+"){ 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 qe=E((pz,Ya)=>{"use strict";var pp=Xa();Ya.exports=Function.prototype.bind||pp});var er=E((dz,Qa)=>{"use strict";Qa.exports=Function.prototype.call});var tn=E((mz,es)=>{"use strict";es.exports=Function.prototype.apply});var rs=E((fz,ts)=>{"use strict";ts.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var os=E((gz,ns)=>{"use strict";var dp=qe(),mp=tn(),fp=er(),gp=rs();ns.exports=gp||dp.call(fp,mp)});var as=E((yz,is)=>{"use strict";var yp=qe(),hp=Xt(),vp=er(),xp=os();is.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new hp("a function is required");return xp(yp,vp,t)},"callBindBasic")});var ds=E((vz,ps)=>{"use strict";var _p=as(),ss=Xr(),cs;try{cs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var rn=!!cs&&ss&&ss(Object.prototype,"__proto__"),ls=Object,us=ls.getPrototypeOf;ps.exports=rn&&typeof rn.get=="function"?_p([rn.get]):typeof us=="function"?o(function(t){return us(t==null?t:ls(t))},"getDunder"):!1});var hs=E((_z,ys)=>{"use strict";var ms=Qr(),fs=en(),gs=ds();ys.exports=ms?o(function(t){return ms(t)},"getProto"):fs?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return fs(t)},"getProto"):gs?o(function(t){return gs(t)},"getProto"):null});var nn=E((bz,vs)=>{"use strict";var Pp=Function.prototype.call,bp=Object.prototype.hasOwnProperty,Ip=qe();vs.exports=Ip.call(Pp,bp)});var Es=E((Iz,Ts)=>{"use strict";var M,Tp=Jr(),Ep=la(),$p=da(),Sp=fa(),Ap=ya(),Je=va(),Ke=Xt(),zp=Pa(),kp=Ia(),wp=Ea(),Op=Sa(),Rp=za(),Np=wa(),Dp=Ra(),Cp=Ua(),bs=Function,on=o(function(e){try{return bs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),xt=Xr(),Up=Ba(),an=o(function(){throw new Ke},"throwTypeError"),Mp=xt?(function(){try{return arguments.callee,an}catch{try{return xt(arguments,"callee").get}catch{return an}}})():an,Ge=qa()(),X=hs(),jp=en(),Lp=Qr(),Is=tn(),_t=er(),We={},Fp=typeof Uint8Array>"u"||!X?M:X(Uint8Array),Me={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":Ge&&X?X([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":We,"%AsyncGenerator%":We,"%AsyncGeneratorFunction%":We,"%AsyncIteratorPrototype%":We,"%Atomics%":typeof Atomics>"u"?M:Atomics,"%BigInt%":typeof BigInt>"u"?M:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?M:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?M:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?M:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ep,"%eval%":eval,"%EvalError%":$p,"%Float16Array%":typeof Float16Array>"u"?M:Float16Array,"%Float32Array%":typeof Float32Array>"u"?M:Float32Array,"%Float64Array%":typeof Float64Array>"u"?M:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?M:FinalizationRegistry,"%Function%":bs,"%GeneratorFunction%":We,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ge&&X?X(X([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ge||!X?M:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Tp,"%Object.getOwnPropertyDescriptor%":xt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Sp,"%ReferenceError%":Ap,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ge||!X?M:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ge&&X?X(""[Symbol.iterator]()):M,"%Symbol%":Ge?Symbol:M,"%SyntaxError%":Je,"%ThrowTypeError%":Mp,"%TypedArray%":Fp,"%TypeError%":Ke,"%Uint8Array%":typeof Uint8Array>"u"?M:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?M:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?M:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?M:Uint32Array,"%URIError%":zp,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":_t,"%Function.prototype.apply%":Is,"%Object.defineProperty%":Up,"%Object.getPrototypeOf%":jp,"%Math.abs%":kp,"%Math.floor%":wp,"%Math.max%":Op,"%Math.min%":Rp,"%Math.pow%":Np,"%Math.round%":Dp,"%Math.sign%":Cp,"%Reflect.getPrototypeOf%":Lp};if(X)try{null.error}catch(e){xs=X(X(e)),Me["%Error.prototype%"]=xs}var xs,Bp=o(function e(t){var r;if(t==="%AsyncFunction%")r=on("async function () {}");else if(t==="%GeneratorFunction%")r=on("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=on("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 Me[t]=r,r},"doEval"),_s={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Pt=qe(),tr=nn(),Zp=Pt.call(_t,Array.prototype.concat),Vp=Pt.call(Is,Array.prototype.splice),Ps=Pt.call(_t,String.prototype.replace),rr=Pt.call(_t,String.prototype.slice),Hp=Pt.call(_t,RegExp.prototype.exec),qp=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gp=/\\(\\)?/g,Wp=o(function(t){var r=rr(t,0,1),n=rr(t,-1);if(r==="%"&&n!=="%")throw new Je("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Je("invalid intrinsic syntax, expected opening `%`");var i=[];return Ps(t,qp,function(u,c,l,f){i[i.length]=l?Ps(f,Gp,"$1"):c||u}),i},"stringToPath"),Kp=o(function(t,r){var n=t,i;if(tr(_s,n)&&(i=_s[n],n="%"+i[0]+"%"),tr(Me,n)){var u=Me[n];if(u===We&&(u=Bp(n)),typeof u>"u"&&!r)throw new Ke("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Je("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ts.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ke('"allowMissing" argument must be a boolean');if(Hp(/^%?[^%]*%?$/,t)===null)throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wp(t),i=n.length>0?n[0]:"",u=Kp("%"+i+"%",r),c=u.name,l=u.value,f=!1,y=u.alias;y&&(i=y[0],Vp(n,Zp([0,1],y)));for(var _=1,I=!0;_<n.length;_+=1){var x=n[_],s=rr(x,0,1),d=rr(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Je("property names with quotes must have matching quotes");if((x==="constructor"||!I)&&(f=!0),i+="."+x,c="%"+i+"%",tr(Me,c))l=Me[c];else if(l!=null){if(!(x in l)){if(!r)throw new Ke("base intrinsic for "+t+" exists, but the property is not available.");return}if(xt&&_+1>=n.length){var g=xt(l,x);I=!!g,I&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[x]}else I=tr(l,x),l=l[x];I&&!f&&(Me[c]=l)}}return l},"GetIntrinsic")});var Ss=E((Ez,$s)=>{"use strict";var Jp=Yr();$s.exports=o(function(){return Jp()&&!!Symbol.toStringTag},"hasToStringTagShams")});var ks=E((Sz,zs)=>{"use strict";var Xp=Es(),As=Xp("%Object.defineProperty%",!0),Yp=Ss()(),Qp=nn(),ed=Xt(),nr=Yp?Symbol.toStringTag:null;zs.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 ed("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");nr&&(n||!Qp(t,nr))&&(As?As(t,nr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[nr]=r)},"setToStringTag")});var Os=E((zz,ws)=>{"use strict";var td=Function.prototype.call,rd=Object.prototype.hasOwnProperty,nd=qe();ws.exports=nd.call(td,rd)});var Ns=E((kz,Rs)=>{"use strict";Rs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var pn=E((wz,Cs)=>{"use strict";var ln=ji(),od=require("util"),sn=require("path"),id=require("http"),ad=require("https"),sd=require("url").parse,ud=require("fs"),cd=require("stream").Stream,ld=require("crypto"),un=Vi(),pd=sa(),dd=ks(),we=Os(),cn=Ns();function Ds(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Ds,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ln.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");od.inherits(L,ln);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=ln.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&&we(t,"httpVersion"))&&!(t instanceof cd))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){we(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):ud.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):we(e,"httpVersion")?t(null,Number(e.headers["content-length"])):we(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="'+Ds(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&cn(c,r.header);var l;for(var f in c)if(we(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.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=sn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=sn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&we(e,"httpVersion")&&(r=sn.basename(e.client._httpMessage.path||"")),r)return'filename="'+Ds(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=un.lookup(e.name)),!r&&e&&e.path&&(r=un.lookup(e.path)),!r&&e&&e.readable&&we(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=un.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)we(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="--------------------------"+ld.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}pd.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=sd(e),n=cn({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=cn(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=ad.request(n):r=id.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 l,f=o(function(y,_){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,y,_)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.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]"};dd(L.prototype,"FormData");Cs.exports=L});var Rd={};gn(Rd,{mistralAi:()=>Od});module.exports=tu(Rd);var ru=Object.freeze({status:"aborted"});function b(e,t,r){function n(l,f){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,f);let y=c.prototype,_=Object.keys(y);for(let I=0;I<_.length;I++){let x=_[I];x in l||(l[x]=y[x].bind(l))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(l){var f;let y=r?.Parent?new u:this;n(y,l),(f=y._zod).deferred??(f.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(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(b,"$constructor");var pe=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},It=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ir={};function ge(e){return e&&Object.assign(ir,e),ir}o(ge,"config");function sr(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(sr,"getEnumValues");function vn(e,t){return typeof t=="bigint"?t.toString():t}o(vn,"jsonStringifyReplacer");function Et(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Et,"cached");function xn(e){return e==null}o(xn,"nullish");function $t(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o($t,"cleanRegex");var hn=Symbol("evaluating");function W(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==hn)return n===void 0&&(n=hn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(W,"defineLazy");var ur="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(Qe,"isObject");var nu=Et(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function _n(e){if(Qe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Qe(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(_n,"isPlainObject");var Pn=new Set(["string","number","symbol"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(je,"escapeRegex");function St(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(St,"clone");function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}o(Z,"normalizeParams");function bn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(bn,"optionalKeys");var In={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 Le(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(Le,"aborted");function be(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(be,"prefixIssues");function Tt(e){return typeof e=="string"?e:e?.message}o(Tt,"unwrapMessage");function Ie(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ie,"finalizeIssue");function Tn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(Tn,"getLengthableOrigin");function cr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(cr,"issue");var En=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,vn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),$n=b("$ZodError",En),et=b("$ZodError",En,{Parent:Error});var iu=o(e=>(t,r,n,i)=>{let u=n?Object.assign(n,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise)throw new pe;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ie(f,u,ge())));throw ur(l,i?.callee),l}return c.value},"_parse"),At=iu(et),au=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 l=new(i?.Err??e)(c.issues.map(f=>Ie(f,u,ge())));throw ur(l,i?.callee),l}return c.value},"_parseAsync"),zt=au(et),su=o(e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},u=t._zod.run({value:r,issues:[]},i);if(u instanceof Promise)throw new pe;return u.issues.length?{success:!1,error:new(e??$n)(u.issues.map(c=>Ie(c,i,ge())))}:{success:!0,data:u.value}},"_safeParse"),tt=su(et),uu=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=>Ie(c,i,ge())))}:{success:!0,data:u.value}},"_safeParseAsync"),rt=uu(et);var cu="(?:(?:\\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])))",lu=new RegExp(`^${cu}$`);var Sn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),An=/^-?\d+n?$/,zn=/^-?\d+$/,lr=/^-?\d+(?:\.\d+)?$/,kn=/^(?:true|false)$/i;var Te=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),pu={number:"number",bigint:"bigint",object:"date"};var wn=b("$ZodCheckGreaterThan",(e,t)=>{Te.init(e,t);let r=pu[typeof t.value];e._zod.onattach.push(n=>{let i=n._zod.bag,u=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var On=b("$ZodCheckNumberFormat",(e,t)=>{Te.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=In[t.format];e._zod.onattach.push(c=>{let l=c._zod.bag;l.format=t.format,l.minimum=i,l.maximum=u,r&&(l.pattern=zn)}),e._zod.check=c=>{let l=c.value;if(r){if(!Number.isInteger(l)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?c.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<i&&c.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>u&&c.issues.push({origin:"number",input:l,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}});var Rn=b("$ZodCheckMinLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!xn(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=Tn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var pr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Te.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=()=>{})}),Nn=b("$ZodCheckRegex",(e,t)=>{pr.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 Cn={major:4,minor:3,patch:6};var H=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Cn;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,l,f)=>{let y=Le(c),_;for(let I of l){if(I._zod.def.when){if(!I._zod.def.when(c))continue}else if(y)continue;let x=c.issues.length,s=I._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new pe;if(_||s instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(y||(y=Le(c,x)))});else{if(c.issues.length===x)continue;y||(y=Le(c,x))}}return _?_.then(()=>c):c},"runChecks"),u=o((c,l,f)=>{if(Le(c))return c.aborted=!0,c;let y=i(l,n,f);if(y instanceof Promise){if(f.async===!1)throw new pe;return y.then(_=>e._zod.parse(_,f))}return e._zod.parse(y,f)},"handleCanaryResult");e._zod.run=(c,l)=>{if(l.skipChecks)return e._zod.parse(c,l);if(l.direction==="backward"){let y=e._zod.parse({value:c.value,issues:[]},{...l,skipChecks:!0});return y instanceof Promise?y.then(_=>u(_,c,l)):u(y,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new pe;return f.then(y=>i(y,n,l))}return i(f,n,l)}}W(e,"~standard",()=>({validate:o(i=>{try{let u=tt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return rt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ot=b("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Sn(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}}),dr=b("$ZodStringFormat",(e,t)=>{pr.init(e,t),Ot.init(e,t)});var Fn=b("$ZodURL",(e,t)=>{dr.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 mr=b("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??lr,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}}),Bn=b("$ZodNumberFormat",(e,t)=>{On.init(e,t),mr.init(e,t)}),fr=b("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=kn,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}}),Zn=b("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=An,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 Vn=b("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Hn=b("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var qn=b("$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}}),Gn=b("$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 Un(e,t,r){e.issues.length&&t.issues.push(...be(r,e.issues)),t.value[r]=e.value}o(Un,"handleArrayResult");var Wn=b("$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 l=i[c],f=t.element._zod.run({value:l,issues:[]},n);f instanceof Promise?u.push(f.then(y=>Un(y,r,c))):Un(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function wt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...be(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(wt,"handlePropertyResult");function du(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=bn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(du,"normalizeDef");function mu(e,t,r,n,i,u){let c=[],l=i.keySet,f=i.catchall._zod,y=f.def.type,_=f.optout==="optional";for(let I in t){if(l.has(I))continue;if(y==="never"){c.push(I);continue}let x=f.run({value:t[I],issues:[]},n);x instanceof Promise?e.push(x.then(s=>wt(s,r,I,t,_))):wt(x,r,I,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(mu,"handleCatchall");var Kn=b("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...l};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Et(()=>du(t));W(e._zod,"propValues",()=>{let l=t.shape,f={};for(let y in l){let _=l[y]._zod;if(_.values){f[y]??(f[y]=new Set);for(let I of _.values)f[y].add(I)}}return f});let i=Qe,u=t.catchall,c;e._zod.parse=(l,f)=>{c??(c=n.value);let y=l.value;if(!i(y))return l.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),l;l.value={};let _=[],I=c.shape;for(let x of c.keys){let s=I[x],d=s._zod.optout==="optional",g=s._zod.run({value:y[x],issues:[]},f);g instanceof Promise?_.push(g.then(m=>wt(m,l,x,y,d))):wt(g,l,x,y,d)}return u?mu(_,y,l,f,n.value,e):_.length?Promise.all(_).then(()=>l):l}});function Mn(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=>!Le(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=>Ie(c,n,ge())))}),t)}o(Mn,"handleUnionResults");var gr=b("$ZodUnion",(e,t)=>{H.init(e,t),W(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),W(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),W(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),W(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>$t(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,l=[];for(let f of t.options){let y=f._zod.run({value:i.value,issues:[]},u);if(y instanceof Promise)l.push(y),c=!0;else{if(y.issues.length===0)return y;l.push(y)}}return c?Promise.all(l).then(f=>Mn(f,i,e,u)):Mn(l,i,e,u)}});var Jn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gr.init(e,t);let r=e._zod.parse;W(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[l,f]of Object.entries(c)){i[l]||(i[l]=new Set);for(let y of f)i[l].add(y)}}return i});let n=Et(()=>{let i=t.options,u=new Map;for(let c of i){let l=c._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of l){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!Qe(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let l=n.value.get(c?.[t.discriminator]);return l?l._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 Xn=b("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!_n(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 l=new Set;for(let y of c)if(typeof y=="string"||typeof y=="number"||typeof y=="symbol"){l.add(typeof y=="number"?y.toString():y);let _=t.valueType._zod.run({value:i[y],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...be(y,I.issues)),r.value[y]=I.value})):(_.issues.length&&r.issues.push(...be(y,_.issues)),r.value[y]=_.value)}let f;for(let y in i)l.has(y)||(f=f??[],f.push(y));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&lr.test(l)&&f.issues.length){let I=t.keyType._zod.run({value:Number(l),issues:[]},n);if(I instanceof Promise)throw new Error("Async schemas not supported in object keys currently");I.issues.length===0&&(f=I)}if(f.issues.length){t.mode==="loose"?r.value[l]=i[l]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(I=>Ie(I,n,ge())),input:l,path:[l],inst:e});continue}let _=t.valueType._zod.run({value:i[l],issues:[]},n);_ instanceof Promise?u.push(_.then(I=>{I.issues.length&&r.issues.push(...be(l,I.issues)),r.value[f.value]=I.value})):(_.issues.length&&r.issues.push(...be(l,_.issues)),r.value[f.value]=_.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Yn=b("$ZodEnum",(e,t)=>{H.init(e,t);let r=sr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Pn.has(typeof i)).map(i=>typeof i=="string"?je(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}}),Qn=b("$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"?je(n):n?je(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 eo=b("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new It(e.constructor.name);let i=t.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new pe;return r.value=i,r}});function jn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(jn,"handleOptionalResult");var to=b("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",W(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),W(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(u=>jn(u,r.value)):jn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var ro=b("$ZodNullable",(e,t)=>{H.init(e,t),W(e._zod,"optin",()=>t.innerType._zod.optin),W(e._zod,"optout",()=>t.innerType._zod.optout),W(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${$t(r.source)}|null)$`):void 0}),W(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 no=b("$ZodPipe",(e,t)=>{H.init(e,t),W(e._zod,"values",()=>t.in._zod.values),W(e._zod,"optin",()=>t.in._zod.optin),W(e._zod,"optout",()=>t.out._zod.optout),W(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(c=>kt(c,t.in,n)):kt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>kt(u,t.out,n)):kt(i,t.out,n)}});function kt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(kt,"handlePipeResult");var oo=b("$ZodCustom",(e,t)=>{Te.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=>Ln(u,r,n,e));Ln(i,r,n,e)}});function Ln(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(cr(i))}}o(Ln,"handleRefineResult");var ao;var yr=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 so(){return new yr}o(so,"registry");(ao=globalThis).__zod_globalRegistry??(ao.__zod_globalRegistry=so());var hr=globalThis.__zod_globalRegistry;function uo(e,t){return new e({type:"string",...Z(t)})}o(uo,"_string");function co(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(co,"_coercedString");function lo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(lo,"_url");function po(e,t){return new e({type:"number",checks:[],...Z(t)})}o(po,"_number");function mo(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(mo,"_coercedNumber");function fo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}o(fo,"_int");function go(e,t){return new e({type:"boolean",...Z(t)})}o(go,"_boolean");function yo(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(yo,"_coercedBoolean");function ho(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(ho,"_coercedBigint");function vo(e){return new e({type:"any"})}o(vo,"_any");function xo(e){return new e({type:"unknown"})}o(xo,"_unknown");function _o(e,t){return new e({type:"void",...Z(t)})}o(_o,"_void");function Po(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(Po,"_coercedDate");function Rt(e,t){return new wn({check:"greater_than",...Z(t),value:e,inclusive:!0})}o(Rt,"_gte");function ce(e,t){return new Rn({check:"min_length",...Z(t),minimum:e})}o(ce,"_minLength");function Ee(e,t){return new Nn({check:"string_format",format:"regex",...Z(t),pattern:e})}o(Ee,"_regex");function bo(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(bo,"_custom");var K=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");H.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>At(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>tt(e,r,n),e.parseAsync=async(r,n)=>zt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>rt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>St(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Dt=b("ZodMiniString",(e,t)=>{Ot.init(e,t),K.init(e,t)});function a(e){return uo(Dt,e)}o(a,"string");var Io=b("ZodMiniStringFormat",(e,t)=>{dr.init(e,t),Dt.init(e,t)});var $u=b("ZodMiniURL",(e,t)=>{Fn.init(e,t),Io.init(e,t)});function To(e){return lo($u,e)}o(To,"url");var Ct=b("ZodMiniNumber",(e,t)=>{mr.init(e,t),K.init(e,t)});function Y(e){return po(Ct,e)}o(Y,"number");var Su=b("ZodMiniNumberFormat",(e,t)=>{Bn.init(e,t),Ct.init(e,t)});function Eo(e){return fo(Su,e)}o(Eo,"int");var vr=b("ZodMiniBoolean",(e,t)=>{fr.init(e,t),K.init(e,t)});function B(e){return go(vr,e)}o(B,"boolean");var $o=b("ZodMiniBigInt",(e,t)=>{Zn.init(e,t),K.init(e,t)});var Au=b("ZodMiniAny",(e,t)=>{Vn.init(e,t),K.init(e,t)});function ot(){return vo(Au)}o(ot,"any");var zu=b("ZodMiniUnknown",(e,t)=>{Hn.init(e,t),K.init(e,t)});function w(){return xo(zu)}o(w,"unknown");var ku=b("ZodMiniVoid",(e,t)=>{qn.init(e,t),K.init(e,t)});function So(e){return _o(ku,e)}o(So,"_void");var Ao=b("ZodMiniDate",(e,t)=>{Gn.init(e,t),K.init(e,t)});var wu=b("ZodMiniArray",(e,t)=>{Wn.init(e,t),K.init(e,t)});function N(e,t){return new wu({type:"array",element:e,...Z(t)})}o(N,"array");var Ou=b("ZodMiniObject",(e,t)=>{Kn.init(e,t),K.init(e,t),W(e,"shape",()=>t.shape)});function p(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Ou(r)}o(p,"object");var Ru=b("ZodMiniUnion",(e,t)=>{gr.init(e,t),K.init(e,t)});function D(e,t){return new Ru({type:"union",options:e,...Z(t)})}o(D,"union");var Nu=b("ZodMiniDiscriminatedUnion",(e,t)=>{Jn.init(e,t),K.init(e,t)});function $e(e,t,r){return new Nu({type:"union",options:t,discriminator:e,...Z(r)})}o($e,"discriminatedUnion");var Du=b("ZodMiniRecord",(e,t)=>{Xn.init(e,t),K.init(e,t)});function O(e,t,r){return new Du({type:"record",keyType:e,valueType:t,...Z(r)})}o(O,"record");var Cu=b("ZodMiniEnum",(e,t)=>{Yn.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 Cu({type:"enum",entries:r,...Z(t)})}o(U,"_enum");var Uu=b("ZodMiniLiteral",(e,t)=>{Qn.init(e,t),K.init(e,t)});function $(e,t){return new Uu({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o($,"literal");var Mu=b("ZodMiniTransform",(e,t)=>{eo.init(e,t),K.init(e,t)});function Se(e){return new Mu({type:"transform",transform:e})}o(Se,"transform");var ju=b("ZodMiniOptional",(e,t)=>{to.init(e,t),K.init(e,t)});function h(e){return new ju({type:"optional",innerType:e})}o(h,"optional");var Lu=b("ZodMiniNullable",(e,t)=>{ro.init(e,t),K.init(e,t)});function it(e){return new Lu({type:"nullable",innerType:e})}o(it,"nullable");var Fu=b("ZodMiniPipe",(e,t)=>{no.init(e,t),K.init(e,t)});function Ae(e,t){return new Fu({type:"pipe",in:e,out:t})}o(Ae,"pipe");var Bu=b("ZodMiniCustom",(e,t)=>{oo.init(e,t),K.init(e,t)});function Ut(e,t){return bo(Bu,e??(()=>!0),t)}o(Ut,"custom");var at={};gn(at,{bigint:()=>Wu,boolean:()=>Gu,date:()=>Ku,number:()=>qu,string:()=>Hu});function Hu(e){return co(Dt,e)}o(Hu,"string");function qu(e){return mo(Ct,e)}o(qu,"number");function Gu(e){return yo(vr,e)}o(Gu,"boolean");function Wu(e){return ho($o,e)}o(Wu,"bigint");function Ku(e){return Po(Ao,e)}o(Ku,"date");var _r=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),xr=class{constructor(t,r,n,i,u,c,l,f,y,_,I){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=y;this.audience=_;this.aiMetadata=I}static{o(this,"IAction")}},ae=o(e=>new xr(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:$(t),required:B(),defaultValue:h(ot())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ye=p({...F.shape,...C(a(),"LONG_TEXT").shape});var ko=p({label:a(),value:w()}),Mt=p({disabled:h(B()),placeholder:h(a()),options:N(ko)});var oe=p({...F.shape,options:Mt,...C(w(),"STATIC_DROPDOWN").shape}),he=p({...F.shape,options:Mt,...C(N(w()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Pr=p({...F.shape,...C(w(),"DROPDOWN").shape,refreshers:N(a())}),st=p({...F.shape,...C(N(w()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var ve=p({...F.shape,...C(B(),"CHECKBOX").shape});var xe=p({...F.shape,...C(Y(),"NUMBER").shape});var ut=p({...F.shape,...C(w(),"FILE").shape});var ct=p({...F.shape,...C(a(),"DATE_TIME").shape});var wo=O(a(),D([ne,ye,oe,st,he,ve,xe,ut,ct])),lt=p({...F.shape,properties:wo,...C(N(w()),"ARRAY").shape});var pt=p({...F.shape,...C(D([O(a(),w())]),"JSON").shape});var Oo=D([ne,oe,pt,lt,he]),Xu=O(a(),Oo),br=p({refreshers:N(a()),...F.shape,...C(w(),"DYNAMIC").shape});var jt=p({...F.shape,...C(So(),"MARKDOWN").shape});var dt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(dt||{}),Fe=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Fe||{}),Be=(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))(Be||{});var mt=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(mt||{}),Ir="both_client_credentials_and_authorization_code";var Ne=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Ne||{}),ft=(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))(ft||{}),Yu=p({strategy:U(ft),paramName:h(a())}),gt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(gt||{});var Lt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lt||{}),Ro=p({status:h(Y()),body:h(w()),headers:h(O(a(),a()))}),No=p({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Lt))}),Do=p({type:$("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:Ro,handlerId:h(a()),streamStepProgress:h(U(Lt))}),Qu=D([No,Do]);var ec=p({body:w(),rawBody:h(w()),headers:O(a(),a()),queryParams:O(a(),a())});function _e(e){return e==null}o(_e,"isNil");function yt(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(yt,"isEmpty");function Ft(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Ft,"assertNotNullOrUndefined");var Tr=Re(require("crypto"),1);var tc=128,De,Ze,rc=o(e=>{!De||De.length<e?(De=Buffer.allocUnsafe(e*tc),Tr.default.randomFillSync(De),Ze=0):Ze+e>De.length&&(Tr.default.randomFillSync(De),Ze=0),Ze+=e},"fillPool"),nc=o(e=>(rc(e|=0),De.subarray(Ze-e,Ze)),"random"),oc=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 l=r(i),f=i;for(;f--;)if(c+=e[l[f]&n]||"",c.length===u)return c}}},"customRandom"),Uo=o((e,t=21)=>oc(e,t,nc),"customAlphabet");var ic="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Mo=21,fb=a().check(Ee(new RegExp(`^[0-9a-zA-Z]{${Mo}}$`))),ac=Uo(ic,Mo);var ze=Ae(Se(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:ze,updated:ze},V=o(e=>h(it(e)),"Nullable");function Er(e){return h(it(U(e)))}o(Er,"NullableEnum");var hb=Ae(Se(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Bt=o(e=>Ae(Se(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var _b=O(a(),w());var ht=(_=>(_.OPENAI="openai",_.OPENROUTER="openrouter",_.ANTHROPIC="anthropic",_.AZURE="azure",_.GOOGLE="google",_.ACTIVEPIECES="activepieces",_.CLOUDFLARE_GATEWAY="cloudflare-gateway",_.CUSTOM="custom",_.BEDROCK="bedrock",_.MISTRAL="mistral",_))(ht||{});var Ob=a().check(Ee(/^#[0-9A-Fa-f]{6}$/));var Nb=p({filename:a(),data:w(),type:$("file"),mimetype:h(a())});var sc=Re(Lo());var Fb=p({...se,name:a(),permissions:N(a()),platformId:V(a()),type:a(),userCount:h(Y())});var Fo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Fo||{}),$r=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))($r||{}),Sr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Sr||{});var Ar=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Ar||{});var zr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(zr||{});var uc=p({mode:U(Fo),value:w()}),cc=p({auth:h(a()),fields:O(a(),uc)}),lc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(cc)}),pc=p({type:$("PIECE"),toolName:a().check(ce(1)),pieceMetadata:lc}),dc=p({type:$("none")}),mc=p({type:$("access_token"),accessToken:a()}),fc=p({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),gc=p({type:$("headers"),headers:O(a(),a())}),yc=$e("type",[dc,mc,fc,gc]),Bo=p({type:$("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:h(a())}),Zo=p({type:$("MCP"),toolName:a().check(ce(1)),serverUrl:To(),protocol:U(Sr),auth:yc}),Vo=p({type:$("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U($r),sourceId:a(),sourceName:a()}),hc=$e("type",[pc,Bo,Zo,Vo]),vc=p({displayName:a(),description:h(a()),type:U(Ar)}),Ho=p({type:$("MARKDOWN"),markdown:a()}),Ve={type:$("TOOL_CALL"),input:V(O(a(),w())),output:h(w()),toolName:a(),status:U(zr),toolCallId:a(),startTime:a(),endTime:h(a())},fI=p(Ve),qo=$e("toolCallType",[p({...Ve,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...Ve,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),p({...Ve,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),p({...Ve,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...Ve,toolCallType:$("UNKNOWN"),displayName:a()})]),xc=D([Ho,qo]);var kr=(r=>(r.IMAGE="image",r.TEXT="text",r))(kr||{}),Pe=p({apiKey:a()}),_c=Pe,Pc=p({apiKey:a(),apiKeyHash:a()}),bc=Pe,Ic=Pe,Tc=Pe,Ec=Pe,$c=Pe,Sc=Pe,Ac=Pe,Go=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),zc=p({}),kc=p({}),wc=p({}),Oc=p({}),Rc=p({}),Nc=p({}),Wo=p({modelId:a(),modelName:a(),modelType:U(kr)}),Ko=p({apiKeyHeader:a(),baseUrl:a(),models:N(Wo),defaultHeaders:h(O(a(),a()))}),Jo=p({accountId:a(),gatewayId:a(),models:N(Wo),vertexProject:h(a()),vertexRegion:h(a())}),Xo=p({resourceName:a(),apiVersion:Ae(Se(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),Yo=p({region:a().check(ce(1))}),Dc=D([_c,Tc,Ec,$c,Sc,Ic,bc,Pc,Go,Ac]),Qo=D([Ko,Jo,Xo,Yo,zc,wc,Oc,Rc,kc,Nc]),Cc=p({id:a(),name:a(),type:U(kr)}),Uc=p({id:a(),name:a(),provider:U(ht),config:Qo,enabledForChat:B()}),Mc=p({provider:U(ht),config:Qo,auth:Dc,platformId:a()});var vI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var jc=p({base64Url:a(),fileName:a(),extension:h(a())}),Lc=p({mimeType:a(),url:a(),fileName:h(a())}),wr=D([jc,Lc]);var Fc=D([p({type:$("file"),value:wr}),p({type:$("markdown"),value:a(),files:h(N(wr))})]),Bc=p({sessionId:a(),message:a(),files:h(N(a()))});var ti=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ti||{}),ri=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ri||{}),Or=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Or||{});var Zc=D([p({...se,name:a(),externalId:a(),type:$("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:p({options:N(p({value:a()}))})}),p({...se,name:a(),externalId:a(),type:D([$("TEXT"),$("NUMBER"),$("DATE")]),tableId:a(),projectId:a()})]),Vc=p({...se,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Er(ri),trigger:Er(ti)}),Hc=p({...se,tableId:a(),projectId:a(),cells:O(a(),p({updated:a(),created:a(),value:w(),fieldName:a()}))}),qc=p({events:N(U(Or)),webhookUrl:a(),flowId:a()}),Gc=p({fields:N(p({id:a(),name:a()})),rows:N(O(a(),a())),name:a()}),Wc=p({projectId:a(),limit:h(at.number()),cursor:h(a()),name:h(a()),externalIds:Bt(a()),folderId:h(a()),folderIds:Bt(a())}),Kc=p({records:N(N(p({fieldId:a(),value:oi()}))),tableId:a()}),Jc=p({cells:h(N(p({fieldId:a(),value:oi()}))),tableId:a(),agentUpdate:h(B())}),ni=$e("operator",[Ce("eq"),Ce("neq"),Ce("gt"),Ce("gte"),Ce("lt"),Ce("lte"),Ce("co"),ei("exists"),ei("not_exists")]),Xc=p({tableId:a(),limit:h(at.number()),cursor:h(a()),filters:Bt(ni)});function oi(){return Ae(Se(e=>e==null?e:String(e)),it(a()))}o(oi,"coerceToString");function Ce(e){return p({fieldId:a(),operator:$(e),value:a()})}o(Ce,"valueFilter");function ei(e){return p({fieldId:a(),operator:$(e)})}o(ei,"existenceFilter");var Yc=p({status:h(Y()),body:h(w()),headers:h(O(a(),a()))}),Qc=p({...se,deleted:V(ze),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var ii=p({name:a(),description:h(a()),type:a(),required:B()}),el=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(ii),returnsResponse:B()})});var ai="^[0-9]+\\.[0-9]+\\.[0-9]+$",UI=new RegExp(ai),rl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",MI=a().check(Ee(new RegExp(ai))),jI=a().check(Ee(new RegExp(rl))),nl=p({packageType:$("ARCHIVE"),pieceType:U(Fe),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),si=p({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),ui=p({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),LI=D([si,ui]),FI=D([nl,si,ui]);var ol=$e("type",[p({type:$("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:$("INTERVAL"),intervalMs:Eo().check(Rt(6e4))})]),BI=p({...se,type:U(Ne),projectId:a(),flowId:a(),triggerName:a(),schedule:V(ol),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),ci=(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))(ci||{}),li=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(li||{}),pi=(r=>(r.S3="S3",r.DB="DB",r))(pi||{}),ZI=p({...se,projectId:V(a()),platformId:V(a()),type:U(ci),compression:U(li),data:h(w()),location:U(pi),size:V(Y()),fileName:V(a()),s3Key:V(a()),metadata:V(O(a(),a()))}),di=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(di||{}),mi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(mi||{}),VI=p({id:a(),email:a(),firstName:a(),status:U(mi),externalId:V(a()),platformId:V(a()),platformRole:U(di),lastName:a(),created:ze,updated:ze,lastActiveDate:V(ze),imageUrl:V(a())});var Nr=p({...F.shape,...C(O(a(),w()),"OBJECT").shape});var yi=p({...F.shape,...C(a(),"COLOR").shape});var Dr=D([ne,ye,jt,ve,oe,he,Pr,st,br,xe,lt,Nr,pt,ct,ut,yi]),S={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 hi=p({username:a(),password:a()}),Cr=p({...de.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(hi,"BASIC_AUTH").shape});var ul=O(a(),D([ne,ye,xe,ve,oe])),Ur=p({...de.shape,props:ul,...C(w(),"CUSTOM_AUTH").shape});var Ue=p({...de.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var cl=O(a(),D([ne,ye,Ue,xe,ve,oe,he,jt])),vi=p({...de.shape,props:cl,...C(w(),"OIDC").shape});var Mr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Mr||{}),xi=D([ne,Ue,oe]),_i=O(a(),xi),ll=p({props:h(O(a(),xi)),authUrl:a(),tokenUrl:a(),scope:N(a()),prompt:h(D([$("none"),$("consent"),$("login"),$("omit")])),pkce:h(B()),pkceMethod:h(D([$("plain"),$("S256")])),authorizationMethod:h(U(Mr)),grantType:h(D([U(mt),$(Ir)])),extra:h(O(a(),a()))}),Pi=p({access_token:a(),props:h(_i),data:O(a(),ot())}),jr=p({...de.shape,...ll.shape,...C(Pi,"OAUTH2").shape});var He=D([Cr,Ur,vi,jr,Ue]),vt="Connection",ke={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||vt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||vt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||vt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||vt}},None(){}};var bE={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 pl=p({...F.shape,...C(w(),"CUSTOM").shape,code:a()});var dl=D([Dr,He]),Lr=O(a(),dl),BE=O(a(),Dr);var bi=D([p({strategy:$("CRON"),cronExpression:a()}),p({strategy:$("NONE")})]);var Ii="2",Vt="0.82.0";var Fr=class{constructor(t,r,n,i,u,c,l,f,y=Vt,_,I="",x){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=l;this.auth=f;this.minimumSupportedRelease=y;this.maximumSupportedRelease=_;this.description=I;this.deprecated=x;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ii}),"getContextInfo");(!ml(y)||fl(y,Vt))&&(this.minimumSupportedRelease=Vt),u.forEach(s=>this._actions[s.name]=s),c.forEach(s=>this._triggers[s.name]=s)}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,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Ti=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 Fr(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function ml(e){return/^\d+\.\d+\.\d+$/.test(e)}o(ml,"isValidSimpleSemver");function fl(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,l]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<l}o(fl,"isSemverLessThan");var gl=h(O(a(),O(a(),a()))),Ei=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([He,N(He)])),version:a(),categories:h(N(U(Be))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(B()),i18n:gl}),yl=U(["human","ai","both"]),$i=p({description:h(a()),idempotent:h(B())}),Si=p({name:a(),displayName:a(),description:a(),props:Lr,requireAuth:B(),errorHandlingOptions:h(_r),outputSchema:h(Ut()),audience:h(yl),aiMetadata:h($i)}),Ai=p({name:a(),displayName:a(),description:a(),props:Lr,errorHandlingOptions:h(_r),type:U(Ne),sampleData:w(),handshakeConfiguration:h(Ut()),renewConfiguration:h(bi),testStrategy:U(gt),outputSchema:h(Ut()),aiMetadata:h($i)}),hl=p({...Ei.shape,actions:O(a(),Si),triggers:O(a(),Ai)}),vl=p({...Ei.shape,actions:Y(),triggers:Y(),suggestedActions:h(N(Ai)),suggestedTriggers:h(N(Si))}),zi=p({projectUsage:Y(),pieceType:U(Fe),packageType:U(dt),platformId:h(a()),archiveId:h(a())}),B$=p({...hl.shape,...zi.shape}),Z$=p({...vl.shape,...zi.shape}),V$=p({name:a(),version:a()});var xl=Re(require("path")),_l=Re(require("fs/promises"));var Oi=require("node:stream");var Ht=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"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var qt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Br,r=new Zr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Br=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Zr=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 Gt=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Wt=class extends Ht{static{o(this,"FetchHttpClient")}constructor(t="",r=new qt){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,re]of Object.entries(c))i.append(j,re);let l=i.toString(),f=l?`${n}?${l}`:n,y=t.responseType??"json",_=t.followRedirects??!0,I=t.retries??0,{body:x,extraHeaders:s,isStream:d}=Pl(t.body,u),g=Il({...u,...s}),m=await bl(async()=>{let j=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ue={method:t.method.toString(),headers:g,body:x,redirect:_?"follow":"manual",signal:j.signal};return d&&(ue.duplex="half"),r?.dispatcher!==void 0&&(ue.dispatcher=r.dispatcher),await fetch(f,ue)}finally{re!==void 0&&clearTimeout(re)}},I),v=_?300:400;if(m.status<200||m.status>=v){let j=await ki(m,y),re=new Gt(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let P=await ki(m,y);return{status:m.status,headers:Tl(m.headers),body:P}}};function Pl(e,t){if($l(e))return{body:void 0,extraHeaders:{},isStream:!1};if(El(e)){let n=new Oi.PassThrough;return e.on("error",i=>n.destroy(i)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(Pl,"serializeBody");async function ki(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(ki,"parseResponseBody");async function bl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await wi(n);continue}return i}catch(i){if(r=i,n<t){await wi(n);continue}throw i}throw r}o(bl,"sendWithRetries");function wi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(wi,"backoff");function Il(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}o(Il,"normalizeHeaders");function Tl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Tl,"toHttpHeaders");function El(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(El,"isNodeFormData");function $l(e){return e==null}o($l,"isNil");var J=new Wt;var me=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(me||{});var md=Re(require("fs")),Us=Re(pn());var fd={"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 gd(e){let t=e.split(";")[0].trim().toLowerCase();return fd[t]??""}o(gd,"contentTypeToExtension");var yd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),hd=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 Ms({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:l,authLocation:f="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:S.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:S.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
|
|
3
|
+
i.e ${hd(t,y)}/resource or /resource`,required:!0,defaultValue:y?t(y):"",...c?.url??{}})}),"props")}),method:S.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(me).map(y=>({label:y,value:y}))},...c?.method??{}}),headers:S.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:S.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:S.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:S.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let _=y,I={};switch(_){case"none":break;case"json":I.data=S.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":I.data=S.LongText({displayName:"Raw Body",required:!0});break;case"form_data":I.data=S.Array({displayName:"Form Data",required:!0,properties:{fieldName:S.ShortText({displayName:"Field Name",required:!0}),fieldType:S.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:S.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:S.File({displayName:"File Field Value",required:!1})}});break}return I},"props")}),response_is_binary:S.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:S.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:S.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:S.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...l},run:o(async y=>{let{method:_,url:I,headers:x,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:P,followRedirects:j}=y.propsValue;Ft(_,"Method"),Ft(I,"URL");let re=_e(r)?{}:await r(y.auth,y.propsValue),ue=I.url,Xe=ue.startsWith("http://")||ue.startsWith("https://")?ue:yd({baseUrl:t(y.auth),relativePath:ue}),Oe={method:_,url:Xe,headers:{...x??{},...f==="headers"||!_e(f)?re:{}},queryParams:{...f==="queryParams"?re:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(P&&(Oe.responseType="arraybuffer"),d)if(g&&g!=="none"){let fe=d.data;if(g==="form_data"){let Ks=fe,bt=new Us.default;for(let{fieldName:dn,fieldType:mn,textFieldValue:fn,fileFieldValue:or}of Ks)mn==="text"&&!yt(fn)?bt.append(dn,fn):mn==="file"&&!yt(or)&&bt.append(dn,or.data,{filename:or?.filename});Oe.body=bt,Oe.headers={...Oe.headers,...bt.getHeaders()}}else Oe.body=fe}else g||(Oe.body=d);try{let fe=await J.sendRequest(Oe);return await vd(y.files,fe.body,fe.status,fe.headers,P)}catch(fe){if(m)return fe.errorMessage();throw fe}},"run")})}o(Ms,"createCustomApiCallAction");var vd=o(async(e,t,r,n,i)=>{let u;if(i&&xd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=gd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${l}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),xd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var _d=ke.SecretText({displayName:"API Key",description:"You can obtain your API key from the Mistral AI dashboard. Go to https://console.mistral.ai, generate an API key, and paste it here.",required:!0,validate:o(async({auth:e})=>{try{return await J.sendRequest({method:"GET",url:"https://api.mistral.ai/v1/models",headers:{Authorization:`Bearer ${e}`}}),{valid:!0}}catch(t){return t.response?.status===401?{valid:!1,error:"Invalid API key. Please check your API key and try again."}:t.response?.status===429?{valid:!1,error:"Rate limit exceeded. Please wait and try again."}:t.message?.toLowerCase().includes("network")?{valid:!1,error:"Network error. Please check your internet connection."}:{valid:!1,error:"Authentication failed: "+(t.message||"Unknown error")}}},"validate")}),Pd=ke.CustomAuth({displayName:"Cloudflare AI Gateway",description:"Route Mistral calls through your Cloudflare AI Gateway. Provide a Mistral API key (key-in-request mode) or leave it blank if your gateway has Mistral configured as a stored key (BYOK).",required:!0,props:{accountId:S.ShortText({displayName:"Cloudflare Account ID",description:"Your Cloudflare account ID (visible on the AI Gateway dashboard).",required:!0}),gatewayId:S.ShortText({displayName:"Gateway ID",description:"The slug of your AI Gateway (visible on the gateway settings page).",required:!0}),gatewayAuthToken:ke.SecretText({displayName:"Gateway Auth Token",description:"Optional. Required only if your gateway has authentication enabled. Sent as cf-aig-authorization.",required:!1}),mistralApiKey:ke.SecretText({displayName:"Mistral API Key",description:"Optional. Provide your Mistral key for key-in-request mode. Leave blank if Cloudflare injects the key via stored credentials (BYOK).",required:!1})},validate:o(async({auth:e})=>{let{accountId:t,gatewayId:r,gatewayAuthToken:n,mistralApiKey:i}=e;try{return await J.sendRequest({method:"GET",url:`https://gateway.ai.cloudflare.com/v1/${encodeURIComponent(t)}/${encodeURIComponent(r)}/mistral/v1/models`,headers:bd({gatewayAuthToken:n,mistralApiKey:i})}),{valid:!0}}catch(u){let c=u.response?.status;return c===401||c===403?{valid:!1,error:"Authentication rejected by the gateway. Check your Mistral key and gateway auth token."}:c===404?{valid:!1,error:"Gateway not found. Check your account ID and gateway ID."}:c===429?{valid:!1,error:"Rate limit exceeded at the gateway. Please wait and try again."}:{valid:!1,error:"Gateway validation failed: "+(u.message||"Unknown error")}}},"validate")}),Q=[_d,Pd];function bd({gatewayAuthToken:e,mistralApiKey:t}){let r={};return e&&(r["cf-aig-authorization"]=`Bearer ${e}`),t&&(r.Authorization=`Bearer ${t}`),r}o(bd,"buildGatewayHeaders");function Id(e){return e.type==="CUSTOM_AUTH"}o(Id,"isGatewayAuth");function Td(e){let t=e;if(Id(t)){let{accountId:r,gatewayId:n,gatewayAuthToken:i,mistralApiKey:u}=t.props,c={};return i&&(c["cf-aig-authorization"]=`Bearer ${i}`),u&&(c.Authorization=`Bearer ${u}`),{baseUrl:`https://gateway.ai.cloudflare.com/v1/${encodeURIComponent(r)}/${encodeURIComponent(n)}/mistral/v1`,headers:c}}return{baseUrl:"https://api.mistral.ai/v1",headers:{Authorization:`Bearer ${t.secret_text}`}}}o(Td,"getConfig");var ee={getConfig:Td};var js=S.Dropdown({displayName:"Model",description:"Select a Mistral model. List is fetched live from your account.",required:!0,refreshers:[],auth:Q,options:o(async({auth:e})=>{if(!e)return{disabled:!0,placeholder:"Please connect your account first.",options:[]};try{let{baseUrl:t,headers:r}=ee.getConfig(e),u=((await J.sendRequest({method:"GET",url:`${t}/models`,headers:r})).body.data||[]).map(c=>({label:c.name||c.id,value:c.id}));return u.length===0?{disabled:!0,placeholder:"No models found for your account.",options:[]}:{disabled:!1,options:u}}catch{return{disabled:!0,placeholder:"Failed to load models. Check your API key and network.",options:[]}}},"options")});function ie(e){return e.response?.data?.error?e.response.data.error:e.response?.data?.message?e.response.data.message:e.message?e.message:"Unknown error"}o(ie,"parseMistralError");var Ls=ae({audience:"both",auth:Q,name:"create_chat_completion",displayName:"Ask Mistral",description:"Ask Mistral anything you want!",aiMetadata:{description:"Sends one user prompt to a Mistral chat model through the chat-completions endpoint and returns only the assistant text of the first choice, with optional temperature, top-p, max-token and random-seed controls; it is stateless, with no conversation memory or system message. This is the piece's only text-generation action - prefer Create Embeddings when you need vectors rather than prose, and Run OCR when the text must be pulled out of a PDF or image instead of generated. Requires a model id from the account's live model list and a question; not idempotent: each call bills a fresh completion and the wording varies unless a random seed is pinned.",idempotent:!1},props:{model:js,prompt:S.LongText({displayName:"Question",required:!0}),temperature:S.Number({displayName:"Temperature",required:!1,defaultValue:1,description:"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive."}),top_p:S.Number({displayName:"Top P",required:!1,defaultValue:1,description:"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered."}),max_tokens:S.Number({displayName:"Max Tokens",required:!1}),random_seed:S.Number({displayName:"Random Seed",required:!1}),timeout:S.Number({displayName:"Timeout (ms)",required:!1,defaultValue:3e4})},async run(e){let{model:t,temperature:r,top_p:n,max_tokens:i,random_seed:u,timeout:c,prompt:l}=e.propsValue,{baseUrl:f,headers:y}=ee.getConfig(e.auth),_={model:t,messages:[{content:l,role:"user"}],temperature:r,top_p:n,max_tokens:i,random_seed:u},I;for(let x=0;x<=3;++x)try{return(await J.sendRequest({method:"POST",url:`${f}/chat/completions`,headers:y,body:_,timeout:c??3e4})).body.choices[0].message.content}catch(s){I=s;let d=s.response?.status;if((d===429||d&&d>=500&&d<600)&&x<3){await new Promise(g=>setTimeout(g,1e3*(x+1)));continue}throw new Error(ie(s))}throw new Error(ie(I))}});var Fs=ae({audience:"both",auth:Q,name:"create_embeddings",displayName:"Create Embeddings",description:"Creates new embedding in Mistral AI.",aiMetadata:{description:"Converts an array of text strings into numeric embedding vectors using Mistral's fixed mistral-embed model; the model is not selectable here, unlike the sibling Ask Mistral action, and a whole batch of strings is embedded in one call. Use it for semantic search, similarity, or clustering pipelines, and pick Ask Mistral when you need generated prose rather than numbers. Requires a non-empty array of input strings; idempotent: nothing is created server-side and the same input yields the same vectors.",idempotent:!0},props:{input:S.Array({displayName:"Input",description:"The input text for which to create an embedding.",required:!0}),timeout:S.Number({displayName:"Timeout (ms)",required:!1,defaultValue:3e4})},async run(e){let{input:t,timeout:r}=e.propsValue,{baseUrl:n,headers:i}=ee.getConfig(e.auth),u=[];try{if(typeof t=="string")try{u=JSON.parse(t)}catch{u=t}u=t}catch{throw new Error("Input must be a non-empty string or a JSON array of non-empty strings")}let c={model:"mistral-embed",input:u},l;for(let f=0;f<=3;++f)try{return(await J.sendRequest({method:"POST",url:`${n}/embeddings`,headers:i,body:c,timeout:r??3e4})).body}catch(y){l=y;let _=y.response?.status;if((_===429||_&&_>=500&&_<600)&&f<3){await new Promise(I=>setTimeout(I,1e3*(f+1)));continue}throw new Error(ie(y))}throw new Error(ie(l))}});var Zs=Re(pn());var Bs=["fine-tune","batch","ocr"],Ed=512*1024*1024,$d=["jsonl","txt","csv","pdf","docx","png","jpg","jpeg","mp3","mp4"];function Sd(e){let t=e.split(".");return t.length>1?t.pop().toLowerCase():""}o(Sd,"getFileExtension");var Vs=ae({audience:"both",auth:Q,name:"upload_file",displayName:"Upload File",description:"Upload a file to Mistral AI (e.g., for fine-tuning or context storage).",aiMetadata:{description:"Stores a file in the connected Mistral account and returns its file id, tagged with a purpose of fine-tune, batch, or ocr that decides what the id may later be used for. Run it before Run OCR whenever the document is a step attachment rather than a public URL: upload with purpose=ocr and feed the returned id into that action. Rejects files above 512MB or with an extension outside jsonl, txt, csv, pdf, docx, png, jpg, jpeg, mp3, mp4; not idempotent: each call stores another copy and returns a new id.",idempotent:!1},props:{file:S.File({displayName:"File",description:"The file to upload (max 512MB).For fine tuning purspose provide .jsonl file.",required:!0}),purpose:S.StaticDropdown({displayName:"Purpose",description:"Purpose of the file.",required:!0,options:{options:Bs.map(e=>({label:e,value:e}))}})},async run(e){let{file:t,purpose:r}=e.propsValue;if(!t)throw new Error("File is required");if(!Bs.includes(r))throw new Error("Invalid purpose");if(t.data.byteLength>Ed)throw new Error("File exceeds 512MB limit");let n=Sd(t.filename);if(!$d.includes(n))throw new Error(`File extension .${n} is not allowed`);let{baseUrl:i,headers:u}=ee.getConfig(e.auth),c=new Zs.default;c.append("file",Buffer.from(t.data),t.filename),c.append("purpose",r);try{return(await J.sendRequest({method:"POST",url:`${i}/files`,headers:{...u,...c.getHeaders()},body:c})).body}catch(l){throw new Error(ie(l))}}});var Ad=[{label:"mistral-ocr-latest (Recommended)",value:"mistral-ocr-latest"},{label:"mistral-ocr-2505",value:"mistral-ocr-2505"}],Gs=ae({audience:"both",auth:Q,name:"run_ocr",displayName:"Run OCR",description:"Extract text from PDFs and images using mistral-ocr-latest. To OCR a file from a previous step, run Upload File first (with purpose=ocr) and pass the returned id here.",aiMetadata:{description:"Extracts the text of a PDF or image as Markdown with a Mistral OCR model, taking the document either from a public URL or from a Mistral file id (that mode first resolves a short-lived signed URL); optional zero-based page indices narrow the run and embedded images can come back as base64. Pick this to read text out of a document that already exists, and Ask Mistral when the answer has to be generated or reasoned about rather than transcribed. The file-id mode only works for a file that Upload File stored with purpose=ocr, and the document type must be set to PDF or image to match the source. Read-only extraction that stores nothing, so repeat calls are idempotent.",idempotent:!0},props:{model:S.StaticDropdown({displayName:"Model",required:!0,defaultValue:"mistral-ocr-latest",options:{options:Ad}}),documentSource:S.StaticDropdown({displayName:"Document Source",description:"Where the document or image to OCR comes from.",required:!0,defaultValue:"url",options:{options:[{label:"URL",value:"url"},{label:"Mistral file ID (uploaded earlier with purpose=ocr)",value:"fileId"}]}}),sourceFields:S.DynamicProperties({displayName:"Document",required:!0,refreshers:["documentSource"],auth:ke.None(),props:o(async e=>e.documentSource==="fileId"?{fileId:S.ShortText({displayName:"File ID",description:"A Mistral file ID returned from a prior Upload File step (purpose=ocr).",required:!0}),documentType:Hs()}:{documentUrl:S.ShortText({displayName:"URL",description:"Public URL of the PDF or image to OCR.",required:!0}),documentType:Hs()},"props")}),pages:S.Array({displayName:"Pages",description:"Optional zero-based page indices to process. Leave empty for all pages.",required:!1}),includeImageBase64:S.Checkbox({displayName:"Include Image Base64",description:"Return embedded images encoded as base64 alongside the Markdown.",required:!1,defaultValue:!1}),timeout:S.Number({displayName:"Timeout (ms)",required:!1,defaultValue:12e4})},async run(e){let{model:t,documentSource:r,sourceFields:n,pages:i,includeImageBase64:u,timeout:c}=e.propsValue,l=ee.getConfig(e.auth),f=await zd({source:r,fields:n,config:l,timeout:c??12e4}),y={model:t,document:f},_=wd(i);_&&(y.pages=_),u&&(y.include_image_base64=!0);let I;for(let x=0;x<=3;++x)try{let s=await J.sendRequest({method:"POST",url:`${l.baseUrl}/ocr`,headers:{...l.headers,"Content-Type":"application/json"},body:y,timeout:c??12e4}),d=(s.body.pages??[]).map(g=>g.markdown??"").join(`
|
|
4
|
+
|
|
5
|
+
`);return{...s.body,markdown:d}}catch(s){I=s;let d=s.response?.status;if((d===429||d&&d>=500&&d<600)&&x<3){await new Promise(g=>setTimeout(g,1e3*(x+1)));continue}throw new Error(ie(s))}throw new Error(ie(I))}});function Hs(){return S.StaticDropdown({displayName:"Document Type",description:'Pick "Image" for PNG/JPG/WEBP, "Document" for PDFs.',required:!0,defaultValue:"document_url",options:{options:[{label:"Document (PDF)",value:"document_url"},{label:"Image",value:"image_url"}]}})}o(Hs,"documentTypeDropdown");async function zd({source:e,fields:t,config:r,timeout:n}){let i=t.documentType??"document_url";if(e==="fileId"){let c=t.fileId?.trim();if(!c)throw new Error("A Mistral file ID is required.");let l=await kd({fileId:c,config:r,timeout:n});return qs({documentType:i,url:l})}let u=t.documentUrl?.trim();if(!u)throw new Error("A document URL is required.");return qs({documentType:i,url:u})}o(zd,"resolveDocument");function qs({documentType:e,url:t}){return e==="image_url"?{type:"image_url",image_url:t}:{type:"document_url",document_url:t}}o(qs,"buildUrlDocument");async function kd({fileId:e,config:t,timeout:r}){let n=await J.sendRequest({method:"GET",url:`${t.baseUrl}/files/${encodeURIComponent(e)}/url?expiry=24`,headers:t.headers,timeout:r});if(!n.body.url)throw new Error(`Could not fetch a signed URL for file ${e}.`);return n.body.url}o(kd,"fetchSignedUrl");function wd(e){if(!Array.isArray(e)||e.length===0)return null;let t=e.map(r=>{if(typeof r=="number")return r;let n=Number(String(r).trim());return Number.isFinite(n)?n:null}).filter(r=>r!==null&&Number.isInteger(r)&&r>=0);return t.length>0?t:null}o(wd,"parsePageIndices");var Ws=ae({audience:"both",auth:Q,name:"list_models",displayName:"List Models",description:"Retrieves a list of available Mistral AI models.",aiMetadata:{description:"Returns every model the connected Mistral key can access, chat, embedding and OCR ids alike, exactly as the models endpoint reports them. Use it to discover a valid model id before calling Ask Mistral or Run OCR, both of which require one; it is the only discovery action here and takes no inputs, so it cannot filter or search. Read-only and idempotent.",idempotent:!0},props:{},async run({auth:e}){try{let{baseUrl:t,headers:r}=ee.getConfig(e);return(await J.sendRequest({method:"GET",url:`${t}/models`,headers:r})).body}catch(t){throw new Error(ie(t))}}});var Od=Ti({displayName:"Mistral AI",description:"Mistral AI provides state-of-the-art open-weight and hosted language models for text generation, embeddings, and reasoning tasks.",auth:Q,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/mistral-ai.png",authors:["sparkybug"],categories:["ARTIFICIAL_INTELLIGENCE"],actions:[Ls,Fs,Vs,Gs,Ws,Ms({auth:Q,baseUrl:o(e=>e?ee.getConfig(e).baseUrl:"https://api.mistral.ai/v1","baseUrl"),authMapping:o(async e=>ee.getConfig(e).headers,"authMapping")})],triggers:[]});0&&(module.exports={mistralAi});
|
|
6
|
+
/*! Bundled license information:
|
|
7
|
+
|
|
8
|
+
mime-types/index.js:
|
|
9
|
+
(*!
|
|
10
|
+
* mime-types
|
|
11
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
12
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
13
|
+
* MIT Licensed
|
|
14
|
+
*)
|
|
15
|
+
*/
|
package/src/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const mistralAi: import("@activepieces/pieces-framework").Piece<(import("@activepieces/pieces-framework").SecretTextProperty<true> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
gatewayId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
gatewayAuthToken: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
5
|
-
mistralApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
-
}>)[]>;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;MAqBpB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,iFAA4E;AAC5E,uEAAmE;AACnE,2DAAuD;AACvD,mDAA+C;AAC/C,2DAAuD;AACvD,4CAAgD;AAChD,kDAAsD;AACtD,+DAAwE;AAE3D,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,mIAAmI;IAChJ,IAAI,EAAE,kBAAW;IACjB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE;QACP,6CAAoB;QACpB,oCAAgB;QAChB,wBAAU;QACV,gBAAM;QACN,wBAAU;QACV,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,kBAAW;YACjB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,wBAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC;YAChG,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE,0DAAC,OAAA,wBAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAA,GAAA;SACpE,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const createChatCompletion: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").SecretTextProperty<true> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
gatewayId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
gatewayAuthToken: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
5
|
-
mistralApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
-
}>)[], {
|
|
7
|
-
model: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").SecretTextProperty<true> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
-
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
gatewayId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
-
gatewayAuthToken: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
11
|
-
mistralApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
12
|
-
}>)[]>;
|
|
13
|
-
prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
14
|
-
temperature: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
15
|
-
top_p: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
16
|
-
max_tokens: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
17
|
-
random_seed: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
18
|
-
timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
19
|
-
}>;
|
|
20
|
-
//# sourceMappingURL=create-chat-completion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-chat-completion.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-chat-completion.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EA2E/B,CAAC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createChatCompletion = 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
|
-
const request_1 = require("../common/request");
|
|
10
|
-
exports.createChatCompletion = (0, pieces_framework_1.createAction)({
|
|
11
|
-
audience: 'human',
|
|
12
|
-
auth: auth_1.mistralAuth,
|
|
13
|
-
name: 'create_chat_completion',
|
|
14
|
-
displayName: 'Ask Mistral',
|
|
15
|
-
description: 'Ask Mistral anything you want!',
|
|
16
|
-
props: {
|
|
17
|
-
model: props_1.modelDropdown,
|
|
18
|
-
prompt: pieces_framework_1.Property.LongText({
|
|
19
|
-
displayName: 'Question',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
temperature: pieces_framework_1.Property.Number({
|
|
23
|
-
displayName: 'Temperature',
|
|
24
|
-
required: false,
|
|
25
|
-
defaultValue: 1,
|
|
26
|
-
description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
|
|
27
|
-
}),
|
|
28
|
-
top_p: pieces_framework_1.Property.Number({
|
|
29
|
-
displayName: 'Top P',
|
|
30
|
-
required: false,
|
|
31
|
-
defaultValue: 1,
|
|
32
|
-
description: 'An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.',
|
|
33
|
-
}),
|
|
34
|
-
max_tokens: pieces_framework_1.Property.Number({ displayName: 'Max Tokens', required: false }),
|
|
35
|
-
random_seed: pieces_framework_1.Property.Number({ displayName: 'Random Seed', required: false }),
|
|
36
|
-
timeout: pieces_framework_1.Property.Number({ displayName: 'Timeout (ms)', required: false, defaultValue: 30000 }),
|
|
37
|
-
},
|
|
38
|
-
run(context) {
|
|
39
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
var _a;
|
|
41
|
-
const { model, temperature, top_p, max_tokens, random_seed, timeout, prompt } = context.propsValue;
|
|
42
|
-
const { baseUrl, headers } = request_1.mistralRequest.getConfig(context.auth);
|
|
43
|
-
const body = {
|
|
44
|
-
model,
|
|
45
|
-
messages: [
|
|
46
|
-
{
|
|
47
|
-
content: prompt,
|
|
48
|
-
role: 'user',
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
temperature,
|
|
52
|
-
top_p,
|
|
53
|
-
max_tokens,
|
|
54
|
-
random_seed,
|
|
55
|
-
};
|
|
56
|
-
let lastErr;
|
|
57
|
-
for (let attempt = 0; attempt <= 3; ++attempt) {
|
|
58
|
-
try {
|
|
59
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
60
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
61
|
-
url: `${baseUrl}/chat/completions`,
|
|
62
|
-
headers,
|
|
63
|
-
body,
|
|
64
|
-
timeout: timeout !== null && timeout !== void 0 ? timeout : 30000,
|
|
65
|
-
});
|
|
66
|
-
const answer = response.body.choices[0].message.content;
|
|
67
|
-
return answer;
|
|
68
|
-
}
|
|
69
|
-
catch (e) {
|
|
70
|
-
lastErr = e;
|
|
71
|
-
const status = (_a = e.response) === null || _a === void 0 ? void 0 : _a.status;
|
|
72
|
-
if (status === 429 || (status && status >= 500 && status < 600)) {
|
|
73
|
-
if (attempt < 3) {
|
|
74
|
-
yield new Promise((r) => setTimeout(r, 1000 * (attempt + 1)));
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
throw new Error((0, props_1.parseMistralError)(e));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
throw new Error((0, props_1.parseMistralError)(lastErr));
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
//# sourceMappingURL=create-chat-completion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-chat-completion.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-chat-completion.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,yCAA6C;AAC7C,2CAAmE;AACnE,+CAAmD;AAEtC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,QAAQ,EAAE,OAAO;IAClB,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,gCAAgC;IAC7C,KAAK,EAAE;QACN,KAAK,EAAE,qBAAa;QACpB,MAAM,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,CAAC;YACf,WAAW,EACV,2JAA2J;SAC5J,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,CAAC;YACf,WAAW,EACV,6OAA6O;SAC9O,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC3E,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC7E,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;KAC/F;IACK,GAAG,CAAC,OAAO;;;YAChB,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnG,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,wBAAc,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAEpE,MAAM,IAAI,GAAwB;gBACjC,KAAK;gBACL,QAAQ,EAAE;oBACT;wBACC,OAAO,EAAE,MAAM;wBACf,IAAI,EAAE,MAAM;qBACZ;iBACD;gBACD,WAAW;gBACX,KAAK;gBACL,UAAU;gBACV,WAAW;aACX,CAAC;YACF,IAAI,OAAO,CAAC;YACZ,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC;gBAC/C,IAAI,CAAC;oBACJ,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAkD;wBAC9F,MAAM,EAAE,0BAAU,CAAC,IAAI;wBACvB,GAAG,EAAE,GAAG,OAAO,mBAAmB;wBAClC,OAAO;wBACP,IAAI;wBACJ,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,KAAK;qBACzB,CAAC,CAAC;oBAEH,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;oBAExD,OAAO,MAAM,CAAC;gBACf,CAAC;gBAAC,OAAO,CAAM,EAAE,CAAC;oBACjB,OAAO,GAAG,CAAC,CAAC;oBACZ,MAAM,MAAM,GAAG,MAAA,CAAC,CAAC,QAAQ,0CAAE,MAAM,CAAC;oBAClC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC;wBACjE,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;4BACjB,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC9D,SAAS;wBACV,CAAC;oBACF,CAAC;oBACD,MAAM,IAAI,KAAK,CAAC,IAAA,yBAAiB,EAAC,CAAC,CAAC,CAAC,CAAC;gBACvC,CAAC;YACF,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,IAAA,yBAAiB,EAAC,OAAO,CAAC,CAAC,CAAC;QAC7C,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const createEmbeddings: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").SecretTextProperty<true> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
accountId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
gatewayId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
gatewayAuthToken: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
5
|
-
mistralApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
-
}>)[], {
|
|
7
|
-
input: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
8
|
-
timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=create-embeddings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-embeddings.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-embeddings.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;EA4D3B,CAAC"}
|