@squiz/component-cli-lib 1.31.1-alpha.0 → 1.31.1-alpha.2

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.
@@ -3,35 +3,35 @@
3
3
  2 info using node@v18.15.0
4
4
  3 timing npm:load:whichnode Completed in 1ms
5
5
  4 timing config:load:defaults Completed in 2ms
6
- 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6
+ 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
7
7
  6 timing config:load:builtin Completed in 1ms
8
- 7 timing config:load:cli Completed in 2ms
8
+ 7 timing config:load:cli Completed in 1ms
9
9
  8 timing config:load:env Completed in 1ms
10
10
  9 info found workspace root at /builds/developer-experience/cmp
11
11
  10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 0ms
12
- 11 timing config:load:project Completed in 23ms
13
- 12 timing config:load:file:/root/.npmrc Completed in 1ms
12
+ 11 timing config:load:project Completed in 21ms
13
+ 12 timing config:load:file:/root/.npmrc Completed in 0ms
14
14
  13 timing config:load:user Completed in 1ms
15
15
  14 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
16
16
  15 timing config:load:global Completed in 0ms
17
17
  16 timing config:load:setEnvs Completed in 1ms
18
- 17 timing config:load Completed in 31ms
19
- 18 timing npm:load:configload Completed in 31ms
18
+ 17 timing config:load Completed in 29ms
19
+ 18 timing npm:load:configload Completed in 29ms
20
20
  19 timing npm:load:mkdirpcache Completed in 1ms
21
21
  20 timing npm:load:mkdirplogs Completed in 0ms
22
22
  21 verbose title npm run compile
23
23
  22 verbose argv "run" "compile" "--"
24
- 23 timing npm:load:setTitle Completed in 2ms
24
+ 23 timing npm:load:setTitle Completed in 1ms
25
25
  24 timing config:load:flatten Completed in 4ms
26
26
  25 timing npm:load:display Completed in 5ms
27
- 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/component-cli-lib/.npm/_logs/2023-04-14T05_38_09_032Z-
28
- 27 verbose logfile /builds/developer-experience/cmp/packages/component-cli-lib/.npm/_logs/2023-04-14T05_38_09_032Z-debug-0.log
27
+ 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/component-cli-lib/.npm/_logs/2023-04-17T01_11_14_068Z-
28
+ 27 verbose logfile /builds/developer-experience/cmp/packages/component-cli-lib/.npm/_logs/2023-04-17T01_11_14_068Z-debug-0.log
29
29
  28 timing npm:load:logFile Completed in 4ms
30
30
  29 timing npm:load:timers Completed in 0ms
31
31
  30 timing npm:load:configScope Completed in 0ms
32
- 31 timing npm:load Completed in 45ms
32
+ 31 timing npm:load Completed in 43ms
33
33
  32 silly logfile done cleaning log files
34
- 33 timing command:run Completed in 4020ms
34
+ 33 timing command:run Completed in 4957ms
35
35
  34 verbose exit 0
36
- 35 timing npm Completed in 4077ms
36
+ 35 timing npm Completed in 5013ms
37
37
  36 info ok
package/lib/index.js CHANGED
@@ -132,7 +132,7 @@ S ::= [ ]*
132
132
  `));return!0}async resolveInput(t,r){let n=[];this.schema.each(t,(s,a,o)=>{if(!this.typeResolver.isResolvableSchema(s))return;let u=s.oneOfSchema.oneOf.map(d=>d.$ref.replace(".json","")).find(d=>this.typeResolver.isPrimitiveType(d));if(!u)return;let l=this.typeResolver.tryGetResolver(u,s);if(!l)return;let p=Promise.resolve().then(()=>l(a)).then(d=>m=>sTe.default.set(m,o,d)).catch(d=>Promise.reject(new aTe.JsonResolutionError(d,o,a)));n.push(p)},r);let i=[];for(let s of await Promise.allSettled(n)){if(s.status==="rejected"){i.push(s.reason);continue}t=s.value(t)}if(i.length)throw new Error(`Error(s) occurred when resolving JSON:
133
133
  ${i.join(`
134
134
  `)}`);return t}};Tt.JSONSchemaService=cT;var lT=class{validateManifest(t,r){switch(r){case"v1":{let n=Ea.validate(t);return this.processValidationResult(n)}default:throw new aT.SchemaValidationError("Invalid manifest version")}}validateContentSchema(t){return this.processValidationResult(Tt.ComponentInputSchema.validate(t))}validateComponentInput(t,r){let n=Tt.ComponentInputSchema.compileSchema(t),i=Tt.ComponentInputSchema.validate(r,n);return this.processValidationResult(i)}validateRenderInput(t,r){let n=Tt.RenderInputSchema.compileSchema(t),i=Tt.RenderInputSchema.validate(r,n);return this.processValidationResult(i)}processValidationResult(t){if(t.length>0)throw new aT.SchemaValidationError(t.map(r=>r.message).join(`,
135
- `));return!0}};Tt.JsonValidationService=lT});var ba=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.TypeResolver=Co.ResolvableType=Co.PrimitiveType=void 0;function cTe(e){return e}Co.PrimitiveType=cTe;function lTe(e){return e}Co.ResolvableType=lTe;var dT=class{constructor(t,r=[],n={}){this.resolvers=n,this.primitives=new Map(t.map(i=>[i.title,i])),this.resolvables=new Map(r.map(i=>[i.title,i]));for(let[i,s]of Object.entries(n)){if(!this.primitives.has(i))throw new Error("Resolver keys must match a primitive schema");if(!Object.keys(s).every(a=>this.resolvables.has(a)))throw new Error("Primitive resolvers keys must match a resolvable schema")}}get validationSchemaDefinitions(){return[...this.primitives.values(),...this.resolvables.values()]}isPrimitiveType(t){return this.primitives.has(t)}isPrimitiveSchema(t){return this.isPrimitiveType(t.title)}isResolvableSchema(t){return this.resolvables.has(t.title)}getValidationSchemaForPrimitive(t){return[this.primitives.get(t),...this.fetchResolvableSchemasForPrimitive(t)]}*fetchResolvableSchemasForPrimitive(t){for(let r in this.resolvers[t])yield this.resolvables.get(r)}tryGetResolver(t,r){var n;if(t in this.resolvers)return(n=this.resolvers[t])===null||n===void 0?void 0:n[r.title]}};Co.TypeResolver=dT});var k6=S(i0=>{"use strict";Object.defineProperty(i0,"__esModule",{value:!0});i0.TypeResolverBuilder=void 0;var uTe=ba(),mf=class{constructor(){this.primitives=new Set,this.resolvables=new Set,this.resolverMap={}}static new(){return new mf}addPrimitive(t){return this.primitives.add(t),this}addResolver(t,r,n){var i,s,a;return this.primitives.add(t),this.resolvables.add(r),(i=(s=this.resolverMap)[a=t.title])!==null&&i!==void 0||(s[a]={}),this.resolverMap[t.title][r.title]=n,this}build(){return new uTe.TypeResolver(Array.from(this.primitives.values()),Array.from(this.resolvables.values()),this.resolverMap)}};i0.TypeResolverBuilder=mf});var D6=S(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.SquizImageType=void 0;var dTe=ba();s0.SquizImageType=(0,dTe.PrimitiveType)({title:"SquizImage",type:"object",properties:{name:{type:"string"},alt:{type:"string"},caption:{type:"string"},exif:{type:"object",properties:{image:{type:"object"},thumbnail:{type:"object"},exif:{type:"object"},gps:{type:"object"},interoperability:{type:"object"},makernote:{type:"object"}},required:["image","thumbnail","exif","gps","interoperability","makernote"]},imageVariations:{type:"object",properties:{original:{$ref:"#/definitions/SquizImageData"},small:{type:"array",items:{$ref:"#/definitions/SquizImageData"}},medium:{type:"array",items:{$ref:"#/definitions/SquizImageData"}},large:{type:"array",items:{$ref:"#/definitions/SquizImageData"}},aspectRatios:{type:"array",items:{$ref:"#/definitions/SquizImageData"}}},required:["original"]}},required:["name","imageVariations"],definitions:{SquizImageData:{type:"object",properties:{width:{type:"number"},height:{type:"number"},url:{type:"string"},mimeType:{type:"string"},byteSize:{type:"number"},sha1Hash:{type:"string"},aspectRatio:{type:"string"}},required:["width","height","url","mimeType","byteSize","sha1Hash","aspectRatio"]}}})});var L6=S(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.ComponentInputFormattedTextType=Oo.BaseFormattedTextType=Oo.FormattedTextType=void 0;var F6=Io(),pT=ba();Oo.FormattedTextType=(0,pT.PrimitiveType)({...F6.FORMATTED_TEXT_SCHEMAS.v1,title:"FormattedText"});Oo.BaseFormattedTextType=(0,pT.PrimitiveType)({...F6.FORMATTED_TEXT_SCHEMAS.v1,items:{$ref:"#/definitions/BaseFormattedNodes"},title:"FormattedText"});Oo.ComponentInputFormattedTextType=(0,pT.PrimitiveType)({type:"string",title:"FormattedText"})});var z6=S(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.SquizLinkType=void 0;var pTe=ba();o0.SquizLinkType=(0,pTe.PrimitiveType)({title:"SquizLink",type:"object",properties:{name:{type:"string"},url:{type:"string"},target:{type:"string",enum:["_blank","_parent","_self","_top"]}},required:["name","url"]})});var $6=S(xs=>{"use strict";var fTe=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),fT=xs&&xs.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&fTe(t,e,r)};Object.defineProperty(xs,"__esModule",{value:!0});fT(D6(),xs);fT(L6(),xs);fT(z6(),xs)});var V6=S(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.MatrixAssetLinkType=Gc.MatrixAssetType=void 0;var U6=ba();Gc.MatrixAssetType=(0,U6.ResolvableType)({title:"MatrixAsset",type:"object",properties:{matrixAssetId:{type:"string"},matrixIdentifier:{type:"string"},matrixDomain:{type:"string"}},required:["matrixAssetId","matrixIdentifier"]});Gc.MatrixAssetLinkType=(0,U6.ResolvableType)({title:"MatrixAssetLink",type:"object",properties:{matrixAssetId:{type:"string"},matrixIdentifier:{type:"string"},matrixDomain:{type:"string"},target:{type:"string",enum:["_blank","_parent","_self","_top"]}},required:["matrixAssetId","matrixIdentifier"]})});var G6=S(Ra=>{"use strict";var mTe=Ra&&Ra.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),hTe=Ra&&Ra.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&mTe(t,e,r)};Object.defineProperty(Ra,"__esModule",{value:!0});hTe(V6(),Ra)});var Io=S(wt=>{"use strict";var H6=wt&&wt.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),_Te=wt&&wt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hf=wt&&wt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&H6(t,e,r);return _Te(t,e),t},As=wt&&wt.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&H6(t,e,r)};Object.defineProperty(wt,"__esModule",{value:!0});wt.SUB_SCHEMAS=wt.FORMATTED_TEXT_SCHEMAS=wt.FORMATTED_TEXT_MODELS=wt.MANIFEST_SCHEMAS=wt.MANIFEST_MODELS=void 0;wt.MANIFEST_MODELS=hf(y6());wt.MANIFEST_SCHEMAS=hf(S6());wt.FORMATTED_TEXT_MODELS=hf(b6());wt.FORMATTED_TEXT_SCHEMAS=hf(R6());As(A6(),wt);wt.SUB_SCHEMAS=hf(P6());As(M6(),wt);As(Zw(),wt);As(oT(),wt);As(iT(),wt);As(ba(),wt);As(k6(),wt);As($6(),wt);As(G6(),wt)});var B6=S(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.formattedTextToHtmlString=xa.formattedTextToHtmlStringResolvers=void 0;var vTe=Io();xa.formattedTextToHtmlStringResolvers={tag:async e=>yTe(e),text:async e=>e.value,default:async e=>`<p class="invalid-node-type"> node of type "${e.type}" cannot be converted to html</p>`};async function gTe(e){return await(0,vTe.resolveFormattedText)(e,xa.formattedTextToHtmlStringResolvers)}xa.formattedTextToHtmlString=gTe;function yTe(e){let t=STe(e);e.attributes?e.attributes.class=t:e.attributes={class:t};let r=wTe(e.attributes);return`<${e.tag}${r}>${e.children.join("")}</${e.tag}>`}function STe(e){var t,r,n;let i=ETe(e.font),s=(r=(t=e==null?void 0:e.attributes)===null||t===void 0?void 0:t.class)!==null&&r!==void 0?r:"";return!((n=e==null?void 0:e.formattingOptions)===null||n===void 0)&&n.alignment&&i.push(e.formattingOptions.alignment),i.length>0&&(s+=" "+i.join(" ")),s.trim()}function wTe(e){if(!e)return"";let t="";for(let r in e)e[r]!==""&&(t+=` ${r}="${e[r]}"`);return t}function ETe(e){if(!e)return[];let t=[];return e.bold&&t.push("bold"),e.underline&&t.push("underline"),e.italics&&t.push("italics"),e.color&&t.push(`color-${e.color}`),e.size&&t.push(`size-${e.size}`),e.fontFamily&&t.push(`font-${e.fontFamily}`),t}});var qB=S((_f,Hc)=>{var bTe=200,iB="__lodash_hash_undefined__",sB=9007199254740991,wT="[object Arguments]",RTe="[object Array]",oB="[object Boolean]",aB="[object Date]",xTe="[object Error]",ET="[object Function]",cB="[object GeneratorFunction]",a0="[object Map]",lB="[object Number]",bT="[object Object]",W6="[object Promise]",uB="[object RegExp]",c0="[object Set]",dB="[object String]",pB="[object Symbol]",hT="[object WeakMap]",fB="[object ArrayBuffer]",l0="[object DataView]",mB="[object Float32Array]",hB="[object Float64Array]",_B="[object Int8Array]",vB="[object Int16Array]",gB="[object Int32Array]",yB="[object Uint8Array]",SB="[object Uint8ClampedArray]",wB="[object Uint16Array]",EB="[object Uint32Array]",ATe=/[\\^$.*+?()[\]{}|]/g,PTe=/\w*$/,ITe=/^\[object .+?Constructor\]$/,TTe=/^(?:0|[1-9]\d*)$/,Rt={};Rt[wT]=Rt[RTe]=Rt[fB]=Rt[l0]=Rt[oB]=Rt[aB]=Rt[mB]=Rt[hB]=Rt[_B]=Rt[vB]=Rt[gB]=Rt[a0]=Rt[lB]=Rt[bT]=Rt[uB]=Rt[c0]=Rt[dB]=Rt[pB]=Rt[yB]=Rt[SB]=Rt[wB]=Rt[EB]=!0;Rt[xTe]=Rt[ET]=Rt[hT]=!1;var CTe=typeof global=="object"&&global&&global.Object===Object&&global,OTe=typeof self=="object"&&self&&self.Object===Object&&self,Ps=CTe||OTe||Function("return this")(),bB=typeof _f=="object"&&_f&&!_f.nodeType&&_f,K6=bB&&typeof Hc=="object"&&Hc&&!Hc.nodeType&&Hc,NTe=K6&&K6.exports===bB;function jTe(e,t){return e.set(t[0],t[1]),e}function qTe(e,t){return e.add(t),e}function MTe(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function kTe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function RB(e,t,r,n){var i=-1,s=e?e.length:0;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function DTe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function FTe(e,t){return e==null?void 0:e[t]}function xB(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function J6(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function RT(e,t){return function(r){return e(t(r))}}function Y6(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var LTe=Array.prototype,zTe=Function.prototype,u0=Object.prototype,mT=Ps["__core-js_shared__"],Q6=function(){var e=/[^.]+$/.exec(mT&&mT.keys&&mT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),AB=zTe.toString,No=u0.hasOwnProperty,d0=u0.toString,$Te=RegExp("^"+AB.call(No).replace(ATe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),X6=NTe?Ps.Buffer:void 0,Z6=Ps.Symbol,eB=Ps.Uint8Array,UTe=RT(Object.getPrototypeOf,Object),VTe=Object.create,GTe=u0.propertyIsEnumerable,HTe=LTe.splice,tB=Object.getOwnPropertySymbols,BTe=X6?X6.isBuffer:void 0,WTe=RT(Object.keys,Object),_T=Kc(Ps,"DataView"),vf=Kc(Ps,"Map"),vT=Kc(Ps,"Promise"),gT=Kc(Ps,"Set"),yT=Kc(Ps,"WeakMap"),gf=Kc(Object,"create"),KTe=Ia(_T),JTe=Ia(vf),YTe=Ia(vT),QTe=Ia(gT),XTe=Ia(yT),rB=Z6?Z6.prototype:void 0,nB=rB?rB.valueOf:void 0;function Pa(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ZTe(){this.__data__=gf?gf(null):{}}function eCe(e){return this.has(e)&&delete this.__data__[e]}function tCe(e){var t=this.__data__;if(gf){var r=t[e];return r===iB?void 0:r}return No.call(t,e)?t[e]:void 0}function rCe(e){var t=this.__data__;return gf?t[e]!==void 0:No.call(t,e)}function nCe(e,t){var r=this.__data__;return r[e]=gf&&t===void 0?iB:t,this}Pa.prototype.clear=ZTe;Pa.prototype.delete=eCe;Pa.prototype.get=tCe;Pa.prototype.has=rCe;Pa.prototype.set=nCe;function Is(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function iCe(){this.__data__=[]}function sCe(e){var t=this.__data__,r=p0(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HTe.call(t,r,1),!0}function oCe(e){var t=this.__data__,r=p0(t,e);return r<0?void 0:t[r][1]}function aCe(e){return p0(this.__data__,e)>-1}function cCe(e,t){var r=this.__data__,n=p0(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Is.prototype.clear=iCe;Is.prototype.delete=sCe;Is.prototype.get=oCe;Is.prototype.has=aCe;Is.prototype.set=cCe;function Bc(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function lCe(){this.__data__={hash:new Pa,map:new(vf||Is),string:new Pa}}function uCe(e){return f0(this,e).delete(e)}function dCe(e){return f0(this,e).get(e)}function pCe(e){return f0(this,e).has(e)}function fCe(e,t){return f0(this,e).set(e,t),this}Bc.prototype.clear=lCe;Bc.prototype.delete=uCe;Bc.prototype.get=dCe;Bc.prototype.has=pCe;Bc.prototype.set=fCe;function Wc(e){this.__data__=new Is(e)}function mCe(){this.__data__=new Is}function hCe(e){return this.__data__.delete(e)}function _Ce(e){return this.__data__.get(e)}function vCe(e){return this.__data__.has(e)}function gCe(e,t){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!vf||n.length<bTe-1)return n.push([e,t]),this;r=this.__data__=new Bc(n)}return r.set(e,t),this}Wc.prototype.clear=mCe;Wc.prototype.delete=hCe;Wc.prototype.get=_Ce;Wc.prototype.has=vCe;Wc.prototype.set=gCe;function yCe(e,t){var r=AT(e)||VCe(e)?DTe(e.length,String):[],n=r.length,i=!!n;for(var s in e)(t||No.call(e,s))&&!(i&&(s=="length"||LCe(s,n)))&&r.push(s);return r}function PB(e,t,r){var n=e[t];(!(No.call(e,t)&&OB(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function p0(e,t){for(var r=e.length;r--;)if(OB(e[r][0],t))return r;return-1}function SCe(e,t){return e&&IB(t,PT(t),e)}function ST(e,t,r,n,i,s,a){var o;if(n&&(o=s?n(e,i,s,a):n(e)),o!==void 0)return o;if(!m0(e))return e;var c=AT(e);if(c){if(o=kCe(e),!t)return jCe(e,o)}else{var u=Aa(e),l=u==ET||u==cB;if(HCe(e))return ACe(e,t);if(u==bT||u==wT||l&&!s){if(xB(e))return s?e:{};if(o=DCe(l?{}:e),!t)return qCe(e,SCe(o,e))}else{if(!Rt[u])return s?e:{};o=FCe(e,u,ST,t)}}a||(a=new Wc);var p=a.get(e);if(p)return p;if(a.set(e,o),!c)var d=r?MCe(e):PT(e);return MTe(d||e,function(m,f){d&&(f=m,m=e[f]),PB(o,f,ST(m,t,r,n,f,e,a))}),o}function wCe(e){return m0(e)?VTe(e):{}}function ECe(e,t,r){var n=t(e);return AT(e)?n:kTe(n,r(e))}function bCe(e){return d0.call(e)}function RCe(e){if(!m0(e)||$Ce(e))return!1;var t=jB(e)||xB(e)?$Te:ITe;return t.test(Ia(e))}function xCe(e){if(!CB(e))return WTe(e);var t=[];for(var r in Object(e))No.call(e,r)&&r!="constructor"&&t.push(r);return t}function ACe(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function xT(e){var t=new e.constructor(e.byteLength);return new eB(t).set(new eB(e)),t}function PCe(e,t){var r=t?xT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function ICe(e,t,r){var n=t?r(J6(e),!0):J6(e);return RB(n,jTe,new e.constructor)}function TCe(e){var t=new e.constructor(e.source,PTe.exec(e));return t.lastIndex=e.lastIndex,t}function CCe(e,t,r){var n=t?r(Y6(e),!0):Y6(e);return RB(n,qTe,new e.constructor)}function OCe(e){return nB?Object(nB.call(e)):{}}function NCe(e,t){var r=t?xT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jCe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function IB(e,t,r,n){r||(r={});for(var i=-1,s=t.length;++i<s;){var a=t[i],o=n?n(r[a],e[a],a,r,e):void 0;PB(r,a,o===void 0?e[a]:o)}return r}function qCe(e,t){return IB(e,TB(e),t)}function MCe(e){return ECe(e,PT,TB)}function f0(e,t){var r=e.__data__;return zCe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kc(e,t){var r=FTe(e,t);return RCe(r)?r:void 0}var TB=tB?RT(tB,Object):KCe,Aa=bCe;(_T&&Aa(new _T(new ArrayBuffer(1)))!=l0||vf&&Aa(new vf)!=a0||vT&&Aa(vT.resolve())!=W6||gT&&Aa(new gT)!=c0||yT&&Aa(new yT)!=hT)&&(Aa=function(e){var t=d0.call(e),r=t==bT?e.constructor:void 0,n=r?Ia(r):void 0;if(n)switch(n){case KTe:return l0;case JTe:return a0;case YTe:return W6;case QTe:return c0;case XTe:return hT}return t});function kCe(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&No.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function DCe(e){return typeof e.constructor=="function"&&!CB(e)?wCe(UTe(e)):{}}function FCe(e,t,r,n){var i=e.constructor;switch(t){case fB:return xT(e);case oB:case aB:return new i(+e);case l0:return PCe(e,n);case mB:case hB:case _B:case vB:case gB:case yB:case SB:case wB:case EB:return NCe(e,n);case a0:return ICe(e,n,r);case lB:case dB:return new i(e);case uB:return TCe(e);case c0:return CCe(e,n,r);case pB:return OCe(e)}}function LCe(e,t){return t=t??sB,!!t&&(typeof e=="number"||TTe.test(e))&&e>-1&&e%1==0&&e<t}function zCe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $Ce(e){return!!Q6&&Q6 in e}function CB(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||u0;return e===r}function Ia(e){if(e!=null){try{return AB.call(e)}catch{}try{return e+""}catch{}}return""}function UCe(e){return ST(e,!0,!0)}function OB(e,t){return e===t||e!==e&&t!==t}function VCe(e){return GCe(e)&&No.call(e,"callee")&&(!GTe.call(e,"callee")||d0.call(e)==wT)}var AT=Array.isArray;function NB(e){return e!=null&&BCe(e.length)&&!jB(e)}function GCe(e){return WCe(e)&&NB(e)}var HCe=BTe||JCe;function jB(e){var t=m0(e)?d0.call(e):"";return t==ET||t==cB}function BCe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sB}function m0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function WCe(e){return!!e&&typeof e=="object"}function PT(e){return NB(e)?yCe(e):xCe(e)}function KCe(){return[]}function JCe(){return!1}Hc.exports=UCe});var kB=S((b7e,MB)=>{"use strict";MB.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var IT=S(jo=>{"use strict";var YCe=jo&&jo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jo,"__esModule",{value:!0});jo.splitKey=jo.escapeKey=void 0;var QCe=YCe(kB()),XCe=(e,t)=>{let n=["\\",t].map(i=>(0,QCe.default)(i)).join("|");return e.replace(new RegExp(`(${n})`,"g"),"\\$1")};jo.escapeKey=XCe;var ZCe=(e,t)=>{if(e.indexOf("\\")<0)return e.split(t);let r=[],n="",i=!1;for(let s=0;s<e.length;s++){let a=e[s];i?(n+=a,i=!1):a==="\\"?i=!0:a===t[0]&&e.substr(s,t.length)===t?(r.push(n),n="",s+=t.length-1):n+=a}return r.push(n),r};jo.splitKey=ZCe});var CT=S(yf=>{"use strict";var eOe=yf&&yf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0});var tOe=eOe(qB()),TT=IT(),DB=(e,t,r)=>{let n=!0,i=(0,TT.splitKey)(t,r).slice(1).reduce((s,a)=>{if(n=s&&a in s,!!n)return s[a]},e);return{exists:n,value:i}},FB=(e,t,r,n)=>{(0,TT.splitKey)(t,n).slice(1).reduce((i,s,a,o)=>{if(a===o.length-1){let c=Array.isArray(r)?(0,tOe.default)(r).map(u=>typeof u=="object"?{}:u):r;i[s]=c}return i[s]},e)},rOe=(e,t,r,n)=>{let i=DB(e,r,n);i.exists&&FB(t,r,i.value,n)},nOe=(e,t,r="~")=>{if(r.length<1)throw new Error("Separator should not be an empty string.");if(r==="\\")throw new Error('Separator cannot be "\\".');if(!t)return e;let n=Object.keys(t),i=n[0]&&n[0].length||0,s={};return n.forEach(a=>{let o=t[a],c=a.substr(i),u=DB(e,c,r);if(u.exists){let l=Array.isArray(u.value)?u.value:{};FB(s,c,l,r),o.forEach(p=>rOe(e,s,`${c}${r}${(0,TT.escapeKey)(p,r)}`,r))}}),s};yf.default=nOe});var $B=S(OT=>{"use strict";Object.defineProperty(OT,"__esModule",{value:!0});var LB=IT(),zB=(e,t,r,n)=>{let i=Object.keys(e);i.length!==0&&(Array.isArray(e)||(t[`${r}`]=i),i.forEach(s=>{let a=e[s];a!==null&&typeof a=="object"&&zB(a,t,`${r}${n}${(0,LB.escapeKey)(s,n)}`,n)}))},iOe=(e,t="$",r="~")=>{if(t.length<1)throw new Error("Prefix should not be an empty string.");if(r.length<1)throw new Error("Separator should not be an empty string.");if(r==="\\")throw new Error('Separator cannot be "\\".');let n=JSON.parse(e),i={};return zB(n,i,(0,LB.escapeKey)(t,r),r),{object:n,map:i}};OT.default=iOe});var UB=S(Sf=>{"use strict";var sOe=Sf&&Sf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0});var oOe=sOe(CT()),aOe=(e,t,r="~",n)=>JSON.stringify((0,oOe.default)(e,t,r),null,n);Sf.default=aOe});var VB=S(Jc=>{"use strict";var NT=Jc&&Jc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.jsonOrder=void 0;var cOe=NT(CT()),lOe=NT($B()),uOe=NT(UB());Jc.jsonOrder={order:cOe.default,parse:lOe.default,stringify:uOe.default}});var Ot=S(nr=>{"use strict";var dOe=nr&&nr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),un=nr&&nr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&dOe(t,e,r)};Object.defineProperty(nr,"__esModule",{value:!0});un(ej(),nr);un(aj(),nr);un(h1(),nr);un(mM(),nr);un(hM(),nr);un(_M(),nr);un(gM(),nr);un($I(),nr);un(VI(),nr);un(p6(),nr);un(f6(),nr);un(_6(),nr);un(B6(),nr);un(VB(),nr)});var jT=S(GB=>{"use strict";Object.defineProperty(GB,"__esModule",{value:!0})});var BB=S(HB=>{"use strict";Object.defineProperty(HB,"__esModule",{value:!0})});var _0=S(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.ComponentSetComponentVersion=Ta.ComponentSetComponentVersionStatus=void 0;var Ji=Ot(),h0;(function(e){e.active="active",e.excluded="excluded"})(h0=Ta.ComponentSetComponentVersionStatus||(Ta.ComponentSetComponentVersionStatus={}));var qT=class{constructor(t){this.componentSetWebPath="",this.componentName="",this.componentVersion="",this.status=h0.active,(0,Ji.assertIsDefined)(t),this.componentSetWebPath=(0,Ji.assertAssign)(t.componentSetWebPath,Ji.assertIsString,"componentSetWebPath must be a string"),this.componentName=(0,Ji.assertAssign)(t.componentName,Ji.assertIsString,"componentName must be a string"),this.componentVersion=(0,Ji.assertAssign)(t.componentVersion,Ji.assertIsString,"componentVersion must be a string"),this.environmentVariables=(0,Ji.assertAssignWithDefaultUndefinedValue)(t.environmentVariables,Ji.assertIsMapOfStringString,{}),t.status===void 0&&(t.status=h0.active),(0,Ji.assertIsEnumValue)(t.status,h0),this.status=t.status}};Ta.ComponentSetComponentVersion=qT});var Os=S((G7e,G9)=>{"use strict";var pOe=Object.create,w0=Object.defineProperty,fOe=Object.getOwnPropertyDescriptor,LT=Object.getOwnPropertyNames,mOe=Object.getPrototypeOf,hOe=Object.prototype.hasOwnProperty,qr=(e,t)=>function(){return e&&(t=(0,e[LT(e)[0]])(e=0)),t},A=(e,t)=>function(){return t||(0,e[LT(e)[0]])((t={exports:{}}).exports,t),t.exports},zT=(e,t)=>{for(var r in t)w0(e,r,{get:t[r],enumerable:!0})},r8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LT(t))!hOe.call(e,i)&&i!==r&&w0(e,i,{get:()=>t[i],enumerable:!(n=fOe(t,i))||n.enumerable});return e},Qi=(e,t,r)=>(r=e!=null?pOe(mOe(e)):{},r8(t||!e||!e.__esModule?w0(r,"default",{value:e,enumerable:!0}):r,e)),Ie=e=>r8(w0({},"__esModule",{value:!0}),e),n8=A({"../../node_modules/postgres-array/index.js"(e){"use strict";e.parse=function(n,i){return new t(n,i).parse()};var t=class{constructor(n,i){this.source=n,this.transform=i||r,this.position=0,this.entries=[],this.recorded=[],this.dimension=0}isEof(){return this.position>=this.source.length}nextCharacter(){var n=this.source[this.position++];return n==="\\"?{value:this.source[this.position++],escaped:!0}:{value:n,escaped:!1}}record(n){this.recorded.push(n)}newEntry(n){var i;(this.recorded.length>0||n)&&(i=this.recorded.join(""),i==="NULL"&&!n&&(i=null),i!==null&&(i=this.transform(i)),this.entries.push(i),this.recorded=[])}consumeDimensions(){if(this.source[0]==="[")for(;!this.isEof();){var n=this.nextCharacter();if(n.value==="=")break}}parse(n){var i,s,a;for(this.consumeDimensions();!this.isEof();)if(i=this.nextCharacter(),i.value==="{"&&!a)this.dimension++,this.dimension>1&&(s=new t(this.source.substr(this.position-1),this.transform),this.entries.push(s.parse(!0)),this.position+=s.position-2);else if(i.value==="}"&&!a){if(this.dimension--,!this.dimension&&(this.newEntry(),n))return this.entries}else i.value==='"'&&!i.escaped?(a&&this.newEntry(!0),a=!a):i.value===","&&!a?this.newEntry():this.record(i.value);if(this.dimension!==0)throw new Error("array dimension not balanced");return this.entries}};function r(n){return n}}}),i8=A({"../../node_modules/pg-types/lib/arrayParser.js"(e,t){var r=n8();t.exports={create:function(n,i){return{parse:function(){return r.parse(n,i)}}}}}}),_Oe=A({"../../node_modules/postgres-date/index.js"(e,t){"use strict";var r=/(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/,n=/^(\d{1,})-(\d{2})-(\d{2})( BC)?$/,i=/([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/,s=/^-?infinity$/;t.exports=function(p){if(s.test(p))return Number(p.replace("i","I"));var d=r.exec(p);if(!d)return a(p)||null;var m=!!d[8],f=parseInt(d[1],10);m&&(f=c(f));var h=parseInt(d[2],10)-1,_=d[3],g=parseInt(d[4],10),v=parseInt(d[5],10),y=parseInt(d[6],10),E=d[7];E=E?1e3*parseFloat(E):0;var q,T=o(p);return T!=null?(q=new Date(Date.UTC(f,h,_,g,v,y,E)),u(f)&&q.setUTCFullYear(f),T!==0&&q.setTime(q.getTime()-T)):(q=new Date(f,h,_,g,v,y,E),u(f)&&q.setFullYear(f)),q};function a(l){var p=n.exec(l);if(p){var d=parseInt(p[1],10),m=!!p[4];m&&(d=c(d));var f=parseInt(p[2],10)-1,h=p[3],_=new Date(d,f,h);return u(d)&&_.setFullYear(d),_}}function o(l){if(l.endsWith("+00"))return 0;var p=i.exec(l.split(" ")[1]);if(p){var d=p[1];if(d==="Z")return 0;var m=d==="-"?-1:1,f=parseInt(p[2],10)*3600+parseInt(p[3]||0,10)*60+parseInt(p[4]||0,10);return f*m*1e3}}function c(l){return-(l-1)}function u(l){return l>=0&&l<100}}}),vOe=A({"../../node_modules/xtend/mutable.js"(e,t){t.exports=n;var r=Object.prototype.hasOwnProperty;function n(i){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var o in a)r.call(a,o)&&(i[o]=a[o])}return i}}}),gOe=A({"../../node_modules/postgres-interval/index.js"(e,t){"use strict";var r=vOe();t.exports=n;function n(v){if(!(this instanceof n))return new n(v);r(this,g(v))}var i=["seconds","minutes","hours","days","months","years"];n.prototype.toPostgres=function(){var v=i.filter(this.hasOwnProperty,this);return this.milliseconds&&v.indexOf("seconds")<0&&v.push("seconds"),v.length===0?"0":v.map(function(y){var E=this[y]||0;return y==="seconds"&&this.milliseconds&&(E=(E+this.milliseconds/1e3).toFixed(6).replace(/\.?0+$/,"")),E+" "+y},this).join(" ")};var s={years:"Y",months:"M",days:"D",hours:"H",minutes:"M",seconds:"S"},a=["years","months","days"],o=["hours","minutes","seconds"];n.prototype.toISOString=n.prototype.toISO=function(){var v=a.map(E,this).join(""),y=o.map(E,this).join("");return"P"+v+"T"+y;function E(q){var T=this[q]||0;return q==="seconds"&&this.milliseconds&&(T=(T+this.milliseconds/1e3).toFixed(6).replace(/0+$/,"")),T+s[q]}};var c="([+-]?\\d+)",u=c+"\\s+years?",l=c+"\\s+mons?",p=c+"\\s+days?",d="([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?",m=new RegExp([u,l,p,d].map(function(v){return"("+v+")?"}).join("\\s*")),f={years:2,months:4,days:6,hours:9,minutes:10,seconds:11,milliseconds:12},h=["hours","minutes","seconds","milliseconds"];function _(v){var y=v+"000000".slice(v.length);return parseInt(y,10)/1e3}function g(v){if(!v)return{};var y=m.exec(v),E=y[8]==="-";return Object.keys(f).reduce(function(q,T){var M=f[T],F=y[M];return!F||(F=T==="milliseconds"?_(F):parseInt(F,10),!F)||(E&&~h.indexOf(T)&&(F*=-1),q[T]=F),q},{})}}}),yOe=A({"../../node_modules/postgres-bytea/index.js"(e,t){"use strict";t.exports=function(n){if(/^\\x/.test(n))return new Buffer(n.substr(2),"hex");for(var i="",s=0;s<n.length;)if(n[s]!=="\\")i+=n[s],++s;else if(/[0-7]{3}/.test(n.substr(s+1,3)))i+=String.fromCharCode(parseInt(n.substr(s+1,3),8)),s+=4;else{for(var a=1;s+a<n.length&&n[s+a]==="\\";)a++;for(var o=0;o<Math.floor(a/2);++o)i+="\\";s+=Math.floor(a/2)*2}return new Buffer(i,"binary")}}}),SOe=A({"../../node_modules/pg-types/lib/textParsers.js"(e,t){var r=n8(),n=i8(),i=_Oe(),s=gOe(),a=yOe();function o(N){return function(x){return x===null?x:N(x)}}function c(N){return N===null?N:N==="TRUE"||N==="t"||N==="true"||N==="y"||N==="yes"||N==="on"||N==="1"}function u(N){return N?r.parse(N,c):null}function l(N){return parseInt(N,10)}function p(N){return N?r.parse(N,o(l)):null}function d(N){return N?r.parse(N,o(function(C){return E(C).trim()})):null}var m=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=T(x)),x});return C.parse()},f=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=parseFloat(x)),x});return C.parse()},h=function(N){if(!N)return null;var C=n.create(N);return C.parse()},_=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=i(x)),x});return C.parse()},g=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=s(x)),x});return C.parse()},v=function(N){return N?r.parse(N,o(a)):null},y=function(N){return parseInt(N,10)},E=function(N){var C=String(N);return/^\d+$/.test(C)?C:N},q=function(N){return N?r.parse(N,o(JSON.parse)):null},T=function(N){return N[0]!=="("?null:(N=N.substring(1,N.length-1).split(","),{x:parseFloat(N[0]),y:parseFloat(N[1])})},M=function(N){if(N[0]!=="<"&&N[1]!=="(")return null;for(var C="(",x="",P=!1,G=2;G<N.length-1;G++){if(P||(C+=N[G]),N[G]===")"){P=!0;continue}else if(!P)continue;N[G]!==","&&(x+=N[G])}var D=T(C);return D.radius=parseFloat(x),D},F=function(N){N(20,E),N(21,y),N(23,y),N(26,y),N(700,parseFloat),N(701,parseFloat),N(16,c),N(1082,i),N(1114,i),N(1184,i),N(600,T),N(651,h),N(718,M),N(1e3,u),N(1001,v),N(1005,p),N(1007,p),N(1028,p),N(1016,d),N(1017,m),N(1021,f),N(1022,f),N(1231,f),N(1014,h),N(1015,h),N(1008,h),N(1009,h),N(1040,h),N(1041,h),N(1115,_),N(1182,_),N(1185,_),N(1186,s),N(1187,g),N(17,a),N(114,JSON.parse.bind(JSON)),N(3802,JSON.parse.bind(JSON)),N(199,q),N(3807,q),N(3907,h),N(2951,h),N(791,h),N(1183,h),N(1270,h)};t.exports={init:F}}}),wOe=A({"../../node_modules/pg-int8/index.js"(e,t){"use strict";var r=1e6;function n(i){var s=i.readInt32BE(0),a=i.readUInt32BE(4),o="";s<0&&(s=~s+(a===0),a=~a+1>>>0,o="-");var c="",u,l,p,d,m,f;{if(u=s%r,s=s/r>>>0,l=4294967296*u+a,a=l/r>>>0,p=""+(l-r*a),a===0&&s===0)return o+p+c;for(d="",m=6-p.length,f=0;f<m;f++)d+="0";c=d+p+c}{if(u=s%r,s=s/r>>>0,l=4294967296*u+a,a=l/r>>>0,p=""+(l-r*a),a===0&&s===0)return o+p+c;for(d="",m=6-p.length,f=0;f<m;f++)d+="0";c=d+p+c}{if(u=s%r,s=s/r>>>0,l=4294967296*u+a,a=l/r>>>0,p=""+(l-r*a),a===0&&s===0)return o+p+c;for(d="",m=6-p.length,f=0;f<m;f++)d+="0";c=d+p+c}return u=s%r,l=4294967296*u+a,p=""+l%r,o+p+c}t.exports=n}}),EOe=A({"../../node_modules/pg-types/lib/binaryParsers.js"(e,t){var r=wOe(),n=function(h,_,g,v,y){g=g||0,v=v||!1,y=y||function(P,G,D){return P*Math.pow(2,D)+G};var E=g>>3,q=function(P){return v?~P&255:P},T=255,M=8-g%8;_<M&&(T=255<<8-_&255,M=_),g&&(T=T>>g%8);var F=0;g%8+_>=8&&(F=y(0,q(h[E])&T,M));for(var N=_+g>>3,C=E+1;C<N;C++)F=y(F,q(h[C]),8);var x=(_+g)%8;return x>0&&(F=y(F,q(h[N])>>8-x,x)),F},i=function(h,_,g){var v=Math.pow(2,g-1)-1,y=n(h,1),E=n(h,g,1);if(E===0)return 0;var q=1,T=function(F,N,C){F===0&&(F=1);for(var x=1;x<=C;x++)q/=2,(N&1<<C-x)>0&&(F+=q);return F},M=n(h,_,g+1,!1,T);return E==Math.pow(2,g+1)-1?M===0?y===0?1/0:-1/0:NaN:(y===0?1:-1)*Math.pow(2,E-v)*M},s=function(h){return n(h,1)==1?-1*(n(h,15,1,!0)+1):n(h,15,1)},a=function(h){return n(h,1)==1?-1*(n(h,31,1,!0)+1):n(h,31,1)},o=function(h){return i(h,23,8)},c=function(h){return i(h,52,11)},u=function(h){var _=n(h,16,32);if(_==49152)return NaN;for(var g=Math.pow(1e4,n(h,16,16)),v=0,y=[],E=n(h,16),q=0;q<E;q++)v+=n(h,16,64+16*q)*g,g/=1e4;var T=Math.pow(10,n(h,16,48));return(_===0?1:-1)*Math.round(v*T)/T},l=function(h,_){var g=n(_,1),v=n(_,63,1),y=new Date((g===0?1:-1)*v/1e3+9466848e5);return h||y.setTime(y.getTime()+y.getTimezoneOffset()*6e4),y.usec=v%1e3,y.getMicroSeconds=function(){return this.usec},y.setMicroSeconds=function(E){this.usec=E},y.getUTCMicroSeconds=function(){return this.usec},y},p=function(h){for(var _=n(h,32),g=n(h,32,32),v=n(h,32,64),y=96,E=[],q=0;q<_;q++)E[q]=n(h,32,y),y+=32,y+=32;var T=function(F){var N=n(h,32,y);if(y+=32,N==4294967295)return null;var C;if(F==23||F==20)return C=n(h,N*8,y),y+=N*8,C;if(F==25)return C=h.toString(this.encoding,y>>3,(y+=N<<3)>>3),C;console.log("ERROR: ElementType not implemented: "+F)},M=function(F,N){var C=[],x;if(F.length>1){var P=F.shift();for(x=0;x<P;x++)C[x]=M(F,N);F.unshift(P)}else for(x=0;x<F[0];x++)C[x]=T(N);return C};return M(E,v)},d=function(h){return h.toString("utf8")},m=function(h){return h===null?null:n(h,8)>0},f=function(h){h(20,r),h(21,s),h(23,a),h(26,a),h(1700,u),h(700,o),h(701,c),h(16,m),h(1114,l.bind(null,!1)),h(1184,l.bind(null,!0)),h(1e3,p),h(1007,p),h(1016,p),h(1008,p),h(1009,p),h(25,d)};t.exports={init:f}}}),bOe=A({"../../node_modules/pg-types/lib/builtins.js"(e,t){t.exports={BOOL:16,BYTEA:17,CHAR:18,INT8:20,INT2:21,INT4:23,REGPROC:24,TEXT:25,OID:26,TID:27,XID:28,CID:29,JSON:114,XML:142,PG_NODE_TREE:194,SMGR:210,PATH:602,POLYGON:604,CIDR:650,FLOAT4:700,FLOAT8:701,ABSTIME:702,RELTIME:703,TINTERVAL:704,CIRCLE:718,MACADDR8:774,MONEY:790,MACADDR:829,INET:869,ACLITEM:1033,BPCHAR:1042,VARCHAR:1043,DATE:1082,TIME:1083,TIMESTAMP:1114,TIMESTAMPTZ:1184,INTERVAL:1186,TIMETZ:1266,BIT:1560,VARBIT:1562,NUMERIC:1700,REFCURSOR:1790,REGPROCEDURE:2202,REGOPER:2203,REGOPERATOR:2204,REGCLASS:2205,REGTYPE:2206,UUID:2950,TXID_SNAPSHOT:2970,PG_LSN:3220,PG_NDISTINCT:3361,PG_DEPENDENCIES:3402,TSVECTOR:3614,TSQUERY:3615,GTSVECTOR:3642,REGCONFIG:3734,REGDICTIONARY:3769,JSONB:3802,REGNAMESPACE:4089,REGROLE:4096}}}),E0=A({"../../node_modules/pg-types/index.js"(e){var t=SOe(),r=EOe(),n=i8(),i=bOe();e.getTypeParser=o,e.setTypeParser=c,e.arrayParser=n,e.builtins=i;var s={text:{},binary:{}};function a(u){return String(u)}function o(u,l){return l=l||"text",s[l]&&s[l][u]||a}function c(u,l,p){typeof l=="function"&&(p=l,l="text"),s[l][u]=p}t.init(function(u,l){s.text[u]=l}),r.init(function(u,l){s.binary[u]=l})}}),b0=A({"../../node_modules/pg/lib/defaults.js"(e,t){"use strict";t.exports={host:"localhost",user:process.platform==="win32"?process.env.USERNAME:process.env.USER,database:void 0,password:null,connectionString:void 0,port:5432,rows:0,binary:!1,max:10,idleTimeoutMillis:3e4,client_encoding:"",ssl:!1,application_name:void 0,fallback_application_name:void 0,options:void 0,parseInputDatesAsUTC:!1,statement_timeout:!1,lock_timeout:!1,idle_in_transaction_session_timeout:!1,query_timeout:!1,connect_timeout:0,keepalives:1,keepalives_idle:0};var r=E0(),n=r.getTypeParser(20,"text"),i=r.getTypeParser(1016,"text");t.exports.__defineSetter__("parseInt8",function(s){r.setTypeParser(20,"text",s?r.getTypeParser(23,"text"):n),r.setTypeParser(1016,"text",s?r.getTypeParser(1007,"text"):i)})}}),$T=A({"../../node_modules/pg/lib/utils.js"(e,t){"use strict";var r=require("crypto"),n=b0();function i(f){var h=f.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return'"'+h+'"'}function s(f){for(var h="{",_=0;_<f.length;_++)_>0&&(h=h+","),f[_]===null||typeof f[_]>"u"?h=h+"NULL":Array.isArray(f[_])?h=h+s(f[_]):f[_]instanceof Buffer?h+="\\\\x"+f[_].toString("hex"):h+=i(a(f[_]));return h=h+"}",h}var a=function(f,h){if(f==null)return null;if(f instanceof Buffer)return f;if(ArrayBuffer.isView(f)){var _=Buffer.from(f.buffer,f.byteOffset,f.byteLength);return _.length===f.byteLength?_:_.slice(f.byteOffset,f.byteOffset+f.byteLength)}return f instanceof Date?n.parseInputDatesAsUTC?l(f):u(f):Array.isArray(f)?s(f):typeof f=="object"?o(f,h):f.toString()};function o(f,h){if(f&&typeof f.toPostgres=="function"){if(h=h||[],h.indexOf(f)!==-1)throw new Error('circular reference detected while preparing "'+f+'" for query');return h.push(f),a(f.toPostgres(a),h)}return JSON.stringify(f)}function c(f,h){for(f=""+f;f.length<h;)f="0"+f;return f}function u(f){var h=-f.getTimezoneOffset(),_=f.getFullYear(),g=_<1;g&&(_=Math.abs(_)+1);var v=c(_,4)+"-"+c(f.getMonth()+1,2)+"-"+c(f.getDate(),2)+"T"+c(f.getHours(),2)+":"+c(f.getMinutes(),2)+":"+c(f.getSeconds(),2)+"."+c(f.getMilliseconds(),3);return h<0?(v+="-",h*=-1):v+="+",v+=c(Math.floor(h/60),2)+":"+c(h%60,2),g&&(v+=" BC"),v}function l(f){var h=f.getUTCFullYear(),_=h<1;_&&(h=Math.abs(h)+1);var g=c(h,4)+"-"+c(f.getUTCMonth()+1,2)+"-"+c(f.getUTCDate(),2)+"T"+c(f.getUTCHours(),2)+":"+c(f.getUTCMinutes(),2)+":"+c(f.getUTCSeconds(),2)+"."+c(f.getUTCMilliseconds(),3);return g+="+00:00",_&&(g+=" BC"),g}function p(f,h,_){return f=typeof f=="string"?{text:f}:f,h&&(typeof h=="function"?f.callback=h:f.values=h),_&&(f.callback=_),f}var d=function(f){return r.createHash("md5").update(f,"utf-8").digest("hex")},m=function(f,h,_){var g=d(h+f),v=d(Buffer.concat([Buffer.from(g),_]));return"md5"+v};t.exports={prepareValue:function(h){return a(h)},normalizeQueryConfig:p,postgresMd5PasswordHash:m,md5:d}}}),ROe=A({"../../node_modules/pg/lib/sasl.js"(e,t){"use strict";var r=require("crypto");function n(f){if(f.indexOf("SCRAM-SHA-256")===-1)throw new Error("SASL: Only mechanism SCRAM-SHA-256 is currently supported");let h=r.randomBytes(18).toString("base64");return{mechanism:"SCRAM-SHA-256",clientNonce:h,response:"n,,n=*,r="+h,message:"SASLInitialResponse"}}function i(f,h,_){if(f.message!=="SASLInitialResponse")throw new Error("SASL: Last message was not SASLInitialResponse");if(typeof h!="string")throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");if(h==="")throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");if(typeof _!="string")throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");let g=u(_);if(g.nonce.startsWith(f.clientNonce)){if(g.nonce.length===f.clientNonce.length)throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");var v=Buffer.from(g.salt,"base64"),y=r.pbkdf2Sync(h,v,g.iteration,32,"sha256"),E=m(y,"Client Key"),q=d(E),T="n=*,r="+f.clientNonce,M="r="+g.nonce+",s="+g.salt+",i="+g.iteration,F="c=biws,r="+g.nonce,N=T+","+M+","+F,C=m(q,N),x=p(E,C),P=x.toString("base64"),G=m(y,"Server Key"),D=m(G,N);f.message="SASLResponse",f.serverSignature=D.toString("base64"),f.response=F+",p="+P}function s(f,h){if(f.message!=="SASLResponse")throw new Error("SASL: Last message was not SASLResponse");if(typeof h!="string")throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");let{serverSignature:_}=l(h);if(_!==f.serverSignature)throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match")}function a(f){if(typeof f!="string")throw new TypeError("SASL: text must be a string");return f.split("").map((h,_)=>f.charCodeAt(_)).every(h=>h>=33&&h<=43||h>=45&&h<=126)}function o(f){return/^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(f)}function c(f){if(typeof f!="string")throw new TypeError("SASL: attribute pairs text must be a string");return new Map(f.split(",").map(h=>{if(!/^.=/.test(h))throw new Error("SASL: Invalid attribute pair entry");let _=h[0],g=h.substring(2);return[_,g]}))}function u(f){let h=c(f),_=h.get("r");if(_){if(!a(_))throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");let g=h.get("s");if(g){if(!o(g))throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");let v=h.get("i");if(v){if(!/^[1-9][0-9]*$/.test(v))throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");let y=parseInt(v,10);return{nonce:_,salt:g,iteration:y}}function l(f){let _=c(f).get("v");if(_){if(!o(_))throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64")}else throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");return{serverSignature:_}}function p(f,h){if(!Buffer.isBuffer(f))throw new TypeError("first argument must be a Buffer");if(!Buffer.isBuffer(h))throw new TypeError("second argument must be a Buffer");if(f.length!==h.length)throw new Error("Buffer lengths must match");if(f.length===0)throw new Error("Buffers cannot be empty");return Buffer.from(f.map((_,g)=>f[g]^h[g]))}function d(f){return r.createHash("sha256").update(f).digest()}function m(f,h){return r.createHmac("sha256",f).update(h).digest()}t.exports={startSession:n,continueSession:i,finalizeSession:s}}}),xOe=A({"../../node_modules/pgpass/node_modules/split2/index.js"(e,t){"use strict";var{Transform:r}=require("stream"),{StringDecoder:n}=require("string_decoder"),i=Symbol("last"),s=Symbol("decoder");function a(p,d,m){let f;if(this.overflow){if(f=this[s].write(p).split(this.matcher),f.length===1)return m();f.shift(),this.overflow=!1}else this[i]+=this[s].write(p),f=this[i].split(this.matcher);this[i]=f.pop();for(let h=0;h<f.length;h++)try{c(this,this.mapper(f[h]))}catch(_){return m(_)}if(this.overflow=this[i].length>this.maxLength,this.overflow&&!this.skipOverflow){m(new Error("maximum buffer reached"));return}m()}function o(p){if(this[i]+=this[s].end(),this[i])try{c(this,this.mapper(this[i]))}catch(d){return p(d)}p()}function c(p,d){d!==void 0&&p.push(d)}function u(p){return p}function l(p,d,m){switch(p=p||/\r?\n/,d=d||u,m=m||{},arguments.length){case 1:typeof p=="function"?(d=p,p=/\r?\n/):typeof p=="object"&&!(p instanceof RegExp)&&(m=p,p=/\r?\n/);break;case 2:typeof p=="function"?(m=d,d=p,p=/\r?\n/):typeof d=="object"&&(m=d,d=u)}m=Object.assign({},m),m.autoDestroy=!0,m.transform=a,m.flush=o,m.readableObjectMode=!0;let f=new r(m);return f[i]="",f[s]=new n("utf8"),f.matcher=p,f.mapper=d,f.maxLength=m.maxLength,f.skipOverflow=m.skipOverflow||!1,f.overflow=!1,f._destroy=function(h,_){this._writableState.errorEmitted=!1,_(h)},f}t.exports=l}}),AOe=A({"../../node_modules/pgpass/lib/helper.js"(e,t){"use strict";var r=require("path"),n=require("stream").Stream,i=xOe(),s=require("util"),a=5432,o=process.platform==="win32",c=process.stderr,u=56,l=7,p=61440,d=32768;function m(q){return(q&p)==d}var f=["host","port","database","user","password"],h=f.length,_=f[h-1];function g(){var q=c instanceof n&&c.writable===!0;if(q){var T=Array.prototype.slice.call(arguments).concat(`
135
+ `));return!0}};Tt.JsonValidationService=lT});var ba=S(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.TypeResolver=Co.ResolvableType=Co.PrimitiveType=void 0;function cTe(e){return e}Co.PrimitiveType=cTe;function lTe(e){return e}Co.ResolvableType=lTe;var dT=class{constructor(t,r=[],n={}){this.resolvers=n,this.primitives=new Map(t.map(i=>[i.title,i])),this.resolvables=new Map(r.map(i=>[i.title,i]));for(let[i,s]of Object.entries(n)){if(!this.primitives.has(i))throw new Error("Resolver keys must match a primitive schema");if(!Object.keys(s).every(a=>this.resolvables.has(a)))throw new Error("Primitive resolvers keys must match a resolvable schema")}}get validationSchemaDefinitions(){return[...this.primitives.values(),...this.resolvables.values()]}isPrimitiveType(t){return this.primitives.has(t)}isPrimitiveSchema(t){return this.isPrimitiveType(t.title)}isResolvableSchema(t){return this.resolvables.has(t.title)}getValidationSchemaForPrimitive(t){return[this.primitives.get(t),...this.fetchResolvableSchemasForPrimitive(t)]}*fetchResolvableSchemasForPrimitive(t){for(let r in this.resolvers[t])yield this.resolvables.get(r)}tryGetResolver(t,r){var n;if(t in this.resolvers)return(n=this.resolvers[t])===null||n===void 0?void 0:n[r.title]}};Co.TypeResolver=dT});var k6=S(i0=>{"use strict";Object.defineProperty(i0,"__esModule",{value:!0});i0.TypeResolverBuilder=void 0;var uTe=ba(),mf=class{constructor(){this.primitives=new Set,this.resolvables=new Set,this.resolverMap={}}static new(){return new mf}addPrimitive(t){return this.primitives.add(t),this}addResolver(t,r,n){var i,s,a;return this.primitives.add(t),this.resolvables.add(r),(i=(s=this.resolverMap)[a=t.title])!==null&&i!==void 0||(s[a]={}),this.resolverMap[t.title][r.title]=n,this}build(){return new uTe.TypeResolver(Array.from(this.primitives.values()),Array.from(this.resolvables.values()),this.resolverMap)}};i0.TypeResolverBuilder=mf});var D6=S(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.SquizImageType=void 0;var dTe=ba();s0.SquizImageType=(0,dTe.PrimitiveType)({title:"SquizImage",type:"object",properties:{name:{type:"string"},alt:{type:"string"},caption:{type:"string"},exif:{type:"object",properties:{image:{type:"object"},thumbnail:{type:"object"},exif:{type:"object"},gps:{type:"object"},interoperability:{type:"object"},makernote:{type:"object"}},required:["image","thumbnail","exif","gps","interoperability","makernote"]},imageVariations:{type:"object",properties:{original:{$ref:"#/definitions/SquizImageData"},small:{type:"array",items:{$ref:"#/definitions/SquizImageData"}},medium:{type:"array",items:{$ref:"#/definitions/SquizImageData"}},large:{type:"array",items:{$ref:"#/definitions/SquizImageData"}},aspectRatios:{type:"array",items:{$ref:"#/definitions/SquizImageData"}}},required:["original"]}},required:["name","imageVariations"],definitions:{SquizImageData:{type:"object",properties:{width:{type:"number"},height:{type:"number"},url:{type:"string"},mimeType:{type:"string"},byteSize:{type:"number"},sha1Hash:{type:"string"},aspectRatio:{type:"string"}},required:["width","height","url","mimeType","byteSize","sha1Hash","aspectRatio"]}}})});var L6=S(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.ComponentInputFormattedTextType=Oo.BaseFormattedTextType=Oo.FormattedTextType=void 0;var F6=Io(),pT=ba();Oo.FormattedTextType=(0,pT.PrimitiveType)({...F6.FORMATTED_TEXT_SCHEMAS.v1,title:"FormattedText"});Oo.BaseFormattedTextType=(0,pT.PrimitiveType)({...F6.FORMATTED_TEXT_SCHEMAS.v1,items:{$ref:"#/definitions/BaseFormattedNodes"},title:"FormattedText"});Oo.ComponentInputFormattedTextType=(0,pT.PrimitiveType)({type:"string",title:"FormattedText"})});var z6=S(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.SquizLinkType=void 0;var pTe=ba();o0.SquizLinkType=(0,pTe.PrimitiveType)({title:"SquizLink",type:"object",properties:{name:{type:"string"},url:{type:"string"},target:{type:"string",enum:["_blank","_parent","_self","_top"]}},required:["name","url"]})});var $6=S(xs=>{"use strict";var fTe=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),fT=xs&&xs.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&fTe(t,e,r)};Object.defineProperty(xs,"__esModule",{value:!0});fT(D6(),xs);fT(L6(),xs);fT(z6(),xs)});var V6=S(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.MatrixAssetLinkType=Gc.MatrixAssetType=void 0;var U6=ba();Gc.MatrixAssetType=(0,U6.ResolvableType)({title:"MatrixAsset",type:"object",properties:{matrixAssetId:{type:"string"},matrixIdentifier:{type:"string"},matrixDomain:{type:"string"}},required:["matrixAssetId","matrixIdentifier"]});Gc.MatrixAssetLinkType=(0,U6.ResolvableType)({title:"MatrixAssetLink",type:"object",properties:{matrixAssetId:{type:"string"},matrixIdentifier:{type:"string"},matrixDomain:{type:"string"},target:{type:"string",enum:["_blank","_parent","_self","_top"]}},required:["matrixAssetId","matrixIdentifier"]})});var G6=S(Ra=>{"use strict";var mTe=Ra&&Ra.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),hTe=Ra&&Ra.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&mTe(t,e,r)};Object.defineProperty(Ra,"__esModule",{value:!0});hTe(V6(),Ra)});var Io=S(wt=>{"use strict";var H6=wt&&wt.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),_Te=wt&&wt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hf=wt&&wt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&H6(t,e,r);return _Te(t,e),t},As=wt&&wt.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&H6(t,e,r)};Object.defineProperty(wt,"__esModule",{value:!0});wt.SUB_SCHEMAS=wt.FORMATTED_TEXT_SCHEMAS=wt.FORMATTED_TEXT_MODELS=wt.MANIFEST_SCHEMAS=wt.MANIFEST_MODELS=void 0;wt.MANIFEST_MODELS=hf(y6());wt.MANIFEST_SCHEMAS=hf(S6());wt.FORMATTED_TEXT_MODELS=hf(b6());wt.FORMATTED_TEXT_SCHEMAS=hf(R6());As(A6(),wt);wt.SUB_SCHEMAS=hf(P6());As(M6(),wt);As(Zw(),wt);As(oT(),wt);As(iT(),wt);As(ba(),wt);As(k6(),wt);As($6(),wt);As(G6(),wt)});var B6=S(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.formattedTextToHtmlString=xa.formattedTextToHtmlStringResolvers=void 0;var vTe=Io();xa.formattedTextToHtmlStringResolvers={tag:async e=>yTe(e),text:async e=>e.value,default:async e=>`<p class="invalid-node-type"> node of type "${e.type}" cannot be converted to html</p>`};async function gTe(e){return await(0,vTe.resolveFormattedText)(e,xa.formattedTextToHtmlStringResolvers)}xa.formattedTextToHtmlString=gTe;function yTe(e){let t=STe(e);e.attributes?e.attributes.class=t:e.attributes={class:t};let r=wTe(e.attributes);return`<${e.tag}${r}>${e.children.join("")}</${e.tag}>`}function STe(e){var t,r,n;let i=ETe(e.font),s=(r=(t=e==null?void 0:e.attributes)===null||t===void 0?void 0:t.class)!==null&&r!==void 0?r:"";return!((n=e==null?void 0:e.formattingOptions)===null||n===void 0)&&n.alignment&&i.push(e.formattingOptions.alignment),i.length>0&&(s+=" "+i.join(" ")),s.trim()}function wTe(e){if(!e)return"";let t="";for(let r in e)e[r]!==""&&(t+=` ${r}="${e[r]}"`);return t}function ETe(e){if(!e)return[];let t=[];return e.bold&&t.push("bold"),e.underline&&t.push("underline"),e.italics&&t.push("italics"),e.color&&t.push(`color-${e.color}`),e.size&&t.push(`size-${e.size}`),e.fontFamily&&t.push(`font-${e.fontFamily}`),t}});var qB=S((_f,Hc)=>{var bTe=200,iB="__lodash_hash_undefined__",sB=9007199254740991,wT="[object Arguments]",RTe="[object Array]",oB="[object Boolean]",aB="[object Date]",xTe="[object Error]",ET="[object Function]",cB="[object GeneratorFunction]",a0="[object Map]",lB="[object Number]",bT="[object Object]",W6="[object Promise]",uB="[object RegExp]",c0="[object Set]",dB="[object String]",pB="[object Symbol]",hT="[object WeakMap]",fB="[object ArrayBuffer]",l0="[object DataView]",mB="[object Float32Array]",hB="[object Float64Array]",_B="[object Int8Array]",vB="[object Int16Array]",gB="[object Int32Array]",yB="[object Uint8Array]",SB="[object Uint8ClampedArray]",wB="[object Uint16Array]",EB="[object Uint32Array]",ATe=/[\\^$.*+?()[\]{}|]/g,PTe=/\w*$/,ITe=/^\[object .+?Constructor\]$/,TTe=/^(?:0|[1-9]\d*)$/,Rt={};Rt[wT]=Rt[RTe]=Rt[fB]=Rt[l0]=Rt[oB]=Rt[aB]=Rt[mB]=Rt[hB]=Rt[_B]=Rt[vB]=Rt[gB]=Rt[a0]=Rt[lB]=Rt[bT]=Rt[uB]=Rt[c0]=Rt[dB]=Rt[pB]=Rt[yB]=Rt[SB]=Rt[wB]=Rt[EB]=!0;Rt[xTe]=Rt[ET]=Rt[hT]=!1;var CTe=typeof global=="object"&&global&&global.Object===Object&&global,OTe=typeof self=="object"&&self&&self.Object===Object&&self,Ps=CTe||OTe||Function("return this")(),bB=typeof _f=="object"&&_f&&!_f.nodeType&&_f,K6=bB&&typeof Hc=="object"&&Hc&&!Hc.nodeType&&Hc,NTe=K6&&K6.exports===bB;function jTe(e,t){return e.set(t[0],t[1]),e}function qTe(e,t){return e.add(t),e}function MTe(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function kTe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function RB(e,t,r,n){var i=-1,s=e?e.length:0;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function DTe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function FTe(e,t){return e==null?void 0:e[t]}function xB(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function J6(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function RT(e,t){return function(r){return e(t(r))}}function Y6(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var LTe=Array.prototype,zTe=Function.prototype,u0=Object.prototype,mT=Ps["__core-js_shared__"],Q6=function(){var e=/[^.]+$/.exec(mT&&mT.keys&&mT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),AB=zTe.toString,No=u0.hasOwnProperty,d0=u0.toString,$Te=RegExp("^"+AB.call(No).replace(ATe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),X6=NTe?Ps.Buffer:void 0,Z6=Ps.Symbol,eB=Ps.Uint8Array,UTe=RT(Object.getPrototypeOf,Object),VTe=Object.create,GTe=u0.propertyIsEnumerable,HTe=LTe.splice,tB=Object.getOwnPropertySymbols,BTe=X6?X6.isBuffer:void 0,WTe=RT(Object.keys,Object),_T=Kc(Ps,"DataView"),vf=Kc(Ps,"Map"),vT=Kc(Ps,"Promise"),gT=Kc(Ps,"Set"),yT=Kc(Ps,"WeakMap"),gf=Kc(Object,"create"),KTe=Ia(_T),JTe=Ia(vf),YTe=Ia(vT),QTe=Ia(gT),XTe=Ia(yT),rB=Z6?Z6.prototype:void 0,nB=rB?rB.valueOf:void 0;function Pa(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ZTe(){this.__data__=gf?gf(null):{}}function eCe(e){return this.has(e)&&delete this.__data__[e]}function tCe(e){var t=this.__data__;if(gf){var r=t[e];return r===iB?void 0:r}return No.call(t,e)?t[e]:void 0}function rCe(e){var t=this.__data__;return gf?t[e]!==void 0:No.call(t,e)}function nCe(e,t){var r=this.__data__;return r[e]=gf&&t===void 0?iB:t,this}Pa.prototype.clear=ZTe;Pa.prototype.delete=eCe;Pa.prototype.get=tCe;Pa.prototype.has=rCe;Pa.prototype.set=nCe;function Is(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function iCe(){this.__data__=[]}function sCe(e){var t=this.__data__,r=p0(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():HTe.call(t,r,1),!0}function oCe(e){var t=this.__data__,r=p0(t,e);return r<0?void 0:t[r][1]}function aCe(e){return p0(this.__data__,e)>-1}function cCe(e,t){var r=this.__data__,n=p0(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Is.prototype.clear=iCe;Is.prototype.delete=sCe;Is.prototype.get=oCe;Is.prototype.has=aCe;Is.prototype.set=cCe;function Bc(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function lCe(){this.__data__={hash:new Pa,map:new(vf||Is),string:new Pa}}function uCe(e){return f0(this,e).delete(e)}function dCe(e){return f0(this,e).get(e)}function pCe(e){return f0(this,e).has(e)}function fCe(e,t){return f0(this,e).set(e,t),this}Bc.prototype.clear=lCe;Bc.prototype.delete=uCe;Bc.prototype.get=dCe;Bc.prototype.has=pCe;Bc.prototype.set=fCe;function Wc(e){this.__data__=new Is(e)}function mCe(){this.__data__=new Is}function hCe(e){return this.__data__.delete(e)}function _Ce(e){return this.__data__.get(e)}function vCe(e){return this.__data__.has(e)}function gCe(e,t){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!vf||n.length<bTe-1)return n.push([e,t]),this;r=this.__data__=new Bc(n)}return r.set(e,t),this}Wc.prototype.clear=mCe;Wc.prototype.delete=hCe;Wc.prototype.get=_Ce;Wc.prototype.has=vCe;Wc.prototype.set=gCe;function yCe(e,t){var r=AT(e)||VCe(e)?DTe(e.length,String):[],n=r.length,i=!!n;for(var s in e)(t||No.call(e,s))&&!(i&&(s=="length"||LCe(s,n)))&&r.push(s);return r}function PB(e,t,r){var n=e[t];(!(No.call(e,t)&&OB(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function p0(e,t){for(var r=e.length;r--;)if(OB(e[r][0],t))return r;return-1}function SCe(e,t){return e&&IB(t,PT(t),e)}function ST(e,t,r,n,i,s,a){var o;if(n&&(o=s?n(e,i,s,a):n(e)),o!==void 0)return o;if(!m0(e))return e;var c=AT(e);if(c){if(o=kCe(e),!t)return jCe(e,o)}else{var u=Aa(e),l=u==ET||u==cB;if(HCe(e))return ACe(e,t);if(u==bT||u==wT||l&&!s){if(xB(e))return s?e:{};if(o=DCe(l?{}:e),!t)return qCe(e,SCe(o,e))}else{if(!Rt[u])return s?e:{};o=FCe(e,u,ST,t)}}a||(a=new Wc);var p=a.get(e);if(p)return p;if(a.set(e,o),!c)var d=r?MCe(e):PT(e);return MTe(d||e,function(m,f){d&&(f=m,m=e[f]),PB(o,f,ST(m,t,r,n,f,e,a))}),o}function wCe(e){return m0(e)?VTe(e):{}}function ECe(e,t,r){var n=t(e);return AT(e)?n:kTe(n,r(e))}function bCe(e){return d0.call(e)}function RCe(e){if(!m0(e)||$Ce(e))return!1;var t=jB(e)||xB(e)?$Te:ITe;return t.test(Ia(e))}function xCe(e){if(!CB(e))return WTe(e);var t=[];for(var r in Object(e))No.call(e,r)&&r!="constructor"&&t.push(r);return t}function ACe(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function xT(e){var t=new e.constructor(e.byteLength);return new eB(t).set(new eB(e)),t}function PCe(e,t){var r=t?xT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function ICe(e,t,r){var n=t?r(J6(e),!0):J6(e);return RB(n,jTe,new e.constructor)}function TCe(e){var t=new e.constructor(e.source,PTe.exec(e));return t.lastIndex=e.lastIndex,t}function CCe(e,t,r){var n=t?r(Y6(e),!0):Y6(e);return RB(n,qTe,new e.constructor)}function OCe(e){return nB?Object(nB.call(e)):{}}function NCe(e,t){var r=t?xT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jCe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function IB(e,t,r,n){r||(r={});for(var i=-1,s=t.length;++i<s;){var a=t[i],o=n?n(r[a],e[a],a,r,e):void 0;PB(r,a,o===void 0?e[a]:o)}return r}function qCe(e,t){return IB(e,TB(e),t)}function MCe(e){return ECe(e,PT,TB)}function f0(e,t){var r=e.__data__;return zCe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kc(e,t){var r=FTe(e,t);return RCe(r)?r:void 0}var TB=tB?RT(tB,Object):KCe,Aa=bCe;(_T&&Aa(new _T(new ArrayBuffer(1)))!=l0||vf&&Aa(new vf)!=a0||vT&&Aa(vT.resolve())!=W6||gT&&Aa(new gT)!=c0||yT&&Aa(new yT)!=hT)&&(Aa=function(e){var t=d0.call(e),r=t==bT?e.constructor:void 0,n=r?Ia(r):void 0;if(n)switch(n){case KTe:return l0;case JTe:return a0;case YTe:return W6;case QTe:return c0;case XTe:return hT}return t});function kCe(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&No.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function DCe(e){return typeof e.constructor=="function"&&!CB(e)?wCe(UTe(e)):{}}function FCe(e,t,r,n){var i=e.constructor;switch(t){case fB:return xT(e);case oB:case aB:return new i(+e);case l0:return PCe(e,n);case mB:case hB:case _B:case vB:case gB:case yB:case SB:case wB:case EB:return NCe(e,n);case a0:return ICe(e,n,r);case lB:case dB:return new i(e);case uB:return TCe(e);case c0:return CCe(e,n,r);case pB:return OCe(e)}}function LCe(e,t){return t=t??sB,!!t&&(typeof e=="number"||TTe.test(e))&&e>-1&&e%1==0&&e<t}function zCe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $Ce(e){return!!Q6&&Q6 in e}function CB(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||u0;return e===r}function Ia(e){if(e!=null){try{return AB.call(e)}catch{}try{return e+""}catch{}}return""}function UCe(e){return ST(e,!0,!0)}function OB(e,t){return e===t||e!==e&&t!==t}function VCe(e){return GCe(e)&&No.call(e,"callee")&&(!GTe.call(e,"callee")||d0.call(e)==wT)}var AT=Array.isArray;function NB(e){return e!=null&&BCe(e.length)&&!jB(e)}function GCe(e){return WCe(e)&&NB(e)}var HCe=BTe||JCe;function jB(e){var t=m0(e)?d0.call(e):"";return t==ET||t==cB}function BCe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sB}function m0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function WCe(e){return!!e&&typeof e=="object"}function PT(e){return NB(e)?yCe(e):xCe(e)}function KCe(){return[]}function JCe(){return!1}Hc.exports=UCe});var kB=S((b7e,MB)=>{"use strict";MB.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var IT=S(jo=>{"use strict";var YCe=jo&&jo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jo,"__esModule",{value:!0});jo.splitKey=jo.escapeKey=void 0;var QCe=YCe(kB()),XCe=(e,t)=>{let n=["\\",t].map(i=>(0,QCe.default)(i)).join("|");return e.replace(new RegExp(`(${n})`,"g"),"\\$1")};jo.escapeKey=XCe;var ZCe=(e,t)=>{if(e.indexOf("\\")<0)return e.split(t);let r=[],n="",i=!1;for(let s=0;s<e.length;s++){let a=e[s];i?(n+=a,i=!1):a==="\\"?i=!0:a===t[0]&&e.substr(s,t.length)===t?(r.push(n),n="",s+=t.length-1):n+=a}return r.push(n),r};jo.splitKey=ZCe});var CT=S(yf=>{"use strict";var eOe=yf&&yf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0});var tOe=eOe(qB()),TT=IT(),DB=(e,t,r)=>{let n=!0,i=(0,TT.splitKey)(t,r).slice(1).reduce((s,a)=>{if(n=s&&a in s,!!n)return s[a]},e);return{exists:n,value:i}},FB=(e,t,r,n)=>{(0,TT.splitKey)(t,n).slice(1).reduce((i,s,a,o)=>{if(a===o.length-1){let c=Array.isArray(r)?(0,tOe.default)(r).map(u=>typeof u=="object"?{}:u):r;i[s]=c}return i[s]},e)},rOe=(e,t,r,n)=>{let i=DB(e,r,n);i.exists&&FB(t,r,i.value,n)},nOe=(e,t,r="~")=>{if(r.length<1)throw new Error("Separator should not be an empty string.");if(r==="\\")throw new Error('Separator cannot be "\\".');if(!t)return e;let n=Object.keys(t),i=n[0]&&n[0].length||0,s={};return n.forEach(a=>{let o=t[a],c=a.substr(i),u=DB(e,c,r);if(u.exists){let l=Array.isArray(u.value)?u.value:{};FB(s,c,l,r),o.forEach(p=>rOe(e,s,`${c}${r}${(0,TT.escapeKey)(p,r)}`,r))}}),s};yf.default=nOe});var $B=S(OT=>{"use strict";Object.defineProperty(OT,"__esModule",{value:!0});var LB=IT(),zB=(e,t,r,n)=>{let i=Object.keys(e);i.length!==0&&(Array.isArray(e)||(t[`${r}`]=i),i.forEach(s=>{let a=e[s];a!==null&&typeof a=="object"&&zB(a,t,`${r}${n}${(0,LB.escapeKey)(s,n)}`,n)}))},iOe=(e,t="$",r="~")=>{if(t.length<1)throw new Error("Prefix should not be an empty string.");if(r.length<1)throw new Error("Separator should not be an empty string.");if(r==="\\")throw new Error('Separator cannot be "\\".');let n=JSON.parse(e),i={};return zB(n,i,(0,LB.escapeKey)(t,r),r),{object:n,map:i}};OT.default=iOe});var UB=S(Sf=>{"use strict";var sOe=Sf&&Sf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0});var oOe=sOe(CT()),aOe=(e,t,r="~",n)=>JSON.stringify((0,oOe.default)(e,t,r),null,n);Sf.default=aOe});var VB=S(Jc=>{"use strict";var NT=Jc&&Jc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.jsonOrder=void 0;var cOe=NT(CT()),lOe=NT($B()),uOe=NT(UB());Jc.jsonOrder={order:cOe.default,parse:lOe.default,stringify:uOe.default}});var Ot=S(nr=>{"use strict";var dOe=nr&&nr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),un=nr&&nr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&dOe(t,e,r)};Object.defineProperty(nr,"__esModule",{value:!0});un(ej(),nr);un(aj(),nr);un(h1(),nr);un(mM(),nr);un(hM(),nr);un(_M(),nr);un(gM(),nr);un($I(),nr);un(VI(),nr);un(p6(),nr);un(f6(),nr);un(_6(),nr);un(B6(),nr);un(VB(),nr)});var jT=S(GB=>{"use strict";Object.defineProperty(GB,"__esModule",{value:!0})});var BB=S(HB=>{"use strict";Object.defineProperty(HB,"__esModule",{value:!0})});var _0=S(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.ComponentSetComponentVersion=Ta.ComponentSetComponentVersionStatus=void 0;var Ji=Ot(),h0;(function(e){e.active="active",e.excluded="excluded"})(h0=Ta.ComponentSetComponentVersionStatus||(Ta.ComponentSetComponentVersionStatus={}));var qT=class{constructor(t){this.componentSetWebPath="",this.componentName="",this.componentVersion="",this.status=h0.active,(0,Ji.assertIsDefined)(t),this.componentSetWebPath=(0,Ji.assertAssign)(t.componentSetWebPath,Ji.assertIsString,"componentSetWebPath must be a string"),this.componentName=(0,Ji.assertAssign)(t.componentName,Ji.assertIsString,"componentName must be a string"),this.componentVersion=(0,Ji.assertAssign)(t.componentVersion,Ji.assertIsString,"componentVersion must be a string"),this.environmentVariables=(0,Ji.assertAssignWithDefaultUndefinedValue)(t.environmentVariables,Ji.assertIsMapOfStringString,{}),t.status===void 0&&(t.status=h0.active),(0,Ji.assertIsEnumValue)(t.status,h0),this.status=t.status}};Ta.ComponentSetComponentVersion=qT});var Os=S((G7e,G9)=>{"use strict";var pOe=Object.create,w0=Object.defineProperty,fOe=Object.getOwnPropertyDescriptor,LT=Object.getOwnPropertyNames,mOe=Object.getPrototypeOf,hOe=Object.prototype.hasOwnProperty,qr=(e,t)=>function(){return e&&(t=(0,e[LT(e)[0]])(e=0)),t},A=(e,t)=>function(){return t||(0,e[LT(e)[0]])((t={exports:{}}).exports,t),t.exports},zT=(e,t)=>{for(var r in t)w0(e,r,{get:t[r],enumerable:!0})},r8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LT(t))!hOe.call(e,i)&&i!==r&&w0(e,i,{get:()=>t[i],enumerable:!(n=fOe(t,i))||n.enumerable});return e},Qi=(e,t,r)=>(r=e!=null?pOe(mOe(e)):{},r8(t||!e||!e.__esModule?w0(r,"default",{value:e,enumerable:!0}):r,e)),Ie=e=>r8(w0({},"__esModule",{value:!0}),e),n8=A({"../../node_modules/postgres-array/index.js"(e){"use strict";e.parse=function(n,i){return new t(n,i).parse()};var t=class{constructor(n,i){this.source=n,this.transform=i||r,this.position=0,this.entries=[],this.recorded=[],this.dimension=0}isEof(){return this.position>=this.source.length}nextCharacter(){var n=this.source[this.position++];return n==="\\"?{value:this.source[this.position++],escaped:!0}:{value:n,escaped:!1}}record(n){this.recorded.push(n)}newEntry(n){var i;(this.recorded.length>0||n)&&(i=this.recorded.join(""),i==="NULL"&&!n&&(i=null),i!==null&&(i=this.transform(i)),this.entries.push(i),this.recorded=[])}consumeDimensions(){if(this.source[0]==="[")for(;!this.isEof();){var n=this.nextCharacter();if(n.value==="=")break}}parse(n){var i,s,a;for(this.consumeDimensions();!this.isEof();)if(i=this.nextCharacter(),i.value==="{"&&!a)this.dimension++,this.dimension>1&&(s=new t(this.source.substr(this.position-1),this.transform),this.entries.push(s.parse(!0)),this.position+=s.position-2);else if(i.value==="}"&&!a){if(this.dimension--,!this.dimension&&(this.newEntry(),n))return this.entries}else i.value==='"'&&!i.escaped?(a&&this.newEntry(!0),a=!a):i.value===","&&!a?this.newEntry():this.record(i.value);if(this.dimension!==0)throw new Error("array dimension not balanced");return this.entries}};function r(n){return n}}}),i8=A({"../../node_modules/pg-types/lib/arrayParser.js"(e,t){var r=n8();t.exports={create:function(n,i){return{parse:function(){return r.parse(n,i)}}}}}}),_Oe=A({"../../node_modules/postgres-date/index.js"(e,t){"use strict";var r=/(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/,n=/^(\d{1,})-(\d{2})-(\d{2})( BC)?$/,i=/([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/,s=/^-?infinity$/;t.exports=function(p){if(s.test(p))return Number(p.replace("i","I"));var d=r.exec(p);if(!d)return a(p)||null;var m=!!d[8],f=parseInt(d[1],10);m&&(f=c(f));var h=parseInt(d[2],10)-1,_=d[3],g=parseInt(d[4],10),v=parseInt(d[5],10),y=parseInt(d[6],10),E=d[7];E=E?1e3*parseFloat(E):0;var q,T=o(p);return T!=null?(q=new Date(Date.UTC(f,h,_,g,v,y,E)),u(f)&&q.setUTCFullYear(f),T!==0&&q.setTime(q.getTime()-T)):(q=new Date(f,h,_,g,v,y,E),u(f)&&q.setFullYear(f)),q};function a(l){var p=n.exec(l);if(p){var d=parseInt(p[1],10),m=!!p[4];m&&(d=c(d));var f=parseInt(p[2],10)-1,h=p[3],_=new Date(d,f,h);return u(d)&&_.setFullYear(d),_}}function o(l){if(l.endsWith("+00"))return 0;var p=i.exec(l.split(" ")[1]);if(p){var d=p[1];if(d==="Z")return 0;var m=d==="-"?-1:1,f=parseInt(p[2],10)*3600+parseInt(p[3]||0,10)*60+parseInt(p[4]||0,10);return f*m*1e3}}function c(l){return-(l-1)}function u(l){return l>=0&&l<100}}}),vOe=A({"../../node_modules/xtend/mutable.js"(e,t){t.exports=n;var r=Object.prototype.hasOwnProperty;function n(i){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var o in a)r.call(a,o)&&(i[o]=a[o])}return i}}}),gOe=A({"../../node_modules/postgres-interval/index.js"(e,t){"use strict";var r=vOe();t.exports=n;function n(v){if(!(this instanceof n))return new n(v);r(this,g(v))}var i=["seconds","minutes","hours","days","months","years"];n.prototype.toPostgres=function(){var v=i.filter(this.hasOwnProperty,this);return this.milliseconds&&v.indexOf("seconds")<0&&v.push("seconds"),v.length===0?"0":v.map(function(y){var E=this[y]||0;return y==="seconds"&&this.milliseconds&&(E=(E+this.milliseconds/1e3).toFixed(6).replace(/\.?0+$/,"")),E+" "+y},this).join(" ")};var s={years:"Y",months:"M",days:"D",hours:"H",minutes:"M",seconds:"S"},a=["years","months","days"],o=["hours","minutes","seconds"];n.prototype.toISOString=n.prototype.toISO=function(){var v=a.map(E,this).join(""),y=o.map(E,this).join("");return"P"+v+"T"+y;function E(q){var T=this[q]||0;return q==="seconds"&&this.milliseconds&&(T=(T+this.milliseconds/1e3).toFixed(6).replace(/0+$/,"")),T+s[q]}};var c="([+-]?\\d+)",u=c+"\\s+years?",l=c+"\\s+mons?",p=c+"\\s+days?",d="([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?",m=new RegExp([u,l,p,d].map(function(v){return"("+v+")?"}).join("\\s*")),f={years:2,months:4,days:6,hours:9,minutes:10,seconds:11,milliseconds:12},h=["hours","minutes","seconds","milliseconds"];function _(v){var y=v+"000000".slice(v.length);return parseInt(y,10)/1e3}function g(v){if(!v)return{};var y=m.exec(v),E=y[8]==="-";return Object.keys(f).reduce(function(q,T){var M=f[T],F=y[M];return!F||(F=T==="milliseconds"?_(F):parseInt(F,10),!F)||(E&&~h.indexOf(T)&&(F*=-1),q[T]=F),q},{})}}}),yOe=A({"../../node_modules/postgres-bytea/index.js"(e,t){"use strict";t.exports=function(n){if(/^\\x/.test(n))return new Buffer(n.substr(2),"hex");for(var i="",s=0;s<n.length;)if(n[s]!=="\\")i+=n[s],++s;else if(/[0-7]{3}/.test(n.substr(s+1,3)))i+=String.fromCharCode(parseInt(n.substr(s+1,3),8)),s+=4;else{for(var a=1;s+a<n.length&&n[s+a]==="\\";)a++;for(var o=0;o<Math.floor(a/2);++o)i+="\\";s+=Math.floor(a/2)*2}return new Buffer(i,"binary")}}}),SOe=A({"../../node_modules/pg-types/lib/textParsers.js"(e,t){var r=n8(),n=i8(),i=_Oe(),s=gOe(),a=yOe();function o(N){return function(x){return x===null?x:N(x)}}function c(N){return N===null?N:N==="TRUE"||N==="t"||N==="true"||N==="y"||N==="yes"||N==="on"||N==="1"}function u(N){return N?r.parse(N,c):null}function l(N){return parseInt(N,10)}function p(N){return N?r.parse(N,o(l)):null}function d(N){return N?r.parse(N,o(function(C){return E(C).trim()})):null}var m=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=T(x)),x});return C.parse()},f=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=parseFloat(x)),x});return C.parse()},h=function(N){if(!N)return null;var C=n.create(N);return C.parse()},_=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=i(x)),x});return C.parse()},g=function(N){if(!N)return null;var C=n.create(N,function(x){return x!==null&&(x=s(x)),x});return C.parse()},v=function(N){return N?r.parse(N,o(a)):null},y=function(N){return parseInt(N,10)},E=function(N){var C=String(N);return/^\d+$/.test(C)?C:N},q=function(N){return N?r.parse(N,o(JSON.parse)):null},T=function(N){return N[0]!=="("?null:(N=N.substring(1,N.length-1).split(","),{x:parseFloat(N[0]),y:parseFloat(N[1])})},M=function(N){if(N[0]!=="<"&&N[1]!=="(")return null;for(var C="(",x="",P=!1,G=2;G<N.length-1;G++){if(P||(C+=N[G]),N[G]===")"){P=!0;continue}else if(!P)continue;N[G]!==","&&(x+=N[G])}var D=T(C);return D.radius=parseFloat(x),D},F=function(N){N(20,E),N(21,y),N(23,y),N(26,y),N(700,parseFloat),N(701,parseFloat),N(16,c),N(1082,i),N(1114,i),N(1184,i),N(600,T),N(651,h),N(718,M),N(1e3,u),N(1001,v),N(1005,p),N(1007,p),N(1028,p),N(1016,d),N(1017,m),N(1021,f),N(1022,f),N(1231,f),N(1014,h),N(1015,h),N(1008,h),N(1009,h),N(1040,h),N(1041,h),N(1115,_),N(1182,_),N(1185,_),N(1186,s),N(1187,g),N(17,a),N(114,JSON.parse.bind(JSON)),N(3802,JSON.parse.bind(JSON)),N(199,q),N(3807,q),N(3907,h),N(2951,h),N(791,h),N(1183,h),N(1270,h)};t.exports={init:F}}}),wOe=A({"../../node_modules/pg-int8/index.js"(e,t){"use strict";var r=1e6;function n(i){var s=i.readInt32BE(0),a=i.readUInt32BE(4),o="";s<0&&(s=~s+(a===0),a=~a+1>>>0,o="-");var c="",u,l,p,d,m,f;{if(u=s%r,s=s/r>>>0,l=4294967296*u+a,a=l/r>>>0,p=""+(l-r*a),a===0&&s===0)return o+p+c;for(d="",m=6-p.length,f=0;f<m;f++)d+="0";c=d+p+c}{if(u=s%r,s=s/r>>>0,l=4294967296*u+a,a=l/r>>>0,p=""+(l-r*a),a===0&&s===0)return o+p+c;for(d="",m=6-p.length,f=0;f<m;f++)d+="0";c=d+p+c}{if(u=s%r,s=s/r>>>0,l=4294967296*u+a,a=l/r>>>0,p=""+(l-r*a),a===0&&s===0)return o+p+c;for(d="",m=6-p.length,f=0;f<m;f++)d+="0";c=d+p+c}return u=s%r,l=4294967296*u+a,p=""+l%r,o+p+c}t.exports=n}}),EOe=A({"../../node_modules/pg-types/lib/binaryParsers.js"(e,t){var r=wOe(),n=function(h,_,g,v,y){g=g||0,v=v||!1,y=y||function(P,G,D){return P*Math.pow(2,D)+G};var E=g>>3,q=function(P){return v?~P&255:P},T=255,M=8-g%8;_<M&&(T=255<<8-_&255,M=_),g&&(T=T>>g%8);var F=0;g%8+_>=8&&(F=y(0,q(h[E])&T,M));for(var N=_+g>>3,C=E+1;C<N;C++)F=y(F,q(h[C]),8);var x=(_+g)%8;return x>0&&(F=y(F,q(h[N])>>8-x,x)),F},i=function(h,_,g){var v=Math.pow(2,g-1)-1,y=n(h,1),E=n(h,g,1);if(E===0)return 0;var q=1,T=function(F,N,C){F===0&&(F=1);for(var x=1;x<=C;x++)q/=2,(N&1<<C-x)>0&&(F+=q);return F},M=n(h,_,g+1,!1,T);return E==Math.pow(2,g+1)-1?M===0?y===0?1/0:-1/0:NaN:(y===0?1:-1)*Math.pow(2,E-v)*M},s=function(h){return n(h,1)==1?-1*(n(h,15,1,!0)+1):n(h,15,1)},a=function(h){return n(h,1)==1?-1*(n(h,31,1,!0)+1):n(h,31,1)},o=function(h){return i(h,23,8)},c=function(h){return i(h,52,11)},u=function(h){var _=n(h,16,32);if(_==49152)return NaN;for(var g=Math.pow(1e4,n(h,16,16)),v=0,y=[],E=n(h,16),q=0;q<E;q++)v+=n(h,16,64+16*q)*g,g/=1e4;var T=Math.pow(10,n(h,16,48));return(_===0?1:-1)*Math.round(v*T)/T},l=function(h,_){var g=n(_,1),v=n(_,63,1),y=new Date((g===0?1:-1)*v/1e3+9466848e5);return h||y.setTime(y.getTime()+y.getTimezoneOffset()*6e4),y.usec=v%1e3,y.getMicroSeconds=function(){return this.usec},y.setMicroSeconds=function(E){this.usec=E},y.getUTCMicroSeconds=function(){return this.usec},y},p=function(h){for(var _=n(h,32),g=n(h,32,32),v=n(h,32,64),y=96,E=[],q=0;q<_;q++)E[q]=n(h,32,y),y+=32,y+=32;var T=function(F){var N=n(h,32,y);if(y+=32,N==4294967295)return null;var C;if(F==23||F==20)return C=n(h,N*8,y),y+=N*8,C;if(F==25)return C=h.toString(this.encoding,y>>3,(y+=N<<3)>>3),C;console.log("ERROR: ElementType not implemented: "+F)},M=function(F,N){var C=[],x;if(F.length>1){var P=F.shift();for(x=0;x<P;x++)C[x]=M(F,N);F.unshift(P)}else for(x=0;x<F[0];x++)C[x]=T(N);return C};return M(E,v)},d=function(h){return h.toString("utf8")},m=function(h){return h===null?null:n(h,8)>0},f=function(h){h(20,r),h(21,s),h(23,a),h(26,a),h(1700,u),h(700,o),h(701,c),h(16,m),h(1114,l.bind(null,!1)),h(1184,l.bind(null,!0)),h(1e3,p),h(1007,p),h(1016,p),h(1008,p),h(1009,p),h(25,d)};t.exports={init:f}}}),bOe=A({"../../node_modules/pg-types/lib/builtins.js"(e,t){t.exports={BOOL:16,BYTEA:17,CHAR:18,INT8:20,INT2:21,INT4:23,REGPROC:24,TEXT:25,OID:26,TID:27,XID:28,CID:29,JSON:114,XML:142,PG_NODE_TREE:194,SMGR:210,PATH:602,POLYGON:604,CIDR:650,FLOAT4:700,FLOAT8:701,ABSTIME:702,RELTIME:703,TINTERVAL:704,CIRCLE:718,MACADDR8:774,MONEY:790,MACADDR:829,INET:869,ACLITEM:1033,BPCHAR:1042,VARCHAR:1043,DATE:1082,TIME:1083,TIMESTAMP:1114,TIMESTAMPTZ:1184,INTERVAL:1186,TIMETZ:1266,BIT:1560,VARBIT:1562,NUMERIC:1700,REFCURSOR:1790,REGPROCEDURE:2202,REGOPER:2203,REGOPERATOR:2204,REGCLASS:2205,REGTYPE:2206,UUID:2950,TXID_SNAPSHOT:2970,PG_LSN:3220,PG_NDISTINCT:3361,PG_DEPENDENCIES:3402,TSVECTOR:3614,TSQUERY:3615,GTSVECTOR:3642,REGCONFIG:3734,REGDICTIONARY:3769,JSONB:3802,REGNAMESPACE:4089,REGROLE:4096}}}),E0=A({"../../node_modules/pg-types/index.js"(e){var t=SOe(),r=EOe(),n=i8(),i=bOe();e.getTypeParser=o,e.setTypeParser=c,e.arrayParser=n,e.builtins=i;var s={text:{},binary:{}};function a(u){return String(u)}function o(u,l){return l=l||"text",s[l]&&s[l][u]||a}function c(u,l,p){typeof l=="function"&&(p=l,l="text"),s[l][u]=p}t.init(function(u,l){s.text[u]=l}),r.init(function(u,l){s.binary[u]=l})}}),b0=A({"../../node_modules/pg/lib/defaults.js"(e,t){"use strict";t.exports={host:"localhost",user:process.platform==="win32"?process.env.USERNAME:process.env.USER,database:void 0,password:null,connectionString:void 0,port:5432,rows:0,binary:!1,max:10,idleTimeoutMillis:3e4,client_encoding:"",ssl:!1,application_name:void 0,fallback_application_name:void 0,options:void 0,parseInputDatesAsUTC:!1,statement_timeout:!1,lock_timeout:!1,idle_in_transaction_session_timeout:!1,query_timeout:!1,connect_timeout:0,keepalives:1,keepalives_idle:0};var r=E0(),n=r.getTypeParser(20,"text"),i=r.getTypeParser(1016,"text");t.exports.__defineSetter__("parseInt8",function(s){r.setTypeParser(20,"text",s?r.getTypeParser(23,"text"):n),r.setTypeParser(1016,"text",s?r.getTypeParser(1007,"text"):i)})}}),$T=A({"../../node_modules/pg/lib/utils.js"(e,t){"use strict";var r=require("crypto"),n=b0();function i(f){var h=f.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return'"'+h+'"'}function s(f){for(var h="{",_=0;_<f.length;_++)_>0&&(h=h+","),f[_]===null||typeof f[_]>"u"?h=h+"NULL":Array.isArray(f[_])?h=h+s(f[_]):f[_]instanceof Buffer?h+="\\\\x"+f[_].toString("hex"):h+=i(a(f[_]));return h=h+"}",h}var a=function(f,h){if(f==null)return null;if(f instanceof Buffer)return f;if(ArrayBuffer.isView(f)){var _=Buffer.from(f.buffer,f.byteOffset,f.byteLength);return _.length===f.byteLength?_:_.slice(f.byteOffset,f.byteOffset+f.byteLength)}return f instanceof Date?n.parseInputDatesAsUTC?l(f):u(f):Array.isArray(f)?s(f):typeof f=="object"?o(f,h):f.toString()};function o(f,h){if(f&&typeof f.toPostgres=="function"){if(h=h||[],h.indexOf(f)!==-1)throw new Error('circular reference detected while preparing "'+f+'" for query');return h.push(f),a(f.toPostgres(a),h)}return JSON.stringify(f)}function c(f,h){for(f=""+f;f.length<h;)f="0"+f;return f}function u(f){var h=-f.getTimezoneOffset(),_=f.getFullYear(),g=_<1;g&&(_=Math.abs(_)+1);var v=c(_,4)+"-"+c(f.getMonth()+1,2)+"-"+c(f.getDate(),2)+"T"+c(f.getHours(),2)+":"+c(f.getMinutes(),2)+":"+c(f.getSeconds(),2)+"."+c(f.getMilliseconds(),3);return h<0?(v+="-",h*=-1):v+="+",v+=c(Math.floor(h/60),2)+":"+c(h%60,2),g&&(v+=" BC"),v}function l(f){var h=f.getUTCFullYear(),_=h<1;_&&(h=Math.abs(h)+1);var g=c(h,4)+"-"+c(f.getUTCMonth()+1,2)+"-"+c(f.getUTCDate(),2)+"T"+c(f.getUTCHours(),2)+":"+c(f.getUTCMinutes(),2)+":"+c(f.getUTCSeconds(),2)+"."+c(f.getUTCMilliseconds(),3);return g+="+00:00",_&&(g+=" BC"),g}function p(f,h,_){return f=typeof f=="string"?{text:f}:f,h&&(typeof h=="function"?f.callback=h:f.values=h),_&&(f.callback=_),f}var d=function(f){return r.createHash("md5").update(f,"utf-8").digest("hex")},m=function(f,h,_){var g=d(h+f),v=d(Buffer.concat([Buffer.from(g),_]));return"md5"+v};t.exports={prepareValue:function(h){return a(h)},normalizeQueryConfig:p,postgresMd5PasswordHash:m,md5:d}}}),ROe=A({"../../node_modules/pg/lib/sasl.js"(e,t){"use strict";var r=require("crypto");function n(f){if(f.indexOf("SCRAM-SHA-256")===-1)throw new Error("SASL: Only mechanism SCRAM-SHA-256 is currently supported");let h=r.randomBytes(18).toString("base64");return{mechanism:"SCRAM-SHA-256",clientNonce:h,response:"n,,n=*,r="+h,message:"SASLInitialResponse"}}function i(f,h,_){if(f.message!=="SASLInitialResponse")throw new Error("SASL: Last message was not SASLInitialResponse");if(typeof h!="string")throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");if(h==="")throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");if(typeof _!="string")throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");let g=u(_);if(g.nonce.startsWith(f.clientNonce)){if(g.nonce.length===f.clientNonce.length)throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");var v=Buffer.from(g.salt,"base64"),y=r.pbkdf2Sync(h,v,g.iteration,32,"sha256"),E=m(y,"Client Key"),q=d(E),T="n=*,r="+f.clientNonce,M="r="+g.nonce+",s="+g.salt+",i="+g.iteration,F="c=biws,r="+g.nonce,N=T+","+M+","+F,C=m(q,N),x=p(E,C),P=x.toString("base64"),G=m(y,"Server Key"),D=m(G,N);f.message="SASLResponse",f.serverSignature=D.toString("base64"),f.response=F+",p="+P}function s(f,h){if(f.message!=="SASLResponse")throw new Error("SASL: Last message was not SASLResponse");if(typeof h!="string")throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");let{serverSignature:_}=l(h);if(_!==f.serverSignature)throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match")}function a(f){if(typeof f!="string")throw new TypeError("SASL: text must be a string");return f.split("").map((h,_)=>f.charCodeAt(_)).every(h=>h>=33&&h<=43||h>=45&&h<=126)}function o(f){return/^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(f)}function c(f){if(typeof f!="string")throw new TypeError("SASL: attribute pairs text must be a string");return new Map(f.split(",").map(h=>{if(!/^.=/.test(h))throw new Error("SASL: Invalid attribute pair entry");let _=h[0],g=h.substring(2);return[_,g]}))}function u(f){let h=c(f),_=h.get("r");if(_){if(!a(_))throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");let g=h.get("s");if(g){if(!o(g))throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");let v=h.get("i");if(v){if(!/^[1-9][0-9]*$/.test(v))throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count")}else throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");let y=parseInt(v,10);return{nonce:_,salt:g,iteration:y}}function l(f){let _=c(f).get("v");if(_){if(!o(_))throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64")}else throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");return{serverSignature:_}}function p(f,h){if(!Buffer.isBuffer(f))throw new TypeError("first argument must be a Buffer");if(!Buffer.isBuffer(h))throw new TypeError("second argument must be a Buffer");if(f.length!==h.length)throw new Error("Buffer lengths must match");if(f.length===0)throw new Error("Buffers cannot be empty");return Buffer.from(f.map((_,g)=>f[g]^h[g]))}function d(f){return r.createHash("sha256").update(f).digest()}function m(f,h){return r.createHmac("sha256",f).update(h).digest()}t.exports={startSession:n,continueSession:i,finalizeSession:s}}}),xOe=A({"../../node_modules/pgpass/node_modules/split2/index.js"(e,t){"use strict";var{Transform:r}=require("stream"),{StringDecoder:n}=require("string_decoder"),i=Symbol("last"),s=Symbol("decoder");function a(p,d,m){let f;if(this.overflow){if(f=this[s].write(p).split(this.matcher),f.length===1)return m();f.shift(),this.overflow=!1}else this[i]+=this[s].write(p),f=this[i].split(this.matcher);this[i]=f.pop();for(let h=0;h<f.length;h++)try{c(this,this.mapper(f[h]))}catch(_){return m(_)}if(this.overflow=this[i].length>this.maxLength,this.overflow&&!this.skipOverflow){m(new Error("maximum buffer reached"));return}m()}function o(p){if(this[i]+=this[s].end(),this[i])try{c(this,this.mapper(this[i]))}catch(d){return p(d)}p()}function c(p,d){d!==void 0&&p.push(d)}function u(p){return p}function l(p,d,m){switch(p=p||/\r?\n/,d=d||u,m=m||{},arguments.length){case 1:typeof p=="function"?(d=p,p=/\r?\n/):typeof p=="object"&&!(p instanceof RegExp)&&!p[Symbol.split]&&(m=p,p=/\r?\n/);break;case 2:typeof p=="function"?(m=d,d=p,p=/\r?\n/):typeof d=="object"&&(m=d,d=u)}m=Object.assign({},m),m.autoDestroy=!0,m.transform=a,m.flush=o,m.readableObjectMode=!0;let f=new r(m);return f[i]="",f[s]=new n("utf8"),f.matcher=p,f.mapper=d,f.maxLength=m.maxLength,f.skipOverflow=m.skipOverflow||!1,f.overflow=!1,f._destroy=function(h,_){this._writableState.errorEmitted=!1,_(h)},f}t.exports=l}}),AOe=A({"../../node_modules/pgpass/lib/helper.js"(e,t){"use strict";var r=require("path"),n=require("stream").Stream,i=xOe(),s=require("util"),a=5432,o=process.platform==="win32",c=process.stderr,u=56,l=7,p=61440,d=32768;function m(q){return(q&p)==d}var f=["host","port","database","user","password"],h=f.length,_=f[h-1];function g(){var q=c instanceof n&&c.writable===!0;if(q){var T=Array.prototype.slice.call(arguments).concat(`
136
136
  `);c.write(s.format.apply(s,T))}}Object.defineProperty(t.exports,"isWin",{get:function(){return o},set:function(q){o=q}}),t.exports.warnTo=function(q){var T=c;return c=q,T},t.exports.getFileName=function(q){var T=q||process.env,M=T.PGPASSFILE||(o?r.join(T.APPDATA||"./","postgresql","pgpass.conf"):r.join(T.HOME||"./",".pgpass"));return M},t.exports.usePgPass=function(q,T){return Object.prototype.hasOwnProperty.call(process.env,"PGPASSWORD")?!1:o?!0:(T=T||"<unkn>",m(q.mode)?q.mode&(u|l)?(g('WARNING: password file "%s" has group or world access; permissions should be u=rw (0600) or less',T),!1):!0:(g('WARNING: password file "%s" is not a plain file',T),!1))};var v=t.exports.match=function(q,T){return f.slice(0,-1).reduce(function(M,F,N){return N==1&&Number(q[F]||a)===Number(T[F])?M&&!0:M&&(T[F]==="*"||T[F]===q[F])},!0)};t.exports.getPassword=function(q,T,M){var F,N=T.pipe(i());function C(G){var D=y(G);D&&E(D)&&v(q,D)&&(F=D[_],N.end())}var x=function(){T.destroy(),M(F)},P=function(G){T.destroy(),g("WARNING: error on reading file: %s",G),M(void 0)};T.on("error",P),N.on("data",C).on("end",x).on("error",P)};var y=t.exports.parseLine=function(q){if(q.length<11||q.match(/^\s+#/))return null;for(var T="",M="",F=0,N=0,C=0,x={},P=!1,G=function(H,B,ee){var O=q.substring(B,ee);Object.hasOwnProperty.call(process.env,"PGPASS_NO_DEESCAPE")||(O=O.replace(/\\([:\\])/g,"$1")),x[f[H]]=O},D=0;D<q.length-1;D+=1){if(T=q.charAt(D+1),M=q.charAt(D),P=F==h-1,P){G(F,N);break}D>=0&&T==":"&&M!=="\\"&&(G(F,N,D+1),N=D+2,F+=1)}return x=Object.keys(x).length===h?x:null,x},E=t.exports.isValidEntry=function(q){for(var T={0:function(x){return x.length>0},1:function(x){return x==="*"?!0:(x=Number(x),isFinite(x)&&x>0&&x<9007199254740992&&Math.floor(x)===x)},2:function(x){return x.length>0},3:function(x){return x.length>0},4:function(x){return x.length>0}},M=0;M<f.length;M+=1){var F=T[M],N=q[f[M]]||"",C=F(N);if(!C)return!1}return!0}}}),POe=A({"../../node_modules/pgpass/lib/index.js"(e,t){"use strict";var r=require("path"),n=require("fs"),i=AOe();t.exports=function(s,a){var o=i.getFileName();n.stat(o,function(c,u){if(c||!i.usePgPass(u,o))return a(void 0);var l=n.createReadStream(o);i.getPassword(s,l,a)})},t.exports.warnTo=i.warnTo}}),s8=A({"../../node_modules/pg/lib/type-overrides.js"(e,t){"use strict";var r=E0();function n(i){this._types=i||r,this.text={},this.binary={}}n.prototype.getOverrides=function(i){switch(i){case"text":return this.text;case"binary":return this.binary;default:return{}}},n.prototype.setTypeParser=function(i,s,a){typeof s=="function"&&(a=s,s="text"),this.getOverrides(s)[i]=a},n.prototype.getTypeParser=function(i,s){return s=s||"text",this.getOverrides(s)[i]||this._types.getTypeParser(i,s)},t.exports=n}}),IOe=A({"../../node_modules/pg-connection-string/index.js"(e,t){"use strict";var r=require("url"),n=require("fs");function i(s){if(s.charAt(0)==="/"){var o=s.split(" ");return{host:o[0],database:o[1]}}var a=r.parse(/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(s)?encodeURI(s).replace(/\%25(\d\d)/g,"%$1"):s,!0),o=a.query;for(var c in o)Array.isArray(o[c])&&(o[c]=o[c][o[c].length-1]);var u=(a.auth||":").split(":");if(o.user=u[0],o.password=u.splice(1).join(":"),o.port=a.port,a.protocol=="socket:")return o.host=decodeURI(a.pathname),o.database=a.query.db,o.client_encoding=a.query.encoding,o;o.host||(o.host=a.hostname);var l=a.pathname;if(!o.host&&l&&/^%2f/i.test(l)){var p=l.split("/");o.host=decodeURIComponent(p[0]),l=p.splice(1).join("/")}switch(l&&l.charAt(0)==="/"&&(l=l.slice(1)||null),o.database=l&&decodeURI(l),(o.ssl==="true"||o.ssl==="1")&&(o.ssl=!0),o.ssl==="0"&&(o.ssl=!1),(o.sslcert||o.sslkey||o.sslrootcert||o.sslmode)&&(o.ssl={}),o.sslcert&&(o.ssl.cert=n.readFileSync(o.sslcert).toString()),o.sslkey&&(o.ssl.key=n.readFileSync(o.sslkey).toString()),o.sslrootcert&&(o.ssl.ca=n.readFileSync(o.sslrootcert).toString()),o.sslmode){case"disable":{o.ssl=!1;break}case"prefer":case"require":case"verify-ca":case"verify-full":break;case"no-verify":{o.ssl.rejectUnauthorized=!1;break}}return o}t.exports=i,i.parse=i}}),o8=A({"../../node_modules/pg/lib/connection-parameters.js"(e,t){"use strict";var r=require("dns"),n=b0(),i=IOe().parse,s=function(l,p,d){return d===void 0?d=process.env["PG"+l.toUpperCase()]:d===!1||(d=process.env[d]),p[l]||d||n[l]},a=function(){switch(process.env.PGSSLMODE){case"disable":return!1;case"prefer":case"require":case"verify-ca":case"verify-full":return!0;case"no-verify":return{rejectUnauthorized:!1}}return n.ssl},o=function(l){return"'"+(""+l).replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"},c=function(l,p,d){var m=p[d];m!=null&&l.push(d+"="+o(m))},u=class{constructor(l){l=typeof l=="string"?i(l):l||{},l.connectionString&&(l=Object.assign({},l,i(l.connectionString))),this.user=s("user",l),this.database=s("database",l),this.database===void 0&&(this.database=this.user),this.port=parseInt(s("port",l),10),this.host=s("host",l),Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:s("password",l)}),this.binary=s("binary",l),this.options=s("options",l),this.ssl=typeof l.ssl>"u"?a():l.ssl,typeof this.ssl=="string"&&this.ssl==="true"&&(this.ssl=!0),this.ssl==="no-verify"&&(this.ssl={rejectUnauthorized:!1}),this.ssl&&this.ssl.key&&Object.defineProperty(this.ssl,"key",{enumerable:!1}),this.client_encoding=s("client_encoding",l),this.replication=s("replication",l),this.isDomainSocket=!(this.host||"").indexOf("/"),this.application_name=s("application_name",l,"PGAPPNAME"),this.fallback_application_name=s("fallback_application_name",l,!1),this.statement_timeout=s("statement_timeout",l,!1),this.lock_timeout=s("lock_timeout",l,!1),this.idle_in_transaction_session_timeout=s("idle_in_transaction_session_timeout",l,!1),this.query_timeout=s("query_timeout",l,!1),l.connectionTimeoutMillis===void 0?this.connect_timeout=process.env.PGCONNECT_TIMEOUT||0:this.connect_timeout=Math.floor(l.connectionTimeoutMillis/1e3),l.keepAlive===!1?this.keepalives=0:l.keepAlive===!0&&(this.keepalives=1),typeof l.keepAliveInitialDelayMillis=="number"&&(this.keepalives_idle=Math.floor(l.keepAliveInitialDelayMillis/1e3))}getLibpqConnectionString(l){var p=[];c(p,this,"user"),c(p,this,"password"),c(p,this,"port"),c(p,this,"application_name"),c(p,this,"fallback_application_name"),c(p,this,"connect_timeout"),c(p,this,"options");var d=typeof this.ssl=="object"?this.ssl:this.ssl?{sslmode:this.ssl}:{};if(c(p,d,"sslmode"),c(p,d,"sslca"),c(p,d,"sslkey"),c(p,d,"sslcert"),c(p,d,"sslrootcert"),this.database&&p.push("dbname="+o(this.database)),this.replication&&p.push("replication="+o(this.replication)),this.host&&p.push("host="+o(this.host)),this.isDomainSocket)return l(null,p.join(" "));this.client_encoding&&p.push("client_encoding="+o(this.client_encoding)),r.lookup(this.host,function(m,f){return m?l(m,null):(p.push("hostaddr="+o(f)),l(null,p.join(" ")))})}};t.exports=u}}),TOe=A({"../../node_modules/pg/lib/result.js"(e,t){"use strict";var r=E0(),n=/^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/,i=class{constructor(s,a){this.command=null,this.rowCount=null,this.oid=null,this.rows=[],this.fields=[],this._parsers=void 0,this._types=a,this.RowCtor=null,this.rowAsArray=s==="array",this.rowAsArray&&(this.parseRow=this._parseRowAsArray)}addCommandComplete(s){var a;s.text?a=n.exec(s.text):a=n.exec(s.command),a&&(this.command=a[1],a[3]?(this.oid=parseInt(a[2],10),this.rowCount=parseInt(a[3],10)):a[2]&&(this.rowCount=parseInt(a[2],10)))}_parseRowAsArray(s){for(var a=new Array(s.length),o=0,c=s.length;o<c;o++){var u=s[o];u!==null?a[o]=this._parsers[o](u):a[o]=null}return a}parseRow(s){for(var a={},o=0,c=s.length;o<c;o++){var u=s[o],l=this.fields[o].name;u!==null?a[l]=this._parsers[o](u):a[l]=null}return a}addRow(s){this.rows.push(s)}addFields(s){this.fields=s,this.fields.length&&(this._parsers=new Array(s.length));for(var a=0;a<s.length;a++){var o=s[a];this._types?this._parsers[a]=this._types.getTypeParser(o.dataTypeID,o.format||"text"):this._parsers[a]=r.getTypeParser(o.dataTypeID,o.format||"text")}}};t.exports=i}}),COe=A({"../../node_modules/pg/lib/query.js"(e,t){"use strict";var{EventEmitter:r}=require("events"),n=TOe(),i=$T(),s=class extends r{constructor(a,o,c){super(),a=i.normalizeQueryConfig(a,o,c),this.text=a.text,this.values=a.values,this.rows=a.rows,this.types=a.types,this.name=a.name,this.binary=a.binary,this.portal=a.portal||"",this.callback=a.callback,this._rowMode=a.rowMode,process.domain&&a.callback&&(this.callback=process.domain.bind(a.callback)),this._result=new n(this._rowMode,this.types),this._results=this._result,this.isPreparedStatement=!1,this._canceledDueToError=!1,this._promise=null}requiresPreparation(){return this.name||this.rows?!0:!this.text||!this.values?!1:this.values.length>0}_checkForMultirow(){this._result.command&&(Array.isArray(this._results)||(this._results=[this._result]),this._result=new n(this._rowMode,this.types),this._results.push(this._result))}handleRowDescription(a){this._checkForMultirow(),this._result.addFields(a.fields),this._accumulateRows=this.callback||!this.listeners("row").length}handleDataRow(a){let o;if(!this._canceledDueToError){try{o=this._result.parseRow(a.fields)}catch(c){this._canceledDueToError=c;return}this.emit("row",o,this._result),this._accumulateRows&&this._result.addRow(o)}}handleCommandComplete(a,o){this._checkForMultirow(),this._result.addCommandComplete(a),this.rows&&o.sync()}handleEmptyQuery(a){this.rows&&a.sync()}handleError(a,o){if(this._canceledDueToError&&(a=this._canceledDueToError,this._canceledDueToError=!1),this.callback)return this.callback(a);this.emit("error",a)}handleReadyForQuery(a){if(this._canceledDueToError)return this.handleError(this._canceledDueToError,a);if(this.callback)try{this.callback(null,this._results)}catch(o){process.nextTick(()=>{throw o})}this.emit("end",this._results)}submit(a){if(typeof this.text!="string"&&typeof this.name!="string")return new Error("A query must have either text or a name. Supplying neither is unsupported.");let o=a.parsedStatements[this.name];return this.text&&o&&this.text!==o?new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`):this.values&&!Array.isArray(this.values)?new Error("Query values must be an array"):(this.requiresPreparation()?this.prepare(a):a.query(this.text),null)}hasBeenParsed(a){return this.name&&a.parsedStatements[this.name]}handlePortalSuspended(a){this._getRows(a,this.rows)}_getRows(a,o){a.execute({portal:this.portal,rows:o}),o?a.flush():a.sync()}prepare(a){this.isPreparedStatement=!0,this.hasBeenParsed(a)||a.parse({text:this.text,name:this.name,types:this.types});try{a.bind({portal:this.portal,statement:this.name,values:this.values,binary:this.binary,valueMapper:i.prepareValue})}catch(o){this.handleError(o,a);return}a.describe({type:"P",name:this.portal||""}),this._getRows(a,this.rows)}handleCopyInResponse(a){a.sendCopyFail("No source stream defined")}handleCopyData(a,o){}};t.exports=s}}),a8=A({"../../node_modules/pg-protocol/dist/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoticeMessage=e.DataRowMessage=e.CommandCompleteMessage=e.ReadyForQueryMessage=e.NotificationResponseMessage=e.BackendKeyDataMessage=e.AuthenticationMD5Password=e.ParameterStatusMessage=e.ParameterDescriptionMessage=e.RowDescriptionMessage=e.Field=e.CopyResponse=e.CopyDataMessage=e.DatabaseError=e.copyDone=e.emptyQuery=e.replicationStart=e.portalSuspended=e.noData=e.closeComplete=e.bindComplete=e.parseComplete=void 0,e.parseComplete={name:"parseComplete",length:5},e.bindComplete={name:"bindComplete",length:5},e.closeComplete={name:"closeComplete",length:5},e.noData={name:"noData",length:5},e.portalSuspended={name:"portalSuspended",length:5},e.replicationStart={name:"replicationStart",length:4},e.emptyQuery={name:"emptyQuery",length:4},e.copyDone={name:"copyDone",length:4};var t=class extends Error{constructor(h,_,g){super(h),this.length=_,this.name=g}};e.DatabaseError=t;var r=class{constructor(h,_){this.length=h,this.chunk=_,this.name="copyData"}};e.CopyDataMessage=r;var n=class{constructor(h,_,g,v){this.length=h,this.name=_,this.binary=g,this.columnTypes=new Array(v)}};e.CopyResponse=n;var i=class{constructor(h,_,g,v,y,E,q){this.name=h,this.tableID=_,this.columnID=g,this.dataTypeID=v,this.dataTypeSize=y,this.dataTypeModifier=E,this.format=q}};e.Field=i;var s=class{constructor(h,_){this.length=h,this.fieldCount=_,this.name="rowDescription",this.fields=new Array(this.fieldCount)}};e.RowDescriptionMessage=s;var a=class{constructor(h,_){this.length=h,this.parameterCount=_,this.name="parameterDescription",this.dataTypeIDs=new Array(this.parameterCount)}};e.ParameterDescriptionMessage=a;var o=class{constructor(h,_,g){this.length=h,this.parameterName=_,this.parameterValue=g,this.name="parameterStatus"}};e.ParameterStatusMessage=o;var c=class{constructor(h,_){this.length=h,this.salt=_,this.name="authenticationMD5Password"}};e.AuthenticationMD5Password=c;var u=class{constructor(h,_,g){this.length=h,this.processID=_,this.secretKey=g,this.name="backendKeyData"}};e.BackendKeyDataMessage=u;var l=class{constructor(h,_,g,v){this.length=h,this.processId=_,this.channel=g,this.payload=v,this.name="notification"}};e.NotificationResponseMessage=l;var p=class{constructor(h,_){this.length=h,this.status=_,this.name="readyForQuery"}};e.ReadyForQueryMessage=p;var d=class{constructor(h,_){this.length=h,this.text=_,this.name="commandComplete"}};e.CommandCompleteMessage=d;var m=class{constructor(h,_){this.length=h,this.fields=_,this.name="dataRow",this.fieldCount=_.length}};e.DataRowMessage=m;var f=class{constructor(h,_){this.length=h,this.message=_,this.name="notice"}};e.NoticeMessage=f}}),OOe=A({"../../node_modules/pg-protocol/dist/buffer-writer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Writer=void 0;var t=class{constructor(r=256){this.size=r,this.offset=5,this.headerPosition=0,this.buffer=Buffer.allocUnsafe(r)}ensure(r){var n=this.buffer.length-this.offset;if(n<r){var i=this.buffer,s=i.length+(i.length>>1)+r;this.buffer=Buffer.allocUnsafe(s),i.copy(this.buffer)}}addInt32(r){return this.ensure(4),this.buffer[this.offset++]=r>>>24&255,this.buffer[this.offset++]=r>>>16&255,this.buffer[this.offset++]=r>>>8&255,this.buffer[this.offset++]=r>>>0&255,this}addInt16(r){return this.ensure(2),this.buffer[this.offset++]=r>>>8&255,this.buffer[this.offset++]=r>>>0&255,this}addCString(r){if(!r)this.ensure(1);else{var n=Buffer.byteLength(r);this.ensure(n+1),this.buffer.write(r,this.offset,"utf-8"),this.offset+=n}return this.buffer[this.offset++]=0,this}addString(r=""){var n=Buffer.byteLength(r);return this.ensure(n),this.buffer.write(r,this.offset),this.offset+=n,this}add(r){return this.ensure(r.length),r.copy(this.buffer,this.offset),this.offset+=r.length,this}join(r){if(r){this.buffer[this.headerPosition]=r;let n=this.offset-(this.headerPosition+1);this.buffer.writeInt32BE(n,this.headerPosition+1)}return this.buffer.slice(r?0:5,this.offset)}flush(r){var n=this.join(r);return this.offset=5,this.headerPosition=0,this.buffer=Buffer.allocUnsafe(this.size),n}};e.Writer=t}}),NOe=A({"../../node_modules/pg-protocol/dist/serializer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=void 0;var t=OOe(),r=new t.Writer,n=D=>{r.addInt16(3).addInt16(0);for(let ee of Object.keys(D))r.addCString(ee).addCString(D[ee]);r.addCString("client_encoding").addCString("UTF8");var H=r.addCString("").flush(),B=H.length+4;return new t.Writer().addInt32(B).add(H).flush()},i=()=>{let D=Buffer.allocUnsafe(8);return D.writeInt32BE(8,0),D.writeInt32BE(80877103,4),D},s=D=>r.addCString(D).flush(112),a=function(D,H){return r.addCString(D).addInt32(Buffer.byteLength(H)).addString(H),r.flush(112)},o=function(D){return r.addString(D).flush(112)},c=D=>r.addCString(D).flush(81),u=[],l=D=>{let H=D.name||"";H.length>63&&(console.error("Warning! Postgres only supports 63 characters for query names."),console.error("You supplied %s (%s)",H,H.length),console.error("This can cause conflicts and silent errors executing queries"));let B=D.types||u;for(var ee=B.length,O=r.addCString(H).addCString(D.text).addInt16(ee),$=0;$<ee;$++)O.addInt32(B[$]);return r.flush(80)},p=new t.Writer,d=function(D,H){for(let B=0;B<D.length;B++){let ee=H?H(D[B],B):D[B];ee==null?(r.addInt16(0),p.addInt32(-1)):ee instanceof Buffer?(r.addInt16(1),p.addInt32(ee.length),p.add(ee)):(r.addInt16(0),p.addInt32(Buffer.byteLength(ee)),p.addString(ee))}},m=(D={})=>{let H=D.portal||"",B=D.statement||"",ee=D.binary||!1,O=D.values||u,$=O.length;return r.addCString(H).addCString(B),r.addInt16($),d(O,D.valueMapper),r.addInt16($),r.add(p.flush()),r.addInt16(ee?1:0),r.flush(66)},f=Buffer.from([69,0,0,0,9,0,0,0,0,0]),h=D=>{if(!D||!D.portal&&!D.rows)return f;let H=D.portal||"",B=D.rows||0,ee=Buffer.byteLength(H),O=4+ee+1+4,$=Buffer.allocUnsafe(1+O);return $[0]=69,$.writeInt32BE(O,1),$.write(H,5,"utf-8"),$[ee+5]=0,$.writeUInt32BE(B,$.length-4),$},_=(D,H)=>{let B=Buffer.allocUnsafe(16);return B.writeInt32BE(16,0),B.writeInt16BE(1234,4),B.writeInt16BE(5678,6),B.writeInt32BE(D,8),B.writeInt32BE(H,12),B},g=(D,H)=>{let ee=4+Buffer.byteLength(H)+1,O=Buffer.allocUnsafe(1+ee);return O[0]=D,O.writeInt32BE(ee,1),O.write(H,5,"utf-8"),O[ee]=0,O},v=r.addCString("P").flush(68),y=r.addCString("S").flush(68),E=D=>D.name?g(68,`${D.type}${D.name||""}`):D.type==="P"?v:y,q=D=>{let H=`${D.type}${D.name||""}`;return g(67,H)},T=D=>r.add(D).flush(100),M=D=>g(102,D),F=D=>Buffer.from([D,0,0,0,4]),N=F(72),C=F(83),x=F(88),P=F(99),G={startup:n,password:s,requestSsl:i,sendSASLInitialResponseMessage:a,sendSCRAMClientFinalMessage:o,query:c,parse:l,bind:m,execute:h,describe:E,close:q,flush:()=>N,sync:()=>C,end:()=>x,copyData:T,copyDone:()=>P,copyFail:M,cancel:_};e.serialize=G}}),jOe=A({"../../node_modules/pg-protocol/dist/buffer-reader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferReader=void 0;var t=Buffer.allocUnsafe(0),r=class{constructor(n=0){this.offset=n,this.buffer=t,this.encoding="utf-8"}setBuffer(n,i){this.offset=n,this.buffer=i}int16(){let n=this.buffer.readInt16BE(this.offset);return this.offset+=2,n}byte(){let n=this.buffer[this.offset];return this.offset++,n}int32(){let n=this.buffer.readInt32BE(this.offset);return this.offset+=4,n}string(n){let i=this.buffer.toString(this.encoding,this.offset,this.offset+n);return this.offset+=n,i}cstring(){let n=this.offset,i=n;for(;this.buffer[i++]!==0;);return this.offset=i,this.buffer.toString(this.encoding,n,i-1)}bytes(n){let i=this.buffer.slice(this.offset,this.offset+n);return this.offset+=n,i}};e.BufferReader=r}}),qOe=A({"../../node_modules/pg-protocol/dist/parser.js"(e){"use strict";var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0;var r=a8(),n=jOe(),i=t(require("assert")),s=1,a=4,o=s+a,c=Buffer.allocUnsafe(0),u=class{constructor(l){if(this.buffer=c,this.bufferLength=0,this.bufferOffset=0,this.reader=new n.BufferReader,(l==null?void 0:l.mode)==="binary")throw new Error("Binary mode not supported yet");this.mode=(l==null?void 0:l.mode)||"text"}parse(l,p){this.mergeBuffer(l);let d=this.bufferOffset+this.bufferLength,m=this.bufferOffset;for(;m+o<=d;){let f=this.buffer[m],h=this.buffer.readUInt32BE(m+s),_=s+h;if(_+m<=d){let g=this.handlePacket(m+o,f,h,this.buffer);p(g),m+=_}else break}m===d?(this.buffer=c,this.bufferLength=0,this.bufferOffset=0):(this.bufferLength=d-m,this.bufferOffset=m)}mergeBuffer(l){if(this.bufferLength>0){let p=this.bufferLength+l.byteLength;if(p+this.bufferOffset>this.buffer.byteLength){let m;if(p<=this.buffer.byteLength&&this.bufferOffset>=this.bufferLength)m=this.buffer;else{let f=this.buffer.byteLength*2;for(;p>=f;)f*=2;m=Buffer.allocUnsafe(f)}this.buffer.copy(m,0,this.bufferOffset,this.bufferOffset+this.bufferLength),this.buffer=m,this.bufferOffset=0}l.copy(this.buffer,this.bufferOffset+this.bufferLength),this.bufferLength=p}else this.buffer=l,this.bufferOffset=0,this.bufferLength=l.byteLength}handlePacket(l,p,d,m){switch(p){case 50:return r.bindComplete;case 49:return r.parseComplete;case 51:return r.closeComplete;case 110:return r.noData;case 115:return r.portalSuspended;case 99:return r.copyDone;case 87:return r.replicationStart;case 73:return r.emptyQuery;case 68:return this.parseDataRowMessage(l,d,m);case 67:return this.parseCommandCompleteMessage(l,d,m);case 90:return this.parseReadyForQueryMessage(l,d,m);case 65:return this.parseNotificationMessage(l,d,m);case 82:return this.parseAuthenticationResponse(l,d,m);case 83:return this.parseParameterStatusMessage(l,d,m);case 75:return this.parseBackendKeyData(l,d,m);case 69:return this.parseErrorMessage(l,d,m,"error");case 78:return this.parseErrorMessage(l,d,m,"notice");case 84:return this.parseRowDescriptionMessage(l,d,m);case 116:return this.parseParameterDescriptionMessage(l,d,m);case 71:return this.parseCopyInMessage(l,d,m);case 72:return this.parseCopyOutMessage(l,d,m);case 100:return this.parseCopyData(l,d,m);default:i.default.fail(`unknown message code: ${p.toString(16)}`)}}parseReadyForQueryMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.string(1);return new r.ReadyForQueryMessage(p,m)}parseCommandCompleteMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.cstring();return new r.CommandCompleteMessage(p,m)}parseCopyData(l,p,d){let m=d.slice(l,l+(p-4));return new r.CopyDataMessage(p,m)}parseCopyInMessage(l,p,d){return this.parseCopyMessage(l,p,d,"copyInResponse")}parseCopyOutMessage(l,p,d){return this.parseCopyMessage(l,p,d,"copyOutResponse")}parseCopyMessage(l,p,d,m){this.reader.setBuffer(l,d);let f=this.reader.byte()!==0,h=this.reader.int16(),_=new r.CopyResponse(p,m,f,h);for(let g=0;g<h;g++)_.columnTypes[g]=this.reader.int16();return _}parseNotificationMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.int32(),f=this.reader.cstring(),h=this.reader.cstring();return new r.NotificationResponseMessage(p,m,f,h)}parseRowDescriptionMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.int16(),f=new r.RowDescriptionMessage(p,m);for(let h=0;h<m;h++)f.fields[h]=this.parseField();return f}parseField(){let l=this.reader.cstring(),p=this.reader.int32(),d=this.reader.int16(),m=this.reader.int32(),f=this.reader.int16(),h=this.reader.int32(),_=this.reader.int16()===0?"text":"binary";return new r.Field(l,p,d,m,f,h,_)}parseParameterDescriptionMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.int16(),f=new r.ParameterDescriptionMessage(p,m);for(let h=0;h<m;h++)f.dataTypeIDs[h]=this.reader.int32();return f}parseDataRowMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.int16(),f=new Array(m);for(let h=0;h<m;h++){let _=this.reader.int32();f[h]=_===-1?null:this.reader.string(_)}return new r.DataRowMessage(p,f)}parseParameterStatusMessage(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.cstring(),f=this.reader.cstring();return new r.ParameterStatusMessage(p,m,f)}parseBackendKeyData(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.int32(),f=this.reader.int32();return new r.BackendKeyDataMessage(p,m,f)}parseAuthenticationResponse(l,p,d){this.reader.setBuffer(l,d);let m=this.reader.int32(),f={name:"authenticationOk",length:p};switch(m){case 0:break;case 3:f.length===8&&(f.name="authenticationCleartextPassword");break;case 5:if(f.length===12){f.name="authenticationMD5Password";let _=this.reader.bytes(4);return new r.AuthenticationMD5Password(p,_)}break;case 10:f.name="authenticationSASL",f.mechanisms=[];let h;do h=this.reader.cstring(),h&&f.mechanisms.push(h);while(h);break;case 11:f.name="authenticationSASLContinue",f.data=this.reader.string(p-8);break;case 12:f.name="authenticationSASLFinal",f.data=this.reader.string(p-8);break;default:throw new Error("Unknown authenticationOk message type "+m)}return f}parseErrorMessage(l,p,d,m){this.reader.setBuffer(l,d);let f={},h=this.reader.string(1);for(;h!=="\0";)f[h]=this.reader.cstring(),h=this.reader.string(1);let _=f.M,g=m==="notice"?new r.NoticeMessage(p,_):new r.DatabaseError(_,p,m);return g.severity=f.S,g.code=f.C,g.detail=f.D,g.hint=f.H,g.position=f.P,g.internalPosition=f.p,g.internalQuery=f.q,g.where=f.W,g.schema=f.s,g.table=f.t,g.column=f.c,g.dataType=f.d,g.constraint=f.n,g.file=f.F,g.line=f.L,g.routine=f.R,g}};e.Parser=u}}),c8=A({"../../node_modules/pg-protocol/dist/index.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DatabaseError=e.serialize=e.parse=void 0;var t=a8();Object.defineProperty(e,"DatabaseError",{enumerable:!0,get:function(){return t.DatabaseError}});var r=NOe();Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return r.serialize}});var n=qOe();function i(s,a){let o=new n.Parser;return s.on("data",c=>o.parse(c,a)),new Promise(c=>s.on("end",()=>c()))}e.parse=i}}),l8=A({"../../node_modules/pg/lib/connection.js"(e,t){"use strict";var r=require("net"),n=require("events").EventEmitter,{parse:i,serialize:s}=c8(),a=s.flush(),o=s.sync(),c=s.end(),u=class extends n{constructor(l){super(),l=l||{},this.stream=l.stream||new r.Socket,typeof this.stream=="function"&&(this.stream=this.stream(l)),this._keepAlive=l.keepAlive,this._keepAliveInitialDelayMillis=l.keepAliveInitialDelayMillis,this.lastBuffer=!1,this.parsedStatements={},this.ssl=l.ssl||!1,this._ending=!1,this._emitMessage=!1;var p=this;this.on("newListener",function(d){d==="message"&&(p._emitMessage=!0)})}connect(l,p){var d=this;this._connecting=!0,this.stream.setNoDelay(!0),this.stream.connect(l,p),this.stream.once("connect",function(){d._keepAlive&&d.stream.setKeepAlive(!0,d._keepAliveInitialDelayMillis),d.emit("connect")});let m=function(f){d._ending&&(f.code==="ECONNRESET"||f.code==="EPIPE")||d.emit("error",f)};if(this.stream.on("error",m),this.stream.on("close",function(){d.emit("end")}),!this.ssl)return this.attachListeners(this.stream);this.stream.once("data",function(f){var h=f.toString("utf8");switch(h){case"S":break;case"N":return d.stream.end(),d.emit("error",new Error("The server does not support SSL connections"));default:return d.stream.end(),d.emit("error",new Error("There was an error establishing an SSL connection"))}var _=require("tls");let g={socket:d.stream};d.ssl!==!0&&(Object.assign(g,d.ssl),"key"in d.ssl&&(g.key=d.ssl.key)),r.isIP(p)===0&&(g.servername=p);try{d.stream=_.connect(g)}catch(v){return d.emit("error",v)}d.attachListeners(d.stream),d.stream.on("error",m),d.emit("sslconnect")})}attachListeners(l){l.on("end",()=>{this.emit("end")}),i(l,p=>{var d=p.name==="error"?"errorMessage":p.name;this._emitMessage&&this.emit("message",p),this.emit(d,p)})}requestSsl(){this.stream.write(s.requestSsl())}startup(l){this.stream.write(s.startup(l))}cancel(l,p){this._send(s.cancel(l,p))}password(l){this._send(s.password(l))}sendSASLInitialResponseMessage(l,p){this._send(s.sendSASLInitialResponseMessage(l,p))}sendSCRAMClientFinalMessage(l){this._send(s.sendSCRAMClientFinalMessage(l))}_send(l){return this.stream.writable?this.stream.write(l):!1}query(l){this._send(s.query(l))}parse(l){this._send(s.parse(l))}bind(l){this._send(s.bind(l))}execute(l){this._send(s.execute(l))}flush(){this.stream.writable&&this.stream.write(a)}sync(){this._ending=!0,this._send(o)}ref(){this.stream.ref()}unref(){this.stream.unref()}end(){if(this._ending=!0,!this._connecting||!this.stream.writable){this.stream.end();return}return this.stream.write(c,()=>{this.stream.end()})}close(l){this._send(s.close(l))}describe(l){this._send(s.describe(l))}sendCopyFromChunk(l){this._send(s.copyData(l))}endCopyFrom(){this._send(s.copyDone())}sendCopyFail(l){this._send(s.copyFail(l))}};t.exports=u}}),MOe=A({"../../node_modules/pg/lib/client.js"(e,t){"use strict";var r=require("events").EventEmitter,n=$T(),i=ROe(),s=POe(),a=s8(),o=o8(),c=COe(),u=b0(),l=l8(),p=class extends r{constructor(d){super(),this.connectionParameters=new o(d),this.user=this.connectionParameters.user,this.database=this.connectionParameters.database,this.port=this.connectionParameters.port,this.host=this.connectionParameters.host,Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:this.connectionParameters.password}),this.replication=this.connectionParameters.replication;var m=d||{};this._Promise=m.Promise||global.Promise,this._types=new a(m.types),this._ending=!1,this._connecting=!1,this._connected=!1,this._connectionError=!1,this._queryable=!0,this.connection=m.connection||new l({stream:m.stream,ssl:this.connectionParameters.ssl,keepAlive:m.keepAlive||!1,keepAliveInitialDelayMillis:m.keepAliveInitialDelayMillis||0,encoding:this.connectionParameters.client_encoding||"utf8"}),this.queryQueue=[],this.binary=m.binary||u.binary,this.processID=null,this.secretKey=null,this.ssl=this.connectionParameters.ssl||!1,this.ssl&&this.ssl.key&&Object.defineProperty(this.ssl,"key",{enumerable:!1}),this._connectionTimeoutMillis=m.connectionTimeoutMillis||0}_errorAllQueries(d){let m=f=>{process.nextTick(()=>{f.handleError(d,this.connection)})};this.activeQuery&&(m(this.activeQuery),this.activeQuery=null),this.queryQueue.forEach(m),this.queryQueue.length=0}_connect(d){var m=this,f=this.connection;if(this._connectionCallback=d,this._connecting||this._connected){let h=new Error("Client has already been connected. You cannot reuse a client.");process.nextTick(()=>{d(h)});return}this._connecting=!0,this.connectionTimeoutHandle,this._connectionTimeoutMillis>0&&(this.connectionTimeoutHandle=setTimeout(()=>{f._ending=!0,f.stream.destroy(new Error("timeout expired"))},this._connectionTimeoutMillis)),this.host&&this.host.indexOf("/")===0?f.connect(this.host+"/.s.PGSQL."+this.port):f.connect(this.port,this.host),f.on("connect",function(){m.ssl?f.requestSsl():f.startup(m.getStartupConf())}),f.on("sslconnect",function(){f.startup(m.getStartupConf())}),this._attachListeners(f),f.once("end",()=>{let h=this._ending?new Error("Connection terminated"):new Error("Connection terminated unexpectedly");clearTimeout(this.connectionTimeoutHandle),this._errorAllQueries(h),this._ending||(this._connecting&&!this._connectionError?this._connectionCallback?this._connectionCallback(h):this._handleErrorEvent(h):this._connectionError||this._handleErrorEvent(h)),process.nextTick(()=>{this.emit("end")})})}connect(d){if(d){this._connect(d);return}return new this._Promise((m,f)=>{this._connect(h=>{h?f(h):m()})})}_attachListeners(d){d.on("authenticationCleartextPassword",this._handleAuthCleartextPassword.bind(this)),d.on("authenticationMD5Password",this._handleAuthMD5Password.bind(this)),d.on("authenticationSASL",this._handleAuthSASL.bind(this)),d.on("authenticationSASLContinue",this._handleAuthSASLContinue.bind(this)),d.on("authenticationSASLFinal",this._handleAuthSASLFinal.bind(this)),d.on("backendKeyData",this._handleBackendKeyData.bind(this)),d.on("error",this._handleErrorEvent.bind(this)),d.on("errorMessage",this._handleErrorMessage.bind(this)),d.on("readyForQuery",this._handleReadyForQuery.bind(this)),d.on("notice",this._handleNotice.bind(this)),d.on("rowDescription",this._handleRowDescription.bind(this)),d.on("dataRow",this._handleDataRow.bind(this)),d.on("portalSuspended",this._handlePortalSuspended.bind(this)),d.on("emptyQuery",this._handleEmptyQuery.bind(this)),d.on("commandComplete",this._handleCommandComplete.bind(this)),d.on("parseComplete",this._handleParseComplete.bind(this)),d.on("copyInResponse",this._handleCopyInResponse.bind(this)),d.on("copyData",this._handleCopyData.bind(this)),d.on("notification",this._handleNotification.bind(this))}_checkPgPass(d){let m=this.connection;typeof this.password=="function"?this._Promise.resolve().then(()=>this.password()).then(f=>{if(f!==void 0){if(typeof f!="string"){m.emit("error",new TypeError("Password must be a string"));return}this.connectionParameters.password=this.password=f}else this.connectionParameters.password=this.password=null;d()}).catch(f=>{m.emit("error",f)}):this.password!==null?d():s(this.connectionParameters,f=>{f!==void 0&&(this.connectionParameters.password=this.password=f),d()})}_handleAuthCleartextPassword(d){this._checkPgPass(()=>{this.connection.password(this.password)})}_handleAuthMD5Password(d){this._checkPgPass(()=>{let m=n.postgresMd5PasswordHash(this.user,this.password,d.salt);this.connection.password(m)})}_handleAuthSASL(d){this._checkPgPass(()=>{try{this.saslSession=i.startSession(d.mechanisms),this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism,this.saslSession.response)}catch(m){this.connection.emit("error",m)}})}_handleAuthSASLContinue(d){try{i.continueSession(this.saslSession,this.password,d.data),this.connection.sendSCRAMClientFinalMessage(this.saslSession.response)}catch(m){this.connection.emit("error",m)}}_handleAuthSASLFinal(d){try{i.finalizeSession(this.saslSession,d.data),this.saslSession=null}catch(m){this.connection.emit("error",m)}}_handleBackendKeyData(d){this.processID=d.processID,this.secretKey=d.secretKey}_handleReadyForQuery(d){this._connecting&&(this._connecting=!1,this._connected=!0,clearTimeout(this.connectionTimeoutHandle),this._connectionCallback&&(this._connectionCallback(null,this),this._connectionCallback=null),this.emit("connect"));let{activeQuery:m}=this;this.activeQuery=null,this.readyForQuery=!0,m&&m.handleReadyForQuery(this.connection),this._pulseQueryQueue()}_handleErrorWhileConnecting(d){if(!this._connectionError){if(this._connectionError=!0,clearTimeout(this.connectionTimeoutHandle),this._connectionCallback)return this._connectionCallback(d);this.emit("error",d)}}_handleErrorEvent(d){if(this._connecting)return this._handleErrorWhileConnecting(d);this._queryable=!1,this._errorAllQueries(d),this.emit("error",d)}_handleErrorMessage(d){if(this._connecting)return this._handleErrorWhileConnecting(d);let m=this.activeQuery;if(!m){this._handleErrorEvent(d);return}this.activeQuery=null,m.handleError(d,this.connection)}_handleRowDescription(d){this.activeQuery.handleRowDescription(d)}_handleDataRow(d){this.activeQuery.handleDataRow(d)}_handlePortalSuspended(d){this.activeQuery.handlePortalSuspended(this.connection)}_handleEmptyQuery(d){this.activeQuery.handleEmptyQuery(this.connection)}_handleCommandComplete(d){this.activeQuery.handleCommandComplete(d,this.connection)}_handleParseComplete(d){this.activeQuery.name&&(this.connection.parsedStatements[this.activeQuery.name]=this.activeQuery.text)}_handleCopyInResponse(d){this.activeQuery.handleCopyInResponse(this.connection)}_handleCopyData(d){this.activeQuery.handleCopyData(d,this.connection)}_handleNotification(d){this.emit("notification",d)}_handleNotice(d){this.emit("notice",d)}getStartupConf(){var d=this.connectionParameters,m={user:d.user,database:d.database},f=d.application_name||d.fallback_application_name;return f&&(m.application_name=f),d.replication&&(m.replication=""+d.replication),d.statement_timeout&&(m.statement_timeout=String(parseInt(d.statement_timeout,10))),d.lock_timeout&&(m.lock_timeout=String(parseInt(d.lock_timeout,10))),d.idle_in_transaction_session_timeout&&(m.idle_in_transaction_session_timeout=String(parseInt(d.idle_in_transaction_session_timeout,10))),d.options&&(m.options=d.options),m}cancel(d,m){if(d.activeQuery===m){var f=this.connection;this.host&&this.host.indexOf("/")===0?f.connect(this.host+"/.s.PGSQL."+this.port):f.connect(this.port,this.host),f.on("connect",function(){f.cancel(d.processID,d.secretKey)})}else d.queryQueue.indexOf(m)!==-1&&d.queryQueue.splice(d.queryQueue.indexOf(m),1)}setTypeParser(d,m,f){return this._types.setTypeParser(d,m,f)}getTypeParser(d,m){return this._types.getTypeParser(d,m)}escapeIdentifier(d){return'"'+d.replace(/"/g,'""')+'"'}escapeLiteral(d){for(var m=!1,f="'",h=0;h<d.length;h++){var _=d[h];_==="'"?f+=_+_:_==="\\"?(f+=_+_,m=!0):f+=_}return f+="'",m===!0&&(f=" E"+f),f}_pulseQueryQueue(){if(this.readyForQuery===!0)if(this.activeQuery=this.queryQueue.shift(),this.activeQuery){this.readyForQuery=!1,this.hasExecuted=!0;let d=this.activeQuery.submit(this.connection);d&&process.nextTick(()=>{this.activeQuery.handleError(d,this.connection),this.readyForQuery=!0,this._pulseQueryQueue()})}else this.hasExecuted&&(this.activeQuery=null,this.emit("drain"))}query(d,m,f){var h,_,g,v,y;if(d==null)throw new TypeError("Client was passed a null or undefined query");return typeof d.submit=="function"?(g=d.query_timeout||this.connectionParameters.query_timeout,_=h=d,typeof m=="function"&&(h.callback=h.callback||m)):(g=this.connectionParameters.query_timeout,h=new c(d,m,f),h.callback||(_=new this._Promise((E,q)=>{h.callback=(T,M)=>T?q(T):E(M)}))),g&&(y=h.callback,v=setTimeout(()=>{var E=new Error("Query read timeout");process.nextTick(()=>{h.handleError(E,this.connection)}),y(E),h.callback=()=>{};var q=this.queryQueue.indexOf(h);q>-1&&this.queryQueue.splice(q,1),this._pulseQueryQueue()},g),h.callback=(E,q)=>{clearTimeout(v),y(E,q)}),this.binary&&!h.binary&&(h.binary=!0),h._result&&!h._result._types&&(h._result._types=this._types),this._queryable?this._ending?(process.nextTick(()=>{h.handleError(new Error("Client was closed and is not queryable"),this.connection)}),_):(this.queryQueue.push(h),this._pulseQueryQueue(),_):(process.nextTick(()=>{h.handleError(new Error("Client has encountered a connection error and is not queryable"),this.connection)}),_)}ref(){this.connection.ref()}unref(){this.connection.unref()}end(d){if(this._ending=!0,!this.connection._connecting)if(d)d();else return this._Promise.resolve();if(this.activeQuery||!this._queryable?this.connection.stream.destroy():this.connection.end(),d)this.connection.once("end",d);else return new this._Promise(m=>{this.connection.once("end",m)})}};p.Query=c,t.exports=p}}),kOe=A({"../../node_modules/pg-pool/index.js"(e,t){"use strict";var r=require("events").EventEmitter,n=function(){},i=(p,d)=>{let m=p.findIndex(d);return m===-1?void 0:p.splice(m,1)[0]},s=class{constructor(p,d,m){this.client=p,this.idleListener=d,this.timeoutId=m}},a=class{constructor(p){this.callback=p}};function o(){throw new Error("Release called on client which has already been released to the pool.")}function c(p,d){if(d)return{callback:d,result:void 0};let m,f,h=function(g,v){g?m(g):f(v)},_=new p(function(g,v){f=g,m=v});return{callback:h,result:_}}function u(p,d){return function m(f){f.client=d,d.removeListener("error",m),d.on("error",()=>{p.log("additional client error after disconnection due to error",f)}),p._remove(d),p.emit("error",f,d)}}var l=class extends r{constructor(p,d){super(),this.options=Object.assign({},p),p!=null&&"password"in p&&Object.defineProperty(this.options,"password",{configurable:!0,enumerable:!1,writable:!0,value:p.password}),p!=null&&p.ssl&&p.ssl.key&&Object.defineProperty(this.options.ssl,"key",{enumerable:!1}),this.options.max=this.options.max||this.options.poolSize||10,this.options.maxUses=this.options.maxUses||1/0,this.options.allowExitOnIdle=this.options.allowExitOnIdle||!1,this.options.maxLifetimeSeconds=this.options.maxLifetimeSeconds||0,this.log=this.options.log||function(){},this.Client=this.options.Client||d||UT().Client,this.Promise=this.options.Promise||global.Promise,typeof this.options.idleTimeoutMillis>"u"&&(this.options.idleTimeoutMillis=1e4),this._clients=[],this._idle=[],this._expired=new WeakSet,this._pendingQueue=[],this._endCallback=void 0,this.ending=!1,this.ended=!1}_isFull(){return this._clients.length>=this.options.max}_pulseQueue(){if(this.log("pulse queue"),this.ended){this.log("pulse queue ended");return}if(this.ending){this.log("pulse queue on ending"),this._idle.length&&this._idle.slice().map(d=>{this._remove(d.client)}),this._clients.length||(this.ended=!0,this._endCallback());return}if(!this._pendingQueue.length){this.log("no queued requests");return}if(!this._idle.length&&this._isFull())return;let p=this._pendingQueue.shift();if(this._idle.length){let d=this._idle.pop();clearTimeout(d.timeoutId);let m=d.client;m.ref&&m.ref();let f=d.idleListener;return this._acquireClient(m,p,f,!1)}if(!this._isFull())return this.newClient(p);throw new Error("unexpected condition")}_remove(p){let d=i(this._idle,m=>m.client===p);d!==void 0&&clearTimeout(d.timeoutId),this._clients=this._clients.filter(m=>m!==p),p.end(),this.emit("remove",p)}connect(p){if(this.ending){let f=new Error("Cannot use a pool after calling end on the pool");return p?p(f):this.Promise.reject(f)}let d=c(this.Promise,p),m=d.result;if(this._isFull()||this._idle.length){if(this._idle.length&&process.nextTick(()=>this._pulseQueue()),!this.options.connectionTimeoutMillis)return this._pendingQueue.push(new a(d.callback)),m;let f=(g,v,y)=>{clearTimeout(_),d.callback(g,v,y)},h=new a(f),_=setTimeout(()=>{i(this._pendingQueue,g=>g.callback===f),h.timedOut=!0,d.callback(new Error("timeout exceeded when trying to connect"))},this.options.connectionTimeoutMillis);return this._pendingQueue.push(h),m}return this.newClient(new a(d.callback)),m}newClient(p){let d=new this.Client(this.options);this._clients.push(d);let m=u(this,d);this.log("checking client timeout");let f,h=!1;this.options.connectionTimeoutMillis&&(f=setTimeout(()=>{this.log("ending client due to timeout"),h=!0,d.connection?d.connection.stream.destroy():d.end()},this.options.connectionTimeoutMillis)),this.log("connecting new client"),d.connect(_=>{if(f&&clearTimeout(f),d.on("error",m),_)this.log("client failed to connect",_),this._clients=this._clients.filter(g=>g!==d),h&&(_.message="Connection terminated due to connection timeout"),this._pulseQueue(),p.timedOut||p.callback(_,void 0,n);else{if(this.log("new client connected"),this.options.maxLifetimeSeconds!==0){let g=setTimeout(()=>{this.log("ending client due to expired lifetime"),this._expired.add(d),this._idle.findIndex(y=>y.client===d)!==-1&&this._acquireClient(d,new a((y,E,q)=>q()),m,!1)},this.options.maxLifetimeSeconds*1e3);g.unref(),d.once("end",()=>clearTimeout(g))}return this._acquireClient(d,p,m,!0)}})}_acquireClient(p,d,m,f){f&&this.emit("connect",p),this.emit("acquire",p),p.release=this._releaseOnce(p,m),p.removeListener("error",m),d.timedOut?f&&this.options.verify?this.options.verify(p,p.release):p.release():f&&this.options.verify?this.options.verify(p,h=>{if(h)return p.release(h),d.callback(h,void 0,n);d.callback(void 0,p,p.release)}):d.callback(void 0,p,p.release)}_releaseOnce(p,d){let m=!1;return f=>{m&&o(),m=!0,this._release(p,d,f)}}_release(p,d,m){if(p.on("error",d),p._poolUseCount=(p._poolUseCount||0)+1,this.emit("release",m,p),m||this.ending||!p._queryable||p._ending||p._poolUseCount>=this.options.maxUses){p._poolUseCount>=this.options.maxUses&&this.log("remove expended client"),this._remove(p),this._pulseQueue();return}if(this._expired.has(p)){this.log("remove expired client"),this._expired.delete(p),this._remove(p),this._pulseQueue();return}let h;this.options.idleTimeoutMillis&&(h=setTimeout(()=>{this.log("remove idle client"),this._remove(p)},this.options.idleTimeoutMillis),this.options.allowExitOnIdle&&h.unref()),this.options.allowExitOnIdle&&p.unref(),this._idle.push(new s(p,d,h)),this._pulseQueue()}query(p,d,m){if(typeof p=="function"){let h=c(this.Promise,p);return setImmediate(function(){return h.callback(new Error("Passing a function as the first parameter to pool.query is not supported"))}),h.result}typeof d=="function"&&(m=d,d=void 0);let f=c(this.Promise,m);return m=f.callback,this.connect((h,_)=>{if(h)return m(h);let g=!1,v=y=>{g||(g=!0,_.release(y),m(y))};_.once("error",v),this.log("dispatching query");try{_.query(p,d,(y,E)=>{if(this.log("query dispatched"),_.removeListener("error",v),!g)return g=!0,_.release(y),y?m(y):m(void 0,E)})}catch(y){return _.release(y),m(y)}}),f.result}end(p){if(this.log("ending"),this.ending){let m=new Error("Called end on pool more than once");return p?p(m):this.Promise.reject(m)}this.ending=!0;let d=c(this.Promise,p);return this._endCallback=d.callback,this._pulseQueue(),d.result}get waitingCount(){return this._pendingQueue.length}get idleCount(){return this._idle.length}get expiredCount(){return this._clients.reduce((p,d)=>p+(this._expired.has(d)?1:0),0)}get totalCount(){return this._clients.length}};t.exports=l}}),DOe=A({"../../node_modules/pg/lib/native/query.js"(e,t){"use strict";var r=require("events").EventEmitter,n=require("util"),i=$T(),s=t.exports=function(o,c,u){r.call(this),o=i.normalizeQueryConfig(o,c,u),this.text=o.text,this.values=o.values,this.name=o.name,this.callback=o.callback,this.state="new",this._arrayMode=o.rowMode==="array",this._emitRowEvents=!1,this.on("newListener",function(l){l==="row"&&(this._emitRowEvents=!0)}.bind(this))};n.inherits(s,r);var a={sqlState:"code",statementPosition:"position",messagePrimary:"message",context:"where",schemaName:"schema",tableName:"table",columnName:"column",dataTypeName:"dataType",constraintName:"constraint",sourceFile:"file",sourceLine:"line",sourceFunction:"routine"};s.prototype.handleError=function(o){var c=this.native.pq.resultErrorFields();if(c)for(var u in c){var l=a[u]||u;o[l]=c[u]}this.callback?this.callback(o):this.emit("error",o),this.state="error"},s.prototype.then=function(o,c){return this._getPromise().then(o,c)},s.prototype.catch=function(o){return this._getPromise().catch(o)},s.prototype._getPromise=function(){return this._promise?this._promise:(this._promise=new Promise(function(o,c){this._once("end",o),this._once("error",c)}.bind(this)),this._promise)},s.prototype.submit=function(o){this.state="running";var c=this;this.native=o.native,o.native.arrayMode=this._arrayMode;var u=function(d,m,f){if(o.native.arrayMode=!1,setImmediate(function(){c.emit("_done")}),d)return c.handleError(d);c._emitRowEvents&&(f.length>1?m.forEach((h,_)=>{h.forEach(g=>{c.emit("row",g,f[_])})}):m.forEach(function(h){c.emit("row",h,f)})),c.state="end",c.emit("end",f),c.callback&&c.callback(null,f)};if(process.domain&&(u=process.domain.bind(u)),this.name){this.name.length>63&&(console.error("Warning! Postgres only supports 63 characters for query names."),console.error("You supplied %s (%s)",this.name,this.name.length),console.error("This can cause conflicts and silent errors executing queries"));var l=(this.values||[]).map(i.prepareValue);if(o.namedQueries[this.name]){if(this.text&&o.namedQueries[this.name]!==this.text){let d=new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`);return u(d)}return o.native.execute(this.name,l,u)}return o.native.prepare(this.name,this.text,l.length,function(d){return d?u(d):(o.namedQueries[c.name]=c.text,c.native.execute(c.name,l,u))})}else if(this.values){if(!Array.isArray(this.values)){let d=new Error("Query values must be an array");return u(d)}var p=this.values.map(i.prepareValue);o.native.query(this.text,p,u)}else o.native.query(this.text,u)}}}),FOe=A({"../../node_modules/pg/lib/native/client.js"(e,t){"use strict";var r=require("pg-native"),n=s8(),i=require("events").EventEmitter,s=require("util"),a=o8(),o=DOe(),c=t.exports=function(u){i.call(this),u=u||{},this._Promise=u.Promise||global.Promise,this._types=new n(u.types),this.native=new r({types:this._types}),this._queryQueue=[],this._ending=!1,this._connecting=!1,this._connected=!1,this._queryable=!0;var l=this.connectionParameters=new a(u);this.user=l.user,Object.defineProperty(this,"password",{configurable:!0,enumerable:!1,writable:!0,value:l.password}),this.database=l.database,this.host=l.host,this.port=l.port,this.namedQueries={}};c.Query=o,s.inherits(c,i),c.prototype._errorAllQueries=function(u){let l=p=>{process.nextTick(()=>{p.native=this.native,p.handleError(u)})};this._hasActiveQuery()&&(l(this._activeQuery),this._activeQuery=null),this._queryQueue.forEach(l),this._queryQueue.length=0},c.prototype._connect=function(u){var l=this;if(this._connecting){process.nextTick(()=>u(new Error("Client has already been connected. You cannot reuse a client.")));return}this._connecting=!0,this.connectionParameters.getLibpqConnectionString(function(p,d){if(p)return u(p);l.native.connect(d,function(m){if(m)return l.native.end(),u(m);l._connected=!0,l.native.on("error",function(f){l._queryable=!1,l._errorAllQueries(f),l.emit("error",f)}),l.native.on("notification",function(f){l.emit("notification",{channel:f.relname,payload:f.extra})}),l.emit("connect"),l._pulseQueryQueue(!0),u()})})},c.prototype.connect=function(u){if(u){this._connect(u);return}return new this._Promise((l,p)=>{this._connect(d=>{d?p(d):l()})})},c.prototype.query=function(u,l,p){var d,m,f,h,_;if(u==null)throw new TypeError("Client was passed a null or undefined query");if(typeof u.submit=="function")f=u.query_timeout||this.connectionParameters.query_timeout,m=d=u,typeof l=="function"&&(u.callback=l);else if(f=this.connectionParameters.query_timeout,d=new o(u,l,p),!d.callback){let g,v;m=new this._Promise((y,E)=>{g=y,v=E}),d.callback=(y,E)=>y?v(y):g(E)}return f&&(_=d.callback,h=setTimeout(()=>{var g=new Error("Query read timeout");process.nextTick(()=>{d.handleError(g,this.connection)}),_(g),d.callback=()=>{};var v=this._queryQueue.indexOf(d);v>-1&&this._queryQueue.splice(v,1),this._pulseQueryQueue()},f),d.callback=(g,v)=>{clearTimeout(h),_(g,v)}),this._queryable?this._ending?(d.native=this.native,process.nextTick(()=>{d.handleError(new Error("Client was closed and is not queryable"))}),m):(this._queryQueue.push(d),this._pulseQueryQueue(),m):(d.native=this.native,process.nextTick(()=>{d.handleError(new Error("Client has encountered a connection error and is not queryable"))}),m)},c.prototype.end=function(u){var l=this;this._ending=!0,this._connected||this.once("connect",this.end.bind(this,u));var p;return u||(p=new this._Promise(function(d,m){u=f=>f?m(f):d()})),this.native.end(function(){l._errorAllQueries(new Error("Connection terminated")),process.nextTick(()=>{l.emit("end"),u&&u()})}),p},c.prototype._hasActiveQuery=function(){return this._activeQuery&&this._activeQuery.state!=="error"&&this._activeQuery.state!=="end"},c.prototype._pulseQueryQueue=function(u){if(this._connected&&!this._hasActiveQuery()){var l=this._queryQueue.shift();if(!l){u||this.emit("drain");return}this._activeQuery=l,l.submit(this);var p=this;l.once("_done",function(){p._pulseQueryQueue()})}},c.prototype.cancel=function(u){this._activeQuery===u?this.native.cancel(function(){}):this._queryQueue.indexOf(u)!==-1&&this._queryQueue.splice(this._queryQueue.indexOf(u),1)},c.prototype.ref=function(){},c.prototype.unref=function(){},c.prototype.setTypeParser=function(u,l,p){return this._types.setTypeParser(u,l,p)},c.prototype.getTypeParser=function(u,l){return this._types.getTypeParser(u,l)}}}),WB=A({"../../node_modules/pg/lib/native/index.js"(e,t){"use strict";t.exports=FOe()}}),UT=A({"../../node_modules/pg/lib/index.js"(e,t){"use strict";var r=MOe(),n=b0(),i=l8(),s=kOe(),{DatabaseError:a}=c8(),o=u=>class extends s{constructor(p){super(p,u)}},c=function(u){this.defaults=n,this.Client=u,this.Query=this.Client.Query,this.Pool=o(this.Client),this._pools=[],this.Connection=i,this.types=E0(),this.DatabaseError=a};typeof process.env.NODE_PG_FORCE_NATIVE<"u"?t.exports=new c(WB()):(t.exports=new c(r),Object.defineProperty(t.exports,"native",{configurable:!0,enumerable:!1,get(){var u=null;try{u=new c(WB())}catch(l){if(l.code!=="MODULE_NOT_FOUND")throw l}return Object.defineProperty(t.exports,"native",{value:u}),u}}))}}),Rn=A({"../../node_modules/logform/format.js"(e,t){"use strict";var r=class extends Error{constructor(n){super(`Format functions must be synchronous taking a two arguments: (info, opts)
137
137
  Found: ${n.toString().split(`
138
138
  `)[0]}
@@ -238,7 +238,7 @@ safe-buffer/index.js:
238
238
  */
239
239
  /**
240
240
  * @title @squiz/content-api
241
- * @version 1.31.1-alpha.0
241
+ * @version 1.31.1-alpha.2
242
242
  * @license ISC
243
243
  * @baseUrl /
244
244
  * @contact