@activepieces/piece-sftp 0.5.10 → 0.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +17 -17
package/src/index.js CHANGED
@@ -1,29 +1,29 @@
1
- "use strict";var Kk=Object.create;var ta=Object.defineProperty;var Gk=Object.getOwnPropertyDescriptor;var Yk=Object.getOwnPropertyNames;var Xk=Object.getPrototypeOf,Jk=Object.prototype.hasOwnProperty;var a=(e,t)=>ta(e,"name",{value:t,configurable:!0});var me=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},cn=(e,t)=>{for(var r in t)ta(e,r,{get:t[r],enumerable:!0})},wb=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Yk(t))!Jk.call(e,n)&&n!==r&&ta(e,n,{get:()=>t[n],enumerable:!(i=Gk(t,n))||i.enumerable});return e};var Dr=(e,t,r)=>(r=e!=null?Kk(Xk(e)):{},wb(t||!e||!e.__esModule?ta(r,"default",{value:e,enumerable:!0}):r,e)),eC=e=>wb(ta({},"__esModule",{value:!0}),e);var vI=me((II,Sd)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},i=new RegExp("^0[0-7]+$","i"),n=new RegExp("^0x[a-f0-9]+$","i"),o="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(o,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${o})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${o})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${o})?$`,"i")};function u(h,_){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let y=0,b=-1,v=(h.match(c.zoneIndex)||[])[0],S,M;for(v&&(v=v.substring(1),h=h.replace(/%.+$/,""));(b=h.indexOf(":",b+1))>=0;)y++;if(h.substr(0,2)==="::"&&y--,h.substr(-2,2)==="::"&&y--,y>_)return null;for(M=_-y,S=":";M--;)S+="0:";return h=h.replace("::",S),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),_=(function(){let R=h.split(":"),J=[];for(let te=0;te<R.length;te++)J.push(parseInt(R[te],16));return J})(),{parts:_,zoneId:v}}a(u,"expandIPv6");function l(h,_,y,b){if(h.length!==_.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let v=0,S;for(;b>0;){if(S=y-b,S<0&&(S=0),h[v]>>S!==_[v]>>S)return!1;b-=y,v+=1}return!0}a(l,"matchCIDR");function f(h){if(n.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(i.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}a(f,"parseIntAuto");function p(h,_){for(;h.length<_;)h=`0${h}`;return h}a(p,"padPart");let g={};g.IPv4=(function(){function h(_){if(_.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,b;for(y=0;y<_.length;y++)if(b=_[y],!(0<=b&&b<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=_}return a(h,"IPv4"),h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]],as112:[[new h([192,175,48,0]),24],[new h([192,31,196,0]),24]],amt:[[new h([192,52,193,0]),24]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(_,y){let b;if(y===void 0&&(b=_,_=b[0],y=b[1]),_.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return l(this.octets,_.octets,8,y)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,y=!1,b={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},v,S,M;for(v=3;v>=0;v-=1)if(S=this.octets[v],S in b){if(M=b[S],y&&M!==0)return null;M!==8&&(y=!0),_+=M}else return null;return 32-_},h.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return g.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h})(),g.IPv4.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),y=_[0].toByteArray(),b=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),v=[],S=0;for(;S<4;)v.push(parseInt(y[S],10)|parseInt(b[S],10)^255),S++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.isIPv4=function(h){return this.parser(h)!==null},g.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},g.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},g.IPv4.isValidFourPartDecimal=function(h){return!!(g.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},g.IPv4.isValidCIDRFourPartDecimal=function(h){let _=h.match(/^(.+)\/(\d+)$/);return!g.IPv4.isValidCIDR(h)||!_?!1:g.IPv4.isValidFourPartDecimal(_[1])},g.IPv4.networkAddressFromCIDR=function(h){let _,y,b,v,S;try{for(_=this.parseCIDR(h),b=_[0].toByteArray(),S=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),v=[],y=0;y<4;)v.push(parseInt(b[y],10)&parseInt(S[y],10)),y++;return new this(v)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.parse=function(h){let _=this.parser(h);if(_===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(_)},g.IPv4.parseCIDR=function(h){let _;if(_=h.match(/^(.+)\/(\d+)$/)){let y=parseInt(_[2]);if(y>=0&&y<=32){let b=[this.parse(_[1]),y];return Object.defineProperty(b,"toString",{value:a(function(){return this.join("/")},"value")}),b}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},g.IPv4.parser=function(h){let _,y,b;if(_=h.match(r.fourOctet))return(function(){let v=_.slice(1,6),S=[];for(let M=0;M<v.length;M++)y=v[M],S.push(f(y));return S})();if(_=h.match(r.longValue)){if(b=f(_[1]),b>4294967295||b<0)throw new Error("ipaddr: address outside defined range");return(function(){let v=[],S;for(S=0;S<=24;S+=8)v.push(b>>S&255);return v})().reverse()}else return(_=h.match(r.twoOctet))?(function(){let v=_.slice(1,4),S=[];if(b=f(v[1]),b>16777215||b<0)throw new Error("ipaddr: address outside defined range");return S.push(f(v[0])),S.push(b>>16&255),S.push(b>>8&255),S.push(b&255),S})():(_=h.match(r.threeOctet))?(function(){let v=_.slice(1,5),S=[];if(b=f(v[2]),b>65535||b<0)throw new Error("ipaddr: address outside defined range");return S.push(f(v[0])),S.push(f(v[1])),S.push(b>>8&255),S.push(b&255),S})():null},g.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");let _=[0,0,0,0],y=0,b=Math.floor(h/8);for(;y<b;)_[y]=255,y++;return b<4&&(_[b]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},g.IPv6=(function(){function h(_,y){let b,v;if(_.length===16)for(this.parts=[],b=0;b<=14;b+=2)this.parts.push(_[b]<<8|_[b+1]);else if(_.length===8)this.parts=_;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(b=0;b<this.parts.length;b++)if(v=this.parts[b],!(0<=v&&v<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return a(h,"IPv6"),h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],discard:[new h([256,0,0,0,0,0,0,0]),64],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[new h([100,65435,0,0,0,0,0,0]),96],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[[new h([8193,4,274,0,0,0,0,0]),48],[new h([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new h([8193,48,0,0,0,0,0,0]),28],reserved:[[new h([8193,0,0,0,0,0,0,0]),23],[new h([8193,3512,0,0,0,0,0,0]),32]]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(_,y){let b;if(y===void 0&&(b=_,_=b[0],y=b[1]),_.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return l(this.parts,_.parts,16,y)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,y=!1,b={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},v,S;for(let M=7;M>=0;M-=1)if(v=this.parts[M],v in b){if(S=b[v],y&&S!==0)return null;S!==16&&(y=!0),_+=S}else return null;return 128-_},h.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let _,y=[],b=this.parts;for(let v=0;v<b.length;v++)_=b[v],y.push(_>>8),y.push(_&255);return y},h.prototype.toFixedLengthString=function(){let _=(function(){let b=[];for(let v=0;v<this.parts.length;v++)b.push(p(this.parts[v].toString(16),4));return b}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),_+y},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let _=this.parts.slice(-2),y=_[0],b=_[1];return new g.IPv4([y>>8,y&255,b>>8,b&255])},h.prototype.toNormalizedString=function(){let _=(function(){let b=[];for(let v=0;v<this.parts.length;v++)b.push(this.parts[v].toString(16));return b}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),_+y},h.prototype.toRFC5952String=function(){let _=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),b=0,v=-1,S;for(;S=_.exec(y);)S[0].length>v&&(b=S.index,v=S[0].length);return v<0?y:`${y.substring(0,b)}::${y.substring(b+v)}`},h.prototype.toString=function(){return this.toRFC5952String()},h})(),g.IPv6.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),y=_[0].toByteArray(),b=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),v=[],S=0;for(;S<16;)v.push(parseInt(y[S],10)|parseInt(b[S],10)^255),S++;return new this(v)}catch(_){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${_})`)}},g.IPv6.isIPv6=function(h){return this.parser(h)!==null},g.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{let _=this.parser(h);return new this(_.parts,_.zoneId),!0}catch{return!1}},g.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},g.IPv6.networkAddressFromCIDR=function(h){let _,y,b,v,S;try{for(_=this.parseCIDR(h),b=_[0].toByteArray(),S=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),v=[],y=0;y<16;)v.push(parseInt(b[y],10)&parseInt(S[y],10)),y++;return new this(v)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},g.IPv6.parse=function(h){let _=this.parser(h);if(_.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(_.parts,_.zoneId)},g.IPv6.parseCIDR=function(h){let _,y,b;if((y=h.match(/^(.+)\/(\d+)$/))&&(_=parseInt(y[2]),_>=0&&_<=128))return b=[this.parse(y[1]),_],Object.defineProperty(b,"toString",{value:a(function(){return this.join("/")},"value")}),b;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},g.IPv6.parser=function(h){let _,y,b,v,S,M;if(b=h.match(c.deprecatedTransitional))return this.parser(`::ffff:${b[1]}`);if(c.native.test(h))return u(h,8);if((b=h.match(c.transitional))&&(M=b[6]||"",_=b[1],b[1].endsWith("::")||(_=_.slice(0,-1)),_=u(_+M,6),_.parts)){for(S=[parseInt(b[2]),parseInt(b[3]),parseInt(b[4]),parseInt(b[5])],y=0;y<S.length;y++)if(v=S[y],!(0<=v&&v<=255))return null;return _.parts.push(S[0]<<8|S[1]),_.parts.push(S[2]<<8|S[3]),{parts:_.parts,zoneId:_.zoneId}}return null},g.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");let _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,b=Math.floor(h/8);for(;y<b;)_[y]=255,y++;return b<16&&(_[b]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},g.fromByteArray=function(h){let _=h.length;if(_===4)return new g.IPv4(h);if(_===16)return new g.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},g.isValid=function(h){return g.IPv6.isValid(h)||g.IPv4.isValid(h)},g.isValidCIDR=function(h){return g.IPv6.isValidCIDR(h)||g.IPv4.isValidCIDR(h)},g.parse=function(h){if(g.IPv6.isValid(h))return g.IPv6.parse(h);if(g.IPv4.isValid(h))return g.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},g.parseCIDR=function(h){try{return g.IPv6.parseCIDR(h)}catch{try{return g.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},g.process=function(h){let _=this.parse(h);return _.kind()==="ipv6"&&_.isIPv4MappedAddress()?_.toIPv4Address():_},g.subnetMatch=function(h,_,y){let b,v,S,M;y==null&&(y="unicast");for(v in _)if(Object.prototype.hasOwnProperty.call(_,v)){for(S=_[v],S[0]&&!(S[0]instanceof Array)&&(S=[S]),b=0;b<S.length;b++)if(M=S[b],h.kind()===M[0].kind()&&h.match.apply(h,M))return v}return y},typeof Sd<"u"&&Sd.exports?Sd.exports=g:e.ipaddr=g})(II)});var Pd=me(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.parseControlResponse=HN;ho.isSingleLine=Sv;ho.isMultiline=wv;ho.positiveCompletion=jN;ho.positiveIntermediate=WN;var ky=`
2
- `;function HN(e){let t=e.split(/\r?\n/).filter(qN),r=[],i=0,n;for(let s=0;s<t.length;s++){let c=t[s];if(n)n.test(c)&&(n=void 0,r.push(t.slice(i,s+1).join(ky)));else if(wv(c)){let u=c.substr(0,3);n=new RegExp(`^${u}(?:$| )`),i=s}else Sv(c)&&r.push(c)}let o=n?t.slice(i).join(ky)+ky:"";return{messages:r,rest:o}}a(HN,"parseControlResponse");function Sv(e){return/^\d\d\d(?:$| )/.test(e)}a(Sv,"isSingleLine");function wv(e){return/^\d\d\d-/.test(e)}a(wv,"isMultiline");function jN(e){return e>=200&&e<300}a(jN,"positiveCompletion");function WN(e){return e>=300&&e<400}a(WN,"positiveIntermediate");function qN(e){return e.trim()!==""}a(qN,"isNotBlank")});var Ry=me(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.FTPContext=Es.FTPError=void 0;var VN=require("net"),ZN=require("tls"),QN=Pd(),Td=class extends Error{static{a(this,"FTPError")}constructor(t){super(t.message),this.name=this.constructor.name,this.code=t.code}};Es.FTPError=Td;function Pv(){}a(Pv,"doNothing");var KN=2**16,Cy=class{static{a(this,"FTPContext")}constructor(t=0,r="utf8"){this.timeout=t,this.verbose=!1,this.ipFamily=void 0,this.tlsOptions={},this.tlsSessionStore=void 0,this._partialResponse="",this._encoding=r,this._socket=this.socket=this._newSocket(),this._dataSocket=void 0}close(){let t=this._task?"User closed client during task":"User closed client",r=new Error(t);this.closeWithError(r)}closeWithError(t){this._closingError||(this._closingError=t,this._closeControlSocket(),this._closeSocket(this._dataSocket),this._passToHandler(t),this._stopTrackingTask())}get closed(){return this.socket.remoteAddress===void 0||this._closingError!==void 0}reset(){this.socket=this._newSocket()}get socket(){return this._socket}set socket(t){this.dataSocket=void 0,this.tlsOptions={},this.tlsSessionStore=void 0,this._partialResponse="",this._socket&&(t.localPort===this._socket.localPort?this._removeSocketListeners(this.socket):this._closeControlSocket()),t&&(this._closingError=void 0,t.setTimeout(0),t.setEncoding(this._encoding),t.setKeepAlive(!0),t.on("data",r=>this._onControlSocketData(r)),t.on("end",()=>this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection."))),t.on("close",r=>{r||this.closeWithError(new Error("Server closed connection unexpectedly."))}),this._setupDefaultErrorHandlers(t,"control socket"),t instanceof ZN.TLSSocket&&t.on("session",r=>{this.tlsSessionStore=r})),this._socket=t}get dataSocket(){return this._dataSocket}set dataSocket(t){this._closeSocket(this._dataSocket),t&&(t.setTimeout(0),this._setupDefaultErrorHandlers(t,"data socket")),this._dataSocket=t}get encoding(){return this._encoding}set encoding(t){this._encoding=t,this.socket&&this.socket.setEncoding(t)}send(t){if(/[\r\n\0]/.test(t))throw new Error(`Invalid command: Contains control characters. (${t})`);let i=t.startsWith("PASS")?"> PASS ###":`> ${t}`;this.log(i),this._socket.write(t+`\r
1
+ "use strict";var sC=Object.create;var ta=Object.defineProperty;var aC=Object.getOwnPropertyDescriptor;var cC=Object.getOwnPropertyNames;var uC=Object.getPrototypeOf,lC=Object.prototype.hasOwnProperty;var a=(e,t)=>ta(e,"name",{value:t,configurable:!0});var me=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},cn=(e,t)=>{for(var r in t)ta(e,r,{get:t[r],enumerable:!0})},Ob=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cC(t))!lC.call(e,n)&&n!==r&&ta(e,n,{get:()=>t[n],enumerable:!(i=aC(t,n))||i.enumerable});return e};var Cr=(e,t,r)=>(r=e!=null?sC(uC(e)):{},Ob(t||!e||!e.__esModule?ta(r,"default",{value:e,enumerable:!0}):r,e)),fC=e=>Ob(ta({},"__esModule",{value:!0}),e);var CI=me((kI,wd)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},i=new RegExp("^0[0-7]+$","i"),n=new RegExp("^0x[a-f0-9]+$","i"),o="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(o,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${o})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${o})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${o})?$`,"i")};function u(h,_){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let y=0,b=-1,S=(h.match(c.zoneIndex)||[])[0],v,M;for(S&&(S=S.substring(1),h=h.replace(/%.+$/,""));(b=h.indexOf(":",b+1))>=0;)y++;if(h.substr(0,2)==="::"&&y--,h.substr(-2,2)==="::"&&y--,y>_)return null;for(M=_-y,v=":";M--;)v+="0:";return h=h.replace("::",v),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),_=(function(){let R=h.split(":"),J=[];for(let te=0;te<R.length;te++)J.push(parseInt(R[te],16));return J})(),{parts:_,zoneId:S}}a(u,"expandIPv6");function l(h,_,y,b){if(h.length!==_.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let S=0,v;for(;b>0;){if(v=y-b,v<0&&(v=0),h[S]>>v!==_[S]>>v)return!1;b-=y,S+=1}return!0}a(l,"matchCIDR");function f(h){if(n.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(i.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}a(f,"parseIntAuto");function p(h,_){for(;h.length<_;)h=`0${h}`;return h}a(p,"padPart");let g={};g.IPv4=(function(){function h(_){if(_.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,b;for(y=0;y<_.length;y++)if(b=_[y],!(0<=b&&b<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=_}return a(h,"IPv4"),h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]],as112:[[new h([192,175,48,0]),24],[new h([192,31,196,0]),24]],amt:[[new h([192,52,193,0]),24]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(_,y){let b;if(y===void 0&&(b=_,_=b[0],y=b[1]),_.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return l(this.octets,_.octets,8,y)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,y=!1,b={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},S,v,M;for(S=3;S>=0;S-=1)if(v=this.octets[S],v in b){if(M=b[v],y&&M!==0)return null;M!==8&&(y=!0),_+=M}else return null;return 32-_},h.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return g.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h})(),g.IPv4.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),y=_[0].toByteArray(),b=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],v=0;for(;v<4;)S.push(parseInt(y[v],10)|parseInt(b[v],10)^255),v++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.isIPv4=function(h){return this.parser(h)!==null},g.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},g.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},g.IPv4.isValidFourPartDecimal=function(h){return!!(g.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},g.IPv4.isValidCIDRFourPartDecimal=function(h){let _=h.match(/^(.+)\/(\d+)$/);return!g.IPv4.isValidCIDR(h)||!_?!1:g.IPv4.isValidFourPartDecimal(_[1])},g.IPv4.networkAddressFromCIDR=function(h){let _,y,b,S,v;try{for(_=this.parseCIDR(h),b=_[0].toByteArray(),v=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],y=0;y<4;)S.push(parseInt(b[y],10)&parseInt(v[y],10)),y++;return new this(S)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.parse=function(h){let _=this.parser(h);if(_===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(_)},g.IPv4.parseCIDR=function(h){let _;if(_=h.match(/^(.+)\/(\d+)$/)){let y=parseInt(_[2]);if(y>=0&&y<=32){let b=[this.parse(_[1]),y];return Object.defineProperty(b,"toString",{value:a(function(){return this.join("/")},"value")}),b}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},g.IPv4.parser=function(h){let _,y,b;if(_=h.match(r.fourOctet))return(function(){let S=_.slice(1,6),v=[];for(let M=0;M<S.length;M++)y=S[M],v.push(f(y));return v})();if(_=h.match(r.longValue)){if(b=f(_[1]),b>4294967295||b<0)throw new Error("ipaddr: address outside defined range");return(function(){let S=[],v;for(v=0;v<=24;v+=8)S.push(b>>v&255);return S})().reverse()}else return(_=h.match(r.twoOctet))?(function(){let S=_.slice(1,4),v=[];if(b=f(S[1]),b>16777215||b<0)throw new Error("ipaddr: address outside defined range");return v.push(f(S[0])),v.push(b>>16&255),v.push(b>>8&255),v.push(b&255),v})():(_=h.match(r.threeOctet))?(function(){let S=_.slice(1,5),v=[];if(b=f(S[2]),b>65535||b<0)throw new Error("ipaddr: address outside defined range");return v.push(f(S[0])),v.push(f(S[1])),v.push(b>>8&255),v.push(b&255),v})():null},g.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");let _=[0,0,0,0],y=0,b=Math.floor(h/8);for(;y<b;)_[y]=255,y++;return b<4&&(_[b]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},g.IPv6=(function(){function h(_,y){let b,S;if(_.length===16)for(this.parts=[],b=0;b<=14;b+=2)this.parts.push(_[b]<<8|_[b+1]);else if(_.length===8)this.parts=_;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(b=0;b<this.parts.length;b++)if(S=this.parts[b],!(0<=S&&S<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return a(h,"IPv6"),h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],discard:[new h([256,0,0,0,0,0,0,0]),64],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[new h([100,65435,0,0,0,0,0,0]),96],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[[new h([8193,4,274,0,0,0,0,0]),48],[new h([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new h([8193,48,0,0,0,0,0,0]),28],reserved:[[new h([8193,0,0,0,0,0,0,0]),23],[new h([8193,3512,0,0,0,0,0,0]),32]]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(_,y){let b;if(y===void 0&&(b=_,_=b[0],y=b[1]),_.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return l(this.parts,_.parts,16,y)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,y=!1,b={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},S,v;for(let M=7;M>=0;M-=1)if(S=this.parts[M],S in b){if(v=b[S],y&&v!==0)return null;v!==16&&(y=!0),_+=v}else return null;return 128-_},h.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let _,y=[],b=this.parts;for(let S=0;S<b.length;S++)_=b[S],y.push(_>>8),y.push(_&255);return y},h.prototype.toFixedLengthString=function(){let _=(function(){let b=[];for(let S=0;S<this.parts.length;S++)b.push(p(this.parts[S].toString(16),4));return b}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),_+y},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let _=this.parts.slice(-2),y=_[0],b=_[1];return new g.IPv4([y>>8,y&255,b>>8,b&255])},h.prototype.toNormalizedString=function(){let _=(function(){let b=[];for(let S=0;S<this.parts.length;S++)b.push(this.parts[S].toString(16));return b}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),_+y},h.prototype.toRFC5952String=function(){let _=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),b=0,S=-1,v;for(;v=_.exec(y);)v[0].length>S&&(b=v.index,S=v[0].length);return S<0?y:`${y.substring(0,b)}::${y.substring(b+S)}`},h.prototype.toString=function(){return this.toRFC5952String()},h})(),g.IPv6.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),y=_[0].toByteArray(),b=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],v=0;for(;v<16;)S.push(parseInt(y[v],10)|parseInt(b[v],10)^255),v++;return new this(S)}catch(_){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${_})`)}},g.IPv6.isIPv6=function(h){return this.parser(h)!==null},g.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{let _=this.parser(h);return new this(_.parts,_.zoneId),!0}catch{return!1}},g.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},g.IPv6.networkAddressFromCIDR=function(h){let _,y,b,S,v;try{for(_=this.parseCIDR(h),b=_[0].toByteArray(),v=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),S=[],y=0;y<16;)S.push(parseInt(b[y],10)&parseInt(v[y],10)),y++;return new this(S)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},g.IPv6.parse=function(h){let _=this.parser(h);if(_.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(_.parts,_.zoneId)},g.IPv6.parseCIDR=function(h){let _,y,b;if((y=h.match(/^(.+)\/(\d+)$/))&&(_=parseInt(y[2]),_>=0&&_<=128))return b=[this.parse(y[1]),_],Object.defineProperty(b,"toString",{value:a(function(){return this.join("/")},"value")}),b;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},g.IPv6.parser=function(h){let _,y,b,S,v,M;if(b=h.match(c.deprecatedTransitional))return this.parser(`::ffff:${b[1]}`);if(c.native.test(h))return u(h,8);if((b=h.match(c.transitional))&&(M=b[6]||"",_=b[1],b[1].endsWith("::")||(_=_.slice(0,-1)),_=u(_+M,6),_.parts)){for(v=[parseInt(b[2]),parseInt(b[3]),parseInt(b[4]),parseInt(b[5])],y=0;y<v.length;y++)if(S=v[y],!(0<=S&&S<=255))return null;return _.parts.push(v[0]<<8|v[1]),_.parts.push(v[2]<<8|v[3]),{parts:_.parts,zoneId:_.zoneId}}return null},g.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");let _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,b=Math.floor(h/8);for(;y<b;)_[y]=255,y++;return b<16&&(_[b]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},g.fromByteArray=function(h){let _=h.length;if(_===4)return new g.IPv4(h);if(_===16)return new g.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},g.isValid=function(h){return g.IPv6.isValid(h)||g.IPv4.isValid(h)},g.isValidCIDR=function(h){return g.IPv6.isValidCIDR(h)||g.IPv4.isValidCIDR(h)},g.parse=function(h){if(g.IPv6.isValid(h))return g.IPv6.parse(h);if(g.IPv4.isValid(h))return g.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},g.parseCIDR=function(h){try{return g.IPv6.parseCIDR(h)}catch{try{return g.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},g.process=function(h){let _=this.parse(h);return _.kind()==="ipv6"&&_.isIPv4MappedAddress()?_.toIPv4Address():_},g.subnetMatch=function(h,_,y){let b,S,v,M;y==null&&(y="unicast");for(S in _)if(Object.prototype.hasOwnProperty.call(_,S)){for(v=_[S],v[0]&&!(v[0]instanceof Array)&&(v=[v]),b=0;b<v.length;b++)if(M=v[b],h.kind()===M[0].kind()&&h.match.apply(h,M))return S}return y},typeof wd<"u"&&wd.exports?wd.exports=g:e.ipaddr=g})(kI)});var kd=me(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.parseControlResponse=n$;go.isSingleLine=LS;go.isMultiline=zS;go.positiveCompletion=i$;go.positiveIntermediate=o$;var $y=`
2
+ `;function n$(e){let t=e.split(/\r?\n/).filter(s$),r=[],i=0,n;for(let s=0;s<t.length;s++){let c=t[s];if(n)n.test(c)&&(n=void 0,r.push(t.slice(i,s+1).join($y)));else if(zS(c)){let u=c.substr(0,3);n=new RegExp(`^${u}(?:$| )`),i=s}else LS(c)&&r.push(c)}let o=n?t.slice(i).join($y)+$y:"";return{messages:r,rest:o}}a(n$,"parseControlResponse");function LS(e){return/^\d\d\d(?:$| )/.test(e)}a(LS,"isSingleLine");function zS(e){return/^\d\d\d-/.test(e)}a(zS,"isMultiline");function i$(e){return e>=200&&e<300}a(i$,"positiveCompletion");function o$(e){return e>=300&&e<400}a(o$,"positiveIntermediate");function s$(e){return e.trim()!==""}a(s$,"isNotBlank")});var By=me(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.FTPContext=Es.FTPError=void 0;var a$=require("net"),c$=require("tls"),u$=kd(),Cd=class extends Error{static{a(this,"FTPError")}constructor(t){super(t.message),this.name=this.constructor.name,this.code=t.code}};Es.FTPError=Cd;function US(){}a(US,"doNothing");var l$=2**16,Dy=class{static{a(this,"FTPContext")}constructor(t=0,r="utf8"){this.timeout=t,this.verbose=!1,this.ipFamily=void 0,this.tlsOptions={},this.tlsSessionStore=void 0,this._partialResponse="",this._encoding=r,this._socket=this.socket=this._newSocket(),this._dataSocket=void 0}close(){let t=this._task?"User closed client during task":"User closed client",r=new Error(t);this.closeWithError(r)}closeWithError(t){this._closingError||(this._closingError=t,this._closeControlSocket(),this._closeSocket(this._dataSocket),this._passToHandler(t),this._stopTrackingTask())}get closed(){return this.socket.remoteAddress===void 0||this._closingError!==void 0}reset(){this.socket=this._newSocket()}get socket(){return this._socket}set socket(t){this.dataSocket=void 0,this.tlsOptions={},this.tlsSessionStore=void 0,this._partialResponse="",this._socket&&(t.localPort===this._socket.localPort?this._removeSocketListeners(this.socket):this._closeControlSocket()),t&&(this._closingError=void 0,t.setTimeout(0),t.setEncoding(this._encoding),t.setKeepAlive(!0),t.on("data",r=>this._onControlSocketData(r)),t.on("end",()=>this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection."))),t.on("close",r=>{r||this.closeWithError(new Error("Server closed connection unexpectedly."))}),this._setupDefaultErrorHandlers(t,"control socket"),t instanceof c$.TLSSocket&&t.on("session",r=>{this.tlsSessionStore=r})),this._socket=t}get dataSocket(){return this._dataSocket}set dataSocket(t){this._closeSocket(this._dataSocket),t&&(t.setTimeout(0),this._setupDefaultErrorHandlers(t,"data socket")),this._dataSocket=t}get encoding(){return this._encoding}set encoding(t){this._encoding=t,this.socket&&this.socket.setEncoding(t)}send(t){if(/[\r\n\0]/.test(t))throw new Error(`Invalid command: Contains control characters. (${t})`);let i=t.startsWith("PASS")?"> PASS ###":`> ${t}`;this.log(i),this._socket.write(t+`\r
3
3
  `,this.encoding)}request(t){return this.handle(t,(r,i)=>{r instanceof Error?i.reject(r):i.resolve(r)})}handle(t,r){if(this._task){let i=new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");i.stack+=`
4
4
  Running task launched at: ${this._task.stack}`,this.closeWithError(i)}return new Promise((i,n)=>{let o=!1,s=a(()=>{o||(o=!0,this._stopTrackingTask())},"stopTrackingOnce");if(this._task={stack:new Error().stack||"Unknown call stack",responseHandler:r,resolver:{resolve:a(c=>{s(),i(c)},"resolve"),reject:a(c=>{s(),n(c)},"reject")}},this._closingError){let c=new Error(`Client is closed because ${this._closingError.message}`);c.stack+=`
5
- Closing reason: ${this._closingError.stack}`,c.code=this._closingError.code!==void 0?this._closingError.code:"0",this._passToHandler(c);return}this.socket.setTimeout(this.timeout),t&&this.send(t)})}log(t){this.verbose&&console.log(t)}get hasTLS(){return"encrypted"in this._socket}_stopTrackingTask(){this.socket.setTimeout(0),this._task=void 0}_onControlSocketData(t){if(this.log(`< ${t}`),this._partialResponse.length+t.length>KN){this.closeWithError(new Error("FTP control response exceeded maximum allowed size"));return}let r=this._partialResponse+t,i=(0,QN.parseControlResponse)(r);this._partialResponse=i.rest;for(let n of i.messages){let o=parseInt(n.substr(0,3),10),s={code:o,message:n},c=o>=400?new Td(s):void 0;this._passToHandler(c||s)}}_passToHandler(t){this._task&&this._task.responseHandler(t,this._task.resolver)}_setupDefaultErrorHandlers(t,r){t.once("error",i=>{i.message+=` (${r})`,this.closeWithError(i)}),t.once("close",i=>{i&&this.closeWithError(new Error(`Socket closed due to transmission error (${r})`))}),t.once("timeout",()=>{t.destroy(),this.closeWithError(new Error(`Timeout (${r})`))})}_closeControlSocket(){this._removeSocketListeners(this._socket),this._socket.on("error",Pv),this.send("QUIT"),this._closeSocket(this._socket)}_closeSocket(t){t&&(this._removeSocketListeners(t),t.on("error",Pv),t.destroy())}_removeSocketListeners(t){t.removeAllListeners(),t.removeAllListeners("timeout"),t.removeAllListeners("data"),t.removeAllListeners("end"),t.removeAllListeners("error"),t.removeAllListeners("close"),t.removeAllListeners("connect")}_newSocket(){return new VN.Socket}};Es.FTPContext=Cy});var Oy=me(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.describeTLS=GN;go.describeAddress=YN;go.upgradeSocket=XN;go.isLoopback=JN;go.ipIsPrivateV4Address=e$;var Tv=require("tls");function GN(e){if(e instanceof Tv.TLSSocket){let t=e.getProtocol();return t||"Server socket or disconnected client socket"}return"No encryption"}a(GN,"describeTLS");function YN(e){return e.remoteFamily==="IPv6"?`[${e.remoteAddress}]:${e.remotePort}`:`${e.remoteAddress}:${e.remotePort}`}a(YN,"describeAddress");function XN(e,t){return new Promise((r,i)=>{let n=Object.assign({},t,{socket:e}),o=(0,Tv.connect)(n,()=>{n.rejectUnauthorized!==!1&&!o.authorized?i(o.authorizationError):(o.removeAllListeners("error"),r(o))}).once("error",s=>{i(s)})})}a(XN,"upgradeSocket");function JN(e){return e==="::1"||e.startsWith("127.")}a(JN,"isLoopback");function e$(e=""){e.startsWith("::ffff:")&&(e=e.substr(7));let t=e.split(".").map(r=>parseInt(r,10));return t[0]===10||t[0]===172&&t[1]>=16&&t[1]<=31||t[0]===192&&t[1]===168||e==="127.0.0.1"}a(e$,"ipIsPrivateV4Address")});var tu=me(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.FileInfo=bs.FileType=void 0;var As;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=3]="SymbolicLink"})(As||(bs.FileType=As={}));var kd=class{static{a(this,"FileInfo")}constructor(t){this.name=t,this.type=As.Unknown,this.size=0,this.rawModifiedAt="",this.modifiedAt=void 0,this.permissions=void 0,this.hardLinkCount=void 0,this.link=void 0,this.group=void 0,this.user=void 0,this.uniqueID=void 0,this.name=t}get isDirectory(){return this.type===As.Directory}get isSymbolicLink(){return this.type===As.SymbolicLink}get isFile(){return this.type===As.File}get date(){return this.rawModifiedAt}set date(t){this.rawModifiedAt=t}};bs.FileInfo=kd;kd.UnixPermission={Read:4,Write:2,Execute:1}});var Cv=me(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.testLine=t$;ru.parseLine=r$;ru.transformList=n$;var Ny=tu(),kv=new RegExp("^\\s*(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");function t$(e){return/^\d{2}/.test(e)&&kv.test(e)}a(t$,"testLine");function r$(e){let t=e.match(kv);if(t===null)return;let r=t[5];if(r==="."||r==="..")return;let i=new Ny.FileInfo(r);return t[3]==="<DIR>"?(i.type=Ny.FileType.Directory,i.size=0):(i.type=Ny.FileType.File,i.size=parseInt(t[4],10)),i.rawModifiedAt=t[1]+" "+t[2],i}a(r$,"parseLine");function n$(e){return e}a(n$,"transformList")});var Ov=me(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.testLine=a$;nu.parseLine=c$;nu.transformList=u$;var Rn=tu(),i$="\u6708",o$="\u65E5",s$="\u5E74",Rv=new RegExp("^[\\s\\d]*([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+){0,7}?)\\s+)?(?:(\\S+(?:\\s\\S+){0,7})\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}"+i$+"\\s+\\d{1,2}"+o$+"))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}"+s$+"))\\s(.*)");function a$(e){return Rv.test(e)}a(a$,"testLine");function c$(e){let t=e.match(Rv);if(t===null)return;let r=t[21];if(r==="."||r==="..")return;let i=new Rn.FileInfo(r);switch(i.size=parseInt(t[18],10),i.user=t[16],i.group=t[17],i.hardLinkCount=parseInt(t[15],10),i.rawModifiedAt=t[19]+" "+t[20],i.permissions={user:$y(t[4],t[5],t[6]),group:$y(t[8],t[9],t[10]),world:$y(t[12],t[13],t[14])},t[1].charAt(0)){case"d":i.type=Rn.FileType.Directory;break;case"e":i.type=Rn.FileType.SymbolicLink;break;case"l":i.type=Rn.FileType.SymbolicLink;break;case"b":case"c":i.type=Rn.FileType.File;break;case"f":case"-":i.type=Rn.FileType.File;break;default:i.type=Rn.FileType.Unknown}if(i.isSymbolicLink){let n=r.indexOf(" -> ");n!==-1&&(i.name=r.substring(0,n),i.link=r.substring(n+4))}return i}a(c$,"parseLine");function u$(e){return e}a(u$,"transformList");function $y(e,t,r){let i=0;e!=="-"&&(i+=Rn.FileInfo.UnixPermission.Read),t!=="-"&&(i+=Rn.FileInfo.UnixPermission.Write);let n=r.charAt(0);return n!=="-"&&n.toUpperCase()!==n&&(i+=Rn.FileInfo.UnixPermission.Execute),i}a($y,"parseMode")});var Dy=me(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.testLine=f$;Is.parseLine=d$;Is.transformList=p$;Is.parseMLSxDate=Dv;var xs=tu();function Nv(e,t){t.size=parseInt(e,10)}a(Nv,"parseSize");var l$={size:Nv,sizd:Nv,unique:a((e,t)=>{t.uniqueID=e},"unique"),modify:a((e,t)=>{t.modifiedAt=Dv(e),t.rawModifiedAt=t.modifiedAt.toISOString()},"modify"),type:a((e,t)=>{if(e.startsWith("OS.unix=slink"))return t.type=xs.FileType.SymbolicLink,t.link=e.substr(e.indexOf(":")+1),1;switch(e){case"file":t.type=xs.FileType.File;break;case"dir":t.type=xs.FileType.Directory;break;case"OS.unix=symlink":t.type=xs.FileType.SymbolicLink;break;case"cdir":case"pdir":return 2;default:t.type=xs.FileType.Unknown}return 1},"type"),"unix.mode":a((e,t)=>{let r=e.substr(-3);t.permissions={user:parseInt(r[0],10),group:parseInt(r[1],10),world:parseInt(r[2],10)}},"unix.mode"),"unix.ownername":a((e,t)=>{t.user=e},"unix.ownername"),"unix.owner":a((e,t)=>{t.user===void 0&&(t.user=e)},"unix.owner"),get"unix.uid"(){return this["unix.owner"]},"unix.groupname":a((e,t)=>{t.group=e},"unix.groupname"),"unix.group":a((e,t)=>{t.group===void 0&&(t.group=e)},"unix.group"),get"unix.gid"(){return this["unix.group"]}};function $v(e,t){let r=e.indexOf(t),i=e.substr(0,r),n=e.substr(r+t.length);return[i,n]}a($v,"splitStringOnce");function f$(e){return/^\S+=\S+;/.test(e)||e.startsWith(" ")}a(f$,"testLine");function d$(e){let[t,r]=$v(e," ");if(r===""||r==="."||r==="..")return;let i=new xs.FileInfo(r),n=t.split(";");for(let o of n){let[s,c]=$v(o,"=");if(!c)continue;let u=l$[s.toLowerCase()];if(!u)continue;if(u(c,i)===2)return}return i}a(d$,"parseLine");function p$(e){let t=new Map;for(let i of e)!i.isSymbolicLink&&i.uniqueID!==void 0&&t.set(i.uniqueID,i);let r=[];for(let i of e){if(i.isSymbolicLink&&i.uniqueID!==void 0&&i.link===void 0){let o=t.get(i.uniqueID);o!==void 0&&(i.link=o.name)}!i.name.includes("/")&&r.push(i)}return r}a(p$,"transformList");function Dv(e){return new Date(Date.UTC(+e.slice(0,4),+e.slice(4,6)-1,+e.slice(6,8),+e.slice(8,10),+e.slice(10,12),+e.slice(12,14),+e.slice(15,18)))}a(Dv,"parseMLSxDate")});var zy=me(Kn=>{"use strict";var h$=Kn&&Kn.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),g$=Kn&&Kn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),By=Kn&&Kn.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var i=e(t),n=0;n<i.length;n++)i[n]!=="default"&&h$(r,t,i[n]);return g$(r,t),r}})();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.parseList=v$;var m$=By(Cv()),_$=By(Ov()),y$=By(Dy()),E$=[m$,_$,y$];function A$(e,t){return t.find(r=>r.testLine(e)===!0)}a(A$,"firstCompatibleParser");function b$(e){return e.trim()!==""}a(b$,"isNotBlank");function x$(e){return!e.startsWith("total")}a(x$,"isNotMeta");var I$=/\r?\n/;function v$(e){let t=e.split(I$).filter(b$).filter(x$);if(t.length===0)return[];let r=t[t.length-1],i=A$(r,E$);if(!i)throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details.");let n=t.map(i.parseLine).filter(o=>o!==void 0);return i.transformList(n)}a(v$,"parseList")});var Bv=me(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.ProgressTracker=void 0;var Ly=class{static{a(this,"ProgressTracker")}constructor(){this.bytesOverall=0,this.intervalMs=500,this.onStop=Cd,this.onHandle=Cd}reportTo(t=Cd){this.onHandle=t}start(t,r,i){let n=0;this.onStop=S$(this.intervalMs,()=>{let o=t.bytesRead+t.bytesWritten;this.bytesOverall+=o-n,n=o,this.onHandle({name:r,type:i,bytes:o,bytesOverall:this.bytesOverall})})}stop(){this.onStop(!1)}updateAndStop(){this.onStop(!0)}};Rd.ProgressTracker=Ly;function S$(e,t){let r=setInterval(t,e),i=a(n=>{clearInterval(r),n&&t(),t=Cd},"stopFunc");return t(),i}a(S$,"poll");function Cd(){}a(Cd,"noop")});var zv=me(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.StringWriter=void 0;var w$=require("stream"),Uy=class extends w$.Writable{static{a(this,"StringWriter")}constructor(t=1*1024*1024){super(),this.maxByteLength=t,this.byteLength=0,this.bufs=[]}_write(t,r,i){if(!(t instanceof Buffer)){i(new Error("StringWriter: expects chunks of type 'Buffer'."));return}if(this.byteLength+t.byteLength>this.maxByteLength){i(new Error(`StringWriter: Maximum bytes exceeded, maxByteLength=${this.maxByteLength}.`));return}this.byteLength+=t.byteLength,this.bufs.push(t),i(null)}getText(t){return Buffer.concat(this.bufs).toString(t)}};Od.StringWriter=Uy});var Uv=me(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.TransferWatchdog=void 0;var P$=500,T$=4,My=class{static{a(this,"TransferWatchdog")}constructor(){this.timer=void 0}start(t,r,i,n){if(this.stop(),i<=0)return;let o=Math.max(1,Math.min(Math.floor(i/T$),P$)),s=Lv(t),c=0,u=0;this.timer=setInterval(()=>{let l=Lv(t),f=l!==s;if(s=l,!k$(t,r)){c=0,u=i;return}if(f){c=0,u=0;return}c+=o,c>=i+u&&(this.stop(),n())},o),this.timer.unref()}stop(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}};Nd.TransferWatchdog=My;function Lv(e){return e.bytesRead+e.bytesWritten}a(Lv,"countBytes");function k$(e,t){return t==="download"?!e.isPaused():e.writableLength>0}a(k$,"isWaitingForServer")});var Hy=me(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.enterPassiveModeIPv6=R$;On.parseEpsvResponse=Hv;On.enterPassiveModeIPv4=O$;On.enterPassiveModeIPv4_forceControlHostIP=N$;On.parsePasvResponse=Fy;On.connectForPassiveTransfer=Bd;On.uploadFrom=$$;On.downloadTo=D$;var Fv=require("stream"),Mv=require("tls"),C$=Uv(),Ii=Oy(),$d=Pd();async function R$(e){let t=await e.request("EPSV"),r=Hv(t.message);if(!r)throw new Error("Can't parse EPSV response: "+t.message);let i=e.socket.remoteAddress;if(i===void 0)throw new Error("Control socket is disconnected, can't get remote address.");return await Bd(i,r,e),t}a(R$,"enterPassiveModeIPv6");function Hv(e){let t=e.match(/[|!]{3}(.+)[|!]/);if(t===null||t[1]===void 0)throw new Error(`Can't parse response to 'EPSV': ${e}`);let r=parseInt(t[1],10);if(Number.isNaN(r))throw new Error(`Can't parse response to 'EPSV', port is not a number: ${e}`);return r}a(Hv,"parseEpsvResponse");async function O$(e){let t=await e.request("PASV"),r=Fy(t.message);if(!r)throw new Error("Can't parse PASV response: "+t.message);let i=e.socket.remoteAddress;return(0,Ii.ipIsPrivateV4Address)(r.host)&&i&&!(0,Ii.ipIsPrivateV4Address)(i)&&(r.host=i),await Bd(r.host,r.port,e),t}a(O$,"enterPassiveModeIPv4");async function N$(e){let t=await e.request("PASV"),r=Fy(t.message);if(!r)throw new Error("Can't parse PASV response: "+t.message);let i=e.socket.remoteAddress;if(i===void 0)throw new Error("Control socket is disconnected, can't get remote address.");let n=i.replace(/^::ffff:/i,"");if(!(n===r.host||(0,Ii.isLoopback)(n)&&(0,Ii.isLoopback)(r.host)))throw new Error(`PASV returned another host (${r.host}) for data transfer that you have connected to (${i}). Even though the FTP protocol allows this, basic-ftp disables this feature by default for security reasons. If you do need this feature, instantiate the Client with the optional paramter "allowSeparateTransferHost: true". See the README documentation for more information.`);return await Bd(n,r.port,e),t}a(N$,"enterPassiveModeIPv4_forceControlHostIP");function Fy(e){let t=e.match(/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/);if(t===null||t.length!==4)throw new Error(`Can't parse response to 'PASV': ${e}`);return{host:t[1].replace(/,/g,"."),port:(parseInt(t[2],10)&255)*256+(parseInt(t[3],10)&255)}}a(Fy,"parsePasvResponse");function Bd(e,t,r){return new Promise((i,n)=>{let o=r._newSocket(),s=o,c=a(function(l){l.message="Can't open data connection in passive mode: "+l.message,n(l)},"handleConnErr"),u=a(function(){s.destroy(),n(new Error(`Timeout when trying to open data connection to ${e}:${t}`))},"handleTimeout");s.setTimeout(r.timeout),s.on("error",c),s.on("timeout",u),s.connect({port:t,host:e,family:r.ipFamily},()=>{var l;if(r.socket instanceof Mv.TLSSocket){let f=(0,Mv.connect)(Object.assign({},r.tlsOptions,{socket:o,session:(l=r.tlsSessionStore)!==null&&l!==void 0?l:r.socket.getSession()}));f.on("session",p=>{r.tlsSessionStore=p}),s=f}o.setTimeout(0),s.removeListener("error",c),s.removeListener("timeout",u),r.dataSocket=s,i()})})}a(Bd,"connectForPassiveTransfer");var Dd=class{static{a(this,"TransferResolver")}constructor(t,r){this.ftp=t,this.progress=r,this.response=void 0,this.dataTransferDone=!1,this.taskSettled=!1,this.watchdog=new C$.TransferWatchdog}onDataStart(t,r){if(this.ftp.dataSocket===void 0)throw new Error("Data transfer should start but there is no data connection.");this.ftp.socket.setTimeout(0),this.ftp.dataSocket.setTimeout(0),this.watchdog.start(this.ftp.dataSocket,r==="upload"?"upload":"download",this.ftp.timeout,()=>{this.ftp.closeWithError(new Error("Timeout (data socket)"))}),this.progress.start(this.ftp.dataSocket,t,r)}onDataDone(t){this.taskSettled||(this.watchdog.stop(),this.progress.updateAndStop(),this.ftp.socket.setTimeout(this.ftp.timeout),this.dataTransferDone=!0,this.tryResolve(t))}onControlDone(t,r){this.response=r,this.tryResolve(t)}onError(t,r){this.taskSettled||(this.taskSettled=!0,this.watchdog.stop(),this.progress.updateAndStop(),this.ftp.socket.setTimeout(this.ftp.timeout),this.ftp.dataSocket=void 0,t.reject(r))}onUnexpectedRequest(t){let r=new Error(`Unexpected FTP response is requesting an answer: ${t.message}`);this.ftp.closeWithError(r)}tryResolve(t){this.dataTransferDone&&this.response!==void 0&&(this.taskSettled=!0,this.ftp.dataSocket=void 0,t.resolve(this.response))}};function $$(e,t){let r=new Dd(t.ftp,t.tracker),i=`${t.command} ${t.remotePath}`,n=!1;return t.ftp.handle(i,(o,s)=>{if(o instanceof Error)r.onError(s,o);else if(o.code===150||o.code===125){if(n)return;n=!0;let c=t.ftp.dataSocket;if(!c){r.onError(s,new Error("Upload should begin but no data connection is available."));return}let u="getCipher"in c?c.getCipher()!==void 0:!0;B$(u,c,"secureConnect",()=>{t.ftp.log(`Uploading to ${(0,Ii.describeAddress)(c)} (${(0,Ii.describeTLS)(c)})`),r.onDataStart(t.remotePath,t.type),(0,Fv.pipeline)(e,c,l=>{l?r.onError(s,l):r.onDataDone(s)})})}else(0,$d.positiveCompletion)(o.code)?r.onControlDone(s,o):(0,$d.positiveIntermediate)(o.code)&&r.onUnexpectedRequest(o)})}a($$,"uploadFrom");function D$(e,t){if(!t.ftp.dataSocket)throw new Error("Download will be initiated but no data connection is available.");let r=new Dd(t.ftp,t.tracker),i=!1;return t.ftp.handle(t.command,(n,o)=>{if(n instanceof Error)r.onError(o,n);else if(n.code===150||n.code===125){if(i)return;i=!0;let s=t.ftp.dataSocket;if(!s){r.onError(o,new Error("Download should begin but no data connection is available."));return}t.ftp.log(`Downloading from ${(0,Ii.describeAddress)(s)} (${(0,Ii.describeTLS)(s)})`),r.onDataStart(t.remotePath,t.type),(0,Fv.pipeline)(s,e,c=>{c?r.onError(o,c):r.onDataDone(o)})}else n.code===350?t.ftp.send("RETR "+t.remotePath):(0,$d.positiveCompletion)(n.code)?r.onControlDone(o,n):(0,$d.positiveIntermediate)(n.code)&&r.onUnexpectedRequest(n)})}a(D$,"downloadTo");function B$(e,t,r,i){e===!0?i():t.once(r,()=>i())}a(B$,"onConditionOrEvent")});var Zv=me(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.Client=void 0;var Gn=require("fs"),jy=require("path"),z$=require("tls"),_o=require("util"),iu=Ry(),mo=Oy(),Wy=Pd(),L$=zy(),U$=Dy(),M$=Bv(),F$=zv(),vs=Hy(),H$=(0,_o.promisify)(Gn.readdir),j$=(0,_o.promisify)(Gn.mkdir),qy=(0,_o.promisify)(Gn.stat),W$=(0,_o.promisify)(Gn.fstat),jv=(0,_o.promisify)(Gn.open),Wv=(0,_o.promisify)(Gn.close),q$=(0,_o.promisify)(Gn.unlink),qv={allowSeparateTransferHost:!1,maxListingBytes:40*1024*1024},Vv=a(()=>["LIST -a","LIST"],"LIST_COMMANDS_DEFAULT"),V$=a(()=>["MLSD","LIST -a","LIST"],"LIST_COMMANDS_MLSD"),Vy=class{static{a(this,"Client")}constructor(t=3e4,r=qv){this.availableListCommands=Vv();let i={...qv,...r};this.ftp=new iu.FTPContext(t),this.prepareTransfer=this._enterFirstCompatibleMode([vs.enterPassiveModeIPv6,i.allowSeparateTransferHost?vs.enterPassiveModeIPv4:vs.enterPassiveModeIPv4_forceControlHostIP]),this.options=i,this.parseList=L$.parseList,this._progressTracker=new M$.ProgressTracker}close(){this.ftp.close(),this._progressTracker.stop()}get closed(){return this.ftp.closed}connect(t="localhost",r=21){return this.ftp.reset(),this.ftp.socket.connect({host:t,port:r,family:this.ftp.ipFamily},()=>this.ftp.log(`Connected to ${(0,mo.describeAddress)(this.ftp.socket)} (${(0,mo.describeTLS)(this.ftp.socket)})`)),this._handleConnectResponse()}connectImplicitTLS(t="localhost",r=21,i={}){var n;return this.ftp.reset(),i.host=(n=i.host)!==null&&n!==void 0?n:t,this.ftp.socket=(0,z$.connect)(r,t,i,()=>this.ftp.log(`Connected to ${(0,mo.describeAddress)(this.ftp.socket)} (${(0,mo.describeTLS)(this.ftp.socket)})`)),this.ftp.tlsOptions=i,this._handleConnectResponse()}_handleConnectResponse(){return this.ftp.handle(void 0,(t,r)=>{t instanceof Error?r.reject(t):(0,Wy.positiveCompletion)(t.code)?r.resolve(t):r.reject(new iu.FTPError(t))})}send(t,r=!1){return r?(this.ftp.log("Deprecated call using send(command, flag) with boolean flag to ignore errors. Use sendIgnoringError(command)."),this.sendIgnoringError(t)):this.ftp.request(t)}sendIgnoringError(t){return this.ftp.handle(t,(r,i)=>{r instanceof iu.FTPError?i.resolve({code:r.code,message:r.message}):r instanceof Error?i.reject(r):i.resolve(r)})}async useTLS(t={},r="AUTH TLS"){let i=await this.send(r);return this.ftp.socket=await(0,mo.upgradeSocket)(this.ftp.socket,t),this.ftp.tlsOptions=t,this.ftp.log(`Control socket is using: ${(0,mo.describeTLS)(this.ftp.socket)}`),i}login(t="anonymous",r="guest"){return this.ftp.log(`Login security: ${(0,mo.describeTLS)(this.ftp.socket)}`),this.ftp.handle("USER "+t,(i,n)=>{i instanceof Error?n.reject(i):(0,Wy.positiveCompletion)(i.code)?n.resolve(i):i.code===331?this.ftp.send("PASS "+r):n.reject(new iu.FTPError(i))})}async useDefaultSettings(){let r=(await this.features()).has("MLST");this.availableListCommands=r?V$():Vv(),await this.send("TYPE I"),await this.sendIgnoringError("STRU F"),await this.sendIgnoringError("OPTS UTF8 ON"),r&&await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;"),this.ftp.hasTLS&&(await this.sendIgnoringError("PBSZ 0"),await this.sendIgnoringError("PROT P"))}async access(t={}){var r,i;let n=t.secure===!0,o=t.secure==="implicit",s;if(o?s=await this.connectImplicitTLS(t.host,t.port,t.secureOptions):s=await this.connect(t.host,t.port),n){let c=(r=t.secureOptions)!==null&&r!==void 0?r:{};c.host=(i=c.host)!==null&&i!==void 0?i:t.host,await this.useTLS(c)}return await this.sendIgnoringError("OPTS UTF8 ON"),await this.login(t.user,t.password),await this.useDefaultSettings(),s}async pwd(){let t=await this.send("PWD"),r=t.message.match(/"(.+)"/);if(r===null||r[1]===void 0)throw new Error(`Can't parse response to command 'PWD': ${t.message}`);return r[1]}async features(){let t=await this.sendIgnoringError("FEAT"),r=new Map;return t.code<400&&(0,Wy.isMultiline)(t.message)&&t.message.split(`
6
- `).slice(1,-1).forEach(i=>{let n=i.trim().split(" ");r.set(n[0],n[1]||"")}),r}async cd(t){let r=await this.protectWhitespace(t);return this.send("CWD "+r)}async cdup(){return this.send("CDUP")}async lastMod(t){let r=await this.protectWhitespace(t),n=(await this.send(`MDTM ${r}`)).message.slice(4);return(0,U$.parseMLSxDate)(n)}async size(t){let i=`SIZE ${await this.protectWhitespace(t)}`,n=await this.send(i),o=parseInt(n.message.slice(4),10);if(Number.isNaN(o))throw new Error(`Can't parse response to command '${i}' as a numerical value: ${n.message}`);return o}async rename(t,r){let i=await this.protectWhitespace(t),n=await this.protectWhitespace(r);return await this.send("RNFR "+i),this.send("RNTO "+n)}async remove(t,r=!1){let i=await this.protectWhitespace(t);return r?this.sendIgnoringError(`DELE ${i}`):this.send(`DELE ${i}`)}trackProgress(t){this._progressTracker.bytesOverall=0,this._progressTracker.reportTo(t)}async uploadFrom(t,r,i={}){return this._uploadWithCommand(t,r,"STOR",i)}async appendFrom(t,r,i={}){return this._uploadWithCommand(t,r,"APPE",i)}async _uploadWithCommand(t,r,i,n){return typeof t=="string"?this._uploadLocalFile(t,r,i,n):this._uploadFromStream(t,r,i)}async _uploadLocalFile(t,r,i,n){let o=await jv(t,"r"),s=(0,Gn.createReadStream)("",{fd:o,start:n.localStart,end:n.localEndInclusive,autoClose:!1});try{let c=await Q$(o,n),u=await this._uploadFromStream(s,r,i);if(c!==void 0&&s.bytesRead!==c)throw new Error(`Local file "${t}" changed while it was being uploaded to "${r}": expected to send ${c} bytes but sent ${s.bytesRead}. The remote file is incomplete.`);return u}finally{await ou(()=>Wv(o))}}async _uploadFromStream(t,r,i){let n=a(o=>this.ftp.closeWithError(o),"onError");t.once("error",n);try{let o=await this.protectWhitespace(r);return await this.prepareTransfer(this.ftp),await(0,vs.uploadFrom)(t,{ftp:this.ftp,tracker:this._progressTracker,command:i,remotePath:o,type:"upload"})}finally{t.removeListener("error",n)}}async downloadTo(t,r,i=0){return typeof t=="string"?this._downloadToFile(t,r,i):this._downloadToStream(t,r,i)}async _downloadToFile(t,r,i){let n=i>0,s=await jv(t,n?"r+":"w"),c=(0,Gn.createWriteStream)("",{fd:s,start:i,autoClose:!1});try{return await this._downloadToStream(c,r,i)}catch(u){let l=await ou(()=>qy(t)),f=l&&l.size>0;throw!n&&!f&&await ou(()=>q$(t)),u}finally{await ou(()=>Wv(s))}}async _downloadToStream(t,r,i){let n=a(o=>this.ftp.closeWithError(o),"onError");t.once("error",n);try{let o=await this.protectWhitespace(r);return await this.prepareTransfer(this.ftp),await(0,vs.downloadTo)(t,{ftp:this.ftp,tracker:this._progressTracker,command:i>0?`REST ${i}`:`RETR ${o}`,remotePath:o,type:"download"})}finally{t.removeListener("error",n),t.end()}}async list(t=""){let r=await this.protectWhitespace(t),i;for(let n of this.availableListCommands){let o=r===""?n:`${n} ${r}`;await this.prepareTransfer(this.ftp);try{let s=await this._requestListWithCommand(o);return this.availableListCommands=[n],s}catch(s){if(!(s instanceof iu.FTPError))throw s;i=s}}throw i}async _requestListWithCommand(t){let r=new F$.StringWriter(this.options.maxListingBytes);await(0,vs.downloadTo)(r,{ftp:this.ftp,tracker:this._progressTracker,command:t,remotePath:"",type:"list"});let i=r.getText(this.ftp.encoding);return this.ftp.log(i),this.parseList(i)}async removeDir(t){return this._exitAtCurrentDirectory(async()=>{await this.cd(t);let r=await this.pwd();await this.clearWorkingDir(),r==="/"||(await this.cdup(),await this.removeEmptyDir(r))})}async clearWorkingDir(){for(let t of await this.list())t.isDirectory?(await this.cd(t.name),await this.clearWorkingDir(),await this.cdup(),await this.removeEmptyDir(t.name)):await this.remove(t.name)}async uploadFromDir(t,r){return this._exitAtCurrentDirectory(async()=>(r&&await this.ensureDir(r),await this._uploadToWorkingDir(t)))}async _uploadToWorkingDir(t){let r=await H$(t);for(let i of r){let n=(0,jy.join)(t,i),o=await qy(n);o.isFile()?await this.uploadFrom(n,i):o.isDirectory()&&(await this._openDir(i),await this._uploadToWorkingDir(n),await this.cdup())}}async downloadToDir(t,r){return this._exitAtCurrentDirectory(async()=>(r&&await this.cd(r),await this._downloadFromWorkingDir(t)))}async _downloadFromWorkingDir(t){await Z$(t);for(let r of await this.list()){if(!r.name||(0,jy.basename)(r.name)!==r.name){let o=JSON.stringify(r.name);this.ftp.log(`Invalid filename from server listing, will skip file. (${o})`);continue}let n=(0,jy.join)(t,r.name);r.isDirectory?(await this.cd(r.name),await this._downloadFromWorkingDir(n),await this.cdup()):r.isFile&&await this.downloadTo(n,r.name)}}async ensureDir(t){t.startsWith("/")&&await this.cd("/");let r=t.split("/").filter(i=>i!=="");for(let i of r)await this._openDir(i)}async _openDir(t){await this.sendIgnoringError("MKD "+t),await this.cd(t)}async removeEmptyDir(t){let r=await this.protectWhitespace(t);return this.send(`RMD ${r}`)}async protectWhitespace(t){if(!t.startsWith(" "))return t;let r=await this.pwd();return(r.endsWith("/")?r:r+"/")+t}async _exitAtCurrentDirectory(t){let r=await this.pwd();try{return await t()}finally{this.closed||await ou(()=>this.cd(r))}}_enterFirstCompatibleMode(t){return async r=>{r.log("Trying to find optimal transfer strategy...");let i;for(let n of t)try{let o=await n(r);return r.log("Optimal transfer strategy found."),this.prepareTransfer=n,o}catch(o){i=o}throw new Error(`None of the available transfer strategies work. Last error response was '${i}'.`)}}async upload(t,r,i={}){return this.ftp.log("Warning: upload() has been deprecated, use uploadFrom()."),this.uploadFrom(t,r,i)}async append(t,r,i={}){return this.ftp.log("Warning: append() has been deprecated, use appendFrom()."),this.appendFrom(t,r,i)}async download(t,r,i=0){return this.ftp.log("Warning: download() has been deprecated, use downloadTo()."),this.downloadTo(t,r,i)}async uploadDir(t,r){return this.ftp.log("Warning: uploadDir() has been deprecated, use uploadFromDir()."),this.uploadFromDir(t,r)}async downloadDir(t){return this.ftp.log("Warning: downloadDir() has been deprecated, use downloadToDir()."),this.downloadToDir(t)}};zd.Client=Vy;async function Z$(e){try{await qy(e)}catch{await j$(e,{recursive:!0})}}a(Z$,"ensureLocalDirectory");async function Q$(e,t){var r;let i=await W$(e);if(!i.isFile())return;let n=(r=t.localStart)!==null&&r!==void 0?r:0,o=t.localEndInclusive!==void 0?Math.min(t.localEndInclusive+1,i.size):i.size;return Math.max(0,o-n)}a(Q$,"expectedBytesFromLocalFile");async function ou(e){try{return await e()}catch{return}}a(ou,"ignoreError")});var Kv=me(Qv=>{"use strict";Object.defineProperty(Qv,"__esModule",{value:!0})});var Nn=me(Ur=>{"use strict";var K$=Ur&&Ur.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),su=Ur&&Ur.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&K$(t,e,r)};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.enterPassiveModeIPv6=Ur.enterPassiveModeIPv4=void 0;su(Zv(),Ur);su(Ry(),Ur);su(tu(),Ur);su(zy(),Ur);su(Kv(),Ur);var Gv=Hy();Object.defineProperty(Ur,"enterPassiveModeIPv4",{enumerable:!0,get:a(function(){return Gv.enterPassiveModeIPv4},"get")});Object.defineProperty(Ur,"enterPassiveModeIPv6",{enumerable:!0,get:a(function(){return Gv.enterPassiveModeIPv6},"get")})});var Ld=me((_Q,Yv)=>{Yv.exports={newInvalidAsn1Error:a(function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t},"newInvalidAsn1Error")}});var Ud=me((EQ,Xv)=>{Xv.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}});var Zy=me((AQ,Jv)=>{"use strict";var Md=require("buffer"),Ss=Md.Buffer,dn={},pn;for(pn in Md)Md.hasOwnProperty(pn)&&(pn==="SlowBuffer"||pn==="Buffer"||(dn[pn]=Md[pn]));var ws=dn.Buffer={};for(pn in Ss)Ss.hasOwnProperty(pn)&&(pn==="allocUnsafe"||pn==="allocUnsafeSlow"||(ws[pn]=Ss[pn]));dn.Buffer.prototype=Ss.prototype;(!ws.from||ws.from===Uint8Array.from)&&(ws.from=function(e,t,r){if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&typeof e.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return Ss(e,t,r)});ws.alloc||(ws.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=Ss(e);return!t||t.length===0?i.fill(0):typeof r=="string"?i.fill(t,r):i.fill(t),i});if(!dn.kStringMaxLength)try{dn.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}dn.constants||(dn.constants={MAX_LENGTH:dn.kMaxLength},dn.kStringMaxLength&&(dn.constants.MAX_STRING_LENGTH=dn.kStringMaxLength));Jv.exports=dn});var rS=me((bQ,tS)=>{var G$=require("assert"),eS=Zy().Buffer,au=Ud(),Y$=Ld(),Ps=Y$.newInvalidAsn1Error;function Mr(e){if(!e||!eS.isBuffer(e))throw new TypeError("data must be a node Buffer");this._buf=e,this._size=e.length,this._len=0,this._offset=0}a(Mr,"Reader");Object.defineProperty(Mr.prototype,"length",{enumerable:!0,get:a(function(){return this._len},"get")});Object.defineProperty(Mr.prototype,"offset",{enumerable:!0,get:a(function(){return this._offset},"get")});Object.defineProperty(Mr.prototype,"remain",{get:a(function(){return this._size-this._offset},"get")});Object.defineProperty(Mr.prototype,"buffer",{get:a(function(){return this._buf.slice(this._offset)},"get")});Mr.prototype.readByte=function(e){if(this._size-this._offset<1)return null;var t=this._buf[this._offset]&255;return e||(this._offset+=1),t};Mr.prototype.peek=function(){return this.readByte(!0)};Mr.prototype.readLength=function(e){if(e===void 0&&(e=this._offset),e>=this._size)return null;var t=this._buf[e++]&255;if(t===null)return null;if((t&128)===128){if(t&=127,t===0)throw Ps("Indefinite length not supported");if(t>4)throw Ps("encoding too long");if(this._size-e<t)return null;this._len=0;for(var r=0;r<t;r++)this._len=(this._len<<8)+(this._buf[e++]&255)}else this._len=t;return e};Mr.prototype.readSequence=function(e){var t=this.peek();if(t===null)return null;if(e!==void 0&&e!==t)throw Ps("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);return r===null?null:(this._offset=r,t)};Mr.prototype.readInt=function(){return this._readTag(au.Integer)};Mr.prototype.readBoolean=function(){return this._readTag(au.Boolean)!==0};Mr.prototype.readEnumeration=function(){return this._readTag(au.Enumeration)};Mr.prototype.readString=function(e,t){e||(e=au.OctetString);var r=this.peek();if(r===null)return null;if(r!==e)throw Ps("Expected 0x"+e.toString(16)+": got 0x"+r.toString(16));var i=this.readLength(this._offset+1);if(i===null||this.length>this._size-i)return null;if(this._offset=i,this.length===0)return t?eS.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?n:n.toString("utf8")};Mr.prototype.readOID=function(e){e||(e=au.OID);var t=this.readString(e,!0);if(t===null)return null;for(var r=[],i=0,n=0;n<t.length;n++){var o=t[n]&255;i<<=7,i+=o&127,(o&128)===0&&(r.push(i),i=0)}return i=r.shift(),r.unshift(i%40),r.unshift(i/40>>0),r.join(".")};Mr.prototype._readTag=function(e){G$.ok(e!==void 0);var t=this.peek();if(t===null)return null;if(t!==e)throw Ps("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(r===null)return null;if(this.length>4)throw Ps("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var i=this._buf[this._offset],n=0,o=0;o<this.length;o++)n<<=8,n|=this._buf[this._offset++]&255;return(i&128)===128&&o!==4&&(n-=1<<o*8),n>>0};tS.exports=Mr});var iS=me((IQ,nS)=>{var vi=require("assert"),Fd=Zy().Buffer,Si=Ud(),X$=Ld(),Hd=X$.newInvalidAsn1Error,J$={size:1024,growthFactor:8};function e4(e,t){vi.ok(e),vi.equal(typeof e,"object"),vi.ok(t),vi.equal(typeof t,"object");var r=Object.getOwnPropertyNames(e);return r.forEach(function(i){if(!t[i]){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n)}}),t}a(e4,"merge");function Or(e){e=e4(J$,e||{}),this._buf=Fd.alloc(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}a(Or,"Writer");Object.defineProperty(Or.prototype,"buffer",{get:a(function(){if(this._seq.length)throw Hd(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)},"get")});Or.prototype.writeByte=function(e){if(typeof e!="number")throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e};Or.prototype.writeInt=function(e,t){if(typeof e!="number")throw new TypeError("argument must be a Number");typeof t!="number"&&(t=Si.Integer);for(var r=4;((e&4286578688)===0||(e&4286578688)===-8388608)&&r>1;)r--,e<<=8;if(r>4)throw Hd("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(e&4278190080)>>>24,e<<=8};Or.prototype.writeNull=function(){this.writeByte(Si.Null),this.writeByte(0)};Or.prototype.writeEnumeration=function(e,t){if(typeof e!="number")throw new TypeError("argument must be a Number");return typeof t!="number"&&(t=Si.Enumeration),this.writeInt(e,t)};Or.prototype.writeBoolean=function(e,t){if(typeof e!="boolean")throw new TypeError("argument must be a Boolean");typeof t!="number"&&(t=Si.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0};Or.prototype.writeString=function(e,t){if(typeof e!="string")throw new TypeError("argument must be a string (was: "+typeof e+")");typeof t!="number"&&(t=Si.OctetString);var r=Fd.byteLength(e);this.writeByte(t),this.writeLength(r),r&&(this._ensure(r),this._buf.write(e,this._offset),this._offset+=r)};Or.prototype.writeBuffer=function(e,t){if(typeof t!="number")throw new TypeError("tag must be a number");if(!Fd.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length};Or.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach(function(r){t.writeString(r)})};Or.prototype.writeOID=function(e,t){if(typeof e!="string")throw new TypeError("argument must be a string");if(typeof t!="number"&&(t=Si.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");function r(s,c){c<128?s.push(c):c<16384?(s.push(c>>>7|128),s.push(c&127)):c<2097152?(s.push(c>>>14|128),s.push((c>>>7|128)&255),s.push(c&127)):c<268435456?(s.push(c>>>21|128),s.push((c>>>14|128)&255),s.push((c>>>7|128)&255),s.push(c&127)):(s.push((c>>>28|128)&255),s.push((c>>>21|128)&255),s.push((c>>>14|128)&255),s.push((c>>>7|128)&255),s.push(c&127))}a(r,"encodeOctet");var i=e.split("."),n=[];n.push(parseInt(i[0],10)*40+parseInt(i[1],10)),i.slice(2).forEach(function(s){r(n,parseInt(s,10))});var o=this;this._ensure(2+n.length),this.writeByte(t),this.writeLength(n.length),n.forEach(function(s){o.writeByte(s)})};Or.prototype.writeLength=function(e){if(typeof e!="number")throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else if(e<=16777215)this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else throw Hd("Length too long (> 4 bytes)")};Or.prototype.startSequence=function(e){typeof e!="number"&&(e=Si.Sequence|Si.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3};Or.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else if(r<=16777215)this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r;else throw Hd("Sequence too long")};Or.prototype._shift=function(e,t,r){vi.ok(e!==void 0),vi.ok(t!==void 0),vi.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r};Or.prototype._ensure=function(e){if(vi.ok(e),this._size-this._offset<e){var t=this._size*this._options.growthFactor;t-this._offset<e&&(t+=e);var r=Fd.alloc(t);this._buf.copy(r,0,0,this._offset),this._buf=r,this._size=t}};nS.exports=Or});var oS=me((SQ,qd)=>{var Qy=Ld(),Ky=Ud(),t4=rS(),r4=iS();qd.exports={Reader:t4,Writer:r4};for(jd in Ky)Ky.hasOwnProperty(jd)&&(qd.exports[jd]=Ky[jd]);var jd;for(Wd in Qy)Qy.hasOwnProperty(Wd)&&(qd.exports[Wd]=Qy[Wd]);var Wd});var cu=me((wQ,sS)=>{var Gy=oS();sS.exports={Ber:Gy,BerReader:Gy.Reader,BerWriter:Gy.Writer}});var aS=me((PQ,Vd)=>{(function(e){"use strict";var t=a(function(m){var A,E=new Float64Array(16);if(m)for(A=0;A<m.length;A++)E[A]=m[A];return E},"gf"),r=a(function(){throw new Error("no PRNG")},"randombytes"),i=new Uint8Array(16),n=new Uint8Array(32);n[0]=9;var o=t(),s=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(m,A,E,d){m[A]=E>>24&255,m[A+1]=E>>16&255,m[A+2]=E>>8&255,m[A+3]=E&255,m[A+4]=d>>24&255,m[A+5]=d>>16&255,m[A+6]=d>>8&255,m[A+7]=d&255}a(h,"ts64");function _(m,A,E,d,x){var D,F=0;for(D=0;D<x;D++)F|=m[A+D]^E[d+D];return(1&F-1>>>8)-1}a(_,"vn");function y(m,A,E,d){return _(m,A,E,d,16)}a(y,"crypto_verify_16");function b(m,A,E,d){return _(m,A,E,d,32)}a(b,"crypto_verify_32");function v(m,A,E,d){for(var x=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,D=E[0]&255|(E[1]&255)<<8|(E[2]&255)<<16|(E[3]&255)<<24,F=E[4]&255|(E[5]&255)<<8|(E[6]&255)<<16|(E[7]&255)<<24,se=E[8]&255|(E[9]&255)<<8|(E[10]&255)<<16|(E[11]&255)<<24,he=E[12]&255|(E[13]&255)<<8|(E[14]&255)<<16|(E[15]&255)<<24,we=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,be=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,It=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,Se=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ze=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,rt=E[16]&255|(E[17]&255)<<8|(E[18]&255)<<16|(E[19]&255)<<24,tt=E[20]&255|(E[21]&255)<<8|(E[22]&255)<<16|(E[23]&255)<<24,Ke=E[24]&255|(E[25]&255)<<8|(E[26]&255)<<16|(E[27]&255)<<24,Je=E[28]&255|(E[29]&255)<<8|(E[30]&255)<<16|(E[31]&255)<<24,Ge=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,Pe=x,Ce=D,Ie=F,Te=se,ke=he,Ae=we,K=be,G=It,ce=Se,oe=Ze,ae=Qe,de=rt,Be=tt,nt=Ke,ct=Je,it=Ge,w,lt=0;lt<20;lt+=2)w=Pe+Be|0,ke^=w<<7|w>>>25,w=ke+Pe|0,ce^=w<<9|w>>>23,w=ce+ke|0,Be^=w<<13|w>>>19,w=Be+ce|0,Pe^=w<<18|w>>>14,w=Ae+Ce|0,oe^=w<<7|w>>>25,w=oe+Ae|0,nt^=w<<9|w>>>23,w=nt+oe|0,Ce^=w<<13|w>>>19,w=Ce+nt|0,Ae^=w<<18|w>>>14,w=ae+K|0,ct^=w<<7|w>>>25,w=ct+ae|0,Ie^=w<<9|w>>>23,w=Ie+ct|0,K^=w<<13|w>>>19,w=K+Ie|0,ae^=w<<18|w>>>14,w=it+de|0,Te^=w<<7|w>>>25,w=Te+it|0,G^=w<<9|w>>>23,w=G+Te|0,de^=w<<13|w>>>19,w=de+G|0,it^=w<<18|w>>>14,w=Pe+Te|0,Ce^=w<<7|w>>>25,w=Ce+Pe|0,Ie^=w<<9|w>>>23,w=Ie+Ce|0,Te^=w<<13|w>>>19,w=Te+Ie|0,Pe^=w<<18|w>>>14,w=Ae+ke|0,K^=w<<7|w>>>25,w=K+Ae|0,G^=w<<9|w>>>23,w=G+K|0,ke^=w<<13|w>>>19,w=ke+G|0,Ae^=w<<18|w>>>14,w=ae+oe|0,de^=w<<7|w>>>25,w=de+ae|0,ce^=w<<9|w>>>23,w=ce+de|0,oe^=w<<13|w>>>19,w=oe+ce|0,ae^=w<<18|w>>>14,w=it+ct|0,Be^=w<<7|w>>>25,w=Be+it|0,nt^=w<<9|w>>>23,w=nt+Be|0,ct^=w<<13|w>>>19,w=ct+nt|0,it^=w<<18|w>>>14;Pe=Pe+x|0,Ce=Ce+D|0,Ie=Ie+F|0,Te=Te+se|0,ke=ke+he|0,Ae=Ae+we|0,K=K+be|0,G=G+It|0,ce=ce+Se|0,oe=oe+Ze|0,ae=ae+Qe|0,de=de+rt|0,Be=Be+tt|0,nt=nt+Ke|0,ct=ct+Je|0,it=it+Ge|0,m[0]=Pe>>>0&255,m[1]=Pe>>>8&255,m[2]=Pe>>>16&255,m[3]=Pe>>>24&255,m[4]=Ce>>>0&255,m[5]=Ce>>>8&255,m[6]=Ce>>>16&255,m[7]=Ce>>>24&255,m[8]=Ie>>>0&255,m[9]=Ie>>>8&255,m[10]=Ie>>>16&255,m[11]=Ie>>>24&255,m[12]=Te>>>0&255,m[13]=Te>>>8&255,m[14]=Te>>>16&255,m[15]=Te>>>24&255,m[16]=ke>>>0&255,m[17]=ke>>>8&255,m[18]=ke>>>16&255,m[19]=ke>>>24&255,m[20]=Ae>>>0&255,m[21]=Ae>>>8&255,m[22]=Ae>>>16&255,m[23]=Ae>>>24&255,m[24]=K>>>0&255,m[25]=K>>>8&255,m[26]=K>>>16&255,m[27]=K>>>24&255,m[28]=G>>>0&255,m[29]=G>>>8&255,m[30]=G>>>16&255,m[31]=G>>>24&255,m[32]=ce>>>0&255,m[33]=ce>>>8&255,m[34]=ce>>>16&255,m[35]=ce>>>24&255,m[36]=oe>>>0&255,m[37]=oe>>>8&255,m[38]=oe>>>16&255,m[39]=oe>>>24&255,m[40]=ae>>>0&255,m[41]=ae>>>8&255,m[42]=ae>>>16&255,m[43]=ae>>>24&255,m[44]=de>>>0&255,m[45]=de>>>8&255,m[46]=de>>>16&255,m[47]=de>>>24&255,m[48]=Be>>>0&255,m[49]=Be>>>8&255,m[50]=Be>>>16&255,m[51]=Be>>>24&255,m[52]=nt>>>0&255,m[53]=nt>>>8&255,m[54]=nt>>>16&255,m[55]=nt>>>24&255,m[56]=ct>>>0&255,m[57]=ct>>>8&255,m[58]=ct>>>16&255,m[59]=ct>>>24&255,m[60]=it>>>0&255,m[61]=it>>>8&255,m[62]=it>>>16&255,m[63]=it>>>24&255}a(v,"core_salsa20");function S(m,A,E,d){for(var x=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,D=E[0]&255|(E[1]&255)<<8|(E[2]&255)<<16|(E[3]&255)<<24,F=E[4]&255|(E[5]&255)<<8|(E[6]&255)<<16|(E[7]&255)<<24,se=E[8]&255|(E[9]&255)<<8|(E[10]&255)<<16|(E[11]&255)<<24,he=E[12]&255|(E[13]&255)<<8|(E[14]&255)<<16|(E[15]&255)<<24,we=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,be=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,It=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,Se=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ze=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,rt=E[16]&255|(E[17]&255)<<8|(E[18]&255)<<16|(E[19]&255)<<24,tt=E[20]&255|(E[21]&255)<<8|(E[22]&255)<<16|(E[23]&255)<<24,Ke=E[24]&255|(E[25]&255)<<8|(E[26]&255)<<16|(E[27]&255)<<24,Je=E[28]&255|(E[29]&255)<<8|(E[30]&255)<<16|(E[31]&255)<<24,Ge=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,Pe=x,Ce=D,Ie=F,Te=se,ke=he,Ae=we,K=be,G=It,ce=Se,oe=Ze,ae=Qe,de=rt,Be=tt,nt=Ke,ct=Je,it=Ge,w,lt=0;lt<20;lt+=2)w=Pe+Be|0,ke^=w<<7|w>>>25,w=ke+Pe|0,ce^=w<<9|w>>>23,w=ce+ke|0,Be^=w<<13|w>>>19,w=Be+ce|0,Pe^=w<<18|w>>>14,w=Ae+Ce|0,oe^=w<<7|w>>>25,w=oe+Ae|0,nt^=w<<9|w>>>23,w=nt+oe|0,Ce^=w<<13|w>>>19,w=Ce+nt|0,Ae^=w<<18|w>>>14,w=ae+K|0,ct^=w<<7|w>>>25,w=ct+ae|0,Ie^=w<<9|w>>>23,w=Ie+ct|0,K^=w<<13|w>>>19,w=K+Ie|0,ae^=w<<18|w>>>14,w=it+de|0,Te^=w<<7|w>>>25,w=Te+it|0,G^=w<<9|w>>>23,w=G+Te|0,de^=w<<13|w>>>19,w=de+G|0,it^=w<<18|w>>>14,w=Pe+Te|0,Ce^=w<<7|w>>>25,w=Ce+Pe|0,Ie^=w<<9|w>>>23,w=Ie+Ce|0,Te^=w<<13|w>>>19,w=Te+Ie|0,Pe^=w<<18|w>>>14,w=Ae+ke|0,K^=w<<7|w>>>25,w=K+Ae|0,G^=w<<9|w>>>23,w=G+K|0,ke^=w<<13|w>>>19,w=ke+G|0,Ae^=w<<18|w>>>14,w=ae+oe|0,de^=w<<7|w>>>25,w=de+ae|0,ce^=w<<9|w>>>23,w=ce+de|0,oe^=w<<13|w>>>19,w=oe+ce|0,ae^=w<<18|w>>>14,w=it+ct|0,Be^=w<<7|w>>>25,w=Be+it|0,nt^=w<<9|w>>>23,w=nt+Be|0,ct^=w<<13|w>>>19,w=ct+nt|0,it^=w<<18|w>>>14;m[0]=Pe>>>0&255,m[1]=Pe>>>8&255,m[2]=Pe>>>16&255,m[3]=Pe>>>24&255,m[4]=Ae>>>0&255,m[5]=Ae>>>8&255,m[6]=Ae>>>16&255,m[7]=Ae>>>24&255,m[8]=ae>>>0&255,m[9]=ae>>>8&255,m[10]=ae>>>16&255,m[11]=ae>>>24&255,m[12]=it>>>0&255,m[13]=it>>>8&255,m[14]=it>>>16&255,m[15]=it>>>24&255,m[16]=K>>>0&255,m[17]=K>>>8&255,m[18]=K>>>16&255,m[19]=K>>>24&255,m[20]=G>>>0&255,m[21]=G>>>8&255,m[22]=G>>>16&255,m[23]=G>>>24&255,m[24]=ce>>>0&255,m[25]=ce>>>8&255,m[26]=ce>>>16&255,m[27]=ce>>>24&255,m[28]=oe>>>0&255,m[29]=oe>>>8&255,m[30]=oe>>>16&255,m[31]=oe>>>24&255}a(S,"core_hsalsa20");function M(m,A,E,d){v(m,A,E,d)}a(M,"crypto_core_salsa20");function R(m,A,E,d){S(m,A,E,d)}a(R,"crypto_core_hsalsa20");var J=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function te(m,A,E,d,x,D,F){var se=new Uint8Array(16),he=new Uint8Array(64),we,be;for(be=0;be<16;be++)se[be]=0;for(be=0;be<8;be++)se[be]=D[be];for(;x>=64;){for(M(he,se,F,J),be=0;be<64;be++)m[A+be]=E[d+be]^he[be];for(we=1,be=8;be<16;be++)we=we+(se[be]&255)|0,se[be]=we&255,we>>>=8;x-=64,A+=64,d+=64}if(x>0)for(M(he,se,F,J),be=0;be<x;be++)m[A+be]=E[d+be]^he[be];return 0}a(te,"crypto_stream_salsa20_xor");function ee(m,A,E,d,x){var D=new Uint8Array(16),F=new Uint8Array(64),se,he;for(he=0;he<16;he++)D[he]=0;for(he=0;he<8;he++)D[he]=d[he];for(;E>=64;){for(M(F,D,x,J),he=0;he<64;he++)m[A+he]=F[he];for(se=1,he=8;he<16;he++)se=se+(D[he]&255)|0,D[he]=se&255,se>>>=8;E-=64,A+=64}if(E>0)for(M(F,D,x,J),he=0;he<E;he++)m[A+he]=F[he];return 0}a(ee,"crypto_stream_salsa20");function P(m,A,E,d,x){var D=new Uint8Array(32);R(D,d,x,J);for(var F=new Uint8Array(8),se=0;se<8;se++)F[se]=d[se+16];return ee(m,A,E,F,D)}a(P,"crypto_stream");function C(m,A,E,d,x,D,F){var se=new Uint8Array(32);R(se,D,F,J);for(var he=new Uint8Array(8),we=0;we<8;we++)he[we]=D[we+16];return te(m,A,E,d,x,he,se)}a(C,"crypto_stream_xor");var H=a(function(m){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var A,E,d,x,D,F,se,he;A=m[0]&255|(m[1]&255)<<8,this.r[0]=A&8191,E=m[2]&255|(m[3]&255)<<8,this.r[1]=(A>>>13|E<<3)&8191,d=m[4]&255|(m[5]&255)<<8,this.r[2]=(E>>>10|d<<6)&7939,x=m[6]&255|(m[7]&255)<<8,this.r[3]=(d>>>7|x<<9)&8191,D=m[8]&255|(m[9]&255)<<8,this.r[4]=(x>>>4|D<<12)&255,this.r[5]=D>>>1&8190,F=m[10]&255|(m[11]&255)<<8,this.r[6]=(D>>>14|F<<2)&8191,se=m[12]&255|(m[13]&255)<<8,this.r[7]=(F>>>11|se<<5)&8065,he=m[14]&255|(m[15]&255)<<8,this.r[8]=(se>>>8|he<<8)&8191,this.r[9]=he>>>5&127,this.pad[0]=m[16]&255|(m[17]&255)<<8,this.pad[1]=m[18]&255|(m[19]&255)<<8,this.pad[2]=m[20]&255|(m[21]&255)<<8,this.pad[3]=m[22]&255|(m[23]&255)<<8,this.pad[4]=m[24]&255|(m[25]&255)<<8,this.pad[5]=m[26]&255|(m[27]&255)<<8,this.pad[6]=m[28]&255|(m[29]&255)<<8,this.pad[7]=m[30]&255|(m[31]&255)<<8},"poly1305");H.prototype.blocks=function(m,A,E){for(var d=this.fin?0:2048,x,D,F,se,he,we,be,It,Se,Ze,Qe,rt,tt,Ke,Je,Ge,Pe,Ce,Ie,Te=this.h[0],ke=this.h[1],Ae=this.h[2],K=this.h[3],G=this.h[4],ce=this.h[5],oe=this.h[6],ae=this.h[7],de=this.h[8],Be=this.h[9],nt=this.r[0],ct=this.r[1],it=this.r[2],w=this.r[3],lt=this.r[4],vt=this.r[5],St=this.r[6],ut=this.r[7],Et=this.r[8],At=this.r[9];E>=16;)x=m[A+0]&255|(m[A+1]&255)<<8,Te+=x&8191,D=m[A+2]&255|(m[A+3]&255)<<8,ke+=(x>>>13|D<<3)&8191,F=m[A+4]&255|(m[A+5]&255)<<8,Ae+=(D>>>10|F<<6)&8191,se=m[A+6]&255|(m[A+7]&255)<<8,K+=(F>>>7|se<<9)&8191,he=m[A+8]&255|(m[A+9]&255)<<8,G+=(se>>>4|he<<12)&8191,ce+=he>>>1&8191,we=m[A+10]&255|(m[A+11]&255)<<8,oe+=(he>>>14|we<<2)&8191,be=m[A+12]&255|(m[A+13]&255)<<8,ae+=(we>>>11|be<<5)&8191,It=m[A+14]&255|(m[A+15]&255)<<8,de+=(be>>>8|It<<8)&8191,Be+=It>>>5|d,Se=0,Ze=Se,Ze+=Te*nt,Ze+=ke*(5*At),Ze+=Ae*(5*Et),Ze+=K*(5*ut),Ze+=G*(5*St),Se=Ze>>>13,Ze&=8191,Ze+=ce*(5*vt),Ze+=oe*(5*lt),Ze+=ae*(5*w),Ze+=de*(5*it),Ze+=Be*(5*ct),Se+=Ze>>>13,Ze&=8191,Qe=Se,Qe+=Te*ct,Qe+=ke*nt,Qe+=Ae*(5*At),Qe+=K*(5*Et),Qe+=G*(5*ut),Se=Qe>>>13,Qe&=8191,Qe+=ce*(5*St),Qe+=oe*(5*vt),Qe+=ae*(5*lt),Qe+=de*(5*w),Qe+=Be*(5*it),Se+=Qe>>>13,Qe&=8191,rt=Se,rt+=Te*it,rt+=ke*ct,rt+=Ae*nt,rt+=K*(5*At),rt+=G*(5*Et),Se=rt>>>13,rt&=8191,rt+=ce*(5*ut),rt+=oe*(5*St),rt+=ae*(5*vt),rt+=de*(5*lt),rt+=Be*(5*w),Se+=rt>>>13,rt&=8191,tt=Se,tt+=Te*w,tt+=ke*it,tt+=Ae*ct,tt+=K*nt,tt+=G*(5*At),Se=tt>>>13,tt&=8191,tt+=ce*(5*Et),tt+=oe*(5*ut),tt+=ae*(5*St),tt+=de*(5*vt),tt+=Be*(5*lt),Se+=tt>>>13,tt&=8191,Ke=Se,Ke+=Te*lt,Ke+=ke*w,Ke+=Ae*it,Ke+=K*ct,Ke+=G*nt,Se=Ke>>>13,Ke&=8191,Ke+=ce*(5*At),Ke+=oe*(5*Et),Ke+=ae*(5*ut),Ke+=de*(5*St),Ke+=Be*(5*vt),Se+=Ke>>>13,Ke&=8191,Je=Se,Je+=Te*vt,Je+=ke*lt,Je+=Ae*w,Je+=K*it,Je+=G*ct,Se=Je>>>13,Je&=8191,Je+=ce*nt,Je+=oe*(5*At),Je+=ae*(5*Et),Je+=de*(5*ut),Je+=Be*(5*St),Se+=Je>>>13,Je&=8191,Ge=Se,Ge+=Te*St,Ge+=ke*vt,Ge+=Ae*lt,Ge+=K*w,Ge+=G*it,Se=Ge>>>13,Ge&=8191,Ge+=ce*ct,Ge+=oe*nt,Ge+=ae*(5*At),Ge+=de*(5*Et),Ge+=Be*(5*ut),Se+=Ge>>>13,Ge&=8191,Pe=Se,Pe+=Te*ut,Pe+=ke*St,Pe+=Ae*vt,Pe+=K*lt,Pe+=G*w,Se=Pe>>>13,Pe&=8191,Pe+=ce*it,Pe+=oe*ct,Pe+=ae*nt,Pe+=de*(5*At),Pe+=Be*(5*Et),Se+=Pe>>>13,Pe&=8191,Ce=Se,Ce+=Te*Et,Ce+=ke*ut,Ce+=Ae*St,Ce+=K*vt,Ce+=G*lt,Se=Ce>>>13,Ce&=8191,Ce+=ce*w,Ce+=oe*it,Ce+=ae*ct,Ce+=de*nt,Ce+=Be*(5*At),Se+=Ce>>>13,Ce&=8191,Ie=Se,Ie+=Te*At,Ie+=ke*Et,Ie+=Ae*ut,Ie+=K*St,Ie+=G*vt,Se=Ie>>>13,Ie&=8191,Ie+=ce*lt,Ie+=oe*w,Ie+=ae*it,Ie+=de*ct,Ie+=Be*nt,Se+=Ie>>>13,Ie&=8191,Se=(Se<<2)+Se|0,Se=Se+Ze|0,Ze=Se&8191,Se=Se>>>13,Qe+=Se,Te=Ze,ke=Qe,Ae=rt,K=tt,G=Ke,ce=Je,oe=Ge,ae=Pe,de=Ce,Be=Ie,A+=16,E-=16;this.h[0]=Te,this.h[1]=ke,this.h[2]=Ae,this.h[3]=K,this.h[4]=G,this.h[5]=ce,this.h[6]=oe,this.h[7]=ae,this.h[8]=de,this.h[9]=Be},H.prototype.finish=function(m,A){var E=new Uint16Array(10),d,x,D,F;if(this.leftover){for(F=this.leftover,this.buffer[F++]=1;F<16;F++)this.buffer[F]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(d=this.h[1]>>>13,this.h[1]&=8191,F=2;F<10;F++)this.h[F]+=d,d=this.h[F]>>>13,this.h[F]&=8191;for(this.h[0]+=d*5,d=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=d,d=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=d,E[0]=this.h[0]+5,d=E[0]>>>13,E[0]&=8191,F=1;F<10;F++)E[F]=this.h[F]+d,d=E[F]>>>13,E[F]&=8191;for(E[9]-=8192,x=(d^1)-1,F=0;F<10;F++)E[F]&=x;for(x=~x,F=0;F<10;F++)this.h[F]=this.h[F]&x|E[F];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,D=this.h[0]+this.pad[0],this.h[0]=D&65535,F=1;F<8;F++)D=(this.h[F]+this.pad[F]|0)+(D>>>16)|0,this.h[F]=D&65535;m[A+0]=this.h[0]>>>0&255,m[A+1]=this.h[0]>>>8&255,m[A+2]=this.h[1]>>>0&255,m[A+3]=this.h[1]>>>8&255,m[A+4]=this.h[2]>>>0&255,m[A+5]=this.h[2]>>>8&255,m[A+6]=this.h[3]>>>0&255,m[A+7]=this.h[3]>>>8&255,m[A+8]=this.h[4]>>>0&255,m[A+9]=this.h[4]>>>8&255,m[A+10]=this.h[5]>>>0&255,m[A+11]=this.h[5]>>>8&255,m[A+12]=this.h[6]>>>0&255,m[A+13]=this.h[6]>>>8&255,m[A+14]=this.h[7]>>>0&255,m[A+15]=this.h[7]>>>8&255},H.prototype.update=function(m,A,E){var d,x;if(this.leftover){for(x=16-this.leftover,x>E&&(x=E),d=0;d<x;d++)this.buffer[this.leftover+d]=m[A+d];if(E-=x,A+=x,this.leftover+=x,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(E>=16&&(x=E-E%16,this.blocks(m,A,x),A+=x,E-=x),E){for(d=0;d<E;d++)this.buffer[this.leftover+d]=m[A+d];this.leftover+=E}};function U(m,A,E,d,x,D){var F=new H(D);return F.update(E,d,x),F.finish(m,A),0}a(U,"crypto_onetimeauth");function k(m,A,E,d,x,D){var F=new Uint8Array(16);return U(F,0,E,d,x,D),y(m,A,F,0)}a(k,"crypto_onetimeauth_verify");function j(m,A,E,d,x){var D;if(E<32)return-1;for(C(m,0,A,0,E,d,x),U(m,16,m,32,E-32,m),D=0;D<16;D++)m[D]=0;return 0}a(j,"crypto_secretbox");function W(m,A,E,d,x){var D,F=new Uint8Array(32);if(E<32||(P(F,0,32,d,x),k(A,16,A,32,E-32,F)!==0))return-1;for(C(m,0,A,0,E,d,x),D=0;D<32;D++)m[D]=0;return 0}a(W,"crypto_secretbox_open");function z(m,A){var E;for(E=0;E<16;E++)m[E]=A[E]|0}a(z,"set25519");function X(m){var A,E,d=1;for(A=0;A<16;A++)E=m[A]+d+65535,d=Math.floor(E/65536),m[A]=E-d*65536;m[0]+=d-1+37*(d-1)}a(X,"car25519");function ne(m,A,E){for(var d,x=~(E-1),D=0;D<16;D++)d=x&(m[D]^A[D]),m[D]^=d,A[D]^=d}a(ne,"sel25519");function O(m,A){var E,d,x,D=t(),F=t();for(E=0;E<16;E++)F[E]=A[E];for(X(F),X(F),X(F),d=0;d<2;d++){for(D[0]=F[0]-65517,E=1;E<15;E++)D[E]=F[E]-65535-(D[E-1]>>16&1),D[E-1]&=65535;D[15]=F[15]-32767-(D[14]>>16&1),x=D[15]>>16&1,D[14]&=65535,ne(F,D,1-x)}for(E=0;E<16;E++)m[2*E]=F[E]&255,m[2*E+1]=F[E]>>8}a(O,"pack25519");function q(m,A){var E=new Uint8Array(32),d=new Uint8Array(32);return O(E,m),O(d,A),b(E,0,d,0)}a(q,"neq25519");function V(m){var A=new Uint8Array(32);return O(A,m),A[0]&1}a(V,"par25519");function re(m,A){var E;for(E=0;E<16;E++)m[E]=A[2*E]+(A[2*E+1]<<8);m[15]&=32767}a(re,"unpack25519");function _e(m,A,E){for(var d=0;d<16;d++)m[d]=A[d]+E[d]}a(_e,"A");function ve(m,A,E){for(var d=0;d<16;d++)m[d]=A[d]-E[d]}a(ve,"Z");function xe(m,A,E){var d,x,D=0,F=0,se=0,he=0,we=0,be=0,It=0,Se=0,Ze=0,Qe=0,rt=0,tt=0,Ke=0,Je=0,Ge=0,Pe=0,Ce=0,Ie=0,Te=0,ke=0,Ae=0,K=0,G=0,ce=0,oe=0,ae=0,de=0,Be=0,nt=0,ct=0,it=0,w=E[0],lt=E[1],vt=E[2],St=E[3],ut=E[4],Et=E[5],At=E[6],ar=E[7],Ot=E[8],tr=E[9],rr=E[10],nr=E[11],gr=E[12],Pr=E[13],Tr=E[14],kr=E[15];d=A[0],D+=d*w,F+=d*lt,se+=d*vt,he+=d*St,we+=d*ut,be+=d*Et,It+=d*At,Se+=d*ar,Ze+=d*Ot,Qe+=d*tr,rt+=d*rr,tt+=d*nr,Ke+=d*gr,Je+=d*Pr,Ge+=d*Tr,Pe+=d*kr,d=A[1],F+=d*w,se+=d*lt,he+=d*vt,we+=d*St,be+=d*ut,It+=d*Et,Se+=d*At,Ze+=d*ar,Qe+=d*Ot,rt+=d*tr,tt+=d*rr,Ke+=d*nr,Je+=d*gr,Ge+=d*Pr,Pe+=d*Tr,Ce+=d*kr,d=A[2],se+=d*w,he+=d*lt,we+=d*vt,be+=d*St,It+=d*ut,Se+=d*Et,Ze+=d*At,Qe+=d*ar,rt+=d*Ot,tt+=d*tr,Ke+=d*rr,Je+=d*nr,Ge+=d*gr,Pe+=d*Pr,Ce+=d*Tr,Ie+=d*kr,d=A[3],he+=d*w,we+=d*lt,be+=d*vt,It+=d*St,Se+=d*ut,Ze+=d*Et,Qe+=d*At,rt+=d*ar,tt+=d*Ot,Ke+=d*tr,Je+=d*rr,Ge+=d*nr,Pe+=d*gr,Ce+=d*Pr,Ie+=d*Tr,Te+=d*kr,d=A[4],we+=d*w,be+=d*lt,It+=d*vt,Se+=d*St,Ze+=d*ut,Qe+=d*Et,rt+=d*At,tt+=d*ar,Ke+=d*Ot,Je+=d*tr,Ge+=d*rr,Pe+=d*nr,Ce+=d*gr,Ie+=d*Pr,Te+=d*Tr,ke+=d*kr,d=A[5],be+=d*w,It+=d*lt,Se+=d*vt,Ze+=d*St,Qe+=d*ut,rt+=d*Et,tt+=d*At,Ke+=d*ar,Je+=d*Ot,Ge+=d*tr,Pe+=d*rr,Ce+=d*nr,Ie+=d*gr,Te+=d*Pr,ke+=d*Tr,Ae+=d*kr,d=A[6],It+=d*w,Se+=d*lt,Ze+=d*vt,Qe+=d*St,rt+=d*ut,tt+=d*Et,Ke+=d*At,Je+=d*ar,Ge+=d*Ot,Pe+=d*tr,Ce+=d*rr,Ie+=d*nr,Te+=d*gr,ke+=d*Pr,Ae+=d*Tr,K+=d*kr,d=A[7],Se+=d*w,Ze+=d*lt,Qe+=d*vt,rt+=d*St,tt+=d*ut,Ke+=d*Et,Je+=d*At,Ge+=d*ar,Pe+=d*Ot,Ce+=d*tr,Ie+=d*rr,Te+=d*nr,ke+=d*gr,Ae+=d*Pr,K+=d*Tr,G+=d*kr,d=A[8],Ze+=d*w,Qe+=d*lt,rt+=d*vt,tt+=d*St,Ke+=d*ut,Je+=d*Et,Ge+=d*At,Pe+=d*ar,Ce+=d*Ot,Ie+=d*tr,Te+=d*rr,ke+=d*nr,Ae+=d*gr,K+=d*Pr,G+=d*Tr,ce+=d*kr,d=A[9],Qe+=d*w,rt+=d*lt,tt+=d*vt,Ke+=d*St,Je+=d*ut,Ge+=d*Et,Pe+=d*At,Ce+=d*ar,Ie+=d*Ot,Te+=d*tr,ke+=d*rr,Ae+=d*nr,K+=d*gr,G+=d*Pr,ce+=d*Tr,oe+=d*kr,d=A[10],rt+=d*w,tt+=d*lt,Ke+=d*vt,Je+=d*St,Ge+=d*ut,Pe+=d*Et,Ce+=d*At,Ie+=d*ar,Te+=d*Ot,ke+=d*tr,Ae+=d*rr,K+=d*nr,G+=d*gr,ce+=d*Pr,oe+=d*Tr,ae+=d*kr,d=A[11],tt+=d*w,Ke+=d*lt,Je+=d*vt,Ge+=d*St,Pe+=d*ut,Ce+=d*Et,Ie+=d*At,Te+=d*ar,ke+=d*Ot,Ae+=d*tr,K+=d*rr,G+=d*nr,ce+=d*gr,oe+=d*Pr,ae+=d*Tr,de+=d*kr,d=A[12],Ke+=d*w,Je+=d*lt,Ge+=d*vt,Pe+=d*St,Ce+=d*ut,Ie+=d*Et,Te+=d*At,ke+=d*ar,Ae+=d*Ot,K+=d*tr,G+=d*rr,ce+=d*nr,oe+=d*gr,ae+=d*Pr,de+=d*Tr,Be+=d*kr,d=A[13],Je+=d*w,Ge+=d*lt,Pe+=d*vt,Ce+=d*St,Ie+=d*ut,Te+=d*Et,ke+=d*At,Ae+=d*ar,K+=d*Ot,G+=d*tr,ce+=d*rr,oe+=d*nr,ae+=d*gr,de+=d*Pr,Be+=d*Tr,nt+=d*kr,d=A[14],Ge+=d*w,Pe+=d*lt,Ce+=d*vt,Ie+=d*St,Te+=d*ut,ke+=d*Et,Ae+=d*At,K+=d*ar,G+=d*Ot,ce+=d*tr,oe+=d*rr,ae+=d*nr,de+=d*gr,Be+=d*Pr,nt+=d*Tr,ct+=d*kr,d=A[15],Pe+=d*w,Ce+=d*lt,Ie+=d*vt,Te+=d*St,ke+=d*ut,Ae+=d*Et,K+=d*At,G+=d*ar,ce+=d*Ot,oe+=d*tr,ae+=d*rr,de+=d*nr,Be+=d*gr,nt+=d*Pr,ct+=d*Tr,it+=d*kr,D+=38*Ce,F+=38*Ie,se+=38*Te,he+=38*ke,we+=38*Ae,be+=38*K,It+=38*G,Se+=38*ce,Ze+=38*oe,Qe+=38*ae,rt+=38*de,tt+=38*Be,Ke+=38*nt,Je+=38*ct,Ge+=38*it,x=1,d=D+x+65535,x=Math.floor(d/65536),D=d-x*65536,d=F+x+65535,x=Math.floor(d/65536),F=d-x*65536,d=se+x+65535,x=Math.floor(d/65536),se=d-x*65536,d=he+x+65535,x=Math.floor(d/65536),he=d-x*65536,d=we+x+65535,x=Math.floor(d/65536),we=d-x*65536,d=be+x+65535,x=Math.floor(d/65536),be=d-x*65536,d=It+x+65535,x=Math.floor(d/65536),It=d-x*65536,d=Se+x+65535,x=Math.floor(d/65536),Se=d-x*65536,d=Ze+x+65535,x=Math.floor(d/65536),Ze=d-x*65536,d=Qe+x+65535,x=Math.floor(d/65536),Qe=d-x*65536,d=rt+x+65535,x=Math.floor(d/65536),rt=d-x*65536,d=tt+x+65535,x=Math.floor(d/65536),tt=d-x*65536,d=Ke+x+65535,x=Math.floor(d/65536),Ke=d-x*65536,d=Je+x+65535,x=Math.floor(d/65536),Je=d-x*65536,d=Ge+x+65535,x=Math.floor(d/65536),Ge=d-x*65536,d=Pe+x+65535,x=Math.floor(d/65536),Pe=d-x*65536,D+=x-1+37*(x-1),x=1,d=D+x+65535,x=Math.floor(d/65536),D=d-x*65536,d=F+x+65535,x=Math.floor(d/65536),F=d-x*65536,d=se+x+65535,x=Math.floor(d/65536),se=d-x*65536,d=he+x+65535,x=Math.floor(d/65536),he=d-x*65536,d=we+x+65535,x=Math.floor(d/65536),we=d-x*65536,d=be+x+65535,x=Math.floor(d/65536),be=d-x*65536,d=It+x+65535,x=Math.floor(d/65536),It=d-x*65536,d=Se+x+65535,x=Math.floor(d/65536),Se=d-x*65536,d=Ze+x+65535,x=Math.floor(d/65536),Ze=d-x*65536,d=Qe+x+65535,x=Math.floor(d/65536),Qe=d-x*65536,d=rt+x+65535,x=Math.floor(d/65536),rt=d-x*65536,d=tt+x+65535,x=Math.floor(d/65536),tt=d-x*65536,d=Ke+x+65535,x=Math.floor(d/65536),Ke=d-x*65536,d=Je+x+65535,x=Math.floor(d/65536),Je=d-x*65536,d=Ge+x+65535,x=Math.floor(d/65536),Ge=d-x*65536,d=Pe+x+65535,x=Math.floor(d/65536),Pe=d-x*65536,D+=x-1+37*(x-1),m[0]=D,m[1]=F,m[2]=se,m[3]=he,m[4]=we,m[5]=be,m[6]=It,m[7]=Se,m[8]=Ze,m[9]=Qe,m[10]=rt,m[11]=tt,m[12]=Ke,m[13]=Je,m[14]=Ge,m[15]=Pe}a(xe,"M");function Tt(m,A){xe(m,A,A)}a(Tt,"S");function Mt(m,A){var E=t(),d;for(d=0;d<16;d++)E[d]=A[d];for(d=253;d>=0;d--)Tt(E,E),d!==2&&d!==4&&xe(E,E,A);for(d=0;d<16;d++)m[d]=E[d]}a(Mt,"inv25519");function ur(m,A){var E=t(),d;for(d=0;d<16;d++)E[d]=A[d];for(d=250;d>=0;d--)Tt(E,E),d!==1&&xe(E,E,A);for(d=0;d<16;d++)m[d]=E[d]}a(ur,"pow2523");function $r(m,A,E){var d=new Uint8Array(32),x=new Float64Array(80),D,F,se=t(),he=t(),we=t(),be=t(),It=t(),Se=t();for(F=0;F<31;F++)d[F]=A[F];for(d[31]=A[31]&127|64,d[0]&=248,re(x,E),F=0;F<16;F++)he[F]=x[F],be[F]=se[F]=we[F]=0;for(se[0]=be[0]=1,F=254;F>=0;--F)D=d[F>>>3]>>>(F&7)&1,ne(se,he,D),ne(we,be,D),_e(It,se,we),ve(se,se,we),_e(we,he,be),ve(he,he,be),Tt(be,It),Tt(Se,se),xe(se,we,se),xe(we,he,It),_e(It,se,we),ve(se,se,we),Tt(he,se),ve(we,be,Se),xe(se,we,c),_e(se,se,be),xe(we,we,se),xe(se,be,Se),xe(be,he,x),Tt(he,It),ne(se,he,D),ne(we,be,D);for(F=0;F<16;F++)x[F+16]=se[F],x[F+32]=we[F],x[F+48]=he[F],x[F+64]=be[F];var Ze=x.subarray(32),Qe=x.subarray(16);return Mt(Ze,Ze),xe(Qe,Qe,Ze),O(m,Qe),0}a($r,"crypto_scalarmult");function sn(m,A){return $r(m,A,n)}a(sn,"crypto_scalarmult_base");function Hr(m,A){return r(A,32),sn(m,A)}a(Hr,"crypto_box_keypair");function Oo(m,A,E){var d=new Uint8Array(32);return $r(d,E,A),R(m,i,d,J)}a(Oo,"crypto_box_beforenm");var Gs=j,Gu=W;function Ys(m,A,E,d,x,D){var F=new Uint8Array(32);return Oo(F,x,D),Gs(m,A,E,d,F)}a(Ys,"crypto_box");function No(m,A,E,d,x,D){var F=new Uint8Array(32);return Oo(F,x,D),Gu(m,A,E,d,F)}a(No,"crypto_box_open");var $o=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ie(m,A,E,d){for(var x=new Int32Array(16),D=new Int32Array(16),F,se,he,we,be,It,Se,Ze,Qe,rt,tt,Ke,Je,Ge,Pe,Ce,Ie,Te,ke,Ae,K,G,ce,oe,ae,de,Be=m[0],nt=m[1],ct=m[2],it=m[3],w=m[4],lt=m[5],vt=m[6],St=m[7],ut=A[0],Et=A[1],At=A[2],ar=A[3],Ot=A[4],tr=A[5],rr=A[6],nr=A[7],gr=0;d>=128;){for(ke=0;ke<16;ke++)Ae=8*ke+gr,x[ke]=E[Ae+0]<<24|E[Ae+1]<<16|E[Ae+2]<<8|E[Ae+3],D[ke]=E[Ae+4]<<24|E[Ae+5]<<16|E[Ae+6]<<8|E[Ae+7];for(ke=0;ke<80;ke++)if(F=Be,se=nt,he=ct,we=it,be=w,It=lt,Se=vt,Ze=St,Qe=ut,rt=Et,tt=At,Ke=ar,Je=Ot,Ge=tr,Pe=rr,Ce=nr,K=St,G=nr,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=(w>>>14|Ot<<18)^(w>>>18|Ot<<14)^(Ot>>>9|w<<23),G=(Ot>>>14|w<<18)^(Ot>>>18|w<<14)^(w>>>9|Ot<<23),ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,K=w&lt^~w&vt,G=Ot&tr^~Ot&rr,ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,K=$o[ke*2],G=$o[ke*2+1],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,K=x[ke%16],G=D[ke%16],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,Ie=ae&65535|de<<16,Te=ce&65535|oe<<16,K=Ie,G=Te,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=(Be>>>28|ut<<4)^(ut>>>2|Be<<30)^(ut>>>7|Be<<25),G=(ut>>>28|Be<<4)^(Be>>>2|ut<<30)^(Be>>>7|ut<<25),ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,K=Be&nt^Be&ct^nt&ct,G=ut&Et^ut&At^Et&At,ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,Ze=ae&65535|de<<16,Ce=ce&65535|oe<<16,K=we,G=Ke,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=Ie,G=Te,ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,we=ae&65535|de<<16,Ke=ce&65535|oe<<16,nt=F,ct=se,it=he,w=we,lt=be,vt=It,St=Se,Be=Ze,Et=Qe,At=rt,ar=tt,Ot=Ke,tr=Je,rr=Ge,nr=Pe,ut=Ce,ke%16===15)for(Ae=0;Ae<16;Ae++)K=x[Ae],G=D[Ae],ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=x[(Ae+9)%16],G=D[(Ae+9)%16],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,Ie=x[(Ae+1)%16],Te=D[(Ae+1)%16],K=(Ie>>>1|Te<<31)^(Ie>>>8|Te<<24)^Ie>>>7,G=(Te>>>1|Ie<<31)^(Te>>>8|Ie<<24)^(Te>>>7|Ie<<25),ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,Ie=x[(Ae+14)%16],Te=D[(Ae+14)%16],K=(Ie>>>19|Te<<13)^(Te>>>29|Ie<<3)^Ie>>>6,G=(Te>>>19|Ie<<13)^(Ie>>>29|Te<<3)^(Te>>>6|Ie<<26),ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,x[Ae]=ae&65535|de<<16,D[Ae]=ce&65535|oe<<16;K=Be,G=ut,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[0],G=A[0],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[0]=Be=ae&65535|de<<16,A[0]=ut=ce&65535|oe<<16,K=nt,G=Et,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[1],G=A[1],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[1]=nt=ae&65535|de<<16,A[1]=Et=ce&65535|oe<<16,K=ct,G=At,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[2],G=A[2],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[2]=ct=ae&65535|de<<16,A[2]=At=ce&65535|oe<<16,K=it,G=ar,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[3],G=A[3],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[3]=it=ae&65535|de<<16,A[3]=ar=ce&65535|oe<<16,K=w,G=Ot,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[4],G=A[4],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[4]=w=ae&65535|de<<16,A[4]=Ot=ce&65535|oe<<16,K=lt,G=tr,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[5],G=A[5],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[5]=lt=ae&65535|de<<16,A[5]=tr=ce&65535|oe<<16,K=vt,G=rr,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[6],G=A[6],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[6]=vt=ae&65535|de<<16,A[6]=rr=ce&65535|oe<<16,K=St,G=nr,ce=G&65535,oe=G>>>16,ae=K&65535,de=K>>>16,K=m[7],G=A[7],ce+=G&65535,oe+=G>>>16,ae+=K&65535,de+=K>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[7]=St=ae&65535|de<<16,A[7]=nr=ce&65535|oe<<16,gr+=128,d-=128}return d}a(ie,"crypto_hashblocks_hl");function Ee(m,A,E){var d=new Int32Array(8),x=new Int32Array(8),D=new Uint8Array(256),F,se=E;for(d[0]=1779033703,d[1]=3144134277,d[2]=1013904242,d[3]=2773480762,d[4]=1359893119,d[5]=2600822924,d[6]=528734635,d[7]=1541459225,x[0]=4089235720,x[1]=2227873595,x[2]=4271175723,x[3]=1595750129,x[4]=2917565137,x[5]=725511199,x[6]=4215389547,x[7]=327033209,ie(d,x,A,E),E%=128,F=0;F<E;F++)D[F]=A[se-E+F];for(D[E]=128,E=256-128*(E<112?1:0),D[E-9]=0,h(D,E-8,se/536870912|0,se<<3),ie(d,x,D,E),F=0;F<8;F++)h(m,8*F,d[F],x[F]);return 0}a(Ee,"crypto_hash");function Re(m,A){var E=t(),d=t(),x=t(),D=t(),F=t(),se=t(),he=t(),we=t(),be=t();ve(E,m[1],m[0]),ve(be,A[1],A[0]),xe(E,E,be),_e(d,m[0],m[1]),_e(be,A[0],A[1]),xe(d,d,be),xe(x,m[3],A[3]),xe(x,x,l),xe(D,m[2],A[2]),_e(D,D,D),ve(F,d,E),ve(se,D,x),_e(he,D,x),_e(we,d,E),xe(m[0],F,se),xe(m[1],we,he),xe(m[2],he,se),xe(m[3],F,we)}a(Re,"add");function je(m,A,E){var d;for(d=0;d<4;d++)ne(m[d],A[d],E)}a(je,"cswap");function gt(m,A){var E=t(),d=t(),x=t();Mt(x,A[2]),xe(E,A[0],x),xe(d,A[1],x),O(m,d),m[31]^=V(E)<<7}a(gt,"pack");function lr(m,A,E){var d,x;for(z(m[0],o),z(m[1],s),z(m[2],s),z(m[3],o),x=255;x>=0;--x)d=E[x/8|0]>>(x&7)&1,je(m,A,d),Re(A,m),Re(m,m),je(m,A,d)}a(lr,"scalarmult");function Tn(m,A){var E=[t(),t(),t(),t()];z(E[0],f),z(E[1],p),z(E[2],s),xe(E[3],f,p),lr(m,E,A)}a(Tn,"scalarbase");function Yr(m,A,E){var d=new Uint8Array(64),x=[t(),t(),t(),t()],D;for(E||r(A,32),Ee(d,A,32),d[0]&=248,d[31]&=127,d[31]|=64,Tn(x,d),gt(m,x),D=0;D<32;D++)A[D+32]=m[D];return 0}a(Yr,"crypto_sign_keypair");var Do=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function kt(m,A){var E,d,x,D;for(d=63;d>=32;--d){for(E=0,x=d-32,D=d-12;x<D;++x)A[x]+=E-16*A[d]*Do[x-(d-32)],E=A[x]+128>>8,A[x]-=E*256;A[x]+=E,A[d]=0}for(E=0,x=0;x<32;x++)A[x]+=E-(A[31]>>4)*Do[x],E=A[x]>>8,A[x]&=255;for(x=0;x<32;x++)A[x]-=E*Do[x];for(d=0;d<32;d++)A[d+1]+=A[d]>>8,m[d]=A[d]&255}a(kt,"modL");function _r(m){var A=new Float64Array(64),E;for(E=0;E<64;E++)A[E]=m[E];for(E=0;E<64;E++)m[E]=0;kt(m,A)}a(_r,"reduce");function hr(m,A,E,d){var x=new Uint8Array(64),D=new Uint8Array(64),F=new Uint8Array(64),se,he,we=new Float64Array(64),be=[t(),t(),t(),t()];Ee(x,d,32),x[0]&=248,x[31]&=127,x[31]|=64;var It=E+64;for(se=0;se<E;se++)m[64+se]=A[se];for(se=0;se<32;se++)m[32+se]=x[32+se];for(Ee(F,m.subarray(32),E+32),_r(F),Tn(be,F),gt(m,be),se=32;se<64;se++)m[se]=d[se];for(Ee(D,m,E+64),_r(D),se=0;se<64;se++)we[se]=0;for(se=0;se<32;se++)we[se]=F[se];for(se=0;se<32;se++)for(he=0;he<32;he++)we[se+he]+=D[se]*x[he];return kt(m.subarray(32),we),It}a(hr,"crypto_sign");function Jt(m,A){var E=t(),d=t(),x=t(),D=t(),F=t(),se=t(),he=t();return z(m[2],s),re(m[1],A),Tt(x,m[1]),xe(D,x,u),ve(x,x,m[2]),_e(D,m[2],D),Tt(F,D),Tt(se,F),xe(he,se,F),xe(E,he,x),xe(E,E,D),ur(E,E),xe(E,E,x),xe(E,E,D),xe(E,E,D),xe(m[0],E,D),Tt(d,m[0]),xe(d,d,D),q(d,x)&&xe(m[0],m[0],g),Tt(d,m[0]),xe(d,d,D),q(d,x)?-1:(V(m[0])===A[31]>>7&&ve(m[0],o,m[0]),xe(m[3],m[0],m[1]),0)}a(Jt,"unpackneg");function zt(m,A,E,d){var x,D,F=new Uint8Array(32),se=new Uint8Array(64),he=[t(),t(),t(),t()],we=[t(),t(),t(),t()];if(D=-1,E<64||Jt(we,d))return-1;for(x=0;x<E;x++)m[x]=A[x];for(x=0;x<32;x++)m[x+32]=d[x];if(Ee(se,m,E),_r(se),lr(he,we,se),Tn(we,A.subarray(32)),Re(he,we),gt(F,he),E-=64,b(A,0,F,0)){for(x=0;x<E;x++)m[x]=0;return-1}for(x=0;x<E;x++)m[x]=A[x+64];return D=E,D}a(zt,"crypto_sign_open");var an=32,er=24,Hi=32,Bo=16,Xs=32,Yu=32,Js=32,ea=32,Xp=32,Ib=er,Vk=Hi,Zk=Bo,Un=64,ji=32,zo=64,Jp=32,eh=64;e.lowlevel={crypto_core_hsalsa20:R,crypto_stream_xor:C,crypto_stream:P,crypto_stream_salsa20_xor:te,crypto_stream_salsa20:ee,crypto_onetimeauth:U,crypto_onetimeauth_verify:k,crypto_verify_16:y,crypto_verify_32:b,crypto_secretbox:j,crypto_secretbox_open:W,crypto_scalarmult:$r,crypto_scalarmult_base:sn,crypto_box_beforenm:Oo,crypto_box_afternm:Gs,crypto_box:Ys,crypto_box_open:No,crypto_box_keypair:Hr,crypto_hash:Ee,crypto_sign:hr,crypto_sign_keypair:Yr,crypto_sign_open:zt,crypto_secretbox_KEYBYTES:an,crypto_secretbox_NONCEBYTES:er,crypto_secretbox_ZEROBYTES:Hi,crypto_secretbox_BOXZEROBYTES:Bo,crypto_scalarmult_BYTES:Xs,crypto_scalarmult_SCALARBYTES:Yu,crypto_box_PUBLICKEYBYTES:Js,crypto_box_SECRETKEYBYTES:ea,crypto_box_BEFORENMBYTES:Xp,crypto_box_NONCEBYTES:Ib,crypto_box_ZEROBYTES:Vk,crypto_box_BOXZEROBYTES:Zk,crypto_sign_BYTES:Un,crypto_sign_PUBLICKEYBYTES:ji,crypto_sign_SECRETKEYBYTES:zo,crypto_sign_SEEDBYTES:Jp,crypto_hash_BYTES:eh};function vb(m,A){if(m.length!==an)throw new Error("bad key size");if(A.length!==er)throw new Error("bad nonce size")}a(vb,"checkLengths");function Qk(m,A){if(m.length!==Js)throw new Error("bad public key size");if(A.length!==ea)throw new Error("bad secret key size")}a(Qk,"checkBoxLengths");function Xr(){var m,A;for(A=0;A<arguments.length;A++)if((m=Object.prototype.toString.call(arguments[A]))!=="[object Uint8Array]")throw new TypeError("unexpected type "+m+", use Uint8Array")}a(Xr,"checkArrayTypes");function Sb(m){for(var A=0;A<m.length;A++)m[A]=0}a(Sb,"cleanup"),e.util||(e.util={},e.util.decodeUTF8=e.util.encodeUTF8=e.util.encodeBase64=e.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),e.randomBytes=function(m){var A=new Uint8Array(m);return r(A,m),A},e.secretbox=function(m,A,E){Xr(m,A,E),vb(E,A);for(var d=new Uint8Array(Hi+m.length),x=new Uint8Array(d.length),D=0;D<m.length;D++)d[D+Hi]=m[D];return j(x,d,d.length,A,E),x.subarray(Bo)},e.secretbox.open=function(m,A,E){Xr(m,A,E),vb(E,A);for(var d=new Uint8Array(Bo+m.length),x=new Uint8Array(d.length),D=0;D<m.length;D++)d[D+Bo]=m[D];return d.length<32||W(x,d,d.length,A,E)!==0?!1:x.subarray(Hi)},e.secretbox.keyLength=an,e.secretbox.nonceLength=er,e.secretbox.overheadLength=Bo,e.scalarMult=function(m,A){if(Xr(m,A),m.length!==Yu)throw new Error("bad n size");if(A.length!==Xs)throw new Error("bad p size");var E=new Uint8Array(Xs);return $r(E,m,A),E},e.scalarMult.base=function(m){if(Xr(m),m.length!==Yu)throw new Error("bad n size");var A=new Uint8Array(Xs);return sn(A,m),A},e.scalarMult.scalarLength=Yu,e.scalarMult.groupElementLength=Xs,e.box=function(m,A,E,d){var x=e.box.before(E,d);return e.secretbox(m,A,x)},e.box.before=function(m,A){Xr(m,A),Qk(m,A);var E=new Uint8Array(Xp);return Oo(E,m,A),E},e.box.after=e.secretbox,e.box.open=function(m,A,E,d){var x=e.box.before(E,d);return e.secretbox.open(m,A,x)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var m=new Uint8Array(Js),A=new Uint8Array(ea);return Hr(m,A),{publicKey:m,secretKey:A}},e.box.keyPair.fromSecretKey=function(m){if(Xr(m),m.length!==ea)throw new Error("bad secret key size");var A=new Uint8Array(Js);return sn(A,m),{publicKey:A,secretKey:new Uint8Array(m)}},e.box.publicKeyLength=Js,e.box.secretKeyLength=ea,e.box.sharedKeyLength=Xp,e.box.nonceLength=Ib,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(m,A){if(Xr(m,A),A.length!==zo)throw new Error("bad secret key size");var E=new Uint8Array(Un+m.length);return hr(E,m,m.length,A),E},e.sign.open=function(m,A){if(arguments.length!==2)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Xr(m,A),A.length!==ji)throw new Error("bad public key size");var E=new Uint8Array(m.length),d=zt(E,m,m.length,A);if(d<0)return null;for(var x=new Uint8Array(d),D=0;D<x.length;D++)x[D]=E[D];return x},e.sign.detached=function(m,A){for(var E=e.sign(m,A),d=new Uint8Array(Un),x=0;x<d.length;x++)d[x]=E[x];return d},e.sign.detached.verify=function(m,A,E){if(Xr(m,A,E),A.length!==Un)throw new Error("bad signature size");if(E.length!==ji)throw new Error("bad public key size");var d=new Uint8Array(Un+m.length),x=new Uint8Array(Un+m.length),D;for(D=0;D<Un;D++)d[D]=A[D];for(D=0;D<m.length;D++)d[D+Un]=m[D];return zt(x,d,d.length,E)>=0},e.sign.keyPair=function(){var m=new Uint8Array(ji),A=new Uint8Array(zo);return Yr(m,A),{publicKey:m,secretKey:A}},e.sign.keyPair.fromSecretKey=function(m){if(Xr(m),m.length!==zo)throw new Error("bad secret key size");for(var A=new Uint8Array(ji),E=0;E<A.length;E++)A[E]=m[32+E];return{publicKey:A,secretKey:new Uint8Array(m)}},e.sign.keyPair.fromSeed=function(m){if(Xr(m),m.length!==Jp)throw new Error("bad seed size");for(var A=new Uint8Array(ji),E=new Uint8Array(zo),d=0;d<32;d++)E[d]=m[d];return Yr(A,E,!0),{publicKey:A,secretKey:E}},e.sign.publicKeyLength=ji,e.sign.secretKeyLength=zo,e.sign.seedLength=Jp,e.sign.signatureLength=Un,e.hash=function(m){Xr(m);var A=new Uint8Array(eh);return Ee(A,m,m.length),A},e.hash.hashLength=eh,e.verify=function(m,A){return Xr(m,A),m.length===0||A.length===0||m.length!==A.length?!1:_(m,0,A,0,m.length)===0},e.setPRNG=function(m){r=m},(function(){var m=typeof self<"u"?self.crypto||self.msCrypto:null;if(m&&m.getRandomValues){var A=65536;e.setPRNG(function(E,d){var x,D=new Uint8Array(d);for(x=0;x<d;x+=A)m.getRandomValues(D.subarray(x,x+Math.min(d-x,A)));for(x=0;x<d;x++)E[x]=D[x];Sb(D)})}else typeof require<"u"&&(m=require("crypto"),m&&m.randomBytes&&e.setPRNG(function(E,d){var x,D=m.randomBytes(d);for(x=0;x<d;x++)E[x]=D[x];Sb(D)}))})()})(typeof Vd<"u"&&Vd.exports?Vd.exports:self.nacl=self.nacl||{})});var eE=me((kQ,cS)=>{"use strict";var Yy=aS().lowlevel.crypto_hash,Yn=0,Eo=a(function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])},"Blowfish");function Qd(e,t,r){return(e[0][t[r+3]]+e[1][t[r+2]]^e[2][t[r+1]])+e[3][t[r]]}a(Qd,"F");Eo.prototype.encipher=function(e,t){t===void 0&&(t=new Uint8Array(e.buffer),e.byteOffset!==0&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var r=1;r<16;r+=2)e[1]^=Qd(this.S,t,0)^this.P[r],e[0]^=Qd(this.S,t,4)^this.P[r+1];var i=e[0];e[0]=e[1]^this.P[17],e[1]=i};Eo.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);e.byteOffset!==0&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var r=16;r>0;r-=2)e[1]^=Qd(this.S,t,0)^this.P[r],e[0]^=Qd(this.S,t,4)^this.P[r-1];var i=e[0];e[0]=e[1]^this.P[0],e[1]=i};function yo(e,t){var r,i=0;for(r=0;r<4;r++,Yn++)Yn>=t&&(Yn=0),i=i<<8|e[Yn];return i}a(yo,"stream2word");Eo.prototype.expand0state=function(e,t){var r=new Uint32Array(2),i,n,o=new Uint8Array(r.buffer);for(i=0,Yn=0;i<18;i++)this.P[i]^=yo(e,t);for(Yn=0,i=0;i<18;i+=2)this.encipher(r,o),this.P[i]=r[0],this.P[i+1]=r[1];for(i=0;i<4;i++)for(n=0;n<256;n+=2)this.encipher(r,o),this.S[i][n]=r[0],this.S[i][n+1]=r[1]};Eo.prototype.expandstate=function(e,t,r,i){var n=new Uint32Array(2),o,s;for(o=0,Yn=0;o<18;o++)this.P[o]^=yo(r,i);for(o=0,Yn=0;o<18;o+=2)n[0]^=yo(e,t),n[1]^=yo(e,t),this.encipher(n),this.P[o]=n[0],this.P[o+1]=n[1];for(o=0;o<4;o++)for(s=0;s<256;s+=2)n[0]^=yo(e,t),n[1]^=yo(e,t),this.encipher(n),this.S[o][s]=n[0],this.S[o][s+1]=n[1];Yn=0};Eo.prototype.enc=function(e,t){for(var r=0;r<t;r++)this.encipher(e.subarray(r*2))};Eo.prototype.dec=function(e,t){for(var r=0;r<t;r++)this.decipher(e.subarray(r*2))};var Zd=8,Xy=32;function Jy(e,t,r){var i=new Eo,n=new Uint32Array(Zd),o,s=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(i.expandstate(t,64,e,64),o=0;o<64;o++)i.expand0state(t,64),i.expand0state(e,64);for(o=0;o<Zd;o++)n[o]=yo(s,s.byteLength);for(o=0;o<64;o++)i.enc(n,n.byteLength/8);for(o=0;o<Zd;o++)r[4*o+3]=n[o]>>>24,r[4*o+2]=n[o]>>>16,r[4*o+1]=n[o]>>>8,r[4*o+0]=n[o]}a(Jy,"bcrypt_hash");function n4(e,t,r,i,n,o,s){var c=new Uint8Array(64),u=new Uint8Array(64),l=new Uint8Array(Xy),f=new Uint8Array(Xy),p=new Uint8Array(i+4),g,h,_,y,b,v,S=o;if(s<1||t===0||i===0||o===0||o>l.byteLength*l.byteLength||i>1<<20)return-1;for(y=Math.floor((o+l.byteLength-1)/l.byteLength),_=Math.floor((o+y-1)/y),g=0;g<i;g++)p[g]=r[g];for(Yy(c,e,t),v=1;o>0;v++){for(p[i+0]=v>>>24,p[i+1]=v>>>16,p[i+2]=v>>>8,p[i+3]=v,Yy(u,p,i+4),Jy(c,u,f),g=l.byteLength;g--;)l[g]=f[g];for(g=1;g<s;g++)for(Yy(u,f,f.byteLength),Jy(c,u,f),h=0;h<l.byteLength;h++)l[h]^=f[h];for(_=Math.min(_,o),g=0;g<_&&(b=g*y+(v-1),!(b>=S));g++)n[b]=l[g];o-=g}return 0}a(n4,"bcrypt_pbkdf");cS.exports={BLOCKS:Zd,HASHSIZE:Xy,hash:Jy,pbkdf:n4}});var Jn=me((RQ,Gd)=>{"use strict";var Xn=require("crypto"),ks;try{ks=require("cpu-features")()}catch{}var{bindingAvailable:uS,CIPHER_INFO:i4,MAC_INFO:o4}=Pi(),lS=(()=>{if(typeof Xn.sign=="function"&&typeof Xn.verify=="function"){let e=`-----BEGIN PRIVATE KEY-----\r
5
+ Closing reason: ${this._closingError.stack}`,c.code=this._closingError.code!==void 0?this._closingError.code:"0",this._passToHandler(c);return}this.socket.setTimeout(this.timeout),t&&this.send(t)})}log(t){this.verbose&&console.log(t)}get hasTLS(){return"encrypted"in this._socket}_stopTrackingTask(){this.socket.setTimeout(0),this._task=void 0}_onControlSocketData(t){if(this.log(`< ${t}`),this._partialResponse.length+t.length>l$){this.closeWithError(new Error("FTP control response exceeded maximum allowed size"));return}let r=this._partialResponse+t,i=(0,u$.parseControlResponse)(r);this._partialResponse=i.rest;for(let n of i.messages){let o=parseInt(n.substr(0,3),10),s={code:o,message:n},c=o>=400?new Cd(s):void 0;this._passToHandler(c||s)}}_passToHandler(t){this._task&&this._task.responseHandler(t,this._task.resolver)}_setupDefaultErrorHandlers(t,r){t.once("error",i=>{i.message+=` (${r})`,this.closeWithError(i)}),t.once("close",i=>{i&&this.closeWithError(new Error(`Socket closed due to transmission error (${r})`))}),t.once("timeout",()=>{t.destroy(),this.closeWithError(new Error(`Timeout (${r})`))})}_closeControlSocket(){this._removeSocketListeners(this._socket),this._socket.on("error",US),this.send("QUIT"),this._closeSocket(this._socket)}_closeSocket(t){t&&(this._removeSocketListeners(t),t.on("error",US),t.destroy())}_removeSocketListeners(t){t.removeAllListeners(),t.removeAllListeners("timeout"),t.removeAllListeners("data"),t.removeAllListeners("end"),t.removeAllListeners("error"),t.removeAllListeners("close"),t.removeAllListeners("connect")}_newSocket(){return new a$.Socket}};Es.FTPContext=Dy});var Ly=me(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.describeTLS=f$;mo.describeAddress=d$;mo.upgradeSocket=p$;mo.isLoopback=h$;mo.ipIsPrivateV4Address=g$;var MS=require("tls");function f$(e){if(e instanceof MS.TLSSocket){let t=e.getProtocol();return t||"Server socket or disconnected client socket"}return"No encryption"}a(f$,"describeTLS");function d$(e){return e.remoteFamily==="IPv6"?`[${e.remoteAddress}]:${e.remotePort}`:`${e.remoteAddress}:${e.remotePort}`}a(d$,"describeAddress");function p$(e,t){return new Promise((r,i)=>{let n=Object.assign({},t,{socket:e}),o=(0,MS.connect)(n,()=>{n.rejectUnauthorized!==!1&&!o.authorized?i(o.authorizationError):(o.removeAllListeners("error"),r(o))}).once("error",s=>{i(s)})})}a(p$,"upgradeSocket");function h$(e){return e==="::1"||e.startsWith("127.")}a(h$,"isLoopback");function g$(e=""){e.startsWith("::ffff:")&&(e=e.substr(7));let t=e.split(".").map(r=>parseInt(r,10));return t[0]===10||t[0]===172&&t[1]>=16&&t[1]<=31||t[0]===192&&t[1]===168||e==="127.0.0.1"}a(g$,"ipIsPrivateV4Address")});var ru=me(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.FileInfo=bs.FileType=void 0;var As;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=3]="SymbolicLink"})(As||(bs.FileType=As={}));var Rd=class{static{a(this,"FileInfo")}constructor(t){this.name=t,this.type=As.Unknown,this.size=0,this.rawModifiedAt="",this.modifiedAt=void 0,this.permissions=void 0,this.hardLinkCount=void 0,this.link=void 0,this.group=void 0,this.user=void 0,this.uniqueID=void 0,this.name=t}get isDirectory(){return this.type===As.Directory}get isSymbolicLink(){return this.type===As.SymbolicLink}get isFile(){return this.type===As.File}get date(){return this.rawModifiedAt}set date(t){this.rawModifiedAt=t}};bs.FileInfo=Rd;Rd.UnixPermission={Read:4,Write:2,Execute:1}});var HS=me(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.testLine=m$;nu.parseLine=_$;nu.transformList=y$;var zy=ru(),FS=new RegExp("^\\s*(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)");function m$(e){return/^\d{2}/.test(e)&&FS.test(e)}a(m$,"testLine");function _$(e){let t=e.match(FS);if(t===null)return;let r=t[5];if(r==="."||r==="..")return;let i=new zy.FileInfo(r);return t[3]==="<DIR>"?(i.type=zy.FileType.Directory,i.size=0):(i.type=zy.FileType.File,i.size=parseInt(t[4],10)),i.rawModifiedAt=t[1]+" "+t[2],i}a(_$,"parseLine");function y$(e){return e}a(y$,"transformList")});var WS=me(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.testLine=x$;iu.parseLine=I$;iu.transformList=S$;var On=ru(),E$="\u6708",A$="\u65E5",b$="\u5E74",jS=new RegExp("^[\\s\\d]*([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+){0,7}?)\\s+)?(?:(\\S+(?:\\s\\S+){0,7})\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}"+E$+"\\s+\\d{1,2}"+A$+"))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}"+b$+"))\\s(.*)");function x$(e){return jS.test(e)}a(x$,"testLine");function I$(e){let t=e.match(jS);if(t===null)return;let r=t[21];if(r==="."||r==="..")return;let i=new On.FileInfo(r);switch(i.size=parseInt(t[18],10),i.user=t[16],i.group=t[17],i.hardLinkCount=parseInt(t[15],10),i.rawModifiedAt=t[19]+" "+t[20],i.permissions={user:Uy(t[4],t[5],t[6]),group:Uy(t[8],t[9],t[10]),world:Uy(t[12],t[13],t[14])},t[1].charAt(0)){case"d":i.type=On.FileType.Directory;break;case"e":i.type=On.FileType.SymbolicLink;break;case"l":i.type=On.FileType.SymbolicLink;break;case"b":case"c":i.type=On.FileType.File;break;case"f":case"-":i.type=On.FileType.File;break;default:i.type=On.FileType.Unknown}if(i.isSymbolicLink){let n=r.indexOf(" -> ");n!==-1&&(i.name=r.substring(0,n),i.link=r.substring(n+4))}return i}a(I$,"parseLine");function S$(e){return e}a(S$,"transformList");function Uy(e,t,r){let i=0;e!=="-"&&(i+=On.FileInfo.UnixPermission.Read),t!=="-"&&(i+=On.FileInfo.UnixPermission.Write);let n=r.charAt(0);return n!=="-"&&n.toUpperCase()!==n&&(i+=On.FileInfo.UnixPermission.Execute),i}a(Uy,"parseMode")});var My=me(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.testLine=w$;Is.parseLine=P$;Is.transformList=T$;Is.parseMLSxDate=ZS;var xs=ru();function qS(e,t){t.size=parseInt(e,10)}a(qS,"parseSize");var v$={size:qS,sizd:qS,unique:a((e,t)=>{t.uniqueID=e},"unique"),modify:a((e,t)=>{t.modifiedAt=ZS(e),t.rawModifiedAt=t.modifiedAt.toISOString()},"modify"),type:a((e,t)=>{if(e.startsWith("OS.unix=slink"))return t.type=xs.FileType.SymbolicLink,t.link=e.substr(e.indexOf(":")+1),1;switch(e){case"file":t.type=xs.FileType.File;break;case"dir":t.type=xs.FileType.Directory;break;case"OS.unix=symlink":t.type=xs.FileType.SymbolicLink;break;case"cdir":case"pdir":return 2;default:t.type=xs.FileType.Unknown}return 1},"type"),"unix.mode":a((e,t)=>{let r=e.substr(-3);t.permissions={user:parseInt(r[0],10),group:parseInt(r[1],10),world:parseInt(r[2],10)}},"unix.mode"),"unix.ownername":a((e,t)=>{t.user=e},"unix.ownername"),"unix.owner":a((e,t)=>{t.user===void 0&&(t.user=e)},"unix.owner"),get"unix.uid"(){return this["unix.owner"]},"unix.groupname":a((e,t)=>{t.group=e},"unix.groupname"),"unix.group":a((e,t)=>{t.group===void 0&&(t.group=e)},"unix.group"),get"unix.gid"(){return this["unix.group"]}};function VS(e,t){let r=e.indexOf(t),i=e.substr(0,r),n=e.substr(r+t.length);return[i,n]}a(VS,"splitStringOnce");function w$(e){return/^\S+=\S+;/.test(e)||e.startsWith(" ")}a(w$,"testLine");function P$(e){let[t,r]=VS(e," ");if(r===""||r==="."||r==="..")return;let i=new xs.FileInfo(r),n=t.split(";");for(let o of n){let[s,c]=VS(o,"=");if(!c)continue;let u=v$[s.toLowerCase()];if(!u)continue;if(u(c,i)===2)return}return i}a(P$,"parseLine");function T$(e){let t=new Map;for(let i of e)!i.isSymbolicLink&&i.uniqueID!==void 0&&t.set(i.uniqueID,i);let r=[];for(let i of e){if(i.isSymbolicLink&&i.uniqueID!==void 0&&i.link===void 0){let o=t.get(i.uniqueID);o!==void 0&&(i.link=o.name)}!i.name.includes("/")&&r.push(i)}return r}a(T$,"transformList");function ZS(e){return new Date(Date.UTC(+e.slice(0,4),+e.slice(4,6)-1,+e.slice(6,8),+e.slice(8,10),+e.slice(10,12),+e.slice(12,14),+e.slice(15,18)))}a(ZS,"parseMLSxDate")});var Hy=me(Gn=>{"use strict";var k$=Gn&&Gn.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),C$=Gn&&Gn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fy=Gn&&Gn.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var i=e(t),n=0;n<i.length;n++)i[n]!=="default"&&k$(r,t,i[n]);return C$(r,t),r}})();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.parseList=U$;var R$=Fy(HS()),O$=Fy(WS()),N$=Fy(My()),$$=[R$,O$,N$];function D$(e,t){return t.find(r=>r.testLine(e)===!0)}a(D$,"firstCompatibleParser");function B$(e){return e.trim()!==""}a(B$,"isNotBlank");function L$(e){return!e.startsWith("total")}a(L$,"isNotMeta");var z$=/\r?\n/;function U$(e){let t=e.split(z$).filter(B$).filter(L$);if(t.length===0)return[];let r=t[t.length-1],i=D$(r,$$);if(!i)throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details.");let n=t.map(i.parseLine).filter(o=>o!==void 0);return i.transformList(n)}a(U$,"parseList")});var QS=me(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.ProgressTracker=void 0;var jy=class{static{a(this,"ProgressTracker")}constructor(){this.bytesOverall=0,this.intervalMs=500,this.onStop=Od,this.onHandle=Od}reportTo(t=Od){this.onHandle=t}start(t,r,i){let n=0;this.onStop=M$(this.intervalMs,()=>{let o=t.bytesRead+t.bytesWritten;this.bytesOverall+=o-n,n=o,this.onHandle({name:r,type:i,bytes:o,bytesOverall:this.bytesOverall})})}stop(){this.onStop(!1)}updateAndStop(){this.onStop(!0)}};Nd.ProgressTracker=jy;function M$(e,t){let r=setInterval(t,e),i=a(n=>{clearInterval(r),n&&t(),t=Od},"stopFunc");return t(),i}a(M$,"poll");function Od(){}a(Od,"noop")});var GS=me($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.StringWriter=void 0;var F$=require("stream"),Wy=class extends F$.Writable{static{a(this,"StringWriter")}constructor(t=1*1024*1024){super(),this.maxByteLength=t,this.byteLength=0,this.bufs=[]}_write(t,r,i){if(!(t instanceof Buffer)){i(new Error("StringWriter: expects chunks of type 'Buffer'."));return}if(this.byteLength+t.byteLength>this.maxByteLength){i(new Error(`StringWriter: Maximum bytes exceeded, maxByteLength=${this.maxByteLength}.`));return}this.byteLength+=t.byteLength,this.bufs.push(t),i(null)}getText(t){return Buffer.concat(this.bufs).toString(t)}};$d.StringWriter=Wy});var YS=me(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.TransferWatchdog=void 0;var H$=500,j$=4,qy=class{static{a(this,"TransferWatchdog")}constructor(){this.timer=void 0}start(t,r,i,n){if(this.stop(),i<=0)return;let o=Math.max(1,Math.min(Math.floor(i/j$),H$)),s=KS(t),c=0,u=0;this.timer=setInterval(()=>{let l=KS(t),f=l!==s;if(s=l,!W$(t,r)){c=0,u=i;return}if(f){c=0,u=0;return}c+=o,c>=i+u&&(this.stop(),n())},o),this.timer.unref()}stop(){this.timer&&(clearInterval(this.timer),this.timer=void 0)}};Dd.TransferWatchdog=qy;function KS(e){return e.bytesRead+e.bytesWritten}a(KS,"countBytes");function W$(e,t){return t==="download"?!e.isPaused():e.writableLength>0}a(W$,"isWaitingForServer")});var Zy=me(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.enterPassiveModeIPv6=V$;Nn.parseEpsvResponse=ev;Nn.enterPassiveModeIPv4=Z$;Nn.enterPassiveModeIPv4_forceControlHostIP=Q$;Nn.parsePasvResponse=Vy;Nn.connectForPassiveTransfer=zd;Nn.uploadFrom=G$;Nn.downloadTo=K$;var JS=require("stream"),XS=require("tls"),q$=YS(),Ii=Ly(),Bd=kd();async function V$(e){let t=await e.request("EPSV"),r=ev(t.message);if(!r)throw new Error("Can't parse EPSV response: "+t.message);let i=e.socket.remoteAddress;if(i===void 0)throw new Error("Control socket is disconnected, can't get remote address.");return await zd(i,r,e),t}a(V$,"enterPassiveModeIPv6");function ev(e){let t=e.match(/[|!]{3}(.+)[|!]/);if(t===null||t[1]===void 0)throw new Error(`Can't parse response to 'EPSV': ${e}`);let r=parseInt(t[1],10);if(Number.isNaN(r))throw new Error(`Can't parse response to 'EPSV', port is not a number: ${e}`);return r}a(ev,"parseEpsvResponse");async function Z$(e){let t=await e.request("PASV"),r=Vy(t.message);if(!r)throw new Error("Can't parse PASV response: "+t.message);let i=e.socket.remoteAddress;return(0,Ii.ipIsPrivateV4Address)(r.host)&&i&&!(0,Ii.ipIsPrivateV4Address)(i)&&(r.host=i),await zd(r.host,r.port,e),t}a(Z$,"enterPassiveModeIPv4");async function Q$(e){let t=await e.request("PASV"),r=Vy(t.message);if(!r)throw new Error("Can't parse PASV response: "+t.message);let i=e.socket.remoteAddress;if(i===void 0)throw new Error("Control socket is disconnected, can't get remote address.");let n=i.replace(/^::ffff:/i,"");if(!(n===r.host||(0,Ii.isLoopback)(n)&&(0,Ii.isLoopback)(r.host)))throw new Error(`PASV returned another host (${r.host}) for data transfer that you have connected to (${i}). Even though the FTP protocol allows this, basic-ftp disables this feature by default for security reasons. If you do need this feature, instantiate the Client with the optional paramter "allowSeparateTransferHost: true". See the README documentation for more information.`);return await zd(n,r.port,e),t}a(Q$,"enterPassiveModeIPv4_forceControlHostIP");function Vy(e){let t=e.match(/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/);if(t===null||t.length!==4)throw new Error(`Can't parse response to 'PASV': ${e}`);return{host:t[1].replace(/,/g,"."),port:(parseInt(t[2],10)&255)*256+(parseInt(t[3],10)&255)}}a(Vy,"parsePasvResponse");function zd(e,t,r){return new Promise((i,n)=>{let o=r._newSocket(),s=o,c=a(function(l){l.message="Can't open data connection in passive mode: "+l.message,n(l)},"handleConnErr"),u=a(function(){s.destroy(),n(new Error(`Timeout when trying to open data connection to ${e}:${t}`))},"handleTimeout");s.setTimeout(r.timeout),s.on("error",c),s.on("timeout",u),s.connect({port:t,host:e,family:r.ipFamily},()=>{var l;if(r.socket instanceof XS.TLSSocket){let f=(0,XS.connect)(Object.assign({},r.tlsOptions,{socket:o,session:(l=r.tlsSessionStore)!==null&&l!==void 0?l:r.socket.getSession()}));f.on("session",p=>{r.tlsSessionStore=p}),s=f}o.setTimeout(0),s.removeListener("error",c),s.removeListener("timeout",u),r.dataSocket=s,i()})})}a(zd,"connectForPassiveTransfer");var Ld=class{static{a(this,"TransferResolver")}constructor(t,r){this.ftp=t,this.progress=r,this.response=void 0,this.dataTransferDone=!1,this.taskSettled=!1,this.watchdog=new q$.TransferWatchdog}onDataStart(t,r){if(this.ftp.dataSocket===void 0)throw new Error("Data transfer should start but there is no data connection.");this.ftp.socket.setTimeout(0),this.ftp.dataSocket.setTimeout(0),this.watchdog.start(this.ftp.dataSocket,r==="upload"?"upload":"download",this.ftp.timeout,()=>{this.ftp.closeWithError(new Error("Timeout (data socket)"))}),this.progress.start(this.ftp.dataSocket,t,r)}onDataDone(t){this.taskSettled||(this.watchdog.stop(),this.progress.updateAndStop(),this.ftp.socket.setTimeout(this.ftp.timeout),this.dataTransferDone=!0,this.tryResolve(t))}onControlDone(t,r){this.response=r,this.tryResolve(t)}onError(t,r){this.taskSettled||(this.taskSettled=!0,this.watchdog.stop(),this.progress.updateAndStop(),this.ftp.socket.setTimeout(this.ftp.timeout),this.ftp.dataSocket=void 0,t.reject(r))}onUnexpectedRequest(t){let r=new Error(`Unexpected FTP response is requesting an answer: ${t.message}`);this.ftp.closeWithError(r)}tryResolve(t){this.dataTransferDone&&this.response!==void 0&&(this.taskSettled=!0,this.ftp.dataSocket=void 0,t.resolve(this.response))}};function G$(e,t){let r=new Ld(t.ftp,t.tracker),i=`${t.command} ${t.remotePath}`,n=!1;return t.ftp.handle(i,(o,s)=>{if(o instanceof Error)r.onError(s,o);else if(o.code===150||o.code===125){if(n)return;n=!0;let c=t.ftp.dataSocket;if(!c){r.onError(s,new Error("Upload should begin but no data connection is available."));return}let u="getCipher"in c?c.getCipher()!==void 0:!0;Y$(u,c,"secureConnect",()=>{t.ftp.log(`Uploading to ${(0,Ii.describeAddress)(c)} (${(0,Ii.describeTLS)(c)})`),r.onDataStart(t.remotePath,t.type),(0,JS.pipeline)(e,c,l=>{l?r.onError(s,l):r.onDataDone(s)})})}else(0,Bd.positiveCompletion)(o.code)?r.onControlDone(s,o):(0,Bd.positiveIntermediate)(o.code)&&r.onUnexpectedRequest(o)})}a(G$,"uploadFrom");function K$(e,t){if(!t.ftp.dataSocket)throw new Error("Download will be initiated but no data connection is available.");let r=new Ld(t.ftp,t.tracker),i=!1;return t.ftp.handle(t.command,(n,o)=>{if(n instanceof Error)r.onError(o,n);else if(n.code===150||n.code===125){if(i)return;i=!0;let s=t.ftp.dataSocket;if(!s){r.onError(o,new Error("Download should begin but no data connection is available."));return}t.ftp.log(`Downloading from ${(0,Ii.describeAddress)(s)} (${(0,Ii.describeTLS)(s)})`),r.onDataStart(t.remotePath,t.type),(0,JS.pipeline)(s,e,c=>{c?r.onError(o,c):r.onDataDone(o)})}else n.code===350?t.ftp.send("RETR "+t.remotePath):(0,Bd.positiveCompletion)(n.code)?r.onControlDone(o,n):(0,Bd.positiveIntermediate)(n.code)&&r.onUnexpectedRequest(n)})}a(K$,"downloadTo");function Y$(e,t,r,i){e===!0?i():t.once(r,()=>i())}a(Y$,"onConditionOrEvent")});var ov=me(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.Client=void 0;var Kn=require("fs"),Qy=require("path"),X$=require("tls"),yo=require("util"),ou=By(),_o=Ly(),Gy=kd(),J$=Hy(),e4=My(),t4=QS(),r4=GS(),Ss=Zy(),n4=(0,yo.promisify)(Kn.readdir),i4=(0,yo.promisify)(Kn.mkdir),Ky=(0,yo.promisify)(Kn.stat),o4=(0,yo.promisify)(Kn.fstat),tv=(0,yo.promisify)(Kn.open),rv=(0,yo.promisify)(Kn.close),s4=(0,yo.promisify)(Kn.unlink),nv={allowSeparateTransferHost:!1,maxListingBytes:40*1024*1024},iv=a(()=>["LIST -a","LIST"],"LIST_COMMANDS_DEFAULT"),a4=a(()=>["MLSD","LIST -a","LIST"],"LIST_COMMANDS_MLSD"),Yy=class{static{a(this,"Client")}constructor(t=3e4,r=nv){this.availableListCommands=iv();let i={...nv,...r};this.ftp=new ou.FTPContext(t),this.prepareTransfer=this._enterFirstCompatibleMode([Ss.enterPassiveModeIPv6,i.allowSeparateTransferHost?Ss.enterPassiveModeIPv4:Ss.enterPassiveModeIPv4_forceControlHostIP]),this.options=i,this.parseList=J$.parseList,this._progressTracker=new t4.ProgressTracker}close(){this.ftp.close(),this._progressTracker.stop()}get closed(){return this.ftp.closed}connect(t="localhost",r=21){return this.ftp.reset(),this.ftp.socket.connect({host:t,port:r,family:this.ftp.ipFamily},()=>this.ftp.log(`Connected to ${(0,_o.describeAddress)(this.ftp.socket)} (${(0,_o.describeTLS)(this.ftp.socket)})`)),this._handleConnectResponse()}connectImplicitTLS(t="localhost",r=21,i={}){var n;return this.ftp.reset(),i.host=(n=i.host)!==null&&n!==void 0?n:t,this.ftp.socket=(0,X$.connect)(r,t,i,()=>this.ftp.log(`Connected to ${(0,_o.describeAddress)(this.ftp.socket)} (${(0,_o.describeTLS)(this.ftp.socket)})`)),this.ftp.tlsOptions=i,this._handleConnectResponse()}_handleConnectResponse(){return this.ftp.handle(void 0,(t,r)=>{t instanceof Error?r.reject(t):(0,Gy.positiveCompletion)(t.code)?r.resolve(t):r.reject(new ou.FTPError(t))})}send(t,r=!1){return r?(this.ftp.log("Deprecated call using send(command, flag) with boolean flag to ignore errors. Use sendIgnoringError(command)."),this.sendIgnoringError(t)):this.ftp.request(t)}sendIgnoringError(t){return this.ftp.handle(t,(r,i)=>{r instanceof ou.FTPError?i.resolve({code:r.code,message:r.message}):r instanceof Error?i.reject(r):i.resolve(r)})}async useTLS(t={},r="AUTH TLS"){let i=await this.send(r);return this.ftp.socket=await(0,_o.upgradeSocket)(this.ftp.socket,t),this.ftp.tlsOptions=t,this.ftp.log(`Control socket is using: ${(0,_o.describeTLS)(this.ftp.socket)}`),i}login(t="anonymous",r="guest"){return this.ftp.log(`Login security: ${(0,_o.describeTLS)(this.ftp.socket)}`),this.ftp.handle("USER "+t,(i,n)=>{i instanceof Error?n.reject(i):(0,Gy.positiveCompletion)(i.code)?n.resolve(i):i.code===331?this.ftp.send("PASS "+r):n.reject(new ou.FTPError(i))})}async useDefaultSettings(){let r=(await this.features()).has("MLST");this.availableListCommands=r?a4():iv(),await this.send("TYPE I"),await this.sendIgnoringError("STRU F"),await this.sendIgnoringError("OPTS UTF8 ON"),r&&await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;"),this.ftp.hasTLS&&(await this.sendIgnoringError("PBSZ 0"),await this.sendIgnoringError("PROT P"))}async access(t={}){var r,i;let n=t.secure===!0,o=t.secure==="implicit",s;if(o?s=await this.connectImplicitTLS(t.host,t.port,t.secureOptions):s=await this.connect(t.host,t.port),n){let c=(r=t.secureOptions)!==null&&r!==void 0?r:{};c.host=(i=c.host)!==null&&i!==void 0?i:t.host,await this.useTLS(c)}return await this.sendIgnoringError("OPTS UTF8 ON"),await this.login(t.user,t.password),await this.useDefaultSettings(),s}async pwd(){let t=await this.send("PWD"),r=t.message.match(/"(.+)"/);if(r===null||r[1]===void 0)throw new Error(`Can't parse response to command 'PWD': ${t.message}`);return r[1]}async features(){let t=await this.sendIgnoringError("FEAT"),r=new Map;return t.code<400&&(0,Gy.isMultiline)(t.message)&&t.message.split(`
6
+ `).slice(1,-1).forEach(i=>{let n=i.trim().split(" ");r.set(n[0],n[1]||"")}),r}async cd(t){let r=await this.protectWhitespace(t);return this.send("CWD "+r)}async cdup(){return this.send("CDUP")}async lastMod(t){let r=await this.protectWhitespace(t),n=(await this.send(`MDTM ${r}`)).message.slice(4);return(0,e4.parseMLSxDate)(n)}async size(t){let i=`SIZE ${await this.protectWhitespace(t)}`,n=await this.send(i),o=parseInt(n.message.slice(4),10);if(Number.isNaN(o))throw new Error(`Can't parse response to command '${i}' as a numerical value: ${n.message}`);return o}async rename(t,r){let i=await this.protectWhitespace(t),n=await this.protectWhitespace(r);return await this.send("RNFR "+i),this.send("RNTO "+n)}async remove(t,r=!1){let i=await this.protectWhitespace(t);return r?this.sendIgnoringError(`DELE ${i}`):this.send(`DELE ${i}`)}trackProgress(t){this._progressTracker.bytesOverall=0,this._progressTracker.reportTo(t)}async uploadFrom(t,r,i={}){return this._uploadWithCommand(t,r,"STOR",i)}async appendFrom(t,r,i={}){return this._uploadWithCommand(t,r,"APPE",i)}async _uploadWithCommand(t,r,i,n){return typeof t=="string"?this._uploadLocalFile(t,r,i,n):this._uploadFromStream(t,r,i)}async _uploadLocalFile(t,r,i,n){let o=await tv(t,"r"),s=(0,Kn.createReadStream)("",{fd:o,start:n.localStart,end:n.localEndInclusive,autoClose:!1});try{let c=await u4(o,n),u=await this._uploadFromStream(s,r,i);if(c!==void 0&&s.bytesRead!==c)throw new Error(`Local file "${t}" changed while it was being uploaded to "${r}": expected to send ${c} bytes but sent ${s.bytesRead}. The remote file is incomplete.`);return u}finally{await su(()=>rv(o))}}async _uploadFromStream(t,r,i){let n=a(o=>this.ftp.closeWithError(o),"onError");t.once("error",n);try{let o=await this.protectWhitespace(r);return await this.prepareTransfer(this.ftp),await(0,Ss.uploadFrom)(t,{ftp:this.ftp,tracker:this._progressTracker,command:i,remotePath:o,type:"upload"})}finally{t.removeListener("error",n)}}async downloadTo(t,r,i=0){return typeof t=="string"?this._downloadToFile(t,r,i):this._downloadToStream(t,r,i)}async _downloadToFile(t,r,i){let n=i>0,s=await tv(t,n?"r+":"w"),c=(0,Kn.createWriteStream)("",{fd:s,start:i,autoClose:!1});try{return await this._downloadToStream(c,r,i)}catch(u){let l=await su(()=>Ky(t)),f=l&&l.size>0;throw!n&&!f&&await su(()=>s4(t)),u}finally{await su(()=>rv(s))}}async _downloadToStream(t,r,i){let n=a(o=>this.ftp.closeWithError(o),"onError");t.once("error",n);try{let o=await this.protectWhitespace(r);return await this.prepareTransfer(this.ftp),await(0,Ss.downloadTo)(t,{ftp:this.ftp,tracker:this._progressTracker,command:i>0?`REST ${i}`:`RETR ${o}`,remotePath:o,type:"download"})}finally{t.removeListener("error",n),t.end()}}async list(t=""){let r=await this.protectWhitespace(t),i;for(let n of this.availableListCommands){let o=r===""?n:`${n} ${r}`;await this.prepareTransfer(this.ftp);try{let s=await this._requestListWithCommand(o);return this.availableListCommands=[n],s}catch(s){if(!(s instanceof ou.FTPError))throw s;i=s}}throw i}async _requestListWithCommand(t){let r=new r4.StringWriter(this.options.maxListingBytes);await(0,Ss.downloadTo)(r,{ftp:this.ftp,tracker:this._progressTracker,command:t,remotePath:"",type:"list"});let i=r.getText(this.ftp.encoding);return this.ftp.log(i),this.parseList(i)}async removeDir(t){return this._exitAtCurrentDirectory(async()=>{await this.cd(t);let r=await this.pwd();await this.clearWorkingDir(),r==="/"||(await this.cdup(),await this.removeEmptyDir(r))})}async clearWorkingDir(){for(let t of await this.list())t.isDirectory?(await this.cd(t.name),await this.clearWorkingDir(),await this.cdup(),await this.removeEmptyDir(t.name)):await this.remove(t.name)}async uploadFromDir(t,r){return this._exitAtCurrentDirectory(async()=>(r&&await this.ensureDir(r),await this._uploadToWorkingDir(t)))}async _uploadToWorkingDir(t){let r=await n4(t);for(let i of r){let n=(0,Qy.join)(t,i),o=await Ky(n);o.isFile()?await this.uploadFrom(n,i):o.isDirectory()&&(await this._openDir(i),await this._uploadToWorkingDir(n),await this.cdup())}}async downloadToDir(t,r){return this._exitAtCurrentDirectory(async()=>(r&&await this.cd(r),await this._downloadFromWorkingDir(t)))}async _downloadFromWorkingDir(t){await c4(t);for(let r of await this.list()){if(!r.name||(0,Qy.basename)(r.name)!==r.name){let o=JSON.stringify(r.name);this.ftp.log(`Invalid filename from server listing, will skip file. (${o})`);continue}let n=(0,Qy.join)(t,r.name);r.isDirectory?(await this.cd(r.name),await this._downloadFromWorkingDir(n),await this.cdup()):r.isFile&&await this.downloadTo(n,r.name)}}async ensureDir(t){t.startsWith("/")&&await this.cd("/");let r=t.split("/").filter(i=>i!=="");for(let i of r)await this._openDir(i)}async _openDir(t){await this.sendIgnoringError("MKD "+t),await this.cd(t)}async removeEmptyDir(t){let r=await this.protectWhitespace(t);return this.send(`RMD ${r}`)}async protectWhitespace(t){if(!t.startsWith(" "))return t;let r=await this.pwd();return(r.endsWith("/")?r:r+"/")+t}async _exitAtCurrentDirectory(t){let r=await this.pwd();try{return await t()}finally{this.closed||await su(()=>this.cd(r))}}_enterFirstCompatibleMode(t){return async r=>{r.log("Trying to find optimal transfer strategy...");let i;for(let n of t)try{let o=await n(r);return r.log("Optimal transfer strategy found."),this.prepareTransfer=n,o}catch(o){i=o}throw new Error(`None of the available transfer strategies work. Last error response was '${i}'.`)}}async upload(t,r,i={}){return this.ftp.log("Warning: upload() has been deprecated, use uploadFrom()."),this.uploadFrom(t,r,i)}async append(t,r,i={}){return this.ftp.log("Warning: append() has been deprecated, use appendFrom()."),this.appendFrom(t,r,i)}async download(t,r,i=0){return this.ftp.log("Warning: download() has been deprecated, use downloadTo()."),this.downloadTo(t,r,i)}async uploadDir(t,r){return this.ftp.log("Warning: uploadDir() has been deprecated, use uploadFromDir()."),this.uploadFromDir(t,r)}async downloadDir(t){return this.ftp.log("Warning: downloadDir() has been deprecated, use downloadToDir()."),this.downloadToDir(t)}};Ud.Client=Yy;async function c4(e){try{await Ky(e)}catch{await i4(e,{recursive:!0})}}a(c4,"ensureLocalDirectory");async function u4(e,t){var r;let i=await o4(e);if(!i.isFile())return;let n=(r=t.localStart)!==null&&r!==void 0?r:0,o=t.localEndInclusive!==void 0?Math.min(t.localEndInclusive+1,i.size):i.size;return Math.max(0,o-n)}a(u4,"expectedBytesFromLocalFile");async function su(e){try{return await e()}catch{return}}a(su,"ignoreError")});var av=me(sv=>{"use strict";Object.defineProperty(sv,"__esModule",{value:!0})});var In=me(Ur=>{"use strict";var l4=Ur&&Ur.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:a(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),au=Ur&&Ur.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&l4(t,e,r)};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.enterPassiveModeIPv6=Ur.enterPassiveModeIPv4=void 0;au(ov(),Ur);au(By(),Ur);au(ru(),Ur);au(Hy(),Ur);au(av(),Ur);var cv=Zy();Object.defineProperty(Ur,"enterPassiveModeIPv4",{enumerable:!0,get:a(function(){return cv.enterPassiveModeIPv4},"get")});Object.defineProperty(Ur,"enterPassiveModeIPv6",{enumerable:!0,get:a(function(){return cv.enterPassiveModeIPv6},"get")})});var Md=me((DQ,uv)=>{uv.exports={newInvalidAsn1Error:a(function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t},"newInvalidAsn1Error")}});var Fd=me((LQ,lv)=>{lv.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}});var Xy=me((zQ,fv)=>{"use strict";var Hd=require("buffer"),vs=Hd.Buffer,dn={},pn;for(pn in Hd)Hd.hasOwnProperty(pn)&&(pn==="SlowBuffer"||pn==="Buffer"||(dn[pn]=Hd[pn]));var ws=dn.Buffer={};for(pn in vs)vs.hasOwnProperty(pn)&&(pn==="allocUnsafe"||pn==="allocUnsafeSlow"||(ws[pn]=vs[pn]));dn.Buffer.prototype=vs.prototype;(!ws.from||ws.from===Uint8Array.from)&&(ws.from=function(e,t,r){if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&typeof e.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return vs(e,t,r)});ws.alloc||(ws.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=vs(e);return!t||t.length===0?i.fill(0):typeof r=="string"?i.fill(t,r):i.fill(t),i});if(!dn.kStringMaxLength)try{dn.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}dn.constants||(dn.constants={MAX_LENGTH:dn.kMaxLength},dn.kStringMaxLength&&(dn.constants.MAX_STRING_LENGTH=dn.kStringMaxLength));fv.exports=dn});var hv=me((UQ,pv)=>{var f4=require("assert"),dv=Xy().Buffer,cu=Fd(),d4=Md(),Ps=d4.newInvalidAsn1Error;function Mr(e){if(!e||!dv.isBuffer(e))throw new TypeError("data must be a node Buffer");this._buf=e,this._size=e.length,this._len=0,this._offset=0}a(Mr,"Reader");Object.defineProperty(Mr.prototype,"length",{enumerable:!0,get:a(function(){return this._len},"get")});Object.defineProperty(Mr.prototype,"offset",{enumerable:!0,get:a(function(){return this._offset},"get")});Object.defineProperty(Mr.prototype,"remain",{get:a(function(){return this._size-this._offset},"get")});Object.defineProperty(Mr.prototype,"buffer",{get:a(function(){return this._buf.slice(this._offset)},"get")});Mr.prototype.readByte=function(e){if(this._size-this._offset<1)return null;var t=this._buf[this._offset]&255;return e||(this._offset+=1),t};Mr.prototype.peek=function(){return this.readByte(!0)};Mr.prototype.readLength=function(e){if(e===void 0&&(e=this._offset),e>=this._size)return null;var t=this._buf[e++]&255;if(t===null)return null;if((t&128)===128){if(t&=127,t===0)throw Ps("Indefinite length not supported");if(t>4)throw Ps("encoding too long");if(this._size-e<t)return null;this._len=0;for(var r=0;r<t;r++)this._len=(this._len<<8)+(this._buf[e++]&255)}else this._len=t;return e};Mr.prototype.readSequence=function(e){var t=this.peek();if(t===null)return null;if(e!==void 0&&e!==t)throw Ps("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);return r===null?null:(this._offset=r,t)};Mr.prototype.readInt=function(){return this._readTag(cu.Integer)};Mr.prototype.readBoolean=function(){return this._readTag(cu.Boolean)!==0};Mr.prototype.readEnumeration=function(){return this._readTag(cu.Enumeration)};Mr.prototype.readString=function(e,t){e||(e=cu.OctetString);var r=this.peek();if(r===null)return null;if(r!==e)throw Ps("Expected 0x"+e.toString(16)+": got 0x"+r.toString(16));var i=this.readLength(this._offset+1);if(i===null||this.length>this._size-i)return null;if(this._offset=i,this.length===0)return t?dv.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?n:n.toString("utf8")};Mr.prototype.readOID=function(e){e||(e=cu.OID);var t=this.readString(e,!0);if(t===null)return null;for(var r=[],i=0,n=0;n<t.length;n++){var o=t[n]&255;i<<=7,i+=o&127,(o&128)===0&&(r.push(i),i=0)}return i=r.shift(),r.unshift(i%40),r.unshift(i/40>>0),r.join(".")};Mr.prototype._readTag=function(e){f4.ok(e!==void 0);var t=this.peek();if(t===null)return null;if(t!==e)throw Ps("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(r===null)return null;if(this.length>4)throw Ps("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var i=this._buf[this._offset],n=0,o=0;o<this.length;o++)n<<=8,n|=this._buf[this._offset++]&255;return(i&128)===128&&o!==4&&(n-=1<<o*8),n>>0};pv.exports=Mr});var mv=me((FQ,gv)=>{var Si=require("assert"),jd=Xy().Buffer,vi=Fd(),p4=Md(),Wd=p4.newInvalidAsn1Error,h4={size:1024,growthFactor:8};function g4(e,t){Si.ok(e),Si.equal(typeof e,"object"),Si.ok(t),Si.equal(typeof t,"object");var r=Object.getOwnPropertyNames(e);return r.forEach(function(i){if(!t[i]){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n)}}),t}a(g4,"merge");function Nr(e){e=g4(h4,e||{}),this._buf=jd.alloc(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}a(Nr,"Writer");Object.defineProperty(Nr.prototype,"buffer",{get:a(function(){if(this._seq.length)throw Wd(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)},"get")});Nr.prototype.writeByte=function(e){if(typeof e!="number")throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e};Nr.prototype.writeInt=function(e,t){if(typeof e!="number")throw new TypeError("argument must be a Number");typeof t!="number"&&(t=vi.Integer);for(var r=4;((e&4286578688)===0||(e&4286578688)===-8388608)&&r>1;)r--,e<<=8;if(r>4)throw Wd("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(e&4278190080)>>>24,e<<=8};Nr.prototype.writeNull=function(){this.writeByte(vi.Null),this.writeByte(0)};Nr.prototype.writeEnumeration=function(e,t){if(typeof e!="number")throw new TypeError("argument must be a Number");return typeof t!="number"&&(t=vi.Enumeration),this.writeInt(e,t)};Nr.prototype.writeBoolean=function(e,t){if(typeof e!="boolean")throw new TypeError("argument must be a Boolean");typeof t!="number"&&(t=vi.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0};Nr.prototype.writeString=function(e,t){if(typeof e!="string")throw new TypeError("argument must be a string (was: "+typeof e+")");typeof t!="number"&&(t=vi.OctetString);var r=jd.byteLength(e);this.writeByte(t),this.writeLength(r),r&&(this._ensure(r),this._buf.write(e,this._offset),this._offset+=r)};Nr.prototype.writeBuffer=function(e,t){if(typeof t!="number")throw new TypeError("tag must be a number");if(!jd.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length};Nr.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach(function(r){t.writeString(r)})};Nr.prototype.writeOID=function(e,t){if(typeof e!="string")throw new TypeError("argument must be a string");if(typeof t!="number"&&(t=vi.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");function r(s,c){c<128?s.push(c):c<16384?(s.push(c>>>7|128),s.push(c&127)):c<2097152?(s.push(c>>>14|128),s.push((c>>>7|128)&255),s.push(c&127)):c<268435456?(s.push(c>>>21|128),s.push((c>>>14|128)&255),s.push((c>>>7|128)&255),s.push(c&127)):(s.push((c>>>28|128)&255),s.push((c>>>21|128)&255),s.push((c>>>14|128)&255),s.push((c>>>7|128)&255),s.push(c&127))}a(r,"encodeOctet");var i=e.split("."),n=[];n.push(parseInt(i[0],10)*40+parseInt(i[1],10)),i.slice(2).forEach(function(s){r(n,parseInt(s,10))});var o=this;this._ensure(2+n.length),this.writeByte(t),this.writeLength(n.length),n.forEach(function(s){o.writeByte(s)})};Nr.prototype.writeLength=function(e){if(typeof e!="number")throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else if(e<=16777215)this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else throw Wd("Length too long (> 4 bytes)")};Nr.prototype.startSequence=function(e){typeof e!="number"&&(e=vi.Sequence|vi.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3};Nr.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else if(r<=16777215)this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r;else throw Wd("Sequence too long")};Nr.prototype._shift=function(e,t,r){Si.ok(e!==void 0),Si.ok(t!==void 0),Si.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r};Nr.prototype._ensure=function(e){if(Si.ok(e),this._size-this._offset<e){var t=this._size*this._options.growthFactor;t-this._offset<e&&(t+=e);var r=jd.alloc(t);this._buf.copy(r,0,0,this._offset),this._buf=r,this._size=t}};gv.exports=Nr});var _v=me((jQ,Zd)=>{var Jy=Md(),eE=Fd(),m4=hv(),_4=mv();Zd.exports={Reader:m4,Writer:_4};for(qd in eE)eE.hasOwnProperty(qd)&&(Zd.exports[qd]=eE[qd]);var qd;for(Vd in Jy)Jy.hasOwnProperty(Vd)&&(Zd.exports[Vd]=Jy[Vd]);var Vd});var uu=me((WQ,yv)=>{var tE=_v();yv.exports={Ber:tE,BerReader:tE.Reader,BerWriter:tE.Writer}});var Ev=me((qQ,Qd)=>{(function(e){"use strict";var t=a(function(m){var A,E=new Float64Array(16);if(m)for(A=0;A<m.length;A++)E[A]=m[A];return E},"gf"),r=a(function(){throw new Error("no PRNG")},"randombytes"),i=new Uint8Array(16),n=new Uint8Array(32);n[0]=9;var o=t(),s=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(m,A,E,d){m[A]=E>>24&255,m[A+1]=E>>16&255,m[A+2]=E>>8&255,m[A+3]=E&255,m[A+4]=d>>24&255,m[A+5]=d>>16&255,m[A+6]=d>>8&255,m[A+7]=d&255}a(h,"ts64");function _(m,A,E,d,I){var D,F=0;for(D=0;D<I;D++)F|=m[A+D]^E[d+D];return(1&F-1>>>8)-1}a(_,"vn");function y(m,A,E,d){return _(m,A,E,d,16)}a(y,"crypto_verify_16");function b(m,A,E,d){return _(m,A,E,d,32)}a(b,"crypto_verify_32");function S(m,A,E,d){for(var I=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,D=E[0]&255|(E[1]&255)<<8|(E[2]&255)<<16|(E[3]&255)<<24,F=E[4]&255|(E[5]&255)<<8|(E[6]&255)<<16|(E[7]&255)<<24,se=E[8]&255|(E[9]&255)<<8|(E[10]&255)<<16|(E[11]&255)<<24,he=E[12]&255|(E[13]&255)<<8|(E[14]&255)<<16|(E[15]&255)<<24,we=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,be=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,It=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,ve=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ze=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,rt=E[16]&255|(E[17]&255)<<8|(E[18]&255)<<16|(E[19]&255)<<24,tt=E[20]&255|(E[21]&255)<<8|(E[22]&255)<<16|(E[23]&255)<<24,Ge=E[24]&255|(E[25]&255)<<8|(E[26]&255)<<16|(E[27]&255)<<24,Je=E[28]&255|(E[29]&255)<<8|(E[30]&255)<<16|(E[31]&255)<<24,Ke=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,Pe=I,Ce=D,Ie=F,Te=se,ke=he,Ae=we,G=be,K=It,ce=ve,oe=Ze,ae=Qe,de=rt,Be=tt,nt=Ge,ct=Je,it=Ke,w,lt=0;lt<20;lt+=2)w=Pe+Be|0,ke^=w<<7|w>>>25,w=ke+Pe|0,ce^=w<<9|w>>>23,w=ce+ke|0,Be^=w<<13|w>>>19,w=Be+ce|0,Pe^=w<<18|w>>>14,w=Ae+Ce|0,oe^=w<<7|w>>>25,w=oe+Ae|0,nt^=w<<9|w>>>23,w=nt+oe|0,Ce^=w<<13|w>>>19,w=Ce+nt|0,Ae^=w<<18|w>>>14,w=ae+G|0,ct^=w<<7|w>>>25,w=ct+ae|0,Ie^=w<<9|w>>>23,w=Ie+ct|0,G^=w<<13|w>>>19,w=G+Ie|0,ae^=w<<18|w>>>14,w=it+de|0,Te^=w<<7|w>>>25,w=Te+it|0,K^=w<<9|w>>>23,w=K+Te|0,de^=w<<13|w>>>19,w=de+K|0,it^=w<<18|w>>>14,w=Pe+Te|0,Ce^=w<<7|w>>>25,w=Ce+Pe|0,Ie^=w<<9|w>>>23,w=Ie+Ce|0,Te^=w<<13|w>>>19,w=Te+Ie|0,Pe^=w<<18|w>>>14,w=Ae+ke|0,G^=w<<7|w>>>25,w=G+Ae|0,K^=w<<9|w>>>23,w=K+G|0,ke^=w<<13|w>>>19,w=ke+K|0,Ae^=w<<18|w>>>14,w=ae+oe|0,de^=w<<7|w>>>25,w=de+ae|0,ce^=w<<9|w>>>23,w=ce+de|0,oe^=w<<13|w>>>19,w=oe+ce|0,ae^=w<<18|w>>>14,w=it+ct|0,Be^=w<<7|w>>>25,w=Be+it|0,nt^=w<<9|w>>>23,w=nt+Be|0,ct^=w<<13|w>>>19,w=ct+nt|0,it^=w<<18|w>>>14;Pe=Pe+I|0,Ce=Ce+D|0,Ie=Ie+F|0,Te=Te+se|0,ke=ke+he|0,Ae=Ae+we|0,G=G+be|0,K=K+It|0,ce=ce+ve|0,oe=oe+Ze|0,ae=ae+Qe|0,de=de+rt|0,Be=Be+tt|0,nt=nt+Ge|0,ct=ct+Je|0,it=it+Ke|0,m[0]=Pe>>>0&255,m[1]=Pe>>>8&255,m[2]=Pe>>>16&255,m[3]=Pe>>>24&255,m[4]=Ce>>>0&255,m[5]=Ce>>>8&255,m[6]=Ce>>>16&255,m[7]=Ce>>>24&255,m[8]=Ie>>>0&255,m[9]=Ie>>>8&255,m[10]=Ie>>>16&255,m[11]=Ie>>>24&255,m[12]=Te>>>0&255,m[13]=Te>>>8&255,m[14]=Te>>>16&255,m[15]=Te>>>24&255,m[16]=ke>>>0&255,m[17]=ke>>>8&255,m[18]=ke>>>16&255,m[19]=ke>>>24&255,m[20]=Ae>>>0&255,m[21]=Ae>>>8&255,m[22]=Ae>>>16&255,m[23]=Ae>>>24&255,m[24]=G>>>0&255,m[25]=G>>>8&255,m[26]=G>>>16&255,m[27]=G>>>24&255,m[28]=K>>>0&255,m[29]=K>>>8&255,m[30]=K>>>16&255,m[31]=K>>>24&255,m[32]=ce>>>0&255,m[33]=ce>>>8&255,m[34]=ce>>>16&255,m[35]=ce>>>24&255,m[36]=oe>>>0&255,m[37]=oe>>>8&255,m[38]=oe>>>16&255,m[39]=oe>>>24&255,m[40]=ae>>>0&255,m[41]=ae>>>8&255,m[42]=ae>>>16&255,m[43]=ae>>>24&255,m[44]=de>>>0&255,m[45]=de>>>8&255,m[46]=de>>>16&255,m[47]=de>>>24&255,m[48]=Be>>>0&255,m[49]=Be>>>8&255,m[50]=Be>>>16&255,m[51]=Be>>>24&255,m[52]=nt>>>0&255,m[53]=nt>>>8&255,m[54]=nt>>>16&255,m[55]=nt>>>24&255,m[56]=ct>>>0&255,m[57]=ct>>>8&255,m[58]=ct>>>16&255,m[59]=ct>>>24&255,m[60]=it>>>0&255,m[61]=it>>>8&255,m[62]=it>>>16&255,m[63]=it>>>24&255}a(S,"core_salsa20");function v(m,A,E,d){for(var I=d[0]&255|(d[1]&255)<<8|(d[2]&255)<<16|(d[3]&255)<<24,D=E[0]&255|(E[1]&255)<<8|(E[2]&255)<<16|(E[3]&255)<<24,F=E[4]&255|(E[5]&255)<<8|(E[6]&255)<<16|(E[7]&255)<<24,se=E[8]&255|(E[9]&255)<<8|(E[10]&255)<<16|(E[11]&255)<<24,he=E[12]&255|(E[13]&255)<<8|(E[14]&255)<<16|(E[15]&255)<<24,we=d[4]&255|(d[5]&255)<<8|(d[6]&255)<<16|(d[7]&255)<<24,be=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,It=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,ve=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ze=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=d[8]&255|(d[9]&255)<<8|(d[10]&255)<<16|(d[11]&255)<<24,rt=E[16]&255|(E[17]&255)<<8|(E[18]&255)<<16|(E[19]&255)<<24,tt=E[20]&255|(E[21]&255)<<8|(E[22]&255)<<16|(E[23]&255)<<24,Ge=E[24]&255|(E[25]&255)<<8|(E[26]&255)<<16|(E[27]&255)<<24,Je=E[28]&255|(E[29]&255)<<8|(E[30]&255)<<16|(E[31]&255)<<24,Ke=d[12]&255|(d[13]&255)<<8|(d[14]&255)<<16|(d[15]&255)<<24,Pe=I,Ce=D,Ie=F,Te=se,ke=he,Ae=we,G=be,K=It,ce=ve,oe=Ze,ae=Qe,de=rt,Be=tt,nt=Ge,ct=Je,it=Ke,w,lt=0;lt<20;lt+=2)w=Pe+Be|0,ke^=w<<7|w>>>25,w=ke+Pe|0,ce^=w<<9|w>>>23,w=ce+ke|0,Be^=w<<13|w>>>19,w=Be+ce|0,Pe^=w<<18|w>>>14,w=Ae+Ce|0,oe^=w<<7|w>>>25,w=oe+Ae|0,nt^=w<<9|w>>>23,w=nt+oe|0,Ce^=w<<13|w>>>19,w=Ce+nt|0,Ae^=w<<18|w>>>14,w=ae+G|0,ct^=w<<7|w>>>25,w=ct+ae|0,Ie^=w<<9|w>>>23,w=Ie+ct|0,G^=w<<13|w>>>19,w=G+Ie|0,ae^=w<<18|w>>>14,w=it+de|0,Te^=w<<7|w>>>25,w=Te+it|0,K^=w<<9|w>>>23,w=K+Te|0,de^=w<<13|w>>>19,w=de+K|0,it^=w<<18|w>>>14,w=Pe+Te|0,Ce^=w<<7|w>>>25,w=Ce+Pe|0,Ie^=w<<9|w>>>23,w=Ie+Ce|0,Te^=w<<13|w>>>19,w=Te+Ie|0,Pe^=w<<18|w>>>14,w=Ae+ke|0,G^=w<<7|w>>>25,w=G+Ae|0,K^=w<<9|w>>>23,w=K+G|0,ke^=w<<13|w>>>19,w=ke+K|0,Ae^=w<<18|w>>>14,w=ae+oe|0,de^=w<<7|w>>>25,w=de+ae|0,ce^=w<<9|w>>>23,w=ce+de|0,oe^=w<<13|w>>>19,w=oe+ce|0,ae^=w<<18|w>>>14,w=it+ct|0,Be^=w<<7|w>>>25,w=Be+it|0,nt^=w<<9|w>>>23,w=nt+Be|0,ct^=w<<13|w>>>19,w=ct+nt|0,it^=w<<18|w>>>14;m[0]=Pe>>>0&255,m[1]=Pe>>>8&255,m[2]=Pe>>>16&255,m[3]=Pe>>>24&255,m[4]=Ae>>>0&255,m[5]=Ae>>>8&255,m[6]=Ae>>>16&255,m[7]=Ae>>>24&255,m[8]=ae>>>0&255,m[9]=ae>>>8&255,m[10]=ae>>>16&255,m[11]=ae>>>24&255,m[12]=it>>>0&255,m[13]=it>>>8&255,m[14]=it>>>16&255,m[15]=it>>>24&255,m[16]=G>>>0&255,m[17]=G>>>8&255,m[18]=G>>>16&255,m[19]=G>>>24&255,m[20]=K>>>0&255,m[21]=K>>>8&255,m[22]=K>>>16&255,m[23]=K>>>24&255,m[24]=ce>>>0&255,m[25]=ce>>>8&255,m[26]=ce>>>16&255,m[27]=ce>>>24&255,m[28]=oe>>>0&255,m[29]=oe>>>8&255,m[30]=oe>>>16&255,m[31]=oe>>>24&255}a(v,"core_hsalsa20");function M(m,A,E,d){S(m,A,E,d)}a(M,"crypto_core_salsa20");function R(m,A,E,d){v(m,A,E,d)}a(R,"crypto_core_hsalsa20");var J=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function te(m,A,E,d,I,D,F){var se=new Uint8Array(16),he=new Uint8Array(64),we,be;for(be=0;be<16;be++)se[be]=0;for(be=0;be<8;be++)se[be]=D[be];for(;I>=64;){for(M(he,se,F,J),be=0;be<64;be++)m[A+be]=E[d+be]^he[be];for(we=1,be=8;be<16;be++)we=we+(se[be]&255)|0,se[be]=we&255,we>>>=8;I-=64,A+=64,d+=64}if(I>0)for(M(he,se,F,J),be=0;be<I;be++)m[A+be]=E[d+be]^he[be];return 0}a(te,"crypto_stream_salsa20_xor");function ee(m,A,E,d,I){var D=new Uint8Array(16),F=new Uint8Array(64),se,he;for(he=0;he<16;he++)D[he]=0;for(he=0;he<8;he++)D[he]=d[he];for(;E>=64;){for(M(F,D,I,J),he=0;he<64;he++)m[A+he]=F[he];for(se=1,he=8;he<16;he++)se=se+(D[he]&255)|0,D[he]=se&255,se>>>=8;E-=64,A+=64}if(E>0)for(M(F,D,I,J),he=0;he<E;he++)m[A+he]=F[he];return 0}a(ee,"crypto_stream_salsa20");function P(m,A,E,d,I){var D=new Uint8Array(32);R(D,d,I,J);for(var F=new Uint8Array(8),se=0;se<8;se++)F[se]=d[se+16];return ee(m,A,E,F,D)}a(P,"crypto_stream");function C(m,A,E,d,I,D,F){var se=new Uint8Array(32);R(se,D,F,J);for(var he=new Uint8Array(8),we=0;we<8;we++)he[we]=D[we+16];return te(m,A,E,d,I,he,se)}a(C,"crypto_stream_xor");var H=a(function(m){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var A,E,d,I,D,F,se,he;A=m[0]&255|(m[1]&255)<<8,this.r[0]=A&8191,E=m[2]&255|(m[3]&255)<<8,this.r[1]=(A>>>13|E<<3)&8191,d=m[4]&255|(m[5]&255)<<8,this.r[2]=(E>>>10|d<<6)&7939,I=m[6]&255|(m[7]&255)<<8,this.r[3]=(d>>>7|I<<9)&8191,D=m[8]&255|(m[9]&255)<<8,this.r[4]=(I>>>4|D<<12)&255,this.r[5]=D>>>1&8190,F=m[10]&255|(m[11]&255)<<8,this.r[6]=(D>>>14|F<<2)&8191,se=m[12]&255|(m[13]&255)<<8,this.r[7]=(F>>>11|se<<5)&8065,he=m[14]&255|(m[15]&255)<<8,this.r[8]=(se>>>8|he<<8)&8191,this.r[9]=he>>>5&127,this.pad[0]=m[16]&255|(m[17]&255)<<8,this.pad[1]=m[18]&255|(m[19]&255)<<8,this.pad[2]=m[20]&255|(m[21]&255)<<8,this.pad[3]=m[22]&255|(m[23]&255)<<8,this.pad[4]=m[24]&255|(m[25]&255)<<8,this.pad[5]=m[26]&255|(m[27]&255)<<8,this.pad[6]=m[28]&255|(m[29]&255)<<8,this.pad[7]=m[30]&255|(m[31]&255)<<8},"poly1305");H.prototype.blocks=function(m,A,E){for(var d=this.fin?0:2048,I,D,F,se,he,we,be,It,ve,Ze,Qe,rt,tt,Ge,Je,Ke,Pe,Ce,Ie,Te=this.h[0],ke=this.h[1],Ae=this.h[2],G=this.h[3],K=this.h[4],ce=this.h[5],oe=this.h[6],ae=this.h[7],de=this.h[8],Be=this.h[9],nt=this.r[0],ct=this.r[1],it=this.r[2],w=this.r[3],lt=this.r[4],St=this.r[5],vt=this.r[6],ut=this.r[7],Et=this.r[8],At=this.r[9];E>=16;)I=m[A+0]&255|(m[A+1]&255)<<8,Te+=I&8191,D=m[A+2]&255|(m[A+3]&255)<<8,ke+=(I>>>13|D<<3)&8191,F=m[A+4]&255|(m[A+5]&255)<<8,Ae+=(D>>>10|F<<6)&8191,se=m[A+6]&255|(m[A+7]&255)<<8,G+=(F>>>7|se<<9)&8191,he=m[A+8]&255|(m[A+9]&255)<<8,K+=(se>>>4|he<<12)&8191,ce+=he>>>1&8191,we=m[A+10]&255|(m[A+11]&255)<<8,oe+=(he>>>14|we<<2)&8191,be=m[A+12]&255|(m[A+13]&255)<<8,ae+=(we>>>11|be<<5)&8191,It=m[A+14]&255|(m[A+15]&255)<<8,de+=(be>>>8|It<<8)&8191,Be+=It>>>5|d,ve=0,Ze=ve,Ze+=Te*nt,Ze+=ke*(5*At),Ze+=Ae*(5*Et),Ze+=G*(5*ut),Ze+=K*(5*vt),ve=Ze>>>13,Ze&=8191,Ze+=ce*(5*St),Ze+=oe*(5*lt),Ze+=ae*(5*w),Ze+=de*(5*it),Ze+=Be*(5*ct),ve+=Ze>>>13,Ze&=8191,Qe=ve,Qe+=Te*ct,Qe+=ke*nt,Qe+=Ae*(5*At),Qe+=G*(5*Et),Qe+=K*(5*ut),ve=Qe>>>13,Qe&=8191,Qe+=ce*(5*vt),Qe+=oe*(5*St),Qe+=ae*(5*lt),Qe+=de*(5*w),Qe+=Be*(5*it),ve+=Qe>>>13,Qe&=8191,rt=ve,rt+=Te*it,rt+=ke*ct,rt+=Ae*nt,rt+=G*(5*At),rt+=K*(5*Et),ve=rt>>>13,rt&=8191,rt+=ce*(5*ut),rt+=oe*(5*vt),rt+=ae*(5*St),rt+=de*(5*lt),rt+=Be*(5*w),ve+=rt>>>13,rt&=8191,tt=ve,tt+=Te*w,tt+=ke*it,tt+=Ae*ct,tt+=G*nt,tt+=K*(5*At),ve=tt>>>13,tt&=8191,tt+=ce*(5*Et),tt+=oe*(5*ut),tt+=ae*(5*vt),tt+=de*(5*St),tt+=Be*(5*lt),ve+=tt>>>13,tt&=8191,Ge=ve,Ge+=Te*lt,Ge+=ke*w,Ge+=Ae*it,Ge+=G*ct,Ge+=K*nt,ve=Ge>>>13,Ge&=8191,Ge+=ce*(5*At),Ge+=oe*(5*Et),Ge+=ae*(5*ut),Ge+=de*(5*vt),Ge+=Be*(5*St),ve+=Ge>>>13,Ge&=8191,Je=ve,Je+=Te*St,Je+=ke*lt,Je+=Ae*w,Je+=G*it,Je+=K*ct,ve=Je>>>13,Je&=8191,Je+=ce*nt,Je+=oe*(5*At),Je+=ae*(5*Et),Je+=de*(5*ut),Je+=Be*(5*vt),ve+=Je>>>13,Je&=8191,Ke=ve,Ke+=Te*vt,Ke+=ke*St,Ke+=Ae*lt,Ke+=G*w,Ke+=K*it,ve=Ke>>>13,Ke&=8191,Ke+=ce*ct,Ke+=oe*nt,Ke+=ae*(5*At),Ke+=de*(5*Et),Ke+=Be*(5*ut),ve+=Ke>>>13,Ke&=8191,Pe=ve,Pe+=Te*ut,Pe+=ke*vt,Pe+=Ae*St,Pe+=G*lt,Pe+=K*w,ve=Pe>>>13,Pe&=8191,Pe+=ce*it,Pe+=oe*ct,Pe+=ae*nt,Pe+=de*(5*At),Pe+=Be*(5*Et),ve+=Pe>>>13,Pe&=8191,Ce=ve,Ce+=Te*Et,Ce+=ke*ut,Ce+=Ae*vt,Ce+=G*St,Ce+=K*lt,ve=Ce>>>13,Ce&=8191,Ce+=ce*w,Ce+=oe*it,Ce+=ae*ct,Ce+=de*nt,Ce+=Be*(5*At),ve+=Ce>>>13,Ce&=8191,Ie=ve,Ie+=Te*At,Ie+=ke*Et,Ie+=Ae*ut,Ie+=G*vt,Ie+=K*St,ve=Ie>>>13,Ie&=8191,Ie+=ce*lt,Ie+=oe*w,Ie+=ae*it,Ie+=de*ct,Ie+=Be*nt,ve+=Ie>>>13,Ie&=8191,ve=(ve<<2)+ve|0,ve=ve+Ze|0,Ze=ve&8191,ve=ve>>>13,Qe+=ve,Te=Ze,ke=Qe,Ae=rt,G=tt,K=Ge,ce=Je,oe=Ke,ae=Pe,de=Ce,Be=Ie,A+=16,E-=16;this.h[0]=Te,this.h[1]=ke,this.h[2]=Ae,this.h[3]=G,this.h[4]=K,this.h[5]=ce,this.h[6]=oe,this.h[7]=ae,this.h[8]=de,this.h[9]=Be},H.prototype.finish=function(m,A){var E=new Uint16Array(10),d,I,D,F;if(this.leftover){for(F=this.leftover,this.buffer[F++]=1;F<16;F++)this.buffer[F]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(d=this.h[1]>>>13,this.h[1]&=8191,F=2;F<10;F++)this.h[F]+=d,d=this.h[F]>>>13,this.h[F]&=8191;for(this.h[0]+=d*5,d=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=d,d=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=d,E[0]=this.h[0]+5,d=E[0]>>>13,E[0]&=8191,F=1;F<10;F++)E[F]=this.h[F]+d,d=E[F]>>>13,E[F]&=8191;for(E[9]-=8192,I=(d^1)-1,F=0;F<10;F++)E[F]&=I;for(I=~I,F=0;F<10;F++)this.h[F]=this.h[F]&I|E[F];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,D=this.h[0]+this.pad[0],this.h[0]=D&65535,F=1;F<8;F++)D=(this.h[F]+this.pad[F]|0)+(D>>>16)|0,this.h[F]=D&65535;m[A+0]=this.h[0]>>>0&255,m[A+1]=this.h[0]>>>8&255,m[A+2]=this.h[1]>>>0&255,m[A+3]=this.h[1]>>>8&255,m[A+4]=this.h[2]>>>0&255,m[A+5]=this.h[2]>>>8&255,m[A+6]=this.h[3]>>>0&255,m[A+7]=this.h[3]>>>8&255,m[A+8]=this.h[4]>>>0&255,m[A+9]=this.h[4]>>>8&255,m[A+10]=this.h[5]>>>0&255,m[A+11]=this.h[5]>>>8&255,m[A+12]=this.h[6]>>>0&255,m[A+13]=this.h[6]>>>8&255,m[A+14]=this.h[7]>>>0&255,m[A+15]=this.h[7]>>>8&255},H.prototype.update=function(m,A,E){var d,I;if(this.leftover){for(I=16-this.leftover,I>E&&(I=E),d=0;d<I;d++)this.buffer[this.leftover+d]=m[A+d];if(E-=I,A+=I,this.leftover+=I,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(E>=16&&(I=E-E%16,this.blocks(m,A,I),A+=I,E-=I),E){for(d=0;d<E;d++)this.buffer[this.leftover+d]=m[A+d];this.leftover+=E}};function U(m,A,E,d,I,D){var F=new H(D);return F.update(E,d,I),F.finish(m,A),0}a(U,"crypto_onetimeauth");function k(m,A,E,d,I,D){var F=new Uint8Array(16);return U(F,0,E,d,I,D),y(m,A,F,0)}a(k,"crypto_onetimeauth_verify");function j(m,A,E,d,I){var D;if(E<32)return-1;for(C(m,0,A,0,E,d,I),U(m,16,m,32,E-32,m),D=0;D<16;D++)m[D]=0;return 0}a(j,"crypto_secretbox");function W(m,A,E,d,I){var D,F=new Uint8Array(32);if(E<32||(P(F,0,32,d,I),k(A,16,A,32,E-32,F)!==0))return-1;for(C(m,0,A,0,E,d,I),D=0;D<32;D++)m[D]=0;return 0}a(W,"crypto_secretbox_open");function L(m,A){var E;for(E=0;E<16;E++)m[E]=A[E]|0}a(L,"set25519");function X(m){var A,E,d=1;for(A=0;A<16;A++)E=m[A]+d+65535,d=Math.floor(E/65536),m[A]=E-d*65536;m[0]+=d-1+37*(d-1)}a(X,"car25519");function ne(m,A,E){for(var d,I=~(E-1),D=0;D<16;D++)d=I&(m[D]^A[D]),m[D]^=d,A[D]^=d}a(ne,"sel25519");function O(m,A){var E,d,I,D=t(),F=t();for(E=0;E<16;E++)F[E]=A[E];for(X(F),X(F),X(F),d=0;d<2;d++){for(D[0]=F[0]-65517,E=1;E<15;E++)D[E]=F[E]-65535-(D[E-1]>>16&1),D[E-1]&=65535;D[15]=F[15]-32767-(D[14]>>16&1),I=D[15]>>16&1,D[14]&=65535,ne(F,D,1-I)}for(E=0;E<16;E++)m[2*E]=F[E]&255,m[2*E+1]=F[E]>>8}a(O,"pack25519");function q(m,A){var E=new Uint8Array(32),d=new Uint8Array(32);return O(E,m),O(d,A),b(E,0,d,0)}a(q,"neq25519");function V(m){var A=new Uint8Array(32);return O(A,m),A[0]&1}a(V,"par25519");function re(m,A){var E;for(E=0;E<16;E++)m[E]=A[2*E]+(A[2*E+1]<<8);m[15]&=32767}a(re,"unpack25519");function _e(m,A,E){for(var d=0;d<16;d++)m[d]=A[d]+E[d]}a(_e,"A");function Se(m,A,E){for(var d=0;d<16;d++)m[d]=A[d]-E[d]}a(Se,"Z");function xe(m,A,E){var d,I,D=0,F=0,se=0,he=0,we=0,be=0,It=0,ve=0,Ze=0,Qe=0,rt=0,tt=0,Ge=0,Je=0,Ke=0,Pe=0,Ce=0,Ie=0,Te=0,ke=0,Ae=0,G=0,K=0,ce=0,oe=0,ae=0,de=0,Be=0,nt=0,ct=0,it=0,w=E[0],lt=E[1],St=E[2],vt=E[3],ut=E[4],Et=E[5],At=E[6],ar=E[7],Ot=E[8],rr=E[9],nr=E[10],ir=E[11],gr=E[12],Pr=E[13],Tr=E[14],kr=E[15];d=A[0],D+=d*w,F+=d*lt,se+=d*St,he+=d*vt,we+=d*ut,be+=d*Et,It+=d*At,ve+=d*ar,Ze+=d*Ot,Qe+=d*rr,rt+=d*nr,tt+=d*ir,Ge+=d*gr,Je+=d*Pr,Ke+=d*Tr,Pe+=d*kr,d=A[1],F+=d*w,se+=d*lt,he+=d*St,we+=d*vt,be+=d*ut,It+=d*Et,ve+=d*At,Ze+=d*ar,Qe+=d*Ot,rt+=d*rr,tt+=d*nr,Ge+=d*ir,Je+=d*gr,Ke+=d*Pr,Pe+=d*Tr,Ce+=d*kr,d=A[2],se+=d*w,he+=d*lt,we+=d*St,be+=d*vt,It+=d*ut,ve+=d*Et,Ze+=d*At,Qe+=d*ar,rt+=d*Ot,tt+=d*rr,Ge+=d*nr,Je+=d*ir,Ke+=d*gr,Pe+=d*Pr,Ce+=d*Tr,Ie+=d*kr,d=A[3],he+=d*w,we+=d*lt,be+=d*St,It+=d*vt,ve+=d*ut,Ze+=d*Et,Qe+=d*At,rt+=d*ar,tt+=d*Ot,Ge+=d*rr,Je+=d*nr,Ke+=d*ir,Pe+=d*gr,Ce+=d*Pr,Ie+=d*Tr,Te+=d*kr,d=A[4],we+=d*w,be+=d*lt,It+=d*St,ve+=d*vt,Ze+=d*ut,Qe+=d*Et,rt+=d*At,tt+=d*ar,Ge+=d*Ot,Je+=d*rr,Ke+=d*nr,Pe+=d*ir,Ce+=d*gr,Ie+=d*Pr,Te+=d*Tr,ke+=d*kr,d=A[5],be+=d*w,It+=d*lt,ve+=d*St,Ze+=d*vt,Qe+=d*ut,rt+=d*Et,tt+=d*At,Ge+=d*ar,Je+=d*Ot,Ke+=d*rr,Pe+=d*nr,Ce+=d*ir,Ie+=d*gr,Te+=d*Pr,ke+=d*Tr,Ae+=d*kr,d=A[6],It+=d*w,ve+=d*lt,Ze+=d*St,Qe+=d*vt,rt+=d*ut,tt+=d*Et,Ge+=d*At,Je+=d*ar,Ke+=d*Ot,Pe+=d*rr,Ce+=d*nr,Ie+=d*ir,Te+=d*gr,ke+=d*Pr,Ae+=d*Tr,G+=d*kr,d=A[7],ve+=d*w,Ze+=d*lt,Qe+=d*St,rt+=d*vt,tt+=d*ut,Ge+=d*Et,Je+=d*At,Ke+=d*ar,Pe+=d*Ot,Ce+=d*rr,Ie+=d*nr,Te+=d*ir,ke+=d*gr,Ae+=d*Pr,G+=d*Tr,K+=d*kr,d=A[8],Ze+=d*w,Qe+=d*lt,rt+=d*St,tt+=d*vt,Ge+=d*ut,Je+=d*Et,Ke+=d*At,Pe+=d*ar,Ce+=d*Ot,Ie+=d*rr,Te+=d*nr,ke+=d*ir,Ae+=d*gr,G+=d*Pr,K+=d*Tr,ce+=d*kr,d=A[9],Qe+=d*w,rt+=d*lt,tt+=d*St,Ge+=d*vt,Je+=d*ut,Ke+=d*Et,Pe+=d*At,Ce+=d*ar,Ie+=d*Ot,Te+=d*rr,ke+=d*nr,Ae+=d*ir,G+=d*gr,K+=d*Pr,ce+=d*Tr,oe+=d*kr,d=A[10],rt+=d*w,tt+=d*lt,Ge+=d*St,Je+=d*vt,Ke+=d*ut,Pe+=d*Et,Ce+=d*At,Ie+=d*ar,Te+=d*Ot,ke+=d*rr,Ae+=d*nr,G+=d*ir,K+=d*gr,ce+=d*Pr,oe+=d*Tr,ae+=d*kr,d=A[11],tt+=d*w,Ge+=d*lt,Je+=d*St,Ke+=d*vt,Pe+=d*ut,Ce+=d*Et,Ie+=d*At,Te+=d*ar,ke+=d*Ot,Ae+=d*rr,G+=d*nr,K+=d*ir,ce+=d*gr,oe+=d*Pr,ae+=d*Tr,de+=d*kr,d=A[12],Ge+=d*w,Je+=d*lt,Ke+=d*St,Pe+=d*vt,Ce+=d*ut,Ie+=d*Et,Te+=d*At,ke+=d*ar,Ae+=d*Ot,G+=d*rr,K+=d*nr,ce+=d*ir,oe+=d*gr,ae+=d*Pr,de+=d*Tr,Be+=d*kr,d=A[13],Je+=d*w,Ke+=d*lt,Pe+=d*St,Ce+=d*vt,Ie+=d*ut,Te+=d*Et,ke+=d*At,Ae+=d*ar,G+=d*Ot,K+=d*rr,ce+=d*nr,oe+=d*ir,ae+=d*gr,de+=d*Pr,Be+=d*Tr,nt+=d*kr,d=A[14],Ke+=d*w,Pe+=d*lt,Ce+=d*St,Ie+=d*vt,Te+=d*ut,ke+=d*Et,Ae+=d*At,G+=d*ar,K+=d*Ot,ce+=d*rr,oe+=d*nr,ae+=d*ir,de+=d*gr,Be+=d*Pr,nt+=d*Tr,ct+=d*kr,d=A[15],Pe+=d*w,Ce+=d*lt,Ie+=d*St,Te+=d*vt,ke+=d*ut,Ae+=d*Et,G+=d*At,K+=d*ar,ce+=d*Ot,oe+=d*rr,ae+=d*nr,de+=d*ir,Be+=d*gr,nt+=d*Pr,ct+=d*Tr,it+=d*kr,D+=38*Ce,F+=38*Ie,se+=38*Te,he+=38*ke,we+=38*Ae,be+=38*G,It+=38*K,ve+=38*ce,Ze+=38*oe,Qe+=38*ae,rt+=38*de,tt+=38*Be,Ge+=38*nt,Je+=38*ct,Ke+=38*it,I=1,d=D+I+65535,I=Math.floor(d/65536),D=d-I*65536,d=F+I+65535,I=Math.floor(d/65536),F=d-I*65536,d=se+I+65535,I=Math.floor(d/65536),se=d-I*65536,d=he+I+65535,I=Math.floor(d/65536),he=d-I*65536,d=we+I+65535,I=Math.floor(d/65536),we=d-I*65536,d=be+I+65535,I=Math.floor(d/65536),be=d-I*65536,d=It+I+65535,I=Math.floor(d/65536),It=d-I*65536,d=ve+I+65535,I=Math.floor(d/65536),ve=d-I*65536,d=Ze+I+65535,I=Math.floor(d/65536),Ze=d-I*65536,d=Qe+I+65535,I=Math.floor(d/65536),Qe=d-I*65536,d=rt+I+65535,I=Math.floor(d/65536),rt=d-I*65536,d=tt+I+65535,I=Math.floor(d/65536),tt=d-I*65536,d=Ge+I+65535,I=Math.floor(d/65536),Ge=d-I*65536,d=Je+I+65535,I=Math.floor(d/65536),Je=d-I*65536,d=Ke+I+65535,I=Math.floor(d/65536),Ke=d-I*65536,d=Pe+I+65535,I=Math.floor(d/65536),Pe=d-I*65536,D+=I-1+37*(I-1),I=1,d=D+I+65535,I=Math.floor(d/65536),D=d-I*65536,d=F+I+65535,I=Math.floor(d/65536),F=d-I*65536,d=se+I+65535,I=Math.floor(d/65536),se=d-I*65536,d=he+I+65535,I=Math.floor(d/65536),he=d-I*65536,d=we+I+65535,I=Math.floor(d/65536),we=d-I*65536,d=be+I+65535,I=Math.floor(d/65536),be=d-I*65536,d=It+I+65535,I=Math.floor(d/65536),It=d-I*65536,d=ve+I+65535,I=Math.floor(d/65536),ve=d-I*65536,d=Ze+I+65535,I=Math.floor(d/65536),Ze=d-I*65536,d=Qe+I+65535,I=Math.floor(d/65536),Qe=d-I*65536,d=rt+I+65535,I=Math.floor(d/65536),rt=d-I*65536,d=tt+I+65535,I=Math.floor(d/65536),tt=d-I*65536,d=Ge+I+65535,I=Math.floor(d/65536),Ge=d-I*65536,d=Je+I+65535,I=Math.floor(d/65536),Je=d-I*65536,d=Ke+I+65535,I=Math.floor(d/65536),Ke=d-I*65536,d=Pe+I+65535,I=Math.floor(d/65536),Pe=d-I*65536,D+=I-1+37*(I-1),m[0]=D,m[1]=F,m[2]=se,m[3]=he,m[4]=we,m[5]=be,m[6]=It,m[7]=ve,m[8]=Ze,m[9]=Qe,m[10]=rt,m[11]=tt,m[12]=Ge,m[13]=Je,m[14]=Ke,m[15]=Pe}a(xe,"M");function Tt(m,A){xe(m,A,A)}a(Tt,"S");function Ft(m,A){var E=t(),d;for(d=0;d<16;d++)E[d]=A[d];for(d=253;d>=0;d--)Tt(E,E),d!==2&&d!==4&&xe(E,E,A);for(d=0;d<16;d++)m[d]=E[d]}a(Ft,"inv25519");function ur(m,A){var E=t(),d;for(d=0;d<16;d++)E[d]=A[d];for(d=250;d>=0;d--)Tt(E,E),d!==1&&xe(E,E,A);for(d=0;d<16;d++)m[d]=E[d]}a(ur,"pow2523");function Dr(m,A,E){var d=new Uint8Array(32),I=new Float64Array(80),D,F,se=t(),he=t(),we=t(),be=t(),It=t(),ve=t();for(F=0;F<31;F++)d[F]=A[F];for(d[31]=A[31]&127|64,d[0]&=248,re(I,E),F=0;F<16;F++)he[F]=I[F],be[F]=se[F]=we[F]=0;for(se[0]=be[0]=1,F=254;F>=0;--F)D=d[F>>>3]>>>(F&7)&1,ne(se,he,D),ne(we,be,D),_e(It,se,we),Se(se,se,we),_e(we,he,be),Se(he,he,be),Tt(be,It),Tt(ve,se),xe(se,we,se),xe(we,he,It),_e(It,se,we),Se(se,se,we),Tt(he,se),Se(we,be,ve),xe(se,we,c),_e(se,se,be),xe(we,we,se),xe(se,be,ve),xe(be,he,I),Tt(he,It),ne(se,he,D),ne(we,be,D);for(F=0;F<16;F++)I[F+16]=se[F],I[F+32]=we[F],I[F+48]=he[F],I[F+64]=be[F];var Ze=I.subarray(32),Qe=I.subarray(16);return Ft(Ze,Ze),xe(Qe,Qe,Ze),O(m,Qe),0}a(Dr,"crypto_scalarmult");function sn(m,A){return Dr(m,A,n)}a(sn,"crypto_scalarmult_base");function Hr(m,A){return r(A,32),sn(m,A)}a(Hr,"crypto_box_keypair");function No(m,A,E){var d=new Uint8Array(32);return Dr(d,E,A),R(m,i,d,J)}a(No,"crypto_box_beforenm");var Ks=j,Yu=W;function Ys(m,A,E,d,I,D){var F=new Uint8Array(32);return No(F,I,D),Ks(m,A,E,d,F)}a(Ys,"crypto_box");function $o(m,A,E,d,I,D){var F=new Uint8Array(32);return No(F,I,D),Yu(m,A,E,d,F)}a($o,"crypto_box_open");var Do=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ie(m,A,E,d){for(var I=new Int32Array(16),D=new Int32Array(16),F,se,he,we,be,It,ve,Ze,Qe,rt,tt,Ge,Je,Ke,Pe,Ce,Ie,Te,ke,Ae,G,K,ce,oe,ae,de,Be=m[0],nt=m[1],ct=m[2],it=m[3],w=m[4],lt=m[5],St=m[6],vt=m[7],ut=A[0],Et=A[1],At=A[2],ar=A[3],Ot=A[4],rr=A[5],nr=A[6],ir=A[7],gr=0;d>=128;){for(ke=0;ke<16;ke++)Ae=8*ke+gr,I[ke]=E[Ae+0]<<24|E[Ae+1]<<16|E[Ae+2]<<8|E[Ae+3],D[ke]=E[Ae+4]<<24|E[Ae+5]<<16|E[Ae+6]<<8|E[Ae+7];for(ke=0;ke<80;ke++)if(F=Be,se=nt,he=ct,we=it,be=w,It=lt,ve=St,Ze=vt,Qe=ut,rt=Et,tt=At,Ge=ar,Je=Ot,Ke=rr,Pe=nr,Ce=ir,G=vt,K=ir,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=(w>>>14|Ot<<18)^(w>>>18|Ot<<14)^(Ot>>>9|w<<23),K=(Ot>>>14|w<<18)^(Ot>>>18|w<<14)^(w>>>9|Ot<<23),ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,G=w&lt^~w&St,K=Ot&rr^~Ot&nr,ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,G=Do[ke*2],K=Do[ke*2+1],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,G=I[ke%16],K=D[ke%16],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,Ie=ae&65535|de<<16,Te=ce&65535|oe<<16,G=Ie,K=Te,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=(Be>>>28|ut<<4)^(ut>>>2|Be<<30)^(ut>>>7|Be<<25),K=(ut>>>28|Be<<4)^(Be>>>2|ut<<30)^(Be>>>7|ut<<25),ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,G=Be&nt^Be&ct^nt&ct,K=ut&Et^ut&At^Et&At,ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,Ze=ae&65535|de<<16,Ce=ce&65535|oe<<16,G=we,K=Ge,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=Ie,K=Te,ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,we=ae&65535|de<<16,Ge=ce&65535|oe<<16,nt=F,ct=se,it=he,w=we,lt=be,St=It,vt=ve,Be=Ze,Et=Qe,At=rt,ar=tt,Ot=Ge,rr=Je,nr=Ke,ir=Pe,ut=Ce,ke%16===15)for(Ae=0;Ae<16;Ae++)G=I[Ae],K=D[Ae],ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=I[(Ae+9)%16],K=D[(Ae+9)%16],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,Ie=I[(Ae+1)%16],Te=D[(Ae+1)%16],G=(Ie>>>1|Te<<31)^(Ie>>>8|Te<<24)^Ie>>>7,K=(Te>>>1|Ie<<31)^(Te>>>8|Ie<<24)^(Te>>>7|Ie<<25),ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,Ie=I[(Ae+14)%16],Te=D[(Ae+14)%16],G=(Ie>>>19|Te<<13)^(Te>>>29|Ie<<3)^Ie>>>6,K=(Te>>>19|Ie<<13)^(Ie>>>29|Te<<3)^(Te>>>6|Ie<<26),ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,I[Ae]=ae&65535|de<<16,D[Ae]=ce&65535|oe<<16;G=Be,K=ut,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[0],K=A[0],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[0]=Be=ae&65535|de<<16,A[0]=ut=ce&65535|oe<<16,G=nt,K=Et,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[1],K=A[1],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[1]=nt=ae&65535|de<<16,A[1]=Et=ce&65535|oe<<16,G=ct,K=At,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[2],K=A[2],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[2]=ct=ae&65535|de<<16,A[2]=At=ce&65535|oe<<16,G=it,K=ar,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[3],K=A[3],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[3]=it=ae&65535|de<<16,A[3]=ar=ce&65535|oe<<16,G=w,K=Ot,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[4],K=A[4],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[4]=w=ae&65535|de<<16,A[4]=Ot=ce&65535|oe<<16,G=lt,K=rr,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[5],K=A[5],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[5]=lt=ae&65535|de<<16,A[5]=rr=ce&65535|oe<<16,G=St,K=nr,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[6],K=A[6],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[6]=St=ae&65535|de<<16,A[6]=nr=ce&65535|oe<<16,G=vt,K=ir,ce=K&65535,oe=K>>>16,ae=G&65535,de=G>>>16,G=m[7],K=A[7],ce+=K&65535,oe+=K>>>16,ae+=G&65535,de+=G>>>16,oe+=ce>>>16,ae+=oe>>>16,de+=ae>>>16,m[7]=vt=ae&65535|de<<16,A[7]=ir=ce&65535|oe<<16,gr+=128,d-=128}return d}a(ie,"crypto_hashblocks_hl");function Ee(m,A,E){var d=new Int32Array(8),I=new Int32Array(8),D=new Uint8Array(256),F,se=E;for(d[0]=1779033703,d[1]=3144134277,d[2]=1013904242,d[3]=2773480762,d[4]=1359893119,d[5]=2600822924,d[6]=528734635,d[7]=1541459225,I[0]=4089235720,I[1]=2227873595,I[2]=4271175723,I[3]=1595750129,I[4]=2917565137,I[5]=725511199,I[6]=4215389547,I[7]=327033209,ie(d,I,A,E),E%=128,F=0;F<E;F++)D[F]=A[se-E+F];for(D[E]=128,E=256-128*(E<112?1:0),D[E-9]=0,h(D,E-8,se/536870912|0,se<<3),ie(d,I,D,E),F=0;F<8;F++)h(m,8*F,d[F],I[F]);return 0}a(Ee,"crypto_hash");function Re(m,A){var E=t(),d=t(),I=t(),D=t(),F=t(),se=t(),he=t(),we=t(),be=t();Se(E,m[1],m[0]),Se(be,A[1],A[0]),xe(E,E,be),_e(d,m[0],m[1]),_e(be,A[0],A[1]),xe(d,d,be),xe(I,m[3],A[3]),xe(I,I,l),xe(D,m[2],A[2]),_e(D,D,D),Se(F,d,E),Se(se,D,I),_e(he,D,I),_e(we,d,E),xe(m[0],F,se),xe(m[1],we,he),xe(m[2],he,se),xe(m[3],F,we)}a(Re,"add");function je(m,A,E){var d;for(d=0;d<4;d++)ne(m[d],A[d],E)}a(je,"cswap");function gt(m,A){var E=t(),d=t(),I=t();Ft(I,A[2]),xe(E,A[0],I),xe(d,A[1],I),O(m,d),m[31]^=V(E)<<7}a(gt,"pack");function lr(m,A,E){var d,I;for(L(m[0],o),L(m[1],s),L(m[2],s),L(m[3],o),I=255;I>=0;--I)d=E[I/8|0]>>(I&7)&1,je(m,A,d),Re(A,m),Re(m,m),je(m,A,d)}a(lr,"scalarmult");function kn(m,A){var E=[t(),t(),t(),t()];L(E[0],f),L(E[1],p),L(E[2],s),xe(E[3],f,p),lr(m,E,A)}a(kn,"scalarbase");function Yr(m,A,E){var d=new Uint8Array(64),I=[t(),t(),t(),t()],D;for(E||r(A,32),Ee(d,A,32),d[0]&=248,d[31]&=127,d[31]|=64,kn(I,d),gt(m,I),D=0;D<32;D++)A[D+32]=m[D];return 0}a(Yr,"crypto_sign_keypair");var Bo=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function kt(m,A){var E,d,I,D;for(d=63;d>=32;--d){for(E=0,I=d-32,D=d-12;I<D;++I)A[I]+=E-16*A[d]*Bo[I-(d-32)],E=A[I]+128>>8,A[I]-=E*256;A[I]+=E,A[d]=0}for(E=0,I=0;I<32;I++)A[I]+=E-(A[31]>>4)*Bo[I],E=A[I]>>8,A[I]&=255;for(I=0;I<32;I++)A[I]-=E*Bo[I];for(d=0;d<32;d++)A[d+1]+=A[d]>>8,m[d]=A[d]&255}a(kt,"modL");function _r(m){var A=new Float64Array(64),E;for(E=0;E<64;E++)A[E]=m[E];for(E=0;E<64;E++)m[E]=0;kt(m,A)}a(_r,"reduce");function hr(m,A,E,d){var I=new Uint8Array(64),D=new Uint8Array(64),F=new Uint8Array(64),se,he,we=new Float64Array(64),be=[t(),t(),t(),t()];Ee(I,d,32),I[0]&=248,I[31]&=127,I[31]|=64;var It=E+64;for(se=0;se<E;se++)m[64+se]=A[se];for(se=0;se<32;se++)m[32+se]=I[32+se];for(Ee(F,m.subarray(32),E+32),_r(F),kn(be,F),gt(m,be),se=32;se<64;se++)m[se]=d[se];for(Ee(D,m,E+64),_r(D),se=0;se<64;se++)we[se]=0;for(se=0;se<32;se++)we[se]=F[se];for(se=0;se<32;se++)for(he=0;he<32;he++)we[se+he]+=D[se]*I[he];return kt(m.subarray(32),we),It}a(hr,"crypto_sign");function er(m,A){var E=t(),d=t(),I=t(),D=t(),F=t(),se=t(),he=t();return L(m[2],s),re(m[1],A),Tt(I,m[1]),xe(D,I,u),Se(I,I,m[2]),_e(D,m[2],D),Tt(F,D),Tt(se,F),xe(he,se,F),xe(E,he,I),xe(E,E,D),ur(E,E),xe(E,E,I),xe(E,E,D),xe(E,E,D),xe(m[0],E,D),Tt(d,m[0]),xe(d,d,D),q(d,I)&&xe(m[0],m[0],g),Tt(d,m[0]),xe(d,d,D),q(d,I)?-1:(V(m[0])===A[31]>>7&&Se(m[0],o,m[0]),xe(m[3],m[0],m[1]),0)}a(er,"unpackneg");function zt(m,A,E,d){var I,D,F=new Uint8Array(32),se=new Uint8Array(64),he=[t(),t(),t(),t()],we=[t(),t(),t(),t()];if(D=-1,E<64||er(we,d))return-1;for(I=0;I<E;I++)m[I]=A[I];for(I=0;I<32;I++)m[I+32]=d[I];if(Ee(se,m,E),_r(se),lr(he,we,se),kn(we,A.subarray(32)),Re(he,we),gt(F,he),E-=64,b(A,0,F,0)){for(I=0;I<E;I++)m[I]=0;return-1}for(I=0;I<E;I++)m[I]=A[I+64];return D=E,D}a(zt,"crypto_sign_open");var an=32,tr=24,Hi=32,Lo=16,Xs=32,Xu=32,Js=32,ea=32,eh=32,kb=tr,nC=Hi,iC=Lo,Un=64,ji=32,zo=64,th=32,rh=64;e.lowlevel={crypto_core_hsalsa20:R,crypto_stream_xor:C,crypto_stream:P,crypto_stream_salsa20_xor:te,crypto_stream_salsa20:ee,crypto_onetimeauth:U,crypto_onetimeauth_verify:k,crypto_verify_16:y,crypto_verify_32:b,crypto_secretbox:j,crypto_secretbox_open:W,crypto_scalarmult:Dr,crypto_scalarmult_base:sn,crypto_box_beforenm:No,crypto_box_afternm:Ks,crypto_box:Ys,crypto_box_open:$o,crypto_box_keypair:Hr,crypto_hash:Ee,crypto_sign:hr,crypto_sign_keypair:Yr,crypto_sign_open:zt,crypto_secretbox_KEYBYTES:an,crypto_secretbox_NONCEBYTES:tr,crypto_secretbox_ZEROBYTES:Hi,crypto_secretbox_BOXZEROBYTES:Lo,crypto_scalarmult_BYTES:Xs,crypto_scalarmult_SCALARBYTES:Xu,crypto_box_PUBLICKEYBYTES:Js,crypto_box_SECRETKEYBYTES:ea,crypto_box_BEFORENMBYTES:eh,crypto_box_NONCEBYTES:kb,crypto_box_ZEROBYTES:nC,crypto_box_BOXZEROBYTES:iC,crypto_sign_BYTES:Un,crypto_sign_PUBLICKEYBYTES:ji,crypto_sign_SECRETKEYBYTES:zo,crypto_sign_SEEDBYTES:th,crypto_hash_BYTES:rh};function Cb(m,A){if(m.length!==an)throw new Error("bad key size");if(A.length!==tr)throw new Error("bad nonce size")}a(Cb,"checkLengths");function oC(m,A){if(m.length!==Js)throw new Error("bad public key size");if(A.length!==ea)throw new Error("bad secret key size")}a(oC,"checkBoxLengths");function Xr(){var m,A;for(A=0;A<arguments.length;A++)if((m=Object.prototype.toString.call(arguments[A]))!=="[object Uint8Array]")throw new TypeError("unexpected type "+m+", use Uint8Array")}a(Xr,"checkArrayTypes");function Rb(m){for(var A=0;A<m.length;A++)m[A]=0}a(Rb,"cleanup"),e.util||(e.util={},e.util.decodeUTF8=e.util.encodeUTF8=e.util.encodeBase64=e.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),e.randomBytes=function(m){var A=new Uint8Array(m);return r(A,m),A},e.secretbox=function(m,A,E){Xr(m,A,E),Cb(E,A);for(var d=new Uint8Array(Hi+m.length),I=new Uint8Array(d.length),D=0;D<m.length;D++)d[D+Hi]=m[D];return j(I,d,d.length,A,E),I.subarray(Lo)},e.secretbox.open=function(m,A,E){Xr(m,A,E),Cb(E,A);for(var d=new Uint8Array(Lo+m.length),I=new Uint8Array(d.length),D=0;D<m.length;D++)d[D+Lo]=m[D];return d.length<32||W(I,d,d.length,A,E)!==0?!1:I.subarray(Hi)},e.secretbox.keyLength=an,e.secretbox.nonceLength=tr,e.secretbox.overheadLength=Lo,e.scalarMult=function(m,A){if(Xr(m,A),m.length!==Xu)throw new Error("bad n size");if(A.length!==Xs)throw new Error("bad p size");var E=new Uint8Array(Xs);return Dr(E,m,A),E},e.scalarMult.base=function(m){if(Xr(m),m.length!==Xu)throw new Error("bad n size");var A=new Uint8Array(Xs);return sn(A,m),A},e.scalarMult.scalarLength=Xu,e.scalarMult.groupElementLength=Xs,e.box=function(m,A,E,d){var I=e.box.before(E,d);return e.secretbox(m,A,I)},e.box.before=function(m,A){Xr(m,A),oC(m,A);var E=new Uint8Array(eh);return No(E,m,A),E},e.box.after=e.secretbox,e.box.open=function(m,A,E,d){var I=e.box.before(E,d);return e.secretbox.open(m,A,I)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var m=new Uint8Array(Js),A=new Uint8Array(ea);return Hr(m,A),{publicKey:m,secretKey:A}},e.box.keyPair.fromSecretKey=function(m){if(Xr(m),m.length!==ea)throw new Error("bad secret key size");var A=new Uint8Array(Js);return sn(A,m),{publicKey:A,secretKey:new Uint8Array(m)}},e.box.publicKeyLength=Js,e.box.secretKeyLength=ea,e.box.sharedKeyLength=eh,e.box.nonceLength=kb,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(m,A){if(Xr(m,A),A.length!==zo)throw new Error("bad secret key size");var E=new Uint8Array(Un+m.length);return hr(E,m,m.length,A),E},e.sign.open=function(m,A){if(arguments.length!==2)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Xr(m,A),A.length!==ji)throw new Error("bad public key size");var E=new Uint8Array(m.length),d=zt(E,m,m.length,A);if(d<0)return null;for(var I=new Uint8Array(d),D=0;D<I.length;D++)I[D]=E[D];return I},e.sign.detached=function(m,A){for(var E=e.sign(m,A),d=new Uint8Array(Un),I=0;I<d.length;I++)d[I]=E[I];return d},e.sign.detached.verify=function(m,A,E){if(Xr(m,A,E),A.length!==Un)throw new Error("bad signature size");if(E.length!==ji)throw new Error("bad public key size");var d=new Uint8Array(Un+m.length),I=new Uint8Array(Un+m.length),D;for(D=0;D<Un;D++)d[D]=A[D];for(D=0;D<m.length;D++)d[D+Un]=m[D];return zt(I,d,d.length,E)>=0},e.sign.keyPair=function(){var m=new Uint8Array(ji),A=new Uint8Array(zo);return Yr(m,A),{publicKey:m,secretKey:A}},e.sign.keyPair.fromSecretKey=function(m){if(Xr(m),m.length!==zo)throw new Error("bad secret key size");for(var A=new Uint8Array(ji),E=0;E<A.length;E++)A[E]=m[32+E];return{publicKey:A,secretKey:new Uint8Array(m)}},e.sign.keyPair.fromSeed=function(m){if(Xr(m),m.length!==th)throw new Error("bad seed size");for(var A=new Uint8Array(ji),E=new Uint8Array(zo),d=0;d<32;d++)E[d]=m[d];return Yr(A,E,!0),{publicKey:A,secretKey:E}},e.sign.publicKeyLength=ji,e.sign.secretKeyLength=zo,e.sign.seedLength=th,e.sign.signatureLength=Un,e.hash=function(m){Xr(m);var A=new Uint8Array(rh);return Ee(A,m,m.length),A},e.hash.hashLength=rh,e.verify=function(m,A){return Xr(m,A),m.length===0||A.length===0||m.length!==A.length?!1:_(m,0,A,0,m.length)===0},e.setPRNG=function(m){r=m},(function(){var m=typeof self<"u"?self.crypto||self.msCrypto:null;if(m&&m.getRandomValues){var A=65536;e.setPRNG(function(E,d){var I,D=new Uint8Array(d);for(I=0;I<d;I+=A)m.getRandomValues(D.subarray(I,I+Math.min(d-I,A)));for(I=0;I<d;I++)E[I]=D[I];Rb(D)})}else typeof require<"u"&&(m=require("crypto"),m&&m.randomBytes&&e.setPRNG(function(E,d){var I,D=m.randomBytes(d);for(I=0;I<d;I++)E[I]=D[I];Rb(D)}))})()})(typeof Qd<"u"&&Qd.exports?Qd.exports:self.nacl=self.nacl||{})});var oE=me((ZQ,Av)=>{"use strict";var rE=Ev().lowlevel.crypto_hash,Yn=0,Ao=a(function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])},"Blowfish");function Kd(e,t,r){return(e[0][t[r+3]]+e[1][t[r+2]]^e[2][t[r+1]])+e[3][t[r]]}a(Kd,"F");Ao.prototype.encipher=function(e,t){t===void 0&&(t=new Uint8Array(e.buffer),e.byteOffset!==0&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var r=1;r<16;r+=2)e[1]^=Kd(this.S,t,0)^this.P[r],e[0]^=Kd(this.S,t,4)^this.P[r+1];var i=e[0];e[0]=e[1]^this.P[17],e[1]=i};Ao.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);e.byteOffset!==0&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var r=16;r>0;r-=2)e[1]^=Kd(this.S,t,0)^this.P[r],e[0]^=Kd(this.S,t,4)^this.P[r-1];var i=e[0];e[0]=e[1]^this.P[0],e[1]=i};function Eo(e,t){var r,i=0;for(r=0;r<4;r++,Yn++)Yn>=t&&(Yn=0),i=i<<8|e[Yn];return i}a(Eo,"stream2word");Ao.prototype.expand0state=function(e,t){var r=new Uint32Array(2),i,n,o=new Uint8Array(r.buffer);for(i=0,Yn=0;i<18;i++)this.P[i]^=Eo(e,t);for(Yn=0,i=0;i<18;i+=2)this.encipher(r,o),this.P[i]=r[0],this.P[i+1]=r[1];for(i=0;i<4;i++)for(n=0;n<256;n+=2)this.encipher(r,o),this.S[i][n]=r[0],this.S[i][n+1]=r[1]};Ao.prototype.expandstate=function(e,t,r,i){var n=new Uint32Array(2),o,s;for(o=0,Yn=0;o<18;o++)this.P[o]^=Eo(r,i);for(o=0,Yn=0;o<18;o+=2)n[0]^=Eo(e,t),n[1]^=Eo(e,t),this.encipher(n),this.P[o]=n[0],this.P[o+1]=n[1];for(o=0;o<4;o++)for(s=0;s<256;s+=2)n[0]^=Eo(e,t),n[1]^=Eo(e,t),this.encipher(n),this.S[o][s]=n[0],this.S[o][s+1]=n[1];Yn=0};Ao.prototype.enc=function(e,t){for(var r=0;r<t;r++)this.encipher(e.subarray(r*2))};Ao.prototype.dec=function(e,t){for(var r=0;r<t;r++)this.decipher(e.subarray(r*2))};var Gd=8,nE=32;function iE(e,t,r){var i=new Ao,n=new Uint32Array(Gd),o,s=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(i.expandstate(t,64,e,64),o=0;o<64;o++)i.expand0state(t,64),i.expand0state(e,64);for(o=0;o<Gd;o++)n[o]=Eo(s,s.byteLength);for(o=0;o<64;o++)i.enc(n,n.byteLength/8);for(o=0;o<Gd;o++)r[4*o+3]=n[o]>>>24,r[4*o+2]=n[o]>>>16,r[4*o+1]=n[o]>>>8,r[4*o+0]=n[o]}a(iE,"bcrypt_hash");function y4(e,t,r,i,n,o,s){var c=new Uint8Array(64),u=new Uint8Array(64),l=new Uint8Array(nE),f=new Uint8Array(nE),p=new Uint8Array(i+4),g,h,_,y,b,S,v=o;if(s<1||t===0||i===0||o===0||o>l.byteLength*l.byteLength||i>1<<20)return-1;for(y=Math.floor((o+l.byteLength-1)/l.byteLength),_=Math.floor((o+y-1)/y),g=0;g<i;g++)p[g]=r[g];for(rE(c,e,t),S=1;o>0;S++){for(p[i+0]=S>>>24,p[i+1]=S>>>16,p[i+2]=S>>>8,p[i+3]=S,rE(u,p,i+4),iE(c,u,f),g=l.byteLength;g--;)l[g]=f[g];for(g=1;g<s;g++)for(rE(u,f,f.byteLength),iE(c,u,f),h=0;h<l.byteLength;h++)l[h]^=f[h];for(_=Math.min(_,o),g=0;g<_&&(b=g*y+(S-1),!(b>=v));g++)n[b]=l[g];o-=g}return 0}a(y4,"bcrypt_pbkdf");Av.exports={BLOCKS:Gd,HASHSIZE:nE,hash:iE,pbkdf:y4}});var Jn=me((GQ,Xd)=>{"use strict";var Xn=require("crypto"),ks;try{ks=require("cpu-features")()}catch{}var{bindingAvailable:bv,CIPHER_INFO:E4,MAC_INFO:A4}=Pi(),xv=(()=>{if(typeof Xn.sign=="function"&&typeof Xn.verify=="function"){let e=`-----BEGIN PRIVATE KEY-----\r
7
7
  MC4CAQAwBQYDK2VwBCIEIHKj+sVa9WcD/q2DJUJaf43Kptc8xYuUQA4bOFj9vC8T\r
8
- -----END PRIVATE KEY-----`,t=Buffer.from("a"),r,i;try{r=Xn.sign(null,t,e),i=Xn.verify(null,t,e,r)}catch{}return Buffer.isBuffer(r)&&r.length===64&&i===!0}return!1})(),fS=typeof Xn.diffieHellman=="function"&&typeof Xn.generateKeyPairSync=="function"&&typeof Xn.createPublicKey=="function",Kd=["ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521","diffie-hellman-group-exchange-sha256","diffie-hellman-group14-sha256","diffie-hellman-group15-sha512","diffie-hellman-group16-sha512","diffie-hellman-group17-sha512","diffie-hellman-group18-sha512"];fS&&(Kd.unshift("curve25519-sha256"),Kd.unshift("curve25519-sha256@libssh.org"));var s4=Kd.concat(["diffie-hellman-group-exchange-sha1","diffie-hellman-group14-sha1","diffie-hellman-group1-sha1"]),tE=["ecdsa-sha2-nistp256","ecdsa-sha2-nistp384","ecdsa-sha2-nistp521","rsa-sha2-512","rsa-sha2-256","ssh-rsa"];lS&&tE.unshift("ssh-ed25519");var a4=tE.concat(["ssh-dss"]),dS=(()=>{let e=Xn.getCiphers();return t=>e.includes(i4[t].sslName)})(),wi=["aes128-gcm@openssh.com","aes256-gcm@openssh.com","aes128-ctr","aes192-ctr","aes256-ctr"];ks&&ks.flags&&!ks.flags.aes?uS?wi.unshift("chacha20-poly1305@openssh.com"):wi.push("chacha20-poly1305@openssh.com"):uS&&ks&&ks.arch==="x86"?wi.splice(4,0,"chacha20-poly1305@openssh.com"):wi.push("chacha20-poly1305@openssh.com");wi=wi.filter(dS);var c4=wi.concat(["aes256-cbc","aes192-cbc","aes128-cbc","blowfish-cbc","3des-cbc","aes128-gcm","aes256-gcm","arcfour256","arcfour128","cast128-cbc","arcfour"].filter(dS)),pS=(()=>{let e=Xn.getHashes();return t=>e.includes(o4[t].sslName)})(),hS=["hmac-sha2-256-etm@openssh.com","hmac-sha2-512-etm@openssh.com","hmac-sha1-etm@openssh.com","hmac-sha2-256","hmac-sha2-512","hmac-sha1"].filter(pS),u4=hS.concat(["hmac-md5","hmac-sha2-256-96","hmac-sha2-512-96","hmac-ripemd160","hmac-sha1-96","hmac-md5-96"].filter(pS)),gS=["none","zlib@openssh.com","zlib"],l4=gS.concat([]),Ts={BAD_DHGEX:1,OLD_EXIT:2,DYN_RPORT_BUG:4,BUG_DHGEX_LARGE:8,IMPLY_RSA_SHA2_SIGALGS:16};Gd.exports={MESSAGE:{DISCONNECT:1,IGNORE:2,UNIMPLEMENTED:3,DEBUG:4,SERVICE_REQUEST:5,SERVICE_ACCEPT:6,EXT_INFO:7,KEXINIT:20,NEWKEYS:21,KEXDH_INIT:30,KEXDH_REPLY:31,KEXDH_GEX_GROUP:31,KEXDH_GEX_INIT:32,KEXDH_GEX_REPLY:33,KEXDH_GEX_REQUEST:34,KEXECDH_INIT:30,KEXECDH_REPLY:31,USERAUTH_REQUEST:50,USERAUTH_FAILURE:51,USERAUTH_SUCCESS:52,USERAUTH_BANNER:53,USERAUTH_PASSWD_CHANGEREQ:60,USERAUTH_PK_OK:60,USERAUTH_INFO_REQUEST:60,USERAUTH_INFO_RESPONSE:61,GLOBAL_REQUEST:80,REQUEST_SUCCESS:81,REQUEST_FAILURE:82,CHANNEL_OPEN:90,CHANNEL_OPEN_CONFIRMATION:91,CHANNEL_OPEN_FAILURE:92,CHANNEL_WINDOW_ADJUST:93,CHANNEL_DATA:94,CHANNEL_EXTENDED_DATA:95,CHANNEL_EOF:96,CHANNEL_CLOSE:97,CHANNEL_REQUEST:98,CHANNEL_SUCCESS:99,CHANNEL_FAILURE:100},DISCONNECT_REASON:{HOST_NOT_ALLOWED_TO_CONNECT:1,PROTOCOL_ERROR:2,KEY_EXCHANGE_FAILED:3,RESERVED:4,MAC_ERROR:5,COMPRESSION_ERROR:6,SERVICE_NOT_AVAILABLE:7,PROTOCOL_VERSION_NOT_SUPPORTED:8,HOST_KEY_NOT_VERIFIABLE:9,CONNECTION_LOST:10,BY_APPLICATION:11,TOO_MANY_CONNECTIONS:12,AUTH_CANCELED_BY_USER:13,NO_MORE_AUTH_METHODS_AVAILABLE:14,ILLEGAL_USER_NAME:15},DISCONNECT_REASON_STR:void 0,CHANNEL_OPEN_FAILURE:{ADMINISTRATIVELY_PROHIBITED:1,CONNECT_FAILED:2,UNKNOWN_CHANNEL_TYPE:3,RESOURCE_SHORTAGE:4},TERMINAL_MODE:{TTY_OP_END:0,VINTR:1,VQUIT:2,VERASE:3,VKILL:4,VEOF:5,VEOL:6,VEOL2:7,VSTART:8,VSTOP:9,VSUSP:10,VDSUSP:11,VREPRINT:12,VWERASE:13,VLNEXT:14,VFLUSH:15,VSWTCH:16,VSTATUS:17,VDISCARD:18,IGNPAR:30,PARMRK:31,INPCK:32,ISTRIP:33,INLCR:34,IGNCR:35,ICRNL:36,IUCLC:37,IXON:38,IXANY:39,IXOFF:40,IMAXBEL:41,ISIG:50,ICANON:51,XCASE:52,ECHO:53,ECHOE:54,ECHOK:55,ECHONL:56,NOFLSH:57,TOSTOP:58,IEXTEN:59,ECHOCTL:60,ECHOKE:61,PENDIN:62,OPOST:70,OLCUC:71,ONLCR:72,OCRNL:73,ONOCR:74,ONLRET:75,CS7:90,CS8:91,PARENB:92,PARODD:93,TTY_OP_ISPEED:128,TTY_OP_OSPEED:129},CHANNEL_EXTENDED_DATATYPE:{STDERR:1},SIGNALS:["ABRT","ALRM","FPE","HUP","ILL","INT","QUIT","SEGV","TERM","USR1","USR2","KILL","PIPE"].reduce((e,t)=>({...e,[t]:1}),{}),COMPAT:Ts,COMPAT_CHECKS:[["Cisco-1.25",Ts.BAD_DHGEX],[/^Cisco-1[.]/,Ts.BUG_DHGEX_LARGE],[/^[0-9.]+$/,Ts.OLD_EXIT],[/^OpenSSH_5[.][0-9]+/,Ts.DYN_RPORT_BUG],[/^OpenSSH_7[.]4/,Ts.IMPLY_RSA_SHA2_SIGALGS]],DEFAULT_KEX:Kd,SUPPORTED_KEX:s4,DEFAULT_SERVER_HOST_KEY:tE,SUPPORTED_SERVER_HOST_KEY:a4,DEFAULT_CIPHER:wi,SUPPORTED_CIPHER:c4,DEFAULT_MAC:hS,SUPPORTED_MAC:u4,DEFAULT_COMPRESSION:gS,SUPPORTED_COMPRESSION:l4,curve25519Supported:fS,eddsaSupported:lS};Gd.exports.DISCONNECT_REASON_BY_VALUE=Array.from(Object.entries(Gd.exports.DISCONNECT_REASON)).reduce((e,[t,r])=>({...e,[r]:t}),{})});var In=me((OQ,ES)=>{"use strict";var hn=cu().Ber,Yd,yS=Buffer[Symbol.species],f4=Object.getPrototypeOf(Uint8Array.prototype).fill;function mS(e,t){return e[t++]*16777216+e[t++]*65536+e[t++]*256+e[t]}a(mS,"readUInt32BE");function uu(e,t,r,i,n){n||(n=0),i>e.length&&(i=e.length);let o=i-r,s=t.length-n;return o>s&&(o=s),t.set(new Uint8Array(e.buffer,e.byteOffset+r,o),n),o}a(uu,"bufferCopy");function lu(e,t,r){return r===void 0&&(r=e.length),new yS(e.buffer,e.byteOffset+t,r-t)}a(lu,"bufferSlice");function nE(){let e=0,t,r={init:a((i,n)=>{t=i,e=typeof n=="number"?n:0},"init"),pos:a(()=>e,"pos"),length:a(()=>t?t.length:0,"length"),avail:a(()=>t&&e<t.length?t.length-e:0,"avail"),clear:a(()=>{t=void 0},"clear"),readUInt32BE:a(()=>{if(!(!t||e+3>=t.length))return t[e++]*16777216+t[e++]*65536+t[e++]*256+t[e++]},"readUInt32BE"),readUInt64BE:a(i=>{if(!(!t||e+7>=t.length))switch(i){case"always":return BigInt(`0x${t.hexSlice(e,e+=8)}`);case"maybe":if(t[e]>31)return BigInt(`0x${t.hexSlice(e,e+=8)}`);default:return t[e++]*72057594037927940+t[e++]*281474976710656+t[e++]*1099511627776+t[e++]*4294967296+t[e++]*16777216+t[e++]*65536+t[e++]*256+t[e++]}},"readUInt64BE"),skip:a(i=>{t&&i>0&&(e+=i)},"skip"),skipString:a(()=>{let i=r.readUInt32BE();if(i!==void 0)return e+=i,e<=t.length?i:void 0},"skipString"),readByte:a(()=>{if(t&&e<t.length)return t[e++]},"readByte"),readBool:a(()=>{if(t&&e<t.length)return!!t[e++]},"readBool"),readList:a(()=>{let i=r.readString(!0);if(i!==void 0)return i?i.split(","):[]},"readList"),readString:a((i,n)=>{typeof i=="number"&&(n=i,i=void 0);let o=r.readUInt32BE();if(o!==void 0&&!(t.length-e<o||typeof n=="number"&&o>n))return i?Buffer.isBuffer(i)?uu(t,i,e,e+=o):t.utf8Slice(e,e+=o):lu(t,e,e+=o)},"readString"),readRaw:a(i=>{if(t){if(typeof i!="number")return lu(t,e,e+=t.length-e);if(t.length-e>=i)return lu(t,e,e+=i)}},"readRaw")};return r}a(nE,"makeBufferParser");function _S(e,t,r){let i=new Error(e);return typeof t=="boolean"?(r=t,i.level="protocol"):i.level=t||"protocol",i.fatal=!!r,i}a(_S,"makeError");function rE(e,t,r){return e[r++]=t>>>24,e[r++]=t>>>16,e[r++]=t>>>8,e[r++]=t,r}a(rE,"writeUInt32BE");var Xd=nE();ES.exports={bufferCopy:uu,bufferSlice:lu,FastBuffer:yS,bufferFill:a((e,t,r,i)=>f4.call(e,t,r,i),"bufferFill"),makeError:_S,doFatalError:a((e,t,r,i)=>{let n;return Yd===void 0&&({DISCONNECT_REASON:Yd}=Jn()),t instanceof Error?(n=t,typeof r!="number"?i=Yd.PROTOCOL_ERROR:i=r):n=_S(t,r,!0),typeof i!="number"&&(i=Yd.PROTOCOL_ERROR),e.disconnect(i),e._destruct(),e._onError(n),1/0},"doFatalError"),readUInt32BE:mS,writeUInt32BE:rE,writeUInt32LE:a((e,t,r)=>(e[r++]=t,e[r++]=t>>>8,e[r++]=t>>>16,e[r++]=t>>>24,r),"writeUInt32LE"),makeBufferParser:nE,bufferParser:nE(),readString:a((e,t,r,i)=>{typeof r=="number"&&(i=r,r=void 0),t===void 0&&(t=0);let n=e.length-t;if(t<0||t>=e.length||n<4)return;let o=mS(e,t);if(n<4+o||typeof i=="number"&&o>i)return;t+=4;let s=t+o;return e._pos=s,r?Buffer.isBuffer(r)?uu(e,r,t,s):e.utf8Slice(t,s):lu(e,t,s)},"readString"),sigSSHToASN1:a((e,t)=>{switch(t){case"ssh-dss":{if(e.length>40)return e;let r=new hn.Writer;r.startSequence();let i=e.slice(0,20),n=e.slice(20);if(i[0]&128){let o=Buffer.allocUnsafe(21);o[0]=0,i.copy(o,1),i=o}else i[0]===0&&!(i[1]&128)&&(i=i.slice(1));if(n[0]&128){let o=Buffer.allocUnsafe(21);o[0]=0,n.copy(o,1),n=o}else n[0]===0&&!(n[1]&128)&&(n=n.slice(1));return r.writeBuffer(i,hn.Integer),r.writeBuffer(n,hn.Integer),r.endSequence(),r.buffer}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{Xd.init(e,0);let r=Xd.readString(),i=Xd.readString();if(Xd.clear(),r===void 0||i===void 0)return;let n=new hn.Writer;return n.startSequence(),n.writeBuffer(r,hn.Integer),n.writeBuffer(i,hn.Integer),n.endSequence(),n.buffer}default:return e}},"sigSSHToASN1"),convertSignature:a((e,t)=>{switch(t){case"ssh-dss":{if(e.length<=40)return e;let r=new hn.Reader(e);r.readSequence();let i=r.readString(hn.Integer,!0),n=r.readString(hn.Integer,!0),o=0,s=0;if(i.length<20){let u=Buffer.allocUnsafe(20);u.set(i,1),i=u,i[0]=0}if(n.length<20){let u=Buffer.allocUnsafe(20);u.set(n,1),n=u,n[0]=0}i.length>20&&i[0]===0&&(o=1),n.length>20&&n[0]===0&&(s=1);let c=Buffer.allocUnsafe(i.length-o+(n.length-s));return uu(i,c,o,i.length,0),uu(n,c,s,n.length,i.length-o),c}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{if(e[0]===0)return e;let r=new hn.Reader(e);r.readSequence();let i=r.readString(hn.Integer,!0),n=r.readString(hn.Integer,!0);if(i===null||n===null)return;let o=Buffer.allocUnsafe(4+i.length+4+n.length);return rE(o,i.length,0),o.set(i,4),rE(o,n.length,4+i.length),o.set(n,8+i.length),o}}return e},"convertSignature"),sendPacket:a((e,t,r)=>!r&&e._kexinit!==void 0?(e._queue===void 0&&(e._queue=[]),e._queue.push(t),e._debug&&e._debug("Outbound: ... packet queued"),!1):(e._cipher.encrypt(t),!0),"sendPacket")}});var AS=me((Jd,oE)=>{var iE=(function(){var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(e=e||__filename),(function(t){t=t||{};var r;r||(r=typeof t<"u"?t:{});var i,n;r.ready=new Promise(function(ie,Ee){i=ie,n=Ee});var o={},s;for(s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);var c=typeof window=="object",u=typeof importScripts=="function",l=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",f="",p,g,h,_,y;l?(f=u?require("path").dirname(f)+"/":__dirname+"/",p=a(function(ie,Ee){var Re=Hr(ie);return Re?Ee?Re:Re.toString():(_||(_=require("fs")),y||(y=require("path")),ie=y.normalize(ie),_.readFileSync(ie,Ee?null:"utf8"))},"C"),h=a(function(ie){return ie=p(ie,!0),ie.buffer||(ie=new Uint8Array(ie)),J(ie.buffer),ie},"E"),g=a(function(ie,Ee,Re){var je=Hr(ie);je&&Ee(je),_||(_=require("fs")),y||(y=require("path")),ie=y.normalize(ie),_.readFile(ie,function(gt,lr){gt?Re(gt):Ee(lr.buffer)})},"D"),1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),r.inspect=function(){return"[Emscripten Module object]"}):(c||u)&&(u?f=self.location.href:typeof document<"u"&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f.indexOf("blob:")!==0?f=f.substr(0,f.lastIndexOf("/")+1):f="",p=a(function(ie){try{var Ee=new XMLHttpRequest;return Ee.open("GET",ie,!1),Ee.send(null),Ee.responseText}catch(gt){if(ie=Hr(ie)){Ee=[];for(var Re=0;Re<ie.length;Re++){var je=ie[Re];255<je&&($r&&J(!1,"Character code "+je+" ("+String.fromCharCode(je)+") at offset "+Re+" not in 0x00-0xFF."),je&=255),Ee.push(String.fromCharCode(je))}return Ee.join("")}throw gt}},"C"),u&&(h=a(function(ie){try{var Ee=new XMLHttpRequest;return Ee.open("GET",ie,!1),Ee.responseType="arraybuffer",Ee.send(null),new Uint8Array(Ee.response)}catch(Re){if(ie=Hr(ie))return ie;throw Re}},"E")),g=a(function(ie,Ee,Re){var je=new XMLHttpRequest;je.open("GET",ie,!0),je.responseType="arraybuffer",je.onload=function(){if(je.status==200||je.status==0&&je.response)Ee(je.response);else{var gt=Hr(ie);gt?Ee(gt.buffer):Re()}},je.onerror=Re,je.send(null)},"D")),r.print||console.log.bind(console);var b=r.printErr||console.warn.bind(console);for(s in o)o.hasOwnProperty(s)&&(r[s]=o[s]);o=null;var v;r.wasmBinary&&(v=r.wasmBinary);var S=r.noExitRuntime||!0;typeof WebAssembly!="object"&&re("no native wasm support detected");var M,R=!1;function J(ie,Ee){ie||re("Assertion failed: "+Ee)}a(J,"assert");function te(ie){var Ee=r["_"+ie];return J(Ee,"Cannot call unknown function "+ie+", make sure it is exported"),Ee}a(te,"N");function ee(ie,Ee,Re,je){var gt={string:a(function(kt){var _r=0;if(kt!=null&&kt!==0){var hr=(kt.length<<2)+1;_r=Ys(hr);var Jt=_r,zt=U;if(0<hr){hr=Jt+hr-1;for(var an=0;an<kt.length;++an){var er=kt.charCodeAt(an);if(55296<=er&&57343>=er){var Hi=kt.charCodeAt(++an);er=65536+((er&1023)<<10)|Hi&1023}if(127>=er){if(Jt>=hr)break;zt[Jt++]=er}else{if(2047>=er){if(Jt+1>=hr)break;zt[Jt++]=192|er>>6}else{if(65535>=er){if(Jt+2>=hr)break;zt[Jt++]=224|er>>12}else{if(Jt+3>=hr)break;zt[Jt++]=240|er>>18,zt[Jt++]=128|er>>12&63}zt[Jt++]=128|er>>6&63}zt[Jt++]=128|er&63}}zt[Jt]=0}}return _r},"string"),array:a(function(kt){var _r=Ys(kt.length);return H.set(kt,_r),_r},"array")},lr=te(ie),Tn=[];if(ie=0,je)for(var Yr=0;Yr<je.length;Yr++){var Do=gt[Re[Yr]];Do?(ie===0&&(ie=Gs()),Tn[Yr]=Do(je[Yr])):Tn[Yr]=je[Yr]}return Re=lr.apply(null,Tn),Re=(function(kt){if(Ee==="string")if(kt){for(var _r=U,hr=kt+NaN,Jt=kt;_r[Jt]&&!(Jt>=hr);)++Jt;if(16<Jt-kt&&_r.subarray&&P)kt=P.decode(_r.subarray(kt,Jt));else{for(hr="";kt<Jt;){var zt=_r[kt++];if(zt&128){var an=_r[kt++]&63;if((zt&224)==192)hr+=String.fromCharCode((zt&31)<<6|an);else{var er=_r[kt++]&63;zt=(zt&240)==224?(zt&15)<<12|an<<6|er:(zt&7)<<18|an<<12|er<<6|_r[kt++]&63,65536>zt?hr+=String.fromCharCode(zt):(zt-=65536,hr+=String.fromCharCode(55296|zt>>10,56320|zt&1023))}}else hr+=String.fromCharCode(zt)}kt=hr}}else kt="";else kt=Ee==="boolean"?!!kt:kt;return kt})(Re),ie!==0&&Gu(ie),Re}a(ee,"ca");var P=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,C,H,U;function k(){var ie=M.buffer;C=ie,r.HEAP8=H=new Int8Array(ie),r.HEAP16=new Int16Array(ie),r.HEAP32=new Int32Array(ie),r.HEAPU8=U=new Uint8Array(ie),r.HEAPU16=new Uint16Array(ie),r.HEAPU32=new Uint32Array(ie),r.HEAPF32=new Float32Array(ie),r.HEAPF64=new Float64Array(ie)}a(k,"ia");var j,W=[],z=[],X=[];function ne(){var ie=r.preRun.shift();W.unshift(ie)}a(ne,"ma");var O=0,q=null,V=null;r.preloadedImages={},r.preloadedAudios={};function re(ie){throw r.onAbort&&r.onAbort(ie),b(ie),R=!0,ie=new WebAssembly.RuntimeError("abort("+ie+"). Build with -s ASSERTIONS=1 for more info."),n(ie),ie}a(re,"K");var _e="data:application/octet-stream;base64,",ve;if(ve="data:application/octet-stream;base64,AGFzbQEAAAABIAZgAX8Bf2ADf39/AGABfwBgAABgAAF/YAZ/f39/f38AAgcBAWEBYQAAAwsKAAEDAQAAAgQFAgQFAXABAQEFBwEBgAKAgAIGCQF/AUGAjMACCwclCQFiAgABYwADAWQACQFlAAgBZgAHAWcABgFoAAUBaQAKAWoBAAqGTQpPAQJ/QYAIKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQAEUNAQtBgAggADYCACABDwtBhAhBMDYCAEF/C4wFAg5+Cn8gACgCJCEUIAAoAiAhFSAAKAIcIREgACgCGCESIAAoAhQhEyACQRBPBEAgAC0ATEVBGHQhFyAAKAIEIhZBBWytIQ8gACgCCCIYQQVsrSENIAAoAgwiGUEFbK0hCyAAKAIQIhpBBWytIQkgADUCACEIIBqtIRAgGa0hDiAYrSEMIBatIQoDQCASIAEtAAMiEiABLQAEQQh0ciABLQAFQRB0ciABLQAGIhZBGHRyQQJ2Qf///x9xaq0iAyAOfiABLwAAIAEtAAJBEHRyIBNqIBJBGHRBgICAGHFqrSIEIBB+fCARIAEtAAdBCHQgFnIgAS0ACEEQdHIgAS0ACSIRQRh0ckEEdkH///8fcWqtIgUgDH58IAEtAApBCHQgEXIgAS0AC0EQdHIgAS0ADEEYdHJBBnYgFWqtIgYgCn58IBQgF2ogAS8ADSABLQAPQRB0cmqtIgcgCH58IAMgDH4gBCAOfnwgBSAKfnwgBiAIfnwgByAJfnwgAyAKfiAEIAx+fCAFIAh+fCAGIAl+fCAHIAt+fCADIAh+IAQgCn58IAUgCX58IAYgC358IAcgDX58IAMgCX4gBCAIfnwgBSALfnwgBiANfnwgByAPfnwiA0IaiEL/////D4N8IgRCGohC/////w+DfCIFQhqIQv////8Pg3wiBkIaiEL/////D4N8IgdCGoinQQVsIAOnQf///x9xaiITQRp2IASnQf///x9xaiESIAWnQf///x9xIREgBqdB////H3EhFSAHp0H///8fcSEUIBNB////H3EhEyABQRBqIQEgAkEQayICQQ9LDQALCyAAIBQ2AiQgACAVNgIgIAAgETYCHCAAIBI2AhggACATNgIUCwMAAQu2BAEGfwJAIAAoAjgiBARAIABBPGohBQJAIAJBECAEayIDIAIgA0kbIgZFDQAgBkEDcSEHAkAgBkEBa0EDSQRAQQAhAwwBCyAGQXxxIQhBACEDA0AgBSADIARqaiABIANqLQAAOgAAIAUgA0EBciIEIAAoAjhqaiABIARqLQAAOgAAIAUgA0ECciIEIAAoAjhqaiABIARqLQAAOgAAIAUgA0EDciIEIAAoAjhqaiABIARqLQAAOgAAIANBBGohAyAAKAI4IQQgCEEEayIIDQALCyAHRQ0AA0AgBSADIARqaiABIANqLQAAOgAAIANBAWohAyAAKAI4IQQgB0EBayIHDQALCyAAIAQgBmoiAzYCOCADQRBJDQEgACAFQRAQAiAAQQA2AjggAiAGayECIAEgBmohAQsgAkEQTwRAIAAgASACQXBxIgMQAiACQQ9xIQIgASADaiEBCyACRQ0AIAJBA3EhBCAAQTxqIQVBACEDIAJBAWtBA08EQCACQXxxIQcDQCAFIAAoAjggA2pqIAEgA2otAAA6AAAgBSADQQFyIgYgACgCOGpqIAEgBmotAAA6AAAgBSADQQJyIgYgACgCOGpqIAEgBmotAAA6AAAgBSADQQNyIgYgACgCOGpqIAEgBmotAAA6AAAgA0EEaiEDIAdBBGsiBw0ACwsgBARAA0AgBSAAKAI4IANqaiABIANqLQAAOgAAIANBAWohAyAEQQFrIgQNAAsLIAAgACgCOCACajYCOAsLoS0BDH8jAEEQayIMJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEGICCgCACIFQRAgAEELakF4cSAAQQtJGyIIQQN2IgJ2IgFBA3EEQCABQX9zQQFxIAJqIgNBA3QiAUG4CGooAgAiBEEIaiEAAkAgBCgCCCICIAFBsAhqIgFGBEBBiAggBUF+IAN3cTYCAAwBCyACIAE2AgwgASACNgIICyAEIANBA3QiAUEDcjYCBCABIARqIgEgASgCBEEBcjYCBAwNCyAIQZAIKAIAIgpNDQEgAQRAAkBBAiACdCIAQQAgAGtyIAEgAnRxIgBBACAAa3FBAWsiACAAQQx2QRBxIgJ2IgFBBXZBCHEiACACciABIAB2IgFBAnZBBHEiAHIgASAAdiIBQQF2QQJxIgByIAEgAHYiAUEBdkEBcSIAciABIAB2aiIDQQN0IgBBuAhqKAIAIgQoAggiASAAQbAIaiIARgRAQYgIIAVBfiADd3EiBTYCAAwBCyABIAA2AgwgACABNgIICyAEQQhqIQAgBCAIQQNyNgIEIAQgCGoiAiADQQN0IgEgCGsiA0EBcjYCBCABIARqIAM2AgAgCgRAIApBA3YiAUEDdEGwCGohB0GcCCgCACEEAn8gBUEBIAF0IgFxRQRAQYgIIAEgBXI2AgAgBwwBCyAHKAIICyEBIAcgBDYCCCABIAQ2AgwgBCAHNgIMIAQgATYCCAtBnAggAjYCAEGQCCADNgIADA0LQYwIKAIAIgZFDQEgBkEAIAZrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqQQJ0QbgKaigCACIBKAIEQXhxIAhrIQMgASECA0ACQCACKAIQIgBFBEAgAigCFCIARQ0BCyAAKAIEQXhxIAhrIgIgAyACIANJIgIbIQMgACABIAIbIQEgACECDAELCyABIAhqIgkgAU0NAiABKAIYIQsgASABKAIMIgRHBEAgASgCCCIAQZgIKAIASRogACAENgIMIAQgADYCCAwMCyABQRRqIgIoAgAiAEUEQCABKAIQIgBFDQQgAUEQaiECCwNAIAIhByAAIgRBFGoiAigCACIADQAgBEEQaiECIAQoAhAiAA0ACyAHQQA2AgAMCwtBfyEIIABBv39LDQAgAEELaiIAQXhxIQhBjAgoAgAiCUUNAEEAIAhrIQMCQAJAAkACf0EAIAhBgAJJDQAaQR8gCEH///8HSw0AGiAAQQh2IgAgAEGA/j9qQRB2QQhxIgJ0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgAnIgAHJrIgBBAXQgCCAAQRVqdkEBcXJBHGoLIgVBAnRBuApqKAIAIgJFBEBBACEADAELQQAhACAIQQBBGSAFQQF2ayAFQR9GG3QhAQNAAkAgAigCBEF4cSAIayIHIANPDQAgAiEEIAciAw0AQQAhAyACIQAMAwsgACACKAIUIgcgByACIAFBHXZBBHFqKAIQIgJGGyAAIAcbIQAgAUEBdCEBIAINAAsLIAAgBHJFBEBBACEEQQIgBXQiAEEAIABrciAJcSIARQ0DIABBACAAa3FBAWsiACAAQQx2QRBxIgJ2IgFBBXZBCHEiACACciABIAB2IgFBAnZBBHEiAHIgASAAdiIBQQF2QQJxIgByIAEgAHYiAUEBdkEBcSIAciABIAB2akECdEG4CmooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIAhrIgEgA0khAiABIAMgAhshAyAAIAQgAhshBCAAKAIQIgEEfyABBSAAKAIUCyIADQALCyAERQ0AIANBkAgoAgAgCGtPDQAgBCAIaiIGIARNDQEgBCgCGCEFIAQgBCgCDCIBRwRAIAQoAggiAEGYCCgCAEkaIAAgATYCDCABIAA2AggMCgsgBEEUaiICKAIAIgBFBEAgBCgCECIARQ0EIARBEGohAgsDQCACIQcgACIBQRRqIgIoAgAiAA0AIAFBEGohAiABKAIQIgANAAsgB0EANgIADAkLIAhBkAgoAgAiAk0EQEGcCCgCACEDAkAgAiAIayIBQRBPBEBBkAggATYCAEGcCCADIAhqIgA2AgAgACABQQFyNgIEIAIgA2ogATYCACADIAhBA3I2AgQMAQtBnAhBADYCAEGQCEEANgIAIAMgAkEDcjYCBCACIANqIgAgACgCBEEBcjYCBAsgA0EIaiEADAsLIAhBlAgoAgAiBkkEQEGUCCAGIAhrIgE2AgBBoAhBoAgoAgAiAiAIaiIANgIAIAAgAUEBcjYCBCACIAhBA3I2AgQgAkEIaiEADAsLQQAhACAIQS9qIgkCf0HgCygCAARAQegLKAIADAELQewLQn83AgBB5AtCgKCAgICABDcCAEHgCyAMQQxqQXBxQdiq1aoFczYCAEH0C0EANgIAQcQLQQA2AgBBgCALIgFqIgVBACABayIHcSICIAhNDQpBwAsoAgAiBARAQbgLKAIAIgMgAmoiASADTQ0LIAEgBEsNCwtBxAstAABBBHENBQJAAkBBoAgoAgAiAwRAQcgLIQADQCADIAAoAgAiAU8EQCABIAAoAgRqIANLDQMLIAAoAggiAA0ACwtBABABIgFBf0YNBiACIQVB5AsoAgAiA0EBayIAIAFxBEAgAiABayAAIAFqQQAgA2txaiEFCyAFIAhNDQYgBUH+////B0sNBkHACygCACIEBEBBuAsoAgAiAyAFaiIAIANNDQcgACAESw0HCyAFEAEiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFEAEiASAAKAIAIAAoAgRqRg0EIAEhAAsCQCAAQX9GDQAgCEEwaiAFTQ0AQegLKAIAIgEgCSAFa2pBACABa3EiAUH+////B0sEQCAAIQEMCAsgARABQX9HBEAgASAFaiEFIAAhAQwIC0EAIAVrEAEaDAULIAAiAUF/Rw0GDAQLAAtBACEEDAcLQQAhAQwFCyABQX9HDQILQcQLQcQLKAIAQQRyNgIACyACQf7///8HSw0BIAIQASEBQQAQASEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0G4C0G4CygCACAFaiIANgIAQbwLKAIAIABJBEBBvAsgADYCAAsCQAJAAkBBoAgoAgAiBwRAQcgLIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0GYCCgCACIAQQAgACABTRtFBEBBmAggATYCAAtBACEAQcwLIAU2AgBByAsgATYCAEGoCEF/NgIAQawIQeALKAIANgIAQdQLQQA2AgADQCAAQQN0IgNBuAhqIANBsAhqIgI2AgAgA0G8CGogAjYCACAAQQFqIgBBIEcNAAtBlAggBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQaAIIAAgAWoiADYCACAAIAJBAXI2AgQgASADakEoNgIEQaQIQfALKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEGgCCAHQXggB2tBB3FBACAHQQhqQQdxGyIAaiICNgIAQZQIQZQIKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQaQIQfALKAIANgIADAELQZgIKAIAIAFLBEBBmAggATYCAAsgASAFaiECQcgLIQACQAJAAkACQAJAAkADQCACIAAoAgBHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQELQcgLIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBoAggBjYCAEGUCEGUCCgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQZwIKAIARgRAQZwIIAY2AgBBkAhBkAgoAgAgAmoiADYCACAGIABBAXI2AgQgACAGaiAANgIADAMLIAUoAgQiAEEDcUEBRgRAIABBeHEhBwJAIABB/wFNBEAgBSgCCCIDIABBA3YiAEEDdEGwCGpGGiADIAUoAgwiAUYEQEGICEGICCgCAEF+IAB3cTYCAAwCCyADIAE2AgwgASADNgIIDAELIAUoAhghCAJAIAUgBSgCDCIBRwRAIAUoAggiACABNgIMIAEgADYCCAwBCwJAIAVBFGoiACgCACIDDQAgBUEQaiIAKAIAIgMNAEEAIQEMAQsDQCAAIQQgAyIBQRRqIgAoAgAiAw0AIAFBEGohACABKAIQIgMNAAsgBEEANgIACyAIRQ0AAkAgBSAFKAIcIgNBAnRBuApqIgAoAgBGBEAgACABNgIAIAENAUGMCEGMCCgCAEF+IAN3cTYCAAwCCyAIQRBBFCAIKAIQIAVGG2ogATYCACABRQ0BCyABIAg2AhggBSgCECIABEAgASAANgIQIAAgATYCGAsgBSgCFCIARQ0AIAEgADYCFCAAIAE2AhgLIAUgB2ohBSACIAdqIQILIAUgBSgCBEF+cTYCBCAGIAJBAXI2AgQgAiAGaiACNgIAIAJB/wFNBEAgAkEDdiIAQQN0QbAIaiECAn9BiAgoAgAiAUEBIAB0IgBxRQRAQYgIIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwDC0EfIQAgAkH///8HTQRAIAJBCHYiACAAQYD+P2pBEHZBCHEiA3QiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASADciAAcmsiAEEBdCACIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRBuApqIQQCQEGMCCgCACIDQQEgAHQiAXFFBEBBjAggASADcjYCACAEIAY2AgAgBiAENgIYDAELIAJBAEEZIABBAXZrIABBH0YbdCEAIAQoAgAhAQNAIAEiAygCBEF4cSACRg0DIABBHXYhASAAQQF0IQAgAyABQQRxaiIEKAIQIgENAAsgBCAGNgIQIAYgAzYCGAsgBiAGNgIMIAYgBjYCCAwCC0GUCCAFQShrIgNBeCABa0EHcUEAIAFBCGpBB3EbIgBrIgI2AgBBoAggACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRBpAhB8AsoAgA2AgAgByAEQScgBGtBB3FBACAEQSdrQQdxG2pBL2siACAAIAdBEGpJGyICQRs2AgQgAkHQCykCADcCECACQcgLKQIANwIIQdALIAJBCGo2AgBBzAsgBTYCAEHICyABNgIAQdQLQQA2AgAgAkEYaiEAA0AgAEEHNgIEIABBCGohASAAQQRqIQAgASAESQ0ACyACIAdGDQMgAiACKAIEQX5xNgIEIAcgAiAHayIEQQFyNgIEIAIgBDYCACAEQf8BTQRAIARBA3YiAEEDdEGwCGohAgJ/QYgIKAIAIgFBASAAdCIAcUUEQEGICCAAIAFyNgIAIAIMAQsgAigCCAshACACIAc2AgggACAHNgIMIAcgAjYCDCAHIAA2AggMBAtBHyEAIAdCADcCECAEQf///wdNBEAgBEEIdiIAIABBgP4/akEQdkEIcSICdCIAIABBgOAfakEQdkEEcSIBdCIAIABBgIAPakEQdkECcSIAdEEPdiABIAJyIAByayIAQQF0IAQgAEEVanZBAXFyQRxqIQALIAcgADYCHCAAQQJ0QbgKaiEDAkBBjAgoAgAiAkEBIAB0IgFxRQRAQYwIIAEgAnI2AgAgAyAHNgIAIAcgAzYCGAwBCyAEQQBBGSAAQQF2ayAAQR9GG3QhACADKAIAIQEDQCABIgIoAgRBeHEgBEYNBCAAQR12IQEgAEEBdCEAIAIgAUEEcWoiAygCECIBDQALIAMgBzYCECAHIAI2AhgLIAcgBzYCDCAHIAc2AggMAwsgAygCCCIAIAY2AgwgAyAGNgIIIAZBADYCGCAGIAM2AgwgBiAANgIICyAJQQhqIQAMBQsgAigCCCIAIAc2AgwgAiAHNgIIIAdBADYCGCAHIAI2AgwgByAANgIIC0GUCCgCACIAIAhNDQBBlAggACAIayIBNgIAQaAIQaAIKAIAIgIgCGoiADYCACAAIAFBAXI2AgQgAiAIQQNyNgIEIAJBCGohAAwDC0GECEEwNgIAQQAhAAwCCwJAIAVFDQACQCAEKAIcIgJBAnRBuApqIgAoAgAgBEYEQCAAIAE2AgAgAQ0BQYwIIAlBfiACd3EiCTYCAAwCCyAFQRBBFCAFKAIQIARGG2ogATYCACABRQ0BCyABIAU2AhggBCgCECIABEAgASAANgIQIAAgATYCGAsgBCgCFCIARQ0AIAEgADYCFCAAIAE2AhgLAkAgA0EPTQRAIAQgAyAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEDAELIAQgCEEDcjYCBCAGIANBAXI2AgQgAyAGaiADNgIAIANB/wFNBEAgA0EDdiIAQQN0QbAIaiECAn9BiAgoAgAiAUEBIAB0IgBxRQRAQYgIIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwBC0EfIQAgA0H///8HTQRAIANBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCADIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRBuApqIQICQAJAIAlBASAAdCIBcUUEQEGMCCABIAlyNgIAIAIgBjYCACAGIAI2AhgMAQsgA0EAQRkgAEEBdmsgAEEfRht0IQAgAigCACEIA0AgCCIBKAIEQXhxIANGDQIgAEEddiECIABBAXQhACABIAJBBHFqIgIoAhAiCA0ACyACIAY2AhAgBiABNgIYCyAGIAY2AgwgBiAGNgIIDAELIAEoAggiACAGNgIMIAEgBjYCCCAGQQA2AhggBiABNgIMIAYgADYCCAsgBEEIaiEADAELAkAgC0UNAAJAIAEoAhwiAkECdEG4CmoiACgCACABRgRAIAAgBDYCACAEDQFBjAggBkF+IAJ3cTYCAAwCCyALQRBBFCALKAIQIAFGG2ogBDYCACAERQ0BCyAEIAs2AhggASgCECIABEAgBCAANgIQIAAgBDYCGAsgASgCFCIARQ0AIAQgADYCFCAAIAQ2AhgLAkAgA0EPTQRAIAEgAyAIaiIAQQNyNgIEIAAgAWoiACAAKAIEQQFyNgIEDAELIAEgCEEDcjYCBCAJIANBAXI2AgQgAyAJaiADNgIAIAoEQCAKQQN2IgBBA3RBsAhqIQRBnAgoAgAhAgJ/QQEgAHQiACAFcUUEQEGICCAAIAVyNgIAIAQMAQsgBCgCCAshACAEIAI2AgggACACNgIMIAIgBDYCDCACIAA2AggLQZwIIAk2AgBBkAggAzYCAAsgAUEIaiEACyAMQRBqJAAgAAsQACMAIABrQXBxIgAkACAACwYAIAAkAAsEACMAC4AJAgh/BH4jAEGQAWsiBiQAIAYgBS0AA0EYdEGAgIAYcSAFLwAAIAUtAAJBEHRycjYCACAGIAUoAANBAnZBg/7/H3E2AgQgBiAFKAAGQQR2Qf+B/x9xNgIIIAYgBSgACUEGdkH//8AfcTYCDCAFLwANIQggBS0ADyEJIAZCADcCFCAGQgA3AhwgBkEANgIkIAYgCCAJQRB0QYCAPHFyNgIQIAYgBSgAEDYCKCAGIAUoABQ2AiwgBiAFKAAYNgIwIAUoABwhBSAGQQA6AEwgBkEANgI4IAYgBTYCNCAGIAEgAhAEIAQEQCAGIAMgBBAECyAGKAI4IgEEQCAGQTxqIgIgAWpBAToAACABQQFqQQ9NBEAgASAGakE9aiEEAkBBDyABayIDRQ0AIAMgBGoiAUEBa0EAOgAAIARBADoAACADQQNJDQAgAUECa0EAOgAAIARBADoAASABQQNrQQA6AAAgBEEAOgACIANBB0kNACABQQRrQQA6AAAgBEEAOgADIANBCUkNACAEQQAgBGtBA3EiAWoiBEEANgIAIAQgAyABa0F8cSIBaiIDQQRrQQA2AgAgAUEJSQ0AIARBADYCCCAEQQA2AgQgA0EIa0EANgIAIANBDGtBADYCACABQRlJDQAgBEEANgIYIARBADYCFCAEQQA2AhAgBEEANgIMIANBEGtBADYCACADQRRrQQA2AgAgA0EYa0EANgIAIANBHGtBADYCACABIARBBHFBGHIiAWsiA0EgSQ0AIAEgBGohAQNAIAFCADcDGCABQgA3AxAgAUIANwMIIAFCADcDACABQSBqIQEgA0EgayIDQR9LDQALCwsgBkEBOgBMIAYgAkEQEAILIAY1AjQhECAGNQIwIREgBjUCLCEOIAAgBjUCKCAGKAIkIAYoAiAgBigCHCAGKAIYIgNBGnZqIgJBGnZqIgFBGnZqIgtBgICAYHIgAUH///8fcSINIAJB////H3EiCCAGKAIUIAtBGnZBBWxqIgFB////H3EiCUEFaiIFQRp2IANB////H3EgAUEadmoiA2oiAUEadmoiAkEadmoiBEEadmoiDEEfdSIHIANxIAEgDEEfdkEBayIDQf///x9xIgpxciIBQRp0IAUgCnEgByAJcXJyrXwiDzwAACAAIA9CGIg8AAMgACAPQhCIPAACIAAgD0IIiDwAASAAIA4gByAIcSACIApxciICQRR0IAFBBnZyrXwgD0IgiHwiDjwABCAAIA5CGIg8AAcgACAOQhCIPAAGIAAgDkIIiDwABSAAIBEgByANcSAEIApxciIBQQ50IAJBDHZyrXwgDkIgiHwiDjwACCAAIA5CGIg8AAsgACAOQhCIPAAKIAAgDkIIiDwACSAAIBAgAyAMcSAHIAtxckEIdCABQRJ2cq18IA5CIIh8Ig48AAwgACAOQhiIPAAPIAAgDkIQiDwADiAAIA5CCIg8AA0gBkIANwIwIAZCADcCKCAGQgA3AiAgBkIANwIYIAZCADcCECAGQgA3AgggBkIANwIAIAZBkAFqJAALpwwBB38CQCAARQ0AIABBCGsiAyAAQQRrKAIAIgFBeHEiAGohBQJAIAFBAXENACABQQNxRQ0BIAMgAygCACIBayIDQZgIKAIASQ0BIAAgAWohACADQZwIKAIARwRAIAFB/wFNBEAgAygCCCICIAFBA3YiBEEDdEGwCGpGGiACIAMoAgwiAUYEQEGICEGICCgCAEF+IAR3cTYCAAwDCyACIAE2AgwgASACNgIIDAILIAMoAhghBgJAIAMgAygCDCIBRwRAIAMoAggiAiABNgIMIAEgAjYCCAwBCwJAIANBFGoiAigCACIEDQAgA0EQaiICKAIAIgQNAEEAIQEMAQsDQCACIQcgBCIBQRRqIgIoAgAiBA0AIAFBEGohAiABKAIQIgQNAAsgB0EANgIACyAGRQ0BAkAgAyADKAIcIgJBAnRBuApqIgQoAgBGBEAgBCABNgIAIAENAUGMCEGMCCgCAEF+IAJ3cTYCAAwDCyAGQRBBFCAGKAIQIANGG2ogATYCACABRQ0CCyABIAY2AhggAygCECICBEAgASACNgIQIAIgATYCGAsgAygCFCICRQ0BIAEgAjYCFCACIAE2AhgMAQsgBSgCBCIBQQNxQQNHDQBBkAggADYCACAFIAFBfnE2AgQgAyAAQQFyNgIEIAAgA2ogADYCAA8LIAMgBU8NACAFKAIEIgFBAXFFDQACQCABQQJxRQRAIAVBoAgoAgBGBEBBoAggAzYCAEGUCEGUCCgCACAAaiIANgIAIAMgAEEBcjYCBCADQZwIKAIARw0DQZAIQQA2AgBBnAhBADYCAA8LIAVBnAgoAgBGBEBBnAggAzYCAEGQCEGQCCgCACAAaiIANgIAIAMgAEEBcjYCBCAAIANqIAA2AgAPCyABQXhxIABqIQACQCABQf8BTQRAIAUoAggiAiABQQN2IgRBA3RBsAhqRhogAiAFKAIMIgFGBEBBiAhBiAgoAgBBfiAEd3E2AgAMAgsgAiABNgIMIAEgAjYCCAwBCyAFKAIYIQYCQCAFIAUoAgwiAUcEQCAFKAIIIgJBmAgoAgBJGiACIAE2AgwgASACNgIIDAELAkAgBUEUaiICKAIAIgQNACAFQRBqIgIoAgAiBA0AQQAhAQwBCwNAIAIhByAEIgFBFGoiAigCACIEDQAgAUEQaiECIAEoAhAiBA0ACyAHQQA2AgALIAZFDQACQCAFIAUoAhwiAkECdEG4CmoiBCgCAEYEQCAEIAE2AgAgAQ0BQYwIQYwIKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiABNgIAIAFFDQELIAEgBjYCGCAFKAIQIgIEQCABIAI2AhAgAiABNgIYCyAFKAIUIgJFDQAgASACNgIUIAIgATYCGAsgAyAAQQFyNgIEIAAgA2ogADYCACADQZwIKAIARw0BQZAIIAA2AgAPCyAFIAFBfnE2AgQgAyAAQQFyNgIEIAAgA2ogADYCAAsgAEH/AU0EQCAAQQN2IgFBA3RBsAhqIQACf0GICCgCACICQQEgAXQiAXFFBEBBiAggASACcjYCACAADAELIAAoAggLIQIgACADNgIIIAIgAzYCDCADIAA2AgwgAyACNgIIDwtBHyECIANCADcCECAAQf///wdNBEAgAEEIdiIBIAFBgP4/akEQdkEIcSIBdCICIAJBgOAfakEQdkEEcSICdCIEIARBgIAPakEQdkECcSIEdEEPdiABIAJyIARyayIBQQF0IAAgAUEVanZBAXFyQRxqIQILIAMgAjYCHCACQQJ0QbgKaiEBAkACQAJAQYwIKAIAIgRBASACdCIHcUUEQEGMCCAEIAdyNgIAIAEgAzYCACADIAE2AhgMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgASgCACEBA0AgASIEKAIEQXhxIABGDQIgAkEddiEBIAJBAXQhAiAEIAFBBHFqIgdBEGooAgAiAQ0ACyAHIAM2AhAgAyAENgIYCyADIAM2AgwgAyADNgIIDAELIAQoAggiACADNgIMIAQgAzYCCCADQQA2AhggAyAENgIMIAMgADYCCAtBqAhBqAgoAgBBAWsiAEF/IAAbNgIACwsLCQEAQYEICwIGUA==",!ve.startsWith(_e)){var xe=ve;ve=r.locateFile?r.locateFile(xe,f):f+xe}function Tt(){var ie=ve;try{if(ie==ve&&v)return new Uint8Array(v);var Ee=Hr(ie);if(Ee)return Ee;if(h)return h(ie);throw"both async and sync fetching of the wasm failed"}catch(Re){re(Re)}}a(Tt,"pa");function Mt(){if(!v&&(c||u)){if(typeof fetch=="function"&&!ve.startsWith("file://"))return fetch(ve,{credentials:"same-origin"}).then(function(ie){if(!ie.ok)throw"failed to load wasm binary file at '"+ve+"'";return ie.arrayBuffer()}).catch(function(){return Tt()});if(g)return new Promise(function(ie,Ee){g(ve,function(Re){ie(new Uint8Array(Re))},Ee)})}return Promise.resolve().then(function(){return Tt()})}a(Mt,"qa");function ur(ie){for(;0<ie.length;){var Ee=ie.shift();if(typeof Ee=="function")Ee(r);else{var Re=Ee.m;typeof Re=="number"?Ee.l===void 0?j.get(Re)():j.get(Re)(Ee.l):Re(Ee.l===void 0?null:Ee.l)}}}a(ur,"X");var $r=!1,sn=typeof atob=="function"?atob:function(ie){var Ee="",Re=0;ie=ie.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++)),gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++)),lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++)),Tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++));je=je<<2|gt>>4,gt=(gt&15)<<4|lr>>2;var Yr=(lr&3)<<6|Tn;Ee+=String.fromCharCode(je),lr!==64&&(Ee+=String.fromCharCode(gt)),Tn!==64&&(Ee+=String.fromCharCode(Yr))}while(Re<ie.length);return Ee};function Hr(ie){if(ie.startsWith(_e)){if(ie=ie.slice(_e.length),typeof l=="boolean"&&l){var Ee=Buffer.from(ie,"base64");Ee=new Uint8Array(Ee.buffer,Ee.byteOffset,Ee.byteLength)}else try{var Re=sn(ie),je=new Uint8Array(Re.length);for(ie=0;ie<Re.length;++ie)je[ie]=Re.charCodeAt(ie);Ee=je}catch{throw Error("Converting base64 string to bytes failed.")}return Ee}}a(Hr,"H");var Oo={a:a(function(ie){var Ee=U.length;if(ie>>>=0,2147483648<ie)return!1;for(var Re=1;4>=Re;Re*=2){var je=Ee*(1+.2/Re);je=Math.min(je,ie+100663296),je=Math.max(ie,je),0<je%65536&&(je+=65536-je%65536);e:{try{M.grow(Math.min(2147483648,je)-C.byteLength+65535>>>16),k();var gt=1;break e}catch{}gt=void 0}if(gt)return!0}return!1},"a")};(function(){function ie(gt){r.asm=gt.exports,M=r.asm.b,k(),j=r.asm.j,z.unshift(r.asm.c),O--,r.monitorRunDependencies&&r.monitorRunDependencies(O),O==0&&(q!==null&&(clearInterval(q),q=null),V&&(gt=V,V=null,gt()))}a(ie,"a");function Ee(gt){ie(gt.instance)}a(Ee,"c");function Re(gt){return Mt().then(function(lr){return WebAssembly.instantiate(lr,je)}).then(gt,function(lr){b("failed to asynchronously prepare wasm: "+lr),re(lr)})}a(Re,"d");var je={a:Oo};if(O++,r.monitorRunDependencies&&r.monitorRunDependencies(O),r.instantiateWasm)try{return r.instantiateWasm(je,ie)}catch(gt){return b("Module.instantiateWasm callback failed with error: "+gt),!1}return(function(){return v||typeof WebAssembly.instantiateStreaming!="function"||ve.startsWith(_e)||ve.startsWith("file://")||typeof fetch!="function"?Re(Ee):fetch(ve,{credentials:"same-origin"}).then(function(gt){return WebAssembly.instantiateStreaming(gt,je).then(Ee,function(lr){return b("wasm streaming compile failed: "+lr),b("falling back to ArrayBuffer instantiation"),Re(Ee)})})})().catch(n),{}})(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.c).apply(null,arguments)},r._poly1305_auth=function(){return(r._poly1305_auth=r.asm.d).apply(null,arguments)};var Gs=r.stackSave=function(){return(Gs=r.stackSave=r.asm.e).apply(null,arguments)},Gu=r.stackRestore=function(){return(Gu=r.stackRestore=r.asm.f).apply(null,arguments)},Ys=r.stackAlloc=function(){return(Ys=r.stackAlloc=r.asm.g).apply(null,arguments)};r._malloc=function(){return(r._malloc=r.asm.h).apply(null,arguments)},r._free=function(){return(r._free=r.asm.i).apply(null,arguments)},r.cwrap=function(ie,Ee,Re,je){Re=Re||[];var gt=Re.every(function(lr){return lr==="number"});return Ee!=="string"&&gt&&!je?te(ie):function(){return ee(ie,Ee,Re,arguments)}};var No;V=a(function ie(){No||$o(),No||(V=ie)},"ta");function $o(){function ie(){if(!No&&(No=!0,r.calledRun=!0,!R)){if(ur(z),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var Ee=r.postRun.shift();X.unshift(Ee)}ur(X)}}if(a(ie,"a"),!(0<O)){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)ne();ur(W),0<O||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),ie()},1)):ie())}}if(a($o,"Z"),r.run=$o,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return $o(),t.ready})})();typeof Jd=="object"&&typeof oE=="object"?oE.exports=iE:typeof define=="function"&&define.amd?define([],function(){return iE}):typeof Jd=="object"&&(Jd.createPoly1305=iE)});var Pi=me((DQ,SS)=>{"use strict";var{createCipheriv:Rs,createDecipheriv:ep,createHmac:sE,randomFillSync:Ao,timingSafeEqual:aE}=require("crypto"),{readUInt32BE:du,writeUInt32BE:nn}=In(),Ti=Buffer[Symbol.species],bS=2**32-1,xS=Buffer.alloc(0),Cs=Buffer.alloc(4),tp=new Map,bo=35e3,cE,IE,vE,SE,wE,PE,TE;try{cE=require("./crypto/build/Release/sshcrypto.node"),{AESGCMCipher:IE,ChaChaPolyCipher:vE,GenericCipher:SE,AESGCMDecipher:wE,ChaChaPolyDecipher:PE,GenericDecipher:TE}=cE}catch{}var Sr=1,d4=(()=>{function e(t,r,i,n,o,s,c){return{sslName:t,blockLen:r,keyLen:i,ivLen:n!==0||c&Sr?n:r,authLen:o,discardLen:s,stream:!!(c&Sr)}}return a(e,"info"),{"chacha20-poly1305@openssh.com":e("chacha20",8,64,0,16,0,Sr),"aes128-gcm":e("aes-128-gcm",16,16,12,16,0,Sr),"aes256-gcm":e("aes-256-gcm",16,32,12,16,0,Sr),"aes128-gcm@openssh.com":e("aes-128-gcm",16,16,12,16,0,Sr),"aes256-gcm@openssh.com":e("aes-256-gcm",16,32,12,16,0,Sr),"aes128-cbc":e("aes-128-cbc",16,16,0,0,0,0),"aes192-cbc":e("aes-192-cbc",16,24,0,0,0,0),"aes256-cbc":e("aes-256-cbc",16,32,0,0,0,0),"rijndael-cbc@lysator.liu.se":e("aes-256-cbc",16,32,0,0,0,0),"3des-cbc":e("des-ede3-cbc",8,24,0,0,0,0),"blowfish-cbc":e("bf-cbc",8,16,0,0,0,0),"idea-cbc":e("idea-cbc",8,16,0,0,0,0),"cast128-cbc":e("cast-cbc",8,16,0,0,0,0),"aes128-ctr":e("aes-128-ctr",16,16,16,0,0,Sr),"aes192-ctr":e("aes-192-ctr",16,24,16,0,0,Sr),"aes256-ctr":e("aes-256-ctr",16,32,16,0,0,Sr),"3des-ctr":e("des-ede3",8,24,8,0,0,Sr),"blowfish-ctr":e("bf-ecb",8,16,8,0,0,Sr),"cast128-ctr":e("cast5-ecb",8,16,8,0,0,Sr),arcfour:e("rc4",8,16,0,0,1536,Sr),arcfour128:e("rc4",8,16,0,0,1536,Sr),arcfour256:e("rc4",8,32,0,0,1536,Sr),arcfour512:e("rc4",8,64,0,0,1536,Sr)}})(),p4=(()=>{function e(t,r,i,n){return{sslName:t,len:r,actualLen:i,isETM:n}}return a(e,"info"),{"hmac-md5":e("md5",16,16,!1),"hmac-md5-96":e("md5",16,12,!1),"hmac-ripemd160":e("ripemd160",20,20,!1),"hmac-sha1":e("sha1",20,20,!1),"hmac-sha1-etm@openssh.com":e("sha1",20,20,!0),"hmac-sha1-96":e("sha1",20,12,!1),"hmac-sha2-256":e("sha256",32,32,!1),"hmac-sha2-256-etm@openssh.com":e("sha256",32,32,!0),"hmac-sha2-256-96":e("sha256",32,12,!1),"hmac-sha2-512":e("sha512",64,64,!1),"hmac-sha2-512-etm@openssh.com":e("sha512",64,64,!0),"hmac-sha2-512-96":e("sha512",64,12,!1)}})(),uE=class{static{a(this,"NullCipher")}constructor(t,r){this.outSeqno=t,this._onWrite=r,this._dead=!1}free(){this._dead=!0}allocPacket(t){let r=5+t,i=8-(r&7);i<4&&(i+=8),r+=i;let n=Buffer.allocUnsafe(r);return nn(n,r-4,0),n[4]=i,Ao(n,5+t,i),n}encrypt(t){this._dead||(this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},IS=Buffer.alloc(32),Zr=Buffer.alloc(16),fu,pu,kE,lE=class{static{a(this,"ChaChaPolyCipherNative")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encKeyMain=r.cipherKey.slice(0,32),this._encKeyPktLen=r.cipherKey.slice(32),this._dead=!1}free(){this._dead=!0}allocPacket(t){let r=5+t,i=8-(r-4&7);i<4&&(i+=8),r+=i;let n=Buffer.allocUnsafe(r);return nn(n,r-4,0),n[4]=i,Ao(n,5+t,i),n}encrypt(t){if(this._dead)return;Zr[0]=0,nn(Zr,this.outSeqno,12);let r=Rs("chacha20",this._encKeyMain,Zr).update(IS),i=Rs("chacha20",this._encKeyPktLen,Zr).update(t.slice(0,4));this._onWrite(i),Zr[0]=1;let n=Rs("chacha20",this._encKeyMain,Zr).update(t.slice(4));this._onWrite(n),kE(pu,i,i.length,n,n.length,r);let o=Buffer.allocUnsafe(16);o.set(new Uint8Array(fu.HEAPU8.buffer,pu,16),0),this._onWrite(o),this.outSeqno=this.outSeqno+1>>>0}},fE=class{static{a(this,"ChaChaPolyCipherBinding")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._instance=new vE(r.cipherKey),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let r=5+t,i=8-(r-4&7);i<4&&(i+=8),r+=i;let n=Buffer.allocUnsafe(r+16);return nn(n,r-4,0),n[4]=i,Ao(n,5+t,i),n}encrypt(t){this._dead||(this._instance.encrypt(t,this.outSeqno),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},dE=class{static{a(this,"AESGCMCipherNative")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encSSLName=r.cipherInfo.sslName,this._encKey=r.cipherKey,this._encIV=r.cipherIV,this._dead=!1}free(){this._dead=!0}allocPacket(t){let r=5+t,i=16-(r-4&15);i<4&&(i+=16),r+=i;let n=Buffer.allocUnsafe(r);return nn(n,r-4,0),n[4]=i,Ao(n,5+t,i),n}encrypt(t){if(this._dead)return;let r=Rs(this._encSSLName,this._encKey,this._encIV);r.setAutoPadding(!1);let i=t.slice(0,4);r.setAAD(i),this._onWrite(i);let n=r.update(t.slice(4));this._onWrite(n);let o=r.final();o.length&&this._onWrite(o);let s=r.getAuthTag();this._onWrite(s),vS(this._encIV),this.outSeqno=this.outSeqno+1>>>0}},pE=class{static{a(this,"AESGCMCipherBinding")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._instance=new IE(r.cipherInfo.sslName,r.cipherKey,r.cipherIV),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let r=5+t,i=16-(r-4&15);i<4&&(i+=16),r+=i;let n=Buffer.allocUnsafe(r+16);return nn(n,r-4,0),n[4]=i,Ao(n,5+t,i),n}encrypt(t){this._dead||(this._instance.encrypt(t),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},hE=class{static{a(this,"GenericCipherNative")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encBlockLen=r.cipherInfo.blockLen,this._cipherInstance=Rs(r.cipherInfo.sslName,r.cipherKey,r.cipherIV),this._macSSLName=r.macInfo.sslName,this._macKey=r.macKey,this._macActualLen=r.macInfo.actualLen,this._macETM=r.macInfo.isETM,this._aadLen=this._macETM?4:0,this._dead=!1;let i=r.cipherInfo.discardLen;if(i){let n=tp.get(i);n===void 0&&(n=Buffer.alloc(i),tp.set(i,n)),this._cipherInstance.update(n)}}free(){this._dead=!0}allocPacket(t){let r=this._encBlockLen,i=5+t,n=r-(i-this._aadLen&r-1);n<4&&(n+=r),i+=n;let o=Buffer.allocUnsafe(i);return nn(o,i-4,0),o[4]=n,Ao(o,5+t,n),o}encrypt(t){if(this._dead)return;let r;if(this._macETM){let n=new Uint8Array(t.buffer,t.byteOffset,4),o=this._cipherInstance.update(new Uint8Array(t.buffer,t.byteOffset+4,t.length-4));this._onWrite(n),this._onWrite(o),r=sE(this._macSSLName,this._macKey),nn(Cs,this.outSeqno,0),r.update(Cs),r.update(n),r.update(o)}else{let n=this._cipherInstance.update(t);this._onWrite(n),r=sE(this._macSSLName,this._macKey),nn(Cs,this.outSeqno,0),r.update(Cs),r.update(t)}let i=r.digest();i.length>this._macActualLen&&(i=i.slice(0,this._macActualLen)),this._onWrite(i),this.outSeqno=this.outSeqno+1>>>0}},gE=class{static{a(this,"GenericCipherBinding")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encBlockLen=r.cipherInfo.blockLen,this._macLen=r.macInfo.len,this._macActualLen=r.macInfo.actualLen,this._aadLen=r.macInfo.isETM?4:0,this._instance=new SE(r.cipherInfo.sslName,r.cipherKey,r.cipherIV,r.macInfo.sslName,r.macKey,r.macInfo.isETM),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let r=this._encBlockLen,i=5+t,n=r-(i-this._aadLen&r-1);n<4&&(n+=r),i+=n;let o=Buffer.allocUnsafe(i+this._macLen);return nn(o,i-4,0),o[4]=n,Ao(o,5+t,n),o}encrypt(t){this._dead||(this._instance.encrypt(t,this.outSeqno),this._macActualLen<this._macLen&&(t=new Ti(t.buffer,t.byteOffset,t.length-(this._macLen-this._macActualLen))),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},mE=class{static{a(this,"NullDecipher")}constructor(t,r){this.inSeqno=t,this._onPayload=r,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenBytes<4){let o=Math.min(4-this._lenBytes,i-r);for(this._lenBytes+=o;o--;)this._len=(this._len<<8)+t[r++];if(this._lenBytes<4)return;if(this._len>bo||this._len<8||(4+this._len&7)!==0)throw new Error("Bad packet length");if(r>=i)return}if(this._packetPos<this._len){let o=Math.min(this._len-this._packetPos,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._packetPos)),r+=o,this._packetPos+=o,this._packetPos<this._len)return}let n=this._packet?new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):xS;this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},_E=class{static{a(this,"ChaChaPolyDecipherNative")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._decKeyMain=r.decipherKey.slice(0,32),this._decKeyPktLen=r.decipherKey.slice(32),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._calcMac=Buffer.allocUnsafe(16),this._macPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenPos<4){let c=Math.min(4-this._lenPos,i-r);for(;c--;)this._lenBuf[this._lenPos++]=t[r++];if(this._lenPos<4)return;Zr[0]=0,nn(Zr,this.inSeqno,12);let u=ep("chacha20",this._decKeyPktLen,Zr).update(this._lenBuf);if(this._len=du(u,0),this._len>bo||this._len<8||(this._len&7)!==0)throw new Error("Bad packet length")}if(this._pktLen<this._len){if(r>=i)return;let c=Math.min(this._len-this._pktLen,i-r),u;if(r!==0||c!==i?u=new Uint8Array(t.buffer,t.byteOffset+r,c):u=t,c===this._len?this._packet=u:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(u,this._pktLen)),r+=c,this._pktLen+=c,this._pktLen<this._len||r>=i)return}{let c=Math.min(16-this._macPos,i-r);if(r!==0||c!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,c),this._macPos):this._mac.set(t,this._macPos),r+=c,this._macPos+=c,this._macPos<16)return}Zr[0]=0,nn(Zr,this.inSeqno,12);let n=Rs("chacha20",this._decKeyMain,Zr).update(IS);if(kE(pu,this._lenBuf,4,this._packet,this._packet.length,n),this._calcMac.set(new Uint8Array(fu.HEAPU8.buffer,pu,16),0),!aE(this._calcMac,this._mac))throw new Error("Invalid MAC");Zr[0]=1;let o=ep("chacha20",this._decKeyMain,Zr).update(this._packet),s=new Ti(o.buffer,o.byteOffset+1,o.length-o[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let c=this._onPayload(s);if(c!==void 0)return c===!1?r:c}}}},yE=class{static{a(this,"ChaChaPolyDecipherBinding")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._instance=new PE(r.decipherKey),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._macPos=0}free(){this._instance.free()}decrypt(t,r,i){for(;r<i;){if(this._lenPos<4){let o=Math.min(4-this._lenPos,i-r);for(;o--;)this._lenBuf[this._lenPos++]=t[r++];if(this._lenPos<4)return;if(this._len=this._instance.decryptLen(this._lenBuf,this.inSeqno),this._len>bo||this._len<8||(this._len&7)!==0)throw new Error("Bad packet length");if(r>=i)return}if(this._pktLen<this._len){let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._pktLen)),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(16-this._macPos,i-r);if(r!==0||o!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._macPos):this._mac.set(t,this._macPos),r+=o,this._macPos+=o,this._macPos<16)return}this._instance.decrypt(this._packet,this._mac,this.inSeqno);let n=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},EE=class{static{a(this,"AESGCMDecipherNative")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._decipherInstance=null,this._decipherSSLName=r.decipherInfo.sslName,this._decipherKey=r.decipherKey,this._decipherIV=r.decipherIV,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenBytes<4){let o=Math.min(4-this._lenBytes,i-r);for(this._lenBytes+=o;o--;)this._len=(this._len<<8)+t[r++];if(this._lenBytes<4)return;if(this._len+20>bo||this._len<16||(this._len&15)!==0)throw new Error("Bad packet length");this._decipherInstance=ep(this._decipherSSLName,this._decipherKey,this._decipherIV),this._decipherInstance.setAutoPadding(!1),this._decipherInstance.setAAD(h4(this._len))}if(this._pktLen<this._len){if(r>=i)return;let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=this._decipherInstance.update(new Uint8Array(t.buffer,t.byteOffset+r,o)):s=this._decipherInstance.update(t),s.length&&(o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._packetPos)),this._packetPos+=s.length),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(16-this._tagPos,i-r);if(r!==0||o!==i?this._tag.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._tagPos):this._tag.set(t,this._tagPos),r+=o,this._tagPos+=o,this._tagPos<16)return}{this._decipherInstance.setAuthTag(this._tag);let o=this._decipherInstance.final();o.length&&(this._packet?this._packet.set(o,this._packetPos):this._packet=o)}let n=this._packet?new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):xS;this.inSeqno=this.inSeqno+1>>>0,vS(this._decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tagPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},AE=class{static{a(this,"AESGCMDecipherBinding")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._instance=new wE(r.decipherInfo.sslName,r.decipherKey,r.decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenBytes<4){let o=Math.min(4-this._lenBytes,i-r);for(this._lenBytes+=o;o--;)this._len=(this._len<<8)+t[r++];if(this._lenBytes<4)return;if(this._len+20>bo||this._len<16||(this._len&15)!==0)throw new Error(`Bad packet length: ${this._len}`)}if(this._pktLen<this._len){if(r>=i)return;let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._pktLen)),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(16-this._tagPos,i-r);if(r!==0||o!==i?this._tag.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._tagPos):this._tag.set(t,this._tagPos),r+=o,this._tagPos+=o,this._tagPos<16)return}this._instance.decrypt(this._packet,this._len,this._tag);let n=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tagPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},bE=class{static{a(this,"GenericDecipherNative")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._decipherInstance=ep(r.decipherInfo.sslName,r.decipherKey,r.decipherIV),this._decipherInstance.setAutoPadding(!1),this._block=Buffer.allocUnsafe(r.macInfo.isETM?4:r.decipherInfo.blockLen),this._blockSize=r.decipherInfo.blockLen,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._mac=Buffer.allocUnsafe(r.macInfo.actualLen),this._macPos=0,this._macSSLName=r.macInfo.sslName,this._macKey=r.macKey,this._macActualLen=r.macInfo.actualLen,this._macETM=r.macInfo.isETM,this._macInstance=null;let i=r.decipherInfo.discardLen;if(i){let n=tp.get(i);n===void 0&&(n=Buffer.alloc(i),tp.set(i,n)),this._decipherInstance.update(n)}}free(){}decrypt(t,r,i){for(;r<i;){if(this._blockPos<this._block.length){let s=Math.min(this._block.length-this._blockPos,i-r);if(r!==0||s!==i||s<t.length?this._block.set(new Uint8Array(t.buffer,t.byteOffset+r,s),this._blockPos):this._block.set(t,this._blockPos),r+=s,this._blockPos+=s,this._blockPos<this._block.length)return;let c,u;if(this._macETM?this._len=u=du(this._block,0):(c=this._decipherInstance.update(this._block),this._len=du(c,0),u=4+this._len-this._blockSize),this._len>bo||this._len<5||(u&this._blockSize-1)!==0)throw new Error("Bad packet length");if(this._macInstance=sE(this._macSSLName,this._macKey),nn(Cs,this.inSeqno,0),this._macInstance.update(Cs),this._macETM?this._macInstance.update(this._block):(this._macInstance.update(new Uint8Array(c.buffer,c.byteOffset,4)),this._pktLen=c.length-4,this._packetPos=this._pktLen,this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(c.buffer,c.byteOffset+4,this._packetPos),0)),r>=i)return}if(this._pktLen<this._len){let s=Math.min(this._len-this._pktLen,i-r),c;r!==0||s!==i?c=new Uint8Array(t.buffer,t.byteOffset+r,s):c=t,this._macETM&&this._macInstance.update(c);let u=this._decipherInstance.update(c);if(u.length&&(s===this._len?this._packet=u:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(u,this._packetPos)),this._packetPos+=u.length),r+=s,this._pktLen+=s,this._pktLen<this._len||r>=i)return}{let s=Math.min(this._macActualLen-this._macPos,i-r);if(r!==0||s!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,s),this._macPos):this._mac.set(t,this._macPos),r+=s,this._macPos+=s,this._macPos<this._macActualLen)return}this._macETM||this._macInstance.update(this._packet);let n=this._macInstance.digest();if(this._macActualLen<n.length&&(n=new Uint8Array(n.buffer,n.byteOffset,this._macActualLen)),!g4(n,this._mac))throw new Error("Invalid MAC");let o=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._macPos=0,this._macInstance=null;{let s=this._onPayload(o);if(s!==void 0)return s===!1?r:s}}}},xE=class{static{a(this,"GenericDecipherBinding")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._instance=new TE(r.decipherInfo.sslName,r.decipherKey,r.decipherIV,r.macInfo.sslName,r.macKey,r.macInfo.isETM,r.macInfo.actualLen),this._block=Buffer.allocUnsafe(r.macInfo.isETM||r.decipherInfo.stream?4:r.decipherInfo.blockLen),this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(r.macInfo.actualLen),this._macPos=0,this._macActualLen=r.macInfo.actualLen,this._macETM=r.macInfo.isETM}free(){this._instance.free()}decrypt(t,r,i){for(;r<i;){if(this._blockPos<this._block.length){let o=Math.min(this._block.length-this._blockPos,i-r);if(r!==0||o!==i||o<t.length?this._block.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._blockPos):this._block.set(t,this._blockPos),r+=o,this._blockPos+=o,this._blockPos<this._block.length)return;let s;if(this._macETM?this._len=s=du(this._block,0):(this._instance.decryptBlock(this._block),this._len=du(this._block,0),s=4+this._len-this._block.length),this._len>bo||this._len<5||(s&this._block.length-1)!==0)throw new Error("Bad packet length");if(this._macETM||(this._pktLen=this._block.length-4,this._pktLen&&(this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(this._block.buffer,this._block.byteOffset+4,this._pktLen),0))),r>=i)return}if(this._pktLen<this._len){let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._pktLen)),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(this._macActualLen-this._macPos,i-r);if(r!==0||o!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._macPos):this._mac.set(t,this._macPos),r+=o,this._macPos+=o,this._macPos<this._macActualLen)return}this._instance.decrypt(this._packet,this.inSeqno,this._block,this._mac);let n=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._macPos=0,this._macInstance=null;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}};function vS(e){++e[11]>>>8&&++e[10]>>>8&&++e[9]>>>8&&++e[8]>>>8&&++e[7]>>>8&&++e[6]>>>8&&++e[5]>>>8&&++e[4]>>>8}a(vS,"ivIncrement");var h4=(()=>{let e=Buffer.alloc(4);return t=>(e[0]=t>>>24,e[1]=t>>>16,e[2]=t>>>8,e[3]=t,e)})();function g4(e,t){return e.length!==t.length?(aE(e,e),!1):aE(e,t)}a(g4,"timingSafeEquals");function m4(e){if(typeof e!="object"||e===null)throw new Error("Invalid config");if(typeof e.outbound!="object"||e.outbound===null)throw new Error("Invalid outbound");let t=e.outbound;if(typeof t.onWrite!="function")throw new Error("Invalid outbound.onWrite");if(typeof t.cipherInfo!="object"||t.cipherInfo===null)throw new Error("Invalid outbound.cipherInfo");if(!Buffer.isBuffer(t.cipherKey)||t.cipherKey.length!==t.cipherInfo.keyLen)throw new Error("Invalid outbound.cipherKey");if(t.cipherInfo.ivLen&&(!Buffer.isBuffer(t.cipherIV)||t.cipherIV.length!==t.cipherInfo.ivLen))throw new Error("Invalid outbound.cipherIV");if(typeof t.seqno!="number"||t.seqno<0||t.seqno>bS)throw new Error("Invalid outbound.seqno");let r=!!t.forceNative;switch(t.cipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return IE&&!r?new pE(e):new dE(e);case"chacha20":return vE&&!r?new fE(e):new lE(e);default:{if(typeof t.macInfo!="object"||t.macInfo===null)throw new Error("Invalid outbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw new Error("Invalid outbound.macKey");return SE&&!r?new gE(e):new hE(e)}}}a(m4,"createCipher");function _4(e){if(typeof e!="object"||e===null)throw new Error("Invalid config");if(typeof e.inbound!="object"||e.inbound===null)throw new Error("Invalid inbound");let t=e.inbound;if(typeof t.onPayload!="function")throw new Error("Invalid inbound.onPayload");if(typeof t.decipherInfo!="object"||t.decipherInfo===null)throw new Error("Invalid inbound.decipherInfo");if(!Buffer.isBuffer(t.decipherKey)||t.decipherKey.length!==t.decipherInfo.keyLen)throw new Error("Invalid inbound.decipherKey");if(t.decipherInfo.ivLen&&(!Buffer.isBuffer(t.decipherIV)||t.decipherIV.length!==t.decipherInfo.ivLen))throw new Error("Invalid inbound.decipherIV");if(typeof t.seqno!="number"||t.seqno<0||t.seqno>bS)throw new Error("Invalid inbound.seqno");let r=!!t.forceNative;switch(t.decipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return wE&&!r?new AE(e):new EE(e);case"chacha20":return PE&&!r?new yE(e):new _E(e);default:{if(typeof t.macInfo!="object"||t.macInfo===null)throw new Error("Invalid inbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw new Error("Invalid inbound.macKey");return TE&&!r?new xE(e):new bE(e)}}}a(_4,"createDecipher");SS.exports={CIPHER_INFO:d4,MAC_INFO:p4,bindingAvailable:!!cE,init:new Promise(async(e,t)=>{try{fu=await AS()(),pu=fu._malloc(16),kE=fu.cwrap("poly1305_auth",null,["number","array","number","array","number","array"])}catch(r){return t(r)}e()}),NullCipher:uE,createCipher:m4,NullDecipher:mE,createDecipher:_4}});var Ci=me((zQ,DS)=>{"use strict";var{createDecipheriv:RE,createECDH:y4,createHash:gu,createHmac:E4,createSign:A4,createVerify:b4,getCiphers:x4,sign:wS,verify:PS}=require("crypto"),I4=x4(),{Ber:Fe}=cu(),v4=eE().pbkdf,{CIPHER_INFO:mu}=Pi(),{eddsaSupported:OE,SUPPORTED_CIPHER:S4}=Jn(),{bufferSlice:xo,makeBufferParser:w4,readString:Le,readUInt32BE:hu,writeUInt32BE:br}=In(),ei=Symbol("Hash Algorithm"),vn=Symbol("Private key PEM"),$n=Symbol("Public key PEM"),ki=Symbol("Public key SSH"),Os=Symbol("Decrypted Key"),CE=Object.create(null);{let e=Object.keys(mu);for(let t=0;t<e.length;++t){let r=mu[e[t]].sslName;!r||CE[r]||(CE[r]=mu[e[t]])}}var rp=w4();function Sn(e,t){t=t.base64Slice(0,t.length);let r=t.replace(/.{64}/g,`$&
8
+ -----END PRIVATE KEY-----`,t=Buffer.from("a"),r,i;try{r=Xn.sign(null,t,e),i=Xn.verify(null,t,e,r)}catch{}return Buffer.isBuffer(r)&&r.length===64&&i===!0}return!1})(),Iv=typeof Xn.diffieHellman=="function"&&typeof Xn.generateKeyPairSync=="function"&&typeof Xn.createPublicKey=="function",Yd=["ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521","diffie-hellman-group-exchange-sha256","diffie-hellman-group14-sha256","diffie-hellman-group15-sha512","diffie-hellman-group16-sha512","diffie-hellman-group17-sha512","diffie-hellman-group18-sha512"];Iv&&(Yd.unshift("curve25519-sha256"),Yd.unshift("curve25519-sha256@libssh.org"));var b4=Yd.concat(["diffie-hellman-group-exchange-sha1","diffie-hellman-group14-sha1","diffie-hellman-group1-sha1"]),sE=["ecdsa-sha2-nistp256","ecdsa-sha2-nistp384","ecdsa-sha2-nistp521","rsa-sha2-512","rsa-sha2-256","ssh-rsa"];xv&&sE.unshift("ssh-ed25519");var x4=sE.concat(["ssh-dss"]),Sv=(()=>{let e=Xn.getCiphers();return t=>e.includes(E4[t].sslName)})(),wi=["aes128-gcm@openssh.com","aes256-gcm@openssh.com","aes128-ctr","aes192-ctr","aes256-ctr"];ks&&ks.flags&&!ks.flags.aes?bv?wi.unshift("chacha20-poly1305@openssh.com"):wi.push("chacha20-poly1305@openssh.com"):bv&&ks&&ks.arch==="x86"?wi.splice(4,0,"chacha20-poly1305@openssh.com"):wi.push("chacha20-poly1305@openssh.com");wi=wi.filter(Sv);var I4=wi.concat(["aes256-cbc","aes192-cbc","aes128-cbc","blowfish-cbc","3des-cbc","aes128-gcm","aes256-gcm","arcfour256","arcfour128","cast128-cbc","arcfour"].filter(Sv)),vv=(()=>{let e=Xn.getHashes();return t=>e.includes(A4[t].sslName)})(),wv=["hmac-sha2-256-etm@openssh.com","hmac-sha2-512-etm@openssh.com","hmac-sha1-etm@openssh.com","hmac-sha2-256","hmac-sha2-512","hmac-sha1"].filter(vv),S4=wv.concat(["hmac-md5","hmac-sha2-256-96","hmac-sha2-512-96","hmac-ripemd160","hmac-sha1-96","hmac-md5-96"].filter(vv)),Pv=["none","zlib@openssh.com","zlib"],v4=Pv.concat([]),Ts={BAD_DHGEX:1,OLD_EXIT:2,DYN_RPORT_BUG:4,BUG_DHGEX_LARGE:8,IMPLY_RSA_SHA2_SIGALGS:16};Xd.exports={MESSAGE:{DISCONNECT:1,IGNORE:2,UNIMPLEMENTED:3,DEBUG:4,SERVICE_REQUEST:5,SERVICE_ACCEPT:6,EXT_INFO:7,KEXINIT:20,NEWKEYS:21,KEXDH_INIT:30,KEXDH_REPLY:31,KEXDH_GEX_GROUP:31,KEXDH_GEX_INIT:32,KEXDH_GEX_REPLY:33,KEXDH_GEX_REQUEST:34,KEXECDH_INIT:30,KEXECDH_REPLY:31,USERAUTH_REQUEST:50,USERAUTH_FAILURE:51,USERAUTH_SUCCESS:52,USERAUTH_BANNER:53,USERAUTH_PASSWD_CHANGEREQ:60,USERAUTH_PK_OK:60,USERAUTH_INFO_REQUEST:60,USERAUTH_INFO_RESPONSE:61,GLOBAL_REQUEST:80,REQUEST_SUCCESS:81,REQUEST_FAILURE:82,CHANNEL_OPEN:90,CHANNEL_OPEN_CONFIRMATION:91,CHANNEL_OPEN_FAILURE:92,CHANNEL_WINDOW_ADJUST:93,CHANNEL_DATA:94,CHANNEL_EXTENDED_DATA:95,CHANNEL_EOF:96,CHANNEL_CLOSE:97,CHANNEL_REQUEST:98,CHANNEL_SUCCESS:99,CHANNEL_FAILURE:100},DISCONNECT_REASON:{HOST_NOT_ALLOWED_TO_CONNECT:1,PROTOCOL_ERROR:2,KEY_EXCHANGE_FAILED:3,RESERVED:4,MAC_ERROR:5,COMPRESSION_ERROR:6,SERVICE_NOT_AVAILABLE:7,PROTOCOL_VERSION_NOT_SUPPORTED:8,HOST_KEY_NOT_VERIFIABLE:9,CONNECTION_LOST:10,BY_APPLICATION:11,TOO_MANY_CONNECTIONS:12,AUTH_CANCELED_BY_USER:13,NO_MORE_AUTH_METHODS_AVAILABLE:14,ILLEGAL_USER_NAME:15},DISCONNECT_REASON_STR:void 0,CHANNEL_OPEN_FAILURE:{ADMINISTRATIVELY_PROHIBITED:1,CONNECT_FAILED:2,UNKNOWN_CHANNEL_TYPE:3,RESOURCE_SHORTAGE:4},TERMINAL_MODE:{TTY_OP_END:0,VINTR:1,VQUIT:2,VERASE:3,VKILL:4,VEOF:5,VEOL:6,VEOL2:7,VSTART:8,VSTOP:9,VSUSP:10,VDSUSP:11,VREPRINT:12,VWERASE:13,VLNEXT:14,VFLUSH:15,VSWTCH:16,VSTATUS:17,VDISCARD:18,IGNPAR:30,PARMRK:31,INPCK:32,ISTRIP:33,INLCR:34,IGNCR:35,ICRNL:36,IUCLC:37,IXON:38,IXANY:39,IXOFF:40,IMAXBEL:41,ISIG:50,ICANON:51,XCASE:52,ECHO:53,ECHOE:54,ECHOK:55,ECHONL:56,NOFLSH:57,TOSTOP:58,IEXTEN:59,ECHOCTL:60,ECHOKE:61,PENDIN:62,OPOST:70,OLCUC:71,ONLCR:72,OCRNL:73,ONOCR:74,ONLRET:75,CS7:90,CS8:91,PARENB:92,PARODD:93,TTY_OP_ISPEED:128,TTY_OP_OSPEED:129},CHANNEL_EXTENDED_DATATYPE:{STDERR:1},SIGNALS:["ABRT","ALRM","FPE","HUP","ILL","INT","QUIT","SEGV","TERM","USR1","USR2","KILL","PIPE"].reduce((e,t)=>({...e,[t]:1}),{}),COMPAT:Ts,COMPAT_CHECKS:[["Cisco-1.25",Ts.BAD_DHGEX],[/^Cisco-1[.]/,Ts.BUG_DHGEX_LARGE],[/^[0-9.]+$/,Ts.OLD_EXIT],[/^OpenSSH_5[.][0-9]+/,Ts.DYN_RPORT_BUG],[/^OpenSSH_7[.]4/,Ts.IMPLY_RSA_SHA2_SIGALGS]],DEFAULT_KEX:Yd,SUPPORTED_KEX:b4,DEFAULT_SERVER_HOST_KEY:sE,SUPPORTED_SERVER_HOST_KEY:x4,DEFAULT_CIPHER:wi,SUPPORTED_CIPHER:I4,DEFAULT_MAC:wv,SUPPORTED_MAC:S4,DEFAULT_COMPRESSION:Pv,SUPPORTED_COMPRESSION:v4,curve25519Supported:Iv,eddsaSupported:xv};Xd.exports.DISCONNECT_REASON_BY_VALUE=Array.from(Object.entries(Xd.exports.DISCONNECT_REASON)).reduce((e,[t,r])=>({...e,[r]:t}),{})});var Sn=me((KQ,Rv)=>{"use strict";var hn=uu().Ber,Jd,Cv=Buffer[Symbol.species],w4=Object.getPrototypeOf(Uint8Array.prototype).fill;function Tv(e,t){return e[t++]*16777216+e[t++]*65536+e[t++]*256+e[t]}a(Tv,"readUInt32BE");function lu(e,t,r,i,n){n||(n=0),i>e.length&&(i=e.length);let o=i-r,s=t.length-n;return o>s&&(o=s),t.set(new Uint8Array(e.buffer,e.byteOffset+r,o),n),o}a(lu,"bufferCopy");function fu(e,t,r){return r===void 0&&(r=e.length),new Cv(e.buffer,e.byteOffset+t,r-t)}a(fu,"bufferSlice");function cE(){let e=0,t,r={init:a((i,n)=>{t=i,e=typeof n=="number"?n:0},"init"),pos:a(()=>e,"pos"),length:a(()=>t?t.length:0,"length"),avail:a(()=>t&&e<t.length?t.length-e:0,"avail"),clear:a(()=>{t=void 0},"clear"),readUInt32BE:a(()=>{if(!(!t||e+3>=t.length))return t[e++]*16777216+t[e++]*65536+t[e++]*256+t[e++]},"readUInt32BE"),readUInt64BE:a(i=>{if(!(!t||e+7>=t.length))switch(i){case"always":return BigInt(`0x${t.hexSlice(e,e+=8)}`);case"maybe":if(t[e]>31)return BigInt(`0x${t.hexSlice(e,e+=8)}`);default:return t[e++]*72057594037927940+t[e++]*281474976710656+t[e++]*1099511627776+t[e++]*4294967296+t[e++]*16777216+t[e++]*65536+t[e++]*256+t[e++]}},"readUInt64BE"),skip:a(i=>{t&&i>0&&(e+=i)},"skip"),skipString:a(()=>{let i=r.readUInt32BE();if(i!==void 0)return e+=i,e<=t.length?i:void 0},"skipString"),readByte:a(()=>{if(t&&e<t.length)return t[e++]},"readByte"),readBool:a(()=>{if(t&&e<t.length)return!!t[e++]},"readBool"),readList:a(()=>{let i=r.readString(!0);if(i!==void 0)return i?i.split(","):[]},"readList"),readString:a((i,n)=>{typeof i=="number"&&(n=i,i=void 0);let o=r.readUInt32BE();if(o!==void 0&&!(t.length-e<o||typeof n=="number"&&o>n))return i?Buffer.isBuffer(i)?lu(t,i,e,e+=o):t.utf8Slice(e,e+=o):fu(t,e,e+=o)},"readString"),readRaw:a(i=>{if(t){if(typeof i!="number")return fu(t,e,e+=t.length-e);if(t.length-e>=i)return fu(t,e,e+=i)}},"readRaw")};return r}a(cE,"makeBufferParser");function kv(e,t,r){let i=new Error(e);return typeof t=="boolean"?(r=t,i.level="protocol"):i.level=t||"protocol",i.fatal=!!r,i}a(kv,"makeError");function aE(e,t,r){return e[r++]=t>>>24,e[r++]=t>>>16,e[r++]=t>>>8,e[r++]=t,r}a(aE,"writeUInt32BE");var ep=cE();Rv.exports={bufferCopy:lu,bufferSlice:fu,FastBuffer:Cv,bufferFill:a((e,t,r,i)=>w4.call(e,t,r,i),"bufferFill"),makeError:kv,doFatalError:a((e,t,r,i)=>{let n;return Jd===void 0&&({DISCONNECT_REASON:Jd}=Jn()),t instanceof Error?(n=t,typeof r!="number"?i=Jd.PROTOCOL_ERROR:i=r):n=kv(t,r,!0),typeof i!="number"&&(i=Jd.PROTOCOL_ERROR),e.disconnect(i),e._destruct(),e._onError(n),1/0},"doFatalError"),readUInt32BE:Tv,writeUInt32BE:aE,writeUInt32LE:a((e,t,r)=>(e[r++]=t,e[r++]=t>>>8,e[r++]=t>>>16,e[r++]=t>>>24,r),"writeUInt32LE"),makeBufferParser:cE,bufferParser:cE(),readString:a((e,t,r,i)=>{typeof r=="number"&&(i=r,r=void 0),t===void 0&&(t=0);let n=e.length-t;if(t<0||t>=e.length||n<4)return;let o=Tv(e,t);if(n<4+o||typeof i=="number"&&o>i)return;t+=4;let s=t+o;return e._pos=s,r?Buffer.isBuffer(r)?lu(e,r,t,s):e.utf8Slice(t,s):fu(e,t,s)},"readString"),sigSSHToASN1:a((e,t)=>{switch(t){case"ssh-dss":{if(e.length>40)return e;let r=new hn.Writer;r.startSequence();let i=e.slice(0,20),n=e.slice(20);if(i[0]&128){let o=Buffer.allocUnsafe(21);o[0]=0,i.copy(o,1),i=o}else i[0]===0&&!(i[1]&128)&&(i=i.slice(1));if(n[0]&128){let o=Buffer.allocUnsafe(21);o[0]=0,n.copy(o,1),n=o}else n[0]===0&&!(n[1]&128)&&(n=n.slice(1));return r.writeBuffer(i,hn.Integer),r.writeBuffer(n,hn.Integer),r.endSequence(),r.buffer}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{ep.init(e,0);let r=ep.readString(),i=ep.readString();if(ep.clear(),r===void 0||i===void 0)return;let n=new hn.Writer;return n.startSequence(),n.writeBuffer(r,hn.Integer),n.writeBuffer(i,hn.Integer),n.endSequence(),n.buffer}default:return e}},"sigSSHToASN1"),convertSignature:a((e,t)=>{switch(t){case"ssh-dss":{if(e.length<=40)return e;let r=new hn.Reader(e);r.readSequence();let i=r.readString(hn.Integer,!0),n=r.readString(hn.Integer,!0),o=0,s=0;if(i.length<20){let u=Buffer.allocUnsafe(20);u.set(i,1),i=u,i[0]=0}if(n.length<20){let u=Buffer.allocUnsafe(20);u.set(n,1),n=u,n[0]=0}i.length>20&&i[0]===0&&(o=1),n.length>20&&n[0]===0&&(s=1);let c=Buffer.allocUnsafe(i.length-o+(n.length-s));return lu(i,c,o,i.length,0),lu(n,c,s,n.length,i.length-o),c}case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":{if(e[0]===0)return e;let r=new hn.Reader(e);r.readSequence();let i=r.readString(hn.Integer,!0),n=r.readString(hn.Integer,!0);if(i===null||n===null)return;let o=Buffer.allocUnsafe(4+i.length+4+n.length);return aE(o,i.length,0),o.set(i,4),aE(o,n.length,4+i.length),o.set(n,8+i.length),o}}return e},"convertSignature"),sendPacket:a((e,t,r)=>!r&&e._kexinit!==void 0?(e._queue===void 0&&(e._queue=[]),e._queue.push(t),e._debug&&e._debug("Outbound: ... packet queued"),!1):(e._cipher.encrypt(t),!0),"sendPacket")}});var Ov=me((tp,lE)=>{var uE=(function(){var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(e=e||__filename),(function(t){t=t||{};var r;r||(r=typeof t<"u"?t:{});var i,n;r.ready=new Promise(function(ie,Ee){i=ie,n=Ee});var o={},s;for(s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);var c=typeof window=="object",u=typeof importScripts=="function",l=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",f="",p,g,h,_,y;l?(f=u?require("path").dirname(f)+"/":__dirname+"/",p=a(function(ie,Ee){var Re=Hr(ie);return Re?Ee?Re:Re.toString():(_||(_=require("fs")),y||(y=require("path")),ie=y.normalize(ie),_.readFileSync(ie,Ee?null:"utf8"))},"C"),h=a(function(ie){return ie=p(ie,!0),ie.buffer||(ie=new Uint8Array(ie)),J(ie.buffer),ie},"E"),g=a(function(ie,Ee,Re){var je=Hr(ie);je&&Ee(je),_||(_=require("fs")),y||(y=require("path")),ie=y.normalize(ie),_.readFile(ie,function(gt,lr){gt?Re(gt):Ee(lr.buffer)})},"D"),1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),r.inspect=function(){return"[Emscripten Module object]"}):(c||u)&&(u?f=self.location.href:typeof document<"u"&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f.indexOf("blob:")!==0?f=f.substr(0,f.lastIndexOf("/")+1):f="",p=a(function(ie){try{var Ee=new XMLHttpRequest;return Ee.open("GET",ie,!1),Ee.send(null),Ee.responseText}catch(gt){if(ie=Hr(ie)){Ee=[];for(var Re=0;Re<ie.length;Re++){var je=ie[Re];255<je&&(Dr&&J(!1,"Character code "+je+" ("+String.fromCharCode(je)+") at offset "+Re+" not in 0x00-0xFF."),je&=255),Ee.push(String.fromCharCode(je))}return Ee.join("")}throw gt}},"C"),u&&(h=a(function(ie){try{var Ee=new XMLHttpRequest;return Ee.open("GET",ie,!1),Ee.responseType="arraybuffer",Ee.send(null),new Uint8Array(Ee.response)}catch(Re){if(ie=Hr(ie))return ie;throw Re}},"E")),g=a(function(ie,Ee,Re){var je=new XMLHttpRequest;je.open("GET",ie,!0),je.responseType="arraybuffer",je.onload=function(){if(je.status==200||je.status==0&&je.response)Ee(je.response);else{var gt=Hr(ie);gt?Ee(gt.buffer):Re()}},je.onerror=Re,je.send(null)},"D")),r.print||console.log.bind(console);var b=r.printErr||console.warn.bind(console);for(s in o)o.hasOwnProperty(s)&&(r[s]=o[s]);o=null;var S;r.wasmBinary&&(S=r.wasmBinary);var v=r.noExitRuntime||!0;typeof WebAssembly!="object"&&re("no native wasm support detected");var M,R=!1;function J(ie,Ee){ie||re("Assertion failed: "+Ee)}a(J,"assert");function te(ie){var Ee=r["_"+ie];return J(Ee,"Cannot call unknown function "+ie+", make sure it is exported"),Ee}a(te,"N");function ee(ie,Ee,Re,je){var gt={string:a(function(kt){var _r=0;if(kt!=null&&kt!==0){var hr=(kt.length<<2)+1;_r=Ys(hr);var er=_r,zt=U;if(0<hr){hr=er+hr-1;for(var an=0;an<kt.length;++an){var tr=kt.charCodeAt(an);if(55296<=tr&&57343>=tr){var Hi=kt.charCodeAt(++an);tr=65536+((tr&1023)<<10)|Hi&1023}if(127>=tr){if(er>=hr)break;zt[er++]=tr}else{if(2047>=tr){if(er+1>=hr)break;zt[er++]=192|tr>>6}else{if(65535>=tr){if(er+2>=hr)break;zt[er++]=224|tr>>12}else{if(er+3>=hr)break;zt[er++]=240|tr>>18,zt[er++]=128|tr>>12&63}zt[er++]=128|tr>>6&63}zt[er++]=128|tr&63}}zt[er]=0}}return _r},"string"),array:a(function(kt){var _r=Ys(kt.length);return H.set(kt,_r),_r},"array")},lr=te(ie),kn=[];if(ie=0,je)for(var Yr=0;Yr<je.length;Yr++){var Bo=gt[Re[Yr]];Bo?(ie===0&&(ie=Ks()),kn[Yr]=Bo(je[Yr])):kn[Yr]=je[Yr]}return Re=lr.apply(null,kn),Re=(function(kt){if(Ee==="string")if(kt){for(var _r=U,hr=kt+NaN,er=kt;_r[er]&&!(er>=hr);)++er;if(16<er-kt&&_r.subarray&&P)kt=P.decode(_r.subarray(kt,er));else{for(hr="";kt<er;){var zt=_r[kt++];if(zt&128){var an=_r[kt++]&63;if((zt&224)==192)hr+=String.fromCharCode((zt&31)<<6|an);else{var tr=_r[kt++]&63;zt=(zt&240)==224?(zt&15)<<12|an<<6|tr:(zt&7)<<18|an<<12|tr<<6|_r[kt++]&63,65536>zt?hr+=String.fromCharCode(zt):(zt-=65536,hr+=String.fromCharCode(55296|zt>>10,56320|zt&1023))}}else hr+=String.fromCharCode(zt)}kt=hr}}else kt="";else kt=Ee==="boolean"?!!kt:kt;return kt})(Re),ie!==0&&Yu(ie),Re}a(ee,"ca");var P=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,C,H,U;function k(){var ie=M.buffer;C=ie,r.HEAP8=H=new Int8Array(ie),r.HEAP16=new Int16Array(ie),r.HEAP32=new Int32Array(ie),r.HEAPU8=U=new Uint8Array(ie),r.HEAPU16=new Uint16Array(ie),r.HEAPU32=new Uint32Array(ie),r.HEAPF32=new Float32Array(ie),r.HEAPF64=new Float64Array(ie)}a(k,"ia");var j,W=[],L=[],X=[];function ne(){var ie=r.preRun.shift();W.unshift(ie)}a(ne,"ma");var O=0,q=null,V=null;r.preloadedImages={},r.preloadedAudios={};function re(ie){throw r.onAbort&&r.onAbort(ie),b(ie),R=!0,ie=new WebAssembly.RuntimeError("abort("+ie+"). Build with -s ASSERTIONS=1 for more info."),n(ie),ie}a(re,"K");var _e="data:application/octet-stream;base64,",Se;if(Se="data:application/octet-stream;base64,AGFzbQEAAAABIAZgAX8Bf2ADf39/AGABfwBgAABgAAF/YAZ/f39/f38AAgcBAWEBYQAAAwsKAAEDAQAAAgQFAgQFAXABAQEFBwEBgAKAgAIGCQF/AUGAjMACCwclCQFiAgABYwADAWQACQFlAAgBZgAHAWcABgFoAAUBaQAKAWoBAAqGTQpPAQJ/QYAIKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQAEUNAQtBgAggADYCACABDwtBhAhBMDYCAEF/C4wFAg5+Cn8gACgCJCEUIAAoAiAhFSAAKAIcIREgACgCGCESIAAoAhQhEyACQRBPBEAgAC0ATEVBGHQhFyAAKAIEIhZBBWytIQ8gACgCCCIYQQVsrSENIAAoAgwiGUEFbK0hCyAAKAIQIhpBBWytIQkgADUCACEIIBqtIRAgGa0hDiAYrSEMIBatIQoDQCASIAEtAAMiEiABLQAEQQh0ciABLQAFQRB0ciABLQAGIhZBGHRyQQJ2Qf///x9xaq0iAyAOfiABLwAAIAEtAAJBEHRyIBNqIBJBGHRBgICAGHFqrSIEIBB+fCARIAEtAAdBCHQgFnIgAS0ACEEQdHIgAS0ACSIRQRh0ckEEdkH///8fcWqtIgUgDH58IAEtAApBCHQgEXIgAS0AC0EQdHIgAS0ADEEYdHJBBnYgFWqtIgYgCn58IBQgF2ogAS8ADSABLQAPQRB0cmqtIgcgCH58IAMgDH4gBCAOfnwgBSAKfnwgBiAIfnwgByAJfnwgAyAKfiAEIAx+fCAFIAh+fCAGIAl+fCAHIAt+fCADIAh+IAQgCn58IAUgCX58IAYgC358IAcgDX58IAMgCX4gBCAIfnwgBSALfnwgBiANfnwgByAPfnwiA0IaiEL/////D4N8IgRCGohC/////w+DfCIFQhqIQv////8Pg3wiBkIaiEL/////D4N8IgdCGoinQQVsIAOnQf///x9xaiITQRp2IASnQf///x9xaiESIAWnQf///x9xIREgBqdB////H3EhFSAHp0H///8fcSEUIBNB////H3EhEyABQRBqIQEgAkEQayICQQ9LDQALCyAAIBQ2AiQgACAVNgIgIAAgETYCHCAAIBI2AhggACATNgIUCwMAAQu2BAEGfwJAIAAoAjgiBARAIABBPGohBQJAIAJBECAEayIDIAIgA0kbIgZFDQAgBkEDcSEHAkAgBkEBa0EDSQRAQQAhAwwBCyAGQXxxIQhBACEDA0AgBSADIARqaiABIANqLQAAOgAAIAUgA0EBciIEIAAoAjhqaiABIARqLQAAOgAAIAUgA0ECciIEIAAoAjhqaiABIARqLQAAOgAAIAUgA0EDciIEIAAoAjhqaiABIARqLQAAOgAAIANBBGohAyAAKAI4IQQgCEEEayIIDQALCyAHRQ0AA0AgBSADIARqaiABIANqLQAAOgAAIANBAWohAyAAKAI4IQQgB0EBayIHDQALCyAAIAQgBmoiAzYCOCADQRBJDQEgACAFQRAQAiAAQQA2AjggAiAGayECIAEgBmohAQsgAkEQTwRAIAAgASACQXBxIgMQAiACQQ9xIQIgASADaiEBCyACRQ0AIAJBA3EhBCAAQTxqIQVBACEDIAJBAWtBA08EQCACQXxxIQcDQCAFIAAoAjggA2pqIAEgA2otAAA6AAAgBSADQQFyIgYgACgCOGpqIAEgBmotAAA6AAAgBSADQQJyIgYgACgCOGpqIAEgBmotAAA6AAAgBSADQQNyIgYgACgCOGpqIAEgBmotAAA6AAAgA0EEaiEDIAdBBGsiBw0ACwsgBARAA0AgBSAAKAI4IANqaiABIANqLQAAOgAAIANBAWohAyAEQQFrIgQNAAsLIAAgACgCOCACajYCOAsLoS0BDH8jAEEQayIMJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEGICCgCACIFQRAgAEELakF4cSAAQQtJGyIIQQN2IgJ2IgFBA3EEQCABQX9zQQFxIAJqIgNBA3QiAUG4CGooAgAiBEEIaiEAAkAgBCgCCCICIAFBsAhqIgFGBEBBiAggBUF+IAN3cTYCAAwBCyACIAE2AgwgASACNgIICyAEIANBA3QiAUEDcjYCBCABIARqIgEgASgCBEEBcjYCBAwNCyAIQZAIKAIAIgpNDQEgAQRAAkBBAiACdCIAQQAgAGtyIAEgAnRxIgBBACAAa3FBAWsiACAAQQx2QRBxIgJ2IgFBBXZBCHEiACACciABIAB2IgFBAnZBBHEiAHIgASAAdiIBQQF2QQJxIgByIAEgAHYiAUEBdkEBcSIAciABIAB2aiIDQQN0IgBBuAhqKAIAIgQoAggiASAAQbAIaiIARgRAQYgIIAVBfiADd3EiBTYCAAwBCyABIAA2AgwgACABNgIICyAEQQhqIQAgBCAIQQNyNgIEIAQgCGoiAiADQQN0IgEgCGsiA0EBcjYCBCABIARqIAM2AgAgCgRAIApBA3YiAUEDdEGwCGohB0GcCCgCACEEAn8gBUEBIAF0IgFxRQRAQYgIIAEgBXI2AgAgBwwBCyAHKAIICyEBIAcgBDYCCCABIAQ2AgwgBCAHNgIMIAQgATYCCAtBnAggAjYCAEGQCCADNgIADA0LQYwIKAIAIgZFDQEgBkEAIAZrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqQQJ0QbgKaigCACIBKAIEQXhxIAhrIQMgASECA0ACQCACKAIQIgBFBEAgAigCFCIARQ0BCyAAKAIEQXhxIAhrIgIgAyACIANJIgIbIQMgACABIAIbIQEgACECDAELCyABIAhqIgkgAU0NAiABKAIYIQsgASABKAIMIgRHBEAgASgCCCIAQZgIKAIASRogACAENgIMIAQgADYCCAwMCyABQRRqIgIoAgAiAEUEQCABKAIQIgBFDQQgAUEQaiECCwNAIAIhByAAIgRBFGoiAigCACIADQAgBEEQaiECIAQoAhAiAA0ACyAHQQA2AgAMCwtBfyEIIABBv39LDQAgAEELaiIAQXhxIQhBjAgoAgAiCUUNAEEAIAhrIQMCQAJAAkACf0EAIAhBgAJJDQAaQR8gCEH///8HSw0AGiAAQQh2IgAgAEGA/j9qQRB2QQhxIgJ0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgAnIgAHJrIgBBAXQgCCAAQRVqdkEBcXJBHGoLIgVBAnRBuApqKAIAIgJFBEBBACEADAELQQAhACAIQQBBGSAFQQF2ayAFQR9GG3QhAQNAAkAgAigCBEF4cSAIayIHIANPDQAgAiEEIAciAw0AQQAhAyACIQAMAwsgACACKAIUIgcgByACIAFBHXZBBHFqKAIQIgJGGyAAIAcbIQAgAUEBdCEBIAINAAsLIAAgBHJFBEBBACEEQQIgBXQiAEEAIABrciAJcSIARQ0DIABBACAAa3FBAWsiACAAQQx2QRBxIgJ2IgFBBXZBCHEiACACciABIAB2IgFBAnZBBHEiAHIgASAAdiIBQQF2QQJxIgByIAEgAHYiAUEBdkEBcSIAciABIAB2akECdEG4CmooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIAhrIgEgA0khAiABIAMgAhshAyAAIAQgAhshBCAAKAIQIgEEfyABBSAAKAIUCyIADQALCyAERQ0AIANBkAgoAgAgCGtPDQAgBCAIaiIGIARNDQEgBCgCGCEFIAQgBCgCDCIBRwRAIAQoAggiAEGYCCgCAEkaIAAgATYCDCABIAA2AggMCgsgBEEUaiICKAIAIgBFBEAgBCgCECIARQ0EIARBEGohAgsDQCACIQcgACIBQRRqIgIoAgAiAA0AIAFBEGohAiABKAIQIgANAAsgB0EANgIADAkLIAhBkAgoAgAiAk0EQEGcCCgCACEDAkAgAiAIayIBQRBPBEBBkAggATYCAEGcCCADIAhqIgA2AgAgACABQQFyNgIEIAIgA2ogATYCACADIAhBA3I2AgQMAQtBnAhBADYCAEGQCEEANgIAIAMgAkEDcjYCBCACIANqIgAgACgCBEEBcjYCBAsgA0EIaiEADAsLIAhBlAgoAgAiBkkEQEGUCCAGIAhrIgE2AgBBoAhBoAgoAgAiAiAIaiIANgIAIAAgAUEBcjYCBCACIAhBA3I2AgQgAkEIaiEADAsLQQAhACAIQS9qIgkCf0HgCygCAARAQegLKAIADAELQewLQn83AgBB5AtCgKCAgICABDcCAEHgCyAMQQxqQXBxQdiq1aoFczYCAEH0C0EANgIAQcQLQQA2AgBBgCALIgFqIgVBACABayIHcSICIAhNDQpBwAsoAgAiBARAQbgLKAIAIgMgAmoiASADTQ0LIAEgBEsNCwtBxAstAABBBHENBQJAAkBBoAgoAgAiAwRAQcgLIQADQCADIAAoAgAiAU8EQCABIAAoAgRqIANLDQMLIAAoAggiAA0ACwtBABABIgFBf0YNBiACIQVB5AsoAgAiA0EBayIAIAFxBEAgAiABayAAIAFqQQAgA2txaiEFCyAFIAhNDQYgBUH+////B0sNBkHACygCACIEBEBBuAsoAgAiAyAFaiIAIANNDQcgACAESw0HCyAFEAEiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFEAEiASAAKAIAIAAoAgRqRg0EIAEhAAsCQCAAQX9GDQAgCEEwaiAFTQ0AQegLKAIAIgEgCSAFa2pBACABa3EiAUH+////B0sEQCAAIQEMCAsgARABQX9HBEAgASAFaiEFIAAhAQwIC0EAIAVrEAEaDAULIAAiAUF/Rw0GDAQLAAtBACEEDAcLQQAhAQwFCyABQX9HDQILQcQLQcQLKAIAQQRyNgIACyACQf7///8HSw0BIAIQASEBQQAQASEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0G4C0G4CygCACAFaiIANgIAQbwLKAIAIABJBEBBvAsgADYCAAsCQAJAAkBBoAgoAgAiBwRAQcgLIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0GYCCgCACIAQQAgACABTRtFBEBBmAggATYCAAtBACEAQcwLIAU2AgBByAsgATYCAEGoCEF/NgIAQawIQeALKAIANgIAQdQLQQA2AgADQCAAQQN0IgNBuAhqIANBsAhqIgI2AgAgA0G8CGogAjYCACAAQQFqIgBBIEcNAAtBlAggBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQaAIIAAgAWoiADYCACAAIAJBAXI2AgQgASADakEoNgIEQaQIQfALKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEGgCCAHQXggB2tBB3FBACAHQQhqQQdxGyIAaiICNgIAQZQIQZQIKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQaQIQfALKAIANgIADAELQZgIKAIAIAFLBEBBmAggATYCAAsgASAFaiECQcgLIQACQAJAAkACQAJAAkADQCACIAAoAgBHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQELQcgLIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBoAggBjYCAEGUCEGUCCgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQZwIKAIARgRAQZwIIAY2AgBBkAhBkAgoAgAgAmoiADYCACAGIABBAXI2AgQgACAGaiAANgIADAMLIAUoAgQiAEEDcUEBRgRAIABBeHEhBwJAIABB/wFNBEAgBSgCCCIDIABBA3YiAEEDdEGwCGpGGiADIAUoAgwiAUYEQEGICEGICCgCAEF+IAB3cTYCAAwCCyADIAE2AgwgASADNgIIDAELIAUoAhghCAJAIAUgBSgCDCIBRwRAIAUoAggiACABNgIMIAEgADYCCAwBCwJAIAVBFGoiACgCACIDDQAgBUEQaiIAKAIAIgMNAEEAIQEMAQsDQCAAIQQgAyIBQRRqIgAoAgAiAw0AIAFBEGohACABKAIQIgMNAAsgBEEANgIACyAIRQ0AAkAgBSAFKAIcIgNBAnRBuApqIgAoAgBGBEAgACABNgIAIAENAUGMCEGMCCgCAEF+IAN3cTYCAAwCCyAIQRBBFCAIKAIQIAVGG2ogATYCACABRQ0BCyABIAg2AhggBSgCECIABEAgASAANgIQIAAgATYCGAsgBSgCFCIARQ0AIAEgADYCFCAAIAE2AhgLIAUgB2ohBSACIAdqIQILIAUgBSgCBEF+cTYCBCAGIAJBAXI2AgQgAiAGaiACNgIAIAJB/wFNBEAgAkEDdiIAQQN0QbAIaiECAn9BiAgoAgAiAUEBIAB0IgBxRQRAQYgIIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwDC0EfIQAgAkH///8HTQRAIAJBCHYiACAAQYD+P2pBEHZBCHEiA3QiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASADciAAcmsiAEEBdCACIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRBuApqIQQCQEGMCCgCACIDQQEgAHQiAXFFBEBBjAggASADcjYCACAEIAY2AgAgBiAENgIYDAELIAJBAEEZIABBAXZrIABBH0YbdCEAIAQoAgAhAQNAIAEiAygCBEF4cSACRg0DIABBHXYhASAAQQF0IQAgAyABQQRxaiIEKAIQIgENAAsgBCAGNgIQIAYgAzYCGAsgBiAGNgIMIAYgBjYCCAwCC0GUCCAFQShrIgNBeCABa0EHcUEAIAFBCGpBB3EbIgBrIgI2AgBBoAggACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRBpAhB8AsoAgA2AgAgByAEQScgBGtBB3FBACAEQSdrQQdxG2pBL2siACAAIAdBEGpJGyICQRs2AgQgAkHQCykCADcCECACQcgLKQIANwIIQdALIAJBCGo2AgBBzAsgBTYCAEHICyABNgIAQdQLQQA2AgAgAkEYaiEAA0AgAEEHNgIEIABBCGohASAAQQRqIQAgASAESQ0ACyACIAdGDQMgAiACKAIEQX5xNgIEIAcgAiAHayIEQQFyNgIEIAIgBDYCACAEQf8BTQRAIARBA3YiAEEDdEGwCGohAgJ/QYgIKAIAIgFBASAAdCIAcUUEQEGICCAAIAFyNgIAIAIMAQsgAigCCAshACACIAc2AgggACAHNgIMIAcgAjYCDCAHIAA2AggMBAtBHyEAIAdCADcCECAEQf///wdNBEAgBEEIdiIAIABBgP4/akEQdkEIcSICdCIAIABBgOAfakEQdkEEcSIBdCIAIABBgIAPakEQdkECcSIAdEEPdiABIAJyIAByayIAQQF0IAQgAEEVanZBAXFyQRxqIQALIAcgADYCHCAAQQJ0QbgKaiEDAkBBjAgoAgAiAkEBIAB0IgFxRQRAQYwIIAEgAnI2AgAgAyAHNgIAIAcgAzYCGAwBCyAEQQBBGSAAQQF2ayAAQR9GG3QhACADKAIAIQEDQCABIgIoAgRBeHEgBEYNBCAAQR12IQEgAEEBdCEAIAIgAUEEcWoiAygCECIBDQALIAMgBzYCECAHIAI2AhgLIAcgBzYCDCAHIAc2AggMAwsgAygCCCIAIAY2AgwgAyAGNgIIIAZBADYCGCAGIAM2AgwgBiAANgIICyAJQQhqIQAMBQsgAigCCCIAIAc2AgwgAiAHNgIIIAdBADYCGCAHIAI2AgwgByAANgIIC0GUCCgCACIAIAhNDQBBlAggACAIayIBNgIAQaAIQaAIKAIAIgIgCGoiADYCACAAIAFBAXI2AgQgAiAIQQNyNgIEIAJBCGohAAwDC0GECEEwNgIAQQAhAAwCCwJAIAVFDQACQCAEKAIcIgJBAnRBuApqIgAoAgAgBEYEQCAAIAE2AgAgAQ0BQYwIIAlBfiACd3EiCTYCAAwCCyAFQRBBFCAFKAIQIARGG2ogATYCACABRQ0BCyABIAU2AhggBCgCECIABEAgASAANgIQIAAgATYCGAsgBCgCFCIARQ0AIAEgADYCFCAAIAE2AhgLAkAgA0EPTQRAIAQgAyAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEDAELIAQgCEEDcjYCBCAGIANBAXI2AgQgAyAGaiADNgIAIANB/wFNBEAgA0EDdiIAQQN0QbAIaiECAn9BiAgoAgAiAUEBIAB0IgBxRQRAQYgIIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwBC0EfIQAgA0H///8HTQRAIANBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCADIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRBuApqIQICQAJAIAlBASAAdCIBcUUEQEGMCCABIAlyNgIAIAIgBjYCACAGIAI2AhgMAQsgA0EAQRkgAEEBdmsgAEEfRht0IQAgAigCACEIA0AgCCIBKAIEQXhxIANGDQIgAEEddiECIABBAXQhACABIAJBBHFqIgIoAhAiCA0ACyACIAY2AhAgBiABNgIYCyAGIAY2AgwgBiAGNgIIDAELIAEoAggiACAGNgIMIAEgBjYCCCAGQQA2AhggBiABNgIMIAYgADYCCAsgBEEIaiEADAELAkAgC0UNAAJAIAEoAhwiAkECdEG4CmoiACgCACABRgRAIAAgBDYCACAEDQFBjAggBkF+IAJ3cTYCAAwCCyALQRBBFCALKAIQIAFGG2ogBDYCACAERQ0BCyAEIAs2AhggASgCECIABEAgBCAANgIQIAAgBDYCGAsgASgCFCIARQ0AIAQgADYCFCAAIAQ2AhgLAkAgA0EPTQRAIAEgAyAIaiIAQQNyNgIEIAAgAWoiACAAKAIEQQFyNgIEDAELIAEgCEEDcjYCBCAJIANBAXI2AgQgAyAJaiADNgIAIAoEQCAKQQN2IgBBA3RBsAhqIQRBnAgoAgAhAgJ/QQEgAHQiACAFcUUEQEGICCAAIAVyNgIAIAQMAQsgBCgCCAshACAEIAI2AgggACACNgIMIAIgBDYCDCACIAA2AggLQZwIIAk2AgBBkAggAzYCAAsgAUEIaiEACyAMQRBqJAAgAAsQACMAIABrQXBxIgAkACAACwYAIAAkAAsEACMAC4AJAgh/BH4jAEGQAWsiBiQAIAYgBS0AA0EYdEGAgIAYcSAFLwAAIAUtAAJBEHRycjYCACAGIAUoAANBAnZBg/7/H3E2AgQgBiAFKAAGQQR2Qf+B/x9xNgIIIAYgBSgACUEGdkH//8AfcTYCDCAFLwANIQggBS0ADyEJIAZCADcCFCAGQgA3AhwgBkEANgIkIAYgCCAJQRB0QYCAPHFyNgIQIAYgBSgAEDYCKCAGIAUoABQ2AiwgBiAFKAAYNgIwIAUoABwhBSAGQQA6AEwgBkEANgI4IAYgBTYCNCAGIAEgAhAEIAQEQCAGIAMgBBAECyAGKAI4IgEEQCAGQTxqIgIgAWpBAToAACABQQFqQQ9NBEAgASAGakE9aiEEAkBBDyABayIDRQ0AIAMgBGoiAUEBa0EAOgAAIARBADoAACADQQNJDQAgAUECa0EAOgAAIARBADoAASABQQNrQQA6AAAgBEEAOgACIANBB0kNACABQQRrQQA6AAAgBEEAOgADIANBCUkNACAEQQAgBGtBA3EiAWoiBEEANgIAIAQgAyABa0F8cSIBaiIDQQRrQQA2AgAgAUEJSQ0AIARBADYCCCAEQQA2AgQgA0EIa0EANgIAIANBDGtBADYCACABQRlJDQAgBEEANgIYIARBADYCFCAEQQA2AhAgBEEANgIMIANBEGtBADYCACADQRRrQQA2AgAgA0EYa0EANgIAIANBHGtBADYCACABIARBBHFBGHIiAWsiA0EgSQ0AIAEgBGohAQNAIAFCADcDGCABQgA3AxAgAUIANwMIIAFCADcDACABQSBqIQEgA0EgayIDQR9LDQALCwsgBkEBOgBMIAYgAkEQEAILIAY1AjQhECAGNQIwIREgBjUCLCEOIAAgBjUCKCAGKAIkIAYoAiAgBigCHCAGKAIYIgNBGnZqIgJBGnZqIgFBGnZqIgtBgICAYHIgAUH///8fcSINIAJB////H3EiCCAGKAIUIAtBGnZBBWxqIgFB////H3EiCUEFaiIFQRp2IANB////H3EgAUEadmoiA2oiAUEadmoiAkEadmoiBEEadmoiDEEfdSIHIANxIAEgDEEfdkEBayIDQf///x9xIgpxciIBQRp0IAUgCnEgByAJcXJyrXwiDzwAACAAIA9CGIg8AAMgACAPQhCIPAACIAAgD0IIiDwAASAAIA4gByAIcSACIApxciICQRR0IAFBBnZyrXwgD0IgiHwiDjwABCAAIA5CGIg8AAcgACAOQhCIPAAGIAAgDkIIiDwABSAAIBEgByANcSAEIApxciIBQQ50IAJBDHZyrXwgDkIgiHwiDjwACCAAIA5CGIg8AAsgACAOQhCIPAAKIAAgDkIIiDwACSAAIBAgAyAMcSAHIAtxckEIdCABQRJ2cq18IA5CIIh8Ig48AAwgACAOQhiIPAAPIAAgDkIQiDwADiAAIA5CCIg8AA0gBkIANwIwIAZCADcCKCAGQgA3AiAgBkIANwIYIAZCADcCECAGQgA3AgggBkIANwIAIAZBkAFqJAALpwwBB38CQCAARQ0AIABBCGsiAyAAQQRrKAIAIgFBeHEiAGohBQJAIAFBAXENACABQQNxRQ0BIAMgAygCACIBayIDQZgIKAIASQ0BIAAgAWohACADQZwIKAIARwRAIAFB/wFNBEAgAygCCCICIAFBA3YiBEEDdEGwCGpGGiACIAMoAgwiAUYEQEGICEGICCgCAEF+IAR3cTYCAAwDCyACIAE2AgwgASACNgIIDAILIAMoAhghBgJAIAMgAygCDCIBRwRAIAMoAggiAiABNgIMIAEgAjYCCAwBCwJAIANBFGoiAigCACIEDQAgA0EQaiICKAIAIgQNAEEAIQEMAQsDQCACIQcgBCIBQRRqIgIoAgAiBA0AIAFBEGohAiABKAIQIgQNAAsgB0EANgIACyAGRQ0BAkAgAyADKAIcIgJBAnRBuApqIgQoAgBGBEAgBCABNgIAIAENAUGMCEGMCCgCAEF+IAJ3cTYCAAwDCyAGQRBBFCAGKAIQIANGG2ogATYCACABRQ0CCyABIAY2AhggAygCECICBEAgASACNgIQIAIgATYCGAsgAygCFCICRQ0BIAEgAjYCFCACIAE2AhgMAQsgBSgCBCIBQQNxQQNHDQBBkAggADYCACAFIAFBfnE2AgQgAyAAQQFyNgIEIAAgA2ogADYCAA8LIAMgBU8NACAFKAIEIgFBAXFFDQACQCABQQJxRQRAIAVBoAgoAgBGBEBBoAggAzYCAEGUCEGUCCgCACAAaiIANgIAIAMgAEEBcjYCBCADQZwIKAIARw0DQZAIQQA2AgBBnAhBADYCAA8LIAVBnAgoAgBGBEBBnAggAzYCAEGQCEGQCCgCACAAaiIANgIAIAMgAEEBcjYCBCAAIANqIAA2AgAPCyABQXhxIABqIQACQCABQf8BTQRAIAUoAggiAiABQQN2IgRBA3RBsAhqRhogAiAFKAIMIgFGBEBBiAhBiAgoAgBBfiAEd3E2AgAMAgsgAiABNgIMIAEgAjYCCAwBCyAFKAIYIQYCQCAFIAUoAgwiAUcEQCAFKAIIIgJBmAgoAgBJGiACIAE2AgwgASACNgIIDAELAkAgBUEUaiICKAIAIgQNACAFQRBqIgIoAgAiBA0AQQAhAQwBCwNAIAIhByAEIgFBFGoiAigCACIEDQAgAUEQaiECIAEoAhAiBA0ACyAHQQA2AgALIAZFDQACQCAFIAUoAhwiAkECdEG4CmoiBCgCAEYEQCAEIAE2AgAgAQ0BQYwIQYwIKAIAQX4gAndxNgIADAILIAZBEEEUIAYoAhAgBUYbaiABNgIAIAFFDQELIAEgBjYCGCAFKAIQIgIEQCABIAI2AhAgAiABNgIYCyAFKAIUIgJFDQAgASACNgIUIAIgATYCGAsgAyAAQQFyNgIEIAAgA2ogADYCACADQZwIKAIARw0BQZAIIAA2AgAPCyAFIAFBfnE2AgQgAyAAQQFyNgIEIAAgA2ogADYCAAsgAEH/AU0EQCAAQQN2IgFBA3RBsAhqIQACf0GICCgCACICQQEgAXQiAXFFBEBBiAggASACcjYCACAADAELIAAoAggLIQIgACADNgIIIAIgAzYCDCADIAA2AgwgAyACNgIIDwtBHyECIANCADcCECAAQf///wdNBEAgAEEIdiIBIAFBgP4/akEQdkEIcSIBdCICIAJBgOAfakEQdkEEcSICdCIEIARBgIAPakEQdkECcSIEdEEPdiABIAJyIARyayIBQQF0IAAgAUEVanZBAXFyQRxqIQILIAMgAjYCHCACQQJ0QbgKaiEBAkACQAJAQYwIKAIAIgRBASACdCIHcUUEQEGMCCAEIAdyNgIAIAEgAzYCACADIAE2AhgMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgASgCACEBA0AgASIEKAIEQXhxIABGDQIgAkEddiEBIAJBAXQhAiAEIAFBBHFqIgdBEGooAgAiAQ0ACyAHIAM2AhAgAyAENgIYCyADIAM2AgwgAyADNgIIDAELIAQoAggiACADNgIMIAQgAzYCCCADQQA2AhggAyAENgIMIAMgADYCCAtBqAhBqAgoAgBBAWsiAEF/IAAbNgIACwsLCQEAQYEICwIGUA==",!Se.startsWith(_e)){var xe=Se;Se=r.locateFile?r.locateFile(xe,f):f+xe}function Tt(){var ie=Se;try{if(ie==Se&&S)return new Uint8Array(S);var Ee=Hr(ie);if(Ee)return Ee;if(h)return h(ie);throw"both async and sync fetching of the wasm failed"}catch(Re){re(Re)}}a(Tt,"pa");function Ft(){if(!S&&(c||u)){if(typeof fetch=="function"&&!Se.startsWith("file://"))return fetch(Se,{credentials:"same-origin"}).then(function(ie){if(!ie.ok)throw"failed to load wasm binary file at '"+Se+"'";return ie.arrayBuffer()}).catch(function(){return Tt()});if(g)return new Promise(function(ie,Ee){g(Se,function(Re){ie(new Uint8Array(Re))},Ee)})}return Promise.resolve().then(function(){return Tt()})}a(Ft,"qa");function ur(ie){for(;0<ie.length;){var Ee=ie.shift();if(typeof Ee=="function")Ee(r);else{var Re=Ee.m;typeof Re=="number"?Ee.l===void 0?j.get(Re)():j.get(Re)(Ee.l):Re(Ee.l===void 0?null:Ee.l)}}}a(ur,"X");var Dr=!1,sn=typeof atob=="function"?atob:function(ie){var Ee="",Re=0;ie=ie.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++)),gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++)),lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++)),kn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(ie.charAt(Re++));je=je<<2|gt>>4,gt=(gt&15)<<4|lr>>2;var Yr=(lr&3)<<6|kn;Ee+=String.fromCharCode(je),lr!==64&&(Ee+=String.fromCharCode(gt)),kn!==64&&(Ee+=String.fromCharCode(Yr))}while(Re<ie.length);return Ee};function Hr(ie){if(ie.startsWith(_e)){if(ie=ie.slice(_e.length),typeof l=="boolean"&&l){var Ee=Buffer.from(ie,"base64");Ee=new Uint8Array(Ee.buffer,Ee.byteOffset,Ee.byteLength)}else try{var Re=sn(ie),je=new Uint8Array(Re.length);for(ie=0;ie<Re.length;++ie)je[ie]=Re.charCodeAt(ie);Ee=je}catch{throw Error("Converting base64 string to bytes failed.")}return Ee}}a(Hr,"H");var No={a:a(function(ie){var Ee=U.length;if(ie>>>=0,2147483648<ie)return!1;for(var Re=1;4>=Re;Re*=2){var je=Ee*(1+.2/Re);je=Math.min(je,ie+100663296),je=Math.max(ie,je),0<je%65536&&(je+=65536-je%65536);e:{try{M.grow(Math.min(2147483648,je)-C.byteLength+65535>>>16),k();var gt=1;break e}catch{}gt=void 0}if(gt)return!0}return!1},"a")};(function(){function ie(gt){r.asm=gt.exports,M=r.asm.b,k(),j=r.asm.j,L.unshift(r.asm.c),O--,r.monitorRunDependencies&&r.monitorRunDependencies(O),O==0&&(q!==null&&(clearInterval(q),q=null),V&&(gt=V,V=null,gt()))}a(ie,"a");function Ee(gt){ie(gt.instance)}a(Ee,"c");function Re(gt){return Ft().then(function(lr){return WebAssembly.instantiate(lr,je)}).then(gt,function(lr){b("failed to asynchronously prepare wasm: "+lr),re(lr)})}a(Re,"d");var je={a:No};if(O++,r.monitorRunDependencies&&r.monitorRunDependencies(O),r.instantiateWasm)try{return r.instantiateWasm(je,ie)}catch(gt){return b("Module.instantiateWasm callback failed with error: "+gt),!1}return(function(){return S||typeof WebAssembly.instantiateStreaming!="function"||Se.startsWith(_e)||Se.startsWith("file://")||typeof fetch!="function"?Re(Ee):fetch(Se,{credentials:"same-origin"}).then(function(gt){return WebAssembly.instantiateStreaming(gt,je).then(Ee,function(lr){return b("wasm streaming compile failed: "+lr),b("falling back to ArrayBuffer instantiation"),Re(Ee)})})})().catch(n),{}})(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.c).apply(null,arguments)},r._poly1305_auth=function(){return(r._poly1305_auth=r.asm.d).apply(null,arguments)};var Ks=r.stackSave=function(){return(Ks=r.stackSave=r.asm.e).apply(null,arguments)},Yu=r.stackRestore=function(){return(Yu=r.stackRestore=r.asm.f).apply(null,arguments)},Ys=r.stackAlloc=function(){return(Ys=r.stackAlloc=r.asm.g).apply(null,arguments)};r._malloc=function(){return(r._malloc=r.asm.h).apply(null,arguments)},r._free=function(){return(r._free=r.asm.i).apply(null,arguments)},r.cwrap=function(ie,Ee,Re,je){Re=Re||[];var gt=Re.every(function(lr){return lr==="number"});return Ee!=="string"&&gt&&!je?te(ie):function(){return ee(ie,Ee,Re,arguments)}};var $o;V=a(function ie(){$o||Do(),$o||(V=ie)},"ta");function Do(){function ie(){if(!$o&&($o=!0,r.calledRun=!0,!R)){if(ur(L),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var Ee=r.postRun.shift();X.unshift(Ee)}ur(X)}}if(a(ie,"a"),!(0<O)){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)ne();ur(W),0<O||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),ie()},1)):ie())}}if(a(Do,"Z"),r.run=Do,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return Do(),t.ready})})();typeof tp=="object"&&typeof lE=="object"?lE.exports=uE:typeof define=="function"&&define.amd?define([],function(){return uE}):typeof tp=="object"&&(tp.createPoly1305=uE)});var Pi=me((JQ,Lv)=>{"use strict";var{createCipheriv:Rs,createDecipheriv:rp,createHmac:fE,randomFillSync:bo,timingSafeEqual:dE}=require("crypto"),{readUInt32BE:pu,writeUInt32BE:nn}=Sn(),Ti=Buffer[Symbol.species],Nv=2**32-1,$v=Buffer.alloc(0),Cs=Buffer.alloc(4),np=new Map,xo=35e3,pE,TE,kE,CE,RE,OE,NE;try{pE=require("./crypto/build/Release/sshcrypto.node"),{AESGCMCipher:TE,ChaChaPolyCipher:kE,GenericCipher:CE,AESGCMDecipher:RE,ChaChaPolyDecipher:OE,GenericDecipher:NE}=pE}catch{}var vr=1,P4=(()=>{function e(t,r,i,n,o,s,c){return{sslName:t,blockLen:r,keyLen:i,ivLen:n!==0||c&vr?n:r,authLen:o,discardLen:s,stream:!!(c&vr)}}return a(e,"info"),{"chacha20-poly1305@openssh.com":e("chacha20",8,64,0,16,0,vr),"aes128-gcm":e("aes-128-gcm",16,16,12,16,0,vr),"aes256-gcm":e("aes-256-gcm",16,32,12,16,0,vr),"aes128-gcm@openssh.com":e("aes-128-gcm",16,16,12,16,0,vr),"aes256-gcm@openssh.com":e("aes-256-gcm",16,32,12,16,0,vr),"aes128-cbc":e("aes-128-cbc",16,16,0,0,0,0),"aes192-cbc":e("aes-192-cbc",16,24,0,0,0,0),"aes256-cbc":e("aes-256-cbc",16,32,0,0,0,0),"rijndael-cbc@lysator.liu.se":e("aes-256-cbc",16,32,0,0,0,0),"3des-cbc":e("des-ede3-cbc",8,24,0,0,0,0),"blowfish-cbc":e("bf-cbc",8,16,0,0,0,0),"idea-cbc":e("idea-cbc",8,16,0,0,0,0),"cast128-cbc":e("cast-cbc",8,16,0,0,0,0),"aes128-ctr":e("aes-128-ctr",16,16,16,0,0,vr),"aes192-ctr":e("aes-192-ctr",16,24,16,0,0,vr),"aes256-ctr":e("aes-256-ctr",16,32,16,0,0,vr),"3des-ctr":e("des-ede3",8,24,8,0,0,vr),"blowfish-ctr":e("bf-ecb",8,16,8,0,0,vr),"cast128-ctr":e("cast5-ecb",8,16,8,0,0,vr),arcfour:e("rc4",8,16,0,0,1536,vr),arcfour128:e("rc4",8,16,0,0,1536,vr),arcfour256:e("rc4",8,32,0,0,1536,vr),arcfour512:e("rc4",8,64,0,0,1536,vr)}})(),T4=(()=>{function e(t,r,i,n){return{sslName:t,len:r,actualLen:i,isETM:n}}return a(e,"info"),{"hmac-md5":e("md5",16,16,!1),"hmac-md5-96":e("md5",16,12,!1),"hmac-ripemd160":e("ripemd160",20,20,!1),"hmac-sha1":e("sha1",20,20,!1),"hmac-sha1-etm@openssh.com":e("sha1",20,20,!0),"hmac-sha1-96":e("sha1",20,12,!1),"hmac-sha2-256":e("sha256",32,32,!1),"hmac-sha2-256-etm@openssh.com":e("sha256",32,32,!0),"hmac-sha2-256-96":e("sha256",32,12,!1),"hmac-sha2-512":e("sha512",64,64,!1),"hmac-sha2-512-etm@openssh.com":e("sha512",64,64,!0),"hmac-sha2-512-96":e("sha512",64,12,!1)}})(),hE=class{static{a(this,"NullCipher")}constructor(t,r){this.outSeqno=t,this._onWrite=r,this._dead=!1}free(){this._dead=!0}allocPacket(t){let r=5+t,i=8-(r&7);i<4&&(i+=8),r+=i;let n=Buffer.allocUnsafe(r);return nn(n,r-4,0),n[4]=i,bo(n,5+t,i),n}encrypt(t){this._dead||(this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},Dv=Buffer.alloc(32),Zr=Buffer.alloc(16),du,hu,$E,gE=class{static{a(this,"ChaChaPolyCipherNative")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encKeyMain=r.cipherKey.slice(0,32),this._encKeyPktLen=r.cipherKey.slice(32),this._dead=!1}free(){this._dead=!0}allocPacket(t){let r=5+t,i=8-(r-4&7);i<4&&(i+=8),r+=i;let n=Buffer.allocUnsafe(r);return nn(n,r-4,0),n[4]=i,bo(n,5+t,i),n}encrypt(t){if(this._dead)return;Zr[0]=0,nn(Zr,this.outSeqno,12);let r=Rs("chacha20",this._encKeyMain,Zr).update(Dv),i=Rs("chacha20",this._encKeyPktLen,Zr).update(t.slice(0,4));this._onWrite(i),Zr[0]=1;let n=Rs("chacha20",this._encKeyMain,Zr).update(t.slice(4));this._onWrite(n),$E(hu,i,i.length,n,n.length,r);let o=Buffer.allocUnsafe(16);o.set(new Uint8Array(du.HEAPU8.buffer,hu,16),0),this._onWrite(o),this.outSeqno=this.outSeqno+1>>>0}},mE=class{static{a(this,"ChaChaPolyCipherBinding")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._instance=new kE(r.cipherKey),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let r=5+t,i=8-(r-4&7);i<4&&(i+=8),r+=i;let n=Buffer.allocUnsafe(r+16);return nn(n,r-4,0),n[4]=i,bo(n,5+t,i),n}encrypt(t){this._dead||(this._instance.encrypt(t,this.outSeqno),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},_E=class{static{a(this,"AESGCMCipherNative")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encSSLName=r.cipherInfo.sslName,this._encKey=r.cipherKey,this._encIV=r.cipherIV,this._dead=!1}free(){this._dead=!0}allocPacket(t){let r=5+t,i=16-(r-4&15);i<4&&(i+=16),r+=i;let n=Buffer.allocUnsafe(r);return nn(n,r-4,0),n[4]=i,bo(n,5+t,i),n}encrypt(t){if(this._dead)return;let r=Rs(this._encSSLName,this._encKey,this._encIV);r.setAutoPadding(!1);let i=t.slice(0,4);r.setAAD(i),this._onWrite(i);let n=r.update(t.slice(4));this._onWrite(n);let o=r.final();o.length&&this._onWrite(o);let s=r.getAuthTag();this._onWrite(s),Bv(this._encIV),this.outSeqno=this.outSeqno+1>>>0}},yE=class{static{a(this,"AESGCMCipherBinding")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._instance=new TE(r.cipherInfo.sslName,r.cipherKey,r.cipherIV),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let r=5+t,i=16-(r-4&15);i<4&&(i+=16),r+=i;let n=Buffer.allocUnsafe(r+16);return nn(n,r-4,0),n[4]=i,bo(n,5+t,i),n}encrypt(t){this._dead||(this._instance.encrypt(t),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},EE=class{static{a(this,"GenericCipherNative")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encBlockLen=r.cipherInfo.blockLen,this._cipherInstance=Rs(r.cipherInfo.sslName,r.cipherKey,r.cipherIV),this._macSSLName=r.macInfo.sslName,this._macKey=r.macKey,this._macActualLen=r.macInfo.actualLen,this._macETM=r.macInfo.isETM,this._aadLen=this._macETM?4:0,this._dead=!1;let i=r.cipherInfo.discardLen;if(i){let n=np.get(i);n===void 0&&(n=Buffer.alloc(i),np.set(i,n)),this._cipherInstance.update(n)}}free(){this._dead=!0}allocPacket(t){let r=this._encBlockLen,i=5+t,n=r-(i-this._aadLen&r-1);n<4&&(n+=r),i+=n;let o=Buffer.allocUnsafe(i);return nn(o,i-4,0),o[4]=n,bo(o,5+t,n),o}encrypt(t){if(this._dead)return;let r;if(this._macETM){let n=new Uint8Array(t.buffer,t.byteOffset,4),o=this._cipherInstance.update(new Uint8Array(t.buffer,t.byteOffset+4,t.length-4));this._onWrite(n),this._onWrite(o),r=fE(this._macSSLName,this._macKey),nn(Cs,this.outSeqno,0),r.update(Cs),r.update(n),r.update(o)}else{let n=this._cipherInstance.update(t);this._onWrite(n),r=fE(this._macSSLName,this._macKey),nn(Cs,this.outSeqno,0),r.update(Cs),r.update(t)}let i=r.digest();i.length>this._macActualLen&&(i=i.slice(0,this._macActualLen)),this._onWrite(i),this.outSeqno=this.outSeqno+1>>>0}},AE=class{static{a(this,"GenericCipherBinding")}constructor(t){let r=t.outbound;this.outSeqno=r.seqno,this._onWrite=r.onWrite,this._encBlockLen=r.cipherInfo.blockLen,this._macLen=r.macInfo.len,this._macActualLen=r.macInfo.actualLen,this._aadLen=r.macInfo.isETM?4:0,this._instance=new CE(r.cipherInfo.sslName,r.cipherKey,r.cipherIV,r.macInfo.sslName,r.macKey,r.macInfo.isETM),this._dead=!1}free(){this._dead=!0,this._instance.free()}allocPacket(t){let r=this._encBlockLen,i=5+t,n=r-(i-this._aadLen&r-1);n<4&&(n+=r),i+=n;let o=Buffer.allocUnsafe(i+this._macLen);return nn(o,i-4,0),o[4]=n,bo(o,5+t,n),o}encrypt(t){this._dead||(this._instance.encrypt(t,this.outSeqno),this._macActualLen<this._macLen&&(t=new Ti(t.buffer,t.byteOffset,t.length-(this._macLen-this._macActualLen))),this._onWrite(t),this.outSeqno=this.outSeqno+1>>>0)}},bE=class{static{a(this,"NullDecipher")}constructor(t,r){this.inSeqno=t,this._onPayload=r,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenBytes<4){let o=Math.min(4-this._lenBytes,i-r);for(this._lenBytes+=o;o--;)this._len=(this._len<<8)+t[r++];if(this._lenBytes<4)return;if(this._len>xo||this._len<8||(4+this._len&7)!==0)throw new Error("Bad packet length");if(r>=i)return}if(this._packetPos<this._len){let o=Math.min(this._len-this._packetPos,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._packetPos)),r+=o,this._packetPos+=o,this._packetPos<this._len)return}let n=this._packet?new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):$v;this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},xE=class{static{a(this,"ChaChaPolyDecipherNative")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._decKeyMain=r.decipherKey.slice(0,32),this._decKeyPktLen=r.decipherKey.slice(32),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._calcMac=Buffer.allocUnsafe(16),this._macPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenPos<4){let c=Math.min(4-this._lenPos,i-r);for(;c--;)this._lenBuf[this._lenPos++]=t[r++];if(this._lenPos<4)return;Zr[0]=0,nn(Zr,this.inSeqno,12);let u=rp("chacha20",this._decKeyPktLen,Zr).update(this._lenBuf);if(this._len=pu(u,0),this._len>xo||this._len<8||(this._len&7)!==0)throw new Error("Bad packet length")}if(this._pktLen<this._len){if(r>=i)return;let c=Math.min(this._len-this._pktLen,i-r),u;if(r!==0||c!==i?u=new Uint8Array(t.buffer,t.byteOffset+r,c):u=t,c===this._len?this._packet=u:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(u,this._pktLen)),r+=c,this._pktLen+=c,this._pktLen<this._len||r>=i)return}{let c=Math.min(16-this._macPos,i-r);if(r!==0||c!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,c),this._macPos):this._mac.set(t,this._macPos),r+=c,this._macPos+=c,this._macPos<16)return}Zr[0]=0,nn(Zr,this.inSeqno,12);let n=Rs("chacha20",this._decKeyMain,Zr).update(Dv);if($E(hu,this._lenBuf,4,this._packet,this._packet.length,n),this._calcMac.set(new Uint8Array(du.HEAPU8.buffer,hu,16),0),!dE(this._calcMac,this._mac))throw new Error("Invalid MAC");Zr[0]=1;let o=rp("chacha20",this._decKeyMain,Zr).update(this._packet),s=new Ti(o.buffer,o.byteOffset+1,o.length-o[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let c=this._onPayload(s);if(c!==void 0)return c===!1?r:c}}}},IE=class{static{a(this,"ChaChaPolyDecipherBinding")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._instance=new OE(r.decipherKey),this._len=0,this._lenBuf=Buffer.alloc(4),this._lenPos=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(16),this._macPos=0}free(){this._instance.free()}decrypt(t,r,i){for(;r<i;){if(this._lenPos<4){let o=Math.min(4-this._lenPos,i-r);for(;o--;)this._lenBuf[this._lenPos++]=t[r++];if(this._lenPos<4)return;if(this._len=this._instance.decryptLen(this._lenBuf,this.inSeqno),this._len>xo||this._len<8||(this._len&7)!==0)throw new Error("Bad packet length");if(r>=i)return}if(this._pktLen<this._len){let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._pktLen)),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(16-this._macPos,i-r);if(r!==0||o!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._macPos):this._mac.set(t,this._macPos),r+=o,this._macPos+=o,this._macPos<16)return}this._instance.decrypt(this._packet,this._mac,this.inSeqno);let n=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenPos=0,this._packet=null,this._pktLen=0,this._macPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},SE=class{static{a(this,"AESGCMDecipherNative")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._decipherInstance=null,this._decipherSSLName=r.decipherInfo.sslName,this._decipherKey=r.decipherKey,this._decipherIV=r.decipherIV,this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenBytes<4){let o=Math.min(4-this._lenBytes,i-r);for(this._lenBytes+=o;o--;)this._len=(this._len<<8)+t[r++];if(this._lenBytes<4)return;if(this._len+20>xo||this._len<16||(this._len&15)!==0)throw new Error("Bad packet length");this._decipherInstance=rp(this._decipherSSLName,this._decipherKey,this._decipherIV),this._decipherInstance.setAutoPadding(!1),this._decipherInstance.setAAD(k4(this._len))}if(this._pktLen<this._len){if(r>=i)return;let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=this._decipherInstance.update(new Uint8Array(t.buffer,t.byteOffset+r,o)):s=this._decipherInstance.update(t),s.length&&(o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._packetPos)),this._packetPos+=s.length),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(16-this._tagPos,i-r);if(r!==0||o!==i?this._tag.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._tagPos):this._tag.set(t,this._tagPos),r+=o,this._tagPos+=o,this._tagPos<16)return}{this._decipherInstance.setAuthTag(this._tag);let o=this._decipherInstance.final();o.length&&(this._packet?this._packet.set(o,this._packetPos):this._packet=o)}let n=this._packet?new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1):$v;this.inSeqno=this.inSeqno+1>>>0,Bv(this._decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._tagPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},vE=class{static{a(this,"AESGCMDecipherBinding")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._instance=new RE(r.decipherInfo.sslName,r.decipherKey,r.decipherIV),this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tag=Buffer.allocUnsafe(16),this._tagPos=0}free(){}decrypt(t,r,i){for(;r<i;){if(this._lenBytes<4){let o=Math.min(4-this._lenBytes,i-r);for(this._lenBytes+=o;o--;)this._len=(this._len<<8)+t[r++];if(this._lenBytes<4)return;if(this._len+20>xo||this._len<16||(this._len&15)!==0)throw new Error(`Bad packet length: ${this._len}`)}if(this._pktLen<this._len){if(r>=i)return;let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._pktLen)),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(16-this._tagPos,i-r);if(r!==0||o!==i?this._tag.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._tagPos):this._tag.set(t,this._tagPos),r+=o,this._tagPos+=o,this._tagPos<16)return}this._instance.decrypt(this._packet,this._len,this._tag);let n=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._len=0,this._lenBytes=0,this._packet=null,this._pktLen=0,this._tagPos=0;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}},wE=class{static{a(this,"GenericDecipherNative")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._decipherInstance=rp(r.decipherInfo.sslName,r.decipherKey,r.decipherIV),this._decipherInstance.setAutoPadding(!1),this._block=Buffer.allocUnsafe(r.macInfo.isETM?4:r.decipherInfo.blockLen),this._blockSize=r.decipherInfo.blockLen,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._mac=Buffer.allocUnsafe(r.macInfo.actualLen),this._macPos=0,this._macSSLName=r.macInfo.sslName,this._macKey=r.macKey,this._macActualLen=r.macInfo.actualLen,this._macETM=r.macInfo.isETM,this._macInstance=null;let i=r.decipherInfo.discardLen;if(i){let n=np.get(i);n===void 0&&(n=Buffer.alloc(i),np.set(i,n)),this._decipherInstance.update(n)}}free(){}decrypt(t,r,i){for(;r<i;){if(this._blockPos<this._block.length){let s=Math.min(this._block.length-this._blockPos,i-r);if(r!==0||s!==i||s<t.length?this._block.set(new Uint8Array(t.buffer,t.byteOffset+r,s),this._blockPos):this._block.set(t,this._blockPos),r+=s,this._blockPos+=s,this._blockPos<this._block.length)return;let c,u;if(this._macETM?this._len=u=pu(this._block,0):(c=this._decipherInstance.update(this._block),this._len=pu(c,0),u=4+this._len-this._blockSize),this._len>xo||this._len<5||(u&this._blockSize-1)!==0)throw new Error("Bad packet length");if(this._macInstance=fE(this._macSSLName,this._macKey),nn(Cs,this.inSeqno,0),this._macInstance.update(Cs),this._macETM?this._macInstance.update(this._block):(this._macInstance.update(new Uint8Array(c.buffer,c.byteOffset,4)),this._pktLen=c.length-4,this._packetPos=this._pktLen,this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(c.buffer,c.byteOffset+4,this._packetPos),0)),r>=i)return}if(this._pktLen<this._len){let s=Math.min(this._len-this._pktLen,i-r),c;r!==0||s!==i?c=new Uint8Array(t.buffer,t.byteOffset+r,s):c=t,this._macETM&&this._macInstance.update(c);let u=this._decipherInstance.update(c);if(u.length&&(s===this._len?this._packet=u:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(u,this._packetPos)),this._packetPos+=u.length),r+=s,this._pktLen+=s,this._pktLen<this._len||r>=i)return}{let s=Math.min(this._macActualLen-this._macPos,i-r);if(r!==0||s!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,s),this._macPos):this._mac.set(t,this._macPos),r+=s,this._macPos+=s,this._macPos<this._macActualLen)return}this._macETM||this._macInstance.update(this._packet);let n=this._macInstance.digest();if(this._macActualLen<n.length&&(n=new Uint8Array(n.buffer,n.byteOffset,this._macActualLen)),!C4(n,this._mac))throw new Error("Invalid MAC");let o=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._packetPos=0,this._pktLen=0,this._macPos=0,this._macInstance=null;{let s=this._onPayload(o);if(s!==void 0)return s===!1?r:s}}}},PE=class{static{a(this,"GenericDecipherBinding")}constructor(t){let r=t.inbound;this.inSeqno=r.seqno,this._onPayload=r.onPayload,this._instance=new NE(r.decipherInfo.sslName,r.decipherKey,r.decipherIV,r.macInfo.sslName,r.macKey,r.macInfo.isETM,r.macInfo.actualLen),this._block=Buffer.allocUnsafe(r.macInfo.isETM||r.decipherInfo.stream?4:r.decipherInfo.blockLen),this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._mac=Buffer.allocUnsafe(r.macInfo.actualLen),this._macPos=0,this._macActualLen=r.macInfo.actualLen,this._macETM=r.macInfo.isETM}free(){this._instance.free()}decrypt(t,r,i){for(;r<i;){if(this._blockPos<this._block.length){let o=Math.min(this._block.length-this._blockPos,i-r);if(r!==0||o!==i||o<t.length?this._block.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._blockPos):this._block.set(t,this._blockPos),r+=o,this._blockPos+=o,this._blockPos<this._block.length)return;let s;if(this._macETM?this._len=s=pu(this._block,0):(this._instance.decryptBlock(this._block),this._len=pu(this._block,0),s=4+this._len-this._block.length),this._len>xo||this._len<5||(s&this._block.length-1)!==0)throw new Error("Bad packet length");if(this._macETM||(this._pktLen=this._block.length-4,this._pktLen&&(this._packet=Buffer.allocUnsafe(this._len),this._packet.set(new Uint8Array(this._block.buffer,this._block.byteOffset+4,this._pktLen),0))),r>=i)return}if(this._pktLen<this._len){let o=Math.min(this._len-this._pktLen,i-r),s;if(r!==0||o!==i?s=new Uint8Array(t.buffer,t.byteOffset+r,o):s=t,o===this._len?this._packet=s:(this._packet||(this._packet=Buffer.allocUnsafe(this._len)),this._packet.set(s,this._pktLen)),r+=o,this._pktLen+=o,this._pktLen<this._len||r>=i)return}{let o=Math.min(this._macActualLen-this._macPos,i-r);if(r!==0||o!==i?this._mac.set(new Uint8Array(t.buffer,t.byteOffset+r,o),this._macPos):this._mac.set(t,this._macPos),r+=o,this._macPos+=o,this._macPos<this._macActualLen)return}this._instance.decrypt(this._packet,this.inSeqno,this._block,this._mac);let n=new Ti(this._packet.buffer,this._packet.byteOffset+1,this._packet.length-this._packet[0]-1);this.inSeqno=this.inSeqno+1>>>0,this._blockPos=0,this._len=0,this._packet=null,this._pktLen=0,this._macPos=0,this._macInstance=null;{let o=this._onPayload(n);if(o!==void 0)return o===!1?r:o}}}};function Bv(e){++e[11]>>>8&&++e[10]>>>8&&++e[9]>>>8&&++e[8]>>>8&&++e[7]>>>8&&++e[6]>>>8&&++e[5]>>>8&&++e[4]>>>8}a(Bv,"ivIncrement");var k4=(()=>{let e=Buffer.alloc(4);return t=>(e[0]=t>>>24,e[1]=t>>>16,e[2]=t>>>8,e[3]=t,e)})();function C4(e,t){return e.length!==t.length?(dE(e,e),!1):dE(e,t)}a(C4,"timingSafeEquals");function R4(e){if(typeof e!="object"||e===null)throw new Error("Invalid config");if(typeof e.outbound!="object"||e.outbound===null)throw new Error("Invalid outbound");let t=e.outbound;if(typeof t.onWrite!="function")throw new Error("Invalid outbound.onWrite");if(typeof t.cipherInfo!="object"||t.cipherInfo===null)throw new Error("Invalid outbound.cipherInfo");if(!Buffer.isBuffer(t.cipherKey)||t.cipherKey.length!==t.cipherInfo.keyLen)throw new Error("Invalid outbound.cipherKey");if(t.cipherInfo.ivLen&&(!Buffer.isBuffer(t.cipherIV)||t.cipherIV.length!==t.cipherInfo.ivLen))throw new Error("Invalid outbound.cipherIV");if(typeof t.seqno!="number"||t.seqno<0||t.seqno>Nv)throw new Error("Invalid outbound.seqno");let r=!!t.forceNative;switch(t.cipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return TE&&!r?new yE(e):new _E(e);case"chacha20":return kE&&!r?new mE(e):new gE(e);default:{if(typeof t.macInfo!="object"||t.macInfo===null)throw new Error("Invalid outbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw new Error("Invalid outbound.macKey");return CE&&!r?new AE(e):new EE(e)}}}a(R4,"createCipher");function O4(e){if(typeof e!="object"||e===null)throw new Error("Invalid config");if(typeof e.inbound!="object"||e.inbound===null)throw new Error("Invalid inbound");let t=e.inbound;if(typeof t.onPayload!="function")throw new Error("Invalid inbound.onPayload");if(typeof t.decipherInfo!="object"||t.decipherInfo===null)throw new Error("Invalid inbound.decipherInfo");if(!Buffer.isBuffer(t.decipherKey)||t.decipherKey.length!==t.decipherInfo.keyLen)throw new Error("Invalid inbound.decipherKey");if(t.decipherInfo.ivLen&&(!Buffer.isBuffer(t.decipherIV)||t.decipherIV.length!==t.decipherInfo.ivLen))throw new Error("Invalid inbound.decipherIV");if(typeof t.seqno!="number"||t.seqno<0||t.seqno>Nv)throw new Error("Invalid inbound.seqno");let r=!!t.forceNative;switch(t.decipherInfo.sslName){case"aes-128-gcm":case"aes-256-gcm":return RE&&!r?new vE(e):new SE(e);case"chacha20":return OE&&!r?new IE(e):new xE(e);default:{if(typeof t.macInfo!="object"||t.macInfo===null)throw new Error("Invalid inbound.macInfo");if(!Buffer.isBuffer(t.macKey)||t.macKey.length!==t.macInfo.len)throw new Error("Invalid inbound.macKey");return NE&&!r?new PE(e):new wE(e)}}}a(O4,"createDecipher");Lv.exports={CIPHER_INFO:P4,MAC_INFO:T4,bindingAvailable:!!pE,init:new Promise(async(e,t)=>{try{du=await Ov()(),hu=du._malloc(16),$E=du.cwrap("poly1305_auth",null,["number","array","number","array","number","array"])}catch(r){return t(r)}e()}),NullCipher:hE,createCipher:R4,NullDecipher:bE,createDecipher:O4}});var Ci=me((t7,Zv)=>{"use strict";var{createDecipheriv:BE,createECDH:N4,createHash:mu,createHmac:$4,createSign:D4,createVerify:B4,getCiphers:L4,sign:zv,verify:Uv}=require("crypto"),z4=L4(),{Ber:Fe}=uu(),U4=oE().pbkdf,{CIPHER_INFO:_u}=Pi(),{eddsaSupported:LE,SUPPORTED_CIPHER:M4}=Jn(),{bufferSlice:Io,makeBufferParser:F4,readString:ze,readUInt32BE:gu,writeUInt32BE:br}=Sn(),ei=Symbol("Hash Algorithm"),vn=Symbol("Private key PEM"),$n=Symbol("Public key PEM"),ki=Symbol("Public key SSH"),Os=Symbol("Decrypted Key"),DE=Object.create(null);{let e=Object.keys(_u);for(let t=0;t<e.length;++t){let r=_u[e[t]].sslName;!r||DE[r]||(DE[r]=_u[e[t]])}}var ip=F4();function wn(e,t){t=t.base64Slice(0,t.length);let r=t.replace(/.{64}/g,`$&
9
9
  `);return t.length&63&&(r+=`
10
10
  `),`-----BEGIN ${e} KEY-----
11
- ${r}-----END ${e} KEY-----`}a(Sn,"makePEM");function _u(e,t){let r=Buffer.allocUnsafe(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}a(_u,"combineBuffers");function NE(e,t){let r=e.length,i=e._pos||0;for(let n=0;n<t;++n){let o=r-i;if(i>=r||o<4)return!1;let s=hu(e,i);if(o<4+s)return!1;i+=4+s}return e._pos=i,!0}a(NE,"skipFields");function yu(e,t){let r=new Fe.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.2.840.113549.1.1.1"),r.writeNull(),r.endSequence(),r.startSequence(Fe.BitString),r.writeByte(0),r.startSequence(),r.writeBuffer(e,Fe.Integer),r.writeBuffer(t,Fe.Integer),r.endSequence(),r.endSequence(),r.endSequence(),Sn("PUBLIC",r.buffer)}a(yu,"genOpenSSLRSAPub");function Eu(e,t){let r=Buffer.allocUnsafe(15+t.length+4+e.length);br(r,7,0),r.utf8Write("ssh-rsa",4,7);let i=11;return br(r,t.length,i),r.set(t,i+=4),br(r,e.length,i+=t.length),r.set(e,i+4),r}a(Eu,"genOpenSSHRSAPub");var TS=(()=>{function e(i,n,o,s,c,u,l,f){let p=new Fe.Writer;return p.startSequence(),p.writeInt(0,Fe.Integer),p.writeBuffer(i,Fe.Integer),p.writeBuffer(n,Fe.Integer),p.writeBuffer(o,Fe.Integer),p.writeBuffer(s,Fe.Integer),p.writeBuffer(c,Fe.Integer),p.writeBuffer(u,Fe.Integer),p.writeBuffer(l,Fe.Integer),p.writeBuffer(f,Fe.Integer),p.endSequence(),p.buffer}a(e,"genRSAASN1Buf");function t(i){return BigInt(`0x${i.hexSlice(0,i.length)}`)}a(t,"bigIntFromBuffer");function r(i){let n=i.toString(16);if((n.length&1)!==0)n=`0${n}`;else{let o=n.charCodeAt(0);(o===56||o===57||o>=97&&o<=102)&&(n=`00${n}`)}return Buffer.from(n,"hex")}return a(r,"bigIntToBuffer"),a(function(n,o,s,c,u,l){let f=t(s),p=r(f%(t(u)-1n)),g=r(f%(t(l)-1n));return Sn("RSA PRIVATE",e(n,o,s,u,l,p,g,c))},"genOpenSSLRSAPriv")})();function Au(e,t,r,i){let n=new Fe.Writer;return n.startSequence(),n.startSequence(),n.writeOID("1.2.840.10040.4.1"),n.startSequence(),n.writeBuffer(e,Fe.Integer),n.writeBuffer(t,Fe.Integer),n.writeBuffer(r,Fe.Integer),n.endSequence(),n.endSequence(),n.startSequence(Fe.BitString),n.writeByte(0),n.writeBuffer(i,Fe.Integer),n.endSequence(),n.endSequence(),Sn("PUBLIC",n.buffer)}a(Au,"genOpenSSLDSAPub");function bu(e,t,r,i){let n=Buffer.allocUnsafe(15+e.length+4+t.length+4+r.length+4+i.length);br(n,7,0),n.utf8Write("ssh-dss",4,7);let o=11;return br(n,e.length,o),n.set(e,o+=4),br(n,t.length,o+=e.length),n.set(t,o+=4),br(n,r.length,o+=t.length),n.set(r,o+=4),br(n,i.length,o+=r.length),n.set(i,o+4),n}a(bu,"genOpenSSHDSAPub");function kS(e,t,r,i,n){let o=new Fe.Writer;return o.startSequence(),o.writeInt(0,Fe.Integer),o.writeBuffer(e,Fe.Integer),o.writeBuffer(t,Fe.Integer),o.writeBuffer(r,Fe.Integer),o.writeBuffer(i,Fe.Integer),o.writeBuffer(n,Fe.Integer),o.endSequence(),Sn("DSA PRIVATE",o.buffer)}a(kS,"genOpenSSLDSAPriv");function CS(e){let t=new Fe.Writer;return t.startSequence(),t.startSequence(),t.writeOID("1.3.101.112"),t.endSequence(),t.startSequence(Fe.BitString),t.writeByte(0),t._ensure(e.length),t._buf.set(e,t._offset),t._offset+=e.length,t.endSequence(),t.endSequence(),Sn("PUBLIC",t.buffer)}a(CS,"genOpenSSLEdPub");function RS(e){let t=Buffer.allocUnsafe(19+e.length);return br(t,11,0),t.utf8Write("ssh-ed25519",4,11),br(t,e.length,15),t.set(e,19),t}a(RS,"genOpenSSHEdPub");function P4(e){let t=new Fe.Writer;return t.startSequence(),t.writeInt(0,Fe.Integer),t.startSequence(),t.writeOID("1.3.101.112"),t.endSequence(),t.startSequence(Fe.OctetString),t.writeBuffer(e,Fe.OctetString),t.endSequence(),t.endSequence(),Sn("PRIVATE",t.buffer)}a(P4,"genOpenSSLEdPriv");function $E(e,t){let r=new Fe.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.2.840.10045.2.1"),r.writeOID(e),r.endSequence(),r.startSequence(Fe.BitString),r.writeByte(0),r._ensure(t.length),r._buf.set(t,r._offset),r._offset+=t.length,r.endSequence(),r.endSequence(),Sn("PUBLIC",r.buffer)}a($E,"genOpenSSLECDSAPub");function DE(e,t){let r;switch(e){case"1.2.840.10045.3.1.7":r="nistp256";break;case"1.3.132.0.34":r="nistp384";break;case"1.3.132.0.35":r="nistp521";break;default:return}let i=Buffer.allocUnsafe(39+t.length);return br(i,19,0),i.utf8Write(`ecdsa-sha2-${r}`,4,19),br(i,8,23),i.utf8Write(r,27,8),br(i,t.length,35),i.set(t,39),i}a(DE,"genOpenSSHECDSAPub");function T4(e,t,r){let i=new Fe.Writer;return i.startSequence(),i.writeInt(1,Fe.Integer),i.writeBuffer(r,Fe.OctetString),i.startSequence(160),i.writeOID(e),i.endSequence(),i.startSequence(161),i.startSequence(Fe.BitString),i.writeByte(0),i._ensure(t.length),i._buf.set(t,i._offset),i._offset+=t.length,i.endSequence(),i.endSequence(),i.endSequence(),Sn("EC PRIVATE",i.buffer)}a(T4,"genOpenSSLECDSAPriv");function k4(e,t){let r=y4(e);return r.setPrivateKey(t),r.getPublicKey()}a(k4,"genOpenSSLECDSAPubFromPriv");var xu={sign:a(typeof wS=="function"?function(t,r){let i=this[vn];if(i===null)return new Error("No private key available");(!r||typeof r!="string")&&(r=this[ei]);try{return wS(r,t,i)}catch(n){return n}}:function(t,r){let i=this[vn];if(i===null)return new Error("No private key available");(!r||typeof r!="string")&&(r=this[ei]);let n=A4(r);n.update(t);try{return n.sign(i)}catch(o){return o}},"sign"),verify:a(typeof PS=="function"?function(t,r,i){let n=this[$n];if(n===null)return new Error("No public key available");(!i||typeof i!="string")&&(i=this[ei]);try{return PS(i,t,n,r)}catch(o){return o}}:function(t,r,i){let n=this[$n];if(n===null)return new Error("No public key available");(!i||typeof i!="string")&&(i=this[ei]);let o=b4(i);o.update(t);try{return o.verify(n,r)}catch(s){return s}},"verify"),isPrivateKey:a(function(){return this[vn]!==null},"isPrivateKey"),getPrivatePEM:a(function(){return this[vn]},"getPrivatePEM"),getPublicPEM:a(function(){return this[$n]},"getPublicPEM"),getPublicSSH:a(function(){return this[ki]},"getPublicSSH"),equals:a(function(t){let r=$S(t);return r instanceof Error?!1:this.type===r.type&&this[vn]===r[vn]&&this[$n]===r[$n]&&this[ki].equals(r[ki])},"equals")};function np(e,t,r,i,n,o,s){this.type=e,this.comment=t,this[vn]=r,this[$n]=i,this[ki]=n,this[ei]=o,this[Os]=s}a(np,"OpenSSH_Private");np.prototype=xu;{let t=function(r,i,n){let o=[];if(r.length<8)return new Error("Malformed OpenSSH private key");let s=hu(r,0),c=hu(r,4);if(s!==c)return n?new Error("OpenSSH key integrity check failed -- bad passphrase?"):new Error("OpenSSH key integrity check failed");r._pos=8;let u,l;for(u=0;u<i;++u){let p,g,h,_,y=Le(r,r._pos,!0);if(y===void 0)return new Error("Malformed OpenSSH private key");switch(y){case"ssh-rsa":{let v=Le(r,r._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");let S=Le(r,r._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");let M=Le(r,r._pos);if(M===void 0)return new Error("Malformed OpenSSH private key");let R=Le(r,r._pos);if(R===void 0)return new Error("Malformed OpenSSH private key");let J=Le(r,r._pos);if(J===void 0)return new Error("Malformed OpenSSH private key");let te=Le(r,r._pos);if(te===void 0)return new Error("Malformed OpenSSH private key");h=yu(v,S),_=Eu(v,S),g=TS(v,S,M,R,J,te),p="sha1";break}case"ssh-dss":{let v=Le(r,r._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");let S=Le(r,r._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");let M=Le(r,r._pos);if(M===void 0)return new Error("Malformed OpenSSH private key");let R=Le(r,r._pos);if(R===void 0)return new Error("Malformed OpenSSH private key");let J=Le(r,r._pos);if(J===void 0)return new Error("Malformed OpenSSH private key");h=Au(v,S,M,R),_=bu(v,S,M,R),g=kS(v,S,M,R,J),p="sha1";break}case"ssh-ed25519":{if(!OE)return new Error(`Unsupported OpenSSH private key type: ${y}`);let v=Le(r,r._pos);if(v===void 0||v.length!==32)return new Error("Malformed OpenSSH private key");let S=Le(r,r._pos);if(S===void 0||S.length!==64)return new Error("Malformed OpenSSH private key");h=CS(v),_=RS(v),g=P4(xo(S,0,32)),p=null;break}case"ecdsa-sha2-nistp256":p="sha256",l="1.2.840.10045.3.1.7";case"ecdsa-sha2-nistp384":p===void 0&&(p="sha384",l="1.3.132.0.34");case"ecdsa-sha2-nistp521":{if(p===void 0&&(p="sha512",l="1.3.132.0.35"),!NE(r,1))return new Error("Malformed OpenSSH private key");let v=Le(r,r._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");let S=Le(r,r._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");h=$E(l,v),_=DE(l,v),g=T4(l,v,S);break}default:return new Error(`Unsupported OpenSSH private key type: ${y}`)}let b=Le(r,r._pos,!0);if(b===void 0)return new Error("Malformed OpenSSH private key");o.push(new np(y,b,g,h,_,p,n))}let f=0;for(u=r._pos;u<r.length;++u)if(r[u]!==++f%255)return new Error("Malformed OpenSSH private key");return o};a(t,"parseOpenSSHPrivKeys");let e=/^-----BEGIN OPENSSH PRIVATE KEY-----(?:\r\n|\n)([\s\S]+)(?:\r\n|\n)-----END OPENSSH PRIVATE KEY-----$/;np.parse=(r,i)=>{let n=e.exec(r);if(n===null)return null;let o,s=Buffer.from(n[1],"base64");if(s.length<31)return new Error("Malformed OpenSSH private key");let c=s.utf8Slice(0,15);if(c!=="openssh-key-v1\0")return new Error(`Unsupported OpenSSH key magic: ${c}`);let u=Le(s,15,!0);if(u===void 0)return new Error("Malformed OpenSSH private key");if(u!=="none"&&S4.indexOf(u)===-1)return new Error(`Unsupported cipher for OpenSSH key: ${u}`);let l=Le(s,s._pos,!0);if(l===void 0)return new Error("Malformed OpenSSH private key");if(l!=="none"){if(u==="none")return new Error("Malformed OpenSSH private key");if(l!=="bcrypt")return new Error(`Unsupported kdf name for OpenSSH key: ${l}`);if(!i)return new Error("Encrypted private OpenSSH key detected, but no passphrase given")}else if(u!=="none")return new Error("Malformed OpenSSH private key");let f,p,g;u!=="none"&&(f=mu[u]);let h=Le(s,s._pos);if(h===void 0)return new Error("Malformed OpenSSH private key");if(h.length)switch(l){case"none":return new Error("Malformed OpenSSH private key");case"bcrypt":{let y=Le(h,0);if(y===void 0||h._pos+4>h.length)return new Error("Malformed OpenSSH private key");let b=hu(h,h._pos),v=Buffer.allocUnsafe(f.keyLen+f.ivLen);if(v4(i,i.length,y,y.length,v,v.length,b)!==0)return new Error("Failed to generate information to decrypt key");p=xo(v,0,f.keyLen),g=xo(v,f.keyLen,v.length);break}}else if(l!=="none")return new Error("Malformed OpenSSH private key");if(s._pos+3>=s.length)return new Error("Malformed OpenSSH private key");let _=hu(s,s._pos);if(s._pos+=4,_>0){for(let b=0;b<_;++b){let v=Le(s,s._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");if(Le(v,0,!0)===void 0)return new Error("Malformed OpenSSH private key")}let y=Le(s,s._pos);if(y===void 0)return new Error("Malformed OpenSSH private key");if(p!==void 0){if(y.length<f.blockLen||y.length%f.blockLen!==0)return new Error("Malformed OpenSSH private key");try{let b={authTagLength:f.authLen},v=RE(f.sslName,p,g,b);if(v.setAutoPadding(!1),f.authLen>0){if(s.length-s._pos<f.authLen)return new Error("Malformed OpenSSH private key");v.setAuthTag(xo(s,s._pos,s._pos+=f.authLen))}y=_u(v.update(y),v.final())}catch(b){return b}}if(s._pos!==s.length)return new Error("Malformed OpenSSH private key");o=t(y,_,p!==void 0)}else o=[];return o instanceof Error?o:o[0]}}function ip(e,t,r,i,n,o,s){this.type=e,this.comment=t,this[vn]=r,this[$n]=i,this[ki]=n,this[ei]=o,this[Os]=s}a(ip,"OpenSSH_Old_Private");ip.prototype=xu;{let e=/^-----BEGIN (RSA|DSA|EC) PRIVATE KEY-----(?:\r\n|\n)((?:[^:]+:\s*[\S].*(?:\r\n|\n))*)([\s\S]+)(?:\r\n|\n)-----END (RSA|DSA|EC) PRIVATE KEY-----$/;ip.parse=(t,r)=>{let i=e.exec(t);if(i===null)return null;let n=Buffer.from(i[3],"base64"),o=i[2],s=!1;if(o!==void 0){o=o.split(/\r\n|\n/g);for(let _=0;_<o.length;++_){let y=o[_],b=y.indexOf(":");if(y.slice(0,b)==="DEK-Info"){let v=y.slice(b+2);if(b=v.indexOf(","),b===-1)continue;let S=v.slice(0,b).toLowerCase();if(I4.indexOf(S)===-1)return new Error(`Cipher (${S}) not supported for encrypted OpenSSH private key`);let M=CE[S];if(!M)return new Error(`Cipher (${S}) not supported for encrypted OpenSSH private key`);let R=Buffer.from(v.slice(b+1),"hex");if(R.length!==M.ivLen)return new Error("Malformed encrypted OpenSSH private key");if(!r)return new Error("Encrypted OpenSSH private key detected, but no passphrase given");let J=xo(R,0,8),te=gu("md5").update(r).update(J).digest();for(;te.length<M.keyLen;)te=_u(te,gu("md5").update(te).update(r).update(J).digest());te.length>M.keyLen&&(te=xo(te,0,M.keyLen));try{let ee=RE(S,te,R);ee.setAutoPadding(!1),n=_u(ee.update(n),ee.final()),s=!0}catch(ee){return ee}}}}let c,u,l,f,p,g,h="Malformed OpenSSH private key";switch(s&&(h+=". Bad passphrase?"),i[1]){case"RSA":c="ssh-rsa",u=Sn("RSA PRIVATE",n);try{g=new Fe.Reader(n),g.readSequence(),g.readInt();let _=g.readString(Fe.Integer,!0);if(_===null)return new Error(h);let y=g.readString(Fe.Integer,!0);if(y===null)return new Error(h);l=yu(_,y),f=Eu(_,y)}catch{return new Error(h)}p="sha1";break;case"DSA":c="ssh-dss",u=Sn("DSA PRIVATE",n);try{g=new Fe.Reader(n),g.readSequence(),g.readInt();let _=g.readString(Fe.Integer,!0);if(_===null)return new Error(h);let y=g.readString(Fe.Integer,!0);if(y===null)return new Error(h);let b=g.readString(Fe.Integer,!0);if(b===null)return new Error(h);let v=g.readString(Fe.Integer,!0);if(v===null)return new Error(h);l=Au(_,y,b,v),f=bu(_,y,b,v)}catch{return new Error(h)}p="sha1";break;case"EC":{let _,y,b;try{g=new Fe.Reader(n),g.readSequence(),g.readInt(),y=g.readString(Fe.OctetString,!0),g.readByte();let S=g.readLength();if(S!==null){if(g._offset=S,b=g.readOID(),b===null)return new Error(h);switch(b){case"1.2.840.10045.3.1.7":_="prime256v1",c="ecdsa-sha2-nistp256",p="sha256";break;case"1.3.132.0.34":_="secp384r1",c="ecdsa-sha2-nistp384",p="sha384";break;case"1.3.132.0.35":_="secp521r1",c="ecdsa-sha2-nistp521",p="sha512";break;default:return new Error(`Unsupported private key EC OID: ${b}`)}}else return new Error(h)}catch{return new Error(h)}u=Sn("EC PRIVATE",n);let v=k4(_,y);l=$E(b,v),f=DE(b,v);break}}return new ip(c,"",u,l,f,p,s)}}function op(e,t,r,i,n,o,s){this.type=e,this.comment=t,this[vn]=r,this[$n]=i,this[ki]=n,this[ei]=o,this[Os]=s}a(op,"PPK_Private");op.prototype=xu;{let e=Buffer.alloc(0),t=Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r=Buffer.from([0,0,0,0]),i=Buffer.from([0,0,0,1]),n=/^PuTTY-User-Key-File-2: (ssh-(?:rsa|dss))\r?\nEncryption: (aes256-cbc|none)\r?\nComment: ([^\r\n]*)\r?\nPublic-Lines: \d+\r?\n([\s\S]+?)\r?\nPrivate-Lines: \d+\r?\n([\s\S]+?)\r?\nPrivate-MAC: ([^\r\n]+)/;op.parse=(o,s)=>{let c=n.exec(o);if(c===null)return null;let u=c[2],l=u!=="none";if(l&&!s)return new Error("Encrypted PPK private key detected, but no passphrase given");let f=Buffer.from(c[5],"base64");if(l){let H=mu[u],U=_u(gu("sha1").update(r).update(s).digest(),gu("sha1").update(i).update(s).digest());U.length>H.keyLen&&(U=xo(U,0,H.keyLen));try{let k=RE(H.sslName,U,t);k.setAutoPadding(!1),f=_u(k.update(f),k.final())}catch(k){return k}}let p=c[1],g=c[3],h=Buffer.from(c[4],"base64"),_=c[6],y=p.length,b=u.length,v=Buffer.byteLength(g),S=h.length,M=f.length,R=Buffer.allocUnsafe(4+y+4+b+4+v+4+S+4+M),J=0;if(br(R,y,J),R.utf8Write(p,J+=4,y),br(R,b,J+=y),R.utf8Write(u,J+=4,b),br(R,v,J+=b),R.utf8Write(g,J+=4,v),br(R,S,J+=v),R.set(h,J+=4),br(R,M,J+=S),R.set(f,J+4),s||(s=e),E4("sha1",gu("sha1").update("putty-private-key-file-mac-key").update(s).digest()).update(R).digest("hex")!==_)return l?new Error("PPK private key integrity check failed -- bad passphrase?"):new Error("PPK private key integrity check failed");let ee,P,C;switch(h._pos=0,NE(h,1),p){case"ssh-rsa":{let H=Le(h,h._pos);if(H===void 0)return new Error("Malformed PPK public key");let U=Le(h,h._pos);if(U===void 0)return new Error("Malformed PPK public key");let k=Le(f,0);if(k===void 0)return new Error("Malformed PPK private key");let j=Le(f,f._pos);if(j===void 0)return new Error("Malformed PPK private key");let W=Le(f,f._pos);if(W===void 0)return new Error("Malformed PPK private key");let z=Le(f,f._pos);if(z===void 0)return new Error("Malformed PPK private key");ee=yu(U,H),P=Eu(U,H),C=TS(U,H,k,z,j,W);break}case"ssh-dss":{let H=Le(h,h._pos);if(H===void 0)return new Error("Malformed PPK public key");let U=Le(h,h._pos);if(U===void 0)return new Error("Malformed PPK public key");let k=Le(h,h._pos);if(k===void 0)return new Error("Malformed PPK public key");let j=Le(h,h._pos);if(j===void 0)return new Error("Malformed PPK public key");let W=Le(f,0);if(W===void 0)return new Error("Malformed PPK private key");ee=Au(H,U,k,j),P=bu(H,U,k,j),C=kS(H,U,k,j,W);break}}return new op(p,g,C,ee,P,"sha1",l)}}function ap(e,t,r,i,n){this.type=e,this.comment=t,this[vn]=null,this[$n]=r,this[ki]=i,this[ei]=n,this[Os]=!1}a(ap,"OpenSSH_Public");ap.prototype=xu;{let e;OE?e=/^(((?:ssh-(?:rsa|dss|ed25519))|ecdsa-sha2-nistp(?:256|384|521))(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z/+=]+)(?:$|\s+([\S].*)?)$/:e=/^(((?:ssh-(?:rsa|dss))|ecdsa-sha2-nistp(?:256|384|521))(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z/+=]+)(?:$|\s+([\S].*)?)$/,ap.parse=t=>{let r=e.exec(t);if(r===null)return null;let i=r[1],n=r[2],o=Buffer.from(r[3],"base64"),s=r[4]||"",c=Le(o,o._pos,!0);return c===void 0||c.indexOf(n)!==0?new Error("Malformed OpenSSH public key"):BE(o,n,s,i)}}function sp(e,t,r,i,n){this.type=e,this.comment=t,this[vn]=null,this[$n]=r,this[ki]=i,this[ei]=n,this[Os]=!1}a(sp,"RFC4716_Public");sp.prototype=xu;{let e=/^---- BEGIN SSH2 PUBLIC KEY ----(?:\r?\n)((?:.{0,72}\r?\n)+)---- END SSH2 PUBLIC KEY ----$/,t=/^[A-Z0-9a-z/+=\r\n]+$/,r=/^([\x21-\x39\x3B-\x7E]{1,64}): ((?:[^\\]*\\\r?\n)*[^\r\n]+)\r?\n/gm,i=/\\\r?\n/g;sp.parse=n=>{let o=e.exec(n);if(o===null)return null;let s=o[1],c=0,u="";for(;o=r.exec(s);){let h=o[1],_=o[2].replace(i,"");if(_.length>1024)return r.lastIndex=0,new Error("Malformed RFC4716 public key");c=r.lastIndex,h.toLowerCase()==="comment"&&(u=_,u.length>1&&u.charCodeAt(0)===34&&u.charCodeAt(u.length-1)===34&&(u=u.slice(1,-1)))}let l=s.slice(c);if(!t.test(l))return new Error("Malformed RFC4716 public key");l=Buffer.from(l,"base64");let f=Le(l,0,!0);if(f===void 0)return new Error("Malformed RFC4716 public key");let p=null,g=null;switch(f){case"ssh-rsa":{let h=Le(l,l._pos);if(h===void 0)return new Error("Malformed RFC4716 public key");let _=Le(l,l._pos);if(_===void 0)return new Error("Malformed RFC4716 public key");p=yu(_,h),g=Eu(_,h);break}case"ssh-dss":{let h=Le(l,l._pos);if(h===void 0)return new Error("Malformed RFC4716 public key");let _=Le(l,l._pos);if(_===void 0)return new Error("Malformed RFC4716 public key");let y=Le(l,l._pos);if(y===void 0)return new Error("Malformed RFC4716 public key");let b=Le(l,l._pos);if(b===void 0)return new Error("Malformed RFC4716 public key");p=Au(h,_,y,b),g=bu(h,_,y,b);break}default:return new Error("Malformed RFC4716 public key")}return new sp(f,u,p,g,"sha1")}}function BE(e,t,r,i){if(!OS(t))return new Error(`Unsupported OpenSSH public key type: ${t}`);let n,o,s=null,c=null;switch(t){case"ssh-rsa":{let u=Le(e,e._pos||0);if(u===void 0)return new Error("Malformed OpenSSH public key");let l=Le(e,e._pos);if(l===void 0)return new Error("Malformed OpenSSH public key");s=yu(l,u),c=Eu(l,u),n="sha1";break}case"ssh-dss":{let u=Le(e,e._pos||0);if(u===void 0)return new Error("Malformed OpenSSH public key");let l=Le(e,e._pos);if(l===void 0)return new Error("Malformed OpenSSH public key");let f=Le(e,e._pos);if(f===void 0)return new Error("Malformed OpenSSH public key");let p=Le(e,e._pos);if(p===void 0)return new Error("Malformed OpenSSH public key");s=Au(u,l,f,p),c=bu(u,l,f,p),n="sha1";break}case"ssh-ed25519":{let u=Le(e,e._pos||0);if(u===void 0||u.length!==32)return new Error("Malformed OpenSSH public key");s=CS(u),c=RS(u),n=null;break}case"ecdsa-sha2-nistp256":n="sha256",o="1.2.840.10045.3.1.7";case"ecdsa-sha2-nistp384":n===void 0&&(n="sha384",o="1.3.132.0.34");case"ecdsa-sha2-nistp521":{if(n===void 0&&(n="sha512",o="1.3.132.0.35"),!NE(e,1))return new Error("Malformed OpenSSH public key");let u=Le(e,e._pos||0);if(u===void 0)return new Error("Malformed OpenSSH public key");s=$E(o,u),c=DE(o,u);break}default:return new Error(`Unsupported OpenSSH public key type: ${t}`)}return new ap(i,r,s,c,n)}a(BE,"parseDER");function OS(e){switch(e){case"ssh-rsa":case"ssh-dss":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":return!0;case"ssh-ed25519":if(OE)return!0;default:return!1}}a(OS,"isSupportedKeyType");function NS(e){return e?typeof e[Os]=="boolean":!1}a(NS,"isParsedKey");function $S(e,t){if(NS(e))return e;let r;if(Buffer.isBuffer(e))r=e,e=e.utf8Slice(0,e.length).trim();else if(typeof e=="string")e=e.trim();else return new Error("Key data must be a Buffer or string");if(t!=null){if(typeof t=="string")t=Buffer.from(t);else if(!Buffer.isBuffer(t))return new Error("Passphrase must be a string or Buffer when supplied")}let i;if((i=np.parse(e,t))!==null||(i=ip.parse(e,t))!==null||(i=op.parse(e,t))!==null||(i=ap.parse(e))!==null||(i=sp.parse(e))!==null)return i;if(r){rp.init(r,0);let n=rp.readString(!0);n!==void 0&&(e=rp.readRaw(),e!==void 0&&(i=BE(e,n,"",n),i instanceof Error&&(i=null))),rp.clear()}return i||new Error("Unsupported key format")}a($S,"parseKey");DS.exports={isParsedKey:NS,isSupportedKeyType:OS,parseDERKey:a((e,t)=>BE(e,t,"",t),"parseDERKey"),parseKey:$S}});var HE=me((HQ,qS)=>{"use strict";var{Socket:US}=require("net"),{Duplex:MS}=require("stream"),{resolve:C4}=require("path"),{readFile:BS}=require("fs"),{execFile:R4,spawn:O4}=require("child_process"),{isParsedKey:zS,parseKey:Iu}=Ci(),{makeBufferParser:N4,readUInt32BE:FE,writeUInt32BE:Qr,writeUInt32LE:LS}=In();function vu(e){let t=!1;return(...r)=>{t||(t=!0,e(...r))}}a(vu,"once");function $4(e,t){let r=Buffer.allocUnsafe(e.length+t.length);return e.copy(r,0),t.copy(r,e.length),r}a($4,"concat");function LE(){}a(LE,"noop");var D4=Buffer.alloc(0),Kt=N4(),Su=class{static{a(this,"BaseAgent")}getIdentities(t){t(new Error("Missing getIdentities() implementation"))}sign(t,r,i,n){typeof i=="function"&&(n=i),n(new Error("Missing sign() implementation"))}},$s=class extends Su{static{a(this,"OpenSSHAgent")}constructor(t){super(),this.socketPath=t}getStream(t){t=vu(t);let r=new US;r.on("connect",()=>{t(null,r)}),r.on("close",i).on("end",i).on("error",i),r.connect(this.socketPath);function i(){try{r.destroy()}catch{}t(new Error("Failed to connect to agent"))}a(i,"onFail")}getIdentities(t){t=vu(t),this.getStream((r,i)=>{function n(s){if(i)try{i.destroy()}catch{}s||(s=new Error("Failed to retrieve identities from agent")),t(s)}if(a(n,"onFail"),r)return n(r);let o=new UE(!0);o.on("error",n),o.pipe(i).pipe(o),i.on("close",n).on("end",n).on("error",n),o.getIdentities((s,c)=>{if(s)return n(s);try{i.destroy()}catch{}t(null,c)})})}sign(t,r,i,n){typeof i=="function"?(n=i,i=void 0):(typeof i!="object"||i===null)&&(i=void 0),n=vu(n),this.getStream((o,s)=>{function c(l){if(s)try{s.destroy()}catch{}l||(l=new Error("Failed to sign data with agent")),n(l)}if(a(c,"onFail"),o)return c(o);let u=new UE(!0);u.on("error",c),u.pipe(s).pipe(u),s.on("close",c).on("end",c).on("error",c),u.sign(t,r,i,(l,f)=>{if(l)return c(l);try{s.destroy()}catch{}n(null,f)})})}},FS=(()=>{let s=C4(__dirname,"..","util/pagent.exe"),c={10:new Error("Invalid pagent.exe arguments"),11:new Error("Pageant is not running"),12:new Error("pagent.exe could not create an mmap"),13:new Error("pagent.exe could not set mode for stdin"),14:new Error("pagent.exe could not set mode for stdout"),15:new Error("pagent.exe did not get expected input payload")};function u(f){f.buffer=null,f.proc&&(f.proc.kill(),f.proc=void 0)}a(u,"destroy");class l extends MS{static{a(this,"PageantSocket")}constructor(){super(),this.proc=void 0,this.buffer=null}_read(p){}_write(p,g,h){if(this.buffer===null)this.buffer=p;else{let v=Buffer.allocUnsafe(this.buffer.length+p.length);this.buffer.copy(v,0),p.copy(v,this.buffer.length),this.buffer=v}if(this.buffer.length<4)return h();let _=FE(this.buffer,0);if(this.buffer.length-4<_)return h();if(p=this.buffer.slice(0,4+_),this.buffer.length>4+_)return h(new Error("Unexpected multiple agent requests"));this.buffer=null;let y,b=this.proc=O4(s,[p.length]);b.stdout.on("data",v=>{this.push(v)}),b.on("error",v=>{y=v,h(y)}),b.on("close",v=>{if(this.proc=void 0,!y){if(y=c[v])return h(y);h()}}),b.stdin.end(p)}_final(p){u(this),p()}_destroy(p,g){u(this),g()}}return class extends $s{static{a(this,"PageantAgent")}getStream(p){p(null,new l)}}})(),HS=(()=>{let e=/^!<socket >(\d+) s ([A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8})/;return class extends $s{static{a(this,"CygwinAgent")}getStream(r){r=vu(r);let i=this.socketPath,n=!1;BS(i,a(function o(s,c){if(s){if(n)return r(new Error("Invalid cygwin unix socket path"));R4("cygpath",["-w",i],(te,ee,P)=>{if(te||ee.length===0)return r(new Error("Invalid cygwin unix socket path"));n=!0,i=ee.toString().replace(/[\r\n]/g,""),BS(i,o)});return}let u=e.exec(c.toString("ascii"));if(!u)return r(new Error("Malformed cygwin unix socket file"));let l,f=0,p=!1,g=[],h,_=Buffer.alloc(12),y=parseInt(u[1],10),b=u[2].replace(/-/g,""),v=Buffer.allocUnsafe(16);for(let te=0,ee=0;ee<32;++te,ee+=2)v[te]=parseInt(b.substring(ee,ee+2),16);for(let te=0;te<16;te+=4)LS(v,FE(v,te),te);J();function S(){f=0,l="secret",h.write(v)}a(S,"_onconnect");function M(te){if(f+=te.length,l==="secret"){f===16&&(f=0,l="creds",h.write(_));return}if(l==="creds"&&(p||g.push(te),f===12)){if(h.removeListener("connect",S),h.removeListener("data",M),h.removeListener("error",R),h.removeListener("end",R),h.removeListener("close",R),p)return r(null,h);p=!0,_=Buffer.concat(g),LS(_,process.pid,0),h.on("error",()=>{}),h.destroy(),J()}}a(M,"_ondata");function R(){r(new Error("Problem negotiating cygwin unix socket security"))}a(R,"onFail");function J(){h=new US,h.on("connect",S),h.on("data",M),h.on("error",R),h.on("end",R),h.on("close",R),h.connect(y)}a(J,"tryConnect")},"readCygsocket"))}}})(),B4=/^[/\\][/\\]\.[/\\]pipe[/\\].+/;function jS(e){return process.platform==="win32"&&!B4.test(e)?e==="pageant"?new FS:new HS(e):new $s(e)}a(jS,"createAgent");var UE=(()=>{function l(P){let C;for(;P[S].length;){let H=P[S][0][p];if(H===void 0)break;P[S].shift(),C=P.push(H)}return C}a(l,"processResponses");let f=Symbol("Inbound Request Type"),p=Symbol("Inbound Request Response"),g=Symbol("Inbound Request Context");class h{static{a(this,"AgentInboundRequest")}constructor(C,H){this[f]=C,this[p]=void 0,this[g]=H}hasResponded(){return this[p]!==void 0}getType(){return this[f]}getContext(){return this[g]}}function _(P,C,H){return C[p]=H,l(P)}a(_,"respond");function y(P){if(P[R]=null,P[M]===0){let C=P[S];if(C&&C.length){P[S]=[];for(let H of C)H.cb(new Error("No reply from server"))}}try{P.end()}catch{}setImmediate(()=>{P[ee]||P.emit("end"),P[te]||P.emit("close")})}a(y,"cleanup");function b(){this[te]=!0}a(b,"onClose");function v(){this[ee]=!0}a(v,"onEnd");let S=Symbol("Requests"),M=Symbol("Agent Protocol Role"),R=Symbol("Agent Protocol Buffer"),J=Symbol("Agent Protocol Current Message Length"),te=Symbol("Agent Protocol Closed"),ee=Symbol("Agent Protocol Ended");return class extends MS{static{a(this,"AgentProtocol")}constructor(C){super({autoDestroy:!0,emitClose:!1}),this[M]=C?0:1,this[S]=[],this[R]=null,this[J]=-1,this.once("end",v),this.once("close",b)}_read(C){}_write(C,H,U){this[R]===null?this[R]=C:this[R]=$4(this[R],C);let k=this[R],j=k.length,W=0;for(;W<j&&!(j<5||(this[J]===-1&&(this[J]=FE(k,W)),j<4+this[J]));){let z=k[W+=4];if(++W,this[M]===0){if(this[S].length===0)return U(new Error("Received unexpected message from server"));let X=this[S].shift();switch(z){case 5:X.cb(new Error("Agent responded with failure"));break;case 12:{if(X.type!==11)return U(new Error("Agent responded with wrong message type"));Kt.init(k,W);let ne=Kt.readUInt32BE();if(ne===void 0)return Kt.clear(),U(new Error("Malformed agent response"));let O=[];for(let q=0;q<ne;++q){let V=Kt.readString();if(V===void 0)return Kt.clear(),U(new Error("Malformed agent response"));let re=Kt.readString(!0);if(re===void 0)return Kt.clear(),U(new Error("Malformed agent response"));V=Iu(V),!(V instanceof Error)&&(V.comment=V.comment||re,O.push(V))}W=Kt.pos(),Kt.clear(),X.cb(null,O);break}case 14:{if(X.type!==13)return U(new Error("Agent responded with wrong message type"));Kt.init(k,W);let ne=Kt.readString();if(W=Kt.pos(),Kt.clear(),ne===void 0)return U(new Error("Malformed agent response"));if(Kt.init(ne,0),Kt.readString(!0),ne=Kt.readString(),Kt.clear(),ne===void 0)return U(new Error("Malformed OpenSSH signature format"));X.cb(null,ne);break}default:return U(new Error("Agent responded with unsupported message type"))}}else switch(z){case 11:{let X=new h(z);this[S].push(X),this.emit("identities",X);break}case 13:{Kt.init(k,W);let X=Kt.readString(),ne=Kt.readString(),O=Kt.readUInt32BE();if(W=Kt.pos(),Kt.clear(),O===void 0){let _e=new h(z);return this[S].push(_e),this.failureReply(_e)}if(X=Iu(X),X instanceof Error){let _e=new h(z);return this[S].push(_e),this.failureReply(_e)}let q={hash:void 0},V;X.type==="ssh-rsa"&&(O&2?(V="rsa-sha2-256",q.hash="sha256"):O&4&&(V="rsa-sha2-512",q.hash="sha512")),V===void 0&&(V=X.type);let re=new h(z,V);this[S].push(re),this.emit("sign",re,X,ne,q);break}default:{let X=new h(z);this[S].push(X),this.failureReply(X)}}if(this[J]=-1,W===j){this[R]=null;break}else this[R]=k=k.slice(W),j=k.length,W=0}U()}_destroy(C,H){y(this),H()}_final(C){y(this),C()}sign(C,H,U,k){if(this[M]!==0)throw new Error("Client-only method called with server role");typeof U=="function"?(k=U,U=void 0):(typeof U!="object"||U===null)&&(U=void 0);let j=0;if(C=Iu(C),C instanceof Error)throw new Error("Invalid public key argument");if(C.type==="ssh-rsa"&&U)switch(U.hash){case"sha256":j=2;break;case"sha512":j=4;break}C=C.getPublicSSH();let W=13,z=C.length,X=H.length,ne=0,O=Buffer.allocUnsafe(9+z+4+X+4);return Qr(O,O.length-4,ne),O[ne+=4]=W,Qr(O,z,++ne),C.copy(O,ne+=4),Qr(O,X,ne+=z),H.copy(O,ne+=4),Qr(O,j,ne+=X),typeof k!="function"&&(k=LE),this[S].push({type:W,cb:k}),this.push(O)}getIdentities(C){if(this[M]!==0)throw new Error("Client-only method called with server role");let H=11,U=0,k=Buffer.allocUnsafe(5);return Qr(k,k.length-4,U),k[U+=4]=H,typeof C!="function"&&(C=LE),this[S].push({type:H,cb:C}),this.push(k)}failureReply(C){if(this[M]!==1)throw new Error("Server-only method called with client role");if(!(C instanceof h))throw new Error("Wrong request argument");if(C.hasResponded())return!0;let H=0,U=Buffer.allocUnsafe(5);return Qr(U,U.length-4,H),U[H+=4]=5,_(this,C,U)}getIdentitiesReply(C,H){if(this[M]!==1)throw new Error("Server-only method called with client role");if(!(C instanceof h))throw new Error("Wrong request argument");if(C.hasResponded())return!0;if(C.getType()!==11)throw new Error("Invalid response to request");if(!Array.isArray(H))throw new Error("Keys argument must be an array");let U=4,k=[];for(let z=0;z<H.length;++z){let X=H[z];if(typeof X!="object"||X===null)throw new Error(`Invalid key entry: ${X}`);let ne,O;if(zS(X))ne=X;else if(zS(X.pubKey))ne=X.pubKey;else if(typeof X.pubKey!="object"||X.pubKey===null||({pubKey:ne,comment:O}=X.pubKey,ne=Iu(ne),ne instanceof Error))continue;O=ne.comment||O,ne=ne.getPublicSSH(),U+=4+ne.length,O&&typeof O=="string"?O=Buffer.from(O):Buffer.isBuffer(O)||(O=D4),U+=4+O.length,k.push({pubKey:ne,comment:O})}let j=0,W=Buffer.allocUnsafe(5+U);Qr(W,W.length-4,j),W[j+=4]=12,Qr(W,k.length,++j),j+=4;for(let z=0;z<k.length;++z){let{pubKey:X,comment:ne}=k[z];Qr(W,X.length,j),X.copy(W,j+=4),Qr(W,ne.length,j+=X.length),j+=4,ne.length&&(ne.copy(W,j),j+=ne.length)}return _(this,C,W)}signReply(C,H){if(this[M]!==1)throw new Error("Server-only method called with client role");if(!(C instanceof h))throw new Error("Wrong request argument");if(C.hasResponded())return!0;if(C.getType()!==13)throw new Error("Invalid response to request");if(!Buffer.isBuffer(H))throw new Error("Signature argument must be a Buffer");if(H.length===0)throw new Error("Signature argument must be non-empty");let U=0,k=C.getContext(),j=Buffer.byteLength(k),W=Buffer.allocUnsafe(13+j+4+H.length);return Qr(W,W.length-4,U),W[U+=4]=14,Qr(W,4+j+4+H.length,++U),Qr(W,j,U+=4),W.utf8Write(k,U+=4,j),Qr(W,H.length,U+=j),H.copy(W,U+=4),_(this,C,W)}}})(),zE=Symbol("Agent"),wn=Symbol("Agent Keys"),ti=Symbol("Agent Keys Index"),Ns=Symbol("Agent Init Callbacks"),ME=class{static{a(this,"AgentContext")}constructor(t){if(typeof t=="string")t=jS(t);else if(!WS(t))throw new Error("Invalid agent argument");this[zE]=t,this[wn]=null,this[ti]=-1,this[Ns]=null}init(t){if(typeof t!="function"&&(t=LE),this[wn]===null)if(this[Ns]===null){this[Ns]=[t];let r=a((...i)=>{process.nextTick(()=>{let n=this[Ns];this[Ns]=null;for(let o of n)o(...i)})},"doCbs");this[zE].getIdentities(vu((i,n)=>{if(i)return r(i);if(!Array.isArray(n))return r(new Error("Agent implementation failed to provide keys"));let o=[];for(let s of n)s=Iu(s),!(s instanceof Error)&&o.push(s);this[wn]=o,this[ti]=-1,r()}))}else this[Ns].push(t);else process.nextTick(t)}nextKey(){return this[wn]===null||++this[ti]>=this[wn].length?!1:this[wn][this[ti]]}currentKey(){return this[wn]===null||this[ti]>=this[wn].length?null:this[wn][this[ti]]}pos(){return this[wn]===null||this[ti]>=this[wn].length?-1:this[ti]}reset(){this[ti]=-1}sign(...t){this[zE].sign(...t)}};function WS(e){return e instanceof Su}a(WS,"isAgent");qS.exports={AgentContext:ME,AgentProtocol:UE,BaseAgent:Su,createAgent:jS,CygwinAgent:HS,isAgent:WS,OpenSSHAgent:$s,PageantAgent:FS}});var QE=me((WQ,VS)=>{"use strict";var{kMaxLength:z4}=require("buffer"),{createInflate:L4,constants:{DEFLATE:U4,INFLATE:M4,Z_DEFAULT_CHUNK:F4,Z_DEFAULT_COMPRESSION:H4,Z_DEFAULT_MEMLEVEL:j4,Z_DEFAULT_STRATEGY:W4,Z_DEFAULT_WINDOWBITS:q4,Z_PARTIAL_FLUSH:V4}}=require("zlib"),Z4=L4()._handle.constructor;function Q4(){throw new Error("Should not get here")}a(Q4,"processCallback");function K4(e,t,r){let i=this._owner,n=new Error(e);n.errno=t,n.code=r,i._err=n}a(K4,"zlibOnError");function ZE(e){e._handle&&(e._handle.close(),e._handle=null)}a(ZE,"_close");var cp=class{static{a(this,"Zlib")}constructor(t){let r=q4,i=H4,n=j4,o=W4,s=void 0;this._err=void 0,this._writeState=new Uint32Array(2),this._chunkSize=F4,this._maxOutputLength=z4,this._outBuffer=Buffer.allocUnsafe(this._chunkSize),this._outOffset=0,this._handle=new Z4(t),this._handle._owner=this,this._handle.onerror=K4,this._handle.init(r,i,n,o,this._writeState,Q4,s)}writeSync(t,r){let i=this._handle;if(!i)throw new Error("Invalid Zlib instance");let n=t.length,o=this._chunkSize-this._outOffset,s=0,c,u,l,f=0,p=this._writeState,g=this._outBuffer,h=this._outOffset,_=this._chunkSize;for(;;){if(i.writeSync(V4,t,s,n,g,h,o),this._err)throw this._err;c=p[0],u=p[1];let b=n-u,v=o-c;if(v>0){let S=h===0&&v===g.length?g:g.slice(h,h+v);if(h+=v,l?l.push===void 0?l=[l,S]:l.push(S):l=S,f+=S.byteLength,f>this._maxOutputLength)throw ZE(this),new Error(`Output length exceeded maximum of ${this._maxOutputLength}`)}else if(v!==0)throw new Error("have should not go down");if((c===0||h>=_)&&(o=_,h=0,g=Buffer.allocUnsafe(_)),c===0)s+=b,n=u;else break}if(this._outBuffer=g,this._outOffset=h,f===0&&(l=Buffer.alloc(0)),r)return l.totalLen=f,l;if(l.push===void 0)return l;let y=Buffer.allocUnsafe(f);for(let b=0,v=0;b<l.length;++b){let S=l[b];y.set(S,v),v+=S.length}return y}},jE=class{static{a(this,"ZlibPacketWriter")}constructor(t){this.allocStart=0,this.allocStartKEX=0,this._protocol=t,this._zlib=new cp(U4)}cleanup(){this._zlib&&ZE(this._zlib)}alloc(t,r){return Buffer.allocUnsafe(t)}finalize(t,r){if(this._protocol._kexinit===void 0||r){let i=this._zlib.writeSync(t,!0),n=this._protocol._cipher.allocPacket(i.totalLen);if(i.push===void 0)n.set(i,5);else for(let o=0,s=5;o<i.length;++o){let c=i[o];n.set(c,s),s+=c.length}return n}return t}},WE=class{static{a(this,"PacketWriter")}constructor(t){this.allocStart=5,this.allocStartKEX=5,this._protocol=t}cleanup(){}alloc(t,r){return this._protocol._kexinit===void 0||r?this._protocol._cipher.allocPacket(t):Buffer.allocUnsafe(t)}finalize(t,r){return t}},qE=class{static{a(this,"ZlibPacketReader")}constructor(){this._zlib=new cp(M4)}cleanup(){this._zlib&&ZE(this._zlib)}read(t){return this._zlib.writeSync(t,!1)}},VE=class{static{a(this,"PacketReader")}cleanup(){}read(t){return t}};VS.exports={PacketReader:VE,PacketWriter:WE,ZlibPacketReader:qE,ZlibPacketWriter:jE}});var YS=me((VQ,GS)=>{"use strict";var{bufferSlice:KE,bufferParser:B,doFatalError:Lt,sigSSHToASN1:ZS,writeUInt32BE:QS}=In(),{CHANNEL_OPEN_FAILURE:G4,COMPAT:Y4,MESSAGE:Ut,TERMINAL_MODE:KS}=Jn(),{parseKey:X4}=Ci(),J4=Array.from(Object.entries(KS)).reduce((e,[t,r])=>({...e,[t]:r}),{});GS.exports={[Ut.DISCONNECT]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readString(!0),n=B.readString();if(B.clear(),n===void 0)return Lt(e,"Inbound: Malformed DISCONNECT packet");e._debug&&e._debug(`Inbound: Received DISCONNECT (${r}, "${i}")`);let o=e._handlers.DISCONNECT;o&&o(e,r,i)},[Ut.IGNORE]:(e,t)=>{e._debug&&e._debug("Inbound: Received IGNORE")},[Ut.UNIMPLEMENTED]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed UNIMPLEMENTED packet");e._debug&&e._debug(`Inbound: Received UNIMPLEMENTED (seqno ${r})`)},[Ut.DEBUG]:(e,t)=>{B.init(t,1);let r=B.readBool(),i=B.readString(!0),n=B.readString();if(B.clear(),n===void 0)return Lt(e,"Inbound: Malformed DEBUG packet");e._debug&&e._debug("Inbound: Received DEBUG");let o=e._handlers.DEBUG;o&&o(e,r,i)},[Ut.SERVICE_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readString(!0);if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed SERVICE_REQUEST packet");e._debug&&e._debug(`Inbound: Received SERVICE_REQUEST (${r})`);let i=e._handlers.SERVICE_REQUEST;i&&i(e,r)},[Ut.SERVICE_ACCEPT]:(e,t)=>{B.init(t,1);let r=B.readString(!0);if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed SERVICE_ACCEPT packet");e._debug&&e._debug(`Inbound: Received SERVICE_ACCEPT (${r})`);let i=e._handlers.SERVICE_ACCEPT;i&&i(e,r)},[Ut.EXT_INFO]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i;if(r!==void 0){i=[];for(let o=0;o<r;++o){let s=B.readString(!0),c=B.readString();if(c!==void 0)if(s==="server-sig-algs"){let u=c.latin1Slice(0,c.length).split(",");i.push({name:s,algs:u});continue}else continue;i=void 0;break}}if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed EXT_INFO packet");e._debug&&e._debug("Inbound: Received EXT_INFO");let n=e._handlers.EXT_INFO;n&&n(e,i)},[Ut.USERAUTH_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readString(!0),n=B.readString(!0),o,s;switch(n){case"none":o=null;break;case"password":{let u=B.readBool();if(u!==void 0&&(o=B.readString(!0),o!==void 0&&u)){let l=B.readString(!0);l!==void 0?o={oldPassword:o,newPassword:l}:o=void 0}break}case"publickey":{let u=B.readBool();if(u!==void 0){let l=B.readString(!0),f=l,p=B.readString(),g;switch(l){case"rsa-sha2-256":f="ssh-rsa",g="sha256";break;case"rsa-sha2-512":f="ssh-rsa",g="sha512";break}if(u){let h=B.pos(),_=B.readString();if(_!==void 0&&(_.length>4+l.length+4&&_.utf8Slice(4,4+l.length)===l&&(_=KE(_,4+l.length+4)),_=ZS(_,f),_)){let y=e._kex.sessionID,b=Buffer.allocUnsafe(4+y.length+h);QS(b,y.length,0),b.set(y,4),b.set(new Uint8Array(t.buffer,t.byteOffset,h),4+y.length),o={keyAlgo:f,key:p,signature:_,blob:b,hashAlgo:g}}}else o={keyAlgo:f,key:p,hashAlgo:g},s="publickey -- check"}break}case"hostbased":{let u=B.readString(!0),l=u,f=B.readString(),p=B.readString(!0),g=B.readString(!0),h;switch(u){case"rsa-sha2-256":l="ssh-rsa",h="sha256";break;case"rsa-sha2-512":l="ssh-rsa",h="sha512";break}let _=B.pos(),y=B.readString();if(y!==void 0&&(y.length>4+u.length+4&&y.utf8Slice(4,4+u.length)===u&&(y=KE(y,4+u.length+4)),y=ZS(y,l),y!==void 0)){let b=e._kex.sessionID,v=Buffer.allocUnsafe(4+b.length+_);QS(v,b.length,0),v.set(b,4),v.set(new Uint8Array(t.buffer,t.byteOffset,_),4+b.length),o={keyAlgo:l,key:f,signature:y,blob:v,localHostname:p,localUsername:g,hashAlgo:h}}break}case"keyboard-interactive":B.skipString(),o=B.readList();break;default:n!==void 0&&(o=B.readRaw())}if(B.clear(),o===void 0)return Lt(e,"Inbound: Malformed USERAUTH_REQUEST packet");s===void 0&&(s=n),e._authsQueue.push(n),e._debug&&e._debug(`Inbound: Received USERAUTH_REQUEST (${s})`);let c=e._handlers.USERAUTH_REQUEST;c&&c(e,r,i,n,o)},[Ut.USERAUTH_FAILURE]:(e,t)=>{B.init(t,1);let r=B.readList(),i=B.readBool();if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed USERAUTH_FAILURE packet");e._debug&&e._debug(`Inbound: Received USERAUTH_FAILURE (${r})`),e._authsQueue.shift();let n=e._handlers.USERAUTH_FAILURE;n&&n(e,r,i)},[Ut.USERAUTH_SUCCESS]:(e,t)=>{e._debug&&e._debug("Inbound: Received USERAUTH_SUCCESS"),e._authsQueue.shift();let r=e._handlers.USERAUTH_SUCCESS;r&&r(e)},[Ut.USERAUTH_BANNER]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readString();if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed USERAUTH_BANNER packet");e._debug&&e._debug("Inbound: Received USERAUTH_BANNER");let n=e._handlers.USERAUTH_BANNER;n&&n(e,r)},60:(e,t)=>{if(!e._authsQueue.length){e._debug&&e._debug("Inbound: Received payload type 60 without auth");return}switch(e._authsQueue[0]){case"password":{B.init(t,1);let r=B.readString(!0),i=B.readString();if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed USERAUTH_PASSWD_CHANGEREQ packet");e._debug&&e._debug("Inbound: Received USERAUTH_PASSWD_CHANGEREQ");let n=e._handlers.USERAUTH_PASSWD_CHANGEREQ;n&&n(e,r);break}case"publickey":{B.init(t,1);let r=B.readString(!0),i=B.readString();if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed USERAUTH_PK_OK packet");e._debug&&e._debug("Inbound: Received USERAUTH_PK_OK"),e._authsQueue.shift();let n=e._handlers.USERAUTH_PK_OK;n&&n(e,r,i);break}case"keyboard-interactive":{B.init(t,1);let r=B.readString(!0),i=B.readString(!0);B.readString();let n=B.readUInt32BE(),o;if(n!==void 0){o=new Array(n);let c;for(c=0;c<n;++c){let u=B.readString(!0),l=B.readBool();if(l===void 0)break;o[c]={prompt:u,echo:l}}c!==n&&(o=void 0)}if(B.clear(),o===void 0)return Lt(e,"Inbound: Malformed USERAUTH_INFO_REQUEST packet");e._debug&&e._debug("Inbound: Received USERAUTH_INFO_REQUEST");let s=e._handlers.USERAUTH_INFO_REQUEST;s&&s(e,r,i,o);break}default:e._debug&&e._debug("Inbound: Received unexpected payload type 60")}},61:(e,t)=>{if(!e._authsQueue.length){e._debug&&e._debug("Inbound: Received payload type 61 without auth");return}if(e._authsQueue[0]!=="keyboard-interactive")return Lt(e,"Inbound: Received unexpected payload type 61");B.init(t,1);let r=B.readUInt32BE(),i;if(r!==void 0){i=new Array(r);let o;for(o=0;o<r;++o){let s=B.readString(!0);if(s===void 0)break;i[o]=s}o!==r&&(i=void 0)}if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed USERAUTH_INFO_RESPONSE packet");e._debug&&e._debug("Inbound: Received USERAUTH_INFO_RESPONSE");let n=e._handlers.USERAUTH_INFO_RESPONSE;n&&n(e,i)},[Ut.GLOBAL_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readBool(),n;if(i!==void 0)switch(r){case"tcpip-forward":case"cancel-tcpip-forward":{let s=B.readString(!0),c=B.readUInt32BE();c!==void 0&&(n={bindAddr:s,bindPort:c});break}case"streamlocal-forward@openssh.com":case"cancel-streamlocal-forward@openssh.com":{let s=B.readString(!0);s!==void 0&&(n={socketPath:s});break}case"no-more-sessions@openssh.com":n=null;break;case"hostkeys-00@openssh.com":{for(n=[];B.avail()>0;){let s=B.readString();if(s===void 0){n=void 0;break}let c=X4(s);c instanceof Error||n.push(c)}break}default:n=B.readRaw()}if(B.clear(),n===void 0)return Lt(e,"Inbound: Malformed GLOBAL_REQUEST packet");e._debug&&e._debug(`Inbound: GLOBAL_REQUEST (${r})`);let o=e._handlers.GLOBAL_REQUEST;o?o(e,r,i,n):e.requestFailure()},[Ut.REQUEST_SUCCESS]:(e,t)=>{let r=t.length>1?KE(t,1):null;e._debug&&e._debug("Inbound: REQUEST_SUCCESS");let i=e._handlers.REQUEST_SUCCESS;i&&i(e,r)},[Ut.REQUEST_FAILURE]:(e,t)=>{e._debug&&e._debug("Inbound: Received REQUEST_FAILURE");let r=e._handlers.REQUEST_FAILURE;r&&r(e)},[Ut.CHANNEL_OPEN]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readUInt32BE(),n=B.readUInt32BE(),o=B.readUInt32BE(),s;switch(r){case"forwarded-tcpip":case"direct-tcpip":{let u=B.readString(!0),l=B.readUInt32BE(),f=B.readString(!0),p=B.readUInt32BE();p!==void 0&&(s={type:r,sender:i,window:n,packetSize:o,data:{destIP:u,destPort:l,srcIP:f,srcPort:p}});break}case"forwarded-streamlocal@openssh.com":case"direct-streamlocal@openssh.com":{let u=B.readString(!0);u!==void 0&&(s={type:r,sender:i,window:n,packetSize:o,data:{socketPath:u}});break}case"x11":{let u=B.readString(!0),l=B.readUInt32BE();l!==void 0&&(s={type:r,sender:i,window:n,packetSize:o,data:{srcIP:u,srcPort:l}});break}default:s={type:r,sender:i,window:n,packetSize:o,data:{}}}if(B.clear(),s===void 0)return Lt(e,"Inbound: Malformed CHANNEL_OPEN packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN (s:${i}, ${r})`);let c=e._handlers.CHANNEL_OPEN;c?c(e,s):e.channelOpenFail(s.sender,G4.ADMINISTRATIVELY_PROHIBITED,"","")},[Ut.CHANNEL_OPEN_CONFIRMATION]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE(),n=B.readUInt32BE(),o=B.readUInt32BE(),s=B.avail()?B.readRaw():void 0;if(B.clear(),o===void 0)return Lt(e,"Inbound: Malformed CHANNEL_OPEN_CONFIRMATION packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN_CONFIRMATION (r:${r}, s:${i})`);let c=e._handlers.CHANNEL_OPEN_CONFIRMATION;c&&c(e,{recipient:r,sender:i,window:n,packetSize:o,data:s})},[Ut.CHANNEL_OPEN_FAILURE]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE(),n=B.readString(!0),o=B.readString();if(B.clear(),o===void 0)return Lt(e,"Inbound: Malformed CHANNEL_OPEN_FAILURE packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN_FAILURE (r:${r})`);let s=e._handlers.CHANNEL_OPEN_FAILURE;s&&s(e,r,i,n)},[Ut.CHANNEL_WINDOW_ADJUST]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE();if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed CHANNEL_WINDOW_ADJUST packet");e._debug&&e._debug(`Inbound: CHANNEL_WINDOW_ADJUST (r:${r}, ${i})`);let n=e._handlers.CHANNEL_WINDOW_ADJUST;n&&n(e,r,i)},[Ut.CHANNEL_DATA]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readString();if(B.clear(),i===void 0)return Lt(e,"Inbound: Malformed CHANNEL_DATA packet");e._debug&&e._debug(`Inbound: CHANNEL_DATA (r:${r}, ${i.length})`);let n=e._handlers.CHANNEL_DATA;n&&n(e,r,i)},[Ut.CHANNEL_EXTENDED_DATA]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE(),n=B.readString();if(B.clear(),n===void 0)return Lt(e,"Inbound: Malformed CHANNEL_EXTENDED_DATA packet");e._debug&&e._debug(`Inbound: CHANNEL_EXTENDED_DATA (r:${r}, ${n.length})`);let o=e._handlers.CHANNEL_EXTENDED_DATA;o&&o(e,r,n,i)},[Ut.CHANNEL_EOF]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed CHANNEL_EOF packet");e._debug&&e._debug(`Inbound: CHANNEL_EOF (r:${r})`);let i=e._handlers.CHANNEL_EOF;i&&i(e,r)},[Ut.CHANNEL_CLOSE]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed CHANNEL_CLOSE packet");e._debug&&e._debug(`Inbound: CHANNEL_CLOSE (r:${r})`);let i=e._handlers.CHANNEL_CLOSE;i&&i(e,r)},[Ut.CHANNEL_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readString(!0),n=B.readBool(),o;if(n!==void 0)switch(i){case"exit-status":o=B.readUInt32BE(),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"exit-signal":{let c,u;if(e._compatFlags&Y4.OLD_EXIT){let f=B.readUInt32BE();switch(f){case 1:c="HUP";break;case 2:c="INT";break;case 3:c="QUIT";break;case 6:c="ABRT";break;case 9:c="KILL";break;case 14:c="ALRM";break;case 15:c="TERM";break;default:f!==void 0&&(c=`UNKNOWN (${f})`)}u=!1}else c=B.readString(!0),u=B.readBool(),u===void 0&&(c=void 0);let l=B.readString(!0);B.skipString()!==void 0&&(o={signal:c,coreDumped:u,errorMessage:l}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${c})`);break}case"pty-req":{let c=B.readString(!0),u=B.readUInt32BE(),l=B.readUInt32BE(),f=B.readUInt32BE(),p=B.readUInt32BE(),g=B.readString();if(g!==void 0){B.init(g,1);let h={};for(;B.avail();){let _=B.readByte();if(_===KS.TTY_OP_END)break;let y=J4[_],b=B.readUInt32BE();if(_===void 0||y===void 0||b===void 0){h=void 0;break}h[y]=b}h!==void 0&&(o={term:c,cols:u,rows:l,width:f,height:p,modes:h})}e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break}case"window-change":{let c=B.readUInt32BE(),u=B.readUInt32BE(),l=B.readUInt32BE(),f=B.readUInt32BE();f!==void 0&&(o={cols:c,rows:u,width:l,height:f}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break}case"x11-req":{let c=B.readBool(),u=B.readString(!0),l=B.readString(),f=B.readUInt32BE();f!==void 0&&(o={single:c,protocol:u,cookie:l,screen:f}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break}case"env":{let c=B.readString(!0),u=B.readString(!0);u!==void 0&&(o={name:c,value:u}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${c}=${u})`);break}case"shell":o=null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break;case"exec":o=B.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"subsystem":o=B.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"signal":o=B.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"xon-xoff":o=B.readBool(),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"auth-agent-req@openssh.com":o=null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break;default:o=B.avail()?B.readRaw():null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`)}if(B.clear(),o===void 0)return Lt(e,"Inbound: Malformed CHANNEL_REQUEST packet");let s=e._handlers.CHANNEL_REQUEST;s&&s(e,r,i,n,o)},[Ut.CHANNEL_SUCCESS]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed CHANNEL_SUCCESS packet");e._debug&&e._debug(`Inbound: CHANNEL_SUCCESS (r:${r})`);let i=e._handlers.CHANNEL_SUCCESS;i&&i(e,r)},[Ut.CHANNEL_FAILURE]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Lt(e,"Inbound: Malformed CHANNEL_FAILURE packet");e._debug&&e._debug(`Inbound: CHANNEL_FAILURE (r:${r})`);let i=e._handlers.CHANNEL_FAILURE;i&&i(e,r)}}});var up=me((ZQ,XS)=>{"use strict";var GE=new Array(256);[lp().HANDLERS,YS()].forEach(e=>{for(let[t,r]of Object.entries(e))t=+t,isFinite(t)&&t>=0&&t<GE.length&&(GE[t]=r)});XS.exports=GE});var lp=me((KQ,cw)=>{"use strict";var{createDiffieHellman:eD,createDiffieHellmanGroup:tD,createECDH:rD,createHash:XE,createPublicKey:nD,diffieHellman:iD,generateKeyPairSync:oD,randomFillSync:sD}=require("crypto"),{Ber:JS}=cu(),{COMPAT:JE,curve25519Supported:aD,DEFAULT_KEX:ew,DEFAULT_SERVER_HOST_KEY:tw,DEFAULT_CIPHER:fp,DEFAULT_MAC:dp,DEFAULT_COMPRESSION:pp,DISCONNECT_REASON:dt,MESSAGE:Bt}=Jn(),{CIPHER_INFO:zs,createCipher:cD,createDecipher:uD,MAC_INFO:rw}=Pi(),{parseDERKey:lD}=Ci(),{bufferFill:fD,bufferParser:ft,convertSignature:dD,doFatalError:pt,FastBuffer:pD,sigSSHToASN1:hD,writeUInt32BE:xr}=In(),{PacketReader:nw,PacketWriter:iw,ZlibPacketReader:hp,ZlibPacketWriter:gp}=QE(),Ds,gD=2048,mD=8192,_D=Buffer.alloc(0);function ow(e){let t;if(e._compatFlags&JE.BAD_DHGEX){let r=e._offer.lists.kex,i=r.array,n=!1;for(let o=0;o<i.length;++o)i[o].includes("group-exchange")&&(n||(n=!0,i=i.slice()),i.splice(o--,1));if(n){let o=17+e._offer.totalSize+1+4,s=Buffer.from(i.join(","));o-=r.buffer.length-s.length;let c=e._offer.lists.all,u=new Uint8Array(c.buffer,c.byteOffset+4+r.buffer.length,c.length-(4+r.buffer.length));t=Buffer.allocUnsafe(o),xr(t,s.length,17),t.set(s,21),t.set(u,21+s.length)}}t===void 0&&(t=Buffer.allocUnsafe(17+e._offer.totalSize+1+4),e._offer.copyAllTo(t,17)),e._debug&&e._debug("Outbound: Sending KEXINIT"),t[0]=Bt.KEXINIT,sD(t,1,16),fD(t,0,t.length-5),e._kexinit=t,e._packetRW.write.allocStart=0;{let r=e._packetRW.write.allocStartKEX,i=e._packetRW.write.alloc(t.length,!0);i.set(t,r),e._cipher.encrypt(e._packetRW.write.finalize(i,!0))}}a(ow,"kexinit");function sw(e,t){let r={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},sc:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0}};if(ft.init(t,17),(r.kex=ft.readList())===void 0||(r.serverHostKey=ft.readList())===void 0||(r.cs.cipher=ft.readList())===void 0||(r.sc.cipher=ft.readList())===void 0||(r.cs.mac=ft.readList())===void 0||(r.sc.mac=ft.readList())===void 0||(r.cs.compress=ft.readList())===void 0||(r.sc.compress=ft.readList())===void 0||(r.cs.lang=ft.readList())===void 0||(r.sc.lang=ft.readList())===void 0)return ft.clear(),pt(e,"Received malformed KEXINIT","handshake",dt.KEY_EXCHANGE_FAILED);let i=ft.pos(),n=i<t.length&&t[i]===1;ft.clear();let o=e._offer,s=r,c=o.lists.kex.array;if(e._compatFlags&JE.BAD_DHGEX){let R=!1;for(let J=0;J<c.length;++J)c[J].indexOf("group-exchange")!==-1&&(R||(R=!0,c=c.slice()),c.splice(J--,1))}let u,l,f,p=e._debug;p&&p("Inbound: Handshake in progress"),p&&p(`Handshake: (local) KEX method: ${c}`),p&&p(`Handshake: (remote) KEX method: ${s.kex}`);let g;if(e._server?(l=c,u=s.kex,g=u.indexOf("ext-info-c")!==-1):(l=s.kex,u=c,g=l.indexOf("ext-info-s")!==-1),e._strictMode===void 0&&(e._server?e._strictMode=u.indexOf("kex-strict-c-v00@openssh.com")!==-1:e._strictMode=l.indexOf("kex-strict-s-v00@openssh.com")!==-1,e._strictMode&&(p&&p("Handshake: strict KEX mode enabled"),e._decipher.inSeqno!==1)))return p&&p("Handshake: KEXINIT not first packet in strict KEX mode"),pt(e,"Handshake failed: KEXINIT not first packet in strict KEX mode","handshake",dt.KEY_EXCHANGE_FAILED);for(f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: no matching key exchange algorithm"),pt(e,"Handshake failed: no matching key exchange algorithm","handshake",dt.KEY_EXCHANGE_FAILED);r.kex=u[f],p&&p(`Handshake: KEX algorithm: ${u[f]}`),n&&(!s.kex.length||u[f]!==s.kex[0])&&(e._skipNextInboundPacket=!0);let h=o.lists.serverHostKey.array;for(p&&p(`Handshake: (local) Host key format: ${h}`),p&&p(`Handshake: (remote) Host key format: ${s.serverHostKey}`),e._server?(l=h,u=s.serverHostKey):(l=s.serverHostKey,u=h),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching host key format"),pt(e,"Handshake failed: no matching host key format","handshake",dt.KEY_EXCHANGE_FAILED);r.serverHostKey=u[f],p&&p(`Handshake: Host key format: ${u[f]}`);let _=o.lists.cs.cipher.array;for(p&&p(`Handshake: (local) C->S cipher: ${_}`),p&&p(`Handshake: (remote) C->S cipher: ${s.cs.cipher}`),e._server?(l=_,u=s.cs.cipher):(l=s.cs.cipher,u=_),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching C->S cipher"),pt(e,"Handshake failed: no matching C->S cipher","handshake",dt.KEY_EXCHANGE_FAILED);r.cs.cipher=u[f],p&&p(`Handshake: C->S Cipher: ${u[f]}`);let y=o.lists.sc.cipher.array;for(p&&p(`Handshake: (local) S->C cipher: ${y}`),p&&p(`Handshake: (remote) S->C cipher: ${s.sc.cipher}`),e._server?(l=y,u=s.sc.cipher):(l=s.sc.cipher,u=y),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching S->C cipher"),pt(e,"Handshake failed: no matching S->C cipher","handshake",dt.KEY_EXCHANGE_FAILED);r.sc.cipher=u[f],p&&p(`Handshake: S->C cipher: ${u[f]}`);let b=o.lists.cs.mac.array;if(p&&p(`Handshake: (local) C->S MAC: ${b}`),p&&p(`Handshake: (remote) C->S MAC: ${s.cs.mac}`),zs[r.cs.cipher].authLen>0)r.cs.mac="",p&&p("Handshake: C->S MAC: <implicit>");else{for(e._server?(l=b,u=s.cs.mac):(l=s.cs.mac,u=b),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching C->S MAC"),pt(e,"Handshake failed: no matching C->S MAC","handshake",dt.KEY_EXCHANGE_FAILED);r.cs.mac=u[f],p&&p(`Handshake: C->S MAC: ${u[f]}`)}let v=o.lists.sc.mac.array;if(p&&p(`Handshake: (local) S->C MAC: ${v}`),p&&p(`Handshake: (remote) S->C MAC: ${s.sc.mac}`),zs[r.sc.cipher].authLen>0)r.sc.mac="",p&&p("Handshake: S->C MAC: <implicit>");else{for(e._server?(l=v,u=s.sc.mac):(l=s.sc.mac,u=v),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching S->C MAC"),pt(e,"Handshake failed: no matching S->C MAC","handshake",dt.KEY_EXCHANGE_FAILED);r.sc.mac=u[f],p&&p(`Handshake: S->C MAC: ${u[f]}`)}let S=o.lists.cs.compress.array;for(p&&p(`Handshake: (local) C->S compression: ${S}`),p&&p(`Handshake: (remote) C->S compression: ${s.cs.compress}`),e._server?(l=S,u=s.cs.compress):(l=s.cs.compress,u=S),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching C->S compression"),pt(e,"Handshake failed: no matching C->S compression","handshake",dt.KEY_EXCHANGE_FAILED);r.cs.compress=u[f],p&&p(`Handshake: C->S compression: ${u[f]}`);let M=o.lists.sc.compress.array;for(p&&p(`Handshake: (local) S->C compression: ${M}`),p&&p(`Handshake: (remote) S->C compression: ${s.sc.compress}`),e._server?(l=M,u=s.sc.compress):(l=s.sc.compress,u=M),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching S->C compression"),pt(e,"Handshake failed: no matching S->C compression","handshake",dt.KEY_EXCHANGE_FAILED);r.sc.compress=u[f],p&&p(`Handshake: S->C compression: ${u[f]}`),r.cs.lang="",r.sc.lang="",e._kex&&(e._kexinit||ow(e),e._decipher._onPayload=aw.bind(e,{firstPacket:!1})),e._kex=yD(r,e,t),e._kex.remoteExtInfoEnabled=g,e._kex.start()}a(sw,"handleKexInit");var yD=(()=>{function e(s){let c=0,u=s.length;for(;s[c]===0;)++c,--u;let l;return s[c]&128?(l=Buffer.allocUnsafe(1+u),l[0]=0,s.copy(l,1,c),s=l):u!==s.length&&(l=Buffer.allocUnsafe(u),s.copy(l,0,c),s=l),s}a(e,"convertToMpint");class t{static{a(this,"KeyExchange")}constructor(c,u,l){this._protocol=u,this.sessionID=u._kex?u._kex.sessionID:void 0,this.negotiated=c,this.remoteExtInfoEnabled=!1,this._step=1,this._public=null,this._dh=null,this._sentNEWKEYS=!1,this._receivedNEWKEYS=!1,this._finished=!1,this._hostVerified=!1,this._kexinit=u._kexinit,this._remoteKexinit=l,this._identRaw=u._identRaw,this._remoteIdentRaw=u._remoteIdentRaw,this._hostKey=void 0,this._dhData=void 0,this._sig=void 0}finish(c){if(this._finished)return!1;this._finished=!0;let u=this._protocol._server,l=this.negotiated,f=this.convertPublicKey(this._dhData),p=this.computeSecret(this._dhData);if(p instanceof Error)return p.message=`Error while computing DH secret (${this.type}): ${p.message}`,p.level="handshake",pt(this._protocol,p,dt.KEY_EXCHANGE_FAILED);let g=XE(this.hashName);Dn(g,u?this._remoteIdentRaw:this._identRaw),Dn(g,u?this._identRaw:this._remoteIdentRaw),Dn(g,u?this._remoteKexinit:this._kexinit),Dn(g,u?this._kexinit:this._remoteKexinit);let h=u?this._hostKey.getPublicSSH():this._hostKey;if(Dn(g,h),this.type==="groupex"){let M=this.getDHParams(),R=Buffer.allocUnsafe(4);xr(R,this._minBits,0),g.update(R),xr(R,this._prefBits,0),g.update(R),xr(R,this._maxBits,0),g.update(R),Dn(g,M.prime),Dn(g,M.generator)}Dn(g,u?f:this.getPublicKey());let _=u?this.getPublicKey():f;Dn(g,_),Dn(g,p);let y=g.digest();if(u){let M;switch(this.negotiated.serverHostKey){case"rsa-sha2-256":M="sha256";break;case"rsa-sha2-512":M="sha512";break}this._protocol._debug&&this._protocol._debug("Generating signature ...");let R=this._hostKey.sign(y,M);if(R instanceof Error)return pt(this._protocol,`Handshake failed: signature generation failed for ${this._hostKey.type} host key: ${R.message}`,"handshake",dt.KEY_EXCHANGE_FAILED);if(R=dD(R,this._hostKey.type),R===!1)return pt(this._protocol,`Handshake failed: signature conversion failed for ${this._hostKey.type} host key`,"handshake",dt.KEY_EXCHANGE_FAILED);let J=this.negotiated.serverHostKey,te=Buffer.byteLength(J),ee=4+te+4+R.length,P=this._protocol._packetRW.write.allocStartKEX,C=this._protocol._packetRW.write.alloc(5+h.length+4+_.length+4+ee,!0);if(C[P]=Bt.KEXDH_REPLY,xr(C,h.length,++P),C.set(h,P+=4),xr(C,_.length,P+=h.length),C.set(_,P+=4),xr(C,ee,P+=_.length),xr(C,te,P+=4),C.utf8Write(J,P+=4,te),xr(C,R.length,P+=te),C.set(R,P+=4),this._protocol._debug){let H;switch(this.type){case"group":H="KEXDH_REPLY";break;case"groupex":H="KEXDH_GEX_REPLY";break;default:H="KEXECDH_REPLY"}this._protocol._debug(`Outbound: Sending ${H}`)}this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(C,!0))}else{ft.init(this._sig,0);let M=ft.readString(!0);if(!M)return pt(this._protocol,"Malformed packet while reading signature","handshake",dt.KEY_EXCHANGE_FAILED);if(M!==l.serverHostKey)return pt(this._protocol,`Wrong signature type: ${M}, expected: ${l.serverHostKey}`,"handshake",dt.KEY_EXCHANGE_FAILED);let R=ft.readString();if(ft.clear(),R===void 0)return pt(this._protocol,"Malformed packet while reading signature","handshake",dt.KEY_EXCHANGE_FAILED);if(!(R=hD(R,M)))return pt(this._protocol,"Malformed signature","handshake",dt.KEY_EXCHANGE_FAILED);let J;{ft.init(this._hostKey,0);let P=ft.readString(!0),C=this._hostKey.slice(ft.pos());if(ft.clear(),J=lD(C,P),J instanceof Error)return J.level="handshake",pt(this._protocol,J,dt.KEY_EXCHANGE_FAILED)}let te;switch(this.negotiated.serverHostKey){case"rsa-sha2-256":te="sha256";break;case"rsa-sha2-512":te="sha512";break}this._protocol._debug&&this._protocol._debug("Verifying signature ...");let ee=J.verify(y,R,te);if(ee!==!0)return ee instanceof Error?this._protocol._debug&&this._protocol._debug(`Signature verification failed: ${ee.stack}`):this._protocol._debug&&this._protocol._debug("Signature verification failed"),pt(this._protocol,"Handshake failed: signature verification failed","handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Verified signature")}(u||!c)&&mp(this);let b,v,S=a(M=>{if(b)return mp(this),b.outbound.seqno=this._protocol._cipher.outSeqno,this._protocol._cipher.free(),this._protocol._cipher=cD(b),this._protocol._packetRW.write=v,b=void 0,v=void 0,this._protocol._onHandshakeComplete(l),!1;this.sessionID||(this.sessionID=y);{let X=Buffer.allocUnsafe(4+p.length);xr(X,p.length,0),X.set(p,4),p=X}let R=zs[l.cs.cipher],J=zs[l.sc.cipher],te=Bs(R.ivLen,this.hashName,p,y,this.sessionID,"A"),ee=Bs(J.ivLen,this.hashName,p,y,this.sessionID,"B"),P=Bs(R.keyLen,this.hashName,p,y,this.sessionID,"C"),C=Bs(J.keyLen,this.hashName,p,y,this.sessionID,"D"),H,U;R.authLen||(H=rw[l.cs.mac],U=Bs(H.len,this.hashName,p,y,this.sessionID,"E"));let k,j;J.authLen||(k=rw[l.sc.mac],j=Bs(k.len,this.hashName,p,y,this.sessionID,"F"));let W={inbound:{onPayload:this._protocol._onPayload,seqno:this._protocol._decipher.inSeqno,decipherInfo:u?R:J,decipherIV:u?te:ee,decipherKey:u?P:C,macInfo:u?H:k,macKey:u?U:j},outbound:{onWrite:this._protocol._onWrite,seqno:this._protocol._cipher.outSeqno,cipherInfo:u?J:R,cipherIV:u?ee:te,cipherKey:u?C:P,macInfo:u?k:H,macKey:u?j:U}};this._protocol._decipher.free(),b=W,this._protocol._decipher=uD(W);let z={read:void 0,write:void 0};switch(l.cs.compress){case"zlib":u?z.read=new hp:z.write=new gp(this._protocol);break;case"zlib@openssh.com":if(this._protocol._authenticated){u?z.read=new hp:z.write=new gp(this._protocol);break}default:u?z.read=new nw:z.write=new iw(this._protocol)}switch(l.sc.compress){case"zlib":u?z.write=new gp(this._protocol):z.read=new hp;break;case"zlib@openssh.com":if(this._protocol._authenticated){u?z.write=new gp(this._protocol):z.read=new hp;break}default:u?z.write=new iw(this._protocol):z.read=new nw}return this._protocol._packetRW.read.cleanup(),this._protocol._packetRW.write.cleanup(),this._protocol._packetRW.read=z.read,v=z.write,this._public=null,this._dh=null,this._kexinit=this._protocol._kexinit=void 0,this._remoteKexinit=void 0,this._identRaw=void 0,this._remoteIdentRaw=void 0,this._hostKey=void 0,this._dhData=void 0,this._sig=void 0,M?!1:S()},"completeHandshake");if((u||c)&&(this.finish=S),!u)return S(c)}start(){if(!this._protocol._server){if(this._protocol._debug){let f;this.type==="group"?f="KEXDH_INIT":f="KEXECDH_INIT",this._protocol._debug(`Outbound: Sending ${f}`)}let c=this.getPublicKey(),u=this._protocol._packetRW.write.allocStartKEX,l=this._protocol._packetRW.write.alloc(5+c.length,!0);l[u]=Bt.KEXDH_INIT,xr(l,c.length,++u),l.set(c,u+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(l,!0))}}getPublicKey(){this.generateKeys();let c=this._public;if(c)return this.convertPublicKey(c)}convertPublicKey(c){let u,l=0,f=c.length;for(;c[l]===0;)++l,--f;return c[l]&128?(u=Buffer.allocUnsafe(1+f),u[0]=0,c.copy(u,1,l),u):(f!==c.length&&(u=Buffer.allocUnsafe(f),c.copy(u,0,l),c=u),c)}computeSecret(c){this.generateKeys();try{return e(this._dh.computeSecret(c))}catch(u){return u}}parse(c){let u=c[0];switch(this._step){case 1:if(this._protocol._server){if(u!==Bt.KEXDH_INIT)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_INIT}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH Init"),ft.init(c,1);let l=ft.readString();if(ft.clear(),l===void 0)return pt(this._protocol,"Received malformed KEX*_INIT","handshake",dt.KEY_EXCHANGE_FAILED);this._dhData=l;let f=this._protocol._hostKeys[this.negotiated.serverHostKey];Array.isArray(f)&&(f=f[0]),this._hostKey=f,this.finish()}else{if(u!==Bt.KEXDH_REPLY)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_REPLY}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH Reply"),ft.init(c,1);let l,f,p;if((l=ft.readString())===void 0||(f=ft.readString())===void 0||(p=ft.readString())===void 0)return ft.clear(),pt(this._protocol,"Received malformed KEX*_REPLY","handshake",dt.KEY_EXCHANGE_FAILED);ft.clear(),ft.init(l,0);let g=ft.readString(!0);if(ft.clear(),g===void 0)return pt(this._protocol,"Received malformed host public key","handshake",dt.KEY_EXCHANGE_FAILED);if(g!==this.negotiated.serverHostKey)switch(this.negotiated.serverHostKey){case"rsa-sha2-256":case"rsa-sha2-512":if(g==="ssh-rsa")break;default:return pt(this._protocol,"Host key does not match negotiated type","handshake",dt.KEY_EXCHANGE_FAILED)}this._hostKey=l,this._dhData=f,this._sig=p;let h=!1,_;if(this._protocol._hostVerifier===void 0?(_=!0,this._protocol._debug&&this._protocol._debug("Host accepted by default (no verification)")):_=this._protocol._hostVerifier(l,y=>{if(!h){if(h=!0,y===!1)return this._protocol._debug&&this._protocol._debug("Host denied (verification failed)"),pt(this._protocol,"Host denied (verification failed)","handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Host accepted (verified)"),this._hostVerified=!0,this._receivedNEWKEYS?this.finish():mp(this)}}),_===void 0){++this._step;return}if(h=!0,_===!1)return this._protocol._debug&&this._protocol._debug("Host denied (verification failed)"),pt(this._protocol,"Host denied (verification failed)","handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Host accepted (verified)"),this._hostVerified=!0,mp(this)}++this._step;break;case 2:return u!==Bt.NEWKEYS?pt(this._protocol,`Received packet ${u} instead of ${Bt.NEWKEYS}`,"handshake",dt.KEY_EXCHANGE_FAILED):(this._protocol._debug&&this._protocol._debug("Inbound: NEWKEYS"),this._receivedNEWKEYS=!0,this._protocol._strictMode&&(this._protocol._decipher.inSeqno=0),++this._step,this.finish(!this._protocol._server&&!this._hostVerified));default:return pt(this._protocol,`Received unexpected packet ${u} after NEWKEYS`,"handshake",dt.KEY_EXCHANGE_FAILED)}}}class r extends t{static{a(this,"Curve25519Exchange")}constructor(c,...u){super(...u),this.type="25519",this.hashName=c,this._keys=null}generateKeys(){this._keys||(this._keys=oD("x25519"))}getPublicKey(){return this.generateKeys(),this._keys.publicKey.export({type:"spki",format:"der"}).slice(-32)}convertPublicKey(c){let u,l=0,f=c.length;for(;c[l]===0;)++l,--f;return c.length===32||f!==c.length&&(u=Buffer.allocUnsafe(f),c.copy(u,0,l),c=u),c}computeSecret(c){this.generateKeys();try{let u=new JS.Writer;return u.startSequence(),u.startSequence(),u.writeOID("1.3.101.110"),u.endSequence(),u.startSequence(JS.BitString),u.writeByte(0),u._ensure(c.length),c.copy(u._buf,u._offset,0,c.length),u._offset+=c.length,u.endSequence(),u.endSequence(),e(iD({privateKey:this._keys.privateKey,publicKey:nD({key:u.buffer,type:"spki",format:"der"})}))}catch(u){return u}}}class i extends t{static{a(this,"ECDHExchange")}constructor(c,u,...l){super(...l),this.type="ecdh",this.curveName=c,this.hashName=u}generateKeys(){this._dh||(this._dh=rD(this.curveName),this._public=this._dh.generateKeys())}}class n extends t{static{a(this,"DHGroupExchange")}constructor(c,...u){super(...u),this.type="groupex",this.hashName=c,this._prime=null,this._generator=null,this._minBits=gD,this._prefBits=ED(this.negotiated),this._protocol._compatFlags&JE.BUG_DHGEX_LARGE&&(this._prefBits=Math.min(this._prefBits,4096)),this._maxBits=mD}start(){if(this._protocol._server)return;this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_GEX_REQUEST");let c=this._protocol._packetRW.write.allocStartKEX,u=this._protocol._packetRW.write.alloc(13,!0);u[c]=Bt.KEXDH_GEX_REQUEST,xr(u,this._minBits,++c),xr(u,this._prefBits,c+=4),xr(u,this._maxBits,c+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(u,!0))}generateKeys(){!this._dh&&this._prime&&this._generator&&(this._dh=eD(this._prime,this._generator),this._public=this._dh.generateKeys())}setDHParams(c,u){if(!Buffer.isBuffer(c))throw new Error("Invalid prime value");if(!Buffer.isBuffer(u))throw new Error("Invalid generator value");this._prime=c,this._generator=u}getDHParams(){if(this._dh)return{prime:e(this._dh.getPrime()),generator:e(this._dh.getGenerator())}}parse(c){let u=c[0];switch(this._step){case 1:{if(this._protocol._server)return u!==Bt.KEXDH_GEX_REQUEST?pt(this._protocol,`Received packet ${u} instead of `+Bt.KEXDH_GEX_REQUEST,"handshake",dt.KEY_EXCHANGE_FAILED):pt(this._protocol,"Group exchange not implemented for server","handshake",dt.KEY_EXCHANGE_FAILED);if(u!==Bt.KEXDH_GEX_GROUP)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_GEX_GROUP}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH GEX Group"),ft.init(c,1);let l,f;if((l=ft.readString())===void 0||(f=ft.readString())===void 0)return ft.clear(),pt(this._protocol,"Received malformed KEXDH_GEX_GROUP","handshake",dt.KEY_EXCHANGE_FAILED);ft.clear(),this.setDHParams(l,f),this.generateKeys();let p=this.getPublicKey();this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_GEX_INIT");let g=this._protocol._packetRW.write.allocStartKEX,h=this._protocol._packetRW.write.alloc(5+p.length,!0);h[g]=Bt.KEXDH_GEX_INIT,xr(h,p.length,++g),h.set(p,g+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(h,!0)),++this._step;break}case 2:if(this._protocol._server)return u!==Bt.KEXDH_GEX_INIT?pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_GEX_INIT}`,"handshake",dt.KEY_EXCHANGE_FAILED):(this._protocol._debug&&this._protocol._debug("Received DH GEX Init"),pt(this._protocol,"Group exchange not implemented for server","handshake",dt.KEY_EXCHANGE_FAILED));if(u!==Bt.KEXDH_GEX_REPLY)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_GEX_REPLY}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH GEX Reply"),this._step=1,c[0]=Bt.KEXDH_REPLY,this.parse=t.prototype.parse,this.parse(c)}}}class o extends t{static{a(this,"DHExchange")}constructor(c,u,...l){super(...l),this.type="group",this.groupName=c,this.hashName=u}start(){if(!this._protocol._server){this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_INIT");let c=this.getPublicKey(),u=this._protocol._packetRW.write.allocStartKEX,l=this._protocol._packetRW.write.alloc(5+c.length,!0);l[u]=Bt.KEXDH_INIT,xr(l,c.length,++u),l.set(c,u+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(l,!0))}}generateKeys(){this._dh||(this._dh=tD(this.groupName),this._public=this._dh.generateKeys())}getDHParams(){if(this._dh)return{prime:e(this._dh.getPrime()),generator:e(this._dh.getGenerator())}}}return(s,...c)=>{if(typeof s!="object"||s===null)throw new Error("Invalid negotiated argument");let u=s.kex;if(typeof u=="string"){switch(c=[s,...c],u){case"curve25519-sha256":case"curve25519-sha256@libssh.org":if(!aD)break;return new r("sha256",...c);case"ecdh-sha2-nistp256":return new i("prime256v1","sha256",...c);case"ecdh-sha2-nistp384":return new i("secp384r1","sha384",...c);case"ecdh-sha2-nistp521":return new i("secp521r1","sha512",...c);case"diffie-hellman-group1-sha1":return new o("modp2","sha1",...c);case"diffie-hellman-group14-sha1":return new o("modp14","sha1",...c);case"diffie-hellman-group14-sha256":return new o("modp14","sha256",...c);case"diffie-hellman-group15-sha512":return new o("modp15","sha512",...c);case"diffie-hellman-group16-sha512":return new o("modp16","sha512",...c);case"diffie-hellman-group17-sha512":return new o("modp17","sha512",...c);case"diffie-hellman-group18-sha512":return new o("modp18","sha512",...c);case"diffie-hellman-group-exchange-sha1":return new n("sha1",...c);case"diffie-hellman-group-exchange-sha256":return new n("sha256",...c)}throw new Error(`Unsupported key exchange algorithm: ${u}`)}throw new Error(`Invalid key exchange type: ${u}`)}})(),YE=(()=>{let e=["kex","serverHostKey",["cs","cipher"],["sc","cipher"],["cs","mac"],["sc","mac"],["cs","compress"],["sc","compress"],["cs","lang"],["sc","lang"]];return class{static{a(this,"KexInit")}constructor(r){if(typeof r!="object"||r===null)throw new TypeError("Argument must be an object");let i={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},sc:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},all:void 0},n=0;for(let c of e){let u,l,f,p;if(typeof c=="string")u=i,l=r[c],f=p=c;else{let h=c[0];u=i[h],p=c[1],l=r[h][p],f=`${h}.${p}`}let g={array:void 0,buffer:void 0};if(Buffer.isBuffer(l))g.array=(""+l).split(","),g.buffer=l,n+=4+l.length;else{if(typeof l=="string"&&(l=l.split(",")),Array.isArray(l))g.array=l,g.buffer=Buffer.from(l.join(","));else throw new TypeError(`Invalid \`${f}\` type: ${typeof l}`);n+=4+g.buffer.length}u[p]=g}let o=Buffer.allocUnsafe(n);i.all=o;let s=0;for(let c of e){let u;typeof c=="string"?u=i[c].buffer:u=i[c[0]][c[1]].buffer,s=xr(o,u.length,s),o.set(u,s),s+=u.length}this.totalSize=n,this.lists=i}copyAllTo(r,i){let n=this.lists.all;if(typeof i!="number")throw new TypeError(`Invalid offset value: ${typeof i}`);if(r.length-i<n.length)throw new Error("Insufficient space to copy list");return r.set(n,i),n.length}}})(),Dn=(()=>{let e=Buffer.allocUnsafe(4);return(t,r)=>{xr(e,r.length,0),t.update(e),t.update(r)}})();function Bs(e,t,r,i,n,o){let s;if(e){let c=XE(t).update(r).update(i).update(o).update(n).digest();for(;c.length<e;){let u=XE(t).update(r).update(i).update(c).digest(),l=Buffer.allocUnsafe(c.length+u.length);l.set(c,0),l.set(u,c.length),c=l}c.length===e?s=c:s=new pD(c.buffer,c.byteOffset,e)}else s=_D;return s}a(Bs,"generateKEXVal");function aw(e,t){if(t.length===0){this._debug&&this._debug("Inbound: Skipping empty packet payload");return}if(this._skipNextInboundPacket){this._skipNextInboundPacket=!1;return}t=this._packetRW.read.read(t);let r=t[0];if(!this._strictMode)switch(r){case Bt.IGNORE:case Bt.UNIMPLEMENTED:case Bt.DEBUG:return Ds||(Ds=up()),Ds[r](this,t)}switch(r){case Bt.DISCONNECT:return Ds||(Ds=up()),Ds[r](this,t);case Bt.KEXINIT:return e.firstPacket?(e.firstPacket=!1,sw(this,t)):pt(this,"Received extra KEXINIT during handshake","handshake",dt.KEY_EXCHANGE_FAILED);default:if(r<20||r>49)return pt(this,`Received unexpected packet type ${r}`,"handshake",dt.KEY_EXCHANGE_FAILED)}return this._kex.parse(t)}a(aw,"onKEXPayload");function ED(e){let t=zs[e.cs.cipher],r=zs[e.sc.cipher],i=Math.max(0,t.sslName==="des-ede3-cbc"?14:t.keyLen,t.blockLen,t.ivLen,r.sslName==="des-ede3-cbc"?14:r.keyLen,r.blockLen,r.ivLen)*8;return i<=112?2048:i<=128?3072:i<=192?7680:8192}a(ED,"dhEstimate");function mp(e){if(!e._sentNEWKEYS){e._protocol._debug&&e._protocol._debug("Outbound: Sending NEWKEYS");let t=e._protocol._packetRW.write.allocStartKEX,r=e._protocol._packetRW.write.alloc(1,!0);r[t]=Bt.NEWKEYS,e._protocol._cipher.encrypt(e._protocol._packetRW.write.finalize(r,!0)),e._sentNEWKEYS=!0,e._protocol._strictMode&&(e._protocol._cipher.outSeqno=0)}}a(mp,"trySendNEWKEYS");cw.exports={KexInit:YE,kexinit:ow,onKEXPayload:aw,DEFAULT_KEXINIT_CLIENT:new YE({kex:ew.concat(["ext-info-c","kex-strict-c-v00@openssh.com"]),serverHostKey:tw,cs:{cipher:fp,mac:dp,compress:pp,lang:[]},sc:{cipher:fp,mac:dp,compress:pp,lang:[]}}),DEFAULT_KEXINIT_SERVER:new YE({kex:ew.concat(["kex-strict-s-v00@openssh.com"]),serverHostKey:tw,cs:{cipher:fp,mac:dp,compress:pp,lang:[]},sc:{cipher:fp,mac:dp,compress:pp,lang:[]}}),HANDLERS:{[Bt.KEXINIT]:sw}}});var uw=me((YQ,AD)=>{AD.exports={name:"ssh2",version:"1.16.0",author:"Brian White <mscdex@mscdex.net>",description:"SSH2 client and server modules written in pure JavaScript for node.js",main:"./lib/index.js",engines:{node:">=10.16.0"},dependencies:{asn1:"^0.2.6","bcrypt-pbkdf":"^1.0.2"},devDependencies:{"@mscdex/eslint-config":"^1.1.0",eslint:"^7.32.0"},optionalDependencies:{"cpu-features":"~0.0.10",nan:"^2.20.0"},scripts:{install:"node install.js",rebuild:"node install.js",test:"node test/test.js",lint:"eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js examples lib test","lint:fix":"npm run lint -- --fix"},keywords:["ssh","ssh2","sftp","secure","shell","exec","remote","client"],licenses:[{type:"MIT",url:"http://github.com/mscdex/ssh2/raw/master/LICENSE"}],repository:{type:"git",url:"http://github.com/mscdex/ssh2.git"}}});var nA=me((XQ,xw)=>{"use strict";var{inspect:gw}=require("util"),{bindingAvailable:bD,NullCipher:xD,NullDecipher:ID}=Pi(),{COMPAT_CHECKS:vD,DISCONNECT_REASON:mw,eddsaSupported:SD,MESSAGE:Oe,SIGNALS:lw,TERMINAL_MODE:tA}=Jn(),{DEFAULT_KEXINIT_CLIENT:wD,DEFAULT_KEXINIT_SERVER:PD,KexInit:fw,kexinit:_w,onKEXPayload:TD}=lp(),{parseKey:dw}=Ci(),kD=up(),{bufferCopy:_p,bufferFill:CD,bufferSlice:yw,convertSignature:pw,sendPacket:Ne,writeUInt32BE:$}=In(),{PacketReader:RD,PacketWriter:OD,ZlibPacketReader:Ew,ZlibPacketWriter:Aw}=QE(),ND=uw().version,$D=new Map(Object.values(mw).map(e=>[e,1])),bw=Buffer.from(`SSH-2.0-ssh2js${ND}`),DD=Buffer.from(`${bw}\r
12
- `),BD=8192,zD=1024,hw=Buffer.from([Oe.GLOBAL_REQUEST,0,0,0,21,107,101,101,112,97,108,105,118,101,64,111,112,101,110,115,115,104,46,99,111,109,1]),LD=Buffer.from([tA.TTY_OP_END]);function eA(){}a(eA,"noop");var rA=class{static{a(this,"Protocol")}constructor(t){let r=t.onWrite;if(typeof r!="function")throw new Error("Missing onWrite function");this._onWrite=h=>{r(h)};let i=t.onError;if(typeof i!="function")throw new Error("Missing onError function");this._onError=h=>{i(h)};let n=t.debug;this._debug=typeof n=="function"?h=>{n(h)}:void 0;let o=t.onHeader;this._onHeader=typeof o=="function"?(...h)=>{o(...h)}:eA;let s=t.onPacket;this._onPacket=typeof s=="function"?()=>{s()}:eA;let c=t.onHandshakeComplete;typeof c!="function"&&(c=eA);let u;this._onHandshakeComplete=(...h)=>{this._debug&&this._debug("Handshake completed"),u===void 0?u=!0:u=!1;let _=this._queue;if(_){this._queue=void 0,this._debug&&this._debug(`Draining outbound queue (${_.length}) ...`);for(let y=0;y<_.length;++y){let b=_[y],v=this._packetRW.write.finalize(b);if(v===b){let S=this._cipher.allocPacket(b.length);S.set(b,5),v=S}Ne(this,v)}this._debug&&this._debug("... finished draining outbound queue")}u&&this._server&&this._kex.remoteExtInfoEnabled&&qD(this),c(...h)},this._queue=void 0;let l=t.messageHandlers;typeof l=="object"&&l!==null?this._handlers=l:this._handlers={},this._onPayload=HD.bind(this),this._server=!!t.server,this._banner=void 0;let f;if(this._server){if(typeof t.hostKeys!="object"||t.hostKeys===null)throw new Error("Missing server host key(s)");this._hostKeys=t.hostKeys,typeof t.greeting=="string"&&t.greeting.length&&(f=t.greeting.slice(-2)===`\r
11
+ ${r}-----END ${e} KEY-----`}a(wn,"makePEM");function yu(e,t){let r=Buffer.allocUnsafe(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}a(yu,"combineBuffers");function zE(e,t){let r=e.length,i=e._pos||0;for(let n=0;n<t;++n){let o=r-i;if(i>=r||o<4)return!1;let s=gu(e,i);if(o<4+s)return!1;i+=4+s}return e._pos=i,!0}a(zE,"skipFields");function Eu(e,t){let r=new Fe.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.2.840.113549.1.1.1"),r.writeNull(),r.endSequence(),r.startSequence(Fe.BitString),r.writeByte(0),r.startSequence(),r.writeBuffer(e,Fe.Integer),r.writeBuffer(t,Fe.Integer),r.endSequence(),r.endSequence(),r.endSequence(),wn("PUBLIC",r.buffer)}a(Eu,"genOpenSSLRSAPub");function Au(e,t){let r=Buffer.allocUnsafe(15+t.length+4+e.length);br(r,7,0),r.utf8Write("ssh-rsa",4,7);let i=11;return br(r,t.length,i),r.set(t,i+=4),br(r,e.length,i+=t.length),r.set(e,i+4),r}a(Au,"genOpenSSHRSAPub");var Mv=(()=>{function e(i,n,o,s,c,u,l,f){let p=new Fe.Writer;return p.startSequence(),p.writeInt(0,Fe.Integer),p.writeBuffer(i,Fe.Integer),p.writeBuffer(n,Fe.Integer),p.writeBuffer(o,Fe.Integer),p.writeBuffer(s,Fe.Integer),p.writeBuffer(c,Fe.Integer),p.writeBuffer(u,Fe.Integer),p.writeBuffer(l,Fe.Integer),p.writeBuffer(f,Fe.Integer),p.endSequence(),p.buffer}a(e,"genRSAASN1Buf");function t(i){return BigInt(`0x${i.hexSlice(0,i.length)}`)}a(t,"bigIntFromBuffer");function r(i){let n=i.toString(16);if((n.length&1)!==0)n=`0${n}`;else{let o=n.charCodeAt(0);(o===56||o===57||o>=97&&o<=102)&&(n=`00${n}`)}return Buffer.from(n,"hex")}return a(r,"bigIntToBuffer"),a(function(n,o,s,c,u,l){let f=t(s),p=r(f%(t(u)-1n)),g=r(f%(t(l)-1n));return wn("RSA PRIVATE",e(n,o,s,u,l,p,g,c))},"genOpenSSLRSAPriv")})();function bu(e,t,r,i){let n=new Fe.Writer;return n.startSequence(),n.startSequence(),n.writeOID("1.2.840.10040.4.1"),n.startSequence(),n.writeBuffer(e,Fe.Integer),n.writeBuffer(t,Fe.Integer),n.writeBuffer(r,Fe.Integer),n.endSequence(),n.endSequence(),n.startSequence(Fe.BitString),n.writeByte(0),n.writeBuffer(i,Fe.Integer),n.endSequence(),n.endSequence(),wn("PUBLIC",n.buffer)}a(bu,"genOpenSSLDSAPub");function xu(e,t,r,i){let n=Buffer.allocUnsafe(15+e.length+4+t.length+4+r.length+4+i.length);br(n,7,0),n.utf8Write("ssh-dss",4,7);let o=11;return br(n,e.length,o),n.set(e,o+=4),br(n,t.length,o+=e.length),n.set(t,o+=4),br(n,r.length,o+=t.length),n.set(r,o+=4),br(n,i.length,o+=r.length),n.set(i,o+4),n}a(xu,"genOpenSSHDSAPub");function Fv(e,t,r,i,n){let o=new Fe.Writer;return o.startSequence(),o.writeInt(0,Fe.Integer),o.writeBuffer(e,Fe.Integer),o.writeBuffer(t,Fe.Integer),o.writeBuffer(r,Fe.Integer),o.writeBuffer(i,Fe.Integer),o.writeBuffer(n,Fe.Integer),o.endSequence(),wn("DSA PRIVATE",o.buffer)}a(Fv,"genOpenSSLDSAPriv");function Hv(e){let t=new Fe.Writer;return t.startSequence(),t.startSequence(),t.writeOID("1.3.101.112"),t.endSequence(),t.startSequence(Fe.BitString),t.writeByte(0),t._ensure(e.length),t._buf.set(e,t._offset),t._offset+=e.length,t.endSequence(),t.endSequence(),wn("PUBLIC",t.buffer)}a(Hv,"genOpenSSLEdPub");function jv(e){let t=Buffer.allocUnsafe(19+e.length);return br(t,11,0),t.utf8Write("ssh-ed25519",4,11),br(t,e.length,15),t.set(e,19),t}a(jv,"genOpenSSHEdPub");function H4(e){let t=new Fe.Writer;return t.startSequence(),t.writeInt(0,Fe.Integer),t.startSequence(),t.writeOID("1.3.101.112"),t.endSequence(),t.startSequence(Fe.OctetString),t.writeBuffer(e,Fe.OctetString),t.endSequence(),t.endSequence(),wn("PRIVATE",t.buffer)}a(H4,"genOpenSSLEdPriv");function UE(e,t){let r=new Fe.Writer;return r.startSequence(),r.startSequence(),r.writeOID("1.2.840.10045.2.1"),r.writeOID(e),r.endSequence(),r.startSequence(Fe.BitString),r.writeByte(0),r._ensure(t.length),r._buf.set(t,r._offset),r._offset+=t.length,r.endSequence(),r.endSequence(),wn("PUBLIC",r.buffer)}a(UE,"genOpenSSLECDSAPub");function ME(e,t){let r;switch(e){case"1.2.840.10045.3.1.7":r="nistp256";break;case"1.3.132.0.34":r="nistp384";break;case"1.3.132.0.35":r="nistp521";break;default:return}let i=Buffer.allocUnsafe(39+t.length);return br(i,19,0),i.utf8Write(`ecdsa-sha2-${r}`,4,19),br(i,8,23),i.utf8Write(r,27,8),br(i,t.length,35),i.set(t,39),i}a(ME,"genOpenSSHECDSAPub");function j4(e,t,r){let i=new Fe.Writer;return i.startSequence(),i.writeInt(1,Fe.Integer),i.writeBuffer(r,Fe.OctetString),i.startSequence(160),i.writeOID(e),i.endSequence(),i.startSequence(161),i.startSequence(Fe.BitString),i.writeByte(0),i._ensure(t.length),i._buf.set(t,i._offset),i._offset+=t.length,i.endSequence(),i.endSequence(),i.endSequence(),wn("EC PRIVATE",i.buffer)}a(j4,"genOpenSSLECDSAPriv");function W4(e,t){let r=N4(e);return r.setPrivateKey(t),r.getPublicKey()}a(W4,"genOpenSSLECDSAPubFromPriv");var Iu={sign:a(typeof zv=="function"?function(t,r){let i=this[vn];if(i===null)return new Error("No private key available");(!r||typeof r!="string")&&(r=this[ei]);try{return zv(r,t,i)}catch(n){return n}}:function(t,r){let i=this[vn];if(i===null)return new Error("No private key available");(!r||typeof r!="string")&&(r=this[ei]);let n=D4(r);n.update(t);try{return n.sign(i)}catch(o){return o}},"sign"),verify:a(typeof Uv=="function"?function(t,r,i){let n=this[$n];if(n===null)return new Error("No public key available");(!i||typeof i!="string")&&(i=this[ei]);try{return Uv(i,t,n,r)}catch(o){return o}}:function(t,r,i){let n=this[$n];if(n===null)return new Error("No public key available");(!i||typeof i!="string")&&(i=this[ei]);let o=B4(i);o.update(t);try{return o.verify(n,r)}catch(s){return s}},"verify"),isPrivateKey:a(function(){return this[vn]!==null},"isPrivateKey"),getPrivatePEM:a(function(){return this[vn]},"getPrivatePEM"),getPublicPEM:a(function(){return this[$n]},"getPublicPEM"),getPublicSSH:a(function(){return this[ki]},"getPublicSSH"),equals:a(function(t){let r=Vv(t);return r instanceof Error?!1:this.type===r.type&&this[vn]===r[vn]&&this[$n]===r[$n]&&this[ki].equals(r[ki])},"equals")};function op(e,t,r,i,n,o,s){this.type=e,this.comment=t,this[vn]=r,this[$n]=i,this[ki]=n,this[ei]=o,this[Os]=s}a(op,"OpenSSH_Private");op.prototype=Iu;{let t=function(r,i,n){let o=[];if(r.length<8)return new Error("Malformed OpenSSH private key");let s=gu(r,0),c=gu(r,4);if(s!==c)return n?new Error("OpenSSH key integrity check failed -- bad passphrase?"):new Error("OpenSSH key integrity check failed");r._pos=8;let u,l;for(u=0;u<i;++u){let p,g,h,_,y=ze(r,r._pos,!0);if(y===void 0)return new Error("Malformed OpenSSH private key");switch(y){case"ssh-rsa":{let S=ze(r,r._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");let v=ze(r,r._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");let M=ze(r,r._pos);if(M===void 0)return new Error("Malformed OpenSSH private key");let R=ze(r,r._pos);if(R===void 0)return new Error("Malformed OpenSSH private key");let J=ze(r,r._pos);if(J===void 0)return new Error("Malformed OpenSSH private key");let te=ze(r,r._pos);if(te===void 0)return new Error("Malformed OpenSSH private key");h=Eu(S,v),_=Au(S,v),g=Mv(S,v,M,R,J,te),p="sha1";break}case"ssh-dss":{let S=ze(r,r._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");let v=ze(r,r._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");let M=ze(r,r._pos);if(M===void 0)return new Error("Malformed OpenSSH private key");let R=ze(r,r._pos);if(R===void 0)return new Error("Malformed OpenSSH private key");let J=ze(r,r._pos);if(J===void 0)return new Error("Malformed OpenSSH private key");h=bu(S,v,M,R),_=xu(S,v,M,R),g=Fv(S,v,M,R,J),p="sha1";break}case"ssh-ed25519":{if(!LE)return new Error(`Unsupported OpenSSH private key type: ${y}`);let S=ze(r,r._pos);if(S===void 0||S.length!==32)return new Error("Malformed OpenSSH private key");let v=ze(r,r._pos);if(v===void 0||v.length!==64)return new Error("Malformed OpenSSH private key");h=Hv(S),_=jv(S),g=H4(Io(v,0,32)),p=null;break}case"ecdsa-sha2-nistp256":p="sha256",l="1.2.840.10045.3.1.7";case"ecdsa-sha2-nistp384":p===void 0&&(p="sha384",l="1.3.132.0.34");case"ecdsa-sha2-nistp521":{if(p===void 0&&(p="sha512",l="1.3.132.0.35"),!zE(r,1))return new Error("Malformed OpenSSH private key");let S=ze(r,r._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");let v=ze(r,r._pos);if(v===void 0)return new Error("Malformed OpenSSH private key");h=UE(l,S),_=ME(l,S),g=j4(l,S,v);break}default:return new Error(`Unsupported OpenSSH private key type: ${y}`)}let b=ze(r,r._pos,!0);if(b===void 0)return new Error("Malformed OpenSSH private key");o.push(new op(y,b,g,h,_,p,n))}let f=0;for(u=r._pos;u<r.length;++u)if(r[u]!==++f%255)return new Error("Malformed OpenSSH private key");return o};a(t,"parseOpenSSHPrivKeys");let e=/^-----BEGIN OPENSSH PRIVATE KEY-----(?:\r\n|\n)([\s\S]+)(?:\r\n|\n)-----END OPENSSH PRIVATE KEY-----$/;op.parse=(r,i)=>{let n=e.exec(r);if(n===null)return null;let o,s=Buffer.from(n[1],"base64");if(s.length<31)return new Error("Malformed OpenSSH private key");let c=s.utf8Slice(0,15);if(c!=="openssh-key-v1\0")return new Error(`Unsupported OpenSSH key magic: ${c}`);let u=ze(s,15,!0);if(u===void 0)return new Error("Malformed OpenSSH private key");if(u!=="none"&&M4.indexOf(u)===-1)return new Error(`Unsupported cipher for OpenSSH key: ${u}`);let l=ze(s,s._pos,!0);if(l===void 0)return new Error("Malformed OpenSSH private key");if(l!=="none"){if(u==="none")return new Error("Malformed OpenSSH private key");if(l!=="bcrypt")return new Error(`Unsupported kdf name for OpenSSH key: ${l}`);if(!i)return new Error("Encrypted private OpenSSH key detected, but no passphrase given")}else if(u!=="none")return new Error("Malformed OpenSSH private key");let f,p,g;u!=="none"&&(f=_u[u]);let h=ze(s,s._pos);if(h===void 0)return new Error("Malformed OpenSSH private key");if(h.length)switch(l){case"none":return new Error("Malformed OpenSSH private key");case"bcrypt":{let y=ze(h,0);if(y===void 0||h._pos+4>h.length)return new Error("Malformed OpenSSH private key");let b=gu(h,h._pos),S=Buffer.allocUnsafe(f.keyLen+f.ivLen);if(U4(i,i.length,y,y.length,S,S.length,b)!==0)return new Error("Failed to generate information to decrypt key");p=Io(S,0,f.keyLen),g=Io(S,f.keyLen,S.length);break}}else if(l!=="none")return new Error("Malformed OpenSSH private key");if(s._pos+3>=s.length)return new Error("Malformed OpenSSH private key");let _=gu(s,s._pos);if(s._pos+=4,_>0){for(let b=0;b<_;++b){let S=ze(s,s._pos);if(S===void 0)return new Error("Malformed OpenSSH private key");if(ze(S,0,!0)===void 0)return new Error("Malformed OpenSSH private key")}let y=ze(s,s._pos);if(y===void 0)return new Error("Malformed OpenSSH private key");if(p!==void 0){if(y.length<f.blockLen||y.length%f.blockLen!==0)return new Error("Malformed OpenSSH private key");try{let b={authTagLength:f.authLen},S=BE(f.sslName,p,g,b);if(S.setAutoPadding(!1),f.authLen>0){if(s.length-s._pos<f.authLen)return new Error("Malformed OpenSSH private key");S.setAuthTag(Io(s,s._pos,s._pos+=f.authLen))}y=yu(S.update(y),S.final())}catch(b){return b}}if(s._pos!==s.length)return new Error("Malformed OpenSSH private key");o=t(y,_,p!==void 0)}else o=[];return o instanceof Error?o:o[0]}}function sp(e,t,r,i,n,o,s){this.type=e,this.comment=t,this[vn]=r,this[$n]=i,this[ki]=n,this[ei]=o,this[Os]=s}a(sp,"OpenSSH_Old_Private");sp.prototype=Iu;{let e=/^-----BEGIN (RSA|DSA|EC) PRIVATE KEY-----(?:\r\n|\n)((?:[^:]+:\s*[\S].*(?:\r\n|\n))*)([\s\S]+)(?:\r\n|\n)-----END (RSA|DSA|EC) PRIVATE KEY-----$/;sp.parse=(t,r)=>{let i=e.exec(t);if(i===null)return null;let n=Buffer.from(i[3],"base64"),o=i[2],s=!1;if(o!==void 0){o=o.split(/\r\n|\n/g);for(let _=0;_<o.length;++_){let y=o[_],b=y.indexOf(":");if(y.slice(0,b)==="DEK-Info"){let S=y.slice(b+2);if(b=S.indexOf(","),b===-1)continue;let v=S.slice(0,b).toLowerCase();if(z4.indexOf(v)===-1)return new Error(`Cipher (${v}) not supported for encrypted OpenSSH private key`);let M=DE[v];if(!M)return new Error(`Cipher (${v}) not supported for encrypted OpenSSH private key`);let R=Buffer.from(S.slice(b+1),"hex");if(R.length!==M.ivLen)return new Error("Malformed encrypted OpenSSH private key");if(!r)return new Error("Encrypted OpenSSH private key detected, but no passphrase given");let J=Io(R,0,8),te=mu("md5").update(r).update(J).digest();for(;te.length<M.keyLen;)te=yu(te,mu("md5").update(te).update(r).update(J).digest());te.length>M.keyLen&&(te=Io(te,0,M.keyLen));try{let ee=BE(v,te,R);ee.setAutoPadding(!1),n=yu(ee.update(n),ee.final()),s=!0}catch(ee){return ee}}}}let c,u,l,f,p,g,h="Malformed OpenSSH private key";switch(s&&(h+=". Bad passphrase?"),i[1]){case"RSA":c="ssh-rsa",u=wn("RSA PRIVATE",n);try{g=new Fe.Reader(n),g.readSequence(),g.readInt();let _=g.readString(Fe.Integer,!0);if(_===null)return new Error(h);let y=g.readString(Fe.Integer,!0);if(y===null)return new Error(h);l=Eu(_,y),f=Au(_,y)}catch{return new Error(h)}p="sha1";break;case"DSA":c="ssh-dss",u=wn("DSA PRIVATE",n);try{g=new Fe.Reader(n),g.readSequence(),g.readInt();let _=g.readString(Fe.Integer,!0);if(_===null)return new Error(h);let y=g.readString(Fe.Integer,!0);if(y===null)return new Error(h);let b=g.readString(Fe.Integer,!0);if(b===null)return new Error(h);let S=g.readString(Fe.Integer,!0);if(S===null)return new Error(h);l=bu(_,y,b,S),f=xu(_,y,b,S)}catch{return new Error(h)}p="sha1";break;case"EC":{let _,y,b;try{g=new Fe.Reader(n),g.readSequence(),g.readInt(),y=g.readString(Fe.OctetString,!0),g.readByte();let v=g.readLength();if(v!==null){if(g._offset=v,b=g.readOID(),b===null)return new Error(h);switch(b){case"1.2.840.10045.3.1.7":_="prime256v1",c="ecdsa-sha2-nistp256",p="sha256";break;case"1.3.132.0.34":_="secp384r1",c="ecdsa-sha2-nistp384",p="sha384";break;case"1.3.132.0.35":_="secp521r1",c="ecdsa-sha2-nistp521",p="sha512";break;default:return new Error(`Unsupported private key EC OID: ${b}`)}}else return new Error(h)}catch{return new Error(h)}u=wn("EC PRIVATE",n);let S=W4(_,y);l=UE(b,S),f=ME(b,S);break}}return new sp(c,"",u,l,f,p,s)}}function ap(e,t,r,i,n,o,s){this.type=e,this.comment=t,this[vn]=r,this[$n]=i,this[ki]=n,this[ei]=o,this[Os]=s}a(ap,"PPK_Private");ap.prototype=Iu;{let e=Buffer.alloc(0),t=Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r=Buffer.from([0,0,0,0]),i=Buffer.from([0,0,0,1]),n=/^PuTTY-User-Key-File-2: (ssh-(?:rsa|dss))\r?\nEncryption: (aes256-cbc|none)\r?\nComment: ([^\r\n]*)\r?\nPublic-Lines: \d+\r?\n([\s\S]+?)\r?\nPrivate-Lines: \d+\r?\n([\s\S]+?)\r?\nPrivate-MAC: ([^\r\n]+)/;ap.parse=(o,s)=>{let c=n.exec(o);if(c===null)return null;let u=c[2],l=u!=="none";if(l&&!s)return new Error("Encrypted PPK private key detected, but no passphrase given");let f=Buffer.from(c[5],"base64");if(l){let H=_u[u],U=yu(mu("sha1").update(r).update(s).digest(),mu("sha1").update(i).update(s).digest());U.length>H.keyLen&&(U=Io(U,0,H.keyLen));try{let k=BE(H.sslName,U,t);k.setAutoPadding(!1),f=yu(k.update(f),k.final())}catch(k){return k}}let p=c[1],g=c[3],h=Buffer.from(c[4],"base64"),_=c[6],y=p.length,b=u.length,S=Buffer.byteLength(g),v=h.length,M=f.length,R=Buffer.allocUnsafe(4+y+4+b+4+S+4+v+4+M),J=0;if(br(R,y,J),R.utf8Write(p,J+=4,y),br(R,b,J+=y),R.utf8Write(u,J+=4,b),br(R,S,J+=b),R.utf8Write(g,J+=4,S),br(R,v,J+=S),R.set(h,J+=4),br(R,M,J+=v),R.set(f,J+4),s||(s=e),$4("sha1",mu("sha1").update("putty-private-key-file-mac-key").update(s).digest()).update(R).digest("hex")!==_)return l?new Error("PPK private key integrity check failed -- bad passphrase?"):new Error("PPK private key integrity check failed");let ee,P,C;switch(h._pos=0,zE(h,1),p){case"ssh-rsa":{let H=ze(h,h._pos);if(H===void 0)return new Error("Malformed PPK public key");let U=ze(h,h._pos);if(U===void 0)return new Error("Malformed PPK public key");let k=ze(f,0);if(k===void 0)return new Error("Malformed PPK private key");let j=ze(f,f._pos);if(j===void 0)return new Error("Malformed PPK private key");let W=ze(f,f._pos);if(W===void 0)return new Error("Malformed PPK private key");let L=ze(f,f._pos);if(L===void 0)return new Error("Malformed PPK private key");ee=Eu(U,H),P=Au(U,H),C=Mv(U,H,k,L,j,W);break}case"ssh-dss":{let H=ze(h,h._pos);if(H===void 0)return new Error("Malformed PPK public key");let U=ze(h,h._pos);if(U===void 0)return new Error("Malformed PPK public key");let k=ze(h,h._pos);if(k===void 0)return new Error("Malformed PPK public key");let j=ze(h,h._pos);if(j===void 0)return new Error("Malformed PPK public key");let W=ze(f,0);if(W===void 0)return new Error("Malformed PPK private key");ee=bu(H,U,k,j),P=xu(H,U,k,j),C=Fv(H,U,k,j,W);break}}return new ap(p,g,C,ee,P,"sha1",l)}}function up(e,t,r,i,n){this.type=e,this.comment=t,this[vn]=null,this[$n]=r,this[ki]=i,this[ei]=n,this[Os]=!1}a(up,"OpenSSH_Public");up.prototype=Iu;{let e;LE?e=/^(((?:ssh-(?:rsa|dss|ed25519))|ecdsa-sha2-nistp(?:256|384|521))(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z/+=]+)(?:$|\s+([\S].*)?)$/:e=/^(((?:ssh-(?:rsa|dss))|ecdsa-sha2-nistp(?:256|384|521))(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z/+=]+)(?:$|\s+([\S].*)?)$/,up.parse=t=>{let r=e.exec(t);if(r===null)return null;let i=r[1],n=r[2],o=Buffer.from(r[3],"base64"),s=r[4]||"",c=ze(o,o._pos,!0);return c===void 0||c.indexOf(n)!==0?new Error("Malformed OpenSSH public key"):FE(o,n,s,i)}}function cp(e,t,r,i,n){this.type=e,this.comment=t,this[vn]=null,this[$n]=r,this[ki]=i,this[ei]=n,this[Os]=!1}a(cp,"RFC4716_Public");cp.prototype=Iu;{let e=/^---- BEGIN SSH2 PUBLIC KEY ----(?:\r?\n)((?:.{0,72}\r?\n)+)---- END SSH2 PUBLIC KEY ----$/,t=/^[A-Z0-9a-z/+=\r\n]+$/,r=/^([\x21-\x39\x3B-\x7E]{1,64}): ((?:[^\\]*\\\r?\n)*[^\r\n]+)\r?\n/gm,i=/\\\r?\n/g;cp.parse=n=>{let o=e.exec(n);if(o===null)return null;let s=o[1],c=0,u="";for(;o=r.exec(s);){let h=o[1],_=o[2].replace(i,"");if(_.length>1024)return r.lastIndex=0,new Error("Malformed RFC4716 public key");c=r.lastIndex,h.toLowerCase()==="comment"&&(u=_,u.length>1&&u.charCodeAt(0)===34&&u.charCodeAt(u.length-1)===34&&(u=u.slice(1,-1)))}let l=s.slice(c);if(!t.test(l))return new Error("Malformed RFC4716 public key");l=Buffer.from(l,"base64");let f=ze(l,0,!0);if(f===void 0)return new Error("Malformed RFC4716 public key");let p=null,g=null;switch(f){case"ssh-rsa":{let h=ze(l,l._pos);if(h===void 0)return new Error("Malformed RFC4716 public key");let _=ze(l,l._pos);if(_===void 0)return new Error("Malformed RFC4716 public key");p=Eu(_,h),g=Au(_,h);break}case"ssh-dss":{let h=ze(l,l._pos);if(h===void 0)return new Error("Malformed RFC4716 public key");let _=ze(l,l._pos);if(_===void 0)return new Error("Malformed RFC4716 public key");let y=ze(l,l._pos);if(y===void 0)return new Error("Malformed RFC4716 public key");let b=ze(l,l._pos);if(b===void 0)return new Error("Malformed RFC4716 public key");p=bu(h,_,y,b),g=xu(h,_,y,b);break}default:return new Error("Malformed RFC4716 public key")}return new cp(f,u,p,g,"sha1")}}function FE(e,t,r,i){if(!Wv(t))return new Error(`Unsupported OpenSSH public key type: ${t}`);let n,o,s=null,c=null;switch(t){case"ssh-rsa":{let u=ze(e,e._pos||0);if(u===void 0)return new Error("Malformed OpenSSH public key");let l=ze(e,e._pos);if(l===void 0)return new Error("Malformed OpenSSH public key");s=Eu(l,u),c=Au(l,u),n="sha1";break}case"ssh-dss":{let u=ze(e,e._pos||0);if(u===void 0)return new Error("Malformed OpenSSH public key");let l=ze(e,e._pos);if(l===void 0)return new Error("Malformed OpenSSH public key");let f=ze(e,e._pos);if(f===void 0)return new Error("Malformed OpenSSH public key");let p=ze(e,e._pos);if(p===void 0)return new Error("Malformed OpenSSH public key");s=bu(u,l,f,p),c=xu(u,l,f,p),n="sha1";break}case"ssh-ed25519":{let u=ze(e,e._pos||0);if(u===void 0||u.length!==32)return new Error("Malformed OpenSSH public key");s=Hv(u),c=jv(u),n=null;break}case"ecdsa-sha2-nistp256":n="sha256",o="1.2.840.10045.3.1.7";case"ecdsa-sha2-nistp384":n===void 0&&(n="sha384",o="1.3.132.0.34");case"ecdsa-sha2-nistp521":{if(n===void 0&&(n="sha512",o="1.3.132.0.35"),!zE(e,1))return new Error("Malformed OpenSSH public key");let u=ze(e,e._pos||0);if(u===void 0)return new Error("Malformed OpenSSH public key");s=UE(o,u),c=ME(o,u);break}default:return new Error(`Unsupported OpenSSH public key type: ${t}`)}return new up(i,r,s,c,n)}a(FE,"parseDER");function Wv(e){switch(e){case"ssh-rsa":case"ssh-dss":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":case"ecdsa-sha2-nistp521":return!0;case"ssh-ed25519":if(LE)return!0;default:return!1}}a(Wv,"isSupportedKeyType");function qv(e){return e?typeof e[Os]=="boolean":!1}a(qv,"isParsedKey");function Vv(e,t){if(qv(e))return e;let r;if(Buffer.isBuffer(e))r=e,e=e.utf8Slice(0,e.length).trim();else if(typeof e=="string")e=e.trim();else return new Error("Key data must be a Buffer or string");if(t!=null){if(typeof t=="string")t=Buffer.from(t);else if(!Buffer.isBuffer(t))return new Error("Passphrase must be a string or Buffer when supplied")}let i;if((i=op.parse(e,t))!==null||(i=sp.parse(e,t))!==null||(i=ap.parse(e,t))!==null||(i=up.parse(e))!==null||(i=cp.parse(e))!==null)return i;if(r){ip.init(r,0);let n=ip.readString(!0);n!==void 0&&(e=ip.readRaw(),e!==void 0&&(i=FE(e,n,"",n),i instanceof Error&&(i=null))),ip.clear()}return i||new Error("Unsupported key format")}a(Vv,"parseKey");Zv.exports={isParsedKey:qv,isSupportedKeyType:Wv,parseDERKey:a((e,t)=>FE(e,t,"",t),"parseDERKey"),parseKey:Vv}});var ZE=me((s7,nw)=>{"use strict";var{Socket:Yv}=require("net"),{Duplex:Xv}=require("stream"),{resolve:q4}=require("path"),{readFile:Qv}=require("fs"),{execFile:V4,spawn:Z4}=require("child_process"),{isParsedKey:Gv,parseKey:Su}=Ci(),{makeBufferParser:Q4,readUInt32BE:VE,writeUInt32BE:Qr,writeUInt32LE:Kv}=Sn();function vu(e){let t=!1;return(...r)=>{t||(t=!0,e(...r))}}a(vu,"once");function G4(e,t){let r=Buffer.allocUnsafe(e.length+t.length);return e.copy(r,0),t.copy(r,e.length),r}a(G4,"concat");function jE(){}a(jE,"noop");var K4=Buffer.alloc(0),Kt=Q4(),wu=class{static{a(this,"BaseAgent")}getIdentities(t){t(new Error("Missing getIdentities() implementation"))}sign(t,r,i,n){typeof i=="function"&&(n=i),n(new Error("Missing sign() implementation"))}},$s=class extends wu{static{a(this,"OpenSSHAgent")}constructor(t){super(),this.socketPath=t}getStream(t){t=vu(t);let r=new Yv;r.on("connect",()=>{t(null,r)}),r.on("close",i).on("end",i).on("error",i),r.connect(this.socketPath);function i(){try{r.destroy()}catch{}t(new Error("Failed to connect to agent"))}a(i,"onFail")}getIdentities(t){t=vu(t),this.getStream((r,i)=>{function n(s){if(i)try{i.destroy()}catch{}s||(s=new Error("Failed to retrieve identities from agent")),t(s)}if(a(n,"onFail"),r)return n(r);let o=new WE(!0);o.on("error",n),o.pipe(i).pipe(o),i.on("close",n).on("end",n).on("error",n),o.getIdentities((s,c)=>{if(s)return n(s);try{i.destroy()}catch{}t(null,c)})})}sign(t,r,i,n){typeof i=="function"?(n=i,i=void 0):(typeof i!="object"||i===null)&&(i=void 0),n=vu(n),this.getStream((o,s)=>{function c(l){if(s)try{s.destroy()}catch{}l||(l=new Error("Failed to sign data with agent")),n(l)}if(a(c,"onFail"),o)return c(o);let u=new WE(!0);u.on("error",c),u.pipe(s).pipe(u),s.on("close",c).on("end",c).on("error",c),u.sign(t,r,i,(l,f)=>{if(l)return c(l);try{s.destroy()}catch{}n(null,f)})})}},Jv=(()=>{let s=q4(__dirname,"..","util/pagent.exe"),c={10:new Error("Invalid pagent.exe arguments"),11:new Error("Pageant is not running"),12:new Error("pagent.exe could not create an mmap"),13:new Error("pagent.exe could not set mode for stdin"),14:new Error("pagent.exe could not set mode for stdout"),15:new Error("pagent.exe did not get expected input payload")};function u(f){f.buffer=null,f.proc&&(f.proc.kill(),f.proc=void 0)}a(u,"destroy");class l extends Xv{static{a(this,"PageantSocket")}constructor(){super(),this.proc=void 0,this.buffer=null}_read(p){}_write(p,g,h){if(this.buffer===null)this.buffer=p;else{let S=Buffer.allocUnsafe(this.buffer.length+p.length);this.buffer.copy(S,0),p.copy(S,this.buffer.length),this.buffer=S}if(this.buffer.length<4)return h();let _=VE(this.buffer,0);if(this.buffer.length-4<_)return h();if(p=this.buffer.slice(0,4+_),this.buffer.length>4+_)return h(new Error("Unexpected multiple agent requests"));this.buffer=null;let y,b=this.proc=Z4(s,[p.length]);b.stdout.on("data",S=>{this.push(S)}),b.on("error",S=>{y=S,h(y)}),b.on("close",S=>{if(this.proc=void 0,!y){if(y=c[S])return h(y);h()}}),b.stdin.end(p)}_final(p){u(this),p()}_destroy(p,g){u(this),g()}}return class extends $s{static{a(this,"PageantAgent")}getStream(p){p(null,new l)}}})(),ew=(()=>{let e=/^!<socket >(\d+) s ([A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8})/;return class extends $s{static{a(this,"CygwinAgent")}getStream(r){r=vu(r);let i=this.socketPath,n=!1;Qv(i,a(function o(s,c){if(s){if(n)return r(new Error("Invalid cygwin unix socket path"));V4("cygpath",["-w",i],(te,ee,P)=>{if(te||ee.length===0)return r(new Error("Invalid cygwin unix socket path"));n=!0,i=ee.toString().replace(/[\r\n]/g,""),Qv(i,o)});return}let u=e.exec(c.toString("ascii"));if(!u)return r(new Error("Malformed cygwin unix socket file"));let l,f=0,p=!1,g=[],h,_=Buffer.alloc(12),y=parseInt(u[1],10),b=u[2].replace(/-/g,""),S=Buffer.allocUnsafe(16);for(let te=0,ee=0;ee<32;++te,ee+=2)S[te]=parseInt(b.substring(ee,ee+2),16);for(let te=0;te<16;te+=4)Kv(S,VE(S,te),te);J();function v(){f=0,l="secret",h.write(S)}a(v,"_onconnect");function M(te){if(f+=te.length,l==="secret"){f===16&&(f=0,l="creds",h.write(_));return}if(l==="creds"&&(p||g.push(te),f===12)){if(h.removeListener("connect",v),h.removeListener("data",M),h.removeListener("error",R),h.removeListener("end",R),h.removeListener("close",R),p)return r(null,h);p=!0,_=Buffer.concat(g),Kv(_,process.pid,0),h.on("error",()=>{}),h.destroy(),J()}}a(M,"_ondata");function R(){r(new Error("Problem negotiating cygwin unix socket security"))}a(R,"onFail");function J(){h=new Yv,h.on("connect",v),h.on("data",M),h.on("error",R),h.on("end",R),h.on("close",R),h.connect(y)}a(J,"tryConnect")},"readCygsocket"))}}})(),Y4=/^[/\\][/\\]\.[/\\]pipe[/\\].+/;function tw(e){return process.platform==="win32"&&!Y4.test(e)?e==="pageant"?new Jv:new ew(e):new $s(e)}a(tw,"createAgent");var WE=(()=>{function l(P){let C;for(;P[v].length;){let H=P[v][0][p];if(H===void 0)break;P[v].shift(),C=P.push(H)}return C}a(l,"processResponses");let f=Symbol("Inbound Request Type"),p=Symbol("Inbound Request Response"),g=Symbol("Inbound Request Context");class h{static{a(this,"AgentInboundRequest")}constructor(C,H){this[f]=C,this[p]=void 0,this[g]=H}hasResponded(){return this[p]!==void 0}getType(){return this[f]}getContext(){return this[g]}}function _(P,C,H){return C[p]=H,l(P)}a(_,"respond");function y(P){if(P[R]=null,P[M]===0){let C=P[v];if(C&&C.length){P[v]=[];for(let H of C)H.cb(new Error("No reply from server"))}}try{P.end()}catch{}setImmediate(()=>{P[ee]||P.emit("end"),P[te]||P.emit("close")})}a(y,"cleanup");function b(){this[te]=!0}a(b,"onClose");function S(){this[ee]=!0}a(S,"onEnd");let v=Symbol("Requests"),M=Symbol("Agent Protocol Role"),R=Symbol("Agent Protocol Buffer"),J=Symbol("Agent Protocol Current Message Length"),te=Symbol("Agent Protocol Closed"),ee=Symbol("Agent Protocol Ended");return class extends Xv{static{a(this,"AgentProtocol")}constructor(C){super({autoDestroy:!0,emitClose:!1}),this[M]=C?0:1,this[v]=[],this[R]=null,this[J]=-1,this.once("end",S),this.once("close",b)}_read(C){}_write(C,H,U){this[R]===null?this[R]=C:this[R]=G4(this[R],C);let k=this[R],j=k.length,W=0;for(;W<j&&!(j<5||(this[J]===-1&&(this[J]=VE(k,W)),j<4+this[J]));){let L=k[W+=4];if(++W,this[M]===0){if(this[v].length===0)return U(new Error("Received unexpected message from server"));let X=this[v].shift();switch(L){case 5:X.cb(new Error("Agent responded with failure"));break;case 12:{if(X.type!==11)return U(new Error("Agent responded with wrong message type"));Kt.init(k,W);let ne=Kt.readUInt32BE();if(ne===void 0)return Kt.clear(),U(new Error("Malformed agent response"));let O=[];for(let q=0;q<ne;++q){let V=Kt.readString();if(V===void 0)return Kt.clear(),U(new Error("Malformed agent response"));let re=Kt.readString(!0);if(re===void 0)return Kt.clear(),U(new Error("Malformed agent response"));V=Su(V),!(V instanceof Error)&&(V.comment=V.comment||re,O.push(V))}W=Kt.pos(),Kt.clear(),X.cb(null,O);break}case 14:{if(X.type!==13)return U(new Error("Agent responded with wrong message type"));Kt.init(k,W);let ne=Kt.readString();if(W=Kt.pos(),Kt.clear(),ne===void 0)return U(new Error("Malformed agent response"));if(Kt.init(ne,0),Kt.readString(!0),ne=Kt.readString(),Kt.clear(),ne===void 0)return U(new Error("Malformed OpenSSH signature format"));X.cb(null,ne);break}default:return U(new Error("Agent responded with unsupported message type"))}}else switch(L){case 11:{let X=new h(L);this[v].push(X),this.emit("identities",X);break}case 13:{Kt.init(k,W);let X=Kt.readString(),ne=Kt.readString(),O=Kt.readUInt32BE();if(W=Kt.pos(),Kt.clear(),O===void 0){let _e=new h(L);return this[v].push(_e),this.failureReply(_e)}if(X=Su(X),X instanceof Error){let _e=new h(L);return this[v].push(_e),this.failureReply(_e)}let q={hash:void 0},V;X.type==="ssh-rsa"&&(O&2?(V="rsa-sha2-256",q.hash="sha256"):O&4&&(V="rsa-sha2-512",q.hash="sha512")),V===void 0&&(V=X.type);let re=new h(L,V);this[v].push(re),this.emit("sign",re,X,ne,q);break}default:{let X=new h(L);this[v].push(X),this.failureReply(X)}}if(this[J]=-1,W===j){this[R]=null;break}else this[R]=k=k.slice(W),j=k.length,W=0}U()}_destroy(C,H){y(this),H()}_final(C){y(this),C()}sign(C,H,U,k){if(this[M]!==0)throw new Error("Client-only method called with server role");typeof U=="function"?(k=U,U=void 0):(typeof U!="object"||U===null)&&(U=void 0);let j=0;if(C=Su(C),C instanceof Error)throw new Error("Invalid public key argument");if(C.type==="ssh-rsa"&&U)switch(U.hash){case"sha256":j=2;break;case"sha512":j=4;break}C=C.getPublicSSH();let W=13,L=C.length,X=H.length,ne=0,O=Buffer.allocUnsafe(9+L+4+X+4);return Qr(O,O.length-4,ne),O[ne+=4]=W,Qr(O,L,++ne),C.copy(O,ne+=4),Qr(O,X,ne+=L),H.copy(O,ne+=4),Qr(O,j,ne+=X),typeof k!="function"&&(k=jE),this[v].push({type:W,cb:k}),this.push(O)}getIdentities(C){if(this[M]!==0)throw new Error("Client-only method called with server role");let H=11,U=0,k=Buffer.allocUnsafe(5);return Qr(k,k.length-4,U),k[U+=4]=H,typeof C!="function"&&(C=jE),this[v].push({type:H,cb:C}),this.push(k)}failureReply(C){if(this[M]!==1)throw new Error("Server-only method called with client role");if(!(C instanceof h))throw new Error("Wrong request argument");if(C.hasResponded())return!0;let H=0,U=Buffer.allocUnsafe(5);return Qr(U,U.length-4,H),U[H+=4]=5,_(this,C,U)}getIdentitiesReply(C,H){if(this[M]!==1)throw new Error("Server-only method called with client role");if(!(C instanceof h))throw new Error("Wrong request argument");if(C.hasResponded())return!0;if(C.getType()!==11)throw new Error("Invalid response to request");if(!Array.isArray(H))throw new Error("Keys argument must be an array");let U=4,k=[];for(let L=0;L<H.length;++L){let X=H[L];if(typeof X!="object"||X===null)throw new Error(`Invalid key entry: ${X}`);let ne,O;if(Gv(X))ne=X;else if(Gv(X.pubKey))ne=X.pubKey;else if(typeof X.pubKey!="object"||X.pubKey===null||({pubKey:ne,comment:O}=X.pubKey,ne=Su(ne),ne instanceof Error))continue;O=ne.comment||O,ne=ne.getPublicSSH(),U+=4+ne.length,O&&typeof O=="string"?O=Buffer.from(O):Buffer.isBuffer(O)||(O=K4),U+=4+O.length,k.push({pubKey:ne,comment:O})}let j=0,W=Buffer.allocUnsafe(5+U);Qr(W,W.length-4,j),W[j+=4]=12,Qr(W,k.length,++j),j+=4;for(let L=0;L<k.length;++L){let{pubKey:X,comment:ne}=k[L];Qr(W,X.length,j),X.copy(W,j+=4),Qr(W,ne.length,j+=X.length),j+=4,ne.length&&(ne.copy(W,j),j+=ne.length)}return _(this,C,W)}signReply(C,H){if(this[M]!==1)throw new Error("Server-only method called with client role");if(!(C instanceof h))throw new Error("Wrong request argument");if(C.hasResponded())return!0;if(C.getType()!==13)throw new Error("Invalid response to request");if(!Buffer.isBuffer(H))throw new Error("Signature argument must be a Buffer");if(H.length===0)throw new Error("Signature argument must be non-empty");let U=0,k=C.getContext(),j=Buffer.byteLength(k),W=Buffer.allocUnsafe(13+j+4+H.length);return Qr(W,W.length-4,U),W[U+=4]=14,Qr(W,4+j+4+H.length,++U),Qr(W,j,U+=4),W.utf8Write(k,U+=4,j),Qr(W,H.length,U+=j),H.copy(W,U+=4),_(this,C,W)}}})(),HE=Symbol("Agent"),Pn=Symbol("Agent Keys"),ti=Symbol("Agent Keys Index"),Ns=Symbol("Agent Init Callbacks"),qE=class{static{a(this,"AgentContext")}constructor(t){if(typeof t=="string")t=tw(t);else if(!rw(t))throw new Error("Invalid agent argument");this[HE]=t,this[Pn]=null,this[ti]=-1,this[Ns]=null}init(t){if(typeof t!="function"&&(t=jE),this[Pn]===null)if(this[Ns]===null){this[Ns]=[t];let r=a((...i)=>{process.nextTick(()=>{let n=this[Ns];this[Ns]=null;for(let o of n)o(...i)})},"doCbs");this[HE].getIdentities(vu((i,n)=>{if(i)return r(i);if(!Array.isArray(n))return r(new Error("Agent implementation failed to provide keys"));let o=[];for(let s of n)s=Su(s),!(s instanceof Error)&&o.push(s);this[Pn]=o,this[ti]=-1,r()}))}else this[Ns].push(t);else process.nextTick(t)}nextKey(){return this[Pn]===null||++this[ti]>=this[Pn].length?!1:this[Pn][this[ti]]}currentKey(){return this[Pn]===null||this[ti]>=this[Pn].length?null:this[Pn][this[ti]]}pos(){return this[Pn]===null||this[ti]>=this[Pn].length?-1:this[ti]}reset(){this[ti]=-1}sign(...t){this[HE].sign(...t)}};function rw(e){return e instanceof wu}a(rw,"isAgent");nw.exports={AgentContext:qE,AgentProtocol:WE,BaseAgent:wu,createAgent:tw,CygwinAgent:ew,isAgent:rw,OpenSSHAgent:$s,PageantAgent:Jv}});var JE=me((c7,iw)=>{"use strict";var{kMaxLength:X4}=require("buffer"),{createInflate:J4,constants:{DEFLATE:eD,INFLATE:tD,Z_DEFAULT_CHUNK:rD,Z_DEFAULT_COMPRESSION:nD,Z_DEFAULT_MEMLEVEL:iD,Z_DEFAULT_STRATEGY:oD,Z_DEFAULT_WINDOWBITS:sD,Z_PARTIAL_FLUSH:aD}}=require("zlib"),cD=J4()._handle.constructor;function uD(){throw new Error("Should not get here")}a(uD,"processCallback");function lD(e,t,r){let i=this._owner,n=new Error(e);n.errno=t,n.code=r,i._err=n}a(lD,"zlibOnError");function XE(e){e._handle&&(e._handle.close(),e._handle=null)}a(XE,"_close");var lp=class{static{a(this,"Zlib")}constructor(t){let r=sD,i=nD,n=iD,o=oD,s=void 0;this._err=void 0,this._writeState=new Uint32Array(2),this._chunkSize=rD,this._maxOutputLength=X4,this._outBuffer=Buffer.allocUnsafe(this._chunkSize),this._outOffset=0,this._handle=new cD(t),this._handle._owner=this,this._handle.onerror=lD,this._handle.init(r,i,n,o,this._writeState,uD,s)}writeSync(t,r){let i=this._handle;if(!i)throw new Error("Invalid Zlib instance");let n=t.length,o=this._chunkSize-this._outOffset,s=0,c,u,l,f=0,p=this._writeState,g=this._outBuffer,h=this._outOffset,_=this._chunkSize;for(;;){if(i.writeSync(aD,t,s,n,g,h,o),this._err)throw this._err;c=p[0],u=p[1];let b=n-u,S=o-c;if(S>0){let v=h===0&&S===g.length?g:g.slice(h,h+S);if(h+=S,l?l.push===void 0?l=[l,v]:l.push(v):l=v,f+=v.byteLength,f>this._maxOutputLength)throw XE(this),new Error(`Output length exceeded maximum of ${this._maxOutputLength}`)}else if(S!==0)throw new Error("have should not go down");if((c===0||h>=_)&&(o=_,h=0,g=Buffer.allocUnsafe(_)),c===0)s+=b,n=u;else break}if(this._outBuffer=g,this._outOffset=h,f===0&&(l=Buffer.alloc(0)),r)return l.totalLen=f,l;if(l.push===void 0)return l;let y=Buffer.allocUnsafe(f);for(let b=0,S=0;b<l.length;++b){let v=l[b];y.set(v,S),S+=v.length}return y}},QE=class{static{a(this,"ZlibPacketWriter")}constructor(t){this.allocStart=0,this.allocStartKEX=0,this._protocol=t,this._zlib=new lp(eD)}cleanup(){this._zlib&&XE(this._zlib)}alloc(t,r){return Buffer.allocUnsafe(t)}finalize(t,r){if(this._protocol._kexinit===void 0||r){let i=this._zlib.writeSync(t,!0),n=this._protocol._cipher.allocPacket(i.totalLen);if(i.push===void 0)n.set(i,5);else for(let o=0,s=5;o<i.length;++o){let c=i[o];n.set(c,s),s+=c.length}return n}return t}},GE=class{static{a(this,"PacketWriter")}constructor(t){this.allocStart=5,this.allocStartKEX=5,this._protocol=t}cleanup(){}alloc(t,r){return this._protocol._kexinit===void 0||r?this._protocol._cipher.allocPacket(t):Buffer.allocUnsafe(t)}finalize(t,r){return t}},KE=class{static{a(this,"ZlibPacketReader")}constructor(){this._zlib=new lp(tD)}cleanup(){this._zlib&&XE(this._zlib)}read(t){return this._zlib.writeSync(t,!1)}},YE=class{static{a(this,"PacketReader")}cleanup(){}read(t){return t}};iw.exports={PacketReader:YE,PacketWriter:GE,ZlibPacketReader:KE,ZlibPacketWriter:QE}});var uw=me((l7,cw)=>{"use strict";var{bufferSlice:eA,bufferParser:B,doFatalError:Ut,sigSSHToASN1:ow,writeUInt32BE:sw}=Sn(),{CHANNEL_OPEN_FAILURE:fD,COMPAT:dD,MESSAGE:Mt,TERMINAL_MODE:aw}=Jn(),{parseKey:pD}=Ci(),hD=Array.from(Object.entries(aw)).reduce((e,[t,r])=>({...e,[t]:r}),{});cw.exports={[Mt.DISCONNECT]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readString(!0),n=B.readString();if(B.clear(),n===void 0)return Ut(e,"Inbound: Malformed DISCONNECT packet");e._debug&&e._debug(`Inbound: Received DISCONNECT (${r}, "${i}")`);let o=e._handlers.DISCONNECT;o&&o(e,r,i)},[Mt.IGNORE]:(e,t)=>{e._debug&&e._debug("Inbound: Received IGNORE")},[Mt.UNIMPLEMENTED]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed UNIMPLEMENTED packet");e._debug&&e._debug(`Inbound: Received UNIMPLEMENTED (seqno ${r})`)},[Mt.DEBUG]:(e,t)=>{B.init(t,1);let r=B.readBool(),i=B.readString(!0),n=B.readString();if(B.clear(),n===void 0)return Ut(e,"Inbound: Malformed DEBUG packet");e._debug&&e._debug("Inbound: Received DEBUG");let o=e._handlers.DEBUG;o&&o(e,r,i)},[Mt.SERVICE_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readString(!0);if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed SERVICE_REQUEST packet");e._debug&&e._debug(`Inbound: Received SERVICE_REQUEST (${r})`);let i=e._handlers.SERVICE_REQUEST;i&&i(e,r)},[Mt.SERVICE_ACCEPT]:(e,t)=>{B.init(t,1);let r=B.readString(!0);if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed SERVICE_ACCEPT packet");e._debug&&e._debug(`Inbound: Received SERVICE_ACCEPT (${r})`);let i=e._handlers.SERVICE_ACCEPT;i&&i(e,r)},[Mt.EXT_INFO]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i;if(r!==void 0){i=[];for(let o=0;o<r;++o){let s=B.readString(!0),c=B.readString();if(c!==void 0)if(s==="server-sig-algs"){let u=c.latin1Slice(0,c.length).split(",");i.push({name:s,algs:u});continue}else continue;i=void 0;break}}if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed EXT_INFO packet");e._debug&&e._debug("Inbound: Received EXT_INFO");let n=e._handlers.EXT_INFO;n&&n(e,i)},[Mt.USERAUTH_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readString(!0),n=B.readString(!0),o,s;switch(n){case"none":o=null;break;case"password":{let u=B.readBool();if(u!==void 0&&(o=B.readString(!0),o!==void 0&&u)){let l=B.readString(!0);l!==void 0?o={oldPassword:o,newPassword:l}:o=void 0}break}case"publickey":{let u=B.readBool();if(u!==void 0){let l=B.readString(!0),f=l,p=B.readString(),g;switch(l){case"rsa-sha2-256":f="ssh-rsa",g="sha256";break;case"rsa-sha2-512":f="ssh-rsa",g="sha512";break}if(u){let h=B.pos(),_=B.readString();if(_!==void 0&&(_.length>4+l.length+4&&_.utf8Slice(4,4+l.length)===l&&(_=eA(_,4+l.length+4)),_=ow(_,f),_)){let y=e._kex.sessionID,b=Buffer.allocUnsafe(4+y.length+h);sw(b,y.length,0),b.set(y,4),b.set(new Uint8Array(t.buffer,t.byteOffset,h),4+y.length),o={keyAlgo:f,key:p,signature:_,blob:b,hashAlgo:g}}}else o={keyAlgo:f,key:p,hashAlgo:g},s="publickey -- check"}break}case"hostbased":{let u=B.readString(!0),l=u,f=B.readString(),p=B.readString(!0),g=B.readString(!0),h;switch(u){case"rsa-sha2-256":l="ssh-rsa",h="sha256";break;case"rsa-sha2-512":l="ssh-rsa",h="sha512";break}let _=B.pos(),y=B.readString();if(y!==void 0&&(y.length>4+u.length+4&&y.utf8Slice(4,4+u.length)===u&&(y=eA(y,4+u.length+4)),y=ow(y,l),y!==void 0)){let b=e._kex.sessionID,S=Buffer.allocUnsafe(4+b.length+_);sw(S,b.length,0),S.set(b,4),S.set(new Uint8Array(t.buffer,t.byteOffset,_),4+b.length),o={keyAlgo:l,key:f,signature:y,blob:S,localHostname:p,localUsername:g,hashAlgo:h}}break}case"keyboard-interactive":B.skipString(),o=B.readList();break;default:n!==void 0&&(o=B.readRaw())}if(B.clear(),o===void 0)return Ut(e,"Inbound: Malformed USERAUTH_REQUEST packet");s===void 0&&(s=n),e._authsQueue.push(n),e._debug&&e._debug(`Inbound: Received USERAUTH_REQUEST (${s})`);let c=e._handlers.USERAUTH_REQUEST;c&&c(e,r,i,n,o)},[Mt.USERAUTH_FAILURE]:(e,t)=>{B.init(t,1);let r=B.readList(),i=B.readBool();if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed USERAUTH_FAILURE packet");e._debug&&e._debug(`Inbound: Received USERAUTH_FAILURE (${r})`),e._authsQueue.shift();let n=e._handlers.USERAUTH_FAILURE;n&&n(e,r,i)},[Mt.USERAUTH_SUCCESS]:(e,t)=>{e._debug&&e._debug("Inbound: Received USERAUTH_SUCCESS"),e._authsQueue.shift();let r=e._handlers.USERAUTH_SUCCESS;r&&r(e)},[Mt.USERAUTH_BANNER]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readString();if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed USERAUTH_BANNER packet");e._debug&&e._debug("Inbound: Received USERAUTH_BANNER");let n=e._handlers.USERAUTH_BANNER;n&&n(e,r)},60:(e,t)=>{if(!e._authsQueue.length){e._debug&&e._debug("Inbound: Received payload type 60 without auth");return}switch(e._authsQueue[0]){case"password":{B.init(t,1);let r=B.readString(!0),i=B.readString();if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed USERAUTH_PASSWD_CHANGEREQ packet");e._debug&&e._debug("Inbound: Received USERAUTH_PASSWD_CHANGEREQ");let n=e._handlers.USERAUTH_PASSWD_CHANGEREQ;n&&n(e,r);break}case"publickey":{B.init(t,1);let r=B.readString(!0),i=B.readString();if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed USERAUTH_PK_OK packet");e._debug&&e._debug("Inbound: Received USERAUTH_PK_OK"),e._authsQueue.shift();let n=e._handlers.USERAUTH_PK_OK;n&&n(e,r,i);break}case"keyboard-interactive":{B.init(t,1);let r=B.readString(!0),i=B.readString(!0);B.readString();let n=B.readUInt32BE(),o;if(n!==void 0){o=new Array(n);let c;for(c=0;c<n;++c){let u=B.readString(!0),l=B.readBool();if(l===void 0)break;o[c]={prompt:u,echo:l}}c!==n&&(o=void 0)}if(B.clear(),o===void 0)return Ut(e,"Inbound: Malformed USERAUTH_INFO_REQUEST packet");e._debug&&e._debug("Inbound: Received USERAUTH_INFO_REQUEST");let s=e._handlers.USERAUTH_INFO_REQUEST;s&&s(e,r,i,o);break}default:e._debug&&e._debug("Inbound: Received unexpected payload type 60")}},61:(e,t)=>{if(!e._authsQueue.length){e._debug&&e._debug("Inbound: Received payload type 61 without auth");return}if(e._authsQueue[0]!=="keyboard-interactive")return Ut(e,"Inbound: Received unexpected payload type 61");B.init(t,1);let r=B.readUInt32BE(),i;if(r!==void 0){i=new Array(r);let o;for(o=0;o<r;++o){let s=B.readString(!0);if(s===void 0)break;i[o]=s}o!==r&&(i=void 0)}if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed USERAUTH_INFO_RESPONSE packet");e._debug&&e._debug("Inbound: Received USERAUTH_INFO_RESPONSE");let n=e._handlers.USERAUTH_INFO_RESPONSE;n&&n(e,i)},[Mt.GLOBAL_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readBool(),n;if(i!==void 0)switch(r){case"tcpip-forward":case"cancel-tcpip-forward":{let s=B.readString(!0),c=B.readUInt32BE();c!==void 0&&(n={bindAddr:s,bindPort:c});break}case"streamlocal-forward@openssh.com":case"cancel-streamlocal-forward@openssh.com":{let s=B.readString(!0);s!==void 0&&(n={socketPath:s});break}case"no-more-sessions@openssh.com":n=null;break;case"hostkeys-00@openssh.com":{for(n=[];B.avail()>0;){let s=B.readString();if(s===void 0){n=void 0;break}let c=pD(s);c instanceof Error||n.push(c)}break}default:n=B.readRaw()}if(B.clear(),n===void 0)return Ut(e,"Inbound: Malformed GLOBAL_REQUEST packet");e._debug&&e._debug(`Inbound: GLOBAL_REQUEST (${r})`);let o=e._handlers.GLOBAL_REQUEST;o?o(e,r,i,n):e.requestFailure()},[Mt.REQUEST_SUCCESS]:(e,t)=>{let r=t.length>1?eA(t,1):null;e._debug&&e._debug("Inbound: REQUEST_SUCCESS");let i=e._handlers.REQUEST_SUCCESS;i&&i(e,r)},[Mt.REQUEST_FAILURE]:(e,t)=>{e._debug&&e._debug("Inbound: Received REQUEST_FAILURE");let r=e._handlers.REQUEST_FAILURE;r&&r(e)},[Mt.CHANNEL_OPEN]:(e,t)=>{B.init(t,1);let r=B.readString(!0),i=B.readUInt32BE(),n=B.readUInt32BE(),o=B.readUInt32BE(),s;switch(r){case"forwarded-tcpip":case"direct-tcpip":{let u=B.readString(!0),l=B.readUInt32BE(),f=B.readString(!0),p=B.readUInt32BE();p!==void 0&&(s={type:r,sender:i,window:n,packetSize:o,data:{destIP:u,destPort:l,srcIP:f,srcPort:p}});break}case"forwarded-streamlocal@openssh.com":case"direct-streamlocal@openssh.com":{let u=B.readString(!0);u!==void 0&&(s={type:r,sender:i,window:n,packetSize:o,data:{socketPath:u}});break}case"x11":{let u=B.readString(!0),l=B.readUInt32BE();l!==void 0&&(s={type:r,sender:i,window:n,packetSize:o,data:{srcIP:u,srcPort:l}});break}default:s={type:r,sender:i,window:n,packetSize:o,data:{}}}if(B.clear(),s===void 0)return Ut(e,"Inbound: Malformed CHANNEL_OPEN packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN (s:${i}, ${r})`);let c=e._handlers.CHANNEL_OPEN;c?c(e,s):e.channelOpenFail(s.sender,fD.ADMINISTRATIVELY_PROHIBITED,"","")},[Mt.CHANNEL_OPEN_CONFIRMATION]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE(),n=B.readUInt32BE(),o=B.readUInt32BE(),s=B.avail()?B.readRaw():void 0;if(B.clear(),o===void 0)return Ut(e,"Inbound: Malformed CHANNEL_OPEN_CONFIRMATION packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN_CONFIRMATION (r:${r}, s:${i})`);let c=e._handlers.CHANNEL_OPEN_CONFIRMATION;c&&c(e,{recipient:r,sender:i,window:n,packetSize:o,data:s})},[Mt.CHANNEL_OPEN_FAILURE]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE(),n=B.readString(!0),o=B.readString();if(B.clear(),o===void 0)return Ut(e,"Inbound: Malformed CHANNEL_OPEN_FAILURE packet");e._debug&&e._debug(`Inbound: CHANNEL_OPEN_FAILURE (r:${r})`);let s=e._handlers.CHANNEL_OPEN_FAILURE;s&&s(e,r,i,n)},[Mt.CHANNEL_WINDOW_ADJUST]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE();if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed CHANNEL_WINDOW_ADJUST packet");e._debug&&e._debug(`Inbound: CHANNEL_WINDOW_ADJUST (r:${r}, ${i})`);let n=e._handlers.CHANNEL_WINDOW_ADJUST;n&&n(e,r,i)},[Mt.CHANNEL_DATA]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readString();if(B.clear(),i===void 0)return Ut(e,"Inbound: Malformed CHANNEL_DATA packet");e._debug&&e._debug(`Inbound: CHANNEL_DATA (r:${r}, ${i.length})`);let n=e._handlers.CHANNEL_DATA;n&&n(e,r,i)},[Mt.CHANNEL_EXTENDED_DATA]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readUInt32BE(),n=B.readString();if(B.clear(),n===void 0)return Ut(e,"Inbound: Malformed CHANNEL_EXTENDED_DATA packet");e._debug&&e._debug(`Inbound: CHANNEL_EXTENDED_DATA (r:${r}, ${n.length})`);let o=e._handlers.CHANNEL_EXTENDED_DATA;o&&o(e,r,n,i)},[Mt.CHANNEL_EOF]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed CHANNEL_EOF packet");e._debug&&e._debug(`Inbound: CHANNEL_EOF (r:${r})`);let i=e._handlers.CHANNEL_EOF;i&&i(e,r)},[Mt.CHANNEL_CLOSE]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed CHANNEL_CLOSE packet");e._debug&&e._debug(`Inbound: CHANNEL_CLOSE (r:${r})`);let i=e._handlers.CHANNEL_CLOSE;i&&i(e,r)},[Mt.CHANNEL_REQUEST]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE(),i=B.readString(!0),n=B.readBool(),o;if(n!==void 0)switch(i){case"exit-status":o=B.readUInt32BE(),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"exit-signal":{let c,u;if(e._compatFlags&dD.OLD_EXIT){let f=B.readUInt32BE();switch(f){case 1:c="HUP";break;case 2:c="INT";break;case 3:c="QUIT";break;case 6:c="ABRT";break;case 9:c="KILL";break;case 14:c="ALRM";break;case 15:c="TERM";break;default:f!==void 0&&(c=`UNKNOWN (${f})`)}u=!1}else c=B.readString(!0),u=B.readBool(),u===void 0&&(c=void 0);let l=B.readString(!0);B.skipString()!==void 0&&(o={signal:c,coreDumped:u,errorMessage:l}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${c})`);break}case"pty-req":{let c=B.readString(!0),u=B.readUInt32BE(),l=B.readUInt32BE(),f=B.readUInt32BE(),p=B.readUInt32BE(),g=B.readString();if(g!==void 0){B.init(g,1);let h={};for(;B.avail();){let _=B.readByte();if(_===aw.TTY_OP_END)break;let y=hD[_],b=B.readUInt32BE();if(_===void 0||y===void 0||b===void 0){h=void 0;break}h[y]=b}h!==void 0&&(o={term:c,cols:u,rows:l,width:f,height:p,modes:h})}e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break}case"window-change":{let c=B.readUInt32BE(),u=B.readUInt32BE(),l=B.readUInt32BE(),f=B.readUInt32BE();f!==void 0&&(o={cols:c,rows:u,width:l,height:f}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break}case"x11-req":{let c=B.readBool(),u=B.readString(!0),l=B.readString(),f=B.readUInt32BE();f!==void 0&&(o={single:c,protocol:u,cookie:l,screen:f}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break}case"env":{let c=B.readString(!0),u=B.readString(!0);u!==void 0&&(o={name:c,value:u}),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${c}=${u})`);break}case"shell":o=null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break;case"exec":o=B.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"subsystem":o=B.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"signal":o=B.readString(!0),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"xon-xoff":o=B.readBool(),e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i}: ${o})`);break;case"auth-agent-req@openssh.com":o=null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`);break;default:o=B.avail()?B.readRaw():null,e._debug&&e._debug(`Inbound: CHANNEL_REQUEST (r:${r}, ${i})`)}if(B.clear(),o===void 0)return Ut(e,"Inbound: Malformed CHANNEL_REQUEST packet");let s=e._handlers.CHANNEL_REQUEST;s&&s(e,r,i,n,o)},[Mt.CHANNEL_SUCCESS]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed CHANNEL_SUCCESS packet");e._debug&&e._debug(`Inbound: CHANNEL_SUCCESS (r:${r})`);let i=e._handlers.CHANNEL_SUCCESS;i&&i(e,r)},[Mt.CHANNEL_FAILURE]:(e,t)=>{B.init(t,1);let r=B.readUInt32BE();if(B.clear(),r===void 0)return Ut(e,"Inbound: Malformed CHANNEL_FAILURE packet");e._debug&&e._debug(`Inbound: CHANNEL_FAILURE (r:${r})`);let i=e._handlers.CHANNEL_FAILURE;i&&i(e,r)}}});var fp=me((f7,lw)=>{"use strict";var tA=new Array(256);[dp().HANDLERS,uw()].forEach(e=>{for(let[t,r]of Object.entries(e))t=+t,isFinite(t)&&t>=0&&t<tA.length&&(tA[t]=r)});lw.exports=tA});var dp=me((p7,Aw)=>{"use strict";var{createDiffieHellman:gD,createDiffieHellmanGroup:mD,createECDH:_D,createHash:nA,createPublicKey:yD,diffieHellman:ED,generateKeyPairSync:AD,randomFillSync:bD}=require("crypto"),{Ber:fw}=uu(),{COMPAT:iA,curve25519Supported:xD,DEFAULT_KEX:dw,DEFAULT_SERVER_HOST_KEY:pw,DEFAULT_CIPHER:pp,DEFAULT_MAC:hp,DEFAULT_COMPRESSION:gp,DISCONNECT_REASON:dt,MESSAGE:Bt}=Jn(),{CIPHER_INFO:Ls,createCipher:ID,createDecipher:SD,MAC_INFO:hw}=Pi(),{parseDERKey:vD}=Ci(),{bufferFill:wD,bufferParser:ft,convertSignature:PD,doFatalError:pt,FastBuffer:TD,sigSSHToASN1:kD,writeUInt32BE:xr}=Sn(),{PacketReader:gw,PacketWriter:mw,ZlibPacketReader:mp,ZlibPacketWriter:_p}=JE(),Ds,CD=2048,RD=8192,OD=Buffer.alloc(0);function _w(e){let t;if(e._compatFlags&iA.BAD_DHGEX){let r=e._offer.lists.kex,i=r.array,n=!1;for(let o=0;o<i.length;++o)i[o].includes("group-exchange")&&(n||(n=!0,i=i.slice()),i.splice(o--,1));if(n){let o=17+e._offer.totalSize+1+4,s=Buffer.from(i.join(","));o-=r.buffer.length-s.length;let c=e._offer.lists.all,u=new Uint8Array(c.buffer,c.byteOffset+4+r.buffer.length,c.length-(4+r.buffer.length));t=Buffer.allocUnsafe(o),xr(t,s.length,17),t.set(s,21),t.set(u,21+s.length)}}t===void 0&&(t=Buffer.allocUnsafe(17+e._offer.totalSize+1+4),e._offer.copyAllTo(t,17)),e._debug&&e._debug("Outbound: Sending KEXINIT"),t[0]=Bt.KEXINIT,bD(t,1,16),wD(t,0,t.length-5),e._kexinit=t,e._packetRW.write.allocStart=0;{let r=e._packetRW.write.allocStartKEX,i=e._packetRW.write.alloc(t.length,!0);i.set(t,r),e._cipher.encrypt(e._packetRW.write.finalize(i,!0))}}a(_w,"kexinit");function yw(e,t){let r={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},sc:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0}};if(ft.init(t,17),(r.kex=ft.readList())===void 0||(r.serverHostKey=ft.readList())===void 0||(r.cs.cipher=ft.readList())===void 0||(r.sc.cipher=ft.readList())===void 0||(r.cs.mac=ft.readList())===void 0||(r.sc.mac=ft.readList())===void 0||(r.cs.compress=ft.readList())===void 0||(r.sc.compress=ft.readList())===void 0||(r.cs.lang=ft.readList())===void 0||(r.sc.lang=ft.readList())===void 0)return ft.clear(),pt(e,"Received malformed KEXINIT","handshake",dt.KEY_EXCHANGE_FAILED);let i=ft.pos(),n=i<t.length&&t[i]===1;ft.clear();let o=e._offer,s=r,c=o.lists.kex.array;if(e._compatFlags&iA.BAD_DHGEX){let R=!1;for(let J=0;J<c.length;++J)c[J].indexOf("group-exchange")!==-1&&(R||(R=!0,c=c.slice()),c.splice(J--,1))}let u,l,f,p=e._debug;p&&p("Inbound: Handshake in progress"),p&&p(`Handshake: (local) KEX method: ${c}`),p&&p(`Handshake: (remote) KEX method: ${s.kex}`);let g;if(e._server?(l=c,u=s.kex,g=u.indexOf("ext-info-c")!==-1):(l=s.kex,u=c,g=l.indexOf("ext-info-s")!==-1),e._strictMode===void 0&&(e._server?e._strictMode=u.indexOf("kex-strict-c-v00@openssh.com")!==-1:e._strictMode=l.indexOf("kex-strict-s-v00@openssh.com")!==-1,e._strictMode&&(p&&p("Handshake: strict KEX mode enabled"),e._decipher.inSeqno!==1)))return p&&p("Handshake: KEXINIT not first packet in strict KEX mode"),pt(e,"Handshake failed: KEXINIT not first packet in strict KEX mode","handshake",dt.KEY_EXCHANGE_FAILED);for(f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: no matching key exchange algorithm"),pt(e,"Handshake failed: no matching key exchange algorithm","handshake",dt.KEY_EXCHANGE_FAILED);r.kex=u[f],p&&p(`Handshake: KEX algorithm: ${u[f]}`),n&&(!s.kex.length||u[f]!==s.kex[0])&&(e._skipNextInboundPacket=!0);let h=o.lists.serverHostKey.array;for(p&&p(`Handshake: (local) Host key format: ${h}`),p&&p(`Handshake: (remote) Host key format: ${s.serverHostKey}`),e._server?(l=h,u=s.serverHostKey):(l=s.serverHostKey,u=h),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching host key format"),pt(e,"Handshake failed: no matching host key format","handshake",dt.KEY_EXCHANGE_FAILED);r.serverHostKey=u[f],p&&p(`Handshake: Host key format: ${u[f]}`);let _=o.lists.cs.cipher.array;for(p&&p(`Handshake: (local) C->S cipher: ${_}`),p&&p(`Handshake: (remote) C->S cipher: ${s.cs.cipher}`),e._server?(l=_,u=s.cs.cipher):(l=s.cs.cipher,u=_),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching C->S cipher"),pt(e,"Handshake failed: no matching C->S cipher","handshake",dt.KEY_EXCHANGE_FAILED);r.cs.cipher=u[f],p&&p(`Handshake: C->S Cipher: ${u[f]}`);let y=o.lists.sc.cipher.array;for(p&&p(`Handshake: (local) S->C cipher: ${y}`),p&&p(`Handshake: (remote) S->C cipher: ${s.sc.cipher}`),e._server?(l=y,u=s.sc.cipher):(l=s.sc.cipher,u=y),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching S->C cipher"),pt(e,"Handshake failed: no matching S->C cipher","handshake",dt.KEY_EXCHANGE_FAILED);r.sc.cipher=u[f],p&&p(`Handshake: S->C cipher: ${u[f]}`);let b=o.lists.cs.mac.array;if(p&&p(`Handshake: (local) C->S MAC: ${b}`),p&&p(`Handshake: (remote) C->S MAC: ${s.cs.mac}`),Ls[r.cs.cipher].authLen>0)r.cs.mac="",p&&p("Handshake: C->S MAC: <implicit>");else{for(e._server?(l=b,u=s.cs.mac):(l=s.cs.mac,u=b),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching C->S MAC"),pt(e,"Handshake failed: no matching C->S MAC","handshake",dt.KEY_EXCHANGE_FAILED);r.cs.mac=u[f],p&&p(`Handshake: C->S MAC: ${u[f]}`)}let S=o.lists.sc.mac.array;if(p&&p(`Handshake: (local) S->C MAC: ${S}`),p&&p(`Handshake: (remote) S->C MAC: ${s.sc.mac}`),Ls[r.sc.cipher].authLen>0)r.sc.mac="",p&&p("Handshake: S->C MAC: <implicit>");else{for(e._server?(l=S,u=s.sc.mac):(l=s.sc.mac,u=S),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching S->C MAC"),pt(e,"Handshake failed: no matching S->C MAC","handshake",dt.KEY_EXCHANGE_FAILED);r.sc.mac=u[f],p&&p(`Handshake: S->C MAC: ${u[f]}`)}let v=o.lists.cs.compress.array;for(p&&p(`Handshake: (local) C->S compression: ${v}`),p&&p(`Handshake: (remote) C->S compression: ${s.cs.compress}`),e._server?(l=v,u=s.cs.compress):(l=s.cs.compress,u=v),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching C->S compression"),pt(e,"Handshake failed: no matching C->S compression","handshake",dt.KEY_EXCHANGE_FAILED);r.cs.compress=u[f],p&&p(`Handshake: C->S compression: ${u[f]}`);let M=o.lists.sc.compress.array;for(p&&p(`Handshake: (local) S->C compression: ${M}`),p&&p(`Handshake: (remote) S->C compression: ${s.sc.compress}`),e._server?(l=M,u=s.sc.compress):(l=s.sc.compress,u=M),f=0;f<u.length&&l.indexOf(u[f])===-1;++f);if(f===u.length)return p&&p("Handshake: No matching S->C compression"),pt(e,"Handshake failed: no matching S->C compression","handshake",dt.KEY_EXCHANGE_FAILED);r.sc.compress=u[f],p&&p(`Handshake: S->C compression: ${u[f]}`),r.cs.lang="",r.sc.lang="",e._kex&&(e._kexinit||_w(e),e._decipher._onPayload=Ew.bind(e,{firstPacket:!1})),e._kex=ND(r,e,t),e._kex.remoteExtInfoEnabled=g,e._kex.start()}a(yw,"handleKexInit");var ND=(()=>{function e(s){let c=0,u=s.length;for(;s[c]===0;)++c,--u;let l;return s[c]&128?(l=Buffer.allocUnsafe(1+u),l[0]=0,s.copy(l,1,c),s=l):u!==s.length&&(l=Buffer.allocUnsafe(u),s.copy(l,0,c),s=l),s}a(e,"convertToMpint");class t{static{a(this,"KeyExchange")}constructor(c,u,l){this._protocol=u,this.sessionID=u._kex?u._kex.sessionID:void 0,this.negotiated=c,this.remoteExtInfoEnabled=!1,this._step=1,this._public=null,this._dh=null,this._sentNEWKEYS=!1,this._receivedNEWKEYS=!1,this._finished=!1,this._hostVerified=!1,this._kexinit=u._kexinit,this._remoteKexinit=l,this._identRaw=u._identRaw,this._remoteIdentRaw=u._remoteIdentRaw,this._hostKey=void 0,this._dhData=void 0,this._sig=void 0}finish(c){if(this._finished)return!1;this._finished=!0;let u=this._protocol._server,l=this.negotiated,f=this.convertPublicKey(this._dhData),p=this.computeSecret(this._dhData);if(p instanceof Error)return p.message=`Error while computing DH secret (${this.type}): ${p.message}`,p.level="handshake",pt(this._protocol,p,dt.KEY_EXCHANGE_FAILED);let g=nA(this.hashName);Dn(g,u?this._remoteIdentRaw:this._identRaw),Dn(g,u?this._identRaw:this._remoteIdentRaw),Dn(g,u?this._remoteKexinit:this._kexinit),Dn(g,u?this._kexinit:this._remoteKexinit);let h=u?this._hostKey.getPublicSSH():this._hostKey;if(Dn(g,h),this.type==="groupex"){let M=this.getDHParams(),R=Buffer.allocUnsafe(4);xr(R,this._minBits,0),g.update(R),xr(R,this._prefBits,0),g.update(R),xr(R,this._maxBits,0),g.update(R),Dn(g,M.prime),Dn(g,M.generator)}Dn(g,u?f:this.getPublicKey());let _=u?this.getPublicKey():f;Dn(g,_),Dn(g,p);let y=g.digest();if(u){let M;switch(this.negotiated.serverHostKey){case"rsa-sha2-256":M="sha256";break;case"rsa-sha2-512":M="sha512";break}this._protocol._debug&&this._protocol._debug("Generating signature ...");let R=this._hostKey.sign(y,M);if(R instanceof Error)return pt(this._protocol,`Handshake failed: signature generation failed for ${this._hostKey.type} host key: ${R.message}`,"handshake",dt.KEY_EXCHANGE_FAILED);if(R=PD(R,this._hostKey.type),R===!1)return pt(this._protocol,`Handshake failed: signature conversion failed for ${this._hostKey.type} host key`,"handshake",dt.KEY_EXCHANGE_FAILED);let J=this.negotiated.serverHostKey,te=Buffer.byteLength(J),ee=4+te+4+R.length,P=this._protocol._packetRW.write.allocStartKEX,C=this._protocol._packetRW.write.alloc(5+h.length+4+_.length+4+ee,!0);if(C[P]=Bt.KEXDH_REPLY,xr(C,h.length,++P),C.set(h,P+=4),xr(C,_.length,P+=h.length),C.set(_,P+=4),xr(C,ee,P+=_.length),xr(C,te,P+=4),C.utf8Write(J,P+=4,te),xr(C,R.length,P+=te),C.set(R,P+=4),this._protocol._debug){let H;switch(this.type){case"group":H="KEXDH_REPLY";break;case"groupex":H="KEXDH_GEX_REPLY";break;default:H="KEXECDH_REPLY"}this._protocol._debug(`Outbound: Sending ${H}`)}this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(C,!0))}else{ft.init(this._sig,0);let M=ft.readString(!0);if(!M)return pt(this._protocol,"Malformed packet while reading signature","handshake",dt.KEY_EXCHANGE_FAILED);if(M!==l.serverHostKey)return pt(this._protocol,`Wrong signature type: ${M}, expected: ${l.serverHostKey}`,"handshake",dt.KEY_EXCHANGE_FAILED);let R=ft.readString();if(ft.clear(),R===void 0)return pt(this._protocol,"Malformed packet while reading signature","handshake",dt.KEY_EXCHANGE_FAILED);if(!(R=kD(R,M)))return pt(this._protocol,"Malformed signature","handshake",dt.KEY_EXCHANGE_FAILED);let J;{ft.init(this._hostKey,0);let P=ft.readString(!0),C=this._hostKey.slice(ft.pos());if(ft.clear(),J=vD(C,P),J instanceof Error)return J.level="handshake",pt(this._protocol,J,dt.KEY_EXCHANGE_FAILED)}let te;switch(this.negotiated.serverHostKey){case"rsa-sha2-256":te="sha256";break;case"rsa-sha2-512":te="sha512";break}this._protocol._debug&&this._protocol._debug("Verifying signature ...");let ee=J.verify(y,R,te);if(ee!==!0)return ee instanceof Error?this._protocol._debug&&this._protocol._debug(`Signature verification failed: ${ee.stack}`):this._protocol._debug&&this._protocol._debug("Signature verification failed"),pt(this._protocol,"Handshake failed: signature verification failed","handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Verified signature")}(u||!c)&&yp(this);let b,S,v=a(M=>{if(b)return yp(this),b.outbound.seqno=this._protocol._cipher.outSeqno,this._protocol._cipher.free(),this._protocol._cipher=ID(b),this._protocol._packetRW.write=S,b=void 0,S=void 0,this._protocol._onHandshakeComplete(l),!1;this.sessionID||(this.sessionID=y);{let X=Buffer.allocUnsafe(4+p.length);xr(X,p.length,0),X.set(p,4),p=X}let R=Ls[l.cs.cipher],J=Ls[l.sc.cipher],te=Bs(R.ivLen,this.hashName,p,y,this.sessionID,"A"),ee=Bs(J.ivLen,this.hashName,p,y,this.sessionID,"B"),P=Bs(R.keyLen,this.hashName,p,y,this.sessionID,"C"),C=Bs(J.keyLen,this.hashName,p,y,this.sessionID,"D"),H,U;R.authLen||(H=hw[l.cs.mac],U=Bs(H.len,this.hashName,p,y,this.sessionID,"E"));let k,j;J.authLen||(k=hw[l.sc.mac],j=Bs(k.len,this.hashName,p,y,this.sessionID,"F"));let W={inbound:{onPayload:this._protocol._onPayload,seqno:this._protocol._decipher.inSeqno,decipherInfo:u?R:J,decipherIV:u?te:ee,decipherKey:u?P:C,macInfo:u?H:k,macKey:u?U:j},outbound:{onWrite:this._protocol._onWrite,seqno:this._protocol._cipher.outSeqno,cipherInfo:u?J:R,cipherIV:u?ee:te,cipherKey:u?C:P,macInfo:u?k:H,macKey:u?j:U}};this._protocol._decipher.free(),b=W,this._protocol._decipher=SD(W);let L={read:void 0,write:void 0};switch(l.cs.compress){case"zlib":u?L.read=new mp:L.write=new _p(this._protocol);break;case"zlib@openssh.com":if(this._protocol._authenticated){u?L.read=new mp:L.write=new _p(this._protocol);break}default:u?L.read=new gw:L.write=new mw(this._protocol)}switch(l.sc.compress){case"zlib":u?L.write=new _p(this._protocol):L.read=new mp;break;case"zlib@openssh.com":if(this._protocol._authenticated){u?L.write=new _p(this._protocol):L.read=new mp;break}default:u?L.write=new mw(this._protocol):L.read=new gw}return this._protocol._packetRW.read.cleanup(),this._protocol._packetRW.write.cleanup(),this._protocol._packetRW.read=L.read,S=L.write,this._public=null,this._dh=null,this._kexinit=this._protocol._kexinit=void 0,this._remoteKexinit=void 0,this._identRaw=void 0,this._remoteIdentRaw=void 0,this._hostKey=void 0,this._dhData=void 0,this._sig=void 0,M?!1:v()},"completeHandshake");if((u||c)&&(this.finish=v),!u)return v(c)}start(){if(!this._protocol._server){if(this._protocol._debug){let f;this.type==="group"?f="KEXDH_INIT":f="KEXECDH_INIT",this._protocol._debug(`Outbound: Sending ${f}`)}let c=this.getPublicKey(),u=this._protocol._packetRW.write.allocStartKEX,l=this._protocol._packetRW.write.alloc(5+c.length,!0);l[u]=Bt.KEXDH_INIT,xr(l,c.length,++u),l.set(c,u+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(l,!0))}}getPublicKey(){this.generateKeys();let c=this._public;if(c)return this.convertPublicKey(c)}convertPublicKey(c){let u,l=0,f=c.length;for(;c[l]===0;)++l,--f;return c[l]&128?(u=Buffer.allocUnsafe(1+f),u[0]=0,c.copy(u,1,l),u):(f!==c.length&&(u=Buffer.allocUnsafe(f),c.copy(u,0,l),c=u),c)}computeSecret(c){this.generateKeys();try{return e(this._dh.computeSecret(c))}catch(u){return u}}parse(c){let u=c[0];switch(this._step){case 1:if(this._protocol._server){if(u!==Bt.KEXDH_INIT)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_INIT}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH Init"),ft.init(c,1);let l=ft.readString();if(ft.clear(),l===void 0)return pt(this._protocol,"Received malformed KEX*_INIT","handshake",dt.KEY_EXCHANGE_FAILED);this._dhData=l;let f=this._protocol._hostKeys[this.negotiated.serverHostKey];Array.isArray(f)&&(f=f[0]),this._hostKey=f,this.finish()}else{if(u!==Bt.KEXDH_REPLY)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_REPLY}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH Reply"),ft.init(c,1);let l,f,p;if((l=ft.readString())===void 0||(f=ft.readString())===void 0||(p=ft.readString())===void 0)return ft.clear(),pt(this._protocol,"Received malformed KEX*_REPLY","handshake",dt.KEY_EXCHANGE_FAILED);ft.clear(),ft.init(l,0);let g=ft.readString(!0);if(ft.clear(),g===void 0)return pt(this._protocol,"Received malformed host public key","handshake",dt.KEY_EXCHANGE_FAILED);if(g!==this.negotiated.serverHostKey)switch(this.negotiated.serverHostKey){case"rsa-sha2-256":case"rsa-sha2-512":if(g==="ssh-rsa")break;default:return pt(this._protocol,"Host key does not match negotiated type","handshake",dt.KEY_EXCHANGE_FAILED)}this._hostKey=l,this._dhData=f,this._sig=p;let h=!1,_;if(this._protocol._hostVerifier===void 0?(_=!0,this._protocol._debug&&this._protocol._debug("Host accepted by default (no verification)")):_=this._protocol._hostVerifier(l,y=>{if(!h){if(h=!0,y===!1)return this._protocol._debug&&this._protocol._debug("Host denied (verification failed)"),pt(this._protocol,"Host denied (verification failed)","handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Host accepted (verified)"),this._hostVerified=!0,this._receivedNEWKEYS?this.finish():yp(this)}}),_===void 0){++this._step;return}if(h=!0,_===!1)return this._protocol._debug&&this._protocol._debug("Host denied (verification failed)"),pt(this._protocol,"Host denied (verification failed)","handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Host accepted (verified)"),this._hostVerified=!0,yp(this)}++this._step;break;case 2:return u!==Bt.NEWKEYS?pt(this._protocol,`Received packet ${u} instead of ${Bt.NEWKEYS}`,"handshake",dt.KEY_EXCHANGE_FAILED):(this._protocol._debug&&this._protocol._debug("Inbound: NEWKEYS"),this._receivedNEWKEYS=!0,this._protocol._strictMode&&(this._protocol._decipher.inSeqno=0),++this._step,this.finish(!this._protocol._server&&!this._hostVerified));default:return pt(this._protocol,`Received unexpected packet ${u} after NEWKEYS`,"handshake",dt.KEY_EXCHANGE_FAILED)}}}class r extends t{static{a(this,"Curve25519Exchange")}constructor(c,...u){super(...u),this.type="25519",this.hashName=c,this._keys=null}generateKeys(){this._keys||(this._keys=AD("x25519"))}getPublicKey(){return this.generateKeys(),this._keys.publicKey.export({type:"spki",format:"der"}).slice(-32)}convertPublicKey(c){let u,l=0,f=c.length;for(;c[l]===0;)++l,--f;return c.length===32||f!==c.length&&(u=Buffer.allocUnsafe(f),c.copy(u,0,l),c=u),c}computeSecret(c){this.generateKeys();try{let u=new fw.Writer;return u.startSequence(),u.startSequence(),u.writeOID("1.3.101.110"),u.endSequence(),u.startSequence(fw.BitString),u.writeByte(0),u._ensure(c.length),c.copy(u._buf,u._offset,0,c.length),u._offset+=c.length,u.endSequence(),u.endSequence(),e(ED({privateKey:this._keys.privateKey,publicKey:yD({key:u.buffer,type:"spki",format:"der"})}))}catch(u){return u}}}class i extends t{static{a(this,"ECDHExchange")}constructor(c,u,...l){super(...l),this.type="ecdh",this.curveName=c,this.hashName=u}generateKeys(){this._dh||(this._dh=_D(this.curveName),this._public=this._dh.generateKeys())}}class n extends t{static{a(this,"DHGroupExchange")}constructor(c,...u){super(...u),this.type="groupex",this.hashName=c,this._prime=null,this._generator=null,this._minBits=CD,this._prefBits=$D(this.negotiated),this._protocol._compatFlags&iA.BUG_DHGEX_LARGE&&(this._prefBits=Math.min(this._prefBits,4096)),this._maxBits=RD}start(){if(this._protocol._server)return;this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_GEX_REQUEST");let c=this._protocol._packetRW.write.allocStartKEX,u=this._protocol._packetRW.write.alloc(13,!0);u[c]=Bt.KEXDH_GEX_REQUEST,xr(u,this._minBits,++c),xr(u,this._prefBits,c+=4),xr(u,this._maxBits,c+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(u,!0))}generateKeys(){!this._dh&&this._prime&&this._generator&&(this._dh=gD(this._prime,this._generator),this._public=this._dh.generateKeys())}setDHParams(c,u){if(!Buffer.isBuffer(c))throw new Error("Invalid prime value");if(!Buffer.isBuffer(u))throw new Error("Invalid generator value");this._prime=c,this._generator=u}getDHParams(){if(this._dh)return{prime:e(this._dh.getPrime()),generator:e(this._dh.getGenerator())}}parse(c){let u=c[0];switch(this._step){case 1:{if(this._protocol._server)return u!==Bt.KEXDH_GEX_REQUEST?pt(this._protocol,`Received packet ${u} instead of `+Bt.KEXDH_GEX_REQUEST,"handshake",dt.KEY_EXCHANGE_FAILED):pt(this._protocol,"Group exchange not implemented for server","handshake",dt.KEY_EXCHANGE_FAILED);if(u!==Bt.KEXDH_GEX_GROUP)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_GEX_GROUP}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH GEX Group"),ft.init(c,1);let l,f;if((l=ft.readString())===void 0||(f=ft.readString())===void 0)return ft.clear(),pt(this._protocol,"Received malformed KEXDH_GEX_GROUP","handshake",dt.KEY_EXCHANGE_FAILED);ft.clear(),this.setDHParams(l,f),this.generateKeys();let p=this.getPublicKey();this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_GEX_INIT");let g=this._protocol._packetRW.write.allocStartKEX,h=this._protocol._packetRW.write.alloc(5+p.length,!0);h[g]=Bt.KEXDH_GEX_INIT,xr(h,p.length,++g),h.set(p,g+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(h,!0)),++this._step;break}case 2:if(this._protocol._server)return u!==Bt.KEXDH_GEX_INIT?pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_GEX_INIT}`,"handshake",dt.KEY_EXCHANGE_FAILED):(this._protocol._debug&&this._protocol._debug("Received DH GEX Init"),pt(this._protocol,"Group exchange not implemented for server","handshake",dt.KEY_EXCHANGE_FAILED));if(u!==Bt.KEXDH_GEX_REPLY)return pt(this._protocol,`Received packet ${u} instead of ${Bt.KEXDH_GEX_REPLY}`,"handshake",dt.KEY_EXCHANGE_FAILED);this._protocol._debug&&this._protocol._debug("Received DH GEX Reply"),this._step=1,c[0]=Bt.KEXDH_REPLY,this.parse=t.prototype.parse,this.parse(c)}}}class o extends t{static{a(this,"DHExchange")}constructor(c,u,...l){super(...l),this.type="group",this.groupName=c,this.hashName=u}start(){if(!this._protocol._server){this._protocol._debug&&this._protocol._debug("Outbound: Sending KEXDH_INIT");let c=this.getPublicKey(),u=this._protocol._packetRW.write.allocStartKEX,l=this._protocol._packetRW.write.alloc(5+c.length,!0);l[u]=Bt.KEXDH_INIT,xr(l,c.length,++u),l.set(c,u+=4),this._protocol._cipher.encrypt(this._protocol._packetRW.write.finalize(l,!0))}}generateKeys(){this._dh||(this._dh=mD(this.groupName),this._public=this._dh.generateKeys())}getDHParams(){if(this._dh)return{prime:e(this._dh.getPrime()),generator:e(this._dh.getGenerator())}}}return(s,...c)=>{if(typeof s!="object"||s===null)throw new Error("Invalid negotiated argument");let u=s.kex;if(typeof u=="string"){switch(c=[s,...c],u){case"curve25519-sha256":case"curve25519-sha256@libssh.org":if(!xD)break;return new r("sha256",...c);case"ecdh-sha2-nistp256":return new i("prime256v1","sha256",...c);case"ecdh-sha2-nistp384":return new i("secp384r1","sha384",...c);case"ecdh-sha2-nistp521":return new i("secp521r1","sha512",...c);case"diffie-hellman-group1-sha1":return new o("modp2","sha1",...c);case"diffie-hellman-group14-sha1":return new o("modp14","sha1",...c);case"diffie-hellman-group14-sha256":return new o("modp14","sha256",...c);case"diffie-hellman-group15-sha512":return new o("modp15","sha512",...c);case"diffie-hellman-group16-sha512":return new o("modp16","sha512",...c);case"diffie-hellman-group17-sha512":return new o("modp17","sha512",...c);case"diffie-hellman-group18-sha512":return new o("modp18","sha512",...c);case"diffie-hellman-group-exchange-sha1":return new n("sha1",...c);case"diffie-hellman-group-exchange-sha256":return new n("sha256",...c)}throw new Error(`Unsupported key exchange algorithm: ${u}`)}throw new Error(`Invalid key exchange type: ${u}`)}})(),rA=(()=>{let e=["kex","serverHostKey",["cs","cipher"],["sc","cipher"],["cs","mac"],["sc","mac"],["cs","compress"],["sc","compress"],["cs","lang"],["sc","lang"]];return class{static{a(this,"KexInit")}constructor(r){if(typeof r!="object"||r===null)throw new TypeError("Argument must be an object");let i={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},sc:{cipher:void 0,mac:void 0,compress:void 0,lang:void 0},all:void 0},n=0;for(let c of e){let u,l,f,p;if(typeof c=="string")u=i,l=r[c],f=p=c;else{let h=c[0];u=i[h],p=c[1],l=r[h][p],f=`${h}.${p}`}let g={array:void 0,buffer:void 0};if(Buffer.isBuffer(l))g.array=(""+l).split(","),g.buffer=l,n+=4+l.length;else{if(typeof l=="string"&&(l=l.split(",")),Array.isArray(l))g.array=l,g.buffer=Buffer.from(l.join(","));else throw new TypeError(`Invalid \`${f}\` type: ${typeof l}`);n+=4+g.buffer.length}u[p]=g}let o=Buffer.allocUnsafe(n);i.all=o;let s=0;for(let c of e){let u;typeof c=="string"?u=i[c].buffer:u=i[c[0]][c[1]].buffer,s=xr(o,u.length,s),o.set(u,s),s+=u.length}this.totalSize=n,this.lists=i}copyAllTo(r,i){let n=this.lists.all;if(typeof i!="number")throw new TypeError(`Invalid offset value: ${typeof i}`);if(r.length-i<n.length)throw new Error("Insufficient space to copy list");return r.set(n,i),n.length}}})(),Dn=(()=>{let e=Buffer.allocUnsafe(4);return(t,r)=>{xr(e,r.length,0),t.update(e),t.update(r)}})();function Bs(e,t,r,i,n,o){let s;if(e){let c=nA(t).update(r).update(i).update(o).update(n).digest();for(;c.length<e;){let u=nA(t).update(r).update(i).update(c).digest(),l=Buffer.allocUnsafe(c.length+u.length);l.set(c,0),l.set(u,c.length),c=l}c.length===e?s=c:s=new TD(c.buffer,c.byteOffset,e)}else s=OD;return s}a(Bs,"generateKEXVal");function Ew(e,t){if(t.length===0){this._debug&&this._debug("Inbound: Skipping empty packet payload");return}if(this._skipNextInboundPacket){this._skipNextInboundPacket=!1;return}t=this._packetRW.read.read(t);let r=t[0];if(!this._strictMode)switch(r){case Bt.IGNORE:case Bt.UNIMPLEMENTED:case Bt.DEBUG:return Ds||(Ds=fp()),Ds[r](this,t)}switch(r){case Bt.DISCONNECT:return Ds||(Ds=fp()),Ds[r](this,t);case Bt.KEXINIT:return e.firstPacket?(e.firstPacket=!1,yw(this,t)):pt(this,"Received extra KEXINIT during handshake","handshake",dt.KEY_EXCHANGE_FAILED);default:if(r<20||r>49)return pt(this,`Received unexpected packet type ${r}`,"handshake",dt.KEY_EXCHANGE_FAILED)}return this._kex.parse(t)}a(Ew,"onKEXPayload");function $D(e){let t=Ls[e.cs.cipher],r=Ls[e.sc.cipher],i=Math.max(0,t.sslName==="des-ede3-cbc"?14:t.keyLen,t.blockLen,t.ivLen,r.sslName==="des-ede3-cbc"?14:r.keyLen,r.blockLen,r.ivLen)*8;return i<=112?2048:i<=128?3072:i<=192?7680:8192}a($D,"dhEstimate");function yp(e){if(!e._sentNEWKEYS){e._protocol._debug&&e._protocol._debug("Outbound: Sending NEWKEYS");let t=e._protocol._packetRW.write.allocStartKEX,r=e._protocol._packetRW.write.alloc(1,!0);r[t]=Bt.NEWKEYS,e._protocol._cipher.encrypt(e._protocol._packetRW.write.finalize(r,!0)),e._sentNEWKEYS=!0,e._protocol._strictMode&&(e._protocol._cipher.outSeqno=0)}}a(yp,"trySendNEWKEYS");Aw.exports={KexInit:rA,kexinit:_w,onKEXPayload:Ew,DEFAULT_KEXINIT_CLIENT:new rA({kex:dw.concat(["ext-info-c","kex-strict-c-v00@openssh.com"]),serverHostKey:pw,cs:{cipher:pp,mac:hp,compress:gp,lang:[]},sc:{cipher:pp,mac:hp,compress:gp,lang:[]}}),DEFAULT_KEXINIT_SERVER:new rA({kex:dw.concat(["kex-strict-s-v00@openssh.com"]),serverHostKey:pw,cs:{cipher:pp,mac:hp,compress:gp,lang:[]},sc:{cipher:pp,mac:hp,compress:gp,lang:[]}}),HANDLERS:{[Bt.KEXINIT]:yw}}});var bw=me((g7,DD)=>{DD.exports={name:"ssh2",version:"1.16.0",author:"Brian White <mscdex@mscdex.net>",description:"SSH2 client and server modules written in pure JavaScript for node.js",main:"./lib/index.js",engines:{node:">=10.16.0"},dependencies:{asn1:"^0.2.6","bcrypt-pbkdf":"^1.0.2"},devDependencies:{"@mscdex/eslint-config":"^1.1.0",eslint:"^7.32.0"},optionalDependencies:{"cpu-features":"~0.0.10",nan:"^2.20.0"},scripts:{install:"node install.js",rebuild:"node install.js",test:"node test/test.js",lint:"eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js examples lib test","lint:fix":"npm run lint -- --fix"},keywords:["ssh","ssh2","sftp","secure","shell","exec","remote","client"],licenses:[{type:"MIT",url:"http://github.com/mscdex/ssh2/raw/master/LICENSE"}],repository:{type:"git",url:"http://github.com/mscdex/ssh2.git"}}});var cA=me((m7,$w)=>{"use strict";var{inspect:Pw}=require("util"),{bindingAvailable:BD,NullCipher:LD,NullDecipher:zD}=Pi(),{COMPAT_CHECKS:UD,DISCONNECT_REASON:Tw,eddsaSupported:MD,MESSAGE:Oe,SIGNALS:xw,TERMINAL_MODE:sA}=Jn(),{DEFAULT_KEXINIT_CLIENT:FD,DEFAULT_KEXINIT_SERVER:HD,KexInit:Iw,kexinit:kw,onKEXPayload:jD}=dp(),{parseKey:Sw}=Ci(),WD=fp(),{bufferCopy:Ep,bufferFill:qD,bufferSlice:Cw,convertSignature:vw,sendPacket:Ne,writeUInt32BE:$}=Sn(),{PacketReader:VD,PacketWriter:ZD,ZlibPacketReader:Rw,ZlibPacketWriter:Ow}=JE(),QD=bw().version,GD=new Map(Object.values(Tw).map(e=>[e,1])),Nw=Buffer.from(`SSH-2.0-ssh2js${QD}`),KD=Buffer.from(`${Nw}\r
12
+ `),YD=8192,XD=1024,ww=Buffer.from([Oe.GLOBAL_REQUEST,0,0,0,21,107,101,101,112,97,108,105,118,101,64,111,112,101,110,115,115,104,46,99,111,109,1]),JD=Buffer.from([sA.TTY_OP_END]);function oA(){}a(oA,"noop");var aA=class{static{a(this,"Protocol")}constructor(t){let r=t.onWrite;if(typeof r!="function")throw new Error("Missing onWrite function");this._onWrite=h=>{r(h)};let i=t.onError;if(typeof i!="function")throw new Error("Missing onError function");this._onError=h=>{i(h)};let n=t.debug;this._debug=typeof n=="function"?h=>{n(h)}:void 0;let o=t.onHeader;this._onHeader=typeof o=="function"?(...h)=>{o(...h)}:oA;let s=t.onPacket;this._onPacket=typeof s=="function"?()=>{s()}:oA;let c=t.onHandshakeComplete;typeof c!="function"&&(c=oA);let u;this._onHandshakeComplete=(...h)=>{this._debug&&this._debug("Handshake completed"),u===void 0?u=!0:u=!1;let _=this._queue;if(_){this._queue=void 0,this._debug&&this._debug(`Draining outbound queue (${_.length}) ...`);for(let y=0;y<_.length;++y){let b=_[y],S=this._packetRW.write.finalize(b);if(S===b){let v=this._cipher.allocPacket(b.length);v.set(b,5),S=v}Ne(this,S)}this._debug&&this._debug("... finished draining outbound queue")}u&&this._server&&this._kex.remoteExtInfoEnabled&&s2(this),c(...h)},this._queue=void 0;let l=t.messageHandlers;typeof l=="object"&&l!==null?this._handlers=l:this._handlers={},this._onPayload=n2.bind(this),this._server=!!t.server,this._banner=void 0;let f;if(this._server){if(typeof t.hostKeys!="object"||t.hostKeys===null)throw new Error("Missing server host key(s)");this._hostKeys=t.hostKeys,typeof t.greeting=="string"&&t.greeting.length&&(f=t.greeting.slice(-2)===`\r
13
13
  `?t.greeting:`${t.greeting}\r
14
14
  `),typeof t.banner=="string"&&t.banner.length&&(this._banner=t.banner.slice(-2)===`\r
15
15
  `?t.banner:`${t.banner}\r
16
- `)}else this._hostKeys=void 0;let p=t.offer;typeof p!="object"||p===null?p=this._server?PD:wD:p.constructor!==fw&&(this._server?p.kex=p.kex.concat(["kex-strict-s-v00@openssh.com"]):p.kex=p.kex.concat(["ext-info-c","kex-strict-c-v00@openssh.com"]),p=new fw(p)),this._kex=void 0,this._strictMode=void 0,this._kexinit=void 0,this._offer=p,this._cipher=new xD(0,this._onWrite),this._decipher=void 0,this._skipNextInboundPacket=!1,this._packetRW={read:new RD,write:new OD(this)},this._hostVerifier=!this._server&&typeof t.hostVerifier=="function"?t.hostVerifier:void 0,this._parse=MD,this._buffer=void 0,this._authsQueue=[],this._authenticated=!1,this._remoteIdentRaw=void 0;let g;if(typeof t.ident=="string")this._identRaw=Buffer.from(`SSH-2.0-${t.ident}`),g=Buffer.allocUnsafe(this._identRaw.length+2),g.set(this._identRaw,0),g[g.length-2]=13,g[g.length-1]=10;else if(Buffer.isBuffer(t.ident)){let h=Buffer.allocUnsafe(8+t.ident.length);h.latin1Write("SSH-2.0-",0,8),h.set(t.ident,8),this._identRaw=h,g=Buffer.allocUnsafe(h.length+2),g.set(h,0),g[g.length-2]=13,g[g.length-1]=10}else this._identRaw=bw,g=DD;this._compatFlags=0,this._debug&&(bD?this._debug("Custom crypto binding available"):this._debug("Custom crypto binding not available")),this._debug&&this._debug(`Local ident: ${gw(this._identRaw.toString())}`),this.start=()=>{this.start=void 0,f&&this._onWrite(f),this._onWrite(g)}}_destruct(t){this._packetRW.read.cleanup(),this._packetRW.write.cleanup(),this._cipher&&this._cipher.free(),this._decipher&&this._decipher.free(),(typeof t!="string"||t.length===0)&&(t="fatal error"),this.parse=()=>{throw new Error(`Instance unusable after ${t}`)},this._onWrite=()=>{throw new Error(`Instance unusable after ${t}`)},this._destruct=void 0}cleanup(){this._destruct&&this._destruct()}parse(t,r,i){for(;r<i;)r=this._parse(t,r,i)}disconnect(t){let i=this._packetRW.write.allocStartKEX,n=this._packetRW.write.alloc(13,!0),o=i+13;$D.has(t)||(t=mw.PROTOCOL_ERROR),n[i]=Oe.DISCONNECT,$(n,t,++i),n.fill(0,i+=4,o),this._debug&&this._debug(`Outbound: Sending DISCONNECT (${t})`),Ne(this,this._packetRW.write.finalize(n,!0),!0)}ping(){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(hw.length);r.set(hw,t),this._debug&&this._debug("Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)"),Ne(this,this._packetRW.write.finalize(r))}rekey(){this._kexinit===void 0?(this._debug&&this._debug("Outbound: Initiated explicit rekey"),this._queue=[],_w(this)):this._debug&&this._debug("Outbound: Ignoring rekey during handshake")}requestSuccess(t){let r=this._packetRW.write.allocStart,i;Buffer.isBuffer(t)?(i=this._packetRW.write.alloc(1+t.length),i[r]=Oe.REQUEST_SUCCESS,i.set(t,++r)):(i=this._packetRW.write.alloc(1),i[r]=Oe.REQUEST_SUCCESS),this._debug&&this._debug("Outbound: Sending REQUEST_SUCCESS"),Ne(this,this._packetRW.write.finalize(i))}requestFailure(){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(1);r[t]=Oe.REQUEST_FAILURE,this._debug&&this._debug("Outbound: Sending REQUEST_FAILURE"),Ne(this,this._packetRW.write.finalize(r))}channelSuccess(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_SUCCESS,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_SUCCESS (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelFailure(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_FAILURE,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_FAILURE (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelEOF(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_EOF,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_EOF (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelClose(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_CLOSE,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_CLOSE (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelWindowAdjust(t,r){let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(9);n[i]=Oe.CHANNEL_WINDOW_ADJUST,$(n,t,++i),$(n,r,i+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_WINDOW_ADJUST (r:${t}, ${r})`),Ne(this,this._packetRW.write.finalize(n))}channelData(t,r){let i=Buffer.isBuffer(r),n=i?r.length:Buffer.byteLength(r),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(9+n);s[o]=Oe.CHANNEL_DATA,$(s,t,++o),$(s,n,o+=4),i?s.set(r,o+=4):s.utf8Write(r,o+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_DATA (r:${t}, ${n})`),Ne(this,this._packetRW.write.finalize(s))}channelExtData(t,r,i){let n=Buffer.isBuffer(r),o=n?r.length:Buffer.byteLength(r),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(13+o);c[s]=Oe.CHANNEL_EXTENDED_DATA,$(c,t,++s),$(c,i,s+=4),$(c,o,s+=4),n?c.set(r,s+=4):c.utf8Write(r,s+=4,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_EXTENDED_DATA (r:${t})`),Ne(this,this._packetRW.write.finalize(c))}channelOpenConfirm(t,r,i,n){let o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(17);s[o]=Oe.CHANNEL_OPEN_CONFIRMATION,$(s,t,++o),$(s,r,o+=4),$(s,i,o+=4),$(s,n,o+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN_CONFIRMATION (r:${t}, l:${r})`),Ne(this,this._packetRW.write.finalize(s))}channelOpenFail(t,r,i){typeof i!="string"&&(i="");let n=Buffer.byteLength(i),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(13+n+4);s[o]=Oe.CHANNEL_OPEN_FAILURE,$(s,t,++o),$(s,r,o+=4),$(s,n,o+=4),o+=4,n&&(s.utf8Write(i,o,n),o+=n),$(s,0,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN_FAILURE (r:${t})`),Ne(this,this._packetRW.write.finalize(s))}service(t){if(this._server)throw new Error("Client-only method called in server mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r);n[i]=Oe.SERVICE_REQUEST,$(n,r,++i),n.utf8Write(t,i+=4,r),this._debug&&this._debug(`Outbound: Sending SERVICE_REQUEST (${t})`),Ne(this,this._packetRW.write.finalize(n))}authPassword(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=Buffer.byteLength(r),s=i?Buffer.byteLength(i):0,c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(5+n+4+14+4+8+1+4+o+(i?4+s:0));u[c]=Oe.USERAUTH_REQUEST,$(u,n,++c),u.utf8Write(t,c+=4,n),$(u,14,c+=n),u.utf8Write("ssh-connection",c+=4,14),$(u,8,c+=14),u.utf8Write("password",c+=4,8),u[c+=8]=i?1:0,$(u,o,++c),Buffer.isBuffer(r)?_p(r,u,0,o,c+=4):u.utf8Write(r,c+=4,o),i?($(u,s,c+=o),Buffer.isBuffer(i)?_p(i,u,0,s,c+=4):u.utf8Write(i,c+=4,s),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (changed password)")):this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (password)"),this._authsQueue.push("password"),Ne(this,this._packetRW.write.finalize(u))}authPK(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");if(r=dw(r),r instanceof Error)throw new Error("Invalid key");let o=r.type;r=r.getPublicSSH(),typeof i=="function"&&(n=i,i=void 0),i||(i=o);let s=Buffer.byteLength(t),c=Buffer.byteLength(i),u=r.length,l=this._kex.sessionID,f=l.length,p=(n?4+f:0)+1+4+s+4+14+4+9+1+4+c+4+u,g,h;if(n?(g=Buffer.allocUnsafe(p),h=0,$(g,f,h),g.set(l,h+=4),h+=f):(g=this._packetRW.write.alloc(p),h=this._packetRW.write.allocStart),g[h]=Oe.USERAUTH_REQUEST,$(g,s,++h),g.utf8Write(t,h+=4,s),$(g,14,h+=s),g.utf8Write("ssh-connection",h+=4,14),$(g,9,h+=14),g.utf8Write("publickey",h+=4,9),g[h+=9]=n?1:0,$(g,c,++h),g.utf8Write(i,h+=4,c),$(g,u,h+=c),g.set(r,h+=4),!n){this._authsQueue.push("publickey"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (publickey -- check)"),Ne(this,this._packetRW.write.finalize(g));return}n(g,_=>{if(_=pw(_,o),_===!1)throw new Error("Error while converting handshake signature");let y=_.length;h=this._packetRW.write.allocStart,g=this._packetRW.write.alloc(5+s+4+14+4+9+1+4+c+4+u+4+4+c+4+y),g[h]=Oe.USERAUTH_REQUEST,$(g,s,++h),g.utf8Write(t,h+=4,s),$(g,14,h+=s),g.utf8Write("ssh-connection",h+=4,14),$(g,9,h+=14),g.utf8Write("publickey",h+=4,9),g[h+=9]=1,$(g,c,++h),g.utf8Write(i,h+=4,c),$(g,u,h+=c),g.set(r,h+=4),$(g,4+c+4+y,h+=u),$(g,c,h+=4),g.utf8Write(i,h+=4,c),$(g,y,h+=c),g.set(_,h+=4),this._authsQueue.push("publickey"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (publickey)"),Ne(this,this._packetRW.write.finalize(g))})}authHostbased(t,r,i,n,o,s){if(this._server)throw new Error("Client-only method called in server mode");if(r=dw(r),r instanceof Error)throw new Error("Invalid key");let c=r.type;r=r.getPublicSSH(),typeof o=="function"&&(s=o,o=void 0),o||(o=c);let u=Buffer.byteLength(t),l=Buffer.byteLength(o),f=r.length,p=this._kex.sessionID,g=p.length,h=Buffer.byteLength(i),_=Buffer.byteLength(n),y=Buffer.allocUnsafe(4+g+1+4+u+4+14+4+9+4+l+4+f+4+h+4+_),b=0;$(y,g,b),y.set(p,b+=4),y[b+=g]=Oe.USERAUTH_REQUEST,$(y,u,++b),y.utf8Write(t,b+=4,u),$(y,14,b+=u),y.utf8Write("ssh-connection",b+=4,14),$(y,9,b+=14),y.utf8Write("hostbased",b+=4,9),$(y,l,b+=9),y.utf8Write(o,b+=4,l),$(y,f,b+=l),y.set(r,b+=4),$(y,h,b+=f),y.utf8Write(i,b+=4,h),$(y,_,b+=h),y.utf8Write(n,b+=4,_),s(y,v=>{if(v=pw(v,c),!v)throw new Error("Error while converting handshake signature");let S=v.length,M=y.length-g-4;b=this._packetRW.write.allocStart;let R=this._packetRW.write.alloc(M+4+4+l+4+S);_p(y,R,4+g,y.length,b),$(R,4+l+4+S,b+=M),$(R,l,b+=4),R.utf8Write(o,b+=4,l),$(R,S,b+=l),R.set(v,b+=4),this._authsQueue.push("hostbased"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (hostbased)"),Ne(this,this._packetRW.write.finalize(R))})}authKeyboard(t){if(this._server)throw new Error("Client-only method called in server mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r+4+14+4+20+4+4);n[i]=Oe.USERAUTH_REQUEST,$(n,r,++i),n.utf8Write(t,i+=4,r),$(n,14,i+=r),n.utf8Write("ssh-connection",i+=4,14),$(n,20,i+=14),n.utf8Write("keyboard-interactive",i+=4,20),$(n,0,i+=20),$(n,0,i+=4),this._authsQueue.push("keyboard-interactive"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)"),Ne(this,this._packetRW.write.finalize(n))}authNone(t){if(this._server)throw new Error("Client-only method called in server mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r+4+14+4+4);n[i]=Oe.USERAUTH_REQUEST,$(n,r,++i),n.utf8Write(t,i+=4,r),$(n,14,i+=r),n.utf8Write("ssh-connection",i+=4,14),$(n,4,i+=14),n.utf8Write("none",i+=4,4),this._authsQueue.push("none"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (none)"),Ne(this,this._packetRW.write.finalize(n))}authInfoRes(t){if(this._server)throw new Error("Client-only method called in server mode");let r=0,i;if(t){i=new Array(t.length);for(let s=0;s<t.length;++s){let c=Buffer.byteLength(t[s]);i[s]=c,r+=4+c}}let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(5+r);if(o[n]=Oe.USERAUTH_INFO_RESPONSE,t){$(o,t.length,++n),n+=4;for(let s=0;s<t.length;++s){let c=i[s];$(o,c,n),n+=4,c&&(o.utf8Write(t[s],n,c),n+=c)}}else $(o,0,++n);this._debug&&this._debug("Outbound: Sending USERAUTH_INFO_RESPONSE"),Ne(this,this._packetRW.write.finalize(o))}tcpipForward(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(23+n+4);s[o]=Oe.GLOBAL_REQUEST,$(s,13,++o),s.utf8Write("tcpip-forward",o+=4,13),s[o+=13]=i===void 0||i===!0?1:0,$(s,n,++o),s.utf8Write(t,o+=4,n),$(s,r,o+=n),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (tcpip-forward)"),Ne(this,this._packetRW.write.finalize(s))}cancelTcpipForward(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(30+n+4);s[o]=Oe.GLOBAL_REQUEST,$(s,20,++o),s.utf8Write("cancel-tcpip-forward",o+=4,20),s[o+=20]=i===void 0||i===!0?1:0,$(s,n,++o),s.utf8Write(t,o+=4,n),$(s,r,o+=n),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (cancel-tcpip-forward)"),Ne(this,this._packetRW.write.finalize(s))}openssh_streamLocalForward(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(41+i);o[n]=Oe.GLOBAL_REQUEST,$(o,31,++n),o.utf8Write("streamlocal-forward@openssh.com",n+=4,31),o[n+=31]=r===void 0||r===!0?1:0,$(o,i,++n),o.utf8Write(t,n+=4,i),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (streamlocal-forward@openssh.com)"),Ne(this,this._packetRW.write.finalize(o))}openssh_cancelStreamLocalForward(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(48+i);o[n]=Oe.GLOBAL_REQUEST,$(o,38,++n),o.utf8Write("cancel-streamlocal-forward@openssh.com",n+=4,38),o[n+=38]=r===void 0||r===!0?1:0,$(o,i,++n),o.utf8Write(t,n+=4,i),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (cancel-streamlocal-forward@openssh.com)"),Ne(this,this._packetRW.write.finalize(o))}directTcpip(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");let o=Buffer.byteLength(n.srcIP),s=Buffer.byteLength(n.dstIP),c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(33+o+4+4+s+4);u[c]=Oe.CHANNEL_OPEN,$(u,12,++c),u.utf8Write("direct-tcpip",c+=4,12),$(u,t,c+=12),$(u,r,c+=4),$(u,i,c+=4),$(u,s,c+=4),u.utf8Write(n.dstIP,c+=4,s),$(u,n.dstPort,c+=s),$(u,o,c+=4),u.utf8Write(n.srcIP,c+=4,o),$(u,n.srcPort,c+=o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, direct-tcpip)`),Ne(this,this._packetRW.write.finalize(u))}openssh_directStreamLocal(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");let o=Buffer.byteLength(n.socketPath),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(51+o+4+4);c[s]=Oe.CHANNEL_OPEN,$(c,30,++s),c.utf8Write("direct-streamlocal@openssh.com",s+=4,30),$(c,t,s+=30),$(c,r,s+=4),$(c,i,s+=4),$(c,o,s+=4),c.utf8Write(n.socketPath,s+=4,o),CD(c,0,s+=o,s+8),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, direct-streamlocal@openssh.com)`),Ne(this,this._packetRW.write.finalize(c))}openssh_noMoreSessions(t){if(this._server)throw new Error("Client-only method called in server mode");let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(34);i[r]=Oe.GLOBAL_REQUEST,$(i,28,++r),i.utf8Write("no-more-sessions@openssh.com",r+=4,28),i[r+=28]=t===void 0||t===!0?1:0,this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (no-more-sessions@openssh.com)"),Ne(this,this._packetRW.write.finalize(i))}session(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(24);o[n]=Oe.CHANNEL_OPEN,$(o,7,++n),o.utf8Write("session",n+=4,7),$(o,t,n+=7),$(o,r,n+=4),$(o,i,n+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, session)`),Ne(this,this._packetRW.write.finalize(o))}windowChange(t,r,i,n,o){if(this._server)throw new Error("Client-only method called in server mode");let s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(39);c[s]=Oe.CHANNEL_REQUEST,$(c,t,++s),$(c,13,s+=4),c.utf8Write("window-change",s+=4,13),c[s+=13]=0,$(c,i,++s),$(c,r,s+=4),$(c,o,s+=4),$(c,n,s+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, window-change)`),Ne(this,this._packetRW.write.finalize(c))}pty(t,r,i,n,o,s,c,u){if(this._server)throw new Error("Client-only method called in server mode");(!s||!s.length)&&(s="vt100"),c&&!Buffer.isBuffer(c)&&!Array.isArray(c)&&typeof c=="object"&&c!==null&&(c=WD(c)),(!c||!c.length)&&(c=LD);let l=s.length,f=c.length,p=this._packetRW.write.allocStart,g=this._packetRW.write.alloc(21+l+4+4+4+4+4+f);if(g[p]=Oe.CHANNEL_REQUEST,$(g,t,++p),$(g,7,p+=4),g.utf8Write("pty-req",p+=4,7),g[p+=7]=u===void 0||u===!0?1:0,$(g,l,++p),g.utf8Write(s,p+=4,l),$(g,i,p+=l),$(g,r,p+=4),$(g,o,p+=4),$(g,n,p+=4),$(g,f,p+=4),p+=4,Array.isArray(c))for(let h=0;h<f;++h)g[p++]=c[h];else Buffer.isBuffer(c)&&g.set(c,p);this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, pty-req)`),Ne(this,this._packetRW.write.finalize(g))}shell(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(15);n[i]=Oe.CHANNEL_REQUEST,$(n,t,++i),$(n,5,i+=4),n.utf8Write("shell",i+=4,5),n[i+=5]=r===void 0||r===!0?1:0,this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, shell)`),Ne(this,this._packetRW.write.finalize(n))}exec(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.isBuffer(r),o=n?r.length:Buffer.byteLength(r),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(18+o);c[s]=Oe.CHANNEL_REQUEST,$(c,t,++s),$(c,4,s+=4),c.utf8Write("exec",s+=4,4),c[s+=4]=i===void 0||i===!0?1:0,$(c,o,++s),n?c.set(r,s+=4):c.utf8Write(r,s+=4,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, exec: ${r})`),Ne(this,this._packetRW.write.finalize(c))}signal(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=r;if(r=r.toUpperCase(),r.slice(0,3)==="SIG"&&(r=r.slice(3)),lw[r]!==1)throw new Error(`Invalid signal: ${i}`);let n=r.length,o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(20+n);s[o]=Oe.CHANNEL_REQUEST,$(s,t,++o),$(s,6,o+=4),s.utf8Write("signal",o+=4,6),s[o+=6]=0,$(s,n,++o),s.utf8Write(r,o+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, signal: ${r})`),Ne(this,this._packetRW.write.finalize(s))}env(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");let o=Buffer.byteLength(r),s=Buffer.isBuffer(i),c=s?i.length:Buffer.byteLength(i),u=this._packetRW.write.allocStart,l=this._packetRW.write.alloc(17+o+4+c);l[u]=Oe.CHANNEL_REQUEST,$(l,t,++u),$(l,3,u+=4),l.utf8Write("env",u+=4,3),l[u+=3]=n===void 0||n===!0?1:0,$(l,o,++u),l.utf8Write(r,u+=4,o),$(l,c,u+=o),s?l.set(i,u+=4):l.utf8Write(i,u+=4,c),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, env: ${r}=${i})`),Ne(this,this._packetRW.write.finalize(l))}x11Forward(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=r.protocol,o=r.cookie,s=Buffer.isBuffer(n),c=s?n.length:Buffer.byteLength(n),u=Buffer.isBuffer(o),l=u?o.length:Buffer.byteLength(o),f=this._packetRW.write.allocStart,p=this._packetRW.write.alloc(22+c+4+l+4);p[f]=Oe.CHANNEL_REQUEST,$(p,t,++f),$(p,7,f+=4),p.utf8Write("x11-req",f+=4,7),p[f+=7]=i===void 0||i===!0?1:0,p[++f]=r.single?1:0,$(p,c,++f),s?p.set(n,f+=4):p.utf8Write(n,f+=4,c),$(p,l,f+=c),u?p.set(o,f+=4):p.latin1Write(o,f+=4,l),$(p,r.screen||0,f+=l),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, x11-req)`),Ne(this,this._packetRW.write.finalize(p))}subsystem(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(r),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(23+n);s[o]=Oe.CHANNEL_REQUEST,$(s,t,++o),$(s,9,o+=4),s.utf8Write("subsystem",o+=4,9),s[o+=9]=i===void 0||i===!0?1:0,$(s,n,++o),s.utf8Write(r,o+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, subsystem: ${r})`),Ne(this,this._packetRW.write.finalize(s))}openssh_agentForward(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(36);n[i]=Oe.CHANNEL_REQUEST,$(n,t,++i),$(n,26,i+=4),n.utf8Write("auth-agent-req@openssh.com",i+=4,26),n[i+=26]=r===void 0||r===!0?1:0,this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, auth-agent-req@openssh.com)`),Ne(this,this._packetRW.write.finalize(n))}openssh_hostKeysProve(t){if(this._server)throw new Error("Client-only method called in server mode");let r=0,i=[];for(let s of t){let c=s.getPublicSSH();r+=4+c.length,i.push(c)}let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(35+r);o[n]=Oe.GLOBAL_REQUEST,$(o,29,++n),o.utf8Write("hostkeys-prove-00@openssh.com",n+=4,29),o[n+=29]=1,++n;for(let s of i)$(o,s.length,n),_p(s,o,0,s.length,n+=4),n+=s.length;this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (hostkeys-prove-00@openssh.com)"),Ne(this,this._packetRW.write.finalize(o))}serviceAccept(t){if(!this._server)throw new Error("Server-only method called in client mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r);if(n[i]=Oe.SERVICE_ACCEPT,$(n,r,++i),n.utf8Write(t,i+=4,r),this._debug&&this._debug(`Outbound: Sending SERVICE_ACCEPT (${t})`),Ne(this,this._packetRW.write.finalize(n)),this._server&&this._banner&&t==="ssh-userauth"){let o=this._banner;this._banner=void 0;let s=Buffer.byteLength(o);i=this._packetRW.write.allocStart;let c=this._packetRW.write.alloc(5+s+4);c[i]=Oe.USERAUTH_BANNER,$(c,s,++i),c.utf8Write(o,i+=4,s),$(c,0,i+=s),this._debug&&this._debug("Outbound: Sending USERAUTH_BANNER"),Ne(this,this._packetRW.write.finalize(c))}}forwardedTcpip(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=Buffer.byteLength(n.boundAddr),s=Buffer.byteLength(n.remoteAddr),c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(36+o+4+4+s+4);u[c]=Oe.CHANNEL_OPEN,$(u,15,++c),u.utf8Write("forwarded-tcpip",c+=4,15),$(u,t,c+=15),$(u,r,c+=4),$(u,i,c+=4),$(u,o,c+=4),u.utf8Write(n.boundAddr,c+=4,o),$(u,n.boundPort,c+=o),$(u,s,c+=4),u.utf8Write(n.remoteAddr,c+=4,s),$(u,n.remotePort,c+=s),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, forwarded-tcpip)`),Ne(this,this._packetRW.write.finalize(u))}x11(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=Buffer.byteLength(n.originAddr),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(24+o+4);c[s]=Oe.CHANNEL_OPEN,$(c,3,++s),c.utf8Write("x11",s+=4,3),$(c,t,s+=3),$(c,r,s+=4),$(c,i,s+=4),$(c,o,s+=4),c.utf8Write(n.originAddr,s+=4,o),$(c,n.originPort,s+=o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, x11)`),Ne(this,this._packetRW.write.finalize(c))}openssh_authAgent(t,r,i){if(!this._server)throw new Error("Server-only method called in client mode");let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(39);o[n]=Oe.CHANNEL_OPEN,$(o,22,++n),o.utf8Write("auth-agent@openssh.com",n+=4,22),$(o,t,n+=22),$(o,r,n+=4),$(o,i,n+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, auth-agent@openssh.com)`),Ne(this,this._packetRW.write.finalize(o))}openssh_forwardedStreamLocal(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=Buffer.byteLength(n.socketPath),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(54+o+4);c[s]=Oe.CHANNEL_OPEN,$(c,33,++s),c.utf8Write("forwarded-streamlocal@openssh.com",s+=4,33),$(c,t,s+=33),$(c,r,s+=4),$(c,i,s+=4),$(c,o,s+=4),c.utf8Write(n.socketPath,s+=4,o),$(c,0,s+=o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, forwarded-streamlocal@openssh.com)`),Ne(this,this._packetRW.write.finalize(c))}exitStatus(t,r){if(!this._server)throw new Error("Server-only method called in client mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(25);n[i]=Oe.CHANNEL_REQUEST,$(n,t,++i),$(n,11,i+=4),n.utf8Write("exit-status",i+=4,11),n[i+=11]=0,$(n,r,++i),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, exit-status: ${r})`),Ne(this,this._packetRW.write.finalize(n))}exitSignal(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=r;if(typeof o!="string"||!o)throw new Error(`Invalid signal: ${o}`);let s=r.toUpperCase();if(s.slice(0,3)==="SIG"&&(s=s.slice(3)),lw[s]!==1)throw new Error(`Invalid signal: ${o}`);let c=Buffer.byteLength(s),u=n?Buffer.byteLength(n):0,l=this._packetRW.write.allocStart,f=this._packetRW.write.alloc(25+c+1+4+u+4);f[l]=Oe.CHANNEL_REQUEST,$(f,t,++l),$(f,11,l+=4),f.utf8Write("exit-signal",l+=4,11),f[l+=11]=0,$(f,c,++l),f.utf8Write(s,l+=4,c),f[l+=c]=i?1:0,$(f,u,++l),l+=4,u&&(f.utf8Write(n,l,u),l+=u),$(f,0,l),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, exit-signal: ${r})`),Ne(this,this._packetRW.write.finalize(f))}authFailure(t,r){if(!this._server)throw new Error("Server-only method called in client mode");if(this._authsQueue.length===0)throw new Error("No auth in progress");let i;if(typeof t=="boolean"&&(r=t,t=void 0),t){i=[];for(let c=0;c<t.length;++c)t[c].toLowerCase()!=="none"&&i.push(t[c]);i=i.join(",")}else i="";let n=i.length,o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(5+n+1);s[o]=Oe.USERAUTH_FAILURE,$(s,n,++o),s.utf8Write(i,o+=4,n),s[o+=n]=r===!0?1:0,this._authsQueue.shift(),this._debug&&this._debug("Outbound: Sending USERAUTH_FAILURE"),Ne(this,this._packetRW.write.finalize(s))}authSuccess(){if(!this._server)throw new Error("Server-only method called in client mode");if(this._authsQueue.length===0)throw new Error("No auth in progress");let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(1);r[t]=Oe.USERAUTH_SUCCESS,this._authsQueue.shift(),this._authenticated=!0,this._debug&&this._debug("Outbound: Sending USERAUTH_SUCCESS"),Ne(this,this._packetRW.write.finalize(r)),this._kex.negotiated.cs.compress==="zlib@openssh.com"&&(this._packetRW.read=new Ew),this._kex.negotiated.sc.compress==="zlib@openssh.com"&&(this._packetRW.write=new Aw(this))}authPKOK(t,r){if(!this._server)throw new Error("Server-only method called in client mode");if(this._authsQueue.length===0||this._authsQueue[0]!=="publickey")throw new Error('"publickey" auth not in progress');let i=Buffer.byteLength(t),n=r.length,o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(5+i+4+n);s[o]=Oe.USERAUTH_PK_OK,$(s,i,++o),s.utf8Write(t,o+=4,i),$(s,n,o+=i),s.set(r,o+=4),this._authsQueue.shift(),this._debug&&this._debug("Outbound: Sending USERAUTH_PK_OK"),Ne(this,this._packetRW.write.finalize(s))}authPasswdChg(t){if(!this._server)throw new Error("Server-only method called in client mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r+4);n[i]=Oe.USERAUTH_PASSWD_CHANGEREQ,$(n,r,++i),n.utf8Write(t,i+=4,r),$(n,0,i+=r),this._debug&&this._debug("Outbound: Sending USERAUTH_PASSWD_CHANGEREQ"),Ne(this,this._packetRW.write.finalize(n))}authInfoReq(t,r,i){if(!this._server)throw new Error("Server-only method called in client mode");let n=0,o=t?Buffer.byteLength(t):0,s=r?Buffer.byteLength(r):0;for(let l=0;l<i.length;++l)n+=4+Buffer.byteLength(i[l].prompt)+1;let c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(5+o+4+s+4+4+n);u[c]=Oe.USERAUTH_INFO_REQUEST,$(u,o,++c),c+=4,t&&(u.utf8Write(t,c,o),c+=o),$(u,s,c),c+=4,r&&(u.utf8Write(r,c,s),c+=s),$(u,0,c),$(u,i.length,c+=4),c+=4;for(let l=0;l<i.length;++l){let f=i[l],p=Buffer.byteLength(f.prompt);$(u,p,c),c+=4,p&&(u.utf8Write(f.prompt,c,p),c+=p),u[c++]=f.echo?1:0}this._debug&&this._debug("Outbound: Sending USERAUTH_INFO_REQUEST"),Ne(this,this._packetRW.write.finalize(u))}},UD=/^SSH-(2\.0|1\.99)-([^ ]+)(?: (.*))?$/;function MD(e,t,r){let i,n;this._buffer?(i=Buffer.allocUnsafe(this._buffer.length+(r-t)),i.set(this._buffer,0),t===0?i.set(e,this._buffer.length):i.set(new Uint8Array(e.buffer,e.byteOffset+t,r-t),this._buffer.length),n=this._buffer.length,t=0):(i=e,n=0);let o=t,s=t,c=t,u=!1,l=0,f=0;for(;t<i.length;++t){let p=i[t];if(p===13){u=!0;continue}if(p===10){if(c>s&&c-s>4&&i[s]===83&&i[s+1]===83&&i[s+2]===72&&i[s+3]===45){let g=i.latin1Slice(o,c+1),h=s===o?g:g.slice(s-o),_=UD.exec(h);if(!_)throw new Error("Invalid identification string");let y={greeting:s===o?"":g.slice(0,s-o),identRaw:h,versions:{protocol:_[1],software:_[2]},comments:_[3]};return this._remoteIdentRaw=Buffer.from(h),this._debug&&this._debug(`Remote ident: ${gw(h)}`),this._compatFlags=jD(y),this._buffer=void 0,this._decipher=new ID(0,TD.bind(this,{firstPacket:!0})),this._parse=FD,this._onHeader(y),this._destruct?(_w(this),t+1-n):r}if(this._server)throw new Error("Greetings from clients not permitted");if(++f>zD)throw new Error("Max greeting lines exceeded");u=!1,s=t+1,l=0}else{if(u)throw new Error("Invalid header: expected newline");if(++l>=BD)throw new Error("Header line too long")}c=t}return this._buffer||(this._buffer=yw(i,o)),t-n}a(MD,"parseHeader");function FD(e,t,r){return this._decipher.decrypt(e,t,r)}a(FD,"parsePacket");function HD(e){if(this._onPacket(),e.length===0){this._debug&&this._debug("Inbound: Skipping empty packet payload");return}e=this._packetRW.read.read(e);let t=e[0];t===Oe.USERAUTH_SUCCESS&&!this._server&&!this._authenticated&&(this._authenticated=!0,this._kex.negotiated.cs.compress==="zlib@openssh.com"&&(this._packetRW.write=new Aw(this)),this._kex.negotiated.sc.compress==="zlib@openssh.com"&&(this._packetRW.read=new Ew));let r=kD[t];if(r===void 0){this._debug&&this._debug(`Inbound: Unsupported message type: ${t}`);return}return r(this,e)}a(HD,"onPayload");function jD(e){let t=e.versions.software,r=0;for(let i of vD)typeof i[0]=="string"?t===i[0]&&(r|=i[1]):i[0].test(t)&&(r|=i[1]);return r}a(jD,"getCompatFlags");function WD(e){let t=Object.keys(e),r=Buffer.allocUnsafe(5*t.length+1),i=0;for(let n=0;n<t.length;++n){let o=t[n];if(o==="TTY_OP_END")continue;let s=tA[o];if(s===void 0)continue;let c=e[o];typeof c=="number"&&isFinite(c)&&(r[i++]=s,r[i++]=c>>>24,r[i++]=c>>>16,r[i++]=c>>>8,r[i++]=c)}return r[i++]=tA.TTY_OP_END,i<r.length?yw(r,0,i):r}a(WD,"modesToBytes");function qD(e){let t="ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss";SD&&(t=`ssh-ed25519,${t}`);let r=Buffer.byteLength(t),i=e._packetRW.write.allocStart,n=e._packetRW.write.alloc(28+r);n[i]=Oe.EXT_INFO,$(n,1,++i),$(n,15,i+=4),n.utf8Write("server-sig-algs",i+=4,15),$(n,r,i+=15),n.utf8Write(t,i+=4,r),e._debug&&e._debug("Outbound: Sending EXT_INFO"),Ne(e,e._packetRW.write.finalize(n))}a(qD,"sendExtInfo");xw.exports=rA});var Tw=me(wu=>{"use strict";var yp=require("assert"),{inspect:VD}=require("util");function Iw(e){let t="",r=e.length,i=e[0]==="-"?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}a(Iw,"addNumericalSeparator");function vw(e,t){if(yp(typeof t=="string","`thing` has to be of type string"),Array.isArray(e)){let r=e.length;return yp(r>0,"At least one expected value needs to be specified"),e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}a(vw,"oneOf");wu.ERR_INTERNAL_ASSERTION=class ww extends Error{static{a(this,"ERR_INTERNAL_ASSERTION")}constructor(t){super(),Error.captureStackTrace(this,ww);let r=`This is caused by either a bug in ssh2 or incorrect usage of ssh2 internals.
16
+ `)}else this._hostKeys=void 0;let p=t.offer;typeof p!="object"||p===null?p=this._server?HD:FD:p.constructor!==Iw&&(this._server?p.kex=p.kex.concat(["kex-strict-s-v00@openssh.com"]):p.kex=p.kex.concat(["ext-info-c","kex-strict-c-v00@openssh.com"]),p=new Iw(p)),this._kex=void 0,this._strictMode=void 0,this._kexinit=void 0,this._offer=p,this._cipher=new LD(0,this._onWrite),this._decipher=void 0,this._skipNextInboundPacket=!1,this._packetRW={read:new VD,write:new ZD(this)},this._hostVerifier=!this._server&&typeof t.hostVerifier=="function"?t.hostVerifier:void 0,this._parse=t2,this._buffer=void 0,this._authsQueue=[],this._authenticated=!1,this._remoteIdentRaw=void 0;let g;if(typeof t.ident=="string")this._identRaw=Buffer.from(`SSH-2.0-${t.ident}`),g=Buffer.allocUnsafe(this._identRaw.length+2),g.set(this._identRaw,0),g[g.length-2]=13,g[g.length-1]=10;else if(Buffer.isBuffer(t.ident)){let h=Buffer.allocUnsafe(8+t.ident.length);h.latin1Write("SSH-2.0-",0,8),h.set(t.ident,8),this._identRaw=h,g=Buffer.allocUnsafe(h.length+2),g.set(h,0),g[g.length-2]=13,g[g.length-1]=10}else this._identRaw=Nw,g=KD;this._compatFlags=0,this._debug&&(BD?this._debug("Custom crypto binding available"):this._debug("Custom crypto binding not available")),this._debug&&this._debug(`Local ident: ${Pw(this._identRaw.toString())}`),this.start=()=>{this.start=void 0,f&&this._onWrite(f),this._onWrite(g)}}_destruct(t){this._packetRW.read.cleanup(),this._packetRW.write.cleanup(),this._cipher&&this._cipher.free(),this._decipher&&this._decipher.free(),(typeof t!="string"||t.length===0)&&(t="fatal error"),this.parse=()=>{throw new Error(`Instance unusable after ${t}`)},this._onWrite=()=>{throw new Error(`Instance unusable after ${t}`)},this._destruct=void 0}cleanup(){this._destruct&&this._destruct()}parse(t,r,i){for(;r<i;)r=this._parse(t,r,i)}disconnect(t){let i=this._packetRW.write.allocStartKEX,n=this._packetRW.write.alloc(13,!0),o=i+13;GD.has(t)||(t=Tw.PROTOCOL_ERROR),n[i]=Oe.DISCONNECT,$(n,t,++i),n.fill(0,i+=4,o),this._debug&&this._debug(`Outbound: Sending DISCONNECT (${t})`),Ne(this,this._packetRW.write.finalize(n,!0),!0)}ping(){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(ww.length);r.set(ww,t),this._debug&&this._debug("Outbound: Sending ping (GLOBAL_REQUEST: keepalive@openssh.com)"),Ne(this,this._packetRW.write.finalize(r))}rekey(){this._kexinit===void 0?(this._debug&&this._debug("Outbound: Initiated explicit rekey"),this._queue=[],kw(this)):this._debug&&this._debug("Outbound: Ignoring rekey during handshake")}requestSuccess(t){let r=this._packetRW.write.allocStart,i;Buffer.isBuffer(t)?(i=this._packetRW.write.alloc(1+t.length),i[r]=Oe.REQUEST_SUCCESS,i.set(t,++r)):(i=this._packetRW.write.alloc(1),i[r]=Oe.REQUEST_SUCCESS),this._debug&&this._debug("Outbound: Sending REQUEST_SUCCESS"),Ne(this,this._packetRW.write.finalize(i))}requestFailure(){let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(1);r[t]=Oe.REQUEST_FAILURE,this._debug&&this._debug("Outbound: Sending REQUEST_FAILURE"),Ne(this,this._packetRW.write.finalize(r))}channelSuccess(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_SUCCESS,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_SUCCESS (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelFailure(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_FAILURE,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_FAILURE (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelEOF(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_EOF,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_EOF (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelClose(t){let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(5);i[r]=Oe.CHANNEL_CLOSE,$(i,t,++r),this._debug&&this._debug(`Outbound: Sending CHANNEL_CLOSE (r:${t})`),Ne(this,this._packetRW.write.finalize(i))}channelWindowAdjust(t,r){let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(9);n[i]=Oe.CHANNEL_WINDOW_ADJUST,$(n,t,++i),$(n,r,i+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_WINDOW_ADJUST (r:${t}, ${r})`),Ne(this,this._packetRW.write.finalize(n))}channelData(t,r){let i=Buffer.isBuffer(r),n=i?r.length:Buffer.byteLength(r),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(9+n);s[o]=Oe.CHANNEL_DATA,$(s,t,++o),$(s,n,o+=4),i?s.set(r,o+=4):s.utf8Write(r,o+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_DATA (r:${t}, ${n})`),Ne(this,this._packetRW.write.finalize(s))}channelExtData(t,r,i){let n=Buffer.isBuffer(r),o=n?r.length:Buffer.byteLength(r),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(13+o);c[s]=Oe.CHANNEL_EXTENDED_DATA,$(c,t,++s),$(c,i,s+=4),$(c,o,s+=4),n?c.set(r,s+=4):c.utf8Write(r,s+=4,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_EXTENDED_DATA (r:${t})`),Ne(this,this._packetRW.write.finalize(c))}channelOpenConfirm(t,r,i,n){let o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(17);s[o]=Oe.CHANNEL_OPEN_CONFIRMATION,$(s,t,++o),$(s,r,o+=4),$(s,i,o+=4),$(s,n,o+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN_CONFIRMATION (r:${t}, l:${r})`),Ne(this,this._packetRW.write.finalize(s))}channelOpenFail(t,r,i){typeof i!="string"&&(i="");let n=Buffer.byteLength(i),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(13+n+4);s[o]=Oe.CHANNEL_OPEN_FAILURE,$(s,t,++o),$(s,r,o+=4),$(s,n,o+=4),o+=4,n&&(s.utf8Write(i,o,n),o+=n),$(s,0,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN_FAILURE (r:${t})`),Ne(this,this._packetRW.write.finalize(s))}service(t){if(this._server)throw new Error("Client-only method called in server mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r);n[i]=Oe.SERVICE_REQUEST,$(n,r,++i),n.utf8Write(t,i+=4,r),this._debug&&this._debug(`Outbound: Sending SERVICE_REQUEST (${t})`),Ne(this,this._packetRW.write.finalize(n))}authPassword(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=Buffer.byteLength(r),s=i?Buffer.byteLength(i):0,c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(5+n+4+14+4+8+1+4+o+(i?4+s:0));u[c]=Oe.USERAUTH_REQUEST,$(u,n,++c),u.utf8Write(t,c+=4,n),$(u,14,c+=n),u.utf8Write("ssh-connection",c+=4,14),$(u,8,c+=14),u.utf8Write("password",c+=4,8),u[c+=8]=i?1:0,$(u,o,++c),Buffer.isBuffer(r)?Ep(r,u,0,o,c+=4):u.utf8Write(r,c+=4,o),i?($(u,s,c+=o),Buffer.isBuffer(i)?Ep(i,u,0,s,c+=4):u.utf8Write(i,c+=4,s),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (changed password)")):this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (password)"),this._authsQueue.push("password"),Ne(this,this._packetRW.write.finalize(u))}authPK(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");if(r=Sw(r),r instanceof Error)throw new Error("Invalid key");let o=r.type;r=r.getPublicSSH(),typeof i=="function"&&(n=i,i=void 0),i||(i=o);let s=Buffer.byteLength(t),c=Buffer.byteLength(i),u=r.length,l=this._kex.sessionID,f=l.length,p=(n?4+f:0)+1+4+s+4+14+4+9+1+4+c+4+u,g,h;if(n?(g=Buffer.allocUnsafe(p),h=0,$(g,f,h),g.set(l,h+=4),h+=f):(g=this._packetRW.write.alloc(p),h=this._packetRW.write.allocStart),g[h]=Oe.USERAUTH_REQUEST,$(g,s,++h),g.utf8Write(t,h+=4,s),$(g,14,h+=s),g.utf8Write("ssh-connection",h+=4,14),$(g,9,h+=14),g.utf8Write("publickey",h+=4,9),g[h+=9]=n?1:0,$(g,c,++h),g.utf8Write(i,h+=4,c),$(g,u,h+=c),g.set(r,h+=4),!n){this._authsQueue.push("publickey"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (publickey -- check)"),Ne(this,this._packetRW.write.finalize(g));return}n(g,_=>{if(_=vw(_,o),_===!1)throw new Error("Error while converting handshake signature");let y=_.length;h=this._packetRW.write.allocStart,g=this._packetRW.write.alloc(5+s+4+14+4+9+1+4+c+4+u+4+4+c+4+y),g[h]=Oe.USERAUTH_REQUEST,$(g,s,++h),g.utf8Write(t,h+=4,s),$(g,14,h+=s),g.utf8Write("ssh-connection",h+=4,14),$(g,9,h+=14),g.utf8Write("publickey",h+=4,9),g[h+=9]=1,$(g,c,++h),g.utf8Write(i,h+=4,c),$(g,u,h+=c),g.set(r,h+=4),$(g,4+c+4+y,h+=u),$(g,c,h+=4),g.utf8Write(i,h+=4,c),$(g,y,h+=c),g.set(_,h+=4),this._authsQueue.push("publickey"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (publickey)"),Ne(this,this._packetRW.write.finalize(g))})}authHostbased(t,r,i,n,o,s){if(this._server)throw new Error("Client-only method called in server mode");if(r=Sw(r),r instanceof Error)throw new Error("Invalid key");let c=r.type;r=r.getPublicSSH(),typeof o=="function"&&(s=o,o=void 0),o||(o=c);let u=Buffer.byteLength(t),l=Buffer.byteLength(o),f=r.length,p=this._kex.sessionID,g=p.length,h=Buffer.byteLength(i),_=Buffer.byteLength(n),y=Buffer.allocUnsafe(4+g+1+4+u+4+14+4+9+4+l+4+f+4+h+4+_),b=0;$(y,g,b),y.set(p,b+=4),y[b+=g]=Oe.USERAUTH_REQUEST,$(y,u,++b),y.utf8Write(t,b+=4,u),$(y,14,b+=u),y.utf8Write("ssh-connection",b+=4,14),$(y,9,b+=14),y.utf8Write("hostbased",b+=4,9),$(y,l,b+=9),y.utf8Write(o,b+=4,l),$(y,f,b+=l),y.set(r,b+=4),$(y,h,b+=f),y.utf8Write(i,b+=4,h),$(y,_,b+=h),y.utf8Write(n,b+=4,_),s(y,S=>{if(S=vw(S,c),!S)throw new Error("Error while converting handshake signature");let v=S.length,M=y.length-g-4;b=this._packetRW.write.allocStart;let R=this._packetRW.write.alloc(M+4+4+l+4+v);Ep(y,R,4+g,y.length,b),$(R,4+l+4+v,b+=M),$(R,l,b+=4),R.utf8Write(o,b+=4,l),$(R,v,b+=l),R.set(S,b+=4),this._authsQueue.push("hostbased"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (hostbased)"),Ne(this,this._packetRW.write.finalize(R))})}authKeyboard(t){if(this._server)throw new Error("Client-only method called in server mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r+4+14+4+20+4+4);n[i]=Oe.USERAUTH_REQUEST,$(n,r,++i),n.utf8Write(t,i+=4,r),$(n,14,i+=r),n.utf8Write("ssh-connection",i+=4,14),$(n,20,i+=14),n.utf8Write("keyboard-interactive",i+=4,20),$(n,0,i+=20),$(n,0,i+=4),this._authsQueue.push("keyboard-interactive"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)"),Ne(this,this._packetRW.write.finalize(n))}authNone(t){if(this._server)throw new Error("Client-only method called in server mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r+4+14+4+4);n[i]=Oe.USERAUTH_REQUEST,$(n,r,++i),n.utf8Write(t,i+=4,r),$(n,14,i+=r),n.utf8Write("ssh-connection",i+=4,14),$(n,4,i+=14),n.utf8Write("none",i+=4,4),this._authsQueue.push("none"),this._debug&&this._debug("Outbound: Sending USERAUTH_REQUEST (none)"),Ne(this,this._packetRW.write.finalize(n))}authInfoRes(t){if(this._server)throw new Error("Client-only method called in server mode");let r=0,i;if(t){i=new Array(t.length);for(let s=0;s<t.length;++s){let c=Buffer.byteLength(t[s]);i[s]=c,r+=4+c}}let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(5+r);if(o[n]=Oe.USERAUTH_INFO_RESPONSE,t){$(o,t.length,++n),n+=4;for(let s=0;s<t.length;++s){let c=i[s];$(o,c,n),n+=4,c&&(o.utf8Write(t[s],n,c),n+=c)}}else $(o,0,++n);this._debug&&this._debug("Outbound: Sending USERAUTH_INFO_RESPONSE"),Ne(this,this._packetRW.write.finalize(o))}tcpipForward(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(23+n+4);s[o]=Oe.GLOBAL_REQUEST,$(s,13,++o),s.utf8Write("tcpip-forward",o+=4,13),s[o+=13]=i===void 0||i===!0?1:0,$(s,n,++o),s.utf8Write(t,o+=4,n),$(s,r,o+=n),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (tcpip-forward)"),Ne(this,this._packetRW.write.finalize(s))}cancelTcpipForward(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(30+n+4);s[o]=Oe.GLOBAL_REQUEST,$(s,20,++o),s.utf8Write("cancel-tcpip-forward",o+=4,20),s[o+=20]=i===void 0||i===!0?1:0,$(s,n,++o),s.utf8Write(t,o+=4,n),$(s,r,o+=n),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (cancel-tcpip-forward)"),Ne(this,this._packetRW.write.finalize(s))}openssh_streamLocalForward(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(41+i);o[n]=Oe.GLOBAL_REQUEST,$(o,31,++n),o.utf8Write("streamlocal-forward@openssh.com",n+=4,31),o[n+=31]=r===void 0||r===!0?1:0,$(o,i,++n),o.utf8Write(t,n+=4,i),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (streamlocal-forward@openssh.com)"),Ne(this,this._packetRW.write.finalize(o))}openssh_cancelStreamLocalForward(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(48+i);o[n]=Oe.GLOBAL_REQUEST,$(o,38,++n),o.utf8Write("cancel-streamlocal-forward@openssh.com",n+=4,38),o[n+=38]=r===void 0||r===!0?1:0,$(o,i,++n),o.utf8Write(t,n+=4,i),this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (cancel-streamlocal-forward@openssh.com)"),Ne(this,this._packetRW.write.finalize(o))}directTcpip(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");let o=Buffer.byteLength(n.srcIP),s=Buffer.byteLength(n.dstIP),c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(33+o+4+4+s+4);u[c]=Oe.CHANNEL_OPEN,$(u,12,++c),u.utf8Write("direct-tcpip",c+=4,12),$(u,t,c+=12),$(u,r,c+=4),$(u,i,c+=4),$(u,s,c+=4),u.utf8Write(n.dstIP,c+=4,s),$(u,n.dstPort,c+=s),$(u,o,c+=4),u.utf8Write(n.srcIP,c+=4,o),$(u,n.srcPort,c+=o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, direct-tcpip)`),Ne(this,this._packetRW.write.finalize(u))}openssh_directStreamLocal(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");let o=Buffer.byteLength(n.socketPath),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(51+o+4+4);c[s]=Oe.CHANNEL_OPEN,$(c,30,++s),c.utf8Write("direct-streamlocal@openssh.com",s+=4,30),$(c,t,s+=30),$(c,r,s+=4),$(c,i,s+=4),$(c,o,s+=4),c.utf8Write(n.socketPath,s+=4,o),qD(c,0,s+=o,s+8),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, direct-streamlocal@openssh.com)`),Ne(this,this._packetRW.write.finalize(c))}openssh_noMoreSessions(t){if(this._server)throw new Error("Client-only method called in server mode");let r=this._packetRW.write.allocStart,i=this._packetRW.write.alloc(34);i[r]=Oe.GLOBAL_REQUEST,$(i,28,++r),i.utf8Write("no-more-sessions@openssh.com",r+=4,28),i[r+=28]=t===void 0||t===!0?1:0,this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (no-more-sessions@openssh.com)"),Ne(this,this._packetRW.write.finalize(i))}session(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(24);o[n]=Oe.CHANNEL_OPEN,$(o,7,++n),o.utf8Write("session",n+=4,7),$(o,t,n+=7),$(o,r,n+=4),$(o,i,n+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, session)`),Ne(this,this._packetRW.write.finalize(o))}windowChange(t,r,i,n,o){if(this._server)throw new Error("Client-only method called in server mode");let s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(39);c[s]=Oe.CHANNEL_REQUEST,$(c,t,++s),$(c,13,s+=4),c.utf8Write("window-change",s+=4,13),c[s+=13]=0,$(c,i,++s),$(c,r,s+=4),$(c,o,s+=4),$(c,n,s+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, window-change)`),Ne(this,this._packetRW.write.finalize(c))}pty(t,r,i,n,o,s,c,u){if(this._server)throw new Error("Client-only method called in server mode");(!s||!s.length)&&(s="vt100"),c&&!Buffer.isBuffer(c)&&!Array.isArray(c)&&typeof c=="object"&&c!==null&&(c=o2(c)),(!c||!c.length)&&(c=JD);let l=s.length,f=c.length,p=this._packetRW.write.allocStart,g=this._packetRW.write.alloc(21+l+4+4+4+4+4+f);if(g[p]=Oe.CHANNEL_REQUEST,$(g,t,++p),$(g,7,p+=4),g.utf8Write("pty-req",p+=4,7),g[p+=7]=u===void 0||u===!0?1:0,$(g,l,++p),g.utf8Write(s,p+=4,l),$(g,i,p+=l),$(g,r,p+=4),$(g,o,p+=4),$(g,n,p+=4),$(g,f,p+=4),p+=4,Array.isArray(c))for(let h=0;h<f;++h)g[p++]=c[h];else Buffer.isBuffer(c)&&g.set(c,p);this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, pty-req)`),Ne(this,this._packetRW.write.finalize(g))}shell(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(15);n[i]=Oe.CHANNEL_REQUEST,$(n,t,++i),$(n,5,i+=4),n.utf8Write("shell",i+=4,5),n[i+=5]=r===void 0||r===!0?1:0,this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, shell)`),Ne(this,this._packetRW.write.finalize(n))}exec(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.isBuffer(r),o=n?r.length:Buffer.byteLength(r),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(18+o);c[s]=Oe.CHANNEL_REQUEST,$(c,t,++s),$(c,4,s+=4),c.utf8Write("exec",s+=4,4),c[s+=4]=i===void 0||i===!0?1:0,$(c,o,++s),n?c.set(r,s+=4):c.utf8Write(r,s+=4,o),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, exec: ${r})`),Ne(this,this._packetRW.write.finalize(c))}signal(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=r;if(r=r.toUpperCase(),r.slice(0,3)==="SIG"&&(r=r.slice(3)),xw[r]!==1)throw new Error(`Invalid signal: ${i}`);let n=r.length,o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(20+n);s[o]=Oe.CHANNEL_REQUEST,$(s,t,++o),$(s,6,o+=4),s.utf8Write("signal",o+=4,6),s[o+=6]=0,$(s,n,++o),s.utf8Write(r,o+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, signal: ${r})`),Ne(this,this._packetRW.write.finalize(s))}env(t,r,i,n){if(this._server)throw new Error("Client-only method called in server mode");let o=Buffer.byteLength(r),s=Buffer.isBuffer(i),c=s?i.length:Buffer.byteLength(i),u=this._packetRW.write.allocStart,l=this._packetRW.write.alloc(17+o+4+c);l[u]=Oe.CHANNEL_REQUEST,$(l,t,++u),$(l,3,u+=4),l.utf8Write("env",u+=4,3),l[u+=3]=n===void 0||n===!0?1:0,$(l,o,++u),l.utf8Write(r,u+=4,o),$(l,c,u+=o),s?l.set(i,u+=4):l.utf8Write(i,u+=4,c),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, env: ${r}=${i})`),Ne(this,this._packetRW.write.finalize(l))}x11Forward(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=r.protocol,o=r.cookie,s=Buffer.isBuffer(n),c=s?n.length:Buffer.byteLength(n),u=Buffer.isBuffer(o),l=u?o.length:Buffer.byteLength(o),f=this._packetRW.write.allocStart,p=this._packetRW.write.alloc(22+c+4+l+4);p[f]=Oe.CHANNEL_REQUEST,$(p,t,++f),$(p,7,f+=4),p.utf8Write("x11-req",f+=4,7),p[f+=7]=i===void 0||i===!0?1:0,p[++f]=r.single?1:0,$(p,c,++f),s?p.set(n,f+=4):p.utf8Write(n,f+=4,c),$(p,l,f+=c),u?p.set(o,f+=4):p.latin1Write(o,f+=4,l),$(p,r.screen||0,f+=l),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, x11-req)`),Ne(this,this._packetRW.write.finalize(p))}subsystem(t,r,i){if(this._server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(r),o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(23+n);s[o]=Oe.CHANNEL_REQUEST,$(s,t,++o),$(s,9,o+=4),s.utf8Write("subsystem",o+=4,9),s[o+=9]=i===void 0||i===!0?1:0,$(s,n,++o),s.utf8Write(r,o+=4,n),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, subsystem: ${r})`),Ne(this,this._packetRW.write.finalize(s))}openssh_agentForward(t,r){if(this._server)throw new Error("Client-only method called in server mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(36);n[i]=Oe.CHANNEL_REQUEST,$(n,t,++i),$(n,26,i+=4),n.utf8Write("auth-agent-req@openssh.com",i+=4,26),n[i+=26]=r===void 0||r===!0?1:0,this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, auth-agent-req@openssh.com)`),Ne(this,this._packetRW.write.finalize(n))}openssh_hostKeysProve(t){if(this._server)throw new Error("Client-only method called in server mode");let r=0,i=[];for(let s of t){let c=s.getPublicSSH();r+=4+c.length,i.push(c)}let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(35+r);o[n]=Oe.GLOBAL_REQUEST,$(o,29,++n),o.utf8Write("hostkeys-prove-00@openssh.com",n+=4,29),o[n+=29]=1,++n;for(let s of i)$(o,s.length,n),Ep(s,o,0,s.length,n+=4),n+=s.length;this._debug&&this._debug("Outbound: Sending GLOBAL_REQUEST (hostkeys-prove-00@openssh.com)"),Ne(this,this._packetRW.write.finalize(o))}serviceAccept(t){if(!this._server)throw new Error("Server-only method called in client mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r);if(n[i]=Oe.SERVICE_ACCEPT,$(n,r,++i),n.utf8Write(t,i+=4,r),this._debug&&this._debug(`Outbound: Sending SERVICE_ACCEPT (${t})`),Ne(this,this._packetRW.write.finalize(n)),this._server&&this._banner&&t==="ssh-userauth"){let o=this._banner;this._banner=void 0;let s=Buffer.byteLength(o);i=this._packetRW.write.allocStart;let c=this._packetRW.write.alloc(5+s+4);c[i]=Oe.USERAUTH_BANNER,$(c,s,++i),c.utf8Write(o,i+=4,s),$(c,0,i+=s),this._debug&&this._debug("Outbound: Sending USERAUTH_BANNER"),Ne(this,this._packetRW.write.finalize(c))}}forwardedTcpip(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=Buffer.byteLength(n.boundAddr),s=Buffer.byteLength(n.remoteAddr),c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(36+o+4+4+s+4);u[c]=Oe.CHANNEL_OPEN,$(u,15,++c),u.utf8Write("forwarded-tcpip",c+=4,15),$(u,t,c+=15),$(u,r,c+=4),$(u,i,c+=4),$(u,o,c+=4),u.utf8Write(n.boundAddr,c+=4,o),$(u,n.boundPort,c+=o),$(u,s,c+=4),u.utf8Write(n.remoteAddr,c+=4,s),$(u,n.remotePort,c+=s),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, forwarded-tcpip)`),Ne(this,this._packetRW.write.finalize(u))}x11(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=Buffer.byteLength(n.originAddr),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(24+o+4);c[s]=Oe.CHANNEL_OPEN,$(c,3,++s),c.utf8Write("x11",s+=4,3),$(c,t,s+=3),$(c,r,s+=4),$(c,i,s+=4),$(c,o,s+=4),c.utf8Write(n.originAddr,s+=4,o),$(c,n.originPort,s+=o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, x11)`),Ne(this,this._packetRW.write.finalize(c))}openssh_authAgent(t,r,i){if(!this._server)throw new Error("Server-only method called in client mode");let n=this._packetRW.write.allocStart,o=this._packetRW.write.alloc(39);o[n]=Oe.CHANNEL_OPEN,$(o,22,++n),o.utf8Write("auth-agent@openssh.com",n+=4,22),$(o,t,n+=22),$(o,r,n+=4),$(o,i,n+=4),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, auth-agent@openssh.com)`),Ne(this,this._packetRW.write.finalize(o))}openssh_forwardedStreamLocal(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=Buffer.byteLength(n.socketPath),s=this._packetRW.write.allocStart,c=this._packetRW.write.alloc(54+o+4);c[s]=Oe.CHANNEL_OPEN,$(c,33,++s),c.utf8Write("forwarded-streamlocal@openssh.com",s+=4,33),$(c,t,s+=33),$(c,r,s+=4),$(c,i,s+=4),$(c,o,s+=4),c.utf8Write(n.socketPath,s+=4,o),$(c,0,s+=o),this._debug&&this._debug(`Outbound: Sending CHANNEL_OPEN (r:${t}, forwarded-streamlocal@openssh.com)`),Ne(this,this._packetRW.write.finalize(c))}exitStatus(t,r){if(!this._server)throw new Error("Server-only method called in client mode");let i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(25);n[i]=Oe.CHANNEL_REQUEST,$(n,t,++i),$(n,11,i+=4),n.utf8Write("exit-status",i+=4,11),n[i+=11]=0,$(n,r,++i),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, exit-status: ${r})`),Ne(this,this._packetRW.write.finalize(n))}exitSignal(t,r,i,n){if(!this._server)throw new Error("Server-only method called in client mode");let o=r;if(typeof o!="string"||!o)throw new Error(`Invalid signal: ${o}`);let s=r.toUpperCase();if(s.slice(0,3)==="SIG"&&(s=s.slice(3)),xw[s]!==1)throw new Error(`Invalid signal: ${o}`);let c=Buffer.byteLength(s),u=n?Buffer.byteLength(n):0,l=this._packetRW.write.allocStart,f=this._packetRW.write.alloc(25+c+1+4+u+4);f[l]=Oe.CHANNEL_REQUEST,$(f,t,++l),$(f,11,l+=4),f.utf8Write("exit-signal",l+=4,11),f[l+=11]=0,$(f,c,++l),f.utf8Write(s,l+=4,c),f[l+=c]=i?1:0,$(f,u,++l),l+=4,u&&(f.utf8Write(n,l,u),l+=u),$(f,0,l),this._debug&&this._debug(`Outbound: Sending CHANNEL_REQUEST (r:${t}, exit-signal: ${r})`),Ne(this,this._packetRW.write.finalize(f))}authFailure(t,r){if(!this._server)throw new Error("Server-only method called in client mode");if(this._authsQueue.length===0)throw new Error("No auth in progress");let i;if(typeof t=="boolean"&&(r=t,t=void 0),t){i=[];for(let c=0;c<t.length;++c)t[c].toLowerCase()!=="none"&&i.push(t[c]);i=i.join(",")}else i="";let n=i.length,o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(5+n+1);s[o]=Oe.USERAUTH_FAILURE,$(s,n,++o),s.utf8Write(i,o+=4,n),s[o+=n]=r===!0?1:0,this._authsQueue.shift(),this._debug&&this._debug("Outbound: Sending USERAUTH_FAILURE"),Ne(this,this._packetRW.write.finalize(s))}authSuccess(){if(!this._server)throw new Error("Server-only method called in client mode");if(this._authsQueue.length===0)throw new Error("No auth in progress");let t=this._packetRW.write.allocStart,r=this._packetRW.write.alloc(1);r[t]=Oe.USERAUTH_SUCCESS,this._authsQueue.shift(),this._authenticated=!0,this._debug&&this._debug("Outbound: Sending USERAUTH_SUCCESS"),Ne(this,this._packetRW.write.finalize(r)),this._kex.negotiated.cs.compress==="zlib@openssh.com"&&(this._packetRW.read=new Rw),this._kex.negotiated.sc.compress==="zlib@openssh.com"&&(this._packetRW.write=new Ow(this))}authPKOK(t,r){if(!this._server)throw new Error("Server-only method called in client mode");if(this._authsQueue.length===0||this._authsQueue[0]!=="publickey")throw new Error('"publickey" auth not in progress');let i=Buffer.byteLength(t),n=r.length,o=this._packetRW.write.allocStart,s=this._packetRW.write.alloc(5+i+4+n);s[o]=Oe.USERAUTH_PK_OK,$(s,i,++o),s.utf8Write(t,o+=4,i),$(s,n,o+=i),s.set(r,o+=4),this._authsQueue.shift(),this._debug&&this._debug("Outbound: Sending USERAUTH_PK_OK"),Ne(this,this._packetRW.write.finalize(s))}authPasswdChg(t){if(!this._server)throw new Error("Server-only method called in client mode");let r=Buffer.byteLength(t),i=this._packetRW.write.allocStart,n=this._packetRW.write.alloc(5+r+4);n[i]=Oe.USERAUTH_PASSWD_CHANGEREQ,$(n,r,++i),n.utf8Write(t,i+=4,r),$(n,0,i+=r),this._debug&&this._debug("Outbound: Sending USERAUTH_PASSWD_CHANGEREQ"),Ne(this,this._packetRW.write.finalize(n))}authInfoReq(t,r,i){if(!this._server)throw new Error("Server-only method called in client mode");let n=0,o=t?Buffer.byteLength(t):0,s=r?Buffer.byteLength(r):0;for(let l=0;l<i.length;++l)n+=4+Buffer.byteLength(i[l].prompt)+1;let c=this._packetRW.write.allocStart,u=this._packetRW.write.alloc(5+o+4+s+4+4+n);u[c]=Oe.USERAUTH_INFO_REQUEST,$(u,o,++c),c+=4,t&&(u.utf8Write(t,c,o),c+=o),$(u,s,c),c+=4,r&&(u.utf8Write(r,c,s),c+=s),$(u,0,c),$(u,i.length,c+=4),c+=4;for(let l=0;l<i.length;++l){let f=i[l],p=Buffer.byteLength(f.prompt);$(u,p,c),c+=4,p&&(u.utf8Write(f.prompt,c,p),c+=p),u[c++]=f.echo?1:0}this._debug&&this._debug("Outbound: Sending USERAUTH_INFO_REQUEST"),Ne(this,this._packetRW.write.finalize(u))}},e2=/^SSH-(2\.0|1\.99)-([^ ]+)(?: (.*))?$/;function t2(e,t,r){let i,n;this._buffer?(i=Buffer.allocUnsafe(this._buffer.length+(r-t)),i.set(this._buffer,0),t===0?i.set(e,this._buffer.length):i.set(new Uint8Array(e.buffer,e.byteOffset+t,r-t),this._buffer.length),n=this._buffer.length,t=0):(i=e,n=0);let o=t,s=t,c=t,u=!1,l=0,f=0;for(;t<i.length;++t){let p=i[t];if(p===13){u=!0;continue}if(p===10){if(c>s&&c-s>4&&i[s]===83&&i[s+1]===83&&i[s+2]===72&&i[s+3]===45){let g=i.latin1Slice(o,c+1),h=s===o?g:g.slice(s-o),_=e2.exec(h);if(!_)throw new Error("Invalid identification string");let y={greeting:s===o?"":g.slice(0,s-o),identRaw:h,versions:{protocol:_[1],software:_[2]},comments:_[3]};return this._remoteIdentRaw=Buffer.from(h),this._debug&&this._debug(`Remote ident: ${Pw(h)}`),this._compatFlags=i2(y),this._buffer=void 0,this._decipher=new zD(0,jD.bind(this,{firstPacket:!0})),this._parse=r2,this._onHeader(y),this._destruct?(kw(this),t+1-n):r}if(this._server)throw new Error("Greetings from clients not permitted");if(++f>XD)throw new Error("Max greeting lines exceeded");u=!1,s=t+1,l=0}else{if(u)throw new Error("Invalid header: expected newline");if(++l>=YD)throw new Error("Header line too long")}c=t}return this._buffer||(this._buffer=Cw(i,o)),t-n}a(t2,"parseHeader");function r2(e,t,r){return this._decipher.decrypt(e,t,r)}a(r2,"parsePacket");function n2(e){if(this._onPacket(),e.length===0){this._debug&&this._debug("Inbound: Skipping empty packet payload");return}e=this._packetRW.read.read(e);let t=e[0];t===Oe.USERAUTH_SUCCESS&&!this._server&&!this._authenticated&&(this._authenticated=!0,this._kex.negotiated.cs.compress==="zlib@openssh.com"&&(this._packetRW.write=new Ow(this)),this._kex.negotiated.sc.compress==="zlib@openssh.com"&&(this._packetRW.read=new Rw));let r=WD[t];if(r===void 0){this._debug&&this._debug(`Inbound: Unsupported message type: ${t}`);return}return r(this,e)}a(n2,"onPayload");function i2(e){let t=e.versions.software,r=0;for(let i of UD)typeof i[0]=="string"?t===i[0]&&(r|=i[1]):i[0].test(t)&&(r|=i[1]);return r}a(i2,"getCompatFlags");function o2(e){let t=Object.keys(e),r=Buffer.allocUnsafe(5*t.length+1),i=0;for(let n=0;n<t.length;++n){let o=t[n];if(o==="TTY_OP_END")continue;let s=sA[o];if(s===void 0)continue;let c=e[o];typeof c=="number"&&isFinite(c)&&(r[i++]=s,r[i++]=c>>>24,r[i++]=c>>>16,r[i++]=c>>>8,r[i++]=c)}return r[i++]=sA.TTY_OP_END,i<r.length?Cw(r,0,i):r}a(o2,"modesToBytes");function s2(e){let t="ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss";MD&&(t=`ssh-ed25519,${t}`);let r=Buffer.byteLength(t),i=e._packetRW.write.allocStart,n=e._packetRW.write.alloc(28+r);n[i]=Oe.EXT_INFO,$(n,1,++i),$(n,15,i+=4),n.utf8Write("server-sig-algs",i+=4,15),$(n,r,i+=15),n.utf8Write(t,i+=4,r),e._debug&&e._debug("Outbound: Sending EXT_INFO"),Ne(e,e._packetRW.write.finalize(n))}a(s2,"sendExtInfo");$w.exports=aA});var Mw=me(Pu=>{"use strict";var Ap=require("assert"),{inspect:a2}=require("util");function Dw(e){let t="",r=e.length,i=e[0]==="-"?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}a(Dw,"addNumericalSeparator");function Bw(e,t){if(Ap(typeof t=="string","`thing` has to be of type string"),Array.isArray(e)){let r=e.length;return Ap(r>0,"At least one expected value needs to be specified"),e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}a(Bw,"oneOf");Pu.ERR_INTERNAL_ASSERTION=class zw extends Error{static{a(this,"ERR_INTERNAL_ASSERTION")}constructor(t){super(),Error.captureStackTrace(this,zw);let r=`This is caused by either a bug in ssh2 or incorrect usage of ssh2 internals.
17
17
  Please open an issue with this stack trace at https://github.com/mscdex/ssh2/issues
18
18
  `;this.message=t===void 0?r:`${t}
19
- ${r}`}};var ZD=2**32,Sw=(()=>{try{return new Function("return 2n ** 32n")()}catch{}})();wu.ERR_OUT_OF_RANGE=class Pw extends RangeError{static{a(this,"ERR_OUT_OF_RANGE")}constructor(t,r,i,n){super(),Error.captureStackTrace(this,Pw),yp(r,'Missing "range" argument');let o=n?t:`The value of "${t}" is out of range.`,s;Number.isInteger(i)&&Math.abs(i)>ZD?s=Iw(String(i)):typeof i=="bigint"?(s=String(i),(i>Sw||i<-Sw)&&(s=Iw(s)),s+="n"):s=VD(i),o+=` It must be ${r}. Received ${s}`,this.message=o}};var Ep=class e extends TypeError{static{a(this,"ERR_INVALID_ARG_TYPE")}constructor(t,r,i){super(),Error.captureStackTrace(this,e),yp(typeof t=="string","'name' must be a string");let n;typeof r=="string"&&r.startsWith("not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let o;if(t.endsWith(" argument"))o=`The ${t} ${n} ${vw(r,"type")}`;else{let s=t.includes(".")?"property":"argument";o=`The "${t}" ${s} ${n} ${vw(r,"type")}`}o+=`. Received type ${typeof i}`,this.message=o}};wu.ERR_INVALID_ARG_TYPE=Ep;wu.validateNumber=a(function(t,r){if(typeof t!="number")throw new Ep(r,"number",t)},"validateNumber")});var Pu=me((r7,Fw)=>{"use strict";var QD=require("events"),Oi=require("fs"),{constants:Kr}=Oi,{Readable:$w,Writable:dA}=require("stream"),{inherits:Dw,types:{isDate:sA}}=require("util"),KD=Buffer[Symbol.species],{bufferCopy:Ri,bufferSlice:Ms,makeBufferParser:GD,writeUInt32BE:Y}=In(),ri={SIZE:1,UIDGID:2,PERMISSIONS:4,ACMODTIME:8,EXTENDED:2147483648},He=Buffer.alloc(28),xt={OK:0,EOF:1,NO_SUCH_FILE:2,PERMISSION_DENIED:3,FAILURE:4,BAD_MESSAGE:5,NO_CONNECTION:6,CONNECTION_LOST:7,OP_UNSUPPORTED:8},YD=new Map(Object.values(xt).map(e=>[e,1])),XD={[xt.OK]:"No error",[xt.EOF]:"End of file",[xt.NO_SUCH_FILE]:"No such file or directory",[xt.PERMISSION_DENIED]:"Permission denied",[xt.FAILURE]:"Failure",[xt.BAD_MESSAGE]:"Bad message",[xt.NO_CONNECTION]:"No connection",[xt.CONNECTION_LOST]:"Connection lost",[xt.OP_UNSUPPORTED]:"Operation unsupported"},Ue={INIT:1,OPEN:3,CLOSE:4,READ:5,WRITE:6,LSTAT:7,FSTAT:8,SETSTAT:9,FSETSTAT:10,OPENDIR:11,READDIR:12,REMOVE:13,MKDIR:14,RMDIR:15,REALPATH:16,STAT:17,RENAME:18,READLINK:19,SYMLINK:20,EXTENDED:200},Gr={VERSION:2,STATUS:101,HANDLE:102,DATA:103,NAME:104,ATTRS:105,EXTENDED:201},$e={READ:1,WRITE:2,APPEND:4,CREAT:8,TRUNC:16,EXCL:32},kw=2*1024,Nt=2**32-1,JD=Buffer.from([0,0,0,5,Ue.INIT,0,0,0,3]),e2=Buffer.from([0,0,0,5,Gr.VERSION,0,0,0,3]),t2=/^SSH-2.0-(?:OpenSSH|dropbear)/,iA=256*1024,L=GD(),r2={readable:!1,writable:!1,push:a(e=>{},"push"),once:a(()=>{},"once"),on:a(()=>{},"on"),emit:a(()=>{},"emit"),end:a(()=>{},"end")};function Bw(){}a(Bw,"noop");var aA=class extends QD{static{a(this,"SFTP")}constructor(t,r,i){super(),(typeof i!="object"||!i)&&(i={});let n=t._protocol._remoteIdentRaw;this.server=!!i.server,this._debug=typeof i.debug=="function"?i.debug:void 0,this._isOpenSSH=n&&t2.test(n),this._version=-1,this._extensions={},this._biOpt=i.biOpt,this._pktLenBytes=0,this._pktLen=0,this._pktPos=0,this._pktType=0,this._pktData=void 0,this._writeReqid=-1,this._requests={},this._maxInPktLen=iA,this._maxOutPktLen=34e3,this._maxReadLen=(this._isOpenSSH?iA:34e3)-kw,this._maxWriteLen=(this._isOpenSSH?iA:34e3)-kw,this.maxOpenHandles=void 0,this._client=t,this._protocol=t._protocol,this._callbacks=[],this._hasX11=!1,this._exit={code:void 0,signal:void 0,dump:void 0,desc:void 0},this._waitWindow=!1,this._chunkcb=void 0,this._buffer=[],this.type=r.type,this.subtype=void 0,this.incoming=r.incoming,this.outgoing=r.outgoing,this.stderr=r2,this.readable=!0}push(t){if(t===null){if(Mw(this),!this.readable)return;this.readable=!1,this.emit("end");return}let r=0;for(;r<t.length;){if(this._pktLenBytes<4){let s=Math.min(4-this._pktLenBytes,t.length-r);for(this._pktLenBytes+=s;s--;)this._pktLen=(this._pktLen<<8)+t[r++];if(this._pktLenBytes<4)return;if(this._pktLen===0)return wt(this,"Invalid packet length");if(this._pktLen>this._maxInPktLen){let c=this._maxInPktLen;return wt(this,`Packet length ${this._pktLen} exceeds max length of ${c}`)}if(r>=t.length)return}if(this._pktPos<this._pktLen){let s=Math.min(this._pktLen-this._pktPos,t.length-r);if(r!==0||s!==t.length?s===this._pktLen?this._pkt=new KD(t.buffer,t.byteOffset+r,s):(this._pkt||(this._pkt=Buffer.allocUnsafe(this._pktLen)),this._pkt.set(new Uint8Array(t.buffer,t.byteOffset+r,s),this._pktPos)):s===this._pktLen?this._pkt=t:(this._pkt||(this._pkt=Buffer.allocUnsafe(this._pktLen)),this._pkt.set(t,this._pktPos)),r+=s,this._pktPos+=s,this._pktPos<this._pktLen)return}let i=this._pkt[0],n=this._pkt;this._pktLen=0,this._pktLenBytes=0,this._pkt=void 0,this._pktPos=0;let o=this.server?a2[i]:s2[i];if(!o)return wt(this,`Unknown packet type ${i}`);if(this._version===-1){if(this.server){if(i!==Ue.INIT)return wt(this,`Expected INIT packet, got ${i}`)}else if(i!==Gr.VERSION)return wt(this,`Expected VERSION packet, got ${i}`)}if(o(this,n)===!1)return}}end(){this.destroy()}destroy(){(this.outgoing.state==="open"||this.outgoing.state==="eof")&&(this.outgoing.state="closing",this._protocol.channelClose(this.outgoing.id))}_init(){this._init=Bw,this.server||_t(this,JD)}createReadStream(t,r){if(this.server)throw new Error("Client-only method called in server mode");return new ni(this,t,r)}createWriteStream(t,r){if(this.server)throw new Error("Client-only method called in server mode");return new gn(this,t,r)}open(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");typeof i=="function"&&(n=i,i=void 0);let o=typeof r=="number"?r:Lw(r);if(o===null)throw new Error(`Unknown flags string: ${r}`);let s=0,c=0;(typeof i=="string"||typeof i=="number")&&(i={mode:i}),typeof i=="object"&&i!==null&&(i=Io(i),s=i.flags,c=i.nb);let u=Buffer.byteLength(t),l=9,f=Buffer.allocUnsafe(13+u+4+4+c);Y(f,f.length-4,0),f[4]=Ue.OPEN;let p=this._writeReqid=this._writeReqid+1&Nt;Y(f,p,5),Y(f,u,l),f.utf8Write(t,l+=4,u),Y(f,o,l+=u),Y(f,s,l+=4),c&&(l+=4,c===He.length?f.set(He,l):Ri(He,f,0,c,l),l+=c),this._requests[p]={cb:n};let g=_t(this,f);this._debug&&this._debug(`SFTP: Outbound: ${g?"Buffered":"Sending"} OPEN`)}close(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let i=t.length,n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.CLOSE;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.set(t,n+=4),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} CLOSE`)}read(t,r,i,n,o,s){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");if(!Buffer.isBuffer(r))throw new Error("buffer is not a Buffer");if(i>=r.length)throw new Error("offset is out of bounds");if(i+n>r.length)throw new Error("length extends beyond buffer");if(o===null)throw new Error("null position currently unsupported");zw(this,t,r,i,n,o,s)}readData(t,r,i,n,o,s){this.read(t,r,i,n,o,s)}write(t,r,i,n,o,s){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");if(!Buffer.isBuffer(r))throw new Error("buffer is not a Buffer");if(i>r.length)throw new Error("offset is out of bounds");if(i+n>r.length)throw new Error("length extends beyond buffer");if(o===null)throw new Error("null position currently unsupported");if(!n){s&&process.nextTick(s,void 0,0);return}let c=this._maxWriteLen,u=Math.max(n-c,0),l=o;u&&(n=c);let f=t.length,p=9,g=Buffer.allocUnsafe(13+f+8+4+n);Y(g,g.length-4,0),g[4]=Ue.WRITE;let h=this._writeReqid=this._writeReqid+1&Nt;Y(g,h,5),Y(g,f,p),g.set(t,p+=4),p+=f;for(let y=7;y>=0;--y)g[p+y]=o&255,o/=256;Y(g,n,p+=8),Ri(r,g,i,i+n,p+=4),this._requests[h]={cb:a(y=>{y?typeof s=="function"&&s(y):u?this.write(t,r,i+n,u,l+n,s):typeof s=="function"&&s(void 0,i+n)},"cb")};let _=_t(this,g);if(this._debug){let y=_?"Sent":"Buffered";this._debug(`SFTP: Outbound: ${y} WRITE (id:${h})`)}}writeData(t,r,i,n,o,s){this.write(t,r,i,n,o,s)}fastGet(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");Cw(this,Oi,t,r,i,n)}fastPut(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");Cw(Oi,this,t,r,i,n)}readFile(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n;if(typeof i=="function"?n=i:typeof r=="function"&&(n=r,r=void 0),typeof r=="string")r={encoding:r,flag:"r"};else if(!r)r={encoding:null,flag:"r"};else if(typeof r!="object")throw new TypeError("Bad arguments");let o=r.encoding;if(o&&!Buffer.isEncoding(o))throw new Error(`Unknown encoding: ${o}`);let s,c,u,l=0,f,p=0,g=r.flag||"r",h=a(()=>{s===0?(c=Buffer.allocUnsafe(8192),this.read(f,c,0,8192,p,_)):this.read(f,c,l,s-l,p,_)},"read"),_=a((b,v)=>{let S;if(b){if(S=b.code===xt.EOF,!S)return this.close(f,()=>n&&n(b))}else S=!1;if(S||s===0&&v===0)return y();p+=v,l+=v,s!==0?l===s?y():h():(u.push(Ms(c,0,v)),h())},"afterRead");_._wantEOFError=!0;let y=a(()=>{this.close(f,b=>(s===0?c=Buffer.concat(u,l):l<s&&(c=Ms(c,0,l)),o&&(c=c.toString(o)),n&&n(b,c)))},"close");this.open(t,g,438,(b,v)=>{if(b)return n&&n(b);f=v;let S=a((M,R)=>{if(M){this.stat(t,(J,te)=>{if(J)return this.close(f,()=>{n&&n(M)});S(null,te)});return}if(s=R.size||0,s===0)return u=[],h();c=Buffer.allocUnsafe(s),h()},"tryStat");this.fstat(f,S)})}writeFile(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");let o;if(typeof n=="function"?o=n:typeof i=="function"&&(o=i,i=void 0),typeof i=="string")i={encoding:i,mode:438,flag:"w"};else if(!i)i={encoding:"utf8",mode:438,flag:"w"};else if(typeof i!="object")throw new TypeError("Bad arguments");if(i.encoding&&!Buffer.isEncoding(i.encoding))throw new Error(`Unknown encoding: ${i.encoding}`);let s=i.flag||"w";this.open(t,s,i.mode,(c,u)=>{if(c)o&&o(c);else{let l=Buffer.isBuffer(r)?r:Buffer.from(""+r,i.encoding||"utf8"),f=/a/.test(s)?null:0;if(f===null){let p=a((g,h)=>{if(g){this.stat(t,(_,y)=>{if(_)return this.close(u,()=>{o&&o(g)});p(null,y)});return}cA(this,u,l,0,l.length,h.size,o)},"tryStat");this.fstat(u,p);return}cA(this,u,l,0,l.length,f,o)}})}appendFile(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");let o;if(typeof n=="function"?o=n:typeof i=="function"&&(o=i,i=void 0),typeof i=="string")i={encoding:i,mode:438,flag:"a"};else if(!i)i={encoding:"utf8",mode:438,flag:"a"};else if(typeof i!="object")throw new TypeError("Bad arguments");i.flag||(i=Object.assign({flag:"a"},i)),this.writeFile(t,r,i,o)}exists(t,r){if(this.server)throw new Error("Client-only method called in server mode");this.stat(t,i=>{r&&r(!i)})}unlink(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.REMOVE;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} REMOVE`)}rename(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=Buffer.byteLength(r),s=9,c=Buffer.allocUnsafe(13+n+4+o);Y(c,c.length-4,0),c[4]=Ue.RENAME;let u=this._writeReqid=this._writeReqid+1&Nt;Y(c,u,5),Y(c,n,s),c.utf8Write(t,s+=4,n),Y(c,o,s+=n),c.utf8Write(r,s+=4,o),this._requests[u]={cb:i};let l=_t(this,c);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} RENAME`)}mkdir(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=0,o=0;typeof r=="function"&&(i=r,r=void 0),typeof r=="object"&&r!==null&&(r=Io(r),n=r.flags,o=r.nb);let s=Buffer.byteLength(t),c=9,u=Buffer.allocUnsafe(13+s+4+o);Y(u,u.length-4,0),u[4]=Ue.MKDIR;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,s,c),u.utf8Write(t,c+=4,s),Y(u,n,c+=s),o&&(c+=4,o===He.length?u.set(He,c):Ri(He,u,0,o,c),c+=o),this._requests[l]={cb:i};let f=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} MKDIR`)}rmdir(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.RMDIR;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} RMDIR`)}readdir(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");typeof r=="function"&&(i=r,r={}),(typeof r!="object"||r===null)&&(r={});let n=!(r&&r.full);if(!Buffer.isBuffer(t)&&typeof t!="string")throw new Error("missing directory handle or path");if(typeof t=="string"){let f=[],p=0,g=a((h,_)=>{if(h)return i(h);this.readdir(_,r,(y,b)=>{let v=y&&y.code===xt.EOF;if(y&&!v)return this.close(_,()=>i(y));if(v)return this.close(_,S=>{if(S)return i(S);i(void 0,f)});for(let S=0;S<b.length;++S,++p)f[p]=b[S];g(void 0,_)})},"reread");return this.opendir(t,g)}let o=t.length,s=9,c=Buffer.allocUnsafe(13+o);Y(c,c.length-4,0),c[4]=Ue.READDIR;let u=this._writeReqid=this._writeReqid+1&Nt;Y(c,u,5),Y(c,o,s),c.set(t,s+=4),this._requests[u]={cb:n?(f,p)=>{if(typeof i=="function"){if(f)return i(f);for(let g=p.length-1;g>=0;--g)(p[g].filename==="."||p[g].filename==="..")&&p.splice(g,1);i(void 0,p)}}:i};let l=_t(this,c);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} READDIR`)}fstat(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let i=t.length,n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.FSTAT;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.set(t,n+=4),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} FSTAT`)}stat(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.STAT;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} STAT`)}lstat(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.LSTAT;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} LSTAT`)}opendir(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.OPENDIR;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} OPENDIR`)}setstat(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=0,o=0;typeof r=="object"&&r!==null?(r=Io(r),n=r.flags,o=r.nb):typeof r=="function"&&(i=r);let s=Buffer.byteLength(t),c=9,u=Buffer.allocUnsafe(13+s+4+o);Y(u,u.length-4,0),u[4]=Ue.SETSTAT;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,s,c),u.utf8Write(t,c+=4,s),Y(u,n,c+=s),o&&(c+=4,o===He.length?u.set(He,c):Ri(He,u,0,o,c),c+=o),this._requests[l]={cb:i};let f=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} SETSTAT`)}fsetstat(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let n=0,o=0;typeof r=="object"&&r!==null?(r=Io(r),n=r.flags,o=r.nb):typeof r=="function"&&(i=r);let s=t.length,c=9,u=Buffer.allocUnsafe(13+s+4+o);Y(u,u.length-4,0),u[4]=Ue.FSETSTAT;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,s,c),u.set(t,c+=4),Y(u,n,c+=s),o&&(c+=4,o===He.length?u.set(He,c):Ri(He,u,0,o,c),c+=o),this._requests[l]={cb:i};let f=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} FSETSTAT`)}futimes(t,r,i,n){return this.fsetstat(t,{atime:Ls(r),mtime:Ls(i)},n)}utimes(t,r,i,n){return this.setstat(t,{atime:Ls(r),mtime:Ls(i)},n)}fchown(t,r,i,n){return this.fsetstat(t,{uid:r,gid:i},n)}chown(t,r,i,n){return this.setstat(t,{uid:r,gid:i},n)}fchmod(t,r,i){return this.fsetstat(t,{mode:r},i)}chmod(t,r,i){return this.setstat(t,{mode:r},i)}readlink(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.READLINK;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:a((u,l)=>{if(typeof r=="function"){if(u)return r(u);if(!l||!l.length)return r(new Error("Response missing link info"));r(void 0,l[0].filename)}},"cb")};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} READLINK`)}symlink(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(r),o=Buffer.byteLength(t),s=9,c=Buffer.allocUnsafe(13+n+4+o);Y(c,c.length-4,0),c[4]=Ue.SYMLINK;let u=this._writeReqid=this._writeReqid+1&Nt;Y(c,u,5),this._isOpenSSH?(Y(c,o,s),c.utf8Write(t,s+=4,o),Y(c,n,s+=o),c.utf8Write(r,s+=4,n)):(Y(c,n,s),c.utf8Write(r,s+=4,n),Y(c,o,s+=n),c.utf8Write(t,s+=4,o)),this._requests[u]={cb:i};let l=_t(this,c);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} SYMLINK`)}realpath(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.REALPATH;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:a((u,l)=>{if(typeof r=="function"){if(u)return r(u);if(!l||!l.length)return r(new Error("Response missing path info"));r(void 0,l[0].filename)}},"cb")};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} REALPATH`)}ext_openssh_rename(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=this._extensions["posix-rename@openssh.com"];if(!n||n!=="1")throw new Error("Server does not support this extended request");let o=Buffer.byteLength(t),s=Buffer.byteLength(r),c=9,u=Buffer.allocUnsafe(41+o+4+s);Y(u,u.length-4,0),u[4]=Ue.EXTENDED;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,24,c),u.utf8Write("posix-rename@openssh.com",c+=4,24),Y(u,o,c+=24),u.utf8Write(t,c+=4,o),Y(u,s,c+=o),u.utf8Write(r,c+=4,s),this._requests[l]={cb:i};let f=_t(this,u);if(this._debug){let p=f?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${p} posix-rename@openssh.com`)}}ext_openssh_statvfs(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=this._extensions["statvfs@openssh.com"];if(!i||i!=="2")throw new Error("Server does not support this extended request");let n=Buffer.byteLength(t),o=9,s=Buffer.allocUnsafe(36+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,19,o),s.utf8Write("statvfs@openssh.com",o+=4,19),Y(s,n,o+=19),s.utf8Write(t,o+=4,n),this._requests[c]={extended:"statvfs@openssh.com",cb:r};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} statvfs@openssh.com`)}}ext_openssh_fstatvfs(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=this._extensions["fstatvfs@openssh.com"];if(!i||i!=="2")throw new Error("Server does not support this extended request");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let n=t.length,o=9,s=Buffer.allocUnsafe(37+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,20,o),s.utf8Write("fstatvfs@openssh.com",o+=4,20),Y(s,n,o+=20),s.set(t,o+=4),this._requests[c]={extended:"fstatvfs@openssh.com",cb:r};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} fstatvfs@openssh.com`)}}ext_openssh_hardlink(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["hardlink@openssh.com"]!=="1")throw new Error("Server does not support this extended request");let o=Buffer.byteLength(t),s=Buffer.byteLength(r),c=9,u=Buffer.allocUnsafe(37+o+4+s);Y(u,u.length-4,0),u[4]=Ue.EXTENDED;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,20,c),u.utf8Write("hardlink@openssh.com",c+=4,20),Y(u,o,c+=20),u.utf8Write(t,c+=4,o),Y(u,s,c+=o),u.utf8Write(r,c+=4,s),this._requests[l]={cb:i};let f=_t(this,u);if(this._debug){let p=f?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${p} hardlink@openssh.com`)}}ext_openssh_fsync(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["fsync@openssh.com"]!=="1")throw new Error("Server does not support this extended request");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let n=t.length,o=9,s=Buffer.allocUnsafe(34+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,17,o),s.utf8Write("fsync@openssh.com",o+=4,17),Y(s,n,o+=17),s.set(t,o+=4),this._requests[c]={cb:r};let u=_t(this,s);this._debug&&this._debug(`SFTP: Outbound: ${u?"Buffered":"Sending"} fsync@openssh.com`)}ext_openssh_lsetstat(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["lsetstat@openssh.com"]!=="1")throw new Error("Server does not support this extended request");let o=0,s=0;typeof r=="object"&&r!==null?(r=Io(r),o=r.flags,s=r.nb):typeof r=="function"&&(i=r);let c=Buffer.byteLength(t),u=9,l=Buffer.allocUnsafe(37+c+4+s);Y(l,l.length-4,0),l[4]=Ue.EXTENDED;let f=this._writeReqid=this._writeReqid+1&Nt;Y(l,f,5),Y(l,20,u),l.utf8Write("lsetstat@openssh.com",u+=4,20),Y(l,c,u+=20),l.utf8Write(t,u+=4,c),Y(l,o,u+=c),s&&(u+=4,s===He.length?l.set(He,u):Ri(He,l,0,s,u),u+=s),this._requests[f]={cb:i};let p=_t(this,l);if(this._debug){let g=p?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${g} lsetstat@openssh.com`)}}ext_openssh_expandPath(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["expand-path@openssh.com"]!=="1")throw new Error("Server does not support this extended request");let n=Buffer.byteLength(t),o=9,s=Buffer.allocUnsafe(40+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,23,o),s.utf8Write("expand-path@openssh.com",o+=4,23),Y(s,n,o+=20),s.utf8Write(t,o+=4,n),this._requests[c]={cb:a((l,f)=>{if(typeof r=="function"){if(l)return r(l);if(!f||!f.length)return r(new Error("Response missing expanded path"));r(void 0,f[0].filename)}},"cb")};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} expand-path@openssh.com`)}}ext_copy_data(t,r,i,n,o,s){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["copy-data"]!=="1")throw new Error("Server does not support this extended request");if(!Buffer.isBuffer(t))throw new Error("Source handle is not a Buffer");if(!Buffer.isBuffer(n))throw new Error("Destination handle is not a Buffer");let u=0,l=Buffer.allocUnsafe(26+t.length+8+8+4+n.length+8);Y(l,l.length-4,u),u+=4,l[u]=Ue.EXTENDED,++u;let f=this._writeReqid=this._writeReqid+1&Nt;Y(l,f,u),u+=4,Y(l,9,u),u+=4,l.utf8Write("copy-data",u,9),u+=9,Y(l,t.length,u),u+=4,l.set(t,u),u+=t.length;for(let g=7;g>=0;--g)l[u+g]=r&255,r/=256;u+=8;for(let g=7;g>=0;--g)l[u+g]=i&255,i/=256;u+=8,Y(l,n.length,u),u+=4,l.set(n,u),u+=n.length;for(let g=7;g>=0;--g)l[u+g]=o&255,o/=256;this._requests[f]={cb:s};let p=_t(this,l);if(this._debug){let g=p?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${g} copy-data`)}}ext_home_dir(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["home-directory"]!=="1")throw new Error("Server does not support this extended request");if(typeof t!="string")throw new TypeError("username is not a string");let n=0,o=Buffer.byteLength(t),s=Buffer.allocUnsafe(31+o);Y(s,s.length-4,n),n+=4,s[n]=Ue.EXTENDED,++n;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,n),n+=4,Y(s,14,n),n+=4,s.utf8Write("home-directory",n,14),n+=14,Y(s,o,n),n+=4,s.utf8Write(t,n,o),n+=o,this._requests[c]={cb:a((l,f)=>{if(typeof r=="function"){if(l)return r(l);if(!f||!f.length)return r(new Error("Response missing home directory"));r(void 0,f[0].filename)}},"cb")};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} home-directory`)}}ext_users_groups(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["users-groups-by-id@openssh.com"]!=="1")throw new Error("Server does not support this extended request");if(!Array.isArray(t))throw new TypeError("uids is not an array");for(let l of t)if(!Number.isInteger(l)||l<0||l>2**32-1)throw new Error("uid values must all be 32-bit unsigned integers");if(!Array.isArray(r))throw new TypeError("gids is not an array");for(let l of r)if(!Number.isInteger(l)||l<0||l>2**32-1)throw new Error("gid values must all be 32-bit unsigned integers");let o=0,s=Buffer.allocUnsafe(47+4*t.length+4+4*r.length);Y(s,s.length-4,o),o+=4,s[o]=Ue.EXTENDED,++o;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,o),o+=4,Y(s,30,o),o+=4,s.utf8Write("users-groups-by-id@openssh.com",o,30),o+=30,Y(s,4*t.length,o),o+=4;for(let l of t)Y(s,l,o),o+=4;Y(s,4*r.length,o),o+=4;for(let l of r)Y(s,l,o),o+=4;this._requests[c]={extended:"users-groups-by-id@openssh.com",cb:i};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} users-groups-by-id@openssh.com`)}}handle(t,r){if(!this.server)throw new Error("Server-only method called in client mode");if(!Buffer.isBuffer(r))throw new Error("handle is not a Buffer");let i=r.length;if(i>256)throw new Error("handle too large (> 256 bytes)");let n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Gr.HANDLE,Y(o,t,5),Y(o,i,n),i&&o.set(r,n+=4);let s=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${s?"Buffered":"Sending"} HANDLE`)}status(t,r,i){if(!this.server)throw new Error("Server-only method called in client mode");if(!YD.has(r))throw new Error(`Bad status code: ${r}`);i||(i="");let n=Buffer.byteLength(i),o=9,s=Buffer.allocUnsafe(17+n+4);Y(s,s.length-4,0),s[4]=Gr.STATUS,Y(s,t,5),Y(s,r,o),Y(s,n,o+=4),o+=4,n&&(s.utf8Write(i,o,n),o+=n),Y(s,0,o);let c=_t(this,s);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} STATUS`)}data(t,r,i){if(!this.server)throw new Error("Server-only method called in client mode");let n=Buffer.isBuffer(r);if(!n&&typeof r!="string")throw new Error("data is not a Buffer or string");let o;!n&&!i&&(i=void 0,o=!0);let s=n?r.length:Buffer.byteLength(r,i),c=9,u=Buffer.allocUnsafe(13+s);Y(u,u.length-4,0),u[4]=Gr.DATA,Y(u,t,5),Y(u,s,c),s&&(n?u.set(r,c+=4):o?u.utf8Write(r,c+=4,s):u.write(r,c+=4,s,i));let l=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} DATA`)}name(t,r){if(!this.server)throw new Error("Server-only method called in client mode");if(!Array.isArray(r)){if(typeof r!="object"||r===null)throw new Error("names is not an object or array");r=[r]}let i=r.length,n=0,o,s=[];for(let f=0;f<i;++f){let p=r[f],g=!p||!p.filename||typeof p.filename!="string"?"":p.filename;n+=4+Buffer.byteLength(g);let h=!p||!p.longname||typeof p.longname!="string"?"":p.longname;if(n+=4+Buffer.byteLength(h),typeof p.attrs=="object"&&p.attrs!==null){if(o=Io(p.attrs),n+=4+o.nb,o.nb){let _;o.nb===He.length?_=new Uint8Array(He):(_=new Uint8Array(o.nb),Ri(He,_,0,o.nb,0)),o.bytes=_}s.push(o)}else n+=4,s.push(null)}let c=9,u=Buffer.allocUnsafe(13+n);Y(u,u.length-4,0),u[4]=Gr.NAME,Y(u,t,5),Y(u,i,c),c+=4;for(let f=0;f<i;++f){let p=r[f];{let h=!p||!p.filename||typeof p.filename!="string"?"":p.filename,_=Buffer.byteLength(h);Y(u,_,c),c+=4,_&&(u.utf8Write(h,c,_),c+=_)}{let h=!p||!p.longname||typeof p.longname!="string"?"":p.longname,_=Buffer.byteLength(h);Y(u,_,c),c+=4,_&&(u.utf8Write(h,c,_),c+=_)}let g=s[f];g?(Y(u,g.flags,c),c+=4,g.flags&&g.bytes&&(u.set(g.bytes,c),c+=g.nb)):(Y(u,0,c),c+=4)}let l=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} NAME`)}attrs(t,r){if(!this.server)throw new Error("Server-only method called in client mode");if(typeof r!="object"||r===null)throw new Error("attrs is not an object");r=Io(r);let i=r.flags,n=r.nb,o=9,s=Buffer.allocUnsafe(13+n);Y(s,s.length-4,0),s[4]=Gr.ATTRS,Y(s,t,5),Y(s,i,o),n&&(o+=4,n===He.length?s.set(He,o):Ri(He,s,0,n,o),o+=n);let c=_t(this,s);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} ATTRS`)}};function n2(e){try{return Buffer.allocUnsafe(e)}catch(t){return t}}a(n2,"tryCreateBuffer");function zw(e,t,r,i,n,o,s,c){let u=e._maxReadLen,l=Math.max(n-u,0);l&&(n=u);let f=t.length,p=9,g=o,h=Buffer.allocUnsafe(13+f+8+4);Y(h,h.length-4,0),h[4]=Ue.READ;let _=e._writeReqid=e._writeReqid+1&Nt;Y(h,_,5),Y(h,f,p),h.set(t,p+=4),p+=f;for(let v=7;v>=0;--v)h[p+v]=g&255,g/=256;Y(h,n,p+=8),typeof s!="function"&&(s=Bw);let y=c||{nb:0,position:o,off:i,origOff:i,len:void 0,overflow:void 0,cb:a((v,S,M)=>{let R=y.len,J=y.overflow;if(v){if(s._wantEOFError||v.code!==xt.EOF)return s(v)}else{if(M>R)return s(new Error("Received more data than requested"));if(M===R&&J){y.nb+=M,y.position+=M,y.off+=M,zw(e,t,r,y.off,J,y.position,s,y);return}}M=M||0,y.origOff===0&&r.length===y.nb?S=r:S=Ms(r,y.origOff,y.origOff+y.nb+M),s(void 0,y.nb+M,S,y.position)},"cb"),buffer:void 0};y.len=n,y.overflow=l,y.buffer=Ms(r,i,i+n),e._requests[_]=y;let b=_t(e,h);e._debug&&e._debug(`SFTP: Outbound: ${b?"Buffered":"Sending"} READ`)}a(zw,"read_");function Cw(e,t,r,i,n,o){let s=64,c=32768,u,l,f;typeof n=="function"?o=n:typeof n=="object"&&n!==null&&(typeof n.concurrency=="number"&&n.concurrency>0&&!isNaN(n.concurrency)&&(s=n.concurrency),typeof n.chunkSize=="number"&&n.chunkSize>0&&!isNaN(n.chunkSize)&&(c=n.chunkSize),typeof n.fileSize=="number"&&n.fileSize>0&&!isNaN(n.fileSize)&&(f=n.fileSize),typeof n.step=="function"&&(u=n.step),(typeof n.mode=="string"||typeof n.mode=="number")&&(l=pA(n.mode)));let p,g=0,h=0,_=!1,y,b,v,S=c*s;function M(R){if(_)return;_=!0;let J=0,te;y||b?(te=a(()=>{--J===0&&o(R)},"cbfinal"),y&&(e===Oi||e.outgoing.state==="open")&&++J,b&&(t===Oi||t.outgoing.state==="open")&&++J,y&&(e===Oi||e.outgoing.state==="open")&&e.close(y,te),b&&(t===Oi||t.outgoing.state==="open")&&t.close(b,te)):o(R)}a(M,"onerror"),e.open(r,"r",(R,J)=>{if(R)return M(R);y=J,f===void 0?e.fstat(y,te):te(null,{size:f});function te(ee,P){if(ee){if(e!==Oi){e.stat(r,(C,H)=>{if(C)return M(ee);te(null,H)});return}return M(ee)}p=P.size,t.open(i,"w",(C,H)=>{if(C)return M(C);if(b=H,p<=0)return M();for(;S>p;){if(s===1){S=p;break}S-=c,--s}if(v=n2(S),v instanceof Error)return M(v);l!==void 0?t.fchmod(b,l,a(function z(X){if(X){t.chmod(i,l,ne=>z());return}W()},"tryAgain")):W();function U(z,X,ne,O,q,V){if(z)return M(z);q=q||0,t.write(b,v,q,X,O,re);function re(_e){if(_e)return M(_e);if(h+=X,u&&u(h,X,p),X<V)return j(q,O+X,V-X);if(h===p){t.close(b,xe=>{if(b=void 0,xe)return M(xe);e.close(y,Tt=>{if(y=void 0,Tt)return M(Tt);o()})});return}if(g>=p)return;let ve=g+c>p?p-g:c;j(q,g,ve),g+=ve}a(re,"writeCb")}a(U,"onread");function k(z,X,ne){return(O,q,V)=>{U(O,q,V,X,z,ne)}}a(k,"makeCb");function j(z,X,ne){e.read(y,v,z,ne,X,k(z,X,ne))}a(j,"singleRead");function W(){let z=0,X=0;for(;g<p&&z<s;){let ne=g+c>p?p-g:c;j(X,g,ne),X+=ne,g+=ne,++z}}a(W,"startReads")})}a(te,"tryStat")})}a(Cw,"fastXfer");function cA(e,t,r,i,n,o,s){let c=typeof s=="function"?s:void 0;e.write(t,r,i,n,o,(u,l)=>{if(u)return e.close(t,()=>{c&&c(u)});l===n?e.close(t,c):(i+=l,n-=l,o+=l,cA(e,t,r,i,n,o,c))})}a(cA,"writeAll");var bp=class{static{a(this,"Stats")}constructor(t){this.mode=t&&t.mode,this.uid=t&&t.uid,this.gid=t&&t.gid,this.size=t&&t.size,this.atime=t&&t.atime,this.mtime=t&&t.mtime,this.extended=t&&t.extended}isDirectory(){return(this.mode&Kr.S_IFMT)===Kr.S_IFDIR}isFile(){return(this.mode&Kr.S_IFMT)===Kr.S_IFREG}isBlockDevice(){return(this.mode&Kr.S_IFMT)===Kr.S_IFBLK}isCharacterDevice(){return(this.mode&Kr.S_IFMT)===Kr.S_IFCHR}isSymbolicLink(){return(this.mode&Kr.S_IFMT)===Kr.S_IFLNK}isFIFO(){return(this.mode&Kr.S_IFMT)===Kr.S_IFIFO}isSocket(){return(this.mode&Kr.S_IFMT)===Kr.S_IFSOCK}};function Io(e){let t=0,r=0;if(typeof e=="object"&&e!==null){if(typeof e.size=="number"){t|=ri.SIZE;let i=e.size;He[r++]=i/72057594037927940,He[r++]=i/281474976710656,He[r++]=i/1099511627776,He[r++]=i/4294967296,He[r++]=i/16777216,He[r++]=i/65536,He[r++]=i/256,He[r++]=i}if(typeof e.uid=="number"&&typeof e.gid=="number"){t|=ri.UIDGID;let i=e.uid,n=e.gid;He[r++]=i>>>24,He[r++]=i>>>16,He[r++]=i>>>8,He[r++]=i,He[r++]=n>>>24,He[r++]=n>>>16,He[r++]=n>>>8,He[r++]=n}if(typeof e.mode=="number"||typeof e.mode=="string"){let i=pA(e.mode);t|=ri.PERMISSIONS,He[r++]=i>>>24,He[r++]=i>>>16,He[r++]=i>>>8,He[r++]=i}if((typeof e.atime=="number"||sA(e.atime))&&(typeof e.mtime=="number"||sA(e.mtime))){let i=Ls(e.atime),n=Ls(e.mtime);t|=ri.ACMODTIME,He[r++]=i>>>24,He[r++]=i>>>16,He[r++]=i>>>8,He[r++]=i,He[r++]=n>>>24,He[r++]=n>>>16,He[r++]=n>>>8,He[r++]=n}}return{flags:t,nb:r}}a(Io,"attrsToBytes");function Ls(e){if(typeof e=="number"&&e===e)return e;if(sA(e))return parseInt(e.getTime()/1e3,10);throw new Error(`Cannot parse time: ${e}`)}a(Ls,"toUnixTimestamp");function pA(e){if(typeof e=="number"&&e===e)return e;if(typeof e=="string")return pA(parseInt(e,8));throw new Error(`Cannot parse mode: ${e}`)}a(pA,"modeNum");var uA={r:$e.READ,"r+":$e.READ|$e.WRITE,w:$e.TRUNC|$e.CREAT|$e.WRITE,wx:$e.TRUNC|$e.CREAT|$e.WRITE|$e.EXCL,xw:$e.TRUNC|$e.CREAT|$e.WRITE|$e.EXCL,"w+":$e.TRUNC|$e.CREAT|$e.READ|$e.WRITE,"wx+":$e.TRUNC|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL,"xw+":$e.TRUNC|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL,a:$e.APPEND|$e.CREAT|$e.WRITE,ax:$e.APPEND|$e.CREAT|$e.WRITE|$e.EXCL,xa:$e.APPEND|$e.CREAT|$e.WRITE|$e.EXCL,"a+":$e.APPEND|$e.CREAT|$e.READ|$e.WRITE,"ax+":$e.APPEND|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL,"xa+":$e.APPEND|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL};function Lw(e){let t=uA[e];return t!==void 0?t:null}a(Lw,"stringToFlags");var i2=(()=>{let e=Object.keys(uA);return t=>{for(let r=0;r<e.length;++r){let i=e[r];if(uA[i]===t)return i}return null}})();function Us(e){let t=L.readUInt32BE();if(t===void 0)return;let r=new bp;if(t&ri.SIZE){let i=L.readUInt64BE(e);if(i===void 0)return;r.size=i}if(t&ri.UIDGID){let i=L.readUInt32BE(),n=L.readUInt32BE();if(n===void 0)return;r.uid=i,r.gid=n}if(t&ri.PERMISSIONS){let i=L.readUInt32BE();if(i===void 0)return;r.mode=i}if(t&ri.ACMODTIME){let i=L.readUInt32BE(),n=L.readUInt32BE();if(n===void 0)return;r.atime=i,r.mtime=n}if(t&ri.EXTENDED){let i=L.readUInt32BE();if(i===void 0)return;let n={};for(let o=0;o<i;++o){let s=L.readString(!0),c=L.readString();if(c===void 0)return;n[s]=c}r.extended=n}return r}a(Us,"readAttrs");function _t(e,t){let r=Uw(e,t);return r!==void 0?(e._buffer.push(r),!1):!0}a(_t,"sendOrBuffer");function Uw(e,t){let r=e.outgoing;if(r.state!=="open")return;if(r.window===0)return e._waitWindow=!0,e._chunkcb=Rw,t;let i,n=t.length,o=0;for(;n-o>0&&r.window>0;){let s=Math.min(n-o,r.window,r.packetSize);r.window-=s,r.window===0&&(e._waitWindow=!0,e._chunkcb=Rw),o===0&&s===n?e._protocol.channelData(e.outgoing.id,t):e._protocol.channelData(e.outgoing.id,Ms(t,o,o+s)),o+=s}return n-o>0&&(o>0?i=Ms(t,o,n):i=t),i}a(Uw,"tryWritePayload");function Rw(){this._chunkcb=void 0;let e=this._buffer,t=0;for(;t<e.length;){let r=e[t],i=Uw(this,r);if(i!==void 0){i!==r&&(e[t]=i),t>0&&(this._buffer=e.slice(t));return}++t}t>0&&(this._buffer=[])}a(Rw,"drainBuffer");function wt(e,t,r){let i=new Error(t);return i.level="sftp-protocol",!r&&e._debug&&e._debug(`SFTP: Inbound: ${t}`),e.emit("error",i),e.destroy(),Mw(e),!1}a(wt,"doFatalSFTPError");function Mw(e){let t=Object.keys(e._requests);if(t.length===0)return;let r=e._requests;e._requests={};let i=new Error("No response from server");for(let n=0;n<t.length;++n){let o=r[t[n]];typeof o.cb=="function"&&o.cb(i)}}a(Mw,"cleanupRequests");function o2(e,t){let r=9,i=Buffer.allocUnsafe(31);Y(i,i.length-4,0),i[4]=Ue.EXTENDED;let n=e._writeReqid=e._writeReqid+1&Nt;Y(i,n,5),Y(i,18,r),i.utf8Write("limits@openssh.com",r+=4,18),e._requests[n]={extended:"limits@openssh.com",cb:t};let o=_t(e,i);if(e._debug){let s=o?"Buffered":"Sending";e._debug(`SFTP: Outbound: ${s} limits@openssh.com`)}}a(o2,"requestLimits");var s2={[Gr.VERSION]:(e,t)=>{if(e._version!==-1)return wt(e,"Duplicate VERSION packet");let r={};L.init(t,1);let i=L.readUInt32BE();for(;L.avail();){let n=L.readString(!0),o=L.readString(!0);if(o===void 0){i=void 0;break}r[n]=o}if(L.clear(),i===void 0)return wt(e,"Malformed VERSION packet");if(e._debug){let n=Object.keys(r);n.length?e._debug(`SFTP: Inbound: Received VERSION (v${i}, exts:${n})`):e._debug(`SFTP: Inbound: Received VERSION (v${i})`)}if(e._version=i,e._extensions=r,r["limits@openssh.com"]==="1")return o2(e,(n,o)=>{n||(o.maxPktLen>0&&(e._maxOutPktLen=o.maxPktLen),o.maxReadLen>0&&(e._maxReadLen=o.maxReadLen),o.maxWriteLen>0&&(e._maxWriteLen=o.maxWriteLen),e.maxOpenHandles=o.maxOpenHandles>0?o.maxOpenHandles:1/0),e.emit("ready")});e.emit("ready")},[Gr.STATUS]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readUInt32BE(),n=L.readString(!0);if(L.clear(),e._debug){let s=JSON.stringify(n);e._debug(`SFTP: Inbound: Received STATUS (id:${r}, ${i}, ${s})`)}let o=e._requests[r];if(delete e._requests[r],o&&typeof o.cb=="function"){if(i===xt.OK){o.cb();return}let s=new Error(n||XD[i]||"Unknown status");s.code=i,o.cb(s)}},[Gr.HANDLE]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString();if(L.clear(),i===void 0)return r!==void 0&&delete e._requests[r],wt(e,"Malformed HANDLE packet");e._debug&&e._debug(`SFTP: Inbound: Received HANDLE (id:${r})`);let n=e._requests[r];delete e._requests[r],n&&typeof n.cb=="function"&&n.cb(void 0,i)},[Gr.DATA]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i;if(r!==void 0&&(i=e._requests[r],delete e._requests[r]),i&&typeof i.cb=="function")if(i.buffer){let n=L.readString(i.buffer);if(L.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${r}, ${n})`),i.cb(void 0,i.buffer,n);return}}else{let n=L.readString();if(L.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${r}, ${n.length})`),i.cb(void 0,n);return}}else{let n=L.skipString();if(L.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${r}, ${n})`);return}}return wt(e,"Malformed DATA packet")},[Gr.NAME]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i;r!==void 0&&(i=e._requests[r],delete e._requests[r]);let n=L.readUInt32BE();if(n!==void 0){let o=[];for(let s=0;s<n;++s){let c=L.readString(!0),u=L.readString(!0),l=Us(e._biOpt);if(l===void 0){o=void 0;break}o.push({filename:c,longname:u,attrs:l})}if(o!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received NAME (id:${r}, ${o.length})`),L.clear(),i&&typeof i.cb=="function"&&i.cb(void 0,o);return}}return L.clear(),wt(e,"Malformed NAME packet")},[Gr.ATTRS]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i;r!==void 0&&(i=e._requests[r],delete e._requests[r]);let n=Us(e._biOpt);if(L.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received ATTRS (id:${r})`),i&&typeof i.cb=="function"&&i.cb(void 0,n);return}return wt(e,"Malformed ATTRS packet")},[Gr.EXTENDED]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE();if(r!==void 0){let i=e._requests[r];if(i)switch(delete e._requests[r],i.extended){case"statvfs@openssh.com":case"fstatvfs@openssh.com":{let n=e._biOpt,o={f_bsize:L.readUInt64BE(n),f_frsize:L.readUInt64BE(n),f_blocks:L.readUInt64BE(n),f_bfree:L.readUInt64BE(n),f_bavail:L.readUInt64BE(n),f_files:L.readUInt64BE(n),f_ffree:L.readUInt64BE(n),f_favail:L.readUInt64BE(n),f_sid:L.readUInt64BE(n),f_flag:L.readUInt64BE(n),f_namemax:L.readUInt64BE(n)};if(o.f_namemax===void 0)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${i.extended})`),L.clear(),typeof i.cb=="function"&&i.cb(void 0,o);return}case"limits@openssh.com":{let n={maxPktLen:L.readUInt64BE(),maxReadLen:L.readUInt64BE(),maxWriteLen:L.readUInt64BE(),maxOpenHandles:L.readUInt64BE()};if(n.maxOpenHandles===void 0)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${i.extended})`),L.clear(),typeof i.cb=="function"&&i.cb(void 0,n);return}case"users-groups-by-id@openssh.com":{let n=L.readUInt32BE();if(n===void 0)break;let o=new Array(n);for(let u=0;u<o.length;++u)o[u]=L.readString(!0);let s=L.readUInt32BE();if(s===void 0)break;let c=new Array(s);for(let u=0;u<c.length;++u)c[u]=L.readString(!0);if(c.length>0&&c[c.length-1]===void 0)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${i.extended})`),L.clear(),typeof i.cb=="function"&&i.cb(void 0,o,c);return}default:e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ???)`),L.clear(),typeof i.cb=="function"&&i.cb();return}else{e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ???)`),L.clear();return}}return L.clear(),wt(e,"Malformed EXTENDED_REPLY packet")}},a2={[Ue.INIT]:(e,t)=>{if(e._version!==-1)return wt(e,"Duplicate INIT packet");let r={};L.init(t,1);let i=L.readUInt32BE();for(;L.avail();){let n=L.readString(!0),o=L.readString(!0);if(o===void 0){i=void 0;break}r[n]=o}if(L.clear(),i===void 0)return wt(e,"Malformed INIT packet");if(e._debug){let n=Object.keys(r);n.length?e._debug(`SFTP: Inbound: Received INIT (v${i}, exts:${n})`):e._debug(`SFTP: Inbound: Received INIT (v${i})`)}_t(e,e2),e._version=i,e._extensions=r,e.emit("ready")},[Ue.OPEN]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0),n=L.readUInt32BE(),o=Us(e._biOpt);if(L.clear(),o===void 0)return wt(e,"Malformed OPEN packet");e._debug&&e._debug(`SFTP: Inbound: Received OPEN (id:${r})`),e.emit("OPEN",r,i,n,o)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.CLOSE]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString();if(L.clear(),i===void 0||i.length>256)return wt(e,"Malformed CLOSE packet");e._debug&&e._debug(`SFTP: Inbound: Received CLOSE (id:${r})`),e.emit("CLOSE",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.READ]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(),n=L.readUInt64BE(e._biOpt),o=L.readUInt32BE();if(L.clear(),o===void 0||i.length>256)return wt(e,"Malformed READ packet");e._debug&&e._debug(`SFTP: Inbound: Received READ (id:${r})`),e.emit("READ",r,i,n,o)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.WRITE]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(),n=L.readUInt64BE(e._biOpt),o=L.readString();if(L.clear(),o===void 0||i.length>256)return wt(e,"Malformed WRITE packet");e._debug&&e._debug(`SFTP: Inbound: Received WRITE (id:${r})`),e.emit("WRITE",r,i,n,o)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.LSTAT]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed LSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received LSTAT (id:${r})`),e.emit("LSTAT",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.FSTAT]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString();if(L.clear(),i===void 0||i.length>256)return wt(e,"Malformed FSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received FSTAT (id:${r})`),e.emit("FSTAT",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.SETSTAT]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0),n=Us(e._biOpt);if(L.clear(),n===void 0)return wt(e,"Malformed SETSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received SETSTAT (id:${r})`),e.emit("SETSTAT",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.FSETSTAT]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(),n=Us(e._biOpt);if(L.clear(),n===void 0||i.length>256)return wt(e,"Malformed FSETSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received FSETSTAT (id:${r})`),e.emit("FSETSTAT",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.OPENDIR]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed OPENDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received OPENDIR (id:${r})`),e.emit("OPENDIR",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.READDIR]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString();if(L.clear(),i===void 0||i.length>256)return wt(e,"Malformed READDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received READDIR (id:${r})`),e.emit("READDIR",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.REMOVE]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed REMOVE packet");e._debug&&e._debug(`SFTP: Inbound: Received REMOVE (id:${r})`),e.emit("REMOVE",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.MKDIR]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0),n=Us(e._biOpt);if(L.clear(),n===void 0)return wt(e,"Malformed MKDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received MKDIR (id:${r})`),e.emit("MKDIR",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.RMDIR]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed RMDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received RMDIR (id:${r})`),e.emit("RMDIR",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.REALPATH]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed REALPATH packet");e._debug&&e._debug(`SFTP: Inbound: Received REALPATH (id:${r})`),e.emit("REALPATH",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.STAT]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed STAT packet");e._debug&&e._debug(`SFTP: Inbound: Received STAT (id:${r})`),e.emit("STAT",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.RENAME]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0),n=L.readString(!0);if(L.clear(),n===void 0)return wt(e,"Malformed RENAME packet");e._debug&&e._debug(`SFTP: Inbound: Received RENAME (id:${r})`),e.emit("RENAME",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.READLINK]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(L.clear(),i===void 0)return wt(e,"Malformed READLINK packet");e._debug&&e._debug(`SFTP: Inbound: Received READLINK (id:${r})`),e.emit("READLINK",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.SYMLINK]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0),n=L.readString(!0);if(L.clear(),n===void 0)return wt(e,"Malformed SYMLINK packet");e._debug&&e._debug(`SFTP: Inbound: Received SYMLINK (id:${r})`);let o;e._isOpenSSH?o=e.emit("SYMLINK",r,n,i):o=e.emit("SYMLINK",r,i,n),o||e.status(r,xt.OP_UNSUPPORTED)},[Ue.EXTENDED]:(e,t)=>{L.init(t,1);let r=L.readUInt32BE(),i=L.readString(!0);if(i===void 0)return L.clear(),wt(e,"Malformed EXTENDED packet");let n;L.avail()&&(n=L.readRaw()),L.clear(),e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED (id:${r})`),e.emit("EXTENDED",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)}},{ERR_INVALID_ARG_TYPE:c2,ERR_OUT_OF_RANGE:Ap,validateNumber:u2}=Tw(),Ow=128,Fr,lA=[];function l2(e){lA.length>0?Fr=lA.pop():Fr=Buffer.allocUnsafe(e),Fr.used=0}a(l2,"allocNewPool");function fA(e,t){if(!Number.isSafeInteger(e))throw u2(e,t),Number.isInteger(e)?new Ap(t,">= 0 and <= 2 ** 53 - 1",e):new Ap(t,"an integer",e);if(e<0)throw new Ap(t,">= 0 and <= 2 ** 53 - 1",e)}a(fA,"checkPosition");function oA(e){return e+7&-8}a(oA,"roundUpToMultipleOf8");function ni(e,t,r){if(r===void 0)r={};else if(typeof r=="string")r={encoding:r};else{if(r===null||typeof r!="object")throw new TypeError('"options" argument must be a string or an object');r=Object.create(r)}if(r.highWaterMark===void 0&&(r.highWaterMark=64*1024),r.emitClose=!1,r.autoDestroy=!1,$w.call(this,r),this.path=t,this.flags=r.flags===void 0?"r":r.flags,this.mode=r.mode===void 0?438:r.mode,this.start=r.start,this.end=r.end,this.autoClose=r.autoClose===void 0?!0:r.autoClose,this.pos=0,this.bytesRead=0,this.isClosed=!1,this.handle=r.handle===void 0?null:r.handle,this.sftp=e,this._opening=!1,this.start!==void 0&&(fA(this.start,"start"),this.pos=this.start),this.end===void 0)this.end=1/0;else if(this.end!==1/0&&(fA(this.end,"end"),this.start!==void 0&&this.start>this.end))throw new Ap("start",`<= "end" (here: ${this.end})`,this.start);this.on("end",function(){this.autoClose&&this.destroy()}),Buffer.isBuffer(this.handle)||this.open()}a(ni,"ReadStream");Dw(ni,$w);ni.prototype.open=function(){this._opening||(this._opening=!0,this.sftp.open(this.path,this.flags,this.mode,(e,t)=>{if(this._opening=!1,e){this.emit("error",e),this.autoClose&&this.destroy();return}this.handle=t,this.emit("open",t),this.emit("ready"),this.read()}))};ni.prototype._read=function(e){if(!Buffer.isBuffer(this.handle))return this.once("open",()=>this._read(e));if(this.destroyed)return;(!Fr||Fr.length-Fr.used<Ow)&&l2(this.readableHighWaterMark||this._readableState.highWaterMark);let t=Fr,r=Math.min(Fr.length-Fr.used,e),i=Fr.used;if(this.end!==void 0&&(r=Math.min(this.end-this.pos+1,r)),r<=0)return this.push(null);this.sftp.read(this.handle,Fr,Fr.used,r,this.pos,(n,o)=>{if(n){this.emit("error",n),this.autoClose&&this.destroy();return}let s=null;if(i+r===t.used&&t===Fr)t.used=oA(t.used+o-r);else{let c=i+r&-8,u=oA(i+o);c-u>=Ow&&lA.push(t.slice(u,c))}o>0&&(this.bytesRead+=o,s=t.slice(i,i+o)),this.pos+=o,this.push(s)}),Fr.used=oA(Fr.used+r)};ni.prototype._destroy=function(e,t){if(this._opening&&!Buffer.isBuffer(this.handle)){this.once("open",Nw.bind(null,this,t,e));return}Nw(this,t,e),this.handle=null,this._opening=!1};function Nw(e,t,r){if(!e.handle)return i();e.sftp.close(e.handle,i);function i(n){n=n||r,t(n),e.isClosed=!0,n||e.emit("close")}a(i,"onclose")}a(Nw,"closeStream");ni.prototype.close=function(e){this.destroy(null,e)};Object.defineProperty(ni.prototype,"pending",{get(){return this.handle===null},configurable:!0});function gn(e,t,r){if(r===void 0)r={};else if(typeof r=="string")r={encoding:r};else{if(r===null||typeof r!="object")throw new TypeError('"options" argument must be a string or an object');r=Object.create(r)}r.emitClose=!1,r.autoDestroy=!1,dA.call(this,r),this.path=t,this.flags=r.flags===void 0?"w":r.flags,this.mode=r.mode===void 0?438:r.mode,this.start=r.start,this.autoClose=r.autoClose===void 0?!0:r.autoClose,this.pos=0,this.bytesWritten=0,this.isClosed=!1,this.handle=r.handle===void 0?null:r.handle,this.sftp=e,this._opening=!1,this.start!==void 0&&(fA(this.start,"start"),this.pos=this.start),r.encoding&&this.setDefaultEncoding(r.encoding),this.on("finish",function(){this._writableState.finalCalled||this.autoClose&&this.destroy()}),Buffer.isBuffer(this.handle)||this.open()}a(gn,"WriteStream");Dw(gn,dA);gn.prototype._final=function(e){this.autoClose&&this.destroy(),e()};gn.prototype.open=function(){this._opening||(this._opening=!0,this.sftp.open(this.path,this.flags,this.mode,(e,t)=>{if(this._opening=!1,e){this.emit("error",e),this.autoClose&&this.destroy();return}this.handle=t;let r=a(i=>{if(i){this.sftp.chmod(this.path,this.mode,n=>r());return}if(this.flags[0]==="a"){let n=a((o,s)=>{if(o){this.sftp.stat(this.path,(c,u)=>{if(c){this.destroy(),this.emit("error",o);return}n(null,u)});return}this.pos=s.size,this.emit("open",t),this.emit("ready")},"tryStat");this.sftp.fstat(t,n);return}this.emit("open",t),this.emit("ready")},"tryAgain");this.sftp.fchmod(t,this.mode,r)}))};gn.prototype._write=function(e,t,r){if(!Buffer.isBuffer(e)){let i=new c2("data","Buffer",e);return this.emit("error",i)}if(!Buffer.isBuffer(this.handle))return this.once("open",function(){this._write(e,t,r)});this.sftp.write(this.handle,e,0,e.length,this.pos,(i,n)=>{if(i)return this.autoClose&&this.destroy(),r(i);this.bytesWritten+=n,r()}),this.pos+=e.length};gn.prototype._writev=function(e,t){if(!Buffer.isBuffer(this.handle))return this.once("open",function(){this._writev(e,t)});let r=this.sftp,i=this.handle,n=e.length,o=a((s,c)=>{if(s)return this.destroy(),t(s);this.bytesWritten+=c,--n===0&&t()},"onwrite");for(let s=0;s<e.length;++s){let c=e[s].chunk;r.write(i,c,0,c.length,this.pos,o),this.pos+=c.length}};typeof dA.prototype.destroy!="function"&&(gn.prototype.destroy=ni.prototype.destroy);gn.prototype._destroy=ni.prototype._destroy;gn.prototype.close=function(e){if(e){if(this.isClosed){process.nextTick(e);return}this.on("close",e)}this.autoClose||this.on("finish",this.destroy.bind(this)),this.end()};gn.prototype.destroySoon=gn.prototype.end;Object.defineProperty(gn.prototype,"pending",{get(){return this.handle===null},configurable:!0});Fw.exports={flagsToString:i2,OPEN_MODE:$e,SFTP:aA,Stats:bp,STATUS_CODE:xt,stringToFlags:Lw}});var EA=me((i7,qw)=>{"use strict";var{Duplex:f2,Readable:d2,Writable:p2}=require("stream"),{CHANNEL_EXTENDED_DATATYPE:{STDERR:Hw}}=Jn(),{bufferSlice:xp}=In(),h2=32*1024,Tu=2*1024*1024,_A=Tu/2,hA=class extends d2{static{a(this,"ClientStderr")}constructor(t,r){super(r),this._channel=t}_read(t){this._channel._waitChanDrain&&(this._channel._waitChanDrain=!1,this._channel.incoming.window<=_A&&yA(this._channel))}},gA=class extends p2{static{a(this,"ServerStderr")}constructor(t){super({highWaterMark:Tu}),this._channel=t}_write(t,r,i){let n=this._channel,o=n._client._protocol,s=n.outgoing,c=s.packetSize,u=s.id,l=s.window,f=t.length,p=0;if(s.state==="open"){for(;f-p>0&&l>0;){let g=f-p;g>l&&(g=l),g>c&&(g=c),p===0&&g===f?o.channelExtData(u,t,Hw):o.channelExtData(u,xp(t,p,p+g),Hw),p+=g,l-=g}if(s.window=l,f-p>0){l===0&&(n._waitWindow=!0),p>0?n._chunkErr=xp(t,p,f):n._chunkErr=t,n._chunkcbErr=i;return}i()}}},mA=class extends f2{static{a(this,"Channel")}constructor(t,r,i){let n={highWaterMark:Tu,allowHalfOpen:!i||i&&i.allowHalfOpen!==!1,emitClose:!1};super(n),this.allowHalfOpen=n.allowHalfOpen;let o=!!(i&&i.server);this.server=o,this.type=r.type,this.subtype=void 0,this.incoming=r.incoming,this.outgoing=r.outgoing,this._callbacks=[],this._client=t,this._hasX11=!1,this._exit={code:void 0,signal:void 0,dump:void 0,desc:void 0},this.stdin=this.stdout=this,o?this.stderr=new gA(this):this.stderr=new hA(this,n),this._waitWindow=!1,this._waitChanDrain=!1,this._chunk=void 0,this._chunkcb=void 0,this._chunkErr=void 0,this._chunkcbErr=void 0,this.on("finish",jw).on("prefinish",jw),this.on("end",Ww).on("close",Ww)}_read(t){this._waitChanDrain&&(this._waitChanDrain=!1,this.incoming.window<=_A&&yA(this))}_write(t,r,i){let n=this._client._protocol,o=this.outgoing,s=o.packetSize,c=o.id,u=o.window,l=t.length,f=0;if(o.state==="open"){for(;l-f>0&&u>0;){let p=l-f;p>u&&(p=u),p>s&&(p=s),f===0&&p===l?n.channelData(c,t):n.channelData(c,xp(t,f,f+p)),f+=p,u-=p}if(o.window=u,l-f>0){u===0&&(this._waitWindow=!0),f>0?this._chunk=xp(t,f,l):this._chunk=t,this._chunkcb=i;return}i()}}eof(){this.outgoing.state==="open"&&(this.outgoing.state="eof",this._client._protocol.channelEOF(this.outgoing.id))}close(){(this.outgoing.state==="open"||this.outgoing.state==="eof")&&(this.outgoing.state="closing",this._client._protocol.channelClose(this.outgoing.id))}destroy(){return this.end(),this.close(),this}setWindow(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");this.type==="session"&&(this.subtype==="shell"||this.subtype==="exec")&&this.writable&&this.outgoing.state==="open"&&this._client._protocol.windowChange(this.outgoing.id,t,r,i,n)}signal(t){if(this.server)throw new Error("Client-only method called in server mode");this.type==="session"&&this.writable&&this.outgoing.state==="open"&&this._client._protocol.signal(this.outgoing.id,t)}exit(t,r,i){if(!this.server)throw new Error("Server-only method called in client mode");this.type==="session"&&this.writable&&this.outgoing.state==="open"&&(typeof t=="number"?this._client._protocol.exitStatus(this.outgoing.id,t):this._client._protocol.exitSignal(this.outgoing.id,t,r,i))}};function jw(){this.eof(),(this.server||!this.allowHalfOpen)&&this.close(),this.writable=!1}a(jw,"onFinish");function Ww(){this.readable=!1}a(Ww,"onEnd");function yA(e){if(e.outgoing.state==="closed")return;let t=Tu-e.incoming.window;t<=0||(e.incoming.window+=t,e._client._protocol.channelWindowAdjust(e.outgoing.id,t))}a(yA,"windowAdjust");qw.exports={Channel:mA,MAX_WINDOW:Tu,PACKET_SIZE:h2,windowAdjust:yA,WINDOW_THRESHOLD:_A}});var xA=me((s7,Qw)=>{"use strict";var{SFTP:g2}=Pu(),ku=2**32-1;function Vw(e,t,r,i){if(e._chanMgr.remove(t),typeof i!="function")return;let n;r instanceof Error?n=r:typeof r=="object"&&r!==null?(n=new Error(`(SSH) Channel open failure: ${r.description}`),n.reason=r.reason):(n=new Error("(SSH) Channel open failure: server closed channel unexpectedly"),n.reason=""),i(n)}a(Vw,"onChannelOpenFailure");function Zw(e,t,r,i,n){if(typeof r=="function"){Vw(e,t,i,r);return}if(typeof r!="object"||r===null||r.incoming&&r.incoming.state==="closed"||(e._chanMgr.remove(t),r.server&&r.constructor.name==="Session"))return;r.incoming.state="closed",r.readable&&r.push(null),r.server?r.stderr.writable&&r.stderr.end():r.stderr.readable&&r.stderr.push(null),r.constructor!==g2&&(r.outgoing.state==="open"||r.outgoing.state==="eof")&&!n&&r.close(),r.outgoing.state==="closing"&&(r.outgoing.state="closed");let o=r._readableState,s=r._writableState;s&&!s.ending&&!s.finished&&!n&&r.end();let c=r._callbacks;r._callbacks=[];for(let u=0;u<c.length;++u)c[u](!0);if(r.server)!r.readable||r.destroyed||o&&o.endEmitted?r.emit("close"):r.once("end",()=>r.emit("close"));else{let u;switch(r.type){case"direct-streamlocal@openssh.com":case"direct-tcpip":u=a(()=>r.emit("close"),"doClose");break;default:{let f=r._exit;u=a(()=>{f.code===null?r.emit("close",f.code,f.signal,f.dump,f.desc):r.emit("close",f.code)},"doClose")}}!r.readable||r.destroyed||o&&o.endEmitted?u():r.once("end",u);let l=r.stderr._readableState;!r.stderr.readable||r.stderr.destroyed||l&&l.endEmitted?r.stderr.emit("close"):r.stderr.once("end",()=>r.stderr.emit("close"))}}a(Zw,"onCHANNEL_CLOSE");var bA=class{static{a(this,"ChannelManager")}constructor(t){this._client=t,this._channels={},this._cur=-1,this._count=0}add(t){let r;if(this._cur<ku)r=++this._cur;else if(this._count===0)this._cur=0,r=0;else{let i=this._channels;for(let n=0;n<ku;++n)if(i[n]===void 0){r=n;break}}return r===void 0?-1:(this._channels[r]=t||!0,++this._count,r)}update(t,r){if(typeof t!="number"||t<0||t>=ku||!isFinite(t))throw new Error(`Invalid channel id: ${t}`);r&&this._channels[t]&&(this._channels[t]=r)}get(t){if(typeof t!="number"||t<0||t>=ku||!isFinite(t))throw new Error(`Invalid channel id: ${t}`);return this._channels[t]}remove(t){if(typeof t!="number"||t<0||t>=ku||!isFinite(t))throw new Error(`Invalid channel id: ${t}`);this._channels[t]&&(delete this._channels[t],this._count&&--this._count)}cleanup(t){let r=this._channels;this._channels={},this._cur=-1,this._count=0;let i=Object.keys(r),n=this._client;for(let o=0;o<i.length;++o){let s=+i[o],c=r[s];Zw(n,s,c._channel||c,t,!0)}}},AA=(()=>{let e=Object.prototype.toString;return t=>e.call(t)==="[object RegExp]"})();function m2(e,t,r){if(Array.isArray(e)&&e.length>0){for(let i=0;i<e.length;++i)if(r.indexOf(e[i])===-1)throw new Error(`Unsupported algorithm: ${e[i]}`);return e}if(typeof e=="object"&&e!==null){let i=Object.keys(e),n=t;for(let o=0;o<i.length;++o){let s=i[o],c=e[s];switch(s){case"append":if(Array.isArray(c)||(c=[c]),Array.isArray(c))for(let u=0;u<c.length;++u){let l=c[u];if(typeof l=="string"){if(!l||n.indexOf(l)!==-1)continue;if(r.indexOf(l)===-1)throw new Error(`Unsupported algorithm: ${l}`);n===t&&(n=n.slice()),n.push(l)}else if(AA(l))for(let f=0;f<r.length;++f){let p=r[f];if(l.test(p)){if(n.indexOf(p)!==-1)continue;n===t&&(n=n.slice()),n.push(p)}}}break;case"prepend":if(Array.isArray(c)||(c=[c]),Array.isArray(c))for(let u=c.length;u>=0;--u){let l=c[u];if(typeof l=="string"){if(!l||n.indexOf(l)!==-1)continue;if(r.indexOf(l)===-1)throw new Error(`Unsupported algorithm: ${l}`);n===t&&(n=n.slice()),n.unshift(l)}else if(AA(l))for(let f=r.length;f>=0;--f){let p=r[f];if(l.test(p)){if(n.indexOf(p)!==-1)continue;n===t&&(n=n.slice()),n.unshift(p)}}}break;case"remove":if(Array.isArray(c)||(c=[c]),Array.isArray(c))for(let u=0;u<c.length;++u){let l=c[u];if(typeof l=="string"){if(!l)continue;let f=n.indexOf(l);if(f===-1)continue;n===t&&(n=n.slice()),n.splice(f,1)}else if(AA(l))for(let f=0;f<n.length;++f)l.test(n[f])&&(n===t&&(n=n.slice()),n.splice(f,1),--f)}break}}return n}return t}a(m2,"generateAlgorithmList");Qw.exports={ChannelManager:bA,generateAlgorithmList:m2,onChannelOpenFailure:Vw,onCHANNEL_CLOSE:Zw,isWritable:a(e=>e&&e.writable&&e._readableState&&e._readableState.ended===!1,"isWritable")}});var PA=me((c7,mP)=>{"use strict";var{createHash:_2,getHashes:y2,randomFillSync:E2}=require("crypto"),{Socket:A2}=require("net"),{lookup:b2}=require("dns"),x2=require("events"),I2=y2(),{COMPAT:pP,CHANNEL_EXTENDED_DATATYPE:{STDERR:v2},CHANNEL_OPEN_FAILURE:Cu,DEFAULT_CIPHER:Kw,DEFAULT_COMPRESSION:Gw,DEFAULT_KEX:Yw,DEFAULT_MAC:Xw,DEFAULT_SERVER_HOST_KEY:Jw,DISCONNECT_REASON:eP,DISCONNECT_REASON_BY_VALUE:S2,SUPPORTED_CIPHER:w2,SUPPORTED_COMPRESSION:P2,SUPPORTED_KEX:T2,SUPPORTED_MAC:k2,SUPPORTED_SERVER_HOST_KEY:C2}=Jn(),{init:R2}=Pi(),O2=nA(),{parseKey:Sp}=Ci(),{SFTP:N2}=Pu(),{bufferCopy:tP,makeBufferParser:hP,makeError:$2,readUInt32BE:D2,sigSSHToASN1:B2,writeUInt32BE:IA}=In(),{AgentContext:rP,createAgent:nP,isAgent:iP}=HE(),{Channel:gP,MAX_WINDOW:wp,PACKET_SIZE:Pp,windowAdjust:oP,WINDOW_THRESHOLD:sP}=EA(),{ChannelManager:z2,generateAlgorithmList:Ru,isWritable:dr,onChannelOpenFailure:L2,onCHANNEL_CLOSE:U2}=xA(),Ip=hP(),vp=hP(),Ou=/^OpenSSH_(?:(?![0-4])\d)|(?:\d{2,})/,SA=a(e=>{},"noop"),wA=class extends x2{static{a(this,"Client")}constructor(){super(),this.config={host:void 0,port:void 0,localAddress:void 0,localPort:void 0,forceIPv4:void 0,forceIPv6:void 0,keepaliveCountMax:void 0,keepaliveInterval:void 0,readyTimeout:void 0,ident:void 0,username:void 0,password:void 0,privateKey:void 0,tryKeyboard:void 0,agent:void 0,allowAgentFwd:void 0,authHandler:void 0,hostHashAlgo:void 0,hostHashCb:void 0,strictVendor:void 0,debug:void 0},this._agent=void 0,this._readyTimeout=void 0,this._chanMgr=void 0,this._callbacks=void 0,this._forwarding=void 0,this._forwardingUnix=void 0,this._acceptX11=void 0,this._agentFwdEnabled=void 0,this._remoteVer=void 0,this._protocol=void 0,this._sock=void 0,this._resetKA=void 0}connect(t){if(this._sock&&dr(this._sock))return this.once("close",()=>{this.connect(t)}),this.end(),this;this.config.host=t.hostname||t.host||"localhost",this.config.port=t.port||22,this.config.localAddress=typeof t.localAddress=="string"?t.localAddress:void 0,this.config.localPort=typeof t.localPort=="string"||typeof t.localPort=="number"?t.localPort:void 0,this.config.forceIPv4=t.forceIPv4||!1,this.config.forceIPv6=t.forceIPv6||!1,this.config.keepaliveCountMax=typeof t.keepaliveCountMax=="number"&&t.keepaliveCountMax>=0?t.keepaliveCountMax:3,this.config.keepaliveInterval=typeof t.keepaliveInterval=="number"&&t.keepaliveInterval>0?t.keepaliveInterval:0,this.config.readyTimeout=typeof t.readyTimeout=="number"&&t.readyTimeout>=0?t.readyTimeout:2e4,this.config.ident=typeof t.ident=="string"||Buffer.isBuffer(t.ident)?t.ident:void 0;let r={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:[]},sc:void 0},i=!0;if(typeof t.algorithms=="object"&&t.algorithms!==null&&(r.kex=Ru(t.algorithms.kex,Yw,T2),r.kex!==Yw&&(i=!1),r.serverHostKey=Ru(t.algorithms.serverHostKey,Jw,C2),r.serverHostKey!==Jw&&(i=!1),r.cs.cipher=Ru(t.algorithms.cipher,Kw,w2),r.cs.cipher!==Kw&&(i=!1),r.cs.mac=Ru(t.algorithms.hmac,Xw,k2),r.cs.mac!==Xw&&(i=!1),r.cs.compress=Ru(t.algorithms.compress,Gw,P2),r.cs.compress!==Gw&&(i=!1),i||(r.sc=r.cs)),typeof t.username=="string")this.config.username=t.username;else if(typeof t.user=="string")this.config.username=t.user;else throw new Error("Invalid username");this.config.password=typeof t.password=="string"?t.password:void 0,this.config.privateKey=typeof t.privateKey=="string"||Buffer.isBuffer(t.privateKey)?t.privateKey:void 0,this.config.localHostname=typeof t.localHostname=="string"?t.localHostname:void 0,this.config.localUsername=typeof t.localUsername=="string"?t.localUsername:void 0,this.config.tryKeyboard=t.tryKeyboard===!0,typeof t.agent=="string"&&t.agent.length?this.config.agent=nP(t.agent):iP(t.agent)?this.config.agent=t.agent:this.config.agent=void 0,this.config.allowAgentFwd=t.agentForward===!0&&this.config.agent!==void 0;let n=this.config.authHandler=typeof t.authHandler=="function"||Array.isArray(t.authHandler)?t.authHandler:void 0;this.config.strictVendor=typeof t.strictVendor=="boolean"?t.strictVendor:!0;let o=this.config.debug=typeof t.debug=="function"?t.debug:void 0;if(t.agentForward===!0&&!this.config.allowAgentFwd)throw new Error("You must set a valid agent path to allow agent forwarding");let s=this._callbacks=[];this._chanMgr=new z2(this),this._forwarding={},this._forwardingUnix={},this._acceptX11=0,this._agentFwdEnabled=!1,this._agent=this.config.agent?this.config.agent:void 0,this._remoteVer=void 0;let c;if(this.config.privateKey){if(c=Sp(this.config.privateKey,t.passphrase),c instanceof Error)throw new Error(`Cannot parse privateKey: ${c.message}`);if(Array.isArray(c)&&(c=c[0]),c.getPrivatePEM()===null)throw new Error("privateKey value does not contain a (valid) private key")}let u;if(typeof t.hostVerifier=="function"){let O=t.hostVerifier,q;I2.indexOf(t.hostHash)!==-1&&(q=t.hostHash),u=a((V,re)=>{q&&(V=_2(q).update(V).digest("hex"));let _e=O(V,re);_e!==void 0&&re(_e)},"hostVerifier")}let l=this._sock=t.sock||new A2,f=!1,p=!1;this._protocol&&this._protocol.cleanup();let g=o?(O,q,V)=>{o(`Debug output from server: ${JSON.stringify(V)}`)}:void 0,h,_=this._protocol=new O2({ident:this.config.ident,offer:i?void 0:r,onWrite:a(O=>{dr(l)&&l.write(O)},"onWrite"),onError:a(O=>{O.level==="handshake"&&clearTimeout(this._readyTimeout),_._destruct||l.removeAllListeners("data"),this.emit("error",O);try{l.end()}catch{}},"onError"),onHeader:a(O=>{p=!0,this._remoteVer=O.versions.software,O.greeting&&this.emit("greeting",O.greeting)},"onHeader"),onHandshakeComplete:a(O=>{this.emit("handshake",O),f||(f=!0,_.service("ssh-userauth"))},"onHandshakeComplete"),debug:o,hostVerifier:u,messageHandlers:{DEBUG:g,DISCONNECT:a((O,q,V)=>{if(q!==eP.BY_APPLICATION){V||(V=S2[q],V===void 0&&(V=`Unexpected disconnection reason: ${q}`));let re=new Error(V);re.code=q,this.emit("error",re)}l.end()},"DISCONNECT"),SERVICE_ACCEPT:a((O,q)=>{q==="ssh-userauth"&&z()},"SERVICE_ACCEPT"),EXT_INFO:a((O,q)=>{if(h===void 0){for(let V of q)if(V.name==="server-sig-algs"){h=V.algs;return}h=null}},"EXT_INFO"),USERAUTH_BANNER:a((O,q)=>{this.emit("banner",q)},"USERAUTH_BANNER"),USERAUTH_SUCCESS:a(O=>{R(),clearTimeout(this._readyTimeout),this.emit("ready")},"USERAUTH_SUCCESS"),USERAUTH_FAILURE:a((O,q,V)=>{if(P.keyAlgos){let re=P.keyAlgos[0][0];if(o&&o(`Client: ${P.type} (${re}) auth failed`),P.keyAlgos.shift(),P.keyAlgos.length){let[_e,ve]=P.keyAlgos[0];switch(P.type){case"agent":_.authPK(P.username,P.agentCtx.currentKey(),_e);return;case"publickey":_.authPK(P.username,P.key,_e);return;case"hostbased":_.authHostbased(P.username,P.key,P.localHostname,P.localUsername,_e,(xe,Tt)=>{let Mt=P.key.sign(xe,ve);if(Mt instanceof Error)return Mt.message=`Error while signing with key: ${Mt.message}`,Mt.level="client-authentication",this.emit("error",Mt),z();Tt(Mt)});return}}else P.keyAlgos=void 0}if(P.type==="agent"){let re=P.agentCtx.pos();return o&&o(`Client: Agent key #${re+1} failed`),X()}o&&o(`Client: ${P.type} auth failed`),C=V,H=q,z()},"USERAUTH_FAILURE"),USERAUTH_PASSWD_CHANGEREQ:a((O,q)=>{P.type==="password"&&this.emit("change password",q,V=>{_.authPassword(this.config.username,this.config.password,V)})},"USERAUTH_PASSWD_CHANGEREQ"),USERAUTH_PK_OK:a(O=>{let q,V;if(P.keyAlgos&&([q,V]=P.keyAlgos[0]),P.type==="agent"){let re=P.agentCtx.currentKey();_.authPK(P.username,re,q,(_e,ve)=>{let xe={hash:V};P.agentCtx.sign(re,_e,xe,(Tt,Mt)=>{if(Tt)Tt.level="agent",this.emit("error",Tt);else return ve(Mt);X()})})}else P.type==="publickey"&&_.authPK(P.username,P.key,q,(re,_e)=>{let ve=P.key.sign(re,V);if(ve instanceof Error)return ve.message=`Error signing data with key: ${ve.message}`,ve.level="client-authentication",this.emit("error",ve),z();_e(ve)})},"USERAUTH_PK_OK"),USERAUTH_INFO_REQUEST:a((O,q,V,re)=>{if(P.type==="keyboard-interactive"){if((Array.isArray(re)?re.length:0)===0){o&&o("Client: Sending automatic USERAUTH_INFO_RESPONSE"),_.authInfoRes();return}P.prompt(q,V,"",re,ve=>{_.authInfoRes(ve)})}},"USERAUTH_INFO_REQUEST"),REQUEST_SUCCESS:a((O,q)=>{s.length&&s.shift()(!1,q)},"REQUEST_SUCCESS"),REQUEST_FAILURE:a(O=>{s.length&&s.shift()(!0)},"REQUEST_FAILURE"),GLOBAL_REQUEST:a((O,q,V,re)=>{q==="hostkeys-00@openssh.com"?(W2(this,re,(_e,ve)=>{_e||this.emit("hostkeys",ve)}),V&&_.requestSuccess()):V&&_.requestFailure()},"GLOBAL_REQUEST"),CHANNEL_OPEN:a((O,q)=>{H2(this,q)},"CHANNEL_OPEN"),CHANNEL_OPEN_CONFIRMATION:a((O,q)=>{let V=this._chanMgr.get(q.recipient);if(typeof V!="function")return;let re=V.type==="sftp",ve={type:re?"session":V.type,incoming:{id:q.recipient,window:wp,packetSize:Pp,state:"open"},outgoing:{id:q.sender,window:q.window,packetSize:q.packetSize,state:"open"}},xe=re?new N2(this,ve,{debug:o}):new gP(this,ve);this._chanMgr.update(q.recipient,xe),V(void 0,xe)},"CHANNEL_OPEN_CONFIRMATION"),CHANNEL_OPEN_FAILURE:a((O,q,V,re)=>{let _e=this._chanMgr.get(q);if(typeof _e!="function")return;L2(this,q,{reason:V,description:re},_e)},"CHANNEL_OPEN_FAILURE"),CHANNEL_DATA:a((O,q,V)=>{let re=this._chanMgr.get(q);if(!(typeof re!="object"||re===null)&&re.incoming.window!==0){if(re.incoming.window-=V.length,re.push(V)===!1){re._waitChanDrain=!0;return}re.incoming.window<=sP&&oP(re)}},"CHANNEL_DATA"),CHANNEL_EXTENDED_DATA:a((O,q,V,re)=>{if(re!==v2)return;let _e=this._chanMgr.get(q);if(!(typeof _e!="object"||_e===null)&&_e.incoming.window!==0){if(_e.incoming.window-=V.length,!_e.stderr.push(V)){_e._waitChanDrain=!0;return}_e.incoming.window<=sP&&oP(_e)}},"CHANNEL_EXTENDED_DATA"),CHANNEL_WINDOW_ADJUST:a((O,q,V)=>{let re=this._chanMgr.get(q);typeof re!="object"||re===null||(re.outgoing.window+=V,re._waitWindow&&(re._waitWindow=!1,re._chunk?re._write(re._chunk,null,re._chunkcb):re._chunkcb?re._chunkcb():re._chunkErr?re.stderr._write(re._chunkErr,null,re._chunkcbErr):re._chunkcbErr&&re._chunkcbErr()))},"CHANNEL_WINDOW_ADJUST"),CHANNEL_SUCCESS:a((O,q)=>{let V=this._chanMgr.get(q);typeof V!="object"||V===null||(this._resetKA(),V._callbacks.length&&V._callbacks.shift()(!1))},"CHANNEL_SUCCESS"),CHANNEL_FAILURE:a((O,q)=>{let V=this._chanMgr.get(q);typeof V!="object"||V===null||(this._resetKA(),V._callbacks.length&&V._callbacks.shift()(!0))},"CHANNEL_FAILURE"),CHANNEL_REQUEST:a((O,q,V,re,_e)=>{let ve=this._chanMgr.get(q);if(typeof ve!="object"||ve===null)return;let xe=ve._exit;if(xe.code===void 0){switch(V){case"exit-status":ve.emit("exit",xe.code=_e);return;case"exit-signal":ve.emit("exit",xe.code=null,xe.signal=`SIG${_e.signal}`,xe.dump=_e.coreDumped,xe.desc=_e.errorMessage);return}re&&O.channelFailure(ve.outgoing.id)}},"CHANNEL_REQUEST"),CHANNEL_EOF:a((O,q)=>{let V=this._chanMgr.get(q);typeof V!="object"||V===null||V.incoming.state==="open"&&(V.incoming.state="eof",V.readable&&V.push(null),V.stderr.readable&&V.stderr.push(null))},"CHANNEL_EOF"),CHANNEL_CLOSE:a((O,q)=>{U2(this,q,this._chanMgr.get(q))},"CHANNEL_CLOSE")}});l.pause();let y=this.config.keepaliveInterval,b=this.config.keepaliveCountMax,v=0,S,M=a(()=>{if(++v>b){if(clearInterval(S),l.readable){let O=new Error("Keepalive timeout");O.level="client-timeout",this.emit("error",O),l.destroy()}return}dr(l)?(s.push(R),_.ping()):clearInterval(S)},"sendKA");function R(){y>0&&(v=0,clearInterval(S),dr(l)&&(S=setInterval(M,y)))}a(R,"resetKA"),this._resetKA=R;let J=(()=>{let O=!1;return()=>{if(!O&&(O=!0,ee&&!p)){let q=$2("Connection lost before handshake","protocol",!0);this.emit("error",q)}}})(),te=(()=>{let O=!1;return()=>{O||(O=!0,ee=!0,o&&o("Socket connected"),this.emit("connect"),R2.then(()=>{_.start(),l.on("data",q=>{try{_.parse(q,0,q.length)}catch(V){this.emit("error",V);try{dr(l)&&l.end()}catch{}}}),l.stderr&&typeof l.stderr.resume=="function"&&l.stderr.resume(),l.resume()}).catch(q=>{this.emit("error",q);try{dr(l)&&l.end()}catch{}}))}})(),ee=!1;l.on("connect",te).on("timeout",()=>{this.emit("timeout")}).on("error",O=>{o&&o(`Socket error: ${O.message}`),clearTimeout(this._readyTimeout),O.level="client-socket",this.emit("error",O)}).on("end",()=>{o&&o("Socket ended"),J(),_.cleanup(),clearTimeout(this._readyTimeout),clearInterval(S),this.emit("end")}).on("close",()=>{o&&o("Socket closed"),J(),_.cleanup(),clearTimeout(this._readyTimeout),clearInterval(S),this.emit("close");let O=s;s=this._callbacks=[];let q=new Error("No response from server");for(let V=0;V<O.length;++V)O[V](q);this._chanMgr.cleanup(q)});let P,C=null,H=null,U=["none"];this.config.password!==void 0&&U.push("password"),c!==void 0&&U.push("publickey"),this._agent!==void 0&&U.push("agent"),this.config.tryKeyboard&&U.push("keyboard-interactive"),c!==void 0&&this.config.localHostname!==void 0&&this.config.localUsername!==void 0&&U.push("hostbased"),Array.isArray(n)?n=dP(n):typeof n!="function"&&(n=dP(U));let k=!1,j=a(O=>{if(!k){if(k=!0,O===!1){let q=new Error("All configured authentication methods failed");q.level="client-authentication",this.emit("error",q),this.end();return}if(typeof O=="string"){let q=O;if(U.indexOf(q)===-1)return W(`Authentication method not allowed: ${q}`);let V=this.config.username;switch(q){case"password":O={type:q,username:V,password:this.config.password};break;case"publickey":O={type:q,username:V,key:c};break;case"hostbased":O={type:q,username:V,key:c,localHostname:this.config.localHostname,localUsername:this.config.localUsername};break;case"agent":O={type:q,username:V,agentCtx:new rP(this._agent)};break;case"keyboard-interactive":O={type:q,username:V,prompt:a((...re)=>this.emit("keyboard-interactive",...re),"prompt")};break;case"none":O={type:q,username:V};break;default:return W(`Skipping unsupported authentication method: ${O}`)}}else{if(typeof O!="object"||O===null)return W(`Skipping invalid authentication attempt: ${O}`);{let q=O.username;if(typeof q!="string")return W(`Skipping invalid authentication attempt: ${O}`);let V=O.type;switch(V){case"password":{let{password:re}=O;if(typeof re!="string"&&!Buffer.isBuffer(re))return W("Skipping invalid password auth attempt");O={type:V,username:q,password:re};break}case"publickey":{let re=Sp(O.key,O.passphrase);if(re instanceof Error)return W("Skipping invalid key auth attempt");if(!re.isPrivateKey())return W("Skipping non-private key");O={type:V,username:q,key:re};break}case"hostbased":{let{localHostname:re,localUsername:_e}=O,ve=Sp(O.key,O.passphrase);if(ve instanceof Error||typeof re!="string"||typeof _e!="string")return W("Skipping invalid hostbased auth attempt");if(!ve.isPrivateKey())return W("Skipping non-private key");O={type:V,username:q,key:ve,localHostname:re,localUsername:_e};break}case"agent":{let re=O.agent;if(typeof re=="string"&&re.length)re=nP(re);else if(!iP(re))return W(`Skipping invalid agent: ${O.agent}`);O={type:V,username:q,agentCtx:new rP(re)};break}case"keyboard-interactive":{let{prompt:re}=O;if(typeof re!="function")return W("Skipping invalid keyboard-interactive auth attempt");O={type:V,username:q,prompt:re};break}case"none":O={type:V,username:q};break;default:return W(`Skipping unsupported authentication method: ${O}`)}}}P=O;try{let q=P.username;switch(P.type){case"password":_.authPassword(q,P.password);break;case"publickey":{let V;if(P.keyAlgos=vA(this,P.key,h),P.keyAlgos)if(P.keyAlgos.length)V=P.keyAlgos[0][0];else return W("Skipping key authentication (no mutual hash algorithm)");_.authPK(q,P.key,V);break}case"hostbased":{let V,re;if(P.keyAlgos=vA(this,P.key,h),P.keyAlgos)if(P.keyAlgos.length)[V,re]=P.keyAlgos[0];else return W("Skipping hostbased authentication (no mutual hash algorithm)");_.authHostbased(q,P.key,P.localHostname,P.localUsername,V,(_e,ve)=>{let xe=P.key.sign(_e,re);if(xe instanceof Error)return xe.message=`Error while signing with key: ${xe.message}`,xe.level="client-authentication",this.emit("error",xe),z();ve(xe)});break}case"agent":P.agentCtx.init(V=>{if(V)return V.level="agent",this.emit("error",V),z();X()});break;case"keyboard-interactive":_.authKeyboard(q);break;case"none":_.authNone(q);break}}finally{k=!1}}},"doNextAuth");function W(O){o&&o(O),process.nextTick(z)}a(W,"skipAuth");function z(){k=!1;let O=n(H,C,j);k||O===void 0||j(O)}a(z,"tryNextAuth");let X=a(()=>{if(P.type==="agent"){let O=P.agentCtx.nextKey();if(O===!1)o&&o("Agent: No more keys left to try"),o&&o("Client: agent auth failed"),z();else{let q=P.agentCtx.pos(),V;if(P.keyAlgos=vA(this,O,h),P.keyAlgos)if(P.keyAlgos.length)V=P.keyAlgos[0][0];else{o&&o(`Agent: Skipping key #${q+1} (no mutual hash algorithm)`),X();return}o&&o(`Agent: Trying key #${q+1}`),_.authPK(P.username,O,V)}}},"tryNextAgentKey"),ne=a(()=>{this.config.readyTimeout>0&&(this._readyTimeout=setTimeout(()=>{let O=new Error("Timed out while waiting for handshake");O.level="client-timeout",this.emit("error",O),l.destroy()},this.config.readyTimeout))},"startTimeout");if(t.sock)ne(),typeof l.connecting=="boolean"&&l.connecting||te();else{let O=this.config.host,q=this.config.forceIPv4,V=this.config.forceIPv6;o&&o(`Client: Trying ${O} on port ${this.config.port} ...`);let re=a(()=>{ne(),l.connect({host:O,port:this.config.port,localAddress:this.config.localAddress,localPort:this.config.localPort}),l.setMaxListeners(0),l.setTimeout(typeof t.timeout=="number"?t.timeout:0)},"doConnect");!q&&!V||q&&V?re():b2(O,q?4:6,(_e,ve,xe)=>{if(_e){let Tt=q?"IPv4":"IPv6",Mt=new Error(`Error while looking up ${Tt} address for '${O}': ${_e}`);clearTimeout(this._readyTimeout),Mt.level="client-dns",this.emit("error",Mt),this.emit("close");return}O=ve,re()})}return this}end(){return this._sock&&dr(this._sock)&&(this._protocol.disconnect(eP.BY_APPLICATION),this._sock.end()),this}destroy(){return this._sock&&dr(this._sock)&&this._sock.destroy(),this}exec(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");typeof r=="function"&&(i=r,r={});let n={allowHalfOpen:r.allowHalfOpen!==!1};return Fs(this,"session",n,(o,s)=>{if(o){i(o);return}let c=[];function u(l){if(l){s.close(),i(l);return}c.length&&c.shift()()}a(u,"reqCb"),(this.config.allowAgentFwd===!0||r&&r.agentForward===!0&&this._agent!==void 0)&&c.push(()=>uP(s,u)),typeof r=="object"&&r!==null&&(typeof r.env=="object"&&r.env!==null&&lP(s,r.env),(typeof r.pty=="object"&&r.pty!==null||r.pty===!0)&&c.push(()=>cP(s,r.pty,u)),(typeof r.x11=="object"&&r.x11!==null||r.x11==="number"||r.x11===!0)&&c.push(()=>aP(s,r.x11,u))),c.push(()=>F2(s,t,r,i)),c.shift()()}),this}shell(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),t&&(t.x11!==void 0||t.env!==void 0)&&(r=t,t=void 0),Fs(this,"session",(n,o)=>{if(n){i(n);return}let s=[];function c(u){if(u){o.close(),i(u);return}s.length&&s.shift()()}a(c,"reqCb"),(this.config.allowAgentFwd===!0||r&&r.agentForward===!0&&this._agent!==void 0)&&s.push(()=>uP(o,c)),t!==!1&&s.push(()=>cP(o,t,c)),typeof r=="object"&&r!==null&&(typeof r.env=="object"&&r.env!==null&&lP(o,r.env),(typeof r.x11=="object"&&r.x11!==null||r.x11==="number"||r.x11===!0)&&s.push(()=>aP(o,r.x11,c))),s.push(()=>M2(o,i)),s.shift()()}),this}subsys(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return Fs(this,"session",(i,n)=>{if(i){r(i);return}fP(n,t,(o,s)=>{if(o){r(o);return}r(void 0,s)})}),this}forwardIn(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let n=typeof i=="function";return n&&this._callbacks.push((o,s)=>{if(o){i(o!==!0?o:new Error(`Unable to bind to ${t}:${r}`));return}let c=r;r===0&&s&&s.length>=4&&(c=D2(s,0),this._protocol._compatFlags&pP.DYN_RPORT_BUG||(r=c)),this._forwarding[`${t}:${r}`]=c,i(void 0,c)}),this._protocol.tcpipForward(t,r,n),this}unforwardIn(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let n=typeof i=="function";return n&&this._callbacks.push(o=>{if(o){i(o!==!0?o:new Error(`Unable to unbind from ${t}:${r}`));return}delete this._forwarding[`${t}:${r}`],i()}),this._protocol.cancelTcpipForward(t,r,n),this}forwardOut(t,r,i,n,o){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let s={srcIP:t,srcPort:r,dstIP:i,dstPort:n};return typeof o!="function"&&(o=SA),Fs(this,"direct-tcpip",s,o),this}openssh_noMoreSessions(t){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let r=typeof t=="function";return!this.config.strictVendor||this.config.strictVendor&&Ou.test(this._remoteVer)?(r&&this._callbacks.push(i=>{if(i){t(i!==!0?i:new Error("Unable to disable future sessions"));return}t()}),this._protocol.openssh_noMoreSessions(r),this):r?(process.nextTick(t,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this):this}openssh_forwardInStreamLocal(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let i=typeof r=="function";return!this.config.strictVendor||this.config.strictVendor&&Ou.test(this._remoteVer)?(i&&this._callbacks.push(n=>{if(n){r(n!==!0?n:new Error(`Unable to bind to ${t}`));return}this._forwardingUnix[t]=!0,r()}),this._protocol.openssh_streamLocalForward(t,i),this):i?(process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this):this}openssh_unforwardInStreamLocal(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let i=typeof r=="function";return!this.config.strictVendor||this.config.strictVendor&&Ou.test(this._remoteVer)?(i&&this._callbacks.push(n=>{if(n){r(n!==!0?n:new Error(`Unable to unbind from ${t}`));return}delete this._forwardingUnix[t],r()}),this._protocol.openssh_cancelStreamLocalForward(t,i),this):i?(process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this):this}openssh_forwardOutStreamLocal(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return typeof r!="function"&&(r=SA),!this.config.strictVendor||this.config.strictVendor&&Ou.test(this._remoteVer)?(Fs(this,"direct-streamlocal@openssh.com",{socketPath:t},r),this):(process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this)}sftp(t){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return Fs(this,"sftp",(r,i)=>{if(r){t(r);return}fP(i,"sftp",(n,o)=>{if(n){t(n);return}function s(){i.removeListener("ready",c),i.removeListener("error",u),i.removeListener("exit",l),i.removeListener("close",l)}a(s,"removeListeners");function c(){s(),t(void 0,i)}a(c,"onReady");function u(f){s(),t(f)}a(u,"onError");function l(f,p){s();let g;typeof f=="number"?g=`Received exit code ${f} while establishing SFTP session`:p!==void 0?g=`Received signal ${p} while establishing SFTP session`:g="Received unexpected SFTP session termination";let h=new Error(g);h.code=f,h.signal=p,t(h)}a(l,"onExit"),i.on("ready",c).on("error",u).on("exit",l).on("close",l),i._init()})}),this}setNoDelay(t){return this._sock&&typeof this._sock.setNoDelay=="function"&&this._sock.setNoDelay(t),this}};function Fs(e,t,r,i){let n=wp,o=Pp;typeof r=="function"&&(i=r,r={});let s=a((u,l)=>{i(u,l)},"wrapper");s.type=t;let c=e._chanMgr.add(s);if(c===-1){i(new Error("No free channels available"));return}switch(t){case"session":case"sftp":e._protocol.session(c,n,o);break;case"direct-tcpip":e._protocol.directTcpip(c,n,o,r);break;case"direct-streamlocal@openssh.com":e._protocol.openssh_directStreamLocal(c,n,o,r);break;default:throw new Error(`Unsupported channel type: ${t}`)}}a(Fs,"openChannel");function aP(e,t,r){let i={single:!1,protocol:"MIT-MAGIC-COOKIE-1",cookie:void 0,screen:0};typeof t=="function"?r=t:typeof t=="object"&&t!==null&&(typeof t.single=="boolean"&&(i.single=t.single),typeof t.screen=="number"&&(i.screen=t.screen),typeof t.protocol=="string"&&(i.protocol=t.protocol),typeof t.cookie=="string"?i.cookie=t.cookie:Buffer.isBuffer(t.cookie)&&(i.cookie=t.cookie.hexSlice(0,t.cookie.length))),i.cookie===void 0&&(i.cookie=j2());let n=typeof r=="function";if(e.outgoing.state!=="open"){n&&r(new Error("Channel is not open"));return}n&&e._callbacks.push(o=>{if(o){r(o!==!0?o:new Error("Unable to request X11"));return}e._hasX11=!0,++e._client._acceptX11,e.once("close",()=>{e._client._acceptX11&&--e._client._acceptX11}),r()}),e._client._protocol.x11Forward(e.outgoing.id,i,n)}a(aP,"reqX11");function cP(e,t,r){let i=24,n=80,o=640,s=480,c="vt100",u=null;typeof t=="function"?r=t:typeof t=="object"&&t!==null&&(typeof t.rows=="number"&&(i=t.rows),typeof t.cols=="number"&&(n=t.cols),typeof t.width=="number"&&(o=t.width),typeof t.height=="number"&&(s=t.height),typeof t.term=="string"&&(c=t.term),typeof t.modes=="object"&&(u=t.modes));let l=typeof r=="function";if(e.outgoing.state!=="open"){l&&r(new Error("Channel is not open"));return}l&&e._callbacks.push(f=>{if(f){r(f!==!0?f:new Error("Unable to request a pseudo-terminal"));return}r()}),e._client._protocol.pty(e.outgoing.id,i,n,s,o,c,u,l)}a(cP,"reqPty");function uP(e,t){let r=typeof t=="function";if(e.outgoing.state!=="open"){r&&t(new Error("Channel is not open"));return}if(e._client._agentFwdEnabled){r&&t(!1);return}e._client._agentFwdEnabled=!0,e._callbacks.push(i=>{if(i){e._client._agentFwdEnabled=!1,r&&t(i!==!0?i:new Error("Unable to request agent forwarding"));return}r&&t()}),e._client._protocol.openssh_agentForward(e.outgoing.id,!0)}a(uP,"reqAgentFwd");function M2(e,t){if(e.outgoing.state!=="open"){t(new Error("Channel is not open"));return}e._callbacks.push(r=>{if(r){t(r!==!0?r:new Error("Unable to open shell"));return}e.subtype="shell",t(void 0,e)}),e._client._protocol.shell(e.outgoing.id,!0)}a(M2,"reqShell");function F2(e,t,r,i){if(e.outgoing.state!=="open"){i(new Error("Channel is not open"));return}e._callbacks.push(n=>{if(n){i(n!==!0?n:new Error("Unable to exec"));return}e.subtype="exec",e.allowHalfOpen=r.allowHalfOpen!==!1,i(void 0,e)}),e._client._protocol.exec(e.outgoing.id,t,!0)}a(F2,"reqExec");function lP(e,t){if(e.outgoing.state!=="open")return;let r=Object.keys(t||{});for(let i=0;i<r.length;++i){let n=r[i],o=t[n];e._client._protocol.env(e.outgoing.id,n,o,!1)}}a(lP,"reqEnv");function fP(e,t,r){if(e.outgoing.state!=="open"){r(new Error("Channel is not open"));return}e._callbacks.push(i=>{if(i){r(i!==!0?i:new Error(`Unable to start subsystem: ${t}`));return}e.subtype="subsystem",r(void 0,e)}),e._client._protocol.subsystem(e.outgoing.id,t,!0)}a(fP,"reqSubsystem");function H2(e,t){let r=-1,i,n=a(()=>{let u={type:t.type,incoming:{id:r,window:wp,packetSize:Pp,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}},l=new gP(e,u);return e._chanMgr.update(r,l),e._protocol.channelOpenConfirm(t.sender,r,wp,Pp),l},"accept"),o=a(()=>{i===void 0&&(r===-1?i=Cu.RESOURCE_SHORTAGE:i=Cu.CONNECT_FAILED),r!==-1&&e._chanMgr.remove(r),e._protocol.channelOpenFail(t.sender,i,"")},"reject"),s=a(()=>(r=e._chanMgr.add(),r===-1&&(i=Cu.RESOURCE_SHORTAGE,e.config.debug&&e.config.debug("Client: Automatic rejection of incoming channel open: no channels available")),r!==-1),"reserveChannel"),c=t.data;switch(t.type){case"forwarded-tcpip":{let u=e._forwarding[`${c.destIP}:${c.destPort}`];if(u!==void 0&&s()){c.destPort===0&&(c.destPort=u),e.emit("tcp connection",c,n,o);return}break}case"forwarded-streamlocal@openssh.com":if(e._forwardingUnix[c.socketPath]!==void 0&&s()){e.emit("unix connection",c,n,o);return}break;case"auth-agent@openssh.com":if(e._agentFwdEnabled&&typeof e._agent.getStream=="function"&&s()){e._agent.getStream((u,l)=>{if(u)return o();let f=n();f.pipe(l).pipe(f)});return}break;case"x11":if(e._acceptX11!==0&&s()){e.emit("x11",c,n,o);return}break;default:i=Cu.UNKNOWN_CHANNEL_TYPE,e.config.debug&&e.config.debug(`Client: Automatic rejection of unsupported incoming channel open type: ${t.type}`)}i===void 0&&(i=Cu.ADMINISTRATIVELY_PROHIBITED,e.config.debug&&e.config.debug("Client: Automatic rejection of unexpected incoming channel open for: "+t.type)),o()}a(H2,"onCHANNEL_OPEN");var j2=(()=>{let e=Buffer.allocUnsafe(16);return()=>(E2(e,0,16),e.hexSlice(0,16))})();function dP(e){if(!Array.isArray(e))throw new Error("authList must be an array");let t=0;return(r,i,n)=>t===e.length?!1:e[t++]}a(dP,"makeSimpleAuthHandler");function W2(e,t,r){if(!e._sock||!dr(e._sock))return;if(typeof r!="function"&&(r=SA),!Array.isArray(t))throw new TypeError("Invalid keys argument type");let i=[];for(let n of t){let o=Sp(n);if(o instanceof Error)throw o;i.push(o)}if(!e.config.strictVendor||e.config.strictVendor&&Ou.test(e._remoteVer)){e._callbacks.push((n,o)=>{if(n){r(n!==!0?n:new Error("Server failed to prove supplied keys"));return}let s=[],c=0;for(Ip.init(o,0);Ip.avail()&&c!==i.length;){let u=i[c++],l=u.getPublicSSH(),f=Ip.readString();vp.init(f,0);let p=vp.readString(!0),g=vp.readString(),h;if(p!==u.type)if(u.type==="ssh-rsa")switch(p){case"rsa-sha2-256":h="sha256";break;case"rsa-sha2-512":h="sha512";break;default:continue}else continue;let _=e._protocol._kex.sessionID,y=Buffer.allocUnsafe(37+_.length+4+l.length),b=0;IA(y,29,b),y.utf8Write("hostkeys-prove-00@openssh.com",b+=4,29),IA(y,_.length,b+=29),tP(_,y,0,_.length,b+=4),IA(y,l.length,b+=_.length),tP(l,y,0,l.length,b+=4),(g=B2(g,p))&&u.verify(y,g,h)===!0&&s.push(u)}vp.clear(),Ip.clear(),r(null,s)}),e._protocol.openssh_hostKeysProve(i);return}process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version"))}a(W2,"hostKeysProve");function vA(e,t,r){switch(t.type){case"ssh-rsa":if(e._protocol._compatFlags&pP.IMPLY_RSA_SHA2_SIGALGS&&(Array.isArray(r)?r=["rsa-sha2-256","rsa-sha2-512",...r]:r=["rsa-sha2-256","rsa-sha2-512"]),Array.isArray(r)){if(r.indexOf("rsa-sha2-256")!==-1)return[["rsa-sha2-256","sha256"]];if(r.indexOf("rsa-sha2-512")!==-1)return[["rsa-sha2-512","sha512"]];if(r.indexOf("ssh-rsa")===-1)return[]}return[["ssh-rsa","sha1"]]}}a(vA,"getKeyAlgos");mP.exports=wA});var yP=me(_P=>{"use strict";var{Agent:kA}=require("http"),{Agent:q2}=require("https"),{connect:V2}=require("tls"),TA;for(let e of[kA,q2]){class t extends e{static{a(this,"SSHAgent")}constructor(i,n){super(n),this._connectCfg=i,this._defaultSrcIP=n&&n.srcIP||"localhost"}createConnection(i,n){let o=i&&i.localAddress||this._defaultSrcIP,s=i&&i.localPort||0,c=i.host,u=i.port;TA===void 0&&(TA=PA());let l=new TA,f=!1;l.on("ready",()=>{l.forwardOut(o,s,c,u,(p,g)=>{if(f=!0,p)return l.end(),n(p);g.once("close",()=>l.end()),n(null,Z2(g,e,i))})}).on("error",n).on("close",()=>{f||n(new Error("Unexpected connection close"))}).connect(this._connectCfg)}}_P[e===kA?"SSHTTPAgent":"SSHTTPSAgent"]=t}function Nu(){}a(Nu,"noop");function Z2(e,t,r){if(t===kA)return e.setKeepAlive=Nu,e.setNoDelay=Nu,e.setTimeout=Nu,e.ref=Nu,e.unref=Nu,e.destroySoon=e.destroy,e;r.socket=e;let i=V2(r),n=(()=>{let o=!1;return()=>{o||(o=!0,e.isPaused()&&e.resume())}})();return i.on("end",n).on("close",n),i}a(Z2,"decorateStream")});var AP=me((d7,NA)=>{"use strict";var{Server:Q2}=require("net"),Du=require("events"),{listenerCount:Nr}=Du,{CHANNEL_OPEN_FAILURE:Hs,DEFAULT_CIPHER:K2,DEFAULT_COMPRESSION:G2,DEFAULT_KEX:Y2,DEFAULT_MAC:X2,DEFAULT_SERVER_HOST_KEY:J2,DISCONNECT_REASON:js,DISCONNECT_REASON_BY_VALUE:eB,SUPPORTED_CIPHER:tB,SUPPORTED_COMPRESSION:rB,SUPPORTED_KEX:nB,SUPPORTED_MAC:iB,SUPPORTED_SERVER_HOST_KEY:oB}=Jn(),{init:sB}=Pi(),{KexInit:aB}=lp(),{parseKey:EP}=Ci(),cB=nA(),{SFTP:uB}=Pu(),{writeUInt32BE:lB}=In(),{Channel:Ws,MAX_WINDOW:Ni,PACKET_SIZE:$i,windowAdjust:fB,WINDOW_THRESHOLD:dB}=EA(),{ChannelManager:pB,generateAlgorithmList:$u,isWritable:Tp,onChannelOpenFailure:hB,onCHANNEL_CLOSE:gB}=xA(),mB=10,Di=class extends Du{static{a(this,"AuthContext")}constructor(t,r,i,n,o){super(),this.username=this.user=r,this.service=i,this.method=n,this._initialResponse=!1,this._finalResponse=!1,this._multistep=!1,this._cbfinal=(s,c,u)=>{this._finalResponse||(this._finalResponse=!0,o(this,s,c,u))},this._protocol=t}accept(){this._cleanup&&this._cleanup(),this._initialResponse=!0,this._cbfinal(!0)}reject(t,r){this._cleanup&&this._cleanup(),this._initialResponse=!0,this._cbfinal(!1,t,r)}},kp=class extends Di{static{a(this,"KeyboardAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this._multistep=!0,this._cb=void 0,this._onInfoResponse=c=>{let u=this._cb;u&&(this._cb=void 0,u(c))},this.submethods=o,this.on("abort",()=>{this._cb&&this._cb(new Error("Authentication request aborted"))})}prompt(t,r,i,n){Array.isArray(t)||(t=[t]),typeof r=="function"?(n=r,r=i=void 0):typeof i=="function"?(n=i,i=void 0):typeof n!="function"&&(n=void 0);for(let o=0;o<t.length;++o)typeof t[o]=="string"&&(t[o]={prompt:t[o],echo:!0});this._cb=n,this._initialResponse=!0,this._protocol.authInfoReq(r,i,t)}},RA=class extends Di{static{a(this,"PKAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this.key={algo:o.keyAlgo,data:o.key},this.hashAlgo=o.hashAlgo,this.signature=o.signature,this.blob=o.blob}accept(){this.signature?Di.prototype.accept.call(this):(this._initialResponse=!0,this._protocol.authPKOK(this.key.algo,this.key.data))}},OA=class extends Di{static{a(this,"HostbasedAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this.key={algo:o.keyAlgo,data:o.key},this.hashAlgo=o.hashAlgo,this.signature=o.signature,this.blob=o.blob,this.localHostname=o.localHostname,this.localUsername=o.localUsername}},Cp=class extends Di{static{a(this,"PwdAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this.password=o,this._changeCb=void 0}requestChange(t,r){if(this._changeCb)throw new Error("Change request already in progress");if(typeof t!="string")throw new Error("prompt argument must be a string");if(typeof r!="function")throw new Error("Callback argument must be a function");this._changeCb=r,this._protocol.authPasswdChg(t)}},Bn=class extends Du{static{a(this,"Session")}constructor(t,r,i){super(),this.type="session",this.subtype=void 0,this.server=!0,this._ending=!1,this._channel=void 0,this._chanInfo={type:"session",incoming:{id:i,window:Ni,packetSize:$i,state:"open"},outgoing:{id:r.sender,window:r.window,packetSize:r.packetSize,state:"open"}}}},on=class extends Du{static{a(this,"Server")}constructor(t,r){if(super(),typeof t!="object"||t===null)throw new Error("Missing configuration object");let i=Object.create(null),n=[],o=t.hostKeys;if(!Array.isArray(o))throw new Error("hostKeys must be an array");let s=typeof t.algorithms=="object"&&t.algorithms!==null?t.algorithms:{},c=$u(s.serverHostKey,J2,oB);for(let g=0;g<o.length;++g){let h;if(Buffer.isBuffer(o[g])||typeof o[g]=="string"?h=EP(o[g]):h=EP(o[g].key,o[g].passphrase),h instanceof Error)throw new Error(`Cannot parse privateKey: ${h.message}`);if(Array.isArray(h)&&(h=h[0]),h.getPrivatePEM()===null)throw new Error("privateKey value contains an invalid private key");if(!n.includes(h.type))if(h.type==="ssh-rsa"){let _=c.indexOf("ssh-rsa"),y=c.indexOf("rsa-sha2-256"),b=c.indexOf("rsa-sha2-512");_===-1&&(_=1/0),[_,y,b].sort(_B).forEach(v=>{if(v===-1)return;let S;switch(v){case _:S="ssh-rsa";break;case y:S="rsa-sha2-256";break;case b:S="rsa-sha2-512";break;default:return}i[S]=h,n.push(S)})}else i[h.type]=h,n.push(h.type)}let u={kex:$u(s.kex,Y2,nB).concat(["kex-strict-s-v00@openssh.com"]),serverHostKey:n,cs:{cipher:$u(s.cipher,K2,tB),mac:$u(s.hmac,X2,iB),compress:$u(s.compress,G2,rB),lang:[]},sc:void 0};u.sc=u.cs,typeof r=="function"&&this.on("connection",r);let l=typeof t.debug=="function"?t.debug:void 0,f=t.ident?Buffer.from(t.ident):void 0,p=new aB(u);this._srv=new Q2(g=>{if(this._connections>=this.maxConnections){g.destroy();return}++this._connections,g.once("close",()=>{--this._connections});let h;if(l){let _=`[${process.hrtime().join(".")}] `;h=a(y=>{l(`${_}${y}`)},"debug")}new Rp(g,i,f,p,h,this,t)}).on("error",g=>{this.emit("error",g)}).on("listening",()=>{this.emit("listening")}).on("close",()=>{this.emit("close")}),this._connections=0,this.maxConnections=1/0}injectSocket(t){this._srv.emit("connection",t)}listen(...t){return this._srv.listen(...t),this}address(){return this._srv.address()}getConnections(t){return this._srv.getConnections(t),this}close(t){return this._srv.close(t),this}ref(){return this._srv.ref(),this}unref(){return this._srv.unref(),this}};on.KEEPALIVE_CLIENT_INTERVAL=15e3;on.KEEPALIVE_CLIENT_COUNT_MAX=3;var Rp=class extends Du{static{a(this,"Client")}constructor(t,r,i,n,o,s,c){super();let u=0,l=!1,f=[],p,g,h,_=[];this._sock=t,this._chanMgr=new pB(this),this._debug=o,this.noMoreSessions=!1,this.authenticated=!1;function y(ee){}a(y,"onClientPreHeaderError"),this.on("error",y);let b=o?(ee,P,C)=>{o(`Debug output from client: ${JSON.stringify(C)}`)}:void 0,v=typeof c.keepaliveInterval=="number"&&isFinite(c.keepaliveInterval)&&c.keepaliveInterval>0?c.keepaliveInterval:typeof on.KEEPALIVE_CLIENT_INTERVAL=="number"&&isFinite(on.KEEPALIVE_CLIENT_INTERVAL)&&on.KEEPALIVE_CLIENT_INTERVAL>0?on.KEEPALIVE_CLIENT_INTERVAL:-1,S=typeof c.keepaliveCountMax=="number"&&isFinite(c.keepaliveCountMax)&&c.keepaliveCountMax>=0?c.keepaliveCountMax:typeof on.KEEPALIVE_CLIENT_COUNT_MAX=="number"&&isFinite(on.KEEPALIVE_CLIENT_COUNT_MAX)&&on.KEEPALIVE_CLIENT_COUNT_MAX>=0?on.KEEPALIVE_CLIENT_COUNT_MAX:-1,M=0;v!==-1&&S!==-1&&(this.once("ready",()=>{let ee=a(()=>{clearInterval(g)},"onClose");this.on("close",ee).on("end",ee),g=setInterval(()=>{if(++M>S){clearInterval(g);let P=new Error("Keepalive timeout");P.level="client-timeout",this.emit("error",P),this.end()}else R.ping()},v)}),h=a(()=>{g&&g.refresh(),M=0},"onPacket"));let R=this._protocol=new cB({server:!0,hostKeys:r,ident:i,offer:n,onPacket:h,greeting:c.greeting,banner:c.banner,onWrite:a(ee=>{Tp(t)&&t.write(ee)},"onWrite"),onError:a(ee=>{R._destruct||t.removeAllListeners("data"),this.emit("error",ee);try{t.end()}catch{}},"onError"),onHeader:a(ee=>{this.removeListener("error",y);let P={ip:t.remoteAddress,family:t.remoteFamily,port:t.remotePort,header:ee};if(!s.emit("connection",this,P)){R.disconnect(js.BY_APPLICATION),t.end();return}ee.greeting&&this.emit("greeting",ee.greeting)},"onHeader"),onHandshakeComplete:a(ee=>{++u>1&&this.emit("rekey"),this.emit("handshake",ee)},"onHandshakeComplete"),debug:o,messageHandlers:{DEBUG:b,DISCONNECT:a((ee,P,C)=>{if(P!==js.BY_APPLICATION){C||(C=eB[P],C===void 0&&(C=`Unexpected disconnection reason: ${P}`));let H=new Error(C);H.code=P,this.emit("error",H)}t.end()},"DISCONNECT"),CHANNEL_OPEN:a((ee,P)=>{if(P.type==="session"&&this.noMoreSessions||!this.authenticated){let X=Hs.ADMINISTRATIVELY_PROHIBITED;return R.channelOpenFail(P.sender,X)}let C=-1,H,U=!1,k,j=a(()=>{U||(U=!0,H===void 0&&(C===-1?H=Hs.RESOURCE_SHORTAGE:H=Hs.CONNECT_FAILED),C!==-1&&this._chanMgr.remove(C),R.channelOpenFail(P.sender,H,""))},"reject"),W=a(()=>(C=this._chanMgr.add(),C===-1&&(H=Hs.RESOURCE_SHORTAGE,o&&o("Automatic rejection of incoming channel open: no channels available")),C!==-1),"reserveChannel"),z=P.data;switch(P.type){case"session":if(Nr(this,"session")&&W()){k=a(()=>{if(U)return;U=!0;let X=new Bn(this,P,C);return this._chanMgr.update(C,X),R.channelOpenConfirm(P.sender,C,Ni,$i),X},"accept"),this.emit("session",k,j);return}break;case"direct-tcpip":if(Nr(this,"tcpip")&&W()){k=a(()=>{if(U)return;U=!0;let X={type:void 0,incoming:{id:C,window:Ni,packetSize:$i,state:"open"},outgoing:{id:P.sender,window:P.window,packetSize:P.packetSize,state:"open"}},ne=new Ws(this,X,{server:!0});return this._chanMgr.update(C,ne),R.channelOpenConfirm(P.sender,C,Ni,$i),ne},"accept"),this.emit("tcpip",k,j,z);return}break;case"direct-streamlocal@openssh.com":if(Nr(this,"openssh.streamlocal")&&W()){k=a(()=>{if(U)return;U=!0;let X={type:void 0,incoming:{id:C,window:Ni,packetSize:$i,state:"open"},outgoing:{id:P.sender,window:P.window,packetSize:P.packetSize,state:"open"}},ne=new Ws(this,X,{server:!0});return this._chanMgr.update(C,ne),R.channelOpenConfirm(P.sender,C,Ni,$i),ne},"accept"),this.emit("openssh.streamlocal",k,j,z);return}break;default:H=Hs.UNKNOWN_CHANNEL_TYPE,o&&o(`Automatic rejection of unsupported incoming channel open type: ${P.type}`)}H===void 0&&(H=Hs.ADMINISTRATIVELY_PROHIBITED,o&&o(`Automatic rejection of unexpected incoming channel open for: ${P.type}`)),j()},"CHANNEL_OPEN"),CHANNEL_OPEN_CONFIRMATION:a((ee,P)=>{let C=this._chanMgr.get(P.recipient);if(typeof C!="function")return;let H={type:C.type,incoming:{id:P.recipient,window:Ni,packetSize:$i,state:"open"},outgoing:{id:P.sender,window:P.window,packetSize:P.packetSize,state:"open"}},U=new Ws(this,H,{server:!0});this._chanMgr.update(P.recipient,U),C(void 0,U)},"CHANNEL_OPEN_CONFIRMATION"),CHANNEL_OPEN_FAILURE:a((ee,P,C,H)=>{let U=this._chanMgr.get(P);if(typeof U!="function")return;hB(this,P,{reason:C,description:H},U)},"CHANNEL_OPEN_FAILURE"),CHANNEL_DATA:a((ee,P,C)=>{let H=this._chanMgr.get(P);if(!(typeof H!="object"||H===null)&&!(H.constructor===Bn&&(H=H._channel,!H))&&H.incoming.window!==0){if(H.incoming.window-=C.length,H.push(C)===!1){H._waitChanDrain=!0;return}H.incoming.window<=dB&&fB(H)}},"CHANNEL_DATA"),CHANNEL_EXTENDED_DATA:a((ee,P,C,H)=>{},"CHANNEL_EXTENDED_DATA"),CHANNEL_WINDOW_ADJUST:a((ee,P,C)=>{let H=this._chanMgr.get(P);typeof H!="object"||H===null||H.constructor===Bn&&(H=H._channel,!H)||(H.outgoing.window+=C,H._waitWindow&&(H._waitWindow=!1,H._chunk?H._write(H._chunk,null,H._chunkcb):H._chunkcb?H._chunkcb():H._chunkErr?H.stderr._write(H._chunkErr,null,H._chunkcbErr):H._chunkcbErr&&H._chunkcbErr()))},"CHANNEL_WINDOW_ADJUST"),CHANNEL_SUCCESS:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C=C._channel,!C)||C._callbacks.length&&C._callbacks.shift()(!1)},"CHANNEL_SUCCESS"),CHANNEL_FAILURE:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C=C._channel,!C)||C._callbacks.length&&C._callbacks.shift()(!0)},"CHANNEL_FAILURE"),CHANNEL_REQUEST:a((ee,P,C,H,U)=>{let k=this._chanMgr.get(P);if(typeof k!="object"||k===null)return;let j=!1,W,z;if(k.constructor!==Bn){H&&R.channelFailure(k.outgoing.id);return}if(H&&(C!=="shell"&&C!=="exec"&&C!=="subsystem"&&(W=a(()=>{j||k._ending||k._channel||(j=!0,R.channelSuccess(k._chanInfo.outgoing.id))},"accept")),z=a(()=>{j||k._ending||k._channel||(j=!0,R.channelFailure(k._chanInfo.outgoing.id))},"reject")),k._ending){z&&z();return}switch(C){case"env":if(Nr(k,"env")){k.emit("env",W,z,{key:U.name,val:U.value});return}break;case"pty-req":if(Nr(k,"pty")){k.emit("pty",W,z,U);return}break;case"window-change":Nr(k,"window-change")?k.emit("window-change",W,z,U):z&&z();break;case"x11-req":if(Nr(k,"x11")){k.emit("x11",W,z,U);return}break;case"signal":if(Nr(k,"signal")){k.emit("signal",W,z,{name:U});return}break;case"auth-agent-req@openssh.com":if(Nr(k,"auth-agent")){k.emit("auth-agent",W,z);return}break;case"shell":if(Nr(k,"shell")){W=a(()=>{if(j||k._ending||k._channel)return;j=!0,H&&R.channelSuccess(k._chanInfo.outgoing.id);let X=new Ws(this,k._chanInfo,{server:!0});return X.subtype=k.subtype=C,k._channel=X,X},"accept"),k.emit("shell",W,z);return}break;case"exec":if(Nr(k,"exec")){W=a(()=>{if(j||k._ending||k._channel)return;j=!0,H&&R.channelSuccess(k._chanInfo.outgoing.id);let X=new Ws(this,k._chanInfo,{server:!0});return X.subtype=k.subtype=C,k._channel=X,X},"accept"),k.emit("exec",W,z,{command:U});return}break;case"subsystem":{let X=U==="sftp";if(W=a(()=>{if(j||k._ending||k._channel)return;j=!0,H&&R.channelSuccess(k._chanInfo.outgoing.id);let ne;return X?ne=new uB(this,k._chanInfo,{server:!0,debug:o}):(ne=new Ws(this,k._chanInfo,{server:!0}),ne.subtype=k.subtype=`${C}:${U}`),k._channel=ne,ne},"accept"),U==="sftp"){if(Nr(k,"sftp")){k.emit("sftp",W,z);return}X=!1}if(Nr(k,"subsystem")){k.emit("subsystem",W,z,{name:U});return}break}}o&&o(`Automatic rejection of incoming channel request: ${C}`),z&&z()},"CHANNEL_REQUEST"),CHANNEL_EOF:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C._ending||(C._ending=!0,C.emit("eof"),C.emit("end")),C=C._channel,!C)||C.incoming.state==="open"&&(C.incoming.state="eof",C.readable&&C.push(null))},"CHANNEL_EOF"),CHANNEL_CLOSE:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C._ending=!0,C.emit("close"),C=C._channel,!C)||gB(this,P,C)},"CHANNEL_CLOSE"),SERVICE_REQUEST:a((ee,P)=>{if(u===0||l||this.authenticated||P!=="ssh-userauth"){R.disconnect(js.SERVICE_NOT_AVAILABLE),t.end();return}l=!0,R.serviceAccept(P)},"SERVICE_REQUEST"),USERAUTH_REQUEST:a((ee,P,C,H,U)=>{if(u===0||this.authenticated||p&&(p.username!==P||p.service!==C)||H!=="password"&&H!=="publickey"&&H!=="hostbased"&&H!=="keyboard-interactive"&&H!=="none"||f.length===mB){R.disconnect(js.PROTOCOL_ERROR),t.end();return}else if(C!=="ssh-connection"){R.disconnect(js.SERVICE_NOT_AVAILABLE),t.end();return}let k;switch(H){case"keyboard-interactive":k=new kp(R,P,C,H,U,J);break;case"publickey":k=new RA(R,P,C,H,U,J);break;case"hostbased":k=new OA(R,P,C,H,U,J);break;case"password":if(p&&p instanceof Cp&&p._changeCb){let j=p._changeCb;p._changeCb=void 0,j(U.newPassword);return}k=new Cp(R,P,C,H,U,J);break;case"none":k=new Di(R,P,C,H,J);break}if(p)if(p._initialResponse)p._multistep&&!p._finalResponse&&(p._cleanup&&p._cleanup(),p.emit("abort"));else return f.push(k);p=k,Nr(this,"authentication")?this.emit("authentication",p):p.reject()},"USERAUTH_REQUEST"),USERAUTH_INFO_RESPONSE:a((ee,P)=>{p&&p instanceof kp&&p._onInfoResponse(P)},"USERAUTH_INFO_RESPONSE"),GLOBAL_REQUEST:a((ee,P,C,H)=>{let U={type:null,buf:null};function k(j,W){U.type=j,U.buf=W,te()}if(a(k,"setReply"),C&&_.push(U),(P==="tcpip-forward"||P==="cancel-tcpip-forward"||P==="no-more-sessions@openssh.com"||P==="streamlocal-forward@openssh.com"||P==="cancel-streamlocal-forward@openssh.com")&&Nr(this,"request")&&this.authenticated){let j,W;if(C){let z=!1;j=a(X=>{if(z)return;z=!0;let ne;P==="tcpip-forward"&&H.bindPort===0&&typeof X=="number"&&(ne=Buffer.allocUnsafe(4),lB(ne,X,0)),k("SUCCESS",ne)},"accept"),W=a(()=>{z||(z=!0,k("FAILURE"))},"reject")}if(P==="no-more-sessions@openssh.com"){this.noMoreSessions=!0,j&&j();return}this.emit("request",j,W,P,H)}else C&&k("FAILURE")},"GLOBAL_REQUEST")}});t.pause(),sB.then(()=>{R.start(),t.on("data",ee=>{try{R.parse(ee,0,ee.length)}catch(P){this.emit("error",P);try{Tp(t)&&t.end()}catch{}}}),t.resume()}).catch(ee=>{this.emit("error",ee);try{Tp(t)&&t.end()}catch{}}),t.on("error",ee=>{ee.level="socket",this.emit("error",ee)}).once("end",()=>{o&&o("Socket ended"),R.cleanup(),this.emit("end")}).once("close",()=>{o&&o("Socket closed"),R.cleanup(),this.emit("close");let ee=new Error("No response from server");this._chanMgr.cleanup(ee)});let J=a((ee,P,C,H)=>{p===ee&&!this.authenticated&&(P?(p=void 0,this.authenticated=!0,R.authSuccess(),f=[],this.emit("ready")):(R.authFailure(C,H),f.length&&(p=f.pop(),Nr(this,"authentication")?this.emit("authentication",p):p.reject())))},"onAuthDecide");function te(){for(;_.length>0&&_[0].type;){let ee=_.shift();ee.type==="SUCCESS"&&R.requestSuccess(ee.buf),ee.type==="FAILURE"&&R.requestFailure()}}a(te,"sendReplies")}end(){return this._sock&&Tp(this._sock)&&(this._protocol.disconnect(js.BY_APPLICATION),this._sock.end()),this}x11(t,r,i){return CA(this,"x11",{originAddr:t,originPort:r},i),this}forwardOut(t,r,i,n,o){return CA(this,"forwarded-tcpip",{boundAddr:t,boundPort:r,remoteAddr:i,remotePort:n},o),this}openssh_forwardOutStreamLocal(t,r){return CA(this,"forwarded-streamlocal@openssh.com",{socketPath:t},r),this}rekey(t){let r;try{this._protocol.rekey()}catch(i){r=i}typeof t=="function"&&(r?process.nextTick(t,r):this.once("rekey",t))}setNoDelay(t){return this._sock&&typeof this._sock.setNoDelay=="function"&&this._sock.setNoDelay(t),this}};function CA(e,t,r,i){let n=Ni,o=$i;typeof r=="function"&&(i=r,r={});let s=a((u,l)=>{i(u,l)},"wrapper");s.type=t;let c=e._chanMgr.add(s);if(c===-1){i(new Error("No free channels available"));return}switch(t){case"forwarded-tcpip":e._protocol.forwardedTcpip(c,n,o,r);break;case"x11":e._protocol.x11(c,n,o,r);break;case"forwarded-streamlocal@openssh.com":e._protocol.openssh_forwardedStreamLocal(c,n,o,r);break;default:throw new Error(`Unsupported channel type: ${t}`)}}a(CA,"openChannel");function _B(e,t){return e-t}a(_B,"compareNumbers");NA.exports=on;NA.exports.IncomingClient=Rp});var SP=me((h7,vP)=>{"use strict";var{createCipheriv:yB,generateKeyPair:EB,generateKeyPairSync:AB,getCurves:bB,randomBytes:bP}=require("crypto"),{Ber:Ht}=cu(),xB=eE().pbkdf,{CIPHER_INFO:IB}=Pi(),vB=16,SB=16,wB=bB(),PB=new Map(Object.entries(IB));function xP(e,t){if(typeof e!="string")throw new TypeError("Key type must be a string");let r={type:"spki",format:"der"},i={type:"pkcs8",format:"der"};switch(e.toLowerCase()){case"rsa":{if(typeof t!="object"||t===null)throw new TypeError("Missing options object for RSA key");let n=t.bits;if(!Number.isInteger(n))throw new TypeError("RSA bits must be an integer");if(n<=0||n>16384)throw new RangeError("RSA bits must be non-zero and <= 16384");return["rsa",{modulusLength:n,publicKeyEncoding:r,privateKeyEncoding:i}]}case"ecdsa":{if(typeof t!="object"||t===null)throw new TypeError("Missing options object for ECDSA key");if(!Number.isInteger(t.bits))throw new TypeError("ECDSA bits must be an integer");let n;switch(t.bits){case 256:n="prime256v1";break;case 384:n="secp384r1";break;case 521:n="secp521r1";break;default:throw new Error("ECDSA bits must be 256, 384, or 521")}if(!wB.includes(n))throw new Error("Unsupported ECDSA bits value");return["ec",{namedCurve:n,publicKeyEncoding:r,privateKeyEncoding:i}]}case"ed25519":return["ed25519",{publicKeyEncoding:r,privateKeyEncoding:i}];default:throw new Error(`Unsupported key type: ${e}`)}}a(xP,"makeArgs");function TB(e,t,r){switch(e){case"rsa":{let i=new Ht.Reader(r);if(i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in RSA private key");if(i.readSequence(),i.readOID()!=="1.2.840.113549.1.1.1")throw new Error("Bad RSA private OID");if(i.readByte()!==Ht.Null)throw new Error("Malformed RSA private key (expected null)");if(i.readByte()!==0)throw new Error("Malformed RSA private key (expected zero-length null)");if(i=new Ht.Reader(i.readString(Ht.OctetString,!0)),i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in RSA private key");let n=i.readString(Ht.Integer,!0),o=i.readString(Ht.Integer,!0),s=i.readString(Ht.Integer,!0),c=i.readString(Ht.Integer,!0),u=i.readString(Ht.Integer,!0);i.readString(Ht.Integer,!0),i.readString(Ht.Integer,!0);let l=i.readString(Ht.Integer,!0),f=Buffer.from("ssh-rsa"),p=Buffer.allocUnsafe(4+f.length+4+n.length+4+o.length+4+s.length+4+l.length+4+c.length+4+u.length),g=0;p.writeUInt32BE(f.length,g+=0),p.set(f,g+=4),p.writeUInt32BE(n.length,g+=f.length),p.set(n,g+=4),p.writeUInt32BE(o.length,g+=n.length),p.set(o,g+=4),p.writeUInt32BE(s.length,g+=o.length),p.set(s,g+=4),p.writeUInt32BE(l.length,g+=s.length),p.set(l,g+=4),p.writeUInt32BE(c.length,g+=l.length),p.set(c,g+=4),p.writeUInt32BE(u.length,g+=c.length),p.set(u,g+=4);let h=Buffer.allocUnsafe(4+f.length+4+o.length+4+n.length);return g=0,h.writeUInt32BE(f.length,g+=0),h.set(f,g+=4),h.writeUInt32BE(o.length,g+=f.length),h.set(o,g+=4),h.writeUInt32BE(n.length,g+=o.length),h.set(n,g+=4),{sshName:f.toString(),priv:p,pub:h}}case"ec":{let i=new Ht.Reader(t);if(i.readSequence(),i.readSequence(),i.readOID()!=="1.2.840.10045.2.1")throw new Error("Bad ECDSA public OID");i.readOID();let n=i.readString(Ht.BitString,!0);{let g=0;for(;g<n.length&&n[g]===0;++g);g>0&&(n=n.slice(g))}if(i=new Ht.Reader(r),i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in ECDSA private key");if(i.readSequence(),i.readOID()!=="1.2.840.10045.2.1")throw new Error("Bad ECDSA private OID");let o=i.readOID(),s;switch(o){case"1.2.840.10045.3.1.7":s="nistp256";break;case"1.3.132.0.34":s="nistp384";break;case"1.3.132.0.35":s="nistp521";break;default:throw new Error("Unsupported curve in ECDSA private key")}if(i=new Ht.Reader(i.readString(Ht.OctetString,!0)),i.readSequence(),i.readInt()!==1)throw new Error("Unsupported version in ECDSA private key");let c=Buffer.concat([Buffer.from([0]),i.readString(Ht.OctetString,!0)]),u=Buffer.from(`ecdsa-sha2-${s}`);s=Buffer.from(s);let l=Buffer.allocUnsafe(4+u.length+4+s.length+4+n.length+4+c.length),f=0;l.writeUInt32BE(u.length,f+=0),l.set(u,f+=4),l.writeUInt32BE(s.length,f+=u.length),l.set(s,f+=4),l.writeUInt32BE(n.length,f+=s.length),l.set(n,f+=4),l.writeUInt32BE(c.length,f+=n.length),l.set(c,f+=4);let p=Buffer.allocUnsafe(4+u.length+4+s.length+4+n.length);return f=0,p.writeUInt32BE(u.length,f+=0),p.set(u,f+=4),p.writeUInt32BE(s.length,f+=u.length),p.set(s,f+=4),p.writeUInt32BE(n.length,f+=s.length),p.set(n,f+=4),{sshName:u.toString(),priv:l,pub:p}}case"ed25519":{let i=new Ht.Reader(t);if(i.readSequence(),i.readSequence(),i.readOID()!=="1.3.101.112")throw new Error("Bad ED25519 public OID");let n=i.readString(Ht.BitString,!0);{let f=0;for(;f<n.length&&n[f]===0;++f);f>0&&(n=n.slice(f))}if(i=new Ht.Reader(r),i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in ED25519 private key");if(i.readSequence(),i.readOID()!=="1.3.101.112")throw new Error("Bad ED25519 private OID");i=new Ht.Reader(i.readString(Ht.OctetString,!0));let o=i.readString(Ht.OctetString,!0),s=Buffer.from("ssh-ed25519"),c=Buffer.allocUnsafe(4+s.length+4+n.length+4+(o.length+n.length)),u=0;c.writeUInt32BE(s.length,u+=0),c.set(s,u+=4),c.writeUInt32BE(n.length,u+=s.length),c.set(n,u+=4),c.writeUInt32BE(o.length+n.length,u+=n.length),c.set(o,u+=4),c.set(n,u+=o.length);let l=Buffer.allocUnsafe(4+s.length+4+n.length);return u=0,l.writeUInt32BE(s.length,u+=0),l.set(s,u+=4),l.writeUInt32BE(n.length,u+=s.length),l.set(n,u+=4),{sshName:s.toString(),priv:c,pub:l}}}}a(TB,"parseDERs");function IP(e,t,r,i){let n="new",o,s="";if(typeof i=="object"&&i!==null&&(typeof i.comment=="string"&&i.comment&&(s=i.comment),typeof i.format=="string"&&i.format&&(n=i.format),i.passphrase)){let c;if(typeof i.passphrase=="string")c=Buffer.from(i.passphrase);else if(Buffer.isBuffer(i.passphrase))c=i.passphrase;else throw new Error("Invalid passphrase");if(i.cipher===void 0)throw new Error("Missing cipher name");let u=PB.get(i.cipher);if(u===void 0)throw new Error("Invalid cipher name");if(n==="new"){let l=SB;if(i.rounds!==void 0){if(!Number.isInteger(i.rounds))throw new TypeError("rounds must be an integer");i.rounds>0&&(l=i.rounds)}let f=Buffer.allocUnsafe(u.keyLen+u.ivLen),p=bP(vB);if(xB(c,c.length,p,p.length,f,f.length,l)!==0)return new Error("Failed to generate information to encrypt key");let h=Buffer.allocUnsafe(4+p.length+4);{let _=0;h.writeUInt32BE(p.length,_+=0),h.set(p,_+=4),h.writeUInt32BE(l,_+=p.length)}o={cipher:u,cipherName:i.cipher,kdfName:"bcrypt",kdfOptions:h,key:f.slice(0,u.keyLen),iv:f.slice(u.keyLen)}}}switch(n){case"new":{let c=`-----BEGIN OPENSSH PRIVATE KEY-----
20
- `,u,l=Buffer.from(o?o.cipherName:"none"),f=Buffer.from(o?o.kdfName:"none"),p=o?o.kdfOptions:Buffer.alloc(0),g=o?o.cipher.blockLen:8,h=TB(e,t,r),_=bP(4),y=Buffer.from(s),b=8+h.priv.length+4+y.length,v=[];for(let te=1;(b+v.length)%g;++te)v.push(te&255);v=Buffer.from(v);let S=Buffer.allocUnsafe(b+v.length),M;{let te=0;S.set(_,te+=0),S.set(_,te+=4),S.set(h.priv,te+=4),S.writeUInt32BE(y.length,te+=h.priv.length),S.set(y,te+=4),S.set(v,te+=y.length)}if(o){let te={authTagLength:o.cipher.authLen},ee=yB(o.cipher.sslName,o.key,o.iv,te);ee.setAutoPadding(!1),S=Buffer.concat([ee.update(S),ee.final()]),o.cipher.authLen>0?M=ee.getAuthTag():M=Buffer.alloc(0),o.key.fill(0),o.iv.fill(0)}else M=Buffer.alloc(0);let R=Buffer.from("openssh-key-v1\0"),J=Buffer.allocUnsafe(R.length+4+l.length+4+f.length+4+p.length+4+4+h.pub.length+4+S.length+M.length);{let te=0;J.set(R,te+=0),J.writeUInt32BE(l.length,te+=R.length),J.set(l,te+=4),J.writeUInt32BE(f.length,te+=l.length),J.set(f,te+=4),J.writeUInt32BE(p.length,te+=f.length),J.set(p,te+=4),J.writeUInt32BE(1,te+=p.length),J.writeUInt32BE(h.pub.length,te+=4),J.set(h.pub,te+=4),J.writeUInt32BE(S.length,te+=h.pub.length),J.set(S,te+=4),J.set(M,te+=S.length)}{let te=J.base64Slice(0,J.length),ee=te.replace(/.{64}/g,`$&
19
+ ${r}`}};var c2=2**32,Lw=(()=>{try{return new Function("return 2n ** 32n")()}catch{}})();Pu.ERR_OUT_OF_RANGE=class Uw extends RangeError{static{a(this,"ERR_OUT_OF_RANGE")}constructor(t,r,i,n){super(),Error.captureStackTrace(this,Uw),Ap(r,'Missing "range" argument');let o=n?t:`The value of "${t}" is out of range.`,s;Number.isInteger(i)&&Math.abs(i)>c2?s=Dw(String(i)):typeof i=="bigint"?(s=String(i),(i>Lw||i<-Lw)&&(s=Dw(s)),s+="n"):s=a2(i),o+=` It must be ${r}. Received ${s}`,this.message=o}};var bp=class e extends TypeError{static{a(this,"ERR_INVALID_ARG_TYPE")}constructor(t,r,i){super(),Error.captureStackTrace(this,e),Ap(typeof t=="string","'name' must be a string");let n;typeof r=="string"&&r.startsWith("not ")?(n="must not be",r=r.replace(/^not /,"")):n="must be";let o;if(t.endsWith(" argument"))o=`The ${t} ${n} ${Bw(r,"type")}`;else{let s=t.includes(".")?"property":"argument";o=`The "${t}" ${s} ${n} ${Bw(r,"type")}`}o+=`. Received type ${typeof i}`,this.message=o}};Pu.ERR_INVALID_ARG_TYPE=bp;Pu.validateNumber=a(function(t,r){if(typeof t!="number")throw new bp(r,"number",t)},"validateNumber")});var Tu=me((A7,Jw)=>{"use strict";var u2=require("events"),Oi=require("fs"),{constants:Gr}=Oi,{Readable:Vw,Writable:_A}=require("stream"),{inherits:Zw,types:{isDate:fA}}=require("util"),l2=Buffer[Symbol.species],{bufferCopy:Ri,bufferSlice:Ms,makeBufferParser:f2,writeUInt32BE:Y}=Sn(),ri={SIZE:1,UIDGID:2,PERMISSIONS:4,ACMODTIME:8,EXTENDED:2147483648},He=Buffer.alloc(28),xt={OK:0,EOF:1,NO_SUCH_FILE:2,PERMISSION_DENIED:3,FAILURE:4,BAD_MESSAGE:5,NO_CONNECTION:6,CONNECTION_LOST:7,OP_UNSUPPORTED:8},d2=new Map(Object.values(xt).map(e=>[e,1])),p2={[xt.OK]:"No error",[xt.EOF]:"End of file",[xt.NO_SUCH_FILE]:"No such file or directory",[xt.PERMISSION_DENIED]:"Permission denied",[xt.FAILURE]:"Failure",[xt.BAD_MESSAGE]:"Bad message",[xt.NO_CONNECTION]:"No connection",[xt.CONNECTION_LOST]:"Connection lost",[xt.OP_UNSUPPORTED]:"Operation unsupported"},Ue={INIT:1,OPEN:3,CLOSE:4,READ:5,WRITE:6,LSTAT:7,FSTAT:8,SETSTAT:9,FSETSTAT:10,OPENDIR:11,READDIR:12,REMOVE:13,MKDIR:14,RMDIR:15,REALPATH:16,STAT:17,RENAME:18,READLINK:19,SYMLINK:20,EXTENDED:200},Kr={VERSION:2,STATUS:101,HANDLE:102,DATA:103,NAME:104,ATTRS:105,EXTENDED:201},$e={READ:1,WRITE:2,APPEND:4,CREAT:8,TRUNC:16,EXCL:32},Fw=2*1024,Nt=2**32-1,h2=Buffer.from([0,0,0,5,Ue.INIT,0,0,0,3]),g2=Buffer.from([0,0,0,5,Kr.VERSION,0,0,0,3]),m2=/^SSH-2.0-(?:OpenSSH|dropbear)/,uA=256*1024,z=f2(),_2={readable:!1,writable:!1,push:a(e=>{},"push"),once:a(()=>{},"once"),on:a(()=>{},"on"),emit:a(()=>{},"emit"),end:a(()=>{},"end")};function Qw(){}a(Qw,"noop");var dA=class extends u2{static{a(this,"SFTP")}constructor(t,r,i){super(),(typeof i!="object"||!i)&&(i={});let n=t._protocol._remoteIdentRaw;this.server=!!i.server,this._debug=typeof i.debug=="function"?i.debug:void 0,this._isOpenSSH=n&&m2.test(n),this._version=-1,this._extensions={},this._biOpt=i.biOpt,this._pktLenBytes=0,this._pktLen=0,this._pktPos=0,this._pktType=0,this._pktData=void 0,this._writeReqid=-1,this._requests={},this._maxInPktLen=uA,this._maxOutPktLen=34e3,this._maxReadLen=(this._isOpenSSH?uA:34e3)-Fw,this._maxWriteLen=(this._isOpenSSH?uA:34e3)-Fw,this.maxOpenHandles=void 0,this._client=t,this._protocol=t._protocol,this._callbacks=[],this._hasX11=!1,this._exit={code:void 0,signal:void 0,dump:void 0,desc:void 0},this._waitWindow=!1,this._chunkcb=void 0,this._buffer=[],this.type=r.type,this.subtype=void 0,this.incoming=r.incoming,this.outgoing=r.outgoing,this.stderr=_2,this.readable=!0}push(t){if(t===null){if(Xw(this),!this.readable)return;this.readable=!1,this.emit("end");return}let r=0;for(;r<t.length;){if(this._pktLenBytes<4){let s=Math.min(4-this._pktLenBytes,t.length-r);for(this._pktLenBytes+=s;s--;)this._pktLen=(this._pktLen<<8)+t[r++];if(this._pktLenBytes<4)return;if(this._pktLen===0)return wt(this,"Invalid packet length");if(this._pktLen>this._maxInPktLen){let c=this._maxInPktLen;return wt(this,`Packet length ${this._pktLen} exceeds max length of ${c}`)}if(r>=t.length)return}if(this._pktPos<this._pktLen){let s=Math.min(this._pktLen-this._pktPos,t.length-r);if(r!==0||s!==t.length?s===this._pktLen?this._pkt=new l2(t.buffer,t.byteOffset+r,s):(this._pkt||(this._pkt=Buffer.allocUnsafe(this._pktLen)),this._pkt.set(new Uint8Array(t.buffer,t.byteOffset+r,s),this._pktPos)):s===this._pktLen?this._pkt=t:(this._pkt||(this._pkt=Buffer.allocUnsafe(this._pktLen)),this._pkt.set(t,this._pktPos)),r+=s,this._pktPos+=s,this._pktPos<this._pktLen)return}let i=this._pkt[0],n=this._pkt;this._pktLen=0,this._pktLenBytes=0,this._pkt=void 0,this._pktPos=0;let o=this.server?x2[i]:b2[i];if(!o)return wt(this,`Unknown packet type ${i}`);if(this._version===-1){if(this.server){if(i!==Ue.INIT)return wt(this,`Expected INIT packet, got ${i}`)}else if(i!==Kr.VERSION)return wt(this,`Expected VERSION packet, got ${i}`)}if(o(this,n)===!1)return}}end(){this.destroy()}destroy(){(this.outgoing.state==="open"||this.outgoing.state==="eof")&&(this.outgoing.state="closing",this._protocol.channelClose(this.outgoing.id))}_init(){this._init=Qw,this.server||_t(this,h2)}createReadStream(t,r){if(this.server)throw new Error("Client-only method called in server mode");return new ni(this,t,r)}createWriteStream(t,r){if(this.server)throw new Error("Client-only method called in server mode");return new gn(this,t,r)}open(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");typeof i=="function"&&(n=i,i=void 0);let o=typeof r=="number"?r:Kw(r);if(o===null)throw new Error(`Unknown flags string: ${r}`);let s=0,c=0;(typeof i=="string"||typeof i=="number")&&(i={mode:i}),typeof i=="object"&&i!==null&&(i=So(i),s=i.flags,c=i.nb);let u=Buffer.byteLength(t),l=9,f=Buffer.allocUnsafe(13+u+4+4+c);Y(f,f.length-4,0),f[4]=Ue.OPEN;let p=this._writeReqid=this._writeReqid+1&Nt;Y(f,p,5),Y(f,u,l),f.utf8Write(t,l+=4,u),Y(f,o,l+=u),Y(f,s,l+=4),c&&(l+=4,c===He.length?f.set(He,l):Ri(He,f,0,c,l),l+=c),this._requests[p]={cb:n};let g=_t(this,f);this._debug&&this._debug(`SFTP: Outbound: ${g?"Buffered":"Sending"} OPEN`)}close(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let i=t.length,n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.CLOSE;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.set(t,n+=4),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} CLOSE`)}read(t,r,i,n,o,s){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");if(!Buffer.isBuffer(r))throw new Error("buffer is not a Buffer");if(i>=r.length)throw new Error("offset is out of bounds");if(i+n>r.length)throw new Error("length extends beyond buffer");if(o===null)throw new Error("null position currently unsupported");Gw(this,t,r,i,n,o,s)}readData(t,r,i,n,o,s){this.read(t,r,i,n,o,s)}write(t,r,i,n,o,s){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");if(!Buffer.isBuffer(r))throw new Error("buffer is not a Buffer");if(i>r.length)throw new Error("offset is out of bounds");if(i+n>r.length)throw new Error("length extends beyond buffer");if(o===null)throw new Error("null position currently unsupported");if(!n){s&&process.nextTick(s,void 0,0);return}let c=this._maxWriteLen,u=Math.max(n-c,0),l=o;u&&(n=c);let f=t.length,p=9,g=Buffer.allocUnsafe(13+f+8+4+n);Y(g,g.length-4,0),g[4]=Ue.WRITE;let h=this._writeReqid=this._writeReqid+1&Nt;Y(g,h,5),Y(g,f,p),g.set(t,p+=4),p+=f;for(let y=7;y>=0;--y)g[p+y]=o&255,o/=256;Y(g,n,p+=8),Ri(r,g,i,i+n,p+=4),this._requests[h]={cb:a(y=>{y?typeof s=="function"&&s(y):u?this.write(t,r,i+n,u,l+n,s):typeof s=="function"&&s(void 0,i+n)},"cb")};let _=_t(this,g);if(this._debug){let y=_?"Sent":"Buffered";this._debug(`SFTP: Outbound: ${y} WRITE (id:${h})`)}}writeData(t,r,i,n,o,s){this.write(t,r,i,n,o,s)}fastGet(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");Hw(this,Oi,t,r,i,n)}fastPut(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");Hw(Oi,this,t,r,i,n)}readFile(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n;if(typeof i=="function"?n=i:typeof r=="function"&&(n=r,r=void 0),typeof r=="string")r={encoding:r,flag:"r"};else if(!r)r={encoding:null,flag:"r"};else if(typeof r!="object")throw new TypeError("Bad arguments");let o=r.encoding;if(o&&!Buffer.isEncoding(o))throw new Error(`Unknown encoding: ${o}`);let s,c,u,l=0,f,p=0,g=r.flag||"r",h=a(()=>{s===0?(c=Buffer.allocUnsafe(8192),this.read(f,c,0,8192,p,_)):this.read(f,c,l,s-l,p,_)},"read"),_=a((b,S)=>{let v;if(b){if(v=b.code===xt.EOF,!v)return this.close(f,()=>n&&n(b))}else v=!1;if(v||s===0&&S===0)return y();p+=S,l+=S,s!==0?l===s?y():h():(u.push(Ms(c,0,S)),h())},"afterRead");_._wantEOFError=!0;let y=a(()=>{this.close(f,b=>(s===0?c=Buffer.concat(u,l):l<s&&(c=Ms(c,0,l)),o&&(c=c.toString(o)),n&&n(b,c)))},"close");this.open(t,g,438,(b,S)=>{if(b)return n&&n(b);f=S;let v=a((M,R)=>{if(M){this.stat(t,(J,te)=>{if(J)return this.close(f,()=>{n&&n(M)});v(null,te)});return}if(s=R.size||0,s===0)return u=[],h();c=Buffer.allocUnsafe(s),h()},"tryStat");this.fstat(f,v)})}writeFile(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");let o;if(typeof n=="function"?o=n:typeof i=="function"&&(o=i,i=void 0),typeof i=="string")i={encoding:i,mode:438,flag:"w"};else if(!i)i={encoding:"utf8",mode:438,flag:"w"};else if(typeof i!="object")throw new TypeError("Bad arguments");if(i.encoding&&!Buffer.isEncoding(i.encoding))throw new Error(`Unknown encoding: ${i.encoding}`);let s=i.flag||"w";this.open(t,s,i.mode,(c,u)=>{if(c)o&&o(c);else{let l=Buffer.isBuffer(r)?r:Buffer.from(""+r,i.encoding||"utf8"),f=/a/.test(s)?null:0;if(f===null){let p=a((g,h)=>{if(g){this.stat(t,(_,y)=>{if(_)return this.close(u,()=>{o&&o(g)});p(null,y)});return}pA(this,u,l,0,l.length,h.size,o)},"tryStat");this.fstat(u,p);return}pA(this,u,l,0,l.length,f,o)}})}appendFile(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");let o;if(typeof n=="function"?o=n:typeof i=="function"&&(o=i,i=void 0),typeof i=="string")i={encoding:i,mode:438,flag:"a"};else if(!i)i={encoding:"utf8",mode:438,flag:"a"};else if(typeof i!="object")throw new TypeError("Bad arguments");i.flag||(i=Object.assign({flag:"a"},i)),this.writeFile(t,r,i,o)}exists(t,r){if(this.server)throw new Error("Client-only method called in server mode");this.stat(t,i=>{r&&r(!i)})}unlink(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.REMOVE;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} REMOVE`)}rename(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(t),o=Buffer.byteLength(r),s=9,c=Buffer.allocUnsafe(13+n+4+o);Y(c,c.length-4,0),c[4]=Ue.RENAME;let u=this._writeReqid=this._writeReqid+1&Nt;Y(c,u,5),Y(c,n,s),c.utf8Write(t,s+=4,n),Y(c,o,s+=n),c.utf8Write(r,s+=4,o),this._requests[u]={cb:i};let l=_t(this,c);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} RENAME`)}mkdir(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=0,o=0;typeof r=="function"&&(i=r,r=void 0),typeof r=="object"&&r!==null&&(r=So(r),n=r.flags,o=r.nb);let s=Buffer.byteLength(t),c=9,u=Buffer.allocUnsafe(13+s+4+o);Y(u,u.length-4,0),u[4]=Ue.MKDIR;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,s,c),u.utf8Write(t,c+=4,s),Y(u,n,c+=s),o&&(c+=4,o===He.length?u.set(He,c):Ri(He,u,0,o,c),c+=o),this._requests[l]={cb:i};let f=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} MKDIR`)}rmdir(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.RMDIR;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} RMDIR`)}readdir(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");typeof r=="function"&&(i=r,r={}),(typeof r!="object"||r===null)&&(r={});let n=!(r&&r.full);if(!Buffer.isBuffer(t)&&typeof t!="string")throw new Error("missing directory handle or path");if(typeof t=="string"){let f=[],p=0,g=a((h,_)=>{if(h)return i(h);this.readdir(_,r,(y,b)=>{let S=y&&y.code===xt.EOF;if(y&&!S)return this.close(_,()=>i(y));if(S)return this.close(_,v=>{if(v)return i(v);i(void 0,f)});for(let v=0;v<b.length;++v,++p)f[p]=b[v];g(void 0,_)})},"reread");return this.opendir(t,g)}let o=t.length,s=9,c=Buffer.allocUnsafe(13+o);Y(c,c.length-4,0),c[4]=Ue.READDIR;let u=this._writeReqid=this._writeReqid+1&Nt;Y(c,u,5),Y(c,o,s),c.set(t,s+=4),this._requests[u]={cb:n?(f,p)=>{if(typeof i=="function"){if(f)return i(f);for(let g=p.length-1;g>=0;--g)(p[g].filename==="."||p[g].filename==="..")&&p.splice(g,1);i(void 0,p)}}:i};let l=_t(this,c);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} READDIR`)}fstat(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let i=t.length,n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.FSTAT;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.set(t,n+=4),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} FSTAT`)}stat(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.STAT;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} STAT`)}lstat(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.LSTAT;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} LSTAT`)}opendir(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.OPENDIR;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:r};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} OPENDIR`)}setstat(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=0,o=0;typeof r=="object"&&r!==null?(r=So(r),n=r.flags,o=r.nb):typeof r=="function"&&(i=r);let s=Buffer.byteLength(t),c=9,u=Buffer.allocUnsafe(13+s+4+o);Y(u,u.length-4,0),u[4]=Ue.SETSTAT;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,s,c),u.utf8Write(t,c+=4,s),Y(u,n,c+=s),o&&(c+=4,o===He.length?u.set(He,c):Ri(He,u,0,o,c),c+=o),this._requests[l]={cb:i};let f=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} SETSTAT`)}fsetstat(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let n=0,o=0;typeof r=="object"&&r!==null?(r=So(r),n=r.flags,o=r.nb):typeof r=="function"&&(i=r);let s=t.length,c=9,u=Buffer.allocUnsafe(13+s+4+o);Y(u,u.length-4,0),u[4]=Ue.FSETSTAT;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,s,c),u.set(t,c+=4),Y(u,n,c+=s),o&&(c+=4,o===He.length?u.set(He,c):Ri(He,u,0,o,c),c+=o),this._requests[l]={cb:i};let f=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${f?"Buffered":"Sending"} FSETSTAT`)}futimes(t,r,i,n){return this.fsetstat(t,{atime:zs(r),mtime:zs(i)},n)}utimes(t,r,i,n){return this.setstat(t,{atime:zs(r),mtime:zs(i)},n)}fchown(t,r,i,n){return this.fsetstat(t,{uid:r,gid:i},n)}chown(t,r,i,n){return this.setstat(t,{uid:r,gid:i},n)}fchmod(t,r,i){return this.fsetstat(t,{mode:r},i)}chmod(t,r,i){return this.setstat(t,{mode:r},i)}readlink(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.READLINK;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:a((u,l)=>{if(typeof r=="function"){if(u)return r(u);if(!l||!l.length)return r(new Error("Response missing link info"));r(void 0,l[0].filename)}},"cb")};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} READLINK`)}symlink(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=Buffer.byteLength(r),o=Buffer.byteLength(t),s=9,c=Buffer.allocUnsafe(13+n+4+o);Y(c,c.length-4,0),c[4]=Ue.SYMLINK;let u=this._writeReqid=this._writeReqid+1&Nt;Y(c,u,5),this._isOpenSSH?(Y(c,o,s),c.utf8Write(t,s+=4,o),Y(c,n,s+=o),c.utf8Write(r,s+=4,n)):(Y(c,n,s),c.utf8Write(r,s+=4,n),Y(c,o,s+=n),c.utf8Write(t,s+=4,o)),this._requests[u]={cb:i};let l=_t(this,c);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} SYMLINK`)}realpath(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=Buffer.byteLength(t),n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Ue.REALPATH;let s=this._writeReqid=this._writeReqid+1&Nt;Y(o,s,5),Y(o,i,n),o.utf8Write(t,n+=4,i),this._requests[s]={cb:a((u,l)=>{if(typeof r=="function"){if(u)return r(u);if(!l||!l.length)return r(new Error("Response missing path info"));r(void 0,l[0].filename)}},"cb")};let c=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} REALPATH`)}ext_openssh_rename(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");let n=this._extensions["posix-rename@openssh.com"];if(!n||n!=="1")throw new Error("Server does not support this extended request");let o=Buffer.byteLength(t),s=Buffer.byteLength(r),c=9,u=Buffer.allocUnsafe(41+o+4+s);Y(u,u.length-4,0),u[4]=Ue.EXTENDED;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,24,c),u.utf8Write("posix-rename@openssh.com",c+=4,24),Y(u,o,c+=24),u.utf8Write(t,c+=4,o),Y(u,s,c+=o),u.utf8Write(r,c+=4,s),this._requests[l]={cb:i};let f=_t(this,u);if(this._debug){let p=f?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${p} posix-rename@openssh.com`)}}ext_openssh_statvfs(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=this._extensions["statvfs@openssh.com"];if(!i||i!=="2")throw new Error("Server does not support this extended request");let n=Buffer.byteLength(t),o=9,s=Buffer.allocUnsafe(36+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,19,o),s.utf8Write("statvfs@openssh.com",o+=4,19),Y(s,n,o+=19),s.utf8Write(t,o+=4,n),this._requests[c]={extended:"statvfs@openssh.com",cb:r};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} statvfs@openssh.com`)}}ext_openssh_fstatvfs(t,r){if(this.server)throw new Error("Client-only method called in server mode");let i=this._extensions["fstatvfs@openssh.com"];if(!i||i!=="2")throw new Error("Server does not support this extended request");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let n=t.length,o=9,s=Buffer.allocUnsafe(37+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,20,o),s.utf8Write("fstatvfs@openssh.com",o+=4,20),Y(s,n,o+=20),s.set(t,o+=4),this._requests[c]={extended:"fstatvfs@openssh.com",cb:r};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} fstatvfs@openssh.com`)}}ext_openssh_hardlink(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["hardlink@openssh.com"]!=="1")throw new Error("Server does not support this extended request");let o=Buffer.byteLength(t),s=Buffer.byteLength(r),c=9,u=Buffer.allocUnsafe(37+o+4+s);Y(u,u.length-4,0),u[4]=Ue.EXTENDED;let l=this._writeReqid=this._writeReqid+1&Nt;Y(u,l,5),Y(u,20,c),u.utf8Write("hardlink@openssh.com",c+=4,20),Y(u,o,c+=20),u.utf8Write(t,c+=4,o),Y(u,s,c+=o),u.utf8Write(r,c+=4,s),this._requests[l]={cb:i};let f=_t(this,u);if(this._debug){let p=f?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${p} hardlink@openssh.com`)}}ext_openssh_fsync(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["fsync@openssh.com"]!=="1")throw new Error("Server does not support this extended request");if(!Buffer.isBuffer(t))throw new Error("handle is not a Buffer");let n=t.length,o=9,s=Buffer.allocUnsafe(34+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,17,o),s.utf8Write("fsync@openssh.com",o+=4,17),Y(s,n,o+=17),s.set(t,o+=4),this._requests[c]={cb:r};let u=_t(this,s);this._debug&&this._debug(`SFTP: Outbound: ${u?"Buffered":"Sending"} fsync@openssh.com`)}ext_openssh_lsetstat(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["lsetstat@openssh.com"]!=="1")throw new Error("Server does not support this extended request");let o=0,s=0;typeof r=="object"&&r!==null?(r=So(r),o=r.flags,s=r.nb):typeof r=="function"&&(i=r);let c=Buffer.byteLength(t),u=9,l=Buffer.allocUnsafe(37+c+4+s);Y(l,l.length-4,0),l[4]=Ue.EXTENDED;let f=this._writeReqid=this._writeReqid+1&Nt;Y(l,f,5),Y(l,20,u),l.utf8Write("lsetstat@openssh.com",u+=4,20),Y(l,c,u+=20),l.utf8Write(t,u+=4,c),Y(l,o,u+=c),s&&(u+=4,s===He.length?l.set(He,u):Ri(He,l,0,s,u),u+=s),this._requests[f]={cb:i};let p=_t(this,l);if(this._debug){let g=p?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${g} lsetstat@openssh.com`)}}ext_openssh_expandPath(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["expand-path@openssh.com"]!=="1")throw new Error("Server does not support this extended request");let n=Buffer.byteLength(t),o=9,s=Buffer.allocUnsafe(40+n);Y(s,s.length-4,0),s[4]=Ue.EXTENDED;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,5),Y(s,23,o),s.utf8Write("expand-path@openssh.com",o+=4,23),Y(s,n,o+=20),s.utf8Write(t,o+=4,n),this._requests[c]={cb:a((l,f)=>{if(typeof r=="function"){if(l)return r(l);if(!f||!f.length)return r(new Error("Response missing expanded path"));r(void 0,f[0].filename)}},"cb")};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} expand-path@openssh.com`)}}ext_copy_data(t,r,i,n,o,s){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["copy-data"]!=="1")throw new Error("Server does not support this extended request");if(!Buffer.isBuffer(t))throw new Error("Source handle is not a Buffer");if(!Buffer.isBuffer(n))throw new Error("Destination handle is not a Buffer");let u=0,l=Buffer.allocUnsafe(26+t.length+8+8+4+n.length+8);Y(l,l.length-4,u),u+=4,l[u]=Ue.EXTENDED,++u;let f=this._writeReqid=this._writeReqid+1&Nt;Y(l,f,u),u+=4,Y(l,9,u),u+=4,l.utf8Write("copy-data",u,9),u+=9,Y(l,t.length,u),u+=4,l.set(t,u),u+=t.length;for(let g=7;g>=0;--g)l[u+g]=r&255,r/=256;u+=8;for(let g=7;g>=0;--g)l[u+g]=i&255,i/=256;u+=8,Y(l,n.length,u),u+=4,l.set(n,u),u+=n.length;for(let g=7;g>=0;--g)l[u+g]=o&255,o/=256;this._requests[f]={cb:s};let p=_t(this,l);if(this._debug){let g=p?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${g} copy-data`)}}ext_home_dir(t,r){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["home-directory"]!=="1")throw new Error("Server does not support this extended request");if(typeof t!="string")throw new TypeError("username is not a string");let n=0,o=Buffer.byteLength(t),s=Buffer.allocUnsafe(31+o);Y(s,s.length-4,n),n+=4,s[n]=Ue.EXTENDED,++n;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,n),n+=4,Y(s,14,n),n+=4,s.utf8Write("home-directory",n,14),n+=14,Y(s,o,n),n+=4,s.utf8Write(t,n,o),n+=o,this._requests[c]={cb:a((l,f)=>{if(typeof r=="function"){if(l)return r(l);if(!f||!f.length)return r(new Error("Response missing home directory"));r(void 0,f[0].filename)}},"cb")};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} home-directory`)}}ext_users_groups(t,r,i){if(this.server)throw new Error("Client-only method called in server mode");if(this._extensions["users-groups-by-id@openssh.com"]!=="1")throw new Error("Server does not support this extended request");if(!Array.isArray(t))throw new TypeError("uids is not an array");for(let l of t)if(!Number.isInteger(l)||l<0||l>2**32-1)throw new Error("uid values must all be 32-bit unsigned integers");if(!Array.isArray(r))throw new TypeError("gids is not an array");for(let l of r)if(!Number.isInteger(l)||l<0||l>2**32-1)throw new Error("gid values must all be 32-bit unsigned integers");let o=0,s=Buffer.allocUnsafe(47+4*t.length+4+4*r.length);Y(s,s.length-4,o),o+=4,s[o]=Ue.EXTENDED,++o;let c=this._writeReqid=this._writeReqid+1&Nt;Y(s,c,o),o+=4,Y(s,30,o),o+=4,s.utf8Write("users-groups-by-id@openssh.com",o,30),o+=30,Y(s,4*t.length,o),o+=4;for(let l of t)Y(s,l,o),o+=4;Y(s,4*r.length,o),o+=4;for(let l of r)Y(s,l,o),o+=4;this._requests[c]={extended:"users-groups-by-id@openssh.com",cb:i};let u=_t(this,s);if(this._debug){let l=u?"Buffered":"Sending";this._debug(`SFTP: Outbound: ${l} users-groups-by-id@openssh.com`)}}handle(t,r){if(!this.server)throw new Error("Server-only method called in client mode");if(!Buffer.isBuffer(r))throw new Error("handle is not a Buffer");let i=r.length;if(i>256)throw new Error("handle too large (> 256 bytes)");let n=9,o=Buffer.allocUnsafe(13+i);Y(o,o.length-4,0),o[4]=Kr.HANDLE,Y(o,t,5),Y(o,i,n),i&&o.set(r,n+=4);let s=_t(this,o);this._debug&&this._debug(`SFTP: Outbound: ${s?"Buffered":"Sending"} HANDLE`)}status(t,r,i){if(!this.server)throw new Error("Server-only method called in client mode");if(!d2.has(r))throw new Error(`Bad status code: ${r}`);i||(i="");let n=Buffer.byteLength(i),o=9,s=Buffer.allocUnsafe(17+n+4);Y(s,s.length-4,0),s[4]=Kr.STATUS,Y(s,t,5),Y(s,r,o),Y(s,n,o+=4),o+=4,n&&(s.utf8Write(i,o,n),o+=n),Y(s,0,o);let c=_t(this,s);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} STATUS`)}data(t,r,i){if(!this.server)throw new Error("Server-only method called in client mode");let n=Buffer.isBuffer(r);if(!n&&typeof r!="string")throw new Error("data is not a Buffer or string");let o;!n&&!i&&(i=void 0,o=!0);let s=n?r.length:Buffer.byteLength(r,i),c=9,u=Buffer.allocUnsafe(13+s);Y(u,u.length-4,0),u[4]=Kr.DATA,Y(u,t,5),Y(u,s,c),s&&(n?u.set(r,c+=4):o?u.utf8Write(r,c+=4,s):u.write(r,c+=4,s,i));let l=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} DATA`)}name(t,r){if(!this.server)throw new Error("Server-only method called in client mode");if(!Array.isArray(r)){if(typeof r!="object"||r===null)throw new Error("names is not an object or array");r=[r]}let i=r.length,n=0,o,s=[];for(let f=0;f<i;++f){let p=r[f],g=!p||!p.filename||typeof p.filename!="string"?"":p.filename;n+=4+Buffer.byteLength(g);let h=!p||!p.longname||typeof p.longname!="string"?"":p.longname;if(n+=4+Buffer.byteLength(h),typeof p.attrs=="object"&&p.attrs!==null){if(o=So(p.attrs),n+=4+o.nb,o.nb){let _;o.nb===He.length?_=new Uint8Array(He):(_=new Uint8Array(o.nb),Ri(He,_,0,o.nb,0)),o.bytes=_}s.push(o)}else n+=4,s.push(null)}let c=9,u=Buffer.allocUnsafe(13+n);Y(u,u.length-4,0),u[4]=Kr.NAME,Y(u,t,5),Y(u,i,c),c+=4;for(let f=0;f<i;++f){let p=r[f];{let h=!p||!p.filename||typeof p.filename!="string"?"":p.filename,_=Buffer.byteLength(h);Y(u,_,c),c+=4,_&&(u.utf8Write(h,c,_),c+=_)}{let h=!p||!p.longname||typeof p.longname!="string"?"":p.longname,_=Buffer.byteLength(h);Y(u,_,c),c+=4,_&&(u.utf8Write(h,c,_),c+=_)}let g=s[f];g?(Y(u,g.flags,c),c+=4,g.flags&&g.bytes&&(u.set(g.bytes,c),c+=g.nb)):(Y(u,0,c),c+=4)}let l=_t(this,u);this._debug&&this._debug(`SFTP: Outbound: ${l?"Buffered":"Sending"} NAME`)}attrs(t,r){if(!this.server)throw new Error("Server-only method called in client mode");if(typeof r!="object"||r===null)throw new Error("attrs is not an object");r=So(r);let i=r.flags,n=r.nb,o=9,s=Buffer.allocUnsafe(13+n);Y(s,s.length-4,0),s[4]=Kr.ATTRS,Y(s,t,5),Y(s,i,o),n&&(o+=4,n===He.length?s.set(He,o):Ri(He,s,0,n,o),o+=n);let c=_t(this,s);this._debug&&this._debug(`SFTP: Outbound: ${c?"Buffered":"Sending"} ATTRS`)}};function y2(e){try{return Buffer.allocUnsafe(e)}catch(t){return t}}a(y2,"tryCreateBuffer");function Gw(e,t,r,i,n,o,s,c){let u=e._maxReadLen,l=Math.max(n-u,0);l&&(n=u);let f=t.length,p=9,g=o,h=Buffer.allocUnsafe(13+f+8+4);Y(h,h.length-4,0),h[4]=Ue.READ;let _=e._writeReqid=e._writeReqid+1&Nt;Y(h,_,5),Y(h,f,p),h.set(t,p+=4),p+=f;for(let S=7;S>=0;--S)h[p+S]=g&255,g/=256;Y(h,n,p+=8),typeof s!="function"&&(s=Qw);let y=c||{nb:0,position:o,off:i,origOff:i,len:void 0,overflow:void 0,cb:a((S,v,M)=>{let R=y.len,J=y.overflow;if(S){if(s._wantEOFError||S.code!==xt.EOF)return s(S)}else{if(M>R)return s(new Error("Received more data than requested"));if(M===R&&J){y.nb+=M,y.position+=M,y.off+=M,Gw(e,t,r,y.off,J,y.position,s,y);return}}M=M||0,y.origOff===0&&r.length===y.nb?v=r:v=Ms(r,y.origOff,y.origOff+y.nb+M),s(void 0,y.nb+M,v,y.position)},"cb"),buffer:void 0};y.len=n,y.overflow=l,y.buffer=Ms(r,i,i+n),e._requests[_]=y;let b=_t(e,h);e._debug&&e._debug(`SFTP: Outbound: ${b?"Buffered":"Sending"} READ`)}a(Gw,"read_");function Hw(e,t,r,i,n,o){let s=64,c=32768,u,l,f;typeof n=="function"?o=n:typeof n=="object"&&n!==null&&(typeof n.concurrency=="number"&&n.concurrency>0&&!isNaN(n.concurrency)&&(s=n.concurrency),typeof n.chunkSize=="number"&&n.chunkSize>0&&!isNaN(n.chunkSize)&&(c=n.chunkSize),typeof n.fileSize=="number"&&n.fileSize>0&&!isNaN(n.fileSize)&&(f=n.fileSize),typeof n.step=="function"&&(u=n.step),(typeof n.mode=="string"||typeof n.mode=="number")&&(l=yA(n.mode)));let p,g=0,h=0,_=!1,y,b,S,v=c*s;function M(R){if(_)return;_=!0;let J=0,te;y||b?(te=a(()=>{--J===0&&o(R)},"cbfinal"),y&&(e===Oi||e.outgoing.state==="open")&&++J,b&&(t===Oi||t.outgoing.state==="open")&&++J,y&&(e===Oi||e.outgoing.state==="open")&&e.close(y,te),b&&(t===Oi||t.outgoing.state==="open")&&t.close(b,te)):o(R)}a(M,"onerror"),e.open(r,"r",(R,J)=>{if(R)return M(R);y=J,f===void 0?e.fstat(y,te):te(null,{size:f});function te(ee,P){if(ee){if(e!==Oi){e.stat(r,(C,H)=>{if(C)return M(ee);te(null,H)});return}return M(ee)}p=P.size,t.open(i,"w",(C,H)=>{if(C)return M(C);if(b=H,p<=0)return M();for(;v>p;){if(s===1){v=p;break}v-=c,--s}if(S=y2(v),S instanceof Error)return M(S);l!==void 0?t.fchmod(b,l,a(function L(X){if(X){t.chmod(i,l,ne=>L());return}W()},"tryAgain")):W();function U(L,X,ne,O,q,V){if(L)return M(L);q=q||0,t.write(b,S,q,X,O,re);function re(_e){if(_e)return M(_e);if(h+=X,u&&u(h,X,p),X<V)return j(q,O+X,V-X);if(h===p){t.close(b,xe=>{if(b=void 0,xe)return M(xe);e.close(y,Tt=>{if(y=void 0,Tt)return M(Tt);o()})});return}if(g>=p)return;let Se=g+c>p?p-g:c;j(q,g,Se),g+=Se}a(re,"writeCb")}a(U,"onread");function k(L,X,ne){return(O,q,V)=>{U(O,q,V,X,L,ne)}}a(k,"makeCb");function j(L,X,ne){e.read(y,S,L,ne,X,k(L,X,ne))}a(j,"singleRead");function W(){let L=0,X=0;for(;g<p&&L<s;){let ne=g+c>p?p-g:c;j(X,g,ne),X+=ne,g+=ne,++L}}a(W,"startReads")})}a(te,"tryStat")})}a(Hw,"fastXfer");function pA(e,t,r,i,n,o,s){let c=typeof s=="function"?s:void 0;e.write(t,r,i,n,o,(u,l)=>{if(u)return e.close(t,()=>{c&&c(u)});l===n?e.close(t,c):(i+=l,n-=l,o+=l,pA(e,t,r,i,n,o,c))})}a(pA,"writeAll");var Ip=class{static{a(this,"Stats")}constructor(t){this.mode=t&&t.mode,this.uid=t&&t.uid,this.gid=t&&t.gid,this.size=t&&t.size,this.atime=t&&t.atime,this.mtime=t&&t.mtime,this.extended=t&&t.extended}isDirectory(){return(this.mode&Gr.S_IFMT)===Gr.S_IFDIR}isFile(){return(this.mode&Gr.S_IFMT)===Gr.S_IFREG}isBlockDevice(){return(this.mode&Gr.S_IFMT)===Gr.S_IFBLK}isCharacterDevice(){return(this.mode&Gr.S_IFMT)===Gr.S_IFCHR}isSymbolicLink(){return(this.mode&Gr.S_IFMT)===Gr.S_IFLNK}isFIFO(){return(this.mode&Gr.S_IFMT)===Gr.S_IFIFO}isSocket(){return(this.mode&Gr.S_IFMT)===Gr.S_IFSOCK}};function So(e){let t=0,r=0;if(typeof e=="object"&&e!==null){if(typeof e.size=="number"){t|=ri.SIZE;let i=e.size;He[r++]=i/72057594037927940,He[r++]=i/281474976710656,He[r++]=i/1099511627776,He[r++]=i/4294967296,He[r++]=i/16777216,He[r++]=i/65536,He[r++]=i/256,He[r++]=i}if(typeof e.uid=="number"&&typeof e.gid=="number"){t|=ri.UIDGID;let i=e.uid,n=e.gid;He[r++]=i>>>24,He[r++]=i>>>16,He[r++]=i>>>8,He[r++]=i,He[r++]=n>>>24,He[r++]=n>>>16,He[r++]=n>>>8,He[r++]=n}if(typeof e.mode=="number"||typeof e.mode=="string"){let i=yA(e.mode);t|=ri.PERMISSIONS,He[r++]=i>>>24,He[r++]=i>>>16,He[r++]=i>>>8,He[r++]=i}if((typeof e.atime=="number"||fA(e.atime))&&(typeof e.mtime=="number"||fA(e.mtime))){let i=zs(e.atime),n=zs(e.mtime);t|=ri.ACMODTIME,He[r++]=i>>>24,He[r++]=i>>>16,He[r++]=i>>>8,He[r++]=i,He[r++]=n>>>24,He[r++]=n>>>16,He[r++]=n>>>8,He[r++]=n}}return{flags:t,nb:r}}a(So,"attrsToBytes");function zs(e){if(typeof e=="number"&&e===e)return e;if(fA(e))return parseInt(e.getTime()/1e3,10);throw new Error(`Cannot parse time: ${e}`)}a(zs,"toUnixTimestamp");function yA(e){if(typeof e=="number"&&e===e)return e;if(typeof e=="string")return yA(parseInt(e,8));throw new Error(`Cannot parse mode: ${e}`)}a(yA,"modeNum");var hA={r:$e.READ,"r+":$e.READ|$e.WRITE,w:$e.TRUNC|$e.CREAT|$e.WRITE,wx:$e.TRUNC|$e.CREAT|$e.WRITE|$e.EXCL,xw:$e.TRUNC|$e.CREAT|$e.WRITE|$e.EXCL,"w+":$e.TRUNC|$e.CREAT|$e.READ|$e.WRITE,"wx+":$e.TRUNC|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL,"xw+":$e.TRUNC|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL,a:$e.APPEND|$e.CREAT|$e.WRITE,ax:$e.APPEND|$e.CREAT|$e.WRITE|$e.EXCL,xa:$e.APPEND|$e.CREAT|$e.WRITE|$e.EXCL,"a+":$e.APPEND|$e.CREAT|$e.READ|$e.WRITE,"ax+":$e.APPEND|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL,"xa+":$e.APPEND|$e.CREAT|$e.READ|$e.WRITE|$e.EXCL};function Kw(e){let t=hA[e];return t!==void 0?t:null}a(Kw,"stringToFlags");var E2=(()=>{let e=Object.keys(hA);return t=>{for(let r=0;r<e.length;++r){let i=e[r];if(hA[i]===t)return i}return null}})();function Us(e){let t=z.readUInt32BE();if(t===void 0)return;let r=new Ip;if(t&ri.SIZE){let i=z.readUInt64BE(e);if(i===void 0)return;r.size=i}if(t&ri.UIDGID){let i=z.readUInt32BE(),n=z.readUInt32BE();if(n===void 0)return;r.uid=i,r.gid=n}if(t&ri.PERMISSIONS){let i=z.readUInt32BE();if(i===void 0)return;r.mode=i}if(t&ri.ACMODTIME){let i=z.readUInt32BE(),n=z.readUInt32BE();if(n===void 0)return;r.atime=i,r.mtime=n}if(t&ri.EXTENDED){let i=z.readUInt32BE();if(i===void 0)return;let n={};for(let o=0;o<i;++o){let s=z.readString(!0),c=z.readString();if(c===void 0)return;n[s]=c}r.extended=n}return r}a(Us,"readAttrs");function _t(e,t){let r=Yw(e,t);return r!==void 0?(e._buffer.push(r),!1):!0}a(_t,"sendOrBuffer");function Yw(e,t){let r=e.outgoing;if(r.state!=="open")return;if(r.window===0)return e._waitWindow=!0,e._chunkcb=jw,t;let i,n=t.length,o=0;for(;n-o>0&&r.window>0;){let s=Math.min(n-o,r.window,r.packetSize);r.window-=s,r.window===0&&(e._waitWindow=!0,e._chunkcb=jw),o===0&&s===n?e._protocol.channelData(e.outgoing.id,t):e._protocol.channelData(e.outgoing.id,Ms(t,o,o+s)),o+=s}return n-o>0&&(o>0?i=Ms(t,o,n):i=t),i}a(Yw,"tryWritePayload");function jw(){this._chunkcb=void 0;let e=this._buffer,t=0;for(;t<e.length;){let r=e[t],i=Yw(this,r);if(i!==void 0){i!==r&&(e[t]=i),t>0&&(this._buffer=e.slice(t));return}++t}t>0&&(this._buffer=[])}a(jw,"drainBuffer");function wt(e,t,r){let i=new Error(t);return i.level="sftp-protocol",!r&&e._debug&&e._debug(`SFTP: Inbound: ${t}`),e.emit("error",i),e.destroy(),Xw(e),!1}a(wt,"doFatalSFTPError");function Xw(e){let t=Object.keys(e._requests);if(t.length===0)return;let r=e._requests;e._requests={};let i=new Error("No response from server");for(let n=0;n<t.length;++n){let o=r[t[n]];typeof o.cb=="function"&&o.cb(i)}}a(Xw,"cleanupRequests");function A2(e,t){let r=9,i=Buffer.allocUnsafe(31);Y(i,i.length-4,0),i[4]=Ue.EXTENDED;let n=e._writeReqid=e._writeReqid+1&Nt;Y(i,n,5),Y(i,18,r),i.utf8Write("limits@openssh.com",r+=4,18),e._requests[n]={extended:"limits@openssh.com",cb:t};let o=_t(e,i);if(e._debug){let s=o?"Buffered":"Sending";e._debug(`SFTP: Outbound: ${s} limits@openssh.com`)}}a(A2,"requestLimits");var b2={[Kr.VERSION]:(e,t)=>{if(e._version!==-1)return wt(e,"Duplicate VERSION packet");let r={};z.init(t,1);let i=z.readUInt32BE();for(;z.avail();){let n=z.readString(!0),o=z.readString(!0);if(o===void 0){i=void 0;break}r[n]=o}if(z.clear(),i===void 0)return wt(e,"Malformed VERSION packet");if(e._debug){let n=Object.keys(r);n.length?e._debug(`SFTP: Inbound: Received VERSION (v${i}, exts:${n})`):e._debug(`SFTP: Inbound: Received VERSION (v${i})`)}if(e._version=i,e._extensions=r,r["limits@openssh.com"]==="1")return A2(e,(n,o)=>{n||(o.maxPktLen>0&&(e._maxOutPktLen=o.maxPktLen),o.maxReadLen>0&&(e._maxReadLen=o.maxReadLen),o.maxWriteLen>0&&(e._maxWriteLen=o.maxWriteLen),e.maxOpenHandles=o.maxOpenHandles>0?o.maxOpenHandles:1/0),e.emit("ready")});e.emit("ready")},[Kr.STATUS]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readUInt32BE(),n=z.readString(!0);if(z.clear(),e._debug){let s=JSON.stringify(n);e._debug(`SFTP: Inbound: Received STATUS (id:${r}, ${i}, ${s})`)}let o=e._requests[r];if(delete e._requests[r],o&&typeof o.cb=="function"){if(i===xt.OK){o.cb();return}let s=new Error(n||p2[i]||"Unknown status");s.code=i,o.cb(s)}},[Kr.HANDLE]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString();if(z.clear(),i===void 0)return r!==void 0&&delete e._requests[r],wt(e,"Malformed HANDLE packet");e._debug&&e._debug(`SFTP: Inbound: Received HANDLE (id:${r})`);let n=e._requests[r];delete e._requests[r],n&&typeof n.cb=="function"&&n.cb(void 0,i)},[Kr.DATA]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i;if(r!==void 0&&(i=e._requests[r],delete e._requests[r]),i&&typeof i.cb=="function")if(i.buffer){let n=z.readString(i.buffer);if(z.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${r}, ${n})`),i.cb(void 0,i.buffer,n);return}}else{let n=z.readString();if(z.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${r}, ${n.length})`),i.cb(void 0,n);return}}else{let n=z.skipString();if(z.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received DATA (id:${r}, ${n})`);return}}return wt(e,"Malformed DATA packet")},[Kr.NAME]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i;r!==void 0&&(i=e._requests[r],delete e._requests[r]);let n=z.readUInt32BE();if(n!==void 0){let o=[];for(let s=0;s<n;++s){let c=z.readString(!0),u=z.readString(!0),l=Us(e._biOpt);if(l===void 0){o=void 0;break}o.push({filename:c,longname:u,attrs:l})}if(o!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received NAME (id:${r}, ${o.length})`),z.clear(),i&&typeof i.cb=="function"&&i.cb(void 0,o);return}}return z.clear(),wt(e,"Malformed NAME packet")},[Kr.ATTRS]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i;r!==void 0&&(i=e._requests[r],delete e._requests[r]);let n=Us(e._biOpt);if(z.clear(),n!==void 0){e._debug&&e._debug(`SFTP: Inbound: Received ATTRS (id:${r})`),i&&typeof i.cb=="function"&&i.cb(void 0,n);return}return wt(e,"Malformed ATTRS packet")},[Kr.EXTENDED]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE();if(r!==void 0){let i=e._requests[r];if(i)switch(delete e._requests[r],i.extended){case"statvfs@openssh.com":case"fstatvfs@openssh.com":{let n=e._biOpt,o={f_bsize:z.readUInt64BE(n),f_frsize:z.readUInt64BE(n),f_blocks:z.readUInt64BE(n),f_bfree:z.readUInt64BE(n),f_bavail:z.readUInt64BE(n),f_files:z.readUInt64BE(n),f_ffree:z.readUInt64BE(n),f_favail:z.readUInt64BE(n),f_sid:z.readUInt64BE(n),f_flag:z.readUInt64BE(n),f_namemax:z.readUInt64BE(n)};if(o.f_namemax===void 0)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${i.extended})`),z.clear(),typeof i.cb=="function"&&i.cb(void 0,o);return}case"limits@openssh.com":{let n={maxPktLen:z.readUInt64BE(),maxReadLen:z.readUInt64BE(),maxWriteLen:z.readUInt64BE(),maxOpenHandles:z.readUInt64BE()};if(n.maxOpenHandles===void 0)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${i.extended})`),z.clear(),typeof i.cb=="function"&&i.cb(void 0,n);return}case"users-groups-by-id@openssh.com":{let n=z.readUInt32BE();if(n===void 0)break;let o=new Array(n);for(let u=0;u<o.length;++u)o[u]=z.readString(!0);let s=z.readUInt32BE();if(s===void 0)break;let c=new Array(s);for(let u=0;u<c.length;++u)c[u]=z.readString(!0);if(c.length>0&&c[c.length-1]===void 0)break;e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ${i.extended})`),z.clear(),typeof i.cb=="function"&&i.cb(void 0,o,c);return}default:e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ???)`),z.clear(),typeof i.cb=="function"&&i.cb();return}else{e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED_REPLY (id:${r}, ???)`),z.clear();return}}return z.clear(),wt(e,"Malformed EXTENDED_REPLY packet")}},x2={[Ue.INIT]:(e,t)=>{if(e._version!==-1)return wt(e,"Duplicate INIT packet");let r={};z.init(t,1);let i=z.readUInt32BE();for(;z.avail();){let n=z.readString(!0),o=z.readString(!0);if(o===void 0){i=void 0;break}r[n]=o}if(z.clear(),i===void 0)return wt(e,"Malformed INIT packet");if(e._debug){let n=Object.keys(r);n.length?e._debug(`SFTP: Inbound: Received INIT (v${i}, exts:${n})`):e._debug(`SFTP: Inbound: Received INIT (v${i})`)}_t(e,g2),e._version=i,e._extensions=r,e.emit("ready")},[Ue.OPEN]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0),n=z.readUInt32BE(),o=Us(e._biOpt);if(z.clear(),o===void 0)return wt(e,"Malformed OPEN packet");e._debug&&e._debug(`SFTP: Inbound: Received OPEN (id:${r})`),e.emit("OPEN",r,i,n,o)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.CLOSE]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString();if(z.clear(),i===void 0||i.length>256)return wt(e,"Malformed CLOSE packet");e._debug&&e._debug(`SFTP: Inbound: Received CLOSE (id:${r})`),e.emit("CLOSE",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.READ]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(),n=z.readUInt64BE(e._biOpt),o=z.readUInt32BE();if(z.clear(),o===void 0||i.length>256)return wt(e,"Malformed READ packet");e._debug&&e._debug(`SFTP: Inbound: Received READ (id:${r})`),e.emit("READ",r,i,n,o)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.WRITE]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(),n=z.readUInt64BE(e._biOpt),o=z.readString();if(z.clear(),o===void 0||i.length>256)return wt(e,"Malformed WRITE packet");e._debug&&e._debug(`SFTP: Inbound: Received WRITE (id:${r})`),e.emit("WRITE",r,i,n,o)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.LSTAT]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed LSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received LSTAT (id:${r})`),e.emit("LSTAT",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.FSTAT]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString();if(z.clear(),i===void 0||i.length>256)return wt(e,"Malformed FSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received FSTAT (id:${r})`),e.emit("FSTAT",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.SETSTAT]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0),n=Us(e._biOpt);if(z.clear(),n===void 0)return wt(e,"Malformed SETSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received SETSTAT (id:${r})`),e.emit("SETSTAT",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.FSETSTAT]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(),n=Us(e._biOpt);if(z.clear(),n===void 0||i.length>256)return wt(e,"Malformed FSETSTAT packet");e._debug&&e._debug(`SFTP: Inbound: Received FSETSTAT (id:${r})`),e.emit("FSETSTAT",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.OPENDIR]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed OPENDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received OPENDIR (id:${r})`),e.emit("OPENDIR",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.READDIR]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString();if(z.clear(),i===void 0||i.length>256)return wt(e,"Malformed READDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received READDIR (id:${r})`),e.emit("READDIR",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.REMOVE]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed REMOVE packet");e._debug&&e._debug(`SFTP: Inbound: Received REMOVE (id:${r})`),e.emit("REMOVE",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.MKDIR]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0),n=Us(e._biOpt);if(z.clear(),n===void 0)return wt(e,"Malformed MKDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received MKDIR (id:${r})`),e.emit("MKDIR",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.RMDIR]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed RMDIR packet");e._debug&&e._debug(`SFTP: Inbound: Received RMDIR (id:${r})`),e.emit("RMDIR",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.REALPATH]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed REALPATH packet");e._debug&&e._debug(`SFTP: Inbound: Received REALPATH (id:${r})`),e.emit("REALPATH",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.STAT]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed STAT packet");e._debug&&e._debug(`SFTP: Inbound: Received STAT (id:${r})`),e.emit("STAT",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.RENAME]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0),n=z.readString(!0);if(z.clear(),n===void 0)return wt(e,"Malformed RENAME packet");e._debug&&e._debug(`SFTP: Inbound: Received RENAME (id:${r})`),e.emit("RENAME",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.READLINK]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(z.clear(),i===void 0)return wt(e,"Malformed READLINK packet");e._debug&&e._debug(`SFTP: Inbound: Received READLINK (id:${r})`),e.emit("READLINK",r,i)||e.status(r,xt.OP_UNSUPPORTED)},[Ue.SYMLINK]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0),n=z.readString(!0);if(z.clear(),n===void 0)return wt(e,"Malformed SYMLINK packet");e._debug&&e._debug(`SFTP: Inbound: Received SYMLINK (id:${r})`);let o;e._isOpenSSH?o=e.emit("SYMLINK",r,n,i):o=e.emit("SYMLINK",r,i,n),o||e.status(r,xt.OP_UNSUPPORTED)},[Ue.EXTENDED]:(e,t)=>{z.init(t,1);let r=z.readUInt32BE(),i=z.readString(!0);if(i===void 0)return z.clear(),wt(e,"Malformed EXTENDED packet");let n;z.avail()&&(n=z.readRaw()),z.clear(),e._debug&&e._debug(`SFTP: Inbound: Received EXTENDED (id:${r})`),e.emit("EXTENDED",r,i,n)||e.status(r,xt.OP_UNSUPPORTED)}},{ERR_INVALID_ARG_TYPE:I2,ERR_OUT_OF_RANGE:xp,validateNumber:S2}=Mw(),Ww=128,Fr,gA=[];function v2(e){gA.length>0?Fr=gA.pop():Fr=Buffer.allocUnsafe(e),Fr.used=0}a(v2,"allocNewPool");function mA(e,t){if(!Number.isSafeInteger(e))throw S2(e,t),Number.isInteger(e)?new xp(t,">= 0 and <= 2 ** 53 - 1",e):new xp(t,"an integer",e);if(e<0)throw new xp(t,">= 0 and <= 2 ** 53 - 1",e)}a(mA,"checkPosition");function lA(e){return e+7&-8}a(lA,"roundUpToMultipleOf8");function ni(e,t,r){if(r===void 0)r={};else if(typeof r=="string")r={encoding:r};else{if(r===null||typeof r!="object")throw new TypeError('"options" argument must be a string or an object');r=Object.create(r)}if(r.highWaterMark===void 0&&(r.highWaterMark=64*1024),r.emitClose=!1,r.autoDestroy=!1,Vw.call(this,r),this.path=t,this.flags=r.flags===void 0?"r":r.flags,this.mode=r.mode===void 0?438:r.mode,this.start=r.start,this.end=r.end,this.autoClose=r.autoClose===void 0?!0:r.autoClose,this.pos=0,this.bytesRead=0,this.isClosed=!1,this.handle=r.handle===void 0?null:r.handle,this.sftp=e,this._opening=!1,this.start!==void 0&&(mA(this.start,"start"),this.pos=this.start),this.end===void 0)this.end=1/0;else if(this.end!==1/0&&(mA(this.end,"end"),this.start!==void 0&&this.start>this.end))throw new xp("start",`<= "end" (here: ${this.end})`,this.start);this.on("end",function(){this.autoClose&&this.destroy()}),Buffer.isBuffer(this.handle)||this.open()}a(ni,"ReadStream");Zw(ni,Vw);ni.prototype.open=function(){this._opening||(this._opening=!0,this.sftp.open(this.path,this.flags,this.mode,(e,t)=>{if(this._opening=!1,e){this.emit("error",e),this.autoClose&&this.destroy();return}this.handle=t,this.emit("open",t),this.emit("ready"),this.read()}))};ni.prototype._read=function(e){if(!Buffer.isBuffer(this.handle))return this.once("open",()=>this._read(e));if(this.destroyed)return;(!Fr||Fr.length-Fr.used<Ww)&&v2(this.readableHighWaterMark||this._readableState.highWaterMark);let t=Fr,r=Math.min(Fr.length-Fr.used,e),i=Fr.used;if(this.end!==void 0&&(r=Math.min(this.end-this.pos+1,r)),r<=0)return this.push(null);this.sftp.read(this.handle,Fr,Fr.used,r,this.pos,(n,o)=>{if(n){this.emit("error",n),this.autoClose&&this.destroy();return}let s=null;if(i+r===t.used&&t===Fr)t.used=lA(t.used+o-r);else{let c=i+r&-8,u=lA(i+o);c-u>=Ww&&gA.push(t.slice(u,c))}o>0&&(this.bytesRead+=o,s=t.slice(i,i+o)),this.pos+=o,this.push(s)}),Fr.used=lA(Fr.used+r)};ni.prototype._destroy=function(e,t){if(this._opening&&!Buffer.isBuffer(this.handle)){this.once("open",qw.bind(null,this,t,e));return}qw(this,t,e),this.handle=null,this._opening=!1};function qw(e,t,r){if(!e.handle)return i();e.sftp.close(e.handle,i);function i(n){n=n||r,t(n),e.isClosed=!0,n||e.emit("close")}a(i,"onclose")}a(qw,"closeStream");ni.prototype.close=function(e){this.destroy(null,e)};Object.defineProperty(ni.prototype,"pending",{get(){return this.handle===null},configurable:!0});function gn(e,t,r){if(r===void 0)r={};else if(typeof r=="string")r={encoding:r};else{if(r===null||typeof r!="object")throw new TypeError('"options" argument must be a string or an object');r=Object.create(r)}r.emitClose=!1,r.autoDestroy=!1,_A.call(this,r),this.path=t,this.flags=r.flags===void 0?"w":r.flags,this.mode=r.mode===void 0?438:r.mode,this.start=r.start,this.autoClose=r.autoClose===void 0?!0:r.autoClose,this.pos=0,this.bytesWritten=0,this.isClosed=!1,this.handle=r.handle===void 0?null:r.handle,this.sftp=e,this._opening=!1,this.start!==void 0&&(mA(this.start,"start"),this.pos=this.start),r.encoding&&this.setDefaultEncoding(r.encoding),this.on("finish",function(){this._writableState.finalCalled||this.autoClose&&this.destroy()}),Buffer.isBuffer(this.handle)||this.open()}a(gn,"WriteStream");Zw(gn,_A);gn.prototype._final=function(e){this.autoClose&&this.destroy(),e()};gn.prototype.open=function(){this._opening||(this._opening=!0,this.sftp.open(this.path,this.flags,this.mode,(e,t)=>{if(this._opening=!1,e){this.emit("error",e),this.autoClose&&this.destroy();return}this.handle=t;let r=a(i=>{if(i){this.sftp.chmod(this.path,this.mode,n=>r());return}if(this.flags[0]==="a"){let n=a((o,s)=>{if(o){this.sftp.stat(this.path,(c,u)=>{if(c){this.destroy(),this.emit("error",o);return}n(null,u)});return}this.pos=s.size,this.emit("open",t),this.emit("ready")},"tryStat");this.sftp.fstat(t,n);return}this.emit("open",t),this.emit("ready")},"tryAgain");this.sftp.fchmod(t,this.mode,r)}))};gn.prototype._write=function(e,t,r){if(!Buffer.isBuffer(e)){let i=new I2("data","Buffer",e);return this.emit("error",i)}if(!Buffer.isBuffer(this.handle))return this.once("open",function(){this._write(e,t,r)});this.sftp.write(this.handle,e,0,e.length,this.pos,(i,n)=>{if(i)return this.autoClose&&this.destroy(),r(i);this.bytesWritten+=n,r()}),this.pos+=e.length};gn.prototype._writev=function(e,t){if(!Buffer.isBuffer(this.handle))return this.once("open",function(){this._writev(e,t)});let r=this.sftp,i=this.handle,n=e.length,o=a((s,c)=>{if(s)return this.destroy(),t(s);this.bytesWritten+=c,--n===0&&t()},"onwrite");for(let s=0;s<e.length;++s){let c=e[s].chunk;r.write(i,c,0,c.length,this.pos,o),this.pos+=c.length}};typeof _A.prototype.destroy!="function"&&(gn.prototype.destroy=ni.prototype.destroy);gn.prototype._destroy=ni.prototype._destroy;gn.prototype.close=function(e){if(e){if(this.isClosed){process.nextTick(e);return}this.on("close",e)}this.autoClose||this.on("finish",this.destroy.bind(this)),this.end()};gn.prototype.destroySoon=gn.prototype.end;Object.defineProperty(gn.prototype,"pending",{get(){return this.handle===null},configurable:!0});Jw.exports={flagsToString:E2,OPEN_MODE:$e,SFTP:dA,Stats:Ip,STATUS_CODE:xt,stringToFlags:Kw}});var SA=me((x7,nP)=>{"use strict";var{Duplex:w2,Readable:P2,Writable:T2}=require("stream"),{CHANNEL_EXTENDED_DATATYPE:{STDERR:eP}}=Jn(),{bufferSlice:Sp}=Sn(),k2=32*1024,ku=2*1024*1024,xA=ku/2,EA=class extends P2{static{a(this,"ClientStderr")}constructor(t,r){super(r),this._channel=t}_read(t){this._channel._waitChanDrain&&(this._channel._waitChanDrain=!1,this._channel.incoming.window<=xA&&IA(this._channel))}},AA=class extends T2{static{a(this,"ServerStderr")}constructor(t){super({highWaterMark:ku}),this._channel=t}_write(t,r,i){let n=this._channel,o=n._client._protocol,s=n.outgoing,c=s.packetSize,u=s.id,l=s.window,f=t.length,p=0;if(s.state==="open"){for(;f-p>0&&l>0;){let g=f-p;g>l&&(g=l),g>c&&(g=c),p===0&&g===f?o.channelExtData(u,t,eP):o.channelExtData(u,Sp(t,p,p+g),eP),p+=g,l-=g}if(s.window=l,f-p>0){l===0&&(n._waitWindow=!0),p>0?n._chunkErr=Sp(t,p,f):n._chunkErr=t,n._chunkcbErr=i;return}i()}}},bA=class extends w2{static{a(this,"Channel")}constructor(t,r,i){let n={highWaterMark:ku,allowHalfOpen:!i||i&&i.allowHalfOpen!==!1,emitClose:!1};super(n),this.allowHalfOpen=n.allowHalfOpen;let o=!!(i&&i.server);this.server=o,this.type=r.type,this.subtype=void 0,this.incoming=r.incoming,this.outgoing=r.outgoing,this._callbacks=[],this._client=t,this._hasX11=!1,this._exit={code:void 0,signal:void 0,dump:void 0,desc:void 0},this.stdin=this.stdout=this,o?this.stderr=new AA(this):this.stderr=new EA(this,n),this._waitWindow=!1,this._waitChanDrain=!1,this._chunk=void 0,this._chunkcb=void 0,this._chunkErr=void 0,this._chunkcbErr=void 0,this.on("finish",tP).on("prefinish",tP),this.on("end",rP).on("close",rP)}_read(t){this._waitChanDrain&&(this._waitChanDrain=!1,this.incoming.window<=xA&&IA(this))}_write(t,r,i){let n=this._client._protocol,o=this.outgoing,s=o.packetSize,c=o.id,u=o.window,l=t.length,f=0;if(o.state==="open"){for(;l-f>0&&u>0;){let p=l-f;p>u&&(p=u),p>s&&(p=s),f===0&&p===l?n.channelData(c,t):n.channelData(c,Sp(t,f,f+p)),f+=p,u-=p}if(o.window=u,l-f>0){u===0&&(this._waitWindow=!0),f>0?this._chunk=Sp(t,f,l):this._chunk=t,this._chunkcb=i;return}i()}}eof(){this.outgoing.state==="open"&&(this.outgoing.state="eof",this._client._protocol.channelEOF(this.outgoing.id))}close(){(this.outgoing.state==="open"||this.outgoing.state==="eof")&&(this.outgoing.state="closing",this._client._protocol.channelClose(this.outgoing.id))}destroy(){return this.end(),this.close(),this}setWindow(t,r,i,n){if(this.server)throw new Error("Client-only method called in server mode");this.type==="session"&&(this.subtype==="shell"||this.subtype==="exec")&&this.writable&&this.outgoing.state==="open"&&this._client._protocol.windowChange(this.outgoing.id,t,r,i,n)}signal(t){if(this.server)throw new Error("Client-only method called in server mode");this.type==="session"&&this.writable&&this.outgoing.state==="open"&&this._client._protocol.signal(this.outgoing.id,t)}exit(t,r,i){if(!this.server)throw new Error("Server-only method called in client mode");this.type==="session"&&this.writable&&this.outgoing.state==="open"&&(typeof t=="number"?this._client._protocol.exitStatus(this.outgoing.id,t):this._client._protocol.exitSignal(this.outgoing.id,t,r,i))}};function tP(){this.eof(),(this.server||!this.allowHalfOpen)&&this.close(),this.writable=!1}a(tP,"onFinish");function rP(){this.readable=!1}a(rP,"onEnd");function IA(e){if(e.outgoing.state==="closed")return;let t=ku-e.incoming.window;t<=0||(e.incoming.window+=t,e._client._protocol.channelWindowAdjust(e.outgoing.id,t))}a(IA,"windowAdjust");nP.exports={Channel:bA,MAX_WINDOW:ku,PACKET_SIZE:k2,windowAdjust:IA,WINDOW_THRESHOLD:xA}});var PA=me((S7,sP)=>{"use strict";var{SFTP:C2}=Tu(),Cu=2**32-1;function iP(e,t,r,i){if(e._chanMgr.remove(t),typeof i!="function")return;let n;r instanceof Error?n=r:typeof r=="object"&&r!==null?(n=new Error(`(SSH) Channel open failure: ${r.description}`),n.reason=r.reason):(n=new Error("(SSH) Channel open failure: server closed channel unexpectedly"),n.reason=""),i(n)}a(iP,"onChannelOpenFailure");function oP(e,t,r,i,n){if(typeof r=="function"){iP(e,t,i,r);return}if(typeof r!="object"||r===null||r.incoming&&r.incoming.state==="closed"||(e._chanMgr.remove(t),r.server&&r.constructor.name==="Session"))return;r.incoming.state="closed",r.readable&&r.push(null),r.server?r.stderr.writable&&r.stderr.end():r.stderr.readable&&r.stderr.push(null),r.constructor!==C2&&(r.outgoing.state==="open"||r.outgoing.state==="eof")&&!n&&r.close(),r.outgoing.state==="closing"&&(r.outgoing.state="closed");let o=r._readableState,s=r._writableState;s&&!s.ending&&!s.finished&&!n&&r.end();let c=r._callbacks;r._callbacks=[];for(let u=0;u<c.length;++u)c[u](!0);if(r.server)!r.readable||r.destroyed||o&&o.endEmitted?r.emit("close"):r.once("end",()=>r.emit("close"));else{let u;switch(r.type){case"direct-streamlocal@openssh.com":case"direct-tcpip":u=a(()=>r.emit("close"),"doClose");break;default:{let f=r._exit;u=a(()=>{f.code===null?r.emit("close",f.code,f.signal,f.dump,f.desc):r.emit("close",f.code)},"doClose")}}!r.readable||r.destroyed||o&&o.endEmitted?u():r.once("end",u);let l=r.stderr._readableState;!r.stderr.readable||r.stderr.destroyed||l&&l.endEmitted?r.stderr.emit("close"):r.stderr.once("end",()=>r.stderr.emit("close"))}}a(oP,"onCHANNEL_CLOSE");var wA=class{static{a(this,"ChannelManager")}constructor(t){this._client=t,this._channels={},this._cur=-1,this._count=0}add(t){let r;if(this._cur<Cu)r=++this._cur;else if(this._count===0)this._cur=0,r=0;else{let i=this._channels;for(let n=0;n<Cu;++n)if(i[n]===void 0){r=n;break}}return r===void 0?-1:(this._channels[r]=t||!0,++this._count,r)}update(t,r){if(typeof t!="number"||t<0||t>=Cu||!isFinite(t))throw new Error(`Invalid channel id: ${t}`);r&&this._channels[t]&&(this._channels[t]=r)}get(t){if(typeof t!="number"||t<0||t>=Cu||!isFinite(t))throw new Error(`Invalid channel id: ${t}`);return this._channels[t]}remove(t){if(typeof t!="number"||t<0||t>=Cu||!isFinite(t))throw new Error(`Invalid channel id: ${t}`);this._channels[t]&&(delete this._channels[t],this._count&&--this._count)}cleanup(t){let r=this._channels;this._channels={},this._cur=-1,this._count=0;let i=Object.keys(r),n=this._client;for(let o=0;o<i.length;++o){let s=+i[o],c=r[s];oP(n,s,c._channel||c,t,!0)}}},vA=(()=>{let e=Object.prototype.toString;return t=>e.call(t)==="[object RegExp]"})();function R2(e,t,r){if(Array.isArray(e)&&e.length>0){for(let i=0;i<e.length;++i)if(r.indexOf(e[i])===-1)throw new Error(`Unsupported algorithm: ${e[i]}`);return e}if(typeof e=="object"&&e!==null){let i=Object.keys(e),n=t;for(let o=0;o<i.length;++o){let s=i[o],c=e[s];switch(s){case"append":if(Array.isArray(c)||(c=[c]),Array.isArray(c))for(let u=0;u<c.length;++u){let l=c[u];if(typeof l=="string"){if(!l||n.indexOf(l)!==-1)continue;if(r.indexOf(l)===-1)throw new Error(`Unsupported algorithm: ${l}`);n===t&&(n=n.slice()),n.push(l)}else if(vA(l))for(let f=0;f<r.length;++f){let p=r[f];if(l.test(p)){if(n.indexOf(p)!==-1)continue;n===t&&(n=n.slice()),n.push(p)}}}break;case"prepend":if(Array.isArray(c)||(c=[c]),Array.isArray(c))for(let u=c.length;u>=0;--u){let l=c[u];if(typeof l=="string"){if(!l||n.indexOf(l)!==-1)continue;if(r.indexOf(l)===-1)throw new Error(`Unsupported algorithm: ${l}`);n===t&&(n=n.slice()),n.unshift(l)}else if(vA(l))for(let f=r.length;f>=0;--f){let p=r[f];if(l.test(p)){if(n.indexOf(p)!==-1)continue;n===t&&(n=n.slice()),n.unshift(p)}}}break;case"remove":if(Array.isArray(c)||(c=[c]),Array.isArray(c))for(let u=0;u<c.length;++u){let l=c[u];if(typeof l=="string"){if(!l)continue;let f=n.indexOf(l);if(f===-1)continue;n===t&&(n=n.slice()),n.splice(f,1)}else if(vA(l))for(let f=0;f<n.length;++f)l.test(n[f])&&(n===t&&(n=n.slice()),n.splice(f,1),--f)}break}}return n}return t}a(R2,"generateAlgorithmList");sP.exports={ChannelManager:wA,generateAlgorithmList:R2,onChannelOpenFailure:iP,onCHANNEL_CLOSE:oP,isWritable:a(e=>e&&e.writable&&e._readableState&&e._readableState.ended===!1,"isWritable")}});var OA=me((w7,TP)=>{"use strict";var{createHash:O2,getHashes:N2,randomFillSync:$2}=require("crypto"),{Socket:D2}=require("net"),{lookup:B2}=require("dns"),L2=require("events"),z2=N2(),{COMPAT:vP,CHANNEL_EXTENDED_DATATYPE:{STDERR:U2},CHANNEL_OPEN_FAILURE:Ru,DEFAULT_CIPHER:aP,DEFAULT_COMPRESSION:cP,DEFAULT_KEX:uP,DEFAULT_MAC:lP,DEFAULT_SERVER_HOST_KEY:fP,DISCONNECT_REASON:dP,DISCONNECT_REASON_BY_VALUE:M2,SUPPORTED_CIPHER:F2,SUPPORTED_COMPRESSION:H2,SUPPORTED_KEX:j2,SUPPORTED_MAC:W2,SUPPORTED_SERVER_HOST_KEY:q2}=Jn(),{init:V2}=Pi(),Z2=cA(),{parseKey:Pp}=Ci(),{SFTP:Q2}=Tu(),{bufferCopy:pP,makeBufferParser:wP,makeError:G2,readUInt32BE:K2,sigSSHToASN1:Y2,writeUInt32BE:TA}=Sn(),{AgentContext:hP,createAgent:gP,isAgent:mP}=ZE(),{Channel:PP,MAX_WINDOW:Tp,PACKET_SIZE:kp,windowAdjust:_P,WINDOW_THRESHOLD:yP}=SA(),{ChannelManager:X2,generateAlgorithmList:Ou,isWritable:dr,onChannelOpenFailure:J2,onCHANNEL_CLOSE:eB}=PA(),vp=wP(),wp=wP(),Nu=/^OpenSSH_(?:(?![0-4])\d)|(?:\d{2,})/,CA=a(e=>{},"noop"),RA=class extends L2{static{a(this,"Client")}constructor(){super(),this.config={host:void 0,port:void 0,localAddress:void 0,localPort:void 0,forceIPv4:void 0,forceIPv6:void 0,keepaliveCountMax:void 0,keepaliveInterval:void 0,readyTimeout:void 0,ident:void 0,username:void 0,password:void 0,privateKey:void 0,tryKeyboard:void 0,agent:void 0,allowAgentFwd:void 0,authHandler:void 0,hostHashAlgo:void 0,hostHashCb:void 0,strictVendor:void 0,debug:void 0},this._agent=void 0,this._readyTimeout=void 0,this._chanMgr=void 0,this._callbacks=void 0,this._forwarding=void 0,this._forwardingUnix=void 0,this._acceptX11=void 0,this._agentFwdEnabled=void 0,this._remoteVer=void 0,this._protocol=void 0,this._sock=void 0,this._resetKA=void 0}connect(t){if(this._sock&&dr(this._sock))return this.once("close",()=>{this.connect(t)}),this.end(),this;this.config.host=t.hostname||t.host||"localhost",this.config.port=t.port||22,this.config.localAddress=typeof t.localAddress=="string"?t.localAddress:void 0,this.config.localPort=typeof t.localPort=="string"||typeof t.localPort=="number"?t.localPort:void 0,this.config.forceIPv4=t.forceIPv4||!1,this.config.forceIPv6=t.forceIPv6||!1,this.config.keepaliveCountMax=typeof t.keepaliveCountMax=="number"&&t.keepaliveCountMax>=0?t.keepaliveCountMax:3,this.config.keepaliveInterval=typeof t.keepaliveInterval=="number"&&t.keepaliveInterval>0?t.keepaliveInterval:0,this.config.readyTimeout=typeof t.readyTimeout=="number"&&t.readyTimeout>=0?t.readyTimeout:2e4,this.config.ident=typeof t.ident=="string"||Buffer.isBuffer(t.ident)?t.ident:void 0;let r={kex:void 0,serverHostKey:void 0,cs:{cipher:void 0,mac:void 0,compress:void 0,lang:[]},sc:void 0},i=!0;if(typeof t.algorithms=="object"&&t.algorithms!==null&&(r.kex=Ou(t.algorithms.kex,uP,j2),r.kex!==uP&&(i=!1),r.serverHostKey=Ou(t.algorithms.serverHostKey,fP,q2),r.serverHostKey!==fP&&(i=!1),r.cs.cipher=Ou(t.algorithms.cipher,aP,F2),r.cs.cipher!==aP&&(i=!1),r.cs.mac=Ou(t.algorithms.hmac,lP,W2),r.cs.mac!==lP&&(i=!1),r.cs.compress=Ou(t.algorithms.compress,cP,H2),r.cs.compress!==cP&&(i=!1),i||(r.sc=r.cs)),typeof t.username=="string")this.config.username=t.username;else if(typeof t.user=="string")this.config.username=t.user;else throw new Error("Invalid username");this.config.password=typeof t.password=="string"?t.password:void 0,this.config.privateKey=typeof t.privateKey=="string"||Buffer.isBuffer(t.privateKey)?t.privateKey:void 0,this.config.localHostname=typeof t.localHostname=="string"?t.localHostname:void 0,this.config.localUsername=typeof t.localUsername=="string"?t.localUsername:void 0,this.config.tryKeyboard=t.tryKeyboard===!0,typeof t.agent=="string"&&t.agent.length?this.config.agent=gP(t.agent):mP(t.agent)?this.config.agent=t.agent:this.config.agent=void 0,this.config.allowAgentFwd=t.agentForward===!0&&this.config.agent!==void 0;let n=this.config.authHandler=typeof t.authHandler=="function"||Array.isArray(t.authHandler)?t.authHandler:void 0;this.config.strictVendor=typeof t.strictVendor=="boolean"?t.strictVendor:!0;let o=this.config.debug=typeof t.debug=="function"?t.debug:void 0;if(t.agentForward===!0&&!this.config.allowAgentFwd)throw new Error("You must set a valid agent path to allow agent forwarding");let s=this._callbacks=[];this._chanMgr=new X2(this),this._forwarding={},this._forwardingUnix={},this._acceptX11=0,this._agentFwdEnabled=!1,this._agent=this.config.agent?this.config.agent:void 0,this._remoteVer=void 0;let c;if(this.config.privateKey){if(c=Pp(this.config.privateKey,t.passphrase),c instanceof Error)throw new Error(`Cannot parse privateKey: ${c.message}`);if(Array.isArray(c)&&(c=c[0]),c.getPrivatePEM()===null)throw new Error("privateKey value does not contain a (valid) private key")}let u;if(typeof t.hostVerifier=="function"){let O=t.hostVerifier,q;z2.indexOf(t.hostHash)!==-1&&(q=t.hostHash),u=a((V,re)=>{q&&(V=O2(q).update(V).digest("hex"));let _e=O(V,re);_e!==void 0&&re(_e)},"hostVerifier")}let l=this._sock=t.sock||new D2,f=!1,p=!1;this._protocol&&this._protocol.cleanup();let g=o?(O,q,V)=>{o(`Debug output from server: ${JSON.stringify(V)}`)}:void 0,h,_=this._protocol=new Z2({ident:this.config.ident,offer:i?void 0:r,onWrite:a(O=>{dr(l)&&l.write(O)},"onWrite"),onError:a(O=>{O.level==="handshake"&&clearTimeout(this._readyTimeout),_._destruct||l.removeAllListeners("data"),this.emit("error",O);try{l.end()}catch{}},"onError"),onHeader:a(O=>{p=!0,this._remoteVer=O.versions.software,O.greeting&&this.emit("greeting",O.greeting)},"onHeader"),onHandshakeComplete:a(O=>{this.emit("handshake",O),f||(f=!0,_.service("ssh-userauth"))},"onHandshakeComplete"),debug:o,hostVerifier:u,messageHandlers:{DEBUG:g,DISCONNECT:a((O,q,V)=>{if(q!==dP.BY_APPLICATION){V||(V=M2[q],V===void 0&&(V=`Unexpected disconnection reason: ${q}`));let re=new Error(V);re.code=q,this.emit("error",re)}l.end()},"DISCONNECT"),SERVICE_ACCEPT:a((O,q)=>{q==="ssh-userauth"&&L()},"SERVICE_ACCEPT"),EXT_INFO:a((O,q)=>{if(h===void 0){for(let V of q)if(V.name==="server-sig-algs"){h=V.algs;return}h=null}},"EXT_INFO"),USERAUTH_BANNER:a((O,q)=>{this.emit("banner",q)},"USERAUTH_BANNER"),USERAUTH_SUCCESS:a(O=>{R(),clearTimeout(this._readyTimeout),this.emit("ready")},"USERAUTH_SUCCESS"),USERAUTH_FAILURE:a((O,q,V)=>{if(P.keyAlgos){let re=P.keyAlgos[0][0];if(o&&o(`Client: ${P.type} (${re}) auth failed`),P.keyAlgos.shift(),P.keyAlgos.length){let[_e,Se]=P.keyAlgos[0];switch(P.type){case"agent":_.authPK(P.username,P.agentCtx.currentKey(),_e);return;case"publickey":_.authPK(P.username,P.key,_e);return;case"hostbased":_.authHostbased(P.username,P.key,P.localHostname,P.localUsername,_e,(xe,Tt)=>{let Ft=P.key.sign(xe,Se);if(Ft instanceof Error)return Ft.message=`Error while signing with key: ${Ft.message}`,Ft.level="client-authentication",this.emit("error",Ft),L();Tt(Ft)});return}}else P.keyAlgos=void 0}if(P.type==="agent"){let re=P.agentCtx.pos();return o&&o(`Client: Agent key #${re+1} failed`),X()}o&&o(`Client: ${P.type} auth failed`),C=V,H=q,L()},"USERAUTH_FAILURE"),USERAUTH_PASSWD_CHANGEREQ:a((O,q)=>{P.type==="password"&&this.emit("change password",q,V=>{_.authPassword(this.config.username,this.config.password,V)})},"USERAUTH_PASSWD_CHANGEREQ"),USERAUTH_PK_OK:a(O=>{let q,V;if(P.keyAlgos&&([q,V]=P.keyAlgos[0]),P.type==="agent"){let re=P.agentCtx.currentKey();_.authPK(P.username,re,q,(_e,Se)=>{let xe={hash:V};P.agentCtx.sign(re,_e,xe,(Tt,Ft)=>{if(Tt)Tt.level="agent",this.emit("error",Tt);else return Se(Ft);X()})})}else P.type==="publickey"&&_.authPK(P.username,P.key,q,(re,_e)=>{let Se=P.key.sign(re,V);if(Se instanceof Error)return Se.message=`Error signing data with key: ${Se.message}`,Se.level="client-authentication",this.emit("error",Se),L();_e(Se)})},"USERAUTH_PK_OK"),USERAUTH_INFO_REQUEST:a((O,q,V,re)=>{if(P.type==="keyboard-interactive"){if((Array.isArray(re)?re.length:0)===0){o&&o("Client: Sending automatic USERAUTH_INFO_RESPONSE"),_.authInfoRes();return}P.prompt(q,V,"",re,Se=>{_.authInfoRes(Se)})}},"USERAUTH_INFO_REQUEST"),REQUEST_SUCCESS:a((O,q)=>{s.length&&s.shift()(!1,q)},"REQUEST_SUCCESS"),REQUEST_FAILURE:a(O=>{s.length&&s.shift()(!0)},"REQUEST_FAILURE"),GLOBAL_REQUEST:a((O,q,V,re)=>{q==="hostkeys-00@openssh.com"?(oB(this,re,(_e,Se)=>{_e||this.emit("hostkeys",Se)}),V&&_.requestSuccess()):V&&_.requestFailure()},"GLOBAL_REQUEST"),CHANNEL_OPEN:a((O,q)=>{nB(this,q)},"CHANNEL_OPEN"),CHANNEL_OPEN_CONFIRMATION:a((O,q)=>{let V=this._chanMgr.get(q.recipient);if(typeof V!="function")return;let re=V.type==="sftp",Se={type:re?"session":V.type,incoming:{id:q.recipient,window:Tp,packetSize:kp,state:"open"},outgoing:{id:q.sender,window:q.window,packetSize:q.packetSize,state:"open"}},xe=re?new Q2(this,Se,{debug:o}):new PP(this,Se);this._chanMgr.update(q.recipient,xe),V(void 0,xe)},"CHANNEL_OPEN_CONFIRMATION"),CHANNEL_OPEN_FAILURE:a((O,q,V,re)=>{let _e=this._chanMgr.get(q);if(typeof _e!="function")return;J2(this,q,{reason:V,description:re},_e)},"CHANNEL_OPEN_FAILURE"),CHANNEL_DATA:a((O,q,V)=>{let re=this._chanMgr.get(q);if(!(typeof re!="object"||re===null)&&re.incoming.window!==0){if(re.incoming.window-=V.length,re.push(V)===!1){re._waitChanDrain=!0;return}re.incoming.window<=yP&&_P(re)}},"CHANNEL_DATA"),CHANNEL_EXTENDED_DATA:a((O,q,V,re)=>{if(re!==U2)return;let _e=this._chanMgr.get(q);if(!(typeof _e!="object"||_e===null)&&_e.incoming.window!==0){if(_e.incoming.window-=V.length,!_e.stderr.push(V)){_e._waitChanDrain=!0;return}_e.incoming.window<=yP&&_P(_e)}},"CHANNEL_EXTENDED_DATA"),CHANNEL_WINDOW_ADJUST:a((O,q,V)=>{let re=this._chanMgr.get(q);typeof re!="object"||re===null||(re.outgoing.window+=V,re._waitWindow&&(re._waitWindow=!1,re._chunk?re._write(re._chunk,null,re._chunkcb):re._chunkcb?re._chunkcb():re._chunkErr?re.stderr._write(re._chunkErr,null,re._chunkcbErr):re._chunkcbErr&&re._chunkcbErr()))},"CHANNEL_WINDOW_ADJUST"),CHANNEL_SUCCESS:a((O,q)=>{let V=this._chanMgr.get(q);typeof V!="object"||V===null||(this._resetKA(),V._callbacks.length&&V._callbacks.shift()(!1))},"CHANNEL_SUCCESS"),CHANNEL_FAILURE:a((O,q)=>{let V=this._chanMgr.get(q);typeof V!="object"||V===null||(this._resetKA(),V._callbacks.length&&V._callbacks.shift()(!0))},"CHANNEL_FAILURE"),CHANNEL_REQUEST:a((O,q,V,re,_e)=>{let Se=this._chanMgr.get(q);if(typeof Se!="object"||Se===null)return;let xe=Se._exit;if(xe.code===void 0){switch(V){case"exit-status":Se.emit("exit",xe.code=_e);return;case"exit-signal":Se.emit("exit",xe.code=null,xe.signal=`SIG${_e.signal}`,xe.dump=_e.coreDumped,xe.desc=_e.errorMessage);return}re&&O.channelFailure(Se.outgoing.id)}},"CHANNEL_REQUEST"),CHANNEL_EOF:a((O,q)=>{let V=this._chanMgr.get(q);typeof V!="object"||V===null||V.incoming.state==="open"&&(V.incoming.state="eof",V.readable&&V.push(null),V.stderr.readable&&V.stderr.push(null))},"CHANNEL_EOF"),CHANNEL_CLOSE:a((O,q)=>{eB(this,q,this._chanMgr.get(q))},"CHANNEL_CLOSE")}});l.pause();let y=this.config.keepaliveInterval,b=this.config.keepaliveCountMax,S=0,v,M=a(()=>{if(++S>b){if(clearInterval(v),l.readable){let O=new Error("Keepalive timeout");O.level="client-timeout",this.emit("error",O),l.destroy()}return}dr(l)?(s.push(R),_.ping()):clearInterval(v)},"sendKA");function R(){y>0&&(S=0,clearInterval(v),dr(l)&&(v=setInterval(M,y)))}a(R,"resetKA"),this._resetKA=R;let J=(()=>{let O=!1;return()=>{if(!O&&(O=!0,ee&&!p)){let q=G2("Connection lost before handshake","protocol",!0);this.emit("error",q)}}})(),te=(()=>{let O=!1;return()=>{O||(O=!0,ee=!0,o&&o("Socket connected"),this.emit("connect"),V2.then(()=>{_.start(),l.on("data",q=>{try{_.parse(q,0,q.length)}catch(V){this.emit("error",V);try{dr(l)&&l.end()}catch{}}}),l.stderr&&typeof l.stderr.resume=="function"&&l.stderr.resume(),l.resume()}).catch(q=>{this.emit("error",q);try{dr(l)&&l.end()}catch{}}))}})(),ee=!1;l.on("connect",te).on("timeout",()=>{this.emit("timeout")}).on("error",O=>{o&&o(`Socket error: ${O.message}`),clearTimeout(this._readyTimeout),O.level="client-socket",this.emit("error",O)}).on("end",()=>{o&&o("Socket ended"),J(),_.cleanup(),clearTimeout(this._readyTimeout),clearInterval(v),this.emit("end")}).on("close",()=>{o&&o("Socket closed"),J(),_.cleanup(),clearTimeout(this._readyTimeout),clearInterval(v),this.emit("close");let O=s;s=this._callbacks=[];let q=new Error("No response from server");for(let V=0;V<O.length;++V)O[V](q);this._chanMgr.cleanup(q)});let P,C=null,H=null,U=["none"];this.config.password!==void 0&&U.push("password"),c!==void 0&&U.push("publickey"),this._agent!==void 0&&U.push("agent"),this.config.tryKeyboard&&U.push("keyboard-interactive"),c!==void 0&&this.config.localHostname!==void 0&&this.config.localUsername!==void 0&&U.push("hostbased"),Array.isArray(n)?n=SP(n):typeof n!="function"&&(n=SP(U));let k=!1,j=a(O=>{if(!k){if(k=!0,O===!1){let q=new Error("All configured authentication methods failed");q.level="client-authentication",this.emit("error",q),this.end();return}if(typeof O=="string"){let q=O;if(U.indexOf(q)===-1)return W(`Authentication method not allowed: ${q}`);let V=this.config.username;switch(q){case"password":O={type:q,username:V,password:this.config.password};break;case"publickey":O={type:q,username:V,key:c};break;case"hostbased":O={type:q,username:V,key:c,localHostname:this.config.localHostname,localUsername:this.config.localUsername};break;case"agent":O={type:q,username:V,agentCtx:new hP(this._agent)};break;case"keyboard-interactive":O={type:q,username:V,prompt:a((...re)=>this.emit("keyboard-interactive",...re),"prompt")};break;case"none":O={type:q,username:V};break;default:return W(`Skipping unsupported authentication method: ${O}`)}}else{if(typeof O!="object"||O===null)return W(`Skipping invalid authentication attempt: ${O}`);{let q=O.username;if(typeof q!="string")return W(`Skipping invalid authentication attempt: ${O}`);let V=O.type;switch(V){case"password":{let{password:re}=O;if(typeof re!="string"&&!Buffer.isBuffer(re))return W("Skipping invalid password auth attempt");O={type:V,username:q,password:re};break}case"publickey":{let re=Pp(O.key,O.passphrase);if(re instanceof Error)return W("Skipping invalid key auth attempt");if(!re.isPrivateKey())return W("Skipping non-private key");O={type:V,username:q,key:re};break}case"hostbased":{let{localHostname:re,localUsername:_e}=O,Se=Pp(O.key,O.passphrase);if(Se instanceof Error||typeof re!="string"||typeof _e!="string")return W("Skipping invalid hostbased auth attempt");if(!Se.isPrivateKey())return W("Skipping non-private key");O={type:V,username:q,key:Se,localHostname:re,localUsername:_e};break}case"agent":{let re=O.agent;if(typeof re=="string"&&re.length)re=gP(re);else if(!mP(re))return W(`Skipping invalid agent: ${O.agent}`);O={type:V,username:q,agentCtx:new hP(re)};break}case"keyboard-interactive":{let{prompt:re}=O;if(typeof re!="function")return W("Skipping invalid keyboard-interactive auth attempt");O={type:V,username:q,prompt:re};break}case"none":O={type:V,username:q};break;default:return W(`Skipping unsupported authentication method: ${O}`)}}}P=O;try{let q=P.username;switch(P.type){case"password":_.authPassword(q,P.password);break;case"publickey":{let V;if(P.keyAlgos=kA(this,P.key,h),P.keyAlgos)if(P.keyAlgos.length)V=P.keyAlgos[0][0];else return W("Skipping key authentication (no mutual hash algorithm)");_.authPK(q,P.key,V);break}case"hostbased":{let V,re;if(P.keyAlgos=kA(this,P.key,h),P.keyAlgos)if(P.keyAlgos.length)[V,re]=P.keyAlgos[0];else return W("Skipping hostbased authentication (no mutual hash algorithm)");_.authHostbased(q,P.key,P.localHostname,P.localUsername,V,(_e,Se)=>{let xe=P.key.sign(_e,re);if(xe instanceof Error)return xe.message=`Error while signing with key: ${xe.message}`,xe.level="client-authentication",this.emit("error",xe),L();Se(xe)});break}case"agent":P.agentCtx.init(V=>{if(V)return V.level="agent",this.emit("error",V),L();X()});break;case"keyboard-interactive":_.authKeyboard(q);break;case"none":_.authNone(q);break}}finally{k=!1}}},"doNextAuth");function W(O){o&&o(O),process.nextTick(L)}a(W,"skipAuth");function L(){k=!1;let O=n(H,C,j);k||O===void 0||j(O)}a(L,"tryNextAuth");let X=a(()=>{if(P.type==="agent"){let O=P.agentCtx.nextKey();if(O===!1)o&&o("Agent: No more keys left to try"),o&&o("Client: agent auth failed"),L();else{let q=P.agentCtx.pos(),V;if(P.keyAlgos=kA(this,O,h),P.keyAlgos)if(P.keyAlgos.length)V=P.keyAlgos[0][0];else{o&&o(`Agent: Skipping key #${q+1} (no mutual hash algorithm)`),X();return}o&&o(`Agent: Trying key #${q+1}`),_.authPK(P.username,O,V)}}},"tryNextAgentKey"),ne=a(()=>{this.config.readyTimeout>0&&(this._readyTimeout=setTimeout(()=>{let O=new Error("Timed out while waiting for handshake");O.level="client-timeout",this.emit("error",O),l.destroy()},this.config.readyTimeout))},"startTimeout");if(t.sock)ne(),typeof l.connecting=="boolean"&&l.connecting||te();else{let O=this.config.host,q=this.config.forceIPv4,V=this.config.forceIPv6;o&&o(`Client: Trying ${O} on port ${this.config.port} ...`);let re=a(()=>{ne(),l.connect({host:O,port:this.config.port,localAddress:this.config.localAddress,localPort:this.config.localPort}),l.setMaxListeners(0),l.setTimeout(typeof t.timeout=="number"?t.timeout:0)},"doConnect");!q&&!V||q&&V?re():B2(O,q?4:6,(_e,Se,xe)=>{if(_e){let Tt=q?"IPv4":"IPv6",Ft=new Error(`Error while looking up ${Tt} address for '${O}': ${_e}`);clearTimeout(this._readyTimeout),Ft.level="client-dns",this.emit("error",Ft),this.emit("close");return}O=Se,re()})}return this}end(){return this._sock&&dr(this._sock)&&(this._protocol.disconnect(dP.BY_APPLICATION),this._sock.end()),this}destroy(){return this._sock&&dr(this._sock)&&this._sock.destroy(),this}exec(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");typeof r=="function"&&(i=r,r={});let n={allowHalfOpen:r.allowHalfOpen!==!1};return Fs(this,"session",n,(o,s)=>{if(o){i(o);return}let c=[];function u(l){if(l){s.close(),i(l);return}c.length&&c.shift()()}a(u,"reqCb"),(this.config.allowAgentFwd===!0||r&&r.agentForward===!0&&this._agent!==void 0)&&c.push(()=>bP(s,u)),typeof r=="object"&&r!==null&&(typeof r.env=="object"&&r.env!==null&&xP(s,r.env),(typeof r.pty=="object"&&r.pty!==null||r.pty===!0)&&c.push(()=>AP(s,r.pty,u)),(typeof r.x11=="object"&&r.x11!==null||r.x11==="number"||r.x11===!0)&&c.push(()=>EP(s,r.x11,u))),c.push(()=>rB(s,t,r,i)),c.shift()()}),this}shell(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),t&&(t.x11!==void 0||t.env!==void 0)&&(r=t,t=void 0),Fs(this,"session",(n,o)=>{if(n){i(n);return}let s=[];function c(u){if(u){o.close(),i(u);return}s.length&&s.shift()()}a(c,"reqCb"),(this.config.allowAgentFwd===!0||r&&r.agentForward===!0&&this._agent!==void 0)&&s.push(()=>bP(o,c)),t!==!1&&s.push(()=>AP(o,t,c)),typeof r=="object"&&r!==null&&(typeof r.env=="object"&&r.env!==null&&xP(o,r.env),(typeof r.x11=="object"&&r.x11!==null||r.x11==="number"||r.x11===!0)&&s.push(()=>EP(o,r.x11,c))),s.push(()=>tB(o,i)),s.shift()()}),this}subsys(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return Fs(this,"session",(i,n)=>{if(i){r(i);return}IP(n,t,(o,s)=>{if(o){r(o);return}r(void 0,s)})}),this}forwardIn(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let n=typeof i=="function";return n&&this._callbacks.push((o,s)=>{if(o){i(o!==!0?o:new Error(`Unable to bind to ${t}:${r}`));return}let c=r;r===0&&s&&s.length>=4&&(c=K2(s,0),this._protocol._compatFlags&vP.DYN_RPORT_BUG||(r=c)),this._forwarding[`${t}:${r}`]=c,i(void 0,c)}),this._protocol.tcpipForward(t,r,n),this}unforwardIn(t,r,i){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let n=typeof i=="function";return n&&this._callbacks.push(o=>{if(o){i(o!==!0?o:new Error(`Unable to unbind from ${t}:${r}`));return}delete this._forwarding[`${t}:${r}`],i()}),this._protocol.cancelTcpipForward(t,r,n),this}forwardOut(t,r,i,n,o){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let s={srcIP:t,srcPort:r,dstIP:i,dstPort:n};return typeof o!="function"&&(o=CA),Fs(this,"direct-tcpip",s,o),this}openssh_noMoreSessions(t){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let r=typeof t=="function";return!this.config.strictVendor||this.config.strictVendor&&Nu.test(this._remoteVer)?(r&&this._callbacks.push(i=>{if(i){t(i!==!0?i:new Error("Unable to disable future sessions"));return}t()}),this._protocol.openssh_noMoreSessions(r),this):r?(process.nextTick(t,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this):this}openssh_forwardInStreamLocal(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let i=typeof r=="function";return!this.config.strictVendor||this.config.strictVendor&&Nu.test(this._remoteVer)?(i&&this._callbacks.push(n=>{if(n){r(n!==!0?n:new Error(`Unable to bind to ${t}`));return}this._forwardingUnix[t]=!0,r()}),this._protocol.openssh_streamLocalForward(t,i),this):i?(process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this):this}openssh_unforwardInStreamLocal(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");let i=typeof r=="function";return!this.config.strictVendor||this.config.strictVendor&&Nu.test(this._remoteVer)?(i&&this._callbacks.push(n=>{if(n){r(n!==!0?n:new Error(`Unable to unbind from ${t}`));return}delete this._forwardingUnix[t],r()}),this._protocol.openssh_cancelStreamLocalForward(t,i),this):i?(process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this):this}openssh_forwardOutStreamLocal(t,r){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return typeof r!="function"&&(r=CA),!this.config.strictVendor||this.config.strictVendor&&Nu.test(this._remoteVer)?(Fs(this,"direct-streamlocal@openssh.com",{socketPath:t},r),this):(process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version")),this)}sftp(t){if(!this._sock||!dr(this._sock))throw new Error("Not connected");return Fs(this,"sftp",(r,i)=>{if(r){t(r);return}IP(i,"sftp",(n,o)=>{if(n){t(n);return}function s(){i.removeListener("ready",c),i.removeListener("error",u),i.removeListener("exit",l),i.removeListener("close",l)}a(s,"removeListeners");function c(){s(),t(void 0,i)}a(c,"onReady");function u(f){s(),t(f)}a(u,"onError");function l(f,p){s();let g;typeof f=="number"?g=`Received exit code ${f} while establishing SFTP session`:p!==void 0?g=`Received signal ${p} while establishing SFTP session`:g="Received unexpected SFTP session termination";let h=new Error(g);h.code=f,h.signal=p,t(h)}a(l,"onExit"),i.on("ready",c).on("error",u).on("exit",l).on("close",l),i._init()})}),this}setNoDelay(t){return this._sock&&typeof this._sock.setNoDelay=="function"&&this._sock.setNoDelay(t),this}};function Fs(e,t,r,i){let n=Tp,o=kp;typeof r=="function"&&(i=r,r={});let s=a((u,l)=>{i(u,l)},"wrapper");s.type=t;let c=e._chanMgr.add(s);if(c===-1){i(new Error("No free channels available"));return}switch(t){case"session":case"sftp":e._protocol.session(c,n,o);break;case"direct-tcpip":e._protocol.directTcpip(c,n,o,r);break;case"direct-streamlocal@openssh.com":e._protocol.openssh_directStreamLocal(c,n,o,r);break;default:throw new Error(`Unsupported channel type: ${t}`)}}a(Fs,"openChannel");function EP(e,t,r){let i={single:!1,protocol:"MIT-MAGIC-COOKIE-1",cookie:void 0,screen:0};typeof t=="function"?r=t:typeof t=="object"&&t!==null&&(typeof t.single=="boolean"&&(i.single=t.single),typeof t.screen=="number"&&(i.screen=t.screen),typeof t.protocol=="string"&&(i.protocol=t.protocol),typeof t.cookie=="string"?i.cookie=t.cookie:Buffer.isBuffer(t.cookie)&&(i.cookie=t.cookie.hexSlice(0,t.cookie.length))),i.cookie===void 0&&(i.cookie=iB());let n=typeof r=="function";if(e.outgoing.state!=="open"){n&&r(new Error("Channel is not open"));return}n&&e._callbacks.push(o=>{if(o){r(o!==!0?o:new Error("Unable to request X11"));return}e._hasX11=!0,++e._client._acceptX11,e.once("close",()=>{e._client._acceptX11&&--e._client._acceptX11}),r()}),e._client._protocol.x11Forward(e.outgoing.id,i,n)}a(EP,"reqX11");function AP(e,t,r){let i=24,n=80,o=640,s=480,c="vt100",u=null;typeof t=="function"?r=t:typeof t=="object"&&t!==null&&(typeof t.rows=="number"&&(i=t.rows),typeof t.cols=="number"&&(n=t.cols),typeof t.width=="number"&&(o=t.width),typeof t.height=="number"&&(s=t.height),typeof t.term=="string"&&(c=t.term),typeof t.modes=="object"&&(u=t.modes));let l=typeof r=="function";if(e.outgoing.state!=="open"){l&&r(new Error("Channel is not open"));return}l&&e._callbacks.push(f=>{if(f){r(f!==!0?f:new Error("Unable to request a pseudo-terminal"));return}r()}),e._client._protocol.pty(e.outgoing.id,i,n,s,o,c,u,l)}a(AP,"reqPty");function bP(e,t){let r=typeof t=="function";if(e.outgoing.state!=="open"){r&&t(new Error("Channel is not open"));return}if(e._client._agentFwdEnabled){r&&t(!1);return}e._client._agentFwdEnabled=!0,e._callbacks.push(i=>{if(i){e._client._agentFwdEnabled=!1,r&&t(i!==!0?i:new Error("Unable to request agent forwarding"));return}r&&t()}),e._client._protocol.openssh_agentForward(e.outgoing.id,!0)}a(bP,"reqAgentFwd");function tB(e,t){if(e.outgoing.state!=="open"){t(new Error("Channel is not open"));return}e._callbacks.push(r=>{if(r){t(r!==!0?r:new Error("Unable to open shell"));return}e.subtype="shell",t(void 0,e)}),e._client._protocol.shell(e.outgoing.id,!0)}a(tB,"reqShell");function rB(e,t,r,i){if(e.outgoing.state!=="open"){i(new Error("Channel is not open"));return}e._callbacks.push(n=>{if(n){i(n!==!0?n:new Error("Unable to exec"));return}e.subtype="exec",e.allowHalfOpen=r.allowHalfOpen!==!1,i(void 0,e)}),e._client._protocol.exec(e.outgoing.id,t,!0)}a(rB,"reqExec");function xP(e,t){if(e.outgoing.state!=="open")return;let r=Object.keys(t||{});for(let i=0;i<r.length;++i){let n=r[i],o=t[n];e._client._protocol.env(e.outgoing.id,n,o,!1)}}a(xP,"reqEnv");function IP(e,t,r){if(e.outgoing.state!=="open"){r(new Error("Channel is not open"));return}e._callbacks.push(i=>{if(i){r(i!==!0?i:new Error(`Unable to start subsystem: ${t}`));return}e.subtype="subsystem",r(void 0,e)}),e._client._protocol.subsystem(e.outgoing.id,t,!0)}a(IP,"reqSubsystem");function nB(e,t){let r=-1,i,n=a(()=>{let u={type:t.type,incoming:{id:r,window:Tp,packetSize:kp,state:"open"},outgoing:{id:t.sender,window:t.window,packetSize:t.packetSize,state:"open"}},l=new PP(e,u);return e._chanMgr.update(r,l),e._protocol.channelOpenConfirm(t.sender,r,Tp,kp),l},"accept"),o=a(()=>{i===void 0&&(r===-1?i=Ru.RESOURCE_SHORTAGE:i=Ru.CONNECT_FAILED),r!==-1&&e._chanMgr.remove(r),e._protocol.channelOpenFail(t.sender,i,"")},"reject"),s=a(()=>(r=e._chanMgr.add(),r===-1&&(i=Ru.RESOURCE_SHORTAGE,e.config.debug&&e.config.debug("Client: Automatic rejection of incoming channel open: no channels available")),r!==-1),"reserveChannel"),c=t.data;switch(t.type){case"forwarded-tcpip":{let u=e._forwarding[`${c.destIP}:${c.destPort}`];if(u!==void 0&&s()){c.destPort===0&&(c.destPort=u),e.emit("tcp connection",c,n,o);return}break}case"forwarded-streamlocal@openssh.com":if(e._forwardingUnix[c.socketPath]!==void 0&&s()){e.emit("unix connection",c,n,o);return}break;case"auth-agent@openssh.com":if(e._agentFwdEnabled&&typeof e._agent.getStream=="function"&&s()){e._agent.getStream((u,l)=>{if(u)return o();let f=n();f.pipe(l).pipe(f)});return}break;case"x11":if(e._acceptX11!==0&&s()){e.emit("x11",c,n,o);return}break;default:i=Ru.UNKNOWN_CHANNEL_TYPE,e.config.debug&&e.config.debug(`Client: Automatic rejection of unsupported incoming channel open type: ${t.type}`)}i===void 0&&(i=Ru.ADMINISTRATIVELY_PROHIBITED,e.config.debug&&e.config.debug("Client: Automatic rejection of unexpected incoming channel open for: "+t.type)),o()}a(nB,"onCHANNEL_OPEN");var iB=(()=>{let e=Buffer.allocUnsafe(16);return()=>($2(e,0,16),e.hexSlice(0,16))})();function SP(e){if(!Array.isArray(e))throw new Error("authList must be an array");let t=0;return(r,i,n)=>t===e.length?!1:e[t++]}a(SP,"makeSimpleAuthHandler");function oB(e,t,r){if(!e._sock||!dr(e._sock))return;if(typeof r!="function"&&(r=CA),!Array.isArray(t))throw new TypeError("Invalid keys argument type");let i=[];for(let n of t){let o=Pp(n);if(o instanceof Error)throw o;i.push(o)}if(!e.config.strictVendor||e.config.strictVendor&&Nu.test(e._remoteVer)){e._callbacks.push((n,o)=>{if(n){r(n!==!0?n:new Error("Server failed to prove supplied keys"));return}let s=[],c=0;for(vp.init(o,0);vp.avail()&&c!==i.length;){let u=i[c++],l=u.getPublicSSH(),f=vp.readString();wp.init(f,0);let p=wp.readString(!0),g=wp.readString(),h;if(p!==u.type)if(u.type==="ssh-rsa")switch(p){case"rsa-sha2-256":h="sha256";break;case"rsa-sha2-512":h="sha512";break;default:continue}else continue;let _=e._protocol._kex.sessionID,y=Buffer.allocUnsafe(37+_.length+4+l.length),b=0;TA(y,29,b),y.utf8Write("hostkeys-prove-00@openssh.com",b+=4,29),TA(y,_.length,b+=29),pP(_,y,0,_.length,b+=4),TA(y,l.length,b+=_.length),pP(l,y,0,l.length,b+=4),(g=Y2(g,p))&&u.verify(y,g,h)===!0&&s.push(u)}wp.clear(),vp.clear(),r(null,s)}),e._protocol.openssh_hostKeysProve(i);return}process.nextTick(r,new Error("strictVendor enabled and server is not OpenSSH or compatible version"))}a(oB,"hostKeysProve");function kA(e,t,r){switch(t.type){case"ssh-rsa":if(e._protocol._compatFlags&vP.IMPLY_RSA_SHA2_SIGALGS&&(Array.isArray(r)?r=["rsa-sha2-256","rsa-sha2-512",...r]:r=["rsa-sha2-256","rsa-sha2-512"]),Array.isArray(r)){if(r.indexOf("rsa-sha2-256")!==-1)return[["rsa-sha2-256","sha256"]];if(r.indexOf("rsa-sha2-512")!==-1)return[["rsa-sha2-512","sha512"]];if(r.indexOf("ssh-rsa")===-1)return[]}return[["ssh-rsa","sha1"]]}}a(kA,"getKeyAlgos");TP.exports=RA});var CP=me(kP=>{"use strict";var{Agent:$A}=require("http"),{Agent:sB}=require("https"),{connect:aB}=require("tls"),NA;for(let e of[$A,sB]){class t extends e{static{a(this,"SSHAgent")}constructor(i,n){super(n),this._connectCfg=i,this._defaultSrcIP=n&&n.srcIP||"localhost"}createConnection(i,n){let o=i&&i.localAddress||this._defaultSrcIP,s=i&&i.localPort||0,c=i.host,u=i.port;NA===void 0&&(NA=OA());let l=new NA,f=!1;l.on("ready",()=>{l.forwardOut(o,s,c,u,(p,g)=>{if(f=!0,p)return l.end(),n(p);g.once("close",()=>l.end()),n(null,cB(g,e,i))})}).on("error",n).on("close",()=>{f||n(new Error("Unexpected connection close"))}).connect(this._connectCfg)}}kP[e===$A?"SSHTTPAgent":"SSHTTPSAgent"]=t}function $u(){}a($u,"noop");function cB(e,t,r){if(t===$A)return e.setKeepAlive=$u,e.setNoDelay=$u,e.setTimeout=$u,e.ref=$u,e.unref=$u,e.destroySoon=e.destroy,e;r.socket=e;let i=aB(r),n=(()=>{let o=!1;return()=>{o||(o=!0,e.isPaused()&&e.resume())}})();return i.on("end",n).on("close",n),i}a(cB,"decorateStream")});var OP=me((C7,zA)=>{"use strict";var{Server:uB}=require("net"),Bu=require("events"),{listenerCount:$r}=Bu,{CHANNEL_OPEN_FAILURE:Hs,DEFAULT_CIPHER:lB,DEFAULT_COMPRESSION:fB,DEFAULT_KEX:dB,DEFAULT_MAC:pB,DEFAULT_SERVER_HOST_KEY:hB,DISCONNECT_REASON:js,DISCONNECT_REASON_BY_VALUE:gB,SUPPORTED_CIPHER:mB,SUPPORTED_COMPRESSION:_B,SUPPORTED_KEX:yB,SUPPORTED_MAC:EB,SUPPORTED_SERVER_HOST_KEY:AB}=Jn(),{init:bB}=Pi(),{KexInit:xB}=dp(),{parseKey:RP}=Ci(),IB=cA(),{SFTP:SB}=Tu(),{writeUInt32BE:vB}=Sn(),{Channel:Ws,MAX_WINDOW:Ni,PACKET_SIZE:$i,windowAdjust:wB,WINDOW_THRESHOLD:PB}=SA(),{ChannelManager:TB,generateAlgorithmList:Du,isWritable:Cp,onChannelOpenFailure:kB,onCHANNEL_CLOSE:CB}=PA(),RB=10,Di=class extends Bu{static{a(this,"AuthContext")}constructor(t,r,i,n,o){super(),this.username=this.user=r,this.service=i,this.method=n,this._initialResponse=!1,this._finalResponse=!1,this._multistep=!1,this._cbfinal=(s,c,u)=>{this._finalResponse||(this._finalResponse=!0,o(this,s,c,u))},this._protocol=t}accept(){this._cleanup&&this._cleanup(),this._initialResponse=!0,this._cbfinal(!0)}reject(t,r){this._cleanup&&this._cleanup(),this._initialResponse=!0,this._cbfinal(!1,t,r)}},Rp=class extends Di{static{a(this,"KeyboardAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this._multistep=!0,this._cb=void 0,this._onInfoResponse=c=>{let u=this._cb;u&&(this._cb=void 0,u(c))},this.submethods=o,this.on("abort",()=>{this._cb&&this._cb(new Error("Authentication request aborted"))})}prompt(t,r,i,n){Array.isArray(t)||(t=[t]),typeof r=="function"?(n=r,r=i=void 0):typeof i=="function"?(n=i,i=void 0):typeof n!="function"&&(n=void 0);for(let o=0;o<t.length;++o)typeof t[o]=="string"&&(t[o]={prompt:t[o],echo:!0});this._cb=n,this._initialResponse=!0,this._protocol.authInfoReq(r,i,t)}},BA=class extends Di{static{a(this,"PKAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this.key={algo:o.keyAlgo,data:o.key},this.hashAlgo=o.hashAlgo,this.signature=o.signature,this.blob=o.blob}accept(){this.signature?Di.prototype.accept.call(this):(this._initialResponse=!0,this._protocol.authPKOK(this.key.algo,this.key.data))}},LA=class extends Di{static{a(this,"HostbasedAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this.key={algo:o.keyAlgo,data:o.key},this.hashAlgo=o.hashAlgo,this.signature=o.signature,this.blob=o.blob,this.localHostname=o.localHostname,this.localUsername=o.localUsername}},Op=class extends Di{static{a(this,"PwdAuthContext")}constructor(t,r,i,n,o,s){super(t,r,i,n,s),this.password=o,this._changeCb=void 0}requestChange(t,r){if(this._changeCb)throw new Error("Change request already in progress");if(typeof t!="string")throw new Error("prompt argument must be a string");if(typeof r!="function")throw new Error("Callback argument must be a function");this._changeCb=r,this._protocol.authPasswdChg(t)}},Bn=class extends Bu{static{a(this,"Session")}constructor(t,r,i){super(),this.type="session",this.subtype=void 0,this.server=!0,this._ending=!1,this._channel=void 0,this._chanInfo={type:"session",incoming:{id:i,window:Ni,packetSize:$i,state:"open"},outgoing:{id:r.sender,window:r.window,packetSize:r.packetSize,state:"open"}}}},on=class extends Bu{static{a(this,"Server")}constructor(t,r){if(super(),typeof t!="object"||t===null)throw new Error("Missing configuration object");let i=Object.create(null),n=[],o=t.hostKeys;if(!Array.isArray(o))throw new Error("hostKeys must be an array");let s=typeof t.algorithms=="object"&&t.algorithms!==null?t.algorithms:{},c=Du(s.serverHostKey,hB,AB);for(let g=0;g<o.length;++g){let h;if(Buffer.isBuffer(o[g])||typeof o[g]=="string"?h=RP(o[g]):h=RP(o[g].key,o[g].passphrase),h instanceof Error)throw new Error(`Cannot parse privateKey: ${h.message}`);if(Array.isArray(h)&&(h=h[0]),h.getPrivatePEM()===null)throw new Error("privateKey value contains an invalid private key");if(!n.includes(h.type))if(h.type==="ssh-rsa"){let _=c.indexOf("ssh-rsa"),y=c.indexOf("rsa-sha2-256"),b=c.indexOf("rsa-sha2-512");_===-1&&(_=1/0),[_,y,b].sort(OB).forEach(S=>{if(S===-1)return;let v;switch(S){case _:v="ssh-rsa";break;case y:v="rsa-sha2-256";break;case b:v="rsa-sha2-512";break;default:return}i[v]=h,n.push(v)})}else i[h.type]=h,n.push(h.type)}let u={kex:Du(s.kex,dB,yB).concat(["kex-strict-s-v00@openssh.com"]),serverHostKey:n,cs:{cipher:Du(s.cipher,lB,mB),mac:Du(s.hmac,pB,EB),compress:Du(s.compress,fB,_B),lang:[]},sc:void 0};u.sc=u.cs,typeof r=="function"&&this.on("connection",r);let l=typeof t.debug=="function"?t.debug:void 0,f=t.ident?Buffer.from(t.ident):void 0,p=new xB(u);this._srv=new uB(g=>{if(this._connections>=this.maxConnections){g.destroy();return}++this._connections,g.once("close",()=>{--this._connections});let h;if(l){let _=`[${process.hrtime().join(".")}] `;h=a(y=>{l(`${_}${y}`)},"debug")}new Np(g,i,f,p,h,this,t)}).on("error",g=>{this.emit("error",g)}).on("listening",()=>{this.emit("listening")}).on("close",()=>{this.emit("close")}),this._connections=0,this.maxConnections=1/0}injectSocket(t){this._srv.emit("connection",t)}listen(...t){return this._srv.listen(...t),this}address(){return this._srv.address()}getConnections(t){return this._srv.getConnections(t),this}close(t){return this._srv.close(t),this}ref(){return this._srv.ref(),this}unref(){return this._srv.unref(),this}};on.KEEPALIVE_CLIENT_INTERVAL=15e3;on.KEEPALIVE_CLIENT_COUNT_MAX=3;var Np=class extends Bu{static{a(this,"Client")}constructor(t,r,i,n,o,s,c){super();let u=0,l=!1,f=[],p,g,h,_=[];this._sock=t,this._chanMgr=new TB(this),this._debug=o,this.noMoreSessions=!1,this.authenticated=!1;function y(ee){}a(y,"onClientPreHeaderError"),this.on("error",y);let b=o?(ee,P,C)=>{o(`Debug output from client: ${JSON.stringify(C)}`)}:void 0,S=typeof c.keepaliveInterval=="number"&&isFinite(c.keepaliveInterval)&&c.keepaliveInterval>0?c.keepaliveInterval:typeof on.KEEPALIVE_CLIENT_INTERVAL=="number"&&isFinite(on.KEEPALIVE_CLIENT_INTERVAL)&&on.KEEPALIVE_CLIENT_INTERVAL>0?on.KEEPALIVE_CLIENT_INTERVAL:-1,v=typeof c.keepaliveCountMax=="number"&&isFinite(c.keepaliveCountMax)&&c.keepaliveCountMax>=0?c.keepaliveCountMax:typeof on.KEEPALIVE_CLIENT_COUNT_MAX=="number"&&isFinite(on.KEEPALIVE_CLIENT_COUNT_MAX)&&on.KEEPALIVE_CLIENT_COUNT_MAX>=0?on.KEEPALIVE_CLIENT_COUNT_MAX:-1,M=0;S!==-1&&v!==-1&&(this.once("ready",()=>{let ee=a(()=>{clearInterval(g)},"onClose");this.on("close",ee).on("end",ee),g=setInterval(()=>{if(++M>v){clearInterval(g);let P=new Error("Keepalive timeout");P.level="client-timeout",this.emit("error",P),this.end()}else R.ping()},S)}),h=a(()=>{g&&g.refresh(),M=0},"onPacket"));let R=this._protocol=new IB({server:!0,hostKeys:r,ident:i,offer:n,onPacket:h,greeting:c.greeting,banner:c.banner,onWrite:a(ee=>{Cp(t)&&t.write(ee)},"onWrite"),onError:a(ee=>{R._destruct||t.removeAllListeners("data"),this.emit("error",ee);try{t.end()}catch{}},"onError"),onHeader:a(ee=>{this.removeListener("error",y);let P={ip:t.remoteAddress,family:t.remoteFamily,port:t.remotePort,header:ee};if(!s.emit("connection",this,P)){R.disconnect(js.BY_APPLICATION),t.end();return}ee.greeting&&this.emit("greeting",ee.greeting)},"onHeader"),onHandshakeComplete:a(ee=>{++u>1&&this.emit("rekey"),this.emit("handshake",ee)},"onHandshakeComplete"),debug:o,messageHandlers:{DEBUG:b,DISCONNECT:a((ee,P,C)=>{if(P!==js.BY_APPLICATION){C||(C=gB[P],C===void 0&&(C=`Unexpected disconnection reason: ${P}`));let H=new Error(C);H.code=P,this.emit("error",H)}t.end()},"DISCONNECT"),CHANNEL_OPEN:a((ee,P)=>{if(P.type==="session"&&this.noMoreSessions||!this.authenticated){let X=Hs.ADMINISTRATIVELY_PROHIBITED;return R.channelOpenFail(P.sender,X)}let C=-1,H,U=!1,k,j=a(()=>{U||(U=!0,H===void 0&&(C===-1?H=Hs.RESOURCE_SHORTAGE:H=Hs.CONNECT_FAILED),C!==-1&&this._chanMgr.remove(C),R.channelOpenFail(P.sender,H,""))},"reject"),W=a(()=>(C=this._chanMgr.add(),C===-1&&(H=Hs.RESOURCE_SHORTAGE,o&&o("Automatic rejection of incoming channel open: no channels available")),C!==-1),"reserveChannel"),L=P.data;switch(P.type){case"session":if($r(this,"session")&&W()){k=a(()=>{if(U)return;U=!0;let X=new Bn(this,P,C);return this._chanMgr.update(C,X),R.channelOpenConfirm(P.sender,C,Ni,$i),X},"accept"),this.emit("session",k,j);return}break;case"direct-tcpip":if($r(this,"tcpip")&&W()){k=a(()=>{if(U)return;U=!0;let X={type:void 0,incoming:{id:C,window:Ni,packetSize:$i,state:"open"},outgoing:{id:P.sender,window:P.window,packetSize:P.packetSize,state:"open"}},ne=new Ws(this,X,{server:!0});return this._chanMgr.update(C,ne),R.channelOpenConfirm(P.sender,C,Ni,$i),ne},"accept"),this.emit("tcpip",k,j,L);return}break;case"direct-streamlocal@openssh.com":if($r(this,"openssh.streamlocal")&&W()){k=a(()=>{if(U)return;U=!0;let X={type:void 0,incoming:{id:C,window:Ni,packetSize:$i,state:"open"},outgoing:{id:P.sender,window:P.window,packetSize:P.packetSize,state:"open"}},ne=new Ws(this,X,{server:!0});return this._chanMgr.update(C,ne),R.channelOpenConfirm(P.sender,C,Ni,$i),ne},"accept"),this.emit("openssh.streamlocal",k,j,L);return}break;default:H=Hs.UNKNOWN_CHANNEL_TYPE,o&&o(`Automatic rejection of unsupported incoming channel open type: ${P.type}`)}H===void 0&&(H=Hs.ADMINISTRATIVELY_PROHIBITED,o&&o(`Automatic rejection of unexpected incoming channel open for: ${P.type}`)),j()},"CHANNEL_OPEN"),CHANNEL_OPEN_CONFIRMATION:a((ee,P)=>{let C=this._chanMgr.get(P.recipient);if(typeof C!="function")return;let H={type:C.type,incoming:{id:P.recipient,window:Ni,packetSize:$i,state:"open"},outgoing:{id:P.sender,window:P.window,packetSize:P.packetSize,state:"open"}},U=new Ws(this,H,{server:!0});this._chanMgr.update(P.recipient,U),C(void 0,U)},"CHANNEL_OPEN_CONFIRMATION"),CHANNEL_OPEN_FAILURE:a((ee,P,C,H)=>{let U=this._chanMgr.get(P);if(typeof U!="function")return;kB(this,P,{reason:C,description:H},U)},"CHANNEL_OPEN_FAILURE"),CHANNEL_DATA:a((ee,P,C)=>{let H=this._chanMgr.get(P);if(!(typeof H!="object"||H===null)&&!(H.constructor===Bn&&(H=H._channel,!H))&&H.incoming.window!==0){if(H.incoming.window-=C.length,H.push(C)===!1){H._waitChanDrain=!0;return}H.incoming.window<=PB&&wB(H)}},"CHANNEL_DATA"),CHANNEL_EXTENDED_DATA:a((ee,P,C,H)=>{},"CHANNEL_EXTENDED_DATA"),CHANNEL_WINDOW_ADJUST:a((ee,P,C)=>{let H=this._chanMgr.get(P);typeof H!="object"||H===null||H.constructor===Bn&&(H=H._channel,!H)||(H.outgoing.window+=C,H._waitWindow&&(H._waitWindow=!1,H._chunk?H._write(H._chunk,null,H._chunkcb):H._chunkcb?H._chunkcb():H._chunkErr?H.stderr._write(H._chunkErr,null,H._chunkcbErr):H._chunkcbErr&&H._chunkcbErr()))},"CHANNEL_WINDOW_ADJUST"),CHANNEL_SUCCESS:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C=C._channel,!C)||C._callbacks.length&&C._callbacks.shift()(!1)},"CHANNEL_SUCCESS"),CHANNEL_FAILURE:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C=C._channel,!C)||C._callbacks.length&&C._callbacks.shift()(!0)},"CHANNEL_FAILURE"),CHANNEL_REQUEST:a((ee,P,C,H,U)=>{let k=this._chanMgr.get(P);if(typeof k!="object"||k===null)return;let j=!1,W,L;if(k.constructor!==Bn){H&&R.channelFailure(k.outgoing.id);return}if(H&&(C!=="shell"&&C!=="exec"&&C!=="subsystem"&&(W=a(()=>{j||k._ending||k._channel||(j=!0,R.channelSuccess(k._chanInfo.outgoing.id))},"accept")),L=a(()=>{j||k._ending||k._channel||(j=!0,R.channelFailure(k._chanInfo.outgoing.id))},"reject")),k._ending){L&&L();return}switch(C){case"env":if($r(k,"env")){k.emit("env",W,L,{key:U.name,val:U.value});return}break;case"pty-req":if($r(k,"pty")){k.emit("pty",W,L,U);return}break;case"window-change":$r(k,"window-change")?k.emit("window-change",W,L,U):L&&L();break;case"x11-req":if($r(k,"x11")){k.emit("x11",W,L,U);return}break;case"signal":if($r(k,"signal")){k.emit("signal",W,L,{name:U});return}break;case"auth-agent-req@openssh.com":if($r(k,"auth-agent")){k.emit("auth-agent",W,L);return}break;case"shell":if($r(k,"shell")){W=a(()=>{if(j||k._ending||k._channel)return;j=!0,H&&R.channelSuccess(k._chanInfo.outgoing.id);let X=new Ws(this,k._chanInfo,{server:!0});return X.subtype=k.subtype=C,k._channel=X,X},"accept"),k.emit("shell",W,L);return}break;case"exec":if($r(k,"exec")){W=a(()=>{if(j||k._ending||k._channel)return;j=!0,H&&R.channelSuccess(k._chanInfo.outgoing.id);let X=new Ws(this,k._chanInfo,{server:!0});return X.subtype=k.subtype=C,k._channel=X,X},"accept"),k.emit("exec",W,L,{command:U});return}break;case"subsystem":{let X=U==="sftp";if(W=a(()=>{if(j||k._ending||k._channel)return;j=!0,H&&R.channelSuccess(k._chanInfo.outgoing.id);let ne;return X?ne=new SB(this,k._chanInfo,{server:!0,debug:o}):(ne=new Ws(this,k._chanInfo,{server:!0}),ne.subtype=k.subtype=`${C}:${U}`),k._channel=ne,ne},"accept"),U==="sftp"){if($r(k,"sftp")){k.emit("sftp",W,L);return}X=!1}if($r(k,"subsystem")){k.emit("subsystem",W,L,{name:U});return}break}}o&&o(`Automatic rejection of incoming channel request: ${C}`),L&&L()},"CHANNEL_REQUEST"),CHANNEL_EOF:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C._ending||(C._ending=!0,C.emit("eof"),C.emit("end")),C=C._channel,!C)||C.incoming.state==="open"&&(C.incoming.state="eof",C.readable&&C.push(null))},"CHANNEL_EOF"),CHANNEL_CLOSE:a((ee,P)=>{let C=this._chanMgr.get(P);typeof C!="object"||C===null||C.constructor===Bn&&(C._ending=!0,C.emit("close"),C=C._channel,!C)||CB(this,P,C)},"CHANNEL_CLOSE"),SERVICE_REQUEST:a((ee,P)=>{if(u===0||l||this.authenticated||P!=="ssh-userauth"){R.disconnect(js.SERVICE_NOT_AVAILABLE),t.end();return}l=!0,R.serviceAccept(P)},"SERVICE_REQUEST"),USERAUTH_REQUEST:a((ee,P,C,H,U)=>{if(u===0||this.authenticated||p&&(p.username!==P||p.service!==C)||H!=="password"&&H!=="publickey"&&H!=="hostbased"&&H!=="keyboard-interactive"&&H!=="none"||f.length===RB){R.disconnect(js.PROTOCOL_ERROR),t.end();return}else if(C!=="ssh-connection"){R.disconnect(js.SERVICE_NOT_AVAILABLE),t.end();return}let k;switch(H){case"keyboard-interactive":k=new Rp(R,P,C,H,U,J);break;case"publickey":k=new BA(R,P,C,H,U,J);break;case"hostbased":k=new LA(R,P,C,H,U,J);break;case"password":if(p&&p instanceof Op&&p._changeCb){let j=p._changeCb;p._changeCb=void 0,j(U.newPassword);return}k=new Op(R,P,C,H,U,J);break;case"none":k=new Di(R,P,C,H,J);break}if(p)if(p._initialResponse)p._multistep&&!p._finalResponse&&(p._cleanup&&p._cleanup(),p.emit("abort"));else return f.push(k);p=k,$r(this,"authentication")?this.emit("authentication",p):p.reject()},"USERAUTH_REQUEST"),USERAUTH_INFO_RESPONSE:a((ee,P)=>{p&&p instanceof Rp&&p._onInfoResponse(P)},"USERAUTH_INFO_RESPONSE"),GLOBAL_REQUEST:a((ee,P,C,H)=>{let U={type:null,buf:null};function k(j,W){U.type=j,U.buf=W,te()}if(a(k,"setReply"),C&&_.push(U),(P==="tcpip-forward"||P==="cancel-tcpip-forward"||P==="no-more-sessions@openssh.com"||P==="streamlocal-forward@openssh.com"||P==="cancel-streamlocal-forward@openssh.com")&&$r(this,"request")&&this.authenticated){let j,W;if(C){let L=!1;j=a(X=>{if(L)return;L=!0;let ne;P==="tcpip-forward"&&H.bindPort===0&&typeof X=="number"&&(ne=Buffer.allocUnsafe(4),vB(ne,X,0)),k("SUCCESS",ne)},"accept"),W=a(()=>{L||(L=!0,k("FAILURE"))},"reject")}if(P==="no-more-sessions@openssh.com"){this.noMoreSessions=!0,j&&j();return}this.emit("request",j,W,P,H)}else C&&k("FAILURE")},"GLOBAL_REQUEST")}});t.pause(),bB.then(()=>{R.start(),t.on("data",ee=>{try{R.parse(ee,0,ee.length)}catch(P){this.emit("error",P);try{Cp(t)&&t.end()}catch{}}}),t.resume()}).catch(ee=>{this.emit("error",ee);try{Cp(t)&&t.end()}catch{}}),t.on("error",ee=>{ee.level="socket",this.emit("error",ee)}).once("end",()=>{o&&o("Socket ended"),R.cleanup(),this.emit("end")}).once("close",()=>{o&&o("Socket closed"),R.cleanup(),this.emit("close");let ee=new Error("No response from server");this._chanMgr.cleanup(ee)});let J=a((ee,P,C,H)=>{p===ee&&!this.authenticated&&(P?(p=void 0,this.authenticated=!0,R.authSuccess(),f=[],this.emit("ready")):(R.authFailure(C,H),f.length&&(p=f.pop(),$r(this,"authentication")?this.emit("authentication",p):p.reject())))},"onAuthDecide");function te(){for(;_.length>0&&_[0].type;){let ee=_.shift();ee.type==="SUCCESS"&&R.requestSuccess(ee.buf),ee.type==="FAILURE"&&R.requestFailure()}}a(te,"sendReplies")}end(){return this._sock&&Cp(this._sock)&&(this._protocol.disconnect(js.BY_APPLICATION),this._sock.end()),this}x11(t,r,i){return DA(this,"x11",{originAddr:t,originPort:r},i),this}forwardOut(t,r,i,n,o){return DA(this,"forwarded-tcpip",{boundAddr:t,boundPort:r,remoteAddr:i,remotePort:n},o),this}openssh_forwardOutStreamLocal(t,r){return DA(this,"forwarded-streamlocal@openssh.com",{socketPath:t},r),this}rekey(t){let r;try{this._protocol.rekey()}catch(i){r=i}typeof t=="function"&&(r?process.nextTick(t,r):this.once("rekey",t))}setNoDelay(t){return this._sock&&typeof this._sock.setNoDelay=="function"&&this._sock.setNoDelay(t),this}};function DA(e,t,r,i){let n=Ni,o=$i;typeof r=="function"&&(i=r,r={});let s=a((u,l)=>{i(u,l)},"wrapper");s.type=t;let c=e._chanMgr.add(s);if(c===-1){i(new Error("No free channels available"));return}switch(t){case"forwarded-tcpip":e._protocol.forwardedTcpip(c,n,o,r);break;case"x11":e._protocol.x11(c,n,o,r);break;case"forwarded-streamlocal@openssh.com":e._protocol.openssh_forwardedStreamLocal(c,n,o,r);break;default:throw new Error(`Unsupported channel type: ${t}`)}}a(DA,"openChannel");function OB(e,t){return e-t}a(OB,"compareNumbers");zA.exports=on;zA.exports.IncomingClient=Np});var LP=me((O7,BP)=>{"use strict";var{createCipheriv:NB,generateKeyPair:$B,generateKeyPairSync:DB,getCurves:BB,randomBytes:NP}=require("crypto"),{Ber:jt}=uu(),LB=oE().pbkdf,{CIPHER_INFO:zB}=Pi(),UB=16,MB=16,FB=BB(),HB=new Map(Object.entries(zB));function $P(e,t){if(typeof e!="string")throw new TypeError("Key type must be a string");let r={type:"spki",format:"der"},i={type:"pkcs8",format:"der"};switch(e.toLowerCase()){case"rsa":{if(typeof t!="object"||t===null)throw new TypeError("Missing options object for RSA key");let n=t.bits;if(!Number.isInteger(n))throw new TypeError("RSA bits must be an integer");if(n<=0||n>16384)throw new RangeError("RSA bits must be non-zero and <= 16384");return["rsa",{modulusLength:n,publicKeyEncoding:r,privateKeyEncoding:i}]}case"ecdsa":{if(typeof t!="object"||t===null)throw new TypeError("Missing options object for ECDSA key");if(!Number.isInteger(t.bits))throw new TypeError("ECDSA bits must be an integer");let n;switch(t.bits){case 256:n="prime256v1";break;case 384:n="secp384r1";break;case 521:n="secp521r1";break;default:throw new Error("ECDSA bits must be 256, 384, or 521")}if(!FB.includes(n))throw new Error("Unsupported ECDSA bits value");return["ec",{namedCurve:n,publicKeyEncoding:r,privateKeyEncoding:i}]}case"ed25519":return["ed25519",{publicKeyEncoding:r,privateKeyEncoding:i}];default:throw new Error(`Unsupported key type: ${e}`)}}a($P,"makeArgs");function jB(e,t,r){switch(e){case"rsa":{let i=new jt.Reader(r);if(i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in RSA private key");if(i.readSequence(),i.readOID()!=="1.2.840.113549.1.1.1")throw new Error("Bad RSA private OID");if(i.readByte()!==jt.Null)throw new Error("Malformed RSA private key (expected null)");if(i.readByte()!==0)throw new Error("Malformed RSA private key (expected zero-length null)");if(i=new jt.Reader(i.readString(jt.OctetString,!0)),i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in RSA private key");let n=i.readString(jt.Integer,!0),o=i.readString(jt.Integer,!0),s=i.readString(jt.Integer,!0),c=i.readString(jt.Integer,!0),u=i.readString(jt.Integer,!0);i.readString(jt.Integer,!0),i.readString(jt.Integer,!0);let l=i.readString(jt.Integer,!0),f=Buffer.from("ssh-rsa"),p=Buffer.allocUnsafe(4+f.length+4+n.length+4+o.length+4+s.length+4+l.length+4+c.length+4+u.length),g=0;p.writeUInt32BE(f.length,g+=0),p.set(f,g+=4),p.writeUInt32BE(n.length,g+=f.length),p.set(n,g+=4),p.writeUInt32BE(o.length,g+=n.length),p.set(o,g+=4),p.writeUInt32BE(s.length,g+=o.length),p.set(s,g+=4),p.writeUInt32BE(l.length,g+=s.length),p.set(l,g+=4),p.writeUInt32BE(c.length,g+=l.length),p.set(c,g+=4),p.writeUInt32BE(u.length,g+=c.length),p.set(u,g+=4);let h=Buffer.allocUnsafe(4+f.length+4+o.length+4+n.length);return g=0,h.writeUInt32BE(f.length,g+=0),h.set(f,g+=4),h.writeUInt32BE(o.length,g+=f.length),h.set(o,g+=4),h.writeUInt32BE(n.length,g+=o.length),h.set(n,g+=4),{sshName:f.toString(),priv:p,pub:h}}case"ec":{let i=new jt.Reader(t);if(i.readSequence(),i.readSequence(),i.readOID()!=="1.2.840.10045.2.1")throw new Error("Bad ECDSA public OID");i.readOID();let n=i.readString(jt.BitString,!0);{let g=0;for(;g<n.length&&n[g]===0;++g);g>0&&(n=n.slice(g))}if(i=new jt.Reader(r),i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in ECDSA private key");if(i.readSequence(),i.readOID()!=="1.2.840.10045.2.1")throw new Error("Bad ECDSA private OID");let o=i.readOID(),s;switch(o){case"1.2.840.10045.3.1.7":s="nistp256";break;case"1.3.132.0.34":s="nistp384";break;case"1.3.132.0.35":s="nistp521";break;default:throw new Error("Unsupported curve in ECDSA private key")}if(i=new jt.Reader(i.readString(jt.OctetString,!0)),i.readSequence(),i.readInt()!==1)throw new Error("Unsupported version in ECDSA private key");let c=Buffer.concat([Buffer.from([0]),i.readString(jt.OctetString,!0)]),u=Buffer.from(`ecdsa-sha2-${s}`);s=Buffer.from(s);let l=Buffer.allocUnsafe(4+u.length+4+s.length+4+n.length+4+c.length),f=0;l.writeUInt32BE(u.length,f+=0),l.set(u,f+=4),l.writeUInt32BE(s.length,f+=u.length),l.set(s,f+=4),l.writeUInt32BE(n.length,f+=s.length),l.set(n,f+=4),l.writeUInt32BE(c.length,f+=n.length),l.set(c,f+=4);let p=Buffer.allocUnsafe(4+u.length+4+s.length+4+n.length);return f=0,p.writeUInt32BE(u.length,f+=0),p.set(u,f+=4),p.writeUInt32BE(s.length,f+=u.length),p.set(s,f+=4),p.writeUInt32BE(n.length,f+=s.length),p.set(n,f+=4),{sshName:u.toString(),priv:l,pub:p}}case"ed25519":{let i=new jt.Reader(t);if(i.readSequence(),i.readSequence(),i.readOID()!=="1.3.101.112")throw new Error("Bad ED25519 public OID");let n=i.readString(jt.BitString,!0);{let f=0;for(;f<n.length&&n[f]===0;++f);f>0&&(n=n.slice(f))}if(i=new jt.Reader(r),i.readSequence(),i.readInt()!==0)throw new Error("Unsupported version in ED25519 private key");if(i.readSequence(),i.readOID()!=="1.3.101.112")throw new Error("Bad ED25519 private OID");i=new jt.Reader(i.readString(jt.OctetString,!0));let o=i.readString(jt.OctetString,!0),s=Buffer.from("ssh-ed25519"),c=Buffer.allocUnsafe(4+s.length+4+n.length+4+(o.length+n.length)),u=0;c.writeUInt32BE(s.length,u+=0),c.set(s,u+=4),c.writeUInt32BE(n.length,u+=s.length),c.set(n,u+=4),c.writeUInt32BE(o.length+n.length,u+=n.length),c.set(o,u+=4),c.set(n,u+=o.length);let l=Buffer.allocUnsafe(4+s.length+4+n.length);return u=0,l.writeUInt32BE(s.length,u+=0),l.set(s,u+=4),l.writeUInt32BE(n.length,u+=s.length),l.set(n,u+=4),{sshName:s.toString(),priv:c,pub:l}}}}a(jB,"parseDERs");function DP(e,t,r,i){let n="new",o,s="";if(typeof i=="object"&&i!==null&&(typeof i.comment=="string"&&i.comment&&(s=i.comment),typeof i.format=="string"&&i.format&&(n=i.format),i.passphrase)){let c;if(typeof i.passphrase=="string")c=Buffer.from(i.passphrase);else if(Buffer.isBuffer(i.passphrase))c=i.passphrase;else throw new Error("Invalid passphrase");if(i.cipher===void 0)throw new Error("Missing cipher name");let u=HB.get(i.cipher);if(u===void 0)throw new Error("Invalid cipher name");if(n==="new"){let l=MB;if(i.rounds!==void 0){if(!Number.isInteger(i.rounds))throw new TypeError("rounds must be an integer");i.rounds>0&&(l=i.rounds)}let f=Buffer.allocUnsafe(u.keyLen+u.ivLen),p=NP(UB);if(LB(c,c.length,p,p.length,f,f.length,l)!==0)return new Error("Failed to generate information to encrypt key");let h=Buffer.allocUnsafe(4+p.length+4);{let _=0;h.writeUInt32BE(p.length,_+=0),h.set(p,_+=4),h.writeUInt32BE(l,_+=p.length)}o={cipher:u,cipherName:i.cipher,kdfName:"bcrypt",kdfOptions:h,key:f.slice(0,u.keyLen),iv:f.slice(u.keyLen)}}}switch(n){case"new":{let c=`-----BEGIN OPENSSH PRIVATE KEY-----
20
+ `,u,l=Buffer.from(o?o.cipherName:"none"),f=Buffer.from(o?o.kdfName:"none"),p=o?o.kdfOptions:Buffer.alloc(0),g=o?o.cipher.blockLen:8,h=jB(e,t,r),_=NP(4),y=Buffer.from(s),b=8+h.priv.length+4+y.length,S=[];for(let te=1;(b+S.length)%g;++te)S.push(te&255);S=Buffer.from(S);let v=Buffer.allocUnsafe(b+S.length),M;{let te=0;v.set(_,te+=0),v.set(_,te+=4),v.set(h.priv,te+=4),v.writeUInt32BE(y.length,te+=h.priv.length),v.set(y,te+=4),v.set(S,te+=y.length)}if(o){let te={authTagLength:o.cipher.authLen},ee=NB(o.cipher.sslName,o.key,o.iv,te);ee.setAutoPadding(!1),v=Buffer.concat([ee.update(v),ee.final()]),o.cipher.authLen>0?M=ee.getAuthTag():M=Buffer.alloc(0),o.key.fill(0),o.iv.fill(0)}else M=Buffer.alloc(0);let R=Buffer.from("openssh-key-v1\0"),J=Buffer.allocUnsafe(R.length+4+l.length+4+f.length+4+p.length+4+4+h.pub.length+4+v.length+M.length);{let te=0;J.set(R,te+=0),J.writeUInt32BE(l.length,te+=R.length),J.set(l,te+=4),J.writeUInt32BE(f.length,te+=l.length),J.set(f,te+=4),J.writeUInt32BE(p.length,te+=f.length),J.set(p,te+=4),J.writeUInt32BE(1,te+=p.length),J.writeUInt32BE(h.pub.length,te+=4),J.set(h.pub,te+=4),J.writeUInt32BE(v.length,te+=h.pub.length),J.set(v,te+=4),J.set(M,te+=v.length)}{let te=J.base64Slice(0,J.length),ee=te.replace(/.{64}/g,`$&
21
21
  `);te.length&63&&(ee+=`
22
22
  `),c+=ee}{let te=h.pub.base64Slice(0,h.pub.length);u=`${h.sshName} ${te}${s?` ${s}`:""}`}return c+=`-----END OPENSSH PRIVATE KEY-----
23
- `,{private:c,public:u}}default:throw new Error("Invalid output key format")}}a(IP,"convertKeys");function kB(){}a(kB,"noop");vP.exports={generateKeyPair:a((e,t,r)=>{typeof t=="function"&&(r=t,t=void 0),typeof r!="function"&&(r=kB);let i=xP(e,t);EB(...i,(n,o,s)=>{if(n)return r(n);let c;try{c=IP(i[0],o,s,t)}catch(u){return r(u)}r(null,c)})},"generateKeyPair"),generateKeyPairSync:a((e,t)=>{let r=xP(e,t),{publicKey:i,privateKey:n}=AB(...r);return IP(r[0],i,n,t)},"generateKeyPairSync")}});var PP=me((m7,wP)=>{"use strict";var{AgentProtocol:CB,BaseAgent:RB,createAgent:OB,CygwinAgent:NB,OpenSSHAgent:$B,PageantAgent:DB}=HE(),{SSHTTPAgent:BB,SSHTTPSAgent:zB}=yP(),{parseKey:LB}=Ci(),{flagsToString:UB,OPEN_MODE:MB,STATUS_CODE:FB,stringToFlags:HB}=Pu();wP.exports={AgentProtocol:CB,BaseAgent:RB,createAgent:OB,Client:PA(),CygwinAgent:NB,HTTPAgent:BB,HTTPSAgent:zB,OpenSSHAgent:$B,PageantAgent:DB,Server:AP(),utils:{parseKey:LB,...SP(),sftp:{flagsToString:UB,OPEN_MODE:MB,STATUS_CODE:FB,stringToFlags:HB}}}});var $A=me((_7,TP)=>{TP.exports=require("stream")});var $P=me((y7,NP)=>{"use strict";function kP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}a(kP,"ownKeys");function CP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kP(Object(r),!0).forEach(function(i){jB(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}a(CP,"_objectSpread");function jB(e,t,r){return t=OP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(jB,"_defineProperty");function WB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(WB,"_classCallCheck");function RP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,OP(i.key),i)}}a(RP,"_defineProperties");function qB(e,t,r){return t&&RP(e.prototype,t),r&&RP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}a(qB,"_createClass");function OP(e){var t=VB(e,"string");return typeof t=="symbol"?t:String(t)}a(OP,"_toPropertyKey");function VB(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(VB,"_toPrimitive");var ZB=require("buffer"),Op=ZB.Buffer,QB=require("util"),DA=QB.inspect,KB=DA&&DA.custom||"inspect";function GB(e,t,r){Op.prototype.copy.call(e,t,r)}a(GB,"copyBuffer");NP.exports=(function(){function e(){WB(this,e),this.head=null,this.tail=null,this.length=0}return a(e,"BufferList"),qB(e,[{key:"push",value:a(function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},"push")},{key:"unshift",value:a(function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},"unshift")},{key:"shift",value:a(function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},"shift")},{key:"clear",value:a(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:a(function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},"join")},{key:"concat",value:a(function(r){if(this.length===0)return Op.alloc(0);for(var i=Op.allocUnsafe(r>>>0),n=this.head,o=0;n;)GB(n.data,i,o),o+=n.data.length,n=n.next;return i},"concat")},{key:"consume",value:a(function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n},"consume")},{key:"first",value:a(function(){return this.head.data},"first")},{key:"_getString",value:a(function(r){var i=this.head,n=1,o=i.data;for(r-=o.length;i=i.next;){var s=i.data,c=r>s.length?s.length:r;if(c===s.length?o+=s:o+=s.slice(0,r),r-=c,r===0){c===s.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(c));break}++n}return this.length-=n,o},"_getString")},{key:"_getBuffer",value:a(function(r){var i=Op.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var s=n.data,c=r>s.length?s.length:r;if(s.copy(i,i.length-r,0,c),r-=c,r===0){c===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(c));break}++o}return this.length-=o,i},"_getBuffer")},{key:KB,value:a(function(r,i){return DA(this,CP(CP({},i),{},{depth:0,customInspect:!1}))},"value")}]),e})()});var zA=me((A7,BP)=>{"use strict";function YB(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(BA,this,e)):process.nextTick(BA,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(Np,r):(r._writableState.errorEmitted=!0,process.nextTick(DP,r,o)):process.nextTick(DP,r,o):t?(process.nextTick(Np,r),t(o)):process.nextTick(Np,r)}),this)}a(YB,"destroy");function DP(e,t){BA(e,t),Np(e)}a(DP,"emitErrorAndCloseNT");function Np(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}a(Np,"emitCloseNT");function XB(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}a(XB,"undestroy");function BA(e,t){e.emit("error",t)}a(BA,"emitErrorNT");function JB(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}a(JB,"errorOrDestroy");BP.exports={destroy:YB,undestroy:XB,errorOrDestroy:JB}});var Bi=me((x7,UP)=>{"use strict";var LP={};function mn(e,t,r){r||(r=Error);function i(o,s,c){return typeof t=="string"?t:t(o,s,c)}a(i,"getMessage");class n extends r{static{a(this,"NodeError")}constructor(s,c,u){super(i(s,c,u))}}n.prototype.name=r.name,n.prototype.code=e,LP[e]=n}a(mn,"createErrorType");function zP(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}a(zP,"oneOf");function e6(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}a(e6,"startsWith");function t6(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}a(t6,"endsWith");function r6(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}a(r6,"includes");mn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);mn("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&e6(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let n;if(t6(e," argument"))n=`The ${e} ${i} ${zP(t,"type")}`;else{let o=r6(e,".")?"property":"argument";n=`The "${e}" ${o} ${i} ${zP(t,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);mn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");mn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});mn("ERR_STREAM_PREMATURE_CLOSE","Premature close");mn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});mn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");mn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");mn("ERR_STREAM_WRITE_AFTER_END","write after end");mn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);mn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);mn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");UP.exports.codes=LP});var LA=me((v7,MP)=>{"use strict";var n6=Bi().codes.ERR_INVALID_OPT_VALUE;function i6(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}a(i6,"highWaterMarkFrom");function o6(e,t,r,i){var n=i6(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new n6(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}a(o6,"getHighWaterMark");MP.exports={getHighWaterMark:o6}});var FP=me((w7,UA)=>{typeof Object.create=="function"?UA.exports=a(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):UA.exports=a(function(t,r){if(r){t.super_=r;var i=a(function(){},"TempCtor");i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}},"inherits")});var vo=me((T7,FA)=>{try{if(MA=require("util"),typeof MA.inherits!="function")throw"";FA.exports=MA.inherits}catch{FA.exports=FP()}var MA});var jP=me((k7,HP)=>{HP.exports=require("util").deprecate});var WA=me((C7,KP)=>{"use strict";KP.exports=or;function qP(e){var t=this;this.next=null,this.entry=null,this.finish=function(){O6(t,e)}}a(qP,"CorkedRequest");var qs;or.WritableState=zu;var s6={deprecate:jP()},VP=$A(),Dp=require("buffer").Buffer,a6=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c6(e){return Dp.from(e)}a(c6,"_uint8ArrayToBuffer");function u6(e){return Dp.isBuffer(e)||e instanceof a6}a(u6,"_isUint8Array");var jA=zA(),l6=LA(),f6=l6.getHighWaterMark,zi=Bi().codes,d6=zi.ERR_INVALID_ARG_TYPE,p6=zi.ERR_METHOD_NOT_IMPLEMENTED,h6=zi.ERR_MULTIPLE_CALLBACK,g6=zi.ERR_STREAM_CANNOT_PIPE,m6=zi.ERR_STREAM_DESTROYED,_6=zi.ERR_STREAM_NULL_VALUES,y6=zi.ERR_STREAM_WRITE_AFTER_END,E6=zi.ERR_UNKNOWN_ENCODING,Vs=jA.errorOrDestroy;vo()(or,VP);function A6(){}a(A6,"nop");function zu(e,t,r){qs=qs||So(),e=e||{},typeof r!="boolean"&&(r=t instanceof qs),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f6(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){P6(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new qP(this)}a(zu,"WritableState");zu.prototype.getBuffer=a(function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},"getBuffer");(function(){try{Object.defineProperty(zu.prototype,"buffer",{get:s6.deprecate(a(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var $p;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?($p=Function.prototype[Symbol.hasInstance],Object.defineProperty(or,Symbol.hasInstance,{value:a(function(t){return $p.call(this,t)?!0:this!==or?!1:t&&t._writableState instanceof zu},"value")})):$p=a(function(t){return t instanceof this},"realHasInstance");function or(e){qs=qs||So();var t=this instanceof qs;if(!t&&!$p.call(or,this))return new or(e);this._writableState=new zu(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),VP.call(this)}a(or,"Writable");or.prototype.pipe=function(){Vs(this,new g6)};function b6(e,t){var r=new y6;Vs(e,r),process.nextTick(t,r)}a(b6,"writeAfterEnd");function x6(e,t,r,i){var n;return r===null?n=new _6:typeof r!="string"&&!t.objectMode&&(n=new d6("chunk",["string","Buffer"],r)),n?(Vs(e,n),process.nextTick(i,n),!1):!0}a(x6,"validChunk");or.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&u6(e);return o&&!Dp.isBuffer(e)&&(e=c6(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=A6),i.ending?b6(this,r):(o||x6(this,i,e,r))&&(i.pendingcb++,n=v6(this,i,o,e,t,r)),n};or.prototype.cork=function(){this._writableState.corked++};or.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&ZP(this,e))};or.prototype.setDefaultEncoding=a(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new E6(t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");Object.defineProperty(or.prototype,"writableBuffer",{enumerable:!1,get:a(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function I6(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Dp.from(t,r)),t}a(I6,"decodeChunk");Object.defineProperty(or.prototype,"writableHighWaterMark",{enumerable:!1,get:a(function(){return this._writableState.highWaterMark},"get")});function v6(e,t,r,i,n,o){if(!r){var s=I6(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var c=t.objectMode?1:i.length;t.length+=c;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else HA(e,t,!1,c,i,n,o);return u}a(v6,"writeOrBuffer");function HA(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m6("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}a(HA,"doWrite");function S6(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(Bu,e,t),e._writableState.errorEmitted=!0,Vs(e,i)):(n(i),e._writableState.errorEmitted=!0,Vs(e,i),Bu(e,t))}a(S6,"onwriteError");function w6(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}a(w6,"onwriteStateUpdate");function P6(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new h6;if(w6(r),t)S6(e,r,i,t,n);else{var o=QP(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ZP(e,r),i?process.nextTick(WP,e,r,o,n):WP(e,r,o,n)}}a(P6,"onwrite");function WP(e,t,r,i){r||T6(e,t),t.pendingcb--,i(),Bu(e,t)}a(WP,"afterWrite");function T6(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}a(T6,"onwriteDrain");function ZP(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,c=!0;r;)n[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;n.allBuffers=c,HA(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new qP(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,p=t.objectMode?1:u.length;if(HA(e,t,!1,p,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}a(ZP,"clearBuffer");or.prototype._write=function(e,t,r){r(new p6("_write()"))};or.prototype._writev=null;or.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||R6(this,i,r),this};Object.defineProperty(or.prototype,"writableLength",{enumerable:!1,get:a(function(){return this._writableState.length},"get")});function QP(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}a(QP,"needFinish");function k6(e,t){e._final(function(r){t.pendingcb--,r&&Vs(e,r),t.prefinished=!0,e.emit("prefinish"),Bu(e,t)})}a(k6,"callFinal");function C6(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(k6,e,t)):(t.prefinished=!0,e.emit("prefinish")))}a(C6,"prefinish");function Bu(e,t){var r=QP(t);if(r&&(C6(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}a(Bu,"finishMaybe");function R6(e,t,r){t.ending=!0,Bu(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}a(R6,"endWritable");function O6(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}a(O6,"onCorkedFinish");Object.defineProperty(or.prototype,"destroyed",{enumerable:!1,get:a(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:a(function(t){this._writableState&&(this._writableState.destroyed=t)},"set")});or.prototype.destroy=jA.destroy;or.prototype._undestroy=jA.undestroy;or.prototype._destroy=function(e,t){t(e)}});var So=me((O7,YP)=>{"use strict";var N6=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};YP.exports=zn;var GP=ZA(),VA=WA();vo()(zn,GP);for(qA=N6(VA.prototype),Bp=0;Bp<qA.length;Bp++)zp=qA[Bp],zn.prototype[zp]||(zn.prototype[zp]=VA.prototype[zp]);var qA,zp,Bp;function zn(e){if(!(this instanceof zn))return new zn(e);GP.call(this,e),VA.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",$6)))}a(zn,"Duplex");Object.defineProperty(zn.prototype,"writableHighWaterMark",{enumerable:!1,get:a(function(){return this._writableState.highWaterMark},"get")});Object.defineProperty(zn.prototype,"writableBuffer",{enumerable:!1,get:a(function(){return this._writableState&&this._writableState.getBuffer()},"get")});Object.defineProperty(zn.prototype,"writableLength",{enumerable:!1,get:a(function(){return this._writableState.length},"get")});function $6(){this._writableState.ended||process.nextTick(D6,this)}a($6,"onend");function D6(e){e.end()}a(D6,"onEndNT");Object.defineProperty(zn.prototype,"destroyed",{enumerable:!1,get:a(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:a(function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)},"set")})});var eT=me((QA,JP)=>{var Lp=require("buffer"),Ln=Lp.Buffer;function XP(e,t){for(var r in e)t[r]=e[r]}a(XP,"copyProps");Ln.from&&Ln.alloc&&Ln.allocUnsafe&&Ln.allocUnsafeSlow?JP.exports=Lp:(XP(Lp,QA),QA.Buffer=wo);function wo(e,t,r){return Ln(e,t,r)}a(wo,"SafeBuffer");wo.prototype=Object.create(Ln.prototype);XP(Ln,wo);wo.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Ln(e,t,r)};wo.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=Ln(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};wo.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ln(e)};wo.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Lp.SlowBuffer(e)}});var YA=me(rT=>{"use strict";var GA=eT().Buffer,tT=GA.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function B6(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}a(B6,"_normalizeEncoding");function z6(e){var t=B6(e);if(typeof t!="string"&&(GA.isEncoding===tT||!tT(e)))throw new Error("Unknown encoding: "+e);return t||e}a(z6,"normalizeEncoding");rT.StringDecoder=Lu;function Lu(e){this.encoding=z6(e);var t;switch(this.encoding){case"utf16le":this.text=j6,this.end=W6,t=4;break;case"utf8":this.fillLast=M6,t=4;break;case"base64":this.text=q6,this.end=V6,t=3;break;default:this.write=Z6,this.end=Q6;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=GA.allocUnsafe(t)}a(Lu,"StringDecoder");Lu.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Lu.prototype.end=H6;Lu.prototype.text=F6;Lu.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function KA(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}a(KA,"utf8CheckByte");function L6(e,t,r){var i=t.length-1;if(i<r)return 0;var n=KA(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=KA(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=KA(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}a(L6,"utf8CheckIncomplete");function U6(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}a(U6,"utf8CheckExtraBytes");function M6(e){var t=this.lastTotal-this.lastNeed,r=U6(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}a(M6,"utf8FillLast");function F6(e,t){var r=L6(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}a(F6,"utf8Text");function H6(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}a(H6,"utf8End");function j6(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}a(j6,"utf16Text");function W6(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}a(W6,"utf16End");function q6(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}a(q6,"base64Text");function V6(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}a(V6,"base64End");function Z6(e){return e.toString(this.encoding)}a(Z6,"simpleWrite");function Q6(e){return e&&e.length?this.write(e):""}a(Q6,"simpleEnd")});var Up=me((z7,oT)=>{"use strict";var nT=Bi().codes.ERR_STREAM_PREMATURE_CLOSE;function K6(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}a(K6,"once");function G6(){}a(G6,"noop");function Y6(e){return e.setHeader&&typeof e.abort=="function"}a(Y6,"isRequest");function iT(e,t,r){if(typeof t=="function")return iT(e,null,t);t||(t={}),r=K6(r||G6);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=a(function(){e.writable||c()},"onlegacyfinish"),s=e._writableState&&e._writableState.finished,c=a(function(){n=!1,s=!0,i||r.call(e)},"onfinish"),u=e._readableState&&e._readableState.endEmitted,l=a(function(){i=!1,u=!0,n||r.call(e)},"onend"),f=a(function(_){r.call(e,_)},"onerror"),p=a(function(){var _;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(_=new nT),r.call(e,_);if(n&&!s)return(!e._writableState||!e._writableState.ended)&&(_=new nT),r.call(e,_)},"onclose"),g=a(function(){e.req.on("finish",c)},"onrequest");return Y6(e)?(e.on("complete",c),e.on("abort",p),e.req?g():e.on("request",g)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",l),e.on("finish",c),t.error!==!1&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",c),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",c),e.removeListener("end",l),e.removeListener("error",f),e.removeListener("close",p)}}a(iT,"eos");oT.exports=iT});var aT=me((U7,sT)=>{"use strict";var Mp;function Li(e,t,r){return t=X6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(Li,"_defineProperty");function X6(e){var t=J6(e,"string");return typeof t=="symbol"?t:String(t)}a(X6,"_toPropertyKey");function J6(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(J6,"_toPrimitive");var ez=Up(),Ui=Symbol("lastResolve"),Po=Symbol("lastReject"),Uu=Symbol("error"),Fp=Symbol("ended"),To=Symbol("lastPromise"),XA=Symbol("handlePromise"),ko=Symbol("stream");function Mi(e,t){return{value:e,done:t}}a(Mi,"createIterResult");function tz(e){var t=e[Ui];if(t!==null){var r=e[ko].read();r!==null&&(e[To]=null,e[Ui]=null,e[Po]=null,t(Mi(r,!1)))}}a(tz,"readAndResolve");function rz(e){process.nextTick(tz,e)}a(rz,"onReadable");function nz(e,t){return function(r,i){e.then(function(){if(t[Fp]){r(Mi(void 0,!0));return}t[XA](r,i)},i)}}a(nz,"wrapForNext");var iz=Object.getPrototypeOf(function(){}),oz=Object.setPrototypeOf((Mp={get stream(){return this[ko]},next:a(function(){var t=this,r=this[Uu];if(r!==null)return Promise.reject(r);if(this[Fp])return Promise.resolve(Mi(void 0,!0));if(this[ko].destroyed)return new Promise(function(s,c){process.nextTick(function(){t[Uu]?c(t[Uu]):s(Mi(void 0,!0))})});var i=this[To],n;if(i)n=new Promise(nz(i,this));else{var o=this[ko].read();if(o!==null)return Promise.resolve(Mi(o,!1));n=new Promise(this[XA])}return this[To]=n,n},"next")},Li(Mp,Symbol.asyncIterator,function(){return this}),Li(Mp,"return",a(function(){var t=this;return new Promise(function(r,i){t[ko].destroy(null,function(n){if(n){i(n);return}r(Mi(void 0,!0))})})},"_return")),Mp),iz),sz=a(function(t){var r,i=Object.create(oz,(r={},Li(r,ko,{value:t,writable:!0}),Li(r,Ui,{value:null,writable:!0}),Li(r,Po,{value:null,writable:!0}),Li(r,Uu,{value:null,writable:!0}),Li(r,Fp,{value:t._readableState.endEmitted,writable:!0}),Li(r,XA,{value:a(function(o,s){var c=i[ko].read();c?(i[To]=null,i[Ui]=null,i[Po]=null,o(Mi(c,!1))):(i[Ui]=o,i[Po]=s)},"value"),writable:!0}),r));return i[To]=null,ez(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[Po];o!==null&&(i[To]=null,i[Ui]=null,i[Po]=null,o(n)),i[Uu]=n;return}var s=i[Ui];s!==null&&(i[To]=null,i[Ui]=null,i[Po]=null,s(Mi(void 0,!0))),i[Fp]=!0}),t.on("readable",rz.bind(null,i)),i},"createReadableStreamAsyncIterator");sT.exports=sz});var fT=me((F7,lT)=>{"use strict";function cT(e,t,r,i,n,o,s){try{var c=e[o](s),u=c.value}catch(l){r(l);return}c.done?t(u):Promise.resolve(u).then(i,n)}a(cT,"asyncGeneratorStep");function az(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function s(u){cT(o,i,n,s,c,"next",u)}a(s,"_next");function c(u){cT(o,i,n,s,c,"throw",u)}a(c,"_throw"),s(void 0)})}}a(az,"_asyncToGenerator");function uT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}a(uT,"ownKeys");function cz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(r),!0).forEach(function(i){uz(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}a(cz,"_objectSpread");function uz(e,t,r){return t=lz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(uz,"_defineProperty");function lz(e){var t=fz(e,"string");return typeof t=="symbol"?t:String(t)}a(lz,"_toPropertyKey");function fz(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(fz,"_toPrimitive");var dz=Bi().codes.ERR_INVALID_ARG_TYPE;function pz(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new dz("iterable",["Iterable"],t);var n=new e(cz({objectMode:!0},r)),o=!1;n._read=function(){o||(o=!0,s())};function s(){return c.apply(this,arguments)}a(s,"next");function c(){return c=az(function*(){try{var u=yield i.next(),l=u.value,f=u.done;f?n.push(null):n.push(yield l)?s():o=!1}catch(p){n.destroy(p)}}),c.apply(this,arguments)}return a(c,"_next2"),n}a(pz,"from");lT.exports=pz});var ZA=me((W7,bT)=>{"use strict";bT.exports=Pt;var Zs;Pt.ReadableState=gT;var j7=require("events").EventEmitter,hT=a(function(t,r){return t.listeners(r).length},"EElistenerCount"),Fu=$A(),Hp=require("buffer").Buffer,hz=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function gz(e){return Hp.from(e)}a(gz,"_uint8ArrayToBuffer");function mz(e){return Hp.isBuffer(e)||e instanceof hz}a(mz,"_isUint8Array");var JA=require("util"),ht;JA&&JA.debuglog?ht=JA.debuglog("stream"):ht=a(function(){},"debug");var _z=$P(),sb=zA(),yz=LA(),Ez=yz.getHighWaterMark,jp=Bi().codes,Az=jp.ERR_INVALID_ARG_TYPE,bz=jp.ERR_STREAM_PUSH_AFTER_EOF,xz=jp.ERR_METHOD_NOT_IMPLEMENTED,Iz=jp.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Qs,eb,tb;vo()(Pt,Fu);var Mu=sb.errorOrDestroy,rb=["error","close","destroy","pause","resume"];function vz(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}a(vz,"prependListener");function gT(e,t,r){Zs=Zs||So(),e=e||{},typeof r!="boolean"&&(r=t instanceof Zs),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Ez(this,e,"readableHighWaterMark",r),this.buffer=new _z,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Qs||(Qs=YA().StringDecoder),this.decoder=new Qs(e.encoding),this.encoding=e.encoding)}a(gT,"ReadableState");function Pt(e){if(Zs=Zs||So(),!(this instanceof Pt))return new Pt(e);var t=this instanceof Zs;this._readableState=new gT(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Fu.call(this)}a(Pt,"Readable");Object.defineProperty(Pt.prototype,"destroyed",{enumerable:!1,get:a(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:a(function(t){this._readableState&&(this._readableState.destroyed=t)},"set")});Pt.prototype.destroy=sb.destroy;Pt.prototype._undestroy=sb.undestroy;Pt.prototype._destroy=function(e,t){t(e)};Pt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Hp.from(e,t),t=""),i=!0),mT(this,e,t,!1,i)};Pt.prototype.unshift=function(e){return mT(this,e,null,!0,!1)};function mT(e,t,r,i,n){ht("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Pz(e,o);else{var s;if(n||(s=Sz(o,t)),s)Mu(e,s);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Hp.prototype&&(t=gz(t)),i)o.endEmitted?Mu(e,new Iz):nb(e,o,t,!0);else if(o.ended)Mu(e,new bz);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?nb(e,o,t,!1):ob(e,o)):nb(e,o,t,!1)}else i||(o.reading=!1,ob(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}a(mT,"readableAddChunk");function nb(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Wp(e)),ob(e,t)}a(nb,"addChunk");function Sz(e,t){var r;return!mz(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Az("chunk",["string","Buffer","Uint8Array"],t)),r}a(Sz,"chunkInvalid");Pt.prototype.isPaused=function(){return this._readableState.flowing===!1};Pt.prototype.setEncoding=function(e){Qs||(Qs=YA().StringDecoder);var t=new Qs(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var dT=1073741824;function wz(e){return e>=dT?e=dT:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}a(wz,"computeNewHighWaterMark");function pT(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=wz(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}a(pT,"howMuchToRead");Pt.prototype.read=function(e){ht("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ht("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ib(this):Wp(this),null;if(e=pT(e,t),e===0&&t.ended)return t.length===0&&ib(this),null;var i=t.needReadable;ht("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,ht("length less than watermark",i)),t.ended||t.reading?(i=!1,ht("reading or ended",i)):i&&(ht("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=pT(r,t)));var n;return e>0?n=ET(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ib(this)),n!==null&&this.emit("data",n),n};function Pz(e,t){if(ht("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Wp(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,_T(e)))}}a(Pz,"onEofChunk");function Wp(e){var t=e._readableState;ht("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ht("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(_T,e))}a(Wp,"emitReadable");function _T(e){var t=e._readableState;ht("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ab(e)}a(_T,"emitReadable_");function ob(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Tz,e,t))}a(ob,"maybeReadMore");function Tz(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(ht("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}a(Tz,"maybeReadMore_");Pt.prototype._read=function(e){Mu(this,new xz("_read()"))};Pt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,ht("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=n?c:y;i.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",s);function s(b,v){ht("onunpipe"),b===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,f())}a(s,"onunpipe");function c(){ht("onend"),e.end()}a(c,"onend");var u=kz(r);e.on("drain",u);var l=!1;function f(){ht("cleanup"),e.removeListener("close",h),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",g),e.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",p),l=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}a(f,"cleanup"),r.on("data",p);function p(b){ht("ondata");var v=e.write(b);ht("dest.write",v),v===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&AT(i.pipes,e)!==-1)&&!l&&(ht("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}a(p,"ondata");function g(b){ht("onerror",b),y(),e.removeListener("error",g),hT(e,"error")===0&&Mu(e,b)}a(g,"onerror"),vz(e,"error",g);function h(){e.removeListener("finish",_),y()}a(h,"onclose"),e.once("close",h);function _(){ht("onfinish"),e.removeListener("close",h),y()}a(_,"onfinish"),e.once("finish",_);function y(){ht("unpipe"),r.unpipe(e)}return a(y,"unpipe"),e.emit("pipe",r),i.flowing||(ht("pipe resume"),r.resume()),e};function kz(e){return a(function(){var r=e._readableState;ht("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&hT(e,"data")&&(r.flowing=!0,ab(e))},"pipeOnDrainFunctionResult")}a(kz,"pipeOnDrain");Pt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=AT(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Pt.prototype.on=function(e,t){var r=Fu.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,ht("on readable",i.length,i.reading),i.length?Wp(this):i.reading||process.nextTick(Cz,this)),r};Pt.prototype.addListener=Pt.prototype.on;Pt.prototype.removeListener=function(e,t){var r=Fu.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(yT,this),r};Pt.prototype.removeAllListeners=function(e){var t=Fu.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(yT,this),t};function yT(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}a(yT,"updateReadableListening");function Cz(e){ht("readable nexttick read 0"),e.read(0)}a(Cz,"nReadingNextTick");Pt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ht("resume"),e.flowing=!e.readableListening,Rz(this,e)),e.paused=!1,this};function Rz(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(Oz,e,t))}a(Rz,"resume");function Oz(e,t){ht("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ab(e),t.flowing&&!t.reading&&e.read(0)}a(Oz,"resume_");Pt.prototype.pause=function(){return ht("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ht("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ab(e){var t=e._readableState;for(ht("flow",t.flowing);t.flowing&&e.read()!==null;);}a(ab,"flow");Pt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(ht("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(ht("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var c=t.push(s);c||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=a(function(c){return a(function(){return e[c].apply(e,arguments)},"methodWrapReturnFunction")},"methodWrap")(n));for(var o=0;o<rb.length;o++)e.on(rb[o],this.emit.bind(this,rb[o]));return this._read=function(s){ht("wrapped _read",s),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(Pt.prototype[Symbol.asyncIterator]=function(){return eb===void 0&&(eb=aT()),eb(this)});Object.defineProperty(Pt.prototype,"readableHighWaterMark",{enumerable:!1,get:a(function(){return this._readableState.highWaterMark},"get")});Object.defineProperty(Pt.prototype,"readableBuffer",{enumerable:!1,get:a(function(){return this._readableState&&this._readableState.buffer},"get")});Object.defineProperty(Pt.prototype,"readableFlowing",{enumerable:!1,get:a(function(){return this._readableState.flowing},"get"),set:a(function(t){this._readableState&&(this._readableState.flowing=t)},"set")});Pt._fromList=ET;Object.defineProperty(Pt.prototype,"readableLength",{enumerable:!1,get:a(function(){return this._readableState.length},"get")});function ET(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}a(ET,"fromList");function ib(e){var t=e._readableState;ht("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(Nz,t,e))}a(ib,"endReadable");function Nz(e,t){if(ht("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}a(Nz,"endReadableNT");typeof Symbol=="function"&&(Pt.from=function(e,t){return tb===void 0&&(tb=fT()),tb(Pt,e,t)});function AT(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}a(AT,"indexOf")});var cb=me((V7,IT)=>{"use strict";IT.exports=ii;var qp=Bi().codes,$z=qp.ERR_METHOD_NOT_IMPLEMENTED,Dz=qp.ERR_MULTIPLE_CALLBACK,Bz=qp.ERR_TRANSFORM_ALREADY_TRANSFORMING,zz=qp.ERR_TRANSFORM_WITH_LENGTH_0,Vp=So();vo()(ii,Vp);function Lz(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Dz);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}a(Lz,"afterTransform");function ii(e){if(!(this instanceof ii))return new ii(e);Vp.call(this,e),this._transformState={afterTransform:Lz.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Uz)}a(ii,"Transform");function Uz(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){xT(e,t,r)}):xT(this,null,null)}a(Uz,"prefinish");ii.prototype.push=function(e,t){return this._transformState.needTransform=!1,Vp.prototype.push.call(this,e,t)};ii.prototype._transform=function(e,t,r){r(new $z("_transform()"))};ii.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};ii.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};ii.prototype._destroy=function(e,t){Vp.prototype._destroy.call(this,e,function(r){t(r)})};function xT(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new zz;if(e._transformState.transforming)throw new Bz;return e.push(null)}a(xT,"done")});var wT=me((Q7,ST)=>{"use strict";ST.exports=Hu;var vT=cb();vo()(Hu,vT);function Hu(e){if(!(this instanceof Hu))return new Hu(e);vT.call(this,e)}a(Hu,"PassThrough");Hu.prototype._transform=function(e,t,r){r(null,e)}});var RT=me((G7,CT)=>{"use strict";var ub;function Mz(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}a(Mz,"once");var kT=Bi().codes,Fz=kT.ERR_MISSING_ARGS,Hz=kT.ERR_STREAM_DESTROYED;function PT(e){if(e)throw e}a(PT,"noop");function jz(e){return e.setHeader&&typeof e.abort=="function"}a(jz,"isRequest");function Wz(e,t,r,i){i=Mz(i);var n=!1;e.on("close",function(){n=!0}),ub===void 0&&(ub=Up()),ub(e,{readable:t,writable:r},function(s){if(s)return i(s);n=!0,i()});var o=!1;return function(s){if(!n&&!o){if(o=!0,jz(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(s||new Hz("pipe"))}}}a(Wz,"destroyer");function TT(e){e()}a(TT,"call");function qz(e,t){return e.pipe(t)}a(qz,"pipe");function Vz(e){return!e.length||typeof e[e.length-1]!="function"?PT:e.pop()}a(Vz,"popCallback");function Zz(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=Vz(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Fz("streams");var n,o=t.map(function(s,c){var u=c<t.length-1,l=c>0;return Wz(s,u,l,function(f){n||(n=f),f&&o.forEach(TT),!u&&(o.forEach(TT),i(n))})});return t.reduce(qz)}a(Zz,"pipeline");CT.exports=Zz});var OT=me((_n,Wu)=>{var ju=require("stream");process.env.READABLE_STREAM==="disable"&&ju?(Wu.exports=ju.Readable,Object.assign(Wu.exports,ju),Wu.exports.Stream=ju):(_n=Wu.exports=ZA(),_n.Stream=ju||_n,_n.Readable=_n,_n.Writable=WA(),_n.Duplex=So(),_n.Transform=cb(),_n.PassThrough=wT(),_n.finished=Up(),_n.pipeline=RT())});var $T=me((X7,NT)=>{var Qz=Object.prototype.toString,lb=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function Kz(e){return Qz.call(e).slice(8,-1)==="ArrayBuffer"}a(Kz,"isArrayBuffer");function Gz(e,t,r){t>>>=0;var i=e.byteLength-t;if(i<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=i;else if(r>>>=0,r>i)throw new RangeError("'length' is out of bounds");return lb?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}a(Gz,"fromArrayBuffer");function Yz(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return lb?Buffer.from(e,t):new Buffer(e,t)}a(Yz,"fromString");function Xz(e,t,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return Kz(e)?Gz(e,t,r):typeof e=="string"?Yz(e,t):lb?Buffer.from(e):new Buffer(e)}a(Xz,"bufferFrom");NT.exports=Xz});var MT=me(Ve=>{var DT=void 0,Jz=1e5,jt=(function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;return{Class:a(function(r){return e.call(r).replace(/^\[object *|\]$/g,"")},"Class"),HasProperty:a(function(r,i){return i in r},"HasProperty"),HasOwnProperty:a(function(r,i){return t.call(r,i)},"HasOwnProperty"),IsCallable:a(function(r){return typeof r=="function"},"IsCallable"),ToInt32:a(function(r){return r>>0},"ToInt32"),ToUint32:a(function(r){return r>>>0},"ToUint32")}})(),eL=Math.LN2,tL=Math.abs,Zp=Math.floor,rL=Math.log,nL=Math.min,Pn=Math.pow,iL=Math.round;function fb(e){if(BT&&Ks){var t=BT(e),r;for(r=0;r<t.length;r+=1)Ks(e,t[r],{value:e[t[r]],writable:!1,enumerable:!1,configurable:!1})}}a(fb,"configureProperties");var Ks;Object.defineProperty&&(function(){try{return Object.defineProperty({},"x",{}),!0}catch{return!1}})()?Ks=Object.defineProperty:Ks=a(function(e,t,r){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return jt.HasProperty(r,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,r.get),jt.HasProperty(r,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,r.set),jt.HasProperty(r,"value")&&(e[t]=r.value),e},"defineProp");var BT=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t=[],r;for(r in e)jt.HasOwnProperty(e,r)&&t.push(r);return t};function oL(e){if(!Ks)return;if(e.length>Jz)throw new RangeError("Array too large for polyfill");function t(i){Ks(e,i,{get:a(function(){return e._getter(i)},"get"),set:a(function(n){e._setter(i,n)},"set"),enumerable:!0,configurable:!1})}a(t,"makeArrayAccessor");var r;for(r=0;r<e.length;r+=1)t(r)}a(oL,"makeArrayAccessors");function db(e,t){var r=32-t;return e<<r>>r}a(db,"as_signed");function pb(e,t){var r=32-t;return e<<r>>>r}a(pb,"as_unsigned");function sL(e){return[e&255]}a(sL,"packI8");function aL(e){return db(e[0],8)}a(aL,"unpackI8");function cL(e){return[e&255]}a(cL,"packU8");function zT(e){return pb(e[0],8)}a(zT,"unpackU8");function uL(e){return e=iL(Number(e)),[e<0?0:e>255?255:e&255]}a(uL,"packU8Clamped");function lL(e){return[e>>8&255,e&255]}a(lL,"packI16");function fL(e){return db(e[0]<<8|e[1],16)}a(fL,"unpackI16");function dL(e){return[e>>8&255,e&255]}a(dL,"packU16");function pL(e){return pb(e[0]<<8|e[1],16)}a(pL,"unpackU16");function hL(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}a(hL,"packI32");function gL(e){return db(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}a(gL,"unpackI32");function mL(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}a(mL,"packU32");function _L(e){return pb(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}a(_L,"unpackU32");function LT(e,t,r){var i=(1<<t-1)-1,n,o,s,c,u,l,f,p;function g(h){var _=Zp(h),y=h-_;return y<.5?_:y>.5||_%2?_+1:_}for(a(g,"roundToEven"),e!==e?(o=(1<<t)-1,s=Pn(2,r-1),n=0):e===1/0||e===-1/0?(o=(1<<t)-1,s=0,n=e<0?1:0):e===0?(o=0,s=0,n=1/e===-1/0?1:0):(n=e<0,e=tL(e),e>=Pn(2,1-i)?(o=nL(Zp(rL(e)/eL),1023),s=g(e/Pn(2,o)*Pn(2,r)),s/Pn(2,r)>=2&&(o=o+1,s=1),o>i?(o=(1<<t)-1,s=0):(o=o+i,s=s-Pn(2,r))):(o=0,s=g(e/Pn(2,1-i-r)))),l=[],u=r;u;u-=1)l.push(s%2?1:0),s=Zp(s/2);for(u=t;u;u-=1)l.push(o%2?1:0),o=Zp(o/2);for(l.push(n?1:0),l.reverse(),f=l.join(""),p=[];f.length;)p.push(parseInt(f.substring(0,8),2)),f=f.substring(8);return p}a(LT,"packIEEE754");function UT(e,t,r){var i=[],n,o,s,c,u,l,f,p;for(n=e.length;n;n-=1)for(s=e[n-1],o=8;o;o-=1)i.push(s%2?1:0),s=s>>1;return i.reverse(),c=i.join(""),u=(1<<t-1)-1,l=parseInt(c.substring(0,1),2)?-1:1,f=parseInt(c.substring(1,1+t),2),p=parseInt(c.substring(1+t),2),f===(1<<t)-1?p!==0?NaN:l*(1/0):f>0?l*Pn(2,f-u)*(1+p/Pn(2,r)):p!==0?l*Pn(2,-(u-1))*(p/Pn(2,r)):l<0?-0:0}a(UT,"unpackIEEE754");function yL(e){return UT(e,11,52)}a(yL,"unpackF64");function EL(e){return LT(e,11,52)}a(EL,"packF64");function AL(e){return UT(e,8,23)}a(AL,"unpackF32");function bL(e){return LT(e,8,23)}a(bL,"packF32");(function(){var e=a(function(h){if(h=jt.ToInt32(h),h<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=h,this._bytes=[],this._bytes.length=h;var _;for(_=0;_<this.byteLength;_+=1)this._bytes[_]=0;fb(this)},"ArrayBuffer");Ve.ArrayBuffer=Ve.ArrayBuffer||e;var t=a(function(){},"ArrayBufferView");function r(g,h,_){var y;return y=a(function(b,v,S){var M,R,J,te;if(!arguments.length||typeof arguments[0]=="number"){if(this.length=jt.ToInt32(arguments[0]),S<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0}else if(typeof arguments[0]=="object"&&arguments[0].constructor===y)for(M=arguments[0],this.length=M.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,J=0;J<this.length;J+=1)this._setter(J,M._getter(J));else if(typeof arguments[0]=="object"&&!(arguments[0]instanceof e||jt.Class(arguments[0])==="ArrayBuffer"))for(R=arguments[0],this.length=jt.ToUint32(R.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,J=0;J<this.length;J+=1)te=R[J],this._setter(J,Number(te));else if(typeof arguments[0]=="object"&&(arguments[0]instanceof e||jt.Class(arguments[0])==="ArrayBuffer")){if(this.buffer=b,this.byteOffset=jt.ToUint32(v),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=jt.ToUint32(S),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else throw new TypeError("Unexpected argument type(s)");this.constructor=y,fb(this),oL(this)},"ctor"),y.prototype=new t,y.prototype.BYTES_PER_ELEMENT=g,y.prototype._pack=h,y.prototype._unpack=_,y.BYTES_PER_ELEMENT=g,y.prototype._getter=function(b){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(b=jt.ToUint32(b),b>=this.length)return DT;var v=[],S,M;for(S=0,M=this.byteOffset+b*this.BYTES_PER_ELEMENT;S<this.BYTES_PER_ELEMENT;S+=1,M+=1)v.push(this.buffer._bytes[M]);return this._unpack(v)},y.prototype.get=y.prototype._getter,y.prototype._setter=function(b,v){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(b=jt.ToUint32(b),b>=this.length)return DT;var S=this._pack(v),M,R;for(M=0,R=this.byteOffset+b*this.BYTES_PER_ELEMENT;M<this.BYTES_PER_ELEMENT;M+=1,R+=1)this.buffer._bytes[R]=S[M]},y.prototype.set=function(b,v){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var S,M,R,J,te,ee,P,C,H,U;if(typeof arguments[0]=="object"&&arguments[0].constructor===this.constructor){if(S=arguments[0],R=jt.ToUint32(arguments[1]),R+S.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(C=this.byteOffset+R*this.BYTES_PER_ELEMENT,H=S.length*this.BYTES_PER_ELEMENT,S.buffer===this.buffer){for(U=[],te=0,ee=S.byteOffset;te<H;te+=1,ee+=1)U[te]=S.buffer._bytes[ee];for(te=0,P=C;te<H;te+=1,P+=1)this.buffer._bytes[P]=U[te]}else for(te=0,ee=S.byteOffset,P=C;te<H;te+=1,ee+=1,P+=1)this.buffer._bytes[P]=S.buffer._bytes[ee]}else if(typeof arguments[0]=="object"&&typeof arguments[0].length<"u"){if(M=arguments[0],J=jt.ToUint32(M.length),R=jt.ToUint32(arguments[1]),R+J>this.length)throw new RangeError("Offset plus length of array is out of range");for(te=0;te<J;te+=1)ee=M[te],this._setter(R+te,Number(ee))}else throw new TypeError("Unexpected argument type(s)")},y.prototype.subarray=function(b,v){function S(R,J,te){return R<J?J:R>te?te:R}a(S,"clamp"),b=jt.ToInt32(b),v=jt.ToInt32(v),arguments.length<1&&(b=0),arguments.length<2&&(v=this.length),b<0&&(b=this.length+b),v<0&&(v=this.length+v),b=S(b,0,this.length),v=S(v,0,this.length);var M=v-b;return M<0&&(M=0),new this.constructor(this.buffer,this.byteOffset+b*this.BYTES_PER_ELEMENT,M)},y}a(r,"makeConstructor");var i=r(1,sL,aL),n=r(1,cL,zT),o=r(1,uL,zT),s=r(2,lL,fL),c=r(2,dL,pL),u=r(4,hL,gL),l=r(4,mL,_L),f=r(4,bL,AL),p=r(8,EL,yL);Ve.Int8Array=Ve.Int8Array||i,Ve.Uint8Array=Ve.Uint8Array||n,Ve.Uint8ClampedArray=Ve.Uint8ClampedArray||o,Ve.Int16Array=Ve.Int16Array||s,Ve.Uint16Array=Ve.Uint16Array||c,Ve.Int32Array=Ve.Int32Array||u,Ve.Uint32Array=Ve.Uint32Array||l,Ve.Float32Array=Ve.Float32Array||f,Ve.Float64Array=Ve.Float64Array||p})();(function(){function e(o,s){return jt.IsCallable(o.get)?o.get(s):o[s]}a(e,"r");var t=(function(){var o=new Ve.Uint16Array([4660]),s=new Ve.Uint8Array(o.buffer);return e(s,0)===18})(),r=a(function(s,c,u){if(arguments.length===0)s=new Ve.ArrayBuffer(0);else if(!(s instanceof Ve.ArrayBuffer||jt.Class(s)==="ArrayBuffer"))throw new TypeError("TypeError");if(this.buffer=s||new Ve.ArrayBuffer(0),this.byteOffset=jt.ToUint32(c),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=jt.ToUint32(u),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");fb(this)},"DataView");function i(o){return function(s,c){if(s=jt.ToUint32(s),s+o.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");s+=this.byteOffset;var u=new Ve.Uint8Array(this.buffer,s,o.BYTES_PER_ELEMENT),l=[],f;for(f=0;f<o.BYTES_PER_ELEMENT;f+=1)l.push(e(u,f));return!!c==!!t&&l.reverse(),e(new o(new Ve.Uint8Array(l).buffer),0)}}a(i,"makeGetter"),r.prototype.getUint8=i(Ve.Uint8Array),r.prototype.getInt8=i(Ve.Int8Array),r.prototype.getUint16=i(Ve.Uint16Array),r.prototype.getInt16=i(Ve.Int16Array),r.prototype.getUint32=i(Ve.Uint32Array),r.prototype.getInt32=i(Ve.Int32Array),r.prototype.getFloat32=i(Ve.Float32Array),r.prototype.getFloat64=i(Ve.Float64Array);function n(o){return function(s,c,u){if(s=jt.ToUint32(s),s+o.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var l=new o([c]),f=new Ve.Uint8Array(l.buffer),p=[],g,h;for(g=0;g<o.BYTES_PER_ELEMENT;g+=1)p.push(e(f,g));!!u==!!t&&p.reverse(),h=new Ve.Uint8Array(this.buffer,s,o.BYTES_PER_ELEMENT),h.set(p)}}a(n,"makeSetter"),r.prototype.setUint8=n(Ve.Uint8Array),r.prototype.setInt8=n(Ve.Int8Array),r.prototype.setUint16=n(Ve.Uint16Array),r.prototype.setInt16=n(Ve.Int16Array),r.prototype.setUint32=n(Ve.Uint32Array),r.prototype.setInt32=n(Ve.Int32Array),r.prototype.setFloat32=n(Ve.Float32Array),r.prototype.setFloat64=n(Ve.Float64Array),Ve.DataView=Ve.DataView||r})()});var WT=me((rK,jT)=>{var FT=OT().Writable,xL=vo(),qu=$T();typeof Uint8Array>"u"?Qp=MT().Uint8Array:Qp=Uint8Array;var Qp;function Co(e,t){if(!(this instanceof Co))return new Co(e,t);typeof e=="function"&&(t=e,e={}),e||(e={});var r=e.encoding,i=!1;r?(r=String(r).toLowerCase(),(r==="u8"||r==="uint8")&&(r="uint8array")):i=!0,FT.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=i,t&&this.on("finish",function(){t(this.getBody())}),this.body=[]}a(Co,"ConcatStream");jT.exports=Co;xL(Co,FT);Co.prototype._write=function(e,t,r){this.body.push(e),r()};Co.prototype.inferEncoding=function(e){var t=e===void 0?this.body[0]:e;return Buffer.isBuffer(t)?"buffer":typeof Uint8Array<"u"&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":typeof t=="string"?"string":Object.prototype.toString.call(t)==="[object Object]"?"object":"buffer"};Co.prototype.getBody=function(){return!this.encoding&&this.body.length===0?[]:(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),this.encoding==="array"?wL(this.body):this.encoding==="string"?vL(this.body):this.encoding==="buffer"?SL(this.body):this.encoding==="uint8array"?PL(this.body):this.body)};function IL(e){return/Array\]$/.test(Object.prototype.toString.call(e))}a(IL,"isArrayish");function HT(e){return typeof e=="string"||IL(e)||e&&typeof e.subarray=="function"}a(HT,"isBufferish");function vL(e){for(var t=[],r=!1,i=0;i<e.length;i++){var n=e[i];typeof n=="string"||Buffer.isBuffer(n)?t.push(n):HT(n)?t.push(qu(n)):t.push(qu(String(n)))}return Buffer.isBuffer(e[0])?(t=Buffer.concat(t),t=t.toString("utf8")):t=t.join(""),t}a(vL,"stringConcat");function SL(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];Buffer.isBuffer(i)?t.push(i):HT(i)?t.push(qu(i)):t.push(qu(String(i)))}return Buffer.concat(t)}a(SL,"bufferConcat");function wL(e){for(var t=[],r=0;r<e.length;r++)t.push.apply(t,e[r]);return t}a(wL,"arrayConcat");function PL(e){for(var t=0,r=0;r<e.length;r++)typeof e[r]=="string"&&(e[r]=qu(e[r])),t+=e[r].length;for(var i=new Qp(t),r=0,n=0;r<e.length;r++)for(var o=e[r],s=0;s<o.length;s++)i[n++]=o[s];return i}a(PL,"u8Concat")});var ZT=me((iK,VT)=>{"use strict";function qT(e,t){for(let r in t)Object.defineProperty(e,r,{value:t[r],enumerable:!0,configurable:!0});return e}a(qT,"assign");function TL(e,t,r){if(!e||typeof e=="string")throw new TypeError("Please pass an Error to err-code");r||(r={}),typeof t=="object"&&(r=t,t=void 0),t!=null&&(r.code=t);try{return qT(e,r)}catch{r.message=e.message,r.stack=e.stack;let n=a(function(){},"ErrClass");return n.prototype=Object.create(Object.getPrototypeOf(e)),qT(new n,r)}}a(TL,"createError");VT.exports=TL});var KT=me((sK,QT)=>{function yn(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(yn,"RetryOperation");QT.exports=yn;yn.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};yn.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};yn.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var i=this,n=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r);return this._options.unref&&n.unref(),!0};yn.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};yn.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};yn.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};yn.prototype.start=yn.prototype.try;yn.prototype.errors=function(){return this._errors};yn.prototype.attempts=function(){return this._attempts};yn.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,r=0,i=0;i<this._errors.length;i++){var n=this._errors[i],o=n.message,s=(e[o]||0)+1;e[o]=s,s>=r&&(t=n,r=s)}return t}});var GT=me(Ro=>{var kL=KT();Ro.operation=function(e){var t=Ro.timeouts(e);return new kL(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Ro.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],n=0;n<t.retries;n++)i.push(this.createTimeout(n,t));return e&&e.forever&&!i.length&&i.push(this.createTimeout(n,t)),i.sort(function(o,s){return o-s}),i};Ro.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,i=Math.round(r*t.minTimeout*Math.pow(t.factor,e));return i=Math.min(i,t.maxTimeout),i};Ro.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r){r=[];for(var i in e)typeof e[i]=="function"&&r.push(i)}for(var n=0;n<r.length;n++){var o=r[n],s=e[o];e[o]=a(function(u){var l=Ro.operation(t),f=Array.prototype.slice.call(arguments,1),p=f.pop();f.push(function(g){l.retry(g)||(g&&(arguments[0]=l.mainError()),p.apply(this,arguments))}),l.attempt(function(){u.apply(e,f)})},"retryWrapper").bind(e,s),e[o].options=t}}});var XT=me((lK,YT)=>{YT.exports=GT()});var tk=me((fK,ek)=>{"use strict";var CL=ZT(),RL=XT(),OL=Object.prototype.hasOwnProperty;function JT(e){return e&&e.code==="EPROMISERETRY"&&OL.call(e,"retried")}a(JT,"isRetryError");function NL(e,t){var r,i;return typeof e=="object"&&typeof t=="function"&&(r=t,t=e,e=r),i=RL.operation(t),new Promise(function(n,o){i.attempt(function(s){Promise.resolve().then(function(){return e(function(c){throw JT(c)&&(c=c.retried),CL(new Error("Retrying"),"EPROMISERETRY",{retried:c})},s)}).then(n,function(c){JT(c)&&(c=c.retried,i.retry(c||new Error))||o(c)})})})}a(NL,"promiseRetry");ek.exports=NL});var hb=me((pK,rk)=>{var $L={generic:"ERR_GENERIC_CLIENT",connect:"ERR_NOT_CONNECTED",badPath:"ERR_BAD_PATH",permission:"EACCES",notexist:"ENOENT",notdir:"ENOTDIR",badAuth:"ERR_BAD_AUTH"},DL={writeFile:1,readFile:2,writeDir:3,readDir:4,readObj:5,writeObj:6};rk.exports={errorCode:$L,targetType:DL}});var ck=me((hK,ak)=>{var Vu=require("fs"),BL=require("path"),{errorCode:nk}=hb();function ik(e,t,r){return a(n=>{if(e.endCalled||e.errorHandled){e.debugMsg(`${t} errorListener - ignoring handled error`);return}e.errorHandled=!0;let o=new Error(`${t}: ${n.message}`);if(o.code=n.code,r)r(o);else throw o},"fn")}a(ik,"errorListener");function zL(e,t){return()=>{e.endCalled||e.errorHandled||e.closeHandled?e.debugMsg(`Global ${t} event: Ignoring expected and handled event`):(e.debugMsg(`Global ${t} event: Handling unexpected event`),e.sftp=void 0)}}a(zL,"globalListener");function ok(e,t,r){return a(function(){if(e.sftp=void 0,e.endCalled||e.endHandled||e.errorHandled){e.debugMsg(`${t} endListener - ignoring handled error`);return}e.endHandled=!0,e.debugMsg(`${t} Unexpected end event - ignoring`)},"fn")}a(ok,"endListener");function sk(e,t,r){return a(function(){if(e.sftp=void 0,e.endCalled||e.closeHandled||e.errorHandled||e.endHandled){e.debugMsg(`${t} closeListener - ignoring handled error`);return}e.closeHandled=!0,e.debugMsg(`${t} Unexpected close event raised - ignoring`)},"fn")}a(sk,"closeListener");function LL(e,t,r){let i={end:ok(e,t,r),close:sk(e,t,r),error:ik(e,t,r)};return e.on("end",i.end),e.on("close",i.close),e.on("error",i.error),e._resetEventFlags(),i}a(LL,"addTempListeners");function UL(e,t,r){try{e.removeListener("end",t.end),e.removeListener("close",t.close),e.removeListener("error",t.error)}catch(i){throw new Error(`${r}: Error removing temp listeners: ${i.message}`)}}a(UL,"removeTempListeners");function gb(e){let t=Vu.statSync(e,{throwIfNoEntry:!1});if(t){if(t.isDirectory())return"d";if(t.isFile())return"-";{let r=new Error(`Bad path: ${e}: target must be a file or directory`);throw r.code=nk.badPath,r}}else return!1}a(gb,"localExists");function mb(e,t="r"){let r=Vu.constants.F_OK|t==="w"?Vu.constants.W_OK:Vu.constants.R_OK;try{return Vu.accessSync(e,r),{status:!0,type:gb(e),details:"access OK",code:0}}catch(i){switch(i.errno){case-2:return{status:!1,type:null,details:"not exist",code:-2};case-13:return{status:!1,type:gb(e),details:"permission denied",code:-13};case-20:return{status:!1,type:null,details:"parent not a directory"};default:return{status:!1,type:null,details:i.message}}}}a(mb,"haveLocalAccess");function ML(e){let{status:t,details:r,type:i}=mb(e,"w");if(!t&&r==="permission denied")return{status:t,details:r,type:i};if(!t){let n=BL.dirname(e),o=mb(n,"w");return o.status&&o.type!=="d"?{status:!1,details:`${n}: not a directory`,type:null}:o.status?{status:!0,details:"access OK",type:null,code:0}:{status:o.status,details:`${n}: ${o.details}`,type:null}}return{status:t,details:r,type:i}}a(ML,"haveLocalCreate");async function FL(e,t){try{return t.startsWith("..")?`${await e.realPath("..")}/${t.slice(3)}`:t.startsWith(".")?`${await e.realPath(".")}/${t.slice(2)}`:t}catch(r){throw new Error(`normalizeRemotePath: ${r.message}`)}}a(FL,"normalizeRemotePath");function HL(e,t,r){if(!e.sftp){let i=new Error(`${t}: No SFTP connection available`);if(i.code=nk.connect,r)return r(i),!1;throw i}return!0}a(HL,"haveConnection");function jL(e){return new Promise((t,r)=>{try{isNaN(e)||e<0?r("Argument must be anumber >= 0"):setTimeout(()=>{t(!0)},e)}catch(i){r(i)}})}a(jL,"sleep");ak.exports={globalListener:zL,errorListener:ik,endListener:ok,closeListener:sk,addTempListeners:LL,removeTempListeners:UL,haveLocalAccess:mb,haveLocalCreate:ML,normalizeRemotePath:FL,localExists:gb,haveConnection:HL,sleep:jL}});var dk=me((mK,fk)=>{"use strict";var{Client:WL}=PP(),Kp=require("fs"),qL=WT(),VL=tk(),{join:Zu,parse:ZL}=require("path"),{globalListener:_b,addTempListeners:Gt,removeTempListeners:Yt,haveConnection:wr,normalizeRemotePath:Qu,localExists:uk,haveLocalAccess:lk,haveLocalCreate:yb}=ck(),{errorCode:Wt}=hb(),Eb=class{static{a(this,"SftpClient")}constructor(t){this.version="9.0.4",this.client=new WL,this.sftp=void 0,this.clientName=t||"sftp",this.endCalled=!1,this.errorHandled=!1,this.closeHandled=!1,this.endHandled=!1,this.remotePlatform="unix",this.debug=void 0,this.client.on("close",_b(this,"close")),this.client.on("end",_b(this,"end")),this.client.on("error",_b(this,"error"))}debugMsg(t,r){this.debug&&(r?this.debug(`CLIENT[${this.clientName}]: ${t} ${JSON.stringify(r,null," ")}`):this.debug(`CLIENT[${this.clientName}]: ${t}`))}fmtError(t,r="sftp",i,n){let o="",s="",c=n?` after ${n} ${n>1?"attempts":"attempt"}`:"";if(t===void 0)o=`${r}: Undefined error - probably a bug!`,s=Wt.generic;else if(typeof t=="string")o=`${r}: ${t}${c}`,s=i||Wt.generic;else if(t.custom)o=`${r}->${t.message}${c}`,s=t.code;else{switch(t.code){case"ENOTFOUND":o=`${r}: Address lookup failed for host${c}`;break;case"ECONNREFUSED":o=`${r}: Remote host refused connection${c}`;break;case"ECONNRESET":o=`${r}: Remote host has reset the connection: ${t.message}${c}`;break;default:o=`${r}: ${t.message}${c}`}s=t.code?t.code:Wt.generic}let u=new Error(o);return u.code=s,u.custom=!0,this.debugMsg(`${u.message} (${u.code})`),u}on(t,r){this.client.prependListener(t,r)}removeListener(t,r){this.client.removeListener(t,r)}_resetEventFlags(){this.closeHandled=!1,this.endHandled=!1,this.errorHandled=!1}getConnection(t){let r,i;return new Promise((n,o)=>{i=Gt(this,"getConnection",o),r=a(()=>{this.debugMsg("getConnection ready listener: got connection - promise resolved"),n(!0)},"doReady"),this.on("ready",r);try{this.client.connect(t)}catch(s){this.debugMsg(`getConnection: ${s.message}`),o(s)}}).finally(()=>{this.removeListener("ready",r),Yt(this,i,"getConnection")})}getSftpChannel(){return new Promise((t,r)=>{this.client.sftp((i,n)=>{i?r(this.fmtError(i,"getSftpChannel",i.code)):(this.sftp=n,t(n))})})}async connect(t){let r;try{if(r=Gt(this,"connect"),t.debug&&(this.debug=t.debug,this.debugMsg("connect: Debugging turned on"),this.debugMsg(`ssh2-sftp-client Version: ${this.version} `,process.versions)),this.sftp)throw this.fmtError("An existing SFTP connection is already defined","connect",Wt.connect);let i={retries:t.retries??1,factor:t.factor??2,minTimeout:t.retry_minTimeout??25e3};return await VL(i,async(o,s)=>{try{this.debugMsg(`connect: Connect attempt ${s}`),await this.getConnection(t)}catch(c){switch(c.code){case"ENOTFOUND":case"ECONNREFUSED":case"ERR_SOCKET_BAD_PORT":throw c;case void 0:{if(c.message.endsWith("All configured authentication methods failed")||c.message.startsWith("Cannot parse privateKey"))throw c;o(c);break}default:o(c)}}}),await this.getSftpChannel()}catch(i){throw this.end(),i.custom?i:this.fmtError(i,"connect")}finally{Yt(this,r,"connect")}}realPath(t,r=!0){let i;return new Promise((n,o)=>{r&&(i=Gt(this,"realPath",o)),this.debugMsg(`realPath -> ${t}`),this.sftp.realpath(t,(s,c)=>{s&&(s.code===2?(this.debugMsg('realPath <- ""'),n("")):(this.debugMsg(`${s.message} ${t}`,"realPath"),o(this.fmtError(`${s.message} ${t}`,"realPath",s.code)))),this.debugMsg(`realPath <- ${c}`),n(c)})}).finally(()=>{r&&Yt(this,i,"realPath")})}cwd(){return this.realPath(".")}_xstat(t,r,i=!0){let n;return new Promise((o,s)=>{let c=a((u,l)=>{if(u)u.code===2||u.code===4?s(this.fmtError(`No such file: ${r}`,"_xstat",Wt.notexist)):s(this.fmtError(`${u.message} ${r}`,"_xstat",u.code));else{let f={mode:l.mode,uid:l.uid,gid:l.gid,size:l.size,accessTime:l.atime*1e3,modifyTime:l.mtime*1e3,isDirectory:l.isDirectory(),isFile:l.isFile(),isBlockDevice:l.isBlockDevice(),isCharacterDevice:l.isCharacterDevice(),isSymbolicLink:l.isSymbolicLink(),isFIFO:l.isFIFO(),isSocket:l.isSocket()};this.debugMsg("_xstat: result = ",f),o(f)}},"cb");i&&(n=Gt(this,"_xstat",s)),t==="stat"?this.sftp.stat(r,c):this.sftp.lstat(r,c)}).finally(()=>{i&&Yt(this,n,"_xstat")})}async stat(t){try{return wr(this,"stat"),await this._xstat("stat",t)}catch(r){throw r.custom?r:this.fmtError(r,"stat",r.code)}}async lstat(t){try{return wr(this,"lstat"),await this._xstat("lstat",t)}catch(r){throw r.custom?r:this.fmtError(r,"lstat",r.code)}}async exists(t){this.debugMsg(`exists: remotePath = ${t}`);try{if(t===".")return"d";let r=await this.lstat(t);return this.debugMsg("exists: <- ",r),r.isDirectory?"d":r.isSymbolicLink?"l":r.isFile?"-":!1}catch(r){if(r.code===Wt.notexist)return!1;throw r.custom?r:this.fmtError(r.message,"exists",r.code)}}list(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Gt(this,"list",s)),wr(this,"list",s)&&this.sftp.readdir(t,(c,u)=>{if(c)s(this.fmtError(`${c.message} ${t}`,"list",c.code));else{let l=/-/gi,f=u.map(p=>({type:p.longname.slice(0,1),name:p.filename,size:p.attrs.size,modifyTime:p.attrs.mtime*1e3,accessTime:p.attrs.atime*1e3,rights:{user:p.longname.slice(1,4).replace(l,""),group:p.longname.slice(4,7).replace(l,""),other:p.longname.slice(7,10).replace(l,"")},owner:p.attrs.uid,group:p.attrs.gid,longname:p.longname}));o(r?f.filter(p=>r(p)):f)}})}).finally(()=>{i&&Yt(this,n,"list")})}get(t,r,i,n=!0){let o,s,c;return new Promise((u,l)=>{if(n&&(o=Gt(this,"get",l)),wr(this,"get",l)){if(i={readStreamOptions:{...i?.readStreamOptions,autoClose:!0},writeStreamOptions:{...i?.writeStreamOptions,autoClose:!0},pipeOptions:{...i?.pipeOptions,end:!0}},s=this.sftp.createReadStream(t,i.readStreamOptions),s.once("error",f=>{r&&typeof r!="string"&&!r.destroyed&&r.destroy(),l(this.fmtError(`${f.message} ${t}`,"get",f.code))}),r===void 0)this.debugMsg("get resolving buffer of data"),c=qL(f=>{u(f)});else if(typeof r=="string"){this.debugMsg("get returning local file");let f=yb(r);if(f.status)c=Kp.createWriteStream(r,i.writeStreamOptions);else{l(this.fmtError(`Bad path: ${r}: ${f.details}`,"get",f.code));return}}else this.debugMsg("get: returning data into supplied stream"),c=r;c.once("error",f=>{l(this.fmtError(`${f.message} ${typeof r=="string"?r:"<stream>"}`,"get",f.code))}),s.once("end",()=>{typeof r=="string"?(this.debugMsg("get: resolving with dst filename"),u(r)):r!==void 0&&(this.debugMsg("get: resolving with writer stream object"),u(c))}),s.pipe(c,i.pipeOptions)}}).finally(()=>{n&&Yt(this,o,"get")})}_fastGet(t,r,i,n=!0){let o;return new Promise((s,c)=>{n&&(o=Gt(this,"_fastGet",c)),wr(this,"_fastGet",c)&&this.sftp.fastGet(t,r,i,u=>{u&&c(this.fmtError(`${u.message} Remote: ${t} Local: ${r}`)),s(`${t} was successfully download to ${r}!`)})}).finally(()=>{n&&Yt(this,o,"_fastGet")})}async fastGet(t,r,i){try{let n=await this.exists(t);if(n!=="-"){let s=`${n?"Not a regular file":"No such file "} ${t}`;throw this.fmtError(s,"fastGet",Wt.badPath)}let o=yb(r);if(!o.status)throw this.fmtError(`Bad path: ${r}: ${o.details}`,"fastGet",Wt.badPath);return await this._fastGet(t,r,i)}catch(n){throw this.fmtError(n,"fastGet")}}_fastPut(t,r,i,n=!0){let o;return new Promise((s,c)=>{n&&(o=Gt(this,"_fastPut",c)),wr(this,"_fastPut",c)&&this.sftp.fastPut(t,r,i,u=>{u&&c(this.fmtError(`${u.message} Local: ${t} Remote: ${r}`,"fastPut",u.code)),s(`${t} was successfully uploaded to ${r}!`)})}).finally(()=>{n&&Yt(this,o,"_fastPut")})}async fastPut(t,r,i){try{this.debugMsg(`fastPut -> local ${t} remote ${r}`);let n=lk(t);if(n.status){if(n.status&&uk(t)==="d")throw this.fmtError(`Bad path: ${t} not a regular file`,"fastgPut",Wt.badPath)}else throw this.fmtError(`Bad path: ${t}: ${n.details}`,"fastPut",n.code);return await this._fastPut(t,r,i)}catch(n){throw n.custom?n:this.fmtError(n.message,"fastPut",n.code)}}_put(t,r,i,n=!0){let o,s,c;return new Promise((u,l)=>{n&&(o=Gt(this,"_put",l)),i={readStreamOptions:{...i?.readStreamOptions,autoClose:!0},writeStreamOptions:{...i?.writeStreamOptions,autoClose:!0},pipeOptions:{...i?.pipeOptions,end:!0}},wr(this,"_put",l)&&(s=this.sftp.createWriteStream(r,i.writeStreamOptions),s.once("error",f=>{l(this.fmtError(`Write stream error: ${f.message} ${r}`,"_put",f.code))}),s.once("close",()=>{u(`Uploaded data stream to ${r}`)}),t instanceof Buffer?(this.debugMsg("put source is a buffer"),s.end(t)):(c=typeof t=="string"?Kp.createReadStream(t,i.readStreamOptions):t,c.once("error",f=>{l(this.fmtError(`Read stream error: ${f.message} ${typeof t=="string"?t:"<stream>"}`,"_put",f.code))}),c.pipe(s,i.pipeOptions)))}).finally(()=>{n&&Yt(this,o,"_put")})}async put(t,r,i){try{if(typeof t=="string"){let n=lk(t);if(!n.status)throw this.fmtError(`Bad path: ${t} ${n.details}`,"put",n.code)}return await this._put(t,r,i)}catch(n){throw n.custom?n:this.fmtError(`Re-thrown: ${n.message}`,"put",n.code)}}_append(t,r,i,n=!0){let o;return new Promise((s,c)=>{if(n&&(o=Gt(this,"_append",c)),wr(this,"_append",c)){this.debugMsg(`append -> remote: ${r} `,i),i.flags="a";let u=this.sftp.createWriteStream(r,i);u.on("error",l=>{c(this.fmtError(`${l.message} ${r}`,"append",l.code))}),u.on("close",()=>{s(`Appended data to ${r}`)}),t instanceof Buffer?(u.write(t),u.end()):t.pipe(u)}}).finally(()=>{n&&Yt(this,o,"_append")})}async append(t,r,i={}){try{if(typeof t=="string")throw this.fmtError("Cannot append one file to another","append",Wt.badPath);let n=await this.exists(r);if(n&&n==="d")throw this.fmtError(`Bad path: ${r}: cannot append to a directory`,"append",Wt.badPath);await this._append(t,r,i)}catch(n){throw n.custom?n:this.fmtError(n.message,"append",n.code)}}_doMkdir(t,r=!0){let i;return new Promise((n,o)=>{r&&(i=Gt(this,"_doMkdir",o)),this.sftp.mkdir(t,s=>{s?s.code===4?o(this.fmtError(`Bad path: ${t} permission denied`,"_doMkdir",Wt.badPath)):s.code===2?o(this.fmtError(`Bad path: ${t} parent not a directory or not exist`,"_doMkdir",Wt.badPath)):o(this.fmtError(`${s.message} ${t}`,"_doMkdir",s.code)):n(`${t} directory created`)})}).finally(()=>{r&&Yt(this,i,"_doMkdir")})}async _mkdir(t,r){try{let i=await Qu(this,t),n=await this.exists(i);if(n&&n!=="d")throw this.fmtError(`Bad path: ${i} already exists as a file`,"_mkdir",Wt.badPath);if(n)return`${i} already exists`;if(!r)return await this._doMkdir(i);let o=ZL(i).dir;if(o){let s=await this.exists(o);if(!s)await this._mkdir(o,!0);else if(s!=="d")throw this.fmtError(`Bad path: ${o} not a directory`,"_mkdir",Wt.badPath)}return await this._doMkdir(i)}catch(i){throw i.custom?i:this.fmtError(`${i.message} ${t}`,"_mkdir",i.code)}}async mkdir(t,r=!1){try{return wr(this,"mkdir"),await this._mkdir(t,r)}catch(i){throw this.fmtError(`${i.message}`,"mkdir",i.code)}}async rmdir(t,r=!1){let i=a(o=>{let s;return new Promise((c,u)=>{s=Gt(this,"_rmdir",u),this.debugMsg(`_rmdir: dir = ${o}`),this.sftp.rmdir(o,l=>{l&&u(this.fmtError(`${l.message} ${o}`,"rmdir",l.code)),c("Successfully removed directory")})}).finally(()=>{Yt(this,s,"_rmdir")})},"_rmdir"),n=a((o,s)=>{let c;return new Promise((u,l)=>{c=Gt(this,"_delFiles",l),this.debugMsg(`_delFiles: path = ${o} fileList = ${s}`);let f=[];for(let p of s)f.push(this.delete(`${o}/${p.name}`,!0,!1));u(f)}).then(u=>Promise.all(u)).finally(()=>{Yt(this,c,"_delFiles")})},"_delFiles");try{this.debugMsg(`rmdir: dir = ${t} recursive = ${r}`);let o=await Qu(this,t),s=await this.exists(o);if(this.debugMsg(`rmdir: ${o} existStatus = ${s}`),!s)throw this.fmtError(`Bad Path: ${t}: No such directory`,"rmdir",Wt.badPath);if(s!=="d")throw this.fmtError(`Bad Path: ${t}: Not a directory`,"rmdir",Wt.badPath);if(!r)return this.debugMsg("rmdir: non-recursive - just try to remove it"),await i(o);let c=await this.list(o);if(this.debugMsg(`rmdir: listing count = ${c.length}`),!c.length)return this.debugMsg("rmdir: No sub dir or files, just rmdir"),await i(o);let u=c.filter(f=>f.type!=="d");this.debugMsg(`rmdir: dir content files to remove = ${u.length}`);let l=c.filter(f=>f.type==="d");this.debugMsg(`rmdir: sub-directories to remove = ${l.length}`),await n(o,u);for(let f of l)await this.rmdir(`${o}/${f.name}`,!0);return await i(o),"Successfully removed directory"}catch(o){throw o.custom?o:this.fmtError(`${o.message} ${t}`,"rmdir",o.code)}}delete(t,r=!1,i=!0){let n;return new Promise((o,s)=>{i&&(n=Gt(this,"delete",s)),this.sftp.unlink(t,c=>{c&&(r&&c.code===2?o(`Successfully deleted ${t}`):s(this.fmtError(`${c.message} ${t}`,"delete",c.code))),o(`Successfully deleted ${t}`)})}).finally(()=>{i&&Yt(this,n,"delete")})}rename(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Gt(this,"rename",s)),wr(this,"rename",s)&&this.sftp.rename(t,r,c=>{c&&s(this.fmtError(`${c.message} From: ${t} To: ${r}`,"_rename",c.code)),o(`Successfully renamed ${t} to ${r}`)})}).finally(()=>{i&&Yt(this,n,"rename")})}posixRename(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Gt(this,"posixRename",s)),wr(this,"posixRename",s)&&this.sftp.ext_openssh_rename(t,r,c=>{c&&s(this.fmtError(`${c.message} From: ${t} To: ${r}`,"_posixRename",c.code)),o(`Successful POSIX rename ${t} to ${r}`)})}).finally(()=>{Yt(this,n,"posixRename")})}chmod(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Gt(this,"chmod",s)),wr(this,"chmod",s)&&this.sftp.chmod(t,r,c=>{c&&s(this.fmtError(`${c.message} ${t}`,"_chmod",c.code)),o("Successfully change file mode")})}).finally(()=>{i&&Yt(this,n,"chmod")})}async uploadDir(t,r,i){let n=a(async c=>{let u=await Qu(this,c),l=await this.exists(u);if(l&&l!=="d")throw this.fmtError(`Bad path ${u} Not a directory`,"getRemoteStatus",Wt.badPath);return{remoteDir:u,remoteStatus:l}},"getRemoteStatus"),o=a(c=>{let u=uk(c);if(!u)throw this.fmtError(`Bad path: ${c} not exist`,"getLocalStatus",Wt.badPath);if(u!=="d")throw this.fmtError(`Bad path: ${c}: not a directory`,"getLocalStatus",Wt.badPath);return u},"checkLocalStatus"),s=a((c,u,l,f)=>{let p;return new Promise((g,h)=>{p=Gt(this,"uploadFiles",h);let _=[];for(let y of l){let b=Zu(c,y.name),v=`${u}/${y.name}`;y.isFile()?(f?_.push(this._fastPut(b,v,null,!1)):_.push(this._put(b,v,null,!1)),this.client.emit("upload",{source:b,destination:v})):this.debugMsg(`uploadFiles: File ignored: ${y.name} not a regular file`)}g(Promise.all(_))}).then(g=>Promise.all(g)).finally(()=>{Yt(this,p,s)})},"uploadFiles");try{wr(this,"uploadDir"),this.debugMsg(`uploadDir: srcDir = ${t} dstDir = ${r} options = ${i}`);let{remoteDir:c,remoteStatus:u}=await n(r);this.debugMsg(`uploadDir: remoteDir = ${c} remoteStatus = ${u}`),o(t),u||await this._mkdir(c,!0);let l=Kp.readdirSync(t,{encoding:"utf8",withFileTypes:!0});this.debugMsg(`uploadDir: dirEntries = ${l}`),i?.filter&&(l=l.filter(g=>i.filter(Zu(t,g.name),g.isDirectory())));let f=l.filter(g=>g.isDirectory()),p=l.filter(g=>!g.isDirectory());this.debugMsg(`uploadDir: dirUploads = ${f}`),this.debugMsg(`uploadDir: fileUploads = ${p}`),await s(t,c,p,i?.useFastput);for(let g of f){let h=Zu(t,g.name),_=`${c}/${g.name}`;await this.uploadDir(h,_,i)}return`${t} uploaded to ${r}`}catch(c){throw c.custom?c:this.fmtError(`${c.message} ${t}`,"uploadDir",c.code)}}async downloadDir(t,r,i={filter:null,useFastget:!1}){let n=a(async(c,u)=>{try{let l=await this.list(c);return u?l.filter(f=>u(`${c}/${f.name}`,f.type==="d")):l}catch(l){throw l.custom?l:this.fmtError(l.message,"_getDownloadList",l.code)}},"_getDownloadList"),o=a(c=>{try{let u=yb(c);if(!u.status&&u.details==="permission denied")throw this.fmtError(`Bad path: ${c}: ${u.details}`,"prepareDestination",u.code);if(u.status&&!u.type)Kp.mkdirSync(c,{recursive:!0});else if(u.status&&u.type!=="d")throw this.fmtError(`Bad path: ${r}: not a directory`,"_prepareDestination",Wt.badPath)}catch(u){throw u.custom?u:this.fmtError(u.message,"_prepareDestination",u.code)}},"_prepareDestination"),s=a((c,u,l,f)=>{let p;return new Promise((g,h)=>{p=Gt(this,"_downloadFIles",h);let _=[];for(let y of l){let b=`${c}/${y.name}`,v=Zu(u,y.name);f?_.push(this.fastGet(b,v,!1)):_.push(this.get(b,v,!1)),this.client.emit("download",{source:b,destination:v})}return g(Promise.all(_))}).finally(()=>{Yt(this,p,"_downloadFiles")})},"_downloadFiles");try{wr(this,"downloadDir");let c=await n(t,i.filter);o(r);let u=c.filter(f=>f.type!=="d");u.length&&await s(t,r,u,i.useFastget);let l=c.filter(f=>f.type==="d");for(let f of l){let p=`${t}/${f.name}`,g=Zu(r,f.name);await this.downloadDir(p,g)}return`${t} downloaded to ${r}`}catch(c){throw c.custom?c:this.fmtError(`${c.message}: ${t}`,"downloadDir",c.code)}}createReadStream(t,r){let i;try{return i=Gt(this,"createReadStream"),wr(this,"createReadStream"),this.sftp.createReadStream(t,r)}catch(n){throw n.custom?n:this.fmtError(n.message,"createReadStream",n.code)}finally{Yt(this,i,"createReadStreame")}}createWriteStream(t,r){let i;try{return i=Gt(this,"createWriteStream"),wr(this,"createWriteStream"),this.sftp.createWriteStream(t,r)}catch(n){throw n.custom?n:this.fmtError(n.message,"createWriteStream",n.code)}finally{Yt(this,i,"createWriteStream")}}_rcopy(t,r){return new Promise((i,n)=>{let o=this.sftp.createWriteStream(r),s=this.sftp.createReadStream(t);o.on("error",c=>{n(this.fmtError(`${c.message} ${r}`,"_rcopy"))}),s.on("error",c=>{n(this.fmtError(`${c.message} ${t}`,"_rcopy"))}),o.on("close",()=>{i(`${t} copied to ${r}`)}),s.pipe(o)})}async rcopy(t,r){let i;try{i=Gt(this,"rcopy"),wr(this,"rcopy");let n=await Qu(this,t),o=await this.exists(n);if(!o)throw this.fmtError(`Source does not exist ${n}`,"rcopy",Wt.badPath);if(o!=="-")throw this.fmtError(`Source not a file ${n}`,"rcopy",Wt.badPath);let s=await Qu(this,r);if(await this.exists(s))throw this.fmtError(`Destination already exists ${s}`,"rcopy",Wt.badPath);return this._rcopy(n,s)}catch(n){throw n.custom?n:this.fmtError(n,"rcopy")}finally{Yt(this,i,"rcopy")}}end(){let t,r;return new Promise((i,n)=>{r=Gt(this,"end",n),this.endCalled=!0,t=a(()=>{this.sftp=void 0,this.debugMsg("end: Connection closed"),i(!0)},"endCloseHandler"),this.on("close",t),this.sftp?this.client.end():(this.debugMsg("end: Called when no connection active"),i(!0))}).finally(()=>{Yt(this,r,"end"),this.removeListener("close",t),this.endCalled=!1})}};fk.exports=Eb});var Nk=me((bb,xb)=>{(function(e,t){typeof bb=="object"&&typeof xb<"u"?xb.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(bb,(function(){"use strict";var e=1e3,t=6e4,r=36e5,i="millisecond",n="second",o="minute",s="hour",c="day",u="week",l="month",f="quarter",p="year",g="date",h="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(U){var k=["th","st","nd","rd"],j=U%100;return"["+U+(k[(j-20)%10]||k[j]||k[0])+"]"},"ordinal")},v=a(function(U,k,j){var W=String(U);return!W||W.length>=k?U:""+Array(k+1-W.length).join(j)+U},"m"),S={s:v,z:a(function(U){var k=-U.utcOffset(),j=Math.abs(k),W=Math.floor(j/60),z=j%60;return(k<=0?"+":"-")+v(W,2,"0")+":"+v(z,2,"0")},"z"),m:a(function U(k,j){if(k.date()<j.date())return-U(j,k);var W=12*(j.year()-k.year())+(j.month()-k.month()),z=k.clone().add(W,l),X=j-z<0,ne=k.clone().add(W+(X?-1:1),l);return+(-(W+(j-z)/(X?z-ne:ne-z))||0)},"t"),a:a(function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},"a"),p:a(function(U){return{M:l,y:p,w:u,d:c,D:g,h:s,m:o,s:n,ms:i,Q:f}[U]||String(U||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(U){return U===void 0},"u")},M="en",R={};R[M]=b;var J=a(function(U){return U instanceof C},"p"),te=a(function U(k,j,W){var z;if(!k)return M;if(typeof k=="string"){var X=k.toLowerCase();R[X]&&(z=X),j&&(R[X]=j,z=X);var ne=k.split("-");if(!z&&ne.length>1)return U(ne[0])}else{var O=k.name;R[O]=k,z=O}return!W&&z&&(M=z),z||!W&&M},"t"),ee=a(function(U,k){if(J(U))return U.clone();var j=typeof k=="object"?k:{};return j.date=U,j.args=arguments,new C(j)},"w"),P=S;P.l=te,P.i=J,P.w=function(U,k){return ee(U,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var C=(function(){function U(j){this.$L=te(j.locale,null,!0),this.parse(j)}a(U,"M");var k=U.prototype;return k.parse=function(j){this.$d=(function(W){var z=W.date,X=W.utc;if(z===null)return new Date(NaN);if(P.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var ne=z.match(_);if(ne){var O=ne[2]-1||0,q=(ne[7]||"0").substring(0,3);return X?new Date(Date.UTC(ne[1],O,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,q)):new Date(ne[1],O,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,q)}}return new Date(z)})(j),this.$x=j.x||{},this.init()},k.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},k.$utils=function(){return P},k.isValid=function(){return this.$d.toString()!==h},k.isSame=function(j,W){var z=ee(j);return this.startOf(W)<=z&&z<=this.endOf(W)},k.isAfter=function(j,W){return ee(j)<this.startOf(W)},k.isBefore=function(j,W){return this.endOf(W)<ee(j)},k.$g=function(j,W,z){return P.u(j)?this[W]:this.set(z,j)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(j,W){var z=this,X=!!P.u(W)||W,ne=P.p(j),O=a(function(Mt,ur){var $r=P.w(z.$u?Date.UTC(z.$y,ur,Mt):new Date(z.$y,ur,Mt),z);return X?$r:$r.endOf(c)},"l"),q=a(function(Mt,ur){return P.w(z.toDate()[Mt].apply(z.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(ur)),z)},"$"),V=this.$W,re=this.$M,_e=this.$D,ve="set"+(this.$u?"UTC":"");switch(ne){case p:return X?O(1,0):O(31,11);case l:return X?O(1,re):O(0,re+1);case u:var xe=this.$locale().weekStart||0,Tt=(V<xe?V+7:V)-xe;return O(X?_e-Tt:_e+(6-Tt),re);case c:case g:return q(ve+"Hours",0);case s:return q(ve+"Minutes",1);case o:return q(ve+"Seconds",2);case n:return q(ve+"Milliseconds",3);default:return this.clone()}},k.endOf=function(j){return this.startOf(j,!1)},k.$set=function(j,W){var z,X=P.p(j),ne="set"+(this.$u?"UTC":""),O=(z={},z[c]=ne+"Date",z[g]=ne+"Date",z[l]=ne+"Month",z[p]=ne+"FullYear",z[s]=ne+"Hours",z[o]=ne+"Minutes",z[n]=ne+"Seconds",z[i]=ne+"Milliseconds",z)[X],q=X===c?this.$D+(W-this.$W):W;if(X===l||X===p){var V=this.clone().set(g,1);V.$d[O](q),V.init(),this.$d=V.set(g,Math.min(this.$D,V.daysInMonth())).$d}else O&&this.$d[O](q);return this.init(),this},k.set=function(j,W){return this.clone().$set(j,W)},k.get=function(j){return this[P.p(j)]()},k.add=function(j,W){var z,X=this;j=Number(j);var ne=P.p(W),O=a(function(re){var _e=ee(X);return P.w(_e.date(_e.date()+Math.round(re*j)),X)},"y");if(ne===l)return this.set(l,this.$M+j);if(ne===p)return this.set(p,this.$y+j);if(ne===c)return O(1);if(ne===u)return O(7);var q=(z={},z[o]=t,z[s]=r,z[n]=e,z)[ne]||1,V=this.$d.getTime()+j*q;return P.w(V,this)},k.subtract=function(j,W){return this.add(-1*j,W)},k.format=function(j){var W=this,z=this.$locale();if(!this.isValid())return z.invalidDate||h;var X=j||"YYYY-MM-DDTHH:mm:ssZ",ne=P.z(this),O=this.$H,q=this.$m,V=this.$M,re=z.weekdays,_e=z.months,ve=z.meridiem,xe=a(function(ur,$r,sn,Hr){return ur&&(ur[$r]||ur(W,X))||sn[$r].slice(0,Hr)},"h"),Tt=a(function(ur){return P.s(O%12||12,ur,"0")},"d"),Mt=ve||function(ur,$r,sn){var Hr=ur<12?"AM":"PM";return sn?Hr.toLowerCase():Hr};return X.replace(y,(function(ur,$r){return $r||(function(sn){switch(sn){case"YY":return String(W.$y).slice(-2);case"YYYY":return P.s(W.$y,4,"0");case"M":return V+1;case"MM":return P.s(V+1,2,"0");case"MMM":return xe(z.monthsShort,V,_e,3);case"MMMM":return xe(_e,V);case"D":return W.$D;case"DD":return P.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return xe(z.weekdaysMin,W.$W,re,2);case"ddd":return xe(z.weekdaysShort,W.$W,re,3);case"dddd":return re[W.$W];case"H":return String(O);case"HH":return P.s(O,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return Mt(O,q,!0);case"A":return Mt(O,q,!1);case"m":return String(q);case"mm":return P.s(q,2,"0");case"s":return String(W.$s);case"ss":return P.s(W.$s,2,"0");case"SSS":return P.s(W.$ms,3,"0");case"Z":return ne}return null})(ur)||ne.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(j,W,z){var X,ne=this,O=P.p(W),q=ee(j),V=(q.utcOffset()-this.utcOffset())*t,re=this-q,_e=a(function(){return P.m(ne,q)},"D");switch(O){case p:X=_e()/12;break;case l:X=_e();break;case f:X=_e()/3;break;case u:X=(re-V)/6048e5;break;case c:X=(re-V)/864e5;break;case s:X=re/r;break;case o:X=re/t;break;case n:X=re/e;break;default:X=re}return z?X:P.a(X)},k.daysInMonth=function(){return this.endOf(l).$D},k.$locale=function(){return R[this.$L]},k.locale=function(j,W){if(!j)return this.$L;var z=this.clone(),X=te(j,W,!0);return X&&(z.$L=X),z},k.clone=function(){return P.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},U})(),H=C.prototype;return ee.prototype=H,[["$ms",i],["$s",n],["$m",o],["$H",s],["$W",c],["$M",l],["$y",p],["$D",g]].forEach((function(U){H[U[1]]=function(k){return this.$g(k,U[0],U[1])}})),ee.extend=function(U,k){return U.$i||(U(k,C,ee),U.$i=!0),ee},ee.locale=te,ee.isDayjs=J,ee.unix=function(U){return ee(1e3*U)},ee.en=R[M],ee.Ls=R,ee.p={},ee}))});var gU={};cn(gU,{endClient:()=>sr,ftpSftp:()=>hU,getClient:()=>Xt,getProtocolBackwardCompatibility:()=>qt});module.exports=eC(gU);var en={};cn(en,{$ZodAny:()=>Aa,$ZodArray:()=>va,$ZodAsyncError:()=>En,$ZodBase64:()=>Bl,$ZodBase64URL:()=>zl,$ZodBigInt:()=>Yo,$ZodBigIntFormat:()=>Fl,$ZodBoolean:()=>Qi,$ZodCIDRv4:()=>$l,$ZodCIDRv6:()=>Dl,$ZodCUID:()=>wl,$ZodCUID2:()=>Pl,$ZodCatch:()=>nf,$ZodCheck:()=>$t,$ZodCheckBigIntFormat:()=>Mh,$ZodCheckEndsWith:()=>Xh,$ZodCheckGreaterThan:()=>gl,$ZodCheckIncludes:()=>Gh,$ZodCheckLengthEquals:()=>Vh,$ZodCheckLessThan:()=>hl,$ZodCheckLowerCase:()=>Qh,$ZodCheckMaxLength:()=>Wh,$ZodCheckMaxSize:()=>Fh,$ZodCheckMimeType:()=>eg,$ZodCheckMinLength:()=>qh,$ZodCheckMinSize:()=>Hh,$ZodCheckMultipleOf:()=>Lh,$ZodCheckNumberFormat:()=>Uh,$ZodCheckOverwrite:()=>tg,$ZodCheckProperty:()=>Jh,$ZodCheckRegex:()=>Zh,$ZodCheckSizeEquals:()=>jh,$ZodCheckStartsWith:()=>Yh,$ZodCheckStringFormat:()=>Ko,$ZodCheckUpperCase:()=>Kh,$ZodCodec:()=>Jo,$ZodCustom:()=>Na,$ZodCustomStringFormat:()=>Ml,$ZodDate:()=>Ia,$ZodDefault:()=>Jl,$ZodDiscriminatedUnion:()=>Sa,$ZodE164:()=>Ll,$ZodEmail:()=>Il,$ZodEmoji:()=>vl,$ZodEncodeError:()=>oi,$ZodEnum:()=>Ta,$ZodError:()=>la,$ZodExactOptional:()=>Xl,$ZodFile:()=>Yl,$ZodFunction:()=>cf,$ZodGUID:()=>bl,$ZodIPv4:()=>Rl,$ZodIPv6:()=>Ol,$ZodISODate:()=>ma,$ZodISODateTime:()=>ga,$ZodISODuration:()=>ya,$ZodISOTime:()=>_a,$ZodIntersection:()=>Ql,$ZodJWT:()=>Ul,$ZodKSUID:()=>Cl,$ZodLazy:()=>lf,$ZodLiteral:()=>ka,$ZodMAC:()=>Nl,$ZodMap:()=>Kl,$ZodNaN:()=>of,$ZodNanoID:()=>Sl,$ZodNever:()=>ql,$ZodNonOptional:()=>tf,$ZodNull:()=>Wl,$ZodNullable:()=>Ra,$ZodNumber:()=>Go,$ZodNumberFormat:()=>Ea,$ZodObject:()=>Vl,$ZodObjectJIT:()=>og,$ZodOptional:()=>Xo,$ZodPipe:()=>Oa,$ZodPrefault:()=>ef,$ZodPromise:()=>uf,$ZodReadonly:()=>sf,$ZodRealError:()=>Wr,$ZodRecord:()=>Pa,$ZodRegistry:()=>ff,$ZodSet:()=>Gl,$ZodString:()=>Fn,$ZodStringFormat:()=>Ct,$ZodSuccess:()=>rf,$ZodSymbol:()=>Hl,$ZodTemplateLiteral:()=>af,$ZodTransform:()=>Ca,$ZodTuple:()=>wa,$ZodType:()=>We,$ZodULID:()=>Tl,$ZodURL:()=>ha,$ZodUUID:()=>xl,$ZodUndefined:()=>jl,$ZodUnion:()=>Ki,$ZodUnknown:()=>ba,$ZodVoid:()=>xa,$ZodXID:()=>kl,$ZodXor:()=>Zl,$brand:()=>na,$constructor:()=>T,$input:()=>pf,$output:()=>df,Doc:()=>pa,JSONSchema:()=>Ex,JSONSchemaGenerator:()=>zf,NEVER:()=>Xu,TimePrecision:()=>gf,_any:()=>_c,_array:()=>Xg,_base64:()=>nc,_base64url:()=>ic,_bigint:()=>Af,_boolean:()=>hc,_catch:()=>sR,_check:()=>yx,_cidrv4:()=>tc,_cidrv6:()=>rc,_coercedBigint:()=>mc,_coercedBoolean:()=>gc,_coercedDate:()=>Ac,_coercedNumber:()=>dc,_coercedString:()=>Ma,_cuid:()=>Qa,_cuid2:()=>Ka,_custom:()=>wc,_date:()=>Pf,_decode:()=>ol,_decodeAsync:()=>al,_default:()=>nR,_discriminatedUnion:()=>q1,_e164:()=>oc,_email:()=>Fa,_emoji:()=>Va,_encode:()=>il,_encodeAsync:()=>sl,_endsWith:()=>to,_enum:()=>Y1,_file:()=>kf,_float32:()=>mf,_float64:()=>_f,_gt:()=>bn,_gte:()=>mr,_guid:()=>rs,_includes:()=>Ji,_int:()=>pc,_int32:()=>yf,_int64:()=>bf,_intersection:()=>V1,_ipv4:()=>Ja,_ipv6:()=>ec,_isoDate:()=>cc,_isoDateTime:()=>ac,_isoDuration:()=>lc,_isoTime:()=>uc,_jwt:()=>sc,_ksuid:()=>Xa,_lazy:()=>lR,_length:()=>di,_literal:()=>J1,_lowercase:()=>Yi,_lt:()=>An,_lte:()=>Br,_mac:()=>hf,_map:()=>K1,_max:()=>Br,_maxLength:()=>fi,_maxSize:()=>jn,_mime:()=>ro,_min:()=>mr,_minLength:()=>cr,_minSize:()=>xn,_multipleOf:()=>Hn,_nan:()=>Tf,_nanoid:()=>Za,_nativeEnum:()=>X1,_negative:()=>xc,_never:()=>wf,_nonnegative:()=>vc,_nonoptional:()=>iR,_nonpositive:()=>Ic,_normalize:()=>no,_null:()=>Sf,_nullable:()=>rR,_number:()=>fc,_optional:()=>tR,_overwrite:()=>ln,_parse:()=>jo,_parseAsync:()=>Wo,_pipe:()=>aR,_positive:()=>bc,_promise:()=>fR,_property:()=>Sc,_readonly:()=>cR,_record:()=>Q1,_refine:()=>Pc,_regex:()=>Ir,_safeDecode:()=>ul,_safeDecodeAsync:()=>fl,_safeEncode:()=>cl,_safeEncodeAsync:()=>ll,_safeParse:()=>qo,_safeParseAsync:()=>Zo,_set:()=>G1,_size:()=>li,_slugify:()=>ns,_startsWith:()=>eo,_string:()=>Ua,_stringFormat:()=>ao,_stringbool:()=>Nf,_success:()=>oR,_superRefine:()=>Cf,_symbol:()=>If,_templateLiteral:()=>uR,_toLowerCase:()=>oo,_toUpperCase:()=>so,_transform:()=>eR,_trim:()=>io,_tuple:()=>Z1,_uint32:()=>Ef,_uint64:()=>xf,_ulid:()=>Ga,_undefined:()=>vf,_union:()=>j1,_unknown:()=>yc,_uppercase:()=>Xi,_url:()=>Gi,_uuid:()=>Ha,_uuidv4:()=>ja,_uuidv6:()=>Wa,_uuidv7:()=>qa,_void:()=>Ec,_xid:()=>Ya,_xor:()=>W1,clone:()=>yr,config:()=>Zt,createStandardJSONSchemaMethod:()=>is,createToJSONSchemaMethod:()=>Jg,decode:()=>Ub,decodeAsync:()=>Fb,describe:()=>Rf,encode:()=>Lb,encodeAsync:()=>Mb,extractDefs:()=>hi,finalize:()=>gi,flattenError:()=>Fo,formatError:()=>Ho,globalConfig:()=>ra,globalRegistry:()=>Er,initializeContext:()=>pi,isValidBase64:()=>ig,isValidBase64URL:()=>ux,isValidJWT:()=>lx,locales:()=>ts,meta:()=>Of,parse:()=>qi,parseAsync:()=>Vi,prettifyError:()=>nl,process:()=>Rt,regexes:()=>qr,registry:()=>La,safeDecode:()=>jb,safeDecodeAsync:()=>qb,safeEncode:()=>Hb,safeEncodeAsync:()=>Wb,safeParse:()=>Vo,safeParseAsync:()=>Qo,toDotPath:()=>zb,toJSONSchema:()=>Tc,treeifyError:()=>rl,util:()=>fe,version:()=>rg});var Xu=Object.freeze({status:"aborted"});function T(e,t,r){function i(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,f=Object.keys(l);for(let p=0;p<f.length;p++){let g=f[p];g in c||(c[g]=l[g].bind(c))}}a(i,"init");let n=r?.Parent??Object;class o extends n{static{a(this,"Definition")}}Object.defineProperty(o,"name",{value:e});function s(c){var u;let l=r?.Parent?new o:this;i(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let f of l._zod.deferred)f();return l}return a(s,"_"),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a(c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(T,"$constructor");var na=Symbol("zod_brand"),En=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},oi=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ra={};function Zt(e){return e&&Object.assign(ra,e),ra}a(Zt,"config");var fe={};cn(fe,{BIGINT_FORMAT_RANGES:()=>uh,Class:()=>rh,NUMBER_FORMAT_RANGES:()=>ch,aborted:()=>ui,allowsEval:()=>oh,assert:()=>oC,assertEqual:()=>tC,assertIs:()=>nC,assertNever:()=>iC,assertNotEqual:()=>rC,assignProp:()=>ai,base64ToUint8Array:()=>$b,base64urlToUint8Array:()=>mC,cached:()=>Uo,captureStackTrace:()=>el,cleanEnum:()=>gC,cleanRegex:()=>sa,clone:()=>yr,cloneDef:()=>aC,createTransparentProxy:()=>pC,defineLazy:()=>ot,esc:()=>Ju,escapeRegex:()=>un,extend:()=>Cb,finalizeIssue:()=>jr,floatSafeRemainder:()=>nh,getElementAtPath:()=>cC,getEnumValues:()=>oa,getLengthableOrigin:()=>ua,getParsedType:()=>dC,getSizableOrigin:()=>ca,hexToUint8Array:()=>yC,isObject:()=>Wi,isPlainObject:()=>ci,issue:()=>Mo,joinValues:()=>Q,jsonStringifyReplacer:()=>Lo,merge:()=>hC,mergeDefs:()=>Mn,normalizeParams:()=>ue,nullish:()=>si,numKeys:()=>fC,objectClone:()=>sC,omit:()=>kb,optionalKeys:()=>ah,parsedType:()=>pe,partial:()=>Ob,pick:()=>Tb,prefixIssues:()=>Jr,primitiveTypes:()=>sh,promiseAllObject:()=>uC,propertyKeyTypes:()=>aa,randomString:()=>lC,required:()=>Nb,safeExtend:()=>Rb,shallowClone:()=>tl,slugify:()=>ih,stringifyPrimitive:()=>le,uint8ArrayToBase64:()=>Db,uint8ArrayToBase64url:()=>_C,uint8ArrayToHex:()=>EC,unwrapMessage:()=>ia});function tC(e){return e}a(tC,"assertEqual");function rC(e){return e}a(rC,"assertNotEqual");function nC(e){}a(nC,"assertIs");function iC(e){throw new Error("Unexpected value in exhaustive check")}a(iC,"assertNever");function oC(e){}a(oC,"assert");function oa(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}a(oa,"getEnumValues");function Q(e,t="|"){return e.map(r=>le(r)).join(t)}a(Q,"joinValues");function Lo(e,t){return typeof t=="bigint"?t.toString():t}a(Lo,"jsonStringifyReplacer");function Uo(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a(Uo,"cached");function si(e){return e==null}a(si,"nullish");function sa(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}a(sa,"cleanRegex");function nh(e,t){let r=(e.toString().split(".")[1]||"").length,i=t.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let u=i.match(/\d?e-(\d?)/);u?.[1]&&(n=Number.parseInt(u[1]))}let o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),c=Number.parseInt(t.toFixed(o).replace(".",""));return s%c/10**o}a(nh,"floatSafeRemainder");var Pb=Symbol("evaluating");function ot(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Pb)return i===void 0&&(i=Pb,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}a(ot,"defineLazy");function sC(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(sC,"objectClone");function ai(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}a(ai,"assignProp");function Mn(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}a(Mn,"mergeDefs");function aC(e){return Mn(e._zod.def)}a(aC,"cloneDef");function cC(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}a(cC,"getElementAtPath");function uC(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}a(uC,"promiseAllObject");function lC(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}a(lC,"randomString");function Ju(e){return JSON.stringify(e)}a(Ju,"esc");function ih(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(ih,"slugify");var el="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Wi,"isObject");var oh=Uo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ci(e){if(Wi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Wi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(ci,"isPlainObject");function tl(e){return ci(e)?{...e}:Array.isArray(e)?[...e]:e}a(tl,"shallowClone");function fC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}a(fC,"numKeys");var dC=a(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),aa=new Set(["string","number","symbol"]),sh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function un(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(un,"escapeRegex");function yr(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}a(yr,"clone");function ue(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(ue,"normalizeParams");function pC(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}a(pC,"createTransparentProxy");function le(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(le,"stringifyPrimitive");function ah(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(ah,"optionalKeys");var ch={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uh={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Tb(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Mn(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return ai(this,"shape",s),s},checks:[]});return yr(e,o)}a(Tb,"pick");function kb(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Mn(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return ai(this,"shape",s),s},checks:[]});return yr(e,o)}a(kb,"omit");function Cb(e,t){if(!ci(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Mn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return ai(this,"shape",o),o}});return yr(e,n)}a(Cb,"extend");function Rb(e,t){if(!ci(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Mn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return ai(this,"shape",i),i}});return yr(e,r)}a(Rb,"safeExtend");function hC(e,t){let r=Mn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return ai(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return yr(e,r)}a(hC,"merge");function Ob(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Mn(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return ai(this,"shape",u),u},checks:[]});return yr(t,s)}a(Ob,"partial");function Nb(e,t,r){let i=Mn(t._zod.def,{get shape(){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new e({type:"nonoptional",innerType:n[s]});return ai(this,"shape",o),o}});return yr(t,i)}a(Nb,"required");function ui(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}a(ui,"aborted");function Jr(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}a(Jr,"prefixIssues");function ia(e){return typeof e=="string"?e:e?.message}a(ia,"unwrapMessage");function jr(e,t,r){let i={...e,path:e.path??[]};if(!e.message){let n=ia(e.inst?._zod.def?.error?.(e))??ia(t?.error?.(e))??ia(r.customError?.(e))??ia(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}a(jr,"finalizeIssue");function ca(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(ca,"getSizableOrigin");function ua(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(ua,"getLengthableOrigin");function pe(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}a(pe,"parsedType");function Mo(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}a(Mo,"issue");function gC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(gC,"cleanEnum");function $b(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}a($b,"base64ToUint8Array");function Db(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}a(Db,"uint8ArrayToBase64");function mC(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return $b(t+r)}a(mC,"base64urlToUint8Array");function _C(e){return Db(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(_C,"uint8ArrayToBase64url");function yC(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}a(yC,"hexToUint8Array");function EC(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(EC,"uint8ArrayToHex");var rh=class{static{a(this,"Class")}constructor(...t){}};var Bb=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Lo,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),la=T("$ZodError",Bb),Wr=T("$ZodError",Bb,{Parent:Error});function Fo(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}a(Fo,"flattenError");function Ho(e,t=r=>r.message){let r={_errors:[]},i=a(n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let s=r,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(t(o))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}},"processError");return i(e),r}a(Ho,"formatError");function rl(e,t=r=>r.message){let r={errors:[]},i=a((n,o=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{let l=[...o,...u.path];if(l.length===0){r.errors.push(t(u));continue}let f=r,p=0;for(;p<l.length;){let g=l[p],h=p===l.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(c=f.items)[g]??(c[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(u)),p++}}},"processError");return i(e),r}a(rl,"treeifyError");function zb(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}a(zb,"toDotPath");function nl(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${zb(i.path)}`);return t.join(`
24
- `)}a(nl,"prettifyError");var jo=a(e=>(t,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new En;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>jr(u,o,Zt())));throw el(c,n?.callee),c}return s.value},"_parse"),qi=jo(Wr),Wo=a(e=>async(t,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>jr(u,o,Zt())));throw el(c,n?.callee),c}return s.value},"_parseAsync"),Vi=Wo(Wr),qo=a(e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new En;return o.issues.length?{success:!1,error:new(e??la)(o.issues.map(s=>jr(s,n,Zt())))}:{success:!0,data:o.value}},"_safeParse"),Vo=qo(Wr),Zo=a(e=>async(t,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>jr(s,n,Zt())))}:{success:!0,data:o.value}},"_safeParseAsync"),Qo=Zo(Wr),il=a(e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return jo(e)(t,r,n)},"_encode"),Lb=il(Wr),ol=a(e=>(t,r,i)=>jo(e)(t,r,i),"_decode"),Ub=ol(Wr),sl=a(e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Wo(e)(t,r,n)},"_encodeAsync"),Mb=sl(Wr),al=a(e=>async(t,r,i)=>Wo(e)(t,r,i),"_decodeAsync"),Fb=al(Wr),cl=a(e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return qo(e)(t,r,n)},"_safeEncode"),Hb=cl(Wr),ul=a(e=>(t,r,i)=>qo(e)(t,r,i),"_safeDecode"),jb=ul(Wr),ll=a(e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zo(e)(t,r,n)},"_safeEncodeAsync"),Wb=ll(Wr),fl=a(e=>async(t,r,i)=>Zo(e)(t,r,i),"_safeDecodeAsync"),qb=fl(Wr);var qr={};cn(qr,{base64:()=>Sh,base64url:()=>dl,bigint:()=>Rh,boolean:()=>Nh,browserEmail:()=>TC,cidrv4:()=>Ih,cidrv6:()=>vh,cuid:()=>lh,cuid2:()=>fh,date:()=>Ph,datetime:()=>kh,domain:()=>RC,duration:()=>mh,e164:()=>wh,email:()=>yh,emoji:()=>Eh,extendedDuration:()=>bC,guid:()=>_h,hex:()=>OC,hostname:()=>CC,html5Email:()=>SC,idnEmail:()=>PC,integer:()=>Oh,ipv4:()=>Ah,ipv6:()=>bh,ksuid:()=>hh,lowercase:()=>Bh,mac:()=>xh,md5_base64:()=>$C,md5_base64url:()=>DC,md5_hex:()=>NC,nanoid:()=>gh,null:()=>$h,number:()=>pl,rfc5322Email:()=>wC,sha1_base64:()=>zC,sha1_base64url:()=>LC,sha1_hex:()=>BC,sha256_base64:()=>MC,sha256_base64url:()=>FC,sha256_hex:()=>UC,sha384_base64:()=>jC,sha384_base64url:()=>WC,sha384_hex:()=>HC,sha512_base64:()=>VC,sha512_base64url:()=>ZC,sha512_hex:()=>qC,string:()=>Ch,time:()=>Th,ulid:()=>dh,undefined:()=>Dh,unicodeEmail:()=>Vb,uppercase:()=>zh,uuid:()=>Zi,uuid4:()=>xC,uuid6:()=>IC,uuid7:()=>vC,xid:()=>ph});var lh=/^[cC][^\s-]{8,}$/,fh=/^[0-9a-z]+$/,dh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ph=/^[0-9a-vA-V]{20}$/,hh=/^[A-Za-z0-9]{27}$/,gh=/^[a-zA-Z0-9_-]{21}$/,mh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_h=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zi=a(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),xC=Zi(4),IC=Zi(6),vC=Zi(7),yh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,SC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wC=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Vb=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,PC=Vb,TC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Eh(){return new RegExp(kC,"u")}a(Eh,"emoji");var Ah=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,xh=a(e=>{let t=un(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),Ih=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,vh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Sh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dl=/^[A-Za-z0-9_-]*$/,CC=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,RC=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,wh=/^\+[1-9]\d{6,14}$/,Zb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ph=new RegExp(`^${Zb}$`);function Qb(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}a(Qb,"timeSource");function Th(e){return new RegExp(`^${Qb(e)}$`)}a(Th,"time");function kh(e){let t=Qb({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Zb}T(?:${i})$`)}a(kh,"datetime");var Ch=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Rh=/^-?\d+n?$/,Oh=/^-?\d+$/,pl=/^-?\d+(?:\.\d+)?$/,Nh=/^(?:true|false)$/i,$h=/^null$/i;var Dh=/^undefined$/i;var Bh=/^[^A-Z]*$/,zh=/^[^a-z]*$/,OC=/^[0-9a-fA-F]*$/;function fa(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(fa,"fixedBase64");function da(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(da,"fixedBase64url");var NC=/^[0-9a-fA-F]{32}$/,$C=fa(22,"=="),DC=da(22),BC=/^[0-9a-fA-F]{40}$/,zC=fa(27,"="),LC=da(27),UC=/^[0-9a-fA-F]{64}$/,MC=fa(43,"="),FC=da(43),HC=/^[0-9a-fA-F]{96}$/,jC=fa(64,""),WC=da(64),qC=/^[0-9a-fA-F]{128}$/,VC=fa(86,"=="),ZC=da(86);var $t=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Gb={number:"number",bigint:"bigint",object:"date"},hl=T("$ZodCheckLessThan",(e,t)=>{$t.init(e,t);let r=Gb[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gl=T("$ZodCheckGreaterThan",(e,t)=>{$t.init(e,t);let r=Gb[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lh=T("$ZodCheckMultipleOf",(e,t)=>{$t.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):nh(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Uh=T("$ZodCheckNumberFormat",(e,t)=>{$t.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=ch[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=o,r&&(c.pattern=Oh)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Mh=T("$ZodCheckBigIntFormat",(e,t)=>{$t.init(e,t);let[r,i]=uh[t.format];e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Fh=T("$ZodCheckMaxSize",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:ca(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Hh=T("$ZodCheckMinSize",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:ca(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),jh=T("$ZodCheckSizeEquals",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let s=o>t.size;i.issues.push({origin:ca(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Wh=T("$ZodCheckMaxLength",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let s=ua(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),qh=T("$ZodCheckMinLength",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let s=ua(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Vh=T("$ZodCheckLengthEquals",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{let n=i.value,o=n.length;if(o===t.length)return;let s=ua(n),c=o>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ko=T("$ZodCheckStringFormat",(e,t)=>{var r,i;$t.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Zh=T("$ZodCheckRegex",(e,t)=>{Ko.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Qh=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Bh),Ko.init(e,t)}),Kh=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=zh),Ko.init(e,t)}),Gh=T("$ZodCheckIncludes",(e,t)=>{$t.init(e,t);let r=un(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Yh=T("$ZodCheckStartsWith",(e,t)=>{$t.init(e,t);let r=new RegExp(`^${un(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Xh=T("$ZodCheckEndsWith",(e,t)=>{$t.init(e,t);let r=new RegExp(`.*${un(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Kb(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues))}a(Kb,"handleCheckPropertyResult");var Jh=T("$ZodCheckProperty",(e,t)=>{$t.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Kb(n,r,t.property));Kb(i,r,t.property)}}),eg=T("$ZodCheckMimeType",(e,t)=>{$t.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),tg=T("$ZodCheckOverwrite",(e,t)=>{$t.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var pa=class{static{a(this,"Doc")}constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
23
+ `,{private:c,public:u}}default:throw new Error("Invalid output key format")}}a(DP,"convertKeys");function WB(){}a(WB,"noop");BP.exports={generateKeyPair:a((e,t,r)=>{typeof t=="function"&&(r=t,t=void 0),typeof r!="function"&&(r=WB);let i=$P(e,t);$B(...i,(n,o,s)=>{if(n)return r(n);let c;try{c=DP(i[0],o,s,t)}catch(u){return r(u)}r(null,c)})},"generateKeyPair"),generateKeyPairSync:a((e,t)=>{let r=$P(e,t),{publicKey:i,privateKey:n}=DB(...r);return DP(r[0],i,n,t)},"generateKeyPairSync")}});var UP=me(($7,zP)=>{"use strict";var{AgentProtocol:qB,BaseAgent:VB,createAgent:ZB,CygwinAgent:QB,OpenSSHAgent:GB,PageantAgent:KB}=ZE(),{SSHTTPAgent:YB,SSHTTPSAgent:XB}=CP(),{parseKey:JB}=Ci(),{flagsToString:e6,OPEN_MODE:t6,STATUS_CODE:r6,stringToFlags:n6}=Tu();zP.exports={AgentProtocol:qB,BaseAgent:VB,createAgent:ZB,Client:OA(),CygwinAgent:QB,HTTPAgent:YB,HTTPSAgent:XB,OpenSSHAgent:GB,PageantAgent:KB,Server:OP(),utils:{parseKey:JB,...LP(),sftp:{flagsToString:e6,OPEN_MODE:t6,STATUS_CODE:r6,stringToFlags:n6}}}});var UA=me((D7,MP)=>{MP.exports=require("stream")});var VP=me((B7,qP)=>{"use strict";function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}a(FP,"ownKeys");function HP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(i){i6(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}a(HP,"_objectSpread");function i6(e,t,r){return t=WP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(i6,"_defineProperty");function o6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(o6,"_classCallCheck");function jP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,WP(i.key),i)}}a(jP,"_defineProperties");function s6(e,t,r){return t&&jP(e.prototype,t),r&&jP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}a(s6,"_createClass");function WP(e){var t=a6(e,"string");return typeof t=="symbol"?t:String(t)}a(WP,"_toPropertyKey");function a6(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(a6,"_toPrimitive");var c6=require("buffer"),$p=c6.Buffer,u6=require("util"),MA=u6.inspect,l6=MA&&MA.custom||"inspect";function f6(e,t,r){$p.prototype.copy.call(e,t,r)}a(f6,"copyBuffer");qP.exports=(function(){function e(){o6(this,e),this.head=null,this.tail=null,this.length=0}return a(e,"BufferList"),s6(e,[{key:"push",value:a(function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},"push")},{key:"unshift",value:a(function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},"unshift")},{key:"shift",value:a(function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},"shift")},{key:"clear",value:a(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:a(function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},"join")},{key:"concat",value:a(function(r){if(this.length===0)return $p.alloc(0);for(var i=$p.allocUnsafe(r>>>0),n=this.head,o=0;n;)f6(n.data,i,o),o+=n.data.length,n=n.next;return i},"concat")},{key:"consume",value:a(function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n},"consume")},{key:"first",value:a(function(){return this.head.data},"first")},{key:"_getString",value:a(function(r){var i=this.head,n=1,o=i.data;for(r-=o.length;i=i.next;){var s=i.data,c=r>s.length?s.length:r;if(c===s.length?o+=s:o+=s.slice(0,r),r-=c,r===0){c===s.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(c));break}++n}return this.length-=n,o},"_getString")},{key:"_getBuffer",value:a(function(r){var i=$p.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var s=n.data,c=r>s.length?s.length:r;if(s.copy(i,i.length-r,0,c),r-=c,r===0){c===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(c));break}++o}return this.length-=o,i},"_getBuffer")},{key:l6,value:a(function(r,i){return MA(this,HP(HP({},i),{},{depth:0,customInspect:!1}))},"value")}]),e})()});var HA=me((z7,QP)=>{"use strict";function d6(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(FA,this,e)):process.nextTick(FA,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(Dp,r):(r._writableState.errorEmitted=!0,process.nextTick(ZP,r,o)):process.nextTick(ZP,r,o):t?(process.nextTick(Dp,r),t(o)):process.nextTick(Dp,r)}),this)}a(d6,"destroy");function ZP(e,t){FA(e,t),Dp(e)}a(ZP,"emitErrorAndCloseNT");function Dp(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}a(Dp,"emitCloseNT");function p6(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}a(p6,"undestroy");function FA(e,t){e.emit("error",t)}a(FA,"emitErrorNT");function h6(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}a(h6,"errorOrDestroy");QP.exports={destroy:d6,undestroy:p6,errorOrDestroy:h6}});var Bi=me((M7,YP)=>{"use strict";var KP={};function mn(e,t,r){r||(r=Error);function i(o,s,c){return typeof t=="string"?t:t(o,s,c)}a(i,"getMessage");class n extends r{static{a(this,"NodeError")}constructor(s,c,u){super(i(s,c,u))}}n.prototype.name=r.name,n.prototype.code=e,KP[e]=n}a(mn,"createErrorType");function GP(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}a(GP,"oneOf");function g6(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}a(g6,"startsWith");function m6(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}a(m6,"endsWith");function _6(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}a(_6,"includes");mn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);mn("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&g6(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let n;if(m6(e," argument"))n=`The ${e} ${i} ${GP(t,"type")}`;else{let o=_6(e,".")?"property":"argument";n=`The "${e}" ${o} ${i} ${GP(t,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);mn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");mn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});mn("ERR_STREAM_PREMATURE_CLOSE","Premature close");mn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});mn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");mn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");mn("ERR_STREAM_WRITE_AFTER_END","write after end");mn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);mn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);mn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");YP.exports.codes=KP});var jA=me((H7,XP)=>{"use strict";var y6=Bi().codes.ERR_INVALID_OPT_VALUE;function E6(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}a(E6,"highWaterMarkFrom");function A6(e,t,r,i){var n=E6(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new y6(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}a(A6,"getHighWaterMark");XP.exports={getHighWaterMark:A6}});var JP=me((W7,WA)=>{typeof Object.create=="function"?WA.exports=a(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):WA.exports=a(function(t,r){if(r){t.super_=r;var i=a(function(){},"TempCtor");i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}},"inherits")});var vo=me((V7,VA)=>{try{if(qA=require("util"),typeof qA.inherits!="function")throw"";VA.exports=qA.inherits}catch{VA.exports=JP()}var qA});var tT=me((Z7,eT)=>{eT.exports=require("util").deprecate});var GA=me((Q7,aT)=>{"use strict";aT.exports=or;function nT(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Z6(t,e)}}a(nT,"CorkedRequest");var qs;or.WritableState=zu;var b6={deprecate:tT()},iT=UA(),Lp=require("buffer").Buffer,x6=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function I6(e){return Lp.from(e)}a(I6,"_uint8ArrayToBuffer");function S6(e){return Lp.isBuffer(e)||e instanceof x6}a(S6,"_isUint8Array");var QA=HA(),v6=jA(),w6=v6.getHighWaterMark,Li=Bi().codes,P6=Li.ERR_INVALID_ARG_TYPE,T6=Li.ERR_METHOD_NOT_IMPLEMENTED,k6=Li.ERR_MULTIPLE_CALLBACK,C6=Li.ERR_STREAM_CANNOT_PIPE,R6=Li.ERR_STREAM_DESTROYED,O6=Li.ERR_STREAM_NULL_VALUES,N6=Li.ERR_STREAM_WRITE_AFTER_END,$6=Li.ERR_UNKNOWN_ENCODING,Vs=QA.errorOrDestroy;vo()(or,iT);function D6(){}a(D6,"nop");function zu(e,t,r){qs=qs||wo(),e=e||{},typeof r!="boolean"&&(r=t instanceof qs),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=w6(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){H6(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new nT(this)}a(zu,"WritableState");zu.prototype.getBuffer=a(function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},"getBuffer");(function(){try{Object.defineProperty(zu.prototype,"buffer",{get:b6.deprecate(a(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Bp;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Bp=Function.prototype[Symbol.hasInstance],Object.defineProperty(or,Symbol.hasInstance,{value:a(function(t){return Bp.call(this,t)?!0:this!==or?!1:t&&t._writableState instanceof zu},"value")})):Bp=a(function(t){return t instanceof this},"realHasInstance");function or(e){qs=qs||wo();var t=this instanceof qs;if(!t&&!Bp.call(or,this))return new or(e);this._writableState=new zu(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),iT.call(this)}a(or,"Writable");or.prototype.pipe=function(){Vs(this,new C6)};function B6(e,t){var r=new N6;Vs(e,r),process.nextTick(t,r)}a(B6,"writeAfterEnd");function L6(e,t,r,i){var n;return r===null?n=new O6:typeof r!="string"&&!t.objectMode&&(n=new P6("chunk",["string","Buffer"],r)),n?(Vs(e,n),process.nextTick(i,n),!1):!0}a(L6,"validChunk");or.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&S6(e);return o&&!Lp.isBuffer(e)&&(e=I6(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=D6),i.ending?B6(this,r):(o||L6(this,i,e,r))&&(i.pendingcb++,n=U6(this,i,o,e,t,r)),n};or.prototype.cork=function(){this._writableState.corked++};or.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&oT(this,e))};or.prototype.setDefaultEncoding=a(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new $6(t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");Object.defineProperty(or.prototype,"writableBuffer",{enumerable:!1,get:a(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function z6(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Lp.from(t,r)),t}a(z6,"decodeChunk");Object.defineProperty(or.prototype,"writableHighWaterMark",{enumerable:!1,get:a(function(){return this._writableState.highWaterMark},"get")});function U6(e,t,r,i,n,o){if(!r){var s=z6(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var c=t.objectMode?1:i.length;t.length+=c;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else ZA(e,t,!1,c,i,n,o);return u}a(U6,"writeOrBuffer");function ZA(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new R6("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}a(ZA,"doWrite");function M6(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(Lu,e,t),e._writableState.errorEmitted=!0,Vs(e,i)):(n(i),e._writableState.errorEmitted=!0,Vs(e,i),Lu(e,t))}a(M6,"onwriteError");function F6(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}a(F6,"onwriteStateUpdate");function H6(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new k6;if(F6(r),t)M6(e,r,i,t,n);else{var o=sT(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&oT(e,r),i?process.nextTick(rT,e,r,o,n):rT(e,r,o,n)}}a(H6,"onwrite");function rT(e,t,r,i){r||j6(e,t),t.pendingcb--,i(),Lu(e,t)}a(rT,"afterWrite");function j6(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}a(j6,"onwriteDrain");function oT(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,c=!0;r;)n[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;n.allBuffers=c,ZA(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new nT(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,p=t.objectMode?1:u.length;if(ZA(e,t,!1,p,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}a(oT,"clearBuffer");or.prototype._write=function(e,t,r){r(new T6("_write()"))};or.prototype._writev=null;or.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||V6(this,i,r),this};Object.defineProperty(or.prototype,"writableLength",{enumerable:!1,get:a(function(){return this._writableState.length},"get")});function sT(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}a(sT,"needFinish");function W6(e,t){e._final(function(r){t.pendingcb--,r&&Vs(e,r),t.prefinished=!0,e.emit("prefinish"),Lu(e,t)})}a(W6,"callFinal");function q6(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(W6,e,t)):(t.prefinished=!0,e.emit("prefinish")))}a(q6,"prefinish");function Lu(e,t){var r=sT(t);if(r&&(q6(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}a(Lu,"finishMaybe");function V6(e,t,r){t.ending=!0,Lu(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}a(V6,"endWritable");function Z6(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}a(Z6,"onCorkedFinish");Object.defineProperty(or.prototype,"destroyed",{enumerable:!1,get:a(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:a(function(t){this._writableState&&(this._writableState.destroyed=t)},"set")});or.prototype.destroy=QA.destroy;or.prototype._undestroy=QA.undestroy;or.prototype._destroy=function(e,t){t(e)}});var wo=me((K7,uT)=>{"use strict";var Q6=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};uT.exports=Ln;var cT=XA(),YA=GA();vo()(Ln,cT);for(KA=Q6(YA.prototype),zp=0;zp<KA.length;zp++)Up=KA[zp],Ln.prototype[Up]||(Ln.prototype[Up]=YA.prototype[Up]);var KA,Up,zp;function Ln(e){if(!(this instanceof Ln))return new Ln(e);cT.call(this,e),YA.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",G6)))}a(Ln,"Duplex");Object.defineProperty(Ln.prototype,"writableHighWaterMark",{enumerable:!1,get:a(function(){return this._writableState.highWaterMark},"get")});Object.defineProperty(Ln.prototype,"writableBuffer",{enumerable:!1,get:a(function(){return this._writableState&&this._writableState.getBuffer()},"get")});Object.defineProperty(Ln.prototype,"writableLength",{enumerable:!1,get:a(function(){return this._writableState.length},"get")});function G6(){this._writableState.ended||process.nextTick(K6,this)}a(G6,"onend");function K6(e){e.end()}a(K6,"onEndNT");Object.defineProperty(Ln.prototype,"destroyed",{enumerable:!1,get:a(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:a(function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)},"set")})});var dT=me((JA,fT)=>{var Mp=require("buffer"),zn=Mp.Buffer;function lT(e,t){for(var r in e)t[r]=e[r]}a(lT,"copyProps");zn.from&&zn.alloc&&zn.allocUnsafe&&zn.allocUnsafeSlow?fT.exports=Mp:(lT(Mp,JA),JA.Buffer=Po);function Po(e,t,r){return zn(e,t,r)}a(Po,"SafeBuffer");Po.prototype=Object.create(zn.prototype);lT(zn,Po);Po.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return zn(e,t,r)};Po.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=zn(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Po.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return zn(e)};Po.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Mp.SlowBuffer(e)}});var rb=me(hT=>{"use strict";var tb=dT().Buffer,pT=tb.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Y6(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}a(Y6,"_normalizeEncoding");function X6(e){var t=Y6(e);if(typeof t!="string"&&(tb.isEncoding===pT||!pT(e)))throw new Error("Unknown encoding: "+e);return t||e}a(X6,"normalizeEncoding");hT.StringDecoder=Uu;function Uu(e){this.encoding=X6(e);var t;switch(this.encoding){case"utf16le":this.text=iL,this.end=oL,t=4;break;case"utf8":this.fillLast=tL,t=4;break;case"base64":this.text=sL,this.end=aL,t=3;break;default:this.write=cL,this.end=uL;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=tb.allocUnsafe(t)}a(Uu,"StringDecoder");Uu.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Uu.prototype.end=nL;Uu.prototype.text=rL;Uu.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function eb(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}a(eb,"utf8CheckByte");function J6(e,t,r){var i=t.length-1;if(i<r)return 0;var n=eb(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=eb(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=eb(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}a(J6,"utf8CheckIncomplete");function eL(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}a(eL,"utf8CheckExtraBytes");function tL(e){var t=this.lastTotal-this.lastNeed,r=eL(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}a(tL,"utf8FillLast");function rL(e,t){var r=J6(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}a(rL,"utf8Text");function nL(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}a(nL,"utf8End");function iL(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}a(iL,"utf16Text");function oL(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}a(oL,"utf16End");function sL(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}a(sL,"base64Text");function aL(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}a(aL,"base64End");function cL(e){return e.toString(this.encoding)}a(cL,"simpleWrite");function uL(e){return e&&e.length?this.write(e):""}a(uL,"simpleEnd")});var Fp=me((tG,_T)=>{"use strict";var gT=Bi().codes.ERR_STREAM_PREMATURE_CLOSE;function lL(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}a(lL,"once");function fL(){}a(fL,"noop");function dL(e){return e.setHeader&&typeof e.abort=="function"}a(dL,"isRequest");function mT(e,t,r){if(typeof t=="function")return mT(e,null,t);t||(t={}),r=lL(r||fL);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=a(function(){e.writable||c()},"onlegacyfinish"),s=e._writableState&&e._writableState.finished,c=a(function(){n=!1,s=!0,i||r.call(e)},"onfinish"),u=e._readableState&&e._readableState.endEmitted,l=a(function(){i=!1,u=!0,n||r.call(e)},"onend"),f=a(function(_){r.call(e,_)},"onerror"),p=a(function(){var _;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(_=new gT),r.call(e,_);if(n&&!s)return(!e._writableState||!e._writableState.ended)&&(_=new gT),r.call(e,_)},"onclose"),g=a(function(){e.req.on("finish",c)},"onrequest");return dL(e)?(e.on("complete",c),e.on("abort",p),e.req?g():e.on("request",g)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",l),e.on("finish",c),t.error!==!1&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",c),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",c),e.removeListener("end",l),e.removeListener("error",f),e.removeListener("close",p)}}a(mT,"eos");_T.exports=mT});var ET=me((nG,yT)=>{"use strict";var Hp;function zi(e,t,r){return t=pL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(zi,"_defineProperty");function pL(e){var t=hL(e,"string");return typeof t=="symbol"?t:String(t)}a(pL,"_toPropertyKey");function hL(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(hL,"_toPrimitive");var gL=Fp(),Ui=Symbol("lastResolve"),To=Symbol("lastReject"),Mu=Symbol("error"),jp=Symbol("ended"),ko=Symbol("lastPromise"),nb=Symbol("handlePromise"),Co=Symbol("stream");function Mi(e,t){return{value:e,done:t}}a(Mi,"createIterResult");function mL(e){var t=e[Ui];if(t!==null){var r=e[Co].read();r!==null&&(e[ko]=null,e[Ui]=null,e[To]=null,t(Mi(r,!1)))}}a(mL,"readAndResolve");function _L(e){process.nextTick(mL,e)}a(_L,"onReadable");function yL(e,t){return function(r,i){e.then(function(){if(t[jp]){r(Mi(void 0,!0));return}t[nb](r,i)},i)}}a(yL,"wrapForNext");var EL=Object.getPrototypeOf(function(){}),AL=Object.setPrototypeOf((Hp={get stream(){return this[Co]},next:a(function(){var t=this,r=this[Mu];if(r!==null)return Promise.reject(r);if(this[jp])return Promise.resolve(Mi(void 0,!0));if(this[Co].destroyed)return new Promise(function(s,c){process.nextTick(function(){t[Mu]?c(t[Mu]):s(Mi(void 0,!0))})});var i=this[ko],n;if(i)n=new Promise(yL(i,this));else{var o=this[Co].read();if(o!==null)return Promise.resolve(Mi(o,!1));n=new Promise(this[nb])}return this[ko]=n,n},"next")},zi(Hp,Symbol.asyncIterator,function(){return this}),zi(Hp,"return",a(function(){var t=this;return new Promise(function(r,i){t[Co].destroy(null,function(n){if(n){i(n);return}r(Mi(void 0,!0))})})},"_return")),Hp),EL),bL=a(function(t){var r,i=Object.create(AL,(r={},zi(r,Co,{value:t,writable:!0}),zi(r,Ui,{value:null,writable:!0}),zi(r,To,{value:null,writable:!0}),zi(r,Mu,{value:null,writable:!0}),zi(r,jp,{value:t._readableState.endEmitted,writable:!0}),zi(r,nb,{value:a(function(o,s){var c=i[Co].read();c?(i[ko]=null,i[Ui]=null,i[To]=null,o(Mi(c,!1))):(i[Ui]=o,i[To]=s)},"value"),writable:!0}),r));return i[ko]=null,gL(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[To];o!==null&&(i[ko]=null,i[Ui]=null,i[To]=null,o(n)),i[Mu]=n;return}var s=i[Ui];s!==null&&(i[ko]=null,i[Ui]=null,i[To]=null,s(Mi(void 0,!0))),i[jp]=!0}),t.on("readable",_L.bind(null,i)),i},"createReadableStreamAsyncIterator");yT.exports=bL});var IT=me((oG,xT)=>{"use strict";function AT(e,t,r,i,n,o,s){try{var c=e[o](s),u=c.value}catch(l){r(l);return}c.done?t(u):Promise.resolve(u).then(i,n)}a(AT,"asyncGeneratorStep");function xL(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function s(u){AT(o,i,n,s,c,"next",u)}a(s,"_next");function c(u){AT(o,i,n,s,c,"throw",u)}a(c,"_throw"),s(void 0)})}}a(xL,"_asyncToGenerator");function bT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}a(bT,"ownKeys");function IL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(r),!0).forEach(function(i){SL(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}a(IL,"_objectSpread");function SL(e,t,r){return t=vL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a(SL,"_defineProperty");function vL(e){var t=wL(e,"string");return typeof t=="symbol"?t:String(t)}a(vL,"_toPropertyKey");function wL(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(wL,"_toPrimitive");var PL=Bi().codes.ERR_INVALID_ARG_TYPE;function TL(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new PL("iterable",["Iterable"],t);var n=new e(IL({objectMode:!0},r)),o=!1;n._read=function(){o||(o=!0,s())};function s(){return c.apply(this,arguments)}a(s,"next");function c(){return c=xL(function*(){try{var u=yield i.next(),l=u.value,f=u.done;f?n.push(null):n.push(yield l)?s():o=!1}catch(p){n.destroy(p)}}),c.apply(this,arguments)}return a(c,"_next2"),n}a(TL,"from");xT.exports=TL});var XA=me((cG,NT)=>{"use strict";NT.exports=Pt;var Zs;Pt.ReadableState=PT;var aG=require("events").EventEmitter,wT=a(function(t,r){return t.listeners(r).length},"EElistenerCount"),Hu=UA(),Wp=require("buffer").Buffer,kL=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function CL(e){return Wp.from(e)}a(CL,"_uint8ArrayToBuffer");function RL(e){return Wp.isBuffer(e)||e instanceof kL}a(RL,"_isUint8Array");var ib=require("util"),ht;ib&&ib.debuglog?ht=ib.debuglog("stream"):ht=a(function(){},"debug");var OL=VP(),fb=HA(),NL=jA(),$L=NL.getHighWaterMark,qp=Bi().codes,DL=qp.ERR_INVALID_ARG_TYPE,BL=qp.ERR_STREAM_PUSH_AFTER_EOF,LL=qp.ERR_METHOD_NOT_IMPLEMENTED,zL=qp.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Qs,ob,sb;vo()(Pt,Hu);var Fu=fb.errorOrDestroy,ab=["error","close","destroy","pause","resume"];function UL(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}a(UL,"prependListener");function PT(e,t,r){Zs=Zs||wo(),e=e||{},typeof r!="boolean"&&(r=t instanceof Zs),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=$L(this,e,"readableHighWaterMark",r),this.buffer=new OL,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Qs||(Qs=rb().StringDecoder),this.decoder=new Qs(e.encoding),this.encoding=e.encoding)}a(PT,"ReadableState");function Pt(e){if(Zs=Zs||wo(),!(this instanceof Pt))return new Pt(e);var t=this instanceof Zs;this._readableState=new PT(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Hu.call(this)}a(Pt,"Readable");Object.defineProperty(Pt.prototype,"destroyed",{enumerable:!1,get:a(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:a(function(t){this._readableState&&(this._readableState.destroyed=t)},"set")});Pt.prototype.destroy=fb.destroy;Pt.prototype._undestroy=fb.undestroy;Pt.prototype._destroy=function(e,t){t(e)};Pt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Wp.from(e,t),t=""),i=!0),TT(this,e,t,!1,i)};Pt.prototype.unshift=function(e){return TT(this,e,null,!0,!1)};function TT(e,t,r,i,n){ht("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,HL(e,o);else{var s;if(n||(s=ML(o,t)),s)Fu(e,s);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Wp.prototype&&(t=CL(t)),i)o.endEmitted?Fu(e,new zL):cb(e,o,t,!0);else if(o.ended)Fu(e,new BL);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?cb(e,o,t,!1):lb(e,o)):cb(e,o,t,!1)}else i||(o.reading=!1,lb(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}a(TT,"readableAddChunk");function cb(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Vp(e)),lb(e,t)}a(cb,"addChunk");function ML(e,t){var r;return!RL(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new DL("chunk",["string","Buffer","Uint8Array"],t)),r}a(ML,"chunkInvalid");Pt.prototype.isPaused=function(){return this._readableState.flowing===!1};Pt.prototype.setEncoding=function(e){Qs||(Qs=rb().StringDecoder);var t=new Qs(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var ST=1073741824;function FL(e){return e>=ST?e=ST:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}a(FL,"computeNewHighWaterMark");function vT(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=FL(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}a(vT,"howMuchToRead");Pt.prototype.read=function(e){ht("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ht("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ub(this):Vp(this),null;if(e=vT(e,t),e===0&&t.ended)return t.length===0&&ub(this),null;var i=t.needReadable;ht("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,ht("length less than watermark",i)),t.ended||t.reading?(i=!1,ht("reading or ended",i)):i&&(ht("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=vT(r,t)));var n;return e>0?n=RT(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ub(this)),n!==null&&this.emit("data",n),n};function HL(e,t){if(ht("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Vp(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,kT(e)))}}a(HL,"onEofChunk");function Vp(e){var t=e._readableState;ht("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ht("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(kT,e))}a(Vp,"emitReadable");function kT(e){var t=e._readableState;ht("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,db(e)}a(kT,"emitReadable_");function lb(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(jL,e,t))}a(lb,"maybeReadMore");function jL(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(ht("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}a(jL,"maybeReadMore_");Pt.prototype._read=function(e){Fu(this,new LL("_read()"))};Pt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,ht("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=n?c:y;i.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",s);function s(b,S){ht("onunpipe"),b===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,f())}a(s,"onunpipe");function c(){ht("onend"),e.end()}a(c,"onend");var u=WL(r);e.on("drain",u);var l=!1;function f(){ht("cleanup"),e.removeListener("close",h),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",g),e.removeListener("unpipe",s),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",p),l=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}a(f,"cleanup"),r.on("data",p);function p(b){ht("ondata");var S=e.write(b);ht("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&OT(i.pipes,e)!==-1)&&!l&&(ht("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}a(p,"ondata");function g(b){ht("onerror",b),y(),e.removeListener("error",g),wT(e,"error")===0&&Fu(e,b)}a(g,"onerror"),UL(e,"error",g);function h(){e.removeListener("finish",_),y()}a(h,"onclose"),e.once("close",h);function _(){ht("onfinish"),e.removeListener("close",h),y()}a(_,"onfinish"),e.once("finish",_);function y(){ht("unpipe"),r.unpipe(e)}return a(y,"unpipe"),e.emit("pipe",r),i.flowing||(ht("pipe resume"),r.resume()),e};function WL(e){return a(function(){var r=e._readableState;ht("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&wT(e,"data")&&(r.flowing=!0,db(e))},"pipeOnDrainFunctionResult")}a(WL,"pipeOnDrain");Pt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=OT(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Pt.prototype.on=function(e,t){var r=Hu.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,ht("on readable",i.length,i.reading),i.length?Vp(this):i.reading||process.nextTick(qL,this)),r};Pt.prototype.addListener=Pt.prototype.on;Pt.prototype.removeListener=function(e,t){var r=Hu.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(CT,this),r};Pt.prototype.removeAllListeners=function(e){var t=Hu.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(CT,this),t};function CT(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}a(CT,"updateReadableListening");function qL(e){ht("readable nexttick read 0"),e.read(0)}a(qL,"nReadingNextTick");Pt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ht("resume"),e.flowing=!e.readableListening,VL(this,e)),e.paused=!1,this};function VL(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(ZL,e,t))}a(VL,"resume");function ZL(e,t){ht("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),db(e),t.flowing&&!t.reading&&e.read(0)}a(ZL,"resume_");Pt.prototype.pause=function(){return ht("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ht("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function db(e){var t=e._readableState;for(ht("flow",t.flowing);t.flowing&&e.read()!==null;);}a(db,"flow");Pt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(ht("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(ht("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var c=t.push(s);c||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=a(function(c){return a(function(){return e[c].apply(e,arguments)},"methodWrapReturnFunction")},"methodWrap")(n));for(var o=0;o<ab.length;o++)e.on(ab[o],this.emit.bind(this,ab[o]));return this._read=function(s){ht("wrapped _read",s),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(Pt.prototype[Symbol.asyncIterator]=function(){return ob===void 0&&(ob=ET()),ob(this)});Object.defineProperty(Pt.prototype,"readableHighWaterMark",{enumerable:!1,get:a(function(){return this._readableState.highWaterMark},"get")});Object.defineProperty(Pt.prototype,"readableBuffer",{enumerable:!1,get:a(function(){return this._readableState&&this._readableState.buffer},"get")});Object.defineProperty(Pt.prototype,"readableFlowing",{enumerable:!1,get:a(function(){return this._readableState.flowing},"get"),set:a(function(t){this._readableState&&(this._readableState.flowing=t)},"set")});Pt._fromList=RT;Object.defineProperty(Pt.prototype,"readableLength",{enumerable:!1,get:a(function(){return this._readableState.length},"get")});function RT(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}a(RT,"fromList");function ub(e){var t=e._readableState;ht("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(QL,t,e))}a(ub,"endReadable");function QL(e,t){if(ht("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}a(QL,"endReadableNT");typeof Symbol=="function"&&(Pt.from=function(e,t){return sb===void 0&&(sb=IT()),sb(Pt,e,t)});function OT(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}a(OT,"indexOf")});var pb=me((lG,DT)=>{"use strict";DT.exports=ii;var Zp=Bi().codes,GL=Zp.ERR_METHOD_NOT_IMPLEMENTED,KL=Zp.ERR_MULTIPLE_CALLBACK,YL=Zp.ERR_TRANSFORM_ALREADY_TRANSFORMING,XL=Zp.ERR_TRANSFORM_WITH_LENGTH_0,Qp=wo();vo()(ii,Qp);function JL(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new KL);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}a(JL,"afterTransform");function ii(e){if(!(this instanceof ii))return new ii(e);Qp.call(this,e),this._transformState={afterTransform:JL.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ez)}a(ii,"Transform");function ez(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){$T(e,t,r)}):$T(this,null,null)}a(ez,"prefinish");ii.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qp.prototype.push.call(this,e,t)};ii.prototype._transform=function(e,t,r){r(new GL("_transform()"))};ii.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};ii.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};ii.prototype._destroy=function(e,t){Qp.prototype._destroy.call(this,e,function(r){t(r)})};function $T(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new XL;if(e._transformState.transforming)throw new YL;return e.push(null)}a($T,"done")});var zT=me((dG,LT)=>{"use strict";LT.exports=ju;var BT=pb();vo()(ju,BT);function ju(e){if(!(this instanceof ju))return new ju(e);BT.call(this,e)}a(ju,"PassThrough");ju.prototype._transform=function(e,t,r){r(null,e)}});var jT=me((hG,HT)=>{"use strict";var hb;function tz(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}a(tz,"once");var FT=Bi().codes,rz=FT.ERR_MISSING_ARGS,nz=FT.ERR_STREAM_DESTROYED;function UT(e){if(e)throw e}a(UT,"noop");function iz(e){return e.setHeader&&typeof e.abort=="function"}a(iz,"isRequest");function oz(e,t,r,i){i=tz(i);var n=!1;e.on("close",function(){n=!0}),hb===void 0&&(hb=Fp()),hb(e,{readable:t,writable:r},function(s){if(s)return i(s);n=!0,i()});var o=!1;return function(s){if(!n&&!o){if(o=!0,iz(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(s||new nz("pipe"))}}}a(oz,"destroyer");function MT(e){e()}a(MT,"call");function sz(e,t){return e.pipe(t)}a(sz,"pipe");function az(e){return!e.length||typeof e[e.length-1]!="function"?UT:e.pop()}a(az,"popCallback");function cz(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=az(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new rz("streams");var n,o=t.map(function(s,c){var u=c<t.length-1,l=c>0;return oz(s,u,l,function(f){n||(n=f),f&&o.forEach(MT),!u&&(o.forEach(MT),i(n))})});return t.reduce(sz)}a(cz,"pipeline");HT.exports=cz});var WT=me((_n,qu)=>{var Wu=require("stream");process.env.READABLE_STREAM==="disable"&&Wu?(qu.exports=Wu.Readable,Object.assign(qu.exports,Wu),qu.exports.Stream=Wu):(_n=qu.exports=XA(),_n.Stream=Wu||_n,_n.Readable=_n,_n.Writable=GA(),_n.Duplex=wo(),_n.Transform=pb(),_n.PassThrough=zT(),_n.finished=Fp(),_n.pipeline=jT())});var VT=me((mG,qT)=>{var uz=Object.prototype.toString,gb=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function lz(e){return uz.call(e).slice(8,-1)==="ArrayBuffer"}a(lz,"isArrayBuffer");function fz(e,t,r){t>>>=0;var i=e.byteLength-t;if(i<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=i;else if(r>>>=0,r>i)throw new RangeError("'length' is out of bounds");return gb?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}a(fz,"fromArrayBuffer");function dz(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return gb?Buffer.from(e,t):new Buffer(e,t)}a(dz,"fromString");function pz(e,t,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return lz(e)?fz(e,t,r):typeof e=="string"?dz(e,t):gb?Buffer.from(e):new Buffer(e)}a(pz,"bufferFrom");qT.exports=pz});var XT=me(Ve=>{var ZT=void 0,hz=1e5,Wt=(function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;return{Class:a(function(r){return e.call(r).replace(/^\[object *|\]$/g,"")},"Class"),HasProperty:a(function(r,i){return i in r},"HasProperty"),HasOwnProperty:a(function(r,i){return t.call(r,i)},"HasOwnProperty"),IsCallable:a(function(r){return typeof r=="function"},"IsCallable"),ToInt32:a(function(r){return r>>0},"ToInt32"),ToUint32:a(function(r){return r>>>0},"ToUint32")}})(),gz=Math.LN2,mz=Math.abs,Gp=Math.floor,_z=Math.log,yz=Math.min,Tn=Math.pow,Ez=Math.round;function mb(e){if(QT&&Gs){var t=QT(e),r;for(r=0;r<t.length;r+=1)Gs(e,t[r],{value:e[t[r]],writable:!1,enumerable:!1,configurable:!1})}}a(mb,"configureProperties");var Gs;Object.defineProperty&&(function(){try{return Object.defineProperty({},"x",{}),!0}catch{return!1}})()?Gs=Object.defineProperty:Gs=a(function(e,t,r){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return Wt.HasProperty(r,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,r.get),Wt.HasProperty(r,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,r.set),Wt.HasProperty(r,"value")&&(e[t]=r.value),e},"defineProp");var QT=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t=[],r;for(r in e)Wt.HasOwnProperty(e,r)&&t.push(r);return t};function Az(e){if(!Gs)return;if(e.length>hz)throw new RangeError("Array too large for polyfill");function t(i){Gs(e,i,{get:a(function(){return e._getter(i)},"get"),set:a(function(n){e._setter(i,n)},"set"),enumerable:!0,configurable:!1})}a(t,"makeArrayAccessor");var r;for(r=0;r<e.length;r+=1)t(r)}a(Az,"makeArrayAccessors");function _b(e,t){var r=32-t;return e<<r>>r}a(_b,"as_signed");function yb(e,t){var r=32-t;return e<<r>>>r}a(yb,"as_unsigned");function bz(e){return[e&255]}a(bz,"packI8");function xz(e){return _b(e[0],8)}a(xz,"unpackI8");function Iz(e){return[e&255]}a(Iz,"packU8");function GT(e){return yb(e[0],8)}a(GT,"unpackU8");function Sz(e){return e=Ez(Number(e)),[e<0?0:e>255?255:e&255]}a(Sz,"packU8Clamped");function vz(e){return[e>>8&255,e&255]}a(vz,"packI16");function wz(e){return _b(e[0]<<8|e[1],16)}a(wz,"unpackI16");function Pz(e){return[e>>8&255,e&255]}a(Pz,"packU16");function Tz(e){return yb(e[0]<<8|e[1],16)}a(Tz,"unpackU16");function kz(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}a(kz,"packI32");function Cz(e){return _b(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}a(Cz,"unpackI32");function Rz(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}a(Rz,"packU32");function Oz(e){return yb(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}a(Oz,"unpackU32");function KT(e,t,r){var i=(1<<t-1)-1,n,o,s,c,u,l,f,p;function g(h){var _=Gp(h),y=h-_;return y<.5?_:y>.5||_%2?_+1:_}for(a(g,"roundToEven"),e!==e?(o=(1<<t)-1,s=Tn(2,r-1),n=0):e===1/0||e===-1/0?(o=(1<<t)-1,s=0,n=e<0?1:0):e===0?(o=0,s=0,n=1/e===-1/0?1:0):(n=e<0,e=mz(e),e>=Tn(2,1-i)?(o=yz(Gp(_z(e)/gz),1023),s=g(e/Tn(2,o)*Tn(2,r)),s/Tn(2,r)>=2&&(o=o+1,s=1),o>i?(o=(1<<t)-1,s=0):(o=o+i,s=s-Tn(2,r))):(o=0,s=g(e/Tn(2,1-i-r)))),l=[],u=r;u;u-=1)l.push(s%2?1:0),s=Gp(s/2);for(u=t;u;u-=1)l.push(o%2?1:0),o=Gp(o/2);for(l.push(n?1:0),l.reverse(),f=l.join(""),p=[];f.length;)p.push(parseInt(f.substring(0,8),2)),f=f.substring(8);return p}a(KT,"packIEEE754");function YT(e,t,r){var i=[],n,o,s,c,u,l,f,p;for(n=e.length;n;n-=1)for(s=e[n-1],o=8;o;o-=1)i.push(s%2?1:0),s=s>>1;return i.reverse(),c=i.join(""),u=(1<<t-1)-1,l=parseInt(c.substring(0,1),2)?-1:1,f=parseInt(c.substring(1,1+t),2),p=parseInt(c.substring(1+t),2),f===(1<<t)-1?p!==0?NaN:l*(1/0):f>0?l*Tn(2,f-u)*(1+p/Tn(2,r)):p!==0?l*Tn(2,-(u-1))*(p/Tn(2,r)):l<0?-0:0}a(YT,"unpackIEEE754");function Nz(e){return YT(e,11,52)}a(Nz,"unpackF64");function $z(e){return KT(e,11,52)}a($z,"packF64");function Dz(e){return YT(e,8,23)}a(Dz,"unpackF32");function Bz(e){return KT(e,8,23)}a(Bz,"packF32");(function(){var e=a(function(h){if(h=Wt.ToInt32(h),h<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=h,this._bytes=[],this._bytes.length=h;var _;for(_=0;_<this.byteLength;_+=1)this._bytes[_]=0;mb(this)},"ArrayBuffer");Ve.ArrayBuffer=Ve.ArrayBuffer||e;var t=a(function(){},"ArrayBufferView");function r(g,h,_){var y;return y=a(function(b,S,v){var M,R,J,te;if(!arguments.length||typeof arguments[0]=="number"){if(this.length=Wt.ToInt32(arguments[0]),v<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0}else if(typeof arguments[0]=="object"&&arguments[0].constructor===y)for(M=arguments[0],this.length=M.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,J=0;J<this.length;J+=1)this._setter(J,M._getter(J));else if(typeof arguments[0]=="object"&&!(arguments[0]instanceof e||Wt.Class(arguments[0])==="ArrayBuffer"))for(R=arguments[0],this.length=Wt.ToUint32(R.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,J=0;J<this.length;J+=1)te=R[J],this._setter(J,Number(te));else if(typeof arguments[0]=="object"&&(arguments[0]instanceof e||Wt.Class(arguments[0])==="ArrayBuffer")){if(this.buffer=b,this.byteOffset=Wt.ToUint32(S),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=Wt.ToUint32(v),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else throw new TypeError("Unexpected argument type(s)");this.constructor=y,mb(this),Az(this)},"ctor"),y.prototype=new t,y.prototype.BYTES_PER_ELEMENT=g,y.prototype._pack=h,y.prototype._unpack=_,y.BYTES_PER_ELEMENT=g,y.prototype._getter=function(b){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(b=Wt.ToUint32(b),b>=this.length)return ZT;var S=[],v,M;for(v=0,M=this.byteOffset+b*this.BYTES_PER_ELEMENT;v<this.BYTES_PER_ELEMENT;v+=1,M+=1)S.push(this.buffer._bytes[M]);return this._unpack(S)},y.prototype.get=y.prototype._getter,y.prototype._setter=function(b,S){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(b=Wt.ToUint32(b),b>=this.length)return ZT;var v=this._pack(S),M,R;for(M=0,R=this.byteOffset+b*this.BYTES_PER_ELEMENT;M<this.BYTES_PER_ELEMENT;M+=1,R+=1)this.buffer._bytes[R]=v[M]},y.prototype.set=function(b,S){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var v,M,R,J,te,ee,P,C,H,U;if(typeof arguments[0]=="object"&&arguments[0].constructor===this.constructor){if(v=arguments[0],R=Wt.ToUint32(arguments[1]),R+v.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(C=this.byteOffset+R*this.BYTES_PER_ELEMENT,H=v.length*this.BYTES_PER_ELEMENT,v.buffer===this.buffer){for(U=[],te=0,ee=v.byteOffset;te<H;te+=1,ee+=1)U[te]=v.buffer._bytes[ee];for(te=0,P=C;te<H;te+=1,P+=1)this.buffer._bytes[P]=U[te]}else for(te=0,ee=v.byteOffset,P=C;te<H;te+=1,ee+=1,P+=1)this.buffer._bytes[P]=v.buffer._bytes[ee]}else if(typeof arguments[0]=="object"&&typeof arguments[0].length<"u"){if(M=arguments[0],J=Wt.ToUint32(M.length),R=Wt.ToUint32(arguments[1]),R+J>this.length)throw new RangeError("Offset plus length of array is out of range");for(te=0;te<J;te+=1)ee=M[te],this._setter(R+te,Number(ee))}else throw new TypeError("Unexpected argument type(s)")},y.prototype.subarray=function(b,S){function v(R,J,te){return R<J?J:R>te?te:R}a(v,"clamp"),b=Wt.ToInt32(b),S=Wt.ToInt32(S),arguments.length<1&&(b=0),arguments.length<2&&(S=this.length),b<0&&(b=this.length+b),S<0&&(S=this.length+S),b=v(b,0,this.length),S=v(S,0,this.length);var M=S-b;return M<0&&(M=0),new this.constructor(this.buffer,this.byteOffset+b*this.BYTES_PER_ELEMENT,M)},y}a(r,"makeConstructor");var i=r(1,bz,xz),n=r(1,Iz,GT),o=r(1,Sz,GT),s=r(2,vz,wz),c=r(2,Pz,Tz),u=r(4,kz,Cz),l=r(4,Rz,Oz),f=r(4,Bz,Dz),p=r(8,$z,Nz);Ve.Int8Array=Ve.Int8Array||i,Ve.Uint8Array=Ve.Uint8Array||n,Ve.Uint8ClampedArray=Ve.Uint8ClampedArray||o,Ve.Int16Array=Ve.Int16Array||s,Ve.Uint16Array=Ve.Uint16Array||c,Ve.Int32Array=Ve.Int32Array||u,Ve.Uint32Array=Ve.Uint32Array||l,Ve.Float32Array=Ve.Float32Array||f,Ve.Float64Array=Ve.Float64Array||p})();(function(){function e(o,s){return Wt.IsCallable(o.get)?o.get(s):o[s]}a(e,"r");var t=(function(){var o=new Ve.Uint16Array([4660]),s=new Ve.Uint8Array(o.buffer);return e(s,0)===18})(),r=a(function(s,c,u){if(arguments.length===0)s=new Ve.ArrayBuffer(0);else if(!(s instanceof Ve.ArrayBuffer||Wt.Class(s)==="ArrayBuffer"))throw new TypeError("TypeError");if(this.buffer=s||new Ve.ArrayBuffer(0),this.byteOffset=Wt.ToUint32(c),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=Wt.ToUint32(u),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");mb(this)},"DataView");function i(o){return function(s,c){if(s=Wt.ToUint32(s),s+o.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");s+=this.byteOffset;var u=new Ve.Uint8Array(this.buffer,s,o.BYTES_PER_ELEMENT),l=[],f;for(f=0;f<o.BYTES_PER_ELEMENT;f+=1)l.push(e(u,f));return!!c==!!t&&l.reverse(),e(new o(new Ve.Uint8Array(l).buffer),0)}}a(i,"makeGetter"),r.prototype.getUint8=i(Ve.Uint8Array),r.prototype.getInt8=i(Ve.Int8Array),r.prototype.getUint16=i(Ve.Uint16Array),r.prototype.getInt16=i(Ve.Int16Array),r.prototype.getUint32=i(Ve.Uint32Array),r.prototype.getInt32=i(Ve.Int32Array),r.prototype.getFloat32=i(Ve.Float32Array),r.prototype.getFloat64=i(Ve.Float64Array);function n(o){return function(s,c,u){if(s=Wt.ToUint32(s),s+o.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var l=new o([c]),f=new Ve.Uint8Array(l.buffer),p=[],g,h;for(g=0;g<o.BYTES_PER_ELEMENT;g+=1)p.push(e(f,g));!!u==!!t&&p.reverse(),h=new Ve.Uint8Array(this.buffer,s,o.BYTES_PER_ELEMENT),h.set(p)}}a(n,"makeSetter"),r.prototype.setUint8=n(Ve.Uint8Array),r.prototype.setInt8=n(Ve.Int8Array),r.prototype.setUint16=n(Ve.Uint16Array),r.prototype.setInt16=n(Ve.Int16Array),r.prototype.setUint32=n(Ve.Uint32Array),r.prototype.setInt32=n(Ve.Int32Array),r.prototype.setFloat32=n(Ve.Float32Array),r.prototype.setFloat64=n(Ve.Float64Array),Ve.DataView=Ve.DataView||r})()});var rk=me((AG,tk)=>{var JT=WT().Writable,Lz=vo(),Vu=VT();typeof Uint8Array>"u"?Kp=XT().Uint8Array:Kp=Uint8Array;var Kp;function Ro(e,t){if(!(this instanceof Ro))return new Ro(e,t);typeof e=="function"&&(t=e,e={}),e||(e={});var r=e.encoding,i=!1;r?(r=String(r).toLowerCase(),(r==="u8"||r==="uint8")&&(r="uint8array")):i=!0,JT.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=i,t&&this.on("finish",function(){t(this.getBody())}),this.body=[]}a(Ro,"ConcatStream");tk.exports=Ro;Lz(Ro,JT);Ro.prototype._write=function(e,t,r){this.body.push(e),r()};Ro.prototype.inferEncoding=function(e){var t=e===void 0?this.body[0]:e;return Buffer.isBuffer(t)?"buffer":typeof Uint8Array<"u"&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":typeof t=="string"?"string":Object.prototype.toString.call(t)==="[object Object]"?"object":"buffer"};Ro.prototype.getBody=function(){return!this.encoding&&this.body.length===0?[]:(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),this.encoding==="array"?Fz(this.body):this.encoding==="string"?Uz(this.body):this.encoding==="buffer"?Mz(this.body):this.encoding==="uint8array"?Hz(this.body):this.body)};function zz(e){return/Array\]$/.test(Object.prototype.toString.call(e))}a(zz,"isArrayish");function ek(e){return typeof e=="string"||zz(e)||e&&typeof e.subarray=="function"}a(ek,"isBufferish");function Uz(e){for(var t=[],r=!1,i=0;i<e.length;i++){var n=e[i];typeof n=="string"||Buffer.isBuffer(n)?t.push(n):ek(n)?t.push(Vu(n)):t.push(Vu(String(n)))}return Buffer.isBuffer(e[0])?(t=Buffer.concat(t),t=t.toString("utf8")):t=t.join(""),t}a(Uz,"stringConcat");function Mz(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];Buffer.isBuffer(i)?t.push(i):ek(i)?t.push(Vu(i)):t.push(Vu(String(i)))}return Buffer.concat(t)}a(Mz,"bufferConcat");function Fz(e){for(var t=[],r=0;r<e.length;r++)t.push.apply(t,e[r]);return t}a(Fz,"arrayConcat");function Hz(e){for(var t=0,r=0;r<e.length;r++)typeof e[r]=="string"&&(e[r]=Vu(e[r])),t+=e[r].length;for(var i=new Kp(t),r=0,n=0;r<e.length;r++)for(var o=e[r],s=0;s<o.length;s++)i[n++]=o[s];return i}a(Hz,"u8Concat")});var ok=me((xG,ik)=>{"use strict";function nk(e,t){for(let r in t)Object.defineProperty(e,r,{value:t[r],enumerable:!0,configurable:!0});return e}a(nk,"assign");function jz(e,t,r){if(!e||typeof e=="string")throw new TypeError("Please pass an Error to err-code");r||(r={}),typeof t=="object"&&(r=t,t=void 0),t!=null&&(r.code=t);try{return nk(e,r)}catch{r.message=e.message,r.stack=e.stack;let n=a(function(){},"ErrClass");return n.prototype=Object.create(Object.getPrototypeOf(e)),nk(new n,r)}}a(jz,"createError");ik.exports=jz});var ak=me((SG,sk)=>{function yn(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(yn,"RetryOperation");sk.exports=yn;yn.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};yn.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};yn.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var i=this,n=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r);return this._options.unref&&n.unref(),!0};yn.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};yn.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};yn.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};yn.prototype.start=yn.prototype.try;yn.prototype.errors=function(){return this._errors};yn.prototype.attempts=function(){return this._attempts};yn.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,r=0,i=0;i<this._errors.length;i++){var n=this._errors[i],o=n.message,s=(e[o]||0)+1;e[o]=s,s>=r&&(t=n,r=s)}return t}});var ck=me(Oo=>{var Wz=ak();Oo.operation=function(e){var t=Oo.timeouts(e);return new Wz(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Oo.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],n=0;n<t.retries;n++)i.push(this.createTimeout(n,t));return e&&e.forever&&!i.length&&i.push(this.createTimeout(n,t)),i.sort(function(o,s){return o-s}),i};Oo.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,i=Math.round(r*t.minTimeout*Math.pow(t.factor,e));return i=Math.min(i,t.maxTimeout),i};Oo.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r){r=[];for(var i in e)typeof e[i]=="function"&&r.push(i)}for(var n=0;n<r.length;n++){var o=r[n],s=e[o];e[o]=a(function(u){var l=Oo.operation(t),f=Array.prototype.slice.call(arguments,1),p=f.pop();f.push(function(g){l.retry(g)||(g&&(arguments[0]=l.mainError()),p.apply(this,arguments))}),l.attempt(function(){u.apply(e,f)})},"retryWrapper").bind(e,s),e[o].options=t}}});var lk=me((TG,uk)=>{uk.exports=ck()});var pk=me((kG,dk)=>{"use strict";var qz=ok(),Vz=lk(),Zz=Object.prototype.hasOwnProperty;function fk(e){return e&&e.code==="EPROMISERETRY"&&Zz.call(e,"retried")}a(fk,"isRetryError");function Qz(e,t){var r,i;return typeof e=="object"&&typeof t=="function"&&(r=t,t=e,e=r),i=Vz.operation(t),new Promise(function(n,o){i.attempt(function(s){Promise.resolve().then(function(){return e(function(c){throw fk(c)&&(c=c.retried),qz(new Error("Retrying"),"EPROMISERETRY",{retried:c})},s)}).then(n,function(c){fk(c)&&(c=c.retried,i.retry(c||new Error))||o(c)})})})}a(Qz,"promiseRetry");dk.exports=Qz});var Eb=me((RG,hk)=>{var Gz={generic:"ERR_GENERIC_CLIENT",connect:"ERR_NOT_CONNECTED",badPath:"ERR_BAD_PATH",permission:"EACCES",notexist:"ENOENT",notdir:"ENOTDIR",badAuth:"ERR_BAD_AUTH"},Kz={writeFile:1,readFile:2,writeDir:3,readDir:4,readObj:5,writeObj:6};hk.exports={errorCode:Gz,targetType:Kz}});var Ak=me((OG,Ek)=>{var Zu=require("fs"),Yz=require("path"),{errorCode:gk}=Eb();function mk(e,t,r){return a(n=>{if(e.endCalled||e.errorHandled){e.debugMsg(`${t} errorListener - ignoring handled error`);return}e.errorHandled=!0;let o=new Error(`${t}: ${n.message}`);if(o.code=n.code,r)r(o);else throw o},"fn")}a(mk,"errorListener");function Xz(e,t){return()=>{e.endCalled||e.errorHandled||e.closeHandled?e.debugMsg(`Global ${t} event: Ignoring expected and handled event`):(e.debugMsg(`Global ${t} event: Handling unexpected event`),e.sftp=void 0)}}a(Xz,"globalListener");function _k(e,t,r){return a(function(){if(e.sftp=void 0,e.endCalled||e.endHandled||e.errorHandled){e.debugMsg(`${t} endListener - ignoring handled error`);return}e.endHandled=!0,e.debugMsg(`${t} Unexpected end event - ignoring`)},"fn")}a(_k,"endListener");function yk(e,t,r){return a(function(){if(e.sftp=void 0,e.endCalled||e.closeHandled||e.errorHandled||e.endHandled){e.debugMsg(`${t} closeListener - ignoring handled error`);return}e.closeHandled=!0,e.debugMsg(`${t} Unexpected close event raised - ignoring`)},"fn")}a(yk,"closeListener");function Jz(e,t,r){let i={end:_k(e,t,r),close:yk(e,t,r),error:mk(e,t,r)};return e.on("end",i.end),e.on("close",i.close),e.on("error",i.error),e._resetEventFlags(),i}a(Jz,"addTempListeners");function eU(e,t,r){try{e.removeListener("end",t.end),e.removeListener("close",t.close),e.removeListener("error",t.error)}catch(i){throw new Error(`${r}: Error removing temp listeners: ${i.message}`)}}a(eU,"removeTempListeners");function Ab(e){let t=Zu.statSync(e,{throwIfNoEntry:!1});if(t){if(t.isDirectory())return"d";if(t.isFile())return"-";{let r=new Error(`Bad path: ${e}: target must be a file or directory`);throw r.code=gk.badPath,r}}else return!1}a(Ab,"localExists");function bb(e,t="r"){let r=Zu.constants.F_OK|t==="w"?Zu.constants.W_OK:Zu.constants.R_OK;try{return Zu.accessSync(e,r),{status:!0,type:Ab(e),details:"access OK",code:0}}catch(i){switch(i.errno){case-2:return{status:!1,type:null,details:"not exist",code:-2};case-13:return{status:!1,type:Ab(e),details:"permission denied",code:-13};case-20:return{status:!1,type:null,details:"parent not a directory"};default:return{status:!1,type:null,details:i.message}}}}a(bb,"haveLocalAccess");function tU(e){let{status:t,details:r,type:i}=bb(e,"w");if(!t&&r==="permission denied")return{status:t,details:r,type:i};if(!t){let n=Yz.dirname(e),o=bb(n,"w");return o.status&&o.type!=="d"?{status:!1,details:`${n}: not a directory`,type:null}:o.status?{status:!0,details:"access OK",type:null,code:0}:{status:o.status,details:`${n}: ${o.details}`,type:null}}return{status:t,details:r,type:i}}a(tU,"haveLocalCreate");async function rU(e,t){try{return t.startsWith("..")?`${await e.realPath("..")}/${t.slice(3)}`:t.startsWith(".")?`${await e.realPath(".")}/${t.slice(2)}`:t}catch(r){throw new Error(`normalizeRemotePath: ${r.message}`)}}a(rU,"normalizeRemotePath");function nU(e,t,r){if(!e.sftp){let i=new Error(`${t}: No SFTP connection available`);if(i.code=gk.connect,r)return r(i),!1;throw i}return!0}a(nU,"haveConnection");function iU(e){return new Promise((t,r)=>{try{isNaN(e)||e<0?r("Argument must be anumber >= 0"):setTimeout(()=>{t(!0)},e)}catch(i){r(i)}})}a(iU,"sleep");Ek.exports={globalListener:Xz,errorListener:mk,endListener:_k,closeListener:yk,addTempListeners:Jz,removeTempListeners:eU,haveLocalAccess:bb,haveLocalCreate:tU,normalizeRemotePath:rU,localExists:Ab,haveConnection:nU,sleep:iU}});var Sk=me(($G,Ik)=>{"use strict";var{Client:oU}=UP(),Yp=require("fs"),sU=rk(),aU=pk(),{join:Qu,parse:cU}=require("path"),{globalListener:xb,addTempListeners:Yt,removeTempListeners:Xt,haveConnection:wr,normalizeRemotePath:Gu,localExists:bk,haveLocalAccess:xk,haveLocalCreate:Ib}=Ak(),{errorCode:qt}=Eb(),Sb=class{static{a(this,"SftpClient")}constructor(t){this.version="9.0.4",this.client=new oU,this.sftp=void 0,this.clientName=t||"sftp",this.endCalled=!1,this.errorHandled=!1,this.closeHandled=!1,this.endHandled=!1,this.remotePlatform="unix",this.debug=void 0,this.client.on("close",xb(this,"close")),this.client.on("end",xb(this,"end")),this.client.on("error",xb(this,"error"))}debugMsg(t,r){this.debug&&(r?this.debug(`CLIENT[${this.clientName}]: ${t} ${JSON.stringify(r,null," ")}`):this.debug(`CLIENT[${this.clientName}]: ${t}`))}fmtError(t,r="sftp",i,n){let o="",s="",c=n?` after ${n} ${n>1?"attempts":"attempt"}`:"";if(t===void 0)o=`${r}: Undefined error - probably a bug!`,s=qt.generic;else if(typeof t=="string")o=`${r}: ${t}${c}`,s=i||qt.generic;else if(t.custom)o=`${r}->${t.message}${c}`,s=t.code;else{switch(t.code){case"ENOTFOUND":o=`${r}: Address lookup failed for host${c}`;break;case"ECONNREFUSED":o=`${r}: Remote host refused connection${c}`;break;case"ECONNRESET":o=`${r}: Remote host has reset the connection: ${t.message}${c}`;break;default:o=`${r}: ${t.message}${c}`}s=t.code?t.code:qt.generic}let u=new Error(o);return u.code=s,u.custom=!0,this.debugMsg(`${u.message} (${u.code})`),u}on(t,r){this.client.prependListener(t,r)}removeListener(t,r){this.client.removeListener(t,r)}_resetEventFlags(){this.closeHandled=!1,this.endHandled=!1,this.errorHandled=!1}getConnection(t){let r,i;return new Promise((n,o)=>{i=Yt(this,"getConnection",o),r=a(()=>{this.debugMsg("getConnection ready listener: got connection - promise resolved"),n(!0)},"doReady"),this.on("ready",r);try{this.client.connect(t)}catch(s){this.debugMsg(`getConnection: ${s.message}`),o(s)}}).finally(()=>{this.removeListener("ready",r),Xt(this,i,"getConnection")})}getSftpChannel(){return new Promise((t,r)=>{this.client.sftp((i,n)=>{i?r(this.fmtError(i,"getSftpChannel",i.code)):(this.sftp=n,t(n))})})}async connect(t){let r;try{if(r=Yt(this,"connect"),t.debug&&(this.debug=t.debug,this.debugMsg("connect: Debugging turned on"),this.debugMsg(`ssh2-sftp-client Version: ${this.version} `,process.versions)),this.sftp)throw this.fmtError("An existing SFTP connection is already defined","connect",qt.connect);let i={retries:t.retries??1,factor:t.factor??2,minTimeout:t.retry_minTimeout??25e3};return await aU(i,async(o,s)=>{try{this.debugMsg(`connect: Connect attempt ${s}`),await this.getConnection(t)}catch(c){switch(c.code){case"ENOTFOUND":case"ECONNREFUSED":case"ERR_SOCKET_BAD_PORT":throw c;case void 0:{if(c.message.endsWith("All configured authentication methods failed")||c.message.startsWith("Cannot parse privateKey"))throw c;o(c);break}default:o(c)}}}),await this.getSftpChannel()}catch(i){throw this.end(),i.custom?i:this.fmtError(i,"connect")}finally{Xt(this,r,"connect")}}realPath(t,r=!0){let i;return new Promise((n,o)=>{r&&(i=Yt(this,"realPath",o)),this.debugMsg(`realPath -> ${t}`),this.sftp.realpath(t,(s,c)=>{s&&(s.code===2?(this.debugMsg('realPath <- ""'),n("")):(this.debugMsg(`${s.message} ${t}`,"realPath"),o(this.fmtError(`${s.message} ${t}`,"realPath",s.code)))),this.debugMsg(`realPath <- ${c}`),n(c)})}).finally(()=>{r&&Xt(this,i,"realPath")})}cwd(){return this.realPath(".")}_xstat(t,r,i=!0){let n;return new Promise((o,s)=>{let c=a((u,l)=>{if(u)u.code===2||u.code===4?s(this.fmtError(`No such file: ${r}`,"_xstat",qt.notexist)):s(this.fmtError(`${u.message} ${r}`,"_xstat",u.code));else{let f={mode:l.mode,uid:l.uid,gid:l.gid,size:l.size,accessTime:l.atime*1e3,modifyTime:l.mtime*1e3,isDirectory:l.isDirectory(),isFile:l.isFile(),isBlockDevice:l.isBlockDevice(),isCharacterDevice:l.isCharacterDevice(),isSymbolicLink:l.isSymbolicLink(),isFIFO:l.isFIFO(),isSocket:l.isSocket()};this.debugMsg("_xstat: result = ",f),o(f)}},"cb");i&&(n=Yt(this,"_xstat",s)),t==="stat"?this.sftp.stat(r,c):this.sftp.lstat(r,c)}).finally(()=>{i&&Xt(this,n,"_xstat")})}async stat(t){try{return wr(this,"stat"),await this._xstat("stat",t)}catch(r){throw r.custom?r:this.fmtError(r,"stat",r.code)}}async lstat(t){try{return wr(this,"lstat"),await this._xstat("lstat",t)}catch(r){throw r.custom?r:this.fmtError(r,"lstat",r.code)}}async exists(t){this.debugMsg(`exists: remotePath = ${t}`);try{if(t===".")return"d";let r=await this.lstat(t);return this.debugMsg("exists: <- ",r),r.isDirectory?"d":r.isSymbolicLink?"l":r.isFile?"-":!1}catch(r){if(r.code===qt.notexist)return!1;throw r.custom?r:this.fmtError(r.message,"exists",r.code)}}list(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Yt(this,"list",s)),wr(this,"list",s)&&this.sftp.readdir(t,(c,u)=>{if(c)s(this.fmtError(`${c.message} ${t}`,"list",c.code));else{let l=/-/gi,f=u.map(p=>({type:p.longname.slice(0,1),name:p.filename,size:p.attrs.size,modifyTime:p.attrs.mtime*1e3,accessTime:p.attrs.atime*1e3,rights:{user:p.longname.slice(1,4).replace(l,""),group:p.longname.slice(4,7).replace(l,""),other:p.longname.slice(7,10).replace(l,"")},owner:p.attrs.uid,group:p.attrs.gid,longname:p.longname}));o(r?f.filter(p=>r(p)):f)}})}).finally(()=>{i&&Xt(this,n,"list")})}get(t,r,i,n=!0){let o,s,c;return new Promise((u,l)=>{if(n&&(o=Yt(this,"get",l)),wr(this,"get",l)){if(i={readStreamOptions:{...i?.readStreamOptions,autoClose:!0},writeStreamOptions:{...i?.writeStreamOptions,autoClose:!0},pipeOptions:{...i?.pipeOptions,end:!0}},s=this.sftp.createReadStream(t,i.readStreamOptions),s.once("error",f=>{r&&typeof r!="string"&&!r.destroyed&&r.destroy(),l(this.fmtError(`${f.message} ${t}`,"get",f.code))}),r===void 0)this.debugMsg("get resolving buffer of data"),c=sU(f=>{u(f)});else if(typeof r=="string"){this.debugMsg("get returning local file");let f=Ib(r);if(f.status)c=Yp.createWriteStream(r,i.writeStreamOptions);else{l(this.fmtError(`Bad path: ${r}: ${f.details}`,"get",f.code));return}}else this.debugMsg("get: returning data into supplied stream"),c=r;c.once("error",f=>{l(this.fmtError(`${f.message} ${typeof r=="string"?r:"<stream>"}`,"get",f.code))}),s.once("end",()=>{typeof r=="string"?(this.debugMsg("get: resolving with dst filename"),u(r)):r!==void 0&&(this.debugMsg("get: resolving with writer stream object"),u(c))}),s.pipe(c,i.pipeOptions)}}).finally(()=>{n&&Xt(this,o,"get")})}_fastGet(t,r,i,n=!0){let o;return new Promise((s,c)=>{n&&(o=Yt(this,"_fastGet",c)),wr(this,"_fastGet",c)&&this.sftp.fastGet(t,r,i,u=>{u&&c(this.fmtError(`${u.message} Remote: ${t} Local: ${r}`)),s(`${t} was successfully download to ${r}!`)})}).finally(()=>{n&&Xt(this,o,"_fastGet")})}async fastGet(t,r,i){try{let n=await this.exists(t);if(n!=="-"){let s=`${n?"Not a regular file":"No such file "} ${t}`;throw this.fmtError(s,"fastGet",qt.badPath)}let o=Ib(r);if(!o.status)throw this.fmtError(`Bad path: ${r}: ${o.details}`,"fastGet",qt.badPath);return await this._fastGet(t,r,i)}catch(n){throw this.fmtError(n,"fastGet")}}_fastPut(t,r,i,n=!0){let o;return new Promise((s,c)=>{n&&(o=Yt(this,"_fastPut",c)),wr(this,"_fastPut",c)&&this.sftp.fastPut(t,r,i,u=>{u&&c(this.fmtError(`${u.message} Local: ${t} Remote: ${r}`,"fastPut",u.code)),s(`${t} was successfully uploaded to ${r}!`)})}).finally(()=>{n&&Xt(this,o,"_fastPut")})}async fastPut(t,r,i){try{this.debugMsg(`fastPut -> local ${t} remote ${r}`);let n=xk(t);if(n.status){if(n.status&&bk(t)==="d")throw this.fmtError(`Bad path: ${t} not a regular file`,"fastgPut",qt.badPath)}else throw this.fmtError(`Bad path: ${t}: ${n.details}`,"fastPut",n.code);return await this._fastPut(t,r,i)}catch(n){throw n.custom?n:this.fmtError(n.message,"fastPut",n.code)}}_put(t,r,i,n=!0){let o,s,c;return new Promise((u,l)=>{n&&(o=Yt(this,"_put",l)),i={readStreamOptions:{...i?.readStreamOptions,autoClose:!0},writeStreamOptions:{...i?.writeStreamOptions,autoClose:!0},pipeOptions:{...i?.pipeOptions,end:!0}},wr(this,"_put",l)&&(s=this.sftp.createWriteStream(r,i.writeStreamOptions),s.once("error",f=>{l(this.fmtError(`Write stream error: ${f.message} ${r}`,"_put",f.code))}),s.once("close",()=>{u(`Uploaded data stream to ${r}`)}),t instanceof Buffer?(this.debugMsg("put source is a buffer"),s.end(t)):(c=typeof t=="string"?Yp.createReadStream(t,i.readStreamOptions):t,c.once("error",f=>{l(this.fmtError(`Read stream error: ${f.message} ${typeof t=="string"?t:"<stream>"}`,"_put",f.code))}),c.pipe(s,i.pipeOptions)))}).finally(()=>{n&&Xt(this,o,"_put")})}async put(t,r,i){try{if(typeof t=="string"){let n=xk(t);if(!n.status)throw this.fmtError(`Bad path: ${t} ${n.details}`,"put",n.code)}return await this._put(t,r,i)}catch(n){throw n.custom?n:this.fmtError(`Re-thrown: ${n.message}`,"put",n.code)}}_append(t,r,i,n=!0){let o;return new Promise((s,c)=>{if(n&&(o=Yt(this,"_append",c)),wr(this,"_append",c)){this.debugMsg(`append -> remote: ${r} `,i),i.flags="a";let u=this.sftp.createWriteStream(r,i);u.on("error",l=>{c(this.fmtError(`${l.message} ${r}`,"append",l.code))}),u.on("close",()=>{s(`Appended data to ${r}`)}),t instanceof Buffer?(u.write(t),u.end()):t.pipe(u)}}).finally(()=>{n&&Xt(this,o,"_append")})}async append(t,r,i={}){try{if(typeof t=="string")throw this.fmtError("Cannot append one file to another","append",qt.badPath);let n=await this.exists(r);if(n&&n==="d")throw this.fmtError(`Bad path: ${r}: cannot append to a directory`,"append",qt.badPath);await this._append(t,r,i)}catch(n){throw n.custom?n:this.fmtError(n.message,"append",n.code)}}_doMkdir(t,r=!0){let i;return new Promise((n,o)=>{r&&(i=Yt(this,"_doMkdir",o)),this.sftp.mkdir(t,s=>{s?s.code===4?o(this.fmtError(`Bad path: ${t} permission denied`,"_doMkdir",qt.badPath)):s.code===2?o(this.fmtError(`Bad path: ${t} parent not a directory or not exist`,"_doMkdir",qt.badPath)):o(this.fmtError(`${s.message} ${t}`,"_doMkdir",s.code)):n(`${t} directory created`)})}).finally(()=>{r&&Xt(this,i,"_doMkdir")})}async _mkdir(t,r){try{let i=await Gu(this,t),n=await this.exists(i);if(n&&n!=="d")throw this.fmtError(`Bad path: ${i} already exists as a file`,"_mkdir",qt.badPath);if(n)return`${i} already exists`;if(!r)return await this._doMkdir(i);let o=cU(i).dir;if(o){let s=await this.exists(o);if(!s)await this._mkdir(o,!0);else if(s!=="d")throw this.fmtError(`Bad path: ${o} not a directory`,"_mkdir",qt.badPath)}return await this._doMkdir(i)}catch(i){throw i.custom?i:this.fmtError(`${i.message} ${t}`,"_mkdir",i.code)}}async mkdir(t,r=!1){try{return wr(this,"mkdir"),await this._mkdir(t,r)}catch(i){throw this.fmtError(`${i.message}`,"mkdir",i.code)}}async rmdir(t,r=!1){let i=a(o=>{let s;return new Promise((c,u)=>{s=Yt(this,"_rmdir",u),this.debugMsg(`_rmdir: dir = ${o}`),this.sftp.rmdir(o,l=>{l&&u(this.fmtError(`${l.message} ${o}`,"rmdir",l.code)),c("Successfully removed directory")})}).finally(()=>{Xt(this,s,"_rmdir")})},"_rmdir"),n=a((o,s)=>{let c;return new Promise((u,l)=>{c=Yt(this,"_delFiles",l),this.debugMsg(`_delFiles: path = ${o} fileList = ${s}`);let f=[];for(let p of s)f.push(this.delete(`${o}/${p.name}`,!0,!1));u(f)}).then(u=>Promise.all(u)).finally(()=>{Xt(this,c,"_delFiles")})},"_delFiles");try{this.debugMsg(`rmdir: dir = ${t} recursive = ${r}`);let o=await Gu(this,t),s=await this.exists(o);if(this.debugMsg(`rmdir: ${o} existStatus = ${s}`),!s)throw this.fmtError(`Bad Path: ${t}: No such directory`,"rmdir",qt.badPath);if(s!=="d")throw this.fmtError(`Bad Path: ${t}: Not a directory`,"rmdir",qt.badPath);if(!r)return this.debugMsg("rmdir: non-recursive - just try to remove it"),await i(o);let c=await this.list(o);if(this.debugMsg(`rmdir: listing count = ${c.length}`),!c.length)return this.debugMsg("rmdir: No sub dir or files, just rmdir"),await i(o);let u=c.filter(f=>f.type!=="d");this.debugMsg(`rmdir: dir content files to remove = ${u.length}`);let l=c.filter(f=>f.type==="d");this.debugMsg(`rmdir: sub-directories to remove = ${l.length}`),await n(o,u);for(let f of l)await this.rmdir(`${o}/${f.name}`,!0);return await i(o),"Successfully removed directory"}catch(o){throw o.custom?o:this.fmtError(`${o.message} ${t}`,"rmdir",o.code)}}delete(t,r=!1,i=!0){let n;return new Promise((o,s)=>{i&&(n=Yt(this,"delete",s)),this.sftp.unlink(t,c=>{c&&(r&&c.code===2?o(`Successfully deleted ${t}`):s(this.fmtError(`${c.message} ${t}`,"delete",c.code))),o(`Successfully deleted ${t}`)})}).finally(()=>{i&&Xt(this,n,"delete")})}rename(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Yt(this,"rename",s)),wr(this,"rename",s)&&this.sftp.rename(t,r,c=>{c&&s(this.fmtError(`${c.message} From: ${t} To: ${r}`,"_rename",c.code)),o(`Successfully renamed ${t} to ${r}`)})}).finally(()=>{i&&Xt(this,n,"rename")})}posixRename(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Yt(this,"posixRename",s)),wr(this,"posixRename",s)&&this.sftp.ext_openssh_rename(t,r,c=>{c&&s(this.fmtError(`${c.message} From: ${t} To: ${r}`,"_posixRename",c.code)),o(`Successful POSIX rename ${t} to ${r}`)})}).finally(()=>{Xt(this,n,"posixRename")})}chmod(t,r,i=!0){let n;return new Promise((o,s)=>{i&&(n=Yt(this,"chmod",s)),wr(this,"chmod",s)&&this.sftp.chmod(t,r,c=>{c&&s(this.fmtError(`${c.message} ${t}`,"_chmod",c.code)),o("Successfully change file mode")})}).finally(()=>{i&&Xt(this,n,"chmod")})}async uploadDir(t,r,i){let n=a(async c=>{let u=await Gu(this,c),l=await this.exists(u);if(l&&l!=="d")throw this.fmtError(`Bad path ${u} Not a directory`,"getRemoteStatus",qt.badPath);return{remoteDir:u,remoteStatus:l}},"getRemoteStatus"),o=a(c=>{let u=bk(c);if(!u)throw this.fmtError(`Bad path: ${c} not exist`,"getLocalStatus",qt.badPath);if(u!=="d")throw this.fmtError(`Bad path: ${c}: not a directory`,"getLocalStatus",qt.badPath);return u},"checkLocalStatus"),s=a((c,u,l,f)=>{let p;return new Promise((g,h)=>{p=Yt(this,"uploadFiles",h);let _=[];for(let y of l){let b=Qu(c,y.name),S=`${u}/${y.name}`;y.isFile()?(f?_.push(this._fastPut(b,S,null,!1)):_.push(this._put(b,S,null,!1)),this.client.emit("upload",{source:b,destination:S})):this.debugMsg(`uploadFiles: File ignored: ${y.name} not a regular file`)}g(Promise.all(_))}).then(g=>Promise.all(g)).finally(()=>{Xt(this,p,s)})},"uploadFiles");try{wr(this,"uploadDir"),this.debugMsg(`uploadDir: srcDir = ${t} dstDir = ${r} options = ${i}`);let{remoteDir:c,remoteStatus:u}=await n(r);this.debugMsg(`uploadDir: remoteDir = ${c} remoteStatus = ${u}`),o(t),u||await this._mkdir(c,!0);let l=Yp.readdirSync(t,{encoding:"utf8",withFileTypes:!0});this.debugMsg(`uploadDir: dirEntries = ${l}`),i?.filter&&(l=l.filter(g=>i.filter(Qu(t,g.name),g.isDirectory())));let f=l.filter(g=>g.isDirectory()),p=l.filter(g=>!g.isDirectory());this.debugMsg(`uploadDir: dirUploads = ${f}`),this.debugMsg(`uploadDir: fileUploads = ${p}`),await s(t,c,p,i?.useFastput);for(let g of f){let h=Qu(t,g.name),_=`${c}/${g.name}`;await this.uploadDir(h,_,i)}return`${t} uploaded to ${r}`}catch(c){throw c.custom?c:this.fmtError(`${c.message} ${t}`,"uploadDir",c.code)}}async downloadDir(t,r,i={filter:null,useFastget:!1}){let n=a(async(c,u)=>{try{let l=await this.list(c);return u?l.filter(f=>u(`${c}/${f.name}`,f.type==="d")):l}catch(l){throw l.custom?l:this.fmtError(l.message,"_getDownloadList",l.code)}},"_getDownloadList"),o=a(c=>{try{let u=Ib(c);if(!u.status&&u.details==="permission denied")throw this.fmtError(`Bad path: ${c}: ${u.details}`,"prepareDestination",u.code);if(u.status&&!u.type)Yp.mkdirSync(c,{recursive:!0});else if(u.status&&u.type!=="d")throw this.fmtError(`Bad path: ${r}: not a directory`,"_prepareDestination",qt.badPath)}catch(u){throw u.custom?u:this.fmtError(u.message,"_prepareDestination",u.code)}},"_prepareDestination"),s=a((c,u,l,f)=>{let p;return new Promise((g,h)=>{p=Yt(this,"_downloadFIles",h);let _=[];for(let y of l){let b=`${c}/${y.name}`,S=Qu(u,y.name);f?_.push(this.fastGet(b,S,!1)):_.push(this.get(b,S,!1)),this.client.emit("download",{source:b,destination:S})}return g(Promise.all(_))}).finally(()=>{Xt(this,p,"_downloadFiles")})},"_downloadFiles");try{wr(this,"downloadDir");let c=await n(t,i.filter);o(r);let u=c.filter(f=>f.type!=="d");u.length&&await s(t,r,u,i.useFastget);let l=c.filter(f=>f.type==="d");for(let f of l){let p=`${t}/${f.name}`,g=Qu(r,f.name);await this.downloadDir(p,g)}return`${t} downloaded to ${r}`}catch(c){throw c.custom?c:this.fmtError(`${c.message}: ${t}`,"downloadDir",c.code)}}createReadStream(t,r){let i;try{return i=Yt(this,"createReadStream"),wr(this,"createReadStream"),this.sftp.createReadStream(t,r)}catch(n){throw n.custom?n:this.fmtError(n.message,"createReadStream",n.code)}finally{Xt(this,i,"createReadStreame")}}createWriteStream(t,r){let i;try{return i=Yt(this,"createWriteStream"),wr(this,"createWriteStream"),this.sftp.createWriteStream(t,r)}catch(n){throw n.custom?n:this.fmtError(n.message,"createWriteStream",n.code)}finally{Xt(this,i,"createWriteStream")}}_rcopy(t,r){return new Promise((i,n)=>{let o=this.sftp.createWriteStream(r),s=this.sftp.createReadStream(t);o.on("error",c=>{n(this.fmtError(`${c.message} ${r}`,"_rcopy"))}),s.on("error",c=>{n(this.fmtError(`${c.message} ${t}`,"_rcopy"))}),o.on("close",()=>{i(`${t} copied to ${r}`)}),s.pipe(o)})}async rcopy(t,r){let i;try{i=Yt(this,"rcopy"),wr(this,"rcopy");let n=await Gu(this,t),o=await this.exists(n);if(!o)throw this.fmtError(`Source does not exist ${n}`,"rcopy",qt.badPath);if(o!=="-")throw this.fmtError(`Source not a file ${n}`,"rcopy",qt.badPath);let s=await Gu(this,r);if(await this.exists(s))throw this.fmtError(`Destination already exists ${s}`,"rcopy",qt.badPath);return this._rcopy(n,s)}catch(n){throw n.custom?n:this.fmtError(n,"rcopy")}finally{Xt(this,i,"rcopy")}}end(){let t,r;return new Promise((i,n)=>{r=Yt(this,"end",n),this.endCalled=!0,t=a(()=>{this.sftp=void 0,this.debugMsg("end: Connection closed"),i(!0)},"endCloseHandler"),this.on("close",t),this.sftp?this.client.end():(this.debugMsg("end: Called when no connection active"),i(!0))}).finally(()=>{Xt(this,r,"end"),this.removeListener("close",t),this.endCalled=!1})}};Ik.exports=Sb});var qk=me((wb,Pb)=>{(function(e,t){typeof wb=="object"&&typeof Pb<"u"?Pb.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(wb,(function(){"use strict";var e=1e3,t=6e4,r=36e5,i="millisecond",n="second",o="minute",s="hour",c="day",u="week",l="month",f="quarter",p="year",g="date",h="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(U){var k=["th","st","nd","rd"],j=U%100;return"["+U+(k[(j-20)%10]||k[j]||k[0])+"]"},"ordinal")},S=a(function(U,k,j){var W=String(U);return!W||W.length>=k?U:""+Array(k+1-W.length).join(j)+U},"m"),v={s:S,z:a(function(U){var k=-U.utcOffset(),j=Math.abs(k),W=Math.floor(j/60),L=j%60;return(k<=0?"+":"-")+S(W,2,"0")+":"+S(L,2,"0")},"z"),m:a(function U(k,j){if(k.date()<j.date())return-U(j,k);var W=12*(j.year()-k.year())+(j.month()-k.month()),L=k.clone().add(W,l),X=j-L<0,ne=k.clone().add(W+(X?-1:1),l);return+(-(W+(j-L)/(X?L-ne:ne-L))||0)},"t"),a:a(function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},"a"),p:a(function(U){return{M:l,y:p,w:u,d:c,D:g,h:s,m:o,s:n,ms:i,Q:f}[U]||String(U||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(U){return U===void 0},"u")},M="en",R={};R[M]=b;var J=a(function(U){return U instanceof C},"p"),te=a(function U(k,j,W){var L;if(!k)return M;if(typeof k=="string"){var X=k.toLowerCase();R[X]&&(L=X),j&&(R[X]=j,L=X);var ne=k.split("-");if(!L&&ne.length>1)return U(ne[0])}else{var O=k.name;R[O]=k,L=O}return!W&&L&&(M=L),L||!W&&M},"t"),ee=a(function(U,k){if(J(U))return U.clone();var j=typeof k=="object"?k:{};return j.date=U,j.args=arguments,new C(j)},"w"),P=v;P.l=te,P.i=J,P.w=function(U,k){return ee(U,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var C=(function(){function U(j){this.$L=te(j.locale,null,!0),this.parse(j)}a(U,"M");var k=U.prototype;return k.parse=function(j){this.$d=(function(W){var L=W.date,X=W.utc;if(L===null)return new Date(NaN);if(P.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var ne=L.match(_);if(ne){var O=ne[2]-1||0,q=(ne[7]||"0").substring(0,3);return X?new Date(Date.UTC(ne[1],O,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,q)):new Date(ne[1],O,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,q)}}return new Date(L)})(j),this.$x=j.x||{},this.init()},k.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},k.$utils=function(){return P},k.isValid=function(){return this.$d.toString()!==h},k.isSame=function(j,W){var L=ee(j);return this.startOf(W)<=L&&L<=this.endOf(W)},k.isAfter=function(j,W){return ee(j)<this.startOf(W)},k.isBefore=function(j,W){return this.endOf(W)<ee(j)},k.$g=function(j,W,L){return P.u(j)?this[W]:this.set(L,j)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(j,W){var L=this,X=!!P.u(W)||W,ne=P.p(j),O=a(function(Ft,ur){var Dr=P.w(L.$u?Date.UTC(L.$y,ur,Ft):new Date(L.$y,ur,Ft),L);return X?Dr:Dr.endOf(c)},"l"),q=a(function(Ft,ur){return P.w(L.toDate()[Ft].apply(L.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(ur)),L)},"$"),V=this.$W,re=this.$M,_e=this.$D,Se="set"+(this.$u?"UTC":"");switch(ne){case p:return X?O(1,0):O(31,11);case l:return X?O(1,re):O(0,re+1);case u:var xe=this.$locale().weekStart||0,Tt=(V<xe?V+7:V)-xe;return O(X?_e-Tt:_e+(6-Tt),re);case c:case g:return q(Se+"Hours",0);case s:return q(Se+"Minutes",1);case o:return q(Se+"Seconds",2);case n:return q(Se+"Milliseconds",3);default:return this.clone()}},k.endOf=function(j){return this.startOf(j,!1)},k.$set=function(j,W){var L,X=P.p(j),ne="set"+(this.$u?"UTC":""),O=(L={},L[c]=ne+"Date",L[g]=ne+"Date",L[l]=ne+"Month",L[p]=ne+"FullYear",L[s]=ne+"Hours",L[o]=ne+"Minutes",L[n]=ne+"Seconds",L[i]=ne+"Milliseconds",L)[X],q=X===c?this.$D+(W-this.$W):W;if(X===l||X===p){var V=this.clone().set(g,1);V.$d[O](q),V.init(),this.$d=V.set(g,Math.min(this.$D,V.daysInMonth())).$d}else O&&this.$d[O](q);return this.init(),this},k.set=function(j,W){return this.clone().$set(j,W)},k.get=function(j){return this[P.p(j)]()},k.add=function(j,W){var L,X=this;j=Number(j);var ne=P.p(W),O=a(function(re){var _e=ee(X);return P.w(_e.date(_e.date()+Math.round(re*j)),X)},"y");if(ne===l)return this.set(l,this.$M+j);if(ne===p)return this.set(p,this.$y+j);if(ne===c)return O(1);if(ne===u)return O(7);var q=(L={},L[o]=t,L[s]=r,L[n]=e,L)[ne]||1,V=this.$d.getTime()+j*q;return P.w(V,this)},k.subtract=function(j,W){return this.add(-1*j,W)},k.format=function(j){var W=this,L=this.$locale();if(!this.isValid())return L.invalidDate||h;var X=j||"YYYY-MM-DDTHH:mm:ssZ",ne=P.z(this),O=this.$H,q=this.$m,V=this.$M,re=L.weekdays,_e=L.months,Se=L.meridiem,xe=a(function(ur,Dr,sn,Hr){return ur&&(ur[Dr]||ur(W,X))||sn[Dr].slice(0,Hr)},"h"),Tt=a(function(ur){return P.s(O%12||12,ur,"0")},"d"),Ft=Se||function(ur,Dr,sn){var Hr=ur<12?"AM":"PM";return sn?Hr.toLowerCase():Hr};return X.replace(y,(function(ur,Dr){return Dr||(function(sn){switch(sn){case"YY":return String(W.$y).slice(-2);case"YYYY":return P.s(W.$y,4,"0");case"M":return V+1;case"MM":return P.s(V+1,2,"0");case"MMM":return xe(L.monthsShort,V,_e,3);case"MMMM":return xe(_e,V);case"D":return W.$D;case"DD":return P.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return xe(L.weekdaysMin,W.$W,re,2);case"ddd":return xe(L.weekdaysShort,W.$W,re,3);case"dddd":return re[W.$W];case"H":return String(O);case"HH":return P.s(O,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return Ft(O,q,!0);case"A":return Ft(O,q,!1);case"m":return String(q);case"mm":return P.s(q,2,"0");case"s":return String(W.$s);case"ss":return P.s(W.$s,2,"0");case"SSS":return P.s(W.$ms,3,"0");case"Z":return ne}return null})(ur)||ne.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(j,W,L){var X,ne=this,O=P.p(W),q=ee(j),V=(q.utcOffset()-this.utcOffset())*t,re=this-q,_e=a(function(){return P.m(ne,q)},"D");switch(O){case p:X=_e()/12;break;case l:X=_e();break;case f:X=_e()/3;break;case u:X=(re-V)/6048e5;break;case c:X=(re-V)/864e5;break;case s:X=re/r;break;case o:X=re/t;break;case n:X=re/e;break;default:X=re}return L?X:P.a(X)},k.daysInMonth=function(){return this.endOf(l).$D},k.$locale=function(){return R[this.$L]},k.locale=function(j,W){if(!j)return this.$L;var L=this.clone(),X=te(j,W,!0);return X&&(L.$L=X),L},k.clone=function(){return P.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},U})(),H=C.prototype;return ee.prototype=H,[["$ms",i],["$s",n],["$m",o],["$H",s],["$W",c],["$M",l],["$y",p],["$D",g]].forEach((function(U){H[U[1]]=function(k){return this.$g(k,U[0],U[1])}})),ee.extend=function(U,k){return U.$i||(U(k,C,ee),U.$i=!0),ee},ee.locale=te,ee.isDayjs=J,ee.unix=function(U){return ee(1e3*U)},ee.en=R[M],ee.Ls=R,ee.p={},ee}))});var NU={};cn(NU,{endClient:()=>sr,ftpSftp:()=>OU,getClient:()=>Jt,getProtocolBackwardCompatibility:()=>Vt});module.exports=fC(NU);var en={};cn(en,{$ZodAny:()=>Aa,$ZodArray:()=>Sa,$ZodAsyncError:()=>En,$ZodBase64:()=>Ll,$ZodBase64URL:()=>zl,$ZodBigInt:()=>Xo,$ZodBigIntFormat:()=>Hl,$ZodBoolean:()=>Qi,$ZodCIDRv4:()=>Dl,$ZodCIDRv6:()=>Bl,$ZodCUID:()=>Pl,$ZodCUID2:()=>Tl,$ZodCatch:()=>of,$ZodCheck:()=>$t,$ZodCheckBigIntFormat:()=>Hh,$ZodCheckEndsWith:()=>eg,$ZodCheckGreaterThan:()=>ml,$ZodCheckIncludes:()=>Xh,$ZodCheckLengthEquals:()=>Qh,$ZodCheckLessThan:()=>gl,$ZodCheckLowerCase:()=>Kh,$ZodCheckMaxLength:()=>Vh,$ZodCheckMaxSize:()=>jh,$ZodCheckMimeType:()=>rg,$ZodCheckMinLength:()=>Zh,$ZodCheckMinSize:()=>Wh,$ZodCheckMultipleOf:()=>Mh,$ZodCheckNumberFormat:()=>Fh,$ZodCheckOverwrite:()=>ng,$ZodCheckProperty:()=>tg,$ZodCheckRegex:()=>Gh,$ZodCheckSizeEquals:()=>qh,$ZodCheckStartsWith:()=>Jh,$ZodCheckStringFormat:()=>Ko,$ZodCheckUpperCase:()=>Yh,$ZodCodec:()=>es,$ZodCustom:()=>Na,$ZodCustomStringFormat:()=>Fl,$ZodDate:()=>Ia,$ZodDefault:()=>ef,$ZodDiscriminatedUnion:()=>va,$ZodE164:()=>Ul,$ZodEmail:()=>Sl,$ZodEmoji:()=>vl,$ZodEncodeError:()=>oi,$ZodEnum:()=>Ta,$ZodError:()=>la,$ZodExactOptional:()=>Jl,$ZodFile:()=>Xl,$ZodFunction:()=>uf,$ZodGUID:()=>xl,$ZodIPv4:()=>Ol,$ZodIPv6:()=>Nl,$ZodISODate:()=>ma,$ZodISODateTime:()=>ga,$ZodISODuration:()=>ya,$ZodISOTime:()=>_a,$ZodIntersection:()=>Gl,$ZodJWT:()=>Ml,$ZodKSUID:()=>Rl,$ZodLazy:()=>ff,$ZodLiteral:()=>ka,$ZodMAC:()=>$l,$ZodMap:()=>Kl,$ZodNaN:()=>sf,$ZodNanoID:()=>wl,$ZodNever:()=>Vl,$ZodNonOptional:()=>rf,$ZodNull:()=>ql,$ZodNullable:()=>Ra,$ZodNumber:()=>Yo,$ZodNumberFormat:()=>Ea,$ZodObject:()=>Zl,$ZodObjectJIT:()=>ag,$ZodOptional:()=>Jo,$ZodPipe:()=>Oa,$ZodPrefault:()=>tf,$ZodPromise:()=>lf,$ZodReadonly:()=>af,$ZodRealError:()=>Wr,$ZodRecord:()=>Pa,$ZodRegistry:()=>df,$ZodSet:()=>Yl,$ZodString:()=>Fn,$ZodStringFormat:()=>Ct,$ZodSuccess:()=>nf,$ZodSymbol:()=>jl,$ZodTemplateLiteral:()=>cf,$ZodTransform:()=>Ca,$ZodTuple:()=>wa,$ZodType:()=>We,$ZodULID:()=>kl,$ZodURL:()=>ha,$ZodUUID:()=>Il,$ZodUndefined:()=>Wl,$ZodUnion:()=>Gi,$ZodUnknown:()=>ba,$ZodVoid:()=>xa,$ZodXID:()=>Cl,$ZodXor:()=>Ql,$brand:()=>na,$constructor:()=>T,$input:()=>hf,$output:()=>pf,Doc:()=>pa,JSONSchema:()=>vx,JSONSchemaGenerator:()=>zf,NEVER:()=>Ju,TimePrecision:()=>mf,_any:()=>_c,_array:()=>em,_base64:()=>nc,_base64url:()=>ic,_bigint:()=>bf,_boolean:()=>hc,_catch:()=>_R,_check:()=>Sx,_cidrv4:()=>tc,_cidrv6:()=>rc,_coercedBigint:()=>mc,_coercedBoolean:()=>gc,_coercedDate:()=>Ac,_coercedNumber:()=>dc,_coercedString:()=>Ma,_cuid:()=>Qa,_cuid2:()=>Ga,_custom:()=>wc,_date:()=>Tf,_decode:()=>sl,_decodeAsync:()=>cl,_default:()=>hR,_discriminatedUnion:()=>rR,_e164:()=>oc,_email:()=>Fa,_emoji:()=>Va,_encode:()=>ol,_encodeAsync:()=>al,_endsWith:()=>to,_enum:()=>cR,_file:()=>Cf,_float32:()=>_f,_float64:()=>yf,_gt:()=>bn,_gte:()=>mr,_guid:()=>ns,_includes:()=>Ji,_int:()=>pc,_int32:()=>Ef,_int64:()=>xf,_intersection:()=>nR,_ipv4:()=>Ja,_ipv6:()=>ec,_isoDate:()=>cc,_isoDateTime:()=>ac,_isoDuration:()=>lc,_isoTime:()=>uc,_jwt:()=>sc,_ksuid:()=>Xa,_lazy:()=>bR,_length:()=>di,_literal:()=>lR,_lowercase:()=>Yi,_lt:()=>An,_lte:()=>Br,_mac:()=>gf,_map:()=>sR,_max:()=>Br,_maxLength:()=>fi,_maxSize:()=>jn,_mime:()=>ro,_min:()=>mr,_minLength:()=>cr,_minSize:()=>xn,_multipleOf:()=>Hn,_nan:()=>kf,_nanoid:()=>Za,_nativeEnum:()=>uR,_negative:()=>xc,_never:()=>Pf,_nonnegative:()=>Sc,_nonoptional:()=>gR,_nonpositive:()=>Ic,_normalize:()=>no,_null:()=>wf,_nullable:()=>pR,_number:()=>fc,_optional:()=>dR,_overwrite:()=>ln,_parse:()=>Wo,_parseAsync:()=>qo,_pipe:()=>yR,_positive:()=>bc,_promise:()=>xR,_property:()=>vc,_readonly:()=>ER,_record:()=>oR,_refine:()=>Pc,_regex:()=>Ir,_safeDecode:()=>ll,_safeDecodeAsync:()=>dl,_safeEncode:()=>ul,_safeEncodeAsync:()=>fl,_safeParse:()=>Vo,_safeParseAsync:()=>Qo,_set:()=>aR,_size:()=>li,_slugify:()=>is,_startsWith:()=>eo,_string:()=>Ua,_stringFormat:()=>ao,_stringbool:()=>$f,_success:()=>mR,_superRefine:()=>Rf,_symbol:()=>Sf,_templateLiteral:()=>AR,_toLowerCase:()=>oo,_toUpperCase:()=>so,_transform:()=>fR,_trim:()=>io,_tuple:()=>iR,_uint32:()=>Af,_uint64:()=>If,_ulid:()=>Ka,_undefined:()=>vf,_union:()=>eR,_unknown:()=>yc,_uppercase:()=>Xi,_url:()=>Ki,_uuid:()=>Ha,_uuidv4:()=>ja,_uuidv6:()=>Wa,_uuidv7:()=>qa,_void:()=>Ec,_xid:()=>Ya,_xor:()=>tR,clone:()=>yr,config:()=>Qt,createStandardJSONSchemaMethod:()=>os,createToJSONSchemaMethod:()=>tm,decode:()=>qb,decodeAsync:()=>Zb,describe:()=>Of,encode:()=>Wb,encodeAsync:()=>Vb,extractDefs:()=>hi,finalize:()=>gi,flattenError:()=>Ho,formatError:()=>jo,globalConfig:()=>ra,globalRegistry:()=>Er,initializeContext:()=>pi,isValidBase64:()=>sg,isValidBase64URL:()=>gx,isValidJWT:()=>mx,locales:()=>rs,meta:()=>Nf,parse:()=>qi,parseAsync:()=>Vi,prettifyError:()=>il,process:()=>Rt,regexes:()=>qr,registry:()=>za,safeDecode:()=>Gb,safeDecodeAsync:()=>Yb,safeEncode:()=>Qb,safeEncodeAsync:()=>Kb,safeParse:()=>Zo,safeParseAsync:()=>Go,toDotPath:()=>jb,toJSONSchema:()=>Tc,treeifyError:()=>nl,util:()=>fe,version:()=>ig});var Ju=Object.freeze({status:"aborted"});function T(e,t,r){function i(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,f=Object.keys(l);for(let p=0;p<f.length;p++){let g=f[p];g in c||(c[g]=l[g].bind(c))}}a(i,"init");let n=r?.Parent??Object;class o extends n{static{a(this,"Definition")}}Object.defineProperty(o,"name",{value:e});function s(c){var u;let l=r?.Parent?new o:this;i(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let f of l._zod.deferred)f();return l}return a(s,"_"),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a(c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(T,"$constructor");var na=Symbol("zod_brand"),En=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},oi=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ra={};function Qt(e){return e&&Object.assign(ra,e),ra}a(Qt,"config");var fe={};cn(fe,{BIGINT_FORMAT_RANGES:()=>fh,Class:()=>ih,NUMBER_FORMAT_RANGES:()=>lh,aborted:()=>ui,allowsEval:()=>ah,assert:()=>mC,assertEqual:()=>dC,assertIs:()=>hC,assertNever:()=>gC,assertNotEqual:()=>pC,assignProp:()=>ai,base64ToUint8Array:()=>Mb,base64urlToUint8Array:()=>PC,cached:()=>Mo,captureStackTrace:()=>tl,cleanEnum:()=>wC,cleanRegex:()=>sa,clone:()=>yr,cloneDef:()=>yC,createTransparentProxy:()=>SC,defineLazy:()=>ot,esc:()=>el,escapeRegex:()=>un,extend:()=>Bb,finalizeIssue:()=>jr,floatSafeRemainder:()=>oh,getElementAtPath:()=>EC,getEnumValues:()=>oa,getLengthableOrigin:()=>ua,getParsedType:()=>IC,getSizableOrigin:()=>ca,hexToUint8Array:()=>kC,isObject:()=>Wi,isPlainObject:()=>ci,issue:()=>Fo,joinValues:()=>Q,jsonStringifyReplacer:()=>Uo,merge:()=>vC,mergeDefs:()=>Mn,normalizeParams:()=>ue,nullish:()=>si,numKeys:()=>xC,objectClone:()=>_C,omit:()=>Db,optionalKeys:()=>uh,parsedType:()=>pe,partial:()=>zb,pick:()=>$b,prefixIssues:()=>Jr,primitiveTypes:()=>ch,promiseAllObject:()=>AC,propertyKeyTypes:()=>aa,randomString:()=>bC,required:()=>Ub,safeExtend:()=>Lb,shallowClone:()=>rl,slugify:()=>sh,stringifyPrimitive:()=>le,uint8ArrayToBase64:()=>Fb,uint8ArrayToBase64url:()=>TC,uint8ArrayToHex:()=>CC,unwrapMessage:()=>ia});function dC(e){return e}a(dC,"assertEqual");function pC(e){return e}a(pC,"assertNotEqual");function hC(e){}a(hC,"assertIs");function gC(e){throw new Error("Unexpected value in exhaustive check")}a(gC,"assertNever");function mC(e){}a(mC,"assert");function oa(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}a(oa,"getEnumValues");function Q(e,t="|"){return e.map(r=>le(r)).join(t)}a(Q,"joinValues");function Uo(e,t){return typeof t=="bigint"?t.toString():t}a(Uo,"jsonStringifyReplacer");function Mo(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}a(Mo,"cached");function si(e){return e==null}a(si,"nullish");function sa(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}a(sa,"cleanRegex");function oh(e,t){let r=(e.toString().split(".")[1]||"").length,i=t.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let u=i.match(/\d?e-(\d?)/);u?.[1]&&(n=Number.parseInt(u[1]))}let o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),c=Number.parseInt(t.toFixed(o).replace(".",""));return s%c/10**o}a(oh,"floatSafeRemainder");var Nb=Symbol("evaluating");function ot(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Nb)return i===void 0&&(i=Nb,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}a(ot,"defineLazy");function _C(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(_C,"objectClone");function ai(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}a(ai,"assignProp");function Mn(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}a(Mn,"mergeDefs");function yC(e){return Mn(e._zod.def)}a(yC,"cloneDef");function EC(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}a(EC,"getElementAtPath");function AC(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}a(AC,"promiseAllObject");function bC(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}a(bC,"randomString");function el(e){return JSON.stringify(e)}a(el,"esc");function sh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(sh,"slugify");var tl="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Wi,"isObject");var ah=Mo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ci(e){if(Wi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Wi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}a(ci,"isPlainObject");function rl(e){return ci(e)?{...e}:Array.isArray(e)?[...e]:e}a(rl,"shallowClone");function xC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}a(xC,"numKeys");var IC=a(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),aa=new Set(["string","number","symbol"]),ch=new Set(["string","number","bigint","boolean","symbol","undefined"]);function un(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(un,"escapeRegex");function yr(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}a(yr,"clone");function ue(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(ue,"normalizeParams");function SC(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}a(SC,"createTransparentProxy");function le(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(le,"stringifyPrimitive");function uh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(uh,"optionalKeys");var lh={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},fh={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function $b(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Mn(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return ai(this,"shape",s),s},checks:[]});return yr(e,o)}a($b,"pick");function Db(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Mn(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return ai(this,"shape",s),s},checks:[]});return yr(e,o)}a(Db,"omit");function Bb(e,t){if(!ci(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Mn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return ai(this,"shape",o),o}});return yr(e,n)}a(Bb,"extend");function Lb(e,t){if(!ci(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Mn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return ai(this,"shape",i),i}});return yr(e,r)}a(Lb,"safeExtend");function vC(e,t){let r=Mn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return ai(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return yr(e,r)}a(vC,"merge");function zb(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Mn(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return ai(this,"shape",u),u},checks:[]});return yr(t,s)}a(zb,"partial");function Ub(e,t,r){let i=Mn(t._zod.def,{get shape(){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new e({type:"nonoptional",innerType:n[s]});return ai(this,"shape",o),o}});return yr(t,i)}a(Ub,"required");function ui(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}a(ui,"aborted");function Jr(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}a(Jr,"prefixIssues");function ia(e){return typeof e=="string"?e:e?.message}a(ia,"unwrapMessage");function jr(e,t,r){let i={...e,path:e.path??[]};if(!e.message){let n=ia(e.inst?._zod.def?.error?.(e))??ia(t?.error?.(e))??ia(r.customError?.(e))??ia(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}a(jr,"finalizeIssue");function ca(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(ca,"getSizableOrigin");function ua(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(ua,"getLengthableOrigin");function pe(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}a(pe,"parsedType");function Fo(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}a(Fo,"issue");function wC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(wC,"cleanEnum");function Mb(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}a(Mb,"base64ToUint8Array");function Fb(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}a(Fb,"uint8ArrayToBase64");function PC(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Mb(t+r)}a(PC,"base64urlToUint8Array");function TC(e){return Fb(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(TC,"uint8ArrayToBase64url");function kC(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}a(kC,"hexToUint8Array");function CC(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(CC,"uint8ArrayToHex");var ih=class{static{a(this,"Class")}constructor(...t){}};var Hb=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Uo,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),la=T("$ZodError",Hb),Wr=T("$ZodError",Hb,{Parent:Error});function Ho(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}a(Ho,"flattenError");function jo(e,t=r=>r.message){let r={_errors:[]},i=a(n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let s=r,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(t(o))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}},"processError");return i(e),r}a(jo,"formatError");function nl(e,t=r=>r.message){let r={errors:[]},i=a((n,o=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{let l=[...o,...u.path];if(l.length===0){r.errors.push(t(u));continue}let f=r,p=0;for(;p<l.length;){let g=l[p],h=p===l.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(c=f.items)[g]??(c[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(u)),p++}}},"processError");return i(e),r}a(nl,"treeifyError");function jb(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}a(jb,"toDotPath");function il(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${jb(i.path)}`);return t.join(`
24
+ `)}a(il,"prettifyError");var Wo=a(e=>(t,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new En;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>jr(u,o,Qt())));throw tl(c,n?.callee),c}return s.value},"_parse"),qi=Wo(Wr),qo=a(e=>async(t,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>jr(u,o,Qt())));throw tl(c,n?.callee),c}return s.value},"_parseAsync"),Vi=qo(Wr),Vo=a(e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new En;return o.issues.length?{success:!1,error:new(e??la)(o.issues.map(s=>jr(s,n,Qt())))}:{success:!0,data:o.value}},"_safeParse"),Zo=Vo(Wr),Qo=a(e=>async(t,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>jr(s,n,Qt())))}:{success:!0,data:o.value}},"_safeParseAsync"),Go=Qo(Wr),ol=a(e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Wo(e)(t,r,n)},"_encode"),Wb=ol(Wr),sl=a(e=>(t,r,i)=>Wo(e)(t,r,i),"_decode"),qb=sl(Wr),al=a(e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return qo(e)(t,r,n)},"_encodeAsync"),Vb=al(Wr),cl=a(e=>async(t,r,i)=>qo(e)(t,r,i),"_decodeAsync"),Zb=cl(Wr),ul=a(e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Vo(e)(t,r,n)},"_safeEncode"),Qb=ul(Wr),ll=a(e=>(t,r,i)=>Vo(e)(t,r,i),"_safeDecode"),Gb=ll(Wr),fl=a(e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Qo(e)(t,r,n)},"_safeEncodeAsync"),Kb=fl(Wr),dl=a(e=>async(t,r,i)=>Qo(e)(t,r,i),"_safeDecodeAsync"),Yb=dl(Wr);var qr={};cn(qr,{base64:()=>Ph,base64url:()=>pl,bigint:()=>Nh,boolean:()=>Dh,browserEmail:()=>UC,cidrv4:()=>vh,cidrv6:()=>wh,cuid:()=>dh,cuid2:()=>ph,date:()=>kh,datetime:()=>Rh,domain:()=>HC,duration:()=>yh,e164:()=>Th,email:()=>Ah,emoji:()=>bh,extendedDuration:()=>OC,guid:()=>Eh,hex:()=>jC,hostname:()=>FC,html5Email:()=>BC,idnEmail:()=>zC,integer:()=>$h,ipv4:()=>xh,ipv6:()=>Ih,ksuid:()=>mh,lowercase:()=>zh,mac:()=>Sh,md5_base64:()=>qC,md5_base64url:()=>VC,md5_hex:()=>WC,nanoid:()=>_h,null:()=>Bh,number:()=>hl,rfc5322Email:()=>LC,sha1_base64:()=>QC,sha1_base64url:()=>GC,sha1_hex:()=>ZC,sha256_base64:()=>YC,sha256_base64url:()=>XC,sha256_hex:()=>KC,sha384_base64:()=>e1,sha384_base64url:()=>t1,sha384_hex:()=>JC,sha512_base64:()=>n1,sha512_base64url:()=>i1,sha512_hex:()=>r1,string:()=>Oh,time:()=>Ch,ulid:()=>hh,undefined:()=>Lh,unicodeEmail:()=>Xb,uppercase:()=>Uh,uuid:()=>Zi,uuid4:()=>NC,uuid6:()=>$C,uuid7:()=>DC,xid:()=>gh});var dh=/^[cC][^\s-]{8,}$/,ph=/^[0-9a-z]+$/,hh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gh=/^[0-9a-vA-V]{20}$/,mh=/^[A-Za-z0-9]{27}$/,_h=/^[a-zA-Z0-9_-]{21}$/,yh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Eh=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zi=a(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),NC=Zi(4),$C=Zi(6),DC=Zi(7),Ah=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,BC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,LC=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Xb=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,zC=Xb,UC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,MC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bh(){return new RegExp(MC,"u")}a(bh,"emoji");var xh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ih=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Sh=a(e=>{let t=un(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),vh=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,wh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ph=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pl=/^[A-Za-z0-9_-]*$/,FC=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,HC=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Th=/^\+[1-9]\d{6,14}$/,Jb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",kh=new RegExp(`^${Jb}$`);function ex(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}a(ex,"timeSource");function Ch(e){return new RegExp(`^${ex(e)}$`)}a(Ch,"time");function Rh(e){let t=ex({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Jb}T(?:${i})$`)}a(Rh,"datetime");var Oh=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Nh=/^-?\d+n?$/,$h=/^-?\d+$/,hl=/^-?\d+(?:\.\d+)?$/,Dh=/^(?:true|false)$/i,Bh=/^null$/i;var Lh=/^undefined$/i;var zh=/^[^A-Z]*$/,Uh=/^[^a-z]*$/,jC=/^[0-9a-fA-F]*$/;function fa(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(fa,"fixedBase64");function da(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(da,"fixedBase64url");var WC=/^[0-9a-fA-F]{32}$/,qC=fa(22,"=="),VC=da(22),ZC=/^[0-9a-fA-F]{40}$/,QC=fa(27,"="),GC=da(27),KC=/^[0-9a-fA-F]{64}$/,YC=fa(43,"="),XC=da(43),JC=/^[0-9a-fA-F]{96}$/,e1=fa(64,""),t1=da(64),r1=/^[0-9a-fA-F]{128}$/,n1=fa(86,"=="),i1=da(86);var $t=T("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rx={number:"number",bigint:"bigint",object:"date"},gl=T("$ZodCheckLessThan",(e,t)=>{$t.init(e,t);let r=rx[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ml=T("$ZodCheckGreaterThan",(e,t)=>{$t.init(e,t);let r=rx[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Mh=T("$ZodCheckMultipleOf",(e,t)=>{$t.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):oh(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Fh=T("$ZodCheckNumberFormat",(e,t)=>{$t.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=lh[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=o,r&&(c.pattern=$h)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>o&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Hh=T("$ZodCheckBigIntFormat",(e,t)=>{$t.init(e,t);let[r,i]=fh[t.format];e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),jh=T("$ZodCheckMaxSize",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:ca(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Wh=T("$ZodCheckMinSize",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:ca(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),qh=T("$ZodCheckSizeEquals",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let s=o>t.size;i.issues.push({origin:ca(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Vh=T("$ZodCheckMaxLength",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let s=ua(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Zh=T("$ZodCheckMinLength",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let s=ua(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Qh=T("$ZodCheckLengthEquals",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!si(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{let n=i.value,o=n.length;if(o===t.length)return;let s=ua(n),c=o>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ko=T("$ZodCheckStringFormat",(e,t)=>{var r,i;$t.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Gh=T("$ZodCheckRegex",(e,t)=>{Ko.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Kh=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=zh),Ko.init(e,t)}),Yh=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Uh),Ko.init(e,t)}),Xh=T("$ZodCheckIncludes",(e,t)=>{$t.init(e,t);let r=un(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Jh=T("$ZodCheckStartsWith",(e,t)=>{$t.init(e,t);let r=new RegExp(`^${un(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),eg=T("$ZodCheckEndsWith",(e,t)=>{$t.init(e,t);let r=new RegExp(`.*${un(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function tx(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues))}a(tx,"handleCheckPropertyResult");var tg=T("$ZodCheckProperty",(e,t)=>{$t.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>tx(n,r,t.property));tx(i,r,t.property)}}),rg=T("$ZodCheckMimeType",(e,t)=>{$t.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),ng=T("$ZodCheckOverwrite",(e,t)=>{$t.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var pa=class{static{a(this,"Doc")}constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
25
25
  `).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
26
- `))}};var rg={major:4,minor:3,patch:6};var We=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rg;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let n of i)for(let o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=a((s,c,u)=>{let l=ui(s),f;for(let p of c){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=p._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new En;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=ui(s,g)))});else{if(s.issues.length===g)continue;l||(l=ui(s,g))}}return f?f.then(()=>s):s},"runChecks"),o=a((s,c,u)=>{if(ui(s))return s.aborted=!0,s;let l=n(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new En;return l.then(f=>e._zod.parse(f,u))}return e._zod.parse(l,u)},"handleCanaryResult");e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(f=>o(f,s,c)):o(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new En;return u.then(l=>n(l,i,c))}return n(u,i,c)}}ot(e,"~standard",()=>({validate:a(n=>{try{let o=Vo(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Qo(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Fn=T("$ZodString",(e,t)=>{We.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ch(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ct=T("$ZodStringFormat",(e,t)=>{Ko.init(e,t),Fn.init(e,t)}),bl=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_h),Ct.init(e,t)}),xl=T("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zi(i))}else t.pattern??(t.pattern=Zi());Ct.init(e,t)}),Il=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=yh),Ct.init(e,t)}),ha=T("$ZodURL",(e,t)=>{Ct.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),vl=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Eh()),Ct.init(e,t)}),Sl=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=gh),Ct.init(e,t)}),wl=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=lh),Ct.init(e,t)}),Pl=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=fh),Ct.init(e,t)}),Tl=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dh),Ct.init(e,t)}),kl=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ph),Ct.init(e,t)}),Cl=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hh),Ct.init(e,t)}),ga=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=kh(t)),Ct.init(e,t)}),ma=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ph),Ct.init(e,t)}),_a=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Th(t)),Ct.init(e,t)}),ya=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=mh),Ct.init(e,t)}),Rl=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ah),Ct.init(e,t),e._zod.bag.format="ipv4"}),Ol=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bh),Ct.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Nl=T("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=xh(t.delimiter)),Ct.init(e,t),e._zod.bag.format="mac"}),$l=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ih),Ct.init(e,t)}),Dl=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vh),Ct.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ig(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(ig,"isValidBase64");var Bl=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Sh),Ct.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ig(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ux(e){if(!dl.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ig(r)}a(ux,"isValidBase64URL");var zl=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=dl),Ct.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{ux(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ll=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wh),Ct.init(e,t)});function lx(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}a(lx,"isValidJWT");var Ul=T("$ZodJWT",(e,t)=>{Ct.init(e,t),e._zod.check=r=>{lx(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ml=T("$ZodCustomStringFormat",(e,t)=>{Ct.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Go=T("$ZodNumber",(e,t)=>{We.init(e,t),e._zod.pattern=e._zod.bag.pattern??pl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Ea=T("$ZodNumberFormat",(e,t)=>{Uh.init(e,t),Go.init(e,t)}),Qi=T("$ZodBoolean",(e,t)=>{We.init(e,t),e._zod.pattern=Nh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Yo=T("$ZodBigInt",(e,t)=>{We.init(e,t),e._zod.pattern=Rh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Fl=T("$ZodBigIntFormat",(e,t)=>{Mh.init(e,t),Yo.init(e,t)}),Hl=T("$ZodSymbol",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),jl=T("$ZodUndefined",(e,t)=>{We.init(e,t),e._zod.pattern=Dh,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Wl=T("$ZodNull",(e,t)=>{We.init(e,t),e._zod.pattern=$h,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Aa=T("$ZodAny",(e,t)=>{We.init(e,t),e._zod.parse=r=>r}),ba=T("$ZodUnknown",(e,t)=>{We.init(e,t),e._zod.parse=r=>r}),ql=T("$ZodNever",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),xa=T("$ZodVoid",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Ia=T("$ZodDate",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Xb(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues)),t.value[r]=e.value}a(Xb,"handleArrayResult");var va=T("$ZodArray",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},i);u instanceof Promise?o.push(u.then(l=>Xb(l,r,s))):Xb(u,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function Al(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Jr(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}a(Al,"handlePropertyResult");function fx(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=ah(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}a(fx,"normalizeDef");function dx(e,t,r,i,n,o){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,f=u.optout==="optional";for(let p in t){if(c.has(p))continue;if(l==="never"){s.push(p);continue}let g=u.run({value:t[p],issues:[]},i);g instanceof Promise?e.push(g.then(h=>Al(h,r,p,t,f))):Al(g,r,p,t,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}a(dx,"handleCatchall");var Vl=T("$ZodObject",(e,t)=>{if(We.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u},"get")})}let i=Uo(()=>fx(t));ot(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let f=c[l]._zod;if(f.values){u[l]??(u[l]=new Set);for(let p of f.values)u[l].add(p)}}return u});let n=Wi,o=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=i.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let f=[],p=s.shape;for(let g of s.keys){let h=p[g],_=h._zod.optout==="optional",y=h._zod.run({value:l[g],issues:[]},u);y instanceof Promise?f.push(y.then(b=>Al(b,c,g,l,_))):Al(y,c,g,l,_)}return o?dx(f,l,c,u,i.value,e):f.length?Promise.all(f).then(()=>c):c}}),og=T("$ZodObjectJIT",(e,t)=>{Vl.init(e,t);let r=e._zod.parse,i=Uo(()=>fx(t)),n=a(g=>{let h=new pa(["shape","payload","ctx"]),_=i.value,y=a(M=>{let R=Ju(M);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`},"parseStr");h.write("const input = payload.value;");let b=Object.create(null),v=0;for(let M of _.keys)b[M]=`key_${v++}`;h.write("const newResult = {};");for(let M of _.keys){let R=b[M],J=Ju(M),ee=g[M]?._zod?.optout==="optional";h.write(`const ${R} = ${y(M)};`),ee?h.write(`
26
+ `))}};var ig={major:4,minor:3,patch:6};var We=T("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ig;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let n of i)for(let o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=a((s,c,u)=>{let l=ui(s),f;for(let p of c){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=p._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new En;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=ui(s,g)))});else{if(s.issues.length===g)continue;l||(l=ui(s,g))}}return f?f.then(()=>s):s},"runChecks"),o=a((s,c,u)=>{if(ui(s))return s.aborted=!0,s;let l=n(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new En;return l.then(f=>e._zod.parse(f,u))}return e._zod.parse(l,u)},"handleCanaryResult");e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(f=>o(f,s,c)):o(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new En;return u.then(l=>n(l,i,c))}return n(u,i,c)}}ot(e,"~standard",()=>({validate:a(n=>{try{let o=Zo(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Go(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Fn=T("$ZodString",(e,t)=>{We.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Oh(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ct=T("$ZodStringFormat",(e,t)=>{Ko.init(e,t),Fn.init(e,t)}),xl=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Eh),Ct.init(e,t)}),Il=T("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zi(i))}else t.pattern??(t.pattern=Zi());Ct.init(e,t)}),Sl=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ah),Ct.init(e,t)}),ha=T("$ZodURL",(e,t)=>{Ct.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),vl=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=bh()),Ct.init(e,t)}),wl=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=_h),Ct.init(e,t)}),Pl=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=dh),Ct.init(e,t)}),Tl=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ph),Ct.init(e,t)}),kl=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=hh),Ct.init(e,t)}),Cl=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=gh),Ct.init(e,t)}),Rl=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=mh),Ct.init(e,t)}),ga=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Rh(t)),Ct.init(e,t)}),ma=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=kh),Ct.init(e,t)}),_a=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ch(t)),Ct.init(e,t)}),ya=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=yh),Ct.init(e,t)}),Ol=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=xh),Ct.init(e,t),e._zod.bag.format="ipv4"}),Nl=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ih),Ct.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),$l=T("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Sh(t.delimiter)),Ct.init(e,t),e._zod.bag.format="mac"}),Dl=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=vh),Ct.init(e,t)}),Bl=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wh),Ct.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function sg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(sg,"isValidBase64");var Ll=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ph),Ct.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{sg(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function gx(e){if(!pl.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return sg(r)}a(gx,"isValidBase64URL");var zl=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=pl),Ct.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{gx(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ul=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Th),Ct.init(e,t)});function mx(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}a(mx,"isValidJWT");var Ml=T("$ZodJWT",(e,t)=>{Ct.init(e,t),e._zod.check=r=>{mx(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Fl=T("$ZodCustomStringFormat",(e,t)=>{Ct.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Yo=T("$ZodNumber",(e,t)=>{We.init(e,t),e._zod.pattern=e._zod.bag.pattern??hl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Ea=T("$ZodNumberFormat",(e,t)=>{Fh.init(e,t),Yo.init(e,t)}),Qi=T("$ZodBoolean",(e,t)=>{We.init(e,t),e._zod.pattern=Dh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Xo=T("$ZodBigInt",(e,t)=>{We.init(e,t),e._zod.pattern=Nh,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Hl=T("$ZodBigIntFormat",(e,t)=>{Hh.init(e,t),Xo.init(e,t)}),jl=T("$ZodSymbol",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Wl=T("$ZodUndefined",(e,t)=>{We.init(e,t),e._zod.pattern=Lh,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),ql=T("$ZodNull",(e,t)=>{We.init(e,t),e._zod.pattern=Bh,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Aa=T("$ZodAny",(e,t)=>{We.init(e,t),e._zod.parse=r=>r}),ba=T("$ZodUnknown",(e,t)=>{We.init(e,t),e._zod.parse=r=>r}),Vl=T("$ZodNever",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),xa=T("$ZodVoid",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Ia=T("$ZodDate",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function ix(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues)),t.value[r]=e.value}a(ix,"handleArrayResult");var Sa=T("$ZodArray",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},i);u instanceof Promise?o.push(u.then(l=>ix(l,r,s))):ix(u,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function bl(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Jr(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}a(bl,"handlePropertyResult");function _x(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=uh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}a(_x,"normalizeDef");function yx(e,t,r,i,n,o){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,f=u.optout==="optional";for(let p in t){if(c.has(p))continue;if(l==="never"){s.push(p);continue}let g=u.run({value:t[p],issues:[]},i);g instanceof Promise?e.push(g.then(h=>bl(h,r,p,t,f))):bl(g,r,p,t,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}a(yx,"handleCatchall");var Zl=T("$ZodObject",(e,t)=>{if(We.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u},"get")})}let i=Mo(()=>_x(t));ot(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let f=c[l]._zod;if(f.values){u[l]??(u[l]=new Set);for(let p of f.values)u[l].add(p)}}return u});let n=Wi,o=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=i.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let f=[],p=s.shape;for(let g of s.keys){let h=p[g],_=h._zod.optout==="optional",y=h._zod.run({value:l[g],issues:[]},u);y instanceof Promise?f.push(y.then(b=>bl(b,c,g,l,_))):bl(y,c,g,l,_)}return o?yx(f,l,c,u,i.value,e):f.length?Promise.all(f).then(()=>c):c}}),ag=T("$ZodObjectJIT",(e,t)=>{Zl.init(e,t);let r=e._zod.parse,i=Mo(()=>_x(t)),n=a(g=>{let h=new pa(["shape","payload","ctx"]),_=i.value,y=a(M=>{let R=el(M);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`},"parseStr");h.write("const input = payload.value;");let b=Object.create(null),S=0;for(let M of _.keys)b[M]=`key_${S++}`;h.write("const newResult = {};");for(let M of _.keys){let R=b[M],J=el(M),ee=g[M]?._zod?.optout==="optional";h.write(`const ${R} = ${y(M)};`),ee?h.write(`
27
27
  if (${R}.issues.length) {
28
28
  if (${J} in input) {
29
29
  payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
@@ -57,9 +57,9 @@ ${r}`}};var ZD=2**32,Sw=(()=>{try{return new Function("return 2n ** 32n")()}catc
57
57
  newResult[${J}] = ${R}.value;
58
58
  }
59
59
 
60
- `)}h.write("payload.value = newResult;"),h.write("return payload;");let S=h.compile();return(M,R)=>S(g,M,R)},"generateFastpass"),o,s=Wi,c=!ra.jitless,l=c&&oh.value,f=t.catchall,p;e._zod.parse=(g,h)=>{p??(p=i.value);let _=g.value;return s(_)?c&&l&&h?.async===!1&&h.jitless!==!0?(o||(o=n(t.shape)),g=o(g,h),f?dx([],_,g,h,p,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),g)}});function Jb(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!ui(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>jr(s,i,Zt())))}),t)}a(Jb,"handleUnionResults");var Ki=T("$ZodUnion",(e,t)=>{We.init(e,t),ot(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ot(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ot(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),ot(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>sa(o.source)).join("|")})$`)}});let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,c=[];for(let u of t.options){let l=u._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)c.push(l),s=!0;else{if(l.issues.length===0)return l;c.push(l)}}return s?Promise.all(c).then(u=>Jb(u,n,e,o)):Jb(c,n,e,o)}});function ex(e,t,r,i){let n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>jr(s,i,Zt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}a(ex,"handleExclusiveUnionResults");var Zl=T("$ZodXor",(e,t)=>{Ki.init(e,t),t.inclusive=!1;let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,c=[];for(let u of t.options){let l=u._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(c.push(l),s=!0):c.push(l)}return s?Promise.all(c).then(u=>ex(u,n,e,o)):ex(c,n,e,o)}}),Sa=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ki.init(e,t);let r=e._zod.parse;ot(e._zod,"propValues",()=>{let n={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let i=Uo(()=>{let n=t.options,o=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});e._zod.parse=(n,o)=>{let s=n.value;if(!Wi(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=i.value.get(s?.[t.discriminator]);return c?c._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)}}),Ql=T("$ZodIntersection",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,l])=>tx(r,u,l)):tx(r,o,s)}});function ng(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ci(e)&&ci(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(let o of i){let s=ng(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],s=ng(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}a(ng,"mergeValues");function tx(e,t,r){let i=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(c);let o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&n&&e.issues.push({...n,keys:o}),ui(e))return e;let s=ng(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}a(tx,"handleIntersectionResults");var wa=T("$ZodTuple",(e,t)=>{We.init(e,t);let r=t.items;e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],c=[...r].reverse().findIndex(f=>f._zod.optin!=="optional"),u=c===-1?0:r.length-c;if(!t.rest){let f=o.length>r.length,p=o.length<u-1;if(f||p)return i.issues.push({...f?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let l=-1;for(let f of r){if(l++,l>=o.length&&l>=u)continue;let p=f._zod.run({value:o[l],issues:[]},n);p instanceof Promise?s.push(p.then(g=>ml(g,i,l))):ml(p,i,l)}if(t.rest){let f=o.slice(r.length);for(let p of f){l++;let g=t.rest._zod.run({value:p,issues:[]},n);g instanceof Promise?s.push(g.then(h=>ml(h,i,l))):ml(g,i,l)}}return s.length?Promise.all(s).then(()=>i):i}});function ml(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues)),t.value[r]=e.value}a(ml,"handleTupleResult");var Pa=T("$ZodRecord",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!ci(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let f=t.valueType._zod.run({value:n[l],issues:[]},i);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&r.issues.push(...Jr(l,p.issues)),r.value[l]=p.value})):(f.issues.length&&r.issues.push(...Jr(l,f.issues)),r.value[l]=f.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&pl.test(c)&&u.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>jr(p,i,Zt())),input:c,path:[c],inst:e});continue}let f=t.valueType._zod.run({value:n[c],issues:[]},i);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&r.issues.push(...Jr(c,p.issues)),r.value[u.value]=p.value})):(f.issues.length&&r.issues.push(...Jr(c,f.issues)),r.value[u.value]=f.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Kl=T("$ZodMap",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let o=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},i),l=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([f,p])=>{rx(f,p,r,s,n,e,i)})):rx(u,l,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function rx(e,t,r,i,n,o,s){e.issues.length&&(aa.has(typeof i)?r.issues.push(...Jr(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(c=>jr(c,s,Zt()))})),t.issues.length&&(aa.has(typeof i)?r.issues.push(...Jr(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(c=>jr(c,s,Zt()))})),r.value.set(e.value,t.value)}a(rx,"handleMapResult");var Gl=T("$ZodSet",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>nx(u,r))):nx(c,r)}return o.length?Promise.all(o).then(()=>r):r}});function nx(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a(nx,"handleSetResult");var Ta=T("$ZodEnum",(e,t)=>{We.init(e,t);let r=oa(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>aa.has(typeof n)).map(n=>typeof n=="string"?un(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),ka=T("$ZodLiteral",(e,t)=>{if(We.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?un(i):i?un(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Yl=T("$ZodFile",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Ca=T("$ZodTransform",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new oi(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new En;return r.value=n,r}});function ix(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(ix,"handleOptionalResult");var Xo=T("$ZodOptional",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ot(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sa(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>ix(o,r.value)):ix(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Xl=T("$ZodExactOptional",(e,t)=>{Xo.init(e,t),ot(e._zod,"values",()=>t.innerType._zod.values),ot(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Ra=T("$ZodNullable",(e,t)=>{We.init(e,t),ot(e._zod,"optin",()=>t.innerType._zod.optin),ot(e._zod,"optout",()=>t.innerType._zod.optout),ot(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sa(r.source)}|null)$`):void 0}),ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Jl=T("$ZodDefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>ox(o,t)):ox(n,t)}});function ox(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(ox,"handleDefaultResult");var ef=T("$ZodPrefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),tf=T("$ZodNonOptional",(e,t)=>{We.init(e,t),ot(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>sx(o,e)):sx(n,e)}});function sx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}a(sx,"handleNonOptionalResult");var rf=T("$ZodSuccess",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new oi("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),nf=T("$ZodCatch",(e,t)=>{We.init(e,t),ot(e._zod,"optin",()=>t.innerType._zod.optin),ot(e._zod,"optout",()=>t.innerType._zod.optout),ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>jr(s,i,Zt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>jr(o,i,Zt()))},input:r.value}),r.issues=[]),r)}}),of=T("$ZodNaN",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Oa=T("$ZodPipe",(e,t)=>{We.init(e,t),ot(e._zod,"values",()=>t.in._zod.values),ot(e._zod,"optin",()=>t.in._zod.optin),ot(e._zod,"optout",()=>t.out._zod.optout),ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>_l(s,t.in,i)):_l(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>_l(o,t.out,i)):_l(n,t.out,i)}});function _l(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}a(_l,"handlePipeResult");var Jo=T("$ZodCodec",(e,t)=>{We.init(e,t),ot(e._zod,"values",()=>t.in._zod.values),ot(e._zod,"optin",()=>t.in._zod.optin),ot(e._zod,"optout",()=>t.out._zod.optout),ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(s=>yl(s,t,i)):yl(o,t,i)}else{let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>yl(s,t,i)):yl(o,t,i)}}});function yl(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>El(e,o,t.out,r)):El(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>El(e,o,t.in,r)):El(e,n,t.in,r)}}a(yl,"handleCodecAResult");function El(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}a(El,"handleCodecTxResult");var sf=T("$ZodReadonly",(e,t)=>{We.init(e,t),ot(e._zod,"propValues",()=>t.innerType._zod.propValues),ot(e._zod,"values",()=>t.innerType._zod.values),ot(e._zod,"optin",()=>t.innerType?._zod?.optin),ot(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(ax):ax(n)}});function ax(e){return e.value=Object.freeze(e.value),e}a(ax,"handleReadonlyResult");var af=T("$ZodTemplateLiteral",(e,t)=>{We.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||sh.has(typeof i))r.push(un(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),cf=T("$ZodFunction",(e,t)=>(We.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=e._def.input?qi(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?qi(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=e._def.input?await Vi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await Vi(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new wa({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),uf=T("$ZodPromise",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),lf=T("$ZodLazy",(e,t)=>{We.init(e,t),ot(e._zod,"innerType",()=>t.getter()),ot(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ot(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ot(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ot(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Na=T("$ZodCustom",(e,t)=>{$t.init(e,t),We.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>cx(o,r,i,e));cx(n,r,i,e)}});function cx(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Mo(n))}}a(cx,"handleRefineResult");var ts={};cn(ts,{ar:()=>sg,az:()=>ag,be:()=>cg,bg:()=>ug,ca:()=>lg,cs:()=>fg,da:()=>dg,de:()=>pg,en:()=>$a,eo:()=>hg,es:()=>gg,fa:()=>mg,fi:()=>_g,fr:()=>yg,frCA:()=>Eg,he:()=>Ag,hu:()=>bg,hy:()=>xg,id:()=>Ig,is:()=>vg,it:()=>Sg,ja:()=>wg,ka:()=>Pg,kh:()=>Tg,km:()=>Da,ko:()=>kg,lt:()=>Cg,mk:()=>Rg,ms:()=>Og,nl:()=>Ng,no:()=>$g,ota:()=>Dg,pl:()=>zg,ps:()=>Bg,pt:()=>Lg,ru:()=>Ug,sl:()=>Mg,sv:()=>Fg,ta:()=>Hg,th:()=>jg,tr:()=>Wg,ua:()=>qg,uk:()=>za,ur:()=>Vg,uz:()=>Zg,vi:()=>Qg,yo:()=>Yg,zhCN:()=>Kg,zhTW:()=>Gg});var KC=a(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${le(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${Q(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function sg(){return{localeError:KC()}}a(sg,"default");var GC=a(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${le(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function ag(){return{localeError:GC()}}a(ag,"default");function px(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}a(px,"getBelarusianPlural");var YC=a(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${le(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=px(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=px(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function cg(){return{localeError:YC()}}a(cg,"default");var XC=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${le(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function ug(){return{localeError:XC()}}a(ug,"default");var JC=a(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${le(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${Q(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function lg(){return{localeError:JC()}}a(lg,"default");var e1=a(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${le(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${Q(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function fg(){return{localeError:e1()}}a(fg,"default");var t1=a(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${le(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),c=i[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),c=i[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}},"error");function dg(){return{localeError:t1()}}a(dg,"default");var r1=a(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${le(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function pg(){return{localeError:r1()}}a(pg,"default");var n1=a(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${le(n.values[0])}`:`Invalid option: expected one of ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}},"error");function $a(){return{localeError:n1()}}a($a,"default");var i1=a(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${le(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}},"error");function hg(){return{localeError:i1()}}a(hg,"default");var o1=a(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${le(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),c=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),c=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function gg(){return{localeError:o1()}}a(gg,"default");var s1=a(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${le(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${Q(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${Q(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function mg(){return{localeError:s1()}}a(mg,"default");var a1=a(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${le(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Q(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function _g(){return{localeError:a1()}}a(_g,"default");var c1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${le(n.values[0])} attendu`:`Option invalide : une valeur parmi ${Q(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${Q(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}},"error");function yg(){return{localeError:c1()}}a(yg,"default");var u1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${le(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${Q(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Eg(){return{localeError:u1()}}a(Eg,"default");var l1=a(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=a(l=>l?e[l]:void 0,"typeEntry"),i=a(l=>{let f=r(l);return f?f.label:l??e.unknown.label},"typeLabel"),n=a(l=>`\u05D4${i(l)}`,"withDefinite"),o=a(l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),s=a(l=>l?t[l]??null:null,"getSizing"),c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let f=l.expected,p=u[f??""]??i(f),g=pe(l.input),h=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${le(l.values[0])}`;let f=l.values.map(h=>le(h));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${f[0]} \u05D0\u05D5 ${f[1]}`;let p=f[f.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${f.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let f=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${f?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${f?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let _=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(l.origin==="array"||l.origin==="set"){let _=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=l.inclusive?`${l.maximum} ${f?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${f?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let g=l.inclusive?"<=":"<",h=o(l.origin??"value");return f?.unit?`${f.longLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.maximum.toString()} ${f.unit}`:`${f?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let f=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${f?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${f?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let _=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(l.origin==="array"||l.origin==="set"){let _=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let b=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let y=l.inclusive?`${l.minimum} ${f?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${f?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let g=l.inclusive?">=":">",h=o(l.origin??"value");return f?.unit?`${f.shortLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.minimum.toString()} ${f.unit}`:`${f?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{let f=l;if(f.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${f.prefix}"`;if(f.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${f.suffix}"`;if(f.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${f.includes}"`;if(f.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${f.pattern}`;let p=c[f.format],g=p?.label??f.format,_=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${_}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${Q(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Ag(){return{localeError:l1()}}a(Ag,"default");var f1=a(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${le(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function bg(){return{localeError:f1()}}a(bg,"default");function hx(e,t,r){return Math.abs(e)===1?t:r}a(hx,"getArmenianPlural");function es(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}a(es,"withDefiniteArticle");var d1=a(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${le(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=hx(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=hx(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${Q(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${es(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${es(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function xg(){return{localeError:d1()}}a(xg,"default");var p1=a(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${le(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}},"error");function Ig(){return{localeError:p1()}}a(Ig,"default");var h1=a(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${le(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}},"error");function vg(){return{localeError:h1()}}a(vg,"default");var g1=a(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${le(n.values[0])}`:`Opzione non valida: atteso uno tra ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}},"error");function Sg(){return{localeError:g1()}}a(Sg,"default");var m1=a(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${le(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${Q(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${Q(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function wg(){return{localeError:m1()}}a(wg,"default");var _1=a(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${le(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${Q(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function Pg(){return{localeError:_1()}}a(Pg,"default");var y1=a(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${le(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${Q(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Da(){return{localeError:y1()}}a(Da,"default");function Tg(){return Da()}a(Tg,"default");var E1=a(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${le(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${Q(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${Q(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function kg(){return{localeError:E1()}}a(kg,"default");var Ba=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function gx(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}a(gx,"getUnitTypeFromNumber");var A1=a(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,o,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[c][s?"inclusive":"notInclusive"]}}a(t,"getSizing");let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${le(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${Q(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=t(n.origin,gx(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${Ba(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ba(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=t(n.origin,gx(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${Ba(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ba(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${Q(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${Ba(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Cg(){return{localeError:A1()}}a(Cg,"default");var b1=a(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${le(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Rg(){return{localeError:b1()}}a(Rg,"default");var x1=a(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${le(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Q(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}},"error");function Og(){return{localeError:x1()}}a(Og,"default");var I1=a(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${le(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}},"error");function Ng(){return{localeError:I1()}}a(Ng,"default");var v1=a(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${le(n.values[0])}`:`Ugyldig valg: forventet en av ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}},"error");function $g(){return{localeError:v1()}}a($g,"default");var S1=a(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${le(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function Dg(){return{localeError:S1()}}a(Dg,"default");var w1=a(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${le(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${Q(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function Bg(){return{localeError:w1()}}a(Bg,"default");var P1=a(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${le(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function zg(){return{localeError:P1()}}a(zg,"default");var T1=a(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${le(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}},"error");function Lg(){return{localeError:T1()}}a(Lg,"default");function mx(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}a(mx,"getRussianPlural");var k1=a(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${le(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=mx(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=mx(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function Ug(){return{localeError:k1()}}a(Ug,"default");var C1=a(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${le(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}},"error");function Mg(){return{localeError:C1()}}a(Mg,"default");var R1=a(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${le(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function Fg(){return{localeError:R1()}}a(Fg,"default");var O1=a(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${le(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Q(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Hg(){return{localeError:O1()}}a(Hg,"default");var N1=a(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${le(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${Q(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function jg(){return{localeError:N1()}}a(jg,"default");var $1=a(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${le(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Wg(){return{localeError:$1()}}a(Wg,"default");var D1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${le(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function za(){return{localeError:D1()}}a(za,"default");function qg(){return za()}a(qg,"default");var B1=a(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${le(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${Q(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${Q(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Vg(){return{localeError:B1()}}a(Vg,"default");var z1=a(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${le(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function Zg(){return{localeError:z1()}}a(Zg,"default");var L1=a(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${le(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${Q(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Qg(){return{localeError:L1()}}a(Qg,"default");var U1=a(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${le(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Kg(){return{localeError:U1()}}a(Kg,"default");var M1=a(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${le(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${Q(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function Gg(){return{localeError:M1()}}a(Gg,"default");var F1=a(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${le(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${Q(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Yg(){return{localeError:F1()}}a(Yg,"default");var _x,df=Symbol("ZodOutput"),pf=Symbol("ZodInput"),ff=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function La(){return new ff}a(La,"registry");(_x=globalThis).__zod_globalRegistry??(_x.__zod_globalRegistry=La());var Er=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...ue(t)})}a(Ua,"_string");function Ma(e,t){return new e({type:"string",coerce:!0,...ue(t)})}a(Ma,"_coercedString");function Fa(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ue(t)})}a(Fa,"_email");function rs(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ue(t)})}a(rs,"_guid");function Ha(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(t)})}a(Ha,"_uuid");function ja(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(t)})}a(ja,"_uuidv4");function Wa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(t)})}a(Wa,"_uuidv6");function qa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(t)})}a(qa,"_uuidv7");function Gi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(t)})}a(Gi,"_url");function Va(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(t)})}a(Va,"_emoji");function Za(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(t)})}a(Za,"_nanoid");function Qa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(t)})}a(Qa,"_cuid");function Ka(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(t)})}a(Ka,"_cuid2");function Ga(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(t)})}a(Ga,"_ulid");function Ya(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ue(t)})}a(Ya,"_xid");function Xa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(t)})}a(Xa,"_ksuid");function Ja(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(t)})}a(Ja,"_ipv4");function ec(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(t)})}a(ec,"_ipv6");function hf(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ue(t)})}a(hf,"_mac");function tc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(t)})}a(tc,"_cidrv4");function rc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(t)})}a(rc,"_cidrv6");function nc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ue(t)})}a(nc,"_base64");function ic(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(t)})}a(ic,"_base64url");function oc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ue(t)})}a(oc,"_e164");function sc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(t)})}a(sc,"_jwt");var gf={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ac(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(t)})}a(ac,"_isoDateTime");function cc(e,t){return new e({type:"string",format:"date",check:"string_format",...ue(t)})}a(cc,"_isoDate");function uc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ue(t)})}a(uc,"_isoTime");function lc(e,t){return new e({type:"string",format:"duration",check:"string_format",...ue(t)})}a(lc,"_isoDuration");function fc(e,t){return new e({type:"number",checks:[],...ue(t)})}a(fc,"_number");function dc(e,t){return new e({type:"number",coerce:!0,checks:[],...ue(t)})}a(dc,"_coercedNumber");function pc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(t)})}a(pc,"_int");function mf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ue(t)})}a(mf,"_float32");function _f(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ue(t)})}a(_f,"_float64");function yf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ue(t)})}a(yf,"_int32");function Ef(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ue(t)})}a(Ef,"_uint32");function hc(e,t){return new e({type:"boolean",...ue(t)})}a(hc,"_boolean");function gc(e,t){return new e({type:"boolean",coerce:!0,...ue(t)})}a(gc,"_coercedBoolean");function Af(e,t){return new e({type:"bigint",...ue(t)})}a(Af,"_bigint");function mc(e,t){return new e({type:"bigint",coerce:!0,...ue(t)})}a(mc,"_coercedBigint");function bf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ue(t)})}a(bf,"_int64");function xf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ue(t)})}a(xf,"_uint64");function If(e,t){return new e({type:"symbol",...ue(t)})}a(If,"_symbol");function vf(e,t){return new e({type:"undefined",...ue(t)})}a(vf,"_undefined");function Sf(e,t){return new e({type:"null",...ue(t)})}a(Sf,"_null");function _c(e){return new e({type:"any"})}a(_c,"_any");function yc(e){return new e({type:"unknown"})}a(yc,"_unknown");function wf(e,t){return new e({type:"never",...ue(t)})}a(wf,"_never");function Ec(e,t){return new e({type:"void",...ue(t)})}a(Ec,"_void");function Pf(e,t){return new e({type:"date",...ue(t)})}a(Pf,"_date");function Ac(e,t){return new e({type:"date",coerce:!0,...ue(t)})}a(Ac,"_coercedDate");function Tf(e,t){return new e({type:"nan",...ue(t)})}a(Tf,"_nan");function An(e,t){return new hl({check:"less_than",...ue(t),value:e,inclusive:!1})}a(An,"_lt");function Br(e,t){return new hl({check:"less_than",...ue(t),value:e,inclusive:!0})}a(Br,"_lte");function bn(e,t){return new gl({check:"greater_than",...ue(t),value:e,inclusive:!1})}a(bn,"_gt");function mr(e,t){return new gl({check:"greater_than",...ue(t),value:e,inclusive:!0})}a(mr,"_gte");function bc(e){return bn(0,e)}a(bc,"_positive");function xc(e){return An(0,e)}a(xc,"_negative");function Ic(e){return Br(0,e)}a(Ic,"_nonpositive");function vc(e){return mr(0,e)}a(vc,"_nonnegative");function Hn(e,t){return new Lh({check:"multiple_of",...ue(t),value:e})}a(Hn,"_multipleOf");function jn(e,t){return new Fh({check:"max_size",...ue(t),maximum:e})}a(jn,"_maxSize");function xn(e,t){return new Hh({check:"min_size",...ue(t),minimum:e})}a(xn,"_minSize");function li(e,t){return new jh({check:"size_equals",...ue(t),size:e})}a(li,"_size");function fi(e,t){return new Wh({check:"max_length",...ue(t),maximum:e})}a(fi,"_maxLength");function cr(e,t){return new qh({check:"min_length",...ue(t),minimum:e})}a(cr,"_minLength");function di(e,t){return new Vh({check:"length_equals",...ue(t),length:e})}a(di,"_length");function Ir(e,t){return new Zh({check:"string_format",format:"regex",...ue(t),pattern:e})}a(Ir,"_regex");function Yi(e){return new Qh({check:"string_format",format:"lowercase",...ue(e)})}a(Yi,"_lowercase");function Xi(e){return new Kh({check:"string_format",format:"uppercase",...ue(e)})}a(Xi,"_uppercase");function Ji(e,t){return new Gh({check:"string_format",format:"includes",...ue(t),includes:e})}a(Ji,"_includes");function eo(e,t){return new Yh({check:"string_format",format:"starts_with",...ue(t),prefix:e})}a(eo,"_startsWith");function to(e,t){return new Xh({check:"string_format",format:"ends_with",...ue(t),suffix:e})}a(to,"_endsWith");function Sc(e,t,r){return new Jh({check:"property",property:e,schema:t,...ue(r)})}a(Sc,"_property");function ro(e,t){return new eg({check:"mime_type",mime:e,...ue(t)})}a(ro,"_mime");function ln(e){return new tg({check:"overwrite",tx:e})}a(ln,"_overwrite");function no(e){return ln(t=>t.normalize(e))}a(no,"_normalize");function io(){return ln(e=>e.trim())}a(io,"_trim");function oo(){return ln(e=>e.toLowerCase())}a(oo,"_toLowerCase");function so(){return ln(e=>e.toUpperCase())}a(so,"_toUpperCase");function ns(){return ln(e=>ih(e))}a(ns,"_slugify");function Xg(e,t,r){return new e({type:"array",element:t,...ue(r)})}a(Xg,"_array");function j1(e,t,r){return new e({type:"union",options:t,...ue(r)})}a(j1,"_union");function W1(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ue(r)})}a(W1,"_xor");function q1(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...ue(i)})}a(q1,"_discriminatedUnion");function V1(e,t,r){return new e({type:"intersection",left:t,right:r})}a(V1,"_intersection");function Z1(e,t,r,i){let n=r instanceof We,o=n?i:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ue(o)})}a(Z1,"_tuple");function Q1(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...ue(i)})}a(Q1,"_record");function K1(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...ue(i)})}a(K1,"_map");function G1(e,t,r){return new e({type:"set",valueType:t,...ue(r)})}a(G1,"_set");function Y1(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...ue(r)})}a(Y1,"_enum");function X1(e,t,r){return new e({type:"enum",entries:t,...ue(r)})}a(X1,"_nativeEnum");function J1(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ue(r)})}a(J1,"_literal");function kf(e,t){return new e({type:"file",...ue(t)})}a(kf,"_file");function eR(e,t){return new e({type:"transform",transform:t})}a(eR,"_transform");function tR(e,t){return new e({type:"optional",innerType:t})}a(tR,"_optional");function rR(e,t){return new e({type:"nullable",innerType:t})}a(rR,"_nullable");function nR(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():tl(r)}})}a(nR,"_default");function iR(e,t,r){return new e({type:"nonoptional",innerType:t,...ue(r)})}a(iR,"_nonoptional");function oR(e,t){return new e({type:"success",innerType:t})}a(oR,"_success");function sR(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}a(sR,"_catch");function aR(e,t,r){return new e({type:"pipe",in:t,out:r})}a(aR,"_pipe");function cR(e,t){return new e({type:"readonly",innerType:t})}a(cR,"_readonly");function uR(e,t,r){return new e({type:"template_literal",parts:t,...ue(r)})}a(uR,"_templateLiteral");function lR(e,t){return new e({type:"lazy",getter:t})}a(lR,"_lazy");function fR(e,t){return new e({type:"promise",innerType:t})}a(fR,"_promise");function wc(e,t,r){let i=ue(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}a(wc,"_custom");function Pc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ue(r)})}a(Pc,"_refine");function Cf(e){let t=yx(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Mo(i,r.value,t._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(Mo(n))}},e(r.value,r)));return t}a(Cf,"_superRefine");function yx(e,t){let r=new $t({check:"custom",...ue(t)});return r._zod.check=e,r}a(yx,"_check");function Rf(e){let t=new $t({check:"describe"});return t._zod.onattach=[r=>{let i=Er.get(r)??{};Er.add(r,{...i,description:e})}],t._zod.check=()=>{},t}a(Rf,"describe");function Of(e){let t=new $t({check:"meta"});return t._zod.onattach=[r=>{let i=Er.get(r)??{};Er.add(r,{...i,...e})}],t._zod.check=()=>{},t}a(Of,"meta");function Nf(e,t){let r=ue(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let o=new Set(i),s=new Set(n),c=e.Codec??Jo,u=e.Boolean??Qi,l=e.String??Fn,f=new l({type:"string",error:r.error}),p=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:f,out:p,transform:a(((h,_)=>{let y=h;return r.case!=="sensitive"&&(y=y.toLowerCase()),o.has(y)?!0:s.has(y)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:_.value,inst:g,continue:!1}),{})}),"transform"),reverseTransform:a(((h,_)=>h===!0?i[0]||"true":n[0]||"false"),"reverseTransform"),error:r.error});return g}a(Nf,"_stringbool");function ao(e,t,r,i={}){let n=ue(i),o={...ue(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}a(ao,"_stringFormat");function pi(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Er,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}a(pi,"initializeContext");function Rt(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let f={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,f)}let p=e._zod.parent;p&&(s.ref||(s.ref=p),Rt(p,t,f),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&zr(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}a(Rt,"process");function hi(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=i.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,s[0])}}let n=a(s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,g=e.external.uri??(_=>_);if(p)return{ref:g(p)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:l+f}},"makeURI"),o=a(s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let f=c.schema;for(let p in f)delete f[p];f.$ref=u},"extractToDef");if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
60
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let v=h.compile();return(M,R)=>v(g,M,R)},"generateFastpass"),o,s=Wi,c=!ra.jitless,l=c&&ah.value,f=t.catchall,p;e._zod.parse=(g,h)=>{p??(p=i.value);let _=g.value;return s(_)?c&&l&&h?.async===!1&&h.jitless!==!0?(o||(o=n(t.shape)),g=o(g,h),f?yx([],_,g,h,p,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),g)}});function ox(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!ui(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>jr(s,i,Qt())))}),t)}a(ox,"handleUnionResults");var Gi=T("$ZodUnion",(e,t)=>{We.init(e,t),ot(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ot(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ot(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),ot(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>sa(o.source)).join("|")})$`)}});let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,c=[];for(let u of t.options){let l=u._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)c.push(l),s=!0;else{if(l.issues.length===0)return l;c.push(l)}}return s?Promise.all(c).then(u=>ox(u,n,e,o)):ox(c,n,e,o)}});function sx(e,t,r,i){let n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>jr(s,i,Qt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}a(sx,"handleExclusiveUnionResults");var Ql=T("$ZodXor",(e,t)=>{Gi.init(e,t),t.inclusive=!1;let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,c=[];for(let u of t.options){let l=u._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(c.push(l),s=!0):c.push(l)}return s?Promise.all(c).then(u=>sx(u,n,e,o)):sx(c,n,e,o)}}),va=T("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Gi.init(e,t);let r=e._zod.parse;ot(e._zod,"propValues",()=>{let n={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let i=Mo(()=>{let n=t.options,o=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});e._zod.parse=(n,o)=>{let s=n.value;if(!Wi(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=i.value.get(s?.[t.discriminator]);return c?c._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)}}),Gl=T("$ZodIntersection",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,l])=>ax(r,u,l)):ax(r,o,s)}});function og(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ci(e)&&ci(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(let o of i){let s=og(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],s=og(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}a(og,"mergeValues");function ax(e,t,r){let i=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(c);let o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&n&&e.issues.push({...n,keys:o}),ui(e))return e;let s=og(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}a(ax,"handleIntersectionResults");var wa=T("$ZodTuple",(e,t)=>{We.init(e,t);let r=t.items;e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],c=[...r].reverse().findIndex(f=>f._zod.optin!=="optional"),u=c===-1?0:r.length-c;if(!t.rest){let f=o.length>r.length,p=o.length<u-1;if(f||p)return i.issues.push({...f?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let l=-1;for(let f of r){if(l++,l>=o.length&&l>=u)continue;let p=f._zod.run({value:o[l],issues:[]},n);p instanceof Promise?s.push(p.then(g=>_l(g,i,l))):_l(p,i,l)}if(t.rest){let f=o.slice(r.length);for(let p of f){l++;let g=t.rest._zod.run({value:p,issues:[]},n);g instanceof Promise?s.push(g.then(h=>_l(h,i,l))):_l(g,i,l)}}return s.length?Promise.all(s).then(()=>i):i}});function _l(e,t,r){e.issues.length&&t.issues.push(...Jr(r,e.issues)),t.value[r]=e.value}a(_l,"handleTupleResult");var Pa=T("$ZodRecord",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!ci(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let f=t.valueType._zod.run({value:n[l],issues:[]},i);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&r.issues.push(...Jr(l,p.issues)),r.value[l]=p.value})):(f.issues.length&&r.issues.push(...Jr(l,f.issues)),r.value[l]=f.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&hl.test(c)&&u.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>jr(p,i,Qt())),input:c,path:[c],inst:e});continue}let f=t.valueType._zod.run({value:n[c],issues:[]},i);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&r.issues.push(...Jr(c,p.issues)),r.value[u.value]=p.value})):(f.issues.length&&r.issues.push(...Jr(c,f.issues)),r.value[u.value]=f.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Kl=T("$ZodMap",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let o=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},i),l=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([f,p])=>{cx(f,p,r,s,n,e,i)})):cx(u,l,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function cx(e,t,r,i,n,o,s){e.issues.length&&(aa.has(typeof i)?r.issues.push(...Jr(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(c=>jr(c,s,Qt()))})),t.issues.length&&(aa.has(typeof i)?r.issues.push(...Jr(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(c=>jr(c,s,Qt()))})),r.value.set(e.value,t.value)}a(cx,"handleMapResult");var Yl=T("$ZodSet",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>ux(u,r))):ux(c,r)}return o.length?Promise.all(o).then(()=>r):r}});function ux(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a(ux,"handleSetResult");var Ta=T("$ZodEnum",(e,t)=>{We.init(e,t);let r=oa(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>aa.has(typeof n)).map(n=>typeof n=="string"?un(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),ka=T("$ZodLiteral",(e,t)=>{if(We.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?un(i):i?un(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Xl=T("$ZodFile",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Ca=T("$ZodTransform",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new oi(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new En;return r.value=n,r}});function lx(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(lx,"handleOptionalResult");var Jo=T("$ZodOptional",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ot(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sa(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>lx(o,r.value)):lx(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Jl=T("$ZodExactOptional",(e,t)=>{Jo.init(e,t),ot(e._zod,"values",()=>t.innerType._zod.values),ot(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Ra=T("$ZodNullable",(e,t)=>{We.init(e,t),ot(e._zod,"optin",()=>t.innerType._zod.optin),ot(e._zod,"optout",()=>t.innerType._zod.optout),ot(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sa(r.source)}|null)$`):void 0}),ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),ef=T("$ZodDefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>fx(o,t)):fx(n,t)}});function fx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(fx,"handleDefaultResult");var tf=T("$ZodPrefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),rf=T("$ZodNonOptional",(e,t)=>{We.init(e,t),ot(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>dx(o,e)):dx(n,e)}});function dx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}a(dx,"handleNonOptionalResult");var nf=T("$ZodSuccess",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new oi("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),of=T("$ZodCatch",(e,t)=>{We.init(e,t),ot(e._zod,"optin",()=>t.innerType._zod.optin),ot(e._zod,"optout",()=>t.innerType._zod.optout),ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>jr(s,i,Qt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>jr(o,i,Qt()))},input:r.value}),r.issues=[]),r)}}),sf=T("$ZodNaN",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Oa=T("$ZodPipe",(e,t)=>{We.init(e,t),ot(e._zod,"values",()=>t.in._zod.values),ot(e._zod,"optin",()=>t.in._zod.optin),ot(e._zod,"optout",()=>t.out._zod.optout),ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>yl(s,t.in,i)):yl(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>yl(o,t.out,i)):yl(n,t.out,i)}});function yl(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}a(yl,"handlePipeResult");var es=T("$ZodCodec",(e,t)=>{We.init(e,t),ot(e._zod,"values",()=>t.in._zod.values),ot(e._zod,"optin",()=>t.in._zod.optin),ot(e._zod,"optout",()=>t.out._zod.optout),ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(s=>El(s,t,i)):El(o,t,i)}else{let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>El(s,t,i)):El(o,t,i)}}});function El(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>Al(e,o,t.out,r)):Al(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Al(e,o,t.in,r)):Al(e,n,t.in,r)}}a(El,"handleCodecAResult");function Al(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}a(Al,"handleCodecTxResult");var af=T("$ZodReadonly",(e,t)=>{We.init(e,t),ot(e._zod,"propValues",()=>t.innerType._zod.propValues),ot(e._zod,"values",()=>t.innerType._zod.values),ot(e._zod,"optin",()=>t.innerType?._zod?.optin),ot(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(px):px(n)}});function px(e){return e.value=Object.freeze(e.value),e}a(px,"handleReadonlyResult");var cf=T("$ZodTemplateLiteral",(e,t)=>{We.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||ch.has(typeof i))r.push(un(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),uf=T("$ZodFunction",(e,t)=>(We.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=e._def.input?qi(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?qi(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=e._def.input?await Vi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await Vi(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new wa({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),lf=T("$ZodPromise",(e,t)=>{We.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),ff=T("$ZodLazy",(e,t)=>{We.init(e,t),ot(e._zod,"innerType",()=>t.getter()),ot(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ot(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ot(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ot(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Na=T("$ZodCustom",(e,t)=>{$t.init(e,t),We.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>hx(o,r,i,e));hx(n,r,i,e)}});function hx(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Fo(n))}}a(hx,"handleRefineResult");var rs={};cn(rs,{ar:()=>cg,az:()=>ug,be:()=>lg,bg:()=>fg,ca:()=>dg,cs:()=>pg,da:()=>hg,de:()=>gg,en:()=>$a,eo:()=>mg,es:()=>_g,fa:()=>yg,fi:()=>Eg,fr:()=>Ag,frCA:()=>bg,he:()=>xg,hu:()=>Ig,hy:()=>Sg,id:()=>vg,is:()=>wg,it:()=>Pg,ja:()=>Tg,ka:()=>kg,kh:()=>Cg,km:()=>Da,ko:()=>Rg,lt:()=>Og,mk:()=>Ng,ms:()=>$g,nl:()=>Dg,no:()=>Bg,ota:()=>Lg,pl:()=>Ug,ps:()=>zg,pt:()=>Mg,ru:()=>Fg,sl:()=>Hg,sv:()=>jg,ta:()=>Wg,th:()=>qg,tr:()=>Vg,ua:()=>Zg,uk:()=>La,ur:()=>Qg,uz:()=>Gg,vi:()=>Kg,yo:()=>Jg,zhCN:()=>Yg,zhTW:()=>Xg});var s1=a(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${le(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${Q(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function cg(){return{localeError:s1()}}a(cg,"default");var a1=a(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${le(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function ug(){return{localeError:a1()}}a(ug,"default");function Ex(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}a(Ex,"getBelarusianPlural");var c1=a(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${le(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Ex(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Ex(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function lg(){return{localeError:c1()}}a(lg,"default");var u1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${le(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function fg(){return{localeError:u1()}}a(fg,"default");var l1=a(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${le(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${Q(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function dg(){return{localeError:l1()}}a(dg,"default");var f1=a(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${le(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${Q(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function pg(){return{localeError:f1()}}a(pg,"default");var d1=a(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${le(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),c=i[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),c=i[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}},"error");function hg(){return{localeError:d1()}}a(hg,"default");var p1=a(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${le(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function gg(){return{localeError:p1()}}a(gg,"default");var h1=a(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${le(n.values[0])}`:`Invalid option: expected one of ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}},"error");function $a(){return{localeError:h1()}}a($a,"default");var g1=a(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${le(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}},"error");function mg(){return{localeError:g1()}}a(mg,"default");var m1=a(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${le(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),c=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),c=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function _g(){return{localeError:m1()}}a(_g,"default");var _1=a(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${le(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${Q(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${Q(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function yg(){return{localeError:_1()}}a(yg,"default");var y1=a(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${le(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Q(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function Eg(){return{localeError:y1()}}a(Eg,"default");var E1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${le(n.values[0])} attendu`:`Option invalide : une valeur parmi ${Q(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${Q(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Ag(){return{localeError:E1()}}a(Ag,"default");var A1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${le(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${Q(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}},"error");function bg(){return{localeError:A1()}}a(bg,"default");var b1=a(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=a(l=>l?e[l]:void 0,"typeEntry"),i=a(l=>{let f=r(l);return f?f.label:l??e.unknown.label},"typeLabel"),n=a(l=>`\u05D4${i(l)}`,"withDefinite"),o=a(l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),s=a(l=>l?t[l]??null:null,"getSizing"),c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let f=l.expected,p=u[f??""]??i(f),g=pe(l.input),h=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${le(l.values[0])}`;let f=l.values.map(h=>le(h));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${f[0]} \u05D0\u05D5 ${f[1]}`;let p=f[f.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${f.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let f=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${f?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${f?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let _=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(l.origin==="array"||l.origin==="set"){let _=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",y=l.inclusive?`${l.maximum} ${f?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${f?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let g=l.inclusive?"<=":"<",h=o(l.origin??"value");return f?.unit?`${f.longLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.maximum.toString()} ${f.unit}`:`${f?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let f=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${f?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${f?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let _=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(l.origin==="array"||l.origin==="set"){let _=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let b=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let y=l.inclusive?`${l.minimum} ${f?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${f?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`.trim()}let g=l.inclusive?">=":">",h=o(l.origin??"value");return f?.unit?`${f.shortLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.minimum.toString()} ${f.unit}`:`${f?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{let f=l;if(f.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${f.prefix}"`;if(f.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${f.suffix}"`;if(f.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${f.includes}"`;if(f.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${f.pattern}`;let p=c[f.format],g=p?.label??f.format,_=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${_}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${Q(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function xg(){return{localeError:b1()}}a(xg,"default");var x1=a(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${le(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function Ig(){return{localeError:x1()}}a(Ig,"default");function Ax(e,t,r){return Math.abs(e)===1?t:r}a(Ax,"getArmenianPlural");function ts(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}a(ts,"withDefiniteArticle");var I1=a(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${le(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Ax(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ts(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ts(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Ax(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ts(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ts(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${Q(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ts(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${ts(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Sg(){return{localeError:I1()}}a(Sg,"default");var S1=a(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${le(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}},"error");function vg(){return{localeError:S1()}}a(vg,"default");var v1=a(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${le(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}},"error");function wg(){return{localeError:v1()}}a(wg,"default");var w1=a(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${le(n.values[0])}`:`Opzione non valida: atteso uno tra ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}},"error");function Pg(){return{localeError:w1()}}a(Pg,"default");var P1=a(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${le(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${Q(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${Q(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function Tg(){return{localeError:P1()}}a(Tg,"default");var T1=a(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${le(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${Q(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function kg(){return{localeError:T1()}}a(kg,"default");var k1=a(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${le(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${Q(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Da(){return{localeError:k1()}}a(Da,"default");function Cg(){return Da()}a(Cg,"default");var C1=a(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${le(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${Q(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${Q(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Rg(){return{localeError:C1()}}a(Rg,"default");var Ba=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function bx(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}a(bx,"getUnitTypeFromNumber");var R1=a(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,o,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[c][s?"inclusive":"notInclusive"]}}a(t,"getSizing");let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${le(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${Q(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=t(n.origin,bx(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${Ba(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ba(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=t(n.origin,bx(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${Ba(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ba(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${Q(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${Ba(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Og(){return{localeError:R1()}}a(Og,"default");var O1=a(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${le(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Ng(){return{localeError:O1()}}a(Ng,"default");var N1=a(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${le(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Q(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}},"error");function $g(){return{localeError:N1()}}a($g,"default");var $1=a(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${le(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}},"error");function Dg(){return{localeError:$1()}}a(Dg,"default");var D1=a(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${le(n.values[0])}`:`Ugyldig valg: forventet en av ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}},"error");function Bg(){return{localeError:D1()}}a(Bg,"default");var B1=a(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${le(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function Lg(){return{localeError:B1()}}a(Lg,"default");var L1=a(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${le(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${Q(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function zg(){return{localeError:L1()}}a(zg,"default");var z1=a(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${le(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function Ug(){return{localeError:z1()}}a(Ug,"default");var U1=a(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${le(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}},"error");function Mg(){return{localeError:U1()}}a(Mg,"default");function xx(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}a(xx,"getRussianPlural");var M1=a(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${le(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=xx(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=xx(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function Fg(){return{localeError:M1()}}a(Fg,"default");var F1=a(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${le(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}},"error");function Hg(){return{localeError:F1()}}a(Hg,"default");var H1=a(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${le(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${Q(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function jg(){return{localeError:H1()}}a(jg,"default");var j1=a(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${le(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Q(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Wg(){return{localeError:j1()}}a(Wg,"default");var W1=a(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${le(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${Q(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function qg(){return{localeError:W1()}}a(qg,"default");var q1=a(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${le(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Vg(){return{localeError:q1()}}a(Vg,"default");var V1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${le(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function La(){return{localeError:V1()}}a(La,"default");function Zg(){return La()}a(Zg,"default");var Z1=a(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${le(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${Q(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${Q(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Qg(){return{localeError:Z1()}}a(Qg,"default");var Q1=a(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${le(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function Gg(){return{localeError:Q1()}}a(Gg,"default");var G1=a(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${le(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${Q(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Kg(){return{localeError:G1()}}a(Kg,"default");var K1=a(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${le(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${Q(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Yg(){return{localeError:K1()}}a(Yg,"default");var Y1=a(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${le(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${Q(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function Xg(){return{localeError:Y1()}}a(Xg,"default");var X1=a(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}a(t,"getSizing");let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=pe(n.input),c=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${le(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${Q(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${Q(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Jg(){return{localeError:X1()}}a(Jg,"default");var Ix,pf=Symbol("ZodOutput"),hf=Symbol("ZodInput"),df=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function za(){return new df}a(za,"registry");(Ix=globalThis).__zod_globalRegistry??(Ix.__zod_globalRegistry=za());var Er=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...ue(t)})}a(Ua,"_string");function Ma(e,t){return new e({type:"string",coerce:!0,...ue(t)})}a(Ma,"_coercedString");function Fa(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ue(t)})}a(Fa,"_email");function ns(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ue(t)})}a(ns,"_guid");function Ha(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(t)})}a(Ha,"_uuid");function ja(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(t)})}a(ja,"_uuidv4");function Wa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(t)})}a(Wa,"_uuidv6");function qa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(t)})}a(qa,"_uuidv7");function Ki(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(t)})}a(Ki,"_url");function Va(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(t)})}a(Va,"_emoji");function Za(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(t)})}a(Za,"_nanoid");function Qa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(t)})}a(Qa,"_cuid");function Ga(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(t)})}a(Ga,"_cuid2");function Ka(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(t)})}a(Ka,"_ulid");function Ya(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ue(t)})}a(Ya,"_xid");function Xa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(t)})}a(Xa,"_ksuid");function Ja(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(t)})}a(Ja,"_ipv4");function ec(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(t)})}a(ec,"_ipv6");function gf(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ue(t)})}a(gf,"_mac");function tc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(t)})}a(tc,"_cidrv4");function rc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(t)})}a(rc,"_cidrv6");function nc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ue(t)})}a(nc,"_base64");function ic(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(t)})}a(ic,"_base64url");function oc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ue(t)})}a(oc,"_e164");function sc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(t)})}a(sc,"_jwt");var mf={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ac(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(t)})}a(ac,"_isoDateTime");function cc(e,t){return new e({type:"string",format:"date",check:"string_format",...ue(t)})}a(cc,"_isoDate");function uc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ue(t)})}a(uc,"_isoTime");function lc(e,t){return new e({type:"string",format:"duration",check:"string_format",...ue(t)})}a(lc,"_isoDuration");function fc(e,t){return new e({type:"number",checks:[],...ue(t)})}a(fc,"_number");function dc(e,t){return new e({type:"number",coerce:!0,checks:[],...ue(t)})}a(dc,"_coercedNumber");function pc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(t)})}a(pc,"_int");function _f(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ue(t)})}a(_f,"_float32");function yf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ue(t)})}a(yf,"_float64");function Ef(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ue(t)})}a(Ef,"_int32");function Af(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ue(t)})}a(Af,"_uint32");function hc(e,t){return new e({type:"boolean",...ue(t)})}a(hc,"_boolean");function gc(e,t){return new e({type:"boolean",coerce:!0,...ue(t)})}a(gc,"_coercedBoolean");function bf(e,t){return new e({type:"bigint",...ue(t)})}a(bf,"_bigint");function mc(e,t){return new e({type:"bigint",coerce:!0,...ue(t)})}a(mc,"_coercedBigint");function xf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ue(t)})}a(xf,"_int64");function If(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ue(t)})}a(If,"_uint64");function Sf(e,t){return new e({type:"symbol",...ue(t)})}a(Sf,"_symbol");function vf(e,t){return new e({type:"undefined",...ue(t)})}a(vf,"_undefined");function wf(e,t){return new e({type:"null",...ue(t)})}a(wf,"_null");function _c(e){return new e({type:"any"})}a(_c,"_any");function yc(e){return new e({type:"unknown"})}a(yc,"_unknown");function Pf(e,t){return new e({type:"never",...ue(t)})}a(Pf,"_never");function Ec(e,t){return new e({type:"void",...ue(t)})}a(Ec,"_void");function Tf(e,t){return new e({type:"date",...ue(t)})}a(Tf,"_date");function Ac(e,t){return new e({type:"date",coerce:!0,...ue(t)})}a(Ac,"_coercedDate");function kf(e,t){return new e({type:"nan",...ue(t)})}a(kf,"_nan");function An(e,t){return new gl({check:"less_than",...ue(t),value:e,inclusive:!1})}a(An,"_lt");function Br(e,t){return new gl({check:"less_than",...ue(t),value:e,inclusive:!0})}a(Br,"_lte");function bn(e,t){return new ml({check:"greater_than",...ue(t),value:e,inclusive:!1})}a(bn,"_gt");function mr(e,t){return new ml({check:"greater_than",...ue(t),value:e,inclusive:!0})}a(mr,"_gte");function bc(e){return bn(0,e)}a(bc,"_positive");function xc(e){return An(0,e)}a(xc,"_negative");function Ic(e){return Br(0,e)}a(Ic,"_nonpositive");function Sc(e){return mr(0,e)}a(Sc,"_nonnegative");function Hn(e,t){return new Mh({check:"multiple_of",...ue(t),value:e})}a(Hn,"_multipleOf");function jn(e,t){return new jh({check:"max_size",...ue(t),maximum:e})}a(jn,"_maxSize");function xn(e,t){return new Wh({check:"min_size",...ue(t),minimum:e})}a(xn,"_minSize");function li(e,t){return new qh({check:"size_equals",...ue(t),size:e})}a(li,"_size");function fi(e,t){return new Vh({check:"max_length",...ue(t),maximum:e})}a(fi,"_maxLength");function cr(e,t){return new Zh({check:"min_length",...ue(t),minimum:e})}a(cr,"_minLength");function di(e,t){return new Qh({check:"length_equals",...ue(t),length:e})}a(di,"_length");function Ir(e,t){return new Gh({check:"string_format",format:"regex",...ue(t),pattern:e})}a(Ir,"_regex");function Yi(e){return new Kh({check:"string_format",format:"lowercase",...ue(e)})}a(Yi,"_lowercase");function Xi(e){return new Yh({check:"string_format",format:"uppercase",...ue(e)})}a(Xi,"_uppercase");function Ji(e,t){return new Xh({check:"string_format",format:"includes",...ue(t),includes:e})}a(Ji,"_includes");function eo(e,t){return new Jh({check:"string_format",format:"starts_with",...ue(t),prefix:e})}a(eo,"_startsWith");function to(e,t){return new eg({check:"string_format",format:"ends_with",...ue(t),suffix:e})}a(to,"_endsWith");function vc(e,t,r){return new tg({check:"property",property:e,schema:t,...ue(r)})}a(vc,"_property");function ro(e,t){return new rg({check:"mime_type",mime:e,...ue(t)})}a(ro,"_mime");function ln(e){return new ng({check:"overwrite",tx:e})}a(ln,"_overwrite");function no(e){return ln(t=>t.normalize(e))}a(no,"_normalize");function io(){return ln(e=>e.trim())}a(io,"_trim");function oo(){return ln(e=>e.toLowerCase())}a(oo,"_toLowerCase");function so(){return ln(e=>e.toUpperCase())}a(so,"_toUpperCase");function is(){return ln(e=>sh(e))}a(is,"_slugify");function em(e,t,r){return new e({type:"array",element:t,...ue(r)})}a(em,"_array");function eR(e,t,r){return new e({type:"union",options:t,...ue(r)})}a(eR,"_union");function tR(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ue(r)})}a(tR,"_xor");function rR(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...ue(i)})}a(rR,"_discriminatedUnion");function nR(e,t,r){return new e({type:"intersection",left:t,right:r})}a(nR,"_intersection");function iR(e,t,r,i){let n=r instanceof We,o=n?i:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ue(o)})}a(iR,"_tuple");function oR(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...ue(i)})}a(oR,"_record");function sR(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...ue(i)})}a(sR,"_map");function aR(e,t,r){return new e({type:"set",valueType:t,...ue(r)})}a(aR,"_set");function cR(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...ue(r)})}a(cR,"_enum");function uR(e,t,r){return new e({type:"enum",entries:t,...ue(r)})}a(uR,"_nativeEnum");function lR(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ue(r)})}a(lR,"_literal");function Cf(e,t){return new e({type:"file",...ue(t)})}a(Cf,"_file");function fR(e,t){return new e({type:"transform",transform:t})}a(fR,"_transform");function dR(e,t){return new e({type:"optional",innerType:t})}a(dR,"_optional");function pR(e,t){return new e({type:"nullable",innerType:t})}a(pR,"_nullable");function hR(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():rl(r)}})}a(hR,"_default");function gR(e,t,r){return new e({type:"nonoptional",innerType:t,...ue(r)})}a(gR,"_nonoptional");function mR(e,t){return new e({type:"success",innerType:t})}a(mR,"_success");function _R(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}a(_R,"_catch");function yR(e,t,r){return new e({type:"pipe",in:t,out:r})}a(yR,"_pipe");function ER(e,t){return new e({type:"readonly",innerType:t})}a(ER,"_readonly");function AR(e,t,r){return new e({type:"template_literal",parts:t,...ue(r)})}a(AR,"_templateLiteral");function bR(e,t){return new e({type:"lazy",getter:t})}a(bR,"_lazy");function xR(e,t){return new e({type:"promise",innerType:t})}a(xR,"_promise");function wc(e,t,r){let i=ue(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}a(wc,"_custom");function Pc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ue(r)})}a(Pc,"_refine");function Rf(e){let t=Sx(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Fo(i,r.value,t._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(Fo(n))}},e(r.value,r)));return t}a(Rf,"_superRefine");function Sx(e,t){let r=new $t({check:"custom",...ue(t)});return r._zod.check=e,r}a(Sx,"_check");function Of(e){let t=new $t({check:"describe"});return t._zod.onattach=[r=>{let i=Er.get(r)??{};Er.add(r,{...i,description:e})}],t._zod.check=()=>{},t}a(Of,"describe");function Nf(e){let t=new $t({check:"meta"});return t._zod.onattach=[r=>{let i=Er.get(r)??{};Er.add(r,{...i,...e})}],t._zod.check=()=>{},t}a(Nf,"meta");function $f(e,t){let r=ue(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let o=new Set(i),s=new Set(n),c=e.Codec??es,u=e.Boolean??Qi,l=e.String??Fn,f=new l({type:"string",error:r.error}),p=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:f,out:p,transform:a(((h,_)=>{let y=h;return r.case!=="sensitive"&&(y=y.toLowerCase()),o.has(y)?!0:s.has(y)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:_.value,inst:g,continue:!1}),{})}),"transform"),reverseTransform:a(((h,_)=>h===!0?i[0]||"true":n[0]||"false"),"reverseTransform"),error:r.error});return g}a($f,"_stringbool");function ao(e,t,r,i={}){let n=ue(i),o={...ue(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}a(ao,"_stringFormat");function pi(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Er,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}a(pi,"initializeContext");function Rt(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let f={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,f);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,f)}let p=e._zod.parent;p&&(s.ref||(s.ref=p),Rt(p,t,f),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&Lr(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}a(Rt,"process");function hi(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=i.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,s[0])}}let n=a(s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,g=e.external.uri??(_=>_);if(p)return{ref:g(p)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:l+f}},"makeURI"),o=a(s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let f=c.schema;for(let p in f)delete f[p];f.$ref=u},"extractToDef");if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
61
61
 
62
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(c.cycle){o(s);continue}if(c.count>1&&e.reused==="ref"){o(s);continue}}}a(hi,"extractDefs");function gi(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=a(s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,l={...u},f=c.ref;if(c.ref=null,f){i(f);let g=e.seen.get(f),h=g.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),s._zod.parent===f)for(let y in u)y==="$ref"||y==="allOf"||y in l||delete u[y];if(h.$ref&&g.def)for(let y in u)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(u[y])===JSON.stringify(g.def[y])&&delete u[y]}let p=s._zod.parent;if(p&&p!==f){i(p);let g=e.seen.get(p);if(g?.schema.$ref&&(u.$ref=g.schema.$ref,g.def))for(let h in u)h==="$ref"||h==="allOf"||h in g.def&&JSON.stringify(u[h])===JSON.stringify(g.def[h])&&delete u[h]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})},"flattenRef");for(let s of[...e.seen.entries()].reverse())i(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(o[c.defId]=c.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:is(t,"input",e.processors),output:is(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(gi,"finalize");function zr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return zr(i.element,r);if(i.type==="set")return zr(i.valueType,r);if(i.type==="lazy")return zr(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return zr(i.innerType,r);if(i.type==="intersection")return zr(i.left,r)||zr(i.right,r);if(i.type==="record"||i.type==="map")return zr(i.keyType,r)||zr(i.valueType,r);if(i.type==="pipe")return zr(i.in,r)||zr(i.out,r);if(i.type==="object"){for(let n in i.shape)if(zr(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(zr(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(zr(n,r))return!0;return!!(i.rest&&zr(i.rest,r))}return!1}a(zr,"isTransforming");var Jg=a((e,t={})=>r=>{let i=pi({...r,processors:t});return Rt(e,i),hi(i,e),gi(i,e)},"createToJSONSchemaMethod"),is=a((e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=pi({...n??{},target:o,io:t,processors:r});return Rt(e,s),hi(s,e),gi(s,e)},"createStandardJSONSchemaMethod");var dR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},em=a((e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),c&&(n.format=dR[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let f=[...u];f.length===1?n.pattern=f[0].source:f.length>1&&(n.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},"stringProcessor"),tm=a((e,t,r,i)=>{let n=r,{minimum:o,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:f}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number",typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=f,n.exclusiveMinimum=!0):n.exclusiveMinimum=f),typeof o=="number"&&(n.minimum=o,typeof f=="number"&&t.target!=="draft-04"&&(f>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof s=="number"&&(n.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof u=="number"&&(n.multipleOf=u)},"numberProcessor"),rm=a((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),nm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),im=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),om=a((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),sm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),am=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),cm=a((e,t,r,i)=>{r.not={}},"neverProcessor"),um=a((e,t,r,i)=>{},"anyProcessor"),lm=a((e,t,r,i)=>{},"unknownProcessor"),fm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),dm=a((e,t,r,i)=>{let n=e._zod.def,o=oa(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},"enumProcessor"),pm=a((e,t,r,i)=>{let n=e._zod.def,o=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},"literalProcessor"),hm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),gm=a((e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},"templateLiteralProcessor"),mm=a((e,t,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(o.minLength=s),c!==void 0&&(o.maxLength=c),u?u.length===1?(o.contentMediaType=u[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,o)},"fileProcessor"),_m=a((e,t,r,i)=>{r.type="boolean"},"successProcessor"),ym=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Em=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),Am=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),bm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),xm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),Im=a((e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=Rt(o.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),vm=a((e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object",n.properties={};let s=o.shape;for(let l in s)n.properties[l]=Rt(s[l],t,{...i,path:[...i.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let f=o.shape[l]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));u.size>0&&(n.required=Array.from(u)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=Rt(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},"objectProcessor"),Df=a((e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,s=n.options.map((c,u)=>Rt(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?r.oneOf=s:r.anyOf=s},"unionProcessor"),Sm=a((e,t,r,i)=>{let n=e._zod.def,o=Rt(n.left,t,{...i,path:[...i.path,"allOf",0]}),s=Rt(n.right,t,{...i,path:[...i.path,"allOf",1]}),c=a(l=>"allOf"in l&&Object.keys(l).length===1,"isSimpleIntersection"),u=[...c(o)?o.allOf:[o],...c(s)?s.allOf:[s]];r.allOf=u},"intersectionProcessor"),wm=a((e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,h)=>Rt(g,t,{...i,path:[...i.path,s,h]})),l=o.rest?Rt(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(n.minItems=f),typeof p=="number"&&(n.maxItems=p)},"tupleProcessor"),Pm=a((e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let s=o.keyType,u=s._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let f=Rt(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let p of u)n.patternProperties[p.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Rt(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=Rt(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let f=[...l].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(n.required=f)}},"recordProcessor"),Tm=a((e,t,r,i)=>{let n=e._zod.def,o=Rt(n.innerType,t,i),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},"nullableProcessor"),km=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},"nonoptionalProcessor"),Cm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},"defaultProcessor"),Rm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},"prefaultProcessor"),Om=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},"catchProcessor"),Nm=a((e,t,r,i)=>{let n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Rt(o,t,i);let s=t.seen.get(e);s.ref=o},"pipeProcessor"),$m=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},"readonlyProcessor"),Dm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},"promiseProcessor"),Bf=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},"optionalProcessor"),Bm=a((e,t,r,i)=>{let n=e._zod.innerType;Rt(n,t,i);let o=t.seen.get(e);o.ref=n},"lazyProcessor"),$f={string:em,number:tm,boolean:rm,bigint:nm,symbol:im,null:om,undefined:sm,void:am,never:cm,any:um,unknown:lm,date:fm,enum:dm,literal:pm,nan:hm,template_literal:gm,file:mm,success:_m,custom:ym,function:Em,transform:Am,map:bm,set:xm,array:Im,object:vm,union:Df,intersection:Sm,tuple:wm,record:Pm,nullable:Tm,nonoptional:km,default:Cm,prefault:Rm,catch:Om,pipe:Nm,readonly:$m,promise:Dm,optional:Bf,lazy:Bm};function Tc(e,t){if("_idmap"in e){let i=e,n=pi({...t,processors:$f}),o={};for(let u of i._idmap.entries()){let[l,f]=u;Rt(f,n)}let s={},c={registry:i,uri:t?.uri,defs:o};n.external=c;for(let u of i._idmap.entries()){let[l,f]=u;hi(n,f),s[l]=gi(n,f)}if(Object.keys(o).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let r=pi({...t,processors:$f});return Rt(e,r),hi(r,e),gi(r,e)}a(Tc,"toJSONSchema");var zf=class{static{a(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=pi({processors:$f,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Rt(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),hi(this.ctx,t);let i=gi(this.ctx,t),{"~standard":n,...o}=i;return o}};var Ex={};var fr=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");We.init(e,t),e.def=t,e.type=t.type,e.parse=(r,i)=>qi(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Vo(e,r,i),e.parseAsync=async(r,i)=>Vi(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Qo(e,r,i),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]},{parent:!0}),e.with=e.check,e.clone=(r,i)=>yr(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.apply=r=>r(e)}),Lf=T("ZodMiniString",(e,t)=>{Fn.init(e,t),fr.init(e,t)});function I(e){return Ua(Lf,e)}a(I,"string");var os=T("ZodMiniStringFormat",(e,t)=>{Ct.init(e,t),Lf.init(e,t)});var gR=T("ZodMiniURL",(e,t)=>{ha.init(e,t),os.init(e,t)});function Ax(e){return Gi(gR,e)}a(Ax,"url");var Uf=T("ZodMiniNumber",(e,t)=>{Go.init(e,t),fr.init(e,t)});function Ar(e){return fc(Uf,e)}a(Ar,"number");var mR=T("ZodMiniNumberFormat",(e,t)=>{Ea.init(e,t),Uf.init(e,t)});function bx(e){return pc(mR,e)}a(bx,"int");var zm=T("ZodMiniBoolean",(e,t)=>{Qi.init(e,t),fr.init(e,t)});function yt(e){return hc(zm,e)}a(yt,"boolean");var xx=T("ZodMiniBigInt",(e,t)=>{Yo.init(e,t),fr.init(e,t)});var _R=T("ZodMiniAny",(e,t)=>{Aa.init(e,t),fr.init(e,t)});function kc(){return _c(_R)}a(kc,"any");var yR=T("ZodMiniUnknown",(e,t)=>{ba.init(e,t),fr.init(e,t)});function Ye(){return yc(yR)}a(Ye,"unknown");var ER=T("ZodMiniVoid",(e,t)=>{xa.init(e,t),fr.init(e,t)});function Ix(e){return Ec(ER,e)}a(Ix,"_void");var vx=T("ZodMiniDate",(e,t)=>{Ia.init(e,t),fr.init(e,t)});var AR=T("ZodMiniArray",(e,t)=>{va.init(e,t),fr.init(e,t)});function Me(e,t){return new AR({type:"array",element:e,...ue(t)})}a(Me,"array");var bR=T("ZodMiniObject",(e,t)=>{Vl.init(e,t),fr.init(e,t),ot(e,"shape",()=>t.shape)});function N(e,t){let r={type:"object",shape:e??{},...ue(t)};return new bR(r)}a(N,"object");var xR=T("ZodMiniUnion",(e,t)=>{Ki.init(e,t),fr.init(e,t)});function st(e,t){return new xR({type:"union",options:e,...ue(t)})}a(st,"union");var IR=T("ZodMiniDiscriminatedUnion",(e,t)=>{Sa.init(e,t),fr.init(e,t)});function mi(e,t,r){return new IR({type:"union",options:t,discriminator:e,...ue(r)})}a(mi,"discriminatedUnion");var vR=T("ZodMiniRecord",(e,t)=>{Pa.init(e,t),fr.init(e,t)});function Xe(e,t,r){return new vR({type:"record",keyType:e,valueType:t,...ue(r)})}a(Xe,"record");var SR=T("ZodMiniEnum",(e,t)=>{Ta.init(e,t),fr.init(e,t),e.options=Object.values(t.entries)});function ze(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new SR({type:"enum",entries:r,...ue(t)})}a(ze,"_enum");var wR=T("ZodMiniLiteral",(e,t)=>{ka.init(e,t),fr.init(e,t)});function De(e,t){return new wR({type:"literal",values:Array.isArray(e)?e:[e],...ue(t)})}a(De,"literal");var PR=T("ZodMiniTransform",(e,t)=>{Ca.init(e,t),fr.init(e,t)});function _i(e){return new PR({type:"transform",transform:e})}a(_i,"transform");var TR=T("ZodMiniOptional",(e,t)=>{Xo.init(e,t),fr.init(e,t)});function Z(e){return new TR({type:"optional",innerType:e})}a(Z,"optional");var kR=T("ZodMiniNullable",(e,t)=>{Ra.init(e,t),fr.init(e,t)});function Cc(e){return new kR({type:"nullable",innerType:e})}a(Cc,"nullable");var CR=T("ZodMiniPipe",(e,t)=>{Oa.init(e,t),fr.init(e,t)});function yi(e,t){return new CR({type:"pipe",in:e,out:t})}a(yi,"pipe");var Sx=T("ZodMiniCustom",(e,t)=>{Na.init(e,t),fr.init(e,t)});function Mf(e,t){return wc(Sx,e??(()=>!0),t)}a(Mf,"custom");function Lm(e,t={}){return Pc(Sx,e,t)}a(Lm,"refine");var Ff={};cn(Ff,{ZodMiniISODate:()=>Mm,ZodMiniISODateTime:()=>Um,ZodMiniISODuration:()=>Hm,ZodMiniISOTime:()=>Fm,date:()=>OR,datetime:()=>RR,duration:()=>$R,time:()=>NR});var Um=T("ZodMiniISODateTime",(e,t)=>{ga.init(e,t),os.init(e,t)});function RR(e){return ac(Um,e)}a(RR,"datetime");var Mm=T("ZodMiniISODate",(e,t)=>{ma.init(e,t),os.init(e,t)});function OR(e){return cc(Mm,e)}a(OR,"date");var Fm=T("ZodMiniISOTime",(e,t)=>{_a.init(e,t),os.init(e,t)});function NR(e){return uc(Fm,e)}a(NR,"time");var Hm=T("ZodMiniISODuration",(e,t)=>{ya.init(e,t),os.init(e,t)});function $R(e){return lc(Hm,e)}a($R,"duration");var Rc={};cn(Rc,{bigint:()=>LR,boolean:()=>zR,date:()=>UR,number:()=>BR,string:()=>DR});function DR(e){return Ma(Lf,e)}a(DR,"string");function BR(e){return dc(Uf,e)}a(BR,"number");function zR(e){return gc(zm,e)}a(zR,"boolean");function LR(e){return mc(xx,e)}a(LR,"bigint");function UR(e){return Ac(vx,e)}a(UR,"date");var Wm=N({retryOnFailure:N({defaultValue:Z(yt()),hide:Z(yt())}),continueOnFailure:N({defaultValue:Z(yt()),hide:Z(yt())})}),jm=class{constructor(t,r,i,n,o,s,c,u,l,f,p,g,h){this.name=t;this.displayName=r;this.description=i;this.props=n;this.propertyGroups=o;this.run=s;this.test=c;this.requireAuth=u;this.errorHandlingOptions=l;this.outputSchema=f;this.audience=p;this.aiMetadata=g;this.classification=h}static{a(this,"IAction")}},Cr=a(e=>new jm(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var mt=N({displayName:I(),description:Z(I()),advanced:Z(yt()),width:Z(ze(["half","full"])),icon:Z(I()),placeholder:Z(I())}),et=a((e,t)=>N({type:De(t),required:yt(),defaultValue:Z(kc())}),"TPropertyValue");var tn=N({...mt.shape,...et(I(),"SHORT_TEXT").shape}),Wn=N({...mt.shape,...et(I(),"LONG_TEXT").shape});var Px=N({label:I(),value:Ye(),description:Z(I()),icon:Z(I())}),Hf=N({disabled:Z(yt()),placeholder:Z(I()),options:Me(Px)});var FR=ze(["cards"]),rn=N({...mt.shape,options:Hf,display:Z(FR),...et(Ye(),"STATIC_DROPDOWN").shape}),qn=N({...mt.shape,options:Hf,...et(Me(Ye()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var qm=N({...mt.shape,...et(Ye(),"DROPDOWN").shape,refreshers:Me(I())}),Oc=N({...mt.shape,...et(Me(Ye()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Me(I())});var Vn=N({...mt.shape,reveals:Z(Me(I())),...et(yt(),"CHECKBOX").shape});var Zn=N({...mt.shape,display:Z(ze(["stepper"])),min:Z(Ar()),max:Z(Ar()),step:Z(Ar()),...et(Ar(),"NUMBER").shape});var Nc=N({...mt.shape,streaming:Z(yt()),...et(Ye(),"FILE").shape});var $c=N({...mt.shape,...et(I(),"DATE_TIME").shape});var Tx=Xe(I(),st([tn,Wn,rn,Oc,qn,Vn,Zn,Nc,$c])),Dc=N({...mt.shape,properties:Tx,...et(Me(Ye()),"ARRAY").shape});var kx=ze(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),Cx=N({preset:Z(kx),after:Z(I()),before:Z(I())}),Vm=N({...mt.shape,display:Z(ze(["dropdown"])),...et(Cx,"DATE_RANGE").shape});var Bc=N({...mt.shape,...et(st([Xe(I(),Ye())]),"JSON").shape});var Rx=st([tn,rn,Bc,Dc,qn]),HR=Xe(I(),Rx),Zm=N({refreshers:Me(I()),...mt.shape,...et(Ye(),"DYNAMIC").shape});var jf=N({...mt.shape,...et(Ix(),"MARKDOWN").shape});var zc=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(zc||{}),ss=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(ss||{}),as=(v=>(v.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",v.COMMUNICATION="COMMUNICATION",v.COMMERCE="COMMERCE",v.CORE="CORE",v.UNIVERSAL_AI="UNIVERSAL_AI",v.FLOW_CONTROL="FLOW_CONTROL",v.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",v.ACCOUNTING="ACCOUNTING",v.PRODUCTIVITY="PRODUCTIVITY",v.CONTENT_AND_FILES="CONTENT_AND_FILES",v.DEVELOPER_TOOLS="DEVELOPER_TOOLS",v.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",v.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",v.HUMAN_RESOURCES="HUMAN_RESOURCES",v.PAYMENT_PROCESSING="PAYMENT_PROCESSING",v.MARKETING="MARKETING",v.SALES_AND_CRM="SALES_AND_CRM",v))(as||{});var Lc=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Lc||{}),Qm="both_client_credentials_and_authorization_code";var Ei=(n=>(n.POLLING="POLLING",n.WEBHOOK="WEBHOOK",n.APP_WEBHOOK="APP_WEBHOOK",n.MANUAL="MANUAL",n))(Ei||{}),Uc=(o=>(o.NONE="NONE",o.HEADER_PRESENT="HEADER_PRESENT",o.QUERY_PRESENT="QUERY_PRESENT",o.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",o.HEAD_REQUEST="HEAD_REQUEST",o))(Uc||{}),jR=N({strategy:ze(Uc),paramName:Z(I())}),Mc=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Mc||{});var Wf=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Wf||{}),Ox=N({status:Z(Ar()),body:Z(Ye()),headers:Z(Xe(I(),I()))}),Nx=N({type:De("DELAY"),resumeDateTime:I(),requestIdToReply:Z(I()),handlerId:Z(I()),streamStepProgress:Z(ze(Wf))}),$x=N({type:De("WEBHOOK"),requestId:I(),requestIdToReply:Z(I()),response:Ox,handlerId:Z(I()),streamStepProgress:Z(ze(Wf))}),WR=st([Nx,$x]);var qR=N({body:Ye(),rawBody:Z(Ye()),headers:Xe(I(),I()),queryParams:Xe(I(),I())});function ir(e){return e==null}a(ir,"isNil");var Gm=Dr(require("crypto"),1);var VR=128,Ai,cs,ZR=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!Ai||Ai.length<e?(Ai=Buffer.allocUnsafe(e*VR),Gm.default.randomFillSync(Ai),cs=0):cs+e>Ai.length&&(Gm.default.randomFillSync(Ai),cs=0)}catch(t){throw Ai=void 0,t}cs+=e},"fillPool"),QR=a(e=>(ZR(e|=0),Ai.subarray(cs-e,cs)),"random"),KR=a((e,t,r)=>{let i=(2<<31-Math.clz32(e.length-1|1))-1,n=Math.ceil(1.6*i*t/e.length);return(o=t)=>{if(o<=0)return"";let s="";for(;;){let c=r(n),u=n;for(;u--;)if(s+=e[c[u]&i]||"",s.length===o)return s}}},"customRandom"),Dx=a((e,t=21)=>KR(e,t,QR),"customAlphabet");var GR="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bx=21,k8=I().check(Ir(new RegExp(`^[0-9a-zA-Z]{${Bx}}$`))),YR=Dx(GR,Bx);var bi=yi(_i(e=>e instanceof Date?e.toISOString():e),I()),fn={id:I(),created:bi,updated:bi},Qt=a(e=>Z(Cc(e)),"Nullable");function Ym(e){return Z(Cc(ze(e)))}a(Ym,"NullableEnum");var O8=yi(_i(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),Z(yt())),N8=Z(Ff.datetime({offset:!0}).check(Lm(e=>e.slice(0,4)!=="0000"))),qf=a(e=>yi(_i(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),Z(Me(e))),"OptionalArrayFromQuery");var B8=Xe(I(),Ye());var xi=(v=>(v.OPENAI="openai",v.OPENROUTER="openrouter",v.ANTHROPIC="anthropic",v.AZURE="azure",v.GOOGLE="google",v.ACTIVEPIECES="activepieces",v.CLOUDFLARE_GATEWAY="cloudflare-gateway",v.CUSTOM="custom",v.BEDROCK="bedrock",v.VERTEX="vertex",v.MISTRAL="mistral",v.XAI="xai",v.DEEPSEEK="deepseek",v.ZAI="zai",v.QWEN="qwen",v.MINIMAX="minimax",v.MOONSHOT="moonshot",v))(xi||{});var ge={};cn(ge,{$brand:()=>na,$input:()=>pf,$output:()=>df,NEVER:()=>Xu,TimePrecision:()=>gf,ZodAny:()=>b_,ZodArray:()=>S_,ZodBase64:()=>dd,ZodBase64URL:()=>pd,ZodBigInt:()=>gs,ZodBigIntFormat:()=>md,ZodBoolean:()=>hs,ZodCIDRv4:()=>ld,ZodCIDRv6:()=>fd,ZodCUID:()=>nd,ZodCUID2:()=>id,ZodCatch:()=>Z_,ZodCodec:()=>vd,ZodCustom:()=>Xc,ZodCustomStringFormat:()=>ds,ZodDate:()=>Zc,ZodDefault:()=>F_,ZodDiscriminatedUnion:()=>P_,ZodE164:()=>hd,ZodEmail:()=>ed,ZodEmoji:()=>td,ZodEnum:()=>ls,ZodError:()=>XR,ZodExactOptional:()=>L_,ZodFile:()=>B_,ZodFirstPartyTypeKind:()=>oy,ZodFunction:()=>ry,ZodGUID:()=>Hc,ZodIPv4:()=>cd,ZodIPv6:()=>ud,ZodISODate:()=>Qf,ZodISODateTime:()=>Zf,ZodISODuration:()=>Gf,ZodISOTime:()=>Kf,ZodIntersection:()=>T_,ZodIssueCode:()=>eO,ZodJWT:()=>gd,ZodKSUID:()=>ad,ZodLazy:()=>J_,ZodLiteral:()=>D_,ZodMAC:()=>h_,ZodMap:()=>N_,ZodNaN:()=>K_,ZodNanoID:()=>rd,ZodNever:()=>I_,ZodNonOptional:()=>xd,ZodNull:()=>E_,ZodNullable:()=>M_,ZodNumber:()=>ps,ZodNumberFormat:()=>uo,ZodObject:()=>Kc,ZodOptional:()=>bd,ZodPipe:()=>Id,ZodPrefault:()=>j_,ZodPromise:()=>ty,ZodReadonly:()=>G_,ZodRealError:()=>Vr,ZodRecord:()=>Yc,ZodSet:()=>$_,ZodString:()=>fs,ZodStringFormat:()=>Dt,ZodSuccess:()=>V_,ZodSymbol:()=>__,ZodTemplateLiteral:()=>X_,ZodTransform:()=>z_,ZodTuple:()=>C_,ZodType:()=>at,ZodULID:()=>od,ZodURL:()=>Vc,ZodUUID:()=>kn,ZodUndefined:()=>y_,ZodUnion:()=>Gc,ZodUnknown:()=>x_,ZodVoid:()=>v_,ZodXID:()=>sd,ZodXor:()=>w_,_ZodString:()=>Jf,_default:()=>H_,_function:()=>j0,any:()=>b0,array:()=>Qc,base64:()=>i0,base64url:()=>o0,bigint:()=>m0,boolean:()=>m_,catch:()=>Q_,check:()=>W0,cidrv4:()=>r0,cidrv6:()=>n0,clone:()=>yr,codec:()=>M0,coerce:()=>sy,config:()=>Zt,core:()=>en,cuid:()=>Qx,cuid2:()=>Kx,custom:()=>q0,date:()=>I0,decode:()=>a_,decodeAsync:()=>u_,describe:()=>V0,discriminatedUnion:()=>k0,e164:()=>s0,email:()=>Lx,emoji:()=>Vx,encode:()=>s_,encodeAsync:()=>c_,endsWith:()=>to,enum:()=>Ed,exactOptional:()=>U_,file:()=>B0,flattenError:()=>Fo,float32:()=>d0,float64:()=>p0,formatError:()=>Ho,fromJSONSchema:()=>J0,function:()=>j0,getErrorMap:()=>rO,globalRegistry:()=>Er,gt:()=>bn,gte:()=>mr,guid:()=>Ux,hash:()=>f0,hex:()=>l0,hostname:()=>u0,httpUrl:()=>qx,includes:()=>Ji,instanceof:()=>Q0,int:()=>Xf,int32:()=>h0,int64:()=>_0,intersection:()=>k_,ipv4:()=>Jx,ipv6:()=>t0,iso:()=>us,json:()=>G0,jwt:()=>a0,keyof:()=>v0,ksuid:()=>Xx,lazy:()=>ey,length:()=>di,literal:()=>D0,locales:()=>ts,looseObject:()=>P0,looseRecord:()=>R0,lowercase:()=>Yi,lt:()=>An,lte:()=>Br,mac:()=>e0,map:()=>O0,maxLength:()=>fi,maxSize:()=>jn,meta:()=>Z0,mime:()=>ro,minLength:()=>cr,minSize:()=>xn,multipleOf:()=>Hn,nan:()=>U0,nanoid:()=>Zx,nativeEnum:()=>$0,negative:()=>xc,never:()=>_d,nonnegative:()=>vc,nonoptional:()=>q_,nonpositive:()=>Ic,normalize:()=>no,null:()=>A_,nullable:()=>Wc,nullish:()=>z0,number:()=>g_,object:()=>S0,optional:()=>jc,overwrite:()=>ln,parse:()=>r_,parseAsync:()=>n_,partialRecord:()=>C0,pipe:()=>qc,positive:()=>bc,prefault:()=>W_,preprocess:()=>Y0,prettifyError:()=>nl,promise:()=>H0,property:()=>Sc,readonly:()=>Y_,record:()=>O_,refine:()=>ny,regex:()=>Ir,regexes:()=>qr,registry:()=>La,safeDecode:()=>f_,safeDecodeAsync:()=>p_,safeEncode:()=>l_,safeEncodeAsync:()=>d_,safeParse:()=>i_,safeParseAsync:()=>o_,set:()=>N0,setErrorMap:()=>tO,size:()=>li,slugify:()=>ns,startsWith:()=>eo,strictObject:()=>w0,string:()=>Yf,stringFormat:()=>c0,stringbool:()=>K0,success:()=>L0,superRefine:()=>iy,symbol:()=>E0,templateLiteral:()=>F0,toJSONSchema:()=>Tc,toLowerCase:()=>oo,toUpperCase:()=>so,transform:()=>Ad,treeifyError:()=>rl,trim:()=>io,tuple:()=>R_,uint32:()=>g0,uint64:()=>y0,ulid:()=>Gx,undefined:()=>A0,union:()=>yd,unknown:()=>co,uppercase:()=>Xi,url:()=>Wx,util:()=>fe,uuid:()=>Mx,uuidv4:()=>Fx,uuidv6:()=>Hx,uuidv7:()=>jx,void:()=>x0,xid:()=>Yx,xor:()=>T0});var Fc={};cn(Fc,{ZodAny:()=>b_,ZodArray:()=>S_,ZodBase64:()=>dd,ZodBase64URL:()=>pd,ZodBigInt:()=>gs,ZodBigIntFormat:()=>md,ZodBoolean:()=>hs,ZodCIDRv4:()=>ld,ZodCIDRv6:()=>fd,ZodCUID:()=>nd,ZodCUID2:()=>id,ZodCatch:()=>Z_,ZodCodec:()=>vd,ZodCustom:()=>Xc,ZodCustomStringFormat:()=>ds,ZodDate:()=>Zc,ZodDefault:()=>F_,ZodDiscriminatedUnion:()=>P_,ZodE164:()=>hd,ZodEmail:()=>ed,ZodEmoji:()=>td,ZodEnum:()=>ls,ZodExactOptional:()=>L_,ZodFile:()=>B_,ZodFunction:()=>ry,ZodGUID:()=>Hc,ZodIPv4:()=>cd,ZodIPv6:()=>ud,ZodIntersection:()=>T_,ZodJWT:()=>gd,ZodKSUID:()=>ad,ZodLazy:()=>J_,ZodLiteral:()=>D_,ZodMAC:()=>h_,ZodMap:()=>N_,ZodNaN:()=>K_,ZodNanoID:()=>rd,ZodNever:()=>I_,ZodNonOptional:()=>xd,ZodNull:()=>E_,ZodNullable:()=>M_,ZodNumber:()=>ps,ZodNumberFormat:()=>uo,ZodObject:()=>Kc,ZodOptional:()=>bd,ZodPipe:()=>Id,ZodPrefault:()=>j_,ZodPromise:()=>ty,ZodReadonly:()=>G_,ZodRecord:()=>Yc,ZodSet:()=>$_,ZodString:()=>fs,ZodStringFormat:()=>Dt,ZodSuccess:()=>V_,ZodSymbol:()=>__,ZodTemplateLiteral:()=>X_,ZodTransform:()=>z_,ZodTuple:()=>C_,ZodType:()=>at,ZodULID:()=>od,ZodURL:()=>Vc,ZodUUID:()=>kn,ZodUndefined:()=>y_,ZodUnion:()=>Gc,ZodUnknown:()=>x_,ZodVoid:()=>v_,ZodXID:()=>sd,ZodXor:()=>w_,_ZodString:()=>Jf,_default:()=>H_,_function:()=>j0,any:()=>b0,array:()=>Qc,base64:()=>i0,base64url:()=>o0,bigint:()=>m0,boolean:()=>m_,catch:()=>Q_,check:()=>W0,cidrv4:()=>r0,cidrv6:()=>n0,codec:()=>M0,cuid:()=>Qx,cuid2:()=>Kx,custom:()=>q0,date:()=>I0,describe:()=>V0,discriminatedUnion:()=>k0,e164:()=>s0,email:()=>Lx,emoji:()=>Vx,enum:()=>Ed,exactOptional:()=>U_,file:()=>B0,float32:()=>d0,float64:()=>p0,function:()=>j0,guid:()=>Ux,hash:()=>f0,hex:()=>l0,hostname:()=>u0,httpUrl:()=>qx,instanceof:()=>Q0,int:()=>Xf,int32:()=>h0,int64:()=>_0,intersection:()=>k_,ipv4:()=>Jx,ipv6:()=>t0,json:()=>G0,jwt:()=>a0,keyof:()=>v0,ksuid:()=>Xx,lazy:()=>ey,literal:()=>D0,looseObject:()=>P0,looseRecord:()=>R0,mac:()=>e0,map:()=>O0,meta:()=>Z0,nan:()=>U0,nanoid:()=>Zx,nativeEnum:()=>$0,never:()=>_d,nonoptional:()=>q_,null:()=>A_,nullable:()=>Wc,nullish:()=>z0,number:()=>g_,object:()=>S0,optional:()=>jc,partialRecord:()=>C0,pipe:()=>qc,prefault:()=>W_,preprocess:()=>Y0,promise:()=>H0,readonly:()=>Y_,record:()=>O_,refine:()=>ny,set:()=>N0,strictObject:()=>w0,string:()=>Yf,stringFormat:()=>c0,stringbool:()=>K0,success:()=>L0,superRefine:()=>iy,symbol:()=>E0,templateLiteral:()=>F0,transform:()=>Ad,tuple:()=>R_,uint32:()=>g0,uint64:()=>y0,ulid:()=>Gx,undefined:()=>A0,union:()=>yd,unknown:()=>co,url:()=>Wx,uuid:()=>Mx,uuidv4:()=>Fx,uuidv6:()=>Hx,uuidv7:()=>jx,void:()=>x0,xid:()=>Yx,xor:()=>T0});var Vf={};cn(Vf,{endsWith:()=>to,gt:()=>bn,gte:()=>mr,includes:()=>Ji,length:()=>di,lowercase:()=>Yi,lt:()=>An,lte:()=>Br,maxLength:()=>fi,maxSize:()=>jn,mime:()=>ro,minLength:()=>cr,minSize:()=>xn,multipleOf:()=>Hn,negative:()=>xc,nonnegative:()=>vc,nonpositive:()=>Ic,normalize:()=>no,overwrite:()=>ln,positive:()=>bc,property:()=>Sc,regex:()=>Ir,size:()=>li,slugify:()=>ns,startsWith:()=>eo,toLowerCase:()=>oo,toUpperCase:()=>so,trim:()=>io,uppercase:()=>Xi});var us={};cn(us,{ZodISODate:()=>Qf,ZodISODateTime:()=>Zf,ZodISODuration:()=>Gf,ZodISOTime:()=>Kf,date:()=>Jm,datetime:()=>Xm,duration:()=>t_,time:()=>e_});var Zf=T("ZodISODateTime",(e,t)=>{ga.init(e,t),Dt.init(e,t)});function Xm(e){return ac(Zf,e)}a(Xm,"datetime");var Qf=T("ZodISODate",(e,t)=>{ma.init(e,t),Dt.init(e,t)});function Jm(e){return cc(Qf,e)}a(Jm,"date");var Kf=T("ZodISOTime",(e,t)=>{_a.init(e,t),Dt.init(e,t)});function e_(e){return uc(Kf,e)}a(e_,"time");var Gf=T("ZodISODuration",(e,t)=>{ya.init(e,t),Dt.init(e,t)});function t_(e){return lc(Gf,e)}a(t_,"duration");var zx=a((e,t)=>{la.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(r=>Ho(e,r),"value")},flatten:{value:a(r=>Fo(e,r),"value")},addIssue:{value:a(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Lo,2)},"value")},addIssues:{value:a(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Lo,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),XR=T("ZodError",zx),Vr=T("ZodError",zx,{Parent:Error});var r_=jo(Vr),n_=Wo(Vr),i_=qo(Vr),o_=Zo(Vr),s_=il(Vr),a_=ol(Vr),c_=sl(Vr),u_=al(Vr),l_=cl(Vr),f_=ul(Vr),d_=ll(Vr),p_=fl(Vr);var at=T("ZodType",(e,t)=>(We.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:is(e,"input"),output:is(e,"output")}}),e.toJSONSchema=Jg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(fe.mergeDefs(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>yr(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>r_(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>i_(e,r,i),e.parseAsync=async(r,i)=>n_(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>o_(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>s_(e,r,i),e.decode=(r,i)=>a_(e,r,i),e.encodeAsync=async(r,i)=>c_(e,r,i),e.decodeAsync=async(r,i)=>u_(e,r,i),e.safeEncode=(r,i)=>l_(e,r,i),e.safeDecode=(r,i)=>f_(e,r,i),e.safeEncodeAsync=async(r,i)=>d_(e,r,i),e.safeDecodeAsync=async(r,i)=>p_(e,r,i),e.refine=(r,i)=>e.check(ny(r,i)),e.superRefine=r=>e.check(iy(r)),e.overwrite=r=>e.check(ln(r)),e.optional=()=>jc(e),e.exactOptional=()=>U_(e),e.nullable=()=>Wc(e),e.nullish=()=>jc(Wc(e)),e.nonoptional=r=>q_(e,r),e.array=()=>Qc(e),e.or=r=>yd([e,r]),e.and=r=>k_(e,r),e.transform=r=>qc(e,Ad(r)),e.default=r=>H_(e,r),e.prefault=r=>W_(e,r),e.catch=r=>Q_(e,r),e.pipe=r=>qc(e,r),e.readonly=()=>Y_(e),e.describe=r=>{let i=e.clone();return Er.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return Er.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Er.get(e);let i=e.clone();return Er.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Jf=T("_ZodString",(e,t)=>{Fn.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>em(e,i,n,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(Ir(...i)),e.includes=(...i)=>e.check(Ji(...i)),e.startsWith=(...i)=>e.check(eo(...i)),e.endsWith=(...i)=>e.check(to(...i)),e.min=(...i)=>e.check(cr(...i)),e.max=(...i)=>e.check(fi(...i)),e.length=(...i)=>e.check(di(...i)),e.nonempty=(...i)=>e.check(cr(1,...i)),e.lowercase=i=>e.check(Yi(i)),e.uppercase=i=>e.check(Xi(i)),e.trim=()=>e.check(io()),e.normalize=(...i)=>e.check(no(...i)),e.toLowerCase=()=>e.check(oo()),e.toUpperCase=()=>e.check(so()),e.slugify=()=>e.check(ns())}),fs=T("ZodString",(e,t)=>{Fn.init(e,t),Jf.init(e,t),e.email=r=>e.check(Fa(ed,r)),e.url=r=>e.check(Gi(Vc,r)),e.jwt=r=>e.check(sc(gd,r)),e.emoji=r=>e.check(Va(td,r)),e.guid=r=>e.check(rs(Hc,r)),e.uuid=r=>e.check(Ha(kn,r)),e.uuidv4=r=>e.check(ja(kn,r)),e.uuidv6=r=>e.check(Wa(kn,r)),e.uuidv7=r=>e.check(qa(kn,r)),e.nanoid=r=>e.check(Za(rd,r)),e.guid=r=>e.check(rs(Hc,r)),e.cuid=r=>e.check(Qa(nd,r)),e.cuid2=r=>e.check(Ka(id,r)),e.ulid=r=>e.check(Ga(od,r)),e.base64=r=>e.check(nc(dd,r)),e.base64url=r=>e.check(ic(pd,r)),e.xid=r=>e.check(Ya(sd,r)),e.ksuid=r=>e.check(Xa(ad,r)),e.ipv4=r=>e.check(Ja(cd,r)),e.ipv6=r=>e.check(ec(ud,r)),e.cidrv4=r=>e.check(tc(ld,r)),e.cidrv6=r=>e.check(rc(fd,r)),e.e164=r=>e.check(oc(hd,r)),e.datetime=r=>e.check(Xm(r)),e.date=r=>e.check(Jm(r)),e.time=r=>e.check(e_(r)),e.duration=r=>e.check(t_(r))});function Yf(e){return Ua(fs,e)}a(Yf,"string");var Dt=T("ZodStringFormat",(e,t)=>{Ct.init(e,t),Jf.init(e,t)}),ed=T("ZodEmail",(e,t)=>{Il.init(e,t),Dt.init(e,t)});function Lx(e){return Fa(ed,e)}a(Lx,"email");var Hc=T("ZodGUID",(e,t)=>{bl.init(e,t),Dt.init(e,t)});function Ux(e){return rs(Hc,e)}a(Ux,"guid");var kn=T("ZodUUID",(e,t)=>{xl.init(e,t),Dt.init(e,t)});function Mx(e){return Ha(kn,e)}a(Mx,"uuid");function Fx(e){return ja(kn,e)}a(Fx,"uuidv4");function Hx(e){return Wa(kn,e)}a(Hx,"uuidv6");function jx(e){return qa(kn,e)}a(jx,"uuidv7");var Vc=T("ZodURL",(e,t)=>{ha.init(e,t),Dt.init(e,t)});function Wx(e){return Gi(Vc,e)}a(Wx,"url");function qx(e){return Gi(Vc,{protocol:/^https?$/,hostname:qr.domain,...fe.normalizeParams(e)})}a(qx,"httpUrl");var td=T("ZodEmoji",(e,t)=>{vl.init(e,t),Dt.init(e,t)});function Vx(e){return Va(td,e)}a(Vx,"emoji");var rd=T("ZodNanoID",(e,t)=>{Sl.init(e,t),Dt.init(e,t)});function Zx(e){return Za(rd,e)}a(Zx,"nanoid");var nd=T("ZodCUID",(e,t)=>{wl.init(e,t),Dt.init(e,t)});function Qx(e){return Qa(nd,e)}a(Qx,"cuid");var id=T("ZodCUID2",(e,t)=>{Pl.init(e,t),Dt.init(e,t)});function Kx(e){return Ka(id,e)}a(Kx,"cuid2");var od=T("ZodULID",(e,t)=>{Tl.init(e,t),Dt.init(e,t)});function Gx(e){return Ga(od,e)}a(Gx,"ulid");var sd=T("ZodXID",(e,t)=>{kl.init(e,t),Dt.init(e,t)});function Yx(e){return Ya(sd,e)}a(Yx,"xid");var ad=T("ZodKSUID",(e,t)=>{Cl.init(e,t),Dt.init(e,t)});function Xx(e){return Xa(ad,e)}a(Xx,"ksuid");var cd=T("ZodIPv4",(e,t)=>{Rl.init(e,t),Dt.init(e,t)});function Jx(e){return Ja(cd,e)}a(Jx,"ipv4");var h_=T("ZodMAC",(e,t)=>{Nl.init(e,t),Dt.init(e,t)});function e0(e){return hf(h_,e)}a(e0,"mac");var ud=T("ZodIPv6",(e,t)=>{Ol.init(e,t),Dt.init(e,t)});function t0(e){return ec(ud,e)}a(t0,"ipv6");var ld=T("ZodCIDRv4",(e,t)=>{$l.init(e,t),Dt.init(e,t)});function r0(e){return tc(ld,e)}a(r0,"cidrv4");var fd=T("ZodCIDRv6",(e,t)=>{Dl.init(e,t),Dt.init(e,t)});function n0(e){return rc(fd,e)}a(n0,"cidrv6");var dd=T("ZodBase64",(e,t)=>{Bl.init(e,t),Dt.init(e,t)});function i0(e){return nc(dd,e)}a(i0,"base64");var pd=T("ZodBase64URL",(e,t)=>{zl.init(e,t),Dt.init(e,t)});function o0(e){return ic(pd,e)}a(o0,"base64url");var hd=T("ZodE164",(e,t)=>{Ll.init(e,t),Dt.init(e,t)});function s0(e){return oc(hd,e)}a(s0,"e164");var gd=T("ZodJWT",(e,t)=>{Ul.init(e,t),Dt.init(e,t)});function a0(e){return sc(gd,e)}a(a0,"jwt");var ds=T("ZodCustomStringFormat",(e,t)=>{Ml.init(e,t),Dt.init(e,t)});function c0(e,t,r={}){return ao(ds,e,t,r)}a(c0,"stringFormat");function u0(e){return ao(ds,"hostname",qr.hostname,e)}a(u0,"hostname");function l0(e){return ao(ds,"hex",qr.hex,e)}a(l0,"hex");function f0(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=qr[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return ao(ds,i,n,t)}a(f0,"hash");var ps=T("ZodNumber",(e,t)=>{Go.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>tm(e,i,n,o),e.gt=(i,n)=>e.check(bn(i,n)),e.gte=(i,n)=>e.check(mr(i,n)),e.min=(i,n)=>e.check(mr(i,n)),e.lt=(i,n)=>e.check(An(i,n)),e.lte=(i,n)=>e.check(Br(i,n)),e.max=(i,n)=>e.check(Br(i,n)),e.int=i=>e.check(Xf(i)),e.safe=i=>e.check(Xf(i)),e.positive=i=>e.check(bn(0,i)),e.nonnegative=i=>e.check(mr(0,i)),e.negative=i=>e.check(An(0,i)),e.nonpositive=i=>e.check(Br(0,i)),e.multipleOf=(i,n)=>e.check(Hn(i,n)),e.step=(i,n)=>e.check(Hn(i,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function g_(e){return fc(ps,e)}a(g_,"number");var uo=T("ZodNumberFormat",(e,t)=>{Ea.init(e,t),ps.init(e,t)});function Xf(e){return pc(uo,e)}a(Xf,"int");function d0(e){return mf(uo,e)}a(d0,"float32");function p0(e){return _f(uo,e)}a(p0,"float64");function h0(e){return yf(uo,e)}a(h0,"int32");function g0(e){return Ef(uo,e)}a(g0,"uint32");var hs=T("ZodBoolean",(e,t)=>{Qi.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rm(e,r,i,n)});function m_(e){return hc(hs,e)}a(m_,"boolean");var gs=T("ZodBigInt",(e,t)=>{Yo.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>nm(e,i,n,o),e.gte=(i,n)=>e.check(mr(i,n)),e.min=(i,n)=>e.check(mr(i,n)),e.gt=(i,n)=>e.check(bn(i,n)),e.gte=(i,n)=>e.check(mr(i,n)),e.min=(i,n)=>e.check(mr(i,n)),e.lt=(i,n)=>e.check(An(i,n)),e.lte=(i,n)=>e.check(Br(i,n)),e.max=(i,n)=>e.check(Br(i,n)),e.positive=i=>e.check(bn(BigInt(0),i)),e.negative=i=>e.check(An(BigInt(0),i)),e.nonpositive=i=>e.check(Br(BigInt(0),i)),e.nonnegative=i=>e.check(mr(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(Hn(i,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function m0(e){return Af(gs,e)}a(m0,"bigint");var md=T("ZodBigIntFormat",(e,t)=>{Fl.init(e,t),gs.init(e,t)});function _0(e){return bf(md,e)}a(_0,"int64");function y0(e){return xf(md,e)}a(y0,"uint64");var __=T("ZodSymbol",(e,t)=>{Hl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>im(e,r,i,n)});function E0(e){return If(__,e)}a(E0,"symbol");var y_=T("ZodUndefined",(e,t)=>{jl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sm(e,r,i,n)});function A0(e){return vf(y_,e)}a(A0,"_undefined");var E_=T("ZodNull",(e,t)=>{Wl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>om(e,r,i,n)});function A_(e){return Sf(E_,e)}a(A_,"_null");var b_=T("ZodAny",(e,t)=>{Aa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>um(e,r,i,n)});function b0(){return _c(b_)}a(b0,"any");var x_=T("ZodUnknown",(e,t)=>{ba.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lm(e,r,i,n)});function co(){return yc(x_)}a(co,"unknown");var I_=T("ZodNever",(e,t)=>{ql.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cm(e,r,i,n)});function _d(e){return wf(I_,e)}a(_d,"never");var v_=T("ZodVoid",(e,t)=>{xa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>am(e,r,i,n)});function x0(e){return Ec(v_,e)}a(x0,"_void");var Zc=T("ZodDate",(e,t)=>{Ia.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>fm(e,i,n,o),e.min=(i,n)=>e.check(mr(i,n)),e.max=(i,n)=>e.check(Br(i,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function I0(e){return Pf(Zc,e)}a(I0,"date");var S_=T("ZodArray",(e,t)=>{va.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Im(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(cr(r,i)),e.nonempty=r=>e.check(cr(1,r)),e.max=(r,i)=>e.check(fi(r,i)),e.length=(r,i)=>e.check(di(r,i)),e.unwrap=()=>e.element});function Qc(e,t){return Xg(S_,e,t)}a(Qc,"array");function v0(e){let t=e._zod.def.shape;return Ed(Object.keys(t))}a(v0,"keyof");var Kc=T("ZodObject",(e,t)=>{og.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vm(e,r,i,n),fe.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Ed(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:co()}),e.loose=()=>e.clone({...e._zod.def,catchall:co()}),e.strict=()=>e.clone({...e._zod.def,catchall:_d()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>fe.extend(e,r),e.safeExtend=r=>fe.safeExtend(e,r),e.merge=r=>fe.merge(e,r),e.pick=r=>fe.pick(e,r),e.omit=r=>fe.omit(e,r),e.partial=(...r)=>fe.partial(bd,e,r[0]),e.required=(...r)=>fe.required(xd,e,r[0])});function S0(e,t){let r={type:"object",shape:e??{},...fe.normalizeParams(t)};return new Kc(r)}a(S0,"object");function w0(e,t){return new Kc({type:"object",shape:e,catchall:_d(),...fe.normalizeParams(t)})}a(w0,"strictObject");function P0(e,t){return new Kc({type:"object",shape:e,catchall:co(),...fe.normalizeParams(t)})}a(P0,"looseObject");var Gc=T("ZodUnion",(e,t)=>{Ki.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Df(e,r,i,n),e.options=t.options});function yd(e,t){return new Gc({type:"union",options:e,...fe.normalizeParams(t)})}a(yd,"union");var w_=T("ZodXor",(e,t)=>{Gc.init(e,t),Zl.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Df(e,r,i,n),e.options=t.options});function T0(e,t){return new w_({type:"union",options:e,inclusive:!1,...fe.normalizeParams(t)})}a(T0,"xor");var P_=T("ZodDiscriminatedUnion",(e,t)=>{Gc.init(e,t),Sa.init(e,t)});function k0(e,t,r){return new P_({type:"union",options:t,discriminator:e,...fe.normalizeParams(r)})}a(k0,"discriminatedUnion");var T_=T("ZodIntersection",(e,t)=>{Ql.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sm(e,r,i,n)});function k_(e,t){return new T_({type:"intersection",left:e,right:t})}a(k_,"intersection");var C_=T("ZodTuple",(e,t)=>{wa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wm(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function R_(e,t,r){let i=t instanceof We,n=i?r:t,o=i?t:null;return new C_({type:"tuple",items:e,rest:o,...fe.normalizeParams(n)})}a(R_,"tuple");var Yc=T("ZodRecord",(e,t)=>{Pa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pm(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function O_(e,t,r){return new Yc({type:"record",keyType:e,valueType:t,...fe.normalizeParams(r)})}a(O_,"record");function C0(e,t,r){let i=yr(e);return i._zod.values=void 0,new Yc({type:"record",keyType:i,valueType:t,...fe.normalizeParams(r)})}a(C0,"partialRecord");function R0(e,t,r){return new Yc({type:"record",keyType:e,valueType:t,mode:"loose",...fe.normalizeParams(r)})}a(R0,"looseRecord");var N_=T("ZodMap",(e,t)=>{Kl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bm(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(xn(...r)),e.nonempty=r=>e.check(xn(1,r)),e.max=(...r)=>e.check(jn(...r)),e.size=(...r)=>e.check(li(...r))});function O0(e,t,r){return new N_({type:"map",keyType:e,valueType:t,...fe.normalizeParams(r)})}a(O0,"map");var $_=T("ZodSet",(e,t)=>{Gl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xm(e,r,i,n),e.min=(...r)=>e.check(xn(...r)),e.nonempty=r=>e.check(xn(1,r)),e.max=(...r)=>e.check(jn(...r)),e.size=(...r)=>e.check(li(...r))});function N0(e,t){return new $_({type:"set",valueType:e,...fe.normalizeParams(t)})}a(N0,"set");var ls=T("ZodEnum",(e,t)=>{Ta.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>dm(e,i,n,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ls({...t,checks:[],...fe.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new ls({...t,checks:[],...fe.normalizeParams(n),entries:o})}});function Ed(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ls({type:"enum",entries:r,...fe.normalizeParams(t)})}a(Ed,"_enum");function $0(e,t){return new ls({type:"enum",entries:e,...fe.normalizeParams(t)})}a($0,"nativeEnum");var D_=T("ZodLiteral",(e,t)=>{ka.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>pm(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function D0(e,t){return new D_({type:"literal",values:Array.isArray(e)?e:[e],...fe.normalizeParams(t)})}a(D0,"literal");var B_=T("ZodFile",(e,t)=>{Yl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mm(e,r,i,n),e.min=(r,i)=>e.check(xn(r,i)),e.max=(r,i)=>e.check(jn(r,i)),e.mime=(r,i)=>e.check(ro(Array.isArray(r)?r:[r],i))});function B0(e){return kf(B_,e)}a(B0,"file");var z_=T("ZodTransform",(e,t)=>{Ca.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Am(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new oi(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(fe.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(fe.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Ad(e){return new z_({type:"transform",transform:e})}a(Ad,"transform");var bd=T("ZodOptional",(e,t)=>{Xo.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function jc(e){return new bd({type:"optional",innerType:e})}a(jc,"optional");var L_=T("ZodExactOptional",(e,t)=>{Xl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function U_(e){return new L_({type:"optional",innerType:e})}a(U_,"exactOptional");var M_=T("ZodNullable",(e,t)=>{Ra.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Wc(e){return new M_({type:"nullable",innerType:e})}a(Wc,"nullable");function z0(e){return jc(Wc(e))}a(z0,"nullish");var F_=T("ZodDefault",(e,t)=>{Jl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function H_(e,t){return new F_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():fe.shallowClone(t)}})}a(H_,"_default");var j_=T("ZodPrefault",(e,t)=>{ef.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function W_(e,t){return new j_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():fe.shallowClone(t)}})}a(W_,"prefault");var xd=T("ZodNonOptional",(e,t)=>{tf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>km(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function q_(e,t){return new xd({type:"nonoptional",innerType:e,...fe.normalizeParams(t)})}a(q_,"nonoptional");var V_=T("ZodSuccess",(e,t)=>{rf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_m(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function L0(e){return new V_({type:"success",innerType:e})}a(L0,"success");var Z_=T("ZodCatch",(e,t)=>{nf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Om(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Q_(e,t){return new Z_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(Q_,"_catch");var K_=T("ZodNaN",(e,t)=>{of.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hm(e,r,i,n)});function U0(e){return Tf(K_,e)}a(U0,"nan");var Id=T("ZodPipe",(e,t)=>{Oa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nm(e,r,i,n),e.in=t.in,e.out=t.out});function qc(e,t){return new Id({type:"pipe",in:e,out:t})}a(qc,"pipe");var vd=T("ZodCodec",(e,t)=>{Id.init(e,t),Jo.init(e,t)});function M0(e,t,r){return new vd({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}a(M0,"codec");var G_=T("ZodReadonly",(e,t)=>{sf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$m(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Y_(e){return new G_({type:"readonly",innerType:e})}a(Y_,"readonly");var X_=T("ZodTemplateLiteral",(e,t)=>{af.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gm(e,r,i,n)});function F0(e,t){return new X_({type:"template_literal",parts:e,...fe.normalizeParams(t)})}a(F0,"templateLiteral");var J_=T("ZodLazy",(e,t)=>{lf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bm(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function ey(e){return new J_({type:"lazy",getter:e})}a(ey,"lazy");var ty=T("ZodPromise",(e,t)=>{uf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function H0(e){return new ty({type:"promise",innerType:e})}a(H0,"promise");var ry=T("ZodFunction",(e,t)=>{cf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Em(e,r,i,n)});function j0(e){return new ry({type:"function",input:Array.isArray(e?.input)?R_(e?.input):e?.input??Qc(co()),output:e?.output??co()})}a(j0,"_function");var Xc=T("ZodCustom",(e,t)=>{Na.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ym(e,r,i,n)});function W0(e){let t=new $t({check:"custom"});return t._zod.check=e,t}a(W0,"check");function q0(e,t){return wc(Xc,e??(()=>!0),t)}a(q0,"custom");function ny(e,t={}){return Pc(Xc,e,t)}a(ny,"refine");function iy(e){return Cf(e)}a(iy,"superRefine");var V0=Rf,Z0=Of;function Q0(e,t={}){let r=new Xc({type:"custom",check:"custom",fn:a(i=>i instanceof e,"fn"),abort:!0,...fe.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}a(Q0,"_instanceof");var K0=a((...e)=>Nf({Codec:vd,Boolean:hs,String:fs},...e),"stringbool");function G0(e){let t=ey(()=>yd([Yf(e),g_(),m_(),A_(),Qc(t),O_(Yf(),t)]));return t}a(G0,"json");function Y0(e,t){return qc(Ad(e),t)}a(Y0,"preprocess");var eO={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function tO(e){Zt({customError:e})}a(tO,"setErrorMap");function rO(){return Zt().customError}a(rO,"getErrorMap");var oy;oy||(oy={});var ye={...Fc,...Vf,iso:us},nO=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function iO(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}a(iO,"detectVersion");function oO(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}a(oO,"resolveRef");function X0(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ye.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ye.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=oO(n,t),s=Rr(o,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ye.null();if(n.length===0)return ye.never();if(n.length===1)return ye.literal(n[0]);if(n.every(s=>typeof s=="string"))return ye.enum(n);let o=n.map(s=>ye.literal(s));return o.length<2?o[0]:ye.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ye.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...e,type:o};return X0(s,t)});return n.length===0?ye.never():n.length===1?n[0]:ye.union(n)}if(!r)return ye.any();let i;switch(r){case"string":{let n=ye.string();if(e.format){let o=e.format;o==="email"?n=n.check(ye.email()):o==="uri"||o==="uri-reference"?n=n.check(ye.url()):o==="uuid"||o==="guid"?n=n.check(ye.uuid()):o==="date-time"?n=n.check(ye.iso.datetime()):o==="date"?n=n.check(ye.iso.date()):o==="time"?n=n.check(ye.iso.time()):o==="duration"?n=n.check(ye.iso.duration()):o==="ipv4"?n=n.check(ye.ipv4()):o==="ipv6"?n=n.check(ye.ipv6()):o==="mac"?n=n.check(ye.mac()):o==="cidr"?n=n.check(ye.cidrv4()):o==="cidr-v6"?n=n.check(ye.cidrv6()):o==="base64"?n=n.check(ye.base64()):o==="base64url"?n=n.check(ye.base64url()):o==="e164"?n=n.check(ye.e164()):o==="jwt"?n=n.check(ye.jwt()):o==="emoji"?n=n.check(ye.emoji()):o==="nanoid"?n=n.check(ye.nanoid()):o==="cuid"?n=n.check(ye.cuid()):o==="cuid2"?n=n.check(ye.cuid2()):o==="ulid"?n=n.check(ye.ulid()):o==="xid"?n=n.check(ye.xid()):o==="ksuid"&&(n=n.check(ye.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?ye.number().int():ye.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=ye.boolean();break}case"null":{i=ye.null();break}case"object":{let n={},o=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let f=Rr(l,t);n[u]=s.has(u)?f:f.optional()}if(e.propertyNames){let u=Rr(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Rr(e.additionalProperties,t):ye.any();if(Object.keys(n).length===0){i=ye.record(u,l);break}let f=ye.object(n).passthrough(),p=ye.looseRecord(u,l);i=ye.intersection(f,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),f=[];for(let g of l){let h=Rr(u[g],t),_=ye.string().regex(new RegExp(g));f.push(ye.looseRecord(_,h))}let p=[];if(Object.keys(n).length>0&&p.push(ye.object(n).passthrough()),p.push(...f),p.length===0)i=ye.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=ye.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)g=ye.intersection(g,p[h]);i=g}break}let c=ye.object(n);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(Rr(e.additionalProperties,t)):i=c.passthrough();break}case"array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>Rr(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?Rr(o,t):void 0;c?i=ye.tuple(s).rest(c):i=ye.tuple(s),typeof e.minItems=="number"&&(i=i.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ye.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(u=>Rr(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?Rr(e.additionalItems,t):void 0;c?i=ye.tuple(s).rest(c):i=ye.tuple(s),typeof e.minItems=="number"&&(i=i.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ye.maxLength(e.maxItems)))}else if(o!==void 0){let s=Rr(o,t),c=ye.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=ye.array(ye.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}a(X0,"convertBaseSchema");function Rr(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let r=X0(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>Rr(l,t)),u=ye.union(c);r=i?ye.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>Rr(l,t)),u=ye.xor(c);r=i?ye.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:ye.any();else{let c=i?r:Rr(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=ye.intersection(c,Rr(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=ye.nullable(r)),e.readOnly===!0&&(r=ye.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of o)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))nO.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),r}a(Rr,"convertSchema");function J0(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let r=iO(e,t?.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Er};return Rr(e,n)}a(J0,"fromJSONSchema");var sy={};cn(sy,{bigint:()=>uO,boolean:()=>cO,date:()=>lO,number:()=>aO,string:()=>sO});function sO(e){return Ma(fs,e)}a(sO,"string");function aO(e){return dc(ps,e)}a(aO,"number");function cO(e){return gc(hs,e)}a(cO,"boolean");function uO(e){return mc(gs,e)}a(uO,"bigint");function lO(e){return Ac(Zc,e)}a(lO,"date");Zt($a());var ay={required:"required",invalidGitRepoSlug:"invalidGitRepoSlug",invalidGitRepoBranch:"invalidGitRepoBranch",invalidGitRepoRemoteUrl:"invalidGitRepoRemoteUrl",invalidExternalId:"invalidExternalId",invalidFileName:"invalidFileName",messageRequiresContentOrFiles:"messageRequiresContentOrFiles",agentConfigTooLarge:"agentConfigTooLarge",invalidGcpResourceId:"invalidGcpResourceId",duplicateRouteName:"duplicateRouteName",atLeastOne:"atLeastOne",wholeNumber:"wholeNumber",atMostTenThousand:"atMostTenThousand",tierNameTooLong:"tierNameTooLong",tierDescriptionTooLong:"tierDescriptionTooLong",invalidEmoji:"invalidEmoji",tierTooManyModels:"tierTooManyModels",tierDuplicateModel:"tierDuplicateModel",tierThinkingBudgetInvalid:"tierThinkingBudgetInvalid"};var eI=(r=>(r.IMAGE="image",r.TEXT="text",r))(eI||{}),Lr=ge.object({apiKey:ge.string()}),tI=ge.object({serviceAccountJson:ge.string().min(1)}),rI=Lr,nI=Lr.extend({apiKeyHash:ge.string()}),iI=Lr,oI=Lr,sI=Lr,aI=Lr,cI=Lr,uI=Lr,lI=ge.object({accessKeyId:ge.string().min(1),secretAccessKey:ge.string().min(1),sessionToken:ge.string().optional()}),fI=Lr,dI=ge.object({}),pI=ge.object({}),cy=ge.object({modelId:ge.string(),modelName:ge.string(),modelType:ge.enum(eI)}),hI=ge.object({apiKeyHeader:ge.string(),baseUrl:ge.string(),models:ge.array(cy),defaultHeaders:ge.record(ge.string(),ge.string()).optional(),apiStyle:ge.enum(["chat","responses"]).optional()}),gI=ge.object({accountId:ge.string(),gatewayId:ge.string(),models:ge.array(cy),vertexProject:ge.string().optional(),vertexRegion:ge.string().optional()}),mI=ge.object({resourceName:ge.string(),apiVersion:ge.preprocess(e=>typeof e=="string"&&e.trim().length===0?void 0:e,ge.string().optional())}),_I=ge.object({}),yI=ge.object({}),EI=ge.object({}),AI=ge.object({region:ge.string().min(1)}),bI=ge.object({project:ge.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,ay.invalidGcpResourceId),region:ge.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,ay.invalidGcpResourceId),models:ge.array(cy)}),xI=ge.object({}),lo=ge.object({}),wH=ge.union([rI,sI,aI,cI,uI,oI,iI,nI,lI,tI,fI]),PH=ge.union([hI,gI,mI,bI,AI,dI,_I,yI,EI,pI,xI,lo]),TH=ge.discriminatedUnion("provider",[ge.object({provider:ge.literal("openai"),config:yI.partial(),auth:cI.partial()}),ge.object({provider:ge.literal("openrouter"),config:EI.partial(),auth:uI.partial()}),ge.object({provider:ge.literal("anthropic"),config:dI.partial(),auth:rI.partial()}),ge.object({provider:ge.literal("azure"),config:mI.partial(),auth:sI.partial()}),ge.object({provider:ge.literal("google"),config:_I.partial(),auth:aI.partial()}),ge.object({provider:ge.literal("cloudflare-gateway"),config:gI.partial(),auth:oI.partial()}),ge.object({provider:ge.literal("custom"),config:hI.partial(),auth:iI.partial()}),ge.object({provider:ge.literal("activepieces"),config:pI.partial(),auth:nI.partial()}),ge.object({provider:ge.literal("bedrock"),config:AI.partial(),auth:lI.partial()}),ge.object({provider:ge.literal("vertex"),config:bI.partial(),auth:tI.partial()}),ge.object({provider:ge.literal("mistral"),config:xI.partial(),auth:fI.partial()}),ge.object({provider:ge.literal("xai"),config:lo.partial(),auth:Lr.partial()}),ge.object({provider:ge.literal("deepseek"),config:lo.partial(),auth:Lr.partial()}),ge.object({provider:ge.literal("zai"),config:lo.partial(),auth:Lr.partial()}),ge.object({provider:ge.literal("qwen"),config:lo.partial(),auth:Lr.partial()}),ge.object({provider:ge.literal("minimax"),config:lo.partial(),auth:Lr.partial()}),ge.object({provider:ge.literal("moonshot"),config:lo.partial(),auth:Lr.partial()})]);var UH=I().check(Ir(/^#[0-9A-Fa-f]{6}$/));var FH=N({filename:I(),data:Ye(),type:De("file"),mimetype:Z(I())});var fO=Dr(vI());var QH=N({...fn,name:I(),permissions:Me(I()),platformId:Qt(I()),type:I(),userCount:Z(Ar())});var ij=ge.enum(["active","out_of_credits","rejected","unreachable"]);var SI=(i=>(i.AGENT_DECIDE="agent-decide",i.CHOOSE_YOURSELF="choose-yourself",i.LEAVE_EMPTY="leave-empty",i))(SI||{}),uy=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(uy||{}),ly=(i=>(i.SSE="sse",i.STREAMABLE_HTTP="streamable-http",i.SIMPLE_HTTP="http",i))(ly||{});var fy=(i=>(i.TEXT="text",i.NUMBER="number",i.BOOLEAN="boolean",i))(fy||{});var dy=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(dy||{});var dO=N({mode:ze(SI),value:Ye()}),pO=N({auth:Z(I()),fields:Xe(I(),dO)}),hO=N({pieceName:I(),pieceVersion:I(),actionName:I(),predefinedInput:Z(pO)}),gO=N({type:De("PIECE"),toolName:I().check(cr(1)),pieceMetadata:hO}),mO=N({type:De("none")}),_O=N({type:De("access_token"),accessToken:I()}),yO=N({type:De("api_key"),apiKey:I(),apiKeyHeader:I()}),EO=N({type:De("headers"),headers:Xe(I(),I())}),AO=mi("type",[mO,_O,yO,EO]),wI=N({type:De("FLOW"),toolName:I().check(cr(1)),externalFlowId:I(),flowDisplayName:Z(I())}),PI=N({type:De("MCP"),toolName:I().check(cr(1)),serverUrl:Ax(),protocol:ze(ly),auth:AO}),TI=N({type:De("KNOWLEDGE_BASE"),toolName:I().check(cr(1)),sourceType:ze(uy),sourceId:I(),sourceName:I()}),bO=mi("type",[gO,wI,PI,TI]),xO=N({displayName:I(),description:Z(I()),type:ze(fy)}),kI=N({type:De("MARKDOWN"),markdown:I()}),ms={type:De("TOOL_CALL"),input:Qt(Xe(I(),Ye())),output:Z(Ye()),toolName:I(),status:ze(dy),toolCallId:I(),startTime:I(),endTime:Z(I())},qj=N(ms),CI=mi("toolCallType",[N({...ms,toolCallType:De("PIECE"),pieceName:I(),pieceVersion:I(),actionName:I()}),N({...ms,toolCallType:De("FLOW"),displayName:I(),externalFlowId:I()}),N({...ms,toolCallType:De("MCP"),displayName:I(),serverUrl:I()}),N({...ms,toolCallType:De("KNOWLEDGE_BASE"),displayName:I(),sourceType:I()}),N({...ms,toolCallType:De("UNKNOWN"),displayName:I()})]),IO=st([kI,CI]);var vO=10800*1e3,SO=900*1e3;var gy=(r=>(r.IMAGE="image",r.TEXT="text",r))(gy||{}),Qn=N({apiKey:I()}),PO=Qn,TO=N({apiKey:I(),apiKeyHash:I()}),kO=Qn,CO=Qn,RO=Qn,OO=Qn,NO=Qn,$O=Qn,DO=Qn,$I=N({serviceAccountJson:I().check(cr(1))}),DI=N({accessKeyId:I().check(cr(1)),secretAccessKey:I().check(cr(1)),sessionToken:Z(I())}),BO=N({}),zO=N({}),LO=N({}),UO=N({}),MO=N({}),FO=N({}),my=N({modelId:I(),modelName:I(),modelType:ze(gy)}),BI=N({apiKeyHeader:I(),baseUrl:I(),models:Me(my),defaultHeaders:Z(Xe(I(),I())),apiStyle:Z(ze(["chat","responses"]))}),zI=N({accountId:I(),gatewayId:I(),models:Me(my),vertexProject:Z(I()),vertexRegion:Z(I())}),LI=N({resourceName:I(),apiVersion:yi(_i(e=>typeof e=="string"&&e.trim().length===0?void 0:e),Z(I()))}),UI=N({region:I().check(cr(1))}),MI=N({project:I().check(Ir(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:I().check(Ir(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:Me(my)}),FI=N({}),HO=st([PO,RO,OO,NO,$O,CO,kO,TO,DI,$I,DO]),HI=st([BI,zI,LI,MI,UI,BO,LO,UO,MO,zO,FO,FI]),jO=N({id:I(),name:I(),type:ze(gy)}),WO=N({id:I(),name:I(),provider:ze(xi),config:HI,enabledForChat:yt()}),qO=N({provider:ze(xi),name:I(),enabledForChat:yt(),keys:Me(N({id:I(),name:I()}))}),VO=N({provider:ze(xi),configId:I(),config:HI,auth:HO,platformId:I()});var Kj={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},RI=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],ZO=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],jI=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],py=["gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],hy=["gemini-2.5-pro","gemini-2.5-flash"],QO=["grok-4.20"],Gj={google:hy,vertex:hy},Yj=jI.map(e=>`anthropic/${e}`),KO={openai:RI,anthropic:ZO,google:py,vertex:py,activepieces:[...jI.map(e=>`anthropic/${e}`),...RI.map(e=>`openai/${e}`),...[...py,...hy].map(e=>`google/${e}`),...QO.map(e=>`x-ai/${e}`)]};var OI=128e3,GO={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function YO({provider:e}){return e?GO[e]??OI:OI}a(YO,"getMaxContextTokens");var NI={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},XO={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},JO=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),eN={xai:"https://api.x.ai/v1",deepseek:"https://api.deepseek.com/v1",zai:"https://api.z.ai/api/paas/v4",qwen:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",minimax:"https://api.minimax.io/v1",moonshot:"https://api.moonshot.ai/v1"};function vr(e){return{chatModels:KO[e],maxContextTokens:YO({provider:e}),defaultEmbeddingModel:NI[e],supportsEmbedding:NI[e]!==void 0,supportsImageGeneration:!JO.has(e),defaultImageModel:tN[e],webSearch:XO[e]}}a(vr,"buildProviderCapabilities");var WI=[{id:"fast",label:"Fast",modelId:"google/gemini-3.1-flash-lite-image"},{id:"smart",label:"Expert",modelId:"google/gemini-3.1-flash-image"},{id:"premium",label:"Heavy",modelId:"google/gemini-3-pro-image"}],tN={activepieces:WI[0].modelId,openrouter:"google/gemini-3.1-flash-lite-image",openai:"gpt-image-1.5",google:"gemini-3.1-flash-image"},rN={openai:vr("openai"),anthropic:vr("anthropic"),openrouter:vr("openrouter"),azure:vr("azure"),google:vr("google"),"cloudflare-gateway":vr("cloudflare-gateway"),custom:vr("custom"),bedrock:vr("bedrock"),vertex:vr("vertex"),mistral:vr("mistral"),activepieces:vr("activepieces"),xai:vr("xai"),deepseek:vr("deepseek"),zai:vr("zai"),qwen:vr("qwen"),minimax:vr("minimax"),moonshot:vr("moonshot")};var nN=N({base64Url:I(),fileName:I(),extension:Z(I())}),iN=N({mimeType:I(),url:I(),fileName:Z(I())}),_y=st([nN,iN]);var oN=st([N({type:De("file"),value:_y}),N({type:De("markdown"),value:I(),files:Z(Me(_y))})]),sN=N({sessionId:I(),message:I(),files:Z(Me(I()))});var VI=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(VI||{}),ZI=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ZI||{}),yy=(i=>(i.RECORD_CREATED="RECORD_CREATED",i.RECORD_UPDATED="RECORD_UPDATED",i.RECORD_DELETED="RECORD_DELETED",i))(yy||{});var aN=st([N({...fn,name:I(),externalId:I(),type:De("STATIC_DROPDOWN"),tableId:I(),projectId:I(),data:N({options:Me(N({value:I()}))})}),N({...fn,name:I(),externalId:I(),type:st([De("TEXT"),De("NUMBER"),De("DATE"),De("DATETIME")]),tableId:I(),projectId:I()})]),cN=N({...fn,name:I(),folderId:Qt(I()),projectId:I(),externalId:I(),status:Ym(ZI),trigger:Ym(VI)}),uN=N({...fn,tableId:I(),projectId:I(),cells:Xe(I(),N({updated:I(),created:I(),value:Ye(),fieldName:I()}))}),lN=N({events:Me(ze(yy)),webhookUrl:I(),flowId:I()}),fN=N({fields:Me(N({id:I(),name:I()})),rows:Me(Xe(I(),I())),name:I()}),dN=N({projectId:I(),limit:Z(Rc.number()),cursor:Z(I()),name:Z(I()),externalIds:qf(I()),folderId:Z(I()),folderIds:qf(I())}),pN=N({records:Me(Me(N({fieldId:I(),value:KI()}))),tableId:I()}),hN=N({cells:Z(Me(N({fieldId:I(),value:KI()}))),tableId:I(),agentUpdate:Z(yt())}),QI=mi("operator",[fo("eq"),fo("neq"),fo("gt"),fo("gte"),fo("lt"),fo("lte"),fo("co"),qI("exists"),qI("not_exists")]),gN=N({tableId:I(),limit:Z(Rc.number()),cursor:Z(I()),filters:qf(QI)});function KI(){return yi(_i(e=>e==null?e:String(e)),Cc(I()))}a(KI,"coerceToString");function fo(e){return N({fieldId:I(),operator:De(e),value:I()})}a(fo,"valueFilter");function qI(e){return N({fieldId:I(),operator:De(e)})}a(qI,"existenceFilter");var mN=N({status:Z(Ar()),body:Z(Ye()),headers:Z(Xe(I(),I()))}),_N=N({...fn,deleted:Qt(bi),ownerId:I(),displayName:I(),platformId:I(),externalId:Qt(I())});var GI=N({name:I(),description:Z(I()),type:I(),required:yt()}),yN=N({pieceName:I(),triggerName:I(),input:N({toolName:I(),toolDescription:I(),inputSchema:Me(GI),returnsResponse:yt()})});var YI="^[0-9]+\\.[0-9]+\\.[0-9]+$",m9=new RegExp(YI),AN="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_9=I().check(Ir(new RegExp(YI))),y9=I().check(Ir(new RegExp(AN))),bN=N({packageType:De("ARCHIVE"),pieceType:ze(ss),pieceName:I(),pieceVersion:I(),archiveId:I(),platformId:I()}),XI=N({packageType:De("REGISTRY"),pieceType:De("OFFICIAL"),pieceName:I(),pieceVersion:I()}),JI=N({packageType:De("REGISTRY"),pieceType:De("CUSTOM"),pieceName:I(),pieceVersion:I(),platformId:I()}),E9=st([XI,JI]),A9=st([bN,XI,JI]);var xN=mi("type",[N({type:De("CRON_EXPRESSION"),cronExpression:I(),timezone:I()}),N({type:De("INTERVAL"),intervalMs:bx().check(mr(6e4))})]),b9=N({...fn,type:ze(Ei),projectId:I(),flowId:I(),triggerName:I(),schedule:Qt(xN),flowVersionId:I(),pieceName:I(),pieceVersion:I(),deleted:Qt(I()),simulate:yt()}),ev=(S=>(S.UNKNOWN="UNKNOWN",S.FLOW_RUN_LOG="FLOW_RUN_LOG",S.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",S.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",S.FLOW_STEP_FILE="FLOW_STEP_FILE",S.SAMPLE_DATA="SAMPLE_DATA",S.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",S.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",S.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",S.PROJECT_RELEASE="PROJECT_RELEASE",S.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",S.PLATFORM_ASSET="PLATFORM_ASSET",S.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",S.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",S.MCP_CALL_PAYLOAD="MCP_CALL_PAYLOAD",S.KNOWLEDGE_BASE="KNOWLEDGE_BASE",S.FLOW_BUNDLE="FLOW_BUNDLE",S.PREWARM_SCOPE="PREWARM_SCOPE",S))(ev||{}),tv=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(tv||{}),rv=(r=>(r.S3="S3",r.DB="DB",r))(rv||{}),x9=N({...fn,projectId:Qt(I()),platformId:Qt(I()),type:ze(ev),compression:ze(tv),data:Z(Ye()),location:ze(rv),size:Qt(Ar()),fileName:Qt(I()),s3Key:Qt(I()),metadata:Qt(Xe(I(),I()))}),nv=(i=>(i.ADMIN="ADMIN",i.MEMBER="MEMBER",i.OPERATOR="OPERATOR",i))(nv||{}),iv=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(iv||{}),I9=N({id:I(),email:I(),firstName:I(),status:ze(iv),externalId:Qt(I()),platformId:Qt(I()),platformRole:ze(nv),lastName:I(),created:bi,updated:bi,lastActiveDate:Qt(bi),imageUrl:Qt(I())});var Ay=N({...mt.shape,...et(Xe(I(),Ye()),"OBJECT").shape});var by=N({...mt.shape,formatProperty:Z(I()),...et(I(),"RICH_TEXT").shape});var av=N({...mt.shape,...et(I(),"COLOR").shape});var xy=st([tn,Wn,by,jf,Vn,rn,qn,qm,Oc,Zm,Zn,Dc,Ay,Bc,$c,Vm,Nc,av]),bt={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Cn=N({displayName:I(),description:Z(I()),hasConnectionIdentifier:Z(yt())});var cv=N({username:I(),password:I()}),Iy=N({...Cn.shape,username:N({displayName:I(),description:Z(I())}),password:N({displayName:I(),description:Z(I())}),...et(cv,"BASIC_AUTH").shape});var wN=Xe(I(),st([tn,Wn,Zn,Vn,rn])),vy=N({...Cn.shape,props:wN,...et(Ye(),"CUSTOM_AUTH").shape});var po=N({...Cn.shape,...et(N({auth:I()}),"SECRET_TEXT").shape});var PN=Xe(I(),st([tn,Wn,po,Zn,Vn,rn,qn,jf])),uv=N({...Cn.shape,props:PN,...et(Ye(),"OIDC").shape});var Sy=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Sy||{}),lv=st([tn,po,rn]),fv=Xe(I(),lv),TN=N({props:Z(Xe(I(),lv)),authUrl:I(),tokenUrl:I(),scope:Me(I()),prompt:Z(st([De("none"),De("consent"),De("login"),De("omit")])),pkce:Z(yt()),pkceMethod:Z(st([De("plain"),De("S256")])),authorizationMethod:Z(ze(Sy)),grantType:Z(st([ze(Lc),De(Qm)])),extra:Z(Xe(I(),I()))}),dv=N({access_token:I(),props:Z(fv),data:Xe(I(),kc())}),wy=N({...Cn.shape,...TN.shape,...et(dv,"OAUTH2").shape});var _s=st([Iy,vy,uv,wy,po]),Jc="Connection",eu={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||Jc}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||Jc,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||Jc}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||Jc}},None(){}};var sq={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var kN=N({...mt.shape,...et(Ye(),"CUSTOM").shape,code:I()});var RN=st([xy,_s]),Py=Xe(I(),RN),wq=Xe(I(),xy);var pv=st([N({strategy:De("CRON"),cronExpression:I()}),N({strategy:De("NONE")})]),ys=class{constructor(t,r,i,n,o,s,c,u,l,f,p,g,h,_,y,b,v,S,M,R,J){this.name=t;this.displayName=r;this.description=i;this.requireAuth=n;this.props=o;this.type=s;this.handshakeConfiguration=c;this.onHandshake=u;this.renewConfiguration=l;this.onRenew=f;this.onEnable=p;this.onDisable=g;this.onStart=h;this.run=_;this.test=y;this.sampleData=b;this.testStrategy=v;this.outputSchema=S;this.aiMetadata=M;this.classification=R;this.propertyGroups=J}static{a(this,"ITrigger")}},hv=a(e=>{switch(e.type){case"WEBHOOK":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ir(e.sampleData)&&ir(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var gv="2",wd="0.82.0";var Ty=class{constructor(t,r,i,n,o,s,c,u,l=wd,f,p="",g){this.displayName=t;this.logoUrl=r;this.authors=i;this.events=n;this.categories=c;this.auth=u;this.minimumSupportedRelease=l;this.maximumSupportedRelease=f;this.description=p;this.deprecated=g;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:gv}),"getContextInfo");(!NN(l)||$N(l,wd))&&(this.minimumSupportedRelease=wd),o.forEach(h=>this._actions[h.name]=h),s.forEach(h=>this._triggers[h.name]=h)}static{a(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:ON(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},_v=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,i,n)=>i===n.findIndex(o=>o.type===r.type)))throw new Error("Auth properties must be unique by type");return new Ty(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function ON(e){if(e!==void 0)return Array.isArray(e)?e.map(mv):mv(e)}a(ON,"withConnectionIdentifierFlag");function mv(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(mv,"flagConnectionIdentifier");function NN(e){return/^\d+\.\d+\.\d+$/.test(e)}a(NN,"isValidSimpleSemver");function $N(e,t){let[r,i,n]=e.split(".").map(Number),[o,s,c]=t.split(".").map(Number);return r!==o?r<o:i!==s?i<s:n<c}a($N,"isSemverLessThan");var DN=Z(Xe(I(),Xe(I(),I()))),yv=N({id:Z(I()),name:I(),displayName:I(),logoUrl:I(),description:I(),authors:Me(I()),platformId:Z(I()),directoryPath:Z(I()),auth:Z(st([_s,Me(_s)])),version:I(),categories:Z(Me(ze(as))),minimumSupportedRelease:Z(I()),maximumSupportedRelease:Z(I()),deprecated:Z(yt()),i18n:DN}),BN=ze(["human","ai","both"]),Ev=N({description:Z(I()),idempotent:Z(yt())}),Av=ze(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var zN=ze(["tabs","section","summary","builder","footer"]),bv=N({key:I(),display:zN,label:Z(I()),description:Z(I()),icon:Z(I()),props:Me(I())}),xv=N({name:I(),displayName:I(),description:I(),props:Py,propertyGroups:Z(Me(bv)),requireAuth:yt(),errorHandlingOptions:Z(Wm),outputSchema:Z(Mf()),audience:Z(BN),aiMetadata:Z(Ev),classification:Z(Av)}),Iv=N({name:I(),displayName:I(),description:I(),props:Py,propertyGroups:Z(Me(bv)),errorHandlingOptions:Z(Wm),type:ze(Ei),sampleData:Ye(),handshakeConfiguration:Z(Mf()),renewConfiguration:Z(pv),testStrategy:ze(Mc),outputSchema:Z(Mf()),aiMetadata:Z(Ev),classification:Z(Av)}),LN=N({...yv.shape,actions:Xe(I(),xv),triggers:Xe(I(),Iv)}),UN=N({...yv.shape,actions:Ar(),triggers:Ar(),suggestedActions:Z(Me(xv)),suggestedTriggers:Z(Me(Iv))}),vv=N({projectUsage:Ar(),pieceType:ze(ss),packageType:ze(zc),platformId:Z(I()),archiveId:Z(I())}),kV=N({...LN.shape,...vv.shape}),CV=N({...UN.shape,...vv.shape}),RV=N({name:I(),version:I()});var MN=Dr(require("path")),FN=Dr(require("fs/promises"));var vk=Dr(Nn());var pk=Dr(dk()),hk=Dr(Nn());async function qt(e){return ir(e)?"sftp":e}a(qt,"getProtocolBackwardCompatibility");async function Xt(e){let{protocol:t,host:r,port:i,allow_unauthorized_certificates:n,allow_anonymous_login:o,username:s,password:c,privateKey:u,algorithm:l}=e,f=await qt(t);if(f==="sftp"){let p=new pk.default;if(u){let g=u.replace(/\\r\\n/g,`
62
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(c.cycle){o(s);continue}if(c.count>1&&e.reused==="ref"){o(s);continue}}}a(hi,"extractDefs");function gi(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=a(s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,l={...u},f=c.ref;if(c.ref=null,f){i(f);let g=e.seen.get(f),h=g.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),s._zod.parent===f)for(let y in u)y==="$ref"||y==="allOf"||y in l||delete u[y];if(h.$ref&&g.def)for(let y in u)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(u[y])===JSON.stringify(g.def[y])&&delete u[y]}let p=s._zod.parent;if(p&&p!==f){i(p);let g=e.seen.get(p);if(g?.schema.$ref&&(u.$ref=g.schema.$ref,g.def))for(let h in u)h==="$ref"||h==="allOf"||h in g.def&&JSON.stringify(u[h])===JSON.stringify(g.def[h])&&delete u[h]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})},"flattenRef");for(let s of[...e.seen.entries()].reverse())i(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(o[c.defId]=c.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:os(t,"input",e.processors),output:os(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(gi,"finalize");function Lr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Lr(i.element,r);if(i.type==="set")return Lr(i.valueType,r);if(i.type==="lazy")return Lr(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Lr(i.innerType,r);if(i.type==="intersection")return Lr(i.left,r)||Lr(i.right,r);if(i.type==="record"||i.type==="map")return Lr(i.keyType,r)||Lr(i.valueType,r);if(i.type==="pipe")return Lr(i.in,r)||Lr(i.out,r);if(i.type==="object"){for(let n in i.shape)if(Lr(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(Lr(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(Lr(n,r))return!0;return!!(i.rest&&Lr(i.rest,r))}return!1}a(Lr,"isTransforming");var tm=a((e,t={})=>r=>{let i=pi({...r,processors:t});return Rt(e,i),hi(i,e),gi(i,e)},"createToJSONSchemaMethod"),os=a((e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=pi({...n??{},target:o,io:t,processors:r});return Rt(e,s),hi(s,e),gi(s,e)},"createStandardJSONSchemaMethod");var IR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rm=a((e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),c&&(n.format=IR[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let f=[...u];f.length===1?n.pattern=f[0].source:f.length>1&&(n.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},"stringProcessor"),nm=a((e,t,r,i)=>{let n=r,{minimum:o,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:f}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number",typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=f,n.exclusiveMinimum=!0):n.exclusiveMinimum=f),typeof o=="number"&&(n.minimum=o,typeof f=="number"&&t.target!=="draft-04"&&(f>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof s=="number"&&(n.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof u=="number"&&(n.multipleOf=u)},"numberProcessor"),im=a((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),om=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),sm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),am=a((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),cm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),um=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),lm=a((e,t,r,i)=>{r.not={}},"neverProcessor"),fm=a((e,t,r,i)=>{},"anyProcessor"),dm=a((e,t,r,i)=>{},"unknownProcessor"),pm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),hm=a((e,t,r,i)=>{let n=e._zod.def,o=oa(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},"enumProcessor"),gm=a((e,t,r,i)=>{let n=e._zod.def,o=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},"literalProcessor"),mm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),_m=a((e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},"templateLiteralProcessor"),ym=a((e,t,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(o.minLength=s),c!==void 0&&(o.maxLength=c),u?u.length===1?(o.contentMediaType=u[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,o)},"fileProcessor"),Em=a((e,t,r,i)=>{r.type="boolean"},"successProcessor"),Am=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),bm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),xm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Im=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),Sm=a((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),vm=a((e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=Rt(o.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),wm=a((e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object",n.properties={};let s=o.shape;for(let l in s)n.properties[l]=Rt(s[l],t,{...i,path:[...i.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let f=o.shape[l]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));u.size>0&&(n.required=Array.from(u)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=Rt(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},"objectProcessor"),Bf=a((e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,s=n.options.map((c,u)=>Rt(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?r.oneOf=s:r.anyOf=s},"unionProcessor"),Pm=a((e,t,r,i)=>{let n=e._zod.def,o=Rt(n.left,t,{...i,path:[...i.path,"allOf",0]}),s=Rt(n.right,t,{...i,path:[...i.path,"allOf",1]}),c=a(l=>"allOf"in l&&Object.keys(l).length===1,"isSimpleIntersection"),u=[...c(o)?o.allOf:[o],...c(s)?s.allOf:[s]];r.allOf=u},"intersectionProcessor"),Tm=a((e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,h)=>Rt(g,t,{...i,path:[...i.path,s,h]})),l=o.rest?Rt(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(n.minItems=f),typeof p=="number"&&(n.maxItems=p)},"tupleProcessor"),km=a((e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let s=o.keyType,u=s._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let f=Rt(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let p of u)n.patternProperties[p.source]=f}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Rt(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=Rt(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let f=[...l].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(n.required=f)}},"recordProcessor"),Cm=a((e,t,r,i)=>{let n=e._zod.def,o=Rt(n.innerType,t,i),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},"nullableProcessor"),Rm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},"nonoptionalProcessor"),Om=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},"defaultProcessor"),Nm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},"prefaultProcessor"),$m=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},"catchProcessor"),Dm=a((e,t,r,i)=>{let n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Rt(o,t,i);let s=t.seen.get(e);s.ref=o},"pipeProcessor"),Bm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},"readonlyProcessor"),Lm=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},"promiseProcessor"),Lf=a((e,t,r,i)=>{let n=e._zod.def;Rt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},"optionalProcessor"),zm=a((e,t,r,i)=>{let n=e._zod.innerType;Rt(n,t,i);let o=t.seen.get(e);o.ref=n},"lazyProcessor"),Df={string:rm,number:nm,boolean:im,bigint:om,symbol:sm,null:am,undefined:cm,void:um,never:lm,any:fm,unknown:dm,date:pm,enum:hm,literal:gm,nan:mm,template_literal:_m,file:ym,success:Em,custom:Am,function:bm,transform:xm,map:Im,set:Sm,array:vm,object:wm,union:Bf,intersection:Pm,tuple:Tm,record:km,nullable:Cm,nonoptional:Rm,default:Om,prefault:Nm,catch:$m,pipe:Dm,readonly:Bm,promise:Lm,optional:Lf,lazy:zm};function Tc(e,t){if("_idmap"in e){let i=e,n=pi({...t,processors:Df}),o={};for(let u of i._idmap.entries()){let[l,f]=u;Rt(f,n)}let s={},c={registry:i,uri:t?.uri,defs:o};n.external=c;for(let u of i._idmap.entries()){let[l,f]=u;hi(n,f),s[l]=gi(n,f)}if(Object.keys(o).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let r=pi({...t,processors:Df});return Rt(e,r),hi(r,e),gi(r,e)}a(Tc,"toJSONSchema");var zf=class{static{a(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=pi({processors:Df,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Rt(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),hi(this.ctx,t);let i=gi(this.ctx,t),{"~standard":n,...o}=i;return o}};var vx={};var fr=T("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");We.init(e,t),e.def=t,e.type=t.type,e.parse=(r,i)=>qi(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Zo(e,r,i),e.parseAsync=async(r,i)=>Vi(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Go(e,r,i),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]},{parent:!0}),e.with=e.check,e.clone=(r,i)=>yr(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.apply=r=>r(e)}),Uf=T("ZodMiniString",(e,t)=>{Fn.init(e,t),fr.init(e,t)});function x(e){return Ua(Uf,e)}a(x,"string");var ss=T("ZodMiniStringFormat",(e,t)=>{Ct.init(e,t),Uf.init(e,t)});var wR=T("ZodMiniURL",(e,t)=>{ha.init(e,t),ss.init(e,t)});function wx(e){return Ki(wR,e)}a(wx,"url");var Mf=T("ZodMiniNumber",(e,t)=>{Yo.init(e,t),fr.init(e,t)});function Ar(e){return fc(Mf,e)}a(Ar,"number");var PR=T("ZodMiniNumberFormat",(e,t)=>{Ea.init(e,t),Mf.init(e,t)});function Px(e){return pc(PR,e)}a(Px,"int");var Um=T("ZodMiniBoolean",(e,t)=>{Qi.init(e,t),fr.init(e,t)});function yt(e){return hc(Um,e)}a(yt,"boolean");var Tx=T("ZodMiniBigInt",(e,t)=>{Xo.init(e,t),fr.init(e,t)});var TR=T("ZodMiniAny",(e,t)=>{Aa.init(e,t),fr.init(e,t)});function kc(){return _c(TR)}a(kc,"any");var kR=T("ZodMiniUnknown",(e,t)=>{ba.init(e,t),fr.init(e,t)});function Ye(){return yc(kR)}a(Ye,"unknown");var CR=T("ZodMiniVoid",(e,t)=>{xa.init(e,t),fr.init(e,t)});function kx(e){return Ec(CR,e)}a(kx,"_void");var Cx=T("ZodMiniDate",(e,t)=>{Ia.init(e,t),fr.init(e,t)});var RR=T("ZodMiniArray",(e,t)=>{Sa.init(e,t),fr.init(e,t)});function Me(e,t){return new RR({type:"array",element:e,...ue(t)})}a(Me,"array");var OR=T("ZodMiniObject",(e,t)=>{Zl.init(e,t),fr.init(e,t),ot(e,"shape",()=>t.shape)});function N(e,t){let r={type:"object",shape:e??{},...ue(t)};return new OR(r)}a(N,"object");var NR=T("ZodMiniUnion",(e,t)=>{Gi.init(e,t),fr.init(e,t)});function st(e,t){return new NR({type:"union",options:e,...ue(t)})}a(st,"union");var $R=T("ZodMiniDiscriminatedUnion",(e,t)=>{va.init(e,t),fr.init(e,t)});function mi(e,t,r){return new $R({type:"union",options:t,discriminator:e,...ue(r)})}a(mi,"discriminatedUnion");var DR=T("ZodMiniRecord",(e,t)=>{Pa.init(e,t),fr.init(e,t)});function Xe(e,t,r){return new DR({type:"record",keyType:e,valueType:t,...ue(r)})}a(Xe,"record");var BR=T("ZodMiniEnum",(e,t)=>{Ta.init(e,t),fr.init(e,t),e.options=Object.values(t.entries)});function Le(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new BR({type:"enum",entries:r,...ue(t)})}a(Le,"_enum");var LR=T("ZodMiniLiteral",(e,t)=>{ka.init(e,t),fr.init(e,t)});function De(e,t){return new LR({type:"literal",values:Array.isArray(e)?e:[e],...ue(t)})}a(De,"literal");var zR=T("ZodMiniTransform",(e,t)=>{Ca.init(e,t),fr.init(e,t)});function _i(e){return new zR({type:"transform",transform:e})}a(_i,"transform");var UR=T("ZodMiniOptional",(e,t)=>{Jo.init(e,t),fr.init(e,t)});function Z(e){return new UR({type:"optional",innerType:e})}a(Z,"optional");var MR=T("ZodMiniNullable",(e,t)=>{Ra.init(e,t),fr.init(e,t)});function Cc(e){return new MR({type:"nullable",innerType:e})}a(Cc,"nullable");var FR=T("ZodMiniPipe",(e,t)=>{Oa.init(e,t),fr.init(e,t)});function yi(e,t){return new FR({type:"pipe",in:e,out:t})}a(yi,"pipe");var Rx=T("ZodMiniCustom",(e,t)=>{Na.init(e,t),fr.init(e,t)});function Ff(e,t){return wc(Rx,e??(()=>!0),t)}a(Ff,"custom");function Mm(e,t={}){return Pc(Rx,e,t)}a(Mm,"refine");var Hf={};cn(Hf,{ZodMiniISODate:()=>Hm,ZodMiniISODateTime:()=>Fm,ZodMiniISODuration:()=>Wm,ZodMiniISOTime:()=>jm,date:()=>jR,datetime:()=>HR,duration:()=>qR,time:()=>WR});var Fm=T("ZodMiniISODateTime",(e,t)=>{ga.init(e,t),ss.init(e,t)});function HR(e){return ac(Fm,e)}a(HR,"datetime");var Hm=T("ZodMiniISODate",(e,t)=>{ma.init(e,t),ss.init(e,t)});function jR(e){return cc(Hm,e)}a(jR,"date");var jm=T("ZodMiniISOTime",(e,t)=>{_a.init(e,t),ss.init(e,t)});function WR(e){return uc(jm,e)}a(WR,"time");var Wm=T("ZodMiniISODuration",(e,t)=>{ya.init(e,t),ss.init(e,t)});function qR(e){return lc(Wm,e)}a(qR,"duration");var Rc={};cn(Rc,{bigint:()=>GR,boolean:()=>QR,date:()=>KR,number:()=>ZR,string:()=>VR});function VR(e){return Ma(Uf,e)}a(VR,"string");function ZR(e){return dc(Mf,e)}a(ZR,"number");function QR(e){return gc(Um,e)}a(QR,"boolean");function GR(e){return mc(Tx,e)}a(GR,"bigint");function KR(e){return Ac(Cx,e)}a(KR,"date");var Vm=N({retryOnFailure:N({defaultValue:Z(yt()),hide:Z(yt())}),continueOnFailure:N({defaultValue:Z(yt()),hide:Z(yt())})}),qm=class{constructor(t,r,i,n,o,s,c,u,l,f,p,g,h){this.name=t;this.displayName=r;this.description=i;this.props=n;this.propertyGroups=o;this.run=s;this.test=c;this.requireAuth=u;this.errorHandlingOptions=l;this.outputSchema=f;this.audience=p;this.aiMetadata=g;this.classification=h}static{a(this,"IAction")}},Rr=a(e=>new qm(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var mt=N({displayName:x(),description:Z(x()),advanced:Z(yt()),width:Z(Le(["half","full"])),icon:Z(x()),placeholder:Z(x())}),et=a((e,t)=>N({type:De(t),required:yt(),defaultValue:Z(kc())}),"TPropertyValue");var tn=N({...mt.shape,...et(x(),"SHORT_TEXT").shape}),Wn=N({...mt.shape,...et(x(),"LONG_TEXT").shape});var Nx=N({label:x(),value:Ye(),description:Z(x()),icon:Z(x())}),jf=N({disabled:Z(yt()),placeholder:Z(x()),options:Me(Nx)});var XR=Le(["cards"]),rn=N({...mt.shape,options:jf,display:Z(XR),...et(Ye(),"STATIC_DROPDOWN").shape}),qn=N({...mt.shape,options:jf,...et(Me(Ye()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Zm=N({...mt.shape,...et(Ye(),"DROPDOWN").shape,refreshers:Me(x())}),Oc=N({...mt.shape,...et(Me(Ye()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Me(x())});var Vn=N({...mt.shape,reveals:Z(Me(x())),...et(yt(),"CHECKBOX").shape});var Zn=N({...mt.shape,display:Z(Le(["stepper"])),min:Z(Ar()),max:Z(Ar()),step:Z(Ar()),...et(Ar(),"NUMBER").shape});var Nc=N({...mt.shape,streaming:Z(yt()),...et(Ye(),"FILE").shape});var $c=N({...mt.shape,...et(x(),"DATE_TIME").shape});var $x=Xe(x(),st([tn,Wn,rn,Oc,qn,Vn,Zn,Nc,$c])),Dc=N({...mt.shape,properties:$x,...et(Me(Ye()),"ARRAY").shape});var Dx=Le(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),Bx=N({preset:Z(Dx),after:Z(x()),before:Z(x())}),Qm=N({...mt.shape,display:Z(Le(["dropdown"])),...et(Bx,"DATE_RANGE").shape});var Bc=N({...mt.shape,...et(st([Xe(x(),Ye())]),"JSON").shape});var Lx=st([tn,rn,Bc,Dc,qn]),JR=Xe(x(),Lx),Gm=N({refreshers:Me(x()),...mt.shape,...et(Ye(),"DYNAMIC").shape});var Wf=N({...mt.shape,...et(kx(),"MARKDOWN").shape});var Lc=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(Lc||{}),as=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(as||{}),co=(S=>(S.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",S.COMMUNICATION="COMMUNICATION",S.COMMERCE="COMMERCE",S.CORE="CORE",S.UNIVERSAL_AI="UNIVERSAL_AI",S.FLOW_CONTROL="FLOW_CONTROL",S.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",S.ACCOUNTING="ACCOUNTING",S.PRODUCTIVITY="PRODUCTIVITY",S.CONTENT_AND_FILES="CONTENT_AND_FILES",S.DEVELOPER_TOOLS="DEVELOPER_TOOLS",S.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",S.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",S.HUMAN_RESOURCES="HUMAN_RESOURCES",S.PAYMENT_PROCESSING="PAYMENT_PROCESSING",S.MARKETING="MARKETING",S.SALES_AND_CRM="SALES_AND_CRM",S))(co||{});var zc=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(zc||{}),Km="both_client_credentials_and_authorization_code";var Ei=(n=>(n.POLLING="POLLING",n.WEBHOOK="WEBHOOK",n.APP_WEBHOOK="APP_WEBHOOK",n.MANUAL="MANUAL",n))(Ei||{}),Uc=(o=>(o.NONE="NONE",o.HEADER_PRESENT="HEADER_PRESENT",o.QUERY_PRESENT="QUERY_PRESENT",o.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",o.HEAD_REQUEST="HEAD_REQUEST",o))(Uc||{}),eO=N({strategy:Le(Uc),paramName:Z(x())}),Mc=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Mc||{});var qf=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(qf||{}),zx=N({status:Z(Ar()),body:Z(Ye()),headers:Z(Xe(x(),x()))}),Ux=N({type:De("DELAY"),resumeDateTime:x(),requestIdToReply:Z(x()),handlerId:Z(x()),streamStepProgress:Z(Le(qf))}),Mx=N({type:De("WEBHOOK"),requestId:x(),requestIdToReply:Z(x()),response:zx,handlerId:Z(x()),streamStepProgress:Z(Le(qf))}),tO=st([Ux,Mx]);var rO=N({body:Ye(),rawBody:Z(Ye()),headers:Xe(x(),x()),queryParams:Xe(x(),x())});function Lt(e){return e==null}a(Lt,"isNil");async function Fc(e){try{return{data:await e(),error:null}}catch(t){return{data:null,error:t}}}a(Fc,"tryCatch");var Xm=Cr(require("crypto"),1);var nO=128,Ai,cs,iO=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!Ai||Ai.length<e?(Ai=Buffer.allocUnsafe(e*nO),Xm.default.randomFillSync(Ai),cs=0):cs+e>Ai.length&&(Xm.default.randomFillSync(Ai),cs=0)}catch(t){throw Ai=void 0,t}cs+=e},"fillPool"),oO=a(e=>(iO(e|=0),Ai.subarray(cs-e,cs)),"random"),sO=a((e,t,r)=>{let i=(2<<31-Math.clz32(e.length-1|1))-1,n=Math.ceil(1.6*i*t/e.length);return(o=t)=>{if(o<=0)return"";let s="";for(;;){let c=r(n),u=n;for(;u--;)if(s+=e[c[u]&i]||"",s.length===o)return s}}},"customRandom"),Fx=a((e,t=21)=>sO(e,t,oO),"customAlphabet");var aO="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Hx=21,Z8=x().check(Ir(new RegExp(`^[0-9a-zA-Z]{${Hx}}$`))),cO=Fx(aO,Hx);var bi=yi(_i(e=>e instanceof Date?e.toISOString():e),x()),fn={id:x(),created:bi,updated:bi},Gt=a(e=>Z(Cc(e)),"Nullable");function Jm(e){return Z(Cc(Le(e)))}a(Jm,"NullableEnum");var K8=yi(_i(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),Z(yt())),Y8=Z(Hf.datetime({offset:!0}).check(Mm(e=>e.slice(0,4)!=="0000"))),Vf=a(e=>yi(_i(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),Z(Me(e))),"OptionalArrayFromQuery");var eH=Xe(x(),Ye());var e_=(f=>(f.DUTCH="nl",f.ENGLISH="en",f.GERMAN="de",f.FRENCH="fr",f.SPANISH="es",f.JAPANESE="ja",f.CHINESE_SIMPLIFIED="zh",f.PORTUGUESE="pt",f.ARABIC="ar",f.CHINESE_TRADITIONAL="zh-TW",f))(e_||{});var xi=(S=>(S.OPENAI="openai",S.OPENROUTER="openrouter",S.ANTHROPIC="anthropic",S.AZURE="azure",S.GOOGLE="google",S.ACTIVEPIECES="activepieces",S.CLOUDFLARE_GATEWAY="cloudflare-gateway",S.CUSTOM="custom",S.BEDROCK="bedrock",S.VERTEX="vertex",S.MISTRAL="mistral",S.XAI="xai",S.DEEPSEEK="deepseek",S.ZAI="zai",S.QWEN="qwen",S.MINIMAX="minimax",S.MOONSHOT="moonshot",S))(xi||{});var ge={};cn(ge,{$brand:()=>na,$input:()=>hf,$output:()=>pf,NEVER:()=>Ju,TimePrecision:()=>mf,ZodAny:()=>S_,ZodArray:()=>T_,ZodBase64:()=>pd,ZodBase64URL:()=>hd,ZodBigInt:()=>gs,ZodBigIntFormat:()=>_d,ZodBoolean:()=>hs,ZodCIDRv4:()=>fd,ZodCIDRv6:()=>dd,ZodCUID:()=>id,ZodCUID2:()=>od,ZodCatch:()=>K_,ZodCodec:()=>vd,ZodCustom:()=>Jc,ZodCustomStringFormat:()=>ds,ZodDate:()=>Qc,ZodDefault:()=>W_,ZodDiscriminatedUnion:()=>C_,ZodE164:()=>gd,ZodEmail:()=>td,ZodEmoji:()=>rd,ZodEnum:()=>ls,ZodError:()=>uO,ZodExactOptional:()=>F_,ZodFile:()=>U_,ZodFirstPartyTypeKind:()=>cy,ZodFunction:()=>oy,ZodGUID:()=>jc,ZodIPv4:()=>ud,ZodIPv6:()=>ld,ZodISODate:()=>Gf,ZodISODateTime:()=>Qf,ZodISODuration:()=>Yf,ZodISOTime:()=>Kf,ZodIntersection:()=>R_,ZodIssueCode:()=>fO,ZodJWT:()=>md,ZodKSUID:()=>cd,ZodLazy:()=>ry,ZodLiteral:()=>z_,ZodMAC:()=>__,ZodMap:()=>B_,ZodNaN:()=>X_,ZodNanoID:()=>nd,ZodNever:()=>w_,ZodNonOptional:()=>Id,ZodNull:()=>x_,ZodNullable:()=>j_,ZodNumber:()=>ps,ZodNumberFormat:()=>lo,ZodObject:()=>Kc,ZodOptional:()=>xd,ZodPipe:()=>Sd,ZodPrefault:()=>V_,ZodPromise:()=>iy,ZodReadonly:()=>J_,ZodRealError:()=>Vr,ZodRecord:()=>Xc,ZodSet:()=>L_,ZodString:()=>fs,ZodStringFormat:()=>Dt,ZodSuccess:()=>G_,ZodSymbol:()=>A_,ZodTemplateLiteral:()=>ty,ZodTransform:()=>M_,ZodTuple:()=>N_,ZodType:()=>at,ZodULID:()=>sd,ZodURL:()=>Zc,ZodUUID:()=>Cn,ZodUndefined:()=>b_,ZodUnion:()=>Yc,ZodUnknown:()=>v_,ZodVoid:()=>P_,ZodXID:()=>ad,ZodXor:()=>k_,_ZodString:()=>ed,_default:()=>q_,_function:()=>G0,any:()=>P0,array:()=>Gc,base64:()=>l0,base64url:()=>f0,bigint:()=>x0,boolean:()=>E_,catch:()=>Y_,check:()=>K0,cidrv4:()=>c0,cidrv6:()=>u0,clone:()=>yr,codec:()=>V0,coerce:()=>uy,config:()=>Qt,core:()=>en,cuid:()=>e0,cuid2:()=>t0,custom:()=>Y0,date:()=>k0,decode:()=>l_,decodeAsync:()=>d_,describe:()=>X0,discriminatedUnion:()=>D0,e164:()=>d0,email:()=>Wx,emoji:()=>Xx,encode:()=>u_,encodeAsync:()=>f_,endsWith:()=>to,enum:()=>Ad,exactOptional:()=>H_,file:()=>H0,flattenError:()=>Ho,float32:()=>y0,float64:()=>E0,formatError:()=>jo,fromJSONSchema:()=>oI,function:()=>G0,getErrorMap:()=>pO,globalRegistry:()=>Er,gt:()=>bn,gte:()=>mr,guid:()=>qx,hash:()=>_0,hex:()=>m0,hostname:()=>g0,httpUrl:()=>Yx,includes:()=>Ji,instanceof:()=>eI,int:()=>Jf,int32:()=>A0,int64:()=>I0,intersection:()=>O_,ipv4:()=>o0,ipv6:()=>a0,iso:()=>us,json:()=>rI,jwt:()=>p0,keyof:()=>C0,ksuid:()=>i0,lazy:()=>ny,length:()=>di,literal:()=>F0,locales:()=>rs,looseObject:()=>N0,looseRecord:()=>L0,lowercase:()=>Yi,lt:()=>An,lte:()=>Br,mac:()=>s0,map:()=>z0,maxLength:()=>fi,maxSize:()=>jn,meta:()=>J0,mime:()=>ro,minLength:()=>cr,minSize:()=>xn,multipleOf:()=>Hn,nan:()=>q0,nanoid:()=>Jx,nativeEnum:()=>M0,negative:()=>xc,never:()=>yd,nonnegative:()=>Sc,nonoptional:()=>Q_,nonpositive:()=>Ic,normalize:()=>no,null:()=>I_,nullable:()=>qc,nullish:()=>j0,number:()=>y_,object:()=>R0,optional:()=>Wc,overwrite:()=>ln,parse:()=>o_,parseAsync:()=>s_,partialRecord:()=>B0,pipe:()=>Vc,positive:()=>bc,prefault:()=>Z_,preprocess:()=>nI,prettifyError:()=>il,promise:()=>Q0,property:()=>vc,readonly:()=>ey,record:()=>D_,refine:()=>sy,regex:()=>Ir,regexes:()=>qr,registry:()=>za,safeDecode:()=>h_,safeDecodeAsync:()=>m_,safeEncode:()=>p_,safeEncodeAsync:()=>g_,safeParse:()=>a_,safeParseAsync:()=>c_,set:()=>U0,setErrorMap:()=>dO,size:()=>li,slugify:()=>is,startsWith:()=>eo,strictObject:()=>O0,string:()=>Xf,stringFormat:()=>h0,stringbool:()=>tI,success:()=>W0,superRefine:()=>ay,symbol:()=>v0,templateLiteral:()=>Z0,toJSONSchema:()=>Tc,toLowerCase:()=>oo,toUpperCase:()=>so,transform:()=>bd,treeifyError:()=>nl,trim:()=>io,tuple:()=>$_,uint32:()=>b0,uint64:()=>S0,ulid:()=>r0,undefined:()=>w0,union:()=>Ed,unknown:()=>uo,uppercase:()=>Xi,url:()=>Kx,util:()=>fe,uuid:()=>Vx,uuidv4:()=>Zx,uuidv6:()=>Qx,uuidv7:()=>Gx,void:()=>T0,xid:()=>n0,xor:()=>$0});var Hc={};cn(Hc,{ZodAny:()=>S_,ZodArray:()=>T_,ZodBase64:()=>pd,ZodBase64URL:()=>hd,ZodBigInt:()=>gs,ZodBigIntFormat:()=>_d,ZodBoolean:()=>hs,ZodCIDRv4:()=>fd,ZodCIDRv6:()=>dd,ZodCUID:()=>id,ZodCUID2:()=>od,ZodCatch:()=>K_,ZodCodec:()=>vd,ZodCustom:()=>Jc,ZodCustomStringFormat:()=>ds,ZodDate:()=>Qc,ZodDefault:()=>W_,ZodDiscriminatedUnion:()=>C_,ZodE164:()=>gd,ZodEmail:()=>td,ZodEmoji:()=>rd,ZodEnum:()=>ls,ZodExactOptional:()=>F_,ZodFile:()=>U_,ZodFunction:()=>oy,ZodGUID:()=>jc,ZodIPv4:()=>ud,ZodIPv6:()=>ld,ZodIntersection:()=>R_,ZodJWT:()=>md,ZodKSUID:()=>cd,ZodLazy:()=>ry,ZodLiteral:()=>z_,ZodMAC:()=>__,ZodMap:()=>B_,ZodNaN:()=>X_,ZodNanoID:()=>nd,ZodNever:()=>w_,ZodNonOptional:()=>Id,ZodNull:()=>x_,ZodNullable:()=>j_,ZodNumber:()=>ps,ZodNumberFormat:()=>lo,ZodObject:()=>Kc,ZodOptional:()=>xd,ZodPipe:()=>Sd,ZodPrefault:()=>V_,ZodPromise:()=>iy,ZodReadonly:()=>J_,ZodRecord:()=>Xc,ZodSet:()=>L_,ZodString:()=>fs,ZodStringFormat:()=>Dt,ZodSuccess:()=>G_,ZodSymbol:()=>A_,ZodTemplateLiteral:()=>ty,ZodTransform:()=>M_,ZodTuple:()=>N_,ZodType:()=>at,ZodULID:()=>sd,ZodURL:()=>Zc,ZodUUID:()=>Cn,ZodUndefined:()=>b_,ZodUnion:()=>Yc,ZodUnknown:()=>v_,ZodVoid:()=>P_,ZodXID:()=>ad,ZodXor:()=>k_,_ZodString:()=>ed,_default:()=>q_,_function:()=>G0,any:()=>P0,array:()=>Gc,base64:()=>l0,base64url:()=>f0,bigint:()=>x0,boolean:()=>E_,catch:()=>Y_,check:()=>K0,cidrv4:()=>c0,cidrv6:()=>u0,codec:()=>V0,cuid:()=>e0,cuid2:()=>t0,custom:()=>Y0,date:()=>k0,describe:()=>X0,discriminatedUnion:()=>D0,e164:()=>d0,email:()=>Wx,emoji:()=>Xx,enum:()=>Ad,exactOptional:()=>H_,file:()=>H0,float32:()=>y0,float64:()=>E0,function:()=>G0,guid:()=>qx,hash:()=>_0,hex:()=>m0,hostname:()=>g0,httpUrl:()=>Yx,instanceof:()=>eI,int:()=>Jf,int32:()=>A0,int64:()=>I0,intersection:()=>O_,ipv4:()=>o0,ipv6:()=>a0,json:()=>rI,jwt:()=>p0,keyof:()=>C0,ksuid:()=>i0,lazy:()=>ny,literal:()=>F0,looseObject:()=>N0,looseRecord:()=>L0,mac:()=>s0,map:()=>z0,meta:()=>J0,nan:()=>q0,nanoid:()=>Jx,nativeEnum:()=>M0,never:()=>yd,nonoptional:()=>Q_,null:()=>I_,nullable:()=>qc,nullish:()=>j0,number:()=>y_,object:()=>R0,optional:()=>Wc,partialRecord:()=>B0,pipe:()=>Vc,prefault:()=>Z_,preprocess:()=>nI,promise:()=>Q0,readonly:()=>ey,record:()=>D_,refine:()=>sy,set:()=>U0,strictObject:()=>O0,string:()=>Xf,stringFormat:()=>h0,stringbool:()=>tI,success:()=>W0,superRefine:()=>ay,symbol:()=>v0,templateLiteral:()=>Z0,transform:()=>bd,tuple:()=>$_,uint32:()=>b0,uint64:()=>S0,ulid:()=>r0,undefined:()=>w0,union:()=>Ed,unknown:()=>uo,url:()=>Kx,uuid:()=>Vx,uuidv4:()=>Zx,uuidv6:()=>Qx,uuidv7:()=>Gx,void:()=>T0,xid:()=>n0,xor:()=>$0});var Zf={};cn(Zf,{endsWith:()=>to,gt:()=>bn,gte:()=>mr,includes:()=>Ji,length:()=>di,lowercase:()=>Yi,lt:()=>An,lte:()=>Br,maxLength:()=>fi,maxSize:()=>jn,mime:()=>ro,minLength:()=>cr,minSize:()=>xn,multipleOf:()=>Hn,negative:()=>xc,nonnegative:()=>Sc,nonpositive:()=>Ic,normalize:()=>no,overwrite:()=>ln,positive:()=>bc,property:()=>vc,regex:()=>Ir,size:()=>li,slugify:()=>is,startsWith:()=>eo,toLowerCase:()=>oo,toUpperCase:()=>so,trim:()=>io,uppercase:()=>Xi});var us={};cn(us,{ZodISODate:()=>Gf,ZodISODateTime:()=>Qf,ZodISODuration:()=>Yf,ZodISOTime:()=>Kf,date:()=>r_,datetime:()=>t_,duration:()=>i_,time:()=>n_});var Qf=T("ZodISODateTime",(e,t)=>{ga.init(e,t),Dt.init(e,t)});function t_(e){return ac(Qf,e)}a(t_,"datetime");var Gf=T("ZodISODate",(e,t)=>{ma.init(e,t),Dt.init(e,t)});function r_(e){return cc(Gf,e)}a(r_,"date");var Kf=T("ZodISOTime",(e,t)=>{_a.init(e,t),Dt.init(e,t)});function n_(e){return uc(Kf,e)}a(n_,"time");var Yf=T("ZodISODuration",(e,t)=>{ya.init(e,t),Dt.init(e,t)});function i_(e){return lc(Yf,e)}a(i_,"duration");var jx=a((e,t)=>{la.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(r=>jo(e,r),"value")},flatten:{value:a(r=>Ho(e,r),"value")},addIssue:{value:a(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Uo,2)},"value")},addIssues:{value:a(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Uo,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),uO=T("ZodError",jx),Vr=T("ZodError",jx,{Parent:Error});var o_=Wo(Vr),s_=qo(Vr),a_=Vo(Vr),c_=Qo(Vr),u_=ol(Vr),l_=sl(Vr),f_=al(Vr),d_=cl(Vr),p_=ul(Vr),h_=ll(Vr),g_=fl(Vr),m_=dl(Vr);var at=T("ZodType",(e,t)=>(We.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:os(e,"input"),output:os(e,"output")}}),e.toJSONSchema=tm(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(fe.mergeDefs(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>yr(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>o_(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>a_(e,r,i),e.parseAsync=async(r,i)=>s_(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>c_(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>u_(e,r,i),e.decode=(r,i)=>l_(e,r,i),e.encodeAsync=async(r,i)=>f_(e,r,i),e.decodeAsync=async(r,i)=>d_(e,r,i),e.safeEncode=(r,i)=>p_(e,r,i),e.safeDecode=(r,i)=>h_(e,r,i),e.safeEncodeAsync=async(r,i)=>g_(e,r,i),e.safeDecodeAsync=async(r,i)=>m_(e,r,i),e.refine=(r,i)=>e.check(sy(r,i)),e.superRefine=r=>e.check(ay(r)),e.overwrite=r=>e.check(ln(r)),e.optional=()=>Wc(e),e.exactOptional=()=>H_(e),e.nullable=()=>qc(e),e.nullish=()=>Wc(qc(e)),e.nonoptional=r=>Q_(e,r),e.array=()=>Gc(e),e.or=r=>Ed([e,r]),e.and=r=>O_(e,r),e.transform=r=>Vc(e,bd(r)),e.default=r=>q_(e,r),e.prefault=r=>Z_(e,r),e.catch=r=>Y_(e,r),e.pipe=r=>Vc(e,r),e.readonly=()=>ey(e),e.describe=r=>{let i=e.clone();return Er.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return Er.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Er.get(e);let i=e.clone();return Er.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),ed=T("_ZodString",(e,t)=>{Fn.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>rm(e,i,n,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(Ir(...i)),e.includes=(...i)=>e.check(Ji(...i)),e.startsWith=(...i)=>e.check(eo(...i)),e.endsWith=(...i)=>e.check(to(...i)),e.min=(...i)=>e.check(cr(...i)),e.max=(...i)=>e.check(fi(...i)),e.length=(...i)=>e.check(di(...i)),e.nonempty=(...i)=>e.check(cr(1,...i)),e.lowercase=i=>e.check(Yi(i)),e.uppercase=i=>e.check(Xi(i)),e.trim=()=>e.check(io()),e.normalize=(...i)=>e.check(no(...i)),e.toLowerCase=()=>e.check(oo()),e.toUpperCase=()=>e.check(so()),e.slugify=()=>e.check(is())}),fs=T("ZodString",(e,t)=>{Fn.init(e,t),ed.init(e,t),e.email=r=>e.check(Fa(td,r)),e.url=r=>e.check(Ki(Zc,r)),e.jwt=r=>e.check(sc(md,r)),e.emoji=r=>e.check(Va(rd,r)),e.guid=r=>e.check(ns(jc,r)),e.uuid=r=>e.check(Ha(Cn,r)),e.uuidv4=r=>e.check(ja(Cn,r)),e.uuidv6=r=>e.check(Wa(Cn,r)),e.uuidv7=r=>e.check(qa(Cn,r)),e.nanoid=r=>e.check(Za(nd,r)),e.guid=r=>e.check(ns(jc,r)),e.cuid=r=>e.check(Qa(id,r)),e.cuid2=r=>e.check(Ga(od,r)),e.ulid=r=>e.check(Ka(sd,r)),e.base64=r=>e.check(nc(pd,r)),e.base64url=r=>e.check(ic(hd,r)),e.xid=r=>e.check(Ya(ad,r)),e.ksuid=r=>e.check(Xa(cd,r)),e.ipv4=r=>e.check(Ja(ud,r)),e.ipv6=r=>e.check(ec(ld,r)),e.cidrv4=r=>e.check(tc(fd,r)),e.cidrv6=r=>e.check(rc(dd,r)),e.e164=r=>e.check(oc(gd,r)),e.datetime=r=>e.check(t_(r)),e.date=r=>e.check(r_(r)),e.time=r=>e.check(n_(r)),e.duration=r=>e.check(i_(r))});function Xf(e){return Ua(fs,e)}a(Xf,"string");var Dt=T("ZodStringFormat",(e,t)=>{Ct.init(e,t),ed.init(e,t)}),td=T("ZodEmail",(e,t)=>{Sl.init(e,t),Dt.init(e,t)});function Wx(e){return Fa(td,e)}a(Wx,"email");var jc=T("ZodGUID",(e,t)=>{xl.init(e,t),Dt.init(e,t)});function qx(e){return ns(jc,e)}a(qx,"guid");var Cn=T("ZodUUID",(e,t)=>{Il.init(e,t),Dt.init(e,t)});function Vx(e){return Ha(Cn,e)}a(Vx,"uuid");function Zx(e){return ja(Cn,e)}a(Zx,"uuidv4");function Qx(e){return Wa(Cn,e)}a(Qx,"uuidv6");function Gx(e){return qa(Cn,e)}a(Gx,"uuidv7");var Zc=T("ZodURL",(e,t)=>{ha.init(e,t),Dt.init(e,t)});function Kx(e){return Ki(Zc,e)}a(Kx,"url");function Yx(e){return Ki(Zc,{protocol:/^https?$/,hostname:qr.domain,...fe.normalizeParams(e)})}a(Yx,"httpUrl");var rd=T("ZodEmoji",(e,t)=>{vl.init(e,t),Dt.init(e,t)});function Xx(e){return Va(rd,e)}a(Xx,"emoji");var nd=T("ZodNanoID",(e,t)=>{wl.init(e,t),Dt.init(e,t)});function Jx(e){return Za(nd,e)}a(Jx,"nanoid");var id=T("ZodCUID",(e,t)=>{Pl.init(e,t),Dt.init(e,t)});function e0(e){return Qa(id,e)}a(e0,"cuid");var od=T("ZodCUID2",(e,t)=>{Tl.init(e,t),Dt.init(e,t)});function t0(e){return Ga(od,e)}a(t0,"cuid2");var sd=T("ZodULID",(e,t)=>{kl.init(e,t),Dt.init(e,t)});function r0(e){return Ka(sd,e)}a(r0,"ulid");var ad=T("ZodXID",(e,t)=>{Cl.init(e,t),Dt.init(e,t)});function n0(e){return Ya(ad,e)}a(n0,"xid");var cd=T("ZodKSUID",(e,t)=>{Rl.init(e,t),Dt.init(e,t)});function i0(e){return Xa(cd,e)}a(i0,"ksuid");var ud=T("ZodIPv4",(e,t)=>{Ol.init(e,t),Dt.init(e,t)});function o0(e){return Ja(ud,e)}a(o0,"ipv4");var __=T("ZodMAC",(e,t)=>{$l.init(e,t),Dt.init(e,t)});function s0(e){return gf(__,e)}a(s0,"mac");var ld=T("ZodIPv6",(e,t)=>{Nl.init(e,t),Dt.init(e,t)});function a0(e){return ec(ld,e)}a(a0,"ipv6");var fd=T("ZodCIDRv4",(e,t)=>{Dl.init(e,t),Dt.init(e,t)});function c0(e){return tc(fd,e)}a(c0,"cidrv4");var dd=T("ZodCIDRv6",(e,t)=>{Bl.init(e,t),Dt.init(e,t)});function u0(e){return rc(dd,e)}a(u0,"cidrv6");var pd=T("ZodBase64",(e,t)=>{Ll.init(e,t),Dt.init(e,t)});function l0(e){return nc(pd,e)}a(l0,"base64");var hd=T("ZodBase64URL",(e,t)=>{zl.init(e,t),Dt.init(e,t)});function f0(e){return ic(hd,e)}a(f0,"base64url");var gd=T("ZodE164",(e,t)=>{Ul.init(e,t),Dt.init(e,t)});function d0(e){return oc(gd,e)}a(d0,"e164");var md=T("ZodJWT",(e,t)=>{Ml.init(e,t),Dt.init(e,t)});function p0(e){return sc(md,e)}a(p0,"jwt");var ds=T("ZodCustomStringFormat",(e,t)=>{Fl.init(e,t),Dt.init(e,t)});function h0(e,t,r={}){return ao(ds,e,t,r)}a(h0,"stringFormat");function g0(e){return ao(ds,"hostname",qr.hostname,e)}a(g0,"hostname");function m0(e){return ao(ds,"hex",qr.hex,e)}a(m0,"hex");function _0(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=qr[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return ao(ds,i,n,t)}a(_0,"hash");var ps=T("ZodNumber",(e,t)=>{Yo.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>nm(e,i,n,o),e.gt=(i,n)=>e.check(bn(i,n)),e.gte=(i,n)=>e.check(mr(i,n)),e.min=(i,n)=>e.check(mr(i,n)),e.lt=(i,n)=>e.check(An(i,n)),e.lte=(i,n)=>e.check(Br(i,n)),e.max=(i,n)=>e.check(Br(i,n)),e.int=i=>e.check(Jf(i)),e.safe=i=>e.check(Jf(i)),e.positive=i=>e.check(bn(0,i)),e.nonnegative=i=>e.check(mr(0,i)),e.negative=i=>e.check(An(0,i)),e.nonpositive=i=>e.check(Br(0,i)),e.multipleOf=(i,n)=>e.check(Hn(i,n)),e.step=(i,n)=>e.check(Hn(i,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function y_(e){return fc(ps,e)}a(y_,"number");var lo=T("ZodNumberFormat",(e,t)=>{Ea.init(e,t),ps.init(e,t)});function Jf(e){return pc(lo,e)}a(Jf,"int");function y0(e){return _f(lo,e)}a(y0,"float32");function E0(e){return yf(lo,e)}a(E0,"float64");function A0(e){return Ef(lo,e)}a(A0,"int32");function b0(e){return Af(lo,e)}a(b0,"uint32");var hs=T("ZodBoolean",(e,t)=>{Qi.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>im(e,r,i,n)});function E_(e){return hc(hs,e)}a(E_,"boolean");var gs=T("ZodBigInt",(e,t)=>{Xo.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>om(e,i,n,o),e.gte=(i,n)=>e.check(mr(i,n)),e.min=(i,n)=>e.check(mr(i,n)),e.gt=(i,n)=>e.check(bn(i,n)),e.gte=(i,n)=>e.check(mr(i,n)),e.min=(i,n)=>e.check(mr(i,n)),e.lt=(i,n)=>e.check(An(i,n)),e.lte=(i,n)=>e.check(Br(i,n)),e.max=(i,n)=>e.check(Br(i,n)),e.positive=i=>e.check(bn(BigInt(0),i)),e.negative=i=>e.check(An(BigInt(0),i)),e.nonpositive=i=>e.check(Br(BigInt(0),i)),e.nonnegative=i=>e.check(mr(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(Hn(i,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function x0(e){return bf(gs,e)}a(x0,"bigint");var _d=T("ZodBigIntFormat",(e,t)=>{Hl.init(e,t),gs.init(e,t)});function I0(e){return xf(_d,e)}a(I0,"int64");function S0(e){return If(_d,e)}a(S0,"uint64");var A_=T("ZodSymbol",(e,t)=>{jl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sm(e,r,i,n)});function v0(e){return Sf(A_,e)}a(v0,"symbol");var b_=T("ZodUndefined",(e,t)=>{Wl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cm(e,r,i,n)});function w0(e){return vf(b_,e)}a(w0,"_undefined");var x_=T("ZodNull",(e,t)=>{ql.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>am(e,r,i,n)});function I_(e){return wf(x_,e)}a(I_,"_null");var S_=T("ZodAny",(e,t)=>{Aa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fm(e,r,i,n)});function P0(){return _c(S_)}a(P0,"any");var v_=T("ZodUnknown",(e,t)=>{ba.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dm(e,r,i,n)});function uo(){return yc(v_)}a(uo,"unknown");var w_=T("ZodNever",(e,t)=>{Vl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lm(e,r,i,n)});function yd(e){return Pf(w_,e)}a(yd,"never");var P_=T("ZodVoid",(e,t)=>{xa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>um(e,r,i,n)});function T0(e){return Ec(P_,e)}a(T0,"_void");var Qc=T("ZodDate",(e,t)=>{Ia.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>pm(e,i,n,o),e.min=(i,n)=>e.check(mr(i,n)),e.max=(i,n)=>e.check(Br(i,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function k0(e){return Tf(Qc,e)}a(k0,"date");var T_=T("ZodArray",(e,t)=>{Sa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vm(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(cr(r,i)),e.nonempty=r=>e.check(cr(1,r)),e.max=(r,i)=>e.check(fi(r,i)),e.length=(r,i)=>e.check(di(r,i)),e.unwrap=()=>e.element});function Gc(e,t){return em(T_,e,t)}a(Gc,"array");function C0(e){let t=e._zod.def.shape;return Ad(Object.keys(t))}a(C0,"keyof");var Kc=T("ZodObject",(e,t)=>{ag.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wm(e,r,i,n),fe.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Ad(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:uo()}),e.loose=()=>e.clone({...e._zod.def,catchall:uo()}),e.strict=()=>e.clone({...e._zod.def,catchall:yd()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>fe.extend(e,r),e.safeExtend=r=>fe.safeExtend(e,r),e.merge=r=>fe.merge(e,r),e.pick=r=>fe.pick(e,r),e.omit=r=>fe.omit(e,r),e.partial=(...r)=>fe.partial(xd,e,r[0]),e.required=(...r)=>fe.required(Id,e,r[0])});function R0(e,t){let r={type:"object",shape:e??{},...fe.normalizeParams(t)};return new Kc(r)}a(R0,"object");function O0(e,t){return new Kc({type:"object",shape:e,catchall:yd(),...fe.normalizeParams(t)})}a(O0,"strictObject");function N0(e,t){return new Kc({type:"object",shape:e,catchall:uo(),...fe.normalizeParams(t)})}a(N0,"looseObject");var Yc=T("ZodUnion",(e,t)=>{Gi.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bf(e,r,i,n),e.options=t.options});function Ed(e,t){return new Yc({type:"union",options:e,...fe.normalizeParams(t)})}a(Ed,"union");var k_=T("ZodXor",(e,t)=>{Yc.init(e,t),Ql.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bf(e,r,i,n),e.options=t.options});function $0(e,t){return new k_({type:"union",options:e,inclusive:!1,...fe.normalizeParams(t)})}a($0,"xor");var C_=T("ZodDiscriminatedUnion",(e,t)=>{Yc.init(e,t),va.init(e,t)});function D0(e,t,r){return new C_({type:"union",options:t,discriminator:e,...fe.normalizeParams(r)})}a(D0,"discriminatedUnion");var R_=T("ZodIntersection",(e,t)=>{Gl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pm(e,r,i,n)});function O_(e,t){return new R_({type:"intersection",left:e,right:t})}a(O_,"intersection");var N_=T("ZodTuple",(e,t)=>{wa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tm(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function $_(e,t,r){let i=t instanceof We,n=i?r:t,o=i?t:null;return new N_({type:"tuple",items:e,rest:o,...fe.normalizeParams(n)})}a($_,"tuple");var Xc=T("ZodRecord",(e,t)=>{Pa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>km(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function D_(e,t,r){return new Xc({type:"record",keyType:e,valueType:t,...fe.normalizeParams(r)})}a(D_,"record");function B0(e,t,r){let i=yr(e);return i._zod.values=void 0,new Xc({type:"record",keyType:i,valueType:t,...fe.normalizeParams(r)})}a(B0,"partialRecord");function L0(e,t,r){return new Xc({type:"record",keyType:e,valueType:t,mode:"loose",...fe.normalizeParams(r)})}a(L0,"looseRecord");var B_=T("ZodMap",(e,t)=>{Kl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Im(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(xn(...r)),e.nonempty=r=>e.check(xn(1,r)),e.max=(...r)=>e.check(jn(...r)),e.size=(...r)=>e.check(li(...r))});function z0(e,t,r){return new B_({type:"map",keyType:e,valueType:t,...fe.normalizeParams(r)})}a(z0,"map");var L_=T("ZodSet",(e,t)=>{Yl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sm(e,r,i,n),e.min=(...r)=>e.check(xn(...r)),e.nonempty=r=>e.check(xn(1,r)),e.max=(...r)=>e.check(jn(...r)),e.size=(...r)=>e.check(li(...r))});function U0(e,t){return new L_({type:"set",valueType:e,...fe.normalizeParams(t)})}a(U0,"set");var ls=T("ZodEnum",(e,t)=>{Ta.init(e,t),at.init(e,t),e._zod.processJSONSchema=(i,n,o)=>hm(e,i,n,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ls({...t,checks:[],...fe.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new ls({...t,checks:[],...fe.normalizeParams(n),entries:o})}});function Ad(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ls({type:"enum",entries:r,...fe.normalizeParams(t)})}a(Ad,"_enum");function M0(e,t){return new ls({type:"enum",entries:e,...fe.normalizeParams(t)})}a(M0,"nativeEnum");var z_=T("ZodLiteral",(e,t)=>{ka.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gm(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F0(e,t){return new z_({type:"literal",values:Array.isArray(e)?e:[e],...fe.normalizeParams(t)})}a(F0,"literal");var U_=T("ZodFile",(e,t)=>{Xl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ym(e,r,i,n),e.min=(r,i)=>e.check(xn(r,i)),e.max=(r,i)=>e.check(jn(r,i)),e.mime=(r,i)=>e.check(ro(Array.isArray(r)?r:[r],i))});function H0(e){return Cf(U_,e)}a(H0,"file");var M_=T("ZodTransform",(e,t)=>{Ca.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xm(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new oi(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(fe.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(fe.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function bd(e){return new M_({type:"transform",transform:e})}a(bd,"transform");var xd=T("ZodOptional",(e,t)=>{Jo.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Wc(e){return new xd({type:"optional",innerType:e})}a(Wc,"optional");var F_=T("ZodExactOptional",(e,t)=>{Jl.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lf(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function H_(e){return new F_({type:"optional",innerType:e})}a(H_,"exactOptional");var j_=T("ZodNullable",(e,t)=>{Ra.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function qc(e){return new j_({type:"nullable",innerType:e})}a(qc,"nullable");function j0(e){return Wc(qc(e))}a(j0,"nullish");var W_=T("ZodDefault",(e,t)=>{ef.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Om(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function q_(e,t){return new W_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():fe.shallowClone(t)}})}a(q_,"_default");var V_=T("ZodPrefault",(e,t)=>{tf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Z_(e,t){return new V_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():fe.shallowClone(t)}})}a(Z_,"prefault");var Id=T("ZodNonOptional",(e,t)=>{rf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Q_(e,t){return new Id({type:"nonoptional",innerType:e,...fe.normalizeParams(t)})}a(Q_,"nonoptional");var G_=T("ZodSuccess",(e,t)=>{nf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Em(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function W0(e){return new G_({type:"success",innerType:e})}a(W0,"success");var K_=T("ZodCatch",(e,t)=>{of.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$m(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y_(e,t){return new K_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(Y_,"_catch");var X_=T("ZodNaN",(e,t)=>{sf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mm(e,r,i,n)});function q0(e){return kf(X_,e)}a(q0,"nan");var Sd=T("ZodPipe",(e,t)=>{Oa.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dm(e,r,i,n),e.in=t.in,e.out=t.out});function Vc(e,t){return new Sd({type:"pipe",in:e,out:t})}a(Vc,"pipe");var vd=T("ZodCodec",(e,t)=>{Sd.init(e,t),es.init(e,t)});function V0(e,t,r){return new vd({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}a(V0,"codec");var J_=T("ZodReadonly",(e,t)=>{af.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ey(e){return new J_({type:"readonly",innerType:e})}a(ey,"readonly");var ty=T("ZodTemplateLiteral",(e,t)=>{cf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_m(e,r,i,n)});function Z0(e,t){return new ty({type:"template_literal",parts:e,...fe.normalizeParams(t)})}a(Z0,"templateLiteral");var ry=T("ZodLazy",(e,t)=>{ff.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zm(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function ny(e){return new ry({type:"lazy",getter:e})}a(ny,"lazy");var iy=T("ZodPromise",(e,t)=>{lf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Q0(e){return new iy({type:"promise",innerType:e})}a(Q0,"promise");var oy=T("ZodFunction",(e,t)=>{uf.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bm(e,r,i,n)});function G0(e){return new oy({type:"function",input:Array.isArray(e?.input)?$_(e?.input):e?.input??Gc(uo()),output:e?.output??uo()})}a(G0,"_function");var Jc=T("ZodCustom",(e,t)=>{Na.init(e,t),at.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Am(e,r,i,n)});function K0(e){let t=new $t({check:"custom"});return t._zod.check=e,t}a(K0,"check");function Y0(e,t){return wc(Jc,e??(()=>!0),t)}a(Y0,"custom");function sy(e,t={}){return Pc(Jc,e,t)}a(sy,"refine");function ay(e){return Rf(e)}a(ay,"superRefine");var X0=Of,J0=Nf;function eI(e,t={}){let r=new Jc({type:"custom",check:"custom",fn:a(i=>i instanceof e,"fn"),abort:!0,...fe.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}a(eI,"_instanceof");var tI=a((...e)=>$f({Codec:vd,Boolean:hs,String:fs},...e),"stringbool");function rI(e){let t=ny(()=>Ed([Xf(e),y_(),E_(),I_(),Gc(t),D_(Xf(),t)]));return t}a(rI,"json");function nI(e,t){return Vc(bd(e),t)}a(nI,"preprocess");var fO={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function dO(e){Qt({customError:e})}a(dO,"setErrorMap");function pO(){return Qt().customError}a(pO,"getErrorMap");var cy;cy||(cy={});var ye={...Hc,...Zf,iso:us},hO=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function gO(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}a(gO,"detectVersion");function mO(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}a(mO,"resolveRef");function iI(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ye.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ye.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=mO(n,t),s=Or(o,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ye.null();if(n.length===0)return ye.never();if(n.length===1)return ye.literal(n[0]);if(n.every(s=>typeof s=="string"))return ye.enum(n);let o=n.map(s=>ye.literal(s));return o.length<2?o[0]:ye.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ye.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...e,type:o};return iI(s,t)});return n.length===0?ye.never():n.length===1?n[0]:ye.union(n)}if(!r)return ye.any();let i;switch(r){case"string":{let n=ye.string();if(e.format){let o=e.format;o==="email"?n=n.check(ye.email()):o==="uri"||o==="uri-reference"?n=n.check(ye.url()):o==="uuid"||o==="guid"?n=n.check(ye.uuid()):o==="date-time"?n=n.check(ye.iso.datetime()):o==="date"?n=n.check(ye.iso.date()):o==="time"?n=n.check(ye.iso.time()):o==="duration"?n=n.check(ye.iso.duration()):o==="ipv4"?n=n.check(ye.ipv4()):o==="ipv6"?n=n.check(ye.ipv6()):o==="mac"?n=n.check(ye.mac()):o==="cidr"?n=n.check(ye.cidrv4()):o==="cidr-v6"?n=n.check(ye.cidrv6()):o==="base64"?n=n.check(ye.base64()):o==="base64url"?n=n.check(ye.base64url()):o==="e164"?n=n.check(ye.e164()):o==="jwt"?n=n.check(ye.jwt()):o==="emoji"?n=n.check(ye.emoji()):o==="nanoid"?n=n.check(ye.nanoid()):o==="cuid"?n=n.check(ye.cuid()):o==="cuid2"?n=n.check(ye.cuid2()):o==="ulid"?n=n.check(ye.ulid()):o==="xid"?n=n.check(ye.xid()):o==="ksuid"&&(n=n.check(ye.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?ye.number().int():ye.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=ye.boolean();break}case"null":{i=ye.null();break}case"object":{let n={},o=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let f=Or(l,t);n[u]=s.has(u)?f:f.optional()}if(e.propertyNames){let u=Or(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Or(e.additionalProperties,t):ye.any();if(Object.keys(n).length===0){i=ye.record(u,l);break}let f=ye.object(n).passthrough(),p=ye.looseRecord(u,l);i=ye.intersection(f,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),f=[];for(let g of l){let h=Or(u[g],t),_=ye.string().regex(new RegExp(g));f.push(ye.looseRecord(_,h))}let p=[];if(Object.keys(n).length>0&&p.push(ye.object(n).passthrough()),p.push(...f),p.length===0)i=ye.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=ye.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)g=ye.intersection(g,p[h]);i=g}break}let c=ye.object(n);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(Or(e.additionalProperties,t)):i=c.passthrough();break}case"array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>Or(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?Or(o,t):void 0;c?i=ye.tuple(s).rest(c):i=ye.tuple(s),typeof e.minItems=="number"&&(i=i.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ye.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(u=>Or(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?Or(e.additionalItems,t):void 0;c?i=ye.tuple(s).rest(c):i=ye.tuple(s),typeof e.minItems=="number"&&(i=i.check(ye.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ye.maxLength(e.maxItems)))}else if(o!==void 0){let s=Or(o,t),c=ye.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=ye.array(ye.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}a(iI,"convertBaseSchema");function Or(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let r=iI(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>Or(l,t)),u=ye.union(c);r=i?ye.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>Or(l,t)),u=ye.xor(c);r=i?ye.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:ye.any();else{let c=i?r:Or(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=ye.intersection(c,Or(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=ye.nullable(r)),e.readOnly===!0&&(r=ye.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of o)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))hO.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),r}a(Or,"convertSchema");function oI(e,t){if(typeof e=="boolean")return e?ye.any():ye.never();let r=gO(e,t?.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Er};return Or(e,n)}a(oI,"fromJSONSchema");var uy={};cn(uy,{bigint:()=>AO,boolean:()=>EO,date:()=>bO,number:()=>yO,string:()=>_O});function _O(e){return Ma(fs,e)}a(_O,"string");function yO(e){return dc(ps,e)}a(yO,"number");function EO(e){return gc(hs,e)}a(EO,"boolean");function AO(e){return mc(gs,e)}a(AO,"bigint");function bO(e){return Ac(Qc,e)}a(bO,"date");Qt($a());var ly={required:"required",invalidGitRepoSlug:"invalidGitRepoSlug",invalidGitRepoBranch:"invalidGitRepoBranch",invalidGitRepoRemoteUrl:"invalidGitRepoRemoteUrl",invalidExternalId:"invalidExternalId",invalidFileName:"invalidFileName",messageRequiresContentOrFiles:"messageRequiresContentOrFiles",agentConfigTooLarge:"agentConfigTooLarge",invalidGcpResourceId:"invalidGcpResourceId",duplicateRouteName:"duplicateRouteName",atLeastOne:"atLeastOne",wholeNumber:"wholeNumber",atMostTenThousand:"atMostTenThousand",tierNameTooLong:"tierNameTooLong",tierDescriptionTooLong:"tierDescriptionTooLong",invalidEmoji:"invalidEmoji",tierTooManyModels:"tierTooManyModels",tierDuplicateModel:"tierDuplicateModel",tierThinkingBudgetInvalid:"tierThinkingBudgetInvalid",invalidHeaderName:"invalidHeaderName",reservedHeaderName:"reservedHeaderName",duplicateHeaderName:"duplicateHeaderName",invalidHeaderValue:"invalidHeaderValue",invalidDomain:"invalidDomain",duplicateDomain:"duplicateDomain"};var sI=(r=>(r.IMAGE="image",r.TEXT="text",r))(sI||{}),zr=ge.object({apiKey:ge.string()}),aI=ge.object({serviceAccountJson:ge.string().min(1)}),cI=zr,uI=zr.extend({apiKeyHash:ge.string()}),lI=zr,fI=zr,dI=zr,pI=zr,hI=zr,gI=zr,mI=ge.object({accessKeyId:ge.string().min(1),secretAccessKey:ge.string().min(1),sessionToken:ge.string().optional()}),_I=zr,yI=ge.object({}),EI=ge.object({}),fy=ge.object({modelId:ge.string(),modelName:ge.string(),modelType:ge.enum(sI)}),AI=ge.object({apiKeyHeader:ge.string(),baseUrl:ge.string(),models:ge.array(fy),defaultHeaders:ge.record(ge.string(),ge.string()).optional(),apiStyle:ge.enum(["chat","responses"]).optional()}),bI=ge.object({accountId:ge.string(),gatewayId:ge.string(),models:ge.array(fy),vertexProject:ge.string().optional(),vertexRegion:ge.string().optional()}),xI=ge.object({resourceName:ge.string(),apiVersion:ge.preprocess(e=>typeof e=="string"&&e.trim().length===0?void 0:e,ge.string().optional())}),II=ge.object({}),SI=ge.object({}),vI=ge.object({}),wI=ge.object({region:ge.string().min(1)}),PI=ge.object({project:ge.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,ly.invalidGcpResourceId),region:ge.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/,ly.invalidGcpResourceId),models:ge.array(fy)}),TI=ge.object({}),fo=ge.object({}),qH=ge.union([cI,dI,pI,hI,gI,fI,lI,uI,mI,aI,_I]),VH=ge.union([AI,bI,xI,PI,wI,yI,II,SI,vI,EI,TI,fo]),ZH=ge.discriminatedUnion("provider",[ge.object({provider:ge.literal("openai"),config:SI.partial(),auth:hI.partial()}),ge.object({provider:ge.literal("openrouter"),config:vI.partial(),auth:gI.partial()}),ge.object({provider:ge.literal("anthropic"),config:yI.partial(),auth:cI.partial()}),ge.object({provider:ge.literal("azure"),config:xI.partial(),auth:dI.partial()}),ge.object({provider:ge.literal("google"),config:II.partial(),auth:pI.partial()}),ge.object({provider:ge.literal("cloudflare-gateway"),config:bI.partial(),auth:fI.partial()}),ge.object({provider:ge.literal("custom"),config:AI.partial(),auth:lI.partial()}),ge.object({provider:ge.literal("activepieces"),config:EI.partial(),auth:uI.partial()}),ge.object({provider:ge.literal("bedrock"),config:wI.partial(),auth:mI.partial()}),ge.object({provider:ge.literal("vertex"),config:PI.partial(),auth:aI.partial()}),ge.object({provider:ge.literal("mistral"),config:TI.partial(),auth:_I.partial()}),ge.object({provider:ge.literal("xai"),config:fo.partial(),auth:zr.partial()}),ge.object({provider:ge.literal("deepseek"),config:fo.partial(),auth:zr.partial()}),ge.object({provider:ge.literal("zai"),config:fo.partial(),auth:zr.partial()}),ge.object({provider:ge.literal("qwen"),config:fo.partial(),auth:zr.partial()}),ge.object({provider:ge.literal("minimax"),config:fo.partial(),auth:zr.partial()}),ge.object({provider:ge.literal("moonshot"),config:fo.partial(),auth:zr.partial()})]);var ij=x().check(Ir(/^#[0-9A-Fa-f]{6}$/));var sj=N({filename:x(),data:Ye(),type:De("file"),mimetype:Z(x())});var xO=Cr(CI());var pj=N({...fn,name:x(),permissions:Me(x()),platformId:Gt(x()),type:x(),userCount:Z(Ar())});var Ij=ge.enum(["active","out_of_credits","rejected","unreachable"]);var RI=(i=>(i.AGENT_DECIDE="agent-decide",i.CHOOSE_YOURSELF="choose-yourself",i.LEAVE_EMPTY="leave-empty",i))(RI||{}),dy=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(dy||{}),py=(i=>(i.SSE="sse",i.STREAMABLE_HTTP="streamable-http",i.SIMPLE_HTTP="http",i))(py||{});var hy=(i=>(i.TEXT="text",i.NUMBER="number",i.BOOLEAN="boolean",i))(hy||{});var gy=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(gy||{});var IO=N({mode:Le(RI),value:Ye()}),SO=N({auth:Z(x()),fields:Xe(x(),IO)}),vO=N({pieceName:x(),pieceVersion:x(),actionName:x(),predefinedInput:Z(SO)}),wO=N({type:De("PIECE"),toolName:x().check(cr(1)),pieceMetadata:vO}),PO=N({type:De("none")}),TO=N({type:De("access_token"),accessToken:x()}),kO=N({type:De("api_key"),apiKey:x(),apiKeyHeader:x()}),CO=N({type:De("headers"),headers:Xe(x(),x())}),RO=mi("type",[PO,TO,kO,CO]),OI=N({type:De("FLOW"),toolName:x().check(cr(1)),externalFlowId:x(),flowDisplayName:Z(x())}),NI=N({type:De("MCP"),toolName:x().check(cr(1)),serverUrl:wx(),protocol:Le(py),auth:RO}),$I=N({type:De("KNOWLEDGE_BASE"),toolName:x().check(cr(1)),sourceType:Le(dy),sourceId:x(),sourceName:x()}),OO=mi("type",[wO,OI,NI,$I]),NO=N({displayName:x(),description:Z(x()),type:Le(hy)}),DI=N({type:De("MARKDOWN"),markdown:x()}),ms={type:De("TOOL_CALL"),input:Gt(Xe(x(),Ye())),output:Z(Ye()),toolName:x(),status:Le(gy),toolCallId:x(),startTime:x(),endTime:Z(x())},l9=N(ms),BI=mi("toolCallType",[N({...ms,toolCallType:De("PIECE"),pieceName:x(),pieceVersion:x(),actionName:x()}),N({...ms,toolCallType:De("FLOW"),displayName:x(),externalFlowId:x()}),N({...ms,toolCallType:De("MCP"),displayName:x(),serverUrl:x()}),N({...ms,toolCallType:De("KNOWLEDGE_BASE"),displayName:x(),sourceType:x()}),N({...ms,toolCallType:De("UNKNOWN"),displayName:x()})]),$O=st([DI,BI]);var DO=10800*1e3,BO=900*1e3;var Ey=(r=>(r.IMAGE="image",r.TEXT="text",r))(Ey||{}),Qn=N({apiKey:x()}),zO=Qn,UO=N({apiKey:x(),apiKeyHash:x()}),MO=Qn,FO=Qn,HO=Qn,jO=Qn,WO=Qn,qO=Qn,VO=Qn,UI=N({serviceAccountJson:x().check(cr(1))}),MI=N({accessKeyId:x().check(cr(1)),secretAccessKey:x().check(cr(1)),sessionToken:Z(x())}),ZO=N({}),QO=N({}),GO=N({}),KO=N({}),YO=N({}),XO=N({}),Ay=N({modelId:x(),modelName:x(),modelType:Le(Ey)}),FI=N({apiKeyHeader:x(),baseUrl:x(),models:Me(Ay),defaultHeaders:Z(Xe(x(),x())),apiStyle:Z(Le(["chat","responses"]))}),HI=N({accountId:x(),gatewayId:x(),models:Me(Ay),vertexProject:Z(x()),vertexRegion:Z(x())}),jI=N({resourceName:x(),apiVersion:yi(_i(e=>typeof e=="string"&&e.trim().length===0?void 0:e),Z(x()))}),WI=N({region:x().check(cr(1))}),qI=N({project:x().check(Ir(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:x().check(Ir(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:Me(Ay)}),VI=N({}),JO=st([zO,HO,jO,WO,qO,FO,MO,UO,MI,UI,VO]),ZI=st([FI,HI,jI,qI,WI,ZO,GO,KO,YO,QO,XO,VI]),eN=N({id:x(),name:x(),type:Le(Ey)}),tN=N({id:x(),name:x(),provider:Le(xi),config:ZI,enabledForChat:yt()}),rN=N({provider:Le(xi),name:x(),enabledForChat:yt(),keys:Me(N({id:x(),name:x()}))}),nN=N({provider:Le(xi),configId:x(),config:ZI,auth:JO,platformId:x()});var h9={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},LI=["gpt-5.5","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],iN=["claude-sonnet-5-5","claude-opus-5-5","claude-haiku-5-5"],oN=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],QI=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],my=["gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],yy=["gemini-2.5-pro","gemini-2.5-flash"],sN=["grok-4.20"],g9={anthropic:oN,google:yy,vertex:yy},m9=[...QI.map(e=>`anthropic/${e}`),"deepseek/deepseek-v4.1-flash"],aN={openai:LI,anthropic:iN,google:my,vertex:my,activepieces:[...QI.map(e=>`anthropic/${e}`),...LI.map(e=>`openai/${e}`),...[...my,...yy].map(e=>`google/${e}`),...sN.map(e=>`x-ai/${e}`)]};var zI=128e3,cN={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function uN({provider:e}){return e?cN[e]??zI:zI}a(uN,"getMaxContextTokens");var _y={openai:["text-embedding-3-small","text-embedding-3-large"],google:["text-embedding-004","gemini-embedding-001"],azure:["text-embedding-3-small","text-embedding-3-large"],activepieces:["text-embedding-3-small"],openrouter:["openai/text-embedding-3-small","openai/text-embedding-3-large"]},lN={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},fN=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),dN={xai:"https://api.x.ai/v1",deepseek:"https://api.deepseek.com/v1",zai:"https://api.z.ai/api/paas/v4",qwen:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",minimax:"https://api.minimax.io/v1",moonshot:"https://api.moonshot.ai/v1"};function Sr(e){return{chatModels:aN[e],maxContextTokens:uN({provider:e}),embeddingModels:_y[e]??[],defaultEmbeddingModel:_y[e]?.[0],supportsEmbedding:(_y[e]??[]).length>0,supportsImageGeneration:!fN.has(e),defaultImageModel:pN[e],webSearch:lN[e]}}a(Sr,"buildProviderCapabilities");var GI=[{id:"fast",label:"Fast",modelId:"google/gemini-3.1-flash-lite-image"},{id:"smart",label:"Expert",modelId:"google/gemini-3.1-flash-image"},{id:"premium",label:"Heavy",modelId:"google/gemini-3-pro-image"}],pN={activepieces:GI[0].modelId,openrouter:"google/gemini-3.1-flash-lite-image",openai:"gpt-image-1.5",google:"gemini-3.1-flash-image"},hN={openai:Sr("openai"),anthropic:Sr("anthropic"),openrouter:Sr("openrouter"),azure:Sr("azure"),google:Sr("google"),"cloudflare-gateway":Sr("cloudflare-gateway"),custom:Sr("custom"),bedrock:Sr("bedrock"),vertex:Sr("vertex"),mistral:Sr("mistral"),activepieces:Sr("activepieces"),xai:Sr("xai"),deepseek:Sr("deepseek"),zai:Sr("zai"),qwen:Sr("qwen"),minimax:Sr("minimax"),moonshot:Sr("moonshot")};var gN=N({base64Url:x(),fileName:x(),extension:Z(x())}),mN=N({mimeType:x(),url:x(),fileName:Z(x())}),by=st([gN,mN]);var _N=st([N({type:De("file"),value:by}),N({type:De("markdown"),value:x(),files:Z(Me(by))})]),yN=N({sessionId:x(),message:x(),files:Z(Me(x()))});var YI=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(YI||{}),XI=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(XI||{}),xy=(i=>(i.RECORD_CREATED="RECORD_CREATED",i.RECORD_UPDATED="RECORD_UPDATED",i.RECORD_DELETED="RECORD_DELETED",i))(xy||{});var EN=st([N({...fn,name:x(),externalId:x(),type:De("STATIC_DROPDOWN"),tableId:x(),projectId:x(),data:N({options:Me(N({value:x()}))})}),N({...fn,name:x(),externalId:x(),type:st([De("TEXT"),De("NUMBER"),De("DATE"),De("DATETIME")]),tableId:x(),projectId:x()})]),AN=N({...fn,name:x(),folderId:Gt(x()),projectId:x(),externalId:x(),status:Jm(XI),trigger:Jm(YI)}),bN=N({...fn,tableId:x(),projectId:x(),cells:Xe(x(),N({updated:x(),created:x(),value:Ye(),fieldName:x()}))}),xN=N({events:Me(Le(xy)),webhookUrl:x(),flowId:x()}),IN=N({fields:Me(N({id:x(),name:x()})),rows:Me(Xe(x(),x())),name:x()}),SN=N({projectId:x(),limit:Z(Rc.number()),cursor:Z(x()),name:Z(x()),externalIds:Vf(x()),folderId:Z(x()),folderIds:Vf(x())}),vN=N({records:Me(Me(N({fieldId:x(),value:eS()}))),tableId:x()}),wN=N({cells:Z(Me(N({fieldId:x(),value:eS()}))),tableId:x(),agentUpdate:Z(yt())}),JI=mi("operator",[po("eq"),po("neq"),po("gt"),po("gte"),po("lt"),po("lte"),po("co"),KI("exists"),KI("not_exists")]),PN=N({tableId:x(),limit:Z(Rc.number()),cursor:Z(x()),filters:Vf(JI)});function eS(){return yi(_i(e=>e==null?e:String(e)),Cc(x()))}a(eS,"coerceToString");function po(e){return N({fieldId:x(),operator:De(e),value:x()})}a(po,"valueFilter");function KI(e){return N({fieldId:x(),operator:De(e)})}a(KI,"existenceFilter");var TN=N({status:Z(Ar()),body:Z(Ye()),headers:Z(Xe(x(),x()))}),kN=N({...fn,deleted:Gt(bi),ownerId:x(),displayName:x(),platformId:x(),externalId:Gt(x())});var tS=N({name:x(),description:Z(x()),type:x(),required:yt()}),CN=N({pieceName:x(),triggerName:x(),input:N({toolName:x(),toolDescription:x(),inputSchema:Me(tS),returnsResponse:yt()})});var rS="^[0-9]+\\.[0-9]+\\.[0-9]+$",D9=new RegExp(rS),ON="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",B9=x().check(Ir(new RegExp(rS))),L9=x().check(Ir(new RegExp(ON))),NN=N({packageType:De("ARCHIVE"),pieceType:Le(as),pieceName:x(),pieceVersion:x(),archiveId:x(),platformId:x()}),nS=N({packageType:De("REGISTRY"),pieceType:De("OFFICIAL"),pieceName:x(),pieceVersion:x()}),iS=N({packageType:De("REGISTRY"),pieceType:De("CUSTOM"),pieceName:x(),pieceVersion:x(),platformId:x()}),z9=st([nS,iS]),U9=st([NN,nS,iS]);var $N=mi("type",[N({type:De("CRON_EXPRESSION"),cronExpression:x(),timezone:x()}),N({type:De("INTERVAL"),intervalMs:Px().check(mr(6e4))})]),M9=N({...fn,type:Le(Ei),projectId:x(),flowId:x(),triggerName:x(),schedule:Gt($N),flowVersionId:x(),pieceName:x(),pieceVersion:x(),deleted:Gt(x()),simulate:yt()}),oS=(v=>(v.UNKNOWN="UNKNOWN",v.FLOW_RUN_LOG="FLOW_RUN_LOG",v.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",v.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",v.FLOW_STEP_FILE="FLOW_STEP_FILE",v.SAMPLE_DATA="SAMPLE_DATA",v.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",v.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",v.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",v.PROJECT_RELEASE="PROJECT_RELEASE",v.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",v.PLATFORM_ASSET="PLATFORM_ASSET",v.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",v.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",v.MCP_CALL_PAYLOAD="MCP_CALL_PAYLOAD",v.KNOWLEDGE_BASE="KNOWLEDGE_BASE",v.FLOW_BUNDLE="FLOW_BUNDLE",v.PREWARM_SCOPE="PREWARM_SCOPE",v))(oS||{}),sS=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(sS||{}),aS=(r=>(r.S3="S3",r.DB="DB",r))(aS||{}),F9=N({...fn,projectId:Gt(x()),platformId:Gt(x()),type:Le(oS),compression:Le(sS),data:Z(Ye()),location:Le(aS),size:Gt(Ar()),fileName:Gt(x()),s3Key:Gt(x()),metadata:Gt(Xe(x(),x()))}),cS=(i=>(i.ADMIN="ADMIN",i.MEMBER="MEMBER",i.OPERATOR="OPERATOR",i))(cS||{}),uS=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(uS||{}),H9=N({id:x(),email:x(),firstName:x(),status:Le(uS),externalId:Gt(x()),platformId:Gt(x()),platformRole:Le(cS),lastName:x(),created:bi,updated:bi,lastActiveDate:Gt(bi),imageUrl:Gt(x())});var Sy=N({...mt.shape,...et(Xe(x(),Ye()),"OBJECT").shape});var vy=N({...mt.shape,formatProperty:Z(x()),...et(x(),"RICH_TEXT").shape});var pS=N({...mt.shape,...et(x(),"COLOR").shape});var wy=st([tn,Wn,vy,Wf,Vn,rn,qn,Zm,Oc,Gm,Zn,Dc,Sy,Bc,$c,Qm,Nc,pS]),bt={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Rn=N({displayName:x(),description:Z(x()),hasConnectionIdentifier:Z(yt())});var hS=N({username:x(),password:x()}),Py=N({...Rn.shape,username:N({displayName:x(),description:Z(x())}),password:N({displayName:x(),description:Z(x())}),...et(hS,"BASIC_AUTH").shape});var LN=Xe(x(),st([tn,Wn,Zn,Vn,rn])),Ty=N({...Rn.shape,props:LN,...et(Ye(),"CUSTOM_AUTH").shape});var ho=N({...Rn.shape,...et(N({auth:x()}),"SECRET_TEXT").shape});var zN=Xe(x(),st([tn,Wn,ho,Zn,Vn,rn,qn,Wf])),gS=N({...Rn.shape,props:zN,...et(Ye(),"OIDC").shape});var ky=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(ky||{}),mS=st([tn,ho,rn]),_S=Xe(x(),mS),yS=N({serverUrlProp:x(),authUrlProp:x(),tokenUrlProp:x(),scopesProp:Z(x())}),UN=N({props:Z(Xe(x(),mS)),authUrl:x(),tokenUrl:x(),scope:Me(x()),prompt:Z(st([De("none"),De("consent"),De("login"),De("omit")])),pkce:Z(yt()),pkceMethod:Z(st([De("plain"),De("S256")])),authorizationMethod:Z(Le(ky)),grantType:Z(st([Le(zc),De(Km)])),extra:Z(Xe(x(),x())),discovery:Z(yS)}),ES=N({access_token:x(),props:Z(_S),data:Xe(x(),kc())}),Cy=N({...Rn.shape,...UN.shape,...et(ES,"OAUTH2").shape});var _s=st([Py,Ty,gS,Cy,ho]),eu="Connection",tu={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||eu}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||eu,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||eu}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||eu}},None(){}};var vq={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var MN=N({...mt.shape,...et(Ye(),"CUSTOM").shape,code:x()});var HN=st([wy,_s]),Ry=Xe(x(),HN),qq=Xe(x(),wy);var AS=st([N({strategy:De("CRON"),cronExpression:x()}),N({strategy:De("NONE")})]),ys=class{constructor(t,r,i,n,o,s,c,u,l,f,p,g,h,_,y,b,S,v,M,R,J){this.name=t;this.displayName=r;this.description=i;this.requireAuth=n;this.props=o;this.type=s;this.handshakeConfiguration=c;this.onHandshake=u;this.renewConfiguration=l;this.onRenew=f;this.onEnable=p;this.onDisable=g;this.onStart=h;this.run=_;this.test=y;this.sampleData=b;this.testStrategy=S;this.outputSchema=v;this.aiMetadata=M;this.classification=R;this.propertyGroups=J}static{a(this,"ITrigger")}},bS=a(e=>{switch(e.type){case"WEBHOOK":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new ys(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,Lt(e.sampleData)&&Lt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var xS="2",Pd="0.82.0";var Oy=class{constructor(t,r,i,n,o,s,c,u,l=Pd,f,p="",g){this.displayName=t;this.logoUrl=r;this.authors=i;this.events=n;this.categories=c;this.auth=u;this.minimumSupportedRelease=l;this.maximumSupportedRelease=f;this.description=p;this.deprecated=g;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:xS}),"getContextInfo");(!WN(l)||qN(l,Pd))&&(this.minimumSupportedRelease=Pd),o.forEach(h=>this._actions[h.name]=h),s.forEach(h=>this._triggers[h.name]=h)}static{a(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:jN(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},SS=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,i,n)=>i===n.findIndex(o=>o.type===r.type)))throw new Error("Auth properties must be unique by type");return new Oy(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function jN(e){if(e!==void 0)return Array.isArray(e)?e.map(IS):IS(e)}a(jN,"withConnectionIdentifierFlag");function IS(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(IS,"flagConnectionIdentifier");function WN(e){return/^\d+\.\d+\.\d+$/.test(e)}a(WN,"isValidSimpleSemver");function qN(e,t){let[r,i,n]=e.split(".").map(Number),[o,s,c]=t.split(".").map(Number);return r!==o?r<o:i!==s?i<s:n<c}a(qN,"isSemverLessThan");var VN=Z(Xe(x(),Xe(x(),x()))),vS=N({id:Z(x()),name:x(),displayName:x(),logoUrl:x(),description:x(),authors:Me(x()),platformId:Z(x()),directoryPath:Z(x()),auth:Z(st([_s,Me(_s)])),version:x(),categories:Z(Me(Le(co))),minimumSupportedRelease:Z(x()),maximumSupportedRelease:Z(x()),deprecated:Z(yt()),i18n:VN}),ZN=Le(["human","ai","both"]),wS=N({description:Z(x()),idempotent:Z(yt())}),PS=Le(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var QN=Le(["tabs","section","summary","builder","footer"]),TS=N({key:x(),display:QN,label:Z(x()),description:Z(x()),icon:Z(x()),props:Me(x())}),kS=N({name:x(),displayName:x(),description:x(),props:Ry,propertyGroups:Z(Me(TS)),requireAuth:yt(),errorHandlingOptions:Z(Vm),outputSchema:Z(Ff()),audience:Z(ZN),aiMetadata:Z(wS),classification:Z(PS)}),CS=N({name:x(),displayName:x(),description:x(),props:Ry,propertyGroups:Z(Me(TS)),errorHandlingOptions:Z(Vm),type:Le(Ei),sampleData:Ye(),handshakeConfiguration:Z(Ff()),renewConfiguration:Z(AS),testStrategy:Le(Mc),outputSchema:Z(Ff()),aiMetadata:Z(wS),classification:Z(PS)}),GN=N({...vS.shape,actions:Xe(x(),kS),triggers:Xe(x(),CS)}),KN=N({...vS.shape,actions:Ar(),triggers:Ar(),suggestedActions:Z(Me(kS)),suggestedTriggers:Z(Me(CS))}),RS=N({projectUsage:Ar(),pieceType:Le(as),packageType:Le(Lc),platformId:Z(x()),archiveId:Z(x())}),GV=N({...GN.shape,...RS.shape}),KV=N({...KN.shape,...RS.shape}),YV=N({name:x(),version:x()});var NS=Cr(require("path")),Ny=Cr(require("fs/promises"));var Td={translatePiece:a(({piece:e,locale:t})=>{let r=t?e.i18n?.[t]:void 0;if(!r)return e;let i=OS(e.categories)?XN:YN;return BS({node:e,tree:i,translations:r})},"translatePiece"),pathsToTranslate:a(e=>OS(e)?[...Td.pathsToValuesToTranslate,"displayName"]:Td.pathsToValuesToTranslate,"pathsToTranslate"),initializeI18n:a(async e=>{try{let t=Object.values(e_),r={};for(let i of t){let n=await r$(i,e);n&&(r[i]=n)}return Object.keys(r).length>0?r:void 0}catch(t){console.log(`Error initializing i18n for ${e}:`,t);return}},"initializeI18n"),pathsToValuesToTranslate:["description","auth.username.displayName","auth.username.description","auth.password.displayName","auth.password.description","auth.props.*.displayName","auth.props.*.description","auth.props.*.options.options.*.label","auth.description","actions.*.displayName","actions.*.description","actions.*.props.*.displayName","actions.*.props.*.description","actions.*.props.*.options.options.*.label","actions.*.propertyGroups.*.label","triggers.*.displayName","triggers.*.description","triggers.*.props.*.displayName","triggers.*.props.*.description","triggers.*.props.*.options.options.*.label","triggers.*.propertyGroups.*.label"]},YN=$S(Td.pathsToTranslate()),XN=$S(Td.pathsToTranslate(["CORE"]));function $S(e){return e.reduce((t,r)=>DS({tree:t,keys:r.split(".")}),{})}a($S,"buildTree");function OS(e){return e?.includes("CORE")??!1}a(OS,"isCorePiece");function DS({tree:e,keys:[t,...r]}){return{...e,[t]:r.length===0?null:DS({tree:e[t]??{},keys:r})}}a(DS,"addPath");function BS({node:e,tree:t,translations:r}){if(!e$(e))return e;let i={},n=!1;for(let[o,s]of Object.entries(t))for(let c of o==="*"?Object.keys(e):[o]){let u=e[c],l=s===null?JN({value:u,translations:r}):BS({node:u,tree:s,translations:r});l!==u&&(i[c]=l,n=!0)}return n?Object.assign(Array.isArray(e)?[]:{},e,i):e}a(BS,"translateNode");function JN({value:e,translations:t}){return typeof e!="string"?e:t[e.slice(0,512)]||e}a(JN,"translateValue");function e$(e){return typeof e=="object"&&e!==null}a(e$,"isRecord");async function t$(e){try{return await Ny.default.access(e),!0}catch{return!1}}a(t$,"fileExists");var r$=a(async(e,t)=>{let r=NS.default.join(t,"src","i18n",`${e}.json`);if(!await t$(r))return null;try{let i=await Ny.default.readFile(r,"utf8"),n=JSON.parse(i);if(typeof n=="object"&&n!==null)return n;throw new Error(`Invalid i18n file format for ${e} in piece ${t}`)}catch(i){return console.error(`Error reading i18n file for ${e} in piece ${t}:`,i),null}},"readLocaleFile");var Bk=Cr(In());var vk=Cr(Sk()),wk=Cr(In());async function Vt(e){return Lt(e)?"sftp":e}a(Vt,"getProtocolBackwardCompatibility");async function Jt(e){let{protocol:t,host:r,port:i,allow_unauthorized_certificates:n,allow_anonymous_login:o,username:s,password:c,privateKey:u,algorithm:l}=e,f=await Vt(t);if(f==="sftp"){let p=new vk.default;if(u){let g=u.replace(/\\r\\n/g,`
63
63
  `).replace(/\\n/g,`
64
64
  `).replace(/\r\n/g,`
65
65
  `).replace(/\r/g,`
@@ -69,8 +69,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
69
69
  `).replace(/(DEK-Info:\s*\S+)\s+/,`$1
70
70
 
71
71
  `).replace(/\s+(-----END [A-Z0-9 ]+ KEY-----)/,`
72
- $1`);let _=g.match(/(-----BEGIN [A-Z0-9 ]+ KEY-----\n(?:Proc-Type:[^\n]+\n)?(?:DEK-Info:[^\n]+\n\n)?)/),y=g.match(/(\n-----END [A-Z0-9 ]+ KEY-----)/);if(_&&y){let b=_[1],v=y[1],M=g.replace(b,"").replace(v,"").replace(/\s+/g,"").match(/.{1,64}/g)||[];g=b+M.join(`
73
- `)+v}}let h={host:r,port:i,username:s,privateKey:g,timeout:1e4};c&&(h.passphrase=c),l&&l.length>0&&(h.algorithms={serverHostKey:l}),await p.connect(h)}else c&&await p.connect({host:r,port:i,username:s,password:c,timeout:1e4});return p}else{let p=new hk.Client(void 0,{allowSeparateTransferHost:!0});return await p.access({host:r,port:i,user:s,password:c,secure:f==="ftps",secureOptions:{rejectUnauthorized:!(n??!1)}}),p}}a(Xt,"getClient");async function sr(e,t){await qt(t)==="sftp"?await e.end():e.close()}a(sr,"endClient");var pr=eu.CustomAuth({props:{protocol:bt.StaticDropdown({displayName:"Protocol",description:"The protocol to use",required:!1,options:{options:[{value:"sftp",label:"SFTP"},{value:"ftp",label:"FTP"},{value:"ftps",label:"FTPS"}]}}),allow_unauthorized_certificates:bt.Checkbox({displayName:"Allow Unauthorized Certificates",description:"Allow connections to servers with self-signed certificates",defaultValue:!1,required:!1}),allow_anonymous_login:bt.Checkbox({displayName:"Allow Anonymous Login",description:"Allow anonymous login to FTP servers (only applicable for FTP/FTPS)",defaultValue:!1,required:!1}),host:bt.ShortText({displayName:"Host",description:"The host of the server",required:!0}),port:bt.Number({displayName:"Port",description:"The port of the server",required:!0,defaultValue:22}),username:bt.ShortText({displayName:"Username",description:"The username to authenticate with",required:!0}),password:eu.SecretText({displayName:"Password",description:"The password to authenticate with. Either this or private key is required. When using a private key, this field is used as the passphrase to decrypt the key.",required:!1}),privateKey:eu.SecretText({displayName:"Private Key",description:"The private key to authenticate with. Either this or password is required.",required:!1}),algorithm:bt.StaticMultiSelectDropdown({displayName:"Host Key Algorithm",description:"The host key algorithm to use for SFTP connection. Only needed if you want to override the default algorithms (e.g., to support ssh-dss).",required:!1,options:{options:[{value:"ssh-rsa",label:"ssh-rsa"},{value:"ssh-dss",label:"ssh-dss"},{value:"ecdsa-sha2-nistp256",label:"ecdsa-sha2-nistp256"},{value:"ecdsa-sha2-nistp384",label:"ecdsa-sha2-nistp384"},{value:"ecdsa-sha2-nistp521",label:"ecdsa-sha2-nistp521"},{value:"ssh-ed25519",label:"ssh-ed25519"},{value:"rsa-sha2-256",label:"rsa-sha2-256"},{value:"rsa-sha2-512",label:"rsa-sha2-512"}]}})},validate:a(async({auth:e})=>{let t=null,r=await qt(e.protocol);try{if(!e.privateKey&&!e.password&&!e.allow_anonymous_login)return{valid:!1,error:"Either password or private key must be provided for non-anonymous authentication."};switch(r){case"sftp":{if(e.allow_anonymous_login)return{valid:!1,error:"Anonymous login is not supported for SFTP protocol."};t=await Xt(e);break}default:{t=await Xt(e);break}}return{valid:!0}}catch(i){return{valid:!1,error:i?.message}}finally{t&&await sr(t,e.protocol)}},"validate"),required:!0});var Sk=require("stream");var QL={0:{error:"OK",description:"Indicates successful completion of the operation."},1:{error:"EOF",description:"An attempt to read past the end-of-file was made; or, there are no more directory entries to return."},2:{error:"No such file",description:"A reference was made to a file which does not exist."},3:{error:"Permission denied",description:"The user does not have sufficient permissions to perform the operation."},4:{error:"Failure",description:"An error occurred, but no specific error code exists to describe the failure. This error message should always have meaningful text in the error message field."},5:{error:"Bad message",description:"A badly formatted packet or other SFTP protocol incompatibility was detected."},6:{error:"No connection",description:"There is no connection to the server. This error may be used locally, but must not be returned by a server."},7:{error:"Connection lost",description:"The connection to the server was lost. This error may be used locally, but must not be returned by a server."},8:{error:"Operation unsupported",description:"An attempted operation could not be completed by the server because the server does not support the operation."},9:{error:"Invalid handle",description:"The handle value was invalid."},10:{error:"No such path",description:"The file path does not exist or is invalid."},11:{error:"File already exists",description:"The file already exists."},12:{error:"Write protect",description:"The file is on read-only media, or the media is write protected."},13:{error:"No media",description:"The requested operation cannot be completed because there is no media available in the drive."},14:{error:"No space on file-system",description:"The requested operation cannot be completed because there is insufficient free space on the filesystem."},15:{error:"Quota exceeded",description:"The operation cannot be completed because it would exceed the user\u2019s storage quota."},16:{error:"Unknown principal",description:"A principal referenced by the request (either the owner, group, or who field of an ACL), was unknown."},17:{error:"Lock conflict",description:"The file could not be opened because it is locked by another process."},18:{error:"Directory not empty",description:"The directory is not empty."},19:{error:"Not a directory",description:"The specified file is not a directory."},20:{error:"Invalid filename",description:"The filename is not valid."},21:{error:"Link loop",description:"Too many symbolic links encountered or an SSH_FXF_NOFOLLOW encountered a symbolic link as the final component."},22:{error:"Cannot delete",description:"The file cannot be deleted. One possible reason is that the advisory read-only attribute-bit is set."},23:{error:"Invalid parameter",description:"One of the parameters was out of range or the parameters specified cannot be used together."},24:{error:"File is a directory",description:"The specified file was a directory in a context where a directory cannot be used."},25:{error:"Range lock conflict",description:"A read or write operation failed because another process\u2019s mandatory byte-range lock overlaps with the request."},26:{error:"Range lock refused",description:"A request for a byte range lock was refused."},27:{error:"Delete pending",description:"An operation was attempted on a file for which a delete operation is pending."},28:{error:"File corrupt",description:"The file is corrupt; a filesystem integrity check should be run."},29:{error:"Owner invalid",description:"The principal specified cannot be assigned as an owner of a file."},30:{error:"Group invalid",description:"The principal specified cannot be assigned as the primary group of a file."},31:{error:"No matching byte range lock",description:"The requested operation could not be completed because the specified byte range lock has not been granted."}};function Vt(e){return QL[e]??{error:"Unknown error code"}}a(Vt,"getSftpError");var Fi=[{key:"status",label:"Status",description:'Either "success" or "error". These actions report a failure here instead of failing the step, so check it before relying on the result.'},{key:"error",label:"Error",description:'Only present when Status is "error".',children:[{key:"code",label:"Error Code",description:"On SFTP, the numeric SFTP status code (2 = no such file, 3 = permission denied) or a Node error code such as ERR_BAD_PATH."},{key:"error",label:"Error Detail",description:"Only populated on FTP and FTPS."}]}],KL=[{key:"name",label:"Name",description:"File or folder name, without the directory path."},{key:"type",label:"Type",description:'"-" for a file and "d" for a folder.'},{key:"size",label:"Size",format:"filesize"},{key:"modifyTime",label:"Modified Time",description:"Unix timestamp in milliseconds. Populated on SFTP only; FTP and FTPS servers leave this empty."},{key:"accessTime",label:"Accessed Time",description:"Unix timestamp in milliseconds. Populated on SFTP only; FTP and FTPS servers leave this empty."},{key:"rights",label:"Permissions",children:[{key:"user",label:"Owner"},{key:"group",label:"Group"},{key:"other",label:"Other"}]},{key:"owner",label:"Owner ID"},{key:"group",label:"Group ID"}],GL=[{key:"path",label:"Path",description:"Full path of the file, built from the watched directory and the file name."},{key:"name",label:"Name",description:"File or folder name, without the directory path."},{key:"size",label:"Size",format:"filesize"},{key:"type",label:"Type",description:'On SFTP, "-" for a file and "d" for a folder. On FTP and FTPS, a number: 1 = file, 2 = folder, 3 = symbolic link.'},{key:"modifyTime",label:"Modified Time",description:"Unix timestamp in milliseconds, SFTP only. On FTP and FTPS use Raw Modified Time instead."},{key:"accessTime",label:"Accessed Time",description:"Unix timestamp in milliseconds, SFTP only."},{key:"rawModifiedAt",label:"Raw Modified Time",description:'FTP and FTPS only, as reported by the server without parsing, for example "Sep 07 09:25".'},{key:"rights",label:"Permissions",description:"SFTP only.",children:[{key:"user",label:"Owner"},{key:"group",label:"Group"},{key:"other",label:"Other"}]},{key:"permissions",label:"Unix Permissions",description:"FTP and FTPS only, as octal digits.",children:[{key:"user",label:"Owner",format:"number"},{key:"group",label:"Group",format:"number"},{key:"world",label:"Other",format:"number"}]},{key:"owner",label:"Owner ID",description:"SFTP only. On FTP and FTPS use Owner Name instead."},{key:"user",label:"Owner Name",description:"FTP and FTPS only."},{key:"group",label:"Group",description:"Numeric group ID on SFTP, group name on FTP and FTPS."}],gk={fields:Fi},mk={fields:Fi},_k={fields:Fi},yk={fields:Fi},Ek={fields:Fi},Ak={fields:Fi},bk={fields:[{key:"file",label:"File",format:"url",description:'The downloaded file, ready to pass to a later step. Absent when Status is "error".'},...Fi]},xk={fields:[{key:"contents",label:"Contents",labelKey:"name",description:"Immediate entries of the directory, including hidden dotfiles. Not recursive.",listItems:KL},...Fi]},Ik={fields:GL};async function YL(e,t,r){if(!await e.exists(t)){let n=t.substring(0,t.lastIndexOf("/"));await e.mkdir(n,!0)}await e.put(Buffer.from(r),t)}a(YL,"createFileWithSFTP");async function XL(e,t,r){let i=t.substring(0,t.lastIndexOf("/"));await e.ensureDir(i);let n=Buffer.from(r);await e.uploadFrom(Sk.Readable.from(n),t)}a(XL,"createFileWithFTP");var wk=Cr({audience:"both",auth:pr,name:"create_file",classification:"WRITE",displayName:"Create File from Text",description:"Create a new file in the given path",aiMetadata:{description:"Writes a text string to a file at a given path on the connected FTP, FTPS or SFTP server, creating missing parent directories and overwriting any existing file at that path. Choose this when the content is plain text you already hold as a string; prefer Upload File when the content is a binary or file object produced by an earlier step. Requires the full remote path (e.g. ./myfolder/notes.txt); idempotent, since the same path and content always converge on the same stored file, but note it clobbers whatever was there before.",idempotent:!0},props:{fileName:bt.ShortText({displayName:"File Path",required:!0}),fileContent:bt.LongText({displayName:"File content",required:!0})},outputSchema:gk,async run(e){let t=e.propsValue.fileName,r=e.propsValue.fileContent,i=await qt(e.auth.props.protocol),n=await Xt(e.auth.props);try{switch(i){case"ftps":case"ftp":await XL(n,t,r);break;default:case"sftp":await YL(n,t,r);break}return{status:"success"}}catch(o){return o instanceof vk.FTPError?(console.error(Vt(o.code)),{status:"error",error:Vt(o.code)}):{status:"error",error:o}}finally{await sr(n,e.auth.props.protocol)}}});var Ku={async poll(e,{store:t,auth:r,propsValue:i,maxItemsToPoll:n,files:o,server:s}){switch(e.strategy){case 0:{let c=await t.get("lastPoll");if(ir(c))throw new Error("lastPoll doesn't exist in the store.");let u=await e.items({store:t,auth:r,propsValue:i,lastFetchEpochMS:c,server:s}),l=u.reduce((f,p)=>Math.max(f,p.epochMilliSeconds),c);return await t.put("lastPoll",l),u.filter(f=>f.epochMilliSeconds>c).map(f=>f.data)}case 1:{let c=await t.get("lastItem"),u=await e.items({store:t,auth:r,propsValue:i,lastItemId:c,files:o,server:s}),l=u.findIndex(g=>g.id===c),f=[];ir(c)||l==-1?f=u??[]:f=u?.slice(0,l)??[],ir(n)||(f=f.slice(-n));let p=f?.[0]?.id;return ir(p)||await t.put("lastItem",p),f.map(g=>g.data)}}},async onEnable(e,{store:t,auth:r,propsValue:i,server:n,isRepublish:o}){switch(e.strategy){case 0:{if(o&&!ir(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(o&&!ir(await t.get("lastItem")))break;let c=(await e.items({store:t,auth:r,propsValue:i,lastItemId:null,server:n}))?.[0]?.id;ir(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:i,files:n,server:o}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:i,auth:t,propsValue:r,lastFetchEpochMS:0,server:o});break}case 1:{s=await e.items({store:i,auth:t,propsValue:r,lastItemId:null,files:n,server:o});break}}return JL(s.map(c=>c.data))}};function JL(e){return e.length<=5?e:e.slice(0,5)}a(JL,"getFirstFiveOrAll");var Pk=require("node:stream");function eU(e){return"body"in e?{body:e.body,size:e.size}:{body:Pk.Readable.from(e.data),size:e.data.length}}a(eU,"toStreamingBody");async function*tU({readable:e,chunkSize:t}){let r=[],i=0;for await(let n of e)for(r.push(Buffer.isBuffer(n)?n:Buffer.from(n)),i+=r[r.length-1].length;i>=t;){let o=r.length===1?r[0]:Buffer.concat(r);yield o.subarray(0,t);let s=o.subarray(t);r=s.length>0?[s]:[],i=s.length}i>0&&(yield r.length===1?r[0]:Buffer.concat(r))}a(tU,"readChunks");var Tk={readChunks:tU,toStreamingBody:eU};var kk=Dr(Nn());async function rU(e,t,r){let i=t.substring(0,t.lastIndexOf("/"));await e.ensureDir(i),await e.uploadFrom(r,t)}a(rU,"uploadFileToFTP");async function nU(e,t,r){if(!await e.exists(t)){let n=t.substring(0,t.lastIndexOf("/"));await e.mkdir(n,!0)}await e.put(r,t),await e.end()}a(nU,"uploadFileToSFTP");var Ck=Cr({audience:"both",auth:pr,name:"upload_file",classification:"WRITE",displayName:"Upload File",description:"Upload a file to the given path.",aiMetadata:{description:"Uploads a file object, typically one produced by an earlier step, to a given path on the connected FTP, FTPS or SFTP server, creating missing parent directories and overwriting any existing file at that path. Use this instead of Create File from Text whenever you have an actual file rather than a string of text. Requires both the file and the destination remote path (e.g. ./myfolder/test.mp3); idempotent, as repeating the upload converges on the same stored file.",idempotent:!0},props:{fileName:bt.ShortText({displayName:"File Path",required:!0,description:"The path on the sftp server to store the file. e.g. `./myfolder/test.mp3`"}),fileContent:bt.File({displayName:"File content",required:!0,streaming:!0})},outputSchema:mk,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.fileName,{body:i}=Tk.toStreamingBody(e.propsValue.fileContent),n=await qt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await rU(t,r,i);break;default:case"sftp":await nU(t,r,i);break}return{status:"success"}}catch(o){return o instanceof kk.FTPError?(console.error(Vt(o.code)),{status:"error",content:null,error:Vt(o.code)}):{status:"error",content:null,error:o}}finally{await sr(t,e.auth.props.protocol)}}});var Rk=Dr(Nn()),Ab=require("stream");function iU(e,t){let r=new Ab.PassThrough;return e.downloadTo(r,t).catch(i=>r.destroy(i)),r}a(iU,"readFTP");function oU(e,t){let r=new Ab.PassThrough;return e.get(t,r).catch(i=>r.destroy(i)),r}a(oU,"readSFTP");var Ok=Cr({audience:"both",auth:pr,name:"read_file_content",classification:"READ",displayName:"Read File Content",description:"Read the content of a file.",aiMetadata:{description:"Downloads one file from the connected FTP, FTPS or SFTP server by remote path and returns it as a file reference that later steps can consume. Use it to fetch the content of a file whose path you know; run List Folder Contents first when you still need to discover which paths exist. Requires an exact remote file path - it does not glob, search or recurse; read-only and idempotent.",idempotent:!0},props:{filePath:bt.ShortText({displayName:"File Path",required:!0})},outputSchema:bk,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.filePath,i=r.split("/").pop()??r,n=await qt(e.auth.props.protocol);try{let o;switch(n){case"ftps":case"ftp":o=iU(t,r);break;default:case"sftp":o=oU(t,r);break}return{file:await e.files.write({fileName:i,data:o})}}catch(o){return o instanceof Rk.FTPError?(console.error(Vt(o.code)),{status:"error",content:null,error:Vt(o.code)}):{status:"error",content:null,error:o}}finally{await sr(t,e.auth.props.protocol)}}});var Yp=Dr(Nk());function $k(e,t){return t==="sftp"?e.modifyTime:(0,Yp.default)(e.modifiedAt).valueOf()}a($k,"getModifyTime");var Gp={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>{let i=null;try{let n=await qt(e.props.protocol);i=await Xt(e.props);let s=(await i.list(t.path)).filter(u=>{let l=$k(u,n);return(0,Yp.default)(l).valueOf()>r});return(t.ignoreHiddenFiles?s.filter(u=>!u.name.startsWith(".")):s).map(u=>{let l=$k(u,n);return{data:{...u,path:`${t.path}/${u.name}`},epochMilliSeconds:(0,Yp.default)(l).valueOf()}})}catch{return[]}finally{i&&await sr(i,e.props.protocol)}},"items")},Dk=hv({auth:pr,name:"new_file",classification:"READ",displayName:"New File",description:"Trigger when a new file is created or modified.",aiMetadata:{description:"Fires for each file in a watched directory on an FTP, FTPS or SFTP server whose modification time is newer than the previous poll, so it covers both newly added files and edits to existing ones. Each event represents one such file. Polls a single directory only, without recursing into subfolders, and can optionally skip hidden dotfiles."},props:{path:bt.ShortText({displayName:"Path",description:"The path to watch for new files",required:!0,defaultValue:"./"}),ignoreHiddenFiles:bt.Checkbox({displayName:"Ignore hidden files",description:"Ignore hidden files",required:!1,defaultValue:!1})},outputSchema:Ik,type:"POLLING",onEnable:a(async e=>{await Ku.onEnable(Gp,e)},"onEnable"),onDisable:a(async e=>{await Ku.onDisable(Gp,e)},"onDisable"),run:a(async e=>await Ku.poll(Gp,e),"run"),test:a(async e=>await Ku.test(Gp,e),"test"),sampleData:null});var Bk=Dr(Nn());async function sU(e,t,r){r?await e.removeDir(t):await e.removeEmptyDir(t)}a(sU,"deleteFolderFTP");async function aU(e,t,r){await e.rmdir(t,r)}a(aU,"deleteFolderSFTP");var zk=Cr({audience:"both",auth:pr,name:"deleteFolder",classification:"DESTRUCTIVE",displayName:"Delete Folder",description:"Deletes an existing folder at given path.",aiMetadata:{description:"Deletes a directory at a given remote path on the connected FTP, FTPS or SFTP server, either only when it is empty or, with the recursive option enabled, together with every nested subfolder and file. Use this for directories; use Delete File to remove a single file. Recursive deletion is permanent and unrecoverable, so verify the path first; idempotent in that it converges on the folder being absent, and a repeat call on an already-missing path just reports an error.",idempotent:!0},props:{folderPath:bt.ShortText({displayName:"Folder Path",required:!0,description:"The path of the folder to delete e.g. `./myfolder`"}),recursive:bt.Checkbox({displayName:"Recursive",defaultValue:!1,required:!1,description:"Enable this option to delete the folder and all its contents, including subfolders and files."})},outputSchema:Ek,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.folderPath,i=e.propsValue.recursive??!1,n=await qt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await sU(t,r,i);break;default:case"sftp":await aU(t,r,i);break}return{status:"success"}}catch(o){return o instanceof Bk.FTPError?(console.error(Vt(o.code)),{status:"error",error:Vt(o.code)}):{status:"error",error:o}}finally{await sr(t,e.auth.props.protocol)}}});var Lk=Dr(Nn());async function cU(e,t){await e.remove(t)}a(cU,"deleteFileFromFTP");async function uU(e,t){await e.delete(t)}a(uU,"deleteFileFromSFTP");var Uk=Cr({audience:"both",auth:pr,name:"deleteFile",classification:"DESTRUCTIVE",displayName:"Delete file",description:"Deletes a file at given path.",aiMetadata:{description:"Permanently deletes a single file at a given remote path on the connected FTP, FTPS or SFTP server. Use this for one file; use Delete Folder to remove a directory, optionally with all of its contents. Requires the exact remote path (e.g. ./myfolder/test.mp3) and there is no recycle bin or undo; idempotent in that it converges on the file being absent, though a repeat call on an already-missing path reports an error.",idempotent:!0},props:{filePath:bt.ShortText({displayName:"File Path",required:!0,description:"The path of the file to delete e.g. `./myfolder/test.mp3`"})},outputSchema:_k,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.filePath,i=await qt(e.auth.props.protocol);try{switch(i){case"ftps":case"ftp":await cU(t,r);break;default:case"sftp":await uU(t,r);break}return{status:"success"}}catch(n){return n instanceof Lk.FTPError?(console.error(Vt(n.code)),{status:"error",error:Vt(n.code)}):{status:"error",error:n}}finally{await sr(t,e.auth.props.protocol)}}});var Mk=Dr(Nn());async function lU(e,t){let r=await e.list(t);return await e.end(),r}a(lU,"listSFTP");async function fU(e,t){return(await e.list(t)).map(i=>({type:i.type===1?"d":"-",name:i.name,size:i.size,modifyTime:i.modifiedAt,accessTime:i.modifiedAt,rights:{user:i.permissions||"",group:"",other:""},owner:"",group:""}))}a(fU,"listFTP");var Fk=Cr({audience:"both",auth:pr,name:"listFolderContents",classification:"SEARCH",displayName:"List Folder Contents",description:"Lists the contents of a given folder.",aiMetadata:{description:"Lists the immediate entries of one directory on the connected FTP, FTPS or SFTP server. Use it to discover paths before reading, renaming or deleting, and to walk a tree one level at a time; it is not recursive and offers no filtering or search. Requires the directory path (e.g. ./myfolder); read-only and idempotent.",idempotent:!0},props:{directoryPath:bt.ShortText({displayName:"Directory Path",required:!0,description:"The path of the folder to list e.g. `./myfolder`"})},outputSchema:xk,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.directoryPath,i=await qt(e.auth.props.protocol);try{let n;switch(i){case"ftps":case"ftp":n=await fU(t,r);break;default:case"sftp":n=await lU(t,r);break}return{status:"success",contents:n}}catch(n){return n instanceof Mk.FTPError?(console.error(Vt(n.code)),{status:"error",content:null,error:Vt(n.code)}):{status:"error",content:null,error:n}}finally{await sr(t,e.auth.props.protocol)}}});var Hk=Dr(Nn());var jk=Cr({audience:"both",auth:pr,name:"createFolder",classification:"WRITE",displayName:"Create Folder",description:"Creates a folder at given path.",aiMetadata:{description:"Creates a directory at a given remote path on the connected FTP, FTPS or SFTP server; on SFTP an optional recursive mode also creates any missing parent directories, while FTP/FTPS always ensures the whole path. Use it to prepare a destination directory, for example before a rename or move, noting that Create File from Text and Upload File already create parent directories themselves. Requires the folder path (e.g. ./myfolder); idempotent because it converges on that directory existing.",idempotent:!0},props:{folderPath:bt.ShortText({displayName:"Folder Path",required:!0,description:"The new folder path e.g. `./myfolder`. For FTP/FTPS, it will create nested folders if necessary."}),recursive:bt.Checkbox({displayName:"Recursive",defaultValue:!1,required:!1,description:"For SFTP only: Create parent directories if they do not exist"})},outputSchema:yk,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.folderPath,i=e.propsValue.recursive??!1,n=await qt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await t.ensureDir(r);break;default:case"sftp":await t.mkdir(r,i);break}return{status:"success"}}catch(o){return o instanceof Hk.FTPError?(console.error(Vt(o.code)),{status:"error",error:Vt(o.code)}):{status:"error",error:o}}finally{await sr(t,e.auth.props.protocol)}}});var Wk=Dr(Nn());async function dU(e,t,r){await e.rename(t,r)}a(dU,"renameFTP");async function pU(e,t,r){await e.rename(t,r),await e.end()}a(pU,"renameSFTP");var qk=Cr({audience:"both",auth:pr,name:"renameFileOrFolder",classification:"WRITE",displayName:"Rename File or Folder",description:"Renames a file or folder at given path.",aiMetadata:{description:"Moves a file or folder on the connected FTP, FTPS or SFTP server from an old remote path to a new one, which covers both renaming in place and, on most servers, relocating the entry into a different directory. Prefer it over reading and re-uploading content, and over a delete-then-create pair, when the bytes do not change. The parent directory of the new path must already exist, so create it with Create Folder first; idempotent in that the entry ends up at the new path, though a repeat call errors because the old path is gone.",idempotent:!0},props:{information:bt.MarkDown({value:"Depending on the server you can also use this to move a file to another directory, as long as the directory exists.",variant:"INFO"}),oldPath:bt.ShortText({displayName:"Old Path",required:!0,description:"The path of the file or folder to rename e.g. `./myfolder/test.mp3`"}),newPath:bt.ShortText({displayName:"New Path",required:!0,description:"The new path of the file or folder e.g. `./myfolder/new-name.mp3`"})},outputSchema:Ak,async run(e){let t=await Xt(e.auth.props),r=e.propsValue.oldPath,i=e.propsValue.newPath,n=await qt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await dU(t,r,i);break;default:case"sftp":await pU(t,r,i);break}return{status:"success"}}catch(o){return o instanceof Wk.FTPError?(console.error(Vt(o.code)),{status:"error",content:null,error:Vt(o.code)}):{status:"error",content:null,error:o}}finally{await sr(t,e.auth.props.protocol)}}});var hU=_v({displayName:"FTP/SFTP",description:"Connect to FTP, FTPS or SFTP servers",minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/new-core/sftp.svg",categories:["CORE","DEVELOPER_TOOLS"],authors:["Abdallah-Alwarawreh","kishanprmr","AbdulTheActivePiecer","khaledmashaly","abuaboud","prasanna2000-max"],auth:pr,actions:[wk,Ck,Ok,Uk,jk,zk,Fk,qk],triggers:[Dk]});0&&(module.exports={endClient,ftpSftp,getClient,getProtocolBackwardCompatibility});
72
+ $1`);let _=g.match(/(-----BEGIN [A-Z0-9 ]+ KEY-----\n(?:Proc-Type:[^\n]+\n)?(?:DEK-Info:[^\n]+\n\n)?)/),y=g.match(/(\n-----END [A-Z0-9 ]+ KEY-----)/);if(_&&y){let b=_[1],S=y[1],M=g.replace(b,"").replace(S,"").replace(/\s+/g,"").match(/.{1,64}/g)||[];g=b+M.join(`
73
+ `)+S}}let h={host:r,port:i,username:s,privateKey:g,timeout:1e4};c&&(h.passphrase=c),l&&l.length>0&&(h.algorithms={serverHostKey:l}),await p.connect(h)}else c&&await p.connect({host:r,port:i,username:s,password:c,timeout:1e4});return p}else{let p=new wk.Client(void 0,{allowSeparateTransferHost:!0}),{error:g}=await Fc(()=>p.access({host:r,port:i,user:s,password:c,secure:f==="ftps",secureOptions:{rejectUnauthorized:!(n??!1)}}));if(g)throw p.close(),g;return p}}a(Jt,"getClient");async function sr(e,t){await Vt(t)==="sftp"?await e.end():e.close()}a(sr,"endClient");var pr=tu.CustomAuth({props:{protocol:bt.StaticDropdown({displayName:"Protocol",description:"The protocol to use",required:!1,options:{options:[{value:"sftp",label:"SFTP"},{value:"ftp",label:"FTP"},{value:"ftps",label:"FTPS"}]}}),allow_unauthorized_certificates:bt.Checkbox({displayName:"Allow Unauthorized Certificates",description:"Allow connections to servers with self-signed certificates",defaultValue:!1,required:!1}),allow_anonymous_login:bt.Checkbox({displayName:"Allow Anonymous Login",description:"Allow anonymous login to FTP servers (only applicable for FTP/FTPS)",defaultValue:!1,required:!1}),host:bt.ShortText({displayName:"Host",description:"The host of the server",required:!0}),port:bt.Number({displayName:"Port",description:"The port of the server",required:!0,defaultValue:22}),username:bt.ShortText({displayName:"Username",description:"The username to authenticate with",required:!0}),password:tu.SecretText({displayName:"Password",description:"The password to authenticate with. Either this or private key is required. When using a private key, this field is used as the passphrase to decrypt the key.",required:!1}),privateKey:tu.SecretText({displayName:"Private Key",description:"The private key to authenticate with. Either this or password is required.",required:!1}),algorithm:bt.StaticMultiSelectDropdown({displayName:"Host Key Algorithm",description:"The host key algorithm to use for SFTP connection. Only needed if you want to override the default algorithms (e.g., to support ssh-dss).",required:!1,options:{options:[{value:"ssh-rsa",label:"ssh-rsa"},{value:"ssh-dss",label:"ssh-dss"},{value:"ecdsa-sha2-nistp256",label:"ecdsa-sha2-nistp256"},{value:"ecdsa-sha2-nistp384",label:"ecdsa-sha2-nistp384"},{value:"ecdsa-sha2-nistp521",label:"ecdsa-sha2-nistp521"},{value:"ssh-ed25519",label:"ssh-ed25519"},{value:"rsa-sha2-256",label:"rsa-sha2-256"},{value:"rsa-sha2-512",label:"rsa-sha2-512"}]}})},validate:a(async({auth:e})=>{let t=null,r=await Vt(e.protocol);try{if(!e.privateKey&&!e.password&&!e.allow_anonymous_login)return{valid:!1,error:"Either password or private key must be provided for non-anonymous authentication."};switch(r){case"sftp":{if(e.allow_anonymous_login)return{valid:!1,error:"Anonymous login is not supported for SFTP protocol."};t=await Jt(e);break}default:{t=await Jt(e);break}}return{valid:!0}}catch(i){return{valid:!1,error:i?.message}}finally{t&&await sr(t,e.protocol)}},"validate"),required:!0});var Lk=require("stream");var uU={0:{error:"OK",description:"Indicates successful completion of the operation."},1:{error:"EOF",description:"An attempt to read past the end-of-file was made; or, there are no more directory entries to return."},2:{error:"No such file",description:"A reference was made to a file which does not exist."},3:{error:"Permission denied",description:"The user does not have sufficient permissions to perform the operation."},4:{error:"Failure",description:"An error occurred, but no specific error code exists to describe the failure. This error message should always have meaningful text in the error message field."},5:{error:"Bad message",description:"A badly formatted packet or other SFTP protocol incompatibility was detected."},6:{error:"No connection",description:"There is no connection to the server. This error may be used locally, but must not be returned by a server."},7:{error:"Connection lost",description:"The connection to the server was lost. This error may be used locally, but must not be returned by a server."},8:{error:"Operation unsupported",description:"An attempted operation could not be completed by the server because the server does not support the operation."},9:{error:"Invalid handle",description:"The handle value was invalid."},10:{error:"No such path",description:"The file path does not exist or is invalid."},11:{error:"File already exists",description:"The file already exists."},12:{error:"Write protect",description:"The file is on read-only media, or the media is write protected."},13:{error:"No media",description:"The requested operation cannot be completed because there is no media available in the drive."},14:{error:"No space on file-system",description:"The requested operation cannot be completed because there is insufficient free space on the filesystem."},15:{error:"Quota exceeded",description:"The operation cannot be completed because it would exceed the user\u2019s storage quota."},16:{error:"Unknown principal",description:"A principal referenced by the request (either the owner, group, or who field of an ACL), was unknown."},17:{error:"Lock conflict",description:"The file could not be opened because it is locked by another process."},18:{error:"Directory not empty",description:"The directory is not empty."},19:{error:"Not a directory",description:"The specified file is not a directory."},20:{error:"Invalid filename",description:"The filename is not valid."},21:{error:"Link loop",description:"Too many symbolic links encountered or an SSH_FXF_NOFOLLOW encountered a symbolic link as the final component."},22:{error:"Cannot delete",description:"The file cannot be deleted. One possible reason is that the advisory read-only attribute-bit is set."},23:{error:"Invalid parameter",description:"One of the parameters was out of range or the parameters specified cannot be used together."},24:{error:"File is a directory",description:"The specified file was a directory in a context where a directory cannot be used."},25:{error:"Range lock conflict",description:"A read or write operation failed because another process\u2019s mandatory byte-range lock overlaps with the request."},26:{error:"Range lock refused",description:"A request for a byte range lock was refused."},27:{error:"Delete pending",description:"An operation was attempted on a file for which a delete operation is pending."},28:{error:"File corrupt",description:"The file is corrupt; a filesystem integrity check should be run."},29:{error:"Owner invalid",description:"The principal specified cannot be assigned as an owner of a file."},30:{error:"Group invalid",description:"The principal specified cannot be assigned as the primary group of a file."},31:{error:"No matching byte range lock",description:"The requested operation could not be completed because the specified byte range lock has not been granted."}};function Zt(e){return uU[e]??{error:"Unknown error code"}}a(Zt,"getSftpError");var Fi=[{key:"status",label:"Status",description:'Either "success" or "error". These actions report a failure here instead of failing the step, so check it before relying on the result.'},{key:"error",label:"Error",description:'Only present when Status is "error".',children:[{key:"code",label:"Error Code",description:"On SFTP, the numeric SFTP status code (2 = no such file, 3 = permission denied) or a Node error code such as ERR_BAD_PATH."},{key:"error",label:"Error Detail",description:"Only populated on FTP and FTPS."}]}],lU=[{key:"name",label:"Name",description:"File or folder name, without the directory path."},{key:"type",label:"Type",description:'"-" for a file and "d" for a folder.'},{key:"size",label:"Size",format:"filesize"},{key:"modifyTime",label:"Modified Time",description:"Unix timestamp in milliseconds. Populated on SFTP only; FTP and FTPS servers leave this empty."},{key:"accessTime",label:"Accessed Time",description:"Unix timestamp in milliseconds. Populated on SFTP only; FTP and FTPS servers leave this empty."},{key:"rights",label:"Permissions",children:[{key:"user",label:"Owner"},{key:"group",label:"Group"},{key:"other",label:"Other"}]},{key:"owner",label:"Owner ID"},{key:"group",label:"Group ID"}],fU=[{key:"path",label:"Path",description:"Full path of the file, built from the watched directory and the file name."},{key:"name",label:"Name",description:"File or folder name, without the directory path."},{key:"size",label:"Size",format:"filesize"},{key:"type",label:"Type",description:'On SFTP, "-" for a file and "d" for a folder. On FTP and FTPS, a number: 1 = file, 2 = folder, 3 = symbolic link.'},{key:"modifyTime",label:"Modified Time",description:"Unix timestamp in milliseconds, SFTP only. On FTP and FTPS use Raw Modified Time instead."},{key:"accessTime",label:"Accessed Time",description:"Unix timestamp in milliseconds, SFTP only."},{key:"rawModifiedAt",label:"Raw Modified Time",description:'FTP and FTPS only, as reported by the server without parsing, for example "Sep 07 09:25".'},{key:"rights",label:"Permissions",description:"SFTP only.",children:[{key:"user",label:"Owner"},{key:"group",label:"Group"},{key:"other",label:"Other"}]},{key:"permissions",label:"Unix Permissions",description:"FTP and FTPS only, as octal digits.",children:[{key:"user",label:"Owner",format:"number"},{key:"group",label:"Group",format:"number"},{key:"world",label:"Other",format:"number"}]},{key:"owner",label:"Owner ID",description:"SFTP only. On FTP and FTPS use Owner Name instead."},{key:"user",label:"Owner Name",description:"FTP and FTPS only."},{key:"group",label:"Group",description:"Numeric group ID on SFTP, group name on FTP and FTPS."}],Pk={fields:Fi},Tk={fields:Fi},kk={fields:Fi},Ck={fields:Fi},Rk={fields:Fi},Ok={fields:Fi},Nk={fields:[{key:"file",label:"File",format:"url",description:'The downloaded file, ready to pass to a later step. Absent when Status is "error".'},...Fi]},$k={fields:[{key:"contents",label:"Contents",labelKey:"name",description:"Immediate entries of the directory, including hidden dotfiles. Not recursive.",listItems:lU},...Fi]},Dk={fields:fU};async function dU(e,t,r){if(!await e.exists(t)){let n=t.substring(0,t.lastIndexOf("/"));await e.mkdir(n,!0)}await e.put(Buffer.from(r),t)}a(dU,"createFileWithSFTP");async function pU(e,t,r){let i=t.substring(0,t.lastIndexOf("/"));await e.ensureDir(i);let n=Buffer.from(r);await e.uploadFrom(Lk.Readable.from(n),t)}a(pU,"createFileWithFTP");var zk=Rr({audience:"both",auth:pr,name:"create_file",classification:"WRITE",displayName:"Create File from Text",description:"Create a new file in the given path",aiMetadata:{description:"Writes a text string to a file at a given path on the connected FTP, FTPS or SFTP server, creating missing parent directories and overwriting any existing file at that path. Choose this when the content is plain text you already hold as a string; prefer Upload File when the content is a binary or file object produced by an earlier step. Requires the full remote path (e.g. ./myfolder/notes.txt); idempotent, since the same path and content always converge on the same stored file, but note it clobbers whatever was there before.",idempotent:!0},props:{fileName:bt.ShortText({displayName:"File Path",required:!0}),fileContent:bt.LongText({displayName:"File content",required:!0})},outputSchema:Pk,async run(e){let t=e.propsValue.fileName,r=e.propsValue.fileContent,i=await Vt(e.auth.props.protocol),n=await Jt(e.auth.props);try{switch(i){case"ftps":case"ftp":await pU(n,t,r);break;default:case"sftp":await dU(n,t,r);break}return{status:"success"}}catch(o){return o instanceof Bk.FTPError?(console.error(Zt(o.code)),{status:"error",error:Zt(o.code)}):{status:"error",error:o}}finally{await sr(n,e.auth.props.protocol)}}});var Ku={async poll(e,{store:t,auth:r,propsValue:i,maxItemsToPoll:n,files:o,server:s}){switch(e.strategy){case 0:{let c=await t.get("lastPoll");if(Lt(c))throw new Error("lastPoll doesn't exist in the store.");let u=await e.items({store:t,auth:r,propsValue:i,lastFetchEpochMS:c,server:s}),l=u.reduce((f,p)=>Math.max(f,p.epochMilliSeconds),c);return await t.put("lastPoll",l),u.filter(f=>f.epochMilliSeconds>c).map(f=>f.data)}case 1:{let c=await t.get("lastItem"),u=await e.items({store:t,auth:r,propsValue:i,lastItemId:c,files:o,server:s}),l=u.findIndex(g=>g.id===c),f=[];Lt(c)||l==-1?f=u??[]:f=u?.slice(0,l)??[],Lt(n)||(f=f.slice(-n));let p=f?.[0]?.id;return Lt(p)||await t.put("lastItem",p),f.map(g=>g.data)}}},async onEnable(e,{store:t,auth:r,propsValue:i,server:n,isRepublish:o}){switch(e.strategy){case 0:{if(o&&!Lt(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(o&&!Lt(await t.get("lastItem")))break;let c=(await e.items({store:t,auth:r,propsValue:i,lastItemId:null,server:n}))?.[0]?.id;Lt(c)?await t.delete("lastItem"):await t.put("lastItem",c);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:i,files:n,server:o}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:i,auth:t,propsValue:r,lastFetchEpochMS:0,server:o});break}case 1:{s=await e.items({store:i,auth:t,propsValue:r,lastItemId:null,files:n,server:o});break}}return hU(s.map(c=>c.data))}};function hU(e){return e.length<=5?e:e.slice(0,5)}a(hU,"getFirstFiveOrAll");var Uk=require("node:stream");function gU(e){return"body"in e?{body:e.body,size:e.size}:{body:Uk.Readable.from(e.data),size:e.data.length}}a(gU,"toStreamingBody");async function*mU({readable:e,chunkSize:t}){let r=[],i=0;for await(let n of e)for(r.push(Buffer.isBuffer(n)?n:Buffer.from(n)),i+=r[r.length-1].length;i>=t;){let o=r.length===1?r[0]:Buffer.concat(r);yield o.subarray(0,t);let s=o.subarray(t);r=s.length>0?[s]:[],i=s.length}i>0&&(yield r.length===1?r[0]:Buffer.concat(r))}a(mU,"readChunks");var Mk={readChunks:mU,toStreamingBody:gU};var Fk=Cr(In());async function _U(e,t,r){let i=t.substring(0,t.lastIndexOf("/"));await e.ensureDir(i),await e.uploadFrom(r,t)}a(_U,"uploadFileToFTP");async function yU(e,t,r){if(!await e.exists(t)){let n=t.substring(0,t.lastIndexOf("/"));await e.mkdir(n,!0)}await e.put(r,t),await e.end()}a(yU,"uploadFileToSFTP");var Hk=Rr({audience:"both",auth:pr,name:"upload_file",classification:"WRITE",displayName:"Upload File",description:"Upload a file to the given path.",aiMetadata:{description:"Uploads a file object, typically one produced by an earlier step, to a given path on the connected FTP, FTPS or SFTP server, creating missing parent directories and overwriting any existing file at that path. Use this instead of Create File from Text whenever you have an actual file rather than a string of text. Requires both the file and the destination remote path (e.g. ./myfolder/test.mp3); idempotent, as repeating the upload converges on the same stored file.",idempotent:!0},props:{fileName:bt.ShortText({displayName:"File Path",required:!0,description:"The path on the sftp server to store the file. e.g. `./myfolder/test.mp3`"}),fileContent:bt.File({displayName:"File content",required:!0,streaming:!0})},outputSchema:Tk,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.fileName,{body:i}=Mk.toStreamingBody(e.propsValue.fileContent),n=await Vt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await _U(t,r,i);break;default:case"sftp":await yU(t,r,i);break}return{status:"success"}}catch(o){return o instanceof Fk.FTPError?(console.error(Zt(o.code)),{status:"error",content:null,error:Zt(o.code)}):{status:"error",content:null,error:o}}finally{await sr(t,e.auth.props.protocol)}}});var jk=Cr(In()),vb=require("stream");function EU(e,t){let r=new vb.PassThrough;return e.downloadTo(r,t).catch(i=>r.destroy(i)),r}a(EU,"readFTP");function AU(e,t){let r=new vb.PassThrough;return e.get(t,r).catch(i=>r.destroy(i)),r}a(AU,"readSFTP");var Wk=Rr({audience:"both",auth:pr,name:"read_file_content",classification:"READ",displayName:"Read File Content",description:"Read the content of a file.",aiMetadata:{description:"Downloads one file from the connected FTP, FTPS or SFTP server by remote path and returns it as a file reference that later steps can consume. Use it to fetch the content of a file whose path you know; run List Folder Contents first when you still need to discover which paths exist. Requires an exact remote file path - it does not glob, search or recurse; read-only and idempotent.",idempotent:!0},props:{filePath:bt.ShortText({displayName:"File Path",required:!0})},outputSchema:Nk,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.filePath,i=r.split("/").pop()??r,n=await Vt(e.auth.props.protocol);try{let o;switch(n){case"ftps":case"ftp":o=EU(t,r);break;default:case"sftp":o=AU(t,r);break}return{file:await e.files.write({fileName:i,data:o})}}catch(o){return o instanceof jk.FTPError?(console.error(Zt(o.code)),{status:"error",content:null,error:Zt(o.code)}):{status:"error",content:null,error:o}}finally{await sr(t,e.auth.props.protocol)}}});var Tb=Cr(qk()),Jp=Cr(In());var bU=550;async function xU({client:e,file:t,protocol:r,directory:i,serverCanTimestamp:n}){if(r==="sftp")return t.modifyTime;let o=t;if(!Lt(o.modifiedAt))return(0,Tb.default)(o.modifiedAt).valueOf();if(o.type===Jp.FileType.Directory)return null;if(!n)return Date.now();let{data:s,error:c}=await Fc(()=>e.lastMod(`${i.replace(/\/+$/,"")}/${o.name}`));if(Lt(c))return(0,Tb.default)(s).valueOf();if(c instanceof Jp.FTPError&&c.code===bU)return null;throw c}a(xU,"getModifyTime");async function IU({client:e,protocol:t,files:r}){return t==="sftp"||r.every(o=>!Lt(o.modifiedAt))?!0:(await e.features()).has("MDTM")}a(IU,"serverCanTimestampEntries");var Xp={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:r})=>{let i=null;try{let n=await Vt(e.props.protocol);i=await Jt(e.props);let o=await i.list(t.path),s=t.ignoreHiddenFiles?o.filter(l=>!l.name.startsWith(".")):o,c=await IU({client:i,protocol:n,files:s}),u=[];for(let l of s){let f=await xU({client:i,file:l,protocol:n,directory:t.path,serverCanTimestamp:c});Lt(f)||f<=r||u.push({data:{...l,path:`${t.path}/${l.name}`},epochMilliSeconds:f})}return u}finally{i&&await sr(i,e.props.protocol)}},"items")},Vk=bS({auth:pr,name:"new_file",classification:"READ",displayName:"New File",description:"Trigger when a new file is created or modified.",aiMetadata:{description:"Fires for each file in a watched directory on an FTP, FTPS or SFTP server whose modification time is newer than the previous poll, so it covers both newly added files and edits to existing ones. Each event represents one such file. Polls a single directory only, without recursing into subfolders, and can optionally skip hidden dotfiles."},props:{path:bt.ShortText({displayName:"Path",description:"The path to watch for new files",required:!0,defaultValue:"./"}),ignoreHiddenFiles:bt.Checkbox({displayName:"Ignore hidden files",description:"Ignore hidden files",required:!1,defaultValue:!1})},outputSchema:Dk,type:"POLLING",onEnable:a(async e=>{await Ku.onEnable(Xp,e)},"onEnable"),onDisable:a(async e=>{await Ku.onDisable(Xp,e)},"onDisable"),run:a(async e=>await Ku.poll(Xp,e),"run"),test:a(async e=>await Ku.test(Xp,e),"test"),sampleData:null});var Zk=Cr(In());async function SU(e,t,r){r?await e.removeDir(t):await e.removeEmptyDir(t)}a(SU,"deleteFolderFTP");async function vU(e,t,r){await e.rmdir(t,r)}a(vU,"deleteFolderSFTP");var Qk=Rr({audience:"both",auth:pr,name:"deleteFolder",classification:"DESTRUCTIVE",displayName:"Delete Folder",description:"Deletes an existing folder at given path.",aiMetadata:{description:"Deletes a directory at a given remote path on the connected FTP, FTPS or SFTP server, either only when it is empty or, with the recursive option enabled, together with every nested subfolder and file. Use this for directories; use Delete File to remove a single file. Recursive deletion is permanent and unrecoverable, so verify the path first; idempotent in that it converges on the folder being absent, and a repeat call on an already-missing path just reports an error.",idempotent:!0},props:{folderPath:bt.ShortText({displayName:"Folder Path",required:!0,description:"The path of the folder to delete e.g. `./myfolder`"}),recursive:bt.Checkbox({displayName:"Recursive",defaultValue:!1,required:!1,description:"Enable this option to delete the folder and all its contents, including subfolders and files."})},outputSchema:Rk,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.folderPath,i=e.propsValue.recursive??!1,n=await Vt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await SU(t,r,i);break;default:case"sftp":await vU(t,r,i);break}return{status:"success"}}catch(o){return o instanceof Zk.FTPError?(console.error(Zt(o.code)),{status:"error",error:Zt(o.code)}):{status:"error",error:o}}finally{await sr(t,e.auth.props.protocol)}}});var Gk=Cr(In());async function wU(e,t){await e.remove(t)}a(wU,"deleteFileFromFTP");async function PU(e,t){await e.delete(t)}a(PU,"deleteFileFromSFTP");var Kk=Rr({audience:"both",auth:pr,name:"deleteFile",classification:"DESTRUCTIVE",displayName:"Delete file",description:"Deletes a file at given path.",aiMetadata:{description:"Permanently deletes a single file at a given remote path on the connected FTP, FTPS or SFTP server. Use this for one file; use Delete Folder to remove a directory, optionally with all of its contents. Requires the exact remote path (e.g. ./myfolder/test.mp3) and there is no recycle bin or undo; idempotent in that it converges on the file being absent, though a repeat call on an already-missing path reports an error.",idempotent:!0},props:{filePath:bt.ShortText({displayName:"File Path",required:!0,description:"The path of the file to delete e.g. `./myfolder/test.mp3`"})},outputSchema:kk,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.filePath,i=await Vt(e.auth.props.protocol);try{switch(i){case"ftps":case"ftp":await wU(t,r);break;default:case"sftp":await PU(t,r);break}return{status:"success"}}catch(n){return n instanceof Gk.FTPError?(console.error(Zt(n.code)),{status:"error",error:Zt(n.code)}):{status:"error",error:n}}finally{await sr(t,e.auth.props.protocol)}}});var Yk=Cr(In());async function TU(e,t){let r=await e.list(t);return await e.end(),r}a(TU,"listSFTP");async function kU(e,t){return(await e.list(t)).map(i=>({type:i.type===1?"d":"-",name:i.name,size:i.size,modifyTime:i.modifiedAt,accessTime:i.modifiedAt,rights:{user:i.permissions||"",group:"",other:""},owner:"",group:""}))}a(kU,"listFTP");var Xk=Rr({audience:"both",auth:pr,name:"listFolderContents",classification:"SEARCH",displayName:"List Folder Contents",description:"Lists the contents of a given folder.",aiMetadata:{description:"Lists the immediate entries of one directory on the connected FTP, FTPS or SFTP server. Use it to discover paths before reading, renaming or deleting, and to walk a tree one level at a time; it is not recursive and offers no filtering or search. Requires the directory path (e.g. ./myfolder); read-only and idempotent.",idempotent:!0},props:{directoryPath:bt.ShortText({displayName:"Directory Path",required:!0,description:"The path of the folder to list e.g. `./myfolder`"})},outputSchema:$k,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.directoryPath,i=await Vt(e.auth.props.protocol);try{let n;switch(i){case"ftps":case"ftp":n=await kU(t,r);break;default:case"sftp":n=await TU(t,r);break}return{status:"success",contents:n}}catch(n){return n instanceof Yk.FTPError?(console.error(Zt(n.code)),{status:"error",content:null,error:Zt(n.code)}):{status:"error",content:null,error:n}}finally{await sr(t,e.auth.props.protocol)}}});var Jk=Cr(In());var eC=Rr({audience:"both",auth:pr,name:"createFolder",classification:"WRITE",displayName:"Create Folder",description:"Creates a folder at given path.",aiMetadata:{description:"Creates a directory at a given remote path on the connected FTP, FTPS or SFTP server; on SFTP an optional recursive mode also creates any missing parent directories, while FTP/FTPS always ensures the whole path. Use it to prepare a destination directory, for example before a rename or move, noting that Create File from Text and Upload File already create parent directories themselves. Requires the folder path (e.g. ./myfolder); idempotent because it converges on that directory existing.",idempotent:!0},props:{folderPath:bt.ShortText({displayName:"Folder Path",required:!0,description:"The new folder path e.g. `./myfolder`. For FTP/FTPS, it will create nested folders if necessary."}),recursive:bt.Checkbox({displayName:"Recursive",defaultValue:!1,required:!1,description:"For SFTP only: Create parent directories if they do not exist"})},outputSchema:Ck,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.folderPath,i=e.propsValue.recursive??!1,n=await Vt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await t.ensureDir(r);break;default:case"sftp":await t.mkdir(r,i);break}return{status:"success"}}catch(o){return o instanceof Jk.FTPError?(console.error(Zt(o.code)),{status:"error",error:Zt(o.code)}):{status:"error",error:o}}finally{await sr(t,e.auth.props.protocol)}}});var tC=Cr(In());async function CU(e,t,r){await e.rename(t,r)}a(CU,"renameFTP");async function RU(e,t,r){await e.rename(t,r),await e.end()}a(RU,"renameSFTP");var rC=Rr({audience:"both",auth:pr,name:"renameFileOrFolder",classification:"WRITE",displayName:"Rename File or Folder",description:"Renames a file or folder at given path.",aiMetadata:{description:"Moves a file or folder on the connected FTP, FTPS or SFTP server from an old remote path to a new one, which covers both renaming in place and, on most servers, relocating the entry into a different directory. Prefer it over reading and re-uploading content, and over a delete-then-create pair, when the bytes do not change. The parent directory of the new path must already exist, so create it with Create Folder first; idempotent in that the entry ends up at the new path, though a repeat call errors because the old path is gone.",idempotent:!0},props:{information:bt.MarkDown({value:"Depending on the server you can also use this to move a file to another directory, as long as the directory exists.",variant:"INFO"}),oldPath:bt.ShortText({displayName:"Old Path",required:!0,description:"The path of the file or folder to rename e.g. `./myfolder/test.mp3`"}),newPath:bt.ShortText({displayName:"New Path",required:!0,description:"The new path of the file or folder e.g. `./myfolder/new-name.mp3`"})},outputSchema:Ok,async run(e){let t=await Jt(e.auth.props),r=e.propsValue.oldPath,i=e.propsValue.newPath,n=await Vt(e.auth.props.protocol);try{switch(n){case"ftps":case"ftp":await CU(t,r,i);break;default:case"sftp":await RU(t,r,i);break}return{status:"success"}}catch(o){return o instanceof tC.FTPError?(console.error(Zt(o.code)),{status:"error",content:null,error:Zt(o.code)}):{status:"error",content:null,error:o}}finally{await sr(t,e.auth.props.protocol)}}});var OU=SS({displayName:"FTP/SFTP",description:"Connect to FTP, FTPS or SFTP servers",minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/new-core/sftp.svg",categories:["CORE","DEVELOPER_TOOLS"],authors:["Abdallah-Alwarawreh","kishanprmr","AbdulTheActivePiecer","khaledmashaly","abuaboud","prasanna2000-max"],auth:pr,actions:[zk,Hk,Wk,Kk,eC,Qk,Xk,rC],triggers:[Vk]});0&&(module.exports={endClient,ftpSftp,getClient,getProtocolBackwardCompatibility});
74
74
  /*! Bundled license information:
75
75
 
76
76
  safe-buffer/index.js: