@activepieces/piece-polydoc 0.0.2 → 0.0.3

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 (45) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +15 -37
  3. package/src/index.d.ts +0 -5
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/capture-screenshot.d.ts +0 -24
  7. package/src/lib/actions/capture-screenshot.d.ts.map +0 -1
  8. package/src/lib/actions/capture-screenshot.js +0 -112
  9. package/src/lib/actions/capture-screenshot.js.map +0 -1
  10. package/src/lib/actions/convert-pdf.d.ts +0 -28
  11. package/src/lib/actions/convert-pdf.d.ts.map +0 -1
  12. package/src/lib/actions/convert-pdf.js +0 -111
  13. package/src/lib/actions/convert-pdf.js.map +0 -1
  14. package/src/lib/actions/generate-einvoice.d.ts +0 -21
  15. package/src/lib/actions/generate-einvoice.d.ts.map +0 -1
  16. package/src/lib/actions/generate-einvoice.js +0 -111
  17. package/src/lib/actions/generate-einvoice.js.map +0 -1
  18. package/src/lib/common/auth.d.ts +0 -5
  19. package/src/lib/common/auth.d.ts.map +0 -1
  20. package/src/lib/common/auth.js +0 -62
  21. package/src/lib/common/auth.js.map +0 -1
  22. package/src/lib/common/build-request-body.d.ts +0 -11
  23. package/src/lib/common/build-request-body.d.ts.map +0 -1
  24. package/src/lib/common/build-request-body.js +0 -172
  25. package/src/lib/common/build-request-body.js.map +0 -1
  26. package/src/lib/common/client.d.ts +0 -20
  27. package/src/lib/common/client.d.ts.map +0 -1
  28. package/src/lib/common/client.js +0 -68
  29. package/src/lib/common/client.js.map +0 -1
  30. package/src/lib/common/constants.d.ts +0 -41
  31. package/src/lib/common/constants.d.ts.map +0 -1
  32. package/src/lib/common/constants.js +0 -28
  33. package/src/lib/common/constants.js.map +0 -1
  34. package/src/lib/common/output.d.ts +0 -24
  35. package/src/lib/common/output.d.ts.map +0 -1
  36. package/src/lib/common/output.js +0 -53
  37. package/src/lib/common/output.js.map +0 -1
  38. package/src/lib/common/props.d.ts +0 -20
  39. package/src/lib/common/props.d.ts.map +0 -1
  40. package/src/lib/common/props.js +0 -144
  41. package/src/lib/common/props.js.map +0 -1
  42. package/src/lib/common/types.d.ts +0 -37
  43. package/src/lib/common/types.d.ts.map +0 -1
  44. package/src/lib/common/types.js +0 -3
  45. package/src/lib/common/types.js.map +0 -1
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "@activepieces/piece-polydoc",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
- "types": "./src/index.d.ts",
7
- "dependencies": {
8
- "@activepieces/pieces-common": "0.12.5",
9
- "@activepieces/pieces-framework": "0.32.0",
10
- "@activepieces/shared": "0.96.0",
11
- "tslib": "2.6.2"
12
- },
13
- "scripts": {
14
- "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
15
- "lint": "eslint 'src/**/*.ts'"
16
- }
6
+ "dependencies": {},
7
+ "files": [
8
+ "src/index.js",
9
+ "package.json",
10
+ "src/i18n"
11
+ ]
17
12
  }
package/src/index.js CHANGED
@@ -1,37 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.polydoc = 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 capture_screenshot_1 = require("./lib/actions/capture-screenshot");
8
- const convert_pdf_1 = require("./lib/actions/convert-pdf");
9
- const generate_einvoice_1 = require("./lib/actions/generate-einvoice");
10
- const auth_1 = require("./lib/common/auth");
11
- const pieces_common_1 = require("@activepieces/pieces-common");
12
- exports.polydoc = (0, pieces_framework_1.createPiece)({
13
- displayName: 'PolyDoc',
14
- description: 'Convert HTML or a URL to PDF, capture screenshots, and generate EU e-invoices (Factur-X / ZUGFeRD).',
15
- auth: auth_1.polydocAuth,
16
- minimumSupportedRelease: '0.36.1',
17
- logoUrl: 'https://cdn.activepieces.com/pieces/polydoc.png',
18
- categories: [shared_1.PieceCategory.CONTENT_AND_FILES, shared_1.PieceCategory.PRODUCTIVITY],
19
- authors: ['polydoc-tech', 'sanket-a11y'],
20
- actions: [
21
- convert_pdf_1.convertToPdf,
22
- capture_screenshot_1.captureScreenshot,
23
- generate_einvoice_1.generateEinvoice,
24
- (0, pieces_common_1.createCustomApiCallAction)({
25
- baseUrl: () => 'https://api.podio.com',
26
- auth: auth_1.polydocAuth,
27
- authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
28
- return ({
29
- Authorization: `Bearer ${auth.props.apikey}`,
30
- 'X-Sandbox': auth.props.sandbox ? 'true' : 'false',
31
- });
32
- }),
33
- }),
34
- ],
35
- triggers: [],
36
- });
37
- //# sourceMappingURL=index.js.map
1
+ "use strict";var du=Object.create;var dt=Object.defineProperty;var mu=Object.getOwnPropertyDescriptor;var fu=Object.getOwnPropertyNames;var gu=Object.getPrototypeOf,yu=Object.prototype.hasOwnProperty;var o=(e,t)=>dt(e,"name",{value:t,configurable:!0});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kn=(e,t)=>{for(var r in t)dt(e,r,{get:t[r],enumerable:!0})},wn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fu(t))!yu.call(e,i)&&i!==r&&dt(e,i,{get:()=>t[i],enumerable:!(n=mu(t,i))||n.enumerable});return e};var ke=(e,t,r)=>(r=e!=null?du(gu(e)):{},wn(t||!e||!e.__esModule?dt(r,"default",{value:e,enumerable:!0}):r,e)),hu=e=>wn(dt({},"__esModule",{value:!0}),e);var Ko=E((Jo,nr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),u="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(u,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${u})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${u})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${t}\\.${t}\\.${t}\\.${t}(${u})?$`,"i")};function f(s,p){if(s.indexOf("::")!==s.lastIndexOf("::"))return null;let g=0,m=-1,v=(s.match(d.zoneIndex)||[])[0],_,j;for(v&&(v=v.substring(1),s=s.replace(/%.+$/,""));(m=s.indexOf(":",m+1))>=0;)g++;if(s.substr(0,2)==="::"&&g--,s.substr(-2,2)==="::"&&g--,g>p)return null;for(j=p-g,_=":";j--;)_+="0:";return s=s.replace("::",_),s[0]===":"&&(s=s.slice(1)),s[s.length-1]===":"&&(s=s.slice(0,-1)),p=function(){let Q=s.split(":"),ne=[];for(let pt=0;pt<Q.length;pt++)ne.push(parseInt(Q[pt],16));return ne}(),{parts:p,zoneId:v}}o(f,"expandIPv6");function h(s,p,g,m){if(s.length!==p.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]>>_!==p[v]>>_)return!1;m-=g,v+=1}return!0}o(h,"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 $(s,p){for(;s.length<p;)s=`0${s}`;return s}o($,"padPart");let x={};x.IPv4=function(){function s(p){if(p.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let g,m;for(g=0;g<p.length;g++)if(m=p[g],!(0<=m&&m<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=p}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(p,g){let m;if(g===void 0&&(m=p,p=m[0],g=m[1]),p.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,p.octets,8,g)},s.prototype.prefixLengthFromSubnetMask=function(){let p=0,g=!1,m={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,_,j;for(v=3;v>=0;v-=1)if(_=this.octets[v],_ in m){if(j=m[_],g&&j!==0)return null;j!==8&&(g=!0),p+=j}else return null;return 32-p},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 p=this.parseCIDR(s),g=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[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 p=s.match(/^(.+)\/(\d+)$/);return!x.IPv4.isValidCIDR(s)||!p?!1:x.IPv4.isValidFourPartDecimal(p[1])},x.IPv4.networkAddressFromCIDR=function(s){let p,g,m,v,_;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),_=this.subnetMaskFromPrefixLength(p[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 p=this.parser(s);if(p===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(p)},x.IPv4.parseCIDR=function(s){let p;if(p=s.match(/^(.+)\/(\d+)$/)){let g=parseInt(p[2]);if(g>=0&&g<=32){let m=[this.parse(p[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 p,g,m;if(p=s.match(r.fourOctet))return function(){let v=p.slice(1,6),_=[];for(let j=0;j<v.length;j++)g=v[j],_.push(P(g));return _}();if(p=s.match(r.longValue)){if(m=P(p[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(p=s.match(r.twoOctet))?function(){let v=p.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),_}():(p=s.match(r.threeOctet))?function(){let v=p.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 p=[0,0,0,0],g=0,m=Math.floor(s/8);for(;g<m;)p[g]=255,g++;return m<4&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.IPv6=function(){function s(p,g){let m,v;if(p.length===16)for(this.parts=[],m=0;m<=14;m+=2)this.parts.push(p[m]<<8|p[m+1]);else if(p.length===8)this.parts=p;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(p,g){let m;if(g===void 0&&(m=p,p=m[0],g=m[1]),p.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,p.parts,16,g)},s.prototype.prefixLengthFromSubnetMask=function(){let p=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 j=7;j>=0;j-=1)if(v=this.parts[j],v in m){if(_=m[v],g&&_!==0)return null;_!==16&&(g=!0),p+=_}else return null;return 128-p},s.prototype.range=function(){return x.subnetMatch(this,this.SpecialRanges)},s.prototype.toByteArray=function(){let p,g=[],m=this.parts;for(let v=0;v<m.length;v++)p=m[v],g.push(p>>8),g.push(p&255);return g},s.prototype.toFixedLengthString=function(){let p=function(){let m=[];for(let v=0;v<this.parts.length;v++)m.push($(this.parts[v].toString(16),4));return m}.call(this).join(":"),g="";return this.zoneId&&(g=`%${this.zoneId}`),p+g},s.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let p=this.parts.slice(-2),g=p[0],m=p[1];return new x.IPv4([g>>8,g&255,m>>8,m&255])},s.prototype.toNormalizedString=function(){let p=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}`),p+g},s.prototype.toRFC5952String=function(){let p=/((^|:)(0(:|$)){2,})/g,g=this.toNormalizedString(),m=0,v=-1,_;for(;_=p.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 p=this.parseCIDR(s),g=p[0].toByteArray(),m=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],_=0;for(;_<16;)v.push(parseInt(g[_],10)|parseInt(m[_],10)^255),_++;return new this(v)}catch(p){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${p})`)}},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 p=this.parser(s);return new this(p.parts,p.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 p,g,m,v,_;try{for(p=this.parseCIDR(s),m=p[0].toByteArray(),_=this.subnetMaskFromPrefixLength(p[1]).toByteArray(),v=[],g=0;g<16;)v.push(parseInt(m[g],10)&parseInt(_[g],10)),g++;return new this(v)}catch(j){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${j})`)}},x.IPv6.parse=function(s){let p=this.parser(s);if(p.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(p.parts,p.zoneId)},x.IPv6.parseCIDR=function(s){let p,g,m;if((g=s.match(/^(.+)\/(\d+)$/))&&(p=parseInt(g[2]),p>=0&&p<=128))return m=[this.parse(g[1]),p],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 p,g,m,v,_,j;if(m=s.match(d.deprecatedTransitional))return this.parser(`::ffff:${m[1]}`);if(d.native.test(s))return f(s,8);if((m=s.match(d.transitional))&&(j=m[6]||"",p=m[1],m[1].endsWith("::")||(p=p.slice(0,-1)),p=f(p+j,6),p.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 p.parts.push(_[0]<<8|_[1]),p.parts.push(_[2]<<8|_[3]),{parts:p.parts,zoneId:p.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 p=[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;)p[g]=255,g++;return m<16&&(p[m]=Math.pow(2,s%8)-1<<8-s%8),new this(p)},x.fromByteArray=function(s){let p=s.length;if(p===4)return new x.IPv4(s);if(p===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 p=this.parse(s);return p.kind()==="ipv6"&&p.isIPv4MappedAddress()?p.toIPv4Address():p},x.subnetMatch=function(s,p,g){let m,v,_,j;g==null&&(g="unicast");for(v in p)if(Object.prototype.hasOwnProperty.call(p,v)){for(_=p[v],_[0]&&!(_[0]instanceof Array)&&(_=[_]),m=0;m<_.length;m++)if(j=_[m],s.kind()===j[0].kind()&&s.match.apply(s,j))return v}return g},typeof nr<"u"&&nr.exports?nr.exports=x:e.ipaddr=x})(Jo)});var qi=E((TA,Hi)=>{var Zi=require("stream").Stream,ql=require("util");Hi.exports=ie;function ie(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ie,"DelayedStream");ql.inherits(ie,Zi);ie.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(ie.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ie.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ie.prototype.resume=function(){this._released||this.release(),this.source.resume()};ie.prototype.pause=function(){this.source.pause()};ie.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};ie.prototype.pipe=function(){var e=Zi.prototype.pipe.apply(this,arguments);return this.resume(),e};ie.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)};ie.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Ki=E((EA,Ji)=>{var Wl=require("util"),Gi=require("stream").Stream,Wi=qi();Ji.exports=W;function W(){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(W,"CombinedStream");Wl.inherits(W,Gi);W.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};W.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};W.prototype.append=function(e){var t=W.isStreamLike(e);if(t){if(!(e instanceof Wi)){var r=Wi.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};W.prototype.pipe=function(e,t){return Gi.prototype.pipe.call(this,e,t),this.resume(),e};W.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}};W.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=W.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};W.prototype._pipeNext=function(e){this._currentStream=e;var t=W.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()};W.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};W.prototype.write=function(e){this.emit("data",e)};W.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};W.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")};W.prototype.end=function(){this._reset(),this.emit("end")};W.prototype.destroy=function(){this._reset(),this.emit("close")};W.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};W.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};W.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)};W.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Yi=E((SA,Xi)=>{"use strict";Xi.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 ta=E(Y=>{"use strict";var lr=Yi(),Gl=require("path").extname,Qi=/^\s*([^;\s]*)(?:;|\s|$)/,Jl=/^text\//i;Y.charset=ea;Y.charsets={lookup:ea};Y.contentType=Kl;Y.extension=Xl;Y.extensions=Object.create(null);Y.lookup=Yl;Y.types=Object.create(null);Ql(Y.extensions,Y.types);function ea(e){if(!e||typeof e!="string")return!1;var t=Qi.exec(e),r=t&&lr[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Jl.test(t[1])?"UTF-8":!1}o(ea,"charset");function Kl(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Y.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Y.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}o(Kl,"contentType");function Xl(e){if(!e||typeof e!="string")return!1;var t=Qi.exec(e),r=t&&Y.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(Xl,"extension");function Yl(e){if(!e||typeof e!="string")return!1;var t=Gl("x."+e).toLowerCase().substr(1);return t&&Y.types[t]||!1}o(Yl,"lookup");function Ql(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(lr).forEach(o(function(i){var u=lr[i],c=u.extensions;if(!(!c||!c.length)){e[i]=c;for(var d=0;d<c.length;d++){var f=c[d];if(t[f]){var h=r.indexOf(lr[t[f]].source),P=r.indexOf(u.source);if(t[f]!=="application/octet-stream"&&(h>P||h===P&&t[f].substr(0,12)==="application/"))continue}t[f]=i}}},"forEachMimeType"))}o(Ql,"populateMaps")});var na=E((OA,ra)=>{ra.exports=ep;function ep(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}o(ep,"defer")});var sn=E((wA,ia)=>{var oa=na();ia.exports=tp;function tp(e){var t=!1;return oa(function(){t=!0}),o(function(n,i){t?e(n,i):oa(o(function(){e(n,i)},"nextTick_callback"))},"async_callback")}o(tp,"async")});var un=E((DA,aa)=>{aa.exports=rp;function rp(e){Object.keys(e.jobs).forEach(np.bind(e)),e.jobs={}}o(rp,"abort");function np(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}o(np,"clean")});var cn=E((CA,ua)=>{var sa=sn(),op=un();ua.exports=ip;function ip(e,t,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=ap(t,i,e[i],function(u,c){i in r.jobs&&(delete r.jobs[i],u?op(r):r.results[i]=c,n(u,r.results))})}o(ip,"iterate");function ap(e,t,r,n){var i;return e.length==2?i=e(r,sa(n)):i=e(r,t,sa(n)),i}o(ap,"runJob")});var ln=E((MA,ca)=>{ca.exports=sp;function sp(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(sp,"state")});var pn=E((LA,la)=>{var up=un(),cp=sn();la.exports=lp;function lp(e){Object.keys(this.jobs).length&&(this.index=this.size,up(this),cp(e)(null,this.results))}o(lp,"terminator")});var da=E((BA,pa)=>{var pp=cn(),dp=ln(),mp=pn();pa.exports=fp;function fp(e,t,r){for(var n=dp(e);n.index<(n.keyedList||e).length;)pp(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 mp.bind(n,r)}o(fp,"parallel")});var dn=E((ZA,pr)=>{var ma=cn(),gp=ln(),yp=pn();pr.exports=hp;pr.exports.ascending=fa;pr.exports.descending=vp;function hp(e,t,r,n){var i=gp(e,r);return ma(e,t,i,o(function u(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||e).length){ma(e,t,i,u);return}n(null,i.results)},"iteratorHandler")),yp.bind(i,n)}o(hp,"serialOrdered");function fa(e,t){return e<t?-1:e>t?1:0}o(fa,"ascending");function vp(e,t){return-1*fa(e,t)}o(vp,"descending")});var ya=E((qA,ga)=>{var xp=dn();ga.exports=Pp;function Pp(e,t,r){return xp(e,t,null,r)}o(Pp,"serial")});var va=E((GA,ha)=>{ha.exports={parallel:da(),serial:ya(),serialOrdered:dn()}});var mn=E((JA,xa)=>{"use strict";xa.exports=Object});var _a=E((KA,Pa)=>{"use strict";Pa.exports=Error});var Ta=E((XA,ba)=>{"use strict";ba.exports=EvalError});var Ea=E((YA,Ia)=>{"use strict";Ia.exports=RangeError});var Sa=E((QA,$a)=>{"use strict";$a.exports=ReferenceError});var za=E((ez,Aa)=>{"use strict";Aa.exports=SyntaxError});var dr=E((tz,Oa)=>{"use strict";Oa.exports=TypeError});var wa=E((rz,ka)=>{"use strict";ka.exports=URIError});var Da=E((nz,Ra)=>{"use strict";Ra.exports=Math.abs});var Ca=E((oz,Na)=>{"use strict";Na.exports=Math.floor});var Ma=E((iz,Ua)=>{"use strict";Ua.exports=Math.max});var La=E((az,ja)=>{"use strict";ja.exports=Math.min});var Ba=E((sz,Fa)=>{"use strict";Fa.exports=Math.pow});var Za=E((uz,Va)=>{"use strict";Va.exports=Math.round});var qa=E((cz,Ha)=>{"use strict";Ha.exports=Number.isNaN||o(function(t){return t!==t},"isNaN")});var Ga=E((pz,Wa)=>{"use strict";var _p=qa();Wa.exports=o(function(t){return _p(t)||t===0?t:t<0?-1:1},"sign")});var Ka=E((mz,Ja)=>{"use strict";Ja.exports=Object.getOwnPropertyDescriptor});var fn=E((fz,Xa)=>{"use strict";var mr=Ka();if(mr)try{mr([],"length")}catch{mr=null}Xa.exports=mr});var Qa=E((gz,Ya)=>{"use strict";var fr=Object.defineProperty||!1;if(fr)try{fr({},"a",{value:1})}catch{fr=!1}Ya.exports=fr});var gn=E((yz,es)=>{"use strict";es.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var u in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var ns=E((vz,rs)=>{"use strict";var ts=typeof Symbol<"u"&&Symbol,bp=gn();rs.exports=o(function(){return typeof ts!="function"||typeof Symbol!="function"||typeof ts("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:bp()},"hasNativeSymbols")});var yn=E((Pz,os)=>{"use strict";os.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var hn=E((_z,is)=>{"use strict";var Tp=mn();is.exports=Tp.getPrototypeOf||null});var us=E((bz,ss)=>{"use strict";var Ip="Function.prototype.bind called on incompatible ",Ep=Object.prototype.toString,$p=Math.max,Sp="[object Function]",as=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"),Ap=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"),zp=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");ss.exports=o(function(t){var r=this;if(typeof r!="function"||Ep.apply(r)!==Sp)throw new TypeError(Ip+r);for(var n=Ap(arguments,1),i,u=o(function(){if(this instanceof i){var P=r.apply(this,as(n,arguments));return Object(P)===P?P:this}return r.apply(t,as(n,arguments))},"binder"),c=$p(0,r.length-n.length),d=[],f=0;f<c;f++)d[f]="$"+f;if(i=Function("binder","return function ("+zp(d,",")+"){ return binder.apply(this,arguments); }")(u),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var Be=E((Iz,cs)=>{"use strict";var Op=us();cs.exports=Function.prototype.bind||Op});var gr=E((Ez,ls)=>{"use strict";ls.exports=Function.prototype.call});var vn=E(($z,ps)=>{"use strict";ps.exports=Function.prototype.apply});var ms=E((Sz,ds)=>{"use strict";ds.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var gs=E((Az,fs)=>{"use strict";var kp=Be(),wp=vn(),Rp=gr(),Dp=ms();fs.exports=Dp||kp.call(Rp,wp)});var hs=E((zz,ys)=>{"use strict";var Np=Be(),Cp=dr(),Up=gr(),Mp=gs();ys.exports=o(function(t){if(t.length<1||typeof t[0]!="function")throw new Cp("a function is required");return Mp(Np,Up,t)},"callBindBasic")});var Ts=E((kz,bs)=>{"use strict";var jp=hs(),vs=fn(),Ps;try{Ps=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var xn=!!Ps&&vs&&vs(Object.prototype,"__proto__"),_s=Object,xs=_s.getPrototypeOf;bs.exports=xn&&typeof xn.get=="function"?jp([xn.get]):typeof xs=="function"?o(function(t){return xs(t==null?t:_s(t))},"getDunder"):!1});var As=E((Rz,Ss)=>{"use strict";var Is=yn(),Es=hn(),$s=Ts();Ss.exports=Is?o(function(t){return Is(t)},"getProto"):Es?o(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Es(t)},"getProto"):$s?o(function(t){return $s(t)},"getProto"):null});var Pn=E((Nz,zs)=>{"use strict";var Lp=Function.prototype.call,Fp=Object.prototype.hasOwnProperty,Bp=Be();zs.exports=Bp.call(Lp,Fp)});var Cs=E((Cz,Ns)=>{"use strict";var M,Vp=mn(),Zp=_a(),Hp=Ta(),qp=Ea(),Wp=Sa(),qe=za(),He=dr(),Gp=wa(),Jp=Da(),Kp=Ca(),Xp=Ma(),Yp=La(),Qp=Ba(),ed=Za(),td=Ga(),Rs=Function,_n=o(function(e){try{return Rs('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Dt=fn(),rd=Qa(),bn=o(function(){throw new He},"throwTypeError"),nd=Dt?function(){try{return arguments.callee,bn}catch{try{return Dt(arguments,"callee").get}catch{return bn}}}():bn,Ve=ns()(),K=As(),od=hn(),id=yn(),Ds=vn(),Nt=gr(),Ze={},ad=typeof Uint8Array>"u"||!K?M:K(Uint8Array),Oe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?M:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?M:ArrayBuffer,"%ArrayIteratorPrototype%":Ve&&K?K([][Symbol.iterator]()):M,"%AsyncFromSyncIteratorPrototype%":M,"%AsyncFunction%":Ze,"%AsyncGenerator%":Ze,"%AsyncGeneratorFunction%":Ze,"%AsyncIteratorPrototype%":Ze,"%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%":Zp,"%eval%":eval,"%EvalError%":Hp,"%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%":Rs,"%GeneratorFunction%":Ze,"%Int8Array%":typeof Int8Array>"u"?M:Int8Array,"%Int16Array%":typeof Int16Array>"u"?M:Int16Array,"%Int32Array%":typeof Int32Array>"u"?M:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ve&&K?K(K([][Symbol.iterator]())):M,"%JSON%":typeof JSON=="object"?JSON:M,"%Map%":typeof Map>"u"?M:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ve||!K?M:K(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Vp,"%Object.getOwnPropertyDescriptor%":Dt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?M:Promise,"%Proxy%":typeof Proxy>"u"?M:Proxy,"%RangeError%":qp,"%ReferenceError%":Wp,"%Reflect%":typeof Reflect>"u"?M:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?M:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ve||!K?M:K(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?M:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ve&&K?K(""[Symbol.iterator]()):M,"%Symbol%":Ve?Symbol:M,"%SyntaxError%":qe,"%ThrowTypeError%":nd,"%TypedArray%":ad,"%TypeError%":He,"%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%":Gp,"%WeakMap%":typeof WeakMap>"u"?M:WeakMap,"%WeakRef%":typeof WeakRef>"u"?M:WeakRef,"%WeakSet%":typeof WeakSet>"u"?M:WeakSet,"%Function.prototype.call%":Nt,"%Function.prototype.apply%":Ds,"%Object.defineProperty%":rd,"%Object.getPrototypeOf%":od,"%Math.abs%":Jp,"%Math.floor%":Kp,"%Math.max%":Xp,"%Math.min%":Yp,"%Math.pow%":Qp,"%Math.round%":ed,"%Math.sign%":td,"%Reflect.getPrototypeOf%":id};if(K)try{null.error}catch(e){Os=K(K(e)),Oe["%Error.prototype%"]=Os}var Os,sd=o(function e(t){var r;if(t==="%AsyncFunction%")r=_n("async function () {}");else if(t==="%GeneratorFunction%")r=_n("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=_n("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&K&&(r=K(i.prototype))}return Oe[t]=r,r},"doEval"),ks={__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"]},Ct=Be(),yr=Pn(),ud=Ct.call(Nt,Array.prototype.concat),cd=Ct.call(Ds,Array.prototype.splice),ws=Ct.call(Nt,String.prototype.replace),hr=Ct.call(Nt,String.prototype.slice),ld=Ct.call(Nt,RegExp.prototype.exec),pd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dd=/\\(\\)?/g,md=o(function(t){var r=hr(t,0,1),n=hr(t,-1);if(r==="%"&&n!=="%")throw new qe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qe("invalid intrinsic syntax, expected opening `%`");var i=[];return ws(t,pd,function(u,c,d,f){i[i.length]=d?ws(f,dd,"$1"):c||u}),i},"stringToPath"),fd=o(function(t,r){var n=t,i;if(yr(ks,n)&&(i=ks[n],n="%"+i[0]+"%"),yr(Oe,n)){var u=Oe[n];if(u===Ze&&(u=sd(n)),typeof u>"u"&&!r)throw new He("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:u}}throw new qe("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Ns.exports=o(function(t,r){if(typeof t!="string"||t.length===0)throw new He("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new He('"allowMissing" argument must be a boolean');if(ld(/^%?[^%]*%?$/,t)===null)throw new qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=md(t),i=n.length>0?n[0]:"",u=fd("%"+i+"%",r),c=u.name,d=u.value,f=!1,h=u.alias;h&&(i=h[0],cd(n,ud([0,1],h)));for(var P=1,$=!0;P<n.length;P+=1){var x=n[P],s=hr(x,0,1),p=hr(x,-1);if((s==='"'||s==="'"||s==="`"||p==='"'||p==="'"||p==="`")&&s!==p)throw new qe("property names with quotes must have matching quotes");if((x==="constructor"||!$)&&(f=!0),i+="."+x,c="%"+i+"%",yr(Oe,c))d=Oe[c];else if(d!=null){if(!(x in d)){if(!r)throw new He("base intrinsic for "+t+" exists, but the property is not available.");return}if(Dt&&P+1>=n.length){var g=Dt(d,x);$=!!g,$&&"get"in g&&!("originalValue"in g.get)?d=g.get:d=d[x]}else $=yr(d,x),d=d[x];$&&!f&&(Oe[c]=d)}}return d},"GetIntrinsic")});var Ms=E((Mz,Us)=>{"use strict";var gd=gn();Us.exports=o(function(){return gd()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Fs=E((Lz,Ls)=>{"use strict";var yd=Cs(),js=yd("%Object.defineProperty%",!0),hd=Ms()(),vd=Pn(),xd=dr(),vr=hd?Symbol.toStringTag:null;Ls.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 xd("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");vr&&(n||!vd(t,vr))&&(js?js(t,vr,{configurable:!i,enumerable:!1,value:r,writable:!1}):t[vr]=r)},"setToStringTag")});var Vs=E((Bz,Bs)=>{"use strict";var Pd=Function.prototype.call,_d=Object.prototype.hasOwnProperty,bd=Be();Bs.exports=bd.call(Pd,_d)});var Hs=E((Vz,Zs)=>{"use strict";Zs.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Gs=E((Zz,Ws)=>{"use strict";var $n=Ki(),Td=require("util"),Tn=require("path"),Id=require("http"),Ed=require("https"),$d=require("url").parse,Sd=require("fs"),Ad=require("stream").Stream,zd=require("crypto"),In=ta(),Od=va(),kd=Fs(),Ie=Vs(),En=Hs();function qs(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(qs,"escapeHeaderParam");function L(e){if(!(this instanceof L))return new L(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],$n.call(this),e=e||{};for(var t in e)this[t]=e[t]}o(L,"FormData");Td.inherits(L,$n);L.LINE_BREAK=`\r
2
+ `;L.DEFAULT_CONTENT_TYPE="application/octet-stream";L.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=$n.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r),u=this._multiPartFooter();n(i),n(t),n(u),this._trackLength(i,t,r)};L.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+L.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ie(t,"httpVersion"))&&!(t instanceof Ad))&&(r.knownLength||this._valuesToMeasure.push(t))};L.prototype._lengthRetriever=function(e,t){Ie(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Sd.stat(e.path,function(r,n){if(r){t(r);return}var i=n.size-(e.start?e.start:0);t(null,i)}):Ie(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ie(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};L.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),i=this._getContentType(t,r),u="",c={"Content-Disposition":["form-data",'name="'+qs(e)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&En(c,r.header);var d;for(var f in c)if(Ie(c,f)){if(d=c[f],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(u+=f+": "+d.join("; ")+L.LINE_BREAK)}return"--"+this.getBoundary()+L.LINE_BREAK+u+L.LINE_BREAK};L.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=Tn.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=Tn.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ie(e,"httpVersion")&&(r=Tn.basename(e.client._httpMessage.path||"")),r)return'filename="'+qs(r)+'"'};L.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=In.lookup(e.name)),!r&&e&&e.path&&(r=In.lookup(e.path)),!r&&e&&e.readable&&Ie(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=In.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=L.DEFAULT_CONTENT_TYPE),r};L.prototype._multiPartFooter=function(){return function(e){var t=L.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};L.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+L.LINE_BREAK};L.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ie(e,t)&&(r[t.toLowerCase()]=e[t]);return r};L.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};L.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};L.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(L.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};L.prototype._generateBoundary=function(){this._boundary="--------------------------"+zd.randomBytes(12).toString("hex")};L.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};L.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};L.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Od.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i}),e(null,t)})};L.prototype.submit=function(e,t){var r,n,i={method:"post"};return typeof e=="string"?(e=$d(e),n=En({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(n=En(e,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Ed.request(n):r=Id.request(n),this.getLength(function(u,c){if(u&&u!=="Unknown stream"){this._error(u);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),t){var d,f=o(function(h,P){return r.removeListener("error",f),r.removeListener("response",d),t.call(this,h,P)},"callback");d=f.bind(this,null),r.on("error",f),r.on("response",d)}}.bind(this)),r};L.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};L.prototype.toString=function(){return"[object FormData]"};kd(L.prototype,"FormData");Ws.exports=L});var qd={};kn(qd,{polydoc:()=>Hd});module.exports=hu(qd);var vu=Object.freeze({status:"aborted"});function T(e,t,r){function n(d,f){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:f,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,f);let h=c.prototype,P=Object.keys(h);for(let $=0;$<P.length;$++){let x=P[$];x in d||(d[x]=h[x].bind(d))}}o(n,"init");let i=r?.Parent??Object;class u extends i{static{o(this,"Definition")}}Object.defineProperty(u,"name",{value:e});function c(d){var f;let h=r?.Parent?new u:this;n(h,d),(f=h._zod).deferred??(f.deferred=[]);for(let P of h._zod.deferred)P();return h}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(e),"value")}),Object.defineProperty(c,"name",{value:e}),c}o(T,"$constructor");var xu=Symbol("zod_brand"),ae=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jt=class extends Error{static{o(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},br={};function ce(e){return e&&Object.assign(br,e),br}o(ce,"config");function Ir(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(Ir,"getEnumValues");function Dn(e,t){return typeof t=="bigint"?t.toString():t}o(Dn,"jsonStringifyReplacer");function Ft(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(Ft,"cached");function Nn(e){return e==null}o(Nn,"nullish");function Bt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}o(Bt,"cleanRegex");var Rn=Symbol("evaluating");function G(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Rn)return n===void 0&&(n=Rn,n=r()),n},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}o(G,"defineLazy");var Er="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function mt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(mt,"isObject");var Pu=Ft(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Cn(e){if(mt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(mt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Cn,"isPlainObject");var Un=new Set(["string","number","symbol"]);function we(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(we,"escapeRegex");function Vt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}o(Vt,"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 Mn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}o(Mn,"optionalKeys");var _u={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 Re(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(Re,"aborted");function he(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}o(he,"prefixIssues");function Lt(e){return typeof e=="string"?e:e?.message}o(Lt,"unwrapMessage");function ve(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let i=Lt(e.inst?._zod.def?.error?.(e))??Lt(t?.error?.(e))??Lt(r.customError?.(e))??Lt(r.localeError?.(e))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}o(ve,"finalizeIssue");function jn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}o(jn,"getLengthableOrigin");function $r(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}o($r,"issue");var Ln=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Dn,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Fn=T("$ZodError",Ln),ft=T("$ZodError",Ln,{Parent:Error});var Tu=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 ae;if(c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>ve(f,u,ce())));throw Er(d,i?.callee),d}return c.value},"_parse"),Zt=Tu(ft),Iu=o(e=>async(t,r,n,i)=>{let u=n?Object.assign(n,{async:!0}):{async:!0},c=t._zod.run({value:r,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??e)(c.issues.map(f=>ve(f,u,ce())));throw Er(d,i?.callee),d}return c.value},"_parseAsync"),Ht=Iu(ft),Eu=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 ae;return u.issues.length?{success:!1,error:new(e??Fn)(u.issues.map(c=>ve(c,i,ce())))}:{success:!0,data:u.value}},"_safeParse"),gt=Eu(ft),$u=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=>ve(c,i,ce())))}:{success:!0,data:u.value}},"_safeParseAsync"),yt=$u(ft);var Su="(?:(?:\\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])))",Au=new RegExp(`^${Su}$`);var Bn=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Vn=/^-?\d+n?$/;var Sr=/^-?\d+(?:\.\d+)?$/,Zn=/^(?:true|false)$/i;var De=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Hn=T("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=n=>{let i=n.value;return!Nn(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=jn(i);n.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}});var Ar=T("$ZodCheckStringFormat",(e,t)=>{var r,n;De.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=()=>{})}),qn=T("$ZodCheckRegex",(e,t)=>{Ar.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 Gn={major:4,minor:3,patch:6};var H=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Gn;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let i of n)for(let u of i._zod.onattach)u(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=o((c,d,f)=>{let h=Re(c),P;for(let $ of d){if($._zod.def.when){if(!$._zod.def.when(c))continue}else if(h)continue;let x=c.issues.length,s=$._zod.check(c);if(s instanceof Promise&&f?.async===!1)throw new ae;if(P||s instanceof Promise)P=(P??Promise.resolve()).then(async()=>{await s,c.issues.length!==x&&(h||(h=Re(c,x)))});else{if(c.issues.length===x)continue;h||(h=Re(c,x))}}return P?P.then(()=>c):c},"runChecks"),u=o((c,d,f)=>{if(Re(c))return c.aborted=!0,c;let h=i(d,n,f);if(h instanceof Promise){if(f.async===!1)throw new ae;return h.then(P=>e._zod.parse(P,f))}return e._zod.parse(h,f)},"handleCanaryResult");e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){let h=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(P=>u(P,c,d)):u(h,c,d)}let f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new ae;return f.then(h=>i(h,n,d))}return i(f,n,d)}}G(e,"~standard",()=>({validate:o(i=>{try{let u=gt(e,i);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return yt(e,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Gt=T("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Bn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),zr=T("$ZodStringFormat",(e,t)=>{Ar.init(e,t),Gt.init(e,t)});var Qn=T("$ZodURL",(e,t)=>{zr.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 eo=T("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??Sr,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let u=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...u?{received:u}:{}}),r}});var Or=T("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=Zn,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}}),to=T("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=Vn,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 ro=T("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),no=T("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r});var oo=T("$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}}),io=T("$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 Jn(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}o(Jn,"handleArrayResult");var ao=T("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let u=[];for(let c=0;c<i.length;c++){let d=i[c],f=t.element._zod.run({value:d,issues:[]},n);f instanceof Promise?u.push(f.then(h=>Jn(h,r,c))):Jn(f,r,c)}return u.length?Promise.all(u).then(()=>r):r}});function Wt(e,t,r,n,i){if(e.issues.length){if(i&&!(r in n))return;t.issues.push(...he(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}o(Wt,"handlePropertyResult");function zu(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=Mn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}o(zu,"normalizeDef");function Ou(e,t,r,n,i,u){let c=[],d=i.keySet,f=i.catchall._zod,h=f.def.type,P=f.optout==="optional";for(let $ in t){if(d.has($))continue;if(h==="never"){c.push($);continue}let x=f.run({value:t[$],issues:[]},n);x instanceof Promise?e.push(x.then(s=>Wt(s,r,$,t,P))):Wt(x,r,$,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(Ou,"handleCatchall");var so=T("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let d=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let f={...d};return Object.defineProperty(t,"shape",{value:f}),f},"get")})}let n=Ft(()=>zu(t));G(e._zod,"propValues",()=>{let d=t.shape,f={};for(let h in d){let P=d[h]._zod;if(P.values){f[h]??(f[h]=new Set);for(let $ of P.values)f[h].add($)}}return f});let i=mt,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),d;d.value={};let P=[],$=c.shape;for(let x of c.keys){let s=$[x],p=s._zod.optout==="optional",g=s._zod.run({value:h[x],issues:[]},f);g instanceof Promise?P.push(g.then(m=>Wt(m,d,x,h,p))):Wt(g,d,x,h,p)}return u?Ou(P,h,d,f,n.value,e):P.length?Promise.all(P).then(()=>d):d}});function Kn(e,t,r,n){for(let u of e)if(u.issues.length===0)return t.value=u.value,t;let i=e.filter(u=>!Re(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=>ve(c,n,ce())))}),t)}o(Kn,"handleUnionResults");var kr=T("$ZodUnion",(e,t)=>{H.init(e,t),G(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),G(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),G(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),G(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=>Bt(u.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(i,u)=>{if(r)return n(i,u);let c=!1,d=[];for(let f of t.options){let h=f._zod.run({value:i.value,issues:[]},u);if(h instanceof Promise)d.push(h),c=!0;else{if(h.issues.length===0)return h;d.push(h)}}return c?Promise.all(d).then(f=>Kn(f,i,e,u)):Kn(d,i,e,u)}});var uo=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,kr.init(e,t);let r=e._zod.parse;G(e._zod,"propValues",()=>{let i={};for(let u of t.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(let[d,f]of Object.entries(c)){i[d]||(i[d]=new Set);for(let h of f)i[d].add(h)}}return i});let n=Ft(()=>{let i=t.options,u=new Map;for(let c of i){let d=c._zod.propValues?.[t.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let f of d){if(u.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);u.set(f,c)}}return u});e._zod.parse=(i,u)=>{let c=i.value;if(!mt(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),i;let d=n.value.get(c?.[t.discriminator]);return d?d._zod.run(i,u):t.unionFallback?r(i,u):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),i)}});var co=T("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Cn(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let u=[],c=t.keyType._zod.values;if(c){r.value={};let d=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let P=t.valueType._zod.run({value:i[h],issues:[]},n);P instanceof Promise?u.push(P.then($=>{$.issues.length&&r.issues.push(...he(h,$.issues)),r.value[h]=$.value})):(P.issues.length&&r.issues.push(...he(h,P.issues)),r.value[h]=P.value)}let f;for(let h in i)d.has(h)||(f=f??[],f.push(h));f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:f})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let f=t.keyType._zod.run({value:d,issues:[]},n);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&Sr.test(d)&&f.issues.length){let $=t.keyType._zod.run({value:Number(d),issues:[]},n);if($ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");$.issues.length===0&&(f=$)}if(f.issues.length){t.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map($=>ve($,n,ce())),input:d,path:[d],inst:e});continue}let P=t.valueType._zod.run({value:i[d],issues:[]},n);P instanceof Promise?u.push(P.then($=>{$.issues.length&&r.issues.push(...he(d,$.issues)),r.value[f.value]=$.value})):(P.issues.length&&r.issues.push(...he(d,P.issues)),r.value[f.value]=P.value)}}return u.length?Promise.all(u).then(()=>r):r}});var lo=T("$ZodEnum",(e,t)=>{H.init(e,t);let r=Ir(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(i=>Un.has(typeof i)).map(i=>typeof i=="string"?we(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}}),po=T("$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"?we(n):n?we(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 mo=T("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new jt(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 ae;return r.value=i,r}});function Xn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}o(Xn,"handleOptionalResult");var fo=T("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Bt(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=>Xn(u,r.value)):Xn(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var go=T("$ZodNullable",(e,t)=>{H.init(e,t),G(e._zod,"optin",()=>t.innerType._zod.optin),G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Bt(r.source)}|null)$`):void 0}),G(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 yo=T("$ZodPipe",(e,t)=>{H.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(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=>qt(c,t.in,n)):qt(u,t.in,n)}let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(u=>qt(u,t.out,n)):qt(i,t.out,n)}});function qt(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}o(qt,"handlePipeResult");var ho=T("$ZodCustom",(e,t)=>{De.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=>Yn(u,r,n,e));Yn(i,r,n,e)}});function Yn(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($r(i))}}o(Yn,"handleRefineResult");var xo,Du=Symbol("ZodOutput"),Nu=Symbol("ZodInput"),wr=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 Po(){return new wr}o(Po,"registry");(xo=globalThis).__zod_globalRegistry??(xo.__zod_globalRegistry=Po());var Rr=globalThis.__zod_globalRegistry;function _o(e,t){return new e({type:"string",...Z(t)})}o(_o,"_string");function bo(e,t){return new e({type:"string",coerce:!0,...Z(t)})}o(bo,"_coercedString");function To(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}o(To,"_url");function Io(e,t){return new e({type:"number",checks:[],...Z(t)})}o(Io,"_number");function Eo(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}o(Eo,"_coercedNumber");function $o(e,t){return new e({type:"boolean",...Z(t)})}o($o,"_boolean");function So(e,t){return new e({type:"boolean",coerce:!0,...Z(t)})}o(So,"_coercedBoolean");function Ao(e,t){return new e({type:"bigint",coerce:!0,...Z(t)})}o(Ao,"_coercedBigint");function zo(e){return new e({type:"any"})}o(zo,"_any");function Oo(e){return new e({type:"unknown"})}o(Oo,"_unknown");function ko(e,t){return new e({type:"void",...Z(t)})}o(ko,"_void");function wo(e,t){return new e({type:"date",coerce:!0,...Z(t)})}o(wo,"_coercedDate");function oe(e,t){return new Hn({check:"min_length",...Z(t),minimum:e})}o(oe,"_minLength");function xe(e,t){return new qn({check:"string_format",format:"regex",...Z(t),pattern:e})}o(xe,"_regex");function Ro(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}o(Ro,"_custom");var J=T("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)=>Zt(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>gt(e,r,n),e.parseAsync=async(r,n)=>Ht(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>yt(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)=>Vt(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Kt=T("ZodMiniString",(e,t)=>{Gt.init(e,t),J.init(e,t)});function a(e){return _o(Kt,e)}o(a,"string");var Do=T("ZodMiniStringFormat",(e,t)=>{zr.init(e,t),Kt.init(e,t)});var Hu=T("ZodMiniURL",(e,t)=>{Qn.init(e,t),Do.init(e,t)});function No(e){return To(Hu,e)}o(No,"url");var Dr=T("ZodMiniNumber",(e,t)=>{eo.init(e,t),J.init(e,t)});function X(e){return Io(Dr,e)}o(X,"number");var Nr=T("ZodMiniBoolean",(e,t)=>{Or.init(e,t),J.init(e,t)});function B(e){return $o(Nr,e)}o(B,"boolean");var Co=T("ZodMiniBigInt",(e,t)=>{to.init(e,t),J.init(e,t)});var qu=T("ZodMiniAny",(e,t)=>{ro.init(e,t),J.init(e,t)});function vt(){return zo(qu)}o(vt,"any");var Wu=T("ZodMiniUnknown",(e,t)=>{no.init(e,t),J.init(e,t)});function k(){return Oo(Wu)}o(k,"unknown");var Gu=T("ZodMiniVoid",(e,t)=>{oo.init(e,t),J.init(e,t)});function Uo(e){return ko(Gu,e)}o(Uo,"_void");var Mo=T("ZodMiniDate",(e,t)=>{io.init(e,t),J.init(e,t)});var Ju=T("ZodMiniArray",(e,t)=>{ao.init(e,t),J.init(e,t)});function D(e,t){return new Ju({type:"array",element:e,...Z(t)})}o(D,"array");var Ku=T("ZodMiniObject",(e,t)=>{so.init(e,t),J.init(e,t),G(e,"shape",()=>t.shape)});function l(e,t){let r={type:"object",shape:e??{},...Z(t)};return new Ku(r)}o(l,"object");var Xu=T("ZodMiniUnion",(e,t)=>{kr.init(e,t),J.init(e,t)});function N(e,t){return new Xu({type:"union",options:e,...Z(t)})}o(N,"union");var Yu=T("ZodMiniDiscriminatedUnion",(e,t)=>{uo.init(e,t),J.init(e,t)});function Ne(e,t,r){return new Yu({type:"union",options:t,discriminator:e,...Z(r)})}o(Ne,"discriminatedUnion");var Qu=T("ZodMiniRecord",(e,t)=>{co.init(e,t),J.init(e,t)});function w(e,t,r){return new Qu({type:"record",keyType:e,valueType:t,...Z(r)})}o(w,"record");var ec=T("ZodMiniEnum",(e,t)=>{lo.init(e,t),J.init(e,t),e.options=Object.values(t.entries)});function U(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new ec({type:"enum",entries:r,...Z(t)})}o(U,"_enum");var tc=T("ZodMiniLiteral",(e,t)=>{po.init(e,t),J.init(e,t)});function S(e,t){return new tc({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}o(S,"literal");var rc=T("ZodMiniTransform",(e,t)=>{mo.init(e,t),J.init(e,t)});function Pe(e){return new rc({type:"transform",transform:e})}o(Pe,"transform");var nc=T("ZodMiniOptional",(e,t)=>{fo.init(e,t),J.init(e,t)});function y(e){return new nc({type:"optional",innerType:e})}o(y,"optional");var oc=T("ZodMiniNullable",(e,t)=>{go.init(e,t),J.init(e,t)});function xt(e){return new oc({type:"nullable",innerType:e})}o(xt,"nullable");var ic=T("ZodMiniPipe",(e,t)=>{yo.init(e,t),J.init(e,t)});function _e(e,t){return new ic({type:"pipe",in:e,out:t})}o(_e,"pipe");var ac=T("ZodMiniCustom",(e,t)=>{ho.init(e,t),J.init(e,t)});function Xt(e,t){return Ro(ac,e??(()=>!0),t)}o(Xt,"custom");var Pt={};kn(Pt,{bigint:()=>mc,boolean:()=>dc,date:()=>fc,number:()=>pc,string:()=>lc});function lc(e){return bo(Kt,e)}o(lc,"string");function pc(e){return Eo(Dr,e)}o(pc,"number");function dc(e){return So(Nr,e)}o(dc,"boolean");function mc(e){return Ao(Co,e)}o(mc,"bigint");function fc(e){return wo(Mo,e)}o(fc,"date");var Ur=l({retryOnFailure:l({defaultValue:y(B()),hide:y(B())}),continueOnFailure:l({defaultValue:y(B()),hide:y(B())})}),Cr=class{constructor(t,r,n,i,u,c,d,f,h,P,$){this.name=t;this.displayName=r;this.description=n;this.props=i;this.run=u;this.test=c;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=h;this.audience=P;this.aiMetadata=$}static{o(this,"IAction")}},be=o(e=>new Cr(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=l({displayName:a(),description:y(a())}),C=o((e,t)=>l({type:S(t),required:B(),defaultValue:y(vt())}),"TPropertyValue");var ee=l({...F.shape,...C(a(),"SHORT_TEXT").shape}),le=l({...F.shape,...C(a(),"LONG_TEXT").shape});var Lo=l({label:a(),value:k()}),Yt=l({disabled:y(B()),placeholder:y(a()),options:D(Lo)});var te=l({...F.shape,options:Yt,...C(k(),"STATIC_DROPDOWN").shape}),pe=l({...F.shape,options:Yt,...C(D(k()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Mr=l({...F.shape,...C(k(),"DROPDOWN").shape,refreshers:D(a())}),_t=l({...F.shape,...C(D(k()),"MULTI_SELECT_DROPDOWN").shape,refreshers:D(a())});var de=l({...F.shape,...C(B(),"CHECKBOX").shape});var me=l({...F.shape,...C(X(),"NUMBER").shape});var bt=l({...F.shape,...C(k(),"FILE").shape});var Tt=l({...F.shape,...C(a(),"DATE_TIME").shape});var Fo=w(a(),N([ee,le,te,_t,pe,de,me,bt,Tt])),It=l({...F.shape,properties:Fo,...C(D(k()),"ARRAY").shape});var Et=l({...F.shape,...C(N([w(a(),k())]),"JSON").shape});var Bo=N([ee,te,Et,It,pe]),yc=w(a(),Bo),jr=l({refreshers:D(a()),...F.shape,...C(k(),"DYNAMIC").shape});var Qt=l({...F.shape,...C(Uo(),"MARKDOWN").shape});var $t=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))($t||{}),Ce=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Ce||{}),Ue=(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))(Ue||{});var St=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(St||{}),Lr="both_client_credentials_and_authorization_code";var $e=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))($e||{}),At=(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))(At||{}),hc=l({strategy:U(At),paramName:y(a())}),zt=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(zt||{});var er=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(er||{}),Vo=l({status:y(X()),body:y(k()),headers:y(w(a(),a()))}),Zo=l({type:S("DELAY"),resumeDateTime:a(),requestIdToReply:y(a()),handlerId:y(a()),streamStepProgress:y(U(er))}),Ho=l({type:S("WEBHOOK"),requestId:a(),requestIdToReply:y(a()),response:Vo,handlerId:y(a()),streamStepProgress:y(U(er))}),vc=N([Zo,Ho]);var xc=l({body:k(),rawBody:y(k()),headers:w(a(),a()),queryParams:w(a(),a())});function fe(e){return e==null}o(fe,"isNil");function Ot(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}o(Ot,"isEmpty");function tr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}o(tr,"assertNotNullOrUndefined");var Fr=ke(require("crypto"),1);var Pc=128,Se,Me,_c=o(e=>{!Se||Se.length<e?(Se=Buffer.allocUnsafe(e*Pc),Fr.default.randomFillSync(Se),Me=0):Me+e>Se.length&&(Fr.default.randomFillSync(Se),Me=0),Me+=e},"fillPool"),bc=o(e=>(_c(e|=0),Se.subarray(Me-e,Me)),"random"),Tc=o((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(u=t)=>{let c="";for(;;){let d=r(i),f=i;for(;f--;)if(c+=e[d[f]&n]||"",c.length===u)return c}}},"customRandom"),Wo=o((e,t=21)=>Tc(e,t,bc),"customAlphabet");var Ic="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Go=21,zb=a().check(xe(new RegExp(`^[0-9a-zA-Z]{${Go}}$`))),Ec=Wo(Ic,Go);var Te=_e(Pe(e=>e instanceof Date?e.toISOString():e),a()),re={id:a(),created:Te,updated:Te},V=o(e=>y(xt(e)),"Nullable");function Br(e){return y(xt(U(e)))}o(Br,"NullableEnum");var wb=_e(Pe(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),y(B())),rr=o(e=>_e(Pe(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),y(D(e))),"OptionalArrayFromQuery");var Nb=w(a(),k());var kt=(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))(kt||{});var Wb=a().check(xe(/^#[0-9A-Fa-f]{6}$/));var Jb=l({filename:a(),data:k(),type:S("file"),mimetype:y(a())});var $c=ke(Ko());var rT=l({...re,name:a(),permissions:D(a()),platformId:V(a()),type:a(),userCount:y(X())});var Xo=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Xo||{}),Vr=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Vr||{}),Zr=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Zr||{});var Hr=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Hr||{});var qr=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(qr||{});var Sc=l({mode:U(Xo),value:k()}),Ac=l({auth:y(a()),fields:w(a(),Sc)}),zc=l({pieceName:a(),pieceVersion:a(),actionName:a(),predefinedInput:y(Ac)}),Oc=l({type:S("PIECE"),toolName:a().check(oe(1)),pieceMetadata:zc}),kc=l({type:S("none")}),wc=l({type:S("access_token"),accessToken:a()}),Rc=l({type:S("api_key"),apiKey:a(),apiKeyHeader:a()}),Dc=l({type:S("headers"),headers:w(a(),a())}),Nc=Ne("type",[kc,wc,Rc,Dc]),Yo=l({type:S("FLOW"),toolName:a().check(oe(1)),externalFlowId:a(),flowDisplayName:y(a())}),Qo=l({type:S("MCP"),toolName:a().check(oe(1)),serverUrl:No(),protocol:U(Zr),auth:Nc}),ei=l({type:S("KNOWLEDGE_BASE"),toolName:a().check(oe(1)),sourceType:U(Vr),sourceId:a(),sourceName:a()}),Cc=Ne("type",[Oc,Yo,Qo,ei]),Uc=l({displayName:a(),description:y(a()),type:U(Hr)}),ti=l({type:S("MARKDOWN"),markdown:a()}),je={type:S("TOOL_CALL"),input:V(w(a(),k())),output:y(k()),toolName:a(),status:U(qr),toolCallId:a(),startTime:a(),endTime:y(a())},zT=l(je),ri=Ne("toolCallType",[l({...je,toolCallType:S("PIECE"),pieceName:a(),pieceVersion:a(),actionName:a()}),l({...je,toolCallType:S("FLOW"),displayName:a(),externalFlowId:a()}),l({...je,toolCallType:S("MCP"),displayName:a(),serverUrl:a()}),l({...je,toolCallType:S("KNOWLEDGE_BASE"),displayName:a(),sourceType:a()}),l({...je,toolCallType:S("UNKNOWN"),displayName:a()})]),Mc=N([ti,ri]);var Wr=(r=>(r.IMAGE="image",r.TEXT="text",r))(Wr||{}),ge=l({apiKey:a()}),jc=ge,Lc=l({apiKey:a(),apiKeyHash:a()}),Fc=ge,Bc=ge,Vc=ge,Zc=ge,Hc=ge,qc=ge,Wc=ge,ni=l({accessKeyId:a().check(oe(1)),secretAccessKey:a().check(oe(1))}),Gc=l({}),Jc=l({}),Kc=l({}),Xc=l({}),Yc=l({}),Qc=l({}),oi=l({modelId:a(),modelName:a(),modelType:U(Wr)}),ii=l({apiKeyHeader:a(),baseUrl:a(),models:D(oi),defaultHeaders:y(w(a(),a()))}),ai=l({accountId:a(),gatewayId:a(),models:D(oi),vertexProject:y(a()),vertexRegion:y(a())}),si=l({resourceName:a(),apiVersion:_e(Pe(e=>typeof e=="string"&&e.trim().length===0?void 0:e),y(a()))}),ui=l({region:a().check(oe(1))}),el=N([jc,Vc,Zc,Hc,qc,Bc,Fc,Lc,ni,Wc]),ci=N([ii,ai,si,ui,Gc,Kc,Xc,Yc,Jc,Qc]),tl=l({id:a(),name:a(),type:U(Wr)}),rl=l({id:a(),name:a(),provider:U(kt),config:ci,enabledForChat:B()}),nl=l({provider:U(kt),config:ci,auth:el,platformId:a()});var RT={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var ol=l({base64Url:a(),fileName:a(),extension:y(a())}),il=l({mimeType:a(),url:a(),fileName:y(a())}),Gr=N([ol,il]);var al=N([l({type:S("file"),value:Gr}),l({type:S("markdown"),value:a(),files:y(D(Gr))})]),sl=l({sessionId:a(),message:a(),files:y(D(a()))});var pi=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(pi||{}),di=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(di||{}),Jr=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Jr||{});var ul=N([l({...re,name:a(),externalId:a(),type:S("STATIC_DROPDOWN"),tableId:a(),projectId:a(),data:l({options:D(l({value:a()}))})}),l({...re,name:a(),externalId:a(),type:N([S("TEXT"),S("NUMBER"),S("DATE")]),tableId:a(),projectId:a()})]),cl=l({...re,name:a(),folderId:V(a()),projectId:a(),externalId:a(),status:Br(di),trigger:Br(pi)}),ll=l({...re,tableId:a(),projectId:a(),cells:w(a(),l({updated:a(),created:a(),value:k(),fieldName:a()}))}),pl=l({events:D(U(Jr)),webhookUrl:a(),flowId:a()}),dl=l({fields:D(l({id:a(),name:a()})),rows:D(w(a(),a())),name:a()}),ml=l({projectId:a(),limit:y(Pt.number()),cursor:y(a()),name:y(a()),externalIds:rr(a()),folderId:y(a()),folderIds:rr(a())}),fl=l({records:D(D(l({fieldId:a(),value:fi()}))),tableId:a()}),gl=l({cells:y(D(l({fieldId:a(),value:fi()}))),tableId:a(),agentUpdate:y(B())}),mi=Ne("operator",[Ae("eq"),Ae("neq"),Ae("gt"),Ae("gte"),Ae("lt"),Ae("lte"),Ae("co"),li("exists"),li("not_exists")]),yl=l({tableId:a(),limit:y(Pt.number()),cursor:y(a()),filters:rr(mi)});function fi(){return _e(Pe(e=>e==null?e:String(e)),xt(a()))}o(fi,"coerceToString");function Ae(e){return l({fieldId:a(),operator:S(e),value:a()})}o(Ae,"valueFilter");function li(e){return l({fieldId:a(),operator:S(e)})}o(li,"existenceFilter");var hl=l({status:y(X()),body:y(k()),headers:y(w(a(),a()))}),vl=l({...re,deleted:V(Te),ownerId:a(),displayName:a(),platformId:a(),externalId:V(a())});var gi=l({name:a(),description:y(a()),type:a(),required:B()}),xl=l({pieceName:a(),triggerName:a(),input:l({toolName:a(),toolDescription:a(),inputSchema:D(gi),returnsResponse:B()})});var yi="^[0-9]+\\.[0-9]+\\.[0-9]+$",YT=new RegExp(yi),_l="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",QT=a().check(xe(new RegExp(yi))),eI=a().check(xe(new RegExp(_l))),bl=l({packageType:S("ARCHIVE"),pieceType:U(Ce),pieceName:a(),pieceVersion:a(),archiveId:a(),platformId:a()}),hi=l({packageType:S("REGISTRY"),pieceType:S("OFFICIAL"),pieceName:a(),pieceVersion:a()}),vi=l({packageType:S("REGISTRY"),pieceType:S("CUSTOM"),pieceName:a(),pieceVersion:a(),platformId:a()}),tI=N([hi,vi]),rI=N([bl,hi,vi]),xi=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))(xi||{}),Tl=l({type:U(xi),cronExpression:a(),timezone:a()}),nI=l({...re,type:U($e),projectId:a(),flowId:a(),triggerName:a(),schedule:V(Tl),flowVersionId:a(),pieceName:a(),pieceVersion:a(),deleted:V(a()),simulate:B()}),Pi=(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))(Pi||{}),_i=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(_i||{}),bi=(r=>(r.S3="S3",r.DB="DB",r))(bi||{}),oI=l({...re,projectId:V(a()),platformId:V(a()),type:U(Pi),compression:U(_i),data:y(k()),location:U(bi),size:V(X()),fileName:V(a()),s3Key:V(a()),metadata:V(w(a(),a()))}),Ti=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Ti||{}),Ii=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Ii||{}),iI=l({id:a(),email:a(),firstName:a(),status:U(Ii),externalId:V(a()),platformId:V(a()),platformRole:U(Ti),lastName:a(),created:Te,updated:Te,lastActiveDate:V(Te),imageUrl:V(a())});var Kr=l({...F.shape,...C(w(a(),k()),"OBJECT").shape});var Ai=l({...F.shape,...C(a(),"COLOR").shape});var Xr=N([ee,le,Qt,de,te,pe,Mr,_t,jr,me,It,Kr,Et,Tt,bt,Ai]),b={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 se=l({displayName:a(),description:y(a())});var zi=l({username:a(),password:a()}),Yr=l({...se.shape,username:l({displayName:a(),description:y(a())}),password:l({displayName:a(),description:y(a())}),...C(zi,"BASIC_AUTH").shape});var Sl=w(a(),N([ee,le,me,de,te])),Qr=l({...se.shape,props:Sl,...C(k(),"CUSTOM_AUTH").shape});var ze=l({...se.shape,...C(l({auth:a()}),"SECRET_TEXT").shape});var Al=w(a(),N([ee,le,ze,me,de,te,pe,Qt])),Oi=l({...se.shape,props:Al,...C(k(),"OIDC").shape});var en=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(en||{}),ki=N([ee,ze,te]),wi=w(a(),ki),zl=l({props:y(w(a(),ki)),authUrl:a(),tokenUrl:a(),scope:D(a()),prompt:y(N([S("none"),S("consent"),S("login"),S("omit")])),pkce:y(B()),pkceMethod:y(N([S("plain"),S("S256")])),authorizationMethod:y(U(en)),grantType:y(N([U(St),S(Lr)])),extra:y(w(a(),a()))}),Ri=l({access_token:a(),props:y(wi),data:w(a(),vt())}),tn=l({...se.shape,...zl.shape,...C(Ri,"OAUTH2").shape});var Le=N([Yr,Qr,Oi,tn,ze]),wt="Connection",or={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||wt}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||wt,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||wt}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||wt}},None(){}};var UE={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 Ol=l({...F.shape,...C(k(),"CUSTOM").shape,code:a()});var kl=N([Xr,Le]),rn=w(a(),kl),n$=w(a(),Xr);var Di=N([l({strategy:S("CRON"),cronExpression:a()}),l({strategy:S("NONE")})]);var Ni="2",ir="0.82.0";var nn=class{constructor(t,r,n,i,u,c,d,f,h=ir,P,$=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=f;this.minimumSupportedRelease=h;this.maximumSupportedRelease=P;this.description=$;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:Ni}),"getContextInfo");(!wl(h)||Rl(h,ir))&&(this.minimumSupportedRelease=ir),u.forEach(x=>this._actions[x.name]=x),c.forEach(x=>this._triggers[x.name]=x)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Ci=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 nn(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function wl(e){return/^\d+\.\d+\.\d+$/.test(e)}o(wl,"isValidSimpleSemver");function Rl(e,t){let[r,n,i]=e.split(".").map(Number),[u,c,d]=t.split(".").map(Number);return r!==u?r<u:n!==c?n<c:i<d}o(Rl,"isSemverLessThan");var Dl=y(w(a(),w(a(),a()))),Ui=l({id:y(a()),name:a(),displayName:a(),logoUrl:a(),description:a(),authors:D(a()),platformId:y(a()),directoryPath:y(a()),auth:y(N([Le,D(Le)])),version:a(),categories:y(D(U(Ue))),minimumSupportedRelease:y(a()),maximumSupportedRelease:y(a()),i18n:Dl}),Nl=U(["human","ai","both"]),Mi=l({description:y(a()),idempotent:y(B())}),ji=l({name:a(),displayName:a(),description:a(),props:rn,requireAuth:B(),errorHandlingOptions:y(Ur),outputSchema:y(Xt()),audience:y(Nl),aiMetadata:y(Mi)}),Li=l({name:a(),displayName:a(),description:a(),props:rn,errorHandlingOptions:y(Ur),type:U($e),sampleData:k(),handshakeConfiguration:y(Xt()),renewConfiguration:y(Di),testStrategy:U(zt),outputSchema:y(Xt()),aiMetadata:y(Mi)}),Cl=l({...Ui.shape,actions:w(a(),ji),triggers:w(a(),Li)}),Ul=l({...Ui.shape,actions:X(),triggers:X(),suggestedActions:y(D(Li)),suggestedTriggers:y(D(ji))}),Fi=l({projectUsage:X(),tags:y(D(a())),pieceType:U(Ce),packageType:U($t),platformId:y(a()),archiveId:y(a())}),nS=l({...Cl.shape,...Fi.shape}),oS=l({...Ul.shape,...Fi.shape}),iS=l({name:a(),version:a()});var Ml=ke(require("path")),jl=ke(require("fs/promises"));var ar=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((u,c)=>{i.append(c,u)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var sr=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(t=new on,r=new an){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},on=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},an=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 ur=class extends Error{constructor(r,n){let i=n.status||500,u=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:u},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=u}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var cr=class extends ar{static{o(this,"FetchHttpClient")}constructor(t="",r=new sr){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(t),u=this.getHeaders(t),c=t.queryParams??{};for(let[j,Q]of Object.entries(c))i.append(j,Q);let d=i.toString(),f=d?`${n}?${d}`:n,h=t.responseType??"json",P=t.followRedirects??!0,$=t.retries??0,{body:x,extraHeaders:s,isStream:p}=Ll(t.body,u),g=Bl({...u,...s}),m=await Fl(async()=>{let j=new AbortController,Q=t.timeout&&t.timeout>0?setTimeout(()=>j.abort(),t.timeout):void 0;try{let ne={method:t.method.toString(),headers:g,body:x,redirect:P?"follow":"manual",signal:j.signal};return p&&(ne.duplex="half"),r?.dispatcher!==void 0&&(ne.dispatcher=r.dispatcher),await fetch(f,ne)}finally{Q!==void 0&&clearTimeout(Q)}},$),v=P?300:400;if(m.status<200||m.status>=v){let j=await Bi(m,h),Q=new ur(t.body,{status:m.status,responseBody:j});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Q),Q}let _=await Bi(m,h);return{status:m.status,headers:Vl(m.headers),body:_}}};function Ll(e,t){return Hl(e)?{body:void 0,extraHeaders:{},isStream:!1}:Zl(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}o(Ll,"serializeBody");async function Bi(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Bi,"parseResponseBody");async function Fl(e,t){let r;for(let n=0;n<=t;n++)try{let i=await e();if(i.status>=500&&n<t){await Vi(n);continue}return i}catch(i){if(r=i,n<t){await Vi(n);continue}throw i}throw r}o(Fl,"sendWithRetries");function Vi(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}o(Vi,"backoff");function Bl(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}o(Bl,"normalizeHeaders");function Vl(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}o(Vl,"toHttpHeaders");function Zl(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}o(Zl,"isNodeFormData");function Hl(e){return e==null}o(Hl,"isNil");var Fe=new cr;var Rt=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(Rt||{});var wd=ke(require("fs")),Js=ke(Gs());var Rd={"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 Dd(e){let t=e.split(";")[0].trim().toLowerCase();return Rd[t]??""}o(Dd,"contentTypeToExtension");var Nd=o(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Cd=o((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Ks({auth:e,baseUrl:t,authMapping:r,description:n,displayName:i,name:u,props:c,extraProps:d,authLocation:f="headers"}){return be({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:b.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:o(async({auth:h})=>({url:b.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
3
+ i.e ${Cd(t,h)}/resource or /resource`,required:!0,defaultValue:h?t(h):"",...c?.url??{}})}),"props")}),method:b.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(Rt).map(h=>({label:h,value:h}))},...c?.method??{}}),headers:b.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:b.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:b.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:b.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:h})=>{if(!h)return{};let P=h,$={};switch(P){case"none":break;case"json":$.data=b.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":$.data=b.LongText({displayName:"Raw Body",required:!0});break;case"form_data":$.data=b.Array({displayName:"Form Data",required:!0,properties:{fieldName:b.ShortText({displayName:"Field Name",required:!0}),fieldType:b.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:b.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:b.File({displayName:"File Field Value",required:!1})}});break}return $},"props")}),response_is_binary:b.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:b.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:b.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:b.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async h=>{let{method:P,url:$,headers:x,queryParams:s,body:p,body_type:g,failsafe:m,timeout:v,response_is_binary:_,followRedirects:j}=h.propsValue;tr(P,"Method"),tr($,"URL");let Q=fe(r)?{}:await r(h.auth,h.propsValue),ne=$.url,pt=ne.startsWith("http://")||ne.startsWith("https://")?ne:Nd({baseUrl:t(h.auth),relativePath:ne}),Ee={method:P,url:pt,headers:{...x??{},...f==="headers"||!fe(f)?Q:{}},queryParams:{...f==="queryParams"?Q:{},...s??{}},timeout:v?v*1e3:0,followRedirects:j};if(_&&(Ee.responseType="arraybuffer"),p)if(g&&g!=="none"){let ue=p.data;if(g==="form_data"){let pu=ue,Mt=new Js.default;for(let{fieldName:An,fieldType:zn,textFieldValue:On,fileFieldValue:_r}of pu)zn==="text"&&!Ot(On)?Mt.append(An,On):zn==="file"&&!Ot(_r)&&Mt.append(An,_r.data,{filename:_r?.filename});Ee.body=Mt,Ee.headers={...Ee.headers,...Mt.getHeaders()}}else Ee.body=ue}else g||(Ee.body=p);try{let ue=await Fe.sendRequest(Ee);return await Ud(h.files,ue.body,ue.status,ue.headers,_)}catch(ue){if(m)return ue.errorMessage();throw ue}},"run")})}o(Ks,"createCustomApiCallAction");var Ud=o(async(e,t,r,n,i)=>{let u;if(i&&Md(t)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=Dd(c??"")||"txt",f;t instanceof ArrayBuffer?f=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?f=t:f=Buffer.from(t),u=await e.write({fileName:`output.${d}`,data:f})}else u=t;return{status:r,headers:n,body:u}},"handleBinaryResponse"),Md=o(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var xr="https://api.polydoc.tech",Xs="/pdf/convert",Pr="/screenshot/convert",Ys=[{label:"URL (render a web page)",value:"url"},{label:"HTML (render an inline HTML string)",value:"html"},{label:"Template (render a saved PolyDoc template by ID)",value:"template"}],Qs=[{label:"Download (return the file)",value:"download"},{label:"Cloud Storage (upload to a presigned URL)",value:"cloudStorage"},{label:"Webhook (deliver the file to a URL)",value:"webhook"}],eu=["A3","A4","A5","Ledger","Legal","Letter","Tabloid"],tu=["png","jpeg","webp"],ru=[{label:"Binary file (write the image to a file)",value:"binaryFile"},{label:"Base64 (return the image as a base64 string)",value:"base64"}],nu=[{label:"ZUGFeRD (Germany / EU)",value:"zugferd"},{label:"Factur-X (France / EU)",value:"facturx"}],ou=["minimum","basicwl","basic","en16931","extended"];var jd=`Get an API key from the PolyDoc dashboard (dashboard.polydoc.tech, API Keys). It is sent as Authorization: Bearer <key>.
4
+
5
+ Turn on **Sandbox** to test against sandbox quota (output is watermarked). Leave it off for production conversions.`,ye=or.CustomAuth({description:jd,required:!0,props:{apiKey:or.SecretText({displayName:"API Key",description:"Your PolyDoc API key from dashboard.polydoc.tech.",required:!0}),sandbox:b.Checkbox({displayName:"Sandbox",description:"Use sandbox quota (watermarked output).",required:!1,defaultValue:!1})},validate:o(async({auth:e})=>{let t=e.apiKey;if(!t)return{valid:!1,error:"API key is required."};try{return await Fe.sendRequest({method:"POST",url:`${xr.replace(/\/+$/,"")}${Pr}`,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json","X-Sandbox":e.sandbox?"true":"false"},body:{source:"<p>polydoc</p>",screenshot:{type:"png"}},responseType:"arraybuffer"}),{valid:!0}}catch(r){let n=r?.response?.status;return n===401?{valid:!1,error:"Invalid PolyDoc API key."}:{valid:!1,error:`Could not validate the PolyDoc API key (${n?`the API returned HTTP ${n}`:"the API was unreachable"}). Check the key and try again.`}}},"validate")});function iu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}o(iu,"isPlainObject");function au(e,t){let r={...e};for(let[n,i]of Object.entries(t))iu(i)&&iu(r[n])?r[n]=au(r[n],i):r[n]=i;return r}o(au,"mergeDeep");function Ld(e){switch(e.sourceType){case"url":return e.url??"";case"html":return e.html??"";case"template":return`[template:${e.templateId??""}]`;default:return""}}o(Ld,"resolveSource");function Fd(e){let t={};typeof e.format=="string"&&e.format!==""&&(t.format=e.format);for(let n of["landscape","printBackground","outline","tagged"])typeof e[n]=="boolean"&&(t[n]=e[n]);return typeof e.scale=="number"&&(t.scale=e.scale),typeof e.pageRanges=="string"&&e.pageRanges!==""&&(t.pageRanges=e.pageRanges),["marginTop","marginRight","marginBottom","marginLeft"].some(n=>e[n]!==void 0&&e[n]!=="")&&(t.margin={top:e.marginTop??"2",right:e.marginRight??"1",bottom:e.marginBottom??"2",left:e.marginLeft??"1"}),Object.keys(t).length>0?t:void 0}o(Fd,"buildLayout");function Bd(e){let t={};typeof e.imageType=="string"&&e.imageType!==""&&(t.type=e.imageType),typeof e.fullPage=="boolean"&&(t.fullPage=e.fullPage),typeof e.quality=="number"&&(t.quality=e.quality),e.encoding==="base64"&&(t.encoding="base64");let r=typeof e.viewportWidth=="number",n=typeof e.viewportHeight=="number";if(r!==n)throw new Error("Both viewport width and height are required to set a custom viewport.");if(r&&n){let i={width:e.viewportWidth,height:e.viewportHeight};typeof e.devicePixelRatio=="number"&&e.devicePixelRatio>0&&(i.devicePixelRatio=e.devicePixelRatio),t.viewport=i}return Object.keys(t).length>0?t:void 0}o(Bd,"buildScreenshot");function We(e){let t=e.operation==="screenshot"?Pr:Xs,r={source:Ld(e)};if(e.templateData&&Object.keys(e.templateData).length>0&&(r.templateData=e.templateData),e.filename&&(r.filename=e.filename),e.tag&&(r.tag=e.tag),typeof e.timeout=="number"&&e.timeout>0&&(r.timeout=e.timeout),e.operation==="pdf"){let c=e.pdfOptions?Fd(e.pdfOptions):void 0;c&&(r.layout=c)}if(e.operation==="screenshot"){let c=e.screenshotOptions?Bd(e.screenshotOptions):void 0;c&&(r.screenshot=c)}if(e.operation==="einvoice"){let c={standard:e.eInvoiceStandard,profile:e.eInvoiceProfile,invoice:e.invoice??{}};typeof e.eInvoiceVerify=="boolean"&&(c.verify=e.eInvoiceVerify),r.eInvoice=c}let n=e.delivery??{mode:"download"},i=n.mode==="download";n.mode==="cloudStorage"&&n.presignedUrl&&(r.cloudStorage={presignedUrl:n.presignedUrl}),n.mode==="webhook"&&n.webhook&&(r.webhook=n.webhook);let u=e.advanced&&Object.keys(e.advanced).length>0?au(r,e.advanced):r;return{endpoint:t,body:u,isBinary:i}}o(We,"buildRequestBody");function su(e,t){return e==="screenshot"?`screenshot.${t==="jpeg"?"jpg":t??"png"}`:"document.pdf"}o(su,"defaultFilename");async function Ge(e,t){let r=xr.replace(/\/+$/,""),n=await Fe.sendRequest({method:"POST",url:`${r}${t.endpoint}`,headers:{Authorization:`Bearer ${e.props.apiKey}`,"Content-Type":"application/json","X-Sandbox":e.props.sandbox?"true":"false"},body:t.body,responseType:t.isBinary?"arraybuffer":"json"});return{status:n.status,headers:n.headers??{},body:n.body}}o(Ge,"polyDocRequest");function Je(e){let r=e?.response?.body;if(r instanceof ArrayBuffer?r=Buffer.from(r).toString("utf8"):Buffer.isBuffer(r)&&(r=r.toString("utf8")),typeof r=="string"){let n=r;try{r=JSON.parse(n)}catch{return n||void 0}}if(r&&typeof r=="object"&&!Array.isArray(r)){let n=r,i=n.message;if(typeof i=="string")return i;let u=n.error;if(typeof u=="string")return u}}o(Je,"extractApiErrorMessage");async function Ke(e){let{response:t,isBinary:r,files:n,operation:i,filename:u,imageType:c}=e;if(!r)return t.body??{success:!0};let d=(Sn(t.headers["content-type"])??"application/octet-stream").split(";")[0].trim(),f=Vd(t.body),h=u||su(i,c);return{success:!0,file:await n.write({fileName:h,data:f}),fileName:h,contentType:d,sizeBytes:f.length,conversionId:Sn(t.headers["x-conversion-id"]),creditUsed:Sn(t.headers["x-credit-used"])}}o(Ke,"shapeOutput");function Sn(e){return Array.isArray(e)?e[0]:e}o(Sn,"headerValue");function Vd(e){if(Buffer.isBuffer(e))return e;if(e instanceof ArrayBuffer)return Buffer.from(e);if(ArrayBuffer.isView(e))return Buffer.from(e.buffer,e.byteOffset,e.byteLength);if(typeof e=="string")return Buffer.from(e,"binary");throw new Error("PolyDoc returned an unexpected response body for a binary delivery; expected file bytes.")}o(Vd,"toBuffer");var Xe=o((e="url")=>b.StaticDropdown({displayName:"Source Type",description:"Where the content comes from",required:!0,defaultValue:e,options:{disabled:!1,options:Ys.map(t=>({label:t.label,value:t.value}))}}),"sourceTypeProp"),Ye=b.LongText({displayName:"Source",description:"The URL, inline HTML, or saved template ID, matching the Source Type above.",required:!0}),Qe=b.Json({displayName:"Template Data",description:"Data passed to the Liquid template renderer (used only when Source Type is Template).",required:!1,defaultValue:{}}),et=b.StaticDropdown({displayName:"Delivery",description:"How the generated file is returned",required:!0,defaultValue:"download",options:{disabled:!1,options:Qs.map(e=>({label:e.label,value:e.value}))}}),tt=b.ShortText({displayName:"Presigned URL",description:"HTTP PUT presigned URL from your storage provider (required for Cloud Storage delivery).",required:!1}),rt=b.ShortText({displayName:"Webhook URL",description:"URL the generated file is delivered to (required for Webhook delivery).",required:!1}),nt=b.Json({displayName:"Webhook Options",description:"Extra webhook settings merged with the URL: async, method, headers, retries, retryDelay, timeout.",required:!1,defaultValue:{}}),ot=b.ShortText({displayName:"Filename",description:"Output filename (overrides the default).",required:!1}),it=b.ShortText({displayName:"Tag",description:"Label for logging and analytics (max 30 characters).",required:!1}),at=b.Number({displayName:"Timeout (ms)",description:"Conversion timeout in milliseconds.",required:!1}),st=b.Json({displayName:"Advanced (JSON)",description:"Raw fields deep-merged into the request body for any API option not exposed above (e.g. pdf.watermark, pdf.pdfa, render, request).",required:!1,defaultValue:{}});function Ut(e){let t=e;if(typeof t=="string"){let r=t.trim();if(r==="")return;try{t=JSON.parse(r)}catch{return}}if(t&&typeof t=="object"&&!Array.isArray(t)){let r=t;return Object.keys(r).length>0?r:void 0}}o(Ut,"asJsonObject");function ut(e){let t=e.sourceType??"url",r=e.source??"";return t==="html"?{sourceType:t,html:r}:t==="template"?{sourceType:t,templateId:r,templateData:Ut(e.templateData)}:{sourceType:t,url:r}}o(ut,"resolveSourceParams");function ct(e){let t=e.deliveryMode??"download";if(t==="cloudStorage"){let r=e.presignedUrl??"";if(!r)throw new Error("Cloud Storage delivery requires a Presigned URL.");return{mode:t,presignedUrl:r}}if(t==="webhook"){let r=e.webhookUrl??"";if(!r)throw new Error("Webhook delivery requires a Webhook URL.");let n=Ut(e.webhookOptions)??{};return{mode:t,webhook:{url:r,...n}}}return{mode:"download"}}o(ct,"resolveDelivery");function lt(e){return{filename:e.filename||void 0,tag:e.tag||void 0,timeout:typeof e.timeout=="number"?e.timeout:void 0,advanced:Ut(e.advanced)}}o(lt,"resolveMetadata");var uu=be({auth:ye,name:"capture_screenshot",displayName:"Capture Screenshot",description:"Capture a screenshot of a URL, inline HTML, or a saved template.",aiMetadata:{description:"Captures a screenshot (PNG, JPEG, or WebP) of a URL, an inline HTML string, or a saved PolyDoc template. Supports full-page capture, custom viewport, and base64 or file output. Idempotent: the same input yields the same image.",idempotent:!0},props:{sourceType:Xe("url"),source:Ye,templateData:Qe,imageType:b.StaticDropdown({displayName:"Image Type",required:!1,defaultValue:"png",options:{disabled:!1,options:tu.map(e=>({label:e,value:e}))}}),fullPage:b.Checkbox({displayName:"Full Page",description:"Capture the entire scrollable page.",required:!1,defaultValue:!1}),quality:b.Number({displayName:"Quality",description:"Compression quality for JPEG/WebP (0 to 100).",required:!1}),viewportWidth:b.Number({displayName:"Viewport Width",description:"Viewport width in CSS pixels.",required:!1}),viewportHeight:b.Number({displayName:"Viewport Height",description:"Viewport height in CSS pixels.",required:!1}),devicePixelRatio:b.Number({displayName:"Device Pixel Ratio",description:"Device pixel ratio, e.g. 2 for retina (0 to 10).",required:!1}),outputEncoding:b.StaticDropdown({displayName:"Output",description:"Return the image as a file (default) or as a base64 string.",required:!1,defaultValue:"binaryFile",options:{disabled:!1,options:ru.map(e=>({label:e.label,value:e.value}))}}),deliveryMode:et,presignedUrl:tt,webhookUrl:rt,webhookOptions:nt,filename:ot,tag:it,timeout:at,advanced:st},async run(e){let t=e.propsValue,r=t.outputEncoding==="base64",n={operation:"screenshot",...ut(t),...lt(t),delivery:ct(t),screenshotOptions:{imageType:t.imageType,fullPage:t.fullPage,quality:t.quality,encoding:r?"base64":void 0,viewportWidth:t.viewportWidth,viewportHeight:t.viewportHeight,devicePixelRatio:t.devicePixelRatio}},i=We(n);r&&(i.isBinary=!1);try{let u=await Ge(e.auth,i);return await Ke({response:u,isBinary:i.isBinary,files:e.files,operation:"screenshot",filename:n.filename,imageType:t.imageType})}catch(u){throw new Error(Je(u)??u.message)}}});var cu=be({auth:ye,name:"convert_to_pdf",displayName:"Convert to PDF",description:"Convert HTML, a URL, or a saved template to a PDF.",aiMetadata:{description:"Converts a URL, an inline HTML string, or a saved PolyDoc template into a PDF and returns the file (or delivers it to cloud storage / a webhook). Use it to render documents like invoices, reports, or contracts. Idempotent: the same input yields the same PDF.",idempotent:!0},props:{sourceType:Xe("url"),source:Ye,templateData:Qe,format:b.StaticDropdown({displayName:"Page Format",required:!1,defaultValue:"A4",options:{disabled:!1,options:eu.map(e=>({label:e,value:e}))}}),landscape:b.Checkbox({displayName:"Landscape",required:!1,defaultValue:!1}),printBackground:b.Checkbox({displayName:"Print Background",description:"Print background graphics and colors.",required:!1,defaultValue:!0}),scale:b.Number({displayName:"Scale",description:"Render scale (0.1 to 2).",required:!1}),pageRanges:b.ShortText({displayName:"Page Ranges",description:'Pages to include, e.g. "1-5, 8". Empty means all pages.',required:!1}),outline:b.Checkbox({displayName:"Outline (Bookmarks)",description:"Generate PDF bookmarks from HTML headings.",required:!1,defaultValue:!1}),tagged:b.Checkbox({displayName:"Tagged (Accessible)",description:"Produce a tagged, accessible PDF.",required:!1,defaultValue:!1}),marginTop:b.ShortText({displayName:"Margin Top",description:"Top margin with optional unit, e.g. 10mm, 1cm, 0.5in.",required:!1}),marginRight:b.ShortText({displayName:"Margin Right",required:!1}),marginBottom:b.ShortText({displayName:"Margin Bottom",required:!1}),marginLeft:b.ShortText({displayName:"Margin Left",required:!1}),deliveryMode:et,presignedUrl:tt,webhookUrl:rt,webhookOptions:nt,filename:ot,tag:it,timeout:at,advanced:st},async run(e){let t=e.propsValue,r={operation:"pdf",...ut(t),...lt(t),delivery:ct(t),pdfOptions:{format:t.format,landscape:t.landscape,printBackground:t.printBackground,scale:t.scale,pageRanges:t.pageRanges,outline:t.outline,tagged:t.tagged,marginTop:t.marginTop,marginRight:t.marginRight,marginBottom:t.marginBottom,marginLeft:t.marginLeft}},n=We(r);try{let i=await Ge(e.auth,n);return await Ke({response:i,isBinary:n.isBinary,files:e.files,operation:"pdf",filename:r.filename})}catch(i){throw new Error(Je(i)??i.message)}}});var Zd={number:"INV-001",issueDate:"2026-01-31",dueDate:"2026-03-02",currencyCode:"EUR",seller:{name:"Your Company GmbH",address:{line1:"Main St 1",city:"Berlin",postalCode:"10115",countryCode:"DE"},taxId:"DE123456789"},buyer:{name:"Customer SARL",address:{line1:"Rue 2",city:"Paris",postalCode:"75001",countryCode:"FR"}},lines:[{description:"Widget",quantity:2,unitPrice:10,lineTotal:20,vatRate:19,vatCategoryCode:"S"}],taxSummary:[{categoryCode:"S",rate:19,taxableAmount:20,taxAmount:3.8}],paymentTerms:"Net 30 days",totalNetAmount:20,totalTaxAmount:3.8,totalGrossAmount:23.8},lu=be({auth:ye,name:"generate_einvoice",displayName:"Generate E-Invoice",description:"Generate a hybrid e-invoice PDF (Factur-X / ZUGFeRD, EN 16931) from a visual layout plus structured invoice data.",aiMetadata:{description:"Generates a hybrid e-invoice PDF (Factur-X / ZUGFeRD, EN 16931) by embedding structured invoice XML into a visual PDF layout. EN 16931 requires payment terms or a due date, a seller tax ID for VAT category S, and consistent totals. Idempotent: the same input yields the same PDF.",idempotent:!0},props:{sourceType:Xe("html"),source:Ye,templateData:Qe,standard:b.StaticDropdown({displayName:"Standard",description:"The hybrid e-invoice standard to embed.",required:!0,defaultValue:"zugferd",options:{disabled:!1,options:nu.map(e=>({label:e.label,value:e.value}))}}),profile:b.StaticDropdown({displayName:"Profile",description:"The data granularity profile to validate against.",required:!0,defaultValue:"en16931",options:{disabled:!1,options:ou.map(e=>({label:e,value:e}))}}),invoice:b.Json({displayName:"Invoice Data",description:"Structured invoice data: number, dates, currency, seller, buyer, lines, totals. EN 16931 needs payment terms (or due date), seller taxId for VAT category S, and consistent totals. See docs.polydoc.tech.",required:!0,defaultValue:Zd}),verify:b.Checkbox({displayName:"Verify",description:"Validate PDF/A and e-invoice compliance (returns an error if it fails).",required:!1,defaultValue:!1}),deliveryMode:et,presignedUrl:tt,webhookUrl:rt,webhookOptions:nt,filename:ot,tag:it,timeout:at,advanced:st},async run(e){let t=e.propsValue,r={operation:"einvoice",...ut(t),...lt(t),delivery:ct(t),eInvoiceStandard:t.standard,eInvoiceProfile:t.profile,eInvoiceVerify:t.verify===!0,invoice:Ut(t.invoice)??{}},n=We(r);try{let i=await Ge(e.auth,n);return await Ke({response:i,isBinary:n.isBinary,files:e.files,operation:"einvoice",filename:r.filename})}catch(i){throw new Error(Je(i)??i.message)}}});var Hd=Ci({displayName:"PolyDoc",description:"Convert HTML or a URL to PDF, capture screenshots, and generate EU e-invoices (Factur-X / ZUGFeRD).",auth:ye,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/polydoc.png",categories:["CONTENT_AND_FILES","PRODUCTIVITY"],authors:["polydoc-tech","sanket-a11y"],actions:[cu,uu,lu,Ks({baseUrl:o(()=>"https://api.podio.com","baseUrl"),auth:ye,authMapping:o(async e=>({Authorization:`Bearer ${e.props.apikey}`,"X-Sandbox":e.props.sandbox?"true":"false"}),"authMapping")})],triggers:[]});0&&(module.exports={polydoc});
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,5 +0,0 @@
1
- export declare const polydoc: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- sandbox: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- }>>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,OAAO;;;GAuBlB,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,yEAAqE;AACrE,2DAAyD;AACzD,uEAAmE;AACnE,4CAAgD;AAChD,+DAAwE;AAE3D,QAAA,OAAO,GAAG,IAAA,8BAAW,EAAC;IACjC,WAAW,EAAE,SAAS;IACtB,WAAW,EACT,qGAAqG;IACvG,IAAI,EAAE,kBAAW;IACjB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,iDAAiD;IAC1D,UAAU,EAAE,CAAC,sBAAa,CAAC,iBAAiB,EAAE,sBAAa,CAAC,YAAY,CAAC;IACzE,OAAO,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;IACxC,OAAO,EAAE;QACP,0BAAY;QACZ,sCAAiB;QACjB,oCAAgB;QAChB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB;YACtC,IAAI,EAAE,kBAAW;YACjB,WAAW,EAAE,CAAO,IAAS,EAAE,EAAE;gBAAC,OAAA,CAAC;oBACjC,aAAa,EAAE,UAAU,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;oBAC5C,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;iBACnD,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- export declare const captureScreenshot: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- sandbox: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- }>, {
5
- sourceType: import("@activepieces/pieces-framework").StaticDropdownProperty<"url" | "html" | "template", true>;
6
- source: import("@activepieces/pieces-framework").LongTextProperty<true>;
7
- templateData: import("@activepieces/pieces-framework").JsonProperty<false>;
8
- imageType: import("@activepieces/pieces-framework").StaticDropdownProperty<"png" | "jpeg" | "webp", false>;
9
- fullPage: import("@activepieces/pieces-framework").CheckboxProperty<false>;
10
- quality: import("@activepieces/pieces-framework").NumberProperty<false>;
11
- viewportWidth: import("@activepieces/pieces-framework").NumberProperty<false>;
12
- viewportHeight: import("@activepieces/pieces-framework").NumberProperty<false>;
13
- devicePixelRatio: import("@activepieces/pieces-framework").NumberProperty<false>;
14
- outputEncoding: import("@activepieces/pieces-framework").StaticDropdownProperty<"binaryFile" | "base64", false>;
15
- deliveryMode: import("@activepieces/pieces-framework").StaticDropdownProperty<"download" | "cloudStorage" | "webhook", true>;
16
- presignedUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
- webhookUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
- webhookOptions: import("@activepieces/pieces-framework").JsonProperty<false>;
19
- filename: import("@activepieces/pieces-framework").ShortTextProperty<false>;
20
- tag: import("@activepieces/pieces-framework").ShortTextProperty<false>;
21
- timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
22
- advanced: import("@activepieces/pieces-framework").JsonProperty<false>;
23
- }>;
24
- //# sourceMappingURL=capture-screenshot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capture-screenshot.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/capture-screenshot.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;EAwG5B,CAAC"}
@@ -1,112 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.captureScreenshot = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const build_request_body_1 = require("../common/build-request-body");
8
- const client_1 = require("../common/client");
9
- const constants_1 = require("../common/constants");
10
- const output_1 = require("../common/output");
11
- const props_1 = require("../common/props");
12
- exports.captureScreenshot = (0, pieces_framework_1.createAction)({
13
- auth: auth_1.polydocAuth,
14
- name: 'capture_screenshot',
15
- displayName: 'Capture Screenshot',
16
- description: 'Capture a screenshot of a URL, inline HTML, or a saved template.',
17
- aiMetadata: {
18
- description: 'Captures a screenshot (PNG, JPEG, or WebP) of a URL, an inline HTML string, or a saved PolyDoc template. Supports full-page capture, custom viewport, and base64 or file output. Idempotent: the same input yields the same image.',
19
- idempotent: true,
20
- },
21
- props: {
22
- sourceType: (0, props_1.sourceTypeProp)('url'),
23
- source: props_1.sourceProp,
24
- templateData: props_1.templateDataProp,
25
- imageType: pieces_framework_1.Property.StaticDropdown({
26
- displayName: 'Image Type',
27
- required: false,
28
- defaultValue: 'png',
29
- options: { disabled: false, options: constants_1.IMAGE_TYPES.map((t) => ({ label: t, value: t })) },
30
- }),
31
- fullPage: pieces_framework_1.Property.Checkbox({
32
- displayName: 'Full Page',
33
- description: 'Capture the entire scrollable page.',
34
- required: false,
35
- defaultValue: false,
36
- }),
37
- quality: pieces_framework_1.Property.Number({
38
- displayName: 'Quality',
39
- description: 'Compression quality for JPEG/WebP (0 to 100).',
40
- required: false,
41
- }),
42
- viewportWidth: pieces_framework_1.Property.Number({
43
- displayName: 'Viewport Width',
44
- description: 'Viewport width in CSS pixels.',
45
- required: false,
46
- }),
47
- viewportHeight: pieces_framework_1.Property.Number({
48
- displayName: 'Viewport Height',
49
- description: 'Viewport height in CSS pixels.',
50
- required: false,
51
- }),
52
- devicePixelRatio: pieces_framework_1.Property.Number({
53
- displayName: 'Device Pixel Ratio',
54
- description: 'Device pixel ratio, e.g. 2 for retina (0 to 10).',
55
- required: false,
56
- }),
57
- outputEncoding: pieces_framework_1.Property.StaticDropdown({
58
- displayName: 'Output',
59
- description: 'Return the image as a file (default) or as a base64 string.',
60
- required: false,
61
- defaultValue: 'binaryFile',
62
- options: {
63
- disabled: false,
64
- options: constants_1.SCREENSHOT_OUTPUT_ENCODINGS.map((o) => ({ label: o.label, value: o.value })),
65
- },
66
- }),
67
- deliveryMode: props_1.deliveryModeProp,
68
- presignedUrl: props_1.presignedUrlProp,
69
- webhookUrl: props_1.webhookUrlProp,
70
- webhookOptions: props_1.webhookOptionsProp,
71
- filename: props_1.filenameProp,
72
- tag: props_1.tagProp,
73
- timeout: props_1.timeoutProp,
74
- advanced: props_1.advancedProp,
75
- },
76
- run(context) {
77
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
78
- var _a;
79
- const props = context.propsValue;
80
- const base64 = props['outputEncoding'] === 'base64';
81
- const params = Object.assign(Object.assign(Object.assign({ operation: 'screenshot' }, (0, props_1.resolveSourceParams)(props)), (0, props_1.resolveMetadata)(props)), { delivery: (0, props_1.resolveDelivery)(props), screenshotOptions: {
82
- imageType: props['imageType'],
83
- fullPage: props['fullPage'],
84
- quality: props['quality'],
85
- encoding: base64 ? 'base64' : undefined,
86
- viewportWidth: props['viewportWidth'],
87
- viewportHeight: props['viewportHeight'],
88
- devicePixelRatio: props['devicePixelRatio'],
89
- } });
90
- const request = (0, build_request_body_1.buildRequestBody)(params);
91
- // base64 encoding makes the API answer with JSON, never raw bytes.
92
- if (base64) {
93
- request.isBinary = false;
94
- }
95
- try {
96
- const response = yield (0, client_1.polyDocRequest)(context.auth, request);
97
- return yield (0, output_1.shapeOutput)({
98
- response,
99
- isBinary: request.isBinary,
100
- files: context.files,
101
- operation: 'screenshot',
102
- filename: params.filename,
103
- imageType: props['imageType'],
104
- });
105
- }
106
- catch (error) {
107
- throw new Error((_a = (0, client_1.extractApiErrorMessage)(error)) !== null && _a !== void 0 ? _a : error.message);
108
- }
109
- });
110
- },
111
- });
112
- //# sourceMappingURL=capture-screenshot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capture-screenshot.js","sourceRoot":"","sources":["../../../../src/lib/actions/capture-screenshot.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA6C;AAC7C,qEAAgE;AAChE,6CAA0E;AAC1E,mDAA+E;AAC/E,6CAA+C;AAC/C,2CAeyB;AAGZ,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,kBAAW;IACjB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,kEAAkE;IAC/E,UAAU,EAAE;QACV,WAAW,EACT,oOAAoO;QACtO,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,IAAA,sBAAc,EAAC,KAAK,CAAC;QACjC,MAAM,EAAE,kBAAU;QAClB,YAAY,EAAE,wBAAgB;QAC9B,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACjC,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;SACxF,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACvB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC7B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC9B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,gBAAgB,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAChC,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACtC,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,6DAA6D;YAC1E,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,uCAA2B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;aACtF;SACF,CAAC;QACF,YAAY,EAAE,wBAAgB;QAC9B,YAAY,EAAE,wBAAgB;QAC9B,UAAU,EAAE,sBAAc;QAC1B,cAAc,EAAE,0BAAkB;QAClC,QAAQ,EAAE,oBAAY;QACtB,GAAG,EAAE,eAAO;QACZ,OAAO,EAAE,mBAAW;QACpB,QAAQ,EAAE,oBAAY;KACvB;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,KAAK,GAAG,OAAO,CAAC,UAAqC,CAAC;YAC5D,MAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,CAAC,KAAK,QAAQ,CAAC;YACpD,MAAM,MAAM,+CACV,SAAS,EAAE,YAAY,IACpB,IAAA,2BAAmB,EAAC,KAAK,CAAC,GAC1B,IAAA,uBAAe,EAAC,KAAK,CAAC,KACzB,QAAQ,EAAE,IAAA,uBAAe,EAAC,KAAK,CAAC,EAChC,iBAAiB,EAAE;oBACjB,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC;oBAC7B,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC;oBAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;oBACzB,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;oBACvC,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;oBACrC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC;oBACvC,gBAAgB,EAAE,KAAK,CAAC,kBAAkB,CAAC;iBAC5C,GACF,CAAC;YAEF,MAAM,OAAO,GAAG,IAAA,qCAAgB,EAAC,MAAM,CAAC,CAAC;YACzC,mEAAmE;YACnE,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;YAC3B,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAc,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBAC7D,OAAO,MAAM,IAAA,oBAAW,EAAC;oBACvB,QAAQ;oBACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,SAAS,EAAE,YAAY;oBACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,SAAS,EAAE,KAAK,CAAC,WAAW,CAAuB;iBACpD,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,MAAA,IAAA,+BAAsB,EAAC,KAAK,CAAC,mCAAK,KAAe,CAAC,OAAO,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,28 +0,0 @@
1
- export declare const convertToPdf: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
3
- sandbox: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- }>, {
5
- sourceType: import("@activepieces/pieces-framework").StaticDropdownProperty<"url" | "html" | "template", true>;
6
- source: import("@activepieces/pieces-framework").LongTextProperty<true>;
7
- templateData: import("@activepieces/pieces-framework").JsonProperty<false>;
8
- format: import("@activepieces/pieces-framework").StaticDropdownProperty<"A3" | "A4" | "A5" | "Ledger" | "Legal" | "Letter" | "Tabloid", false>;
9
- landscape: import("@activepieces/pieces-framework").CheckboxProperty<false>;
10
- printBackground: import("@activepieces/pieces-framework").CheckboxProperty<false>;
11
- scale: import("@activepieces/pieces-framework").NumberProperty<false>;
12
- pageRanges: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
- outline: import("@activepieces/pieces-framework").CheckboxProperty<false>;
14
- tagged: import("@activepieces/pieces-framework").CheckboxProperty<false>;
15
- marginTop: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- marginRight: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
- marginBottom: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
- marginLeft: import("@activepieces/pieces-framework").ShortTextProperty<false>;
19
- deliveryMode: import("@activepieces/pieces-framework").StaticDropdownProperty<"download" | "cloudStorage" | "webhook", true>;
20
- presignedUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
21
- webhookUrl: import("@activepieces/pieces-framework").ShortTextProperty<false>;
22
- webhookOptions: import("@activepieces/pieces-framework").JsonProperty<false>;
23
- filename: import("@activepieces/pieces-framework").ShortTextProperty<false>;
24
- tag: import("@activepieces/pieces-framework").ShortTextProperty<false>;
25
- timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
26
- advanced: import("@activepieces/pieces-framework").JsonProperty<false>;
27
- }>;
28
- //# sourceMappingURL=convert-pdf.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert-pdf.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/convert-pdf.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGvB,CAAC"}