@activepieces/piece-mistral-ai 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +7 -13
  2. package/src/index.js +15 -37
  3. package/src/index.d.ts +0 -7
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-chat-completion.d.ts +0 -20
  7. package/src/lib/actions/create-chat-completion.d.ts.map +0 -1
  8. package/src/lib/actions/create-chat-completion.js +0 -85
  9. package/src/lib/actions/create-chat-completion.js.map +0 -1
  10. package/src/lib/actions/create-embeddings.d.ts +0 -10
  11. package/src/lib/actions/create-embeddings.d.ts.map +0 -1
  12. package/src/lib/actions/create-embeddings.js +0 -76
  13. package/src/lib/actions/create-embeddings.js.map +0 -1
  14. package/src/lib/actions/list-models.d.ts +0 -7
  15. package/src/lib/actions/list-models.d.ts.map +0 -1
  16. package/src/lib/actions/list-models.js +0 -34
  17. package/src/lib/actions/list-models.js.map +0 -1
  18. package/src/lib/actions/run-ocr.d.ts +0 -16
  19. package/src/lib/actions/run-ocr.d.ts.map +0 -1
  20. package/src/lib/actions/run-ocr.js +0 -203
  21. package/src/lib/actions/run-ocr.js.map +0 -1
  22. package/src/lib/actions/upload-file.d.ts +0 -10
  23. package/src/lib/actions/upload-file.d.ts.map +0 -1
  24. package/src/lib/actions/upload-file.js +0 -81
  25. package/src/lib/actions/upload-file.js.map +0 -1
  26. package/src/lib/common/auth.d.ts +0 -7
  27. package/src/lib/common/auth.d.ts.map +0 -1
  28. package/src/lib/common/auth.js +0 -100
  29. package/src/lib/common/auth.js.map +0 -1
  30. package/src/lib/common/props.d.ts +0 -8
  31. package/src/lib/common/props.d.ts.map +0 -1
  32. package/src/lib/common/props.js +0 -67
  33. package/src/lib/common/props.js.map +0 -1
  34. package/src/lib/common/request.d.ts +0 -13
  35. package/src/lib/common/request.d.ts.map +0 -1
  36. package/src/lib/common/request.js +0 -30
  37. 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",
3
+ "version": "0.2.5",
4
4
  "main": "./src/index.js",
5
- "types": "./src/index.d.ts",
6
- "scripts": {
7
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
8
- "lint": "eslint 'src/**/*.ts'"
9
- },
10
- "dependencies": {
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
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const shared_1 = require("@activepieces/shared");
7
- const create_chat_completion_1 = require("./lib/actions/create-chat-completion");
8
- const create_embeddings_1 = require("./lib/actions/create-embeddings");
9
- const upload_file_1 = require("./lib/actions/upload-file");
10
- const run_ocr_1 = require("./lib/actions/run-ocr");
11
- const list_models_1 = require("./lib/actions/list-models");
12
- const auth_1 = require("./lib/common/auth");
13
- const request_1 = require("./lib/common/request");
14
- const pieces_common_1 = require("@activepieces/pieces-common");
15
- exports.mistralAi = (0, pieces_framework_1.createPiece)({
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 ru=Object.create;var Qe=Object.defineProperty;var nu=Object.getOwnPropertyDescriptor;var ou=Object.getOwnPropertyNames;var iu=Object.getPrototypeOf,au=Object.prototype.hasOwnProperty;var o=(e,t)=>Qe(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}},yn=(e,t)=>{for(var r in t)Qe(e,r,{get:t[r],enumerable:!0})},hn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ou(t))!au.call(e,i)&&i!==r&&Qe(e,i,{get:()=>t[i],enumerable:!(n=nu(t,i))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?ru(iu(e)):{},hn(t||!e||!e.__esModule?Qe(r,"default",{value:e,enumerable:!0}):r,e)),su=e=>hn(Qe({},"__esModule",{value:!0}),e);var Fo=E((jo,Ht)=>{(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],_,L;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(L=d-g,_=":";L--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),d=(function(){let re=s.split(":"),ue=[];for(let Ye=0;Ye<re.length;Ye++)ue.push(parseInt(re[Ye],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,_;for(;m>0;){if(_=g-m,_<0&&(_=0),s[v]>>_!==d[v]>>_)return!1;m-=g,v+=1}return!0}o(y,"matchCIDR");function P(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(P,"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,_,L;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(L=m[_],g&&L!==0)return null;L!==8&&(g=!0),d+=L}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=[],_=0;for(;_<4;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;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,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<4;)v.push(parseInt(m[g],10)&parseInt(_[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),_=[];for(let L=0;L<v.length;L++)g=v[L],_.push(P(g));return _})();if(d=s.match(r.longValue)){if(m=P(d[1]),m>4294967295||m<0)throw new Error("ipaddr: address outside defined range");return(function(){let v=[],_;for(_=0;_<=24;_+=8)v.push(m>>_&255);return v})().reverse()}else return(d=s.match(r.twoOctet))?(function(){let v=d.slice(1,4),_=[];if(m=P(v[1]),m>16777215||m<0)throw new Error("ipaddr: address outside defined range");return _.push(P(v[0])),_.push(m>>16&255),_.push(m>>8&255),_.push(m&255),_})():(d=s.match(r.threeOctet))?(function(){let v=d.slice(1,5),_=[];if(m=P(v[2]),m>65535||m<0)throw new Error("ipaddr: address outside defined range");return _.push(P(v[0])),_.push(P(v[1])),_.push(m>>8&255),_.push(m&255),_})():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,_;for(let L=7;L>=0;L-=1)if(v=this.parts[L],v in m){if(_=m[v],g&&_!==0)return null;_!==16&&(g=!0),d+=_}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,_;for(;_=d.exec(g);)_[0].length>v&&(m=_.index,v=_[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=[],_=0;for(;_<16;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;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,_;try{for(d=this.parseCIDR(s),m=d[0].toByteArray(),_=this.subnetMaskFromPrefixLength(d[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch(L){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${L})`)}},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,_,L;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))&&(L=m[6]||"",d=m[1],m[1].endsWith("::")||(d=d.slice(0,-1)),d=f(d+L,6),d.parts)){for(_=[parseInt(m[2]),parseInt(m[3]),parseInt(m[4]),parseInt(m[5])],g=0;g<_.length;g++)if(v=_[g],!(0<=v&&v<=255))return null;return d.parts.push(_[0]<<8|_[1]),d.parts.push(_[2]<<8|_[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,_,L;g==null&&(g="unicast");for(v in d)if(Object.prototype.hasOwnProperty.call(d,v)){for(_=d[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(L=_[m],s.kind()===L[0].kind()&&s.match.apply(s,L))return v}return g},typeof Ht<"u"&&Ht.exports?Ht.exports=x:e.ipaddr=x})(jo)});var Fi=E((OA,ji)=>{var Li=require("stream").Stream,Zl=require("util");ji.exports=pe;function pe(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(pe,"DelayedStream");Zl.inherits(pe,Li);pe.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var i=e.emit;return e.emit=function(){return r._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(pe.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});pe.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};pe.prototype.resume=function(){this._released||this.release(),this.source.resume()};pe.prototype.pause=function(){this.source.pause()};pe.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};pe.prototype.pipe=function(){var e=Li.prototype.pipe.apply(this,arguments);return this.resume(),e};pe.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};pe.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Hi=E((wA,Vi)=>{var Vl=require("util"),Zi=require("stream").Stream,Bi=Fi();Vi.exports=q;function q(){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(q,"CombinedStream");Vl.inherits(q,Zi);q.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};q.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};q.prototype.append=function(e){var t=q.isStreamLike(e);if(t){if(!(e instanceof Bi)){var r=Bi.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};q.prototype.pipe=function(e,t){return Zi.prototype.pipe.call(this,e,t),this.resume(),e};q.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}};q.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=q.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};q.prototype._pipeNext=function(e){this._currentStream=e;var t=q.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()};q.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};q.prototype.write=function(e){this.emit("data",e)};q.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};q.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")};q.prototype.end=function(){this._reset(),this.emit("end")};q.prototype.destroy=function(){this._reset(),this.emit("close")};q.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};q.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};q.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)};q.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var qi=E((NA,Gi)=>{"use strict";Gi.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 Ji=E(te=>{"use strict";var Jt=qi(),Hl=require("path").extname,Wi=/^\s*([^;\s]*)(?:;|\s|$)/,Gl=/^text\//i;te.charset=Ki;te.charsets={lookup:Ki};te.contentType=ql;te.extension=Wl;te.extensions=Object.create(null);te.lookup=Kl;te.types=Object.create(null);Jl(te.extensions,te.types);function Ki(e){if(!e||typeof e!="string")return!1;var t=Wi.exec(e),r=t&&Jt[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Gl.test(t[1])?"UTF-8":!1}o(Ki,"charset");function ql(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(ql,"contentType");function Wl(e){if(!e||typeof e!="string")return!1;var t=Wi.exec(e),r=t&&te.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Wl,"extension");function Kl(e){if(!e||typeof e!="string")return!1;var t=Hl("x."+e).toLowerCase().substr(1);return t&&te.types[t]||!1}o(Kl,"lookup");function Jl(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Jt).forEach(o(function(i){var u=Jt[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(Jt[t[f]].source),P=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(y>P||y===P&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(Jl,"populateMaps")});var Yi=E((UA,Xi)=>{Xi.exports=Xl;function Xl(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(Xl,"defer")});var Hr=E((LA,ea)=>{var Qi=Yi();ea.exports=Yl;function Yl(e){var t=!1;return Qi(function(){t=!0}),o(function(n,i){t?e(n,i):Qi(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(Yl,"async")});var Gr=E((FA,ta)=>{ta.exports=Ql;function Ql(e){Object.keys(e.jobs).forEach(ep.bind(e)),e.jobs={}}o(Ql,"abort");function ep(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(ep,"clean")});var qr=E((ZA,na)=>{var ra=Hr(),tp=Gr();na.exports=rp;function rp(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=np(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?tp(r):r.results[i]=c,n(u,r.results))})}o(rp,"iterate");function np(e,t,r,n){var i;return e.length==2?i=e(r,ra(n)):i=e(r,t,ra(n)),i}o(np,"runJob")});var Wr=E((HA,oa)=>{oa.exports=op;function op(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(op,"state")});var Kr=E((qA,ia)=>{var ip=Gr(),ap=Hr();ia.exports=sp;function sp(e){Object.keys(this.jobs).length&&(this.index=this.size,ip(this),ap(e)(null,this.results))}o(sp,"terminator")});var sa=E((KA,aa)=>{var up=qr(),cp=Wr(),lp=Kr();aa.exports=pp;function pp(e,t,r){for(var n=cp(e);n.index<(n.keyedList||e).length;)up(e,t,n,function(i,u){if(i){r(i,u);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return lp.bind(n,r)}o(pp,"parallel")});var Jr=E((XA,Xt)=>{var ua=qr(),dp=Wr(),mp=Kr();Xt.exports=fp;Xt.exports.ascending=ca;Xt.exports.descending=gp;function fp(e,t,r,n){var i=dp(e,r);return ua(e,t,i,o(function u(c,l){if(c){n(c,l);return}if(i.index++,i.index<(i.keyedList||e).length){ua(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),mp.bind(i,n)}o(fp,"serialOrdered");function ca(e,t){return e<t?-1:e>t?1:0}o(ca,"ascending");function gp(e,t){return-1*ca(e,t)}o(gp,"descending")});var pa=E((QA,la)=>{var yp=Jr();la.exports=hp;function hp(e,t,r){return yp(e,t,null,r)}o(hp,"serial")});var ma=E((tz,da)=>{da.exports={parallel:sa(),serial:pa(),serialOrdered:Jr()}});var Xr=E((rz,fa)=>{"use strict";fa.exports=Object});var ya=E((nz,ga)=>{"use strict";ga.exports=Error});var va=E((oz,ha)=>{"use strict";ha.exports=EvalError});var Pa=E((iz,xa)=>{"use strict";xa.exports=RangeError});var ba=E((az,_a)=>{"use strict";_a.exports=ReferenceError});var Ta=E((sz,Ia)=>{"use strict";Ia.exports=SyntaxError});var Yt=E((uz,Ea)=>{"use strict";Ea.exports=TypeError});var Sa=E((cz,$a)=>{"use strict";$a.exports=URIError});var za=E((lz,Aa)=>{"use strict";Aa.exports=Math.abs});var ka=E((pz,Oa)=>{"use strict";Oa.exports=Math.floor});var Ra=E((dz,wa)=>{"use strict";wa.exports=Math.max});var Da=E((mz,Na)=>{"use strict";Na.exports=Math.min});var Ua=E((fz,Ca)=>{"use strict";Ca.exports=Math.pow});var La=E((gz,Ma)=>{"use strict";Ma.exports=Math.round});var Fa=E((yz,ja)=>{"use strict";ja.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Za=E((vz,Ba)=>{"use strict";var vp=Fa();Ba.exports=o(function(t){return vp(t)||t===0?t:t<0?-1:1},"sign")});var Ha=E((Pz,Va)=>{"use strict";Va.exports=Object.getOwnPropertyDescriptor});var Yr=E((_z,Ga)=>{"use strict";var Qt=Ha();if(Qt)try{Qt([],"length")}catch{Qt=null}Ga.exports=Qt});var Wa=E((bz,qa)=>{"use strict";var er=Object.defineProperty||!1;if(er)try{er({},"a",{value:1})}catch{er=!1}qa.exports=er});var Qr=E((Iz,Ka)=>{"use strict";Ka.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 Ya=E((Ez,Xa)=>{"use strict";var Ja=typeof Symbol<"u"&&Symbol,xp=Qr();Xa.exports=o(function(){return typeof Ja!="function"||typeof Symbol!="function"||typeof Ja("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:xp()},"hasNativeSymbols")});var en=E((Sz,Qa)=>{"use strict";Qa.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var tn=E((Az,es)=>{"use strict";var Pp=Xr();es.exports=Pp.getPrototypeOf||null});var ns=E((zz,rs)=>{"use strict";var _p="Function.prototype.bind called on incompatible ",bp=Object.prototype.toString,Ip=Math.max,Tp="[object Function]",ts=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"),Ep=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"),$p=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");rs.exports=o(function(t){var r=this;if(typeof r!="function"||bp.apply(r)!==Tp)throw new TypeError(_p+r);for(var n=Ep(arguments,1),i,u=o(function(){if(this instanceof i){var P=r.apply(this,ts(n,arguments));return Object(P)===P?P:this}return r.apply(t,ts(n,arguments))},"binder"),c=Ip(0,r.length-n.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(i=Function("binder","return function ("+$p(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((kz,os)=>{"use strict";var Sp=ns();os.exports=Function.prototype.bind||Sp});var tr=E((wz,is)=>{"use strict";is.exports=Function.prototype.call});var rn=E((Rz,as)=>{"use strict";as.exports=Function.prototype.apply});var us=E((Nz,ss)=>{"use strict";ss.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ls=E((Dz,cs)=>{"use strict";var Ap=qe(),zp=rn(),Op=tr(),kp=us();cs.exports=kp||Ap.call(Op,zp)});var ds=E((Cz,ps)=>{"use strict";var wp=qe(),Rp=Yt(),Np=tr(),Dp=ls();ps.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Rp("a function is required");return Dp(wp,Np,t)},"callBindBasic")});var vs=E((Mz,hs)=>{"use strict";var Cp=ds(),ms=Yr(),gs;try{gs=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var nn=!!gs&&ms&&ms(Object.prototype,"__proto__"),ys=Object,fs=ys.getPrototypeOf;hs.exports=nn&&typeof nn.get=="function"?Cp([nn.get]):typeof fs=="function"?o(function(t){return fs(t==null?t:ys(t))},"getDunder"):!1});var Is=E((jz,bs)=>{"use strict";var xs=en(),Ps=tn(),_s=vs();bs.exports=xs?o(function(t){return xs(t)},"getProto"):Ps?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Ps(t)},"getProto"):_s?o(function(t){return _s(t)},"getProto"):null});var on=E((Bz,Ts)=>{"use strict";var Up=Function.prototype.call,Mp=Object.prototype.hasOwnProperty,Lp=qe();Ts.exports=Lp.call(Up,Mp)});var ks=E((Zz,Os)=>{"use strict";var M,jp=Xr(),Fp=ya(),Bp=va(),Zp=Pa(),Vp=ba(),Xe=Ta(),Je=Yt(),Hp=Sa(),Gp=za(),qp=ka(),Wp=Ra(),Kp=Da(),Jp=Ua(),Xp=La(),Yp=Za(),As=Function,an=o(function(e){try{return As('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),_t=Yr(),Qp=Wa(),sn=o(function(){throw new Je},"throwTypeError"),ed=_t?(function(){try{return arguments.callee,sn}catch{try{return _t(arguments,"callee").get}catch{return sn}}})():sn,We=Ya()(),X=Is(),td=tn(),rd=en(),zs=rn(),bt=tr(),Ke={},nd=typeof Uint8Array>"u"||!X?M:X(Uint8Array),Le={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":We&&X?X([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":Ke,"%AsyncGenerator%":Ke,"%AsyncGeneratorFunction%":Ke,"%AsyncIteratorPrototype%":Ke,"%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%":Fp,"%eval%":eval,"%EvalError%":Bp,"%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%":As,"%GeneratorFunction%":Ke,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":We&&X?X(X([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!We||!X?M:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":jp,"%Object.getOwnPropertyDescriptor%":_t,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":Zp,"%ReferenceError%":Vp,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!We||!X?M:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":We&&X?X(""[Symbol.iterator]()):M,"%Symbol%":We?Symbol:M,"%SyntaxError%":Xe,"%ThrowTypeError%":ed,"%TypedArray%":nd,"%TypeError%":Je,"%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%":Hp,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":bt,"%Function.prototype.apply%":zs,"%Object.defineProperty%":Qp,"%Object.getPrototypeOf%":td,"%Math.abs%":Gp,"%Math.floor%":qp,"%Math.max%":Wp,"%Math.min%":Kp,"%Math.pow%":Jp,"%Math.round%":Xp,"%Math.sign%":Yp,"%Reflect.getPrototypeOf%":rd};if(X)try{null.error}catch(e){Es=X(X(e)),Le["%Error.prototype%"]=Es}var Es,od=o(function e(t){var r;if(t==="%AsyncFunction%")r=an("async function () {}");else if(t==="%GeneratorFunction%")r=an("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=an("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 Le[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"]},It=qe(),rr=on(),id=It.call(bt,Array.prototype.concat),ad=It.call(zs,Array.prototype.splice),Ss=It.call(bt,String.prototype.replace),nr=It.call(bt,String.prototype.slice),sd=It.call(bt,RegExp.prototype.exec),ud=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,cd=/\\(\\)?/g,ld=o(function(t){var r=nr(t,0,1),n=nr(t,-1);if(r==="%"&&n!=="%")throw new Xe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Xe("invalid intrinsic syntax, expected opening `%`");var i=[];return Ss(t,ud,function(u,c,l,f){i[i.length]=l?Ss(f,cd,"$1"):c||u}),i},"stringToPath"),pd=o(function(t,r){var n=t,i;if(rr($s,n)&&(i=$s[n],n="%"+i[0]+"%"),rr(Le,n)){var u=Le[n];if(u===Ke&&(u=od(n)),typeof u>"u"&&!r)throw new Je("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new Xe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Os.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new Je("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Je('"allowMissing" argument must be a boolean');if(sd(/^%?[^%]*%?$/,t)===null)throw new Xe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ld(t),i=n.length>0?n[0]:"",u=pd("%"+i+"%",r),c=u.name,l=u.value,f=!1,y=u.alias;y&&(i=y[0],ad(n,id([0,1],y)));for(var P=1,I=!0;P<n.length;P+=1){var x=n[P],s=nr(x,0,1),d=nr(x,-1);if((s==='"'||s==="'"||s==="`"||d==='"'||d==="'"||d==="`")&&s!==d)throw new Xe("property names with quotes must have matching quotes");if((x==="constructor"||!I)&&(f=!0),i+="."+x,c="%"+i+"%",rr(Le,c))l=Le[c];else if(l!=null){if(!(x in l)){if(!r)throw new Je("base intrinsic for "+t+" exists, but the property is not available.");return}if(_t&&P+1>=n.length){var g=_t(l,x);I=!!g,I&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[x]}else I=rr(l,x),l=l[x];I&&!f&&(Le[c]=l)}}return l},"GetIntrinsic")});var Rs=E((Hz,ws)=>{"use strict";var dd=Qr();ws.exports=o(function(){return dd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Cs=E((qz,Ds)=>{"use strict";var md=ks(),Ns=md("%Object.defineProperty%",!0),fd=Rs()(),gd=on(),yd=Yt(),or=fd?Symbol.toStringTag:null;Ds.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 yd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");or&&(n||!gd(t,or))&&(Ns?Ns(t,or,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[or]=r)},"setToStringTag")});var Ms=E((Kz,Us)=>{"use strict";var hd=Function.prototype.call,vd=Object.prototype.hasOwnProperty,xd=qe();Us.exports=xd.call(hd,vd)});var js=E((Jz,Ls)=>{"use strict";Ls.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var dn=E((Xz,Bs)=>{"use strict";var pn=Hi(),Pd=require("util"),un=require("path"),_d=require("http"),bd=require("https"),Id=require("url").parse,Td=require("fs"),Ed=require("stream").Stream,$d=require("crypto"),cn=Ji(),Sd=ma(),Ad=Cs(),Re=Ms(),ln=js();function Fs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Fs,"escapeHeaderParam");function j(e){if(!(this instanceof j))return new j(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],pn.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(j,"FormData");Pd.inherits(j,pn);j.LINE_BREAK=`\r
2
+ `;j.DEFAULT_CONTENT_TYPE="application/octet-stream";j.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=pn.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)};j.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)+j.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Re(t,"httpVersion"))&&!(t instanceof Ed))&&(r.knownLength||this._valuesToMeasure.push(t))};j.prototype._lengthRetriever=function(e,t){Re(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Td.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Re(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Re(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};j.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="'+Fs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&ln(c,r.header);var l;for(var f in c)if(Re(c,f)){if(l=c[f],l==null)continue;Array.isArray(l)||(l=[l]),l.length&&(u+=f+": "+l.join("; ")+j.LINE_BREAK)}return"--"+this.getBoundary()+j.LINE_BREAK+u+j.LINE_BREAK};j.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=un.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=un.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Re(e,"httpVersion")&&(r=un.basename(e.client._httpMessage.path||"")),r)return'filename="'+Fs(r)+'"'};j.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=cn.lookup(e.name)),!r&&e&&e.path&&(r=cn.lookup(e.path)),!r&&e&&e.readable&&Re(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=cn.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=j.DEFAULT_CONTENT_TYPE),r};j.prototype._multiPartFooter=function(){return function(e){var t=j.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};j.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+j.LINE_BREAK};j.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Re(e,t)&&(r[t.toLowerCase()]=e[t]);return r};j.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};j.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};j.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(j.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};j.prototype._generateBoundary=function(){this._boundary="--------------------------"+$d.randomBytes(12).toString("hex")};j.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};j.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};j.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}Sd.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};j.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=Id(e),n=ln({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=ln(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=bd.request(n):r=_d.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,P){return r.removeListener("error",f),r.removeListener("response",l),t.call(this,y,P)},"callback");l=f.bind(this,null),r.on("error",f),r.on("response",l)}}.bind(this)),r};j.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};j.prototype.toString=function(){return"[object FormData]"};Ad(j.prototype,"FormData");Bs.exports=j});var Kd={};yn(Kd,{mistralAi:()=>Wd});module.exports=su(Kd);var uu=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,P=Object.keys(y);for(let I=0;I<P.length;I++){let x=P[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 P of y._zod.deferred)P();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 de=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Et=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ar={};function he(e){return e&&Object.assign(ar,e),ar}o(he,"config");function ur(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(ur,"getEnumValues");function xn(e,t){return typeof t=="bigint"?t.toString():t}o(xn,"jsonStringifyReplacer");function St(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(St,"cached");function Pn(e){return e==null}o(Pn,"nullish");function At(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(At,"cleanRegex");var vn=Symbol("evaluating");function W(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==vn)return n===void 0&&(n=vn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(W,"defineLazy");var cr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(et,"isObject");var cu=St(()=>{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(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(et(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(_n,"isPlainObject");var bn=new Set(["string","number","symbol"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(je,"escapeRegex");function zt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(zt,"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 In(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(In,"optionalKeys");var Tn={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 Fe(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(Fe,"aborted");function Te(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(Te,"prefixIssues");function $t(e){return typeof e=="string"?e:e?.message}o($t,"unwrapMessage");function Ee(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=$t(e.inst?._zod.def?.error?.(e))??$t(t?.error?.(e))??$t(r.customError?.(e))??$t(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(Ee,"finalizeIssue");function En(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(En,"getLengthableOrigin");function lr(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o(lr,"issue");var $n=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Sn=b("$ZodError",$n),tt=b("$ZodError",$n,{Parent:Error});var pu=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 de;if(c.issues.length){let l=new(i?.Err??e)(c.issues.map(f=>Ee(f,u,he())));throw cr(l,i?.callee),l}return c.value},"_parse"),Ot=pu(tt),du=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=>Ee(f,u,he())));throw cr(l,i?.callee),l}return c.value},"_parseAsync"),kt=du(tt),mu=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 de;return u.issues.length?{success:!1,error:new(e??Sn)(u.issues.map(c=>Ee(c,i,he())))}:{success:!0,data:u.value}},"_safeParse"),rt=mu(tt),fu=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=>Ee(c,i,he())))}:{success:!0,data:u.value}},"_safeParseAsync"),nt=fu(tt);var gu="(?:(?:\\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])))",yu=new RegExp(`^${gu}$`);var An=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),zn=/^-?\d+n?$/,On=/^-?\d+$/,pr=/^-?\d+(?:\.\d+)?$/,kn=/^(?:true|false)$/i;var $e=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),hu={number:"number",bigint:"bigint",object:"date"};var wn=b("$ZodCheckGreaterThan",(e,t)=>{$e.init(e,t);let r=hu[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 Rn=b("$ZodCheckNumberFormat",(e,t)=>{$e.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,u]=Tn[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=On)}),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 Nn=b("$ZodCheckMinLength",(e,t)=>{var r;$e.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Pn(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=En(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var dr=b("$ZodCheckStringFormat",(e,t)=>{var r,n;$e.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=()=>{})}),Dn=b("$ZodCheckRegex",(e,t)=>{dr.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 Un={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=Un;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=Fe(c),P;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 de;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(y||(y=Fe(c,x)))});else{if(c.issues.length===x)continue;y||(y=Fe(c,x))}}return P?P.then(()=>c):c},"runChecks"),u=o((c,l,f)=>{if(Fe(c))return c.aborted=!0,c;let y=i(l,n,f);if(y instanceof Promise){if(f.async===!1)throw new de;return y.then(P=>e._zod.parse(P,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(P=>u(P,c,l)):u(y,c,l)}let f=e._zod.parse(c,l);if(f instanceof Promise){if(l.async===!1)throw new de;return f.then(y=>i(y,n,l))}return i(f,n,l)}}W(e,"~standard",()=>({validate:o(i=>{try{let u=rt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return nt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Nt=b("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??An(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}}),mr=b("$ZodStringFormat",(e,t)=>{dr.init(e,t),Nt.init(e,t)});var Bn=b("$ZodURL",(e,t)=>{mr.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 fr=b("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??pr,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}}),Zn=b("$ZodNumberFormat",(e,t)=>{Rn.init(e,t),fr.init(e,t)}),gr=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}}),Vn=b("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=zn,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 Hn=b("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Gn=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}}),Wn=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 Mn(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}o(Mn,"handleArrayResult");var Kn=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=>Mn(y,r,c))):Mn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Rt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...Te(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Rt,"handlePropertyResult");function vu(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=In(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(vu,"normalizeDef");function xu(e,t,r,n,i,u){let c=[],l=i.keySet,f=i.catchall._zod,y=f.def.type,P=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=>Rt(s,r,I,t,P))):Rt(x,r,I,t,P)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:u}),e.length?Promise.all(e).then(()=>r):r}o(xu,"handleCatchall");var Jn=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=St(()=>vu(t));W(e._zod,"propValues",()=>{let l=t.shape,f={};for(let y in l){let P=l[y]._zod;if(P.values){f[y]??(f[y]=new Set);for(let I of P.values)f[y].add(I)}}return f});let i=et,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 P=[],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?P.push(g.then(m=>Rt(m,l,x,y,d))):Rt(g,l,x,y,d)}return u?xu(P,y,l,f,n.value,e):P.length?Promise.all(P).then(()=>l):l}});function Ln(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=>!Fe(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=>Ee(c,n,he())))}),t)}o(Ln,"handleUnionResults");var yr=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=>At(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=>Ln(f,i,e,u)):Ln(l,i,e,u)}});var Xn=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,yr.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=St(()=>{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(!et(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 Yn=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 P=t.valueType._zod.run({value:i[y],issues:[]},n);P instanceof Promise?u.push(P.then(I=>{I.issues.length&&r.issues.push(...Te(y,I.issues)),r.value[y]=I.value})):(P.issues.length&&r.issues.push(...Te(y,P.issues)),r.value[y]=P.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"&&pr.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=>Ee(I,n,he())),input:l,path:[l],inst:e});continue}let P=t.valueType._zod.run({value:i[l],issues:[]},n);P instanceof Promise?u.push(P.then(I=>{I.issues.length&&r.issues.push(...Te(l,I.issues)),r.value[f.value]=I.value})):(P.issues.length&&r.issues.push(...Te(l,P.issues)),r.value[f.value]=P.value)}}return u.length?Promise.all(u).then(()=>r):r}});var Qn=b("$ZodEnum",(e,t)=>{H.init(e,t);let r=ur(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>bn.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}}),eo=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 to=b("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Et(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 de;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 ro=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(`^(${At(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 no=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(`^(${At(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 oo=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=>wt(c,t.in,n)):wt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>wt(u,t.out,n)):wt(i,t.out,n)}});function wt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(wt,"handlePipeResult");var io=b("$ZodCustom",(e,t)=>{$e.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=>Fn(u,r,n,e));Fn(i,r,n,e)}});function Fn(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(lr(i))}}o(Fn,"handleRefineResult");var so;var hr=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 uo(){return new hr}o(uo,"registry");(so=globalThis).__zod_globalRegistry??(so.__zod_globalRegistry=uo());var vr=globalThis.__zod_globalRegistry;function co(e,t){return new e({type:"string",...Z(t)})}o(co,"_string");function lo(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(lo,"_coercedString");function po(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(po,"_url");function mo(e,t){return new e({type:"number",checks:[],...Z(t)})}o(mo,"_number");function fo(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(fo,"_coercedNumber");function go(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}o(go,"_int");function yo(e,t){return new e({type:"boolean",...Z(t)})}o(yo,"_boolean");function ho(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(ho,"_coercedBoolean");function vo(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(vo,"_coercedBigint");function xo(e){return new e({type:"any"})}o(xo,"_any");function Po(e){return new e({type:"unknown"})}o(Po,"_unknown");function _o(e,t){return new e({type:"void",...Z(t)})}o(_o,"_void");function bo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(bo,"_coercedDate");function Dt(e,t){return new wn({check:"greater_than",...Z(t),value:e,inclusive:!0})}o(Dt,"_gte");function ce(e,t){return new Nn({check:"min_length",...Z(t),minimum:e})}o(ce,"_minLength");function Se(e,t){return new Dn({check:"string_format",format:"regex",...Z(t),pattern:e})}o(Se,"_regex");function Io(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Io,"_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)=>Ot(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>rt(e,r,n),e.parseAsync=async(r,n)=>kt(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>nt(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)=>zt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Ut=b("ZodMiniString",(e,t)=>{Nt.init(e,t),K.init(e,t)});function a(e){return co(Ut,e)}o(a,"string");var To=b("ZodMiniStringFormat",(e,t)=>{mr.init(e,t),Ut.init(e,t)});var wu=b("ZodMiniURL",(e,t)=>{Bn.init(e,t),To.init(e,t)});function Eo(e){return po(wu,e)}o(Eo,"url");var Mt=b("ZodMiniNumber",(e,t)=>{fr.init(e,t),K.init(e,t)});function Y(e){return mo(Mt,e)}o(Y,"number");var Ru=b("ZodMiniNumberFormat",(e,t)=>{Zn.init(e,t),Mt.init(e,t)});function $o(e){return go(Ru,e)}o($o,"int");var xr=b("ZodMiniBoolean",(e,t)=>{gr.init(e,t),K.init(e,t)});function B(e){return yo(xr,e)}o(B,"boolean");var So=b("ZodMiniBigInt",(e,t)=>{Vn.init(e,t),K.init(e,t)});var Nu=b("ZodMiniAny",(e,t)=>{Hn.init(e,t),K.init(e,t)});function it(){return xo(Nu)}o(it,"any");var Du=b("ZodMiniUnknown",(e,t)=>{Gn.init(e,t),K.init(e,t)});function k(){return Po(Du)}o(k,"unknown");var Cu=b("ZodMiniVoid",(e,t)=>{qn.init(e,t),K.init(e,t)});function Ao(e){return _o(Cu,e)}o(Ao,"_void");var zo=b("ZodMiniDate",(e,t)=>{Wn.init(e,t),K.init(e,t)});var Uu=b("ZodMiniArray",(e,t)=>{Kn.init(e,t),K.init(e,t)});function N(e,t){return new Uu({type:"array",element:e,...Z(t)})}o(N,"array");var Mu=b("ZodMiniObject",(e,t)=>{Jn.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 Mu(r)}o(p,"object");var Lu=b("ZodMiniUnion",(e,t)=>{yr.init(e,t),K.init(e,t)});function D(e,t){return new Lu({type:"union",options:e,...Z(t)})}o(D,"union");var ju=b("ZodMiniDiscriminatedUnion",(e,t)=>{Xn.init(e,t),K.init(e,t)});function Ae(e,t,r){return new ju({type:"union",options:t,discriminator:e,...Z(r)})}o(Ae,"discriminatedUnion");var Fu=b("ZodMiniRecord",(e,t)=>{Yn.init(e,t),K.init(e,t)});function w(e,t,r){return new Fu({type:"record",keyType:e,valueType:t,...Z(r)})}o(w,"record");var Bu=b("ZodMiniEnum",(e,t)=>{Qn.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 Bu({type:"enum",entries:r,...Z(t)})}o(U,"_enum");var Zu=b("ZodMiniLiteral",(e,t)=>{eo.init(e,t),K.init(e,t)});function $(e,t){return new Zu({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o($,"literal");var Vu=b("ZodMiniTransform",(e,t)=>{to.init(e,t),K.init(e,t)});function ze(e){return new Vu({type:"transform",transform:e})}o(ze,"transform");var Hu=b("ZodMiniOptional",(e,t)=>{ro.init(e,t),K.init(e,t)});function h(e){return new Hu({type:"optional",innerType:e})}o(h,"optional");var Gu=b("ZodMiniNullable",(e,t)=>{no.init(e,t),K.init(e,t)});function at(e){return new Gu({type:"nullable",innerType:e})}o(at,"nullable");var qu=b("ZodMiniPipe",(e,t)=>{oo.init(e,t),K.init(e,t)});function Oe(e,t){return new qu({type:"pipe",in:e,out:t})}o(Oe,"pipe");var Wu=b("ZodMiniCustom",(e,t)=>{io.init(e,t),K.init(e,t)});function Lt(e,t){return Io(Wu,e??(()=>!0),t)}o(Lt,"custom");var st={};yn(st,{bigint:()=>ec,boolean:()=>Qu,date:()=>tc,number:()=>Yu,string:()=>Xu});function Xu(e){return lo(Ut,e)}o(Xu,"string");function Yu(e){return fo(Mt,e)}o(Yu,"number");function Qu(e){return ho(xr,e)}o(Qu,"boolean");function ec(e){return vo(So,e)}o(ec,"bigint");function tc(e){return bo(zo,e)}o(tc,"date");var _r=p({retryOnFailure:p({defaultValue:h(B()),hide:h(B())}),continueOnFailure:p({defaultValue:h(B()),hide:h(B())})}),Pr=class{constructor(t,r,n,i,u,c,l,f,y,P,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=P;this.aiMetadata=I}static{o(this,"IAction")}},ae=o(e=>new Pr(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(it())}),"TPropertyValue");var ne=p({...F.shape,...C(a(),"SHORT_TEXT").shape}),ve=p({...F.shape,...C(a(),"LONG_TEXT").shape});var ko=p({label:a(),value:k()}),jt=p({disabled:h(B()),placeholder:h(a()),options:N(ko)});var oe=p({...F.shape,options:jt,...C(k(),"STATIC_DROPDOWN").shape}),xe=p({...F.shape,options:jt,...C(N(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var br=p({...F.shape,...C(k(),"DROPDOWN").shape,refreshers:N(a())}),ut=p({...F.shape,...C(N(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:N(a())});var Pe=p({...F.shape,...C(B(),"CHECKBOX").shape});var _e=p({...F.shape,...C(Y(),"NUMBER").shape});var ct=p({...F.shape,streaming:h(B()),...C(k(),"FILE").shape});var lt=p({...F.shape,...C(a(),"DATE_TIME").shape});var wo=w(a(),D([ne,ve,oe,ut,xe,Pe,_e,ct,lt])),pt=p({...F.shape,properties:wo,...C(N(k()),"ARRAY").shape});var dt=p({...F.shape,...C(D([w(a(),k())]),"JSON").shape});var Ro=D([ne,oe,dt,pt,xe]),nc=w(a(),Ro),Ir=p({refreshers:N(a()),...F.shape,...C(k(),"DYNAMIC").shape});var Ft=p({...F.shape,...C(Ao(),"MARKDOWN").shape});var mt=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(mt||{}),Be=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Be||{}),Ze=(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))(Ze||{});var ft=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ft||{}),Tr="both_client_credentials_and_authorization_code";var De=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(De||{}),gt=(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))(gt||{}),oc=p({strategy:U(gt),paramName:h(a())}),yt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(yt||{});var Bt=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Bt||{}),No=p({status:h(Y()),body:h(k()),headers:h(w(a(),a()))}),Do=p({type:$("DELAY"),resumeDateTime:a(),requestIdToReply:h(a()),handlerId:h(a()),streamStepProgress:h(U(Bt))}),Co=p({type:$("WEBHOOK"),requestId:a(),requestIdToReply:h(a()),response:No,handlerId:h(a()),streamStepProgress:h(U(Bt))}),ic=D([Do,Co]);var ac=p({body:k(),rawBody:h(k()),headers:w(a(),a()),queryParams:w(a(),a())});function le(e){return e==null}o(le,"isNil");function ht(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(ht,"isEmpty");function Zt(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(Zt,"assertNotNullOrUndefined");var Er=Ne(require("crypto"),1);var sc=128,Ce,Ve,uc=o(e=>{!Ce||Ce.length<e?(Ce=Buffer.allocUnsafe(e*sc),Er.default.randomFillSync(Ce),Ve=0):Ve+e>Ce.length&&(Er.default.randomFillSync(Ce),Ve=0),Ve+=e},"fillPool"),cc=o(e=>(uc(e|=0),Ce.subarray(Ve-e,Ve)),"random"),lc=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"),Mo=o((e,t=21)=>lc(e,t,cc),"customAlphabet");var pc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Lo=21,Ob=a().check(Se(new RegExp(`^[0-9a-zA-Z]{${Lo}}$`))),dc=Mo(pc,Lo);var ke=Oe(ze(e=>e instanceof Date?e.toISOString():e),a()),se={id:a(),created:ke,updated:ke},V=o(e=>h(at(e)),"Nullable");function $r(e){return h(at(U(e)))}o($r,"NullableEnum");var Rb=Oe(ze(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),h(B())),Vt=o(e=>Oe(ze(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),h(N(e))),"OptionalArrayFromQuery");var Cb=w(a(),k());var vt=(P=>(P.OPENAI="openai",P.OPENROUTER="openrouter",P.ANTHROPIC="anthropic",P.AZURE="azure",P.GOOGLE="google",P.ACTIVEPIECES="activepieces",P.CLOUDFLARE_GATEWAY="cloudflare-gateway",P.CUSTOM="custom",P.BEDROCK="bedrock",P.MISTRAL="mistral",P))(vt||{});var Wb=a().check(Se(/^#[0-9A-Fa-f]{6}$/));var Jb=p({filename:a(),data:k(),type:$("file"),mimetype:h(a())});var mc=Ne(Fo());var nI=p({...se,name:a(),permissions:N(a()),platformId:V(a()),type:a(),userCount:h(Y())});var Bo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Bo||{}),Sr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Sr||{}),Ar=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ar||{});var zr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(zr||{});var Or=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Or||{});var fc=p({mode:U(Bo),value:k()}),gc=p({auth:h(a()),fields:w(a(),fc)}),yc=p({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:h(gc)}),hc=p({type:$("PIECE"),toolName:a().check(ce(1)),pieceMetadata:yc}),vc=p({type:$("none")}),xc=p({type:$("access_token"),accessToken:a()}),Pc=p({type:$("api_key"),apiKey:a(),apiKeyHeader:a()}),_c=p({type:$("headers"),headers:w(a(),a())}),bc=Ae("type",[vc,xc,Pc,_c]),Zo=p({type:$("FLOW"),toolName:a().check(ce(1)),externalFlowId:a(),flowDisplayName:h(a())}),Vo=p({type:$("MCP"),toolName:a().check(ce(1)),serverUrl:Eo(),protocol:U(Ar),auth:bc}),Ho=p({type:$("KNOWLEDGE_BASE"),toolName:a().check(ce(1)),sourceType:U(Sr),sourceId:a(),sourceName:a()}),Ic=Ae("type",[hc,Zo,Vo,Ho]),Tc=p({displayName:a(),description:h(a()),type:U(zr)}),Go=p({type:$("MARKDOWN"),markdown:a()}),He={type:$("TOOL_CALL"),input:V(w(a(),k())),output:h(k()),toolName:a(),status:U(Or),toolCallId:a(),startTime:a(),endTime:h(a())},NI=p(He),qo=Ae("toolCallType",[p({...He,toolCallType:$("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),p({...He,toolCallType:$("FLOW"),displayName:a(),externalFlowId:a()}),p({...He,toolCallType:$("MCP"),displayName:a(),serverUrl:a()}),p({...He,toolCallType:$("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),p({...He,toolCallType:$("UNKNOWN"),displayName:a()})]),Ec=D([Go,qo]);var kr=(r=>(r.IMAGE="image",r.TEXT="text",r))(kr||{}),be=p({apiKey:a()}),$c=be,Sc=p({apiKey:a(),apiKeyHash:a()}),Ac=be,zc=be,Oc=be,kc=be,wc=be,Rc=be,Nc=be,Yo=p({accessKeyId:a().check(ce(1)),secretAccessKey:a().check(ce(1))}),Dc=p({}),Cc=p({}),Uc=p({}),Mc=p({}),Lc=p({}),jc=p({}),Qo=p({modelId:a(),modelName:a(),modelType:U(kr)}),ei=p({apiKeyHeader:a(),baseUrl:a(),models:N(Qo),defaultHeaders:h(w(a(),a()))}),ti=p({accountId:a(),gatewayId:a(),models:N(Qo),vertexProject:h(a()),vertexRegion:h(a())}),ri=p({resourceName:a(),apiVersion:Oe(ze(e=>typeof e=="string"&&e.trim().length===0?void 0:e),h(a()))}),ni=p({region:a().check(ce(1))}),Fc=D([$c,Oc,kc,wc,Rc,zc,Ac,Sc,Yo,Nc]),oi=D([ei,ti,ri,ni,Dc,Uc,Mc,Lc,Cc,jc]),Bc=p({id:a(),name:a(),type:U(kr)}),Zc=p({id:a(),name:a(),provider:U(vt),config:oi,enabledForChat:B()}),Vc=p({provider:U(vt),config:oi,auth:Fc,platformId:a()});var MI={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Wo=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Hc=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Gc=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Ko=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],qc=["grok-4.20","grok-4.1-fast"],Wc={openai:Wo,anthropic:Hc,google:Ko,activepieces:[...Gc.map(e=>`anthropic/${e}`),...Wo.map(e=>`openai/${e}`),...Ko.map(e=>`google/${e}`),...qc.map(e=>`x-ai/${e}`)]};var Jo=128e3,Kc={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function Jc({provider:e}){return e?Kc[e]??Jo:Jo}o(Jc,"getMaxContextTokens");var Xo={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},Xc={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},Yc=new Set(["anthropic","mistral"]);function me(e){return{chatModels:Wc[e],maxContextTokens:Jc({provider:e}),defaultEmbeddingModel:Xo[e],supportsEmbedding:Xo[e]!==void 0,supportsImageGeneration:!Yc.has(e),webSearch:Xc[e]}}o(me,"buildProviderCapabilities");var Qc={openai:me("openai"),anthropic:me("anthropic"),openrouter:me("openrouter"),azure:me("azure"),google:me("google"),"cloudflare-gateway":me("cloudflare-gateway"),custom:me("custom"),bedrock:me("bedrock"),mistral:me("mistral"),activepieces:me("activepieces")};var el=p({base64Url:a(),fileName:a(),extension:h(a())}),tl=p({mimeType:a(),url:a(),fileName:h(a())}),wr=D([el,tl]);var rl=D([p({type:$("file"),value:wr}),p({type:$("markdown"),value:a(),files:h(N(wr))})]),nl=p({sessionId:a(),message:a(),files:h(N(a()))});var ai=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ai||{}),si=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(si||{}),Rr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Rr||{});var ol=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()})]),il=p({...se,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:$r(si),trigger:$r(ai)}),al=p({...se,tableId:a(),projectId:a(),cells:w(a(),p({updated:a(),created:a(),value:k(),fieldName:a()}))}),sl=p({events:N(U(Rr)),webhookUrl:a(),flowId:a()}),ul=p({fields:N(p({id:a(),name:a()})),rows:N(w(a(),a())),name:a()}),cl=p({projectId:a(),limit:h(st.number()),cursor:h(a()),name:h(a()),externalIds:Vt(a()),folderId:h(a()),folderIds:Vt(a())}),ll=p({records:N(N(p({fieldId:a(),value:ci()}))),tableId:a()}),pl=p({cells:h(N(p({fieldId:a(),value:ci()}))),tableId:a(),agentUpdate:h(B())}),ui=Ae("operator",[Ue("eq"),Ue("neq"),Ue("gt"),Ue("gte"),Ue("lt"),Ue("lte"),Ue("co"),ii("exists"),ii("not_exists")]),dl=p({tableId:a(),limit:h(st.number()),cursor:h(a()),filters:Vt(ui)});function ci(){return Oe(ze(e=>e==null?e:String(e)),at(a()))}o(ci,"coerceToString");function Ue(e){return p({fieldId:a(),operator:$(e),value:a()})}o(Ue,"valueFilter");function ii(e){return p({fieldId:a(),operator:$(e)})}o(ii,"existenceFilter");var ml=p({status:h(Y()),body:h(k()),headers:h(w(a(),a()))}),fl=p({...se,deleted:V(ke),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var li=p({name:a(),description:h(a()),type:a(),required:B()}),gl=p({pieceName:a(),triggerName:a(),input:p({toolName:a(),toolDescription:a(),inputSchema:N(li),returnsResponse:B()})});var pi="^[0-9]+\\.[0-9]+\\.[0-9]+$",nT=new RegExp(pi),hl="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",oT=a().check(Se(new RegExp(pi))),iT=a().check(Se(new RegExp(hl))),vl=p({packageType:$("ARCHIVE"),pieceType:U(Be),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),di=p({packageType:$("REGISTRY"),pieceType:$("OFFICIAL"),pieceName:a(),pieceVersion:a()}),mi=p({packageType:$("REGISTRY"),pieceType:$("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),aT=D([di,mi]),sT=D([vl,di,mi]);var xl=Ae("type",[p({type:$("CRON_EXPRESSION"),cronExpression:a(),timezone:a()}),p({type:$("INTERVAL"),intervalMs:$o().check(Dt(6e4))})]),uT=p({...se,type:U(De),projectId:a(),flowId:a(),triggerName:a(),schedule:V(xl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),fi=(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))(fi||{}),gi=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(gi||{}),yi=(r=>(r.S3="S3",r.DB="DB",r))(yi||{}),cT=p({...se,projectId:V(a()),platformId:V(a()),type:U(fi),compression:U(gi),data:h(k()),location:U(yi),size:V(Y()),fileName:V(a()),s3Key:V(a()),metadata:V(w(a(),a()))}),hi=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(hi||{}),vi=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(vi||{}),lT=p({id:a(),email:a(),firstName:a(),status:U(vi),externalId:V(a()),platformId:V(a()),platformRole:U(hi),lastName:a(),created:ke,updated:ke,lastActiveDate:V(ke),imageUrl:V(a())});var Dr=p({...F.shape,...C(w(a(),k()),"OBJECT").shape});var _i=p({...F.shape,...C(a(),"COLOR").shape});var Cr=D([ne,ve,Ft,Pe,oe,xe,br,ut,Ir,_e,pt,Dr,dt,lt,ct,_i]),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 fe=p({displayName:a(),description:h(a())});var bi=p({username:a(),password:a()}),Ur=p({...fe.shape,username:p({displayName:a(),description:h(a())}),password:p({displayName:a(),description:h(a())}),...C(bi,"BASIC_AUTH").shape});var Il=w(a(),D([ne,ve,_e,Pe,oe])),Mr=p({...fe.shape,props:Il,...C(k(),"CUSTOM_AUTH").shape});var Me=p({...fe.shape,...C(p({auth:a()}),"SECRET_TEXT").shape});var Tl=w(a(),D([ne,ve,Me,_e,Pe,oe,xe,Ft])),Ii=p({...fe.shape,props:Tl,...C(k(),"OIDC").shape});var Lr=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Lr||{}),Ti=D([ne,Me,oe]),Ei=w(a(),Ti),El=p({props:h(w(a(),Ti)),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(Lr)),grantType:h(D([U(ft),$(Tr)])),extra:h(w(a(),a()))}),$i=p({access_token:a(),props:h(Ei),data:w(a(),it())}),jr=p({...fe.shape,...El.shape,...C($i,"OAUTH2").shape});var Ge=D([Ur,Mr,Ii,jr,Me]),xt="Connection",we={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||xt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||xt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||xt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||xt}},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 $l=p({...F.shape,...C(k(),"CUSTOM").shape,code:a()});var Sl=D([Cr,Ge]),Fr=w(a(),Sl),u$=w(a(),Cr);var Si=D([p({strategy:$("CRON"),cronExpression:a()}),p({strategy:$("NONE")})]);var Ai="2",Gt="0.82.0";var Br=class{constructor(t,r,n,i,u,c,l,f,y=Gt,P,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=P;this.description=I;this.deprecated=x;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ai}),"getContextInfo");(!Al(y)||zl(y,Gt))&&(this.minimumSupportedRelease=Gt),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}},zi=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 Br(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 Al(e){return/^\d+\.\d+\.\d+$/.test(e)}o(Al,"isValidSimpleSemver");function zl(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(zl,"isSemverLessThan");var Ol=h(w(a(),w(a(),a()))),Oi=p({id:h(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:N(a()),platformId:h(a()),directoryPath:h(a()),auth:h(D([Ge,N(Ge)])),version:a(),categories:h(N(U(Ze))),minimumSupportedRelease:h(a()),maximumSupportedRelease:h(a()),deprecated:h(B()),i18n:Ol}),kl=U(["human","ai","both"]),ki=p({description:h(a()),idempotent:h(B())}),wi=p({name:a(),displayName:a(),description:a(),props:Fr,requireAuth:B(),errorHandlingOptions:h(_r),outputSchema:h(Lt()),audience:h(kl),aiMetadata:h(ki)}),Ri=p({name:a(),displayName:a(),description:a(),props:Fr,errorHandlingOptions:h(_r),type:U(De),sampleData:k(),handshakeConfiguration:h(Lt()),renewConfiguration:h(Si),testStrategy:U(yt),outputSchema:h(Lt()),aiMetadata:h(ki)}),wl=p({...Oi.shape,actions:w(a(),wi),triggers:w(a(),Ri)}),Rl=p({...Oi.shape,actions:Y(),triggers:Y(),suggestedActions:h(N(wi)),suggestedTriggers:h(N(Ri))}),Ni=p({projectUsage:Y(),pieceType:U(Be),packageType:U(mt),platformId:h(a()),archiveId:h(a())}),uS=p({...wl.shape,...Ni.shape}),cS=p({...Rl.shape,...Ni.shape}),lS=p({name:a(),version:a()});var Nl=Ne(require("path")),Dl=Ne(require("fs/promises"));var Mi=require("node:stream");var qt=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 Wt=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new Zr,r=new Vr){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Zr=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},Vr=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 Pt=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}}};function Di({error:e,requestBody:t}){return e instanceof Pt?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}o(Di,"toFailsafeOutput");var ge=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(ge||{});var Kt=class extends qt{static{o(this,"FetchHttpClient")}constructor(t="",r=new Wt){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[L,re]of Object.entries(c))i.append(L,re);let l=i.toString(),f=l?`${n}?${l}`:n,y=t.responseType??"json",P=t.followRedirects??!0,I=t.retries??0,{body:x,extraHeaders:s,isStream:d}=Cl(t.method)?Ul(t.body,u):{body:void 0,extraHeaders:{},isStream:!1},g=Ll({...u,...s}),m=await Ml(async()=>{let L=new AbortController,re=t.timeout&&t.timeout>0?setTimeout(()=>L.abort(),t.timeout):void 0;try{let ue={method:t.method.toString(),headers:g,body:x,redirect:P?"follow":"manual",signal:L.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=P?300:400;if(m.status<200||m.status>=v){let L=await Ci(m,y),re=new Pt(t.body,{status:m.status,responseBody:L});throw console.error("[HttpClient#(sanitized error message)] Request failed:",re),re}let _=await Ci(m,y);return{status:m.status,headers:jl(m.headers),body:_}}};function Cl(e){return e!=="GET"&&e!=="HEAD"}o(Cl,"acceptsRequestBody");function Ul(e,t){if(Bl(e))return{body:void 0,extraHeaders:{},isStream:!1};if(Fl(e)){let n=new Mi.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(Ul,"serializeBody");async function Ci(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(Ci,"parseResponseBody");async function Ml(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Ui(n);continue}return i}catch(i){if(r=i,n<t){await Ui(n);continue}throw i}throw r}o(Ml,"sendWithRetries");function Ui(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Ui,"backoff");function Ll(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(Ll,"normalizeHeaders");function jl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(jl,"toHttpHeaders");function Fl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}o(Fl,"isNodeFormData");function Bl(e){return e==null}o(Bl,"isNil");var J=new Kt;var zd=Ne(require("fs")),Zs=Ne(dn());var Od={"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 kd(e){let t=e.split(";")[0].trim().toLowerCase();return Od[t]??""}o(kd,"contentTypeToExtension");var wd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Rd=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 Vs({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 ${Rd(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(ge).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 P=y,I={};switch(P){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:P,url:I,headers:x,queryParams:s,body:d,body_type:g,failsafe:m,timeout:v,response_is_binary:_,followRedirects:L}=y.propsValue;Zt(P,"Method"),Zt(I,"URL");let re=le(r)?{}:await r(y.auth,y.propsValue),ue=I.url,Ye=ue.startsWith("http://")||ue.startsWith("https://")?ue:wd({baseUrl:t(y.auth),relativePath:ue}),Ie={method:P,url:Ye,headers:{...x??{},...f==="headers"||!le(f)?re:{}},queryParams:{...f==="queryParams"?re:{},...s??{}},timeout:v?v*1e3:0,followRedirects:L};if(_&&(Ie.responseType="arraybuffer"),d)if(g&&g!=="none"){let ye=d.data;if(g==="form_data"){let tu=ye,Tt=new Zs.default;for(let{fieldName:mn,fieldType:fn,textFieldValue:gn,fileFieldValue:ir}of tu)fn==="text"&&!ht(gn)?Tt.append(mn,gn):fn==="file"&&!ht(ir)&&Tt.append(mn,ir.data,{filename:ir?.filename});Ie.body=Tt,Ie.headers={...Ie.headers,...Tt.getHeaders()}}else Ie.body=ye}else g||(Ie.body=d);try{let ye=await J.sendRequest(Ie);return await Nd(y.files,ye.body,ye.status,ye.headers,_)}catch(ye){if(m)return Di({error:ye,requestBody:Ie.body});throw ye}},"run")})}o(Vs,"createCustomApiCallAction");var Nd=o(async(e,t,r,n,i)=>{let u;if(i&&Dd(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],l=kd(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"),Dd=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Cd=we.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")}),Ud=we.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:we.SecretText({displayName:"Gateway Auth Token",description:"Optional. Required only if your gateway has authentication enabled. Sent as cf-aig-authorization.",required:!1}),mistralApiKey:we.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:Md({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=[Cd,Ud];function Md({gatewayAuthToken:e,mistralApiKey:t}){let r={};return e&&(r["cf-aig-authorization"]=`Bearer ${e}`),t&&(r.Authorization=`Bearer ${t}`),r}o(Md,"buildGatewayHeaders");function Ld(e){return e.type==="CUSTOM_AUTH"}o(Ld,"isGatewayAuth");function jd(e){let t=e;if(Ld(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(jd,"getConfig");var ee={getConfig:jd};var Hs=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 Gs=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:Hs,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),P={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:P,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 qs=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 P=y.response?.status;if((P===429||P&&P>=500&&P<600)&&f<3){await new Promise(I=>setTimeout(I,1e3*(f+1)));continue}throw new Error(ie(y))}throw new Error(ie(l))}});var Ks=Ne(dn());var Ws=["fine-tune","batch","ocr"],Fd=512*1024*1024,Bd=["jsonl","txt","csv","pdf","docx","png","jpg","jpeg","mp3","mp4"];function Zd(e){let t=e.split(".");return t.length>1?t.pop().toLowerCase():""}o(Zd,"getFileExtension");var Js=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:Ws.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(!Ws.includes(r))throw new Error("Invalid purpose");if(t.data.byteLength>Fd)throw new Error("File exceeds 512MB limit");let n=Zd(t.filename);if(!Bd.includes(n))throw new Error(`File extension .${n} is not allowed`);let{baseUrl:i,headers:u}=ee.getConfig(e.auth),c=new Ks.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 Vd=[{label:"mistral-ocr-latest (Recommended)",value:"mistral-ocr-latest"},{label:"mistral-ocr-2505",value:"mistral-ocr-2505"}],Qs=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:Vd}}),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:we.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:Xs()}:{documentUrl:S.ShortText({displayName:"URL",description:"Public URL of the PDF or image to OCR.",required:!0}),documentType:Xs()},"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 Hd({source:r,fields:n,config:l,timeout:c??12e4}),y={model:t,document:f},P=qd(i);P&&(y.pages=P),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 Xs(){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(Xs,"documentTypeDropdown");async function Hd({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 Gd({fileId:c,config:r,timeout:n});return Ys({documentType:i,url:l})}let u=t.documentUrl?.trim();if(!u)throw new Error("A document URL is required.");return Ys({documentType:i,url:u})}o(Hd,"resolveDocument");function Ys({documentType:e,url:t}){return e==="image_url"?{type:"image_url",image_url:t}:{type:"document_url",document_url:t}}o(Ys,"buildUrlDocument");async function Gd({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(Gd,"fetchSignedUrl");function qd(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(qd,"parsePageIndices");var eu=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 Wd=zi({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:[Gs,qs,Js,Qs,eu,Vs({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
@@ -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"}