@activepieces/piece-google-contacts 0.4.10 → 0.5.0

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 +88 -50
package/src/index.js CHANGED
@@ -1,72 +1,110 @@
1
- "use strict";var fw=Object.create;var Ri=Object.defineProperty;var mw=Object.getOwnPropertyDescriptor;var hw=Object.getOwnPropertyNames;var gw=Object.getPrototypeOf,yw=Object.prototype.hasOwnProperty;var o=(t,e)=>Ri(t,"name",{value:e,configurable:!0});var gt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var k=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},ys=(t,e)=>{for(var r in e)Ri(t,r,{get:e[r],enumerable:!0})},vh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hw(e))!yw.call(t,i)&&i!==r&&Ri(t,i,{get:()=>e[i],enumerable:!(n=mw(e,i))||n.enumerable});return t};var ft=(t,e,r)=>(r=t!=null?fw(gw(t)):{},vh(e||!t||!t.__esModule?Ri(r,"default",{value:t,enumerable:!0}):r,t)),_w=t=>vh(Ri({},"__esModule",{value:!0}),t);var Vg=k((qg,Ms)=>{(function(t){"use strict";let e="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${e}\\.${e}\\.${e}\\.${e}$`,"i"),threeOctet:new RegExp(`^${e}\\.${e}\\.${e}$`,"i"),twoOctet:new RegExp(`^${e}\\.${e}$`,"i"),longValue:new RegExp(`^${e}$`,"i")},n=new RegExp("^0[0-7]+$","i"),i=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${e}\\.${e}\\.${e}\\.${e}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${e}\\.${e}\\.${e}\\.${e}(${s})?$`,"i")};function l(g,y){if(g.indexOf("::")!==g.lastIndexOf("::"))return null;let T=0,P=-1,x=(g.match(d.zoneIndex)||[])[0],N,F;for(x&&(x=x.substring(1),g=g.replace(/%.+$/,""));(P=g.indexOf(":",P+1))>=0;)T++;if(g.substr(0,2)==="::"&&T--,g.substr(-2,2)==="::"&&T--,T>y)return null;for(F=y-T,N=":";F--;)N+="0:";return g=g.replace("::",N),g[0]===":"&&(g=g.slice(1)),g[g.length-1]===":"&&(g=g.slice(0,-1)),y=(function(){let X=g.split(":"),Z=[];for(let G=0;G<X.length;G++)Z.push(parseInt(X[G],16));return Z})(),{parts:y,zoneId:x}}o(l,"expandIPv6");function f(g,y,T,P){if(g.length!==y.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,N;for(;P>0;){if(N=T-P,N<0&&(N=0),g[x]>>N!==y[x]>>N)return!1;P-=T,x+=1}return!0}o(f,"matchCIDR");function p(g){if(i.test(g))return parseInt(g,16);if(g[0]==="0"&&!isNaN(parseInt(g[1],10))){if(n.test(g))return parseInt(g,8);throw new Error(`ipaddr: cannot parse ${g} as octal`)}return parseInt(g,10)}o(p,"parseIntAuto");function _(g,y){for(;g.length<y;)g=`0${g}`;return g}o(_,"padPart");let h={};h.IPv4=(function(){function g(y){if(y.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let T,P;for(T=0;T<y.length;T++)if(P=y[T],!(0<=P&&P<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=y}return o(g,"IPv4"),g.prototype.SpecialRanges={unspecified:[[new g([0,0,0,0]),8]],broadcast:[[new g([255,255,255,255]),32]],multicast:[[new g([224,0,0,0]),4]],linkLocal:[[new g([169,254,0,0]),16]],loopback:[[new g([127,0,0,0]),8]],carrierGradeNat:[[new g([100,64,0,0]),10]],private:[[new g([10,0,0,0]),8],[new g([172,16,0,0]),12],[new g([192,168,0,0]),16]],reserved:[[new g([192,0,0,0]),24],[new g([192,0,2,0]),24],[new g([192,88,99,0]),24],[new g([198,18,0,0]),15],[new g([198,51,100,0]),24],[new g([203,0,113,0]),24],[new g([240,0,0,0]),4]],as112:[[new g([192,175,48,0]),24],[new g([192,31,196,0]),24]],amt:[[new g([192,52,193,0]),24]]},g.prototype.kind=function(){return"ipv4"},g.prototype.match=function(y,T){let P;if(T===void 0&&(P=y,y=P[0],T=P[1]),y.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,y.octets,8,T)},g.prototype.prefixLengthFromSubnetMask=function(){let y=0,T=!1,P={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,N,F;for(x=3;x>=0;x-=1)if(N=this.octets[x],N in P){if(F=P[N],T&&F!==0)return null;F!==8&&(T=!0),y+=F}else return null;return 32-y},g.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},g.prototype.toByteArray=function(){return this.octets.slice(0)},g.prototype.toIPv4MappedAddress=function(){return h.IPv6.parse(`::ffff:${this.toString()}`)},g.prototype.toNormalizedString=function(){return this.toString()},g.prototype.toString=function(){return this.octets.join(".")},g})(),h.IPv4.broadcastAddressFromCIDR=function(g){try{let y=this.parseCIDR(g),T=y[0].toByteArray(),P=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),x=[],N=0;for(;N<4;)x.push(parseInt(T[N],10)|parseInt(P[N],10)^255),N++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},h.IPv4.isIPv4=function(g){return this.parser(g)!==null},h.IPv4.isValid=function(g){try{return new this(this.parser(g)),!0}catch{return!1}},h.IPv4.isValidCIDR=function(g){try{return this.parseCIDR(g),!0}catch{return!1}},h.IPv4.isValidFourPartDecimal=function(g){return!!(h.IPv4.isValid(g)&&g.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},h.IPv4.isValidCIDRFourPartDecimal=function(g){let y=g.match(/^(.+)\/(\d+)$/);return!h.IPv4.isValidCIDR(g)||!y?!1:h.IPv4.isValidFourPartDecimal(y[1])},h.IPv4.networkAddressFromCIDR=function(g){let y,T,P,x,N;try{for(y=this.parseCIDR(g),P=y[0].toByteArray(),N=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),x=[],T=0;T<4;)x.push(parseInt(P[T],10)&parseInt(N[T],10)),T++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},h.IPv4.parse=function(g){let y=this.parser(g);if(y===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(y)},h.IPv4.parseCIDR=function(g){let y;if(y=g.match(/^(.+)\/(\d+)$/)){let T=parseInt(y[2]);if(T>=0&&T<=32){let P=[this.parse(y[1]),T];return Object.defineProperty(P,"toString",{value:o(function(){return this.join("/")},"value")}),P}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},h.IPv4.parser=function(g){let y,T,P;if(y=g.match(r.fourOctet))return(function(){let x=y.slice(1,6),N=[];for(let F=0;F<x.length;F++)T=x[F],N.push(p(T));return N})();if(y=g.match(r.longValue)){if(P=p(y[1]),P>4294967295||P<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],N;for(N=0;N<=24;N+=8)x.push(P>>N&255);return x})().reverse()}else return(y=g.match(r.twoOctet))?(function(){let x=y.slice(1,4),N=[];if(P=p(x[1]),P>16777215||P<0)throw new Error("ipaddr: address outside defined range");return N.push(p(x[0])),N.push(P>>16&255),N.push(P>>8&255),N.push(P&255),N})():(y=g.match(r.threeOctet))?(function(){let x=y.slice(1,5),N=[];if(P=p(x[2]),P>65535||P<0)throw new Error("ipaddr: address outside defined range");return N.push(p(x[0])),N.push(p(x[1])),N.push(P>>8&255),N.push(P&255),N})():null},h.IPv4.subnetMaskFromPrefixLength=function(g){if(g=parseInt(g),g<0||g>32)throw new Error("ipaddr: invalid IPv4 prefix length");let y=[0,0,0,0],T=0,P=Math.floor(g/8);for(;T<P;)y[T]=255,T++;return P<4&&(y[P]=Math.pow(2,g%8)-1<<8-g%8),new this(y)},h.IPv6=(function(){function g(y,T){let P,x;if(y.length===16)for(this.parts=[],P=0;P<=14;P+=2)this.parts.push(y[P]<<8|y[P+1]);else if(y.length===8)this.parts=y;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(P=0;P<this.parts.length;P++)if(x=this.parts[P],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");T&&(this.zoneId=T)}return o(g,"IPv6"),g.prototype.SpecialRanges={unspecified:[new g([0,0,0,0,0,0,0,0]),128],linkLocal:[new g([65152,0,0,0,0,0,0,0]),10],multicast:[new g([65280,0,0,0,0,0,0,0]),8],loopback:[new g([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new g([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new g([0,0,0,0,0,65535,0,0]),96],discard:[new g([256,0,0,0,0,0,0,0]),64],rfc6145:[new g([0,0,0,0,65535,0,0,0]),96],rfc6052:[new g([100,65435,0,0,0,0,0,0]),96],"6to4":[new g([8194,0,0,0,0,0,0,0]),16],teredo:[new g([8193,0,0,0,0,0,0,0]),32],benchmarking:[new g([8193,2,0,0,0,0,0,0]),48],amt:[new g([8193,3,0,0,0,0,0,0]),32],as112v6:[[new g([8193,4,274,0,0,0,0,0]),48],[new g([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new g([8193,16,0,0,0,0,0,0]),28],orchid2:[new g([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new g([8193,48,0,0,0,0,0,0]),28],reserved:[[new g([8193,0,0,0,0,0,0,0]),23],[new g([8193,3512,0,0,0,0,0,0]),32]]},g.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},g.prototype.kind=function(){return"ipv6"},g.prototype.match=function(y,T){let P;if(T===void 0&&(P=y,y=P[0],T=P[1]),y.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,y.parts,16,T)},g.prototype.prefixLengthFromSubnetMask=function(){let y=0,T=!1,P={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},x,N;for(let F=7;F>=0;F-=1)if(x=this.parts[F],x in P){if(N=P[x],T&&N!==0)return null;N!==16&&(T=!0),y+=N}else return null;return 128-y},g.prototype.range=function(){return h.subnetMatch(this,this.SpecialRanges)},g.prototype.toByteArray=function(){let y,T=[],P=this.parts;for(let x=0;x<P.length;x++)y=P[x],T.push(y>>8),T.push(y&255);return T},g.prototype.toFixedLengthString=function(){let y=(function(){let P=[];for(let x=0;x<this.parts.length;x++)P.push(_(this.parts[x].toString(16),4));return P}).call(this).join(":"),T="";return this.zoneId&&(T=`%${this.zoneId}`),y+T},g.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let y=this.parts.slice(-2),T=y[0],P=y[1];return new h.IPv4([T>>8,T&255,P>>8,P&255])},g.prototype.toNormalizedString=function(){let y=(function(){let P=[];for(let x=0;x<this.parts.length;x++)P.push(this.parts[x].toString(16));return P}).call(this).join(":"),T="";return this.zoneId&&(T=`%${this.zoneId}`),y+T},g.prototype.toRFC5952String=function(){let y=/((^|:)(0(:|$)){2,})/g,T=this.toNormalizedString(),P=0,x=-1,N;for(;N=y.exec(T);)N[0].length>x&&(P=N.index,x=N[0].length);return x<0?T:`${T.substring(0,P)}::${T.substring(P+x)}`},g.prototype.toString=function(){return this.toRFC5952String()},g})(),h.IPv6.broadcastAddressFromCIDR=function(g){try{let y=this.parseCIDR(g),T=y[0].toByteArray(),P=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),x=[],N=0;for(;N<16;)x.push(parseInt(T[N],10)|parseInt(P[N],10)^255),N++;return new this(x)}catch(y){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${y})`)}},h.IPv6.isIPv6=function(g){return this.parser(g)!==null},h.IPv6.isValid=function(g){if(typeof g=="string"&&g.indexOf(":")===-1)return!1;try{let y=this.parser(g);return new this(y.parts,y.zoneId),!0}catch{return!1}},h.IPv6.isValidCIDR=function(g){if(typeof g=="string"&&g.indexOf(":")===-1)return!1;try{return this.parseCIDR(g),!0}catch{return!1}},h.IPv6.networkAddressFromCIDR=function(g){let y,T,P,x,N;try{for(y=this.parseCIDR(g),P=y[0].toByteArray(),N=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),x=[],T=0;T<16;)x.push(parseInt(P[T],10)&parseInt(N[T],10)),T++;return new this(x)}catch(F){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${F})`)}},h.IPv6.parse=function(g){let y=this.parser(g);if(y.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(y.parts,y.zoneId)},h.IPv6.parseCIDR=function(g){let y,T,P;if((T=g.match(/^(.+)\/(\d+)$/))&&(y=parseInt(T[2]),y>=0&&y<=128))return P=[this.parse(T[1]),y],Object.defineProperty(P,"toString",{value:o(function(){return this.join("/")},"value")}),P;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},h.IPv6.parser=function(g){let y,T,P,x,N,F;if(P=g.match(d.deprecatedTransitional))return this.parser(`::ffff:${P[1]}`);if(d.native.test(g))return l(g,8);if((P=g.match(d.transitional))&&(F=P[6]||"",y=P[1],P[1].endsWith("::")||(y=y.slice(0,-1)),y=l(y+F,6),y.parts)){for(N=[parseInt(P[2]),parseInt(P[3]),parseInt(P[4]),parseInt(P[5])],T=0;T<N.length;T++)if(x=N[T],!(0<=x&&x<=255))return null;return y.parts.push(N[0]<<8|N[1]),y.parts.push(N[2]<<8|N[3]),{parts:y.parts,zoneId:y.zoneId}}return null},h.IPv6.subnetMaskFromPrefixLength=function(g){if(g=parseInt(g),g<0||g>128)throw new Error("ipaddr: invalid IPv6 prefix length");let y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=0,P=Math.floor(g/8);for(;T<P;)y[T]=255,T++;return P<16&&(y[P]=Math.pow(2,g%8)-1<<8-g%8),new this(y)},h.fromByteArray=function(g){let y=g.length;if(y===4)return new h.IPv4(g);if(y===16)return new h.IPv6(g);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},h.isValid=function(g){return h.IPv6.isValid(g)||h.IPv4.isValid(g)},h.isValidCIDR=function(g){return h.IPv6.isValidCIDR(g)||h.IPv4.isValidCIDR(g)},h.parse=function(g){if(h.IPv6.isValid(g))return h.IPv6.parse(g);if(h.IPv4.isValid(g))return h.IPv4.parse(g);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},h.parseCIDR=function(g){try{return h.IPv6.parseCIDR(g)}catch{try{return h.IPv4.parseCIDR(g)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},h.process=function(g){let y=this.parse(g);return y.kind()==="ipv6"&&y.isIPv4MappedAddress()?y.toIPv4Address():y},h.subnetMatch=function(g,y,T){let P,x,N,F;T==null&&(T="unicast");for(x in y)if(Object.prototype.hasOwnProperty.call(y,x)){for(N=y[x],N[0]&&!(N[0]instanceof Array)&&(N=[N]),P=0;P<N.length;P++)if(F=N[P],g.kind()===F[0].kind()&&g.match.apply(g,F))return x}return T},typeof Ms<"u"&&Ms.exports?Ms.exports=h:t.ipaddr=h})(qg)});var Ky=k((BK,Zy)=>{var Wy=require("stream").Stream,rO=require("util");Zy.exports=fr;function fr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(fr,"DelayedStream");rO.inherits(fr,Wy);fr.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var i=t.emit;return t.emit=function(){return r._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(fr.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});fr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};fr.prototype.resume=function(){this._released||this.release(),this.source.resume()};fr.prototype.pause=function(){this.source.pause()};fr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};fr.prototype.pipe=function(){var t=Wy.prototype.pipe.apply(this,arguments);return this.resume(),t};fr.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};fr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var Qy=k((VK,Xy)=>{var nO=require("util"),Yy=require("stream").Stream,Jy=Ky();Xy.exports=ot;function ot(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(ot,"CombinedStream");nO.inherits(ot,Yy);ot.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};ot.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ot.prototype.append=function(t){var e=ot.isStreamLike(t);if(e){if(!(t instanceof Jy)){var r=Jy.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ot.prototype.pipe=function(t,e){return Yy.prototype.pipe.call(this,t,e),this.resume(),t};ot.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ot.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=ot.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ot.prototype._pipeNext=function(t){this._currentStream=t;var e=ot.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};ot.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};ot.prototype.write=function(t){this.emit("data",t)};ot.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ot.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ot.prototype.end=function(){this._reset(),this.emit("end")};ot.prototype.destroy=function(){this._reset(),this.emit("close")};ot.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ot.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ot.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ot.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var t_=k((GK,e_)=>{"use strict";e_.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var o_=k(Rt=>{"use strict";var qs=t_(),oO=require("path").extname,r_=/^\s*([^;\s]*)(?:;|\s|$)/,iO=/^text\//i;Rt.charset=n_;Rt.charsets={lookup:n_};Rt.contentType=aO;Rt.extension=sO;Rt.extensions=Object.create(null);Rt.lookup=uO;Rt.types=Object.create(null);cO(Rt.extensions,Rt.types);function n_(t){if(!t||typeof t!="string")return!1;var e=r_.exec(t),r=e&&qs[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&iO.test(e[1])?"UTF-8":!1}o(n_,"charset");function aO(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Rt.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=Rt.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}o(aO,"contentType");function sO(t){if(!t||typeof t!="string")return!1;var e=r_.exec(t),r=e&&Rt.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(sO,"extension");function uO(t){if(!t||typeof t!="string")return!1;var e=oO("x."+t).toLowerCase().substr(1);return e&&Rt.types[e]||!1}o(uO,"lookup");function cO(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(qs).forEach(o(function(i){var s=qs[i],c=s.extensions;if(!(!c||!c.length)){t[i]=c;for(var d=0;d<c.length;d++){var l=c[d];if(e[l]){var f=r.indexOf(qs[e[l]].source),p=r.indexOf(s.source);if(e[l]!=="application/octet-stream"&&(f>p||f===p&&e[l].substr(0,12)==="application/"))continue}e[l]=i}}},"forEachMimeType"))}o(cO,"populateMaps")});var a_=k((KK,i_)=>{i_.exports=lO;function lO(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}o(lO,"defer")});var Wl=k((YK,u_)=>{var s_=a_();u_.exports=dO;function dO(t){var e=!1;return s_(function(){e=!0}),o(function(n,i){e?t(n,i):s_(o(function(){t(n,i)},"nextTick_callback"))},"async_callback")}o(dO,"async")});var Zl=k((QK,c_)=>{c_.exports=pO;function pO(t){Object.keys(t.jobs).forEach(fO.bind(t)),t.jobs={}}o(pO,"abort");function fO(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}o(fO,"clean")});var Kl=k((tJ,d_)=>{var l_=Wl(),mO=Zl();d_.exports=hO;function hO(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=gO(e,i,t[i],function(s,c){i in r.jobs&&(delete r.jobs[i],s?mO(r):r.results[i]=c,n(s,r.results))})}o(hO,"iterate");function gO(t,e,r,n){var i;return t.length==2?i=t(r,l_(n)):i=t(r,e,l_(n)),i}o(gO,"runJob")});var Jl=k((nJ,p_)=>{p_.exports=yO;function yO(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(i,s){return e(t[i],t[s])}),n}o(yO,"state")});var Yl=k((iJ,f_)=>{var _O=Zl(),vO=Wl();f_.exports=bO;function bO(t){Object.keys(this.jobs).length&&(this.index=this.size,_O(this),vO(t)(null,this.results))}o(bO,"terminator")});var h_=k((sJ,m_)=>{var PO=Kl(),SO=Jl(),EO=Yl();m_.exports=TO;function TO(t,e,r){for(var n=SO(t);n.index<(n.keyedList||t).length;)PO(t,e,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return EO.bind(n,r)}o(TO,"parallel")});var Xl=k((cJ,Vs)=>{var g_=Kl(),xO=Jl(),AO=Yl();Vs.exports=wO;Vs.exports.ascending=y_;Vs.exports.descending=IO;function wO(t,e,r,n){var i=xO(t,r);return g_(t,e,i,o(function s(c,d){if(c){n(c,d);return}if(i.index++,i.index<(i.keyedList||t).length){g_(t,e,i,s);return}n(null,i.results)},"iteratorHandler")),AO.bind(i,n)}o(wO,"serialOrdered");function y_(t,e){return t<e?-1:t>e?1:0}o(y_,"ascending");function IO(t,e){return-1*y_(t,e)}o(IO,"descending")});var v_=k((dJ,__)=>{var RO=Xl();__.exports=OO;function OO(t,e,r){return RO(t,e,null,r)}o(OO,"serial")});var P_=k((fJ,b_)=>{b_.exports={parallel:h_(),serial:v_(),serialOrdered:Xl()}});var Ql=k((mJ,S_)=>{"use strict";S_.exports=Object});var T_=k((hJ,E_)=>{"use strict";E_.exports=Error});var A_=k((gJ,x_)=>{"use strict";x_.exports=EvalError});var I_=k((yJ,w_)=>{"use strict";w_.exports=RangeError});var O_=k((_J,R_)=>{"use strict";R_.exports=ReferenceError});var $_=k((vJ,C_)=>{"use strict";C_.exports=SyntaxError});var $n=k((bJ,k_)=>{"use strict";k_.exports=TypeError});var z_=k((PJ,N_)=>{"use strict";N_.exports=URIError});var U_=k((SJ,D_)=>{"use strict";D_.exports=Math.abs});var j_=k((EJ,M_)=>{"use strict";M_.exports=Math.floor});var F_=k((TJ,L_)=>{"use strict";L_.exports=Math.max});var q_=k((xJ,B_)=>{"use strict";B_.exports=Math.min});var H_=k((AJ,V_)=>{"use strict";V_.exports=Math.pow});var W_=k((wJ,G_)=>{"use strict";G_.exports=Math.round});var K_=k((IJ,Z_)=>{"use strict";Z_.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var Y_=k((OJ,J_)=>{"use strict";var CO=K_();J_.exports=o(function(e){return CO(e)||e===0?e:e<0?-1:1},"sign")});var Q_=k(($J,X_)=>{"use strict";X_.exports=Object.getOwnPropertyDescriptor});var ed=k((kJ,ev)=>{"use strict";var Hs=Q_();if(Hs)try{Hs([],"length")}catch{Hs=null}ev.exports=Hs});var rv=k((NJ,tv)=>{"use strict";var Gs=Object.defineProperty||!1;if(Gs)try{Gs({},"a",{value:1})}catch{Gs=!1}tv.exports=Gs});var td=k((zJ,nv)=>{"use strict";nv.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(e,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0},"hasSymbols")});var av=k((UJ,iv)=>{"use strict";var ov=typeof Symbol<"u"&&Symbol,$O=td();iv.exports=o(function(){return typeof ov!="function"||typeof Symbol!="function"||typeof ov("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$O()},"hasNativeSymbols")});var rd=k((jJ,sv)=>{"use strict";sv.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var nd=k((LJ,uv)=>{"use strict";var kO=Ql();uv.exports=kO.getPrototypeOf||null});var dv=k((FJ,lv)=>{"use strict";var NO="Function.prototype.bind called on incompatible ",zO=Object.prototype.toString,DO=Math.max,UO="[object Function]",cv=o(function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var s=0;s<r.length;s+=1)n[s+e.length]=r[s];return n},"concatty"),MO=o(function(e,r){for(var n=[],i=r||0,s=0;i<e.length;i+=1,s+=1)n[s]=e[i];return n},"slicy"),jO=o(function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},"joiny");lv.exports=o(function(e){var r=this;if(typeof r!="function"||zO.apply(r)!==UO)throw new TypeError(NO+r);for(var n=MO(arguments,1),i,s=o(function(){if(this instanceof i){var p=r.apply(this,cv(n,arguments));return Object(p)===p?p:this}return r.apply(e,cv(n,arguments))},"binder"),c=DO(0,r.length-n.length),d=[],l=0;l<c;l++)d[l]="$"+l;if(i=Function("binder","return function ("+jO(d,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var f=o(function(){},"Empty");f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},"bind")});var Fo=k((qJ,pv)=>{"use strict";var LO=dv();pv.exports=Function.prototype.bind||LO});var Ws=k((VJ,fv)=>{"use strict";fv.exports=Function.prototype.call});var od=k((HJ,mv)=>{"use strict";mv.exports=Function.prototype.apply});var gv=k((GJ,hv)=>{"use strict";hv.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var _v=k((WJ,yv)=>{"use strict";var FO=Fo(),BO=od(),qO=Ws(),VO=gv();yv.exports=VO||FO.call(qO,BO)});var id=k((ZJ,vv)=>{"use strict";var HO=Fo(),GO=$n(),WO=Ws(),ZO=_v();vv.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new GO("a function is required");return ZO(HO,WO,e)},"callBindBasic")});var xv=k((JJ,Tv)=>{"use strict";var KO=id(),bv=ed(),Sv;try{Sv=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var ad=!!Sv&&bv&&bv(Object.prototype,"__proto__"),Ev=Object,Pv=Ev.getPrototypeOf;Tv.exports=ad&&typeof ad.get=="function"?KO([ad.get]):typeof Pv=="function"?o(function(e){return Pv(e==null?e:Ev(e))},"getDunder"):!1});var Ov=k((XJ,Rv)=>{"use strict";var Av=rd(),wv=nd(),Iv=xv();Rv.exports=Av?o(function(e){return Av(e)},"getProto"):wv?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return wv(e)},"getProto"):Iv?o(function(e){return Iv(e)},"getProto"):null});var sd=k((e8,Cv)=>{"use strict";var JO=Function.prototype.call,YO=Object.prototype.hasOwnProperty,XO=Fo();Cv.exports=XO.call(JO,YO)});var ea=k((t8,Uv)=>{"use strict";var ke,QO=Ql(),eC=T_(),tC=A_(),rC=I_(),nC=O_(),Ho=$_(),Vo=$n(),oC=z_(),iC=U_(),aC=j_(),sC=F_(),uC=q_(),cC=H_(),lC=W_(),dC=Y_(),zv=Function,ud=o(function(t){try{return zv('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),Yi=ed(),pC=rv(),cd=o(function(){throw new Vo},"throwTypeError"),fC=Yi?(function(){try{return arguments.callee,cd}catch{try{return Yi(arguments,"callee").get}catch{return cd}}})():cd,Bo=av()(),_t=Ov(),mC=nd(),hC=rd(),Dv=od(),Xi=Ws(),qo={},gC=typeof Uint8Array>"u"||!_t?ke:_t(Uint8Array),to={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ke:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ke:ArrayBuffer,"%ArrayIteratorPrototype%":Bo&&_t?_t([][Symbol.iterator]()):ke,"%AsyncFromSyncIteratorPrototype%":ke,"%AsyncFunction%":qo,"%AsyncGenerator%":qo,"%AsyncGeneratorFunction%":qo,"%AsyncIteratorPrototype%":qo,"%Atomics%":typeof Atomics>"u"?ke:Atomics,"%BigInt%":typeof BigInt>"u"?ke:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ke:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ke:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ke:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":eC,"%eval%":eval,"%EvalError%":tC,"%Float16Array%":typeof Float16Array>"u"?ke:Float16Array,"%Float32Array%":typeof Float32Array>"u"?ke:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ke:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ke:FinalizationRegistry,"%Function%":zv,"%GeneratorFunction%":qo,"%Int8Array%":typeof Int8Array>"u"?ke:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ke:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ke:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bo&&_t?_t(_t([][Symbol.iterator]())):ke,"%JSON%":typeof JSON=="object"?JSON:ke,"%Map%":typeof Map>"u"?ke:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bo||!_t?ke:_t(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":QO,"%Object.getOwnPropertyDescriptor%":Yi,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ke:Promise,"%Proxy%":typeof Proxy>"u"?ke:Proxy,"%RangeError%":rC,"%ReferenceError%":nC,"%Reflect%":typeof Reflect>"u"?ke:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ke:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bo||!_t?ke:_t(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ke:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bo&&_t?_t(""[Symbol.iterator]()):ke,"%Symbol%":Bo?Symbol:ke,"%SyntaxError%":Ho,"%ThrowTypeError%":fC,"%TypedArray%":gC,"%TypeError%":Vo,"%Uint8Array%":typeof Uint8Array>"u"?ke:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ke:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ke:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ke:Uint32Array,"%URIError%":oC,"%WeakMap%":typeof WeakMap>"u"?ke:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ke:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ke:WeakSet,"%Function.prototype.call%":Xi,"%Function.prototype.apply%":Dv,"%Object.defineProperty%":pC,"%Object.getPrototypeOf%":mC,"%Math.abs%":iC,"%Math.floor%":aC,"%Math.max%":sC,"%Math.min%":uC,"%Math.pow%":cC,"%Math.round%":lC,"%Math.sign%":dC,"%Reflect.getPrototypeOf%":hC};if(_t)try{null.error}catch(t){$v=_t(_t(t)),to["%Error.prototype%"]=$v}var $v,yC=o(function t(e){var r;if(e==="%AsyncFunction%")r=ud("async function () {}");else if(e==="%GeneratorFunction%")r=ud("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=ud("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&_t&&(r=_t(i.prototype))}return to[e]=r,r},"doEval"),kv={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qi=Fo(),Zs=sd(),_C=Qi.call(Xi,Array.prototype.concat),vC=Qi.call(Dv,Array.prototype.splice),Nv=Qi.call(Xi,String.prototype.replace),Ks=Qi.call(Xi,String.prototype.slice),bC=Qi.call(Xi,RegExp.prototype.exec),PC=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,SC=/\\(\\)?/g,EC=o(function(e){var r=Ks(e,0,1),n=Ks(e,-1);if(r==="%"&&n!=="%")throw new Ho("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ho("invalid intrinsic syntax, expected opening `%`");var i=[];return Nv(e,PC,function(s,c,d,l){i[i.length]=d?Nv(l,SC,"$1"):c||s}),i},"stringToPath"),TC=o(function(e,r){var n=e,i;if(Zs(kv,n)&&(i=kv[n],n="%"+i[0]+"%"),Zs(to,n)){var s=to[n];if(s===qo&&(s=yC(n)),typeof s>"u"&&!r)throw new Vo("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Ho("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");Uv.exports=o(function(e,r){if(typeof e!="string"||e.length===0)throw new Vo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Vo('"allowMissing" argument must be a boolean');if(bC(/^%?[^%]*%?$/,e)===null)throw new Ho("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=EC(e),i=n.length>0?n[0]:"",s=TC("%"+i+"%",r),c=s.name,d=s.value,l=!1,f=s.alias;f&&(i=f[0],vC(n,_C([0,1],f)));for(var p=1,_=!0;p<n.length;p+=1){var h=n[p],g=Ks(h,0,1),y=Ks(h,-1);if((g==='"'||g==="'"||g==="`"||y==='"'||y==="'"||y==="`")&&g!==y)throw new Ho("property names with quotes must have matching quotes");if((h==="constructor"||!_)&&(l=!0),i+="."+h,c="%"+i+"%",Zs(to,c))d=to[c];else if(d!=null){if(!(h in d)){if(!r)throw new Vo("base intrinsic for "+e+" exists, but the property is not available.");return}if(Yi&&p+1>=n.length){var T=Yi(d,h);_=!!T,_&&"get"in T&&!("originalValue"in T.get)?d=T.get:d=d[h]}else _=Zs(d,h),d=d[h];_&&!l&&(to[c]=d)}}return d},"GetIntrinsic")});var jv=k((n8,Mv)=>{"use strict";var xC=td();Mv.exports=o(function(){return xC()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Bv=k((i8,Fv)=>{"use strict";var AC=ea(),Lv=AC("%Object.defineProperty%",!0),wC=jv()(),IC=sd(),RC=$n(),Js=wC?Symbol.toStringTag:null;Fv.exports=o(function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new RC("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Js&&(n||!IC(e,Js))&&(Lv?Lv(e,Js,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[Js]=r)},"setToStringTag")});var Vv=k((s8,qv)=>{"use strict";var OC=Function.prototype.call,CC=Object.prototype.hasOwnProperty,$C=Fo();qv.exports=$C.call(OC,CC)});var Gv=k((u8,Hv)=>{"use strict";Hv.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var Kv=k((c8,Zv)=>{"use strict";var fd=Qy(),kC=require("util"),ld=require("path"),NC=require("http"),zC=require("https"),DC=require("url").parse,UC=require("fs"),MC=require("stream").Stream,jC=require("crypto"),dd=o_(),LC=P_(),FC=Bv(),kn=Vv(),pd=Gv();function Wv(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(Wv,"escapeHeaderParam");function je(t){if(!(this instanceof je))return new je(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],fd.call(this),t=t||{};for(var e in t)this[e]=t[e]}o(je,"FormData");kC.inherits(je,fd);je.LINE_BREAK=`\r
2
- `;je.DEFAULT_CONTENT_TYPE="application/octet-stream";je.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=fd.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,r),s=this._multiPartFooter();n(i),n(e),n(s),this._trackLength(i,e,r)};je.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+je.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&kn(e,"httpVersion"))&&!(e instanceof MC))&&(r.knownLength||this._valuesToMeasure.push(e))};je.prototype._lengthRetriever=function(t,e){kn(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):UC.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):kn(t,"httpVersion")?e(null,Number(t.headers["content-length"])):kn(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};je.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),i=this._getContentType(e,r),s="",c={"Content-Disposition":["form-data",'name="'+Wv(t)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&pd(c,r.header);var d;for(var l in c)if(kn(c,l)){if(d=c[l],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(s+=l+": "+d.join("; ")+je.LINE_BREAK)}return"--"+this.getBoundary()+je.LINE_BREAK+s+je.LINE_BREAK};je.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=ld.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=ld.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&kn(t,"httpVersion")&&(r=ld.basename(t.client._httpMessage.path||"")),r)return'filename="'+Wv(r)+'"'};je.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=dd.lookup(t.name)),!r&&t&&t.path&&(r=dd.lookup(t.path)),!r&&t&&t.readable&&kn(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=dd.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=je.DEFAULT_CONTENT_TYPE),r};je.prototype._multiPartFooter=function(){return function(t){var e=je.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};je.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+je.LINE_BREAK};je.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)kn(t,e)&&(r[e.toLowerCase()]=t[e]);return r};je.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};je.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};je.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(je.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};je.prototype._generateBoundary=function(){this._boundary="--------------------------"+jC.randomBytes(12).toString("hex")};je.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};je.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};je.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}LC.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};je.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=DC(t),n=pd({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=pd(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=zC.request(n):r=NC.request(n),this.getLength(function(s,c){if(s&&s!=="Unknown stream"){this._error(s);return}if(c&&r.setHeader("Content-Length",c),this.pipe(r),e){var d,l=o(function(f,p){return r.removeListener("error",l),r.removeListener("response",d),e.call(this,f,p)},"callback");d=l.bind(this,null),r.on("error",l),r.on("response",d)}}.bind(this)),r};je.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};je.prototype.toString=function(){return"[object FormData]"};FC(je.prototype,"FormData");Zv.exports=je});var ra=k((i5,fb)=>{"use strict";var Xs=Object.prototype.hasOwnProperty,pb=Object.prototype.toString,ab=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,ub=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):pb.call(e)==="[object Array]"},"isArray"),cb=o(function(e){if(!e||pb.call(e)!=="[object Object]")return!1;var r=Xs.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Xs.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Xs.call(e,i)},"isPlainObject"),lb=o(function(e,r){ab&&r.name==="__proto__"?ab(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),db=o(function(e,r){if(r==="__proto__")if(Xs.call(e,r)){if(sb)return sb(e,r).value}else return;return e[r]},"getProperty");fb.exports=o(function t(){var e,r,n,i,s,c,d=arguments[0],l=1,f=arguments.length,p=!1;for(typeof d=="boolean"&&(p=d,d=arguments[1]||{},l=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});l<f;++l)if(e=arguments[l],e!=null)for(r in e)n=db(d,r),i=db(e,r),d!==i&&(p&&i&&(cb(i)||(s=ub(i)))?(s?(s=!1,c=n&&ub(n)?n:[]):c=n&&cb(n)?n:{},lb(d,{name:r,newValue:t(p,c,i)})):typeof i<"u"&&lb(d,{name:r,newValue:i}));return d},"extend")});var mb=k((s5,n0)=>{n0.exports={name:"gaxios",version:"7.1.3",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.0.0",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"^5.8.3",webpack:"^5.35.0","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2",rimraf:"^5.0.1"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var gb=k((u5,hb)=>{"use strict";var o0=mb();hb.exports={pkg:o0}});var gd=k(er=>{"use strict";var _b=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(er,"__esModule",{value:!0});er.GaxiosError=er.GAXIOS_ERROR_SYMBOL=void 0;er.defaultErrorRedactor=vb;var yb=_b(ra()),i0=_b(gb()),md=i0.default.pkg;er.GAXIOS_ERROR_SYMBOL=Symbol.for(`${md.name}-gaxios-error`);var hd=class t extends Error{static{o(this,"GaxiosError")}config;response;code;status;error;[er.GAXIOS_ERROR_SYMBOL]=md.version;static[Symbol.hasInstance](e){return e&&typeof e=="object"&&er.GAXIOS_ERROR_SYMBOL in e&&e[er.GAXIOS_ERROR_SYMBOL]===md.version?!0:Function.prototype[Symbol.hasInstance].call(t,e)}constructor(e,r,n,i){if(super(e,{cause:i}),this.config=r,this.response=n,this.error=i instanceof Error?i:void 0,this.config=(0,yb.default)(!0,{},r),this.response&&(this.response.config=(0,yb.default)(!0,{},this.response.config)),this.response){try{this.response.data=a0(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}i instanceof DOMException?this.code=i.name:i&&typeof i=="object"&&"code"in i&&(typeof i.code=="string"||typeof i.code=="number")&&(this.code=i.code)}static extractAPIErrorFromResponse(e,r="The request failed"){let n=r;if(typeof e.data=="string"&&(n=e.data),e.data&&typeof e.data=="object"&&"error"in e.data&&e.data.error&&!e.ok){if(typeof e.data.error=="string")return{message:e.data.error,code:e.status,status:e.statusText};if(typeof e.data.error=="object"){n="message"in e.data.error&&typeof e.data.error.message=="string"?e.data.error.message:n;let i="status"in e.data.error&&typeof e.data.error.status=="string"?e.data.error.status:e.statusText,s="code"in e.data.error&&typeof e.data.error.code=="number"?e.data.error.code:e.status;if("errors"in e.data.error&&Array.isArray(e.data.error.errors)){let c=[];for(let d of e.data.error.errors)typeof d=="object"&&"message"in d&&typeof d.message=="string"&&c.push(d.message);return Object.assign({message:c.join(`
3
- `)||n,code:s,status:i},e.data.error)}return Object.assign({message:n,code:s,status:i},e.data.error)}}return{message:n,code:e.status,status:e.statusText}}};er.GaxiosError=hd;function a0(t,e){switch(t){case"stream":return e;case"json":return JSON.parse(JSON.stringify(e));case"arraybuffer":return JSON.parse(Buffer.from(e).toString("utf8"));case"blob":return JSON.parse(e.text());default:return e}}o(a0,"translateData");function vb(t){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function r(s){s&&s.forEach((c,d)=>{(/^authentication$/i.test(d)||/^authorization$/i.test(d)||/secret/i.test(d))&&s.set(d,e)})}o(r,"redactHeaders");function n(s,c){if(typeof s=="object"&&s!==null&&typeof s[c]=="string"){let d=s[c];(/grant_type=/i.test(d)||/assertion=/i.test(d)||/secret/i.test(d))&&(s[c]=e)}}o(n,"redactString");function i(s){!s||typeof s!="object"||(s instanceof FormData||s instanceof URLSearchParams||"forEach"in s&&"set"in s?s.forEach((c,d)=>{(["grant_type","assertion"].includes(d)||/secret/.test(d))&&s.set(d,e)}):("grant_type"in s&&(s.grant_type=e),"assertion"in s&&(s.assertion=e),"client_secret"in s&&(s.client_secret=e)))}return o(i,"redactObject"),t.config&&(r(t.config.headers),n(t.config,"data"),i(t.config.data),n(t.config,"body"),i(t.config.body),t.config.url.searchParams.has("token")&&t.config.url.searchParams.set("token",e),t.config.url.searchParams.has("client_secret")&&t.config.url.searchParams.set("client_secret",e)),t.response&&(vb({config:t.response.config}),r(t.response.headers),t.response.bodyUsed&&(n(t.response,"data"),i(t.response.data))),t}o(vb,"defaultErrorRedactor")});var Pb=k(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.getRetryConfig=s0;async function s0(t){let e=bb(t);if(!t||!t.config||!e&&!t.config.retry)return{shouldRetry:!1};e=e||{},e.currentRetryAttempt=e.currentRetryAttempt||0,e.retry=e.retry===void 0||e.retry===null?3:e.retry,e.httpMethodsToRetry=e.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],e.noResponseRetries=e.noResponseRetries===void 0||e.noResponseRetries===null?2:e.noResponseRetries,e.retryDelayMultiplier=e.retryDelayMultiplier?e.retryDelayMultiplier:2,e.timeOfFirstRequest=e.timeOfFirstRequest?e.timeOfFirstRequest:Date.now(),e.totalTimeout=e.totalTimeout?e.totalTimeout:Number.MAX_SAFE_INTEGER,e.maxRetryDelay=e.maxRetryDelay?e.maxRetryDelay:Number.MAX_SAFE_INTEGER;let r=[[100,199],[408,408],[429,429],[500,599]];if(e.statusCodesToRetry=e.statusCodesToRetry||r,t.config.retryConfig=e,!await(e.shouldRetry||u0)(t))return{shouldRetry:!1,config:t.config};let i=c0(e);t.config.retryConfig.currentRetryAttempt+=1;let s=e.retryBackoff?e.retryBackoff(t,i):new Promise(c=>{setTimeout(c,i)});return e.onRetryAttempt&&await e.onRetryAttempt(t),await s,{shouldRetry:!0,config:t.config}}o(s0,"getRetryConfig");function u0(t){let e=bb(t);if(t.config.signal?.aborted&&t.code!=="TimeoutError"||t.code==="AbortError"||!e||e.retry===0||!t.response&&(e.currentRetryAttempt||0)>=e.noResponseRetries||!e.httpMethodsToRetry||!e.httpMethodsToRetry.includes(t.config.method?.toUpperCase()||"GET"))return!1;if(t.response&&t.response.status){let r=!1;for(let[n,i]of e.statusCodesToRetry){let s=t.response.status;if(s>=n&&s<=i){r=!0;break}}if(!r)return!1}return e.currentRetryAttempt=e.currentRetryAttempt||0,!(e.currentRetryAttempt>=e.retry)}o(u0,"shouldRetryRequest");function bb(t){if(t&&t.config&&t.config.retryConfig)return t.config.retryConfig}o(bb,"getConfig");function c0(t){let r=(t.currentRetryAttempt?0:t.retryDelay??100)+(Math.pow(t.retryDelayMultiplier,t.currentRetryAttempt)-1)/2*1e3,n=t.totalTimeout-(Date.now()-t.timeOfFirstRequest);return Math.min(r,n,t.maxRetryDelay)}o(c0,"getNextRetryDelay")});var vd=k(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.GaxiosInterceptorManager=void 0;var _d=class extends Set{static{o(this,"GaxiosInterceptorManager")}};Qs.GaxiosInterceptorManager=_d});var Eb=k((h5,Sb)=>{var Go=1e3,Wo=Go*60,Zo=Wo*60,ro=Zo*24,l0=ro*7,d0=ro*365.25;Sb.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return p0(t);if(r==="number"&&isFinite(t))return e.long?m0(t):f0(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function p0(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*d0;case"weeks":case"week":case"w":return r*l0;case"days":case"day":case"d":return r*ro;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Zo;case"minutes":case"minute":case"mins":case"min":case"m":return r*Wo;case"seconds":case"second":case"secs":case"sec":case"s":return r*Go;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}o(p0,"parse");function f0(t){var e=Math.abs(t);return e>=ro?Math.round(t/ro)+"d":e>=Zo?Math.round(t/Zo)+"h":e>=Wo?Math.round(t/Wo)+"m":e>=Go?Math.round(t/Go)+"s":t+"ms"}o(f0,"fmtShort");function m0(t){var e=Math.abs(t);return e>=ro?eu(t,e,ro,"day"):e>=Zo?eu(t,e,Zo,"hour"):e>=Wo?eu(t,e,Wo,"minute"):e>=Go?eu(t,e,Go,"second"):t+" ms"}o(m0,"fmtLong");function eu(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}o(eu,"plural")});var bd=k((y5,Tb)=>{function h0(t){r.debug=r,r.default=r,r.coerce=l,r.disable=c,r.enable=i,r.enabled=d,r.humanize=Eb(),r.destroy=f,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let _=0;for(let h=0;h<p.length;h++)_=(_<<5)-_+p.charCodeAt(h),_|=0;return r.colors[Math.abs(_)%r.colors.length]}o(e,"selectColor"),r.selectColor=e;function r(p){let _,h=null,g,y;function T(...P){if(!T.enabled)return;let x=T,N=Number(new Date),F=N-(_||N);x.diff=F,x.prev=_,x.curr=N,_=N,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let X=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(G,Y)=>{if(G==="%%")return"%";X++;let ee=r.formatters[Y];if(typeof ee=="function"){let K=P[X];G=ee.call(x,K),P.splice(X,1),X--}return G}),r.formatArgs.call(x,P),(x.log||r.log).apply(x,P)}return o(T,"debug"),T.namespace=p,T.useColors=r.useColors(),T.color=r.selectColor(p),T.extend=n,T.destroy=r.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:o(()=>h!==null?h:(g!==r.namespaces&&(g=r.namespaces,y=r.enabled(p)),y),"get"),set:o(P=>{h=P},"set")}),typeof r.init=="function"&&r.init(T),T}o(r,"createDebug");function n(p,_){let h=r(this.namespace+(typeof _>"u"?":":_)+p);return h.log=this.log,h}o(n,"extend");function i(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let _=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let h of _)h[0]==="-"?r.skips.push(h.slice(1)):r.names.push(h)}o(i,"enable");function s(p,_){let h=0,g=0,y=-1,T=0;for(;h<p.length;)if(g<_.length&&(_[g]===p[h]||_[g]==="*"))_[g]==="*"?(y=g,T=h,g++):(h++,g++);else if(y!==-1)g=y+1,T++,h=T;else return!1;for(;g<_.length&&_[g]==="*";)g++;return g===_.length}o(s,"matchesTemplate");function c(){let p=[...r.names,...r.skips.map(_=>"-"+_)].join(",");return r.enable(""),p}o(c,"disable");function d(p){for(let _ of r.skips)if(s(p,_))return!1;for(let _ of r.names)if(s(p,_))return!0;return!1}o(d,"enabled");function l(p){return p instanceof Error?p.stack||p.message:p}o(l,"coerce");function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(f,"destroy"),r.enable(r.load()),r}o(h0,"setup");Tb.exports=h0});var xb=k((Ot,tu)=>{Ot.formatArgs=y0;Ot.save=_0;Ot.load=v0;Ot.useColors=g0;Ot.storage=b0();Ot.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ot.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function g0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(g0,"useColors");function y0(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+tu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}o(y0,"formatArgs");Ot.log=console.debug||console.log||(()=>{});function _0(t){try{t?Ot.storage.setItem("debug",t):Ot.storage.removeItem("debug")}catch{}}o(_0,"save");function v0(){let t;try{t=Ot.storage.getItem("debug")||Ot.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(v0,"load");function b0(){try{return localStorage}catch{}}o(b0,"localstorage");tu.exports=bd()(Ot);var{formatters:P0}=tu.exports;P0.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var wb=k((b5,Ab)=>{"use strict";Ab.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Ob=k((P5,Rb)=>{"use strict";var S0=require("os"),Ib=require("tty"),tr=wb(),{env:vt}=process,zn;tr("no-color")||tr("no-colors")||tr("color=false")||tr("color=never")?zn=0:(tr("color")||tr("colors")||tr("color=true")||tr("color=always"))&&(zn=1);"FORCE_COLOR"in vt&&(vt.FORCE_COLOR==="true"?zn=1:vt.FORCE_COLOR==="false"?zn=0:zn=vt.FORCE_COLOR.length===0?1:Math.min(parseInt(vt.FORCE_COLOR,10),3));function Pd(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(Pd,"translateLevel");function Sd(t,e){if(zn===0)return 0;if(tr("color=16m")||tr("color=full")||tr("color=truecolor"))return 3;if(tr("color=256"))return 2;if(t&&!e&&zn===void 0)return 0;let r=zn||0;if(vt.TERM==="dumb")return r;if(process.platform==="win32"){let n=S0.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in vt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in vt)||vt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in vt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(vt.TEAMCITY_VERSION)?1:0;if(vt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in vt){let n=parseInt((vt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(vt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(vt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(vt.TERM)||"COLORTERM"in vt?1:r}o(Sd,"supportsColor");function E0(t){let e=Sd(t,t&&t.isTTY);return Pd(e)}o(E0,"getSupportLevel");Rb.exports={supportsColor:E0,stdout:Pd(Sd(!0,Ib.isatty(1))),stderr:Pd(Sd(!0,Ib.isatty(2)))}});var $b=k((bt,nu)=>{var T0=require("tty"),ru=require("util");bt.init=C0;bt.log=I0;bt.formatArgs=A0;bt.save=R0;bt.load=O0;bt.useColors=x0;bt.destroy=ru.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");bt.colors=[6,2,3,4,5,1];try{let t=Ob();t&&(t.stderr||t).level>=2&&(bt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}bt.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function x0(){return"colors"in bt.inspectOpts?!!bt.inspectOpts.colors:T0.isatty(process.stderr.fd)}o(x0,"useColors");function A0(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
1
+ "use strict";var yD=Object.create;var is=Object.defineProperty;var _D=Object.getOwnPropertyDescriptor;var vD=Object.getOwnPropertyNames;var bD=Object.getPrototypeOf,SD=Object.prototype.hasOwnProperty;var a=(t,e)=>is(t,"name",{value:e,configurable:!0});var Tt=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(o){throw n=[o],o}};var N=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},nr=(t,e)=>{for(var n in e)is(t,n,{get:e[n],enumerable:!0})},gx=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of vD(e))!SD.call(t,r)&&r!==n&&is(t,r,{get:()=>e[r],enumerable:!(o=_D(e,r))||o.enumerable});return t};var St=(t,e,n)=>(n=t!=null?yD(bD(t)):{},gx(e||!t||!t.__esModule?is(n,"default",{value:t,enumerable:!0}):n,t)),ED=t=>gx(is({},"__esModule",{value:!0}),t);var RT=N((IT,vp)=>{(function(t){"use strict";let e="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp(`^${e}\\.${e}\\.${e}\\.${e}$`,"i"),threeOctet:new RegExp(`^${e}\\.${e}\\.${e}$`,"i"),twoOctet:new RegExp(`^${e}\\.${e}$`,"i"),longValue:new RegExp(`^${e}$`,"i")},o=new RegExp("^0[0-7]+$","i"),r=new RegExp("^0x[a-f0-9]+$","i"),i="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(i,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${i})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${e}\\.${e}\\.${e}\\.${e}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${e}\\.${e}\\.${e}\\.${e}(${i})?$`,"i")};function l(h,_){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let E=0,P=-1,x=(h.match(u.zoneIndex)||[])[0],z,M;for(x&&(x=x.substring(1),h=h.replace(/%.+$/,""));(P=h.indexOf(":",P+1))>=0;)E++;if(h.substr(0,2)==="::"&&E--,h.substr(-2,2)==="::"&&E--,E>_)return null;for(M=_-E,z=":";M--;)z+="0:";return h=h.replace("::",z),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),_=(function(){let K=h.split(":"),Z=[];for(let J=0;J<K.length;J++)Z.push(parseInt(K[J],16));return Z})(),{parts:_,zoneId:x}}a(l,"expandIPv6");function p(h,_,E,P){if(h.length!==_.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let x=0,z;for(;P>0;){if(z=E-P,z<0&&(z=0),h[x]>>z!==_[x]>>z)return!1;P-=E,x+=1}return!0}a(p,"matchCIDR");function f(h){if(r.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(o.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}a(f,"parseIntAuto");function y(h,_){for(;h.length<_;)h=`0${h}`;return h}a(y,"padPart");let m={};m.IPv4=(function(){function h(_){if(_.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let E,P;for(E=0;E<_.length;E++)if(P=_[E],!(0<=P&&P<=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(_,E){let P;if(E===void 0&&(P=_,_=P[0],E=P[1]),_.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,_.octets,8,E)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,E=!1,P={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},x,z,M;for(x=3;x>=0;x-=1)if(z=this.octets[x],z in P){if(M=P[z],E&&M!==0)return null;M!==8&&(E=!0),_+=M}else return null;return 32-_},h.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return m.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h})(),m.IPv4.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),E=_[0].toByteArray(),P=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),x=[],z=0;for(;z<4;)x.push(parseInt(E[z],10)|parseInt(P[z],10)^255),z++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.isIPv4=function(h){return this.parser(h)!==null},m.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},m.IPv4.isValidCIDR=function(h){try{return this.parseCIDR(h),!0}catch{return!1}},m.IPv4.isValidFourPartDecimal=function(h){return!!(m.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},m.IPv4.isValidCIDRFourPartDecimal=function(h){let _=h.match(/^(.+)\/(\d+)$/);return!m.IPv4.isValidCIDR(h)||!_?!1:m.IPv4.isValidFourPartDecimal(_[1])},m.IPv4.networkAddressFromCIDR=function(h){let _,E,P,x,z;try{for(_=this.parseCIDR(h),P=_[0].toByteArray(),z=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),x=[],E=0;E<4;)x.push(parseInt(P[E],10)&parseInt(z[E],10)),E++;return new this(x)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.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(_)},m.IPv4.parseCIDR=function(h){let _;if(_=h.match(/^(.+)\/(\d+)$/)){let E=parseInt(_[2]);if(E>=0&&E<=32){let P=[this.parse(_[1]),E];return Object.defineProperty(P,"toString",{value:a(function(){return this.join("/")},"value")}),P}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},m.IPv4.parser=function(h){let _,E,P;if(_=h.match(n.fourOctet))return(function(){let x=_.slice(1,6),z=[];for(let M=0;M<x.length;M++)E=x[M],z.push(f(E));return z})();if(_=h.match(n.longValue)){if(P=f(_[1]),P>4294967295||P<0)throw new Error("ipaddr: address outside defined range");return(function(){let x=[],z;for(z=0;z<=24;z+=8)x.push(P>>z&255);return x})().reverse()}else return(_=h.match(n.twoOctet))?(function(){let x=_.slice(1,4),z=[];if(P=f(x[1]),P>16777215||P<0)throw new Error("ipaddr: address outside defined range");return z.push(f(x[0])),z.push(P>>16&255),z.push(P>>8&255),z.push(P&255),z})():(_=h.match(n.threeOctet))?(function(){let x=_.slice(1,5),z=[];if(P=f(x[2]),P>65535||P<0)throw new Error("ipaddr: address outside defined range");return z.push(f(x[0])),z.push(f(x[1])),z.push(P>>8&255),z.push(P&255),z})():null},m.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],E=0,P=Math.floor(h/8);for(;E<P;)_[E]=255,E++;return P<4&&(_[P]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},m.IPv6=(function(){function h(_,E){let P,x;if(_.length===16)for(this.parts=[],P=0;P<=14;P+=2)this.parts.push(_[P]<<8|_[P+1]);else if(_.length===8)this.parts=_;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(P=0;P<this.parts.length;P++)if(x=this.parts[P],!(0<=x&&x<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");E&&(this.zoneId=E)}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(_,E){let P;if(E===void 0&&(P=_,_=P[0],E=P[1]),_.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,_.parts,16,E)},h.prototype.prefixLengthFromSubnetMask=function(){let _=0,E=!1,P={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},x,z;for(let M=7;M>=0;M-=1)if(x=this.parts[M],x in P){if(z=P[x],E&&z!==0)return null;z!==16&&(E=!0),_+=z}else return null;return 128-_},h.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let _,E=[],P=this.parts;for(let x=0;x<P.length;x++)_=P[x],E.push(_>>8),E.push(_&255);return E},h.prototype.toFixedLengthString=function(){let _=(function(){let P=[];for(let x=0;x<this.parts.length;x++)P.push(y(this.parts[x].toString(16),4));return P}).call(this).join(":"),E="";return this.zoneId&&(E=`%${this.zoneId}`),_+E},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),E=_[0],P=_[1];return new m.IPv4([E>>8,E&255,P>>8,P&255])},h.prototype.toNormalizedString=function(){let _=(function(){let P=[];for(let x=0;x<this.parts.length;x++)P.push(this.parts[x].toString(16));return P}).call(this).join(":"),E="";return this.zoneId&&(E=`%${this.zoneId}`),_+E},h.prototype.toRFC5952String=function(){let _=/((^|:)(0(:|$)){2,})/g,E=this.toNormalizedString(),P=0,x=-1,z;for(;z=_.exec(E);)z[0].length>x&&(P=z.index,x=z[0].length);return x<0?E:`${E.substring(0,P)}::${E.substring(P+x)}`},h.prototype.toString=function(){return this.toRFC5952String()},h})(),m.IPv6.broadcastAddressFromCIDR=function(h){try{let _=this.parseCIDR(h),E=_[0].toByteArray(),P=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),x=[],z=0;for(;z<16;)x.push(parseInt(E[z],10)|parseInt(P[z],10)^255),z++;return new this(x)}catch(_){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${_})`)}},m.IPv6.isIPv6=function(h){return this.parser(h)!==null},m.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}},m.IPv6.isValidCIDR=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{return this.parseCIDR(h),!0}catch{return!1}},m.IPv6.networkAddressFromCIDR=function(h){let _,E,P,x,z;try{for(_=this.parseCIDR(h),P=_[0].toByteArray(),z=this.subnetMaskFromPrefixLength(_[1]).toByteArray(),x=[],E=0;E<16;)x.push(parseInt(P[E],10)&parseInt(z[E],10)),E++;return new this(x)}catch(M){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${M})`)}},m.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)},m.IPv6.parseCIDR=function(h){let _,E,P;if((E=h.match(/^(.+)\/(\d+)$/))&&(_=parseInt(E[2]),_>=0&&_<=128))return P=[this.parse(E[1]),_],Object.defineProperty(P,"toString",{value:a(function(){return this.join("/")},"value")}),P;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},m.IPv6.parser=function(h){let _,E,P,x,z,M;if(P=h.match(u.deprecatedTransitional))return this.parser(`::ffff:${P[1]}`);if(u.native.test(h))return l(h,8);if((P=h.match(u.transitional))&&(M=P[6]||"",_=P[1],P[1].endsWith("::")||(_=_.slice(0,-1)),_=l(_+M,6),_.parts)){for(z=[parseInt(P[2]),parseInt(P[3]),parseInt(P[4]),parseInt(P[5])],E=0;E<z.length;E++)if(x=z[E],!(0<=x&&x<=255))return null;return _.parts.push(z[0]<<8|z[1]),_.parts.push(z[2]<<8|z[3]),{parts:_.parts,zoneId:_.zoneId}}return null},m.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],E=0,P=Math.floor(h/8);for(;E<P;)_[E]=255,E++;return P<16&&(_[P]=Math.pow(2,h%8)-1<<8-h%8),new this(_)},m.fromByteArray=function(h){let _=h.length;if(_===4)return new m.IPv4(h);if(_===16)return new m.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},m.isValid=function(h){return m.IPv6.isValid(h)||m.IPv4.isValid(h)},m.isValidCIDR=function(h){return m.IPv6.isValidCIDR(h)||m.IPv4.isValidCIDR(h)},m.parse=function(h){if(m.IPv6.isValid(h))return m.IPv6.parse(h);if(m.IPv4.isValid(h))return m.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},m.parseCIDR=function(h){try{return m.IPv6.parseCIDR(h)}catch{try{return m.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},m.process=function(h){let _=this.parse(h);return _.kind()==="ipv6"&&_.isIPv4MappedAddress()?_.toIPv4Address():_},m.subnetMatch=function(h,_,E){let P,x,z,M;E==null&&(E="unicast");for(x in _)if(Object.prototype.hasOwnProperty.call(_,x)){for(z=_[x],z[0]&&!(z[0]instanceof Array)&&(z=[z]),P=0;P<z.length;P++)if(M=z[P],h.kind()===M[0].kind()&&h.match.apply(h,M))return x}return E},typeof vp<"u"&&vp.exports?vp.exports=m:t.ipaddr=m})(IT)});var Qw=N((vee,Yw)=>{var Xw=require("stream").Stream,fL=require("util");Yw.exports=Fr;function Fr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(Fr,"DelayedStream");fL.inherits(Fr,Xw);Fr.create=function(t,e){var n=new this;e=e||{};for(var o in e)n[o]=e[o];n.source=t;var r=t.emit;return t.emit=function(){return n._handleEmit(arguments),r.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(Fr.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});Fr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Fr.prototype.resume=function(){this._released||this.release(),this.source.resume()};Fr.prototype.pause=function(){this.source.pause()};Fr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Fr.prototype.pipe=function(){var t=Xw.prototype.pipe.apply(this,arguments);return this.resume(),t};Fr.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Fr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var nI=N((See,rI)=>{var mL=require("util"),tI=require("stream").Stream,eI=Qw();rI.exports=pt;function pt(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}a(pt,"CombinedStream");mL.inherits(pt,tI);pt.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};pt.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};pt.prototype.append=function(t){var e=pt.isStreamLike(t);if(e){if(!(t instanceof eI)){var n=eI.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};pt.prototype.pipe=function(t,e){return tI.prototype.pipe.call(this,t,e),this.resume(),t};pt.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};pt.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var o=pt.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};pt.prototype._pipeNext=function(t){this._currentStream=t;var e=pt.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};pt.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};pt.prototype.write=function(t){this.emit("data",t)};pt.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};pt.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};pt.prototype.end=function(){this._reset(),this.emit("end")};pt.prototype.destroy=function(){this._reset(),this.emit("close")};pt.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};pt.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};pt.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};pt.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var iI=N((Pee,oI)=>{"use strict";oI.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var cI=N(Jt=>{"use strict";var af=iI(),hL=require("path").extname,aI=/^\s*([^;\s]*)(?:;|\s|$)/,gL=/^text\//i;Jt.charset=sI;Jt.charsets={lookup:sI};Jt.contentType=yL;Jt.extension=_L;Jt.extensions=Object.create(null);Jt.lookup=vL;Jt.types=Object.create(null);bL(Jt.extensions,Jt.types);function sI(t){if(!t||typeof t!="string")return!1;var e=aI.exec(t),n=e&&af[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&gL.test(e[1])?"UTF-8":!1}a(sI,"charset");function yL(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Jt.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=Jt.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}a(yL,"contentType");function _L(t){if(!t||typeof t!="string")return!1;var e=aI.exec(t),n=e&&Jt.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(_L,"extension");function vL(t){if(!t||typeof t!="string")return!1;var e=hL("x."+t).toLowerCase().substr(1);return e&&Jt.types[e]||!1}a(vL,"lookup");function bL(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(af).forEach(a(function(r){var i=af[r],s=i.extensions;if(!(!s||!s.length)){t[r]=s;for(var u=0;u<s.length;u++){var l=s[u];if(e[l]){var p=n.indexOf(af[e[l]].source),f=n.indexOf(i.source);if(e[l]!=="application/octet-stream"&&(p>f||p===f&&e[l].substr(0,12)==="application/"))continue}e[l]=r}}},"forEachMimeType"))}a(bL,"populateMaps")});var lI=N((Aee,uI)=>{uI.exports=SL;function SL(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}a(SL,"defer")});var Zv=N((Iee,pI)=>{var dI=lI();pI.exports=EL;function EL(t){var e=!1;return dI(function(){e=!0}),a(function(o,r){e?t(o,r):dI(a(function(){t(o,r)},"nextTick_callback"))},"async_callback")}a(EL,"async")});var Hv=N((Oee,fI)=>{fI.exports=PL;function PL(t){Object.keys(t.jobs).forEach(xL.bind(t)),t.jobs={}}a(PL,"abort");function xL(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}a(xL,"clean")});var Gv=N(($ee,hI)=>{var mI=Zv(),TL=Hv();hI.exports=AL;function AL(t,e,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=wL(e,r,t[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?TL(n):n.results[r]=s,o(i,n.results))})}a(AL,"iterate");function wL(t,e,n,o){var r;return t.length==2?r=t(n,mI(o)):r=t(n,e,mI(o)),r}a(wL,"runJob")});var Wv=N((Nee,gI)=>{gI.exports=IL;function IL(t,e){var n=!Array.isArray(t),o={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&o.keyedList.sort(n?e:function(r,i){return e(t[r],t[i])}),o}a(IL,"state")});var Jv=N((Dee,yI)=>{var RL=Hv(),OL=Zv();yI.exports=CL;function CL(t){Object.keys(this.jobs).length&&(this.index=this.size,RL(this),OL(t)(null,this.results))}a(CL,"terminator")});var vI=N((Mee,_I)=>{var $L=Gv(),kL=Wv(),NL=Jv();_I.exports=zL;function zL(t,e,n){for(var o=kL(t);o.index<(o.keyedList||t).length;)$L(t,e,o,function(r,i){if(r){n(r,i);return}if(Object.keys(o.jobs).length===0){n(null,o.results);return}}),o.index++;return NL.bind(o,n)}a(zL,"parallel")});var Kv=N((Lee,sf)=>{var bI=Gv(),DL=Wv(),UL=Jv();sf.exports=ML;sf.exports.ascending=SI;sf.exports.descending=jL;function ML(t,e,n,o){var r=DL(t,n);return bI(t,e,r,a(function i(s,u){if(s){o(s,u);return}if(r.index++,r.index<(r.keyedList||t).length){bI(t,e,r,i);return}o(null,r.results)},"iteratorHandler")),UL.bind(r,o)}a(ML,"serialOrdered");function SI(t,e){return t<e?-1:t>e?1:0}a(SI,"ascending");function jL(t,e){return-1*SI(t,e)}a(jL,"descending")});var PI=N((Bee,EI)=>{var LL=Kv();EI.exports=FL;function FL(t,e,n){return LL(t,e,null,n)}a(FL,"serial")});var TI=N((Vee,xI)=>{xI.exports={parallel:vI(),serial:PI(),serialOrdered:Kv()}});var Xv=N((Zee,AI)=>{"use strict";AI.exports=Object});var II=N((Hee,wI)=>{"use strict";wI.exports=Error});var OI=N((Gee,RI)=>{"use strict";RI.exports=EvalError});var $I=N((Wee,CI)=>{"use strict";CI.exports=RangeError});var NI=N((Jee,kI)=>{"use strict";kI.exports=ReferenceError});var DI=N((Kee,zI)=>{"use strict";zI.exports=SyntaxError});var go=N((Xee,UI)=>{"use strict";UI.exports=TypeError});var jI=N((Yee,MI)=>{"use strict";MI.exports=URIError});var FI=N((Qee,LI)=>{"use strict";LI.exports=Math.abs});var qI=N((ete,BI)=>{"use strict";BI.exports=Math.floor});var ZI=N((tte,VI)=>{"use strict";VI.exports=Math.max});var GI=N((rte,HI)=>{"use strict";HI.exports=Math.min});var JI=N((nte,WI)=>{"use strict";WI.exports=Math.pow});var XI=N((ote,KI)=>{"use strict";KI.exports=Math.round});var QI=N((ite,YI)=>{"use strict";YI.exports=Number.isNaN||a(function(e){return e!==e},"isNaN")});var tR=N((ste,eR)=>{"use strict";var BL=QI();eR.exports=a(function(e){return BL(e)||e===0?e:e<0?-1:1},"sign")});var nR=N((ute,rR)=>{"use strict";rR.exports=Object.getOwnPropertyDescriptor});var Yv=N((lte,oR)=>{"use strict";var cf=nR();if(cf)try{cf([],"length")}catch{cf=null}oR.exports=cf});var aR=N((dte,iR)=>{"use strict";var uf=Object.defineProperty||!1;if(uf)try{uf({},"a",{value:1})}catch{uf=!1}iR.exports=uf});var Qv=N((pte,sR)=>{"use strict";sR.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var r=42;e[n]=r;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,n);if(u.value!==r||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var lR=N((mte,uR)=>{"use strict";var cR=typeof Symbol<"u"&&Symbol,qL=Qv();uR.exports=a(function(){return typeof cR!="function"||typeof Symbol!="function"||typeof cR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qL()},"hasNativeSymbols")});var eb=N((gte,dR)=>{"use strict";dR.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var tb=N((yte,pR)=>{"use strict";var VL=Xv();pR.exports=VL.getPrototypeOf||null});var hR=N((_te,mR)=>{"use strict";var ZL="Function.prototype.bind called on incompatible ",HL=Object.prototype.toString,GL=Math.max,WL="[object Function]",fR=a(function(e,n){for(var o=[],r=0;r<e.length;r+=1)o[r]=e[r];for(var i=0;i<n.length;i+=1)o[i+e.length]=n[i];return o},"concatty"),JL=a(function(e,n){for(var o=[],r=n||0,i=0;r<e.length;r+=1,i+=1)o[i]=e[r];return o},"slicy"),KL=a(function(t,e){for(var n="",o=0;o<t.length;o+=1)n+=t[o],o+1<t.length&&(n+=e);return n},"joiny");mR.exports=a(function(e){var n=this;if(typeof n!="function"||HL.apply(n)!==WL)throw new TypeError(ZL+n);for(var o=JL(arguments,1),r,i=a(function(){if(this instanceof r){var f=n.apply(this,fR(o,arguments));return Object(f)===f?f:this}return n.apply(e,fR(o,arguments))},"binder"),s=GL(0,n.length-o.length),u=[],l=0;l<s;l++)u[l]="$"+l;if(r=Function("binder","return function ("+KL(u,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var p=a(function(){},"Empty");p.prototype=n.prototype,r.prototype=new p,p.prototype=null}return r},"bind")});var ya=N((bte,gR)=>{"use strict";var XL=hR();gR.exports=Function.prototype.bind||XL});var lf=N((Ste,yR)=>{"use strict";yR.exports=Function.prototype.call});var rb=N((Ete,_R)=>{"use strict";_R.exports=Function.prototype.apply});var bR=N((Pte,vR)=>{"use strict";vR.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ER=N((xte,SR)=>{"use strict";var YL=ya(),QL=rb(),eF=lf(),tF=bR();SR.exports=tF||YL.call(eF,QL)});var nb=N((Tte,PR)=>{"use strict";var rF=ya(),nF=go(),oF=lf(),iF=ER();PR.exports=a(function(e){if(e.length<1||typeof e[0]!="function")throw new nF("a function is required");return iF(rF,oF,e)},"callBindBasic")});var RR=N((wte,IR)=>{"use strict";var aF=nb(),xR=Yv(),AR;try{AR=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var ob=!!AR&&xR&&xR(Object.prototype,"__proto__"),wR=Object,TR=wR.getPrototypeOf;IR.exports=ob&&typeof ob.get=="function"?aF([ob.get]):typeof TR=="function"?a(function(e){return TR(e==null?e:wR(e))},"getDunder"):!1});var NR=N((Rte,kR)=>{"use strict";var OR=eb(),CR=tb(),$R=RR();kR.exports=OR?a(function(e){return OR(e)},"getProto"):CR?a(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return CR(e)},"getProto"):$R?a(function(e){return $R(e)},"getProto"):null});var ib=N((Cte,zR)=>{"use strict";var sF=Function.prototype.call,cF=Object.prototype.hasOwnProperty,uF=ya();zR.exports=uF.call(sF,cF)});var eu=N(($te,FR)=>{"use strict";var Me,lF=Xv(),dF=II(),pF=OI(),fF=$I(),mF=NI(),Sa=DI(),ba=go(),hF=jI(),gF=FI(),yF=qI(),_F=ZI(),vF=GI(),bF=JI(),SF=XI(),EF=tR(),jR=Function,ab=a(function(t){try{return jR('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),Xc=Yv(),PF=aR(),sb=a(function(){throw new ba},"throwTypeError"),xF=Xc?(function(){try{return arguments.callee,sb}catch{try{return Xc(arguments,"callee").get}catch{return sb}}})():sb,_a=lR()(),Rt=NR(),TF=tb(),AF=eb(),LR=rb(),Yc=lf(),va={},wF=typeof Uint8Array>"u"||!Rt?Me:Rt(Uint8Array),ii={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Me:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Me:ArrayBuffer,"%ArrayIteratorPrototype%":_a&&Rt?Rt([][Symbol.iterator]()):Me,"%AsyncFromSyncIteratorPrototype%":Me,"%AsyncFunction%":va,"%AsyncGenerator%":va,"%AsyncGeneratorFunction%":va,"%AsyncIteratorPrototype%":va,"%Atomics%":typeof Atomics>"u"?Me:Atomics,"%BigInt%":typeof BigInt>"u"?Me:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Me:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":dF,"%eval%":eval,"%EvalError%":pF,"%Float16Array%":typeof Float16Array>"u"?Me:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Me:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Me:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Me:FinalizationRegistry,"%Function%":jR,"%GeneratorFunction%":va,"%Int8Array%":typeof Int8Array>"u"?Me:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Me:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_a&&Rt?Rt(Rt([][Symbol.iterator]())):Me,"%JSON%":typeof JSON=="object"?JSON:Me,"%Map%":typeof Map>"u"?Me:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_a||!Rt?Me:Rt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":lF,"%Object.getOwnPropertyDescriptor%":Xc,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Me:Promise,"%Proxy%":typeof Proxy>"u"?Me:Proxy,"%RangeError%":fF,"%ReferenceError%":mF,"%Reflect%":typeof Reflect>"u"?Me:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Me:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_a||!Rt?Me:Rt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_a&&Rt?Rt(""[Symbol.iterator]()):Me,"%Symbol%":_a?Symbol:Me,"%SyntaxError%":Sa,"%ThrowTypeError%":xF,"%TypedArray%":wF,"%TypeError%":ba,"%Uint8Array%":typeof Uint8Array>"u"?Me:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Me:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Me:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Me:Uint32Array,"%URIError%":hF,"%WeakMap%":typeof WeakMap>"u"?Me:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Me:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Me:WeakSet,"%Function.prototype.call%":Yc,"%Function.prototype.apply%":LR,"%Object.defineProperty%":PF,"%Object.getPrototypeOf%":TF,"%Math.abs%":gF,"%Math.floor%":yF,"%Math.max%":_F,"%Math.min%":vF,"%Math.pow%":bF,"%Math.round%":SF,"%Math.sign%":EF,"%Reflect.getPrototypeOf%":AF};if(Rt)try{null.error}catch(t){DR=Rt(Rt(t)),ii["%Error.prototype%"]=DR}var DR,IF=a(function t(e){var n;if(e==="%AsyncFunction%")n=ab("async function () {}");else if(e==="%GeneratorFunction%")n=ab("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=ab("async function* () {}");else if(e==="%AsyncGenerator%"){var o=t("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(e==="%AsyncIteratorPrototype%"){var r=t("%AsyncGenerator%");r&&Rt&&(n=Rt(r.prototype))}return ii[e]=n,n},"doEval"),UR={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qc=ya(),df=ib(),RF=Qc.call(Yc,Array.prototype.concat),OF=Qc.call(LR,Array.prototype.splice),MR=Qc.call(Yc,String.prototype.replace),pf=Qc.call(Yc,String.prototype.slice),CF=Qc.call(Yc,RegExp.prototype.exec),$F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,kF=/\\(\\)?/g,NF=a(function(e){var n=pf(e,0,1),o=pf(e,-1);if(n==="%"&&o!=="%")throw new Sa("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new Sa("invalid intrinsic syntax, expected opening `%`");var r=[];return MR(e,$F,function(i,s,u,l){r[r.length]=u?MR(l,kF,"$1"):s||i}),r},"stringToPath"),zF=a(function(e,n){var o=e,r;if(df(UR,o)&&(r=UR[o],o="%"+r[0]+"%"),df(ii,o)){var i=ii[o];if(i===va&&(i=IF(o)),typeof i>"u"&&!n)throw new ba("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new Sa("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");FR.exports=a(function(e,n){if(typeof e!="string"||e.length===0)throw new ba("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new ba('"allowMissing" argument must be a boolean');if(CF(/^%?[^%]*%?$/,e)===null)throw new Sa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=NF(e),r=o.length>0?o[0]:"",i=zF("%"+r+"%",n),s=i.name,u=i.value,l=!1,p=i.alias;p&&(r=p[0],OF(o,RF([0,1],p)));for(var f=1,y=!0;f<o.length;f+=1){var m=o[f],h=pf(m,0,1),_=pf(m,-1);if((h==='"'||h==="'"||h==="`"||_==='"'||_==="'"||_==="`")&&h!==_)throw new Sa("property names with quotes must have matching quotes");if((m==="constructor"||!y)&&(l=!0),r+="."+m,s="%"+r+"%",df(ii,s))u=ii[s];else if(u!=null){if(!(m in u)){if(!n)throw new ba("base intrinsic for "+e+" exists, but the property is not available.");return}if(Xc&&f+1>=o.length){var E=Xc(u,m);y=!!E,y&&"get"in E&&!("originalValue"in E.get)?u=E.get:u=u[m]}else y=df(u,m),u=u[m];y&&!l&&(ii[s]=u)}}return u},"GetIntrinsic")});var qR=N((Nte,BR)=>{"use strict";var DF=Qv();BR.exports=a(function(){return DF()&&!!Symbol.toStringTag},"hasToStringTagShams")});var HR=N((Dte,ZR)=>{"use strict";var UF=eu(),VR=UF("%Object.defineProperty%",!0),MF=qR()(),jF=ib(),LF=go(),ff=MF?Symbol.toStringTag:null;ZR.exports=a(function(e,n){var o=arguments.length>2&&!!arguments[2]&&arguments[2].force,r=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof o<"u"&&typeof o!="boolean"||typeof r<"u"&&typeof r!="boolean")throw new LF("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ff&&(o||!jF(e,ff))&&(VR?VR(e,ff,{configurable:!r,enumerable:!1,value:n,writable:!1}):e[ff]=n)},"setToStringTag")});var WR=N((Mte,GR)=>{"use strict";var FF=Function.prototype.call,BF=Object.prototype.hasOwnProperty,qF=ya();GR.exports=qF.call(FF,BF)});var KR=N((jte,JR)=>{"use strict";JR.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var QR=N((Lte,YR)=>{"use strict";var db=nI(),VF=require("util"),cb=require("path"),ZF=require("http"),HF=require("https"),GF=require("url").parse,WF=require("fs"),JF=require("stream").Stream,KF=require("crypto"),ub=cI(),XF=TI(),YF=HR(),yo=WR(),lb=KR();function XR(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(XR,"escapeHeaderParam");function Ve(t){if(!(this instanceof Ve))return new Ve(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],db.call(this),t=t||{};for(var e in t)this[e]=t[e]}a(Ve,"FormData");VF.inherits(Ve,db);Ve.LINE_BREAK=`\r
2
+ `;Ve.DEFAULT_CONTENT_TYPE="application/octet-stream";Ve.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=db.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,n),i=this._multiPartFooter();o(r),o(e),o(i),this._trackLength(r,e,n)};Ve.prototype._trackLength=function(t,e,n){var o=0;n.knownLength!=null?o+=Number(n.knownLength):Buffer.isBuffer(e)?o=e.length:typeof e=="string"&&(o=Buffer.byteLength(e)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(t)+Ve.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&yo(e,"httpVersion"))&&!(e instanceof JF))&&(n.knownLength||this._valuesToMeasure.push(e))};Ve.prototype._lengthRetriever=function(t,e){yo(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):WF.stat(t.path,function(n,o){if(n){e(n);return}var r=o.size-(t.start?t.start:0);e(null,r)}):yo(t,"httpVersion")?e(null,Number(t.headers["content-length"])):yo(t,"httpModule")?(t.on("response",function(n){t.pause(),e(null,Number(n.headers["content-length"]))}),t.resume()):e("Unknown stream")};Ve.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var o=this._getContentDisposition(e,n),r=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+XR(t)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&lb(s,n.header);var u;for(var l in s)if(yo(s,l)){if(u=s[l],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=l+": "+u.join("; ")+Ve.LINE_BREAK)}return"--"+this.getBoundary()+Ve.LINE_BREAK+i+Ve.LINE_BREAK};Ve.prototype._getContentDisposition=function(t,e){var n;if(typeof e.filepath=="string"?n=cb.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?n=cb.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&yo(t,"httpVersion")&&(n=cb.basename(t.client._httpMessage.path||"")),n)return'filename="'+XR(n)+'"'};Ve.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t&&t.name&&(n=ub.lookup(t.name)),!n&&t&&t.path&&(n=ub.lookup(t.path)),!n&&t&&t.readable&&yo(t,"httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=ub.lookup(e.filepath||e.filename)),!n&&t&&typeof t=="object"&&(n=Ve.DEFAULT_CONTENT_TYPE),n};Ve.prototype._multiPartFooter=function(){return function(t){var e=Ve.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ve.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ve.LINE_BREAK};Ve.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)yo(t,e)&&(n[e.toLowerCase()]=t[e]);return n};Ve.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Ve.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ve.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,o=this._streams.length;n<o;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Ve.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ve.prototype._generateBoundary=function(){this._boundary="--------------------------"+KF.randomBytes(12).toString("hex")};Ve.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Ve.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Ve.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}XF.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){t(n);return}o.forEach(function(r){e+=r}),t(null,e)})};Ve.prototype.submit=function(t,e){var n,o,r={method:"post"};return typeof t=="string"?(t=GF(t),o=lb({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(o=lb(t,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(t.headers),o.protocol==="https:"?n=HF.request(o):n=ZF.request(o),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var u,l=a(function(p,f){return n.removeListener("error",l),n.removeListener("response",u),e.call(this,p,f)},"callback");u=l.bind(this,null),n.on("error",l),n.on("response",u)}}.bind(this)),n};Ve.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Ve.prototype.toString=function(){return"[object FormData]"};YF(Ve.prototype,"FormData");YR.exports=Ve});var ru=N((Dre,yO)=>{"use strict";var hf=Object.prototype.hasOwnProperty,gO=Object.prototype.toString,lO=Object.defineProperty,dO=Object.getOwnPropertyDescriptor,pO=a(function(e){return typeof Array.isArray=="function"?Array.isArray(e):gO.call(e)==="[object Array]"},"isArray"),fO=a(function(e){if(!e||gO.call(e)!=="[object Object]")return!1;var n=hf.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&hf.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;var r;for(r in e);return typeof r>"u"||hf.call(e,r)},"isPlainObject"),mO=a(function(e,n){lO&&n.name==="__proto__"?lO(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},"setProperty"),hO=a(function(e,n){if(n==="__proto__")if(hf.call(e,n)){if(dO)return dO(e,n).value}else return;return e[n]},"getProperty");yO.exports=a(function t(){var e,n,o,r,i,s,u=arguments[0],l=1,p=arguments.length,f=!1;for(typeof u=="boolean"&&(f=u,u=arguments[1]||{},l=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});l<p;++l)if(e=arguments[l],e!=null)for(n in e)o=hO(u,n),r=hO(e,n),u!==r&&(f&&r&&(fO(r)||(i=pO(r)))?(i?(i=!1,s=o&&pO(o)?o:[]):s=o&&fO(o)?o:{},mO(u,{name:n,newValue:t(f,s,r)})):typeof r<"u"&&mO(u,{name:n,newValue:r}));return u},"extend")});var _O=N((Mre,mB)=>{mB.exports={name:"gaxios",version:"7.1.3",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.0.0",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"^5.8.3",webpack:"^5.35.0","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2",rimraf:"^5.0.1"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var bO=N((jre,vO)=>{"use strict";var hB=_O();vO.exports={pkg:hB}});var mb=N(Tr=>{"use strict";var EO=Tr&&Tr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.GaxiosError=Tr.GAXIOS_ERROR_SYMBOL=void 0;Tr.defaultErrorRedactor=PO;var SO=EO(ru()),gB=EO(bO()),pb=gB.default.pkg;Tr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${pb.name}-gaxios-error`);var fb=class t extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Tr.GAXIOS_ERROR_SYMBOL]=pb.version;static[Symbol.hasInstance](e){return e&&typeof e=="object"&&Tr.GAXIOS_ERROR_SYMBOL in e&&e[Tr.GAXIOS_ERROR_SYMBOL]===pb.version?!0:Function.prototype[Symbol.hasInstance].call(t,e)}constructor(e,n,o,r){if(super(e,{cause:r}),this.config=n,this.response=o,this.error=r instanceof Error?r:void 0,this.config=(0,SO.default)(!0,{},n),this.response&&(this.response.config=(0,SO.default)(!0,{},this.response.config)),this.response){try{this.response.data=yB(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}r instanceof DOMException?this.code=r.name:r&&typeof r=="object"&&"code"in r&&(typeof r.code=="string"||typeof r.code=="number")&&(this.code=r.code)}static extractAPIErrorFromResponse(e,n="The request failed"){let o=n;if(typeof e.data=="string"&&(o=e.data),e.data&&typeof e.data=="object"&&"error"in e.data&&e.data.error&&!e.ok){if(typeof e.data.error=="string")return{message:e.data.error,code:e.status,status:e.statusText};if(typeof e.data.error=="object"){o="message"in e.data.error&&typeof e.data.error.message=="string"?e.data.error.message:o;let r="status"in e.data.error&&typeof e.data.error.status=="string"?e.data.error.status:e.statusText,i="code"in e.data.error&&typeof e.data.error.code=="number"?e.data.error.code:e.status;if("errors"in e.data.error&&Array.isArray(e.data.error.errors)){let s=[];for(let u of e.data.error.errors)typeof u=="object"&&"message"in u&&typeof u.message=="string"&&s.push(u.message);return Object.assign({message:s.join(`
3
+ `)||o,code:i,status:r},e.data.error)}return Object.assign({message:o,code:i,status:r},e.data.error)}}return{message:o,code:e.status,status:e.statusText}}};Tr.GaxiosError=fb;function yB(t,e){switch(t){case"stream":return e;case"json":return JSON.parse(JSON.stringify(e));case"arraybuffer":return JSON.parse(Buffer.from(e).toString("utf8"));case"blob":return JSON.parse(e.text());default:return e}}a(yB,"translateData");function PO(t){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function n(i){i&&i.forEach((s,u)=>{(/^authentication$/i.test(u)||/^authorization$/i.test(u)||/secret/i.test(u))&&i.set(u,e)})}a(n,"redactHeaders");function o(i,s){if(typeof i=="object"&&i!==null&&typeof i[s]=="string"){let u=i[s];(/grant_type=/i.test(u)||/assertion=/i.test(u)||/secret/i.test(u))&&(i[s]=e)}}a(o,"redactString");function r(i){!i||typeof i!="object"||(i instanceof FormData||i instanceof URLSearchParams||"forEach"in i&&"set"in i?i.forEach((s,u)=>{(["grant_type","assertion"].includes(u)||/secret/.test(u))&&i.set(u,e)}):("grant_type"in i&&(i.grant_type=e),"assertion"in i&&(i.assertion=e),"client_secret"in i&&(i.client_secret=e)))}return a(r,"redactObject"),t.config&&(n(t.config.headers),o(t.config,"data"),r(t.config.data),o(t.config,"body"),r(t.config.body),t.config.url.searchParams.has("token")&&t.config.url.searchParams.set("token",e),t.config.url.searchParams.has("client_secret")&&t.config.url.searchParams.set("client_secret",e)),t.response&&(PO({config:t.response.config}),n(t.response.headers),t.response.bodyUsed&&(o(t.response,"data"),r(t.response.data))),t}a(PO,"defaultErrorRedactor")});var TO=N(hb=>{"use strict";Object.defineProperty(hb,"__esModule",{value:!0});hb.getRetryConfig=_B;async function _B(t){let e=xO(t);if(!t||!t.config||!e&&!t.config.retry)return{shouldRetry:!1};e=e||{},e.currentRetryAttempt=e.currentRetryAttempt||0,e.retry=e.retry===void 0||e.retry===null?3:e.retry,e.httpMethodsToRetry=e.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],e.noResponseRetries=e.noResponseRetries===void 0||e.noResponseRetries===null?2:e.noResponseRetries,e.retryDelayMultiplier=e.retryDelayMultiplier?e.retryDelayMultiplier:2,e.timeOfFirstRequest=e.timeOfFirstRequest?e.timeOfFirstRequest:Date.now(),e.totalTimeout=e.totalTimeout?e.totalTimeout:Number.MAX_SAFE_INTEGER,e.maxRetryDelay=e.maxRetryDelay?e.maxRetryDelay:Number.MAX_SAFE_INTEGER;let n=[[100,199],[408,408],[429,429],[500,599]];if(e.statusCodesToRetry=e.statusCodesToRetry||n,t.config.retryConfig=e,!await(e.shouldRetry||vB)(t))return{shouldRetry:!1,config:t.config};let r=bB(e);t.config.retryConfig.currentRetryAttempt+=1;let i=e.retryBackoff?e.retryBackoff(t,r):new Promise(s=>{setTimeout(s,r)});return e.onRetryAttempt&&await e.onRetryAttempt(t),await i,{shouldRetry:!0,config:t.config}}a(_B,"getRetryConfig");function vB(t){let e=xO(t);if(t.config.signal?.aborted&&t.code!=="TimeoutError"||t.code==="AbortError"||!e||e.retry===0||!t.response&&(e.currentRetryAttempt||0)>=e.noResponseRetries||!e.httpMethodsToRetry||!e.httpMethodsToRetry.includes(t.config.method?.toUpperCase()||"GET"))return!1;if(t.response&&t.response.status){let n=!1;for(let[o,r]of e.statusCodesToRetry){let i=t.response.status;if(i>=o&&i<=r){n=!0;break}}if(!n)return!1}return e.currentRetryAttempt=e.currentRetryAttempt||0,!(e.currentRetryAttempt>=e.retry)}a(vB,"shouldRetryRequest");function xO(t){if(t&&t.config&&t.config.retryConfig)return t.config.retryConfig}a(xO,"getConfig");function bB(t){let n=(t.currentRetryAttempt?0:t.retryDelay??100)+(Math.pow(t.retryDelayMultiplier,t.currentRetryAttempt)-1)/2*1e3,o=t.totalTimeout-(Date.now()-t.timeOfFirstRequest);return Math.min(n,o,t.maxRetryDelay)}a(bB,"getNextRetryDelay")});var yb=N(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.GaxiosInterceptorManager=void 0;var gb=class extends Set{static{a(this,"GaxiosInterceptorManager")}};gf.GaxiosInterceptorManager=gb});var wO=N((Hre,AO)=>{var Ea=1e3,Pa=Ea*60,xa=Pa*60,ai=xa*24,SB=ai*7,EB=ai*365.25;AO.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return PB(t);if(n==="number"&&isFinite(t))return e.long?TB(t):xB(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function PB(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*EB;case"weeks":case"week":case"w":return n*SB;case"days":case"day":case"d":return n*ai;case"hours":case"hour":case"hrs":case"hr":case"h":return n*xa;case"minutes":case"minute":case"mins":case"min":case"m":return n*Pa;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ea;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(PB,"parse");function xB(t){var e=Math.abs(t);return e>=ai?Math.round(t/ai)+"d":e>=xa?Math.round(t/xa)+"h":e>=Pa?Math.round(t/Pa)+"m":e>=Ea?Math.round(t/Ea)+"s":t+"ms"}a(xB,"fmtShort");function TB(t){var e=Math.abs(t);return e>=ai?yf(t,e,ai,"day"):e>=xa?yf(t,e,xa,"hour"):e>=Pa?yf(t,e,Pa,"minute"):e>=Ea?yf(t,e,Ea,"second"):t+" ms"}a(TB,"fmtLong");function yf(t,e,n,o){var r=e>=n*1.5;return Math.round(t/n)+" "+o+(r?"s":"")}a(yf,"plural")});var _b=N((Wre,IO)=>{function AB(t){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=r,n.enabled=u,n.humanize=wO(),n.destroy=p,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let y=0;for(let m=0;m<f.length;m++)y=(y<<5)-y+f.charCodeAt(m),y|=0;return n.colors[Math.abs(y)%n.colors.length]}a(e,"selectColor"),n.selectColor=e;function n(f){let y,m=null,h,_;function E(...P){if(!E.enabled)return;let x=E,z=Number(new Date),M=z-(y||z);x.diff=M,x.prev=y,x.curr=z,y=z,P[0]=n.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let K=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(J,ee)=>{if(J==="%%")return"%";K++;let ae=n.formatters[ee];if(typeof ae=="function"){let Y=P[K];J=ae.call(x,Y),P.splice(K,1),K--}return J}),n.formatArgs.call(x,P),(x.log||n.log).apply(x,P)}return a(E,"debug"),E.namespace=f,E.useColors=n.useColors(),E.color=n.selectColor(f),E.extend=o,E.destroy=n.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,_=n.enabled(f)),_),"get"),set:a(P=>{m=P},"set")}),typeof n.init=="function"&&n.init(E),E}a(n,"createDebug");function o(f,y){let m=n(this.namespace+(typeof y>"u"?":":y)+f);return m.log=this.log,m}a(o,"extend");function r(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let y=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of y)m[0]==="-"?n.skips.push(m.slice(1)):n.names.push(m)}a(r,"enable");function i(f,y){let m=0,h=0,_=-1,E=0;for(;m<f.length;)if(h<y.length&&(y[h]===f[m]||y[h]==="*"))y[h]==="*"?(_=h,E=m,h++):(m++,h++);else if(_!==-1)h=_+1,E++,m=E;else return!1;for(;h<y.length&&y[h]==="*";)h++;return h===y.length}a(i,"matchesTemplate");function s(){let f=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),f}a(s,"disable");function u(f){for(let y of n.skips)if(i(f,y))return!1;for(let y of n.names)if(i(f,y))return!0;return!1}a(u,"enabled");function l(f){return f instanceof Error?f.stack||f.message:f}a(l,"coerce");function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(p,"destroy"),n.enable(n.load()),n}a(AB,"setup");IO.exports=AB});var RO=N((Kt,_f)=>{Kt.formatArgs=IB;Kt.save=RB;Kt.load=OB;Kt.useColors=wB;Kt.storage=CB();Kt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Kt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function wB(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(wB,"useColors");function IB(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+_f.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(n++,r==="%c"&&(o=n))}),t.splice(o,0,e)}a(IB,"formatArgs");Kt.log=console.debug||console.log||(()=>{});function RB(t){try{t?Kt.storage.setItem("debug",t):Kt.storage.removeItem("debug")}catch{}}a(RB,"save");function OB(){let t;try{t=Kt.storage.getItem("debug")||Kt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}a(OB,"load");function CB(){try{return localStorage}catch{}}a(CB,"localstorage");_f.exports=_b()(Kt);var{formatters:$B}=_f.exports;$B.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var CO=N((Xre,OO)=>{"use strict";OO.exports=(t,e=process.argv)=>{let n=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(n+t),r=e.indexOf("--");return o!==-1&&(r===-1||o<r)}});var NO=N((Yre,kO)=>{"use strict";var kB=require("os"),$O=require("tty"),Ar=CO(),{env:Ot}=process,vo;Ar("no-color")||Ar("no-colors")||Ar("color=false")||Ar("color=never")?vo=0:(Ar("color")||Ar("colors")||Ar("color=true")||Ar("color=always"))&&(vo=1);"FORCE_COLOR"in Ot&&(Ot.FORCE_COLOR==="true"?vo=1:Ot.FORCE_COLOR==="false"?vo=0:vo=Ot.FORCE_COLOR.length===0?1:Math.min(parseInt(Ot.FORCE_COLOR,10),3));function vb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}a(vb,"translateLevel");function bb(t,e){if(vo===0)return 0;if(Ar("color=16m")||Ar("color=full")||Ar("color=truecolor"))return 3;if(Ar("color=256"))return 2;if(t&&!e&&vo===void 0)return 0;let n=vo||0;if(Ot.TERM==="dumb")return n;if(process.platform==="win32"){let o=kB.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Ot)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Ot)||Ot.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ot)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ot.TEAMCITY_VERSION)?1:0;if(Ot.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ot){let o=parseInt((Ot.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ot.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ot.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ot.TERM)||"COLORTERM"in Ot?1:n}a(bb,"supportsColor");function NB(t){let e=bb(t,t&&t.isTTY);return vb(e)}a(NB,"getSupportLevel");kO.exports={supportsColor:NB,stdout:vb(bb(!0,$O.isatty(1))),stderr:vb(bb(!0,$O.isatty(2)))}});var DO=N((Ct,bf)=>{var zB=require("tty"),vf=require("util");Ct.init=BB;Ct.log=jB;Ct.formatArgs=UB;Ct.save=LB;Ct.load=FB;Ct.useColors=DB;Ct.destroy=vf.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ct.colors=[6,2,3,4,5,1];try{let t=NO();t&&(t.stderr||t).level>=2&&(Ct.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ct.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),o=process.env[e];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),t[n]=o,t},{});function DB(){return"colors"in Ct.inspectOpts?!!Ct.inspectOpts.colors:zB.isatty(process.stderr.fd)}a(DB,"useColors");function UB(t){let{namespace:e,useColors:n}=this;if(n){let o=this.color,r="\x1B[3"+(o<8?o:"8;5;"+o),i=` ${r};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
4
4
  `).join(`
5
- `+s),t.push(i+"m+"+nu.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=w0()+e+" "+t[0]}o(A0,"formatArgs");function w0(){return bt.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(w0,"getDate");function I0(...t){return process.stderr.write(ru.formatWithOptions(bt.inspectOpts,...t)+`
6
- `)}o(I0,"log");function R0(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(R0,"save");function O0(){return process.env.DEBUG}o(O0,"load");function C0(t){t.inspectOpts={};let e=Object.keys(bt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=bt.inspectOpts[e[r]]}o(C0,"init");nu.exports=bd()(bt);var{formatters:Cb}=nu.exports;Cb.o=function(t){return this.inspectOpts.colors=this.useColors,ru.inspect(t,this.inspectOpts).split(`
7
- `).map(e=>e.trim()).join(" ")};Cb.O=function(t){return this.inspectOpts.colors=this.useColors,ru.inspect(t,this.inspectOpts)}});var Td=k((T5,Ed)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ed.exports=xb():Ed.exports=$b()});var zb=k(Ct=>{"use strict";var $0=Ct&&Ct.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),k0=Ct&&Ct.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kb=Ct&&Ct.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$0(e,t,r);return k0(e,t),e};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.req=Ct.json=Ct.toBuffer=void 0;var N0=kb(require("http")),z0=kb(require("https"));async function Nb(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(Nb,"toBuffer");Ct.toBuffer=Nb;async function D0(t){let r=(await Nb(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(D0,"json");Ct.json=D0;function U0(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?z0:N0).request(t,e),i=new Promise((s,c)=>{n.once("response",s).once("error",c).end()});return n.then=i.then.bind(i),n}o(U0,"req");Ct.req=U0});var jb=k(jt=>{"use strict";var Ub=jt&&jt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),M0=jt&&jt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mb=jt&&jt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ub(e,t,r);return M0(e,t),e},j0=jt&&jt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ub(e,t,r)};Object.defineProperty(jt,"__esModule",{value:!0});jt.Agent=void 0;var L0=Mb(require("net")),Db=Mb(require("http")),F0=require("https");j0(zb(),jt);var Ir=Symbol("AgentBaseInternalState"),xd=class extends Db.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Ir]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
8
- `).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new L0.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?F0.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),c=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(d=>{if(this.decrementSockets(s,c),d instanceof Db.Agent)try{return d.addRequest(e,i)}catch(l){return n(l)}this[Ir].currentSocket=d,super.createSocket(e,r,n)},d=>{this.decrementSockets(s,c),n(d)})}createConnection(){let e=this[Ir].currentSocket;if(this[Ir].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ir].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ir]&&(this[Ir].defaultPort=e)}get protocol(){return this[Ir].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ir]&&(this[Ir].protocol=e)}};jt.Agent=xd});var Lb=k(Ko=>{"use strict";var B0=Ko&&Ko.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0});Ko.parseProxyResponse=void 0;var q0=B0(Td()),ou=(0,q0.default)("https-proxy-agent:parse-proxy-response");function V0(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let p=t.read();p?f(p):t.once("readable",s)}o(s,"read");function c(){t.removeListener("end",d),t.removeListener("error",l),t.removeListener("readable",s)}o(c,"cleanup");function d(){c(),ou("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(d,"onend");function l(p){c(),ou("onerror %o",p),r(p)}o(l,"onerror");function f(p){i.push(p),n+=p.length;let _=Buffer.concat(i,n),h=_.indexOf(`\r
5
+ `+i),t.push(r+"m+"+bf.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=MB()+e+" "+t[0]}a(UB,"formatArgs");function MB(){return Ct.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(MB,"getDate");function jB(...t){return process.stderr.write(vf.formatWithOptions(Ct.inspectOpts,...t)+`
6
+ `)}a(jB,"log");function LB(t){t?process.env.DEBUG=t:delete process.env.DEBUG}a(LB,"save");function FB(){return process.env.DEBUG}a(FB,"load");function BB(t){t.inspectOpts={};let e=Object.keys(Ct.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ct.inspectOpts[e[n]]}a(BB,"init");bf.exports=_b()(Ct);var{formatters:zO}=bf.exports;zO.o=function(t){return this.inspectOpts.colors=this.useColors,vf.inspect(t,this.inspectOpts).split(`
7
+ `).map(e=>e.trim()).join(" ")};zO.O=function(t){return this.inspectOpts.colors=this.useColors,vf.inspect(t,this.inspectOpts)}});var Eb=N((tne,Sb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Sb.exports=RO():Sb.exports=DO()});var jO=N(Xt=>{"use strict";var qB=Xt&&Xt.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),VB=Xt&&Xt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),UO=Xt&&Xt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&qB(e,t,n);return VB(e,t),e};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.req=Xt.json=Xt.toBuffer=void 0;var ZB=UO(require("http")),HB=UO(require("https"));async function MO(t){let e=0,n=[];for await(let o of t)e+=o.length,n.push(o);return Buffer.concat(n,e)}a(MO,"toBuffer");Xt.toBuffer=MO;async function GB(t){let n=(await MO(t)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(GB,"json");Xt.json=GB;function WB(t,e={}){let o=((typeof t=="string"?t:t.href).startsWith("https:")?HB:ZB).request(t,e),r=new Promise((i,s)=>{o.once("response",i).once("error",s).end()});return o.then=r.then.bind(r),o}a(WB,"req");Xt.req=WB});var qO=N(cr=>{"use strict";var FO=cr&&cr.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),JB=cr&&cr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),BO=cr&&cr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&FO(e,t,n);return JB(e,t),e},KB=cr&&cr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&FO(e,t,n)};Object.defineProperty(cr,"__esModule",{value:!0});cr.Agent=void 0;var XB=BO(require("net")),LO=BO(require("http")),YB=require("https");KB(jO(),cr);var tn=Symbol("AgentBaseInternalState"),Pb=class extends LO.Agent{static{a(this,"Agent")}constructor(e){super(e),this[tn]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
8
+ `).some(o=>o.indexOf("(https.js:")!==-1||o.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let n=new XB.Socket({writable:!1});return this.sockets[e].push(n),this.totalSocketCount++,n}decrementSockets(e,n){if(!this.sockets[e]||n===null)return;let o=this.sockets[e],r=o.indexOf(n);r!==-1&&(o.splice(r,1),this.totalSocketCount--,o.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?YB.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,n,o){let r={...n,secureEndpoint:this.isSecureEndpoint(n)},i=this.getName(r),s=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(u=>{if(this.decrementSockets(i,s),u instanceof LO.Agent)try{return u.addRequest(e,r)}catch(l){return o(l)}this[tn].currentSocket=u,super.createSocket(e,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let e=this[tn].currentSocket;if(this[tn].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[tn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[tn]&&(this[tn].defaultPort=e)}get protocol(){return this[tn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[tn]&&(this[tn].protocol=e)}};cr.Agent=Pb});var VO=N(Ta=>{"use strict";var QB=Ta&&Ta.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.parseProxyResponse=void 0;var e4=QB(Eb()),Sf=(0,e4.default)("https-proxy-agent:parse-proxy-response");function t4(t){return new Promise((e,n)=>{let o=0,r=[];function i(){let f=t.read();f?p(f):t.once("readable",i)}a(i,"read");function s(){t.removeListener("end",u),t.removeListener("error",l),t.removeListener("readable",i)}a(s,"cleanup");function u(){s(),Sf("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function l(f){s(),Sf("onerror %o",f),n(f)}a(l,"onerror");function p(f){r.push(f),o+=f.length;let y=Buffer.concat(r,o),m=y.indexOf(`\r
9
9
  \r
10
- `);if(h===-1){ou("have not received end of HTTP headers yet..."),s();return}let g=_.slice(0,h).toString("ascii").split(`\r
11
- `),y=g.shift();if(!y)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let T=y.split(" "),P=+T[1],x=T.slice(2).join(" "),N={};for(let F of g){if(!F)continue;let X=F.indexOf(":");if(X===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${F}"`));let Z=F.slice(0,X).toLowerCase(),G=F.slice(X+1).trimStart(),Y=N[Z];typeof Y=="string"?N[Z]=[Y,G]:Array.isArray(Y)?Y.push(G):N[Z]=G}ou("got proxy server response: %o %o",y,N),c(),e({connect:{statusCode:P,statusText:x,headers:N},buffered:_})}o(f,"ondata"),t.on("error",l),t.on("end",d),s()})}o(V0,"parseProxyResponse");Ko.parseProxyResponse=V0});var Gb=k(rr=>{"use strict";var H0=rr&&rr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),G0=rr&&rr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Vb=rr&&rr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&H0(e,t,r);return G0(e,t),e},Hb=rr&&rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rr,"__esModule",{value:!0});rr.HttpsProxyAgent=void 0;var iu=Vb(require("net")),Fb=Vb(require("tls")),W0=Hb(require("assert")),Z0=Hb(Td()),K0=jb(),J0=require("url"),Y0=Lb(),na=(0,Z0.default)("https-proxy-agent"),Bb=o(t=>t.servername===void 0&&t.host&&!iu.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),au=class extends K0.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new J0.URL(e):e,this.proxyHeaders=r?.headers??{},na("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?qb(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(na("Creating `tls.Socket`: %o",this.connectOpts),i=Fb.connect(Bb(this.connectOpts))):(na("Creating `net.Socket`: %o",this.connectOpts),i=iu.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},c=iu.isIPv6(r.host)?`[${r.host}]`:r.host,d=`CONNECT ${c}:${r.port} HTTP/1.1\r
12
- `;if(n.username||n.password){let h=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(h).toString("base64")}`}s.Host=`${c}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let h of Object.keys(s))d+=`${h}: ${s[h]}\r
13
- `;let l=(0,Y0.parseProxyResponse)(i);i.write(`${d}\r
14
- `);let{connect:f,buffered:p}=await l;if(e.emit("proxyConnect",f),this.emit("proxyConnect",f,e),f.statusCode===200)return e.once("socket",X0),r.secureEndpoint?(na("Upgrading socket connection to TLS"),Fb.connect({...qb(Bb(r),"host","path","port"),socket:i})):i;i.destroy();let _=new iu.Socket({writable:!1});return _.readable=!0,e.once("socket",h=>{na("Replaying proxy buffer for failed request"),(0,W0.default)(h.listenerCount("data")>0),h.push(p),h.push(null)}),_}};au.protocols=["http","https"];rr.HttpsProxyAgent=au;function X0(t){t.resume()}o(X0,"resume");function qb(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(qb,"omit")});function Q0(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),n="",i=!1,s=r[0]||"text/plain",c=s;for(let p=1;p<r.length;p++)r[p]==="base64"?i=!0:r[p]&&(c+=`;${r[p]}`,r[p].indexOf("charset=")===0&&(n=r[p].substring(8)));!r[0]&&!n.length&&(c+=";charset=US-ASCII",n="US-ASCII");let d=i?"base64":"ascii",l=unescape(t.substring(e+1)),f=Buffer.from(l,d);return f.type=s,f.typeFull=c,f.charset=n,f}var Wb,Zb=gt(()=>{o(Q0,"dataUriToBuffer");Wb=Q0});var Jb=k((su,Kb)=>{(function(t,e){typeof su=="object"&&typeof Kb<"u"?e(su):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(su,(function(t){"use strict";function e(){}o(e,"noop");function r(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(r,"typeIsObject");let n=e;function i(a,u){try{Object.defineProperty(a,"name",{value:u,configurable:!0})}catch{}}o(i,"setFunctionName");let s=Promise,c=Promise.prototype.then,d=Promise.reject.bind(s);function l(a){return new s(a)}o(l,"newPromise");function f(a){return l(u=>u(a))}o(f,"promiseResolvedWith");function p(a){return d(a)}o(p,"promiseRejectedWith");function _(a,u,m){return c.call(a,u,m)}o(_,"PerformPromiseThen");function h(a,u,m){_(_(a,u,m),void 0,n)}o(h,"uponPromise");function g(a,u){h(a,u)}o(g,"uponFulfillment");function y(a,u){h(a,void 0,u)}o(y,"uponRejection");function T(a,u,m){return _(a,u,m)}o(T,"transformPromiseWith");function P(a){_(a,void 0,n)}o(P,"setPromiseIsHandledToTrue");let x=o(a=>{if(typeof queueMicrotask=="function")x=queueMicrotask;else{let u=f(void 0);x=o(m=>_(u,m),"_queueMicrotask")}return x(a)},"_queueMicrotask");function N(a,u,m){if(typeof a!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(a,u,m)}o(N,"reflectCall");function F(a,u,m){try{return f(N(a,u,m))}catch(S){return p(S)}}o(F,"promiseCall");let X=16384;class Z{static{o(this,"SimpleQueue")}constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(u){let m=this._back,S=m;m._elements.length===X-1&&(S={_elements:[],_next:void 0}),m._elements.push(u),S!==m&&(this._back=S,m._next=S),++this._size}shift(){let u=this._front,m=u,S=this._cursor,w=S+1,M=u._elements,B=M[S];return w===X&&(m=u._next,w=0),--this._size,this._cursor=w,u!==m&&(this._front=m),M[S]=void 0,B}forEach(u){let m=this._cursor,S=this._front,w=S._elements;for(;(m!==w.length||S._next!==void 0)&&!(m===w.length&&(S=S._next,w=S._elements,m=0,w.length===0));)u(w[m]),++m}peek(){let u=this._front,m=this._cursor;return u._elements[m]}}let G=Symbol("[[AbortSteps]]"),Y=Symbol("[[ErrorSteps]]"),ee=Symbol("[[CancelSteps]]"),K=Symbol("[[PullSteps]]"),Oe=Symbol("[[ReleaseSteps]]");function te(a,u){a._ownerReadableStream=u,u._reader=a,u._state==="readable"?W(a):u._state==="closed"?oe(a):re(a,u._storedError)}o(te,"ReadableStreamReaderGenericInitialize");function V(a,u){let m=a._ownerReadableStream;return lr(m,u)}o(V,"ReadableStreamReaderGenericCancel");function q(a){let u=a._ownerReadableStream;u._state==="readable"?Ie(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ce(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._readableStreamController[Oe](),u._reader=void 0,a._ownerReadableStream=void 0}o(q,"ReadableStreamReaderGenericRelease");function J(a){return new TypeError("Cannot "+a+" a stream using a released reader")}o(J,"readerLockException");function W(a){a._closedPromise=l((u,m)=>{a._closedPromise_resolve=u,a._closedPromise_reject=m})}o(W,"defaultReaderClosedPromiseInitialize");function re(a,u){W(a),Ie(a,u)}o(re,"defaultReaderClosedPromiseInitializeAsRejected");function oe(a){W(a),Be(a)}o(oe,"defaultReaderClosedPromiseInitializeAsResolved");function Ie(a,u){a._closedPromise_reject!==void 0&&(P(a._closedPromise),a._closedPromise_reject(u),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(Ie,"defaultReaderClosedPromiseReject");function Ce(a,u){re(a,u)}o(Ce,"defaultReaderClosedPromiseResetToRejected");function Be(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(Be,"defaultReaderClosedPromiseResolve");let Ge=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ht=Math.trunc||function(a){return a<0?Math.ceil(a):Math.floor(a)};function Q(a){return typeof a=="object"||typeof a=="function"}o(Q,"isDictionary");function rt(a,u){if(a!==void 0&&!Q(a))throw new TypeError(`${u} is not an object.`)}o(rt,"assertDictionary");function it(a,u){if(typeof a!="function")throw new TypeError(`${u} is not a function.`)}o(it,"assertFunction");function Nt(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(Nt,"isObject");function Fe(a,u){if(!Nt(a))throw new TypeError(`${u} is not an object.`)}o(Fe,"assertObject");function qe(a,u,m){if(a===void 0)throw new TypeError(`Parameter ${u} is required in '${m}'.`)}o(qe,"assertRequiredArgument");function b(a,u,m){if(a===void 0)throw new TypeError(`${u} is required in '${m}'.`)}o(b,"assertRequiredField");function E(a){return Number(a)}o(E,"convertUnrestrictedDouble");function A(a){return a===0?0:a}o(A,"censorNegativeZero");function D(a){return A(ht(a))}o(D,"integerPart");function R(a,u){let S=Number.MAX_SAFE_INTEGER,w=Number(a);if(w=A(w),!Ge(w))throw new TypeError(`${u} is not a finite number`);if(w=D(w),w<0||w>S)throw new TypeError(`${u} is outside the accepted range of 0 to ${S}, inclusive`);return!Ge(w)||w===0?0:w}o(R,"convertUnsignedLongLongWithEnforceRange");function $(a,u){if(!gn(a))throw new TypeError(`${u} is not a ReadableStream.`)}o($,"assertReadableStream");function j(a){return new H(a)}o(j,"AcquireReadableStreamDefaultReader");function I(a,u){a._reader._readRequests.push(u)}o(I,"ReadableStreamAddReadRequest");function C(a,u,m){let w=a._reader._readRequests.shift();m?w._closeSteps():w._chunkSteps(u)}o(C,"ReadableStreamFulfillReadRequest");function U(a){return a._reader._readRequests.length}o(U,"ReadableStreamGetNumReadRequests");function z(a){let u=a._reader;return!(u===void 0||!ie(u))}o(z,"ReadableStreamHasDefaultReader");class H{static{o(this,"ReadableStreamDefaultReader")}constructor(u){if(qe(u,1,"ReadableStreamDefaultReader"),$(u,"First parameter"),yn(u))throw new TypeError("This stream has already been locked for exclusive reading by another reader");te(this,u),this._readRequests=new Z}get closed(){return ie(this)?this._closedPromise:p(Ye("closed"))}cancel(u=void 0){return ie(this)?this._ownerReadableStream===void 0?p(J("cancel")):V(this,u):p(Ye("cancel"))}read(){if(!ie(this))return p(Ye("read"));if(this._ownerReadableStream===void 0)return p(J("read from"));let u,m,S=l((M,B)=>{u=M,m=B});return ue(this,{_chunkSteps:o(M=>u({value:M,done:!1}),"_chunkSteps"),_closeSteps:o(()=>u({value:void 0,done:!0}),"_closeSteps"),_errorSteps:o(M=>m(M),"_errorSteps")}),S}releaseLock(){if(!ie(this))throw Ye("releaseLock");this._ownerReadableStream!==void 0&&Ue(this)}}Object.defineProperties(H.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(H.prototype.cancel,"cancel"),i(H.prototype.read,"read"),i(H.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ie(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readRequests")?!1:a instanceof H}o(ie,"IsReadableStreamDefaultReader");function ue(a,u){let m=a._ownerReadableStream;m._disturbed=!0,m._state==="closed"?u._closeSteps():m._state==="errored"?u._errorSteps(m._storedError):m._readableStreamController[K](u)}o(ue,"ReadableStreamDefaultReaderRead");function Ue(a){q(a);let u=new TypeError("Reader was released");Je(a,u)}o(Ue,"ReadableStreamDefaultReaderRelease");function Je(a,u){let m=a._readRequests;a._readRequests=new Z,m.forEach(S=>{S._errorSteps(u)})}o(Je,"ReadableStreamDefaultReaderErrorReadRequests");function Ye(a){return new TypeError(`ReadableStreamDefaultReader.prototype.${a} can only be used on a ReadableStreamDefaultReader`)}o(Ye,"defaultReaderBrandCheckException");let De=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Le{static{o(this,"ReadableStreamAsyncIteratorImpl")}constructor(u,m){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=u,this._preventCancel=m}next(){let u=o(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?T(this._ongoingPromise,u,u):u(),this._ongoingPromise}return(u){let m=o(()=>this._returnSteps(u),"returnSteps");return this._ongoingPromise?T(this._ongoingPromise,m,m):m()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let u=this._reader,m,S,w=l((B,ne)=>{m=B,S=ne});return ue(u,{_chunkSteps:o(B=>{this._ongoingPromise=void 0,x(()=>m({value:B,done:!1}))},"_chunkSteps"),_closeSteps:o(()=>{this._ongoingPromise=void 0,this._isFinished=!0,q(u),m({value:void 0,done:!0})},"_closeSteps"),_errorSteps:o(B=>{this._ongoingPromise=void 0,this._isFinished=!0,q(u),S(B)},"_errorSteps")}),w}_returnSteps(u){if(this._isFinished)return Promise.resolve({value:u,done:!0});this._isFinished=!0;let m=this._reader;if(!this._preventCancel){let S=V(m,u);return q(m),T(S,()=>({value:u,done:!0}))}return q(m),f({value:u,done:!0})}}let dt={next(){return _o(this)?this._asyncIteratorImpl.next():p(vo("next"))},return(a){return _o(this)?this._asyncIteratorImpl.return(a):p(vo("return"))}};Object.setPrototypeOf(dt,De);function yo(a,u){let m=j(a),S=new Le(m,u),w=Object.create(dt);return w._asyncIteratorImpl=S,w}o(yo,"AcquireReadableStreamAsyncIterator");function _o(a){if(!r(a)||!Object.prototype.hasOwnProperty.call(a,"_asyncIteratorImpl"))return!1;try{return a._asyncIteratorImpl instanceof Le}catch{return!1}}o(_o,"IsReadableStreamAsyncIterator");function vo(a){return new TypeError(`ReadableStreamAsyncIterator.${a} can only be used on a ReadableSteamAsyncIterator`)}o(vo,"streamAsyncIteratorBrandCheckException");let zt=Number.isNaN||function(a){return a!==a};var qr,St,pt;function Ve(a){return a.slice()}o(Ve,"CreateArrayFromList");function ym(a,u,m,S,w){new Uint8Array(a).set(new Uint8Array(m,S,w),u)}o(ym,"CopyDataBlockBytes");let Vr=o(a=>(typeof a.transfer=="function"?Vr=o(u=>u.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?Vr=o(u=>structuredClone(u,{transfer:[u]}),"TransferArrayBuffer"):Vr=o(u=>u,"TransferArrayBuffer"),Vr(a)),"TransferArrayBuffer"),pn=o(a=>(typeof a.detached=="boolean"?pn=o(u=>u.detached,"IsDetachedBuffer"):pn=o(u=>u.byteLength===0,"IsDetachedBuffer"),pn(a)),"IsDetachedBuffer");function _m(a,u,m){if(a.slice)return a.slice(u,m);let S=m-u,w=new ArrayBuffer(S);return ym(w,0,a,u,S),w}o(_m,"ArrayBufferSlice");function Va(a,u){let m=a[u];if(m!=null){if(typeof m!="function")throw new TypeError(`${String(u)} is not a function`);return m}}o(Va,"GetMethod");function $x(a){let u={[Symbol.iterator]:()=>a.iterator},m=(async function*(){return yield*u})(),S=m.next;return{iterator:m,nextMethod:S,done:!1}}o($x,"CreateAsyncFromSyncIterator");let kc=(pt=(qr=Symbol.asyncIterator)!==null&&qr!==void 0?qr:(St=Symbol.for)===null||St===void 0?void 0:St.call(Symbol,"Symbol.asyncIterator"))!==null&&pt!==void 0?pt:"@@asyncIterator";function vm(a,u="sync",m){if(m===void 0)if(u==="async"){if(m=Va(a,kc),m===void 0){let M=Va(a,Symbol.iterator),B=vm(a,"sync",M);return $x(B)}}else m=Va(a,Symbol.iterator);if(m===void 0)throw new TypeError("The object is not iterable");let S=N(m,a,[]);if(!r(S))throw new TypeError("The iterator method must return an object");let w=S.next;return{iterator:S,nextMethod:w,done:!1}}o(vm,"GetIterator");function kx(a){let u=N(a.nextMethod,a.iterator,[]);if(!r(u))throw new TypeError("The iterator.next() method must return an object");return u}o(kx,"IteratorNext");function Nx(a){return!!a.done}o(Nx,"IteratorComplete");function zx(a){return a.value}o(zx,"IteratorValue");function Dx(a){return!(typeof a!="number"||zt(a)||a<0)}o(Dx,"IsNonNegativeNumber");function bm(a){let u=_m(a.buffer,a.byteOffset,a.byteOffset+a.byteLength);return new Uint8Array(u)}o(bm,"CloneAsUint8Array");function Nc(a){let u=a._queue.shift();return a._queueTotalSize-=u.size,a._queueTotalSize<0&&(a._queueTotalSize=0),u.value}o(Nc,"DequeueValue");function zc(a,u,m){if(!Dx(m)||m===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");a._queue.push({value:u,size:m}),a._queueTotalSize+=m}o(zc,"EnqueueValueWithSize");function Ux(a){return a._queue.peek().value}o(Ux,"PeekQueueValue");function fn(a){a._queue=new Z,a._queueTotalSize=0}o(fn,"ResetQueue");function Pm(a){return a===DataView}o(Pm,"isDataViewConstructor");function Mx(a){return Pm(a.constructor)}o(Mx,"isDataView");function jx(a){return Pm(a)?1:a.BYTES_PER_ELEMENT}o(jx,"arrayBufferViewElementSize");class Hn{static{o(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Dc(this))throw Fc("view");return this._view}respond(u){if(!Dc(this))throw Fc("respond");if(qe(u,1,"respond"),u=R(u,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(pn(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Za(this._associatedReadableByteStreamController,u)}respondWithNewView(u){if(!Dc(this))throw Fc("respondWithNewView");if(qe(u,1,"respondWithNewView"),!ArrayBuffer.isView(u))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(pn(u.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Ka(this._associatedReadableByteStreamController,u)}}Object.defineProperties(Hn.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(Hn.prototype.respond,"respond"),i(Hn.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Hn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Hr{static{o(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Gn(this))throw Si("byobRequest");return Lc(this)}get desiredSize(){if(!Gn(this))throw Si("desiredSize");return Cm(this)}close(){if(!Gn(this))throw Si("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let u=this._controlledReadableByteStream._state;if(u!=="readable")throw new TypeError(`The stream (in ${u} state) is not in the readable state and cannot be closed`);Pi(this)}enqueue(u){if(!Gn(this))throw Si("enqueue");if(qe(u,1,"enqueue"),!ArrayBuffer.isView(u))throw new TypeError("chunk must be an array buffer view");if(u.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(u.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let m=this._controlledReadableByteStream._state;if(m!=="readable")throw new TypeError(`The stream (in ${m} state) is not in the readable state and cannot be enqueued to`);Wa(this,u)}error(u=void 0){if(!Gn(this))throw Si("error");Yt(this,u)}[ee](u){Sm(this),fn(this);let m=this._cancelAlgorithm(u);return Ga(this),m}[K](u){let m=this._controlledReadableByteStream;if(this._queueTotalSize>0){Om(this,u);return}let S=this._autoAllocateChunkSize;if(S!==void 0){let w;try{w=new ArrayBuffer(S)}catch(B){u._errorSteps(B);return}let M={buffer:w,bufferByteLength:S,byteOffset:0,byteLength:S,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(M)}I(m,u),Wn(this)}[Oe](){if(this._pendingPullIntos.length>0){let u=this._pendingPullIntos.peek();u.readerType="none",this._pendingPullIntos=new Z,this._pendingPullIntos.push(u)}}}Object.defineProperties(Hr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Hr.prototype.close,"close"),i(Hr.prototype.enqueue,"enqueue"),i(Hr.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Hr.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Gn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableByteStream")?!1:a instanceof Hr}o(Gn,"IsReadableByteStreamController");function Dc(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_associatedReadableByteStreamController")?!1:a instanceof Hn}o(Dc,"IsReadableStreamBYOBRequest");function Wn(a){if(!Vx(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let m=a._pullAlgorithm();h(m,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,Wn(a)),null),S=>(Yt(a,S),null))}o(Wn,"ReadableByteStreamControllerCallPullIfNeeded");function Sm(a){Mc(a),a._pendingPullIntos=new Z}o(Sm,"ReadableByteStreamControllerClearPendingPullIntos");function Uc(a,u){let m=!1;a._state==="closed"&&(m=!0);let S=Em(u);u.readerType==="default"?C(a,S,m):Jx(a,S,m)}o(Uc,"ReadableByteStreamControllerCommitPullIntoDescriptor");function Em(a){let u=a.bytesFilled,m=a.elementSize;return new a.viewConstructor(a.buffer,a.byteOffset,u/m)}o(Em,"ReadableByteStreamControllerConvertPullIntoDescriptor");function Ha(a,u,m,S){a._queue.push({buffer:u,byteOffset:m,byteLength:S}),a._queueTotalSize+=S}o(Ha,"ReadableByteStreamControllerEnqueueChunkToQueue");function Tm(a,u,m,S){let w;try{w=_m(u,m,m+S)}catch(M){throw Yt(a,M),M}Ha(a,w,0,S)}o(Tm,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function xm(a,u){u.bytesFilled>0&&Tm(a,u.buffer,u.byteOffset,u.bytesFilled),bo(a)}o(xm,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function Am(a,u){let m=Math.min(a._queueTotalSize,u.byteLength-u.bytesFilled),S=u.bytesFilled+m,w=m,M=!1,B=S%u.elementSize,ne=S-B;ne>=u.minimumFill&&(w=ne-u.bytesFilled,M=!0);let ye=a._queue;for(;w>0;){let le=ye.peek(),xe=Math.min(w,le.byteLength),$e=u.byteOffset+u.bytesFilled;ym(u.buffer,$e,le.buffer,le.byteOffset,xe),le.byteLength===xe?ye.shift():(le.byteOffset+=xe,le.byteLength-=xe),a._queueTotalSize-=xe,wm(a,xe,u),w-=xe}return M}o(Am,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function wm(a,u,m){m.bytesFilled+=u}o(wm,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function Im(a){a._queueTotalSize===0&&a._closeRequested?(Ga(a),Ii(a._controlledReadableByteStream)):Wn(a)}o(Im,"ReadableByteStreamControllerHandleQueueDrain");function Mc(a){a._byobRequest!==null&&(a._byobRequest._associatedReadableByteStreamController=void 0,a._byobRequest._view=null,a._byobRequest=null)}o(Mc,"ReadableByteStreamControllerInvalidateBYOBRequest");function jc(a){for(;a._pendingPullIntos.length>0;){if(a._queueTotalSize===0)return;let u=a._pendingPullIntos.peek();Am(a,u)&&(bo(a),Uc(a._controlledReadableByteStream,u))}}o(jc,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function Lx(a){let u=a._controlledReadableByteStream._reader;for(;u._readRequests.length>0;){if(a._queueTotalSize===0)return;let m=u._readRequests.shift();Om(a,m)}}o(Lx,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function Fx(a,u,m,S){let w=a._controlledReadableByteStream,M=u.constructor,B=jx(M),{byteOffset:ne,byteLength:ye}=u,le=m*B,xe;try{xe=Vr(u.buffer)}catch(We){S._errorSteps(We);return}let $e={buffer:xe,bufferByteLength:xe.byteLength,byteOffset:ne,byteLength:ye,bytesFilled:0,minimumFill:le,elementSize:B,viewConstructor:M,readerType:"byob"};if(a._pendingPullIntos.length>0){a._pendingPullIntos.push($e),Nm(w,S);return}if(w._state==="closed"){let We=new M($e.buffer,$e.byteOffset,0);S._closeSteps(We);return}if(a._queueTotalSize>0){if(Am(a,$e)){let We=Em($e);Im(a),S._chunkSteps(We);return}if(a._closeRequested){let We=new TypeError("Insufficient bytes to fill elements in the given buffer");Yt(a,We),S._errorSteps(We);return}}a._pendingPullIntos.push($e),Nm(w,S),Wn(a)}o(Fx,"ReadableByteStreamControllerPullInto");function Bx(a,u){u.readerType==="none"&&bo(a);let m=a._controlledReadableByteStream;if(Bc(m))for(;zm(m)>0;){let S=bo(a);Uc(m,S)}}o(Bx,"ReadableByteStreamControllerRespondInClosedState");function qx(a,u,m){if(wm(a,u,m),m.readerType==="none"){xm(a,m),jc(a);return}if(m.bytesFilled<m.minimumFill)return;bo(a);let S=m.bytesFilled%m.elementSize;if(S>0){let w=m.byteOffset+m.bytesFilled;Tm(a,m.buffer,w-S,S)}m.bytesFilled-=S,Uc(a._controlledReadableByteStream,m),jc(a)}o(qx,"ReadableByteStreamControllerRespondInReadableState");function Rm(a,u){let m=a._pendingPullIntos.peek();Mc(a),a._controlledReadableByteStream._state==="closed"?Bx(a,m):qx(a,u,m),Wn(a)}o(Rm,"ReadableByteStreamControllerRespondInternal");function bo(a){return a._pendingPullIntos.shift()}o(bo,"ReadableByteStreamControllerShiftPendingPullInto");function Vx(a){let u=a._controlledReadableByteStream;return u._state!=="readable"||a._closeRequested||!a._started?!1:!!(z(u)&&U(u)>0||Bc(u)&&zm(u)>0||Cm(a)>0)}o(Vx,"ReadableByteStreamControllerShouldCallPull");function Ga(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0}o(Ga,"ReadableByteStreamControllerClearAlgorithms");function Pi(a){let u=a._controlledReadableByteStream;if(!(a._closeRequested||u._state!=="readable")){if(a._queueTotalSize>0){a._closeRequested=!0;return}if(a._pendingPullIntos.length>0){let m=a._pendingPullIntos.peek();if(m.bytesFilled%m.elementSize!==0){let S=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Yt(a,S),S}}Ga(a),Ii(u)}}o(Pi,"ReadableByteStreamControllerClose");function Wa(a,u){let m=a._controlledReadableByteStream;if(a._closeRequested||m._state!=="readable")return;let{buffer:S,byteOffset:w,byteLength:M}=u;if(pn(S))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let B=Vr(S);if(a._pendingPullIntos.length>0){let ne=a._pendingPullIntos.peek();if(pn(ne.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");Mc(a),ne.buffer=Vr(ne.buffer),ne.readerType==="none"&&xm(a,ne)}if(z(m))if(Lx(a),U(m)===0)Ha(a,B,w,M);else{a._pendingPullIntos.length>0&&bo(a);let ne=new Uint8Array(B,w,M);C(m,ne,!1)}else Bc(m)?(Ha(a,B,w,M),jc(a)):Ha(a,B,w,M);Wn(a)}o(Wa,"ReadableByteStreamControllerEnqueue");function Yt(a,u){let m=a._controlledReadableByteStream;m._state==="readable"&&(Sm(a),fn(a),Ga(a),ih(m,u))}o(Yt,"ReadableByteStreamControllerError");function Om(a,u){let m=a._queue.shift();a._queueTotalSize-=m.byteLength,Im(a);let S=new Uint8Array(m.buffer,m.byteOffset,m.byteLength);u._chunkSteps(S)}o(Om,"ReadableByteStreamControllerFillReadRequestFromQueue");function Lc(a){if(a._byobRequest===null&&a._pendingPullIntos.length>0){let u=a._pendingPullIntos.peek(),m=new Uint8Array(u.buffer,u.byteOffset+u.bytesFilled,u.byteLength-u.bytesFilled),S=Object.create(Hn.prototype);Gx(S,a,m),a._byobRequest=S}return a._byobRequest}o(Lc,"ReadableByteStreamControllerGetBYOBRequest");function Cm(a){let u=a._controlledReadableByteStream._state;return u==="errored"?null:u==="closed"?0:a._strategyHWM-a._queueTotalSize}o(Cm,"ReadableByteStreamControllerGetDesiredSize");function Za(a,u){let m=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(u!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(u===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(m.bytesFilled+u>m.byteLength)throw new RangeError("bytesWritten out of range")}m.buffer=Vr(m.buffer),Rm(a,u)}o(Za,"ReadableByteStreamControllerRespond");function Ka(a,u){let m=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(u.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(u.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(m.byteOffset+m.bytesFilled!==u.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(m.bufferByteLength!==u.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(m.bytesFilled+u.byteLength>m.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let w=u.byteLength;m.buffer=Vr(u.buffer),Rm(a,w)}o(Ka,"ReadableByteStreamControllerRespondWithNewView");function $m(a,u,m,S,w,M,B){u._controlledReadableByteStream=a,u._pullAgain=!1,u._pulling=!1,u._byobRequest=null,u._queue=u._queueTotalSize=void 0,fn(u),u._closeRequested=!1,u._started=!1,u._strategyHWM=M,u._pullAlgorithm=S,u._cancelAlgorithm=w,u._autoAllocateChunkSize=B,u._pendingPullIntos=new Z,a._readableStreamController=u;let ne=m();h(f(ne),()=>(u._started=!0,Wn(u),null),ye=>(Yt(u,ye),null))}o($m,"SetUpReadableByteStreamController");function Hx(a,u,m){let S=Object.create(Hr.prototype),w,M,B;u.start!==void 0?w=o(()=>u.start(S),"startAlgorithm"):w=o(()=>{},"startAlgorithm"),u.pull!==void 0?M=o(()=>u.pull(S),"pullAlgorithm"):M=o(()=>f(void 0),"pullAlgorithm"),u.cancel!==void 0?B=o(ye=>u.cancel(ye),"cancelAlgorithm"):B=o(()=>f(void 0),"cancelAlgorithm");let ne=u.autoAllocateChunkSize;if(ne===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");$m(a,S,w,M,B,m,ne)}o(Hx,"SetUpReadableByteStreamControllerFromUnderlyingSource");function Gx(a,u,m){a._associatedReadableByteStreamController=u,a._view=m}o(Gx,"SetUpReadableStreamBYOBRequest");function Fc(a){return new TypeError(`ReadableStreamBYOBRequest.prototype.${a} can only be used on a ReadableStreamBYOBRequest`)}o(Fc,"byobRequestBrandCheckException");function Si(a){return new TypeError(`ReadableByteStreamController.prototype.${a} can only be used on a ReadableByteStreamController`)}o(Si,"byteStreamControllerBrandCheckException");function Wx(a,u){rt(a,u);let m=a?.mode;return{mode:m===void 0?void 0:Zx(m,`${u} has member 'mode' that`)}}o(Wx,"convertReaderOptions");function Zx(a,u){if(a=`${a}`,a!=="byob")throw new TypeError(`${u} '${a}' is not a valid enumeration value for ReadableStreamReaderMode`);return a}o(Zx,"convertReadableStreamReaderMode");function Kx(a,u){var m;rt(a,u);let S=(m=a?.min)!==null&&m!==void 0?m:1;return{min:R(S,`${u} has member 'min' that`)}}o(Kx,"convertByobReadOptions");function km(a){return new mn(a)}o(km,"AcquireReadableStreamBYOBReader");function Nm(a,u){a._reader._readIntoRequests.push(u)}o(Nm,"ReadableStreamAddReadIntoRequest");function Jx(a,u,m){let w=a._reader._readIntoRequests.shift();m?w._closeSteps(u):w._chunkSteps(u)}o(Jx,"ReadableStreamFulfillReadIntoRequest");function zm(a){return a._reader._readIntoRequests.length}o(zm,"ReadableStreamGetNumReadIntoRequests");function Bc(a){let u=a._reader;return!(u===void 0||!Zn(u))}o(Bc,"ReadableStreamHasBYOBReader");class mn{static{o(this,"ReadableStreamBYOBReader")}constructor(u){if(qe(u,1,"ReadableStreamBYOBReader"),$(u,"First parameter"),yn(u))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Gn(u._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");te(this,u),this._readIntoRequests=new Z}get closed(){return Zn(this)?this._closedPromise:p(Ja("closed"))}cancel(u=void 0){return Zn(this)?this._ownerReadableStream===void 0?p(J("cancel")):V(this,u):p(Ja("cancel"))}read(u,m={}){if(!Zn(this))return p(Ja("read"));if(!ArrayBuffer.isView(u))return p(new TypeError("view must be an array buffer view"));if(u.byteLength===0)return p(new TypeError("view must have non-zero byteLength"));if(u.buffer.byteLength===0)return p(new TypeError("view's buffer must have non-zero byteLength"));if(pn(u.buffer))return p(new TypeError("view's buffer has been detached"));let S;try{S=Kx(m,"options")}catch(le){return p(le)}let w=S.min;if(w===0)return p(new TypeError("options.min must be greater than 0"));if(Mx(u)){if(w>u.byteLength)return p(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(w>u.length)return p(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return p(J("read from"));let M,B,ne=l((le,xe)=>{M=le,B=xe});return Dm(this,u,w,{_chunkSteps:o(le=>M({value:le,done:!1}),"_chunkSteps"),_closeSteps:o(le=>M({value:le,done:!0}),"_closeSteps"),_errorSteps:o(le=>B(le),"_errorSteps")}),ne}releaseLock(){if(!Zn(this))throw Ja("releaseLock");this._ownerReadableStream!==void 0&&Yx(this)}}Object.defineProperties(mn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(mn.prototype.cancel,"cancel"),i(mn.prototype.read,"read"),i(mn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Zn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readIntoRequests")?!1:a instanceof mn}o(Zn,"IsReadableStreamBYOBReader");function Dm(a,u,m,S){let w=a._ownerReadableStream;w._disturbed=!0,w._state==="errored"?S._errorSteps(w._storedError):Fx(w._readableStreamController,u,m,S)}o(Dm,"ReadableStreamBYOBReaderRead");function Yx(a){q(a);let u=new TypeError("Reader was released");Um(a,u)}o(Yx,"ReadableStreamBYOBReaderRelease");function Um(a,u){let m=a._readIntoRequests;a._readIntoRequests=new Z,m.forEach(S=>{S._errorSteps(u)})}o(Um,"ReadableStreamBYOBReaderErrorReadIntoRequests");function Ja(a){return new TypeError(`ReadableStreamBYOBReader.prototype.${a} can only be used on a ReadableStreamBYOBReader`)}o(Ja,"byobReaderBrandCheckException");function Ei(a,u){let{highWaterMark:m}=a;if(m===void 0)return u;if(zt(m)||m<0)throw new RangeError("Invalid highWaterMark");return m}o(Ei,"ExtractHighWaterMark");function Ya(a){let{size:u}=a;return u||(()=>1)}o(Ya,"ExtractSizeAlgorithm");function Xa(a,u){rt(a,u);let m=a?.highWaterMark,S=a?.size;return{highWaterMark:m===void 0?void 0:E(m),size:S===void 0?void 0:Xx(S,`${u} has member 'size' that`)}}o(Xa,"convertQueuingStrategy");function Xx(a,u){return it(a,u),m=>E(a(m))}o(Xx,"convertQueuingStrategySize");function Qx(a,u){rt(a,u);let m=a?.abort,S=a?.close,w=a?.start,M=a?.type,B=a?.write;return{abort:m===void 0?void 0:eA(m,a,`${u} has member 'abort' that`),close:S===void 0?void 0:tA(S,a,`${u} has member 'close' that`),start:w===void 0?void 0:rA(w,a,`${u} has member 'start' that`),write:B===void 0?void 0:nA(B,a,`${u} has member 'write' that`),type:M}}o(Qx,"convertUnderlyingSink");function eA(a,u,m){return it(a,m),S=>F(a,u,[S])}o(eA,"convertUnderlyingSinkAbortCallback");function tA(a,u,m){return it(a,m),()=>F(a,u,[])}o(tA,"convertUnderlyingSinkCloseCallback");function rA(a,u,m){return it(a,m),S=>N(a,u,[S])}o(rA,"convertUnderlyingSinkStartCallback");function nA(a,u,m){return it(a,m),(S,w)=>F(a,u,[S,w])}o(nA,"convertUnderlyingSinkWriteCallback");function Mm(a,u){if(!Po(a))throw new TypeError(`${u} is not a WritableStream.`)}o(Mm,"assertWritableStream");function oA(a){if(typeof a!="object"||a===null)return!1;try{return typeof a.aborted=="boolean"}catch{return!1}}o(oA,"isAbortSignal");let iA=typeof AbortController=="function";function aA(){if(iA)return new AbortController}o(aA,"createAbortController");class hn{static{o(this,"WritableStream")}constructor(u={},m={}){u===void 0?u=null:Fe(u,"First parameter");let S=Xa(m,"Second parameter"),w=Qx(u,"First parameter");if(Lm(this),w.type!==void 0)throw new RangeError("Invalid type is specified");let B=Ya(S),ne=Ei(S,1);bA(this,w,ne,B)}get locked(){if(!Po(this))throw ns("locked");return So(this)}abort(u=void 0){return Po(this)?So(this)?p(new TypeError("Cannot abort a stream that already has a writer")):Qa(this,u):p(ns("abort"))}close(){return Po(this)?So(this)?p(new TypeError("Cannot close a stream that already has a writer")):Tr(this)?p(new TypeError("Cannot close an already-closing stream")):Fm(this):p(ns("close"))}getWriter(){if(!Po(this))throw ns("getWriter");return jm(this)}}Object.defineProperties(hn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(hn.prototype.abort,"abort"),i(hn.prototype.close,"close"),i(hn.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(hn.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function jm(a){return new Gr(a)}o(jm,"AcquireWritableStreamDefaultWriter");function sA(a,u,m,S,w=1,M=()=>1){let B=Object.create(hn.prototype);Lm(B);let ne=Object.create(Eo.prototype);return Wm(B,ne,a,u,m,S,w,M),B}o(sA,"CreateWritableStream");function Lm(a){a._state="writable",a._storedError=void 0,a._writer=void 0,a._writableStreamController=void 0,a._writeRequests=new Z,a._inFlightWriteRequest=void 0,a._closeRequest=void 0,a._inFlightCloseRequest=void 0,a._pendingAbortRequest=void 0,a._backpressure=!1}o(Lm,"InitializeWritableStream");function Po(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_writableStreamController")?!1:a instanceof hn}o(Po,"IsWritableStream");function So(a){return a._writer!==void 0}o(So,"IsWritableStreamLocked");function Qa(a,u){var m;if(a._state==="closed"||a._state==="errored")return f(void 0);a._writableStreamController._abortReason=u,(m=a._writableStreamController._abortController)===null||m===void 0||m.abort(u);let S=a._state;if(S==="closed"||S==="errored")return f(void 0);if(a._pendingAbortRequest!==void 0)return a._pendingAbortRequest._promise;let w=!1;S==="erroring"&&(w=!0,u=void 0);let M=l((B,ne)=>{a._pendingAbortRequest={_promise:void 0,_resolve:B,_reject:ne,_reason:u,_wasAlreadyErroring:w}});return a._pendingAbortRequest._promise=M,w||Vc(a,u),M}o(Qa,"WritableStreamAbort");function Fm(a){let u=a._state;if(u==="closed"||u==="errored")return p(new TypeError(`The stream (in ${u} state) is not in the writable state and cannot be closed`));let m=l((w,M)=>{let B={_resolve:w,_reject:M};a._closeRequest=B}),S=a._writer;return S!==void 0&&a._backpressure&&u==="writable"&&Xc(S),PA(a._writableStreamController),m}o(Fm,"WritableStreamClose");function uA(a){return l((m,S)=>{let w={_resolve:m,_reject:S};a._writeRequests.push(w)})}o(uA,"WritableStreamAddWriteRequest");function qc(a,u){if(a._state==="writable"){Vc(a,u);return}Hc(a)}o(qc,"WritableStreamDealWithRejection");function Vc(a,u){let m=a._writableStreamController;a._state="erroring",a._storedError=u;let S=a._writer;S!==void 0&&qm(S,u),!fA(a)&&m._started&&Hc(a)}o(Vc,"WritableStreamStartErroring");function Hc(a){a._state="errored",a._writableStreamController[Y]();let u=a._storedError;if(a._writeRequests.forEach(w=>{w._reject(u)}),a._writeRequests=new Z,a._pendingAbortRequest===void 0){es(a);return}let m=a._pendingAbortRequest;if(a._pendingAbortRequest=void 0,m._wasAlreadyErroring){m._reject(u),es(a);return}let S=a._writableStreamController[G](m._reason);h(S,()=>(m._resolve(),es(a),null),w=>(m._reject(w),es(a),null))}o(Hc,"WritableStreamFinishErroring");function cA(a){a._inFlightWriteRequest._resolve(void 0),a._inFlightWriteRequest=void 0}o(cA,"WritableStreamFinishInFlightWrite");function lA(a,u){a._inFlightWriteRequest._reject(u),a._inFlightWriteRequest=void 0,qc(a,u)}o(lA,"WritableStreamFinishInFlightWriteWithError");function dA(a){a._inFlightCloseRequest._resolve(void 0),a._inFlightCloseRequest=void 0,a._state==="erroring"&&(a._storedError=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._resolve(),a._pendingAbortRequest=void 0)),a._state="closed";let m=a._writer;m!==void 0&&Ym(m)}o(dA,"WritableStreamFinishInFlightClose");function pA(a,u){a._inFlightCloseRequest._reject(u),a._inFlightCloseRequest=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._reject(u),a._pendingAbortRequest=void 0),qc(a,u)}o(pA,"WritableStreamFinishInFlightCloseWithError");function Tr(a){return!(a._closeRequest===void 0&&a._inFlightCloseRequest===void 0)}o(Tr,"WritableStreamCloseQueuedOrInFlight");function fA(a){return!(a._inFlightWriteRequest===void 0&&a._inFlightCloseRequest===void 0)}o(fA,"WritableStreamHasOperationMarkedInFlight");function mA(a){a._inFlightCloseRequest=a._closeRequest,a._closeRequest=void 0}o(mA,"WritableStreamMarkCloseRequestInFlight");function hA(a){a._inFlightWriteRequest=a._writeRequests.shift()}o(hA,"WritableStreamMarkFirstWriteRequestInFlight");function es(a){a._closeRequest!==void 0&&(a._closeRequest._reject(a._storedError),a._closeRequest=void 0);let u=a._writer;u!==void 0&&Jc(u,a._storedError)}o(es,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function Gc(a,u){let m=a._writer;m!==void 0&&u!==a._backpressure&&(u?IA(m):Xc(m)),a._backpressure=u}o(Gc,"WritableStreamUpdateBackpressure");class Gr{static{o(this,"WritableStreamDefaultWriter")}constructor(u){if(qe(u,1,"WritableStreamDefaultWriter"),Mm(u,"First parameter"),So(u))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=u,u._writer=this;let m=u._state;if(m==="writable")!Tr(u)&&u._backpressure?is(this):Xm(this),os(this);else if(m==="erroring")Yc(this,u._storedError),os(this);else if(m==="closed")Xm(this),AA(this);else{let S=u._storedError;Yc(this,S),Jm(this,S)}}get closed(){return Kn(this)?this._closedPromise:p(Jn("closed"))}get desiredSize(){if(!Kn(this))throw Jn("desiredSize");if(this._ownerWritableStream===void 0)throw xi("desiredSize");return vA(this)}get ready(){return Kn(this)?this._readyPromise:p(Jn("ready"))}abort(u=void 0){return Kn(this)?this._ownerWritableStream===void 0?p(xi("abort")):gA(this,u):p(Jn("abort"))}close(){if(!Kn(this))return p(Jn("close"));let u=this._ownerWritableStream;return u===void 0?p(xi("close")):Tr(u)?p(new TypeError("Cannot close an already-closing stream")):Bm(this)}releaseLock(){if(!Kn(this))throw Jn("releaseLock");this._ownerWritableStream!==void 0&&Vm(this)}write(u=void 0){return Kn(this)?this._ownerWritableStream===void 0?p(xi("write to")):Hm(this,u):p(Jn("write"))}}Object.defineProperties(Gr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(Gr.prototype.abort,"abort"),i(Gr.prototype.close,"close"),i(Gr.prototype.releaseLock,"releaseLock"),i(Gr.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Gr.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Kn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_ownerWritableStream")?!1:a instanceof Gr}o(Kn,"IsWritableStreamDefaultWriter");function gA(a,u){let m=a._ownerWritableStream;return Qa(m,u)}o(gA,"WritableStreamDefaultWriterAbort");function Bm(a){let u=a._ownerWritableStream;return Fm(u)}o(Bm,"WritableStreamDefaultWriterClose");function yA(a){let u=a._ownerWritableStream,m=u._state;return Tr(u)||m==="closed"?f(void 0):m==="errored"?p(u._storedError):Bm(a)}o(yA,"WritableStreamDefaultWriterCloseWithErrorPropagation");function _A(a,u){a._closedPromiseState==="pending"?Jc(a,u):wA(a,u)}o(_A,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function qm(a,u){a._readyPromiseState==="pending"?Qm(a,u):RA(a,u)}o(qm,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function vA(a){let u=a._ownerWritableStream,m=u._state;return m==="errored"||m==="erroring"?null:m==="closed"?0:Zm(u._writableStreamController)}o(vA,"WritableStreamDefaultWriterGetDesiredSize");function Vm(a){let u=a._ownerWritableStream,m=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");qm(a,m),_A(a,m),u._writer=void 0,a._ownerWritableStream=void 0}o(Vm,"WritableStreamDefaultWriterRelease");function Hm(a,u){let m=a._ownerWritableStream,S=m._writableStreamController,w=SA(S,u);if(m!==a._ownerWritableStream)return p(xi("write to"));let M=m._state;if(M==="errored")return p(m._storedError);if(Tr(m)||M==="closed")return p(new TypeError("The stream is closing or closed and cannot be written to"));if(M==="erroring")return p(m._storedError);let B=uA(m);return EA(S,u,w),B}o(Hm,"WritableStreamDefaultWriterWrite");let Gm={};class Eo{static{o(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Wc(this))throw Kc("abortReason");return this._abortReason}get signal(){if(!Wc(this))throw Kc("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(u=void 0){if(!Wc(this))throw Kc("error");this._controlledWritableStream._state==="writable"&&Km(this,u)}[G](u){let m=this._abortAlgorithm(u);return ts(this),m}[Y](){fn(this)}}Object.defineProperties(Eo.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Eo.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Wc(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledWritableStream")?!1:a instanceof Eo}o(Wc,"IsWritableStreamDefaultController");function Wm(a,u,m,S,w,M,B,ne){u._controlledWritableStream=a,a._writableStreamController=u,u._queue=void 0,u._queueTotalSize=void 0,fn(u),u._abortReason=void 0,u._abortController=aA(),u._started=!1,u._strategySizeAlgorithm=ne,u._strategyHWM=B,u._writeAlgorithm=S,u._closeAlgorithm=w,u._abortAlgorithm=M;let ye=Zc(u);Gc(a,ye);let le=m(),xe=f(le);h(xe,()=>(u._started=!0,rs(u),null),$e=>(u._started=!0,qc(a,$e),null))}o(Wm,"SetUpWritableStreamDefaultController");function bA(a,u,m,S){let w=Object.create(Eo.prototype),M,B,ne,ye;u.start!==void 0?M=o(()=>u.start(w),"startAlgorithm"):M=o(()=>{},"startAlgorithm"),u.write!==void 0?B=o(le=>u.write(le,w),"writeAlgorithm"):B=o(()=>f(void 0),"writeAlgorithm"),u.close!==void 0?ne=o(()=>u.close(),"closeAlgorithm"):ne=o(()=>f(void 0),"closeAlgorithm"),u.abort!==void 0?ye=o(le=>u.abort(le),"abortAlgorithm"):ye=o(()=>f(void 0),"abortAlgorithm"),Wm(a,w,M,B,ne,ye,m,S)}o(bA,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function ts(a){a._writeAlgorithm=void 0,a._closeAlgorithm=void 0,a._abortAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(ts,"WritableStreamDefaultControllerClearAlgorithms");function PA(a){zc(a,Gm,0),rs(a)}o(PA,"WritableStreamDefaultControllerClose");function SA(a,u){try{return a._strategySizeAlgorithm(u)}catch(m){return Ti(a,m),1}}o(SA,"WritableStreamDefaultControllerGetChunkSize");function Zm(a){return a._strategyHWM-a._queueTotalSize}o(Zm,"WritableStreamDefaultControllerGetDesiredSize");function EA(a,u,m){try{zc(a,u,m)}catch(w){Ti(a,w);return}let S=a._controlledWritableStream;if(!Tr(S)&&S._state==="writable"){let w=Zc(a);Gc(S,w)}rs(a)}o(EA,"WritableStreamDefaultControllerWrite");function rs(a){let u=a._controlledWritableStream;if(!a._started||u._inFlightWriteRequest!==void 0)return;if(u._state==="erroring"){Hc(u);return}if(a._queue.length===0)return;let S=Ux(a);S===Gm?TA(a):xA(a,S)}o(rs,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function Ti(a,u){a._controlledWritableStream._state==="writable"&&Km(a,u)}o(Ti,"WritableStreamDefaultControllerErrorIfNeeded");function TA(a){let u=a._controlledWritableStream;mA(u),Nc(a);let m=a._closeAlgorithm();ts(a),h(m,()=>(dA(u),null),S=>(pA(u,S),null))}o(TA,"WritableStreamDefaultControllerProcessClose");function xA(a,u){let m=a._controlledWritableStream;hA(m);let S=a._writeAlgorithm(u);h(S,()=>{cA(m);let w=m._state;if(Nc(a),!Tr(m)&&w==="writable"){let M=Zc(a);Gc(m,M)}return rs(a),null},w=>(m._state==="writable"&&ts(a),lA(m,w),null))}o(xA,"WritableStreamDefaultControllerProcessWrite");function Zc(a){return Zm(a)<=0}o(Zc,"WritableStreamDefaultControllerGetBackpressure");function Km(a,u){let m=a._controlledWritableStream;ts(a),Vc(m,u)}o(Km,"WritableStreamDefaultControllerError");function ns(a){return new TypeError(`WritableStream.prototype.${a} can only be used on a WritableStream`)}o(ns,"streamBrandCheckException$2");function Kc(a){return new TypeError(`WritableStreamDefaultController.prototype.${a} can only be used on a WritableStreamDefaultController`)}o(Kc,"defaultControllerBrandCheckException$2");function Jn(a){return new TypeError(`WritableStreamDefaultWriter.prototype.${a} can only be used on a WritableStreamDefaultWriter`)}o(Jn,"defaultWriterBrandCheckException");function xi(a){return new TypeError("Cannot "+a+" a stream using a released writer")}o(xi,"defaultWriterLockException");function os(a){a._closedPromise=l((u,m)=>{a._closedPromise_resolve=u,a._closedPromise_reject=m,a._closedPromiseState="pending"})}o(os,"defaultWriterClosedPromiseInitialize");function Jm(a,u){os(a),Jc(a,u)}o(Jm,"defaultWriterClosedPromiseInitializeAsRejected");function AA(a){os(a),Ym(a)}o(AA,"defaultWriterClosedPromiseInitializeAsResolved");function Jc(a,u){a._closedPromise_reject!==void 0&&(P(a._closedPromise),a._closedPromise_reject(u),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="rejected")}o(Jc,"defaultWriterClosedPromiseReject");function wA(a,u){Jm(a,u)}o(wA,"defaultWriterClosedPromiseResetToRejected");function Ym(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="resolved")}o(Ym,"defaultWriterClosedPromiseResolve");function is(a){a._readyPromise=l((u,m)=>{a._readyPromise_resolve=u,a._readyPromise_reject=m}),a._readyPromiseState="pending"}o(is,"defaultWriterReadyPromiseInitialize");function Yc(a,u){is(a),Qm(a,u)}o(Yc,"defaultWriterReadyPromiseInitializeAsRejected");function Xm(a){is(a),Xc(a)}o(Xm,"defaultWriterReadyPromiseInitializeAsResolved");function Qm(a,u){a._readyPromise_reject!==void 0&&(P(a._readyPromise),a._readyPromise_reject(u),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="rejected")}o(Qm,"defaultWriterReadyPromiseReject");function IA(a){is(a)}o(IA,"defaultWriterReadyPromiseReset");function RA(a,u){Yc(a,u)}o(RA,"defaultWriterReadyPromiseResetToRejected");function Xc(a){a._readyPromise_resolve!==void 0&&(a._readyPromise_resolve(void 0),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="fulfilled")}o(Xc,"defaultWriterReadyPromiseResolve");function OA(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}o(OA,"getGlobals");let Qc=OA();function CA(a){if(!(typeof a=="function"||typeof a=="object")||a.name!=="DOMException")return!1;try{return new a,!0}catch{return!1}}o(CA,"isDOMExceptionConstructor");function $A(){let a=Qc?.DOMException;return CA(a)?a:void 0}o($A,"getFromGlobal");function kA(){let a=o(function(m,S){this.message=m||"",this.name=S||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)},"DOMException");return i(a,"DOMException"),a.prototype=Object.create(Error.prototype),Object.defineProperty(a.prototype,"constructor",{value:a,writable:!0,configurable:!0}),a}o(kA,"createPolyfill");let NA=$A()||kA();function eh(a,u,m,S,w,M){let B=j(a),ne=jm(u);a._disturbed=!0;let ye=!1,le=f(void 0);return l((xe,$e)=>{let We;if(M!==void 0){if(We=o(()=>{let pe=M.reason!==void 0?M.reason:new NA("Aborted","AbortError"),Ne=[];S||Ne.push(()=>u._state==="writable"?Qa(u,pe):f(void 0)),w||Ne.push(()=>a._state==="readable"?lr(a,pe):f(void 0)),It(()=>Promise.all(Ne.map(Ze=>Ze())),!0,pe)},"abortAlgorithm"),M.aborted){We();return}M.addEventListener("abort",We)}function dr(){return l((pe,Ne)=>{function Ze(Dt){Dt?pe():_(wo(),Ze,Ne)}o(Ze,"next"),Ze(!1)})}o(dr,"pipeLoop");function wo(){return ye?f(!0):_(ne._readyPromise,()=>l((pe,Ne)=>{ue(B,{_chunkSteps:o(Ze=>{le=_(Hm(ne,Ze),void 0,e),pe(!1)},"_chunkSteps"),_closeSteps:o(()=>pe(!0),"_closeSteps"),_errorSteps:Ne})}))}if(o(wo,"pipeStep"),Zr(a,B._closedPromise,pe=>(S?Xt(!0,pe):It(()=>Qa(u,pe),!0,pe),null)),Zr(u,ne._closedPromise,pe=>(w?Xt(!0,pe):It(()=>lr(a,pe),!0,pe),null)),xt(a,B._closedPromise,()=>(m?Xt():It(()=>yA(ne)),null)),Tr(u)||u._state==="closed"){let pe=new TypeError("the destination writable stream closed before all data could be piped to it");w?Xt(!0,pe):It(()=>lr(a,pe),!0,pe)}P(dr());function vn(){let pe=le;return _(le,()=>pe!==le?vn():void 0)}o(vn,"waitForWritesToFinish");function Zr(pe,Ne,Ze){pe._state==="errored"?Ze(pe._storedError):y(Ne,Ze)}o(Zr,"isOrBecomesErrored");function xt(pe,Ne,Ze){pe._state==="closed"?Ze():g(Ne,Ze)}o(xt,"isOrBecomesClosed");function It(pe,Ne,Ze){if(ye)return;ye=!0,u._state==="writable"&&!Tr(u)?g(vn(),Dt):Dt();function Dt(){return h(pe(),()=>Kr(Ne,Ze),Io=>Kr(!0,Io)),null}o(Dt,"doTheRest")}o(It,"shutdownWithAction");function Xt(pe,Ne){ye||(ye=!0,u._state==="writable"&&!Tr(u)?g(vn(),()=>Kr(pe,Ne)):Kr(pe,Ne))}o(Xt,"shutdown");function Kr(pe,Ne){return Vm(ne),q(B),M!==void 0&&M.removeEventListener("abort",We),pe?$e(Ne):xe(void 0),null}o(Kr,"finalize")})}o(eh,"ReadableStreamPipeTo");class Wr{static{o(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!as(this))throw us("desiredSize");return el(this)}close(){if(!as(this))throw us("close");if(!xo(this))throw new TypeError("The stream is not in a state that permits close");Yn(this)}enqueue(u=void 0){if(!as(this))throw us("enqueue");if(!xo(this))throw new TypeError("The stream is not in a state that permits enqueue");return To(this,u)}error(u=void 0){if(!as(this))throw us("error");cr(this,u)}[ee](u){fn(this);let m=this._cancelAlgorithm(u);return ss(this),m}[K](u){let m=this._controlledReadableStream;if(this._queue.length>0){let S=Nc(this);this._closeRequested&&this._queue.length===0?(ss(this),Ii(m)):Ai(this),u._chunkSteps(S)}else I(m,u),Ai(this)}[Oe](){}}Object.defineProperties(Wr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(Wr.prototype.close,"close"),i(Wr.prototype.enqueue,"enqueue"),i(Wr.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Wr.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function as(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableStream")?!1:a instanceof Wr}o(as,"IsReadableStreamDefaultController");function Ai(a){if(!th(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let m=a._pullAlgorithm();h(m,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,Ai(a)),null),S=>(cr(a,S),null))}o(Ai,"ReadableStreamDefaultControllerCallPullIfNeeded");function th(a){let u=a._controlledReadableStream;return!xo(a)||!a._started?!1:!!(yn(u)&&U(u)>0||el(a)>0)}o(th,"ReadableStreamDefaultControllerShouldCallPull");function ss(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(ss,"ReadableStreamDefaultControllerClearAlgorithms");function Yn(a){if(!xo(a))return;let u=a._controlledReadableStream;a._closeRequested=!0,a._queue.length===0&&(ss(a),Ii(u))}o(Yn,"ReadableStreamDefaultControllerClose");function To(a,u){if(!xo(a))return;let m=a._controlledReadableStream;if(yn(m)&&U(m)>0)C(m,u,!1);else{let S;try{S=a._strategySizeAlgorithm(u)}catch(w){throw cr(a,w),w}try{zc(a,u,S)}catch(w){throw cr(a,w),w}}Ai(a)}o(To,"ReadableStreamDefaultControllerEnqueue");function cr(a,u){let m=a._controlledReadableStream;m._state==="readable"&&(fn(a),ss(a),ih(m,u))}o(cr,"ReadableStreamDefaultControllerError");function el(a){let u=a._controlledReadableStream._state;return u==="errored"?null:u==="closed"?0:a._strategyHWM-a._queueTotalSize}o(el,"ReadableStreamDefaultControllerGetDesiredSize");function zA(a){return!th(a)}o(zA,"ReadableStreamDefaultControllerHasBackpressure");function xo(a){let u=a._controlledReadableStream._state;return!a._closeRequested&&u==="readable"}o(xo,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function rh(a,u,m,S,w,M,B){u._controlledReadableStream=a,u._queue=void 0,u._queueTotalSize=void 0,fn(u),u._started=!1,u._closeRequested=!1,u._pullAgain=!1,u._pulling=!1,u._strategySizeAlgorithm=B,u._strategyHWM=M,u._pullAlgorithm=S,u._cancelAlgorithm=w,a._readableStreamController=u;let ne=m();h(f(ne),()=>(u._started=!0,Ai(u),null),ye=>(cr(u,ye),null))}o(rh,"SetUpReadableStreamDefaultController");function DA(a,u,m,S){let w=Object.create(Wr.prototype),M,B,ne;u.start!==void 0?M=o(()=>u.start(w),"startAlgorithm"):M=o(()=>{},"startAlgorithm"),u.pull!==void 0?B=o(()=>u.pull(w),"pullAlgorithm"):B=o(()=>f(void 0),"pullAlgorithm"),u.cancel!==void 0?ne=o(ye=>u.cancel(ye),"cancelAlgorithm"):ne=o(()=>f(void 0),"cancelAlgorithm"),rh(a,w,M,B,ne,m,S)}o(DA,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function us(a){return new TypeError(`ReadableStreamDefaultController.prototype.${a} can only be used on a ReadableStreamDefaultController`)}o(us,"defaultControllerBrandCheckException$1");function UA(a,u){return Gn(a._readableStreamController)?jA(a):MA(a)}o(UA,"ReadableStreamTee");function MA(a,u){let m=j(a),S=!1,w=!1,M=!1,B=!1,ne,ye,le,xe,$e,We=l(xt=>{$e=xt});function dr(){return S?(w=!0,f(void 0)):(S=!0,ue(m,{_chunkSteps:o(It=>{x(()=>{w=!1;let Xt=It,Kr=It;M||To(le._readableStreamController,Xt),B||To(xe._readableStreamController,Kr),S=!1,w&&dr()})},"_chunkSteps"),_closeSteps:o(()=>{S=!1,M||Yn(le._readableStreamController),B||Yn(xe._readableStreamController),(!M||!B)&&$e(void 0)},"_closeSteps"),_errorSteps:o(()=>{S=!1},"_errorSteps")}),f(void 0))}o(dr,"pullAlgorithm");function wo(xt){if(M=!0,ne=xt,B){let It=Ve([ne,ye]),Xt=lr(a,It);$e(Xt)}return We}o(wo,"cancel1Algorithm");function vn(xt){if(B=!0,ye=xt,M){let It=Ve([ne,ye]),Xt=lr(a,It);$e(Xt)}return We}o(vn,"cancel2Algorithm");function Zr(){}return o(Zr,"startAlgorithm"),le=wi(Zr,dr,wo),xe=wi(Zr,dr,vn),y(m._closedPromise,xt=>(cr(le._readableStreamController,xt),cr(xe._readableStreamController,xt),(!M||!B)&&$e(void 0),null)),[le,xe]}o(MA,"ReadableStreamDefaultTee");function jA(a){let u=j(a),m=!1,S=!1,w=!1,M=!1,B=!1,ne,ye,le,xe,$e,We=l(pe=>{$e=pe});function dr(pe){y(pe._closedPromise,Ne=>(pe!==u||(Yt(le._readableStreamController,Ne),Yt(xe._readableStreamController,Ne),(!M||!B)&&$e(void 0)),null))}o(dr,"forwardReaderError");function wo(){Zn(u)&&(q(u),u=j(a),dr(u)),ue(u,{_chunkSteps:o(Ne=>{x(()=>{S=!1,w=!1;let Ze=Ne,Dt=Ne;if(!M&&!B)try{Dt=bm(Ne)}catch(Io){Yt(le._readableStreamController,Io),Yt(xe._readableStreamController,Io),$e(lr(a,Io));return}M||Wa(le._readableStreamController,Ze),B||Wa(xe._readableStreamController,Dt),m=!1,S?Zr():w&&xt()})},"_chunkSteps"),_closeSteps:o(()=>{m=!1,M||Pi(le._readableStreamController),B||Pi(xe._readableStreamController),le._readableStreamController._pendingPullIntos.length>0&&Za(le._readableStreamController,0),xe._readableStreamController._pendingPullIntos.length>0&&Za(xe._readableStreamController,0),(!M||!B)&&$e(void 0)},"_closeSteps"),_errorSteps:o(()=>{m=!1},"_errorSteps")})}o(wo,"pullWithDefaultReader");function vn(pe,Ne){ie(u)&&(q(u),u=km(a),dr(u));let Ze=Ne?xe:le,Dt=Ne?le:xe;Dm(u,pe,1,{_chunkSteps:o(Ro=>{x(()=>{S=!1,w=!1;let Oo=Ne?B:M;if(Ne?M:B)Oo||Ka(Ze._readableStreamController,Ro);else{let _h;try{_h=bm(Ro)}catch(il){Yt(Ze._readableStreamController,il),Yt(Dt._readableStreamController,il),$e(lr(a,il));return}Oo||Ka(Ze._readableStreamController,Ro),Wa(Dt._readableStreamController,_h)}m=!1,S?Zr():w&&xt()})},"_chunkSteps"),_closeSteps:o(Ro=>{m=!1;let Oo=Ne?B:M,gs=Ne?M:B;Oo||Pi(Ze._readableStreamController),gs||Pi(Dt._readableStreamController),Ro!==void 0&&(Oo||Ka(Ze._readableStreamController,Ro),!gs&&Dt._readableStreamController._pendingPullIntos.length>0&&Za(Dt._readableStreamController,0)),(!Oo||!gs)&&$e(void 0)},"_closeSteps"),_errorSteps:o(()=>{m=!1},"_errorSteps")})}o(vn,"pullWithBYOBReader");function Zr(){if(m)return S=!0,f(void 0);m=!0;let pe=Lc(le._readableStreamController);return pe===null?wo():vn(pe._view,!1),f(void 0)}o(Zr,"pull1Algorithm");function xt(){if(m)return w=!0,f(void 0);m=!0;let pe=Lc(xe._readableStreamController);return pe===null?wo():vn(pe._view,!0),f(void 0)}o(xt,"pull2Algorithm");function It(pe){if(M=!0,ne=pe,B){let Ne=Ve([ne,ye]),Ze=lr(a,Ne);$e(Ze)}return We}o(It,"cancel1Algorithm");function Xt(pe){if(B=!0,ye=pe,M){let Ne=Ve([ne,ye]),Ze=lr(a,Ne);$e(Ze)}return We}o(Xt,"cancel2Algorithm");function Kr(){}return o(Kr,"startAlgorithm"),le=oh(Kr,Zr,It),xe=oh(Kr,xt,Xt),dr(u),[le,xe]}o(jA,"ReadableByteStreamTee");function LA(a){return r(a)&&typeof a.getReader<"u"}o(LA,"isReadableStreamLike");function FA(a){return LA(a)?qA(a.getReader()):BA(a)}o(FA,"ReadableStreamFrom");function BA(a){let u,m=vm(a,"async"),S=e;function w(){let B;try{B=kx(m)}catch(ye){return p(ye)}let ne=f(B);return T(ne,ye=>{if(!r(ye))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Nx(ye))Yn(u._readableStreamController);else{let xe=zx(ye);To(u._readableStreamController,xe)}})}o(w,"pullAlgorithm");function M(B){let ne=m.iterator,ye;try{ye=Va(ne,"return")}catch($e){return p($e)}if(ye===void 0)return f(void 0);let le;try{le=N(ye,ne,[B])}catch($e){return p($e)}let xe=f(le);return T(xe,$e=>{if(!r($e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return o(M,"cancelAlgorithm"),u=wi(S,w,M,0),u}o(BA,"ReadableStreamFromIterable");function qA(a){let u,m=e;function S(){let M;try{M=a.read()}catch(B){return p(B)}return T(M,B=>{if(!r(B))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(B.done)Yn(u._readableStreamController);else{let ne=B.value;To(u._readableStreamController,ne)}})}o(S,"pullAlgorithm");function w(M){try{return f(a.cancel(M))}catch(B){return p(B)}}return o(w,"cancelAlgorithm"),u=wi(m,S,w,0),u}o(qA,"ReadableStreamFromDefaultReader");function VA(a,u){rt(a,u);let m=a,S=m?.autoAllocateChunkSize,w=m?.cancel,M=m?.pull,B=m?.start,ne=m?.type;return{autoAllocateChunkSize:S===void 0?void 0:R(S,`${u} has member 'autoAllocateChunkSize' that`),cancel:w===void 0?void 0:HA(w,m,`${u} has member 'cancel' that`),pull:M===void 0?void 0:GA(M,m,`${u} has member 'pull' that`),start:B===void 0?void 0:WA(B,m,`${u} has member 'start' that`),type:ne===void 0?void 0:ZA(ne,`${u} has member 'type' that`)}}o(VA,"convertUnderlyingDefaultOrByteSource");function HA(a,u,m){return it(a,m),S=>F(a,u,[S])}o(HA,"convertUnderlyingSourceCancelCallback");function GA(a,u,m){return it(a,m),S=>F(a,u,[S])}o(GA,"convertUnderlyingSourcePullCallback");function WA(a,u,m){return it(a,m),S=>N(a,u,[S])}o(WA,"convertUnderlyingSourceStartCallback");function ZA(a,u){if(a=`${a}`,a!=="bytes")throw new TypeError(`${u} '${a}' is not a valid enumeration value for ReadableStreamType`);return a}o(ZA,"convertReadableStreamType");function KA(a,u){return rt(a,u),{preventCancel:!!a?.preventCancel}}o(KA,"convertIteratorOptions");function nh(a,u){rt(a,u);let m=a?.preventAbort,S=a?.preventCancel,w=a?.preventClose,M=a?.signal;return M!==void 0&&JA(M,`${u} has member 'signal' that`),{preventAbort:!!m,preventCancel:!!S,preventClose:!!w,signal:M}}o(nh,"convertPipeOptions");function JA(a,u){if(!oA(a))throw new TypeError(`${u} is not an AbortSignal.`)}o(JA,"assertAbortSignal");function YA(a,u){rt(a,u);let m=a?.readable;b(m,"readable","ReadableWritablePair"),$(m,`${u} has member 'readable' that`);let S=a?.writable;return b(S,"writable","ReadableWritablePair"),Mm(S,`${u} has member 'writable' that`),{readable:m,writable:S}}o(YA,"convertReadableWritablePair");class Et{static{o(this,"ReadableStream")}constructor(u={},m={}){u===void 0?u=null:Fe(u,"First parameter");let S=Xa(m,"Second parameter"),w=VA(u,"First parameter");if(tl(this),w.type==="bytes"){if(S.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let M=Ei(S,0);Hx(this,w,M)}else{let M=Ya(S),B=Ei(S,1);DA(this,w,B,M)}}get locked(){if(!gn(this))throw Xn("locked");return yn(this)}cancel(u=void 0){return gn(this)?yn(this)?p(new TypeError("Cannot cancel a stream that already has a reader")):lr(this,u):p(Xn("cancel"))}getReader(u=void 0){if(!gn(this))throw Xn("getReader");return Wx(u,"First parameter").mode===void 0?j(this):km(this)}pipeThrough(u,m={}){if(!gn(this))throw Xn("pipeThrough");qe(u,1,"pipeThrough");let S=YA(u,"First parameter"),w=nh(m,"Second parameter");if(yn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(So(S.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let M=eh(this,S.writable,w.preventClose,w.preventAbort,w.preventCancel,w.signal);return P(M),S.readable}pipeTo(u,m={}){if(!gn(this))return p(Xn("pipeTo"));if(u===void 0)return p("Parameter 1 is required in 'pipeTo'.");if(!Po(u))return p(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let S;try{S=nh(m,"Second parameter")}catch(w){return p(w)}return yn(this)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):So(u)?p(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):eh(this,u,S.preventClose,S.preventAbort,S.preventCancel,S.signal)}tee(){if(!gn(this))throw Xn("tee");let u=UA(this);return Ve(u)}values(u=void 0){if(!gn(this))throw Xn("values");let m=KA(u,"First parameter");return yo(this,m.preventCancel)}[kc](u){return this.values(u)}static from(u){return FA(u)}}Object.defineProperties(Et,{from:{enumerable:!0}}),Object.defineProperties(Et.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(Et.from,"from"),i(Et.prototype.cancel,"cancel"),i(Et.prototype.getReader,"getReader"),i(Et.prototype.pipeThrough,"pipeThrough"),i(Et.prototype.pipeTo,"pipeTo"),i(Et.prototype.tee,"tee"),i(Et.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Et.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Et.prototype,kc,{value:Et.prototype.values,writable:!0,configurable:!0});function wi(a,u,m,S=1,w=()=>1){let M=Object.create(Et.prototype);tl(M);let B=Object.create(Wr.prototype);return rh(M,B,a,u,m,S,w),M}o(wi,"CreateReadableStream");function oh(a,u,m){let S=Object.create(Et.prototype);tl(S);let w=Object.create(Hr.prototype);return $m(S,w,a,u,m,0,void 0),S}o(oh,"CreateReadableByteStream");function tl(a){a._state="readable",a._reader=void 0,a._storedError=void 0,a._disturbed=!1}o(tl,"InitializeReadableStream");function gn(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readableStreamController")?!1:a instanceof Et}o(gn,"IsReadableStream");function yn(a){return a._reader!==void 0}o(yn,"IsReadableStreamLocked");function lr(a,u){if(a._disturbed=!0,a._state==="closed")return f(void 0);if(a._state==="errored")return p(a._storedError);Ii(a);let m=a._reader;if(m!==void 0&&Zn(m)){let w=m._readIntoRequests;m._readIntoRequests=new Z,w.forEach(M=>{M._closeSteps(void 0)})}let S=a._readableStreamController[ee](u);return T(S,e)}o(lr,"ReadableStreamCancel");function Ii(a){a._state="closed";let u=a._reader;if(u!==void 0&&(Be(u),ie(u))){let m=u._readRequests;u._readRequests=new Z,m.forEach(S=>{S._closeSteps()})}}o(Ii,"ReadableStreamClose");function ih(a,u){a._state="errored",a._storedError=u;let m=a._reader;m!==void 0&&(Ie(m,u),ie(m)?Je(m,u):Um(m,u))}o(ih,"ReadableStreamError");function Xn(a){return new TypeError(`ReadableStream.prototype.${a} can only be used on a ReadableStream`)}o(Xn,"streamBrandCheckException$1");function ah(a,u){rt(a,u);let m=a?.highWaterMark;return b(m,"highWaterMark","QueuingStrategyInit"),{highWaterMark:E(m)}}o(ah,"convertQueuingStrategyInit");let sh=o(a=>a.byteLength,"byteLengthSizeFunction");i(sh,"size");class cs{static{o(this,"ByteLengthQueuingStrategy")}constructor(u){qe(u,1,"ByteLengthQueuingStrategy"),u=ah(u,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=u.highWaterMark}get highWaterMark(){if(!ch(this))throw uh("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ch(this))throw uh("size");return sh}}Object.defineProperties(cs.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(cs.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function uh(a){return new TypeError(`ByteLengthQueuingStrategy.prototype.${a} can only be used on a ByteLengthQueuingStrategy`)}o(uh,"byteLengthBrandCheckException");function ch(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_byteLengthQueuingStrategyHighWaterMark")?!1:a instanceof cs}o(ch,"IsByteLengthQueuingStrategy");let lh=o(()=>1,"countSizeFunction");i(lh,"size");class ls{static{o(this,"CountQueuingStrategy")}constructor(u){qe(u,1,"CountQueuingStrategy"),u=ah(u,"First parameter"),this._countQueuingStrategyHighWaterMark=u.highWaterMark}get highWaterMark(){if(!ph(this))throw dh("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ph(this))throw dh("size");return lh}}Object.defineProperties(ls.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ls.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function dh(a){return new TypeError(`CountQueuingStrategy.prototype.${a} can only be used on a CountQueuingStrategy`)}o(dh,"countBrandCheckException");function ph(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_countQueuingStrategyHighWaterMark")?!1:a instanceof ls}o(ph,"IsCountQueuingStrategy");function XA(a,u){rt(a,u);let m=a?.cancel,S=a?.flush,w=a?.readableType,M=a?.start,B=a?.transform,ne=a?.writableType;return{cancel:m===void 0?void 0:rw(m,a,`${u} has member 'cancel' that`),flush:S===void 0?void 0:QA(S,a,`${u} has member 'flush' that`),readableType:w,start:M===void 0?void 0:ew(M,a,`${u} has member 'start' that`),transform:B===void 0?void 0:tw(B,a,`${u} has member 'transform' that`),writableType:ne}}o(XA,"convertTransformer");function QA(a,u,m){return it(a,m),S=>F(a,u,[S])}o(QA,"convertTransformerFlushCallback");function ew(a,u,m){return it(a,m),S=>N(a,u,[S])}o(ew,"convertTransformerStartCallback");function tw(a,u,m){return it(a,m),(S,w)=>F(a,u,[S,w])}o(tw,"convertTransformerTransformCallback");function rw(a,u,m){return it(a,m),S=>F(a,u,[S])}o(rw,"convertTransformerCancelCallback");class ds{static{o(this,"TransformStream")}constructor(u={},m={},S={}){u===void 0&&(u=null);let w=Xa(m,"Second parameter"),M=Xa(S,"Third parameter"),B=XA(u,"First parameter");if(B.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(B.writableType!==void 0)throw new RangeError("Invalid writableType specified");let ne=Ei(M,0),ye=Ya(M),le=Ei(w,1),xe=Ya(w),$e,We=l(dr=>{$e=dr});nw(this,We,le,xe,ne,ye),iw(this,B),B.start!==void 0?$e(B.start(this._transformStreamController)):$e(void 0)}get readable(){if(!fh(this))throw yh("readable");return this._readable}get writable(){if(!fh(this))throw yh("writable");return this._writable}}Object.defineProperties(ds.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ds.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function nw(a,u,m,S,w,M){function B(){return u}o(B,"startAlgorithm");function ne(We){return uw(a,We)}o(ne,"writeAlgorithm");function ye(We){return cw(a,We)}o(ye,"abortAlgorithm");function le(){return lw(a)}o(le,"closeAlgorithm"),a._writable=sA(B,ne,le,ye,m,S);function xe(){return dw(a)}o(xe,"pullAlgorithm");function $e(We){return pw(a,We)}o($e,"cancelAlgorithm"),a._readable=wi(B,xe,$e,w,M),a._backpressure=void 0,a._backpressureChangePromise=void 0,a._backpressureChangePromise_resolve=void 0,ps(a,!0),a._transformStreamController=void 0}o(nw,"InitializeTransformStream");function fh(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_transformStreamController")?!1:a instanceof ds}o(fh,"IsTransformStream");function mh(a,u){cr(a._readable._readableStreamController,u),rl(a,u)}o(mh,"TransformStreamError");function rl(a,u){ms(a._transformStreamController),Ti(a._writable._writableStreamController,u),nl(a)}o(rl,"TransformStreamErrorWritableAndUnblockWrite");function nl(a){a._backpressure&&ps(a,!1)}o(nl,"TransformStreamUnblockWrite");function ps(a,u){a._backpressureChangePromise!==void 0&&a._backpressureChangePromise_resolve(),a._backpressureChangePromise=l(m=>{a._backpressureChangePromise_resolve=m}),a._backpressure=u}o(ps,"TransformStreamSetBackpressure");class _n{static{o(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!fs(this))throw hs("desiredSize");let u=this._controlledTransformStream._readable._readableStreamController;return el(u)}enqueue(u=void 0){if(!fs(this))throw hs("enqueue");hh(this,u)}error(u=void 0){if(!fs(this))throw hs("error");aw(this,u)}terminate(){if(!fs(this))throw hs("terminate");sw(this)}}Object.defineProperties(_n.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),i(_n.prototype.enqueue,"enqueue"),i(_n.prototype.error,"error"),i(_n.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function fs(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledTransformStream")?!1:a instanceof _n}o(fs,"IsTransformStreamDefaultController");function ow(a,u,m,S,w){u._controlledTransformStream=a,a._transformStreamController=u,u._transformAlgorithm=m,u._flushAlgorithm=S,u._cancelAlgorithm=w,u._finishPromise=void 0,u._finishPromise_resolve=void 0,u._finishPromise_reject=void 0}o(ow,"SetUpTransformStreamDefaultController");function iw(a,u){let m=Object.create(_n.prototype),S,w,M;u.transform!==void 0?S=o(B=>u.transform(B,m),"transformAlgorithm"):S=o(B=>{try{return hh(m,B),f(void 0)}catch(ne){return p(ne)}},"transformAlgorithm"),u.flush!==void 0?w=o(()=>u.flush(m),"flushAlgorithm"):w=o(()=>f(void 0),"flushAlgorithm"),u.cancel!==void 0?M=o(B=>u.cancel(B),"cancelAlgorithm"):M=o(()=>f(void 0),"cancelAlgorithm"),ow(a,m,S,w,M)}o(iw,"SetUpTransformStreamDefaultControllerFromTransformer");function ms(a){a._transformAlgorithm=void 0,a._flushAlgorithm=void 0,a._cancelAlgorithm=void 0}o(ms,"TransformStreamDefaultControllerClearAlgorithms");function hh(a,u){let m=a._controlledTransformStream,S=m._readable._readableStreamController;if(!xo(S))throw new TypeError("Readable side is not in a state that permits enqueue");try{To(S,u)}catch(M){throw rl(m,M),m._readable._storedError}zA(S)!==m._backpressure&&ps(m,!0)}o(hh,"TransformStreamDefaultControllerEnqueue");function aw(a,u){mh(a._controlledTransformStream,u)}o(aw,"TransformStreamDefaultControllerError");function gh(a,u){let m=a._transformAlgorithm(u);return T(m,void 0,S=>{throw mh(a._controlledTransformStream,S),S})}o(gh,"TransformStreamDefaultControllerPerformTransform");function sw(a){let u=a._controlledTransformStream,m=u._readable._readableStreamController;Yn(m);let S=new TypeError("TransformStream terminated");rl(u,S)}o(sw,"TransformStreamDefaultControllerTerminate");function uw(a,u){let m=a._transformStreamController;if(a._backpressure){let S=a._backpressureChangePromise;return T(S,()=>{let w=a._writable;if(w._state==="erroring")throw w._storedError;return gh(m,u)})}return gh(m,u)}o(uw,"TransformStreamDefaultSinkWriteAlgorithm");function cw(a,u){let m=a._transformStreamController;if(m._finishPromise!==void 0)return m._finishPromise;let S=a._readable;m._finishPromise=l((M,B)=>{m._finishPromise_resolve=M,m._finishPromise_reject=B});let w=m._cancelAlgorithm(u);return ms(m),h(w,()=>(S._state==="errored"?Ao(m,S._storedError):(cr(S._readableStreamController,u),ol(m)),null),M=>(cr(S._readableStreamController,M),Ao(m,M),null)),m._finishPromise}o(cw,"TransformStreamDefaultSinkAbortAlgorithm");function lw(a){let u=a._transformStreamController;if(u._finishPromise!==void 0)return u._finishPromise;let m=a._readable;u._finishPromise=l((w,M)=>{u._finishPromise_resolve=w,u._finishPromise_reject=M});let S=u._flushAlgorithm();return ms(u),h(S,()=>(m._state==="errored"?Ao(u,m._storedError):(Yn(m._readableStreamController),ol(u)),null),w=>(cr(m._readableStreamController,w),Ao(u,w),null)),u._finishPromise}o(lw,"TransformStreamDefaultSinkCloseAlgorithm");function dw(a){return ps(a,!1),a._backpressureChangePromise}o(dw,"TransformStreamDefaultSourcePullAlgorithm");function pw(a,u){let m=a._transformStreamController;if(m._finishPromise!==void 0)return m._finishPromise;let S=a._writable;m._finishPromise=l((M,B)=>{m._finishPromise_resolve=M,m._finishPromise_reject=B});let w=m._cancelAlgorithm(u);return ms(m),h(w,()=>(S._state==="errored"?Ao(m,S._storedError):(Ti(S._writableStreamController,u),nl(a),ol(m)),null),M=>(Ti(S._writableStreamController,M),nl(a),Ao(m,M),null)),m._finishPromise}o(pw,"TransformStreamDefaultSourceCancelAlgorithm");function hs(a){return new TypeError(`TransformStreamDefaultController.prototype.${a} can only be used on a TransformStreamDefaultController`)}o(hs,"defaultControllerBrandCheckException");function ol(a){a._finishPromise_resolve!==void 0&&(a._finishPromise_resolve(),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(ol,"defaultControllerFinishPromiseResolve");function Ao(a,u){a._finishPromise_reject!==void 0&&(P(a._finishPromise),a._finishPromise_reject(u),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(Ao,"defaultControllerFinishPromiseReject");function yh(a){return new TypeError(`TransformStream.prototype.${a} can only be used on a TransformStream`)}o(yh,"streamBrandCheckException"),t.ByteLengthQueuingStrategy=cs,t.CountQueuingStrategy=ls,t.ReadableByteStreamController=Hr,t.ReadableStream=Et,t.ReadableStreamBYOBReader=mn,t.ReadableStreamBYOBRequest=Hn,t.ReadableStreamDefaultController=Wr,t.ReadableStreamDefaultReader=H,t.TransformStream=ds,t.TransformStreamDefaultController=_n,t.WritableStream=hn,t.WritableStreamDefaultController=Eo,t.WritableStreamDefaultWriter=Gr}))});var Yb=k(()=>{if(!globalThis.ReadableStream)try{let t=require("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,Jb())}try{let{Blob:t}=require("buffer");t&&!t.prototype.stream&&(t.prototype.stream=o(function(r){let n=0,i=this;return new ReadableStream({type:"bytes",async pull(s){let d=await i.slice(n,Math.min(i.size,n+65536)).arrayBuffer();n+=d.byteLength,s.enqueue(new Uint8Array(d)),n===i.size&&s.close()}})},"name"))}catch{}});async function*Ad(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let n=r.byteOffset,i=r.byteOffset+r.byteLength;for(;n!==i;){let s=Math.min(i-n,Xb),c=r.buffer.slice(n,n+s);n+=c.byteLength,yield new Uint8Array(c)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let c=await i.slice(n,Math.min(i.size,n+Xb)).arrayBuffer();n+=c.byteLength,yield new Uint8Array(c)}}}var j5,Xb,Qb,e$,hr,oa=gt(()=>{j5=ft(Yb(),1);Xb=65536;o(Ad,"toIterator");Qb=class wd{static{o(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(e=[],r={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let n=new TextEncoder;for(let s of e){let c;ArrayBuffer.isView(s)?c=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?c=new Uint8Array(s.slice(0)):s instanceof wd?c=s:c=n.encode(`${s}`),this.#r+=ArrayBuffer.isView(c)?c.byteLength:c.size,this.#e.push(c)}this.#n=`${r.endings===void 0?"transparent":r.endings}`;let i=r.type===void 0?"":String(r.type);this.#t=/^[\x20-\x7E]*$/.test(i)?i:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,r="";for await(let n of Ad(this.#e,!1))r+=e.decode(n,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let n of Ad(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Ad(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let n=await e.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,n=""){let{size:i}=this,s=e<0?Math.max(i+e,0):Math.min(e,i),c=r<0?Math.max(i+r,0):Math.min(r,i),d=Math.max(c-s,0),l=this.#e,f=[],p=0;for(let h of l){if(p>=d)break;let g=ArrayBuffer.isView(h)?h.byteLength:h.size;if(s&&g<=s)s-=g,c-=g;else{let y;ArrayBuffer.isView(h)?(y=h.subarray(s,Math.min(g,c)),p+=y.byteLength):(y=h.slice(s,Math.min(g,c)),p+=y.size),c-=g,f.push(y),s=0}}let _=new wd([],{type:String(n).toLowerCase()});return _.#r=d,_.#e=f,_}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(Qb.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});e$=Qb,hr=e$});var t$,r$,Dn,Id=gt(()=>{oa();t$=class extends hr{static{o(this,"File")}#e=0;#t="";constructor(e,r,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,n),n===null&&(n={});let i=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(i)||(this.#e=i),this.#t=String(r)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof hr&&/^(File)$/.test(e[Symbol.toStringTag])}},r$=t$,Dn=r$});function rP(t,e=hr){var r=`${eP()}${eP()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
15
- Content-Disposition: form-data; name="`;return t.forEach((s,c)=>typeof s=="string"?n.push(i+Rd(c)+`"\r
10
+ `);if(m===-1){Sf("have not received end of HTTP headers yet..."),i();return}let h=y.slice(0,m).toString("ascii").split(`\r
11
+ `),_=h.shift();if(!_)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let E=_.split(" "),P=+E[1],x=E.slice(2).join(" "),z={};for(let M of h){if(!M)continue;let K=M.indexOf(":");if(K===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${M}"`));let Z=M.slice(0,K).toLowerCase(),J=M.slice(K+1).trimStart(),ee=z[Z];typeof ee=="string"?z[Z]=[ee,J]:Array.isArray(ee)?ee.push(J):z[Z]=J}Sf("got proxy server response: %o %o",_,z),s(),e({connect:{statusCode:P,statusText:x,headers:z},buffered:y})}a(p,"ondata"),t.on("error",l),t.on("end",u),i()})}a(t4,"parseProxyResponse");Ta.parseProxyResponse=t4});var KO=N(wr=>{"use strict";var r4=wr&&wr.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),n4=wr&&wr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),WO=wr&&wr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&r4(e,t,n);return n4(e,t),e},JO=wr&&wr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wr,"__esModule",{value:!0});wr.HttpsProxyAgent=void 0;var Ef=WO(require("net")),ZO=WO(require("tls")),o4=JO(require("assert")),i4=JO(Eb()),a4=qO(),s4=require("url"),c4=VO(),nu=(0,i4.default)("https-proxy-agent"),HO=a(t=>t.servername===void 0&&t.host&&!Ef.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),Pf=class extends a4.Agent{static{a(this,"HttpsProxyAgent")}constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new s4.URL(e):e,this.proxyHeaders=n?.headers??{},nu("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?GO(n,"headers"):null,host:o,port:r}}async connect(e,n){let{proxy:o}=this;if(!n.host)throw new TypeError('No "host" provided');let r;o.protocol==="https:"?(nu("Creating `tls.Socket`: %o",this.connectOpts),r=ZO.connect(HO(this.connectOpts))):(nu("Creating `net.Socket`: %o",this.connectOpts),r=Ef.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=Ef.isIPv6(n.host)?`[${n.host}]`:n.host,u=`CONNECT ${s}:${n.port} HTTP/1.1\r
12
+ `;if(o.username||o.password){let m=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(i))u+=`${m}: ${i[m]}\r
13
+ `;let l=(0,c4.parseProxyResponse)(r);r.write(`${u}\r
14
+ `);let{connect:p,buffered:f}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",u4),n.secureEndpoint?(nu("Upgrading socket connection to TLS"),ZO.connect({...GO(HO(n),"host","path","port"),socket:r})):r;r.destroy();let y=new Ef.Socket({writable:!1});return y.readable=!0,e.once("socket",m=>{nu("Replaying proxy buffer for failed request"),(0,o4.default)(m.listenerCount("data")>0),m.push(f),m.push(null)}),y}};Pf.protocols=["http","https"];wr.HttpsProxyAgent=Pf;function u4(t){t.resume()}a(u4,"resume");function GO(t,...e){let n={},o;for(o in t)e.includes(o)||(n[o]=t[o]);return n}a(GO,"omit")});function l4(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let n=t.substring(5,e).split(";"),o="",r=!1,i=n[0]||"text/plain",s=i;for(let f=1;f<n.length;f++)n[f]==="base64"?r=!0:n[f]&&(s+=`;${n[f]}`,n[f].indexOf("charset=")===0&&(o=n[f].substring(8)));!n[0]&&!o.length&&(s+=";charset=US-ASCII",o="US-ASCII");let u=r?"base64":"ascii",l=unescape(t.substring(e+1)),p=Buffer.from(l,u);return p.type=i,p.typeFull=s,p.charset=o,p}var XO,YO=Tt(()=>{a(l4,"dataUriToBuffer");XO=l4});var eC=N((xf,QO)=>{(function(t,e){typeof xf=="object"&&typeof QO<"u"?e(xf):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(xf,(function(t){"use strict";function e(){}a(e,"noop");function n(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(n,"typeIsObject");let o=e;function r(c,d){try{Object.defineProperty(c,"name",{value:d,configurable:!0})}catch{}}a(r,"setFunctionName");let i=Promise,s=Promise.prototype.then,u=Promise.reject.bind(i);function l(c){return new i(c)}a(l,"newPromise");function p(c){return l(d=>d(c))}a(p,"promiseResolvedWith");function f(c){return u(c)}a(f,"promiseRejectedWith");function y(c,d,g){return s.call(c,d,g)}a(y,"PerformPromiseThen");function m(c,d,g){y(y(c,d,g),void 0,o)}a(m,"uponPromise");function h(c,d){m(c,d)}a(h,"uponFulfillment");function _(c,d){m(c,void 0,d)}a(_,"uponRejection");function E(c,d,g){return y(c,d,g)}a(E,"transformPromiseWith");function P(c){y(c,void 0,o)}a(P,"setPromiseIsHandledToTrue");let x=a(c=>{if(typeof queueMicrotask=="function")x=queueMicrotask;else{let d=p(void 0);x=a(g=>y(d,g),"_queueMicrotask")}return x(c)},"_queueMicrotask");function z(c,d,g){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,d,g)}a(z,"reflectCall");function M(c,d,g){try{return p(z(c,d,g))}catch(S){return f(S)}}a(M,"promiseCall");let K=16384;class Z{static{a(this,"SimpleQueue")}constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(d){let g=this._back,S=g;g._elements.length===K-1&&(S={_elements:[],_next:void 0}),g._elements.push(d),S!==g&&(this._back=S,g._next=S),++this._size}shift(){let d=this._front,g=d,S=this._cursor,I=S+1,L=d._elements,V=L[S];return I===K&&(g=d._next,I=0),--this._size,this._cursor=I,d!==g&&(this._front=g),L[S]=void 0,V}forEach(d){let g=this._cursor,S=this._front,I=S._elements;for(;(g!==I.length||S._next!==void 0)&&!(g===I.length&&(S=S._next,I=S._elements,g=0,I.length===0));)d(I[g]),++g}peek(){let d=this._front,g=this._cursor;return d._elements[g]}}let J=Symbol("[[AbortSteps]]"),ee=Symbol("[[ErrorSteps]]"),ae=Symbol("[[CancelSteps]]"),Y=Symbol("[[PullSteps]]"),ze=Symbol("[[ReleaseSteps]]");function se(c,d){c._ownerReadableStream=d,d._reader=c,d._state==="readable"?X(c):d._state==="closed"?de(c):ue(c,d._storedError)}a(se,"ReadableStreamReaderGenericInitialize");function G(c,d){let g=c._ownerReadableStream;return zr(g,d)}a(G,"ReadableStreamReaderGenericCancel");function H(c){let d=c._ownerReadableStream;d._state==="readable"?Ce(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):De(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),d._readableStreamController[ze](),d._reader=void 0,c._ownerReadableStream=void 0}a(H,"ReadableStreamReaderGenericRelease");function re(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(re,"readerLockException");function X(c){c._closedPromise=l((d,g)=>{c._closedPromise_resolve=d,c._closedPromise_reject=g})}a(X,"defaultReaderClosedPromiseInitialize");function ue(c,d){X(c),Ce(c,d)}a(ue,"defaultReaderClosedPromiseInitializeAsRejected");function de(c){X(c),Je(c)}a(de,"defaultReaderClosedPromiseInitializeAsResolved");function Ce(c,d){c._closedPromise_reject!==void 0&&(P(c._closedPromise),c._closedPromise_reject(d),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(Ce,"defaultReaderClosedPromiseReject");function De(c,d){ue(c,d)}a(De,"defaultReaderClosedPromiseResetToRejected");function Je(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(Je,"defaultReaderClosedPromiseResolve");let tt=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},xt=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function ie(c){return typeof c=="object"||typeof c=="function"}a(ie,"isDictionary");function dt(c,d){if(c!==void 0&&!ie(c))throw new TypeError(`${d} is not an object.`)}a(dt,"assertDictionary");function ft(c,d){if(typeof c!="function")throw new TypeError(`${d} is not a function.`)}a(ft,"assertFunction");function er(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(er,"isObject");function He(c,d){if(!er(c))throw new TypeError(`${d} is not an object.`)}a(He,"assertObject");function Ke(c,d,g){if(c===void 0)throw new TypeError(`Parameter ${d} is required in '${g}'.`)}a(Ke,"assertRequiredArgument");function b(c,d,g){if(c===void 0)throw new TypeError(`${d} is required in '${g}'.`)}a(b,"assertRequiredField");function T(c){return Number(c)}a(T,"convertUnrestrictedDouble");function A(c){return c===0?0:c}a(A,"censorNegativeZero");function U(c){return A(xt(c))}a(U,"integerPart");function O(c,d){let S=Number.MAX_SAFE_INTEGER,I=Number(c);if(I=A(I),!tt(I))throw new TypeError(`${d} is not a finite number`);if(I=U(I),I<0||I>S)throw new TypeError(`${d} is outside the accepted range of 0 to ${S}, inclusive`);return!tt(I)||I===0?0:I}a(O,"convertUnsignedLongLongWithEnforceRange");function k(c,d){if(!Hn(c))throw new TypeError(`${d} is not a ReadableStream.`)}a(k,"assertReadableStream");function F(c){return new W(c)}a(F,"AcquireReadableStreamDefaultReader");function R(c,d){c._reader._readRequests.push(d)}a(R,"ReadableStreamAddReadRequest");function $(c,d,g){let I=c._reader._readRequests.shift();g?I._closeSteps():I._chunkSteps(d)}a($,"ReadableStreamFulfillReadRequest");function j(c){return c._reader._readRequests.length}a(j,"ReadableStreamGetNumReadRequests");function D(c){let d=c._reader;return!(d===void 0||!pe(d))}a(D,"ReadableStreamHasDefaultReader");class W{static{a(this,"ReadableStreamDefaultReader")}constructor(d){if(Ke(d,1,"ReadableStreamDefaultReader"),k(d,"First parameter"),Gn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");se(this,d),this._readRequests=new Z}get closed(){return pe(this)?this._closedPromise:f(at("closed"))}cancel(d=void 0){return pe(this)?this._ownerReadableStream===void 0?f(re("cancel")):G(this,d):f(at("cancel"))}read(){if(!pe(this))return f(at("read"));if(this._ownerReadableStream===void 0)return f(re("read from"));let d,g,S=l((L,V)=>{d=L,g=V});return me(this,{_chunkSteps:a(L=>d({value:L,done:!1}),"_chunkSteps"),_closeSteps:a(()=>d({value:void 0,done:!0}),"_closeSteps"),_errorSteps:a(L=>g(L),"_errorSteps")}),S}releaseLock(){if(!pe(this))throw at("releaseLock");this._ownerReadableStream!==void 0&&qe(this)}}Object.defineProperties(W.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(W.prototype.cancel,"cancel"),r(W.prototype.read,"read"),r(W.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(W.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function pe(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof W}a(pe,"IsReadableStreamDefaultReader");function me(c,d){let g=c._ownerReadableStream;g._disturbed=!0,g._state==="closed"?d._closeSteps():g._state==="errored"?d._errorSteps(g._storedError):g._readableStreamController[Y](d)}a(me,"ReadableStreamDefaultReaderRead");function qe(c){H(c);let d=new TypeError("Reader was released");it(c,d)}a(qe,"ReadableStreamDefaultReaderRelease");function it(c,d){let g=c._readRequests;c._readRequests=new Z,g.forEach(S=>{S._errorSteps(d)})}a(it,"ReadableStreamDefaultReaderErrorReadRequests");function at(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(at,"defaultReaderBrandCheckException");let Fe=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ze{static{a(this,"ReadableStreamAsyncIteratorImpl")}constructor(d,g){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=d,this._preventCancel=g}next(){let d=a(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?E(this._ongoingPromise,d,d):d(),this._ongoingPromise}return(d){let g=a(()=>this._returnSteps(d),"returnSteps");return this._ongoingPromise?E(this._ongoingPromise,g,g):g()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let d=this._reader,g,S,I=l((V,le)=>{g=V,S=le});return me(d,{_chunkSteps:a(V=>{this._ongoingPromise=void 0,x(()=>g({value:V,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,H(d),g({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(V=>{this._ongoingPromise=void 0,this._isFinished=!0,H(d),S(V)},"_errorSteps")}),I}_returnSteps(d){if(this._isFinished)return Promise.resolve({value:d,done:!0});this._isFinished=!0;let g=this._reader;if(!this._preventCancel){let S=G(g,d);return H(g),E(S,()=>({value:d,done:!0}))}return H(g),p({value:d,done:!0})}}let vt={next(){return Si(this)?this._asyncIteratorImpl.next():f(Ei("next"))},return(c){return Si(this)?this._asyncIteratorImpl.return(c):f(Ei("return"))}};Object.setPrototypeOf(vt,Fe);function bi(c,d){let g=F(c),S=new Ze(g,d),I=Object.create(vt);return I._asyncIteratorImpl=S,I}a(bi,"AcquireReadableStreamAsyncIterator");function Si(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Ze}catch{return!1}}a(Si,"IsReadableStreamAsyncIterator");function Ei(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a(Ei,"streamAsyncIteratorBrandCheckException");let tr=Number.isNaN||function(c){return c!==c};var yn,zt,bt;function Xe(c){return c.slice()}a(Xe,"CreateArrayFromList");function mP(c,d,g,S,I){new Uint8Array(c).set(new Uint8Array(g,S,I),d)}a(mP,"CopyDataBlockBytes");let _n=a(c=>(typeof c.transfer=="function"?_n=a(d=>d.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?_n=a(d=>structuredClone(d,{transfer:[d]}),"TransferArrayBuffer"):_n=a(d=>d,"TransferArrayBuffer"),_n(c)),"TransferArrayBuffer"),Bn=a(c=>(typeof c.detached=="boolean"?Bn=a(d=>d.detached,"IsDetachedBuffer"):Bn=a(d=>d.byteLength===0,"IsDetachedBuffer"),Bn(c)),"IsDetachedBuffer");function hP(c,d,g){if(c.slice)return c.slice(d,g);let S=g-d,I=new ArrayBuffer(S);return mP(I,0,c,d,S),I}a(hP,"ArrayBufferSlice");function Vu(c,d){let g=c[d];if(g!=null){if(typeof g!="function")throw new TypeError(`${String(d)} is not a function`);return g}}a(Vu,"GetMethod");function DN(c){let d={[Symbol.iterator]:()=>c.iterator},g=(async function*(){return yield*d})(),S=g.next;return{iterator:g,nextMethod:S,done:!1}}a(DN,"CreateAsyncFromSyncIterator");let Km=(bt=(yn=Symbol.asyncIterator)!==null&&yn!==void 0?yn:(zt=Symbol.for)===null||zt===void 0?void 0:zt.call(Symbol,"Symbol.asyncIterator"))!==null&&bt!==void 0?bt:"@@asyncIterator";function gP(c,d="sync",g){if(g===void 0)if(d==="async"){if(g=Vu(c,Km),g===void 0){let L=Vu(c,Symbol.iterator),V=gP(c,"sync",L);return DN(V)}}else g=Vu(c,Symbol.iterator);if(g===void 0)throw new TypeError("The object is not iterable");let S=z(g,c,[]);if(!n(S))throw new TypeError("The iterator method must return an object");let I=S.next;return{iterator:S,nextMethod:I,done:!1}}a(gP,"GetIterator");function UN(c){let d=z(c.nextMethod,c.iterator,[]);if(!n(d))throw new TypeError("The iterator.next() method must return an object");return d}a(UN,"IteratorNext");function MN(c){return!!c.done}a(MN,"IteratorComplete");function jN(c){return c.value}a(jN,"IteratorValue");function LN(c){return!(typeof c!="number"||tr(c)||c<0)}a(LN,"IsNonNegativeNumber");function yP(c){let d=hP(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(d)}a(yP,"CloneAsUint8Array");function Xm(c){let d=c._queue.shift();return c._queueTotalSize-=d.size,c._queueTotalSize<0&&(c._queueTotalSize=0),d.value}a(Xm,"DequeueValue");function Ym(c,d,g){if(!LN(g)||g===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:d,size:g}),c._queueTotalSize+=g}a(Ym,"EnqueueValueWithSize");function FN(c){return c._queue.peek().value}a(FN,"PeekQueueValue");function qn(c){c._queue=new Z,c._queueTotalSize=0}a(qn,"ResetQueue");function _P(c){return c===DataView}a(_P,"isDataViewConstructor");function BN(c){return _P(c.constructor)}a(BN,"isDataView");function qN(c){return _P(c)?1:c.BYTES_PER_ELEMENT}a(qN,"arrayBufferViewElementSize");class Ro{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Qm(this))throw oh("view");return this._view}respond(d){if(!Qm(this))throw oh("respond");if(Ke(d,1,"respond"),d=O(d,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Bn(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");Wu(this._associatedReadableByteStreamController,d)}respondWithNewView(d){if(!Qm(this))throw oh("respondWithNewView");if(Ke(d,1,"respondWithNewView"),!ArrayBuffer.isView(d))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Bn(d.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Ju(this._associatedReadableByteStreamController,d)}}Object.defineProperties(Ro.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(Ro.prototype.respond,"respond"),r(Ro.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ro.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class vn{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Oo(this))throw Ya("byobRequest");return nh(this)}get desiredSize(){if(!Oo(this))throw Ya("desiredSize");return IP(this)}close(){if(!Oo(this))throw Ya("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let d=this._controlledReadableByteStream._state;if(d!=="readable")throw new TypeError(`The stream (in ${d} state) is not in the readable state and cannot be closed`);Xa(this)}enqueue(d){if(!Oo(this))throw Ya("enqueue");if(Ke(d,1,"enqueue"),!ArrayBuffer.isView(d))throw new TypeError("chunk must be an array buffer view");if(d.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(d.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let g=this._controlledReadableByteStream._state;if(g!=="readable")throw new TypeError(`The stream (in ${g} state) is not in the readable state and cannot be enqueued to`);Gu(this,d)}error(d=void 0){if(!Oo(this))throw Ya("error");br(this,d)}[ae](d){vP(this),qn(this);let g=this._cancelAlgorithm(d);return Hu(this),g}[Y](d){let g=this._controlledReadableByteStream;if(this._queueTotalSize>0){wP(this,d);return}let S=this._autoAllocateChunkSize;if(S!==void 0){let I;try{I=new ArrayBuffer(S)}catch(V){d._errorSteps(V);return}let L={buffer:I,bufferByteLength:S,byteOffset:0,byteLength:S,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(L)}R(g,d),Co(this)}[ze](){if(this._pendingPullIntos.length>0){let d=this._pendingPullIntos.peek();d.readerType="none",this._pendingPullIntos=new Z,this._pendingPullIntos.push(d)}}}Object.defineProperties(vn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),r(vn.prototype.close,"close"),r(vn.prototype.enqueue,"enqueue"),r(vn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(vn.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Oo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof vn}a(Oo,"IsReadableByteStreamController");function Qm(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof Ro}a(Qm,"IsReadableStreamBYOBRequest");function Co(c){if(!WN(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let g=c._pullAlgorithm();m(g,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,Co(c)),null),S=>(br(c,S),null))}a(Co,"ReadableByteStreamControllerCallPullIfNeeded");function vP(c){th(c),c._pendingPullIntos=new Z}a(vP,"ReadableByteStreamControllerClearPendingPullIntos");function eh(c,d){let g=!1;c._state==="closed"&&(g=!0);let S=bP(d);d.readerType==="default"?$(c,S,g):ez(c,S,g)}a(eh,"ReadableByteStreamControllerCommitPullIntoDescriptor");function bP(c){let d=c.bytesFilled,g=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,d/g)}a(bP,"ReadableByteStreamControllerConvertPullIntoDescriptor");function Zu(c,d,g,S){c._queue.push({buffer:d,byteOffset:g,byteLength:S}),c._queueTotalSize+=S}a(Zu,"ReadableByteStreamControllerEnqueueChunkToQueue");function SP(c,d,g,S){let I;try{I=hP(d,g,g+S)}catch(L){throw br(c,L),L}Zu(c,I,0,S)}a(SP,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function EP(c,d){d.bytesFilled>0&&SP(c,d.buffer,d.byteOffset,d.bytesFilled),Pi(c)}a(EP,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function PP(c,d){let g=Math.min(c._queueTotalSize,d.byteLength-d.bytesFilled),S=d.bytesFilled+g,I=g,L=!1,V=S%d.elementSize,le=S-V;le>=d.minimumFill&&(I=le-d.bytesFilled,L=!0);let xe=c._queue;for(;I>0;){let he=xe.peek(),Ie=Math.min(I,he.byteLength),Ue=d.byteOffset+d.bytesFilled;mP(d.buffer,Ue,he.buffer,he.byteOffset,Ie),he.byteLength===Ie?xe.shift():(he.byteOffset+=Ie,he.byteLength-=Ie),c._queueTotalSize-=Ie,xP(c,Ie,d),I-=Ie}return L}a(PP,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function xP(c,d,g){g.bytesFilled+=d}a(xP,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function TP(c){c._queueTotalSize===0&&c._closeRequested?(Hu(c),os(c._controlledReadableByteStream)):Co(c)}a(TP,"ReadableByteStreamControllerHandleQueueDrain");function th(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(th,"ReadableByteStreamControllerInvalidateBYOBRequest");function rh(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let d=c._pendingPullIntos.peek();PP(c,d)&&(Pi(c),eh(c._controlledReadableByteStream,d))}}a(rh,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function VN(c){let d=c._controlledReadableByteStream._reader;for(;d._readRequests.length>0;){if(c._queueTotalSize===0)return;let g=d._readRequests.shift();wP(c,g)}}a(VN,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function ZN(c,d,g,S){let I=c._controlledReadableByteStream,L=d.constructor,V=qN(L),{byteOffset:le,byteLength:xe}=d,he=g*V,Ie;try{Ie=_n(d.buffer)}catch(rt){S._errorSteps(rt);return}let Ue={buffer:Ie,bufferByteLength:Ie.byteLength,byteOffset:le,byteLength:xe,bytesFilled:0,minimumFill:he,elementSize:V,viewConstructor:L,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(Ue),CP(I,S);return}if(I._state==="closed"){let rt=new L(Ue.buffer,Ue.byteOffset,0);S._closeSteps(rt);return}if(c._queueTotalSize>0){if(PP(c,Ue)){let rt=bP(Ue);TP(c),S._chunkSteps(rt);return}if(c._closeRequested){let rt=new TypeError("Insufficient bytes to fill elements in the given buffer");br(c,rt),S._errorSteps(rt);return}}c._pendingPullIntos.push(Ue),CP(I,S),Co(c)}a(ZN,"ReadableByteStreamControllerPullInto");function HN(c,d){d.readerType==="none"&&Pi(c);let g=c._controlledReadableByteStream;if(ih(g))for(;$P(g)>0;){let S=Pi(c);eh(g,S)}}a(HN,"ReadableByteStreamControllerRespondInClosedState");function GN(c,d,g){if(xP(c,d,g),g.readerType==="none"){EP(c,g),rh(c);return}if(g.bytesFilled<g.minimumFill)return;Pi(c);let S=g.bytesFilled%g.elementSize;if(S>0){let I=g.byteOffset+g.bytesFilled;SP(c,g.buffer,I-S,S)}g.bytesFilled-=S,eh(c._controlledReadableByteStream,g),rh(c)}a(GN,"ReadableByteStreamControllerRespondInReadableState");function AP(c,d){let g=c._pendingPullIntos.peek();th(c),c._controlledReadableByteStream._state==="closed"?HN(c,g):GN(c,d,g),Co(c)}a(AP,"ReadableByteStreamControllerRespondInternal");function Pi(c){return c._pendingPullIntos.shift()}a(Pi,"ReadableByteStreamControllerShiftPendingPullInto");function WN(c){let d=c._controlledReadableByteStream;return d._state!=="readable"||c._closeRequested||!c._started?!1:!!(D(d)&&j(d)>0||ih(d)&&$P(d)>0||IP(c)>0)}a(WN,"ReadableByteStreamControllerShouldCallPull");function Hu(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(Hu,"ReadableByteStreamControllerClearAlgorithms");function Xa(c){let d=c._controlledReadableByteStream;if(!(c._closeRequested||d._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){let g=c._pendingPullIntos.peek();if(g.bytesFilled%g.elementSize!==0){let S=new TypeError("Insufficient bytes to fill elements in the given buffer");throw br(c,S),S}}Hu(c),os(d)}}a(Xa,"ReadableByteStreamControllerClose");function Gu(c,d){let g=c._controlledReadableByteStream;if(c._closeRequested||g._state!=="readable")return;let{buffer:S,byteOffset:I,byteLength:L}=d;if(Bn(S))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let V=_n(S);if(c._pendingPullIntos.length>0){let le=c._pendingPullIntos.peek();if(Bn(le.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");th(c),le.buffer=_n(le.buffer),le.readerType==="none"&&EP(c,le)}if(D(g))if(VN(c),j(g)===0)Zu(c,V,I,L);else{c._pendingPullIntos.length>0&&Pi(c);let le=new Uint8Array(V,I,L);$(g,le,!1)}else ih(g)?(Zu(c,V,I,L),rh(c)):Zu(c,V,I,L);Co(c)}a(Gu,"ReadableByteStreamControllerEnqueue");function br(c,d){let g=c._controlledReadableByteStream;g._state==="readable"&&(vP(c),qn(c),Hu(c),rx(g,d))}a(br,"ReadableByteStreamControllerError");function wP(c,d){let g=c._queue.shift();c._queueTotalSize-=g.byteLength,TP(c);let S=new Uint8Array(g.buffer,g.byteOffset,g.byteLength);d._chunkSteps(S)}a(wP,"ReadableByteStreamControllerFillReadRequestFromQueue");function nh(c){if(c._byobRequest===null&&c._pendingPullIntos.length>0){let d=c._pendingPullIntos.peek(),g=new Uint8Array(d.buffer,d.byteOffset+d.bytesFilled,d.byteLength-d.bytesFilled),S=Object.create(Ro.prototype);KN(S,c,g),c._byobRequest=S}return c._byobRequest}a(nh,"ReadableByteStreamControllerGetBYOBRequest");function IP(c){let d=c._controlledReadableByteStream._state;return d==="errored"?null:d==="closed"?0:c._strategyHWM-c._queueTotalSize}a(IP,"ReadableByteStreamControllerGetDesiredSize");function Wu(c,d){let g=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(d!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(d===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(g.bytesFilled+d>g.byteLength)throw new RangeError("bytesWritten out of range")}g.buffer=_n(g.buffer),AP(c,d)}a(Wu,"ReadableByteStreamControllerRespond");function Ju(c,d){let g=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(d.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(d.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(g.byteOffset+g.bytesFilled!==d.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(g.bufferByteLength!==d.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(g.bytesFilled+d.byteLength>g.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let I=d.byteLength;g.buffer=_n(d.buffer),AP(c,I)}a(Ju,"ReadableByteStreamControllerRespondWithNewView");function RP(c,d,g,S,I,L,V){d._controlledReadableByteStream=c,d._pullAgain=!1,d._pulling=!1,d._byobRequest=null,d._queue=d._queueTotalSize=void 0,qn(d),d._closeRequested=!1,d._started=!1,d._strategyHWM=L,d._pullAlgorithm=S,d._cancelAlgorithm=I,d._autoAllocateChunkSize=V,d._pendingPullIntos=new Z,c._readableStreamController=d;let le=g();m(p(le),()=>(d._started=!0,Co(d),null),xe=>(br(d,xe),null))}a(RP,"SetUpReadableByteStreamController");function JN(c,d,g){let S=Object.create(vn.prototype),I,L,V;d.start!==void 0?I=a(()=>d.start(S),"startAlgorithm"):I=a(()=>{},"startAlgorithm"),d.pull!==void 0?L=a(()=>d.pull(S),"pullAlgorithm"):L=a(()=>p(void 0),"pullAlgorithm"),d.cancel!==void 0?V=a(xe=>d.cancel(xe),"cancelAlgorithm"):V=a(()=>p(void 0),"cancelAlgorithm");let le=d.autoAllocateChunkSize;if(le===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");RP(c,S,I,L,V,g,le)}a(JN,"SetUpReadableByteStreamControllerFromUnderlyingSource");function KN(c,d,g){c._associatedReadableByteStreamController=d,c._view=g}a(KN,"SetUpReadableStreamBYOBRequest");function oh(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(oh,"byobRequestBrandCheckException");function Ya(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(Ya,"byteStreamControllerBrandCheckException");function XN(c,d){dt(c,d);let g=c?.mode;return{mode:g===void 0?void 0:YN(g,`${d} has member 'mode' that`)}}a(XN,"convertReaderOptions");function YN(c,d){if(c=`${c}`,c!=="byob")throw new TypeError(`${d} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(YN,"convertReadableStreamReaderMode");function QN(c,d){var g;dt(c,d);let S=(g=c?.min)!==null&&g!==void 0?g:1;return{min:O(S,`${d} has member 'min' that`)}}a(QN,"convertByobReadOptions");function OP(c){return new Vn(c)}a(OP,"AcquireReadableStreamBYOBReader");function CP(c,d){c._reader._readIntoRequests.push(d)}a(CP,"ReadableStreamAddReadIntoRequest");function ez(c,d,g){let I=c._reader._readIntoRequests.shift();g?I._closeSteps(d):I._chunkSteps(d)}a(ez,"ReadableStreamFulfillReadIntoRequest");function $P(c){return c._reader._readIntoRequests.length}a($P,"ReadableStreamGetNumReadIntoRequests");function ih(c){let d=c._reader;return!(d===void 0||!$o(d))}a(ih,"ReadableStreamHasBYOBReader");class Vn{static{a(this,"ReadableStreamBYOBReader")}constructor(d){if(Ke(d,1,"ReadableStreamBYOBReader"),k(d,"First parameter"),Gn(d))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Oo(d._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");se(this,d),this._readIntoRequests=new Z}get closed(){return $o(this)?this._closedPromise:f(Ku("closed"))}cancel(d=void 0){return $o(this)?this._ownerReadableStream===void 0?f(re("cancel")):G(this,d):f(Ku("cancel"))}read(d,g={}){if(!$o(this))return f(Ku("read"));if(!ArrayBuffer.isView(d))return f(new TypeError("view must be an array buffer view"));if(d.byteLength===0)return f(new TypeError("view must have non-zero byteLength"));if(d.buffer.byteLength===0)return f(new TypeError("view's buffer must have non-zero byteLength"));if(Bn(d.buffer))return f(new TypeError("view's buffer has been detached"));let S;try{S=QN(g,"options")}catch(he){return f(he)}let I=S.min;if(I===0)return f(new TypeError("options.min must be greater than 0"));if(BN(d)){if(I>d.byteLength)return f(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(I>d.length)return f(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return f(re("read from"));let L,V,le=l((he,Ie)=>{L=he,V=Ie});return kP(this,d,I,{_chunkSteps:a(he=>L({value:he,done:!1}),"_chunkSteps"),_closeSteps:a(he=>L({value:he,done:!0}),"_closeSteps"),_errorSteps:a(he=>V(he),"_errorSteps")}),le}releaseLock(){if(!$o(this))throw Ku("releaseLock");this._ownerReadableStream!==void 0&&tz(this)}}Object.defineProperties(Vn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(Vn.prototype.cancel,"cancel"),r(Vn.prototype.read,"read"),r(Vn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Vn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function $o(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof Vn}a($o,"IsReadableStreamBYOBReader");function kP(c,d,g,S){let I=c._ownerReadableStream;I._disturbed=!0,I._state==="errored"?S._errorSteps(I._storedError):ZN(I._readableStreamController,d,g,S)}a(kP,"ReadableStreamBYOBReaderRead");function tz(c){H(c);let d=new TypeError("Reader was released");NP(c,d)}a(tz,"ReadableStreamBYOBReaderRelease");function NP(c,d){let g=c._readIntoRequests;c._readIntoRequests=new Z,g.forEach(S=>{S._errorSteps(d)})}a(NP,"ReadableStreamBYOBReaderErrorReadIntoRequests");function Ku(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(Ku,"byobReaderBrandCheckException");function Qa(c,d){let{highWaterMark:g}=c;if(g===void 0)return d;if(tr(g)||g<0)throw new RangeError("Invalid highWaterMark");return g}a(Qa,"ExtractHighWaterMark");function Xu(c){let{size:d}=c;return d||(()=>1)}a(Xu,"ExtractSizeAlgorithm");function Yu(c,d){dt(c,d);let g=c?.highWaterMark,S=c?.size;return{highWaterMark:g===void 0?void 0:T(g),size:S===void 0?void 0:rz(S,`${d} has member 'size' that`)}}a(Yu,"convertQueuingStrategy");function rz(c,d){return ft(c,d),g=>T(c(g))}a(rz,"convertQueuingStrategySize");function nz(c,d){dt(c,d);let g=c?.abort,S=c?.close,I=c?.start,L=c?.type,V=c?.write;return{abort:g===void 0?void 0:oz(g,c,`${d} has member 'abort' that`),close:S===void 0?void 0:iz(S,c,`${d} has member 'close' that`),start:I===void 0?void 0:az(I,c,`${d} has member 'start' that`),write:V===void 0?void 0:sz(V,c,`${d} has member 'write' that`),type:L}}a(nz,"convertUnderlyingSink");function oz(c,d,g){return ft(c,g),S=>M(c,d,[S])}a(oz,"convertUnderlyingSinkAbortCallback");function iz(c,d,g){return ft(c,g),()=>M(c,d,[])}a(iz,"convertUnderlyingSinkCloseCallback");function az(c,d,g){return ft(c,g),S=>z(c,d,[S])}a(az,"convertUnderlyingSinkStartCallback");function sz(c,d,g){return ft(c,g),(S,I)=>M(c,d,[S,I])}a(sz,"convertUnderlyingSinkWriteCallback");function zP(c,d){if(!xi(c))throw new TypeError(`${d} is not a WritableStream.`)}a(zP,"assertWritableStream");function cz(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(cz,"isAbortSignal");let uz=typeof AbortController=="function";function lz(){if(uz)return new AbortController}a(lz,"createAbortController");class Zn{static{a(this,"WritableStream")}constructor(d={},g={}){d===void 0?d=null:He(d,"First parameter");let S=Yu(g,"Second parameter"),I=nz(d,"First parameter");if(UP(this),I.type!==void 0)throw new RangeError("Invalid type is specified");let V=Xu(S),le=Qa(S,1);xz(this,I,le,V)}get locked(){if(!xi(this))throw nl("locked");return Ti(this)}abort(d=void 0){return xi(this)?Ti(this)?f(new TypeError("Cannot abort a stream that already has a writer")):Qu(this,d):f(nl("abort"))}close(){return xi(this)?Ti(this)?f(new TypeError("Cannot close a stream that already has a writer")):Yr(this)?f(new TypeError("Cannot close an already-closing stream")):MP(this):f(nl("close"))}getWriter(){if(!xi(this))throw nl("getWriter");return DP(this)}}Object.defineProperties(Zn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(Zn.prototype.abort,"abort"),r(Zn.prototype.close,"close"),r(Zn.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Zn.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function DP(c){return new bn(c)}a(DP,"AcquireWritableStreamDefaultWriter");function dz(c,d,g,S,I=1,L=()=>1){let V=Object.create(Zn.prototype);UP(V);let le=Object.create(Ai.prototype);return VP(V,le,c,d,g,S,I,L),V}a(dz,"CreateWritableStream");function UP(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new Z,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(UP,"InitializeWritableStream");function xi(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof Zn}a(xi,"IsWritableStream");function Ti(c){return c._writer!==void 0}a(Ti,"IsWritableStreamLocked");function Qu(c,d){var g;if(c._state==="closed"||c._state==="errored")return p(void 0);c._writableStreamController._abortReason=d,(g=c._writableStreamController._abortController)===null||g===void 0||g.abort(d);let S=c._state;if(S==="closed"||S==="errored")return p(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;let I=!1;S==="erroring"&&(I=!0,d=void 0);let L=l((V,le)=>{c._pendingAbortRequest={_promise:void 0,_resolve:V,_reject:le,_reason:d,_wasAlreadyErroring:I}});return c._pendingAbortRequest._promise=L,I||sh(c,d),L}a(Qu,"WritableStreamAbort");function MP(c){let d=c._state;if(d==="closed"||d==="errored")return f(new TypeError(`The stream (in ${d} state) is not in the writable state and cannot be closed`));let g=l((I,L)=>{let V={_resolve:I,_reject:L};c._closeRequest=V}),S=c._writer;return S!==void 0&&c._backpressure&&d==="writable"&&hh(S),Tz(c._writableStreamController),g}a(MP,"WritableStreamClose");function pz(c){return l((g,S)=>{let I={_resolve:g,_reject:S};c._writeRequests.push(I)})}a(pz,"WritableStreamAddWriteRequest");function ah(c,d){if(c._state==="writable"){sh(c,d);return}ch(c)}a(ah,"WritableStreamDealWithRejection");function sh(c,d){let g=c._writableStreamController;c._state="erroring",c._storedError=d;let S=c._writer;S!==void 0&&LP(S,d),!yz(c)&&g._started&&ch(c)}a(sh,"WritableStreamStartErroring");function ch(c){c._state="errored",c._writableStreamController[ee]();let d=c._storedError;if(c._writeRequests.forEach(I=>{I._reject(d)}),c._writeRequests=new Z,c._pendingAbortRequest===void 0){el(c);return}let g=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,g._wasAlreadyErroring){g._reject(d),el(c);return}let S=c._writableStreamController[J](g._reason);m(S,()=>(g._resolve(),el(c),null),I=>(g._reject(I),el(c),null))}a(ch,"WritableStreamFinishErroring");function fz(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(fz,"WritableStreamFinishInFlightWrite");function mz(c,d){c._inFlightWriteRequest._reject(d),c._inFlightWriteRequest=void 0,ah(c,d)}a(mz,"WritableStreamFinishInFlightWriteWithError");function hz(c){c._inFlightCloseRequest._resolve(void 0),c._inFlightCloseRequest=void 0,c._state==="erroring"&&(c._storedError=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._resolve(),c._pendingAbortRequest=void 0)),c._state="closed";let g=c._writer;g!==void 0&&WP(g)}a(hz,"WritableStreamFinishInFlightClose");function gz(c,d){c._inFlightCloseRequest._reject(d),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(d),c._pendingAbortRequest=void 0),ah(c,d)}a(gz,"WritableStreamFinishInFlightCloseWithError");function Yr(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(Yr,"WritableStreamCloseQueuedOrInFlight");function yz(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(yz,"WritableStreamHasOperationMarkedInFlight");function _z(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(_z,"WritableStreamMarkCloseRequestInFlight");function vz(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(vz,"WritableStreamMarkFirstWriteRequestInFlight");function el(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let d=c._writer;d!==void 0&&fh(d,c._storedError)}a(el,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function uh(c,d){let g=c._writer;g!==void 0&&d!==c._backpressure&&(d?$z(g):hh(g)),c._backpressure=d}a(uh,"WritableStreamUpdateBackpressure");class bn{static{a(this,"WritableStreamDefaultWriter")}constructor(d){if(Ke(d,1,"WritableStreamDefaultWriter"),zP(d,"First parameter"),Ti(d))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=d,d._writer=this;let g=d._state;if(g==="writable")!Yr(d)&&d._backpressure?il(this):JP(this),ol(this);else if(g==="erroring")mh(this,d._storedError),ol(this);else if(g==="closed")JP(this),Oz(this);else{let S=d._storedError;mh(this,S),GP(this,S)}}get closed(){return ko(this)?this._closedPromise:f(No("closed"))}get desiredSize(){if(!ko(this))throw No("desiredSize");if(this._ownerWritableStream===void 0)throw ts("desiredSize");return Pz(this)}get ready(){return ko(this)?this._readyPromise:f(No("ready"))}abort(d=void 0){return ko(this)?this._ownerWritableStream===void 0?f(ts("abort")):bz(this,d):f(No("abort"))}close(){if(!ko(this))return f(No("close"));let d=this._ownerWritableStream;return d===void 0?f(ts("close")):Yr(d)?f(new TypeError("Cannot close an already-closing stream")):jP(this)}releaseLock(){if(!ko(this))throw No("releaseLock");this._ownerWritableStream!==void 0&&FP(this)}write(d=void 0){return ko(this)?this._ownerWritableStream===void 0?f(ts("write to")):BP(this,d):f(No("write"))}}Object.defineProperties(bn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r(bn.prototype.abort,"abort"),r(bn.prototype.close,"close"),r(bn.prototype.releaseLock,"releaseLock"),r(bn.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(bn.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ko(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof bn}a(ko,"IsWritableStreamDefaultWriter");function bz(c,d){let g=c._ownerWritableStream;return Qu(g,d)}a(bz,"WritableStreamDefaultWriterAbort");function jP(c){let d=c._ownerWritableStream;return MP(d)}a(jP,"WritableStreamDefaultWriterClose");function Sz(c){let d=c._ownerWritableStream,g=d._state;return Yr(d)||g==="closed"?p(void 0):g==="errored"?f(d._storedError):jP(c)}a(Sz,"WritableStreamDefaultWriterCloseWithErrorPropagation");function Ez(c,d){c._closedPromiseState==="pending"?fh(c,d):Cz(c,d)}a(Ez,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function LP(c,d){c._readyPromiseState==="pending"?KP(c,d):kz(c,d)}a(LP,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function Pz(c){let d=c._ownerWritableStream,g=d._state;return g==="errored"||g==="erroring"?null:g==="closed"?0:ZP(d._writableStreamController)}a(Pz,"WritableStreamDefaultWriterGetDesiredSize");function FP(c){let d=c._ownerWritableStream,g=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");LP(c,g),Ez(c,g),d._writer=void 0,c._ownerWritableStream=void 0}a(FP,"WritableStreamDefaultWriterRelease");function BP(c,d){let g=c._ownerWritableStream,S=g._writableStreamController,I=Az(S,d);if(g!==c._ownerWritableStream)return f(ts("write to"));let L=g._state;if(L==="errored")return f(g._storedError);if(Yr(g)||L==="closed")return f(new TypeError("The stream is closing or closed and cannot be written to"));if(L==="erroring")return f(g._storedError);let V=pz(g);return wz(S,d,I),V}a(BP,"WritableStreamDefaultWriterWrite");let qP={};class Ai{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!lh(this))throw ph("abortReason");return this._abortReason}get signal(){if(!lh(this))throw ph("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(d=void 0){if(!lh(this))throw ph("error");this._controlledWritableStream._state==="writable"&&HP(this,d)}[J](d){let g=this._abortAlgorithm(d);return tl(this),g}[ee](){qn(this)}}Object.defineProperties(Ai.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ai.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function lh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof Ai}a(lh,"IsWritableStreamDefaultController");function VP(c,d,g,S,I,L,V,le){d._controlledWritableStream=c,c._writableStreamController=d,d._queue=void 0,d._queueTotalSize=void 0,qn(d),d._abortReason=void 0,d._abortController=lz(),d._started=!1,d._strategySizeAlgorithm=le,d._strategyHWM=V,d._writeAlgorithm=S,d._closeAlgorithm=I,d._abortAlgorithm=L;let xe=dh(d);uh(c,xe);let he=g(),Ie=p(he);m(Ie,()=>(d._started=!0,rl(d),null),Ue=>(d._started=!0,ah(c,Ue),null))}a(VP,"SetUpWritableStreamDefaultController");function xz(c,d,g,S){let I=Object.create(Ai.prototype),L,V,le,xe;d.start!==void 0?L=a(()=>d.start(I),"startAlgorithm"):L=a(()=>{},"startAlgorithm"),d.write!==void 0?V=a(he=>d.write(he,I),"writeAlgorithm"):V=a(()=>p(void 0),"writeAlgorithm"),d.close!==void 0?le=a(()=>d.close(),"closeAlgorithm"):le=a(()=>p(void 0),"closeAlgorithm"),d.abort!==void 0?xe=a(he=>d.abort(he),"abortAlgorithm"):xe=a(()=>p(void 0),"abortAlgorithm"),VP(c,I,L,V,le,xe,g,S)}a(xz,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function tl(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(tl,"WritableStreamDefaultControllerClearAlgorithms");function Tz(c){Ym(c,qP,0),rl(c)}a(Tz,"WritableStreamDefaultControllerClose");function Az(c,d){try{return c._strategySizeAlgorithm(d)}catch(g){return es(c,g),1}}a(Az,"WritableStreamDefaultControllerGetChunkSize");function ZP(c){return c._strategyHWM-c._queueTotalSize}a(ZP,"WritableStreamDefaultControllerGetDesiredSize");function wz(c,d,g){try{Ym(c,d,g)}catch(I){es(c,I);return}let S=c._controlledWritableStream;if(!Yr(S)&&S._state==="writable"){let I=dh(c);uh(S,I)}rl(c)}a(wz,"WritableStreamDefaultControllerWrite");function rl(c){let d=c._controlledWritableStream;if(!c._started||d._inFlightWriteRequest!==void 0)return;if(d._state==="erroring"){ch(d);return}if(c._queue.length===0)return;let S=FN(c);S===qP?Iz(c):Rz(c,S)}a(rl,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function es(c,d){c._controlledWritableStream._state==="writable"&&HP(c,d)}a(es,"WritableStreamDefaultControllerErrorIfNeeded");function Iz(c){let d=c._controlledWritableStream;_z(d),Xm(c);let g=c._closeAlgorithm();tl(c),m(g,()=>(hz(d),null),S=>(gz(d,S),null))}a(Iz,"WritableStreamDefaultControllerProcessClose");function Rz(c,d){let g=c._controlledWritableStream;vz(g);let S=c._writeAlgorithm(d);m(S,()=>{fz(g);let I=g._state;if(Xm(c),!Yr(g)&&I==="writable"){let L=dh(c);uh(g,L)}return rl(c),null},I=>(g._state==="writable"&&tl(c),mz(g,I),null))}a(Rz,"WritableStreamDefaultControllerProcessWrite");function dh(c){return ZP(c)<=0}a(dh,"WritableStreamDefaultControllerGetBackpressure");function HP(c,d){let g=c._controlledWritableStream;tl(c),sh(g,d)}a(HP,"WritableStreamDefaultControllerError");function nl(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(nl,"streamBrandCheckException$2");function ph(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(ph,"defaultControllerBrandCheckException$2");function No(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(No,"defaultWriterBrandCheckException");function ts(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(ts,"defaultWriterLockException");function ol(c){c._closedPromise=l((d,g)=>{c._closedPromise_resolve=d,c._closedPromise_reject=g,c._closedPromiseState="pending"})}a(ol,"defaultWriterClosedPromiseInitialize");function GP(c,d){ol(c),fh(c,d)}a(GP,"defaultWriterClosedPromiseInitializeAsRejected");function Oz(c){ol(c),WP(c)}a(Oz,"defaultWriterClosedPromiseInitializeAsResolved");function fh(c,d){c._closedPromise_reject!==void 0&&(P(c._closedPromise),c._closedPromise_reject(d),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(fh,"defaultWriterClosedPromiseReject");function Cz(c,d){GP(c,d)}a(Cz,"defaultWriterClosedPromiseResetToRejected");function WP(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="resolved")}a(WP,"defaultWriterClosedPromiseResolve");function il(c){c._readyPromise=l((d,g)=>{c._readyPromise_resolve=d,c._readyPromise_reject=g}),c._readyPromiseState="pending"}a(il,"defaultWriterReadyPromiseInitialize");function mh(c,d){il(c),KP(c,d)}a(mh,"defaultWriterReadyPromiseInitializeAsRejected");function JP(c){il(c),hh(c)}a(JP,"defaultWriterReadyPromiseInitializeAsResolved");function KP(c,d){c._readyPromise_reject!==void 0&&(P(c._readyPromise),c._readyPromise_reject(d),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(KP,"defaultWriterReadyPromiseReject");function $z(c){il(c)}a($z,"defaultWriterReadyPromiseReset");function kz(c,d){mh(c,d)}a(kz,"defaultWriterReadyPromiseResetToRejected");function hh(c){c._readyPromise_resolve!==void 0&&(c._readyPromise_resolve(void 0),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="fulfilled")}a(hh,"defaultWriterReadyPromiseResolve");function Nz(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(Nz,"getGlobals");let gh=Nz();function zz(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(zz,"isDOMExceptionConstructor");function Dz(){let c=gh?.DOMException;return zz(c)?c:void 0}a(Dz,"getFromGlobal");function Uz(){let c=a(function(g,S){this.message=g||"",this.name=S||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)},"DOMException");return r(c,"DOMException"),c.prototype=Object.create(Error.prototype),Object.defineProperty(c.prototype,"constructor",{value:c,writable:!0,configurable:!0}),c}a(Uz,"createPolyfill");let Mz=Dz()||Uz();function XP(c,d,g,S,I,L){let V=F(c),le=DP(d);c._disturbed=!0;let xe=!1,he=p(void 0);return l((Ie,Ue)=>{let rt;if(L!==void 0){if(rt=a(()=>{let ye=L.reason!==void 0?L.reason:new Mz("Aborted","AbortError"),je=[];S||je.push(()=>d._state==="writable"?Qu(d,ye):p(void 0)),I||je.push(()=>c._state==="readable"?zr(c,ye):p(void 0)),Vt(()=>Promise.all(je.map(nt=>nt())),!0,ye)},"abortAlgorithm"),L.aborted){rt();return}L.addEventListener("abort",rt)}function Dr(){return l((ye,je)=>{function nt(rr){rr?ye():y(Oi(),nt,je)}a(nt,"next"),nt(!1)})}a(Dr,"pipeLoop");function Oi(){return xe?p(!0):y(le._readyPromise,()=>l((ye,je)=>{me(V,{_chunkSteps:a(nt=>{he=y(BP(le,nt),void 0,e),ye(!1)},"_chunkSteps"),_closeSteps:a(()=>ye(!0),"_closeSteps"),_errorSteps:je})}))}if(a(Oi,"pipeStep"),En(c,V._closedPromise,ye=>(S?Sr(!0,ye):Vt(()=>Qu(d,ye),!0,ye),null)),En(d,le._closedPromise,ye=>(I?Sr(!0,ye):Vt(()=>zr(c,ye),!0,ye),null)),jt(c,V._closedPromise,()=>(g?Sr():Vt(()=>Sz(le)),null)),Yr(d)||d._state==="closed"){let ye=new TypeError("the destination writable stream closed before all data could be piped to it");I?Sr(!0,ye):Vt(()=>zr(c,ye),!0,ye)}P(Dr());function Jn(){let ye=he;return y(he,()=>ye!==he?Jn():void 0)}a(Jn,"waitForWritesToFinish");function En(ye,je,nt){ye._state==="errored"?nt(ye._storedError):_(je,nt)}a(En,"isOrBecomesErrored");function jt(ye,je,nt){ye._state==="closed"?nt():h(je,nt)}a(jt,"isOrBecomesClosed");function Vt(ye,je,nt){if(xe)return;xe=!0,d._state==="writable"&&!Yr(d)?h(Jn(),rr):rr();function rr(){return m(ye(),()=>Pn(je,nt),Ci=>Pn(!0,Ci)),null}a(rr,"doTheRest")}a(Vt,"shutdownWithAction");function Sr(ye,je){xe||(xe=!0,d._state==="writable"&&!Yr(d)?h(Jn(),()=>Pn(ye,je)):Pn(ye,je))}a(Sr,"shutdown");function Pn(ye,je){return FP(le),H(V),L!==void 0&&L.removeEventListener("abort",rt),ye?Ue(je):Ie(void 0),null}a(Pn,"finalize")})}a(XP,"ReadableStreamPipeTo");class Sn{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!al(this))throw cl("desiredSize");return yh(this)}close(){if(!al(this))throw cl("close");if(!Ii(this))throw new TypeError("The stream is not in a state that permits close");zo(this)}enqueue(d=void 0){if(!al(this))throw cl("enqueue");if(!Ii(this))throw new TypeError("The stream is not in a state that permits enqueue");return wi(this,d)}error(d=void 0){if(!al(this))throw cl("error");Nr(this,d)}[ae](d){qn(this);let g=this._cancelAlgorithm(d);return sl(this),g}[Y](d){let g=this._controlledReadableStream;if(this._queue.length>0){let S=Xm(this);this._closeRequested&&this._queue.length===0?(sl(this),os(g)):rs(this),d._chunkSteps(S)}else R(g,d),rs(this)}[ze](){}}Object.defineProperties(Sn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Sn.prototype.close,"close"),r(Sn.prototype.enqueue,"enqueue"),r(Sn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Sn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function al(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof Sn}a(al,"IsReadableStreamDefaultController");function rs(c){if(!YP(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let g=c._pullAlgorithm();m(g,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,rs(c)),null),S=>(Nr(c,S),null))}a(rs,"ReadableStreamDefaultControllerCallPullIfNeeded");function YP(c){let d=c._controlledReadableStream;return!Ii(c)||!c._started?!1:!!(Gn(d)&&j(d)>0||yh(c)>0)}a(YP,"ReadableStreamDefaultControllerShouldCallPull");function sl(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(sl,"ReadableStreamDefaultControllerClearAlgorithms");function zo(c){if(!Ii(c))return;let d=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(sl(c),os(d))}a(zo,"ReadableStreamDefaultControllerClose");function wi(c,d){if(!Ii(c))return;let g=c._controlledReadableStream;if(Gn(g)&&j(g)>0)$(g,d,!1);else{let S;try{S=c._strategySizeAlgorithm(d)}catch(I){throw Nr(c,I),I}try{Ym(c,d,S)}catch(I){throw Nr(c,I),I}}rs(c)}a(wi,"ReadableStreamDefaultControllerEnqueue");function Nr(c,d){let g=c._controlledReadableStream;g._state==="readable"&&(qn(c),sl(c),rx(g,d))}a(Nr,"ReadableStreamDefaultControllerError");function yh(c){let d=c._controlledReadableStream._state;return d==="errored"?null:d==="closed"?0:c._strategyHWM-c._queueTotalSize}a(yh,"ReadableStreamDefaultControllerGetDesiredSize");function jz(c){return!YP(c)}a(jz,"ReadableStreamDefaultControllerHasBackpressure");function Ii(c){let d=c._controlledReadableStream._state;return!c._closeRequested&&d==="readable"}a(Ii,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function QP(c,d,g,S,I,L,V){d._controlledReadableStream=c,d._queue=void 0,d._queueTotalSize=void 0,qn(d),d._started=!1,d._closeRequested=!1,d._pullAgain=!1,d._pulling=!1,d._strategySizeAlgorithm=V,d._strategyHWM=L,d._pullAlgorithm=S,d._cancelAlgorithm=I,c._readableStreamController=d;let le=g();m(p(le),()=>(d._started=!0,rs(d),null),xe=>(Nr(d,xe),null))}a(QP,"SetUpReadableStreamDefaultController");function Lz(c,d,g,S){let I=Object.create(Sn.prototype),L,V,le;d.start!==void 0?L=a(()=>d.start(I),"startAlgorithm"):L=a(()=>{},"startAlgorithm"),d.pull!==void 0?V=a(()=>d.pull(I),"pullAlgorithm"):V=a(()=>p(void 0),"pullAlgorithm"),d.cancel!==void 0?le=a(xe=>d.cancel(xe),"cancelAlgorithm"):le=a(()=>p(void 0),"cancelAlgorithm"),QP(c,I,L,V,le,g,S)}a(Lz,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function cl(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(cl,"defaultControllerBrandCheckException$1");function Fz(c,d){return Oo(c._readableStreamController)?qz(c):Bz(c)}a(Fz,"ReadableStreamTee");function Bz(c,d){let g=F(c),S=!1,I=!1,L=!1,V=!1,le,xe,he,Ie,Ue,rt=l(jt=>{Ue=jt});function Dr(){return S?(I=!0,p(void 0)):(S=!0,me(g,{_chunkSteps:a(Vt=>{x(()=>{I=!1;let Sr=Vt,Pn=Vt;L||wi(he._readableStreamController,Sr),V||wi(Ie._readableStreamController,Pn),S=!1,I&&Dr()})},"_chunkSteps"),_closeSteps:a(()=>{S=!1,L||zo(he._readableStreamController),V||zo(Ie._readableStreamController),(!L||!V)&&Ue(void 0)},"_closeSteps"),_errorSteps:a(()=>{S=!1},"_errorSteps")}),p(void 0))}a(Dr,"pullAlgorithm");function Oi(jt){if(L=!0,le=jt,V){let Vt=Xe([le,xe]),Sr=zr(c,Vt);Ue(Sr)}return rt}a(Oi,"cancel1Algorithm");function Jn(jt){if(V=!0,xe=jt,L){let Vt=Xe([le,xe]),Sr=zr(c,Vt);Ue(Sr)}return rt}a(Jn,"cancel2Algorithm");function En(){}return a(En,"startAlgorithm"),he=ns(En,Dr,Oi),Ie=ns(En,Dr,Jn),_(g._closedPromise,jt=>(Nr(he._readableStreamController,jt),Nr(Ie._readableStreamController,jt),(!L||!V)&&Ue(void 0),null)),[he,Ie]}a(Bz,"ReadableStreamDefaultTee");function qz(c){let d=F(c),g=!1,S=!1,I=!1,L=!1,V=!1,le,xe,he,Ie,Ue,rt=l(ye=>{Ue=ye});function Dr(ye){_(ye._closedPromise,je=>(ye!==d||(br(he._readableStreamController,je),br(Ie._readableStreamController,je),(!L||!V)&&Ue(void 0)),null))}a(Dr,"forwardReaderError");function Oi(){$o(d)&&(H(d),d=F(c),Dr(d)),me(d,{_chunkSteps:a(je=>{x(()=>{S=!1,I=!1;let nt=je,rr=je;if(!L&&!V)try{rr=yP(je)}catch(Ci){br(he._readableStreamController,Ci),br(Ie._readableStreamController,Ci),Ue(zr(c,Ci));return}L||Gu(he._readableStreamController,nt),V||Gu(Ie._readableStreamController,rr),g=!1,S?En():I&&jt()})},"_chunkSteps"),_closeSteps:a(()=>{g=!1,L||Xa(he._readableStreamController),V||Xa(Ie._readableStreamController),he._readableStreamController._pendingPullIntos.length>0&&Wu(he._readableStreamController,0),Ie._readableStreamController._pendingPullIntos.length>0&&Wu(Ie._readableStreamController,0),(!L||!V)&&Ue(void 0)},"_closeSteps"),_errorSteps:a(()=>{g=!1},"_errorSteps")})}a(Oi,"pullWithDefaultReader");function Jn(ye,je){pe(d)&&(H(d),d=OP(c),Dr(d));let nt=je?Ie:he,rr=je?he:Ie;kP(d,ye,1,{_chunkSteps:a($i=>{x(()=>{S=!1,I=!1;let ki=je?V:L;if(je?L:V)ki||Ju(nt._readableStreamController,$i);else{let hx;try{hx=yP($i)}catch(Eh){br(nt._readableStreamController,Eh),br(rr._readableStreamController,Eh),Ue(zr(c,Eh));return}ki||Ju(nt._readableStreamController,$i),Gu(rr._readableStreamController,hx)}g=!1,S?En():I&&jt()})},"_chunkSteps"),_closeSteps:a($i=>{g=!1;let ki=je?V:L,gl=je?L:V;ki||Xa(nt._readableStreamController),gl||Xa(rr._readableStreamController),$i!==void 0&&(ki||Ju(nt._readableStreamController,$i),!gl&&rr._readableStreamController._pendingPullIntos.length>0&&Wu(rr._readableStreamController,0)),(!ki||!gl)&&Ue(void 0)},"_closeSteps"),_errorSteps:a(()=>{g=!1},"_errorSteps")})}a(Jn,"pullWithBYOBReader");function En(){if(g)return S=!0,p(void 0);g=!0;let ye=nh(he._readableStreamController);return ye===null?Oi():Jn(ye._view,!1),p(void 0)}a(En,"pull1Algorithm");function jt(){if(g)return I=!0,p(void 0);g=!0;let ye=nh(Ie._readableStreamController);return ye===null?Oi():Jn(ye._view,!0),p(void 0)}a(jt,"pull2Algorithm");function Vt(ye){if(L=!0,le=ye,V){let je=Xe([le,xe]),nt=zr(c,je);Ue(nt)}return rt}a(Vt,"cancel1Algorithm");function Sr(ye){if(V=!0,xe=ye,L){let je=Xe([le,xe]),nt=zr(c,je);Ue(nt)}return rt}a(Sr,"cancel2Algorithm");function Pn(){}return a(Pn,"startAlgorithm"),he=tx(Pn,En,Vt),Ie=tx(Pn,jt,Sr),Dr(d),[he,Ie]}a(qz,"ReadableByteStreamTee");function Vz(c){return n(c)&&typeof c.getReader<"u"}a(Vz,"isReadableStreamLike");function Zz(c){return Vz(c)?Gz(c.getReader()):Hz(c)}a(Zz,"ReadableStreamFrom");function Hz(c){let d,g=gP(c,"async"),S=e;function I(){let V;try{V=UN(g)}catch(xe){return f(xe)}let le=p(V);return E(le,xe=>{if(!n(xe))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(MN(xe))zo(d._readableStreamController);else{let Ie=jN(xe);wi(d._readableStreamController,Ie)}})}a(I,"pullAlgorithm");function L(V){let le=g.iterator,xe;try{xe=Vu(le,"return")}catch(Ue){return f(Ue)}if(xe===void 0)return p(void 0);let he;try{he=z(xe,le,[V])}catch(Ue){return f(Ue)}let Ie=p(he);return E(Ie,Ue=>{if(!n(Ue))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(L,"cancelAlgorithm"),d=ns(S,I,L,0),d}a(Hz,"ReadableStreamFromIterable");function Gz(c){let d,g=e;function S(){let L;try{L=c.read()}catch(V){return f(V)}return E(L,V=>{if(!n(V))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(V.done)zo(d._readableStreamController);else{let le=V.value;wi(d._readableStreamController,le)}})}a(S,"pullAlgorithm");function I(L){try{return p(c.cancel(L))}catch(V){return f(V)}}return a(I,"cancelAlgorithm"),d=ns(g,S,I,0),d}a(Gz,"ReadableStreamFromDefaultReader");function Wz(c,d){dt(c,d);let g=c,S=g?.autoAllocateChunkSize,I=g?.cancel,L=g?.pull,V=g?.start,le=g?.type;return{autoAllocateChunkSize:S===void 0?void 0:O(S,`${d} has member 'autoAllocateChunkSize' that`),cancel:I===void 0?void 0:Jz(I,g,`${d} has member 'cancel' that`),pull:L===void 0?void 0:Kz(L,g,`${d} has member 'pull' that`),start:V===void 0?void 0:Xz(V,g,`${d} has member 'start' that`),type:le===void 0?void 0:Yz(le,`${d} has member 'type' that`)}}a(Wz,"convertUnderlyingDefaultOrByteSource");function Jz(c,d,g){return ft(c,g),S=>M(c,d,[S])}a(Jz,"convertUnderlyingSourceCancelCallback");function Kz(c,d,g){return ft(c,g),S=>M(c,d,[S])}a(Kz,"convertUnderlyingSourcePullCallback");function Xz(c,d,g){return ft(c,g),S=>z(c,d,[S])}a(Xz,"convertUnderlyingSourceStartCallback");function Yz(c,d){if(c=`${c}`,c!=="bytes")throw new TypeError(`${d} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(Yz,"convertReadableStreamType");function Qz(c,d){return dt(c,d),{preventCancel:!!c?.preventCancel}}a(Qz,"convertIteratorOptions");function ex(c,d){dt(c,d);let g=c?.preventAbort,S=c?.preventCancel,I=c?.preventClose,L=c?.signal;return L!==void 0&&eD(L,`${d} has member 'signal' that`),{preventAbort:!!g,preventCancel:!!S,preventClose:!!I,signal:L}}a(ex,"convertPipeOptions");function eD(c,d){if(!cz(c))throw new TypeError(`${d} is not an AbortSignal.`)}a(eD,"assertAbortSignal");function tD(c,d){dt(c,d);let g=c?.readable;b(g,"readable","ReadableWritablePair"),k(g,`${d} has member 'readable' that`);let S=c?.writable;return b(S,"writable","ReadableWritablePair"),zP(S,`${d} has member 'writable' that`),{readable:g,writable:S}}a(tD,"convertReadableWritablePair");class Dt{static{a(this,"ReadableStream")}constructor(d={},g={}){d===void 0?d=null:He(d,"First parameter");let S=Yu(g,"Second parameter"),I=Wz(d,"First parameter");if(_h(this),I.type==="bytes"){if(S.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let L=Qa(S,0);JN(this,I,L)}else{let L=Xu(S),V=Qa(S,1);Lz(this,I,V,L)}}get locked(){if(!Hn(this))throw Do("locked");return Gn(this)}cancel(d=void 0){return Hn(this)?Gn(this)?f(new TypeError("Cannot cancel a stream that already has a reader")):zr(this,d):f(Do("cancel"))}getReader(d=void 0){if(!Hn(this))throw Do("getReader");return XN(d,"First parameter").mode===void 0?F(this):OP(this)}pipeThrough(d,g={}){if(!Hn(this))throw Do("pipeThrough");Ke(d,1,"pipeThrough");let S=tD(d,"First parameter"),I=ex(g,"Second parameter");if(Gn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ti(S.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let L=XP(this,S.writable,I.preventClose,I.preventAbort,I.preventCancel,I.signal);return P(L),S.readable}pipeTo(d,g={}){if(!Hn(this))return f(Do("pipeTo"));if(d===void 0)return f("Parameter 1 is required in 'pipeTo'.");if(!xi(d))return f(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let S;try{S=ex(g,"Second parameter")}catch(I){return f(I)}return Gn(this)?f(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ti(d)?f(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):XP(this,d,S.preventClose,S.preventAbort,S.preventCancel,S.signal)}tee(){if(!Hn(this))throw Do("tee");let d=Fz(this);return Xe(d)}values(d=void 0){if(!Hn(this))throw Do("values");let g=Qz(d,"First parameter");return bi(this,g.preventCancel)}[Km](d){return this.values(d)}static from(d){return Zz(d)}}Object.defineProperties(Dt,{from:{enumerable:!0}}),Object.defineProperties(Dt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),r(Dt.from,"from"),r(Dt.prototype.cancel,"cancel"),r(Dt.prototype.getReader,"getReader"),r(Dt.prototype.pipeThrough,"pipeThrough"),r(Dt.prototype.pipeTo,"pipeTo"),r(Dt.prototype.tee,"tee"),r(Dt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Dt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Dt.prototype,Km,{value:Dt.prototype.values,writable:!0,configurable:!0});function ns(c,d,g,S=1,I=()=>1){let L=Object.create(Dt.prototype);_h(L);let V=Object.create(Sn.prototype);return QP(L,V,c,d,g,S,I),L}a(ns,"CreateReadableStream");function tx(c,d,g){let S=Object.create(Dt.prototype);_h(S);let I=Object.create(vn.prototype);return RP(S,I,c,d,g,0,void 0),S}a(tx,"CreateReadableByteStream");function _h(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(_h,"InitializeReadableStream");function Hn(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof Dt}a(Hn,"IsReadableStream");function Gn(c){return c._reader!==void 0}a(Gn,"IsReadableStreamLocked");function zr(c,d){if(c._disturbed=!0,c._state==="closed")return p(void 0);if(c._state==="errored")return f(c._storedError);os(c);let g=c._reader;if(g!==void 0&&$o(g)){let I=g._readIntoRequests;g._readIntoRequests=new Z,I.forEach(L=>{L._closeSteps(void 0)})}let S=c._readableStreamController[ae](d);return E(S,e)}a(zr,"ReadableStreamCancel");function os(c){c._state="closed";let d=c._reader;if(d!==void 0&&(Je(d),pe(d))){let g=d._readRequests;d._readRequests=new Z,g.forEach(S=>{S._closeSteps()})}}a(os,"ReadableStreamClose");function rx(c,d){c._state="errored",c._storedError=d;let g=c._reader;g!==void 0&&(Ce(g,d),pe(g)?it(g,d):NP(g,d))}a(rx,"ReadableStreamError");function Do(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(Do,"streamBrandCheckException$1");function nx(c,d){dt(c,d);let g=c?.highWaterMark;return b(g,"highWaterMark","QueuingStrategyInit"),{highWaterMark:T(g)}}a(nx,"convertQueuingStrategyInit");let ox=a(c=>c.byteLength,"byteLengthSizeFunction");r(ox,"size");class ul{static{a(this,"ByteLengthQueuingStrategy")}constructor(d){Ke(d,1,"ByteLengthQueuingStrategy"),d=nx(d,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=d.highWaterMark}get highWaterMark(){if(!ax(this))throw ix("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!ax(this))throw ix("size");return ox}}Object.defineProperties(ul.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ul.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ix(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(ix,"byteLengthBrandCheckException");function ax(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof ul}a(ax,"IsByteLengthQueuingStrategy");let sx=a(()=>1,"countSizeFunction");r(sx,"size");class ll{static{a(this,"CountQueuingStrategy")}constructor(d){Ke(d,1,"CountQueuingStrategy"),d=nx(d,"First parameter"),this._countQueuingStrategyHighWaterMark=d.highWaterMark}get highWaterMark(){if(!ux(this))throw cx("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ux(this))throw cx("size");return sx}}Object.defineProperties(ll.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ll.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function cx(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(cx,"countBrandCheckException");function ux(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof ll}a(ux,"IsCountQueuingStrategy");function rD(c,d){dt(c,d);let g=c?.cancel,S=c?.flush,I=c?.readableType,L=c?.start,V=c?.transform,le=c?.writableType;return{cancel:g===void 0?void 0:aD(g,c,`${d} has member 'cancel' that`),flush:S===void 0?void 0:nD(S,c,`${d} has member 'flush' that`),readableType:I,start:L===void 0?void 0:oD(L,c,`${d} has member 'start' that`),transform:V===void 0?void 0:iD(V,c,`${d} has member 'transform' that`),writableType:le}}a(rD,"convertTransformer");function nD(c,d,g){return ft(c,g),S=>M(c,d,[S])}a(nD,"convertTransformerFlushCallback");function oD(c,d,g){return ft(c,g),S=>z(c,d,[S])}a(oD,"convertTransformerStartCallback");function iD(c,d,g){return ft(c,g),(S,I)=>M(c,d,[S,I])}a(iD,"convertTransformerTransformCallback");function aD(c,d,g){return ft(c,g),S=>M(c,d,[S])}a(aD,"convertTransformerCancelCallback");class dl{static{a(this,"TransformStream")}constructor(d={},g={},S={}){d===void 0&&(d=null);let I=Yu(g,"Second parameter"),L=Yu(S,"Third parameter"),V=rD(d,"First parameter");if(V.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(V.writableType!==void 0)throw new RangeError("Invalid writableType specified");let le=Qa(L,0),xe=Xu(L),he=Qa(I,1),Ie=Xu(I),Ue,rt=l(Dr=>{Ue=Dr});sD(this,rt,he,Ie,le,xe),uD(this,V),V.start!==void 0?Ue(V.start(this._transformStreamController)):Ue(void 0)}get readable(){if(!lx(this))throw mx("readable");return this._readable}get writable(){if(!lx(this))throw mx("writable");return this._writable}}Object.defineProperties(dl.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(dl.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function sD(c,d,g,S,I,L){function V(){return d}a(V,"startAlgorithm");function le(rt){return pD(c,rt)}a(le,"writeAlgorithm");function xe(rt){return fD(c,rt)}a(xe,"abortAlgorithm");function he(){return mD(c)}a(he,"closeAlgorithm"),c._writable=dz(V,le,he,xe,g,S);function Ie(){return hD(c)}a(Ie,"pullAlgorithm");function Ue(rt){return gD(c,rt)}a(Ue,"cancelAlgorithm"),c._readable=ns(V,Ie,Ue,I,L),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,pl(c,!0),c._transformStreamController=void 0}a(sD,"InitializeTransformStream");function lx(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof dl}a(lx,"IsTransformStream");function dx(c,d){Nr(c._readable._readableStreamController,d),vh(c,d)}a(dx,"TransformStreamError");function vh(c,d){ml(c._transformStreamController),es(c._writable._writableStreamController,d),bh(c)}a(vh,"TransformStreamErrorWritableAndUnblockWrite");function bh(c){c._backpressure&&pl(c,!1)}a(bh,"TransformStreamUnblockWrite");function pl(c,d){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=l(g=>{c._backpressureChangePromise_resolve=g}),c._backpressure=d}a(pl,"TransformStreamSetBackpressure");class Wn{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!fl(this))throw hl("desiredSize");let d=this._controlledTransformStream._readable._readableStreamController;return yh(d)}enqueue(d=void 0){if(!fl(this))throw hl("enqueue");px(this,d)}error(d=void 0){if(!fl(this))throw hl("error");lD(this,d)}terminate(){if(!fl(this))throw hl("terminate");dD(this)}}Object.defineProperties(Wn.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Wn.prototype.enqueue,"enqueue"),r(Wn.prototype.error,"error"),r(Wn.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Wn.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function fl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof Wn}a(fl,"IsTransformStreamDefaultController");function cD(c,d,g,S,I){d._controlledTransformStream=c,c._transformStreamController=d,d._transformAlgorithm=g,d._flushAlgorithm=S,d._cancelAlgorithm=I,d._finishPromise=void 0,d._finishPromise_resolve=void 0,d._finishPromise_reject=void 0}a(cD,"SetUpTransformStreamDefaultController");function uD(c,d){let g=Object.create(Wn.prototype),S,I,L;d.transform!==void 0?S=a(V=>d.transform(V,g),"transformAlgorithm"):S=a(V=>{try{return px(g,V),p(void 0)}catch(le){return f(le)}},"transformAlgorithm"),d.flush!==void 0?I=a(()=>d.flush(g),"flushAlgorithm"):I=a(()=>p(void 0),"flushAlgorithm"),d.cancel!==void 0?L=a(V=>d.cancel(V),"cancelAlgorithm"):L=a(()=>p(void 0),"cancelAlgorithm"),cD(c,g,S,I,L)}a(uD,"SetUpTransformStreamDefaultControllerFromTransformer");function ml(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(ml,"TransformStreamDefaultControllerClearAlgorithms");function px(c,d){let g=c._controlledTransformStream,S=g._readable._readableStreamController;if(!Ii(S))throw new TypeError("Readable side is not in a state that permits enqueue");try{wi(S,d)}catch(L){throw vh(g,L),g._readable._storedError}jz(S)!==g._backpressure&&pl(g,!0)}a(px,"TransformStreamDefaultControllerEnqueue");function lD(c,d){dx(c._controlledTransformStream,d)}a(lD,"TransformStreamDefaultControllerError");function fx(c,d){let g=c._transformAlgorithm(d);return E(g,void 0,S=>{throw dx(c._controlledTransformStream,S),S})}a(fx,"TransformStreamDefaultControllerPerformTransform");function dD(c){let d=c._controlledTransformStream,g=d._readable._readableStreamController;zo(g);let S=new TypeError("TransformStream terminated");vh(d,S)}a(dD,"TransformStreamDefaultControllerTerminate");function pD(c,d){let g=c._transformStreamController;if(c._backpressure){let S=c._backpressureChangePromise;return E(S,()=>{let I=c._writable;if(I._state==="erroring")throw I._storedError;return fx(g,d)})}return fx(g,d)}a(pD,"TransformStreamDefaultSinkWriteAlgorithm");function fD(c,d){let g=c._transformStreamController;if(g._finishPromise!==void 0)return g._finishPromise;let S=c._readable;g._finishPromise=l((L,V)=>{g._finishPromise_resolve=L,g._finishPromise_reject=V});let I=g._cancelAlgorithm(d);return ml(g),m(I,()=>(S._state==="errored"?Ri(g,S._storedError):(Nr(S._readableStreamController,d),Sh(g)),null),L=>(Nr(S._readableStreamController,L),Ri(g,L),null)),g._finishPromise}a(fD,"TransformStreamDefaultSinkAbortAlgorithm");function mD(c){let d=c._transformStreamController;if(d._finishPromise!==void 0)return d._finishPromise;let g=c._readable;d._finishPromise=l((I,L)=>{d._finishPromise_resolve=I,d._finishPromise_reject=L});let S=d._flushAlgorithm();return ml(d),m(S,()=>(g._state==="errored"?Ri(d,g._storedError):(zo(g._readableStreamController),Sh(d)),null),I=>(Nr(g._readableStreamController,I),Ri(d,I),null)),d._finishPromise}a(mD,"TransformStreamDefaultSinkCloseAlgorithm");function hD(c){return pl(c,!1),c._backpressureChangePromise}a(hD,"TransformStreamDefaultSourcePullAlgorithm");function gD(c,d){let g=c._transformStreamController;if(g._finishPromise!==void 0)return g._finishPromise;let S=c._writable;g._finishPromise=l((L,V)=>{g._finishPromise_resolve=L,g._finishPromise_reject=V});let I=g._cancelAlgorithm(d);return ml(g),m(I,()=>(S._state==="errored"?Ri(g,S._storedError):(es(S._writableStreamController,d),bh(c),Sh(g)),null),L=>(es(S._writableStreamController,L),bh(c),Ri(g,L),null)),g._finishPromise}a(gD,"TransformStreamDefaultSourceCancelAlgorithm");function hl(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(hl,"defaultControllerBrandCheckException");function Sh(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(Sh,"defaultControllerFinishPromiseResolve");function Ri(c,d){c._finishPromise_reject!==void 0&&(P(c._finishPromise),c._finishPromise_reject(d),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(Ri,"defaultControllerFinishPromiseReject");function mx(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(mx,"streamBrandCheckException"),t.ByteLengthQueuingStrategy=ul,t.CountQueuingStrategy=ll,t.ReadableByteStreamController=vn,t.ReadableStream=Dt,t.ReadableStreamBYOBReader=Vn,t.ReadableStreamBYOBRequest=Ro,t.ReadableStreamDefaultController=Sn,t.ReadableStreamDefaultReader=W,t.TransformStream=dl,t.TransformStreamDefaultController=Wn,t.WritableStream=Zn,t.WritableStreamDefaultController=Ai,t.WritableStreamDefaultWriter=bn}))});var tC=N(()=>{if(!globalThis.ReadableStream)try{let t=require("node:process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),t.emitWarning=e}catch(n){throw t.emitWarning=e,n}}catch{Object.assign(globalThis,eC())}try{let{Blob:t}=require("buffer");t&&!t.prototype.stream&&(t.prototype.stream=a(function(n){let o=0,r=this;return new ReadableStream({type:"bytes",async pull(i){let u=await r.slice(o,Math.min(r.size,o+65536)).arrayBuffer();o+=u.byteLength,i.enqueue(new Uint8Array(u)),o===r.size&&i.close()}})},"name"))}catch{}});async function*xb(t,e=!0){for(let n of t)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(e){let o=n.byteOffset,r=n.byteOffset+n.byteLength;for(;o!==r;){let i=Math.min(r-o,rC),s=n.buffer.slice(o,o+i);o+=s.byteLength,yield new Uint8Array(s)}}else yield n;else{let o=0,r=n;for(;o!==r.size;){let s=await r.slice(o,Math.min(r.size,o+rC)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var gne,rC,nC,d4,qr,ou=Tt(()=>{gne=St(tC(),1);rC=65536;a(xb,"toIterator");nC=class Tb{static{a(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(e=[],n={}){if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!="object"&&typeof n!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");n===null&&(n={});let o=new TextEncoder;for(let i of e){let s;ArrayBuffer.isView(i)?s=new Uint8Array(i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)):i instanceof ArrayBuffer?s=new Uint8Array(i.slice(0)):i instanceof Tb?s=i:s=o.encode(`${i}`),this.#r+=ArrayBuffer.isView(s)?s.byteLength:s.size,this.#e.push(s)}this.#n=`${n.endings===void 0?"transparent":n.endings}`;let r=n.type===void 0?"":String(n.type);this.#t=/^[\x20-\x7E]*$/.test(r)?r:""}get size(){return this.#r}get type(){return this.#t}async text(){let e=new TextDecoder,n="";for await(let o of xb(this.#e,!1))n+=e.decode(o,{stream:!0});return n+=e.decode(),n}async arrayBuffer(){let e=new Uint8Array(this.size),n=0;for await(let o of xb(this.#e,!1))e.set(o,n),n+=o.length;return e.buffer}stream(){let e=xb(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let o=await e.next();o.done?n.close():n.enqueue(o.value)},async cancel(){await e.return()}})}slice(e=0,n=this.size,o=""){let{size:r}=this,i=e<0?Math.max(r+e,0):Math.min(e,r),s=n<0?Math.max(r+n,0):Math.min(n,r),u=Math.max(s-i,0),l=this.#e,p=[],f=0;for(let m of l){if(f>=u)break;let h=ArrayBuffer.isView(m)?m.byteLength:m.size;if(i&&h<=i)i-=h,s-=h;else{let _;ArrayBuffer.isView(m)?(_=m.subarray(i,Math.min(h,s)),f+=_.byteLength):(_=m.slice(i,Math.min(h,s)),f+=_.size),s-=h,p.push(_),i=0}}let y=new Tb([],{type:String(o).toLowerCase()});return y.#r=u,y.#e=p,y}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}};Object.defineProperties(nC.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});d4=nC,qr=d4});var p4,f4,bo,Ab=Tt(()=>{ou();p4=class extends qr{static{a(this,"File")}#e=0;#t="";constructor(e,n,o={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(e,o),o===null&&(o={});let r=o.lastModified===void 0?Date.now():Number(o.lastModified);Number.isNaN(r)||(this.#e=r),this.#t=String(n)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](e){return!!e&&e instanceof qr&&/^(File)$/.test(e[Symbol.toStringTag])}},f4=p4,bo=f4});function aC(t,e=qr){var n=`${oC()}${oC()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),o=[],r=`--${n}\r
15
+ Content-Disposition: form-data; name="`;return t.forEach((i,s)=>typeof i=="string"?o.push(r+wb(s)+`"\r
16
16
  \r
17
- ${s.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
17
+ ${i.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
18
18
  `)}\r
19
- `):n.push(i+Rd(c)+`"; filename="${Rd(s.name,1)}"\r
20
- Content-Type: ${s.type||"application/octet-stream"}\r
19
+ `):o.push(r+wb(s)+`"; filename="${wb(i.name,1)}"\r
20
+ Content-Type: ${i.type||"application/octet-stream"}\r
21
21
  \r
22
- `,s,`\r
23
- `)),n.push(`--${r}--`),new e(n,{type:"multipart/form-data; boundary="+r})}var ia,n$,o$,eP,i$,tP,Rd,no,Un,uu=gt(()=>{oa();Id();({toStringTag:ia,iterator:n$,hasInstance:o$}=Symbol),eP=Math.random,i$="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),tP=o((t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[ia])?[(r=r!==void 0?r+"":e[ia]=="File"?e.name:"blob",t),e.name!==r||e[ia]=="blob"?new Dn([e],r,e):e]:[t,e+""]),"f"),Rd=o((t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
24
- `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),no=o((t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},"x"),Un=class{static{o(this,"FormData")}#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[ia](){return"FormData"}[n$](){return this.entries()}static[o$](e){return e&&typeof e=="object"&&e[ia]==="FormData"&&!i$.some(r=>typeof e[r]!="function")}append(...e){no("append",arguments,2),this.#e.push(tP(...e))}delete(e){no("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){no("get",arguments,1),e+="";for(var r=this.#e,n=r.length,i=0;i<n;i++)if(r[i][0]===e)return r[i][1];return null}getAll(e,r){return no("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return no("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){no("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){no("set",arguments,2);var r=[],n=!0;e=tP(...e),this.#e.forEach(i=>{i[0]===e[0]?n&&(n=!r.push(e)):r.push(i)}),n&&r.push(e),this.#e=r}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}};o(rP,"formDataToBlob")});var rn,cu=gt(()=>{rn=class extends Error{static{o(this,"FetchBaseError")}constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var At,Od=gt(()=>{cu();At=class extends rn{static{o(this,"FetchError")}constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}});var lu,Cd,aa,nP,oP,iP,du=gt(()=>{lu=Symbol.toStringTag,Cd=o(t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[lu]==="URLSearchParams","isURLSearchParameters"),aa=o(t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[lu]),"isBlob"),nP=o(t=>typeof t=="object"&&(t[lu]==="AbortSignal"||t[lu]==="EventTarget"),"isAbortSignal"),oP=o((t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},"isDomainOrSubdomain"),iP=o((t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n},"isSameProtocol")});var sP=k((o9,aP)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=require("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}aP.exports=globalThis.DOMException});var oo,uP,cP,$d,lP,dP,pP,fP,mP,hP,pu,kd=gt(()=>{oo=require("node:fs"),uP=require("node:path"),cP=ft(sP(),1);Id();oa();({stat:$d}=oo.promises),lP=o((t,e)=>mP((0,oo.statSync)(t),t,e),"blobFromSync"),dP=o((t,e)=>$d(t).then(r=>mP(r,t,e)),"blobFrom"),pP=o((t,e)=>$d(t).then(r=>hP(r,t,e)),"fileFrom"),fP=o((t,e)=>hP((0,oo.statSync)(t),t,e),"fileFromSync"),mP=o((t,e,r="")=>new hr([new pu({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],{type:r}),"fromBlob"),hP=o((t,e,r="")=>new Dn([new pu({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],(0,uP.basename)(e),{type:r,lastModified:t.mtimeMs}),"fromFile"),pu=class t{static{o(this,"BlobDataItem")}#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new t({path:this.#e,lastModified:this.lastModified,size:r-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await $d(this.#e);if(e>this.lastModified)throw new cP.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,oo.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var yP={};ys(yP,{toFormData:()=>p$});function d$(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",n=r.slice(r.lastIndexOf("\\")+1);return n=n.replace(/%22/g,'"'),n=n.replace(/&#(\d{4});/g,(i,s)=>String.fromCharCode(s)),n}async function p$(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let n=new Nd(r[1]||r[2]),i,s,c,d,l,f,p=[],_=new Un,h=o(x=>{c+=P.decode(x,{stream:!0})},"onPartData"),g=o(x=>{p.push(x)},"appendToFile"),y=o(()=>{let x=new Dn(p,f,{type:l});_.append(d,x)},"appendFileToFormData"),T=o(()=>{_.append(d,c)},"appendEntryToFormData"),P=new TextDecoder("utf-8");P.decode(),n.onPartBegin=function(){n.onPartData=h,n.onPartEnd=T,i="",s="",c="",d="",l="",f=null,p.length=0},n.onHeaderField=function(x){i+=P.decode(x,{stream:!0})},n.onHeaderValue=function(x){s+=P.decode(x,{stream:!0})},n.onHeaderEnd=function(){if(s+=P.decode(),i=i.toLowerCase(),i==="content-disposition"){let x=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);x&&(d=x[2]||x[3]||""),f=d$(s),f&&(n.onPartData=g,n.onPartEnd=y)}else i==="content-type"&&(l=s);s="",i=""};for await(let x of t)n.write(x);return n.end(),_}var Rr,Ke,gP,Mn,fu,mu,a$,sa,s$,u$,c$,l$,io,Nd,_P=gt(()=>{kd();uu();Rr=0,Ke={START_BOUNDARY:Rr++,HEADER_FIELD_START:Rr++,HEADER_FIELD:Rr++,HEADER_VALUE_START:Rr++,HEADER_VALUE:Rr++,HEADER_VALUE_ALMOST_DONE:Rr++,HEADERS_ALMOST_DONE:Rr++,PART_DATA_START:Rr++,PART_DATA:Rr++,END:Rr++},gP=1,Mn={PART_BOUNDARY:gP,LAST_BOUNDARY:gP*=2},fu=10,mu=13,a$=32,sa=45,s$=58,u$=97,c$=122,l$=o(t=>t|32,"lower"),io=o(()=>{},"noop"),Nd=class{static{o(this,"MultipartParser")}constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=io,this.onHeaderField=io,this.onHeadersEnd=io,this.onHeaderValue=io,this.onPartBegin=io,this.onPartData=io,this.onPartEnd=io,this.boundaryChars={},e=`\r
25
- --`+e;let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n),this.boundaryChars[r[n]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=Ke.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:s,boundary:c,boundaryChars:d,index:l,state:f,flags:p}=this,_=this.boundary.length,h=_-1,g=e.length,y,T,P=o(X=>{this[X+"Mark"]=r},"mark"),x=o(X=>{delete this[X+"Mark"]},"clear"),N=o((X,Z,G,Y)=>{(Z===void 0||Z!==G)&&this[X](Y&&Y.subarray(Z,G))},"callback"),F=o((X,Z)=>{let G=X+"Mark";G in this&&(Z?(N(X,this[G],r,e),delete this[G]):(N(X,this[G],e.length,e),this[G]=0))},"dataCallback");for(r=0;r<n;r++)switch(y=e[r],f){case Ke.START_BOUNDARY:if(l===c.length-2){if(y===sa)p|=Mn.LAST_BOUNDARY;else if(y!==mu)return;l++;break}else if(l-1===c.length-2){if(p&Mn.LAST_BOUNDARY&&y===sa)f=Ke.END,p=0;else if(!(p&Mn.LAST_BOUNDARY)&&y===fu)l=0,N("onPartBegin"),f=Ke.HEADER_FIELD_START;else return;break}y!==c[l+2]&&(l=-2),y===c[l+2]&&l++;break;case Ke.HEADER_FIELD_START:f=Ke.HEADER_FIELD,P("onHeaderField"),l=0;case Ke.HEADER_FIELD:if(y===mu){x("onHeaderField"),f=Ke.HEADERS_ALMOST_DONE;break}if(l++,y===sa)break;if(y===s$){if(l===1)return;F("onHeaderField",!0),f=Ke.HEADER_VALUE_START;break}if(T=l$(y),T<u$||T>c$)return;break;case Ke.HEADER_VALUE_START:if(y===a$)break;P("onHeaderValue"),f=Ke.HEADER_VALUE;case Ke.HEADER_VALUE:y===mu&&(F("onHeaderValue",!0),N("onHeaderEnd"),f=Ke.HEADER_VALUE_ALMOST_DONE);break;case Ke.HEADER_VALUE_ALMOST_DONE:if(y!==fu)return;f=Ke.HEADER_FIELD_START;break;case Ke.HEADERS_ALMOST_DONE:if(y!==fu)return;N("onHeadersEnd"),f=Ke.PART_DATA_START;break;case Ke.PART_DATA_START:f=Ke.PART_DATA,P("onPartData");case Ke.PART_DATA:if(i=l,l===0){for(r+=h;r<g&&!(e[r]in d);)r+=_;r-=h,y=e[r]}if(l<c.length)c[l]===y?(l===0&&F("onPartData",!0),l++):l=0;else if(l===c.length)l++,y===mu?p|=Mn.PART_BOUNDARY:y===sa?p|=Mn.LAST_BOUNDARY:l=0;else if(l-1===c.length)if(p&Mn.PART_BOUNDARY){if(l=0,y===fu){p&=~Mn.PART_BOUNDARY,N("onPartEnd"),N("onPartBegin"),f=Ke.HEADER_FIELD_START;break}}else p&Mn.LAST_BOUNDARY&&y===sa?(N("onPartEnd"),f=Ke.END,p=0):l=0;if(l>0)s[l-1]=y;else if(i>0){let X=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);N("onPartData",0,i,X),i=0,P("onPartData"),r--}break;case Ke.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}F("onHeaderField"),F("onHeaderValue"),F("onPartData"),this.index=l,this.state=f,this.flags=p}end(){if(this.state===Ke.HEADER_FIELD_START&&this.index===0||this.state===Ke.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==Ke.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};o(d$,"_fileName");o(p$,"toFormData")});async function zd(t){if(t[$t].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[$t].disturbed=!0,t[$t].error)throw t[$t].error;let{body:e}=t;if(e===null)return Lt.Buffer.alloc(0);if(!(e instanceof nr.default))return Lt.Buffer.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let s=new At(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(s),s}n+=i.length,r.push(i)}}catch(i){throw i instanceof rn?i:new At(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?Lt.Buffer.from(r.join("")):Lt.Buffer.concat(r,n)}catch(i){throw new At(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new At(`Premature close of server response while trying to fetch ${t.url}`)}var nr,nn,Lt,f$,$t,Or,Jo,m$,hu,vP,bP,gu=gt(()=>{nr=ft(require("node:stream"),1),nn=require("node:util"),Lt=require("node:buffer");oa();uu();Od();cu();du();f$=(0,nn.promisify)(nr.default.pipeline),$t=Symbol("Body internals"),Or=class{static{o(this,"Body")}constructor(e,{size:r=0}={}){let n=null;e===null?e=null:Cd(e)?e=Lt.Buffer.from(e.toString()):aa(e)||Lt.Buffer.isBuffer(e)||(nn.types.isAnyArrayBuffer(e)?e=Lt.Buffer.from(e):ArrayBuffer.isView(e)?e=Lt.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof nr.default||(e instanceof Un?(e=rP(e),n=e.type.split("=")[1]):e=Lt.Buffer.from(String(e))));let i=e;Lt.Buffer.isBuffer(e)?i=nr.default.Readable.from(e):aa(e)&&(i=nr.default.Readable.from(e.stream())),this[$t]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof nr.default&&e.on("error",s=>{let c=s instanceof rn?s:new At(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[$t].error=c})}get body(){return this[$t].stream}get bodyUsed(){return this[$t].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await zd(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new Un,i=new URLSearchParams(await this.text());for(let[s,c]of i)n.append(s,c);return n}let{toFormData:r}=await Promise.resolve().then(()=>(_P(),yP));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[$t].body&&this[$t].body.type||"",r=await this.arrayBuffer();return new hr([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await zd(this);return new TextDecoder().decode(e)}buffer(){return zd(this)}};Or.prototype.buffer=(0,nn.deprecate)(Or.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Or.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,nn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});o(zd,"consumeBody");Jo=o((t,e)=>{let r,n,{body:i}=t[$t];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof nr.default&&typeof i.getBoundary!="function"&&(r=new nr.PassThrough({highWaterMark:e}),n=new nr.PassThrough({highWaterMark:e}),i.pipe(r),i.pipe(n),t[$t].stream=r,i=n),i},"clone"),m$=(0,nn.deprecate)(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),hu=o((t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":Cd(t)?"application/x-www-form-urlencoded;charset=UTF-8":aa(t)?t.type||null:Lt.Buffer.isBuffer(t)||nn.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof Un?`multipart/form-data; boundary=${e[$t].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${m$(t)}`:t instanceof nr.default?null:"text/plain;charset=UTF-8","extractContentType"),vP=o(t=>{let{body:e}=t[$t];return e===null?0:aa(e)?e.size:Lt.Buffer.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},"getTotalBytes"),bP=o(async(t,{body:e})=>{e===null?t.end():await f$(e,t)},"writeToStream")});function PP(t=[]){return new kt(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return yu(e),Ud(e,String(r)),!0}catch{return!1}}))}var Dd,ua,yu,Ud,kt,_u=gt(()=>{Dd=require("node:util"),ua=ft(require("node:http"),1),yu=typeof ua.default.validateHeaderName=="function"?ua.default.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Ud=typeof ua.default.validateHeaderValue=="function"?ua.default.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},kt=class t extends URLSearchParams{static{o(this,"Headers")}constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,s]of Object.entries(n))r.push(...s.map(c=>[i,c]))}else if(e!=null)if(typeof e=="object"&&!Dd.types.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||Dd.types.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(yu(n),Ud(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,s){switch(i){case"append":case"set":return(c,d)=>(yu(c),Ud(c,String(d)),URLSearchParams.prototype[i].call(n,String(c).toLowerCase(),String(d)));case"delete":case"has":case"getAll":return c=>(yu(c),URLSearchParams.prototype[i].call(n,String(c).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(kt.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));o(PP,"fromRawHeaders")});var h$,ca,Md=gt(()=>{h$=new Set([301,302,303,307,308]),ca=o(t=>h$.has(t),"isRedirect")});var gr,Ft,SP=gt(()=>{_u();gu();Md();gr=Symbol("Response internals"),Ft=class t extends Or{static{o(this,"Response")}constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new kt(r.headers);if(e!==null&&!i.has("Content-Type")){let s=hu(e,this);s&&i.append("Content-Type",s)}this[gr]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[gr].type}get url(){return this[gr].url||""}get status(){return this[gr].status}get ok(){return this[gr].status>=200&&this[gr].status<300}get redirected(){return this[gr].counter>0}get statusText(){return this[gr].statusText}get headers(){return this[gr].headers}get highWaterMark(){return this[gr].highWaterMark}clone(){return new t(Jo(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!ca(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[gr].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new kt(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Ft.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var EP,TP=gt(()=>{EP=o(t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""},"getSearch")});function xP(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function RP(t){if(!wP.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function g$(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=(0,AP.isIP)(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function Yo(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:g$(t)}function OP(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,s=xP(i),c=xP(i,!0);s.toString().length>4096&&(s=c),e&&(s=e(s)),r&&(c=r(c));let d=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return c;case"unsafe-url":return s;case"strict-origin":return Yo(s)&&!Yo(d)?"no-referrer":c.toString();case"strict-origin-when-cross-origin":return s.origin===d.origin?s:Yo(s)&&!Yo(d)?"no-referrer":c;case"same-origin":return s.origin===d.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===d.origin?s:c;case"no-referrer-when-downgrade":return Yo(s)&&!Yo(d)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function CP(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&wP.has(n)&&(r=n);return r}var AP,wP,IP,jd=gt(()=>{AP=require("node:net");o(xP,"stripURLForUseAsAReferrer");wP=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),IP="strict-origin-when-cross-origin";o(RP,"validateReferrerPolicy");o(g$,"isOriginPotentiallyTrustworthy");o(Yo,"isUrlPotentiallyTrustworthy");o(OP,"determineRequestsReferrer");o(CP,"parseReferrerPolicyFromHeader")});var $P,kP,Pt,la,y$,jn,NP,zP=gt(()=>{$P=require("node:url"),kP=require("node:util");_u();gu();du();TP();jd();Pt=Symbol("Request internals"),la=o(t=>typeof t=="object"&&typeof t[Pt]=="object","isRequest"),y$=(0,kP.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),jn=class t extends Or{static{o(this,"Request")}constructor(e,r={}){let n;if(la(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!la(r)&&"data"in r&&y$(),(r.body!=null||la(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=r.body?r.body:la(e)&&e.body!==null?Jo(e):null;super(s,{size:r.size||e.size||0});let c=new kt(r.headers||e.headers||{});if(s!==null&&!c.has("Content-Type")){let f=hu(s,this);f&&c.set("Content-Type",f)}let d=la(e)?e.signal:null;if("signal"in r&&(d=r.signal),d!=null&&!nP(d))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let l=r.referrer==null?e.referrer:r.referrer;if(l==="")l="no-referrer";else if(l){let f=new URL(l);l=/^about:(\/\/)?client$/.test(f)?"client":f}else l=void 0;this[Pt]={method:i,redirect:r.redirect||e.redirect||"follow",headers:c,parsedURL:n,signal:d,referrer:l},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[Pt].method}get url(){return(0,$P.format)(this[Pt].parsedURL)}get headers(){return this[Pt].headers}get redirect(){return this[Pt].redirect}get signal(){return this[Pt].signal}get referrer(){if(this[Pt].referrer==="no-referrer")return"";if(this[Pt].referrer==="client")return"about:client";if(this[Pt].referrer)return this[Pt].referrer.toString()}get referrerPolicy(){return this[Pt].referrerPolicy}set referrerPolicy(e){this[Pt].referrerPolicy=RP(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(jn.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});NP=o(t=>{let{parsedURL:e}=t[Pt],r=new kt(t[Pt].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let d=vP(t);typeof d=="number"&&!Number.isNaN(d)&&(n=String(d))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=IP),t.referrer&&t.referrer!=="no-referrer"?t[Pt].referrer=OP(t):t[Pt].referrer="no-referrer",t[Pt].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e));let s=EP(e),c={path:e.pathname+s,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:c}},"getNodeRequestOptions")});var da,DP=gt(()=>{cu();da=class extends rn{static{o(this,"AbortError")}constructor(e,r="aborted"){super(e,r)}}});var jP={};ys(jP,{AbortError:()=>da,Blob:()=>hr,FetchError:()=>At,File:()=>Dn,FormData:()=>Un,Headers:()=>kt,Request:()=>jn,Response:()=>Ft,blobFrom:()=>dP,blobFromSync:()=>lP,default:()=>Ld,fileFrom:()=>pP,fileFromSync:()=>fP,isRedirect:()=>ca});async function Ld(t,e){return new Promise((r,n)=>{let i=new jn(t,e),{parsedURL:s,options:c}=NP(i);if(!_$.has(s.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let y=Wb(i.url),T=new Ft(y,{headers:{"Content-Type":y.typeFull}});r(T);return}let d=(s.protocol==="https:"?MP.default:UP.default).request,{signal:l}=i,f=null,p=o(()=>{let y=new da("The operation was aborted.");n(y),i.body&&i.body instanceof Bt.default.Readable&&i.body.destroy(y),!(!f||!f.body)&&f.body.emit("error",y)},"abort");if(l&&l.aborted){p();return}let _=o(()=>{p(),g()},"abortAndFinalize"),h=d(s.toString(),c);l&&l.addEventListener("abort",_);let g=o(()=>{h.abort(),l&&l.removeEventListener("abort",_)},"finalize");h.on("error",y=>{n(new At(`request to ${i.url} failed, reason: ${y.message}`,"system",y)),g()}),v$(h,y=>{f&&f.body&&f.body.destroy(y)}),process.version<"v14"&&h.on("socket",y=>{let T;y.prependListener("end",()=>{T=y._eventsCount}),y.prependListener("close",P=>{if(f&&T<y._eventsCount&&!P){let x=new Error("Premature close");x.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",x)}})}),h.on("response",y=>{h.setTimeout(0);let T=PP(y.rawHeaders);if(ca(y.statusCode)){let X=T.get("Location"),Z=null;try{Z=X===null?null:new URL(X,i.url)}catch{if(i.redirect!=="manual"){n(new At(`uri requested responds with an invalid redirect URL: ${X}`,"invalid-redirect")),g();return}}switch(i.redirect){case"error":n(new At(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),g();return;case"manual":break;case"follow":{if(Z===null)break;if(i.counter>=i.follow){n(new At(`maximum redirect reached at: ${i.url}`,"max-redirect")),g();return}let G={headers:new kt(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:Jo(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!oP(i.url,Z)||!iP(i.url,Z))for(let ee of["authorization","www-authenticate","cookie","cookie2"])G.headers.delete(ee);if(y.statusCode!==303&&i.body&&e.body instanceof Bt.default.Readable){n(new At("Cannot follow redirect with body being a readable stream","unsupported-redirect")),g();return}(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&i.method==="POST")&&(G.method="GET",G.body=void 0,G.headers.delete("content-length"));let Y=CP(T);Y&&(G.referrerPolicy=Y),r(Ld(new jn(Z,G))),g();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}l&&y.once("end",()=>{l.removeEventListener("abort",_)});let P=(0,Bt.pipeline)(y,new Bt.PassThrough,X=>{X&&n(X)});process.version<"v12.10"&&y.on("aborted",_);let x={url:i.url,status:y.statusCode,statusText:y.statusMessage,headers:T,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},N=T.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||N===null||y.statusCode===204||y.statusCode===304){f=new Ft(P,x),r(f);return}let F={flush:ao.default.Z_SYNC_FLUSH,finishFlush:ao.default.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){P=(0,Bt.pipeline)(P,ao.default.createGunzip(F),X=>{X&&n(X)}),f=new Ft(P,x),r(f);return}if(N==="deflate"||N==="x-deflate"){let X=(0,Bt.pipeline)(y,new Bt.PassThrough,Z=>{Z&&n(Z)});X.once("data",Z=>{(Z[0]&15)===8?P=(0,Bt.pipeline)(P,ao.default.createInflate(),G=>{G&&n(G)}):P=(0,Bt.pipeline)(P,ao.default.createInflateRaw(),G=>{G&&n(G)}),f=new Ft(P,x),r(f)}),X.once("end",()=>{f||(f=new Ft(P,x),r(f))});return}if(N==="br"){P=(0,Bt.pipeline)(P,ao.default.createBrotliDecompress(),X=>{X&&n(X)}),f=new Ft(P,x),r(f);return}f=new Ft(P,x),r(f)}),bP(h,i).catch(n)})}function v$(t,e){let r=pa.Buffer.from(`0\r
22
+ `,i,`\r
23
+ `)),o.push(`--${n}--`),new e(o,{type:"multipart/form-data; boundary="+n})}var iu,m4,h4,oC,g4,iC,wb,si,So,Tf=Tt(()=>{ou();Ab();({toStringTag:iu,iterator:m4,hasInstance:h4}=Symbol),oC=Math.random,g4="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),iC=a((t,e,n)=>(t+="",/^(Blob|File)$/.test(e&&e[iu])?[(n=n!==void 0?n+"":e[iu]=="File"?e.name:"blob",t),e.name!==n||e[iu]=="blob"?new bo([e],n,e):e]:[t,e+""]),"f"),wb=a((t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
24
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),si=a((t,e,n)=>{if(e.length<n)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${n} arguments required, but only ${e.length} present.`)},"x"),So=class{static{a(this,"FormData")}#e=[];constructor(...e){if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[iu](){return"FormData"}[m4](){return this.entries()}static[h4](e){return e&&typeof e=="object"&&e[iu]==="FormData"&&!g4.some(n=>typeof e[n]!="function")}append(...e){si("append",arguments,2),this.#e.push(iC(...e))}delete(e){si("delete",arguments,1),e+="",this.#e=this.#e.filter(([n])=>n!==e)}get(e){si("get",arguments,1),e+="";for(var n=this.#e,o=n.length,r=0;r<o;r++)if(n[r][0]===e)return n[r][1];return null}getAll(e,n){return si("getAll",arguments,1),n=[],e+="",this.#e.forEach(o=>o[0]===e&&n.push(o[1])),n}has(e){return si("has",arguments,1),e+="",this.#e.some(n=>n[0]===e)}forEach(e,n){si("forEach",arguments,1);for(var[o,r]of this)e.call(n,r,o,this)}set(...e){si("set",arguments,2);var n=[],o=!0;e=iC(...e),this.#e.forEach(r=>{r[0]===e[0]?o&&(o=!n.push(e)):n.push(r)}),o&&n.push(e),this.#e=n}*entries(){yield*this.#e}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}};a(aC,"formDataToBlob")});var kn,Af=Tt(()=>{kn=class extends Error{static{a(this,"FetchBaseError")}constructor(e,n){super(e),Error.captureStackTrace(this,this.constructor),this.type=n}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var Bt,Ib=Tt(()=>{Af();Bt=class extends kn{static{a(this,"FetchError")}constructor(e,n,o){super(e,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var wf,Rb,au,sC,cC,uC,If=Tt(()=>{wf=Symbol.toStringTag,Rb=a(t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[wf]==="URLSearchParams","isURLSearchParameters"),au=a(t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[wf]),"isBlob"),sC=a(t=>typeof t=="object"&&(t[wf]==="AbortSignal"||t[wf]==="EventTarget"),"isAbortSignal"),cC=a((t,e)=>{let n=new URL(e).hostname,o=new URL(t).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),uC=a((t,e)=>{let n=new URL(e).protocol,o=new URL(t).protocol;return n===o},"isSameProtocol")});var dC=N((zne,lC)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=require("worker_threads"),e=new t().port1,n=new ArrayBuffer;e.postMessage(n,[n,n])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}lC.exports=globalThis.DOMException});var ci,pC,fC,Ob,mC,hC,gC,yC,_C,vC,Rf,Cb=Tt(()=>{ci=require("node:fs"),pC=require("node:path"),fC=St(dC(),1);Ab();ou();({stat:Ob}=ci.promises),mC=a((t,e)=>_C((0,ci.statSync)(t),t,e),"blobFromSync"),hC=a((t,e)=>Ob(t).then(n=>_C(n,t,e)),"blobFrom"),gC=a((t,e)=>Ob(t).then(n=>vC(n,t,e)),"fileFrom"),yC=a((t,e)=>vC((0,ci.statSync)(t),t,e),"fileFromSync"),_C=a((t,e,n="")=>new qr([new Rf({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],{type:n}),"fromBlob"),vC=a((t,e,n="")=>new bo([new Rf({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],(0,pC.basename)(e),{type:n,lastModified:t.mtimeMs}),"fromFile"),Rf=class t{static{a(this,"BlobDataItem")}#e;#t;constructor(e){this.#e=e.path,this.#t=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,n){return new t({path:this.#e,lastModified:this.lastModified,size:n-e,start:this.#t+e})}async*stream(){let{mtimeMs:e}=await Ob(this.#e);if(e>this.lastModified)throw new fC.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,ci.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var SC={};nr(SC,{toFormData:()=>P4});function E4(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let n=e[2]||e[3]||"",o=n.slice(n.lastIndexOf("\\")+1);return o=o.replace(/%22/g,'"'),o=o.replace(/&#(\d{4});/g,(r,i)=>String.fromCharCode(i)),o}async function P4(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let n=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");let o=new $b(n[1]||n[2]),r,i,s,u,l,p,f=[],y=new So,m=a(x=>{s+=P.decode(x,{stream:!0})},"onPartData"),h=a(x=>{f.push(x)},"appendToFile"),_=a(()=>{let x=new bo(f,p,{type:l});y.append(u,x)},"appendFileToFormData"),E=a(()=>{y.append(u,s)},"appendEntryToFormData"),P=new TextDecoder("utf-8");P.decode(),o.onPartBegin=function(){o.onPartData=m,o.onPartEnd=E,r="",i="",s="",u="",l="",p=null,f.length=0},o.onHeaderField=function(x){r+=P.decode(x,{stream:!0})},o.onHeaderValue=function(x){i+=P.decode(x,{stream:!0})},o.onHeaderEnd=function(){if(i+=P.decode(),r=r.toLowerCase(),r==="content-disposition"){let x=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);x&&(u=x[2]||x[3]||""),p=E4(i),p&&(o.onPartData=h,o.onPartEnd=_)}else r==="content-type"&&(l=i);i="",r=""};for await(let x of t)o.write(x);return o.end(),y}var rn,ot,bC,Eo,Of,Cf,y4,su,_4,v4,b4,S4,ui,$b,EC=Tt(()=>{Cb();Tf();rn=0,ot={START_BOUNDARY:rn++,HEADER_FIELD_START:rn++,HEADER_FIELD:rn++,HEADER_VALUE_START:rn++,HEADER_VALUE:rn++,HEADER_VALUE_ALMOST_DONE:rn++,HEADERS_ALMOST_DONE:rn++,PART_DATA_START:rn++,PART_DATA:rn++,END:rn++},bC=1,Eo={PART_BOUNDARY:bC,LAST_BOUNDARY:bC*=2},Of=10,Cf=13,y4=32,su=45,_4=58,v4=97,b4=122,S4=a(t=>t|32,"lower"),ui=a(()=>{},"noop"),$b=class{static{a(this,"MultipartParser")}constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=ui,this.onHeaderField=ui,this.onHeadersEnd=ui,this.onHeaderValue=ui,this.onPartBegin=ui,this.onPartData=ui,this.onPartEnd=ui,this.boundaryChars={},e=`\r
25
+ --`+e;let n=new Uint8Array(e.length);for(let o=0;o<e.length;o++)n[o]=e.charCodeAt(o),this.boundaryChars[n[o]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=ot.START_BOUNDARY}write(e){let n=0,o=e.length,r=this.index,{lookbehind:i,boundary:s,boundaryChars:u,index:l,state:p,flags:f}=this,y=this.boundary.length,m=y-1,h=e.length,_,E,P=a(K=>{this[K+"Mark"]=n},"mark"),x=a(K=>{delete this[K+"Mark"]},"clear"),z=a((K,Z,J,ee)=>{(Z===void 0||Z!==J)&&this[K](ee&&ee.subarray(Z,J))},"callback"),M=a((K,Z)=>{let J=K+"Mark";J in this&&(Z?(z(K,this[J],n,e),delete this[J]):(z(K,this[J],e.length,e),this[J]=0))},"dataCallback");for(n=0;n<o;n++)switch(_=e[n],p){case ot.START_BOUNDARY:if(l===s.length-2){if(_===su)f|=Eo.LAST_BOUNDARY;else if(_!==Cf)return;l++;break}else if(l-1===s.length-2){if(f&Eo.LAST_BOUNDARY&&_===su)p=ot.END,f=0;else if(!(f&Eo.LAST_BOUNDARY)&&_===Of)l=0,z("onPartBegin"),p=ot.HEADER_FIELD_START;else return;break}_!==s[l+2]&&(l=-2),_===s[l+2]&&l++;break;case ot.HEADER_FIELD_START:p=ot.HEADER_FIELD,P("onHeaderField"),l=0;case ot.HEADER_FIELD:if(_===Cf){x("onHeaderField"),p=ot.HEADERS_ALMOST_DONE;break}if(l++,_===su)break;if(_===_4){if(l===1)return;M("onHeaderField",!0),p=ot.HEADER_VALUE_START;break}if(E=S4(_),E<v4||E>b4)return;break;case ot.HEADER_VALUE_START:if(_===y4)break;P("onHeaderValue"),p=ot.HEADER_VALUE;case ot.HEADER_VALUE:_===Cf&&(M("onHeaderValue",!0),z("onHeaderEnd"),p=ot.HEADER_VALUE_ALMOST_DONE);break;case ot.HEADER_VALUE_ALMOST_DONE:if(_!==Of)return;p=ot.HEADER_FIELD_START;break;case ot.HEADERS_ALMOST_DONE:if(_!==Of)return;z("onHeadersEnd"),p=ot.PART_DATA_START;break;case ot.PART_DATA_START:p=ot.PART_DATA,P("onPartData");case ot.PART_DATA:if(r=l,l===0){for(n+=m;n<h&&!(e[n]in u);)n+=y;n-=m,_=e[n]}if(l<s.length)s[l]===_?(l===0&&M("onPartData",!0),l++):l=0;else if(l===s.length)l++,_===Cf?f|=Eo.PART_BOUNDARY:_===su?f|=Eo.LAST_BOUNDARY:l=0;else if(l-1===s.length)if(f&Eo.PART_BOUNDARY){if(l=0,_===Of){f&=~Eo.PART_BOUNDARY,z("onPartEnd"),z("onPartBegin"),p=ot.HEADER_FIELD_START;break}}else f&Eo.LAST_BOUNDARY&&_===su?(z("onPartEnd"),p=ot.END,f=0):l=0;if(l>0)i[l-1]=_;else if(r>0){let K=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);z("onPartData",0,r,K),r=0,P("onPartData"),n--}break;case ot.END:break;default:throw new Error(`Unexpected state entered: ${p}`)}M("onHeaderField"),M("onHeaderValue"),M("onPartData"),this.index=l,this.state=p,this.flags=f}end(){if(this.state===ot.HEADER_FIELD_START&&this.index===0||this.state===ot.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==ot.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(E4,"_fileName");a(P4,"toFormData")});async function kb(t){if(t[Yt].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[Yt].disturbed=!0,t[Yt].error)throw t[Yt].error;let{body:e}=t;if(e===null)return ur.Buffer.alloc(0);if(!(e instanceof Ir.default))return ur.Buffer.alloc(0);let n=[],o=0;try{for await(let r of e){if(t.size>0&&o+r.length>t.size){let i=new Bt(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(i),i}o+=r.length,n.push(r)}}catch(r){throw r instanceof kn?r:new Bt(`Invalid response body while trying to fetch ${t.url}: ${r.message}`,"system",r)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return n.every(r=>typeof r=="string")?ur.Buffer.from(n.join("")):ur.Buffer.concat(n,o)}catch(r){throw new Bt(`Could not create Buffer from response body for ${t.url}: ${r.message}`,"system",r)}else throw new Bt(`Premature close of server response while trying to fetch ${t.url}`)}var Ir,Nn,ur,x4,Yt,nn,Aa,T4,$f,PC,xC,kf=Tt(()=>{Ir=St(require("node:stream"),1),Nn=require("node:util"),ur=require("node:buffer");ou();Tf();Ib();Af();If();x4=(0,Nn.promisify)(Ir.default.pipeline),Yt=Symbol("Body internals"),nn=class{static{a(this,"Body")}constructor(e,{size:n=0}={}){let o=null;e===null?e=null:Rb(e)?e=ur.Buffer.from(e.toString()):au(e)||ur.Buffer.isBuffer(e)||(Nn.types.isAnyArrayBuffer(e)?e=ur.Buffer.from(e):ArrayBuffer.isView(e)?e=ur.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof Ir.default||(e instanceof So?(e=aC(e),o=e.type.split("=")[1]):e=ur.Buffer.from(String(e))));let r=e;ur.Buffer.isBuffer(e)?r=Ir.default.Readable.from(e):au(e)&&(r=Ir.default.Readable.from(e.stream())),this[Yt]={body:e,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,e instanceof Ir.default&&e.on("error",i=>{let s=i instanceof kn?i:new Bt(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[Yt].error=s})}get body(){return this[Yt].stream}get bodyUsed(){return this[Yt].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:n,byteLength:o}=await kb(this);return e.slice(n,n+o)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let o=new So,r=new URLSearchParams(await this.text());for(let[i,s]of r)o.append(i,s);return o}let{toFormData:n}=await Promise.resolve().then(()=>(EC(),SC));return n(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[Yt].body&&this[Yt].body.type||"",n=await this.arrayBuffer();return new qr([n],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await kb(this);return new TextDecoder().decode(e)}buffer(){return kb(this)}};nn.prototype.buffer=(0,Nn.deprecate)(nn.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(nn.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Nn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(kb,"consumeBody");Aa=a((t,e)=>{let n,o,{body:r}=t[Yt];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof Ir.default&&typeof r.getBoundary!="function"&&(n=new Ir.PassThrough({highWaterMark:e}),o=new Ir.PassThrough({highWaterMark:e}),r.pipe(n),r.pipe(o),t[Yt].stream=n,r=o),r},"clone"),T4=(0,Nn.deprecate)(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),$f=a((t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":Rb(t)?"application/x-www-form-urlencoded;charset=UTF-8":au(t)?t.type||null:ur.Buffer.isBuffer(t)||Nn.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof So?`multipart/form-data; boundary=${e[Yt].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${T4(t)}`:t instanceof Ir.default?null:"text/plain;charset=UTF-8","extractContentType"),PC=a(t=>{let{body:e}=t[Yt];return e===null?0:au(e)?e.size:ur.Buffer.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},"getTotalBytes"),xC=a(async(t,{body:e})=>{e===null?t.end():await x4(e,t)},"writeToStream")});function TC(t=[]){return new Qt(t.reduce((e,n,o,r)=>(o%2===0&&e.push(r.slice(o,o+2)),e),[]).filter(([e,n])=>{try{return Nf(e),zb(e,String(n)),!0}catch{return!1}}))}var Nb,cu,Nf,zb,Qt,zf=Tt(()=>{Nb=require("node:util"),cu=St(require("node:http"),1),Nf=typeof cu.default.validateHeaderName=="function"?cu.default.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},zb=typeof cu.default.validateHeaderValue=="function"?cu.default.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let n=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}},Qt=class t extends URLSearchParams{static{a(this,"Headers")}constructor(e){let n=[];if(e instanceof t){let o=e.raw();for(let[r,i]of Object.entries(o))n.push(...i.map(s=>[r,s]))}else if(e!=null)if(typeof e=="object"&&!Nb.types.isBoxedPrimitive(e)){let o=e[Symbol.iterator];if(o==null)n.push(...Object.entries(e));else{if(typeof o!="function")throw new TypeError("Header pairs must be iterable");n=[...e].map(r=>{if(typeof r!="object"||Nb.types.isBoxedPrimitive(r))throw new TypeError("Each header pair must be an iterable object");return[...r]}).map(r=>{if(r.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...r]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return n=n.length>0?n.map(([o,r])=>(Nf(o),zb(o,String(r)),[String(o).toLowerCase(),String(r)])):void 0,super(n),new Proxy(this,{get(o,r,i){switch(r){case"append":case"set":return(s,u)=>(Nf(s),zb(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(Nf(s),URLSearchParams.prototype[r].call(o,String(s).toLowerCase()));case"keys":return()=>(o.sort(),new Set(URLSearchParams.prototype.keys.call(o)).keys());default:return Reflect.get(o,r,i)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let n=this.getAll(e);if(n.length===0)return null;let o=n.join(", ");return/^content-encoding$/i.test(e)&&(o=o.toLowerCase()),o}forEach(e,n=void 0){for(let o of this.keys())Reflect.apply(e,n,[this.get(o),o,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,n)=>(e[n]=this.getAll(n),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,n)=>{let o=this.getAll(n);return n==="host"?e[n]=o[0]:e[n]=o.length>1?o:o[0],e},{})}};Object.defineProperties(Qt.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));a(TC,"fromRawHeaders")});var A4,uu,Db=Tt(()=>{A4=new Set([301,302,303,307,308]),uu=a(t=>A4.has(t),"isRedirect")});var Vr,lr,AC=Tt(()=>{zf();kf();Db();Vr=Symbol("Response internals"),lr=class t extends nn{static{a(this,"Response")}constructor(e=null,n={}){super(e,n);let o=n.status!=null?n.status:200,r=new Qt(n.headers);if(e!==null&&!r.has("Content-Type")){let i=$f(e,this);i&&r.append("Content-Type",i)}this[Vr]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[Vr].type}get url(){return this[Vr].url||""}get status(){return this[Vr].status}get ok(){return this[Vr].status>=200&&this[Vr].status<300}get redirected(){return this[Vr].counter>0}get statusText(){return this[Vr].statusText}get headers(){return this[Vr].headers}get highWaterMark(){return this[Vr].highWaterMark}clone(){return new t(Aa(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,n=302){if(!uu(n))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:n})}static error(){let e=new t(null,{status:0,statusText:""});return e[Vr].type="error",e}static json(e=void 0,n={}){let o=JSON.stringify(e);if(o===void 0)throw new TypeError("data is not JSON serializable");let r=new Qt(n&&n.headers);return r.has("content-type")||r.set("content-type","application/json"),new t(o,{...n,headers:r})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(lr.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var wC,IC=Tt(()=>{wC=a(t=>{if(t.search)return t.search;let e=t.href.length-1,n=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-n.length]==="?"?"?":""},"getSearch")});function RC(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function kC(t){if(!CC.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function w4(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),n=(0,OC.isIP)(e);return n===4&&/^127\./.test(e)||n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function wa(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:w4(t)}function NC(t,{referrerURLCallback:e,referrerOriginCallback:n}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let o=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let r=t.referrer,i=RC(r),s=RC(r,!0);i.toString().length>4096&&(i=s),e&&(i=e(i)),n&&(s=n(s));let u=new URL(t.url);switch(o){case"no-referrer":return"no-referrer";case"origin":return s;case"unsafe-url":return i;case"strict-origin":return wa(i)&&!wa(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:wa(i)&&!wa(u)?"no-referrer":s;case"same-origin":return i.origin===u.origin?i:"no-referrer";case"origin-when-cross-origin":return i.origin===u.origin?i:s;case"no-referrer-when-downgrade":return wa(i)&&!wa(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function zC(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of e)o&&CC.has(o)&&(n=o);return n}var OC,CC,$C,Ub=Tt(()=>{OC=require("node:net");a(RC,"stripURLForUseAsAReferrer");CC=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),$C="strict-origin-when-cross-origin";a(kC,"validateReferrerPolicy");a(w4,"isOriginPotentiallyTrustworthy");a(wa,"isUrlPotentiallyTrustworthy");a(NC,"determineRequestsReferrer");a(zC,"parseReferrerPolicyFromHeader")});var DC,UC,$t,lu,I4,Po,MC,jC=Tt(()=>{DC=require("node:url"),UC=require("node:util");zf();kf();If();IC();Ub();$t=Symbol("Request internals"),lu=a(t=>typeof t=="object"&&typeof t[$t]=="object","isRequest"),I4=(0,UC.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Po=class t extends nn{static{a(this,"Request")}constructor(e,n={}){let o;if(lu(e)?o=new URL(e.url):(o=new URL(e),e={}),o.username!==""||o.password!=="")throw new TypeError(`${o} is an url with embedded credentials.`);let r=n.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(r)&&(r=r.toUpperCase()),!lu(n)&&"data"in n&&I4(),(n.body!=null||lu(e)&&e.body!==null)&&(r==="GET"||r==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let i=n.body?n.body:lu(e)&&e.body!==null?Aa(e):null;super(i,{size:n.size||e.size||0});let s=new Qt(n.headers||e.headers||{});if(i!==null&&!s.has("Content-Type")){let p=$f(i,this);p&&s.set("Content-Type",p)}let u=lu(e)?e.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!sC(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let l=n.referrer==null?e.referrer:n.referrer;if(l==="")l="no-referrer";else if(l){let p=new URL(l);l=/^about:(\/\/)?client$/.test(p)?"client":p}else l=void 0;this[$t]={method:r,redirect:n.redirect||e.redirect||"follow",headers:s,parsedURL:o,signal:u,referrer:l},this.follow=n.follow===void 0?e.follow===void 0?20:e.follow:n.follow,this.compress=n.compress===void 0?e.compress===void 0?!0:e.compress:n.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent,this.highWaterMark=n.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=n.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=n.referrerPolicy||e.referrerPolicy||""}get method(){return this[$t].method}get url(){return(0,DC.format)(this[$t].parsedURL)}get headers(){return this[$t].headers}get redirect(){return this[$t].redirect}get signal(){return this[$t].signal}get referrer(){if(this[$t].referrer==="no-referrer")return"";if(this[$t].referrer==="client")return"about:client";if(this[$t].referrer)return this[$t].referrer.toString()}get referrerPolicy(){return this[$t].referrerPolicy}set referrerPolicy(e){this[$t].referrerPolicy=kC(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Po.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});MC=a(t=>{let{parsedURL:e}=t[$t],n=new Qt(t[$t].headers);n.has("Accept")||n.set("Accept","*/*");let o=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(o="0"),t.body!==null){let u=PC(t);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),t.referrerPolicy===""&&(t.referrerPolicy=$C),t.referrer&&t.referrer!=="no-referrer"?t[$t].referrer=NC(t):t[$t].referrer="no-referrer",t[$t].referrer instanceof URL&&n.set("Referer",t.referrer),n.has("User-Agent")||n.set("User-Agent","node-fetch"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip, deflate, br");let{agent:r}=t;typeof r=="function"&&(r=r(e));let i=wC(e),s={path:e.pathname+i,method:t.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:r};return{parsedURL:e,options:s}},"getNodeRequestOptions")});var du,LC=Tt(()=>{Af();du=class extends kn{static{a(this,"AbortError")}constructor(e,n="aborted"){super(e,n)}}});var qC={};nr(qC,{AbortError:()=>du,Blob:()=>qr,FetchError:()=>Bt,File:()=>bo,FormData:()=>So,Headers:()=>Qt,Request:()=>Po,Response:()=>lr,blobFrom:()=>hC,blobFromSync:()=>mC,default:()=>Mb,fileFrom:()=>gC,fileFromSync:()=>yC,isRedirect:()=>uu});async function Mb(t,e){return new Promise((n,o)=>{let r=new Po(t,e),{parsedURL:i,options:s}=MC(r);if(!R4.has(i.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let _=XO(r.url),E=new lr(_,{headers:{"Content-Type":_.typeFull}});n(E);return}let u=(i.protocol==="https:"?BC.default:FC.default).request,{signal:l}=r,p=null,f=a(()=>{let _=new du("The operation was aborted.");o(_),r.body&&r.body instanceof dr.default.Readable&&r.body.destroy(_),!(!p||!p.body)&&p.body.emit("error",_)},"abort");if(l&&l.aborted){f();return}let y=a(()=>{f(),h()},"abortAndFinalize"),m=u(i.toString(),s);l&&l.addEventListener("abort",y);let h=a(()=>{m.abort(),l&&l.removeEventListener("abort",y)},"finalize");m.on("error",_=>{o(new Bt(`request to ${r.url} failed, reason: ${_.message}`,"system",_)),h()}),O4(m,_=>{p&&p.body&&p.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let E;_.prependListener("end",()=>{E=_._eventsCount}),_.prependListener("close",P=>{if(p&&E<_._eventsCount&&!P){let x=new Error("Premature close");x.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",x)}})}),m.on("response",_=>{m.setTimeout(0);let E=TC(_.rawHeaders);if(uu(_.statusCode)){let K=E.get("Location"),Z=null;try{Z=K===null?null:new URL(K,r.url)}catch{if(r.redirect!=="manual"){o(new Bt(`uri requested responds with an invalid redirect URL: ${K}`,"invalid-redirect")),h();return}}switch(r.redirect){case"error":o(new Bt(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),h();return;case"manual":break;case"follow":{if(Z===null)break;if(r.counter>=r.follow){o(new Bt(`maximum redirect reached at: ${r.url}`,"max-redirect")),h();return}let J={headers:new Qt(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:Aa(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!cC(r.url,Z)||!uC(r.url,Z))for(let ae of["authorization","www-authenticate","cookie","cookie2"])J.headers.delete(ae);if(_.statusCode!==303&&r.body&&e.body instanceof dr.default.Readable){o(new Bt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),h();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&r.method==="POST")&&(J.method="GET",J.body=void 0,J.headers.delete("content-length"));let ee=zC(E);ee&&(J.referrerPolicy=ee),n(Mb(new Po(Z,J))),h();return}default:return o(new TypeError(`Redirect option '${r.redirect}' is not a valid value of RequestRedirect`))}}l&&_.once("end",()=>{l.removeEventListener("abort",y)});let P=(0,dr.pipeline)(_,new dr.PassThrough,K=>{K&&o(K)});process.version<"v12.10"&&_.on("aborted",y);let x={url:r.url,status:_.statusCode,statusText:_.statusMessage,headers:E,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},z=E.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||z===null||_.statusCode===204||_.statusCode===304){p=new lr(P,x),n(p);return}let M={flush:li.default.Z_SYNC_FLUSH,finishFlush:li.default.Z_SYNC_FLUSH};if(z==="gzip"||z==="x-gzip"){P=(0,dr.pipeline)(P,li.default.createGunzip(M),K=>{K&&o(K)}),p=new lr(P,x),n(p);return}if(z==="deflate"||z==="x-deflate"){let K=(0,dr.pipeline)(_,new dr.PassThrough,Z=>{Z&&o(Z)});K.once("data",Z=>{(Z[0]&15)===8?P=(0,dr.pipeline)(P,li.default.createInflate(),J=>{J&&o(J)}):P=(0,dr.pipeline)(P,li.default.createInflateRaw(),J=>{J&&o(J)}),p=new lr(P,x),n(p)}),K.once("end",()=>{p||(p=new lr(P,x),n(p))});return}if(z==="br"){P=(0,dr.pipeline)(P,li.default.createBrotliDecompress(),K=>{K&&o(K)}),p=new lr(P,x),n(p);return}p=new lr(P,x),n(p)}),xC(m,r).catch(o)})}function O4(t,e){let n=pu.Buffer.from(`0\r
26
26
  \r
27
- `),n=!1,i=!1,s;t.on("response",c=>{let{headers:d}=c;n=d["transfer-encoding"]==="chunked"&&!d["content-length"]}),t.on("socket",c=>{let d=o(()=>{if(n&&!i){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",e(f)}},"onSocketClose"),l=o(f=>{i=pa.Buffer.compare(f.slice(-5),r)===0,!i&&s&&(i=pa.Buffer.compare(s.slice(-3),r.slice(0,3))===0&&pa.Buffer.compare(f.slice(-2),r.slice(3))===0),s=f},"onData");c.prependListener("close",d),c.on("data",l),t.on("close",()=>{c.removeListener("close",d),c.removeListener("data",l)})})}var UP,MP,ao,Bt,pa,_$,LP=gt(()=>{UP=ft(require("node:http"),1),MP=ft(require("node:https"),1),ao=ft(require("node:zlib"),1),Bt=ft(require("node:stream"),1),pa=require("node:buffer");Zb();gu();SP();_u();zP();Od();DP();Md();uu();du();jd();kd();_$=new Set(["data:","http:","https:"]);o(Ld,"fetch");o(v$,"fixResponseChunkedTransferBadEnding")});var qP=k(Qo=>{"use strict";var b$=Qo&&Qo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Xo;Object.defineProperty(Qo,"__esModule",{value:!0});Qo.Gaxios=void 0;var P$=b$(ra()),S$=require("https"),so=gd(),E$=Pb(),FP=require("stream"),BP=vd(),T$=o(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),x$=204,vu=class{static{o(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(e){this.defaults=e||{},this.interceptors={request:new BP.GaxiosInterceptorManager,response:new BP.GaxiosInterceptorManager}}fetch(...e){let r=e[0],n=e[1],i,s=new Headers;return typeof r=="string"?i=new URL(r):r instanceof URL?i=r:r&&r.url&&(i=new URL(r.url)),r&&typeof r=="object"&&"headers"in r&&Xo.mergeHeaders(s,r.headers),n&&Xo.mergeHeaders(s,new Headers(n.headers)),typeof r=="object"&&!(r instanceof URL)?this.request({...n,...r,headers:s,url:i}):this.request({...n,headers:s,url:i})}async request(e={}){let r=await this.#n(e);return r=await this.#t(r),this.#r(this._request(r))}async _defaultAdapter(e){let r=e.fetchImplementation||this.defaults.fetchImplementation||await Xo.#u(),n={...e};delete n.data;let i=await r(e.url,n),s=await this.getResponseData(e,i);return Object.getOwnPropertyDescriptor(i,"data")?.configurable||Object.defineProperties(i,{data:{configurable:!0,writable:!0,enumerable:!0,value:s}}),Object.assign(i,{config:e,data:s})}async _request(e){try{let r;if(e.adapter?r=await e.adapter(e,this._defaultAdapter.bind(this)):r=await this._defaultAdapter(e),!e.validateStatus(r.status)){if(e.responseType==="stream"){let i=[];for await(let s of r.data)i.push(s);r.data=i.toString()}let n=so.GaxiosError.extractAPIErrorFromResponse(r,`Request failed with status code ${r.status}`);throw new so.GaxiosError(n?.message,e,r,n)}return r}catch(r){let n;r instanceof so.GaxiosError?n=r:r instanceof Error?n=new so.GaxiosError(r.message,e,void 0,r):n=new so.GaxiosError("Unexpected Gaxios Error",e,void 0,r);let{shouldRetry:i,config:s}=await(0,E$.getRetryConfig)(n);if(i&&s)return n.config.retryConfig.currentRetryAttempt=s.retryConfig.currentRetryAttempt,e.retryConfig=n.config?.retryConfig,this.#o(e),this._request(e);throw e.errorRedactor&&e.errorRedactor(n),n}}async getResponseData(e,r){if(r.status===x$)return"";if(e.maxContentLength&&r.headers.has("content-length")&&e.maxContentLength<Number.parseInt(r.headers?.get("content-length")||""))throw new so.GaxiosError("Response's `Content-Length` is over the limit.",e,Object.assign(r,{config:e}));switch(e.responseType){case"stream":return r.body;case"json":{let n=await r.text();try{return JSON.parse(n)}catch{return n}}case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"text":return r.text();default:return this.getResponseDataFromContentType(r)}}#e(e,r=[]){let n=new URL(e),i=[...r],s=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let c of s)i.push(c.trim());for(let c of i)if(c instanceof RegExp){if(c.test(n.toString()))return!1}else if(c instanceof URL){if(c.origin===n.origin)return!1}else if(c.startsWith("*.")||c.startsWith(".")){let d=c.replace(/^\*\./,".");if(n.hostname.endsWith(d))return!1}else if(c===n.origin||c===n.hostname||c===n.href)return!1;return!0}async#t(e){let r=Promise.resolve(e);for(let n of this.interceptors.request.values())n&&(r=r.then(n.resolved,n.rejected));return r}async#r(e){let r=Promise.resolve(e);for(let n of this.interceptors.response.values())n&&(r=r.then(n.resolved,n.rejected));return r}async#n(e){let r=new Headers(this.defaults.headers);Xo.mergeHeaders(r,e.headers);let n=(0,P$.default)(!0,{},this.defaults,e);if(!n.url)throw new Error("URL is required.");if(n.baseURL&&(n.url=new URL(n.url,n.baseURL)),n.url=new URL(n.url),n.params)if(n.paramsSerializer){let c=n.paramsSerializer(n.params);c.startsWith("?")&&(c=c.slice(1));let d=n.url.toString().includes("?")?"&":"?";n.url=n.url+d+c}else{let c=n.url instanceof URL?n.url:new URL(n.url);for(let[d,l]of new URLSearchParams(n.params))c.searchParams.append(d,l);n.url=c}typeof e.maxContentLength=="number"&&(n.size=e.maxContentLength),typeof e.maxRedirects=="number"&&(n.follow=e.maxRedirects);let i=typeof n.data=="string"||n.data instanceof ArrayBuffer||n.data instanceof Blob||globalThis.File&&n.data instanceof File||n.data instanceof FormData||n.data instanceof FP.Readable||n.data instanceof ReadableStream||n.data instanceof String||n.data instanceof URLSearchParams||ArrayBuffer.isView(n.data)||["Blob","File","FormData"].includes(n.data?.constructor?.name||"");if(n.multipart?.length){let c=await T$();r.set("content-type",`multipart/related; boundary=${c}`),n.body=FP.Readable.from(this.getMultipartRequest(n.multipart,c))}else i?n.body=n.data:typeof n.data=="object"?r.get("Content-Type")==="application/x-www-form-urlencoded"?n.body=n.paramsSerializer?n.paramsSerializer(n.data):new URLSearchParams(n.data):(r.has("content-type")||r.set("content-type","application/json"),n.body=JSON.stringify(n.data)):n.data&&(n.body=n.data);n.validateStatus=n.validateStatus||this.validateStatus,n.responseType=n.responseType||"unknown",!r.has("accept")&&n.responseType==="json"&&r.set("accept","application/json");let s=n.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!n.agent)if(s&&this.#e(n.url,n.noProxy)){let c=await Xo.#s();this.agentCache.has(s)?n.agent=this.agentCache.get(s):(n.agent=new c(s,{cert:n.cert,key:n.key}),this.agentCache.set(s,n.agent))}else n.cert&&n.key&&(this.agentCache.has(n.key)?n.agent=this.agentCache.get(n.key):(n.agent=new S$.Agent({cert:n.cert,key:n.key}),this.agentCache.set(n.key,n.agent)));return typeof n.errorRedactor!="function"&&n.errorRedactor!==!1&&(n.errorRedactor=so.defaultErrorRedactor),n.body&&!("duplex"in n)&&(n.duplex="half"),this.#o(n),Object.assign(n,{headers:r,url:n.url instanceof URL?n.url:new URL(n.url)})}#o(e){if(e.timeout){let r=AbortSignal.timeout(e.timeout);e.signal&&!e.signal.aborted?e.signal=AbortSignal.any([e.signal,r]):e.signal=r}}validateStatus(e){return e>=200&&e<300}async getResponseDataFromContentType(e){let r=e.headers.get("Content-Type");if(r===null)return e.text();if(r=r.toLowerCase(),r.includes("application/json")){let n=await e.text();try{n=JSON.parse(n)}catch{}return n}else return r.match(/^text\//)?e.text():e.blob()}async*getMultipartRequest(e,r){let n=`--${r}--`;for(let i of e){let s=i.headers.get("Content-Type")||"application/octet-stream";yield`--${r}\r
28
- Content-Type: ${s}\r
27
+ `),o=!1,r=!1,i;t.on("response",s=>{let{headers:u}=s;o=u["transfer-encoding"]==="chunked"&&!u["content-length"]}),t.on("socket",s=>{let u=a(()=>{if(o&&!r){let p=new Error("Premature close");p.code="ERR_STREAM_PREMATURE_CLOSE",e(p)}},"onSocketClose"),l=a(p=>{r=pu.Buffer.compare(p.slice(-5),n)===0,!r&&i&&(r=pu.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&pu.Buffer.compare(p.slice(-2),n.slice(3))===0),i=p},"onData");s.prependListener("close",u),s.on("data",l),t.on("close",()=>{s.removeListener("close",u),s.removeListener("data",l)})})}var FC,BC,li,dr,pu,R4,VC=Tt(()=>{FC=St(require("node:http"),1),BC=St(require("node:https"),1),li=St(require("node:zlib"),1),dr=St(require("node:stream"),1),pu=require("node:buffer");YO();kf();AC();zf();jC();Ib();LC();Db();Tf();If();Ub();Cb();R4=new Set(["data:","http:","https:"]);a(Mb,"fetch");a(O4,"fixResponseChunkedTransferBadEnding")});var GC=N(Ra=>{"use strict";var C4=Ra&&Ra.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Ia;Object.defineProperty(Ra,"__esModule",{value:!0});Ra.Gaxios=void 0;var $4=C4(ru()),k4=require("https"),di=mb(),N4=TO(),ZC=require("stream"),HC=yb(),z4=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),D4=204,Df=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(e){this.defaults=e||{},this.interceptors={request:new HC.GaxiosInterceptorManager,response:new HC.GaxiosInterceptorManager}}fetch(...e){let n=e[0],o=e[1],r,i=new Headers;return typeof n=="string"?r=new URL(n):n instanceof URL?r=n:n&&n.url&&(r=new URL(n.url)),n&&typeof n=="object"&&"headers"in n&&Ia.mergeHeaders(i,n.headers),o&&Ia.mergeHeaders(i,new Headers(o.headers)),typeof n=="object"&&!(n instanceof URL)?this.request({...o,...n,headers:i,url:r}):this.request({...o,headers:i,url:r})}async request(e={}){let n=await this.#n(e);return n=await this.#t(n),this.#r(this._request(n))}async _defaultAdapter(e){let n=e.fetchImplementation||this.defaults.fetchImplementation||await Ia.#c(),o={...e};delete o.data;let r=await n(e.url,o),i=await this.getResponseData(e,r);return Object.getOwnPropertyDescriptor(r,"data")?.configurable||Object.defineProperties(r,{data:{configurable:!0,writable:!0,enumerable:!0,value:i}}),Object.assign(r,{config:e,data:i})}async _request(e){try{let n;if(e.adapter?n=await e.adapter(e,this._defaultAdapter.bind(this)):n=await this._defaultAdapter(e),!e.validateStatus(n.status)){if(e.responseType==="stream"){let r=[];for await(let i of n.data)r.push(i);n.data=r.toString()}let o=di.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new di.GaxiosError(o?.message,e,n,o)}return n}catch(n){let o;n instanceof di.GaxiosError?o=n:n instanceof Error?o=new di.GaxiosError(n.message,e,void 0,n):o=new di.GaxiosError("Unexpected Gaxios Error",e,void 0,n);let{shouldRetry:r,config:i}=await(0,N4.getRetryConfig)(o);if(r&&i)return o.config.retryConfig.currentRetryAttempt=i.retryConfig.currentRetryAttempt,e.retryConfig=o.config?.retryConfig,this.#o(e),this._request(e);throw e.errorRedactor&&e.errorRedactor(o),o}}async getResponseData(e,n){if(n.status===D4)return"";if(e.maxContentLength&&n.headers.has("content-length")&&e.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new di.GaxiosError("Response's `Content-Length` is over the limit.",e,Object.assign(n,{config:e}));switch(e.responseType){case"stream":return n.body;case"json":{let o=await n.text();try{return JSON.parse(o)}catch{return o}}case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"text":return n.text();default:return this.getResponseDataFromContentType(n)}}#e(e,n=[]){let o=new URL(e),r=[...n],i=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let s of i)r.push(s.trim());for(let s of r)if(s instanceof RegExp){if(s.test(o.toString()))return!1}else if(s instanceof URL){if(s.origin===o.origin)return!1}else if(s.startsWith("*.")||s.startsWith(".")){let u=s.replace(/^\*\./,".");if(o.hostname.endsWith(u))return!1}else if(s===o.origin||s===o.hostname||s===o.href)return!1;return!0}async#t(e){let n=Promise.resolve(e);for(let o of this.interceptors.request.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#r(e){let n=Promise.resolve(e);for(let o of this.interceptors.response.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#n(e){let n=new Headers(this.defaults.headers);Ia.mergeHeaders(n,e.headers);let o=(0,$4.default)(!0,{},this.defaults,e);if(!o.url)throw new Error("URL is required.");if(o.baseURL&&(o.url=new URL(o.url,o.baseURL)),o.url=new URL(o.url),o.params)if(o.paramsSerializer){let s=o.paramsSerializer(o.params);s.startsWith("?")&&(s=s.slice(1));let u=o.url.toString().includes("?")?"&":"?";o.url=o.url+u+s}else{let s=o.url instanceof URL?o.url:new URL(o.url);for(let[u,l]of new URLSearchParams(o.params))s.searchParams.append(u,l);o.url=s}typeof e.maxContentLength=="number"&&(o.size=e.maxContentLength),typeof e.maxRedirects=="number"&&(o.follow=e.maxRedirects);let r=typeof o.data=="string"||o.data instanceof ArrayBuffer||o.data instanceof Blob||globalThis.File&&o.data instanceof File||o.data instanceof FormData||o.data instanceof ZC.Readable||o.data instanceof ReadableStream||o.data instanceof String||o.data instanceof URLSearchParams||ArrayBuffer.isView(o.data)||["Blob","File","FormData"].includes(o.data?.constructor?.name||"");if(o.multipart?.length){let s=await z4();n.set("content-type",`multipart/related; boundary=${s}`),o.body=ZC.Readable.from(this.getMultipartRequest(o.multipart,s))}else r?o.body=o.data:typeof o.data=="object"?n.get("Content-Type")==="application/x-www-form-urlencoded"?o.body=o.paramsSerializer?o.paramsSerializer(o.data):new URLSearchParams(o.data):(n.has("content-type")||n.set("content-type","application/json"),o.body=JSON.stringify(o.data)):o.data&&(o.body=o.data);o.validateStatus=o.validateStatus||this.validateStatus,o.responseType=o.responseType||"unknown",!n.has("accept")&&o.responseType==="json"&&n.set("accept","application/json");let i=o.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!o.agent)if(i&&this.#e(o.url,o.noProxy)){let s=await Ia.#s();this.agentCache.has(i)?o.agent=this.agentCache.get(i):(o.agent=new s(i,{cert:o.cert,key:o.key}),this.agentCache.set(i,o.agent))}else o.cert&&o.key&&(this.agentCache.has(o.key)?o.agent=this.agentCache.get(o.key):(o.agent=new k4.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=di.defaultErrorRedactor),o.body&&!("duplex"in o)&&(o.duplex="half"),this.#o(o),Object.assign(o,{headers:n,url:o.url instanceof URL?o.url:new URL(o.url)})}#o(e){if(e.timeout){let n=AbortSignal.timeout(e.timeout);e.signal&&!e.signal.aborted?e.signal=AbortSignal.any([e.signal,n]):e.signal=n}}validateStatus(e){return e>=200&&e<300}async getResponseDataFromContentType(e){let n=e.headers.get("Content-Type");if(n===null)return e.text();if(n=n.toLowerCase(),n.includes("application/json")){let o=await e.text();try{o=JSON.parse(o)}catch{}return o}else return n.match(/^text\//)?e.text():e.blob()}async*getMultipartRequest(e,n){let o=`--${n}--`;for(let r of e){let i=r.headers.get("Content-Type")||"application/octet-stream";yield`--${n}\r
28
+ Content-Type: ${i}\r
29
29
  \r
30
- `,typeof i.content=="string"?yield i.content:yield*i.content,yield`\r
31
- `}yield n}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>ft(Gb()))).HttpsProxyAgent,this.#i}static async#u(){let e=typeof window<"u"&&!!window;return this.#a||=e?window.fetch:(await Promise.resolve().then(()=>(LP(),jP))).default,this.#a}static mergeHeaders(e,...r){e=e instanceof Headers?e:new Headers(e);for(let n of r)(n instanceof Headers?n:new Headers(n)).forEach((s,c)=>{c==="set-cookie"?e.append(c,s):e.set(c,s)});return e}};Qo.Gaxios=vu;Xo=vu});var st=k(wt=>{"use strict";var A$=wt&&wt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),w$=wt&&wt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&A$(e,t,r)};Object.defineProperty(wt,"__esModule",{value:!0});wt.instance=wt.Gaxios=wt.GaxiosError=void 0;wt.request=R$;var VP=qP();Object.defineProperty(wt,"Gaxios",{enumerable:!0,get:o(function(){return VP.Gaxios},"get")});var I$=gd();Object.defineProperty(wt,"GaxiosError",{enumerable:!0,get:o(function(){return I$.GaxiosError},"get")});w$(vd(),wt);wt.instance=new VP.Gaxios;async function R$(t){return wt.instance.request(t)}o(R$,"request")});var Fd=k((HP,bu)=>{(function(t){"use strict";var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,s="[BigNumber Error] ",c=s+"Number primitive has more than 15 significant digits: ",d=1e14,l=14,f=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,h=1e9;function g(Z){var G,Y,ee,K=Q.prototype={constructor:Q,toString:null,valueOf:null},Oe=new Q(1),te=20,V=4,q=-7,J=21,W=-1e7,re=1e7,oe=!1,Ie=1,Ce=0,Be={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},Ge="0123456789abcdefghijklmnopqrstuvwxyz",ht=!0;function Q(b,E){var A,D,R,$,j,I,C,U,z=this;if(!(z instanceof Q))return new Q(b,E);if(E==null){if(b&&b._isBigNumber===!0){z.s=b.s,!b.c||b.e>re?z.c=z.e=null:b.e<W?z.c=[z.e=0]:(z.e=b.e,z.c=b.c.slice());return}if((I=typeof b=="number")&&b*0==0){if(z.s=1/b<0?(b=-b,-1):1,b===~~b){for($=0,j=b;j>=10;j/=10,$++);$>re?z.c=z.e=null:(z.e=$,z.c=[b]);return}U=String(b)}else{if(!r.test(U=String(b)))return ee(z,U,I);z.s=U.charCodeAt(0)==45?(U=U.slice(1),-1):1}($=U.indexOf("."))>-1&&(U=U.replace(".","")),(j=U.search(/e/i))>0?($<0&&($=j),$+=+U.slice(j+1),U=U.substring(0,j)):$<0&&($=U.length)}else{if(x(E,2,Ge.length,"Base"),E==10&&ht)return z=new Q(b),Fe(z,te+z.e+1,V);if(U=String(b),I=typeof b=="number"){if(b*0!=0)return ee(z,U,I,E);if(z.s=1/b<0?(U=U.slice(1),-1):1,Q.DEBUG&&U.replace(/^0\.0*|\./,"").length>15)throw Error(c+b)}else z.s=U.charCodeAt(0)===45?(U=U.slice(1),-1):1;for(A=Ge.slice(0,E),$=j=0,C=U.length;j<C;j++)if(A.indexOf(D=U.charAt(j))<0){if(D=="."){if(j>$){$=C;continue}}else if(!R&&(U==U.toUpperCase()&&(U=U.toLowerCase())||U==U.toLowerCase()&&(U=U.toUpperCase()))){R=!0,j=-1,$=0;continue}return ee(z,String(b),I,E)}I=!1,U=Y(U,E,10,z.s),($=U.indexOf("."))>-1?U=U.replace(".",""):$=U.length}for(j=0;U.charCodeAt(j)===48;j++);for(C=U.length;U.charCodeAt(--C)===48;);if(U=U.slice(j,++C)){if(C-=j,I&&Q.DEBUG&&C>15&&(b>f||b!==i(b)))throw Error(c+z.s*b);if(($=$-j-1)>re)z.c=z.e=null;else if($<W)z.c=[z.e=0];else{if(z.e=$,z.c=[],j=($+1)%l,$<0&&(j+=l),j<C){for(j&&z.c.push(+U.slice(0,j)),C-=l;j<C;)z.c.push(+U.slice(j,j+=l));j=l-(U=U.slice(j)).length}else j-=C;for(;j--;U+="0");z.c.push(+U)}}else z.c=[z.e=0]}o(Q,"BigNumber"),Q.clone=g,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.EUCLID=9,Q.config=Q.set=function(b){var E,A;if(b!=null)if(typeof b=="object"){if(b.hasOwnProperty(E="DECIMAL_PLACES")&&(A=b[E],x(A,0,h,E),te=A),b.hasOwnProperty(E="ROUNDING_MODE")&&(A=b[E],x(A,0,8,E),V=A),b.hasOwnProperty(E="EXPONENTIAL_AT")&&(A=b[E],A&&A.pop?(x(A[0],-h,0,E),x(A[1],0,h,E),q=A[0],J=A[1]):(x(A,-h,h,E),q=-(J=A<0?-A:A))),b.hasOwnProperty(E="RANGE"))if(A=b[E],A&&A.pop)x(A[0],-h,-1,E),x(A[1],1,h,E),W=A[0],re=A[1];else if(x(A,-h,h,E),A)W=-(re=A<0?-A:A);else throw Error(s+E+" cannot be zero: "+A);if(b.hasOwnProperty(E="CRYPTO"))if(A=b[E],A===!!A)if(A)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))oe=A;else throw oe=!A,Error(s+"crypto unavailable");else oe=A;else throw Error(s+E+" not true or false: "+A);if(b.hasOwnProperty(E="MODULO_MODE")&&(A=b[E],x(A,0,9,E),Ie=A),b.hasOwnProperty(E="POW_PRECISION")&&(A=b[E],x(A,0,h,E),Ce=A),b.hasOwnProperty(E="FORMAT"))if(A=b[E],typeof A=="object")Be=A;else throw Error(s+E+" not an object: "+A);if(b.hasOwnProperty(E="ALPHABET"))if(A=b[E],typeof A=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(A))ht=A.slice(0,10)=="0123456789",Ge=A;else throw Error(s+E+" invalid: "+A)}else throw Error(s+"Object expected: "+b);return{DECIMAL_PLACES:te,ROUNDING_MODE:V,EXPONENTIAL_AT:[q,J],RANGE:[W,re],CRYPTO:oe,MODULO_MODE:Ie,POW_PRECISION:Ce,FORMAT:Be,ALPHABET:Ge}},Q.isBigNumber=function(b){if(!b||b._isBigNumber!==!0)return!1;if(!Q.DEBUG)return!0;var E,A,D=b.c,R=b.e,$=b.s;e:if({}.toString.call(D)=="[object Array]"){if(($===1||$===-1)&&R>=-h&&R<=h&&R===i(R)){if(D[0]===0){if(R===0&&D.length===1)return!0;break e}if(E=(R+1)%l,E<1&&(E+=l),String(D[0]).length==E){for(E=0;E<D.length;E++)if(A=D[E],A<0||A>=d||A!==i(A))break e;if(A!==0)return!0}}}else if(D===null&&R===null&&($===null||$===1||$===-1))return!0;throw Error(s+"Invalid BigNumber: "+b)},Q.maximum=Q.max=function(){return it(arguments,-1)},Q.minimum=Q.min=function(){return it(arguments,1)},Q.random=(function(){var b=9007199254740992,E=Math.random()*b&2097151?function(){return i(Math.random()*b)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(A){var D,R,$,j,I,C=0,U=[],z=new Q(Oe);if(A==null?A=te:x(A,0,h),j=n(A/l),oe)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(j*=2));C<j;)I=D[C]*131072+(D[C+1]>>>11),I>=9e15?(R=crypto.getRandomValues(new Uint32Array(2)),D[C]=R[0],D[C+1]=R[1]):(U.push(I%1e14),C+=2);C=j/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(j*=7);C<j;)I=(D[C]&31)*281474976710656+D[C+1]*1099511627776+D[C+2]*4294967296+D[C+3]*16777216+(D[C+4]<<16)+(D[C+5]<<8)+D[C+6],I>=9e15?crypto.randomBytes(7).copy(D,C):(U.push(I%1e14),C+=7);C=j/7}else throw oe=!1,Error(s+"crypto unavailable");if(!oe)for(;C<j;)I=E(),I<9e15&&(U[C++]=I%1e14);for(j=U[--C],A%=l,j&&A&&(I=p[l-A],U[C]=i(j/I)*I);U[C]===0;U.pop(),C--);if(C<0)U=[$=0];else{for($=-1;U[0]===0;U.splice(0,1),$-=l);for(C=1,I=U[0];I>=10;I/=10,C++);C<l&&($-=l-C)}return z.e=$,z.c=U,z}})(),Q.sum=function(){for(var b=1,E=arguments,A=new Q(E[0]);b<E.length;)A=A.plus(E[b++]);return A},Y=(function(){var b="0123456789";function E(A,D,R,$){for(var j,I=[0],C,U=0,z=A.length;U<z;){for(C=I.length;C--;I[C]*=D);for(I[0]+=$.indexOf(A.charAt(U++)),j=0;j<I.length;j++)I[j]>R-1&&(I[j+1]==null&&(I[j+1]=0),I[j+1]+=I[j]/R|0,I[j]%=R)}return I.reverse()}return o(E,"toBaseOut"),function(A,D,R,$,j){var I,C,U,z,H,ie,ue,Ue,Je=A.indexOf("."),Ye=te,De=V;for(Je>=0&&(z=Ce,Ce=0,A=A.replace(".",""),Ue=new Q(D),ie=Ue.pow(A.length-Je),Ce=z,Ue.c=E(X(T(ie.c),ie.e,"0"),10,R,b),Ue.e=Ue.c.length),ue=E(A,D,R,j?(I=Ge,b):(I=b,Ge)),U=z=ue.length;ue[--z]==0;ue.pop());if(!ue[0])return I.charAt(0);if(Je<0?--U:(ie.c=ue,ie.e=U,ie.s=$,ie=G(ie,Ue,Ye,De,R),ue=ie.c,H=ie.r,U=ie.e),C=U+Ye+1,Je=ue[C],z=R/2,H=H||C<0||ue[C+1]!=null,H=De<4?(Je!=null||H)&&(De==0||De==(ie.s<0?3:2)):Je>z||Je==z&&(De==4||H||De==6&&ue[C-1]&1||De==(ie.s<0?8:7)),C<1||!ue[0])A=H?X(I.charAt(1),-Ye,I.charAt(0)):I.charAt(0);else{if(ue.length=C,H)for(--R;++ue[--C]>R;)ue[C]=0,C||(++U,ue=[1].concat(ue));for(z=ue.length;!ue[--z];);for(Je=0,A="";Je<=z;A+=I.charAt(ue[Je++]));A=X(A,U,I.charAt(0))}return A}})(),G=(function(){function b(D,R,$){var j,I,C,U,z=0,H=D.length,ie=R%_,ue=R/_|0;for(D=D.slice();H--;)C=D[H]%_,U=D[H]/_|0,j=ue*C+U*ie,I=ie*C+j%_*_+z,z=(I/$|0)+(j/_|0)+ue*U,D[H]=I%$;return z&&(D=[z].concat(D)),D}o(b,"multiply");function E(D,R,$,j){var I,C;if($!=j)C=$>j?1:-1;else for(I=C=0;I<$;I++)if(D[I]!=R[I]){C=D[I]>R[I]?1:-1;break}return C}o(E,"compare");function A(D,R,$,j){for(var I=0;$--;)D[$]-=I,I=D[$]<R[$]?1:0,D[$]=I*j+D[$]-R[$];for(;!D[0]&&D.length>1;D.splice(0,1));}return o(A,"subtract"),function(D,R,$,j,I){var C,U,z,H,ie,ue,Ue,Je,Ye,De,Le,dt,yo,_o,vo,zt,qr,St=D.s==R.s?1:-1,pt=D.c,Ve=R.c;if(!pt||!pt[0]||!Ve||!Ve[0])return new Q(!D.s||!R.s||(pt?Ve&&pt[0]==Ve[0]:!Ve)?NaN:pt&&pt[0]==0||!Ve?St*0:St/0);for(Je=new Q(St),Ye=Je.c=[],U=D.e-R.e,St=$+U+1,I||(I=d,U=y(D.e/l)-y(R.e/l),St=St/l|0),z=0;Ve[z]==(pt[z]||0);z++);if(Ve[z]>(pt[z]||0)&&U--,St<0)Ye.push(1),H=!0;else{for(_o=pt.length,zt=Ve.length,z=0,St+=2,ie=i(I/(Ve[0]+1)),ie>1&&(Ve=b(Ve,ie,I),pt=b(pt,ie,I),zt=Ve.length,_o=pt.length),yo=zt,De=pt.slice(0,zt),Le=De.length;Le<zt;De[Le++]=0);qr=Ve.slice(),qr=[0].concat(qr),vo=Ve[0],Ve[1]>=I/2&&vo++;do{if(ie=0,C=E(Ve,De,zt,Le),C<0){if(dt=De[0],zt!=Le&&(dt=dt*I+(De[1]||0)),ie=i(dt/vo),ie>1)for(ie>=I&&(ie=I-1),ue=b(Ve,ie,I),Ue=ue.length,Le=De.length;E(ue,De,Ue,Le)==1;)ie--,A(ue,zt<Ue?qr:Ve,Ue,I),Ue=ue.length,C=1;else ie==0&&(C=ie=1),ue=Ve.slice(),Ue=ue.length;if(Ue<Le&&(ue=[0].concat(ue)),A(De,ue,Le,I),Le=De.length,C==-1)for(;E(Ve,De,zt,Le)<1;)ie++,A(De,zt<Le?qr:Ve,Le,I),Le=De.length}else C===0&&(ie++,De=[0]);Ye[z++]=ie,De[0]?De[Le++]=pt[yo]||0:(De=[pt[yo]],Le=1)}while((yo++<_o||De[0]!=null)&&St--);H=De[0]!=null,Ye[0]||Ye.splice(0,1)}if(I==d){for(z=1,St=Ye[0];St>=10;St/=10,z++);Fe(Je,$+(Je.e=z+U*l-1)+1,j,H)}else Je.e=U,Je.r=+H;return Je}})();function rt(b,E,A,D){var R,$,j,I,C;if(A==null?A=V:x(A,0,8),!b.c)return b.toString();if(R=b.c[0],j=b.e,E==null)C=T(b.c),C=D==1||D==2&&(j<=q||j>=J)?F(C,j):X(C,j,"0");else if(b=Fe(new Q(b),E,A),$=b.e,C=T(b.c),I=C.length,D==1||D==2&&(E<=$||$<=q)){for(;I<E;C+="0",I++);C=F(C,$)}else if(E-=j+(D===2&&$>j),C=X(C,$,"0"),$+1>I){if(--E>0)for(C+=".";E--;C+="0");}else if(E+=$-I,E>0)for($+1==I&&(C+=".");E--;C+="0");return b.s<0&&R?"-"+C:C}o(rt,"format");function it(b,E){for(var A,D,R=1,$=new Q(b[0]);R<b.length;R++)D=new Q(b[R]),(!D.s||(A=P($,D))===E||A===0&&$.s===E)&&($=D);return $}o(it,"maxOrMin");function Nt(b,E,A){for(var D=1,R=E.length;!E[--R];E.pop());for(R=E[0];R>=10;R/=10,D++);return(A=D+A*l-1)>re?b.c=b.e=null:A<W?b.c=[b.e=0]:(b.e=A,b.c=E),b}o(Nt,"normalise"),ee=(function(){var b=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,A=/^\.([^.]+)$/,D=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function($,j,I,C){var U,z=I?j:j.replace(R,"");if(D.test(z))$.s=isNaN(z)?null:z<0?-1:1;else{if(!I&&(z=z.replace(b,function(H,ie,ue){return U=(ue=ue.toLowerCase())=="x"?16:ue=="b"?2:8,!C||C==U?ie:H}),C&&(U=C,z=z.replace(E,"$1").replace(A,"0.$1")),j!=z))return new Q(z,U);if(Q.DEBUG)throw Error(s+"Not a"+(C?" base "+C:"")+" number: "+j);$.s=null}$.c=$.e=null}})();function Fe(b,E,A,D){var R,$,j,I,C,U,z,H=b.c,ie=p;if(H){e:{for(R=1,I=H[0];I>=10;I/=10,R++);if($=E-R,$<0)$+=l,j=E,C=H[U=0],z=i(C/ie[R-j-1]%10);else if(U=n(($+1)/l),U>=H.length)if(D){for(;H.length<=U;H.push(0));C=z=0,R=1,$%=l,j=$-l+1}else break e;else{for(C=I=H[U],R=1;I>=10;I/=10,R++);$%=l,j=$-l+R,z=j<0?0:i(C/ie[R-j-1]%10)}if(D=D||E<0||H[U+1]!=null||(j<0?C:C%ie[R-j-1]),D=A<4?(z||D)&&(A==0||A==(b.s<0?3:2)):z>5||z==5&&(A==4||D||A==6&&($>0?j>0?C/ie[R-j]:0:H[U-1])%10&1||A==(b.s<0?8:7)),E<1||!H[0])return H.length=0,D?(E-=b.e+1,H[0]=ie[(l-E%l)%l],b.e=-E||0):H[0]=b.e=0,b;if($==0?(H.length=U,I=1,U--):(H.length=U+1,I=ie[l-$],H[U]=j>0?i(C/ie[R-j]%ie[j])*I:0),D)for(;;)if(U==0){for($=1,j=H[0];j>=10;j/=10,$++);for(j=H[0]+=I,I=1;j>=10;j/=10,I++);$!=I&&(b.e++,H[0]==d&&(H[0]=1));break}else{if(H[U]+=I,H[U]!=d)break;H[U--]=0,I=1}for($=H.length;H[--$]===0;H.pop());}b.e>re?b.c=b.e=null:b.e<W&&(b.c=[b.e=0])}return b}o(Fe,"round");function qe(b){var E,A=b.e;return A===null?b.toString():(E=T(b.c),E=A<=q||A>=J?F(E,A):X(E,A,"0"),b.s<0?"-"+E:E)}return o(qe,"valueOf"),K.absoluteValue=K.abs=function(){var b=new Q(this);return b.s<0&&(b.s=1),b},K.comparedTo=function(b,E){return P(this,new Q(b,E))},K.decimalPlaces=K.dp=function(b,E){var A,D,R,$=this;if(b!=null)return x(b,0,h),E==null?E=V:x(E,0,8),Fe(new Q($),b+$.e+1,E);if(!(A=$.c))return null;if(D=((R=A.length-1)-y(this.e/l))*l,R=A[R])for(;R%10==0;R/=10,D--);return D<0&&(D=0),D},K.dividedBy=K.div=function(b,E){return G(this,new Q(b,E),te,V)},K.dividedToIntegerBy=K.idiv=function(b,E){return G(this,new Q(b,E),0,1)},K.exponentiatedBy=K.pow=function(b,E){var A,D,R,$,j,I,C,U,z,H=this;if(b=new Q(b),b.c&&!b.isInteger())throw Error(s+"Exponent not an integer: "+qe(b));if(E!=null&&(E=new Q(E)),I=b.e>14,!H.c||!H.c[0]||H.c[0]==1&&!H.e&&H.c.length==1||!b.c||!b.c[0])return z=new Q(Math.pow(+qe(H),I?b.s*(2-N(b)):+qe(b))),E?z.mod(E):z;if(C=b.s<0,E){if(E.c?!E.c[0]:!E.s)return new Q(NaN);D=!C&&H.isInteger()&&E.isInteger(),D&&(H=H.mod(E))}else{if(b.e>9&&(H.e>0||H.e<-1||(H.e==0?H.c[0]>1||I&&H.c[1]>=24e7:H.c[0]<8e13||I&&H.c[0]<=9999975e7)))return $=H.s<0&&N(b)?-0:0,H.e>-1&&($=1/$),new Q(C?1/$:$);Ce&&($=n(Ce/l+2))}for(I?(A=new Q(.5),C&&(b.s=1),U=N(b)):(R=Math.abs(+qe(b)),U=R%2),z=new Q(Oe);;){if(U){if(z=z.times(H),!z.c)break;$?z.c.length>$&&(z.c.length=$):D&&(z=z.mod(E))}if(R){if(R=i(R/2),R===0)break;U=R%2}else if(b=b.times(A),Fe(b,b.e+1,1),b.e>14)U=N(b);else{if(R=+qe(b),R===0)break;U=R%2}H=H.times(H),$?H.c&&H.c.length>$&&(H.c.length=$):D&&(H=H.mod(E))}return D?z:(C&&(z=Oe.div(z)),E?z.mod(E):$?Fe(z,Ce,V,j):z)},K.integerValue=function(b){var E=new Q(this);return b==null?b=V:x(b,0,8),Fe(E,E.e+1,b)},K.isEqualTo=K.eq=function(b,E){return P(this,new Q(b,E))===0},K.isFinite=function(){return!!this.c},K.isGreaterThan=K.gt=function(b,E){return P(this,new Q(b,E))>0},K.isGreaterThanOrEqualTo=K.gte=function(b,E){return(E=P(this,new Q(b,E)))===1||E===0},K.isInteger=function(){return!!this.c&&y(this.e/l)>this.c.length-2},K.isLessThan=K.lt=function(b,E){return P(this,new Q(b,E))<0},K.isLessThanOrEqualTo=K.lte=function(b,E){return(E=P(this,new Q(b,E)))===-1||E===0},K.isNaN=function(){return!this.s},K.isNegative=function(){return this.s<0},K.isPositive=function(){return this.s>0},K.isZero=function(){return!!this.c&&this.c[0]==0},K.minus=function(b,E){var A,D,R,$,j=this,I=j.s;if(b=new Q(b,E),E=b.s,!I||!E)return new Q(NaN);if(I!=E)return b.s=-E,j.plus(b);var C=j.e/l,U=b.e/l,z=j.c,H=b.c;if(!C||!U){if(!z||!H)return z?(b.s=-E,b):new Q(H?j:NaN);if(!z[0]||!H[0])return H[0]?(b.s=-E,b):new Q(z[0]?j:V==3?-0:0)}if(C=y(C),U=y(U),z=z.slice(),I=C-U){for(($=I<0)?(I=-I,R=z):(U=C,R=H),R.reverse(),E=I;E--;R.push(0));R.reverse()}else for(D=($=(I=z.length)<(E=H.length))?I:E,I=E=0;E<D;E++)if(z[E]!=H[E]){$=z[E]<H[E];break}if($&&(R=z,z=H,H=R,b.s=-b.s),E=(D=H.length)-(A=z.length),E>0)for(;E--;z[A++]=0);for(E=d-1;D>I;){if(z[--D]<H[D]){for(A=D;A&&!z[--A];z[A]=E);--z[A],z[D]+=d}z[D]-=H[D]}for(;z[0]==0;z.splice(0,1),--U);return z[0]?Nt(b,z,U):(b.s=V==3?-1:1,b.c=[b.e=0],b)},K.modulo=K.mod=function(b,E){var A,D,R=this;return b=new Q(b,E),!R.c||!b.s||b.c&&!b.c[0]?new Q(NaN):!b.c||R.c&&!R.c[0]?new Q(R):(Ie==9?(D=b.s,b.s=1,A=G(R,b,0,3),b.s=D,A.s*=D):A=G(R,b,0,Ie),b=R.minus(A.times(b)),!b.c[0]&&Ie==1&&(b.s=R.s),b)},K.multipliedBy=K.times=function(b,E){var A,D,R,$,j,I,C,U,z,H,ie,ue,Ue,Je,Ye,De=this,Le=De.c,dt=(b=new Q(b,E)).c;if(!Le||!dt||!Le[0]||!dt[0])return!De.s||!b.s||Le&&!Le[0]&&!dt||dt&&!dt[0]&&!Le?b.c=b.e=b.s=null:(b.s*=De.s,!Le||!dt?b.c=b.e=null:(b.c=[0],b.e=0)),b;for(D=y(De.e/l)+y(b.e/l),b.s*=De.s,C=Le.length,H=dt.length,C<H&&(Ue=Le,Le=dt,dt=Ue,R=C,C=H,H=R),R=C+H,Ue=[];R--;Ue.push(0));for(Je=d,Ye=_,R=H;--R>=0;){for(A=0,ie=dt[R]%Ye,ue=dt[R]/Ye|0,j=C,$=R+j;$>R;)U=Le[--j]%Ye,z=Le[j]/Ye|0,I=ue*U+z*ie,U=ie*U+I%Ye*Ye+Ue[$]+A,A=(U/Je|0)+(I/Ye|0)+ue*z,Ue[$--]=U%Je;Ue[$]=A}return A?++D:Ue.splice(0,1),Nt(b,Ue,D)},K.negated=function(){var b=new Q(this);return b.s=-b.s||null,b},K.plus=function(b,E){var A,D=this,R=D.s;if(b=new Q(b,E),E=b.s,!R||!E)return new Q(NaN);if(R!=E)return b.s=-E,D.minus(b);var $=D.e/l,j=b.e/l,I=D.c,C=b.c;if(!$||!j){if(!I||!C)return new Q(R/0);if(!I[0]||!C[0])return C[0]?b:new Q(I[0]?D:R*0)}if($=y($),j=y(j),I=I.slice(),R=$-j){for(R>0?(j=$,A=C):(R=-R,A=I),A.reverse();R--;A.push(0));A.reverse()}for(R=I.length,E=C.length,R-E<0&&(A=C,C=I,I=A,E=R),R=0;E;)R=(I[--E]=I[E]+C[E]+R)/d|0,I[E]=d===I[E]?0:I[E]%d;return R&&(I=[R].concat(I),++j),Nt(b,I,j)},K.precision=K.sd=function(b,E){var A,D,R,$=this;if(b!=null&&b!==!!b)return x(b,1,h),E==null?E=V:x(E,0,8),Fe(new Q($),b,E);if(!(A=$.c))return null;if(R=A.length-1,D=R*l+1,R=A[R]){for(;R%10==0;R/=10,D--);for(R=A[0];R>=10;R/=10,D++);}return b&&$.e+1>D&&(D=$.e+1),D},K.shiftedBy=function(b){return x(b,-f,f),this.times("1e"+b)},K.squareRoot=K.sqrt=function(){var b,E,A,D,R,$=this,j=$.c,I=$.s,C=$.e,U=te+4,z=new Q("0.5");if(I!==1||!j||!j[0])return new Q(!I||I<0&&(!j||j[0])?NaN:j?$:1/0);if(I=Math.sqrt(+qe($)),I==0||I==1/0?(E=T(j),(E.length+C)%2==0&&(E+="0"),I=Math.sqrt(+E),C=y((C+1)/2)-(C<0||C%2),I==1/0?E="5e"+C:(E=I.toExponential(),E=E.slice(0,E.indexOf("e")+1)+C),A=new Q(E)):A=new Q(I+""),A.c[0]){for(C=A.e,I=C+U,I<3&&(I=0);;)if(R=A,A=z.times(R.plus(G($,R,U,1))),T(R.c).slice(0,I)===(E=T(A.c)).slice(0,I))if(A.e<C&&--I,E=E.slice(I-3,I+1),E=="9999"||!D&&E=="4999"){if(!D&&(Fe(R,R.e+te+2,0),R.times(R).eq($))){A=R;break}U+=4,I+=4,D=1}else{(!+E||!+E.slice(1)&&E.charAt(0)=="5")&&(Fe(A,A.e+te+2,1),b=!A.times(A).eq($));break}}return Fe(A,A.e+te+1,V,b)},K.toExponential=function(b,E){return b!=null&&(x(b,0,h),b++),rt(this,b,E,1)},K.toFixed=function(b,E){return b!=null&&(x(b,0,h),b=b+this.e+1),rt(this,b,E)},K.toFormat=function(b,E,A){var D,R=this;if(A==null)b!=null&&E&&typeof E=="object"?(A=E,E=null):b&&typeof b=="object"?(A=b,b=E=null):A=Be;else if(typeof A!="object")throw Error(s+"Argument not an object: "+A);if(D=R.toFixed(b,E),R.c){var $,j=D.split("."),I=+A.groupSize,C=+A.secondaryGroupSize,U=A.groupSeparator||"",z=j[0],H=j[1],ie=R.s<0,ue=ie?z.slice(1):z,Ue=ue.length;if(C&&($=I,I=C,C=$,Ue-=$),I>0&&Ue>0){for($=Ue%I||I,z=ue.substr(0,$);$<Ue;$+=I)z+=U+ue.substr($,I);C>0&&(z+=U+ue.slice($)),ie&&(z="-"+z)}D=H?z+(A.decimalSeparator||"")+((C=+A.fractionGroupSize)?H.replace(new RegExp("\\d{"+C+"}\\B","g"),"$&"+(A.fractionGroupSeparator||"")):H):z}return(A.prefix||"")+D+(A.suffix||"")},K.toFraction=function(b){var E,A,D,R,$,j,I,C,U,z,H,ie,ue=this,Ue=ue.c;if(b!=null&&(I=new Q(b),!I.isInteger()&&(I.c||I.s!==1)||I.lt(Oe)))throw Error(s+"Argument "+(I.isInteger()?"out of range: ":"not an integer: ")+qe(I));if(!Ue)return new Q(ue);for(E=new Q(Oe),U=A=new Q(Oe),D=C=new Q(Oe),ie=T(Ue),$=E.e=ie.length-ue.e-1,E.c[0]=p[(j=$%l)<0?l+j:j],b=!b||I.comparedTo(E)>0?$>0?E:U:I,j=re,re=1/0,I=new Q(ie),C.c[0]=0;z=G(I,E,0,1),R=A.plus(z.times(D)),R.comparedTo(b)!=1;)A=D,D=R,U=C.plus(z.times(R=U)),C=R,E=I.minus(z.times(R=E)),I=R;return R=G(b.minus(A),D,0,1),C=C.plus(R.times(U)),A=A.plus(R.times(D)),C.s=U.s=ue.s,$=$*2,H=G(U,D,$,V).minus(ue).abs().comparedTo(G(C,A,$,V).minus(ue).abs())<1?[U,D]:[C,A],re=j,H},K.toNumber=function(){return+qe(this)},K.toPrecision=function(b,E){return b!=null&&x(b,1,h),rt(this,b,E,2)},K.toString=function(b){var E,A=this,D=A.s,R=A.e;return R===null?D?(E="Infinity",D<0&&(E="-"+E)):E="NaN":(b==null?E=R<=q||R>=J?F(T(A.c),R):X(T(A.c),R,"0"):b===10&&ht?(A=Fe(new Q(A),te+R+1,V),E=X(T(A.c),A.e,"0")):(x(b,2,Ge.length,"Base"),E=Y(X(T(A.c),R,"0"),10,b,D,!0)),D<0&&A.c[0]&&(E="-"+E)),E},K.valueOf=K.toJSON=function(){return qe(this)},K._isBigNumber=!0,Z!=null&&Q.set(Z),Q}o(g,"clone");function y(Z){var G=Z|0;return Z>0||Z===G?G:G-1}o(y,"bitFloor");function T(Z){for(var G,Y,ee=1,K=Z.length,Oe=Z[0]+"";ee<K;){for(G=Z[ee++]+"",Y=l-G.length;Y--;G="0"+G);Oe+=G}for(K=Oe.length;Oe.charCodeAt(--K)===48;);return Oe.slice(0,K+1||1)}o(T,"coeffToString");function P(Z,G){var Y,ee,K=Z.c,Oe=G.c,te=Z.s,V=G.s,q=Z.e,J=G.e;if(!te||!V)return null;if(Y=K&&!K[0],ee=Oe&&!Oe[0],Y||ee)return Y?ee?0:-V:te;if(te!=V)return te;if(Y=te<0,ee=q==J,!K||!Oe)return ee?0:!K^Y?1:-1;if(!ee)return q>J^Y?1:-1;for(V=(q=K.length)<(J=Oe.length)?q:J,te=0;te<V;te++)if(K[te]!=Oe[te])return K[te]>Oe[te]^Y?1:-1;return q==J?0:q>J^Y?1:-1}o(P,"compare");function x(Z,G,Y,ee){if(Z<G||Z>Y||Z!==i(Z))throw Error(s+(ee||"Argument")+(typeof Z=="number"?Z<G||Z>Y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Z))}o(x,"intCheck");function N(Z){var G=Z.c.length-1;return y(Z.e/l)==G&&Z.c[G]%2!=0}o(N,"isOdd");function F(Z,G){return(Z.length>1?Z.charAt(0)+"."+Z.slice(1):Z)+(G<0?"e":"e+")+G}o(F,"toExponential");function X(Z,G,Y){var ee,K;if(G<0){for(K=Y+".";++G;K+=Y);Z=K+Z}else if(ee=Z.length,++G>ee){for(K=Y,G-=ee;--G;K+=Y);Z+=K}else G<ee&&(Z=Z.slice(0,G)+"."+Z.slice(G));return Z}o(X,"toFixedPoint"),e=g(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof bu<"u"&&bu.exports?bu.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(HP)});var KP=k((aY,ZP)=>{var GP=Fd(),WP=ZP.exports;(function(){"use strict";function t(f){return f<10?"0"+f:f}o(t,"f");var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,i,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},c;function d(f){return r.lastIndex=0,r.test(f)?'"'+f.replace(r,function(p){var _=s[p];return typeof _=="string"?_:"\\u"+("0000"+p.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}o(d,"quote");function l(f,p){var _,h,g,y,T=n,P,x=p[f],N=x!=null&&(x instanceof GP||GP.isBigNumber(x));switch(x&&typeof x=="object"&&typeof x.toJSON=="function"&&(x=x.toJSON(f)),typeof c=="function"&&(x=c.call(p,f,x)),typeof x){case"string":return N?x:d(x);case"number":return isFinite(x)?String(x):"null";case"boolean":case"null":case"bigint":return String(x);case"object":if(!x)return"null";if(n+=i,P=[],Object.prototype.toString.apply(x)==="[object Array]"){for(y=x.length,_=0;_<y;_+=1)P[_]=l(_,x)||"null";return g=P.length===0?"[]":n?`[
32
- `+n+P.join(`,
33
- `+n)+`
34
- `+T+"]":"["+P.join(",")+"]",n=T,g}if(c&&typeof c=="object")for(y=c.length,_=0;_<y;_+=1)typeof c[_]=="string"&&(h=c[_],g=l(h,x),g&&P.push(d(h)+(n?": ":":")+g));else Object.keys(x).forEach(function(F){var X=l(F,x);X&&P.push(d(F)+(n?": ":":")+X)});return g=P.length===0?"{}":n?`{
35
- `+n+P.join(`,
36
- `+n)+`
37
- `+T+"}":"{"+P.join(",")+"}",n=T,g}}o(l,"str"),typeof WP.stringify!="function"&&(WP.stringify=function(f,p,_){var h;if(n="",i="",typeof _=="number")for(h=0;h<_;h+=1)i+=" ";else typeof _=="string"&&(i=_);if(c=p,p&&typeof p!="function"&&(typeof p!="object"||typeof p.length!="number"))throw new Error("JSON.stringify");return l("",{"":f})})})()});var YP=k((uY,JP)=>{var Pu=null,O$=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,C$=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/,$$=o(function(t){"use strict";var e={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(t!=null){if(t.strict===!0&&(e.strict=!0),t.storeAsString===!0&&(e.storeAsString=!0),e.alwaysParseAsBig=t.alwaysParseAsBig===!0?t.alwaysParseAsBig:!1,e.useNativeBigInt=t.useNativeBigInt===!0?t.useNativeBigInt:!1,typeof t.constructorAction<"u")if(t.constructorAction==="error"||t.constructorAction==="ignore"||t.constructorAction==="preserve")e.constructorAction=t.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${t.constructorAction}`);if(typeof t.protoAction<"u")if(t.protoAction==="error"||t.protoAction==="ignore"||t.protoAction==="preserve")e.protoAction=t.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${t.protoAction}`)}var r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
38
- `,r:"\r",t:" "},s,c=o(function(T){throw{name:"SyntaxError",message:T,at:r,text:s}},"error"),d=o(function(T){return T&&T!==n&&c("Expected '"+T+"' instead of '"+n+"'"),n=s.charAt(r),r+=1,n},"next"),l=o(function(){var T,P="";for(n==="-"&&(P="-",d("-"));n>="0"&&n<="9";)P+=n,d();if(n===".")for(P+=".";d()&&n>="0"&&n<="9";)P+=n;if(n==="e"||n==="E")for(P+=n,d(),(n==="-"||n==="+")&&(P+=n,d());n>="0"&&n<="9";)P+=n,d();if(T=+P,!isFinite(T))c("Bad number");else return Pu==null&&(Pu=Fd()),P.length>15?e.storeAsString?P:e.useNativeBigInt?BigInt(P):new Pu(P):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(T):new Pu(T):T},"number"),f=o(function(){var T,P,x="",N;if(n==='"')for(var F=r;d();){if(n==='"')return r-1>F&&(x+=s.substring(F,r-1)),d(),x;if(n==="\\"){if(r-1>F&&(x+=s.substring(F,r-1)),d(),n==="u"){for(N=0,P=0;P<4&&(T=parseInt(d(),16),!!isFinite(T));P+=1)N=N*16+T;x+=String.fromCharCode(N)}else if(typeof i[n]=="string")x+=i[n];else break;F=r}}c("Bad string")},"string"),p=o(function(){for(;n&&n<=" ";)d()},"white"),_=o(function(){switch(n){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}c("Unexpected '"+n+"'")},"word"),h,g=o(function(){var T=[];if(n==="["){if(d("["),p(),n==="]")return d("]"),T;for(;n;){if(T.push(h()),p(),n==="]")return d("]"),T;d(","),p()}}c("Bad array")},"array"),y=o(function(){var T,P=Object.create(null);if(n==="{"){if(d("{"),p(),n==="}")return d("}"),P;for(;n;){if(T=f(),p(),d(":"),e.strict===!0&&Object.hasOwnProperty.call(P,T)&&c('Duplicate key "'+T+'"'),O$.test(T)===!0?e.protoAction==="error"?c("Object contains forbidden prototype property"):e.protoAction==="ignore"?h():P[T]=h():C$.test(T)===!0?e.constructorAction==="error"?c("Object contains forbidden constructor property"):e.constructorAction==="ignore"?h():P[T]=h():P[T]=h(),p(),n==="}")return d("}"),P;d(","),p()}}c("Bad object")},"object");return h=o(function(){switch(p(),n){case"{":return y();case"[":return g();case'"':return f();case"-":return l();default:return n>="0"&&n<="9"?l():_()}},"value"),function(T,P){var x;return s=T+"",r=0,n=" ",x=h(),p(),n&&c("Syntax error"),typeof P=="function"?o((function N(F,X){var Z,G,Y=F[X];return Y&&typeof Y=="object"&&Object.keys(Y).forEach(function(ee){G=N(Y,ee),G!==void 0?Y[ee]=G:delete Y[ee]}),P.call(F,X,Y)}),"walk")({"":x},""):x}},"json_parse");JP.exports=$$});var eS=k((lY,Su)=>{var XP=KP().stringify,QP=YP();Su.exports=function(t){return{parse:QP(t),stringify:XP}};Su.exports.parse=QP();Su.exports.stringify=XP});var Bd=k(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.GCE_LINUX_BIOS_PATHS=void 0;yr.isGoogleCloudServerless=nS;yr.isGoogleComputeEngineLinux=oS;yr.isGoogleComputeEngineMACAddress=iS;yr.isGoogleComputeEngine=aS;yr.detectGCPResidency=N$;var tS=require("fs"),rS=require("os");yr.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var k$=/^42:01/;function nS(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}o(nS,"isGoogleCloudServerless");function oS(){if((0,rS.platform)()!=="linux")return!1;try{(0,tS.statSync)(yr.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let t=(0,tS.readFileSync)(yr.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(t)}catch{return!1}}o(oS,"isGoogleComputeEngineLinux");function iS(){let t=(0,rS.networkInterfaces)();for(let e of Object.values(t))if(e){for(let{mac:r}of e)if(k$.test(r))return!0}return!1}o(iS,"isGoogleComputeEngineMACAddress");function aS(){return oS()||iS()}o(aS,"isGoogleComputeEngine");function N$(){return nS()||aS()}o(N$,"detectGCPResidency")});var sS=k(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.Colours=void 0;var Tt=class t{static{o(this,"Colours")}static isEnabled(e){return e&&e.isTTY&&(typeof e.getColorDepth=="function"?e.getColorDepth()>2:!0)}static refresh(){t.enabled=t.isEnabled(process==null?void 0:process.stderr),this.enabled?(t.reset="\x1B[0m",t.bright="\x1B[1m",t.dim="\x1B[2m",t.red="\x1B[31m",t.green="\x1B[32m",t.yellow="\x1B[33m",t.blue="\x1B[34m",t.magenta="\x1B[35m",t.cyan="\x1B[36m",t.white="\x1B[37m",t.grey="\x1B[90m"):(t.reset="",t.bright="",t.dim="",t.red="",t.green="",t.yellow="",t.blue="",t.magenta="",t.cyan="",t.white="",t.grey="")}};Eu.Colours=Tt;Tt.enabled=!1;Tt.reset="";Tt.bright="";Tt.dim="";Tt.red="";Tt.green="";Tt.yellow="";Tt.blue="";Tt.magenta="";Tt.cyan="";Tt.white="";Tt.grey="";Tt.refresh()});var dS=k(He=>{"use strict";var z$=He&&He.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),D$=He&&He.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uS=He&&He.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&z$(r,e,n[i]);return D$(r,e),r}})();Object.defineProperty(He,"__esModule",{value:!0});He.env=He.DebugLogBackendBase=He.placeholder=He.AdhocDebugLogger=He.LogSeverity=void 0;He.getNodeBackend=Vd;He.getDebugBackend=M$;He.getStructuredBackend=j$;He.setBackend=L$;He.log=lS;var U$=require("events"),fa=uS(require("process")),cS=uS(require("util")),qt=sS(),_r;(function(t){t.DEFAULT="DEFAULT",t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR"})(_r||(He.LogSeverity=_r={}));var ma=class extends U$.EventEmitter{static{o(this,"AdhocDebugLogger")}constructor(e,r){super(),this.namespace=e,this.upstream=r,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:o((n,i)=>this.on(n,i),"on")}),this.func.debug=(...n)=>this.invokeSeverity(_r.DEBUG,...n),this.func.info=(...n)=>this.invokeSeverity(_r.INFO,...n),this.func.warn=(...n)=>this.invokeSeverity(_r.WARNING,...n),this.func.error=(...n)=>this.invokeSeverity(_r.ERROR,...n),this.func.sublog=n=>lS(n,this.func)}invoke(e,...r){if(this.upstream)try{this.upstream(e,...r)}catch{}try{this.emit("log",e,r)}catch{}}invokeSeverity(e,...r){this.invoke({severity:e},...r)}};He.AdhocDebugLogger=ma;He.placeholder=new ma("",()=>{}).func;var ei=class{static{o(this,"DebugLogBackendBase")}constructor(){var e;this.cached=new Map,this.filters=[],this.filtersSet=!1;let r=(e=fa.env[He.env.nodeEnables])!==null&&e!==void 0?e:"*";r==="all"&&(r="*"),this.filters=r.split(",")}log(e,r,...n){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let i=this.cached.get(e);i||(i=this.makeLogger(e),this.cached.set(e,i)),i(r,...n)}catch(i){console.error(i)}}};He.DebugLogBackendBase=ei;var qd=class extends ei{static{o(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(e){return this.enabledRegexp.test(e)}makeLogger(e){return this.enabledRegexp.test(e)?(r,...n)=>{var i;let s=`${qt.Colours.green}${e}${qt.Colours.reset}`,c=`${qt.Colours.yellow}${fa.pid}${qt.Colours.reset}`,d;switch(r.severity){case _r.ERROR:d=`${qt.Colours.red}${r.severity}${qt.Colours.reset}`;break;case _r.INFO:d=`${qt.Colours.magenta}${r.severity}${qt.Colours.reset}`;break;case _r.WARNING:d=`${qt.Colours.yellow}${r.severity}${qt.Colours.reset}`;break;default:d=(i=r.severity)!==null&&i!==void 0?i:_r.DEFAULT;break}let l=cS.formatWithOptions({colors:qt.Colours.enabled},...n),f=Object.assign({},r);delete f.severity;let p=Object.getOwnPropertyNames(f).length?JSON.stringify(f):"",_=p?`${qt.Colours.grey}${p}${qt.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",c,s,d,l,p?` ${_}`:"")}:()=>{}}setFilters(){let r=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${r}$`,"i")}};function Vd(){return new qd}o(Vd,"getNodeBackend");var Hd=class extends ei{static{o(this,"DebugBackend")}constructor(e){super(),this.debugPkg=e}makeLogger(e){let r=this.debugPkg(e);return(n,...i)=>{r(i[0],...i.slice(1))}}setFilters(){var e;let r=(e=fa.env.NODE_DEBUG)!==null&&e!==void 0?e:"";fa.env.NODE_DEBUG=`${r}${r?",":""}${this.filters.join(",")}`}};function M$(t){return new Hd(t)}o(M$,"getDebugBackend");var Gd=class extends ei{static{o(this,"StructuredBackend")}constructor(e){var r;super(),this.upstream=(r=e)!==null&&r!==void 0?r:void 0}makeLogger(e){var r;let n=(r=this.upstream)===null||r===void 0?void 0:r.makeLogger(e);return(i,...s)=>{var c;let d=(c=i.severity)!==null&&c!==void 0?c:_r.INFO,l=Object.assign({severity:d,message:cS.format(...s)},i),f=JSON.stringify(l);n?n(i,f):console.log("%s",f)}}setFilters(){var e;(e=this.upstream)===null||e===void 0||e.setFilters()}};function j$(t){return new Gd(t)}o(j$,"getStructuredBackend");He.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var Wd=new Map,Vt;function L$(t){Vt=t,Wd.clear()}o(L$,"setBackend");function lS(t,e){if(!Vt&&!fa.env[He.env.nodeEnables]||!t)return He.placeholder;e&&(t=`${e.instance.namespace}:${t}`);let r=Wd.get(t);if(r)return r.func;if(Vt===null)return He.placeholder;Vt===void 0&&(Vt=Vd());let n=(()=>{let i;return new ma(t,(c,...d)=>{if(i!==Vt){if(Vt===null)return;Vt===void 0&&(Vt=Vd()),i=Vt}Vt?.log(t,c,...d)})})();return Wd.set(t,n),n.func}o(lS,"log")});var Zd=k(uo=>{"use strict";var F$=uo&&uo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),B$=uo&&uo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&F$(e,t,r)};Object.defineProperty(uo,"__esModule",{value:!0});B$(dS(),uo)});var ga=k(fe=>{"use strict";var fS=fe&&fe.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),q$=fe&&fe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),V$=fe&&fe.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&fS(r,e,n[i]);return q$(r,e),r}})(),H$=fe&&fe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&fS(e,t,r)};Object.defineProperty(fe,"__esModule",{value:!0});fe.gcpResidencyCache=fe.METADATA_SERVER_DETECTION=fe.HEADERS=fe.HEADER_VALUE=fe.HEADER_NAME=fe.SECONDARY_HOST_ADDRESS=fe.HOST_ADDRESS=fe.BASE_PATH=void 0;fe.instance=Y$;fe.project=X$;fe.universe=Q$;fe.bulk=ek;fe.isAvailable=rk;fe.resetIsAvailableCache=nk;fe.getGCPResidency=Yd;fe.setGCPResidency=mS;fe.requestTimeout=hS;var Kd=st(),G$=eS(),W$=Bd(),Z$=V$(Zd());fe.BASE_PATH="/computeMetadata/v1";fe.HOST_ADDRESS="http://169.254.169.254";fe.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";fe.HEADER_NAME="Metadata-Flavor";fe.HEADER_VALUE="Google";fe.HEADERS=Object.freeze({[fe.HEADER_NAME]:fe.HEADER_VALUE});var pS=Z$.log("gcp-metadata");fe.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function Jd(t){return t||(t=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||fe.HOST_ADDRESS),/^https?:\/\//.test(t)||(t=`http://${t}`),new URL(fe.BASE_PATH,t).href}o(Jd,"getBaseUrl");function K$(t){Object.keys(t).forEach(e=>{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}})}o(K$,"validate");async function ha(t,e={},r=3,n=!1){let i=new Headers(fe.HEADERS),s="",c={};if(typeof t=="object"){let _=t;new Headers(_.headers).forEach((h,g)=>i.set(g,h)),s=_.metadataKey,c=_.params||c,r=_.noResponseRetries||r,n=_.fastFail||n}else s=t;typeof e=="string"?s+=`/${e}`:(K$(e),e.property&&(s+=`/${e.property}`),new Headers(e.headers).forEach((_,h)=>i.set(h,_)),c=e.params||c);let d=n?J$:Kd.request,l={url:`${Jd()}/${s}`,headers:i,retryConfig:{noResponseRetries:r},params:c,responseType:"text",timeout:hS()};pS.info("instance request %j",l);let f=await d(l);pS.info("instance metadata is %s",f.data);let p=f.headers.get(fe.HEADER_NAME);if(p!==fe.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${fe.HEADER_NAME} header. Expected '${fe.HEADER_VALUE}', got ${p?`'${p}'`:"no header"}`);if(typeof f.data=="string")try{return G$.parse(f.data)}catch{}return f.data}o(ha,"metadataAccessor");async function J$(t){let e={...t,url:t.url?.toString().replace(Jd(),Jd(fe.SECONDARY_HOST_ADDRESS))},r=(0,Kd.request)(t),n=(0,Kd.request)(e);return Promise.any([r,n])}o(J$,"fastFailMetadataRequest");function Y$(t){return ha("instance",t)}o(Y$,"instance");function X$(t){return ha("project",t)}o(X$,"project");function Q$(t){return ha("universe",t)}o(Q$,"universe");async function ek(t){let e={};return await Promise.all(t.map(r=>(async()=>{let n=await ha(r),i=r.metadataKey;e[i]=n})())),e}o(ek,"bulk");function tk(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}o(tk,"detectGCPAvailableRetries");var Tu;async function rk(){if(process.env.METADATA_SERVER_DETECTION){let t=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(t in fe.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${t}\`, but it should be \`${Object.keys(fe.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(t){case"assume-present":return!0;case"none":return!1;case"bios-only":return Yd();case"ping-only":}}try{return Tu===void 0&&(Tu=ha("instance",void 0,tk(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await Tu,!0}catch(t){let e=t;if(process.env.DEBUG_AUTH&&console.info(e),e.type==="request-timeout"||e.response&&e.response.status===404)return!1;if(!(e.response&&e.response.status===404)&&(!e.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(e.code.toString()))){let r="UNKNOWN";e.code&&(r=e.code.toString()),process.emitWarning(`received unexpected error = ${e.message} code = ${r}`,"MetadataLookupWarning")}return!1}}o(rk,"isAvailable");function nk(){Tu=void 0}o(nk,"resetIsAvailableCache");fe.gcpResidencyCache=null;function Yd(){return fe.gcpResidencyCache===null&&mS(),fe.gcpResidencyCache}o(Yd,"getGCPResidency");function mS(t=null){fe.gcpResidencyCache=t!==null?t:(0,W$.detectGCPResidency)()}o(mS,"setGCPResidency");function hS(){return Yd()?0:3e3}o(hS,"requestTimeout");H$(Bd(),fe)});var _S=k(xu=>{"use strict";xu.byteLength=ik;xu.toByteArray=sk;xu.fromByteArray=lk;var Cr=[],or=[],ok=typeof Uint8Array<"u"?Uint8Array:Array,Xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(co=0,gS=Xd.length;co<gS;++co)Cr[co]=Xd[co],or[Xd.charCodeAt(co)]=co;var co,gS;or[45]=62;or[95]=63;function yS(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}o(yS,"getLens");function ik(t){var e=yS(t),r=e[0],n=e[1];return(r+n)*3/4-n}o(ik,"byteLength");function ak(t,e,r){return(e+r)*3/4-r}o(ak,"_byteLength");function sk(t){var e,r=yS(t),n=r[0],i=r[1],s=new ok(ak(t,n,i)),c=0,d=i>0?n-4:n,l;for(l=0;l<d;l+=4)e=or[t.charCodeAt(l)]<<18|or[t.charCodeAt(l+1)]<<12|or[t.charCodeAt(l+2)]<<6|or[t.charCodeAt(l+3)],s[c++]=e>>16&255,s[c++]=e>>8&255,s[c++]=e&255;return i===2&&(e=or[t.charCodeAt(l)]<<2|or[t.charCodeAt(l+1)]>>4,s[c++]=e&255),i===1&&(e=or[t.charCodeAt(l)]<<10|or[t.charCodeAt(l+1)]<<4|or[t.charCodeAt(l+2)]>>2,s[c++]=e>>8&255,s[c++]=e&255),s}o(sk,"toByteArray");function uk(t){return Cr[t>>18&63]+Cr[t>>12&63]+Cr[t>>6&63]+Cr[t&63]}o(uk,"tripletToBase64");function ck(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(uk(n));return i.join("")}o(ck,"encodeChunk");function lk(t){for(var e,r=t.length,n=r%3,i=[],s=16383,c=0,d=r-n;c<d;c+=s)i.push(ck(t,c,c+s>d?d:c+s));return n===1?(e=t[r-1],i.push(Cr[e>>2]+Cr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Cr[e>>10]+Cr[e>>4&63]+Cr[e<<2&63]+"=")),i.join("")}o(lk,"fromByteArray")});var ep=k(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.fromArrayBufferToHex=dk;function dk(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}o(dk,"fromArrayBufferToHex")});var vS=k(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.BrowserCrypto=void 0;var ti=_S(),pk=ep(),tp=class t{static{o(this,"BrowserCrypto")}constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw new Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return ti.fromByteArray(new Uint8Array(n))}randomBytesBase64(e){let r=new Uint8Array(e);return window.crypto.getRandomValues(r),ti.fromByteArray(r)}static padBase64(e){for(;e.length%4!==0;)e+="=";return e}async verify(e,r,n){let i={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},s=new TextEncoder().encode(r),c=ti.toByteArray(t.padBase64(n)),d=await window.crypto.subtle.importKey("jwk",e,i,!0,["verify"]);return await window.crypto.subtle.verify(i,d,c,s)}async sign(e,r){let n={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(r),s=await window.crypto.subtle.importKey("jwk",e,n,!0,["sign"]),c=await window.crypto.subtle.sign(n,s,i);return ti.fromByteArray(new Uint8Array(c))}decodeBase64StringUtf8(e){let r=ti.toByteArray(t.padBase64(e));return new TextDecoder().decode(r)}encodeBase64StringUtf8(e){let r=new TextEncoder().encode(e);return ti.fromByteArray(r)}async sha256DigestHex(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return(0,pk.fromArrayBufferToHex)(n)}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:String.fromCharCode(...new Uint16Array(e)),i=new TextEncoder,s=await window.crypto.subtle.importKey("raw",i.encode(n),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",s,i.encode(r))}};Au.BrowserCrypto=tp});var bS=k(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.NodeCrypto=void 0;var ri=require("crypto"),rp=class{static{o(this,"NodeCrypto")}async sha256DigestBase64(e){return ri.createHash("sha256").update(e).digest("base64")}randomBytesBase64(e){return ri.randomBytes(e).toString("base64")}async verify(e,r,n){let i=ri.createVerify("RSA-SHA256");return i.update(r),i.end(),i.verify(e,n,"base64")}async sign(e,r){let n=ri.createSign("RSA-SHA256");return n.update(r),n.end(),n.sign(e,"base64")}decodeBase64StringUtf8(e){return Buffer.from(e,"base64").toString("utf-8")}encodeBase64StringUtf8(e){return Buffer.from(e,"utf-8").toString("base64")}async sha256DigestHex(e){return ri.createHash("sha256").update(e).digest("hex")}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:mk(e);return fk(ri.createHmac("sha256",n).update(r).digest())}};wu.NodeCrypto=rp;function fk(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}o(fk,"toArrayBuffer");function mk(t){return Buffer.from(t)}o(mk,"toBuffer")});var ya=k(on=>{"use strict";var hk=on&&on.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gk=on&&on.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&hk(e,t,r)};Object.defineProperty(on,"__esModule",{value:!0});on.createCrypto=vk;on.hasBrowserCrypto=PS;var yk=vS(),_k=bS();gk(ep(),on);function vk(){return PS()?new yk.BrowserCrypto:new _k.NodeCrypto}o(vk,"createCrypto");function PS(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}o(PS,"hasBrowserCrypto")});var ni=k((np,ES)=>{var Iu=require("buffer"),$r=Iu.Buffer;function SS(t,e){for(var r in t)e[r]=t[r]}o(SS,"copyProps");$r.from&&$r.alloc&&$r.allocUnsafe&&$r.allocUnsafeSlow?ES.exports=Iu:(SS(Iu,np),np.Buffer=lo);function lo(t,e,r){return $r(t,e,r)}o(lo,"SafeBuffer");lo.prototype=Object.create($r.prototype);SS($r,lo);lo.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return $r(t,e,r)};lo.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=$r(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};lo.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $r(t)};lo.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Iu.SlowBuffer(t)}});var xS=k(($Y,TS)=>{"use strict";function op(t){var e=(t/8|0)+(t%8===0?0:1);return e}o(op,"getParamSize");var bk={ES256:op(256),ES384:op(384),ES512:op(521)};function Pk(t){var e=bk[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}o(Pk,"getParamBytesForAlg");TS.exports=Pk});var ip=k((NY,CS)=>{"use strict";var Ru=ni().Buffer,wS=xS(),Ou=128,IS=0,Sk=32,Ek=16,Tk=2,RS=Ek|Sk|IS<<6,Cu=Tk|IS<<6;function xk(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(xk,"base64Url");function OS(t){if(Ru.isBuffer(t))return t;if(typeof t=="string")return Ru.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}o(OS,"signatureAsBuffer");function Ak(t,e){t=OS(t);var r=wS(e),n=r+1,i=t.length,s=0;if(t[s++]!==RS)throw new Error('Could not find expected "seq"');var c=t[s++];if(c===(Ou|1)&&(c=t[s++]),i-s<c)throw new Error('"seq" specified length of "'+c+'", only "'+(i-s)+'" remaining');if(t[s++]!==Cu)throw new Error('Could not find expected "int" for "r"');var d=t[s++];if(i-s-2<d)throw new Error('"r" specified length of "'+d+'", only "'+(i-s-2)+'" available');if(n<d)throw new Error('"r" specified length of "'+d+'", max of "'+n+'" is acceptable');var l=s;if(s+=d,t[s++]!==Cu)throw new Error('Could not find expected "int" for "s"');var f=t[s++];if(i-s!==f)throw new Error('"s" specified length of "'+f+'", expected "'+(i-s)+'"');if(n<f)throw new Error('"s" specified length of "'+f+'", max of "'+n+'" is acceptable');var p=s;if(s+=f,s!==i)throw new Error('Expected to consume entire buffer, but "'+(i-s)+'" bytes remain');var _=r-d,h=r-f,g=Ru.allocUnsafe(_+d+h+f);for(s=0;s<_;++s)g[s]=0;t.copy(g,s,l+Math.max(-_,0),l+d),s=r;for(var y=s;s<y+h;++s)g[s]=0;return t.copy(g,s,p+Math.max(-h,0),p+f),g=g.toString("base64"),g=xk(g),g}o(Ak,"derToJose");function AS(t,e,r){for(var n=0;e+n<r&&t[e+n]===0;)++n;var i=t[e+n]>=Ou;return i&&--n,n}o(AS,"countPadding");function wk(t,e){t=OS(t);var r=wS(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=AS(t,0,r),s=AS(t,r,t.length),c=r-i,d=r-s,l=2+c+1+1+d,f=l<Ou,p=Ru.allocUnsafe((f?2:3)+l),_=0;return p[_++]=RS,f?p[_++]=l:(p[_++]=Ou|1,p[_++]=l&255),p[_++]=Cu,p[_++]=c,i<0?(p[_++]=0,_+=t.copy(p,_,0,r)):_+=t.copy(p,_,i,r),p[_++]=Cu,p[_++]=d,s<0?(p[_++]=0,t.copy(p,_,r)):t.copy(p,_,r+s),p}o(wk,"joseToDer");CS.exports={derToJose:Ak,joseToDer:wk}});var vr=k(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.LRUCache=void 0;an.snakeToCamel=kS;an.originalOrCamelOptions=Ck;an.removeUndefinedValuesInObject=$k;an.isValidFile=kk;an.getWellKnownCertificateConfigFileLocation=Nk;var Ik=require("fs"),Rk=require("os"),ap=require("path"),Ok="certificate_config.json",$S="gcloud";function kS(t){return t.replace(/([_][^_])/g,e=>e.slice(1).toUpperCase())}o(kS,"snakeToCamel");function Ck(t){function e(r){let n=t||{};return n[r]??n[kS(r)]}return o(e,"get"),{get:e}}o(Ck,"originalOrCamelOptions");var sp=class{static{o(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(e){this.capacity=e.capacity,this.maxAge=e.maxAge}#t(e,r){this.#e.delete(e),this.#e.set(e,{value:r,lastAccessed:Date.now()})}set(e,r){this.#t(e,r),this.#r()}get(e){let r=this.#e.get(e);if(r)return this.#t(e,r.value),this.#r(),r.value}#r(){let e=this.maxAge?Date.now()-this.maxAge:0,r=this.#e.entries().next();for(;!r.done&&(this.#e.size>this.capacity||r.value[1].lastAccessed<e);)this.#e.delete(r.value[0]),r=this.#e.entries().next()}};an.LRUCache=sp;function $k(t){return Object.entries(t).forEach(([e,r])=>{(r===void 0||r==="undefined")&&delete t[e]}),t}o($k,"removeUndefinedValuesInObject");async function kk(t){try{return(await Ik.promises.lstat(t)).isFile()}catch{return!1}}o(kk,"isValidFile");function Nk(){let t=process.env.CLOUDSDK_CONFIG||(zk()?ap.join(process.env.APPDATA||"",$S):ap.join(process.env.HOME||"",".config",$S));return ap.join(t,Ok)}o(Nk,"getWellKnownCertificateConfigFileLocation");function zk(){return Rk.platform().startsWith("win")}o(zk,"_isWindows")});var NS=k((MY,Dk)=>{Dk.exports={name:"google-auth-library",version:"10.5.0",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=18"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^7.0.0","gcp-metadata":"^8.0.0","google-logging-utils":"^1.0.0",gtoken:"^8.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^10.0.0",codecov:"^3.0.2",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",keypair:"^1.0.4",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","ts-loader":"^8.0.0",typescript:"5.8.2",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check --no-inline-config",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"echo 'disabled until linkinator is fixed'","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install"},license:"Apache-2.0"}});var up=k(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.USER_AGENT=Ln.PRODUCT_NAME=Ln.pkg=void 0;var zS=NS();Ln.pkg=zS;var DS="google-api-nodejs-client";Ln.PRODUCT_NAME=DS;var Uk=`${DS}/${zS.version}`;Ln.USER_AGENT=Uk});var Ht=k(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.AuthClient=br.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=br.DEFAULT_UNIVERSE=void 0;var Mk=require("events"),cp=st(),jk=vr(),Lk=Zd(),lp=up();br.DEFAULT_UNIVERSE="googleapis.com";br.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var dp=class t extends Mk.EventEmitter{static{o(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=br.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=br.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(e={}){super();let r=(0,jk.originalOrCamelOptions)(e);this.apiKey=e.apiKey,this.projectId=r.get("project_id")??null,this.quotaProjectId=r.get("quota_project_id"),this.credentials=r.get("credentials")??{},this.universeDomain=r.get("universe_domain")??br.DEFAULT_UNIVERSE,this.transporter=e.transporter??new cp.Gaxios(e.transporterOptions),r.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(t.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(t.DEFAULT_RESPONSE_INTERCEPTOR)),e.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=e.forceRefreshOnFailure??!1}fetch(...e){let r=e[0],n=e[1],i,s=new Headers;return typeof r=="string"?i=new URL(r):r instanceof URL?i=r:r&&r.url&&(i=new URL(r.url)),r&&typeof r=="object"&&"headers"in r&&cp.Gaxios.mergeHeaders(s,r.headers),n&&cp.Gaxios.mergeHeaders(s,new Headers(n.headers)),typeof r=="object"&&!(r instanceof URL)?this.request({...n,...r,headers:s,url:i}):this.request({...n,headers:s,url:i})}setCredentials(e){this.credentials=e}addSharedMetadataHeaders(e){return!e.has("x-goog-user-project")&&this.quotaProjectId&&e.set("x-goog-user-project",this.quotaProjectId),e}addUserProjectAndAuthHeaders(e,r){let n=r.get("x-goog-user-project"),i=r.get("authorization");return n&&e.set("x-goog-user-project",n),i&&e.set("authorization",i),e}static log=(0,Lk.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:o(async e=>{if(!e.headers.has("x-goog-api-client")){let n=process.version.replace(/^v/,"");e.headers.set("x-goog-api-client",`gl-node/${n}`)}let r=e.headers.get("User-Agent");r?r.includes(`${lp.PRODUCT_NAME}/`)||e.headers.set("User-Agent",`${r} ${lp.USER_AGENT}`):e.headers.set("User-Agent",lp.USER_AGENT);try{let n=e,i=n[t.RequestMethodNameSymbol],s=`${Math.floor(Math.random()*1e3)}`;n[t.RequestLogIdSymbol]=s;let c={url:e.url,headers:e.headers};i?t.log.info("%s [%s] request %j",i,s,c):t.log.info("[%s] request %j",s,c)}catch{}return e},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:o(async e=>{try{let r=e.config,n=r[t.RequestMethodNameSymbol],i=r[t.RequestLogIdSymbol];n?t.log.info("%s [%s] response %j",n,i,e.data):t.log.info("[%s] response %j",i,e.data)}catch{}return e},"resolved"),rejected:o(async e=>{try{let r=e.config,n=r[t.RequestMethodNameSymbol],i=r[t.RequestLogIdSymbol];n?t.log.info("%s [%s] error %j",n,i,e.response?.data):t.log.error("[%s] error %j",i,e.response?.data)}catch{}throw e},"rejected")};static setMethodName(e,r){try{let n=e;n[t.RequestMethodNameSymbol]=r}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};br.AuthClient=dp});var fp=k($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.LoginTicket=void 0;var pp=class{static{o(this,"LoginTicket")}envelope;payload;constructor(e,r){this.envelope=e,this.payload=r}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let e=this.getPayload();return e&&e.sub?e.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};$u.LoginTicket=pp});var po=k(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.OAuth2Client=kr.ClientAuthentication=kr.CertificateFormat=kr.CodeChallengeMethod=void 0;var US=st(),Fk=require("querystring"),Bk=require("stream"),qk=ip(),MS=vr(),mp=ya(),oi=Ht(),Vk=fp(),jS;(function(t){t.Plain="plain",t.S256="S256"})(jS||(kr.CodeChallengeMethod=jS={}));var sn;(function(t){t.PEM="PEM",t.JWK="JWK"})(sn||(kr.CertificateFormat=sn={}));var _a;(function(t){t.ClientSecretPost="ClientSecretPost",t.ClientSecretBasic="ClientSecretBasic",t.None="None"})(_a||(kr.ClientAuthentication=_a={}));var hp=class t extends oi.AuthClient{static{o(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=sn.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(e={},r,n){super(typeof e=="object"?e:{}),typeof e!="object"&&(e={clientId:e,clientSecret:r,redirectUri:n}),this._clientId=e.clientId||e.client_id,this._clientSecret=e.clientSecret||e.client_secret,this.redirectUri=e.redirectUri||e.redirect_uris?.[0],this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...e.endpoints},this.clientAuthentication=e.clientAuthentication||_a.ClientSecretPost,this.issuers=e.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}static GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";static CLOCK_SKEW_SECS_=300;static DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400;generateAuthUrl(e={}){if(e.code_challenge_method&&!e.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return e.response_type=e.response_type||"code",e.client_id=e.client_id||this._clientId,e.redirect_uri=e.redirect_uri||this.redirectUri,Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+Fk.stringify(e)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let e=(0,mp.createCrypto)(),n=e.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),s=(await e.sha256DigestBase64(n)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:n,codeChallenge:s}}getToken(e,r){let n=typeof e=="string"?{code:e}:e;if(r)this.getTokenAsync(n).then(i=>r(null,i.tokens,i.res),i=>r(i,null,i.response));else return this.getTokenAsync(n)}async getTokenAsync(e){let r=this.endpoints.oauth2TokenUrl.toString(),n=new Headers,i={client_id:e.client_id||this._clientId,code_verifier:e.codeVerifier,code:e.code,grant_type:"authorization_code",redirect_uri:e.redirect_uri||this.redirectUri};if(this.clientAuthentication===_a.ClientSecretBasic){let l=Buffer.from(`${this._clientId}:${this._clientSecret}`);n.set("authorization",`Basic ${l.toString("base64")}`)}this.clientAuthentication===_a.ClientSecretPost&&(i.client_secret=this._clientSecret);let s={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,MS.removeUndefinedValuesInObject)(i)),headers:n};oi.AuthClient.setMethodName(s,"getTokenAsync");let c=await this.transporter.request(s),d=c.data;return c.data&&c.data.expires_in&&(d.expiry_date=new Date().getTime()+c.data.expires_in*1e3,delete d.expires_in),this.emit("tokens",d),{tokens:d,res:c}}async refreshToken(e){if(!e)return this.refreshTokenNoCache(e);if(this.refreshTokenPromises.has(e))return this.refreshTokenPromises.get(e);let r=this.refreshTokenNoCache(e).then(n=>(this.refreshTokenPromises.delete(e),n),n=>{throw this.refreshTokenPromises.delete(e),n});return this.refreshTokenPromises.set(e,r),r}async refreshTokenNoCache(e){if(!e)throw new Error("No refresh token is set.");let r=this.endpoints.oauth2TokenUrl.toString(),n={refresh_token:e,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},i;try{let c={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,MS.removeUndefinedValuesInObject)(n))};oi.AuthClient.setMethodName(c,"refreshTokenNoCache"),i=await this.transporter.request(c)}catch(c){throw c instanceof US.GaxiosError&&c.message==="invalid_grant"&&c.response?.data&&/ReAuth/i.test(c.response.data.error_description)&&(c.message=JSON.stringify(c.response.data)),c}let s=i.data;return i.data&&i.data.expires_in&&(s.expiry_date=new Date().getTime()+i.data.expires_in*1e3,delete s.expires_in),this.emit("tokens",s),{tokens:s,res:i}}refreshAccessToken(e){if(e)this.refreshAccessTokenAsync().then(r=>e(null,r.credentials,r.res),e);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let e=await this.refreshToken(this.credentials.refresh_token),r=e.tokens;return r.refresh_token=this.credentials.refresh_token,this.credentials=r,{credentials:this.credentials,res:e.res}}getAccessToken(e){if(e)this.getAccessTokenAsync().then(r=>e(null,r.token,r.res),e);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let n=await this.processAndValidateRefreshHandler();if(n?.access_token)return this.setCredentials(n),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let r=await this.refreshAccessTokenAsync();if(!r.credentials||r.credentials&&!r.credentials.access_token)throw new Error("Could not refresh access token.");return{token:r.credentials.access_token,res:r.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(e){return(await this.getRequestMetadataAsync(e)).headers}async getRequestMetadataAsync(e){let r=this.credentials;if(!r.access_token&&!r.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(r.access_token&&!this.isTokenExpiring()){r.token_type=r.token_type||"Bearer";let d=new Headers({authorization:r.token_type+" "+r.access_token});return{headers:this.addSharedMetadataHeaders(d)}}if(this.refreshHandler){let d=await this.processAndValidateRefreshHandler();if(d?.access_token){this.setCredentials(d);let l=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(l)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let n=null,i=null;try{n=await this.refreshToken(r.refresh_token),i=n.tokens}catch(d){let l=d;throw l.response&&(l.response.status===403||l.response.status===404)&&(l.message=`Could not refresh access token: ${l.message}`),l}let s=this.credentials;s.token_type=s.token_type||"Bearer",i.refresh_token=s.refresh_token,this.credentials=i;let c=new Headers({authorization:s.token_type+" "+i.access_token});return{headers:this.addSharedMetadataHeaders(c),res:n.res}}static getRevokeTokenUrl(e){return new t().getRevokeTokenURL(e).toString()}getRevokeTokenURL(e){let r=new URL(this.endpoints.oauth2RevokeUrl);return r.searchParams.append("token",e),r}revokeToken(e,r){let n={...t.RETRY_CONFIG,url:this.getRevokeTokenURL(e).toString(),method:"POST"};if(oi.AuthClient.setMethodName(n,"revokeToken"),r)this.transporter.request(n).then(i=>r(null,i),r);else return this.transporter.request(n)}revokeCredentials(e){if(e)this.revokeCredentialsAsync().then(r=>e(null,r),e);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let e=this.credentials.access_token;if(this.credentials={},e)return this.revokeToken(e);throw new Error("No access token to revoke.")}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){try{let n=await this.getRequestMetadataAsync();return e.headers=US.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,n.headers),this.apiKey&&e.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(e)}catch(n){let i=n.response;if(i){let s=i.status,c=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),d=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,l=i.config.data instanceof Bk.Readable,f=s===401||s===403;if(!r&&f&&!l&&c)return await this.refreshAccessTokenAsync(),this.requestAsync(e,!0);if(!r&&f&&!l&&d){let p=await this.processAndValidateRefreshHandler();return p?.access_token&&this.setCredentials(p),this.requestAsync(e,!0)}}throw n}}verifyIdToken(e,r){if(r&&typeof r!="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(r)this.verifyIdTokenAsync(e).then(n=>r(null,n),r);else return this.verifyIdTokenAsync(e)}async verifyIdTokenAsync(e){if(!e.idToken)throw new Error("The verifyIdToken method requires an ID Token");let r=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(e.idToken,r.certs,e.audience,this.issuers,e.maxExpiry)}async getTokenInfo(e){let{data:r}=await this.transporter.request({...t.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${e}`},url:this.endpoints.tokenInfoUrl.toString()}),n=Object.assign({expiry_date:new Date().getTime()+r.expires_in*1e3,scopes:r.scope.split(" ")},r);return delete n.expires_in,delete n.scope,n}getFederatedSignonCerts(e){if(e)this.getFederatedSignonCertsAsync().then(r=>e(null,r.certs,r.res),e);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let e=new Date().getTime(),r=(0,mp.hasBrowserCrypto)()?sn.JWK:sn.PEM;if(this.certificateExpiry&&e<this.certificateExpiry.getTime()&&this.certificateCacheFormat===r)return{certs:this.certificateCache,format:r};let n,i;switch(r){case sn.PEM:i=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case sn.JWK:i=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${r}`)}try{let f={...t.RETRY_CONFIG,url:i};oi.AuthClient.setMethodName(f,"getFederatedSignonCertsAsync"),n=await this.transporter.request(f)}catch(f){throw f instanceof Error&&(f.message=`Failed to retrieve verification certificates: ${f.message}`),f}let s=n?.headers.get("cache-control"),c=-1;if(s){let f=/max-age=(?<maxAge>[0-9]+)/.exec(s)?.groups?.maxAge;f&&(c=Number(f)*1e3)}let d={};switch(r){case sn.PEM:d=n.data;break;case sn.JWK:for(let f of n.data.keys)d[f.kid]=f;break;default:throw new Error(`Unsupported certificate format ${r}`)}let l=new Date;return this.certificateExpiry=c===-1?null:new Date(l.getTime()+c),this.certificateCache=d,this.certificateCacheFormat=r,{certs:d,format:r,res:n}}getIapPublicKeys(e){if(e)this.getIapPublicKeysAsync().then(r=>e(null,r.pubkeys,r.res),e);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let e,r=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let n={...t.RETRY_CONFIG,url:r};oi.AuthClient.setMethodName(n,"getIapPublicKeysAsync"),e=await this.transporter.request(n)}catch(n){throw n instanceof Error&&(n.message=`Failed to retrieve verification certificates: ${n.message}`),n}return{pubkeys:e.data,res:e}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(e,r,n,i,s){let c=(0,mp.createCrypto)();s||(s=t.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let d=e.split(".");if(d.length!==3)throw new Error("Wrong number of segments in token: "+e);let l=d[0]+"."+d[1],f=d[2],p,_;try{p=JSON.parse(c.decodeBase64StringUtf8(d[0]))}catch(F){throw F instanceof Error&&(F.message=`Can't parse token envelope: ${d[0]}': ${F.message}`),F}if(!p)throw new Error("Can't parse token envelope: "+d[0]);try{_=JSON.parse(c.decodeBase64StringUtf8(d[1]))}catch(F){throw F instanceof Error&&(F.message=`Can't parse token payload '${d[0]}`),F}if(!_)throw new Error("Can't parse token payload: "+d[1]);if(!Object.prototype.hasOwnProperty.call(r,p.kid))throw new Error("No pem found for envelope: "+JSON.stringify(p));let h=r[p.kid];if(p.alg==="ES256"&&(f=qk.joseToDer(f,"ES256").toString("base64")),!await c.verify(h,l,f))throw new Error("Invalid token signature: "+e);if(!_.iat)throw new Error("No issue time in token: "+JSON.stringify(_));if(!_.exp)throw new Error("No expiration time in token: "+JSON.stringify(_));let y=Number(_.iat);if(isNaN(y))throw new Error("iat field using invalid format");let T=Number(_.exp);if(isNaN(T))throw new Error("exp field using invalid format");let P=new Date().getTime()/1e3;if(T>=P+s)throw new Error("Expiration time too far in future: "+JSON.stringify(_));let x=y-t.CLOCK_SKEW_SECS_,N=T+t.CLOCK_SKEW_SECS_;if(P<x)throw new Error("Token used too early, "+P+" < "+x+": "+JSON.stringify(_));if(P>N)throw new Error("Token used too late, "+P+" > "+N+": "+JSON.stringify(_));if(i&&i.indexOf(_.iss)<0)throw new Error("Invalid issuer, expected one of ["+i+"], but got "+_.iss);if(typeof n<"u"&&n!==null){let F=_.aud,X=!1;if(n.constructor===Array?X=n.indexOf(F)>-1:X=F===n,!X)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new Vk.LoginTicket(p,_)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let e=await this.refreshHandler();if(!e.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return e}}isTokenExpiring(){let e=this.credentials.expiry_date;return e?e<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};kr.OAuth2Client=hp});var yp=k(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.Compute=void 0;var Hk=st(),LS=ga(),Gk=po(),gp=class extends Gk.OAuth2Client{static{o(this,"Compute")}serviceAccountEmail;scopes;constructor(e={}){super(e),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=e.serviceAccountEmail||"default",this.scopes=Array.isArray(e.scopes)?e.scopes:e.scopes?[e.scopes]:[]}async refreshTokenNoCache(){let e=`service-accounts/${this.serviceAccountEmail}/token`,r;try{let i={property:e};this.scopes.length>0&&(i.params={scopes:this.scopes.join(",")}),r=await LS.instance(i)}catch(i){throw i instanceof Hk.GaxiosError&&(i.message=`Could not refresh access token: ${i.message}`,this.wrapError(i)),i}let n=r;return r&&r.expires_in&&(n.expiry_date=new Date().getTime()+r.expires_in*1e3,delete n.expires_in),this.emit("tokens",n),{tokens:n,res:null}}async fetchIdToken(e){let r=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${e}`,n;try{let i={property:r};n=await LS.instance(i)}catch(i){throw i instanceof Error&&(i.message=`Could not fetch ID token: ${i.message}`),i}return n}wrapError(e){let r=e.response;r&&r.status&&(e.status=r.status,r.status===403?e.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+e.message:r.status===404&&(e.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+e.message))}};ku.Compute=gp});var vp=k(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.IdTokenClient=void 0;var Wk=po(),_p=class extends Wk.OAuth2Client{static{o(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(e){super(e),this.targetAudience=e.targetAudience,this.idTokenProvider=e.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let r=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:r,expiry_date:this.getIdTokenExpiryDate(r)}}return{headers:new Headers({authorization:"Bearer "+this.credentials.id_token})}}getIdTokenExpiryDate(e){let r=e.split(".")[1];if(r)return JSON.parse(Buffer.from(r,"base64").toString("ascii")).exp*1e3}};Nu.IdTokenClient=_p});var bp=k(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.GCPEnv=void 0;ii.clear=Zk;ii.getEnv=Kk;var FS=ga(),Nr;(function(t){t.APP_ENGINE="APP_ENGINE",t.KUBERNETES_ENGINE="KUBERNETES_ENGINE",t.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",t.COMPUTE_ENGINE="COMPUTE_ENGINE",t.CLOUD_RUN="CLOUD_RUN",t.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",t.NONE="NONE"})(Nr||(ii.GCPEnv=Nr={}));var va;function Zk(){va=void 0}o(Zk,"clear");async function Kk(){return va||(va=Jk(),va)}o(Kk,"getEnv");async function Jk(){let t=Nr.NONE;return Yk()?t=Nr.APP_ENGINE:Xk()?t=Nr.CLOUD_FUNCTIONS:await rN()?await tN()?t=Nr.KUBERNETES_ENGINE:Qk()?t=Nr.CLOUD_RUN:eN()?t=Nr.CLOUD_RUN_JOBS:t=Nr.COMPUTE_ENGINE:t=Nr.NONE,t}o(Jk,"getEnvMemoized");function Yk(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}o(Yk,"isAppEngine");function Xk(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}o(Xk,"isCloudFunction");function Qk(){return!!process.env.K_CONFIGURATION}o(Qk,"isCloudRun");function eN(){return!!process.env.CLOUD_RUN_JOB}o(eN,"isCloudRunJob");async function tN(){try{return await FS.instance("attributes/cluster-name"),!0}catch{return!1}}o(tN,"isKubernetesEngine");async function rN(){return FS.isAvailable()}o(rN,"isComputeEngine")});var Pp=k((XY,BS)=>{var zu=ni().Buffer,nN=require("stream"),oN=require("util");function Du(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=zu.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=zu.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,process.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}o(Du,"DataStream");oN.inherits(Du,nN);Du.prototype.write=o(function(e){this.buffer=zu.concat([this.buffer,zu.from(e)]),this.emit("data",e)},"write");Du.prototype.end=o(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");BS.exports=Du});var VS=k((eX,qS)=>{"use strict";var ba=require("buffer").Buffer,Sp=require("buffer").SlowBuffer;qS.exports=Uu;function Uu(t,e){if(!ba.isBuffer(t)||!ba.isBuffer(e)||t.length!==e.length)return!1;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}o(Uu,"bufferEq");Uu.install=function(){ba.prototype.equal=Sp.prototype.equal=o(function(e){return Uu(this,e)},"equal")};var iN=ba.prototype.equal,aN=Sp.prototype.equal;Uu.restore=function(){ba.prototype.equal=iN,Sp.prototype.equal=aN}});var Ap=k((rX,QS)=>{var si=ni().Buffer,ir=require("crypto"),GS=ip(),HS=require("util"),sN=`"%s" is not a valid algorithm.
30
+ `,typeof r.content=="string"?yield r.content:yield*r.content,yield`\r
31
+ `}yield o}static#i;static#a;static async#s(){return this.#i||=(await Promise.resolve().then(()=>St(KO()))).HttpsProxyAgent,this.#i}static async#c(){let e=typeof window<"u"&&!!window;return this.#a||=e?window.fetch:(await Promise.resolve().then(()=>(VC(),qC))).default,this.#a}static mergeHeaders(e,...n){e=e instanceof Headers?e:new Headers(e);for(let o of n)(o instanceof Headers?o:new Headers(o)).forEach((i,s)=>{s==="set-cookie"?e.append(s,i):e.set(s,i)});return e}};Ra.Gaxios=Df;Ia=Df});var gt=N(qt=>{"use strict";var U4=qt&&qt.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),M4=qt&&qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&U4(e,t,n)};Object.defineProperty(qt,"__esModule",{value:!0});qt.instance=qt.Gaxios=qt.GaxiosError=void 0;qt.request=L4;var WC=GC();Object.defineProperty(qt,"Gaxios",{enumerable:!0,get:a(function(){return WC.Gaxios},"get")});var j4=mb();Object.defineProperty(qt,"GaxiosError",{enumerable:!0,get:a(function(){return j4.GaxiosError},"get")});M4(yb(),qt);qt.instance=new WC.Gaxios;async function L4(t){return qt.instance.request(t)}a(L4,"request")});var jb=N((JC,Uf)=>{(function(t){"use strict";var e,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,r=Math.floor,i="[BigNumber Error] ",s=i+"Number primitive has more than 15 significant digits: ",u=1e14,l=14,p=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,m=1e9;function h(Z){var J,ee,ae,Y=ie.prototype={constructor:ie,toString:null,valueOf:null},ze=new ie(1),se=20,G=4,H=-7,re=21,X=-1e7,ue=1e7,de=!1,Ce=1,De=0,Je={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},tt="0123456789abcdefghijklmnopqrstuvwxyz",xt=!0;function ie(b,T){var A,U,O,k,F,R,$,j,D=this;if(!(D instanceof ie))return new ie(b,T);if(T==null){if(b&&b._isBigNumber===!0){D.s=b.s,!b.c||b.e>ue?D.c=D.e=null:b.e<X?D.c=[D.e=0]:(D.e=b.e,D.c=b.c.slice());return}if((R=typeof b=="number")&&b*0==0){if(D.s=1/b<0?(b=-b,-1):1,b===~~b){for(k=0,F=b;F>=10;F/=10,k++);k>ue?D.c=D.e=null:(D.e=k,D.c=[b]);return}j=String(b)}else{if(!n.test(j=String(b)))return ae(D,j,R);D.s=j.charCodeAt(0)==45?(j=j.slice(1),-1):1}(k=j.indexOf("."))>-1&&(j=j.replace(".","")),(F=j.search(/e/i))>0?(k<0&&(k=F),k+=+j.slice(F+1),j=j.substring(0,F)):k<0&&(k=j.length)}else{if(x(T,2,tt.length,"Base"),T==10&&xt)return D=new ie(b),He(D,se+D.e+1,G);if(j=String(b),R=typeof b=="number"){if(b*0!=0)return ae(D,j,R,T);if(D.s=1/b<0?(j=j.slice(1),-1):1,ie.DEBUG&&j.replace(/^0\.0*|\./,"").length>15)throw Error(s+b)}else D.s=j.charCodeAt(0)===45?(j=j.slice(1),-1):1;for(A=tt.slice(0,T),k=F=0,$=j.length;F<$;F++)if(A.indexOf(U=j.charAt(F))<0){if(U=="."){if(F>k){k=$;continue}}else if(!O&&(j==j.toUpperCase()&&(j=j.toLowerCase())||j==j.toLowerCase()&&(j=j.toUpperCase()))){O=!0,F=-1,k=0;continue}return ae(D,String(b),R,T)}R=!1,j=ee(j,T,10,D.s),(k=j.indexOf("."))>-1?j=j.replace(".",""):k=j.length}for(F=0;j.charCodeAt(F)===48;F++);for($=j.length;j.charCodeAt(--$)===48;);if(j=j.slice(F,++$)){if($-=F,R&&ie.DEBUG&&$>15&&(b>p||b!==r(b)))throw Error(s+D.s*b);if((k=k-F-1)>ue)D.c=D.e=null;else if(k<X)D.c=[D.e=0];else{if(D.e=k,D.c=[],F=(k+1)%l,k<0&&(F+=l),F<$){for(F&&D.c.push(+j.slice(0,F)),$-=l;F<$;)D.c.push(+j.slice(F,F+=l));F=l-(j=j.slice(F)).length}else F-=$;for(;F--;j+="0");D.c.push(+j)}}else D.c=[D.e=0]}a(ie,"BigNumber"),ie.clone=h,ie.ROUND_UP=0,ie.ROUND_DOWN=1,ie.ROUND_CEIL=2,ie.ROUND_FLOOR=3,ie.ROUND_HALF_UP=4,ie.ROUND_HALF_DOWN=5,ie.ROUND_HALF_EVEN=6,ie.ROUND_HALF_CEIL=7,ie.ROUND_HALF_FLOOR=8,ie.EUCLID=9,ie.config=ie.set=function(b){var T,A;if(b!=null)if(typeof b=="object"){if(b.hasOwnProperty(T="DECIMAL_PLACES")&&(A=b[T],x(A,0,m,T),se=A),b.hasOwnProperty(T="ROUNDING_MODE")&&(A=b[T],x(A,0,8,T),G=A),b.hasOwnProperty(T="EXPONENTIAL_AT")&&(A=b[T],A&&A.pop?(x(A[0],-m,0,T),x(A[1],0,m,T),H=A[0],re=A[1]):(x(A,-m,m,T),H=-(re=A<0?-A:A))),b.hasOwnProperty(T="RANGE"))if(A=b[T],A&&A.pop)x(A[0],-m,-1,T),x(A[1],1,m,T),X=A[0],ue=A[1];else if(x(A,-m,m,T),A)X=-(ue=A<0?-A:A);else throw Error(i+T+" cannot be zero: "+A);if(b.hasOwnProperty(T="CRYPTO"))if(A=b[T],A===!!A)if(A)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))de=A;else throw de=!A,Error(i+"crypto unavailable");else de=A;else throw Error(i+T+" not true or false: "+A);if(b.hasOwnProperty(T="MODULO_MODE")&&(A=b[T],x(A,0,9,T),Ce=A),b.hasOwnProperty(T="POW_PRECISION")&&(A=b[T],x(A,0,m,T),De=A),b.hasOwnProperty(T="FORMAT"))if(A=b[T],typeof A=="object")Je=A;else throw Error(i+T+" not an object: "+A);if(b.hasOwnProperty(T="ALPHABET"))if(A=b[T],typeof A=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(A))xt=A.slice(0,10)=="0123456789",tt=A;else throw Error(i+T+" invalid: "+A)}else throw Error(i+"Object expected: "+b);return{DECIMAL_PLACES:se,ROUNDING_MODE:G,EXPONENTIAL_AT:[H,re],RANGE:[X,ue],CRYPTO:de,MODULO_MODE:Ce,POW_PRECISION:De,FORMAT:Je,ALPHABET:tt}},ie.isBigNumber=function(b){if(!b||b._isBigNumber!==!0)return!1;if(!ie.DEBUG)return!0;var T,A,U=b.c,O=b.e,k=b.s;e:if({}.toString.call(U)=="[object Array]"){if((k===1||k===-1)&&O>=-m&&O<=m&&O===r(O)){if(U[0]===0){if(O===0&&U.length===1)return!0;break e}if(T=(O+1)%l,T<1&&(T+=l),String(U[0]).length==T){for(T=0;T<U.length;T++)if(A=U[T],A<0||A>=u||A!==r(A))break e;if(A!==0)return!0}}}else if(U===null&&O===null&&(k===null||k===1||k===-1))return!0;throw Error(i+"Invalid BigNumber: "+b)},ie.maximum=ie.max=function(){return ft(arguments,-1)},ie.minimum=ie.min=function(){return ft(arguments,1)},ie.random=(function(){var b=9007199254740992,T=Math.random()*b&2097151?function(){return r(Math.random()*b)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(A){var U,O,k,F,R,$=0,j=[],D=new ie(ze);if(A==null?A=se:x(A,0,m),F=o(A/l),de)if(crypto.getRandomValues){for(U=crypto.getRandomValues(new Uint32Array(F*=2));$<F;)R=U[$]*131072+(U[$+1]>>>11),R>=9e15?(O=crypto.getRandomValues(new Uint32Array(2)),U[$]=O[0],U[$+1]=O[1]):(j.push(R%1e14),$+=2);$=F/2}else if(crypto.randomBytes){for(U=crypto.randomBytes(F*=7);$<F;)R=(U[$]&31)*281474976710656+U[$+1]*1099511627776+U[$+2]*4294967296+U[$+3]*16777216+(U[$+4]<<16)+(U[$+5]<<8)+U[$+6],R>=9e15?crypto.randomBytes(7).copy(U,$):(j.push(R%1e14),$+=7);$=F/7}else throw de=!1,Error(i+"crypto unavailable");if(!de)for(;$<F;)R=T(),R<9e15&&(j[$++]=R%1e14);for(F=j[--$],A%=l,F&&A&&(R=f[l-A],j[$]=r(F/R)*R);j[$]===0;j.pop(),$--);if($<0)j=[k=0];else{for(k=-1;j[0]===0;j.splice(0,1),k-=l);for($=1,R=j[0];R>=10;R/=10,$++);$<l&&(k-=l-$)}return D.e=k,D.c=j,D}})(),ie.sum=function(){for(var b=1,T=arguments,A=new ie(T[0]);b<T.length;)A=A.plus(T[b++]);return A},ee=(function(){var b="0123456789";function T(A,U,O,k){for(var F,R=[0],$,j=0,D=A.length;j<D;){for($=R.length;$--;R[$]*=U);for(R[0]+=k.indexOf(A.charAt(j++)),F=0;F<R.length;F++)R[F]>O-1&&(R[F+1]==null&&(R[F+1]=0),R[F+1]+=R[F]/O|0,R[F]%=O)}return R.reverse()}return a(T,"toBaseOut"),function(A,U,O,k,F){var R,$,j,D,W,pe,me,qe,it=A.indexOf("."),at=se,Fe=G;for(it>=0&&(D=De,De=0,A=A.replace(".",""),qe=new ie(U),pe=qe.pow(A.length-it),De=D,qe.c=T(K(E(pe.c),pe.e,"0"),10,O,b),qe.e=qe.c.length),me=T(A,U,O,F?(R=tt,b):(R=b,tt)),j=D=me.length;me[--D]==0;me.pop());if(!me[0])return R.charAt(0);if(it<0?--j:(pe.c=me,pe.e=j,pe.s=k,pe=J(pe,qe,at,Fe,O),me=pe.c,W=pe.r,j=pe.e),$=j+at+1,it=me[$],D=O/2,W=W||$<0||me[$+1]!=null,W=Fe<4?(it!=null||W)&&(Fe==0||Fe==(pe.s<0?3:2)):it>D||it==D&&(Fe==4||W||Fe==6&&me[$-1]&1||Fe==(pe.s<0?8:7)),$<1||!me[0])A=W?K(R.charAt(1),-at,R.charAt(0)):R.charAt(0);else{if(me.length=$,W)for(--O;++me[--$]>O;)me[$]=0,$||(++j,me=[1].concat(me));for(D=me.length;!me[--D];);for(it=0,A="";it<=D;A+=R.charAt(me[it++]));A=K(A,j,R.charAt(0))}return A}})(),J=(function(){function b(U,O,k){var F,R,$,j,D=0,W=U.length,pe=O%y,me=O/y|0;for(U=U.slice();W--;)$=U[W]%y,j=U[W]/y|0,F=me*$+j*pe,R=pe*$+F%y*y+D,D=(R/k|0)+(F/y|0)+me*j,U[W]=R%k;return D&&(U=[D].concat(U)),U}a(b,"multiply");function T(U,O,k,F){var R,$;if(k!=F)$=k>F?1:-1;else for(R=$=0;R<k;R++)if(U[R]!=O[R]){$=U[R]>O[R]?1:-1;break}return $}a(T,"compare");function A(U,O,k,F){for(var R=0;k--;)U[k]-=R,R=U[k]<O[k]?1:0,U[k]=R*F+U[k]-O[k];for(;!U[0]&&U.length>1;U.splice(0,1));}return a(A,"subtract"),function(U,O,k,F,R){var $,j,D,W,pe,me,qe,it,at,Fe,Ze,vt,bi,Si,Ei,tr,yn,zt=U.s==O.s?1:-1,bt=U.c,Xe=O.c;if(!bt||!bt[0]||!Xe||!Xe[0])return new ie(!U.s||!O.s||(bt?Xe&&bt[0]==Xe[0]:!Xe)?NaN:bt&&bt[0]==0||!Xe?zt*0:zt/0);for(it=new ie(zt),at=it.c=[],j=U.e-O.e,zt=k+j+1,R||(R=u,j=_(U.e/l)-_(O.e/l),zt=zt/l|0),D=0;Xe[D]==(bt[D]||0);D++);if(Xe[D]>(bt[D]||0)&&j--,zt<0)at.push(1),W=!0;else{for(Si=bt.length,tr=Xe.length,D=0,zt+=2,pe=r(R/(Xe[0]+1)),pe>1&&(Xe=b(Xe,pe,R),bt=b(bt,pe,R),tr=Xe.length,Si=bt.length),bi=tr,Fe=bt.slice(0,tr),Ze=Fe.length;Ze<tr;Fe[Ze++]=0);yn=Xe.slice(),yn=[0].concat(yn),Ei=Xe[0],Xe[1]>=R/2&&Ei++;do{if(pe=0,$=T(Xe,Fe,tr,Ze),$<0){if(vt=Fe[0],tr!=Ze&&(vt=vt*R+(Fe[1]||0)),pe=r(vt/Ei),pe>1)for(pe>=R&&(pe=R-1),me=b(Xe,pe,R),qe=me.length,Ze=Fe.length;T(me,Fe,qe,Ze)==1;)pe--,A(me,tr<qe?yn:Xe,qe,R),qe=me.length,$=1;else pe==0&&($=pe=1),me=Xe.slice(),qe=me.length;if(qe<Ze&&(me=[0].concat(me)),A(Fe,me,Ze,R),Ze=Fe.length,$==-1)for(;T(Xe,Fe,tr,Ze)<1;)pe++,A(Fe,tr<Ze?yn:Xe,Ze,R),Ze=Fe.length}else $===0&&(pe++,Fe=[0]);at[D++]=pe,Fe[0]?Fe[Ze++]=bt[bi]||0:(Fe=[bt[bi]],Ze=1)}while((bi++<Si||Fe[0]!=null)&&zt--);W=Fe[0]!=null,at[0]||at.splice(0,1)}if(R==u){for(D=1,zt=at[0];zt>=10;zt/=10,D++);He(it,k+(it.e=D+j*l-1)+1,F,W)}else it.e=j,it.r=+W;return it}})();function dt(b,T,A,U){var O,k,F,R,$;if(A==null?A=G:x(A,0,8),!b.c)return b.toString();if(O=b.c[0],F=b.e,T==null)$=E(b.c),$=U==1||U==2&&(F<=H||F>=re)?M($,F):K($,F,"0");else if(b=He(new ie(b),T,A),k=b.e,$=E(b.c),R=$.length,U==1||U==2&&(T<=k||k<=H)){for(;R<T;$+="0",R++);$=M($,k)}else if(T-=F+(U===2&&k>F),$=K($,k,"0"),k+1>R){if(--T>0)for($+=".";T--;$+="0");}else if(T+=k-R,T>0)for(k+1==R&&($+=".");T--;$+="0");return b.s<0&&O?"-"+$:$}a(dt,"format");function ft(b,T){for(var A,U,O=1,k=new ie(b[0]);O<b.length;O++)U=new ie(b[O]),(!U.s||(A=P(k,U))===T||A===0&&k.s===T)&&(k=U);return k}a(ft,"maxOrMin");function er(b,T,A){for(var U=1,O=T.length;!T[--O];T.pop());for(O=T[0];O>=10;O/=10,U++);return(A=U+A*l-1)>ue?b.c=b.e=null:A<X?b.c=[b.e=0]:(b.e=A,b.c=T),b}a(er,"normalise"),ae=(function(){var b=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,A=/^\.([^.]+)$/,U=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(k,F,R,$){var j,D=R?F:F.replace(O,"");if(U.test(D))k.s=isNaN(D)?null:D<0?-1:1;else{if(!R&&(D=D.replace(b,function(W,pe,me){return j=(me=me.toLowerCase())=="x"?16:me=="b"?2:8,!$||$==j?pe:W}),$&&(j=$,D=D.replace(T,"$1").replace(A,"0.$1")),F!=D))return new ie(D,j);if(ie.DEBUG)throw Error(i+"Not a"+($?" base "+$:"")+" number: "+F);k.s=null}k.c=k.e=null}})();function He(b,T,A,U){var O,k,F,R,$,j,D,W=b.c,pe=f;if(W){e:{for(O=1,R=W[0];R>=10;R/=10,O++);if(k=T-O,k<0)k+=l,F=T,$=W[j=0],D=r($/pe[O-F-1]%10);else if(j=o((k+1)/l),j>=W.length)if(U){for(;W.length<=j;W.push(0));$=D=0,O=1,k%=l,F=k-l+1}else break e;else{for($=R=W[j],O=1;R>=10;R/=10,O++);k%=l,F=k-l+O,D=F<0?0:r($/pe[O-F-1]%10)}if(U=U||T<0||W[j+1]!=null||(F<0?$:$%pe[O-F-1]),U=A<4?(D||U)&&(A==0||A==(b.s<0?3:2)):D>5||D==5&&(A==4||U||A==6&&(k>0?F>0?$/pe[O-F]:0:W[j-1])%10&1||A==(b.s<0?8:7)),T<1||!W[0])return W.length=0,U?(T-=b.e+1,W[0]=pe[(l-T%l)%l],b.e=-T||0):W[0]=b.e=0,b;if(k==0?(W.length=j,R=1,j--):(W.length=j+1,R=pe[l-k],W[j]=F>0?r($/pe[O-F]%pe[F])*R:0),U)for(;;)if(j==0){for(k=1,F=W[0];F>=10;F/=10,k++);for(F=W[0]+=R,R=1;F>=10;F/=10,R++);k!=R&&(b.e++,W[0]==u&&(W[0]=1));break}else{if(W[j]+=R,W[j]!=u)break;W[j--]=0,R=1}for(k=W.length;W[--k]===0;W.pop());}b.e>ue?b.c=b.e=null:b.e<X&&(b.c=[b.e=0])}return b}a(He,"round");function Ke(b){var T,A=b.e;return A===null?b.toString():(T=E(b.c),T=A<=H||A>=re?M(T,A):K(T,A,"0"),b.s<0?"-"+T:T)}return a(Ke,"valueOf"),Y.absoluteValue=Y.abs=function(){var b=new ie(this);return b.s<0&&(b.s=1),b},Y.comparedTo=function(b,T){return P(this,new ie(b,T))},Y.decimalPlaces=Y.dp=function(b,T){var A,U,O,k=this;if(b!=null)return x(b,0,m),T==null?T=G:x(T,0,8),He(new ie(k),b+k.e+1,T);if(!(A=k.c))return null;if(U=((O=A.length-1)-_(this.e/l))*l,O=A[O])for(;O%10==0;O/=10,U--);return U<0&&(U=0),U},Y.dividedBy=Y.div=function(b,T){return J(this,new ie(b,T),se,G)},Y.dividedToIntegerBy=Y.idiv=function(b,T){return J(this,new ie(b,T),0,1)},Y.exponentiatedBy=Y.pow=function(b,T){var A,U,O,k,F,R,$,j,D,W=this;if(b=new ie(b),b.c&&!b.isInteger())throw Error(i+"Exponent not an integer: "+Ke(b));if(T!=null&&(T=new ie(T)),R=b.e>14,!W.c||!W.c[0]||W.c[0]==1&&!W.e&&W.c.length==1||!b.c||!b.c[0])return D=new ie(Math.pow(+Ke(W),R?b.s*(2-z(b)):+Ke(b))),T?D.mod(T):D;if($=b.s<0,T){if(T.c?!T.c[0]:!T.s)return new ie(NaN);U=!$&&W.isInteger()&&T.isInteger(),U&&(W=W.mod(T))}else{if(b.e>9&&(W.e>0||W.e<-1||(W.e==0?W.c[0]>1||R&&W.c[1]>=24e7:W.c[0]<8e13||R&&W.c[0]<=9999975e7)))return k=W.s<0&&z(b)?-0:0,W.e>-1&&(k=1/k),new ie($?1/k:k);De&&(k=o(De/l+2))}for(R?(A=new ie(.5),$&&(b.s=1),j=z(b)):(O=Math.abs(+Ke(b)),j=O%2),D=new ie(ze);;){if(j){if(D=D.times(W),!D.c)break;k?D.c.length>k&&(D.c.length=k):U&&(D=D.mod(T))}if(O){if(O=r(O/2),O===0)break;j=O%2}else if(b=b.times(A),He(b,b.e+1,1),b.e>14)j=z(b);else{if(O=+Ke(b),O===0)break;j=O%2}W=W.times(W),k?W.c&&W.c.length>k&&(W.c.length=k):U&&(W=W.mod(T))}return U?D:($&&(D=ze.div(D)),T?D.mod(T):k?He(D,De,G,F):D)},Y.integerValue=function(b){var T=new ie(this);return b==null?b=G:x(b,0,8),He(T,T.e+1,b)},Y.isEqualTo=Y.eq=function(b,T){return P(this,new ie(b,T))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function(b,T){return P(this,new ie(b,T))>0},Y.isGreaterThanOrEqualTo=Y.gte=function(b,T){return(T=P(this,new ie(b,T)))===1||T===0},Y.isInteger=function(){return!!this.c&&_(this.e/l)>this.c.length-2},Y.isLessThan=Y.lt=function(b,T){return P(this,new ie(b,T))<0},Y.isLessThanOrEqualTo=Y.lte=function(b,T){return(T=P(this,new ie(b,T)))===-1||T===0},Y.isNaN=function(){return!this.s},Y.isNegative=function(){return this.s<0},Y.isPositive=function(){return this.s>0},Y.isZero=function(){return!!this.c&&this.c[0]==0},Y.minus=function(b,T){var A,U,O,k,F=this,R=F.s;if(b=new ie(b,T),T=b.s,!R||!T)return new ie(NaN);if(R!=T)return b.s=-T,F.plus(b);var $=F.e/l,j=b.e/l,D=F.c,W=b.c;if(!$||!j){if(!D||!W)return D?(b.s=-T,b):new ie(W?F:NaN);if(!D[0]||!W[0])return W[0]?(b.s=-T,b):new ie(D[0]?F:G==3?-0:0)}if($=_($),j=_(j),D=D.slice(),R=$-j){for((k=R<0)?(R=-R,O=D):(j=$,O=W),O.reverse(),T=R;T--;O.push(0));O.reverse()}else for(U=(k=(R=D.length)<(T=W.length))?R:T,R=T=0;T<U;T++)if(D[T]!=W[T]){k=D[T]<W[T];break}if(k&&(O=D,D=W,W=O,b.s=-b.s),T=(U=W.length)-(A=D.length),T>0)for(;T--;D[A++]=0);for(T=u-1;U>R;){if(D[--U]<W[U]){for(A=U;A&&!D[--A];D[A]=T);--D[A],D[U]+=u}D[U]-=W[U]}for(;D[0]==0;D.splice(0,1),--j);return D[0]?er(b,D,j):(b.s=G==3?-1:1,b.c=[b.e=0],b)},Y.modulo=Y.mod=function(b,T){var A,U,O=this;return b=new ie(b,T),!O.c||!b.s||b.c&&!b.c[0]?new ie(NaN):!b.c||O.c&&!O.c[0]?new ie(O):(Ce==9?(U=b.s,b.s=1,A=J(O,b,0,3),b.s=U,A.s*=U):A=J(O,b,0,Ce),b=O.minus(A.times(b)),!b.c[0]&&Ce==1&&(b.s=O.s),b)},Y.multipliedBy=Y.times=function(b,T){var A,U,O,k,F,R,$,j,D,W,pe,me,qe,it,at,Fe=this,Ze=Fe.c,vt=(b=new ie(b,T)).c;if(!Ze||!vt||!Ze[0]||!vt[0])return!Fe.s||!b.s||Ze&&!Ze[0]&&!vt||vt&&!vt[0]&&!Ze?b.c=b.e=b.s=null:(b.s*=Fe.s,!Ze||!vt?b.c=b.e=null:(b.c=[0],b.e=0)),b;for(U=_(Fe.e/l)+_(b.e/l),b.s*=Fe.s,$=Ze.length,W=vt.length,$<W&&(qe=Ze,Ze=vt,vt=qe,O=$,$=W,W=O),O=$+W,qe=[];O--;qe.push(0));for(it=u,at=y,O=W;--O>=0;){for(A=0,pe=vt[O]%at,me=vt[O]/at|0,F=$,k=O+F;k>O;)j=Ze[--F]%at,D=Ze[F]/at|0,R=me*j+D*pe,j=pe*j+R%at*at+qe[k]+A,A=(j/it|0)+(R/at|0)+me*D,qe[k--]=j%it;qe[k]=A}return A?++U:qe.splice(0,1),er(b,qe,U)},Y.negated=function(){var b=new ie(this);return b.s=-b.s||null,b},Y.plus=function(b,T){var A,U=this,O=U.s;if(b=new ie(b,T),T=b.s,!O||!T)return new ie(NaN);if(O!=T)return b.s=-T,U.minus(b);var k=U.e/l,F=b.e/l,R=U.c,$=b.c;if(!k||!F){if(!R||!$)return new ie(O/0);if(!R[0]||!$[0])return $[0]?b:new ie(R[0]?U:O*0)}if(k=_(k),F=_(F),R=R.slice(),O=k-F){for(O>0?(F=k,A=$):(O=-O,A=R),A.reverse();O--;A.push(0));A.reverse()}for(O=R.length,T=$.length,O-T<0&&(A=$,$=R,R=A,T=O),O=0;T;)O=(R[--T]=R[T]+$[T]+O)/u|0,R[T]=u===R[T]?0:R[T]%u;return O&&(R=[O].concat(R),++F),er(b,R,F)},Y.precision=Y.sd=function(b,T){var A,U,O,k=this;if(b!=null&&b!==!!b)return x(b,1,m),T==null?T=G:x(T,0,8),He(new ie(k),b,T);if(!(A=k.c))return null;if(O=A.length-1,U=O*l+1,O=A[O]){for(;O%10==0;O/=10,U--);for(O=A[0];O>=10;O/=10,U++);}return b&&k.e+1>U&&(U=k.e+1),U},Y.shiftedBy=function(b){return x(b,-p,p),this.times("1e"+b)},Y.squareRoot=Y.sqrt=function(){var b,T,A,U,O,k=this,F=k.c,R=k.s,$=k.e,j=se+4,D=new ie("0.5");if(R!==1||!F||!F[0])return new ie(!R||R<0&&(!F||F[0])?NaN:F?k:1/0);if(R=Math.sqrt(+Ke(k)),R==0||R==1/0?(T=E(F),(T.length+$)%2==0&&(T+="0"),R=Math.sqrt(+T),$=_(($+1)/2)-($<0||$%2),R==1/0?T="5e"+$:(T=R.toExponential(),T=T.slice(0,T.indexOf("e")+1)+$),A=new ie(T)):A=new ie(R+""),A.c[0]){for($=A.e,R=$+j,R<3&&(R=0);;)if(O=A,A=D.times(O.plus(J(k,O,j,1))),E(O.c).slice(0,R)===(T=E(A.c)).slice(0,R))if(A.e<$&&--R,T=T.slice(R-3,R+1),T=="9999"||!U&&T=="4999"){if(!U&&(He(O,O.e+se+2,0),O.times(O).eq(k))){A=O;break}j+=4,R+=4,U=1}else{(!+T||!+T.slice(1)&&T.charAt(0)=="5")&&(He(A,A.e+se+2,1),b=!A.times(A).eq(k));break}}return He(A,A.e+se+1,G,b)},Y.toExponential=function(b,T){return b!=null&&(x(b,0,m),b++),dt(this,b,T,1)},Y.toFixed=function(b,T){return b!=null&&(x(b,0,m),b=b+this.e+1),dt(this,b,T)},Y.toFormat=function(b,T,A){var U,O=this;if(A==null)b!=null&&T&&typeof T=="object"?(A=T,T=null):b&&typeof b=="object"?(A=b,b=T=null):A=Je;else if(typeof A!="object")throw Error(i+"Argument not an object: "+A);if(U=O.toFixed(b,T),O.c){var k,F=U.split("."),R=+A.groupSize,$=+A.secondaryGroupSize,j=A.groupSeparator||"",D=F[0],W=F[1],pe=O.s<0,me=pe?D.slice(1):D,qe=me.length;if($&&(k=R,R=$,$=k,qe-=k),R>0&&qe>0){for(k=qe%R||R,D=me.substr(0,k);k<qe;k+=R)D+=j+me.substr(k,R);$>0&&(D+=j+me.slice(k)),pe&&(D="-"+D)}U=W?D+(A.decimalSeparator||"")+(($=+A.fractionGroupSize)?W.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(A.fractionGroupSeparator||"")):W):D}return(A.prefix||"")+U+(A.suffix||"")},Y.toFraction=function(b){var T,A,U,O,k,F,R,$,j,D,W,pe,me=this,qe=me.c;if(b!=null&&(R=new ie(b),!R.isInteger()&&(R.c||R.s!==1)||R.lt(ze)))throw Error(i+"Argument "+(R.isInteger()?"out of range: ":"not an integer: ")+Ke(R));if(!qe)return new ie(me);for(T=new ie(ze),j=A=new ie(ze),U=$=new ie(ze),pe=E(qe),k=T.e=pe.length-me.e-1,T.c[0]=f[(F=k%l)<0?l+F:F],b=!b||R.comparedTo(T)>0?k>0?T:j:R,F=ue,ue=1/0,R=new ie(pe),$.c[0]=0;D=J(R,T,0,1),O=A.plus(D.times(U)),O.comparedTo(b)!=1;)A=U,U=O,j=$.plus(D.times(O=j)),$=O,T=R.minus(D.times(O=T)),R=O;return O=J(b.minus(A),U,0,1),$=$.plus(O.times(j)),A=A.plus(O.times(U)),$.s=j.s=me.s,k=k*2,W=J(j,U,k,G).minus(me).abs().comparedTo(J($,A,k,G).minus(me).abs())<1?[j,U]:[$,A],ue=F,W},Y.toNumber=function(){return+Ke(this)},Y.toPrecision=function(b,T){return b!=null&&x(b,1,m),dt(this,b,T,2)},Y.toString=function(b){var T,A=this,U=A.s,O=A.e;return O===null?U?(T="Infinity",U<0&&(T="-"+T)):T="NaN":(b==null?T=O<=H||O>=re?M(E(A.c),O):K(E(A.c),O,"0"):b===10&&xt?(A=He(new ie(A),se+O+1,G),T=K(E(A.c),A.e,"0")):(x(b,2,tt.length,"Base"),T=ee(K(E(A.c),O,"0"),10,b,U,!0)),U<0&&A.c[0]&&(T="-"+T)),T},Y.valueOf=Y.toJSON=function(){return Ke(this)},Y._isBigNumber=!0,Z!=null&&ie.set(Z),ie}a(h,"clone");function _(Z){var J=Z|0;return Z>0||Z===J?J:J-1}a(_,"bitFloor");function E(Z){for(var J,ee,ae=1,Y=Z.length,ze=Z[0]+"";ae<Y;){for(J=Z[ae++]+"",ee=l-J.length;ee--;J="0"+J);ze+=J}for(Y=ze.length;ze.charCodeAt(--Y)===48;);return ze.slice(0,Y+1||1)}a(E,"coeffToString");function P(Z,J){var ee,ae,Y=Z.c,ze=J.c,se=Z.s,G=J.s,H=Z.e,re=J.e;if(!se||!G)return null;if(ee=Y&&!Y[0],ae=ze&&!ze[0],ee||ae)return ee?ae?0:-G:se;if(se!=G)return se;if(ee=se<0,ae=H==re,!Y||!ze)return ae?0:!Y^ee?1:-1;if(!ae)return H>re^ee?1:-1;for(G=(H=Y.length)<(re=ze.length)?H:re,se=0;se<G;se++)if(Y[se]!=ze[se])return Y[se]>ze[se]^ee?1:-1;return H==re?0:H>re^ee?1:-1}a(P,"compare");function x(Z,J,ee,ae){if(Z<J||Z>ee||Z!==r(Z))throw Error(i+(ae||"Argument")+(typeof Z=="number"?Z<J||Z>ee?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Z))}a(x,"intCheck");function z(Z){var J=Z.c.length-1;return _(Z.e/l)==J&&Z.c[J]%2!=0}a(z,"isOdd");function M(Z,J){return(Z.length>1?Z.charAt(0)+"."+Z.slice(1):Z)+(J<0?"e":"e+")+J}a(M,"toExponential");function K(Z,J,ee){var ae,Y;if(J<0){for(Y=ee+".";++J;Y+=ee);Z=Y+Z}else if(ae=Z.length,++J>ae){for(Y=ee,J-=ae;--J;Y+=ee);Z+=Y}else J<ae&&(Z=Z.slice(0,J)+"."+Z.slice(J));return Z}a(K,"toFixedPoint"),e=h(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof Uf<"u"&&Uf.exports?Uf.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(JC)});var QC=N((Uoe,YC)=>{var KC=jb(),XC=YC.exports;(function(){"use strict";function t(p){return p<10?"0"+p:p}a(t,"f");var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o,r,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;function u(p){return n.lastIndex=0,n.test(p)?'"'+p.replace(n,function(f){var y=i[f];return typeof y=="string"?y:"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+p+'"'}a(u,"quote");function l(p,f){var y,m,h,_,E=o,P,x=f[p],z=x!=null&&(x instanceof KC||KC.isBigNumber(x));switch(x&&typeof x=="object"&&typeof x.toJSON=="function"&&(x=x.toJSON(p)),typeof s=="function"&&(x=s.call(f,p,x)),typeof x){case"string":return z?x:u(x);case"number":return isFinite(x)?String(x):"null";case"boolean":case"null":case"bigint":return String(x);case"object":if(!x)return"null";if(o+=r,P=[],Object.prototype.toString.apply(x)==="[object Array]"){for(_=x.length,y=0;y<_;y+=1)P[y]=l(y,x)||"null";return h=P.length===0?"[]":o?`[
32
+ `+o+P.join(`,
33
+ `+o)+`
34
+ `+E+"]":"["+P.join(",")+"]",o=E,h}if(s&&typeof s=="object")for(_=s.length,y=0;y<_;y+=1)typeof s[y]=="string"&&(m=s[y],h=l(m,x),h&&P.push(u(m)+(o?": ":":")+h));else Object.keys(x).forEach(function(M){var K=l(M,x);K&&P.push(u(M)+(o?": ":":")+K)});return h=P.length===0?"{}":o?`{
35
+ `+o+P.join(`,
36
+ `+o)+`
37
+ `+E+"}":"{"+P.join(",")+"}",o=E,h}}a(l,"str"),typeof XC.stringify!="function"&&(XC.stringify=function(p,f,y){var m;if(o="",r="",typeof y=="number")for(m=0;m<y;m+=1)r+=" ";else typeof y=="string"&&(r=y);if(s=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return l("",{"":p})})})()});var t0=N((joe,e0)=>{var Mf=null,F4=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,B4=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/,q4=a(function(t){"use strict";var e={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(t!=null){if(t.strict===!0&&(e.strict=!0),t.storeAsString===!0&&(e.storeAsString=!0),e.alwaysParseAsBig=t.alwaysParseAsBig===!0?t.alwaysParseAsBig:!1,e.useNativeBigInt=t.useNativeBigInt===!0?t.useNativeBigInt:!1,typeof t.constructorAction<"u")if(t.constructorAction==="error"||t.constructorAction==="ignore"||t.constructorAction==="preserve")e.constructorAction=t.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${t.constructorAction}`);if(typeof t.protoAction<"u")if(t.protoAction==="error"||t.protoAction==="ignore"||t.protoAction==="preserve")e.protoAction=t.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${t.protoAction}`)}var n,o,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
38
+ `,r:"\r",t:" "},i,s=a(function(E){throw{name:"SyntaxError",message:E,at:n,text:i}},"error"),u=a(function(E){return E&&E!==o&&s("Expected '"+E+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},"next"),l=a(function(){var E,P="";for(o==="-"&&(P="-",u("-"));o>="0"&&o<="9";)P+=o,u();if(o===".")for(P+=".";u()&&o>="0"&&o<="9";)P+=o;if(o==="e"||o==="E")for(P+=o,u(),(o==="-"||o==="+")&&(P+=o,u());o>="0"&&o<="9";)P+=o,u();if(E=+P,!isFinite(E))s("Bad number");else return Mf==null&&(Mf=jb()),P.length>15?e.storeAsString?P:e.useNativeBigInt?BigInt(P):new Mf(P):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(E):new Mf(E):E},"number"),p=a(function(){var E,P,x="",z;if(o==='"')for(var M=n;u();){if(o==='"')return n-1>M&&(x+=i.substring(M,n-1)),u(),x;if(o==="\\"){if(n-1>M&&(x+=i.substring(M,n-1)),u(),o==="u"){for(z=0,P=0;P<4&&(E=parseInt(u(),16),!!isFinite(E));P+=1)z=z*16+E;x+=String.fromCharCode(z)}else if(typeof r[o]=="string")x+=r[o];else break;M=n}}s("Bad string")},"string"),f=a(function(){for(;o&&o<=" ";)u()},"white"),y=a(function(){switch(o){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+o+"'")},"word"),m,h=a(function(){var E=[];if(o==="["){if(u("["),f(),o==="]")return u("]"),E;for(;o;){if(E.push(m()),f(),o==="]")return u("]"),E;u(","),f()}}s("Bad array")},"array"),_=a(function(){var E,P=Object.create(null);if(o==="{"){if(u("{"),f(),o==="}")return u("}"),P;for(;o;){if(E=p(),f(),u(":"),e.strict===!0&&Object.hasOwnProperty.call(P,E)&&s('Duplicate key "'+E+'"'),F4.test(E)===!0?e.protoAction==="error"?s("Object contains forbidden prototype property"):e.protoAction==="ignore"?m():P[E]=m():B4.test(E)===!0?e.constructorAction==="error"?s("Object contains forbidden constructor property"):e.constructorAction==="ignore"?m():P[E]=m():P[E]=m(),f(),o==="}")return u("}"),P;u(","),f()}}s("Bad object")},"object");return m=a(function(){switch(f(),o){case"{":return _();case"[":return h();case'"':return p();case"-":return l();default:return o>="0"&&o<="9"?l():y()}},"value"),function(E,P){var x;return i=E+"",n=0,o=" ",x=m(),f(),o&&s("Syntax error"),typeof P=="function"?a((function z(M,K){var Z,J,ee=M[K];return ee&&typeof ee=="object"&&Object.keys(ee).forEach(function(ae){J=z(ee,ae),J!==void 0?ee[ae]=J:delete ee[ae]}),P.call(M,K,ee)}),"walk")({"":x},""):x}},"json_parse");e0.exports=q4});var o0=N((Foe,jf)=>{var r0=QC().stringify,n0=t0();jf.exports=function(t){return{parse:n0(t),stringify:r0}};jf.exports.parse=n0();jf.exports.stringify=r0});var Lb=N(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.GCE_LINUX_BIOS_PATHS=void 0;Zr.isGoogleCloudServerless=s0;Zr.isGoogleComputeEngineLinux=c0;Zr.isGoogleComputeEngineMACAddress=u0;Zr.isGoogleComputeEngine=l0;Zr.detectGCPResidency=Z4;var i0=require("fs"),a0=require("os");Zr.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var V4=/^42:01/;function s0(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(s0,"isGoogleCloudServerless");function c0(){if((0,a0.platform)()!=="linux")return!1;try{(0,i0.statSync)(Zr.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let t=(0,i0.readFileSync)(Zr.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(t)}catch{return!1}}a(c0,"isGoogleComputeEngineLinux");function u0(){let t=(0,a0.networkInterfaces)();for(let e of Object.values(t))if(e){for(let{mac:n}of e)if(V4.test(n))return!0}return!1}a(u0,"isGoogleComputeEngineMACAddress");function l0(){return c0()||u0()}a(l0,"isGoogleComputeEngine");function Z4(){return s0()||l0()}a(Z4,"detectGCPResidency")});var d0=N(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.Colours=void 0;var Mt=class t{static{a(this,"Colours")}static isEnabled(e){return e&&e.isTTY&&(typeof e.getColorDepth=="function"?e.getColorDepth()>2:!0)}static refresh(){t.enabled=t.isEnabled(process==null?void 0:process.stderr),this.enabled?(t.reset="\x1B[0m",t.bright="\x1B[1m",t.dim="\x1B[2m",t.red="\x1B[31m",t.green="\x1B[32m",t.yellow="\x1B[33m",t.blue="\x1B[34m",t.magenta="\x1B[35m",t.cyan="\x1B[36m",t.white="\x1B[37m",t.grey="\x1B[90m"):(t.reset="",t.bright="",t.dim="",t.red="",t.green="",t.yellow="",t.blue="",t.magenta="",t.cyan="",t.white="",t.grey="")}};Lf.Colours=Mt;Mt.enabled=!1;Mt.reset="";Mt.bright="";Mt.dim="";Mt.red="";Mt.green="";Mt.yellow="";Mt.blue="";Mt.magenta="";Mt.cyan="";Mt.white="";Mt.grey="";Mt.refresh()});var h0=N(et=>{"use strict";var H4=et&&et.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),G4=et&&et.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),p0=et&&et.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var o=t(e),r=0;r<o.length;r++)o[r]!=="default"&&H4(n,e,o[r]);return G4(n,e),n}})();Object.defineProperty(et,"__esModule",{value:!0});et.env=et.DebugLogBackendBase=et.placeholder=et.AdhocDebugLogger=et.LogSeverity=void 0;et.getNodeBackend=Bb;et.getDebugBackend=J4;et.getStructuredBackend=K4;et.setBackend=X4;et.log=m0;var W4=require("events"),fu=p0(require("process")),f0=p0(require("util")),pr=d0(),Hr;(function(t){t.DEFAULT="DEFAULT",t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR"})(Hr||(et.LogSeverity=Hr={}));var mu=class extends W4.EventEmitter{static{a(this,"AdhocDebugLogger")}constructor(e,n){super(),this.namespace=e,this.upstream=n,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:a((o,r)=>this.on(o,r),"on")}),this.func.debug=(...o)=>this.invokeSeverity(Hr.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(Hr.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(Hr.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(Hr.ERROR,...o),this.func.sublog=o=>m0(o,this.func)}invoke(e,...n){if(this.upstream)try{this.upstream(e,...n)}catch{}try{this.emit("log",e,n)}catch{}}invokeSeverity(e,...n){this.invoke({severity:e},...n)}};et.AdhocDebugLogger=mu;et.placeholder=new mu("",()=>{}).func;var Oa=class{static{a(this,"DebugLogBackendBase")}constructor(){var e;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(e=fu.env[et.env.nodeEnables])!==null&&e!==void 0?e:"*";n==="all"&&(n="*"),this.filters=n.split(",")}log(e,n,...o){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let r=this.cached.get(e);r||(r=this.makeLogger(e),this.cached.set(e,r)),r(n,...o)}catch(r){console.error(r)}}};et.DebugLogBackendBase=Oa;var Fb=class extends Oa{static{a(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(e){return this.enabledRegexp.test(e)}makeLogger(e){return this.enabledRegexp.test(e)?(n,...o)=>{var r;let i=`${pr.Colours.green}${e}${pr.Colours.reset}`,s=`${pr.Colours.yellow}${fu.pid}${pr.Colours.reset}`,u;switch(n.severity){case Hr.ERROR:u=`${pr.Colours.red}${n.severity}${pr.Colours.reset}`;break;case Hr.INFO:u=`${pr.Colours.magenta}${n.severity}${pr.Colours.reset}`;break;case Hr.WARNING:u=`${pr.Colours.yellow}${n.severity}${pr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:Hr.DEFAULT;break}let l=f0.formatWithOptions({colors:pr.Colours.enabled},...o),p=Object.assign({},n);delete p.severity;let f=Object.getOwnPropertyNames(p).length?JSON.stringify(p):"",y=f?`${pr.Colours.grey}${f}${pr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",s,i,u,l,f?` ${y}`:"")}:()=>{}}setFilters(){let n=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${n}$`,"i")}};function Bb(){return new Fb}a(Bb,"getNodeBackend");var qb=class extends Oa{static{a(this,"DebugBackend")}constructor(e){super(),this.debugPkg=e}makeLogger(e){let n=this.debugPkg(e);return(o,...r)=>{n(r[0],...r.slice(1))}}setFilters(){var e;let n=(e=fu.env.NODE_DEBUG)!==null&&e!==void 0?e:"";fu.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function J4(t){return new qb(t)}a(J4,"getDebugBackend");var Vb=class extends Oa{static{a(this,"StructuredBackend")}constructor(e){var n;super(),this.upstream=(n=e)!==null&&n!==void 0?n:void 0}makeLogger(e){var n;let o=(n=this.upstream)===null||n===void 0?void 0:n.makeLogger(e);return(r,...i)=>{var s;let u=(s=r.severity)!==null&&s!==void 0?s:Hr.INFO,l=Object.assign({severity:u,message:f0.format(...i)},r),p=JSON.stringify(l);o?o(r,p):console.log("%s",p)}}setFilters(){var e;(e=this.upstream)===null||e===void 0||e.setFilters()}};function K4(t){return new Vb(t)}a(K4,"getStructuredBackend");et.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var Zb=new Map,fr;function X4(t){fr=t,Zb.clear()}a(X4,"setBackend");function m0(t,e){if(!fr&&!fu.env[et.env.nodeEnables]||!t)return et.placeholder;e&&(t=`${e.instance.namespace}:${t}`);let n=Zb.get(t);if(n)return n.func;if(fr===null)return et.placeholder;fr===void 0&&(fr=Bb());let o=(()=>{let r;return new mu(t,(s,...u)=>{if(r!==fr){if(fr===null)return;fr===void 0&&(fr=Bb()),r=fr}fr?.log(t,s,...u)})})();return Zb.set(t,o),o.func}a(m0,"log")});var Hb=N(pi=>{"use strict";var Y4=pi&&pi.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),Q4=pi&&pi.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Y4(e,t,n)};Object.defineProperty(pi,"__esModule",{value:!0});Q4(h0(),pi)});var gu=N(ve=>{"use strict";var y0=ve&&ve.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),e6=ve&&ve.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),t6=ve&&ve.__importStar||(function(){var t=a(function(e){return t=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var o=t(e),r=0;r<o.length;r++)o[r]!=="default"&&y0(n,e,o[r]);return e6(n,e),n}})(),r6=ve&&ve.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&y0(e,t,n)};Object.defineProperty(ve,"__esModule",{value:!0});ve.gcpResidencyCache=ve.METADATA_SERVER_DETECTION=ve.HEADERS=ve.HEADER_VALUE=ve.HEADER_NAME=ve.SECONDARY_HOST_ADDRESS=ve.HOST_ADDRESS=ve.BASE_PATH=void 0;ve.instance=c6;ve.project=u6;ve.universe=l6;ve.bulk=d6;ve.isAvailable=f6;ve.resetIsAvailableCache=m6;ve.getGCPResidency=Jb;ve.setGCPResidency=_0;ve.requestTimeout=v0;var Gb=gt(),n6=o0(),o6=Lb(),i6=t6(Hb());ve.BASE_PATH="/computeMetadata/v1";ve.HOST_ADDRESS="http://169.254.169.254";ve.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";ve.HEADER_NAME="Metadata-Flavor";ve.HEADER_VALUE="Google";ve.HEADERS=Object.freeze({[ve.HEADER_NAME]:ve.HEADER_VALUE});var g0=i6.log("gcp-metadata");ve.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":"don't try to ping the metadata server, but assume it's present",none:"don't try to ping the metadata server, but don't try to use it either","bios-only":"treat the result of a BIOS probe as canonical (don't fall back to pinging)","ping-only":"skip the BIOS probe, and go straight to pinging"});function Wb(t){return t||(t=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||ve.HOST_ADDRESS),/^https?:\/\//.test(t)||(t=`http://${t}`),new URL(ve.BASE_PATH,t).href}a(Wb,"getBaseUrl");function a6(t){Object.keys(t).forEach(e=>{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}})}a(a6,"validate");async function hu(t,e={},n=3,o=!1){let r=new Headers(ve.HEADERS),i="",s={};if(typeof t=="object"){let y=t;new Headers(y.headers).forEach((m,h)=>r.set(h,m)),i=y.metadataKey,s=y.params||s,n=y.noResponseRetries||n,o=y.fastFail||o}else i=t;typeof e=="string"?i+=`/${e}`:(a6(e),e.property&&(i+=`/${e.property}`),new Headers(e.headers).forEach((y,m)=>r.set(m,y)),s=e.params||s);let u=o?s6:Gb.request,l={url:`${Wb()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:v0()};g0.info("instance request %j",l);let p=await u(l);g0.info("instance metadata is %s",p.data);let f=p.headers.get(ve.HEADER_NAME);if(f!==ve.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${ve.HEADER_NAME} header. Expected '${ve.HEADER_VALUE}', got ${f?`'${f}'`:"no header"}`);if(typeof p.data=="string")try{return n6.parse(p.data)}catch{}return p.data}a(hu,"metadataAccessor");async function s6(t){let e={...t,url:t.url?.toString().replace(Wb(),Wb(ve.SECONDARY_HOST_ADDRESS))},n=(0,Gb.request)(t),o=(0,Gb.request)(e);return Promise.any([n,o])}a(s6,"fastFailMetadataRequest");function c6(t){return hu("instance",t)}a(c6,"instance");function u6(t){return hu("project",t)}a(u6,"project");function l6(t){return hu("universe",t)}a(l6,"universe");async function d6(t){let e={};return await Promise.all(t.map(n=>(async()=>{let o=await hu(n),r=n.metadataKey;e[r]=o})())),e}a(d6,"bulk");function p6(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(p6,"detectGCPAvailableRetries");var Ff;async function f6(){if(process.env.METADATA_SERVER_DETECTION){let t=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(t in ve.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${t}\`, but it should be \`${Object.keys(ve.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(t){case"assume-present":return!0;case"none":return!1;case"bios-only":return Jb();case"ping-only":}}try{return Ff===void 0&&(Ff=hu("instance",void 0,p6(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await Ff,!0}catch(t){let e=t;if(process.env.DEBUG_AUTH&&console.info(e),e.type==="request-timeout"||e.response&&e.response.status===404)return!1;if(!(e.response&&e.response.status===404)&&(!e.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(e.code.toString()))){let n="UNKNOWN";e.code&&(n=e.code.toString()),process.emitWarning(`received unexpected error = ${e.message} code = ${n}`,"MetadataLookupWarning")}return!1}}a(f6,"isAvailable");function m6(){Ff=void 0}a(m6,"resetIsAvailableCache");ve.gcpResidencyCache=null;function Jb(){return ve.gcpResidencyCache===null&&_0(),ve.gcpResidencyCache}a(Jb,"getGCPResidency");function _0(t=null){ve.gcpResidencyCache=t!==null?t:(0,o6.detectGCPResidency)()}a(_0,"setGCPResidency");function v0(){return Jb()?0:3e3}a(v0,"requestTimeout");r6(Lb(),ve)});var E0=N(Bf=>{"use strict";Bf.byteLength=g6;Bf.toByteArray=_6;Bf.fromByteArray=S6;var on=[],Rr=[],h6=typeof Uint8Array<"u"?Uint8Array:Array,Kb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(fi=0,b0=Kb.length;fi<b0;++fi)on[fi]=Kb[fi],Rr[Kb.charCodeAt(fi)]=fi;var fi,b0;Rr[45]=62;Rr[95]=63;function S0(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}a(S0,"getLens");function g6(t){var e=S0(t),n=e[0],o=e[1];return(n+o)*3/4-o}a(g6,"byteLength");function y6(t,e,n){return(e+n)*3/4-n}a(y6,"_byteLength");function _6(t){var e,n=S0(t),o=n[0],r=n[1],i=new h6(y6(t,o,r)),s=0,u=r>0?o-4:o,l;for(l=0;l<u;l+=4)e=Rr[t.charCodeAt(l)]<<18|Rr[t.charCodeAt(l+1)]<<12|Rr[t.charCodeAt(l+2)]<<6|Rr[t.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return r===2&&(e=Rr[t.charCodeAt(l)]<<2|Rr[t.charCodeAt(l+1)]>>4,i[s++]=e&255),r===1&&(e=Rr[t.charCodeAt(l)]<<10|Rr[t.charCodeAt(l+1)]<<4|Rr[t.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}a(_6,"toByteArray");function v6(t){return on[t>>18&63]+on[t>>12&63]+on[t>>6&63]+on[t&63]}a(v6,"tripletToBase64");function b6(t,e,n){for(var o,r=[],i=e;i<n;i+=3)o=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),r.push(v6(o));return r.join("")}a(b6,"encodeChunk");function S6(t){for(var e,n=t.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(b6(t,s,s+i>u?u:s+i));return o===1?(e=t[n-1],r.push(on[e>>2]+on[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(on[e>>10]+on[e>>4&63]+on[e<<2&63]+"=")),r.join("")}a(S6,"fromByteArray")});var Yb=N(Xb=>{"use strict";Object.defineProperty(Xb,"__esModule",{value:!0});Xb.fromArrayBufferToHex=E6;function E6(t){return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(E6,"fromArrayBufferToHex")});var P0=N(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.BrowserCrypto=void 0;var Ca=E0(),P6=Yb(),Qb=class t{static{a(this,"BrowserCrypto")}constructor(){if(typeof window>"u"||window.crypto===void 0||window.crypto.subtle===void 0)throw new Error("SubtleCrypto not found. Make sure it's an https:// website.")}async sha256DigestBase64(e){let n=new TextEncoder().encode(e),o=await window.crypto.subtle.digest("SHA-256",n);return Ca.fromByteArray(new Uint8Array(o))}randomBytesBase64(e){let n=new Uint8Array(e);return window.crypto.getRandomValues(n),Ca.fromByteArray(n)}static padBase64(e){for(;e.length%4!==0;)e+="=";return e}async verify(e,n,o){let r={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(n),s=Ca.toByteArray(t.padBase64(o)),u=await window.crypto.subtle.importKey("jwk",e,r,!0,["verify"]);return await window.crypto.subtle.verify(r,u,s,i)}async sign(e,n){let o={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},r=new TextEncoder().encode(n),i=await window.crypto.subtle.importKey("jwk",e,o,!0,["sign"]),s=await window.crypto.subtle.sign(o,i,r);return Ca.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(e){let n=Ca.toByteArray(t.padBase64(e));return new TextDecoder().decode(n)}encodeBase64StringUtf8(e){let n=new TextEncoder().encode(e);return Ca.fromByteArray(n)}async sha256DigestHex(e){let n=new TextEncoder().encode(e),o=await window.crypto.subtle.digest("SHA-256",n);return(0,P6.fromArrayBufferToHex)(o)}async signWithHmacSha256(e,n){let o=typeof e=="string"?e:String.fromCharCode(...new Uint16Array(e)),r=new TextEncoder,i=await window.crypto.subtle.importKey("raw",r.encode(o),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return window.crypto.subtle.sign("HMAC",i,r.encode(n))}};qf.BrowserCrypto=Qb});var x0=N(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.NodeCrypto=void 0;var $a=require("crypto"),eS=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(e){return $a.createHash("sha256").update(e).digest("base64")}randomBytesBase64(e){return $a.randomBytes(e).toString("base64")}async verify(e,n,o){let r=$a.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(e,o,"base64")}async sign(e,n){let o=$a.createSign("RSA-SHA256");return o.update(n),o.end(),o.sign(e,"base64")}decodeBase64StringUtf8(e){return Buffer.from(e,"base64").toString("utf-8")}encodeBase64StringUtf8(e){return Buffer.from(e,"utf-8").toString("base64")}async sha256DigestHex(e){return $a.createHash("sha256").update(e).digest("hex")}async signWithHmacSha256(e,n){let o=typeof e=="string"?e:T6(e);return x6($a.createHmac("sha256",o).update(n).digest())}};Vf.NodeCrypto=eS;function x6(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}a(x6,"toArrayBuffer");function T6(t){return Buffer.from(t)}a(T6,"toBuffer")});var yu=N(zn=>{"use strict";var A6=zn&&zn.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),w6=zn&&zn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&A6(e,t,n)};Object.defineProperty(zn,"__esModule",{value:!0});zn.createCrypto=O6;zn.hasBrowserCrypto=T0;var I6=P0(),R6=x0();w6(Yb(),zn);function O6(){return T0()?new I6.BrowserCrypto:new R6.NodeCrypto}a(O6,"createCrypto");function T0(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(T0,"hasBrowserCrypto")});var ka=N((tS,w0)=>{var Zf=require("buffer"),an=Zf.Buffer;function A0(t,e){for(var n in t)e[n]=t[n]}a(A0,"copyProps");an.from&&an.alloc&&an.allocUnsafe&&an.allocUnsafeSlow?w0.exports=Zf:(A0(Zf,tS),tS.Buffer=mi);function mi(t,e,n){return an(t,e,n)}a(mi,"SafeBuffer");mi.prototype=Object.create(an.prototype);A0(an,mi);mi.from=function(t,e,n){if(typeof t=="number")throw new TypeError("Argument must not be a number");return an(t,e,n)};mi.alloc=function(t,e,n){if(typeof t!="number")throw new TypeError("Argument must be a number");var o=an(t);return e!==void 0?typeof n=="string"?o.fill(e,n):o.fill(e):o.fill(0),o};mi.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return an(t)};mi.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Zf.SlowBuffer(t)}});var R0=N((uie,I0)=>{"use strict";function rS(t){var e=(t/8|0)+(t%8===0?0:1);return e}a(rS,"getParamSize");var C6={ES256:rS(256),ES384:rS(384),ES512:rS(521)};function $6(t){var e=C6[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}a($6,"getParamBytesForAlg");I0.exports=$6});var nS=N((die,z0)=>{"use strict";var Hf=ka().Buffer,C0=R0(),Gf=128,$0=0,k6=32,N6=16,z6=2,k0=N6|k6|$0<<6,Wf=z6|$0<<6;function D6(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(D6,"base64Url");function N0(t){if(Hf.isBuffer(t))return t;if(typeof t=="string")return Hf.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(N0,"signatureAsBuffer");function U6(t,e){t=N0(t);var n=C0(e),o=n+1,r=t.length,i=0;if(t[i++]!==k0)throw new Error('Could not find expected "seq"');var s=t[i++];if(s===(Gf|1)&&(s=t[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(t[i++]!==Wf)throw new Error('Could not find expected "int" for "r"');var u=t[i++];if(r-i-2<u)throw new Error('"r" specified length of "'+u+'", only "'+(r-i-2)+'" available');if(o<u)throw new Error('"r" specified length of "'+u+'", max of "'+o+'" is acceptable');var l=i;if(i+=u,t[i++]!==Wf)throw new Error('Could not find expected "int" for "s"');var p=t[i++];if(r-i!==p)throw new Error('"s" specified length of "'+p+'", expected "'+(r-i)+'"');if(o<p)throw new Error('"s" specified length of "'+p+'", max of "'+o+'" is acceptable');var f=i;if(i+=p,i!==r)throw new Error('Expected to consume entire buffer, but "'+(r-i)+'" bytes remain');var y=n-u,m=n-p,h=Hf.allocUnsafe(y+u+m+p);for(i=0;i<y;++i)h[i]=0;t.copy(h,i,l+Math.max(-y,0),l+u),i=n;for(var _=i;i<_+m;++i)h[i]=0;return t.copy(h,i,f+Math.max(-m,0),f+p),h=h.toString("base64"),h=D6(h),h}a(U6,"derToJose");function O0(t,e,n){for(var o=0;e+o<n&&t[e+o]===0;)++o;var r=t[e+o]>=Gf;return r&&--o,o}a(O0,"countPadding");function M6(t,e){t=N0(t);var n=C0(e),o=t.length;if(o!==n*2)throw new TypeError('"'+e+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=O0(t,0,n),i=O0(t,n,t.length),s=n-r,u=n-i,l=2+s+1+1+u,p=l<Gf,f=Hf.allocUnsafe((p?2:3)+l),y=0;return f[y++]=k0,p?f[y++]=l:(f[y++]=Gf|1,f[y++]=l&255),f[y++]=Wf,f[y++]=s,r<0?(f[y++]=0,y+=t.copy(f,y,0,n)):y+=t.copy(f,y,r,n),f[y++]=Wf,f[y++]=u,i<0?(f[y++]=0,t.copy(f,y,n)):t.copy(f,y,n+i),f}a(M6,"joseToDer");z0.exports={derToJose:U6,joseToDer:M6}});var Gr=N(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.LRUCache=void 0;Dn.snakeToCamel=U0;Dn.originalOrCamelOptions=B6;Dn.removeUndefinedValuesInObject=q6;Dn.isValidFile=V6;Dn.getWellKnownCertificateConfigFileLocation=Z6;var j6=require("fs"),L6=require("os"),oS=require("path"),F6="certificate_config.json",D0="gcloud";function U0(t){return t.replace(/([_][^_])/g,e=>e.slice(1).toUpperCase())}a(U0,"snakeToCamel");function B6(t){function e(n){let o=t||{};return o[n]??o[U0(n)]}return a(e,"get"),{get:e}}a(B6,"originalOrCamelOptions");var iS=class{static{a(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(e){this.capacity=e.capacity,this.maxAge=e.maxAge}#t(e,n){this.#e.delete(e),this.#e.set(e,{value:n,lastAccessed:Date.now()})}set(e,n){this.#t(e,n),this.#r()}get(e){let n=this.#e.get(e);if(n)return this.#t(e,n.value),this.#r(),n.value}#r(){let e=this.maxAge?Date.now()-this.maxAge:0,n=this.#e.entries().next();for(;!n.done&&(this.#e.size>this.capacity||n.value[1].lastAccessed<e);)this.#e.delete(n.value[0]),n=this.#e.entries().next()}};Dn.LRUCache=iS;function q6(t){return Object.entries(t).forEach(([e,n])=>{(n===void 0||n==="undefined")&&delete t[e]}),t}a(q6,"removeUndefinedValuesInObject");async function V6(t){try{return(await j6.promises.lstat(t)).isFile()}catch{return!1}}a(V6,"isValidFile");function Z6(){let t=process.env.CLOUDSDK_CONFIG||(H6()?oS.join(process.env.APPDATA||"",D0):oS.join(process.env.HOME||"",".config",D0));return oS.join(t,F6)}a(Z6,"getWellKnownCertificateConfigFileLocation");function H6(){return L6.platform().startsWith("win")}a(H6,"_isWindows")});var M0=N((hie,G6)=>{G6.exports={name:"google-auth-library",version:"10.5.0",author:"Google Inc.",description:"Google APIs Authentication Client Library for Node.js",engines:{node:">=18"},main:"./build/src/index.js",types:"./build/src/index.d.ts",repository:"googleapis/google-auth-library-nodejs.git",keywords:["google","api","google apis","client","client library"],dependencies:{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11",gaxios:"^7.0.0","gcp-metadata":"^8.0.0","google-logging-utils":"^1.0.0",gtoken:"^8.0.0",jws:"^4.0.0"},devDependencies:{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0",c8:"^10.0.0",codecov:"^3.0.2",gts:"^6.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.0","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",keypair:"^1.0.4",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","ts-loader":"^8.0.0",typescript:"5.8.2",webpack:"^5.21.2","webpack-cli":"^4.0.0"},files:["build/src","!build/src/**/*.map"],scripts:{test:"c8 mocha build/test",clean:"gts clean",prepare:"npm run compile",lint:"gts check --no-inline-config",compile:"tsc -p .",fix:"gts fix",pretest:"npm run compile -- --sourceMap",docs:"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap",webpack:"webpack","browser-test":"karma start","docs-test":"echo 'disabled until linkinator is fixed'","predocs-test":"npm run docs",prelint:"cd samples; npm link ../; npm install"},license:"Apache-2.0"}});var aS=N(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.USER_AGENT=xo.PRODUCT_NAME=xo.pkg=void 0;var j0=M0();xo.pkg=j0;var L0="google-api-nodejs-client";xo.PRODUCT_NAME=L0;var W6=`${L0}/${j0.version}`;xo.USER_AGENT=W6});var mr=N(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.AuthClient=Wr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=Wr.DEFAULT_UNIVERSE=void 0;var J6=require("events"),sS=gt(),K6=Gr(),X6=Hb(),cS=aS();Wr.DEFAULT_UNIVERSE="googleapis.com";Wr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var uS=class t extends J6.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=Wr.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=Wr.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(e={}){super();let n=(0,K6.originalOrCamelOptions)(e);this.apiKey=e.apiKey,this.projectId=n.get("project_id")??null,this.quotaProjectId=n.get("quota_project_id"),this.credentials=n.get("credentials")??{},this.universeDomain=n.get("universe_domain")??Wr.DEFAULT_UNIVERSE,this.transporter=e.transporter??new sS.Gaxios(e.transporterOptions),n.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(t.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(t.DEFAULT_RESPONSE_INTERCEPTOR)),e.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=e.forceRefreshOnFailure??!1}fetch(...e){let n=e[0],o=e[1],r,i=new Headers;return typeof n=="string"?r=new URL(n):n instanceof URL?r=n:n&&n.url&&(r=new URL(n.url)),n&&typeof n=="object"&&"headers"in n&&sS.Gaxios.mergeHeaders(i,n.headers),o&&sS.Gaxios.mergeHeaders(i,new Headers(o.headers)),typeof n=="object"&&!(n instanceof URL)?this.request({...o,...n,headers:i,url:r}):this.request({...o,headers:i,url:r})}setCredentials(e){this.credentials=e}addSharedMetadataHeaders(e){return!e.has("x-goog-user-project")&&this.quotaProjectId&&e.set("x-goog-user-project",this.quotaProjectId),e}addUserProjectAndAuthHeaders(e,n){let o=n.get("x-goog-user-project"),r=n.get("authorization");return o&&e.set("x-goog-user-project",o),r&&e.set("authorization",r),e}static log=(0,X6.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:a(async e=>{if(!e.headers.has("x-goog-api-client")){let o=process.version.replace(/^v/,"");e.headers.set("x-goog-api-client",`gl-node/${o}`)}let n=e.headers.get("User-Agent");n?n.includes(`${cS.PRODUCT_NAME}/`)||e.headers.set("User-Agent",`${n} ${cS.USER_AGENT}`):e.headers.set("User-Agent",cS.USER_AGENT);try{let o=e,r=o[t.RequestMethodNameSymbol],i=`${Math.floor(Math.random()*1e3)}`;o[t.RequestLogIdSymbol]=i;let s={url:e.url,headers:e.headers};r?t.log.info("%s [%s] request %j",r,i,s):t.log.info("[%s] request %j",i,s)}catch{}return e},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:a(async e=>{try{let n=e.config,o=n[t.RequestMethodNameSymbol],r=n[t.RequestLogIdSymbol];o?t.log.info("%s [%s] response %j",o,r,e.data):t.log.info("[%s] response %j",r,e.data)}catch{}return e},"resolved"),rejected:a(async e=>{try{let n=e.config,o=n[t.RequestMethodNameSymbol],r=n[t.RequestLogIdSymbol];o?t.log.info("%s [%s] error %j",o,r,e.response?.data):t.log.error("[%s] error %j",r,e.response?.data)}catch{}throw e},"rejected")};static setMethodName(e,n){try{let o=e;o[t.RequestMethodNameSymbol]=n}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};Wr.AuthClient=uS});var dS=N(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.LoginTicket=void 0;var lS=class{static{a(this,"LoginTicket")}envelope;payload;constructor(e,n){this.envelope=e,this.payload=n}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let e=this.getPayload();return e&&e.sub?e.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};Jf.LoginTicket=lS});var hi=N(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.OAuth2Client=sn.ClientAuthentication=sn.CertificateFormat=sn.CodeChallengeMethod=void 0;var F0=gt(),Y6=require("querystring"),Q6=require("stream"),eq=nS(),B0=Gr(),pS=yu(),Na=mr(),tq=dS(),q0;(function(t){t.Plain="plain",t.S256="S256"})(q0||(sn.CodeChallengeMethod=q0={}));var Un;(function(t){t.PEM="PEM",t.JWK="JWK"})(Un||(sn.CertificateFormat=Un={}));var _u;(function(t){t.ClientSecretPost="ClientSecretPost",t.ClientSecretBasic="ClientSecretBasic",t.None="None"})(_u||(sn.ClientAuthentication=_u={}));var fS=class t extends Na.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Un.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(e={},n,o){super(typeof e=="object"?e:{}),typeof e!="object"&&(e={clientId:e,clientSecret:n,redirectUri:o}),this._clientId=e.clientId||e.client_id,this._clientSecret=e.clientSecret||e.client_secret,this.redirectUri=e.redirectUri||e.redirect_uris?.[0],this.endpoints={tokenInfoUrl:"https://oauth2.googleapis.com/tokeninfo",oauth2AuthBaseUrl:"https://accounts.google.com/o/oauth2/v2/auth",oauth2TokenUrl:"https://oauth2.googleapis.com/token",oauth2RevokeUrl:"https://oauth2.googleapis.com/revoke",oauth2FederatedSignonPemCertsUrl:"https://www.googleapis.com/oauth2/v1/certs",oauth2FederatedSignonJwkCertsUrl:"https://www.googleapis.com/oauth2/v3/certs",oauth2IapPublicKeyUrl:"https://www.gstatic.com/iap/verify/public_key",...e.endpoints},this.clientAuthentication=e.clientAuthentication||_u.ClientSecretPost,this.issuers=e.issuers||["accounts.google.com","https://accounts.google.com",this.universeDomain]}static GOOGLE_TOKEN_INFO_URL="https://oauth2.googleapis.com/tokeninfo";static CLOCK_SKEW_SECS_=300;static DEFAULT_MAX_TOKEN_LIFETIME_SECS_=86400;generateAuthUrl(e={}){if(e.code_challenge_method&&!e.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return e.response_type=e.response_type||"code",e.client_id=e.client_id||this._clientId,e.redirect_uri=e.redirect_uri||this.redirectUri,Array.isArray(e.scope)&&(e.scope=e.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+Y6.stringify(e)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let e=(0,pS.createCrypto)(),o=e.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),i=(await e.sha256DigestBase64(o)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:o,codeChallenge:i}}getToken(e,n){let o=typeof e=="string"?{code:e}:e;if(n)this.getTokenAsync(o).then(r=>n(null,r.tokens,r.res),r=>n(r,null,r.response));else return this.getTokenAsync(o)}async getTokenAsync(e){let n=this.endpoints.oauth2TokenUrl.toString(),o=new Headers,r={client_id:e.client_id||this._clientId,code_verifier:e.codeVerifier,code:e.code,grant_type:"authorization_code",redirect_uri:e.redirect_uri||this.redirectUri};if(this.clientAuthentication===_u.ClientSecretBasic){let l=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${l.toString("base64")}`)}this.clientAuthentication===_u.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...t.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,B0.removeUndefinedValuesInObject)(r)),headers:o};Na.AuthClient.setMethodName(i,"getTokenAsync");let s=await this.transporter.request(i),u=s.data;return s.data&&s.data.expires_in&&(u.expiry_date=new Date().getTime()+s.data.expires_in*1e3,delete u.expires_in),this.emit("tokens",u),{tokens:u,res:s}}async refreshToken(e){if(!e)return this.refreshTokenNoCache(e);if(this.refreshTokenPromises.has(e))return this.refreshTokenPromises.get(e);let n=this.refreshTokenNoCache(e).then(o=>(this.refreshTokenPromises.delete(e),o),o=>{throw this.refreshTokenPromises.delete(e),o});return this.refreshTokenPromises.set(e,n),n}async refreshTokenNoCache(e){if(!e)throw new Error("No refresh token is set.");let n=this.endpoints.oauth2TokenUrl.toString(),o={refresh_token:e,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},r;try{let s={...t.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,B0.removeUndefinedValuesInObject)(o))};Na.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof F0.GaxiosError&&s.message==="invalid_grant"&&s.response?.data&&/ReAuth/i.test(s.response.data.error_description)&&(s.message=JSON.stringify(s.response.data)),s}let i=r.data;return r.data&&r.data.expires_in&&(i.expiry_date=new Date().getTime()+r.data.expires_in*1e3,delete i.expires_in),this.emit("tokens",i),{tokens:i,res:r}}refreshAccessToken(e){if(e)this.refreshAccessTokenAsync().then(n=>e(null,n.credentials,n.res),e);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let e=await this.refreshToken(this.credentials.refresh_token),n=e.tokens;return n.refresh_token=this.credentials.refresh_token,this.credentials=n,{credentials:this.credentials,res:e.res}}getAccessToken(e){if(e)this.getAccessTokenAsync().then(n=>e(null,n.token,n.res),e);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let o=await this.processAndValidateRefreshHandler();if(o?.access_token)return this.setCredentials(o),{token:this.credentials.access_token}}else throw new Error("No refresh token or refresh handler callback is set.");let n=await this.refreshAccessTokenAsync();if(!n.credentials||n.credentials&&!n.credentials.access_token)throw new Error("Could not refresh access token.");return{token:n.credentials.access_token,res:n.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(e){return(await this.getRequestMetadataAsync(e)).headers}async getRequestMetadataAsync(e){let n=this.credentials;if(!n.access_token&&!n.refresh_token&&!this.apiKey&&!this.refreshHandler)throw new Error("No access, refresh token, API key or refresh handler callback is set.");if(n.access_token&&!this.isTokenExpiring()){n.token_type=n.token_type||"Bearer";let u=new Headers({authorization:n.token_type+" "+n.access_token});return{headers:this.addSharedMetadataHeaders(u)}}if(this.refreshHandler){let u=await this.processAndValidateRefreshHandler();if(u?.access_token){this.setCredentials(u);let l=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(l)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let o=null,r=null;try{o=await this.refreshToken(n.refresh_token),r=o.tokens}catch(u){let l=u;throw l.response&&(l.response.status===403||l.response.status===404)&&(l.message=`Could not refresh access token: ${l.message}`),l}let i=this.credentials;i.token_type=i.token_type||"Bearer",r.refresh_token=i.refresh_token,this.credentials=r;let s=new Headers({authorization:i.token_type+" "+r.access_token});return{headers:this.addSharedMetadataHeaders(s),res:o.res}}static getRevokeTokenUrl(e){return new t().getRevokeTokenURL(e).toString()}getRevokeTokenURL(e){let n=new URL(this.endpoints.oauth2RevokeUrl);return n.searchParams.append("token",e),n}revokeToken(e,n){let o={...t.RETRY_CONFIG,url:this.getRevokeTokenURL(e).toString(),method:"POST"};if(Na.AuthClient.setMethodName(o,"revokeToken"),n)this.transporter.request(o).then(r=>n(null,r),n);else return this.transporter.request(o)}revokeCredentials(e){if(e)this.revokeCredentialsAsync().then(n=>e(null,n),e);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let e=this.credentials.access_token;if(this.credentials={},e)return this.revokeToken(e);throw new Error("No access token to revoke.")}request(e,n){if(n)this.requestAsync(e).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(e)}async requestAsync(e,n=!1){try{let o=await this.getRequestMetadataAsync();return e.headers=F0.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,o.headers),this.apiKey&&e.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(e)}catch(o){let r=o.response;if(r){let i=r.status,s=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),u=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,l=r.config.data instanceof Q6.Readable,p=i===401||i===403;if(!n&&p&&!l&&s)return await this.refreshAccessTokenAsync(),this.requestAsync(e,!0);if(!n&&p&&!l&&u){let f=await this.processAndValidateRefreshHandler();return f?.access_token&&this.setCredentials(f),this.requestAsync(e,!0)}}throw o}}verifyIdToken(e,n){if(n&&typeof n!="function")throw new Error("This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.");if(n)this.verifyIdTokenAsync(e).then(o=>n(null,o),n);else return this.verifyIdTokenAsync(e)}async verifyIdTokenAsync(e){if(!e.idToken)throw new Error("The verifyIdToken method requires an ID Token");let n=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(e.idToken,n.certs,e.audience,this.issuers,e.maxExpiry)}async getTokenInfo(e){let{data:n}=await this.transporter.request({...t.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${e}`},url:this.endpoints.tokenInfoUrl.toString()}),o=Object.assign({expiry_date:new Date().getTime()+n.expires_in*1e3,scopes:n.scope.split(" ")},n);return delete o.expires_in,delete o.scope,o}getFederatedSignonCerts(e){if(e)this.getFederatedSignonCertsAsync().then(n=>e(null,n.certs,n.res),e);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let e=new Date().getTime(),n=(0,pS.hasBrowserCrypto)()?Un.JWK:Un.PEM;if(this.certificateExpiry&&e<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Un.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Un.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let p={...t.RETRY_CONFIG,url:r};Na.AuthClient.setMethodName(p,"getFederatedSignonCertsAsync"),o=await this.transporter.request(p)}catch(p){throw p instanceof Error&&(p.message=`Failed to retrieve verification certificates: ${p.message}`),p}let i=o?.headers.get("cache-control"),s=-1;if(i){let p=/max-age=(?<maxAge>[0-9]+)/.exec(i)?.groups?.maxAge;p&&(s=Number(p)*1e3)}let u={};switch(n){case Un.PEM:u=o.data;break;case Un.JWK:for(let p of o.data.keys)u[p.kid]=p;break;default:throw new Error(`Unsupported certificate format ${n}`)}let l=new Date;return this.certificateExpiry=s===-1?null:new Date(l.getTime()+s),this.certificateCache=u,this.certificateCacheFormat=n,{certs:u,format:n,res:o}}getIapPublicKeys(e){if(e)this.getIapPublicKeysAsync().then(n=>e(null,n.pubkeys,n.res),e);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let e,n=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let o={...t.RETRY_CONFIG,url:n};Na.AuthClient.setMethodName(o,"getIapPublicKeysAsync"),e=await this.transporter.request(o)}catch(o){throw o instanceof Error&&(o.message=`Failed to retrieve verification certificates: ${o.message}`),o}return{pubkeys:e.data,res:e}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(e,n,o,r,i){let s=(0,pS.createCrypto)();i||(i=t.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let u=e.split(".");if(u.length!==3)throw new Error("Wrong number of segments in token: "+e);let l=u[0]+"."+u[1],p=u[2],f,y;try{f=JSON.parse(s.decodeBase64StringUtf8(u[0]))}catch(M){throw M instanceof Error&&(M.message=`Can't parse token envelope: ${u[0]}': ${M.message}`),M}if(!f)throw new Error("Can't parse token envelope: "+u[0]);try{y=JSON.parse(s.decodeBase64StringUtf8(u[1]))}catch(M){throw M instanceof Error&&(M.message=`Can't parse token payload '${u[0]}`),M}if(!y)throw new Error("Can't parse token payload: "+u[1]);if(!Object.prototype.hasOwnProperty.call(n,f.kid))throw new Error("No pem found for envelope: "+JSON.stringify(f));let m=n[f.kid];if(f.alg==="ES256"&&(p=eq.joseToDer(p,"ES256").toString("base64")),!await s.verify(m,l,p))throw new Error("Invalid token signature: "+e);if(!y.iat)throw new Error("No issue time in token: "+JSON.stringify(y));if(!y.exp)throw new Error("No expiration time in token: "+JSON.stringify(y));let _=Number(y.iat);if(isNaN(_))throw new Error("iat field using invalid format");let E=Number(y.exp);if(isNaN(E))throw new Error("exp field using invalid format");let P=new Date().getTime()/1e3;if(E>=P+i)throw new Error("Expiration time too far in future: "+JSON.stringify(y));let x=_-t.CLOCK_SKEW_SECS_,z=E+t.CLOCK_SKEW_SECS_;if(P<x)throw new Error("Token used too early, "+P+" < "+x+": "+JSON.stringify(y));if(P>z)throw new Error("Token used too late, "+P+" > "+z+": "+JSON.stringify(y));if(r&&r.indexOf(y.iss)<0)throw new Error("Invalid issuer, expected one of ["+r+"], but got "+y.iss);if(typeof o<"u"&&o!==null){let M=y.aud,K=!1;if(o.constructor===Array?K=o.indexOf(M)>-1:K=M===o,!K)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new tq.LoginTicket(f,y)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let e=await this.refreshHandler();if(!e.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return e}}isTokenExpiring(){let e=this.credentials.expiry_date;return e?e<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};sn.OAuth2Client=fS});var hS=N(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.Compute=void 0;var rq=gt(),V0=gu(),nq=hi(),mS=class extends nq.OAuth2Client{static{a(this,"Compute")}serviceAccountEmail;scopes;constructor(e={}){super(e),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=e.serviceAccountEmail||"default",this.scopes=Array.isArray(e.scopes)?e.scopes:e.scopes?[e.scopes]:[]}async refreshTokenNoCache(){let e=`service-accounts/${this.serviceAccountEmail}/token`,n;try{let r={property:e};this.scopes.length>0&&(r.params={scopes:this.scopes.join(",")}),n=await V0.instance(r)}catch(r){throw r instanceof rq.GaxiosError&&(r.message=`Could not refresh access token: ${r.message}`,this.wrapError(r)),r}let o=n;return n&&n.expires_in&&(o.expiry_date=new Date().getTime()+n.expires_in*1e3,delete o.expires_in),this.emit("tokens",o),{tokens:o,res:null}}async fetchIdToken(e){let n=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${e}`,o;try{let r={property:n};o=await V0.instance(r)}catch(r){throw r instanceof Error&&(r.message=`Could not fetch ID token: ${r.message}`),r}return o}wrapError(e){let n=e.response;n&&n.status&&(e.status=n.status,n.status===403?e.message="A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: "+e.message:n.status===404&&(e.message="A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: "+e.message))}};Kf.Compute=mS});var yS=N(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.IdTokenClient=void 0;var oq=hi(),gS=class extends oq.OAuth2Client{static{a(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(e){super(e),this.targetAudience=e.targetAudience,this.idTokenProvider=e.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let n=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:n,expiry_date:this.getIdTokenExpiryDate(n)}}return{headers:new Headers({authorization:"Bearer "+this.credentials.id_token})}}getIdTokenExpiryDate(e){let n=e.split(".")[1];if(n)return JSON.parse(Buffer.from(n,"base64").toString("ascii")).exp*1e3}};Xf.IdTokenClient=gS});var _S=N(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.GCPEnv=void 0;za.clear=iq;za.getEnv=aq;var Z0=gu(),cn;(function(t){t.APP_ENGINE="APP_ENGINE",t.KUBERNETES_ENGINE="KUBERNETES_ENGINE",t.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",t.COMPUTE_ENGINE="COMPUTE_ENGINE",t.CLOUD_RUN="CLOUD_RUN",t.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",t.NONE="NONE"})(cn||(za.GCPEnv=cn={}));var vu;function iq(){vu=void 0}a(iq,"clear");async function aq(){return vu||(vu=sq(),vu)}a(aq,"getEnv");async function sq(){let t=cn.NONE;return cq()?t=cn.APP_ENGINE:uq()?t=cn.CLOUD_FUNCTIONS:await fq()?await pq()?t=cn.KUBERNETES_ENGINE:lq()?t=cn.CLOUD_RUN:dq()?t=cn.CLOUD_RUN_JOBS:t=cn.COMPUTE_ENGINE:t=cn.NONE,t}a(sq,"getEnvMemoized");function cq(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(cq,"isAppEngine");function uq(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(uq,"isCloudFunction");function lq(){return!!process.env.K_CONFIGURATION}a(lq,"isCloudRun");function dq(){return!!process.env.CLOUD_RUN_JOB}a(dq,"isCloudRunJob");async function pq(){try{return await Z0.instance("attributes/cluster-name"),!0}catch{return!1}}a(pq,"isKubernetesEngine");async function fq(){return Z0.isAvailable()}a(fq,"isComputeEngine")});var vS=N((Rie,H0)=>{var Yf=ka().Buffer,mq=require("stream"),hq=require("util");function Qf(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=Yf.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=Yf.alloc(0),t.pipe(this),this;if(t.length||typeof t=="object")return this.buffer=t,this.writable=!1,process.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}a(Qf,"DataStream");hq.inherits(Qf,mq);Qf.prototype.write=a(function(e){this.buffer=Yf.concat([this.buffer,Yf.from(e)]),this.emit("data",e)},"write");Qf.prototype.end=a(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");H0.exports=Qf});var W0=N((Cie,G0)=>{"use strict";var bu=require("buffer").Buffer,bS=require("buffer").SlowBuffer;G0.exports=em;function em(t,e){if(!bu.isBuffer(t)||!bu.isBuffer(e)||t.length!==e.length)return!1;for(var n=0,o=0;o<t.length;o++)n|=t[o]^e[o];return n===0}a(em,"bufferEq");em.install=function(){bu.prototype.equal=bS.prototype.equal=a(function(e){return em(this,e)},"equal")};var gq=bu.prototype.equal,yq=bS.prototype.equal;em.restore=function(){bu.prototype.equal=gq,bS.prototype.equal=yq}});var xS=N((kie,n$)=>{var Ua=ka().Buffer,Or=require("crypto"),K0=nS(),J0=require("util"),_q=`"%s" is not a valid algorithm.
39
39
  Supported algorithms are:
40
- "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,Pa="secret must be a string or buffer",ai="key must be a string or a buffer",uN="key must be a string, a buffer or an object",Tp=typeof ir.createPublicKey=="function";Tp&&(ai+=" or a KeyObject",Pa+="or a KeyObject");function WS(t){if(!si.isBuffer(t)&&typeof t!="string"&&(!Tp||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw Pr(ai)}o(WS,"checkIsPublicKey");function ZS(t){if(!si.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw Pr(uN)}o(ZS,"checkIsPrivateKey");function cN(t){if(!si.isBuffer(t)){if(typeof t=="string")return t;if(!Tp||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw Pr(Pa)}}o(cN,"checkIsSecretKey");function xp(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(xp,"fromBase64");function KS(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var r=0;r<e;++r)t+="=";return t.replace(/\-/g,"+").replace(/_/g,"/")}o(KS,"toBase64");function Pr(t){var e=[].slice.call(arguments,1),r=HS.format.bind(HS,t).apply(null,e);return new TypeError(r)}o(Pr,"typeError");function lN(t){return si.isBuffer(t)||typeof t=="string"}o(lN,"bufferOrString");function Sa(t){return lN(t)||(t=JSON.stringify(t)),t}o(Sa,"normalizeInput");function JS(t){return o(function(r,n){cN(n),r=Sa(r);var i=ir.createHmac("sha"+t,n),s=(i.update(r),i.digest("base64"));return xp(s)},"sign")}o(JS,"createHmacSigner");var Ep,dN="timingSafeEqual"in ir?o(function(e,r){return e.byteLength!==r.byteLength?!1:ir.timingSafeEqual(e,r)},"timingSafeEqual"):o(function(e,r){return Ep||(Ep=VS()),Ep(e,r)},"timingSafeEqual");function pN(t){return o(function(r,n,i){var s=JS(t)(r,i);return dN(si.from(n),si.from(s))},"verify")}o(pN,"createHmacVerifier");function YS(t){return o(function(r,n){ZS(n),r=Sa(r);var i=ir.createSign("RSA-SHA"+t),s=(i.update(r),i.sign(n,"base64"));return xp(s)},"sign")}o(YS,"createKeySigner");function XS(t){return o(function(r,n,i){WS(i),r=Sa(r),n=KS(n);var s=ir.createVerify("RSA-SHA"+t);return s.update(r),s.verify(i,n,"base64")},"verify")}o(XS,"createKeyVerifier");function fN(t){return o(function(r,n){ZS(n),r=Sa(r);var i=ir.createSign("RSA-SHA"+t),s=(i.update(r),i.sign({key:n,padding:ir.constants.RSA_PKCS1_PSS_PADDING,saltLength:ir.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return xp(s)},"sign")}o(fN,"createPSSKeySigner");function mN(t){return o(function(r,n,i){WS(i),r=Sa(r),n=KS(n);var s=ir.createVerify("RSA-SHA"+t);return s.update(r),s.verify({key:i,padding:ir.constants.RSA_PKCS1_PSS_PADDING,saltLength:ir.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")},"verify")}o(mN,"createPSSKeyVerifier");function hN(t){var e=YS(t);return o(function(){var n=e.apply(null,arguments);return n=GS.derToJose(n,"ES"+t),n},"sign")}o(hN,"createECDSASigner");function gN(t){var e=XS(t);return o(function(n,i,s){i=GS.joseToDer(i,"ES"+t).toString("base64");var c=e(n,i,s);return c},"verify")}o(gN,"createECDSAVerifer");function yN(){return o(function(){return""},"sign")}o(yN,"createNoneSigner");function _N(){return o(function(e,r){return r===""},"verify")}o(_N,"createNoneVerifier");QS.exports=o(function(e){var r={hs:JS,rs:YS,ps:fN,es:hN,none:yN},n={hs:pN,rs:XS,ps:mN,es:gN,none:_N},i=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!i)throw Pr(sN,e);var s=(i[1]||i[3]).toLowerCase(),c=i[2];return{sign:r[s](c),verify:n[s](c)}},"jwa")});var wp=k((oX,eE)=>{var vN=require("buffer").Buffer;eE.exports=o(function(e){return typeof e=="string"?e:typeof e=="number"||vN.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var aE=k((aX,iE)=>{var bN=ni().Buffer,tE=Pp(),PN=Ap(),SN=require("stream"),rE=wp(),Ip=require("util");function nE(t,e){return bN.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(nE,"base64url");function EN(t,e,r){r=r||"utf8";var n=nE(rE(t),"binary"),i=nE(rE(e),r);return Ip.format("%s.%s",n,i)}o(EN,"jwsSecuredInput");function oE(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,i=t.encoding,s=PN(e.alg),c=EN(e,r,i),d=s.sign(c,n);return Ip.format("%s.%s",c,d)}o(oE,"jwsSign");function Mu(t){var e=t.secret;if(e=e??t.privateKey,e=e??t.key,/^hs/i.test(t.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new tE(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new tE(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}o(Mu,"SignStream");Ip.inherits(Mu,SN);Mu.prototype.sign=o(function(){try{var e=oE({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(r){this.readable=!1,this.emit("error",r),this.emit("close")}},"sign");Mu.sign=oE;iE.exports=Mu});var gE=k((uX,hE)=>{var uE=ni().Buffer,sE=Pp(),TN=Ap(),xN=require("stream"),cE=wp(),AN=require("util"),wN=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function IN(t){return Object.prototype.toString.call(t)==="[object Object]"}o(IN,"isObject");function RN(t){if(IN(t))return t;try{return JSON.parse(t)}catch{return}}o(RN,"safeJsonParse");function lE(t){var e=t.split(".",1)[0];return RN(uE.from(e,"base64").toString("binary"))}o(lE,"headerFromJWS");function ON(t){return t.split(".",2).join(".")}o(ON,"securedInputFromJWS");function dE(t){return t.split(".")[2]}o(dE,"signatureFromJWS");function CN(t,e){e=e||"utf8";var r=t.split(".")[1];return uE.from(r,"base64").toString(e)}o(CN,"payloadFromJWS");function pE(t){return wN.test(t)&&!!lE(t)}o(pE,"isValidJws");function fE(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=cE(t);var i=dE(t),s=ON(t),c=TN(e);return c.verify(s,i,r)}o(fE,"jwsVerify");function mE(t,e){if(e=e||{},t=cE(t),!pE(t))return null;var r=lE(t);if(!r)return null;var n=CN(t);return(r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:dE(t)}}o(mE,"jwsDecode");function ui(t){t=t||{};var e=t.secret;if(e=e??t.publicKey,e=e??t.key,/^hs/i.test(t.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var r=new sE(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new sE(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}o(ui,"VerifyStream");AN.inherits(ui,xN);ui.prototype.verify=o(function(){try{var e=fE(this.signature.buffer,this.algorithm,this.key.buffer),r=mE(this.signature.buffer,this.encoding);return this.emit("done",e,r),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"verify");ui.decode=mE;ui.isValid=pE;ui.verify=fE;hE.exports=ui});var Rp=k(Fn=>{var yE=aE(),ju=gE(),$N=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];Fn.ALGORITHMS=$N;Fn.sign=yE.sign;Fn.verify=ju.verify;Fn.decode=ju.decode;Fn.isValid=ju.isValid;Fn.createSign=o(function(e){return new yE(e)},"createSign");Fn.createVerify=o(function(e){return new ju(e)},"createVerify")});var $E=k(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.GoogleToken=void 0;var _E=Lu(require("fs")),kN=st(),NN=Lu(Rp()),zN=Lu(require("path")),DN=require("util");function Lu(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(Lu=o(function(s,c){if(!c&&s&&s.__esModule)return s;var d,l,f={__proto__:null,default:s};if(s===null||un(s)!="object"&&typeof s!="function")return f;if(d=c?n:r){if(d.has(s))return d.get(s);d.set(s,f)}for(var p in s)p!=="default"&&{}.hasOwnProperty.call(s,p)&&((l=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,p))&&(l.get||l.set)?d(f,p,l):f[p]=s[p]);return f},"_interopRequireWildcard"))(t,e)}o(Lu,"_interopRequireWildcard");function un(t){"@babel/helpers - typeof";return un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(t)}o(un,"_typeof");function UN(t,e){wE(t,e),e.add(t)}o(UN,"_classPrivateMethodInitSpec");function MN(t,e,r){wE(t,e),e.set(t,r)}o(MN,"_classPrivateFieldInitSpec");function wE(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(wE,"_checkPrivateRedeclaration");function vE(t,e,r){return t.set(Sr(t,e),r),r}o(vE,"_classPrivateFieldSet");function bE(t,e){return t.get(Sr(t,e))}o(bE,"_classPrivateFieldGet");function Sr(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}o(Sr,"_assertClassBrand");function PE(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,OE(n.key),n)}}o(PE,"_defineProperties");function IE(t,e,r){return e&&PE(t.prototype,e),r&&PE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}o(IE,"_createClass");function RE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}o(RE,"_classCallCheck");function jN(t,e,r){return e=Aa(e),LN(t,zp()?Reflect.construct(e,r||[],Aa(t).constructor):e.apply(t,r))}o(jN,"_callSuper");function LN(t,e){if(e&&(un(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FN(t)}o(LN,"_possibleConstructorReturn");function FN(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}o(FN,"_assertThisInitialized");function BN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xa(t,e)}o(BN,"_inherits");function Op(t){var e=typeof Map=="function"?new Map:void 0;return Op=o(function(n){if(n===null||!VN(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return qN(n,arguments,Aa(this).constructor)}return o(i,"Wrapper"),i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),xa(i,n)},"_wrapNativeSuper"),Op(t)}o(Op,"_wrapNativeSuper");function qN(t,e,r){if(zp())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&xa(i,r.prototype),i}o(qN,"_construct");function zp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zp=o(function(){return!!t},"_isNativeReflectConstruct"))()}o(zp,"_isNativeReflectConstruct");function VN(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}o(VN,"_isNativeFunction");function xa(t,e){return xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},xa(t,e)}o(xa,"_setPrototypeOf");function Aa(t){return Aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Aa(t)}o(Aa,"_getPrototypeOf");function Gt(t,e,r){return(e=OE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}o(Gt,"_defineProperty");function OE(t){var e=HN(t,"string");return un(e)=="symbol"?e:e+""}o(OE,"_toPropertyKey");function HN(t,e){if(un(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}o(HN,"_toPrimitive");function Zt(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function s(g,y,T,P){var x=y&&y.prototype instanceof d?y:d,N=Object.create(x.prototype);return Wt(N,"_invoke",(function(F,X,Z){var G,Y,ee,K=0,Oe=Z||[],te=!1,V={p:0,n:0,v:t,a:q,f:q.bind(t,4),d:o(function(W,re){return G=W,Y=0,ee=t,V.n=re,c},"d")};function q(J,W){for(Y=J,ee=W,e=0;!te&&K&&!re&&e<Oe.length;e++){var re,oe=Oe[e],Ie=V.p,Ce=oe[2];J>3?(re=Ce===W)&&(ee=oe[(Y=oe[4])?5:(Y=3,3)],oe[4]=oe[5]=t):oe[0]<=Ie&&((re=J<2&&Ie<oe[1])?(Y=0,V.v=W,V.n=oe[1]):Ie<Ce&&(re=J<3||oe[0]>W||W>Ce)&&(oe[4]=J,oe[5]=W,V.n=Ce,Y=0))}if(re||J>1)return c;throw te=!0,W}return o(q,"d"),function(J,W,re){if(K>1)throw TypeError("Generator is already running");for(te&&W===1&&q(W,re),Y=W,ee=re;(e=Y<2?t:ee)||!te;){G||(Y?Y<3?(Y>1&&(V.n=-1),q(Y,ee)):V.n=ee:V.v=ee);try{if(K=2,G){if(Y||(J="next"),e=G[J]){if(!(e=e.call(G,ee)))throw TypeError("iterator result is not an object");if(!e.done)return e;ee=e.value,Y<2&&(Y=0)}else Y===1&&(e=G.return)&&e.call(G),Y<2&&(ee=TypeError("The iterator does not provide a '"+J+"' method"),Y=1);G=t}else if((e=(te=V.n<0)?ee:F.call(X,V))!==c)break}catch(oe){G=t,Y=1,ee=oe}finally{K=1}}return{value:e,done:te}}})(g,T,P),!0),N}o(s,"i");var c={};function d(){}o(d,"Generator");function l(){}o(l,"GeneratorFunction");function f(){}o(f,"GeneratorFunctionPrototype"),e=Object.getPrototypeOf;var p=[][n]?e(e([][n]())):(Wt(e={},n,function(){return this}),e),_=f.prototype=d.prototype=Object.create(p);function h(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,f):(g.__proto__=f,Wt(g,i,"GeneratorFunction")),g.prototype=Object.create(_),g}return o(h,"f"),l.prototype=f,Wt(_,"constructor",f),Wt(f,"constructor",l),l.displayName="GeneratorFunction",Wt(f,i,"GeneratorFunction"),Wt(_),Wt(_,i,"Generator"),Wt(_,n,function(){return this}),Wt(_,"toString",function(){return"[object Generator]"}),(Zt=o(function(){return{w:s,m:h}},"_regenerator"))()}o(Zt,"_regenerator");function Wt(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}Wt=o(function(c,d,l,f){if(d)i?i(c,d,{value:l,enumerable:!f,configurable:!f,writable:!f}):c[d]=l;else{var p=o(function(h,g){Wt(c,h,function(y){return this._invoke(h,g,y)})},"o");p("next",0),p("throw",1),p("return",2)}},"_regeneratorDefine"),Wt(t,e,r,n)}o(Wt,"_regeneratorDefine2");function SE(t,e,r,n,i,s,c){try{var d=t[s](c),l=d.value}catch(f){return void r(f)}d.done?e(l):Promise.resolve(l).then(n,i)}o(SE,"asyncGeneratorStep");function ci(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function c(l){SE(s,n,i,c,d,"next",l)}o(c,"_next");function d(l){SE(s,n,i,c,d,"throw",l)}o(d,"_throw"),c(void 0)})}}o(ci,"_asyncToGenerator");var EE=_E.readFile?(0,DN.promisify)(_E.readFile):ci(Zt().m(o(function t(){return Zt().w(function(e){for(;;)switch(e.n){case 0:throw new Ta("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}},t)},"_callee"))),TE="https://oauth2.googleapis.com/token",GN="https://oauth2.googleapis.com/revoke?token=",Ta=(function(t){function e(r,n){var i;return RE(this,e),i=jN(this,e,[r]),Gt(i,"code",void 0),i.code=n,i}return o(e,"ErrorWithCode"),BN(e,t),IE(e)})(Op(Error)),Ea=new WeakMap,zr=new WeakSet,pX=Fu.GoogleToken=(function(){function t(e){RE(this,t),UN(this,zr),Gt(this,"expiresAt",void 0),Gt(this,"key",void 0),Gt(this,"keyFile",void 0),Gt(this,"iss",void 0),Gt(this,"sub",void 0),Gt(this,"scope",void 0),Gt(this,"rawToken",void 0),Gt(this,"tokenExpires",void 0),Gt(this,"email",void 0),Gt(this,"additionalClaims",void 0),Gt(this,"eagerRefreshThresholdMillis",void 0),Gt(this,"transporter",{request:o(function(n){return(0,kN.request)(n)},"request")}),MN(this,Ea,void 0),Sr(zr,this,CE).call(this,e)}return o(t,"GoogleToken"),IE(t,[{key:"accessToken",get:o(function(){return this.rawToken?this.rawToken.access_token:void 0},"get")},{key:"idToken",get:o(function(){return this.rawToken?this.rawToken.id_token:void 0},"get")},{key:"tokenType",get:o(function(){return this.rawToken?this.rawToken.token_type:void 0},"get")},{key:"refreshToken",get:o(function(){return this.rawToken?this.rawToken.refresh_token:void 0},"get")},{key:"hasExpired",value:o(function(){var r=new Date().getTime();return this.rawToken&&this.expiresAt?r>=this.expiresAt:!0},"hasExpired")},{key:"isTokenExpiring",value:o(function(){var r,n=new Date().getTime(),i=(r=this.eagerRefreshThresholdMillis)!==null&&r!==void 0?r:0;return this.rawToken&&this.expiresAt?this.expiresAt<=n+i:!0},"isTokenExpiring")},{key:"getToken",value:o(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(un(r)==="object"&&(n=r,r=void 0),n=Object.assign({forceRefresh:!1},n),r){var i=r;Sr(zr,this,xE).call(this,n).then(function(s){return i(null,s)},r);return}return Sr(zr,this,xE).call(this,n)},"getToken")},{key:"getCredentials",value:(function(){var e=ci(Zt().m(o(function n(i){var s,c,d,l,f,p,_;return Zt().w(function(h){for(;;)switch(h.n){case 0:s=zN.extname(i),_=s,h.n=_===".json"?1:_===".der"||_===".crt"||_===".pem"?4:_===".p12"||_===".pfx"?6:7;break;case 1:return h.n=2,EE(i,"utf8");case 2:if(c=h.v,d=JSON.parse(c),l=d.private_key,f=d.client_email,!(!l||!f)){h.n=3;break}throw new Ta("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return h.a(2,{privateKey:l,clientEmail:f});case 4:return h.n=5,EE(i,"utf8");case 5:return p=h.v,h.a(2,{privateKey:p});case 6:throw new Ta("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new Ta("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return h.a(2)}},n)},"_callee2")));function r(n){return e.apply(this,arguments)}return o(r,"getCredentials"),r})()},{key:"revokeToken",value:o(function(r){if(r){Sr(zr,this,AE).call(this).then(function(){return r()},r);return}return Sr(zr,this,AE).call(this)},"revokeToken")}])})();function xE(t){return Cp.apply(this,arguments)}o(xE,"_getTokenAsync");function Cp(){return Cp=ci(Zt().m(o(function t(e){return Zt().w(function(r){for(;;)switch(r.n){case 0:if(!(bE(Ea,this)&&!e.forceRefresh)){r.n=1;break}return r.a(2,bE(Ea,this));case 1:return r.p=1,r.n=2,vE(Ea,this,Sr(zr,this,WN).call(this,e));case 2:return r.a(2,r.v);case 3:return r.p=3,vE(Ea,this,void 0),r.f(3);case 4:return r.a(2)}},t,this,[[1,,3,4]])},"_callee3"))),Cp.apply(this,arguments)}o(Cp,"_getTokenAsync2");function WN(t){return $p.apply(this,arguments)}o(WN,"_getTokenAsyncInner");function $p(){return $p=ci(Zt().m(o(function t(e){var r;return Zt().w(function(n){for(;;)switch(n.n){case 0:if(!(this.isTokenExpiring()===!1&&e.forceRefresh===!1)){n.n=1;break}return n.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){n.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){n.n=4;break}return n.n=3,this.getCredentials(this.keyFile);case 3:r=n.v,this.key=r.privateKey,this.iss=r.clientEmail||this.iss,r.clientEmail||Sr(zr,this,ZN).call(this);case 4:return n.a(2,Sr(zr,this,KN).call(this))}},t,this)},"_callee4"))),$p.apply(this,arguments)}o($p,"_getTokenAsyncInner2");function ZN(){if(!this.iss)throw new Ta("email is required.","MISSING_CREDENTIALS")}o(ZN,"_ensureEmail");function AE(){return kp.apply(this,arguments)}o(AE,"_revokeTokenAsync");function kp(){return kp=ci(Zt().m(o(function t(){var e;return Zt().w(function(r){for(;;)switch(r.n){case 0:if(this.accessToken){r.n=1;break}throw new Error("No token to revoke.");case 1:return e=GN+this.accessToken,r.n=2,this.transporter.request({url:e,retry:!0});case 2:Sr(zr,this,CE).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return r.a(2)}},t,this)},"_callee5"))),kp.apply(this,arguments)}o(kp,"_revokeTokenAsync2");function CE(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=t.keyFile,this.key=t.key,this.rawToken=void 0,this.iss=t.email||t.iss,this.sub=t.sub,this.additionalClaims=t.additionalClaims,un(t.scope)==="object"?this.scope=t.scope.join(" "):this.scope=t.scope,this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,t.transporter&&(this.transporter=t.transporter)}o(CE,"_configure");function KN(){return Np.apply(this,arguments)}o(KN,"_requestToken");function Np(){return Np=ci(Zt().m(o(function t(){var e,r,n,i,s,c,d,l,f,p;return Zt().w(function(_){for(;;)switch(_.n){case 0:return e=Math.floor(new Date().getTime()/1e3),r=this.additionalClaims||{},n=Object.assign({iss:this.iss,scope:this.scope,aud:TE,exp:e+3600,iat:e,sub:this.sub},r),i=NN.sign({header:{alg:"RS256"},payload:n,secret:this.key}),_.p=1,_.n=2,this.transporter.request({method:"POST",url:TE,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return s=_.v,this.rawToken=s.data,this.expiresAt=s.data.expires_in===null||s.data.expires_in===void 0?void 0:(e+s.data.expires_in)*1e3,_.a(2,this.rawToken);case 3:throw _.p=3,p=_.v,this.rawToken=void 0,this.tokenExpires=void 0,l=p.response&&(c=p.response)!==null&&c!==void 0&&c.data?(d=p.response)===null||d===void 0?void 0:d.data:{},l.error&&(f=l.error_description?": ".concat(l.error_description):"",p.message="".concat(l.error).concat(f)),p;case 4:return _.a(2)}},t,this,[[1,3]])},"_callee6"))),Np.apply(this,arguments)}o(Np,"_requestToken2")});var Up=k(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.JWTAccess=void 0;var JN=Rp(),YN=vr(),kE={alg:"RS256",typ:"JWT"},Dp=class t{static{o(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new YN.LRUCache({capacity:500,maxAge:3600*1e3});constructor(e,r,n,i){this.email=e,this.key=r,this.keyId=n,this.eagerRefreshThresholdMillis=i??300*1e3}getCachedKey(e,r){let n=e;if(r&&Array.isArray(r)&&r.length?n=e?`${e}_${r.join("_")}`:`${r.join("_")}`:typeof r=="string"&&(n=e?`${e}_${r}`:r),!n)throw Error("Scopes or url must be provided");return n}getRequestHeaders(e,r,n){let i=this.getCachedKey(e,n),s=this.cache.get(i),c=Date.now();if(s&&s.expiration-c>this.eagerRefreshThresholdMillis)return new Headers(s.headers);let d=Math.floor(Date.now()/1e3),l=t.getExpirationTime(d),f;if(Array.isArray(n)&&(n=n.join(" ")),n?f={iss:this.email,sub:this.email,scope:n,exp:l,iat:d}:f={iss:this.email,sub:this.email,aud:e,exp:l,iat:d},r){for(let y in f)if(r[y])throw new Error(`The '${y}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let p=this.keyId?{...kE,kid:this.keyId}:kE,_=Object.assign(f,r),h=JN.sign({header:p,payload:_,secret:this.key}),g=new Headers({authorization:`Bearer ${h}`});return this.cache.set(i,{expiration:l*1e3,headers:g}),g}static getExpirationTime(e){return e+3600}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((r,n)=>{e||n(new Error("Must pass in a stream containing the service account auth settings."));let i="";e.setEncoding("utf8").on("data",s=>i+=s).on("error",n).on("end",()=>{try{let s=JSON.parse(i);this.fromJSON(s),r()}catch(s){n(s)}})})}};Bu.JWTAccess=Dp});var jp=k(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.JWT=void 0;var NE=$E(),XN=Up(),QN=po(),qu=Ht(),Mp=class t extends QN.OAuth2Client{static{o(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(e={}){super(e),this.email=e.email,this.keyFile=e.keyFile,this.key=e.key,this.keyId=e.keyId,this.scopes=e.scopes,this.subject=e.subject,this.additionalClaims=e.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(e){let r=new t(this);return r.scopes=e,r}async getRequestMetadataAsync(e){e=this.defaultServicePath?`https://${this.defaultServicePath}/`:e;let r=!this.hasUserScopes()&&e||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==qu.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==qu.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${qu.DEFAULT_UNIVERSE}`);if(!this.apiKey&&r)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:n}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${n.id_token}`}))}}else{this.access||(this.access=new XN.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let n;this.hasUserScopes()?n=this.scopes:e||(n=this.defaultScopes);let i=this.useJWTAccessWithScope||this.universeDomain!==qu.DEFAULT_UNIVERSE,s=await this.access.getRequestHeaders(e??void 0,this.additionalClaims,i?n:void 0);return{headers:this.addSharedMetadataHeaders(s)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(e):{headers:new Headers}}async fetchIdToken(e){let r=new NE.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:e},transporter:this.transporter});if(await r.getToken({forceRefresh:!0}),!r.idToken)throw new Error("Unknown error: Failed to fetch ID token");return r.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(e){if(e)this.authorizeAsync().then(r=>e(null,r),e);else return this.authorizeAsync()}async authorizeAsync(){let e=await this.refreshToken();if(!e)throw new Error("No result returned");return this.credentials=e.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,e.tokens}async refreshTokenNoCache(){let e=this.createGToken(),n={access_token:(await e.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:e.expiresAt,id_token:e.idToken};return this.emit("tokens",n),{res:null,tokens:n}}createGToken(){return this.gtoken||(this.gtoken=new NE.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((r,n)=>{if(!e)throw new Error("Must pass in a stream containing the service account auth settings.");let i="";e.setEncoding("utf8").on("error",n).on("data",s=>i+=s).on("end",()=>{try{let s=JSON.parse(i);this.fromJSON(s),r()}catch(s){n(s)}})})}fromAPIKey(e){if(typeof e!="string")throw new Error("Must provide an API Key string.");this.apiKey=e}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){let r=await this.createGToken().getCredentials(this.keyFile);return{private_key:r.privateKey,client_email:r.clientEmail}}throw new Error("A key or a keyFile must be provided to getCredentials.")}};Vu.JWT=Mp});var Fp=k(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.UserRefreshClient=li.USER_REFRESH_ACCOUNT_TYPE=void 0;var ez=po(),tz=Ht();li.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var Lp=class t extends ez.OAuth2Client{static{o(this,"UserRefreshClient")}_refreshToken;constructor(e,r,n,i,s){let c=e&&typeof e=="object"?e:{clientId:e,clientSecret:r,refreshToken:n,eagerRefreshThresholdMillis:i,forceRefreshOnFailure:s};super(c),this._refreshToken=c.refreshToken,this.credentials.refresh_token=c.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(e){let r={...t.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:"POST",data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:e})};return tz.AuthClient.setMethodName(r,"fetchIdToken"),(await this.transporter.request(r)).data.id_token}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the user refresh token");if(e.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!e.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!e.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!e.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=e.client_id,this._clientSecret=e.client_secret,this._refreshToken=e.refresh_token,this.credentials.refresh_token=e.refresh_token,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,r){if(r)this.fromStreamAsync(e).then(()=>r(),r);else return this.fromStreamAsync(e)}async fromStreamAsync(e){return new Promise((r,n)=>{if(!e)return n(new Error("Must pass in a stream containing the user refresh token."));let i="";e.setEncoding("utf8").on("error",n).on("data",s=>i+=s).on("end",()=>{try{let s=JSON.parse(i);return this.fromJSON(s),r()}catch(s){return n(s)}})})}static fromJSON(e){let r=new t;return r.fromJSON(e),r}};li.UserRefreshClient=Lp});var qp=k(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.Impersonated=di.IMPERSONATED_ACCOUNT_TYPE=void 0;var zE=po(),rz=st(),nz=vr();di.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var Bp=class t extends zE.OAuth2Client{static{o(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(e={}){if(super(e),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=e.sourceClient??new zE.OAuth2Client,this.targetPrincipal=e.targetPrincipal??"",this.delegates=e.delegates??[],this.targetScopes=e.targetScopes??[],this.lifetime=e.lifetime??3600,!!!(0,nz.originalOrCamelOptions)(e).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=e.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(e){await this.sourceClient.getAccessToken();let r=`projects/-/serviceAccounts/${this.targetPrincipal}`,n=`${this.endpoint}/v1/${r}:signBlob`,i={delegates:this.delegates,payload:Buffer.from(e).toString("base64")};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:n,data:i,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let e="projects/-/serviceAccounts/"+this.targetPrincipal,r=`${this.endpoint}/v1/${e}:generateAccessToken`,n={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},i=await this.sourceClient.request({...t.RETRY_CONFIG,url:r,data:n,method:"POST"}),s=i.data;return this.credentials.access_token=s.accessToken,this.credentials.expiry_date=Date.parse(s.expireTime),{tokens:this.credentials,res:i}}catch(e){if(!(e instanceof Error))throw e;let r=0,n="";throw e instanceof rz.GaxiosError&&(r=e?.response?.data?.error?.status,n=e?.response?.data?.error?.message),r&&n?(e.message=`${r}: unable to impersonate: ${n}`,e):(e.message=`unable to impersonate: ${e}`,e)}}async fetchIdToken(e,r){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,i=`${this.endpoint}/v1/${n}:generateIdToken`,s={delegates:this.delegates,audience:e,includeEmail:r?.includeEmail??!0,useEmailAzp:r?.includeEmail??!0};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:i,data:s,method:"POST"})).data.token}};di.Impersonated=Bp});var Hp=k(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.OAuthClientAuthHandler=void 0;wa.getErrorFromOAuthErrorResponse=az;var pi=st(),oz=ya(),iz=["PUT","POST","PATCH"],Vp=class{static{o(this,"OAuthClientAuthHandler")}#e=(0,oz.createCrypto)();#t;transporter;constructor(e){e&&"clientId"in e?(this.#t=e,this.transporter=new pi.Gaxios):(this.#t=e?.clientAuthentication,this.transporter=e?.transporter||new pi.Gaxios)}applyClientAuthenticationOptions(e,r){e.headers=pi.Gaxios.mergeHeaders(e.headers),this.injectAuthenticatedHeaders(e,r),r||this.injectAuthenticatedRequestBody(e)}injectAuthenticatedHeaders(e,r){if(r)e.headers=pi.Gaxios.mergeHeaders(e.headers,{authorization:`Bearer ${r}`});else if(this.#t?.confidentialClientType==="basic"){e.headers=pi.Gaxios.mergeHeaders(e.headers);let n=this.#t.clientId,i=this.#t.clientSecret||"",s=this.#e.encodeBase64StringUtf8(`${n}:${i}`);pi.Gaxios.mergeHeaders(e.headers,{authorization:`Basic ${s}`})}}injectAuthenticatedRequestBody(e){if(this.#t?.confidentialClientType==="request-body"){let r=(e.method||"GET").toUpperCase();if(!iz.includes(r))throw new Error(`${r} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let i=new Headers(e.headers).get("content-type");if(i?.startsWith("application/x-www-form-urlencoded")||e.data instanceof URLSearchParams){let s=new URLSearchParams(e.data??"");s.append("client_id",this.#t.clientId),s.append("client_secret",this.#t.clientSecret||""),e.data=s}else if(i?.startsWith("application/json"))e.data=e.data||{},Object.assign(e.data,{client_id:this.#t.clientId,client_secret:this.#t.clientSecret||""});else throw new Error(`${i} content-types are not supported with ${this.#t.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};wa.OAuthClientAuthHandler=Vp;function az(t,e){let r=t.error,n=t.error_description,i=t.error_uri,s=`Error code ${r}`;typeof n<"u"&&(s+=`: ${n}`),typeof i<"u"&&(s+=` - ${i}`);let c=new Error(s);if(e){let d=Object.keys(e);e.stack&&d.push("stack"),d.forEach(l=>{l!=="message"&&Object.defineProperty(c,l,{value:e[l],writable:!1,enumerable:!0})})}return c}o(az,"getErrorFromOAuthErrorResponse")});var Gu=k(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.StsCredentials=void 0;var sz=st(),uz=Ht(),DE=Hp(),cz=vr(),Gp=class t extends DE.OAuthClientAuthHandler{static{o(this,"StsCredentials")}#e;constructor(e={tokenExchangeEndpoint:""},r){(typeof e!="object"||e instanceof URL)&&(e={tokenExchangeEndpoint:e,clientAuthentication:r}),super(e),this.#e=e.tokenExchangeEndpoint}async exchangeToken(e,r,n){let i={grant_type:e.grantType,resource:e.resource,audience:e.audience,scope:e.scope?.join(" "),requested_token_type:e.requestedTokenType,subject_token:e.subjectToken,subject_token_type:e.subjectTokenType,actor_token:e.actingParty?.actorToken,actor_token_type:e.actingParty?.actorTokenType,options:n&&JSON.stringify(n)},s={...t.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:r,data:new URLSearchParams((0,cz.removeUndefinedValuesInObject)(i))};uz.AuthClient.setMethodName(s,"exchangeToken"),this.applyClientAuthenticationOptions(s);try{let c=await this.transporter.request(s),d=c.data;return d.res=c,d}catch(c){throw c instanceof sz.GaxiosError&&c.response?(0,DE.getErrorFromOAuthErrorResponse)(c.response.data,c):c}}};Hu.StsCredentials=Gp});var Bn=k(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.BaseExternalAccountClient=ar.CLOUD_RESOURCE_MANAGER=ar.EXTERNAL_ACCOUNT_TYPE=ar.EXPIRATION_TIME_OFFSET=void 0;var lz=st(),dz=require("stream"),Wp=Ht(),pz=Gu(),UE=vr(),fz=up(),mz="urn:ietf:params:oauth:grant-type:token-exchange",hz="urn:ietf:params:oauth:token-type:access_token",Zp="https://www.googleapis.com/auth/cloud-platform",gz=3600;ar.EXPIRATION_TIME_OFFSET=300*1e3;ar.EXTERNAL_ACCOUNT_TYPE="external_account";ar.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var yz="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",_z="https://sts.{universeDomain}/v1/token",Kp=class t extends Wp.AuthClient{static{o(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(e){super(e);let r=(0,UE.originalOrCamelOptions)(e),n=r.get("type");if(n&&n!==ar.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${ar.EXTERNAL_ACCOUNT_TYPE}" type but received "${e.type}"`);let i=r.get("client_id"),s=r.get("client_secret");this.tokenUrl=r.get("token_url")??_z.replace("{universeDomain}",this.universeDomain);let c=r.get("subject_token_type"),d=r.get("workforce_pool_user_project"),l=r.get("service_account_impersonation_url"),f=r.get("service_account_impersonation"),p=(0,UE.originalOrCamelOptions)(f).get("token_lifetime_seconds");this.cloudResourceManagerURL=new URL(r.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),i&&(this.clientAuth={confidentialClientType:"basic",clientId:i,clientSecret:s}),this.stsCredential=new pz.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=r.get("scopes")||[Zp],this.cachedAccessToken=null,this.audience=r.get("audience"),this.subjectTokenType=c,this.workforcePoolUserProject=d;let _=new RegExp(yz);if(this.workforcePoolUserProject&&!this.audience.match(_))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=l,this.serviceAccountImpersonationLifetime=p,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=gz),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(e){super.setCredentials(e),this.cachedAccessToken=e}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async getProjectId(){let e=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(e){let r=await this.getRequestHeaders(),n={...t.RETRY_CONFIG,headers:r,url:`${this.cloudResourceManagerURL.toString()}${e}`};Wp.AuthClient.setMethodName(n,"getProjectId");let i=await this.transporter.request(n);return this.projectId=i.data.projectId,this.projectId}return null}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=lz.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let c=s.status,d=s.config.data instanceof dz.Readable;if(!r&&(c===401||c===403)&&!d&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){this.#e=this.#e||this.#t();try{return await this.#e}finally{this.#e=null}}async#t(){let e=await this.retrieveSubjectToken(),r={grantType:mz,audience:this.audience,requestedTokenType:hz,subjectToken:e,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[Zp]:this.getScopesArray()},n=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,i=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),s=await this.stsCredential.exchangeToken(r,i,n);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(s.access_token):s.expires_in?this.cachedAccessToken={access_token:s.access_token,expiry_date:new Date().getTime()+s.expires_in*1e3,res:s.res}:this.cachedAccessToken={access_token:s.access_token,res:s.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}getProjectNumber(e){let r=e.match(/\/projects\/([^/]+)/);return r?r[1]:null}async getImpersonatedAccessToken(e){let r={...t.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${e}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};Wp.AuthClient.setMethodName(r,"getImpersonatedAccessToken");let n=await this.transporter.request(r),i=n.data;return{access_token:i.accessToken,expiry_date:new Date(i.expireTime).getTime(),res:n}}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[Zp]}getMetricsHeaderValue(){let e=process.version.replace(/^v/,""),r=this.serviceAccountImpersonationUrl!==void 0,n=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${e} auth/${fz.pkg.version} google-byoid-sdk source/${n} sa-impersonation/${r} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};ar.BaseExternalAccountClient=Kp});var ME=k(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.FileSubjectTokenSupplier=void 0;var Yp=require("util"),Xp=require("fs"),vz=(0,Yp.promisify)(Xp.readFile??(()=>{})),bz=(0,Yp.promisify)(Xp.realpath??(()=>{})),Pz=(0,Yp.promisify)(Xp.lstat??(()=>{})),Jp=class{static{o(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(e){this.filePath=e.filePath,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName}async getSubjectToken(){let e=this.filePath;try{if(e=await bz(e),!(await Pz(e)).isFile())throw new Error}catch(i){throw i instanceof Error&&(i.message=`The file at ${e} does not exist, or it is not a file. ${i.message}`),i}let r,n=await vz(e,{encoding:"utf8"});if(this.formatType==="text"?r=n:this.formatType==="json"&&this.subjectTokenFieldName&&(r=JSON.parse(n)[this.subjectTokenFieldName]),!r)throw new Error("Unable to parse the subject_token from the credential_source file");return r}};Wu.FileSubjectTokenSupplier=Jp});var jE=k(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.UrlSubjectTokenSupplier=void 0;var Sz=Ht(),Qp=class{static{o(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(e){this.url=e.url,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName,this.headers=e.headers,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getSubjectToken(e){let r={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};Sz.AuthClient.setMethodName(r,"getSubjectToken");let n;if(this.formatType==="text"?n=(await e.transporter.request(r)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(n=(await e.transporter.request(r)).data[this.subjectTokenFieldName]),!n)throw new Error("Unable to parse the subject_token from the credential_source URL");return n}};Zu.UrlSubjectTokenSupplier=Qp});var LE=k(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.CertificateSubjectTokenSupplier=Kt.InvalidConfigurationError=Kt.CertificateSourceUnavailableError=Kt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var Ku=vr(),Ju=require("fs"),Yu=require("crypto"),Ez=require("https");Kt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Dr=class extends Error{static{o(this,"CertificateSourceUnavailableError")}constructor(e){super(e),this.name="CertificateSourceUnavailableError"}};Kt.CertificateSourceUnavailableError=Dr;var sr=class extends Error{static{o(this,"InvalidConfigurationError")}constructor(e){super(e),this.name="InvalidConfigurationError"}};Kt.InvalidConfigurationError=sr;var ef=class{static{o(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(e){if(!e.useDefaultCertificateConfig&&!e.certificateConfigLocation)throw new sr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(e.useDefaultCertificateConfig&&e.certificateConfigLocation)throw new sr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=e.trustChainPath,this.certificateConfigPath=e.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new sr("Cannot create mTLS Agent with missing certificate or key");return new Ez.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:e,keyPath:r}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(e,r),await this.#n(this.cert)}async#e(){let e=this.certificateConfigPath;if(e){if(await(0,Ku.isValidFile)(e))return e;throw new Dr(`Provided certificate config path is invalid: ${e}`)}let r=process.env[Kt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(r){if(await(0,Ku.isValidFile)(r))return r;throw new Dr(`Path from environment variable "${Kt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${r}`)}let n=(0,Ku.getWellKnownCertificateConfigFileLocation)();if(await(0,Ku.isValidFile)(n))return n;throw new Dr(`Could not find certificate configuration file. Searched override path, the "${Kt.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${n}).`)}async#t(){let e=this.certificateConfigPath,r;try{r=await Ju.promises.readFile(e,"utf8")}catch{throw new Dr(`Failed to read certificate config file at: ${e}`)}try{let n=JSON.parse(r),i=n?.cert_configs?.workload?.cert_path,s=n?.cert_configs?.workload?.key_path;if(!i||!s)throw new sr(`Certificate config file (${e}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:i,keyPath:s}}catch(n){throw n instanceof sr?n:new sr(`Failed to parse certificate config from ${e}: ${n.message}`)}}async#r(e,r){let n,i;try{n=await Ju.promises.readFile(e),new Yu.X509Certificate(n)}catch(s){let c=s instanceof Error?s.message:String(s);throw new Dr(`Failed to read certificate file at ${e}: ${c}`)}try{i=await Ju.promises.readFile(r),(0,Yu.createPrivateKey)(i)}catch(s){let c=s instanceof Error?s.message:String(s);throw new Dr(`Failed to read private key file at ${r}: ${c}`)}return{cert:n,key:i}}async#n(e){let r=new Yu.X509Certificate(e);if(!this.trustChainPath)return JSON.stringify([r.raw.toString("base64")]);try{let s=((await Ju.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((l,f)=>{try{return new Yu.X509Certificate(l)}catch(p){let _=p instanceof Error?p.message:String(p);throw new sr(`Failed to parse certificate at index ${f} in trust chain file ${this.trustChainPath}: ${_}`)}}),c=s.findIndex(l=>r.raw.equals(l.raw)),d;if(c===-1)d=[r,...s];else if(c===0)d=s;else throw new sr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${c}).`);return JSON.stringify(d.map(l=>l.raw.toString("base64")))}catch(n){if(n instanceof sr)throw n;let i=n instanceof Error?n.message:String(n);throw new Dr(`Failed to process certificate chain from ${this.trustChainPath}: ${i}`)}}};Kt.CertificateSubjectTokenSupplier=ef});var nf=k(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.IdentityPoolClient=void 0;var Tz=Bn(),tf=vr(),xz=ME(),Az=jE(),FE=LE(),wz=Gu(),BE=st(),rf=class t extends Tz.BaseExternalAccountClient{static{o(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(e){super(e);let r=(0,tf.originalOrCamelOptions)(e),n=r.get("credential_source"),i=r.get("subject_token_supplier");if(!n&&!i)throw new Error("A credential source or subject token supplier must be specified.");if(n&&i)throw new Error("Only one of credential source or subject token supplier can be specified.");if(i)this.subjectTokenSupplier=i,this.credentialSourceType="programmatic";else{let s=(0,tf.originalOrCamelOptions)(n),c=(0,tf.originalOrCamelOptions)(s.get("format")),d=c.get("type")||"text",l=c.get("subject_token_field_name");if(d!=="json"&&d!=="text")throw new Error(`Invalid credential_source format "${d}"`);if(d==="json"&&!l)throw new Error("Missing subject_token_field_name for JSON credential_source format");let f=s.get("file"),p=s.get("url"),_=s.get("certificate"),h=s.get("headers");if(f&&p||p&&_||f&&_)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(f)this.credentialSourceType="file",this.subjectTokenSupplier=new xz.FileSubjectTokenSupplier({filePath:f,formatType:d,subjectTokenFieldName:l});else if(p)this.credentialSourceType="url",this.subjectTokenSupplier=new Az.UrlSubjectTokenSupplier({url:p,formatType:d,subjectTokenFieldName:l,headers:h,additionalGaxiosOptions:t.RETRY_CONFIG});else if(_){this.credentialSourceType="certificate";let g=new FE.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:_.use_default_certificate_config,certificateConfigLocation:_.certificate_config_location,trustChainPath:_.trust_chain_path});this.subjectTokenSupplier=g}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let e=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof FE.CertificateSubjectTokenSupplier){let r=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new wz.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new BE.Gaxios({agent:r})}),this.transporter=new BE.Gaxios({...this.transporter.defaults||{},agent:r})}return e}};Xu.IdentityPoolClient=rf});var af=k(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});ec.AwsRequestSigner=void 0;var Qu=st(),VE=ya(),qE="AWS4-HMAC-SHA256",Iz="aws4_request",of=class{static{o(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(e,r){this.getCredentials=e,this.region=r,this.crypto=(0,VE.createCrypto)()}async getRequestOptions(e){if(!e.url)throw new RangeError('"url" is required in "amzOptions"');let r=typeof e.data=="object"?JSON.stringify(e.data):e.data,n=e.url,i=e.method||"GET",s=e.body||r,c=e.headers,d=await this.getCredentials(),l=new URL(n);if(typeof s!="string"&&s!==void 0)throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${s}`);let f=await Oz({crypto:this.crypto,host:l.host,canonicalUri:l.pathname,canonicalQuerystring:l.search.slice(1),method:i,region:this.region,securityCredentials:d,requestPayload:s,additionalAmzHeaders:c}),p=Qu.Gaxios.mergeHeaders(f.amzDate?{"x-amz-date":f.amzDate}:{},{authorization:f.authorizationHeader,host:l.host},c||{});d.token&&Qu.Gaxios.mergeHeaders(p,{"x-amz-security-token":d.token});let _={url:n,method:i,headers:p};return s!==void 0&&(_.body=s),_}};ec.AwsRequestSigner=of;async function Ia(t,e,r){return await t.signWithHmacSha256(e,r)}o(Ia,"sign");async function Rz(t,e,r,n,i){let s=await Ia(t,`AWS4${e}`,r),c=await Ia(t,s,n),d=await Ia(t,c,i);return await Ia(t,d,"aws4_request")}o(Rz,"getSigningKey");async function Oz(t){let e=Qu.Gaxios.mergeHeaders(t.additionalAmzHeaders),r=t.requestPayload||"",n=t.host.split(".")[0],i=new Date,s=i.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),c=i.toISOString().replace(/[-]/g,"").replace(/T.*/,"");t.securityCredentials.token&&e.set("x-amz-security-token",t.securityCredentials.token);let d=Qu.Gaxios.mergeHeaders({host:t.host},e.has("date")?{}:{"x-amz-date":s},e),l="",f=[...d.keys()].sort();f.forEach(N=>{l+=`${N}:${d.get(N)}
41
- `});let p=f.join(";"),_=await t.crypto.sha256DigestHex(r),h=`${t.method.toUpperCase()}
40
+ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,Su="secret must be a string or buffer",Da="key must be a string or a buffer",vq="key must be a string, a buffer or an object",ES=typeof Or.createPublicKey=="function";ES&&(Da+=" or a KeyObject",Su+="or a KeyObject");function X0(t){if(!Ua.isBuffer(t)&&typeof t!="string"&&(!ES||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw Jr(Da)}a(X0,"checkIsPublicKey");function Y0(t){if(!Ua.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw Jr(vq)}a(Y0,"checkIsPrivateKey");function bq(t){if(!Ua.isBuffer(t)){if(typeof t=="string")return t;if(!ES||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw Jr(Su)}}a(bq,"checkIsSecretKey");function PS(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(PS,"fromBase64");function Q0(t){t=t.toString();var e=4-t.length%4;if(e!==4)for(var n=0;n<e;++n)t+="=";return t.replace(/\-/g,"+").replace(/_/g,"/")}a(Q0,"toBase64");function Jr(t){var e=[].slice.call(arguments,1),n=J0.format.bind(J0,t).apply(null,e);return new TypeError(n)}a(Jr,"typeError");function Sq(t){return Ua.isBuffer(t)||typeof t=="string"}a(Sq,"bufferOrString");function Eu(t){return Sq(t)||(t=JSON.stringify(t)),t}a(Eu,"normalizeInput");function e$(t){return a(function(n,o){bq(o),n=Eu(n);var r=Or.createHmac("sha"+t,o),i=(r.update(n),r.digest("base64"));return PS(i)},"sign")}a(e$,"createHmacSigner");var SS,Eq="timingSafeEqual"in Or?a(function(e,n){return e.byteLength!==n.byteLength?!1:Or.timingSafeEqual(e,n)},"timingSafeEqual"):a(function(e,n){return SS||(SS=W0()),SS(e,n)},"timingSafeEqual");function Pq(t){return a(function(n,o,r){var i=e$(t)(n,r);return Eq(Ua.from(o),Ua.from(i))},"verify")}a(Pq,"createHmacVerifier");function t$(t){return a(function(n,o){Y0(o),n=Eu(n);var r=Or.createSign("RSA-SHA"+t),i=(r.update(n),r.sign(o,"base64"));return PS(i)},"sign")}a(t$,"createKeySigner");function r$(t){return a(function(n,o,r){X0(r),n=Eu(n),o=Q0(o);var i=Or.createVerify("RSA-SHA"+t);return i.update(n),i.verify(r,o,"base64")},"verify")}a(r$,"createKeyVerifier");function xq(t){return a(function(n,o){Y0(o),n=Eu(n);var r=Or.createSign("RSA-SHA"+t),i=(r.update(n),r.sign({key:o,padding:Or.constants.RSA_PKCS1_PSS_PADDING,saltLength:Or.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return PS(i)},"sign")}a(xq,"createPSSKeySigner");function Tq(t){return a(function(n,o,r){X0(r),n=Eu(n),o=Q0(o);var i=Or.createVerify("RSA-SHA"+t);return i.update(n),i.verify({key:r,padding:Or.constants.RSA_PKCS1_PSS_PADDING,saltLength:Or.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(Tq,"createPSSKeyVerifier");function Aq(t){var e=t$(t);return a(function(){var o=e.apply(null,arguments);return o=K0.derToJose(o,"ES"+t),o},"sign")}a(Aq,"createECDSASigner");function wq(t){var e=r$(t);return a(function(o,r,i){r=K0.joseToDer(r,"ES"+t).toString("base64");var s=e(o,r,i);return s},"verify")}a(wq,"createECDSAVerifer");function Iq(){return a(function(){return""},"sign")}a(Iq,"createNoneSigner");function Rq(){return a(function(e,n){return n===""},"verify")}a(Rq,"createNoneVerifier");n$.exports=a(function(e){var n={hs:e$,rs:t$,ps:xq,es:Aq,none:Iq},o={hs:Pq,rs:r$,ps:Tq,es:wq,none:Rq},r=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw Jr(_q,e);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var TS=N((zie,o$)=>{var Oq=require("buffer").Buffer;o$.exports=a(function(e){return typeof e=="string"?e:typeof e=="number"||Oq.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var l$=N((Uie,u$)=>{var Cq=ka().Buffer,i$=vS(),$q=xS(),kq=require("stream"),a$=TS(),AS=require("util");function s$(t,e){return Cq.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(s$,"base64url");function Nq(t,e,n){n=n||"utf8";var o=s$(a$(t),"binary"),r=s$(a$(e),n);return AS.format("%s.%s",o,r)}a(Nq,"jwsSecuredInput");function c$(t){var e=t.header,n=t.payload,o=t.secret||t.privateKey,r=t.encoding,i=$q(e.alg),s=Nq(e,n,r),u=i.sign(s,o);return AS.format("%s.%s",s,u)}a(c$,"jwsSign");function tm(t){var e=t.secret;if(e=e??t.privateKey,e=e??t.key,/^hs/i.test(t.header.alg)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new i$(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=n,this.payload=new i$(t.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}a(tm,"SignStream");AS.inherits(tm,kq);tm.prototype.sign=a(function(){try{var e=c$({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"sign");tm.sign=c$;u$.exports=tm});var b$=N((jie,v$)=>{var p$=ka().Buffer,d$=vS(),zq=xS(),Dq=require("stream"),f$=TS(),Uq=require("util"),Mq=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function jq(t){return Object.prototype.toString.call(t)==="[object Object]"}a(jq,"isObject");function Lq(t){if(jq(t))return t;try{return JSON.parse(t)}catch{return}}a(Lq,"safeJsonParse");function m$(t){var e=t.split(".",1)[0];return Lq(p$.from(e,"base64").toString("binary"))}a(m$,"headerFromJWS");function Fq(t){return t.split(".",2).join(".")}a(Fq,"securedInputFromJWS");function h$(t){return t.split(".")[2]}a(h$,"signatureFromJWS");function Bq(t,e){e=e||"utf8";var n=t.split(".")[1];return p$.from(n,"base64").toString(e)}a(Bq,"payloadFromJWS");function g$(t){return Mq.test(t)&&!!m$(t)}a(g$,"isValidJws");function y$(t,e,n){if(!e){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}t=f$(t);var r=h$(t),i=Fq(t),s=zq(e);return s.verify(i,r,n)}a(y$,"jwsVerify");function _$(t,e){if(e=e||{},t=f$(t),!g$(t))return null;var n=m$(t);if(!n)return null;var o=Bq(t);return(n.typ==="JWT"||e.json)&&(o=JSON.parse(o,e.encoding)),{header:n,payload:o,signature:h$(t)}}a(_$,"jwsDecode");function Ma(t){t=t||{};var e=t.secret;if(e=e??t.publicKey,e=e??t.key,/^hs/i.test(t.algorithm)===!0&&e==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new d$(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=n,this.signature=new d$(t.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a(Ma,"VerifyStream");Uq.inherits(Ma,Dq);Ma.prototype.verify=a(function(){try{var e=y$(this.signature.buffer,this.algorithm,this.key.buffer),n=_$(this.signature.buffer,this.encoding);return this.emit("done",e,n),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(o){this.readable=!1,this.emit("error",o),this.emit("close")}},"verify");Ma.decode=_$;Ma.isValid=g$;Ma.verify=y$;v$.exports=Ma});var wS=N(To=>{var S$=l$(),rm=b$(),qq=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];To.ALGORITHMS=qq;To.sign=S$.sign;To.verify=rm.verify;To.decode=rm.decode;To.isValid=rm.isValid;To.createSign=a(function(e){return new S$(e)},"createSign");To.createVerify=a(function(e){return new rm(e)},"createVerify")});var D$=N(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.GoogleToken=void 0;var E$=nm(require("fs")),Vq=gt(),Zq=nm(wS()),Hq=nm(require("path")),Gq=require("util");function nm(t,e){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(nm=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,l,p={__proto__:null,default:i};if(i===null||Mn(i)!="object"&&typeof i!="function")return p;if(u=s?o:n){if(u.has(i))return u.get(i);u.set(i,p)}for(var f in i)f!=="default"&&{}.hasOwnProperty.call(i,f)&&((l=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,f))&&(l.get||l.set)?u(p,f,l):p[f]=i[f]);return p},"_interopRequireWildcard"))(t,e)}a(nm,"_interopRequireWildcard");function Mn(t){"@babel/helpers - typeof";return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mn(t)}a(Mn,"_typeof");function Wq(t,e){C$(t,e),e.add(t)}a(Wq,"_classPrivateMethodInitSpec");function Jq(t,e,n){C$(t,e),e.set(t,n)}a(Jq,"_classPrivateFieldInitSpec");function C$(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(C$,"_checkPrivateRedeclaration");function P$(t,e,n){return t.set(Kr(t,e),n),n}a(P$,"_classPrivateFieldSet");function x$(t,e){return t.get(Kr(t,e))}a(x$,"_classPrivateFieldGet");function Kr(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}a(Kr,"_assertClassBrand");function T$(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,N$(o.key),o)}}a(T$,"_defineProperties");function $$(t,e,n){return e&&T$(t.prototype,e),n&&T$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}a($$,"_createClass");function k$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}a(k$,"_classCallCheck");function Kq(t,e,n){return e=Au(e),Xq(t,kS()?Reflect.construct(e,n||[],Au(t).constructor):e.apply(t,n))}a(Kq,"_callSuper");function Xq(t,e){if(e&&(Mn(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yq(t)}a(Xq,"_possibleConstructorReturn");function Yq(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}a(Yq,"_assertThisInitialized");function Qq(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tu(t,e)}a(Qq,"_inherits");function IS(t){var e=typeof Map=="function"?new Map:void 0;return IS=a(function(o){if(o===null||!t2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(o))return e.get(o);e.set(o,r)}function r(){return e2(o,arguments,Au(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Tu(r,o)},"_wrapNativeSuper"),IS(t)}a(IS,"_wrapNativeSuper");function e2(t,e,n){if(kS())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var r=new(t.bind.apply(t,o));return n&&Tu(r,n.prototype),r}a(e2,"_construct");function kS(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kS=a(function(){return!!t},"_isNativeReflectConstruct"))()}a(kS,"_isNativeReflectConstruct");function t2(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}a(t2,"_isNativeFunction");function Tu(t,e){return Tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Tu(t,e)}a(Tu,"_setPrototypeOf");function Au(t){return Au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Au(t)}a(Au,"_getPrototypeOf");function hr(t,e,n){return(e=N$(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}a(hr,"_defineProperty");function N$(t){var e=r2(t,"string");return Mn(e)=="symbol"?e:e+""}a(N$,"_toPropertyKey");function r2(t,e){if(Mn(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e||"default");if(Mn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}a(r2,"_toPrimitive");function yr(){var t,e,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(h,_,E,P){var x=_&&_.prototype instanceof u?_:u,z=Object.create(x.prototype);return gr(z,"_invoke",(function(M,K,Z){var J,ee,ae,Y=0,ze=Z||[],se=!1,G={p:0,n:0,v:t,a:H,f:H.bind(t,4),d:a(function(X,ue){return J=X,ee=0,ae=t,G.n=ue,s},"d")};function H(re,X){for(ee=re,ae=X,e=0;!se&&Y&&!ue&&e<ze.length;e++){var ue,de=ze[e],Ce=G.p,De=de[2];re>3?(ue=De===X)&&(ae=de[(ee=de[4])?5:(ee=3,3)],de[4]=de[5]=t):de[0]<=Ce&&((ue=re<2&&Ce<de[1])?(ee=0,G.v=X,G.n=de[1]):Ce<De&&(ue=re<3||de[0]>X||X>De)&&(de[4]=re,de[5]=X,G.n=De,ee=0))}if(ue||re>1)return s;throw se=!0,X}return a(H,"d"),function(re,X,ue){if(Y>1)throw TypeError("Generator is already running");for(se&&X===1&&H(X,ue),ee=X,ae=ue;(e=ee<2?t:ae)||!se;){J||(ee?ee<3?(ee>1&&(G.n=-1),H(ee,ae)):G.n=ae:G.v=ae);try{if(Y=2,J){if(ee||(re="next"),e=J[re]){if(!(e=e.call(J,ae)))throw TypeError("iterator result is not an object");if(!e.done)return e;ae=e.value,ee<2&&(ee=0)}else ee===1&&(e=J.return)&&e.call(J),ee<2&&(ae=TypeError("The iterator does not provide a '"+re+"' method"),ee=1);J=t}else if((e=(se=G.n<0)?ae:M.call(K,G))!==s)break}catch(de){J=t,ee=1,ae=de}finally{Y=1}}return{value:e,done:se}}})(h,E,P),!0),z}a(i,"i");var s={};function u(){}a(u,"Generator");function l(){}a(l,"GeneratorFunction");function p(){}a(p,"GeneratorFunctionPrototype"),e=Object.getPrototypeOf;var f=[][o]?e(e([][o]())):(gr(e={},o,function(){return this}),e),y=p.prototype=u.prototype=Object.create(f);function m(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,p):(h.__proto__=p,gr(h,r,"GeneratorFunction")),h.prototype=Object.create(y),h}return a(m,"f"),l.prototype=p,gr(y,"constructor",p),gr(p,"constructor",l),l.displayName="GeneratorFunction",gr(p,r,"GeneratorFunction"),gr(y),gr(y,r,"Generator"),gr(y,o,function(){return this}),gr(y,"toString",function(){return"[object Generator]"}),(yr=a(function(){return{w:i,m}},"_regenerator"))()}a(yr,"_regenerator");function gr(t,e,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}gr=a(function(s,u,l,p){if(u)r?r(s,u,{value:l,enumerable:!p,configurable:!p,writable:!p}):s[u]=l;else{var f=a(function(m,h){gr(s,m,function(_){return this._invoke(m,h,_)})},"o");f("next",0),f("throw",1),f("return",2)}},"_regeneratorDefine"),gr(t,e,n,o)}a(gr,"_regeneratorDefine2");function A$(t,e,n,o,r,i,s){try{var u=t[i](s),l=u.value}catch(p){return void n(p)}u.done?e(l):Promise.resolve(l).then(o,r)}a(A$,"asyncGeneratorStep");function ja(t){return function(){var e=this,n=arguments;return new Promise(function(o,r){var i=t.apply(e,n);function s(l){A$(i,o,r,s,u,"next",l)}a(s,"_next");function u(l){A$(i,o,r,s,u,"throw",l)}a(u,"_throw"),s(void 0)})}}a(ja,"_asyncToGenerator");var w$=E$.readFile?(0,Gq.promisify)(E$.readFile):ja(yr().m(a(function t(){return yr().w(function(e){for(;;)switch(e.n){case 0:throw new xu("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}},t)},"_callee"))),I$="https://oauth2.googleapis.com/token",n2="https://oauth2.googleapis.com/revoke?token=",xu=(function(t){function e(n,o){var r;return k$(this,e),r=Kq(this,e,[n]),hr(r,"code",void 0),r.code=o,r}return a(e,"ErrorWithCode"),Qq(e,t),$$(e)})(IS(Error)),Pu=new WeakMap,un=new WeakSet,qie=om.GoogleToken=(function(){function t(e){k$(this,t),Wq(this,un),hr(this,"expiresAt",void 0),hr(this,"key",void 0),hr(this,"keyFile",void 0),hr(this,"iss",void 0),hr(this,"sub",void 0),hr(this,"scope",void 0),hr(this,"rawToken",void 0),hr(this,"tokenExpires",void 0),hr(this,"email",void 0),hr(this,"additionalClaims",void 0),hr(this,"eagerRefreshThresholdMillis",void 0),hr(this,"transporter",{request:a(function(o){return(0,Vq.request)(o)},"request")}),Jq(this,Pu,void 0),Kr(un,this,z$).call(this,e)}return a(t,"GoogleToken"),$$(t,[{key:"accessToken",get:a(function(){return this.rawToken?this.rawToken.access_token:void 0},"get")},{key:"idToken",get:a(function(){return this.rawToken?this.rawToken.id_token:void 0},"get")},{key:"tokenType",get:a(function(){return this.rawToken?this.rawToken.token_type:void 0},"get")},{key:"refreshToken",get:a(function(){return this.rawToken?this.rawToken.refresh_token:void 0},"get")},{key:"hasExpired",value:a(function(){var n=new Date().getTime();return this.rawToken&&this.expiresAt?n>=this.expiresAt:!0},"hasExpired")},{key:"isTokenExpiring",value:a(function(){var n,o=new Date().getTime(),r=(n=this.eagerRefreshThresholdMillis)!==null&&n!==void 0?n:0;return this.rawToken&&this.expiresAt?this.expiresAt<=o+r:!0},"isTokenExpiring")},{key:"getToken",value:a(function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Mn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;Kr(un,this,R$).call(this,o).then(function(i){return r(null,i)},n);return}return Kr(un,this,R$).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var e=ja(yr().m(a(function o(r){var i,s,u,l,p,f,y;return yr().w(function(m){for(;;)switch(m.n){case 0:i=Hq.extname(r),y=i,m.n=y===".json"?1:y===".der"||y===".crt"||y===".pem"?4:y===".p12"||y===".pfx"?6:7;break;case 1:return m.n=2,w$(r,"utf8");case 2:if(s=m.v,u=JSON.parse(s),l=u.private_key,p=u.client_email,!(!l||!p)){m.n=3;break}throw new xu("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return m.a(2,{privateKey:l,clientEmail:p});case 4:return m.n=5,w$(r,"utf8");case 5:return f=m.v,m.a(2,{privateKey:f});case 6:throw new xu("*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new xu("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return m.a(2)}},o)},"_callee2")));function n(o){return e.apply(this,arguments)}return a(n,"getCredentials"),n})()},{key:"revokeToken",value:a(function(n){if(n){Kr(un,this,O$).call(this).then(function(){return n()},n);return}return Kr(un,this,O$).call(this)},"revokeToken")}])})();function R$(t){return RS.apply(this,arguments)}a(R$,"_getTokenAsync");function RS(){return RS=ja(yr().m(a(function t(e){return yr().w(function(n){for(;;)switch(n.n){case 0:if(!(x$(Pu,this)&&!e.forceRefresh)){n.n=1;break}return n.a(2,x$(Pu,this));case 1:return n.p=1,n.n=2,P$(Pu,this,Kr(un,this,o2).call(this,e));case 2:return n.a(2,n.v);case 3:return n.p=3,P$(Pu,this,void 0),n.f(3);case 4:return n.a(2)}},t,this,[[1,,3,4]])},"_callee3"))),RS.apply(this,arguments)}a(RS,"_getTokenAsync2");function o2(t){return OS.apply(this,arguments)}a(o2,"_getTokenAsyncInner");function OS(){return OS=ja(yr().m(a(function t(e){var n;return yr().w(function(o){for(;;)switch(o.n){case 0:if(!(this.isTokenExpiring()===!1&&e.forceRefresh===!1)){o.n=1;break}return o.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){o.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){o.n=4;break}return o.n=3,this.getCredentials(this.keyFile);case 3:n=o.v,this.key=n.privateKey,this.iss=n.clientEmail||this.iss,n.clientEmail||Kr(un,this,i2).call(this);case 4:return o.a(2,Kr(un,this,a2).call(this))}},t,this)},"_callee4"))),OS.apply(this,arguments)}a(OS,"_getTokenAsyncInner2");function i2(){if(!this.iss)throw new xu("email is required.","MISSING_CREDENTIALS")}a(i2,"_ensureEmail");function O$(){return CS.apply(this,arguments)}a(O$,"_revokeTokenAsync");function CS(){return CS=ja(yr().m(a(function t(){var e;return yr().w(function(n){for(;;)switch(n.n){case 0:if(this.accessToken){n.n=1;break}throw new Error("No token to revoke.");case 1:return e=n2+this.accessToken,n.n=2,this.transporter.request({url:e,retry:!0});case 2:Kr(un,this,z$).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return n.a(2)}},t,this)},"_callee5"))),CS.apply(this,arguments)}a(CS,"_revokeTokenAsync2");function z$(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=t.keyFile,this.key=t.key,this.rawToken=void 0,this.iss=t.email||t.iss,this.sub=t.sub,this.additionalClaims=t.additionalClaims,Mn(t.scope)==="object"?this.scope=t.scope.join(" "):this.scope=t.scope,this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,t.transporter&&(this.transporter=t.transporter)}a(z$,"_configure");function a2(){return $S.apply(this,arguments)}a(a2,"_requestToken");function $S(){return $S=ja(yr().m(a(function t(){var e,n,o,r,i,s,u,l,p,f;return yr().w(function(y){for(;;)switch(y.n){case 0:return e=Math.floor(new Date().getTime()/1e3),n=this.additionalClaims||{},o=Object.assign({iss:this.iss,scope:this.scope,aud:I$,exp:e+3600,iat:e,sub:this.sub},n),r=Zq.sign({header:{alg:"RS256"},payload:o,secret:this.key}),y.p=1,y.n=2,this.transporter.request({method:"POST",url:I$,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return i=y.v,this.rawToken=i.data,this.expiresAt=i.data.expires_in===null||i.data.expires_in===void 0?void 0:(e+i.data.expires_in)*1e3,y.a(2,this.rawToken);case 3:throw y.p=3,f=y.v,this.rawToken=void 0,this.tokenExpires=void 0,l=f.response&&(s=f.response)!==null&&s!==void 0&&s.data?(u=f.response)===null||u===void 0?void 0:u.data:{},l.error&&(p=l.error_description?": ".concat(l.error_description):"",f.message="".concat(l.error).concat(p)),f;case 4:return y.a(2)}},t,this,[[1,3]])},"_callee6"))),$S.apply(this,arguments)}a($S,"_requestToken2")});var zS=N(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.JWTAccess=void 0;var s2=wS(),c2=Gr(),U$={alg:"RS256",typ:"JWT"},NS=class t{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new c2.LRUCache({capacity:500,maxAge:3600*1e3});constructor(e,n,o,r){this.email=e,this.key=n,this.keyId=o,this.eagerRefreshThresholdMillis=r??300*1e3}getCachedKey(e,n){let o=e;if(n&&Array.isArray(n)&&n.length?o=e?`${e}_${n.join("_")}`:`${n.join("_")}`:typeof n=="string"&&(o=e?`${e}_${n}`:n),!o)throw Error("Scopes or url must be provided");return o}getRequestHeaders(e,n,o){let r=this.getCachedKey(e,o),i=this.cache.get(r),s=Date.now();if(i&&i.expiration-s>this.eagerRefreshThresholdMillis)return new Headers(i.headers);let u=Math.floor(Date.now()/1e3),l=t.getExpirationTime(u),p;if(Array.isArray(o)&&(o=o.join(" ")),o?p={iss:this.email,sub:this.email,scope:o,exp:l,iat:u}:p={iss:this.email,sub:this.email,aud:e,exp:l,iat:u},n){for(let _ in p)if(n[_])throw new Error(`The '${_}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let f=this.keyId?{...U$,kid:this.keyId}:U$,y=Object.assign(p,n),m=s2.sign({header:f,payload:y,secret:this.key}),h=new Headers({authorization:`Bearer ${m}`});return this.cache.set(r,{expiration:l*1e3,headers:h}),h}static getExpirationTime(e){return e+3600}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id}fromStream(e,n){if(n)this.fromStreamAsync(e).then(()=>n(),n);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((n,o)=>{e||o(new Error("Must pass in a stream containing the service account auth settings."));let r="";e.setEncoding("utf8").on("data",i=>r+=i).on("error",o).on("end",()=>{try{let i=JSON.parse(r);this.fromJSON(i),n()}catch(i){o(i)}})})}};im.JWTAccess=NS});var US=N(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.JWT=void 0;var M$=D$(),u2=zS(),l2=hi(),am=mr(),DS=class t extends l2.OAuth2Client{static{a(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(e={}){super(e),this.email=e.email,this.keyFile=e.keyFile,this.key=e.key,this.keyId=e.keyId,this.scopes=e.scopes,this.subject=e.subject,this.additionalClaims=e.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(e){let n=new t(this);return n.scopes=e,n}async getRequestMetadataAsync(e){e=this.defaultServicePath?`https://${this.defaultServicePath}/`:e;let n=!this.hasUserScopes()&&e||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==am.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==am.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${am.DEFAULT_UNIVERSE}`);if(!this.apiKey&&n)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:o}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${o.id_token}`}))}}else{this.access||(this.access=new u2.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let o;this.hasUserScopes()?o=this.scopes:e||(o=this.defaultScopes);let r=this.useJWTAccessWithScope||this.universeDomain!==am.DEFAULT_UNIVERSE,i=await this.access.getRequestHeaders(e??void 0,this.additionalClaims,r?o:void 0);return{headers:this.addSharedMetadataHeaders(i)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(e):{headers:new Headers}}async fetchIdToken(e){let n=new M$.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:e},transporter:this.transporter});if(await n.getToken({forceRefresh:!0}),!n.idToken)throw new Error("Unknown error: Failed to fetch ID token");return n.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(e){if(e)this.authorizeAsync().then(n=>e(null,n),e);else return this.authorizeAsync()}async authorizeAsync(){let e=await this.refreshToken();if(!e)throw new Error("No result returned");return this.credentials=e.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,e.tokens}async refreshTokenNoCache(){let e=this.createGToken(),o={access_token:(await e.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:e.expiresAt,id_token:e.idToken};return this.emit("tokens",o),{res:null,tokens:o}}createGToken(){return this.gtoken||(this.gtoken=new M$.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!e.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!e.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,n){if(n)this.fromStreamAsync(e).then(()=>n(),n);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((n,o)=>{if(!e)throw new Error("Must pass in a stream containing the service account auth settings.");let r="";e.setEncoding("utf8").on("error",o).on("data",i=>r+=i).on("end",()=>{try{let i=JSON.parse(r);this.fromJSON(i),n()}catch(i){o(i)}})})}fromAPIKey(e){if(typeof e!="string")throw new Error("Must provide an API Key string.");this.apiKey=e}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){let n=await this.createGToken().getCredentials(this.keyFile);return{private_key:n.privateKey,client_email:n.clientEmail}}throw new Error("A key or a keyFile must be provided to getCredentials.")}};sm.JWT=DS});var jS=N(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.UserRefreshClient=La.USER_REFRESH_ACCOUNT_TYPE=void 0;var d2=hi(),p2=mr();La.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var MS=class t extends d2.OAuth2Client{static{a(this,"UserRefreshClient")}_refreshToken;constructor(e,n,o,r,i){let s=e&&typeof e=="object"?e:{clientId:e,clientSecret:n,refreshToken:o,eagerRefreshThresholdMillis:r,forceRefreshOnFailure:i};super(s),this._refreshToken=s.refreshToken,this.credentials.refresh_token=s.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(e){let n={...t.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:"POST",data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token",refresh_token:this._refreshToken,target_audience:e})};return p2.AuthClient.setMethodName(n,"fetchIdToken"),(await this.transporter.request(n)).data.id_token}fromJSON(e){if(!e)throw new Error("Must pass in a JSON object containing the user refresh token");if(e.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!e.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!e.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!e.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=e.client_id,this._clientSecret=e.client_secret,this._refreshToken=e.refresh_token,this.credentials.refresh_token=e.refresh_token,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,n){if(n)this.fromStreamAsync(e).then(()=>n(),n);else return this.fromStreamAsync(e)}async fromStreamAsync(e){return new Promise((n,o)=>{if(!e)return o(new Error("Must pass in a stream containing the user refresh token."));let r="";e.setEncoding("utf8").on("error",o).on("data",i=>r+=i).on("end",()=>{try{let i=JSON.parse(r);return this.fromJSON(i),n()}catch(i){return o(i)}})})}static fromJSON(e){let n=new t;return n.fromJSON(e),n}};La.UserRefreshClient=MS});var FS=N(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.Impersonated=Fa.IMPERSONATED_ACCOUNT_TYPE=void 0;var j$=hi(),f2=gt(),m2=Gr();Fa.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var LS=class t extends j$.OAuth2Client{static{a(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(e={}){if(super(e),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=e.sourceClient??new j$.OAuth2Client,this.targetPrincipal=e.targetPrincipal??"",this.delegates=e.delegates??[],this.targetScopes=e.targetScopes??[],this.lifetime=e.lifetime??3600,!!!(0,m2.originalOrCamelOptions)(e).get("universe_domain"))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=e.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(e){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,o=`${this.endpoint}/v1/${n}:signBlob`,r={delegates:this.delegates,payload:Buffer.from(e).toString("base64")};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:o,data:r,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let e="projects/-/serviceAccounts/"+this.targetPrincipal,n=`${this.endpoint}/v1/${e}:generateAccessToken`,o={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},r=await this.sourceClient.request({...t.RETRY_CONFIG,url:n,data:o,method:"POST"}),i=r.data;return this.credentials.access_token=i.accessToken,this.credentials.expiry_date=Date.parse(i.expireTime),{tokens:this.credentials,res:r}}catch(e){if(!(e instanceof Error))throw e;let n=0,o="";throw e instanceof f2.GaxiosError&&(n=e?.response?.data?.error?.status,o=e?.response?.data?.error?.message),n&&o?(e.message=`${n}: unable to impersonate: ${o}`,e):(e.message=`unable to impersonate: ${e}`,e)}}async fetchIdToken(e,n){await this.sourceClient.getAccessToken();let o=`projects/-/serviceAccounts/${this.targetPrincipal}`,r=`${this.endpoint}/v1/${o}:generateIdToken`,i={delegates:this.delegates,audience:e,includeEmail:n?.includeEmail??!0,useEmailAzp:n?.includeEmail??!0};return(await this.sourceClient.request({...t.RETRY_CONFIG,url:r,data:i,method:"POST"})).data.token}};Fa.Impersonated=LS});var qS=N(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.OAuthClientAuthHandler=void 0;wu.getErrorFromOAuthErrorResponse=y2;var Ba=gt(),h2=yu(),g2=["PUT","POST","PATCH"],BS=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,h2.createCrypto)();#t;transporter;constructor(e){e&&"clientId"in e?(this.#t=e,this.transporter=new Ba.Gaxios):(this.#t=e?.clientAuthentication,this.transporter=e?.transporter||new Ba.Gaxios)}applyClientAuthenticationOptions(e,n){e.headers=Ba.Gaxios.mergeHeaders(e.headers),this.injectAuthenticatedHeaders(e,n),n||this.injectAuthenticatedRequestBody(e)}injectAuthenticatedHeaders(e,n){if(n)e.headers=Ba.Gaxios.mergeHeaders(e.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){e.headers=Ba.Gaxios.mergeHeaders(e.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);Ba.Gaxios.mergeHeaders(e.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(e){if(this.#t?.confidentialClientType==="request-body"){let n=(e.method||"GET").toUpperCase();if(!g2.includes(n))throw new Error(`${n} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let r=new Headers(e.headers).get("content-type");if(r?.startsWith("application/x-www-form-urlencoded")||e.data instanceof URLSearchParams){let i=new URLSearchParams(e.data??"");i.append("client_id",this.#t.clientId),i.append("client_secret",this.#t.clientSecret||""),e.data=i}else if(r?.startsWith("application/json"))e.data=e.data||{},Object.assign(e.data,{client_id:this.#t.clientId,client_secret:this.#t.clientSecret||""});else throw new Error(`${r} content-types are not supported with ${this.#t.confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};wu.OAuthClientAuthHandler=BS;function y2(t,e){let n=t.error,o=t.error_description,r=t.error_uri,i=`Error code ${n}`;typeof o<"u"&&(i+=`: ${o}`),typeof r<"u"&&(i+=` - ${r}`);let s=new Error(i);if(e){let u=Object.keys(e);e.stack&&u.push("stack"),u.forEach(l=>{l!=="message"&&Object.defineProperty(s,l,{value:e[l],writable:!1,enumerable:!0})})}return s}a(y2,"getErrorFromOAuthErrorResponse")});var um=N(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.StsCredentials=void 0;var _2=gt(),v2=mr(),L$=qS(),b2=Gr(),VS=class t extends L$.OAuthClientAuthHandler{static{a(this,"StsCredentials")}#e;constructor(e={tokenExchangeEndpoint:""},n){(typeof e!="object"||e instanceof URL)&&(e={tokenExchangeEndpoint:e,clientAuthentication:n}),super(e),this.#e=e.tokenExchangeEndpoint}async exchangeToken(e,n,o){let r={grant_type:e.grantType,resource:e.resource,audience:e.audience,scope:e.scope?.join(" "),requested_token_type:e.requestedTokenType,subject_token:e.subjectToken,subject_token_type:e.subjectTokenType,actor_token:e.actingParty?.actorToken,actor_token_type:e.actingParty?.actorTokenType,options:o&&JSON.stringify(o)},i={...t.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:n,data:new URLSearchParams((0,b2.removeUndefinedValuesInObject)(r))};v2.AuthClient.setMethodName(i,"exchangeToken"),this.applyClientAuthenticationOptions(i);try{let s=await this.transporter.request(i),u=s.data;return u.res=s,u}catch(s){throw s instanceof _2.GaxiosError&&s.response?(0,L$.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};cm.StsCredentials=VS});var Ao=N(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.BaseExternalAccountClient=Cr.CLOUD_RESOURCE_MANAGER=Cr.EXTERNAL_ACCOUNT_TYPE=Cr.EXPIRATION_TIME_OFFSET=void 0;var S2=gt(),E2=require("stream"),ZS=mr(),P2=um(),F$=Gr(),x2=aS(),T2="urn:ietf:params:oauth:grant-type:token-exchange",A2="urn:ietf:params:oauth:token-type:access_token",HS="https://www.googleapis.com/auth/cloud-platform",w2=3600;Cr.EXPIRATION_TIME_OFFSET=300*1e3;Cr.EXTERNAL_ACCOUNT_TYPE="external_account";Cr.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var I2="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",R2="https://sts.{universeDomain}/v1/token",GS=class t extends ZS.AuthClient{static{a(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(e){super(e);let n=(0,F$.originalOrCamelOptions)(e),o=n.get("type");if(o&&o!==Cr.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${Cr.EXTERNAL_ACCOUNT_TYPE}" type but received "${e.type}"`);let r=n.get("client_id"),i=n.get("client_secret");this.tokenUrl=n.get("token_url")??R2.replace("{universeDomain}",this.universeDomain);let s=n.get("subject_token_type"),u=n.get("workforce_pool_user_project"),l=n.get("service_account_impersonation_url"),p=n.get("service_account_impersonation"),f=(0,F$.originalOrCamelOptions)(p).get("token_lifetime_seconds");this.cloudResourceManagerURL=new URL(n.get("cloud_resource_manager_url")||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),r&&(this.clientAuth={confidentialClientType:"basic",clientId:r,clientSecret:i}),this.stsCredential=new P2.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[HS],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let y=new RegExp(I2);if(this.workforcePoolUserProject&&!this.audience.match(y))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=l,this.serviceAccountImpersonationLifetime=f,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=w2),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(e){super.setCredentials(e),this.cachedAccessToken=e}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(n)}request(e,n){if(n)this.requestAsync(e).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(e)}async getProjectId(){let e=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(e){let n=await this.getRequestHeaders(),o={...t.RETRY_CONFIG,headers:n,url:`${this.cloudResourceManagerURL.toString()}${e}`};ZS.AuthClient.setMethodName(o,"getProjectId");let r=await this.transporter.request(o);return this.projectId=r.data.projectId,this.projectId}return null}async requestAsync(e,n=!1){let o;try{let r=await this.getRequestHeaders();e.headers=S2.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,r),o=await this.transporter.request(e)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof E2.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw r}return o}async refreshAccessTokenAsync(){this.#e=this.#e||this.#t();try{return await this.#e}finally{this.#e=null}}async#t(){let e=await this.retrieveSubjectToken(),n={grantType:T2,audience:this.audience,requestedTokenType:A2,subjectToken:e,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[HS]:this.getScopesArray()},o=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,r=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),i=await this.stsCredential.exchangeToken(n,r,o);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(i.access_token):i.expires_in?this.cachedAccessToken={access_token:i.access_token,expiry_date:new Date().getTime()+i.expires_in*1e3,res:i.res}:this.cachedAccessToken={access_token:i.access_token,res:i.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedAccessToken}getProjectNumber(e){let n=e.match(/\/projects\/([^/]+)/);return n?n[1]:null}async getImpersonatedAccessToken(e){let n={...t.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${e}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};ZS.AuthClient.setMethodName(n,"getImpersonatedAccessToken");let o=await this.transporter.request(n),r=o.data;return{access_token:r.accessToken,expiry_date:new Date(r.expireTime).getTime(),res:o}}isExpired(e){let n=new Date().getTime();return e.expiry_date?n>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[HS]}getMetricsHeaderValue(){let e=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${e} auth/${x2.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};Cr.BaseExternalAccountClient=GS});var B$=N(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.FileSubjectTokenSupplier=void 0;var JS=require("util"),KS=require("fs"),O2=(0,JS.promisify)(KS.readFile??(()=>{})),C2=(0,JS.promisify)(KS.realpath??(()=>{})),$2=(0,JS.promisify)(KS.lstat??(()=>{})),WS=class{static{a(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(e){this.filePath=e.filePath,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName}async getSubjectToken(){let e=this.filePath;try{if(e=await C2(e),!(await $2(e)).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${e} does not exist, or it is not a file. ${r.message}`),r}let n,o=await O2(e,{encoding:"utf8"});if(this.formatType==="text"?n=o:this.formatType==="json"&&this.subjectTokenFieldName&&(n=JSON.parse(o)[this.subjectTokenFieldName]),!n)throw new Error("Unable to parse the subject_token from the credential_source file");return n}};lm.FileSubjectTokenSupplier=WS});var q$=N(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.UrlSubjectTokenSupplier=void 0;var k2=mr(),XS=class{static{a(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(e){this.url=e.url,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName,this.headers=e.headers,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getSubjectToken(e){let n={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};k2.AuthClient.setMethodName(n,"getSubjectToken");let o;if(this.formatType==="text"?o=(await e.transporter.request(n)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(o=(await e.transporter.request(n)).data[this.subjectTokenFieldName]),!o)throw new Error("Unable to parse the subject_token from the credential_source URL");return o}};dm.UrlSubjectTokenSupplier=XS});var V$=N(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.CertificateSubjectTokenSupplier=_r.InvalidConfigurationError=_r.CertificateSourceUnavailableError=_r.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var pm=Gr(),fm=require("fs"),mm=require("crypto"),N2=require("https");_r.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var ln=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(e){super(e),this.name="CertificateSourceUnavailableError"}};_r.CertificateSourceUnavailableError=ln;var $r=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(e){super(e),this.name="InvalidConfigurationError"}};_r.InvalidConfigurationError=$r;var YS=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(e){if(!e.useDefaultCertificateConfig&&!e.certificateConfigLocation)throw new $r("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(e.useDefaultCertificateConfig&&e.certificateConfigLocation)throw new $r("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=e.trustChainPath,this.certificateConfigPath=e.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new $r("Cannot create mTLS Agent with missing certificate or key");return new N2.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:e,keyPath:n}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(e,n),await this.#n(this.cert)}async#e(){let e=this.certificateConfigPath;if(e){if(await(0,pm.isValidFile)(e))return e;throw new ln(`Provided certificate config path is invalid: ${e}`)}let n=process.env[_r.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,pm.isValidFile)(n))return n;throw new ln(`Path from environment variable "${_r.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,pm.getWellKnownCertificateConfigFileLocation)();if(await(0,pm.isValidFile)(o))return o;throw new ln(`Could not find certificate configuration file. Searched override path, the "${_r.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let e=this.certificateConfigPath,n;try{n=await fm.promises.readFile(e,"utf8")}catch{throw new ln(`Failed to read certificate config file at: ${e}`)}try{let o=JSON.parse(n),r=o?.cert_configs?.workload?.cert_path,i=o?.cert_configs?.workload?.key_path;if(!r||!i)throw new $r(`Certificate config file (${e}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:r,keyPath:i}}catch(o){throw o instanceof $r?o:new $r(`Failed to parse certificate config from ${e}: ${o.message}`)}}async#r(e,n){let o,r;try{o=await fm.promises.readFile(e),new mm.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new ln(`Failed to read certificate file at ${e}: ${s}`)}try{r=await fm.promises.readFile(n),(0,mm.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new ln(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(e){let n=new mm.X509Certificate(e);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await fm.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((l,p)=>{try{return new mm.X509Certificate(l)}catch(f){let y=f instanceof Error?f.message:String(f);throw new $r(`Failed to parse certificate at index ${p} in trust chain file ${this.trustChainPath}: ${y}`)}}),s=i.findIndex(l=>n.raw.equals(l.raw)),u;if(s===-1)u=[n,...i];else if(s===0)u=i;else throw new $r(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${s}).`);return JSON.stringify(u.map(l=>l.raw.toString("base64")))}catch(o){if(o instanceof $r)throw o;let r=o instanceof Error?o.message:String(o);throw new ln(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};_r.CertificateSubjectTokenSupplier=YS});var tE=N(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});hm.IdentityPoolClient=void 0;var z2=Ao(),QS=Gr(),D2=B$(),U2=q$(),Z$=V$(),M2=um(),H$=gt(),eE=class t extends z2.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(e){super(e);let n=(0,QS.originalOrCamelOptions)(e),o=n.get("credential_source"),r=n.get("subject_token_supplier");if(!o&&!r)throw new Error("A credential source or subject token supplier must be specified.");if(o&&r)throw new Error("Only one of credential source or subject token supplier can be specified.");if(r)this.subjectTokenSupplier=r,this.credentialSourceType="programmatic";else{let i=(0,QS.originalOrCamelOptions)(o),s=(0,QS.originalOrCamelOptions)(i.get("format")),u=s.get("type")||"text",l=s.get("subject_token_field_name");if(u!=="json"&&u!=="text")throw new Error(`Invalid credential_source format "${u}"`);if(u==="json"&&!l)throw new Error("Missing subject_token_field_name for JSON credential_source format");let p=i.get("file"),f=i.get("url"),y=i.get("certificate"),m=i.get("headers");if(p&&f||f&&y||p&&y)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(p)this.credentialSourceType="file",this.subjectTokenSupplier=new D2.FileSubjectTokenSupplier({filePath:p,formatType:u,subjectTokenFieldName:l});else if(f)this.credentialSourceType="url",this.subjectTokenSupplier=new U2.UrlSubjectTokenSupplier({url:f,formatType:u,subjectTokenFieldName:l,headers:m,additionalGaxiosOptions:t.RETRY_CONFIG});else if(y){this.credentialSourceType="certificate";let h=new Z$.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:y.use_default_certificate_config,certificateConfigLocation:y.certificate_config_location,trustChainPath:y.trust_chain_path});this.subjectTokenSupplier=h}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let e=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof Z$.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new M2.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new H$.Gaxios({agent:n})}),this.transporter=new H$.Gaxios({...this.transporter.defaults||{},agent:n})}return e}};hm.IdentityPoolClient=eE});var nE=N(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.AwsRequestSigner=void 0;var gm=gt(),W$=yu(),G$="AWS4-HMAC-SHA256",j2="aws4_request",rE=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(e,n){this.getCredentials=e,this.region=n,this.crypto=(0,W$.createCrypto)()}async getRequestOptions(e){if(!e.url)throw new RangeError('"url" is required in "amzOptions"');let n=typeof e.data=="object"?JSON.stringify(e.data):e.data,o=e.url,r=e.method||"GET",i=e.body||n,s=e.headers,u=await this.getCredentials(),l=new URL(o);if(typeof i!="string"&&i!==void 0)throw new TypeError(`'requestPayload' is expected to be a string if provided. Got: ${i}`);let p=await F2({crypto:this.crypto,host:l.host,canonicalUri:l.pathname,canonicalQuerystring:l.search.slice(1),method:r,region:this.region,securityCredentials:u,requestPayload:i,additionalAmzHeaders:s}),f=gm.Gaxios.mergeHeaders(p.amzDate?{"x-amz-date":p.amzDate}:{},{authorization:p.authorizationHeader,host:l.host},s||{});u.token&&gm.Gaxios.mergeHeaders(f,{"x-amz-security-token":u.token});let y={url:o,method:r,headers:f};return i!==void 0&&(y.body=i),y}};ym.AwsRequestSigner=rE;async function Iu(t,e,n){return await t.signWithHmacSha256(e,n)}a(Iu,"sign");async function L2(t,e,n,o,r){let i=await Iu(t,`AWS4${e}`,n),s=await Iu(t,i,o),u=await Iu(t,s,r);return await Iu(t,u,"aws4_request")}a(L2,"getSigningKey");async function F2(t){let e=gm.Gaxios.mergeHeaders(t.additionalAmzHeaders),n=t.requestPayload||"",o=t.host.split(".")[0],r=new Date,i=r.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),s=r.toISOString().replace(/[-]/g,"").replace(/T.*/,"");t.securityCredentials.token&&e.set("x-amz-security-token",t.securityCredentials.token);let u=gm.Gaxios.mergeHeaders({host:t.host},e.has("date")?{}:{"x-amz-date":i},e),l="",p=[...u.keys()].sort();p.forEach(z=>{l+=`${z}:${u.get(z)}
41
+ `});let f=p.join(";"),y=await t.crypto.sha256DigestHex(n),m=`${t.method.toUpperCase()}
42
42
  ${t.canonicalUri}
43
43
  ${t.canonicalQuerystring}
44
44
  ${l}
45
- ${p}
46
- ${_}`,g=`${c}/${t.region}/${n}/${Iz}`,y=`${qE}
47
- ${s}
48
- ${g}
49
- `+await t.crypto.sha256DigestHex(h),T=await Rz(t.crypto,t.securityCredentials.secretAccessKey,c,t.region,n),P=await Ia(t.crypto,T,y),x=`${qE} Credential=${t.securityCredentials.accessKeyId}/${g}, SignedHeaders=${p}, Signature=${(0,VE.fromArrayBufferToHex)(P)}`;return{amzDate:e.has("date")?void 0:s,authorizationHeader:x,canonicalQuerystring:t.canonicalQuerystring}}o(Oz,"generateAuthenticationHeaderMap")});var HE=k(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.DefaultAwsSecurityCredentialsSupplier=void 0;var tc=Ht(),sf=class{static{o(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(e){this.regionUrl=e.regionUrl,this.securityCredentialsUrl=e.securityCredentialsUrl,this.imdsV2SessionTokenUrl=e.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getAwsRegion(e){if(this.#n)return this.#n;let r=new Headers;if(!this.#n&&this.imdsV2SessionTokenUrl&&r.set("x-aws-ec2-metadata-token",await this.#e(e.transporter)),!this.regionUrl)throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"');let n={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",headers:r};tc.AuthClient.setMethodName(n,"getAwsRegion");let i=await e.transporter.request(n);return i.data.substr(0,i.data.length-1)}async getAwsSecurityCredentials(e){if(this.#o)return this.#o;let r=new Headers;this.imdsV2SessionTokenUrl&&r.set("x-aws-ec2-metadata-token",await this.#e(e.transporter));let n=await this.#t(r,e.transporter),i=await this.#r(n,r,e.transporter);return{accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,token:i.Token}}async#e(e){let r={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return tc.AuthClient.setMethodName(r,"#getImdsV2SessionToken"),(await e.request(r)).data}async#t(e,r){if(!this.securityCredentialsUrl)throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let n={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",headers:e};return tc.AuthClient.setMethodName(n,"#getAwsRoleName"),(await r.request(n)).data}async#r(e,r,n){let i={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${e}`,headers:r};return tc.AuthClient.setMethodName(i,"#retrieveAwsSecurityCredentials"),(await n.request(i)).data}get#n(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}get#o(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}};rc.DefaultAwsSecurityCredentialsSupplier=sf});var cf=k(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.AwsClient=void 0;var Cz=af(),$z=Bn(),kz=HE(),GE=vr(),Nz=st(),uf=class t extends $z.BaseExternalAccountClient{static{o(this,"AwsClient")}environmentId;awsSecurityCredentialsSupplier;regionalCredVerificationUrl;awsRequestSigner;region;static#e="https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";static AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";static AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254";constructor(e){super(e);let r=(0,GE.originalOrCamelOptions)(e),n=r.get("credential_source"),i=r.get("aws_security_credentials_supplier");if(!n&&!i)throw new Error("A credential source or AWS security credentials supplier must be specified.");if(n&&i)throw new Error("Only one of credential source or AWS security credentials supplier can be specified.");if(i)this.awsSecurityCredentialsSupplier=i,this.regionalCredVerificationUrl=t.#e,this.credentialSourceType="programmatic";else{let s=(0,GE.originalOrCamelOptions)(n);this.environmentId=s.get("environment_id");let c=s.get("region_url"),d=s.get("url"),l=s.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new kz.DefaultAwsSecurityCredentialsSupplier({regionUrl:c,securityCredentialsUrl:d,imdsV2SessionTokenUrl:l}),this.regionalCredVerificationUrl=s.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let e=this.environmentId?.match(/^(aws)(\d+)$/);if(!e||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(e[2],10)!==1)throw new Error(`aws version "${e[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new Cz.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let e=await this.awsRequestSigner.getRequestOptions({...t.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),r=[];return Nz.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},e.headers).forEach((i,s)=>r.push({key:s,value:i})),encodeURIComponent(JSON.stringify({url:e.url,method:e.method,headers:r}))}};nc.AwsClient=uf});var mf=k(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.InvalidSubjectTokenError=lt.InvalidMessageFieldError=lt.InvalidCodeFieldError=lt.InvalidTokenTypeFieldError=lt.InvalidExpirationTimeFieldError=lt.InvalidSuccessFieldError=lt.InvalidVersionFieldError=lt.ExecutableResponseError=lt.ExecutableResponse=void 0;var oc="urn:ietf:params:oauth:token-type:saml2",lf="urn:ietf:params:oauth:token-type:id_token",df="urn:ietf:params:oauth:token-type:jwt",pf=class{static{o(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(e){if(!e.version)throw new ic("Executable response must contain a 'version' field.");if(e.success===void 0)throw new ac("Executable response must contain a 'success' field.");if(this.version=e.version,this.success=e.success,this.success){if(this.expirationTime=e.expiration_time,this.tokenType=e.token_type,this.tokenType!==oc&&this.tokenType!==lf&&this.tokenType!==df)throw new sc(`Executable response must contain a 'token_type' field when successful and it must be one of ${lf}, ${df}, or ${oc}.`);if(this.tokenType===oc){if(!e.saml_response)throw new Ra(`Executable response must contain a 'saml_response' field when token_type=${oc}.`);this.subjectToken=e.saml_response}else{if(!e.id_token)throw new Ra(`Executable response must contain a 'id_token' field when token_type=${lf} or ${df}.`);this.subjectToken=e.id_token}}else{if(!e.code)throw new uc("Executable response must contain a 'code' field when unsuccessful.");if(!e.message)throw new cc("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=e.code,this.errorMessage=e.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};lt.ExecutableResponse=pf;var Ur=class extends Error{static{o(this,"ExecutableResponseError")}constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};lt.ExecutableResponseError=Ur;var ic=class extends Ur{static{o(this,"InvalidVersionFieldError")}};lt.InvalidVersionFieldError=ic;var ac=class extends Ur{static{o(this,"InvalidSuccessFieldError")}};lt.InvalidSuccessFieldError=ac;var ff=class extends Ur{static{o(this,"InvalidExpirationTimeFieldError")}};lt.InvalidExpirationTimeFieldError=ff;var sc=class extends Ur{static{o(this,"InvalidTokenTypeFieldError")}};lt.InvalidTokenTypeFieldError=sc;var uc=class extends Ur{static{o(this,"InvalidCodeFieldError")}};lt.InvalidCodeFieldError=uc;var cc=class extends Ur{static{o(this,"InvalidMessageFieldError")}};lt.InvalidMessageFieldError=cc;var Ra=class extends Ur{static{o(this,"InvalidSubjectTokenError")}};lt.InvalidSubjectTokenError=Ra});var yf=k(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.PluggableAuthHandler=fi.ExecutableError=void 0;var fo=mf(),zz=require("child_process"),hf=require("fs"),lc=class extends Error{static{o(this,"ExecutableError")}code;constructor(e,r){super(`The executable failed with exit code: ${r} and error message: ${e}.`),this.code=r,Object.setPrototypeOf(this,new.target.prototype)}};fi.ExecutableError=lc;var gf=class t{static{o(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(e){if(!e.command)throw new Error("No command provided.");if(this.commandComponents=t.parseCommand(e.command),this.timeoutMillis=e.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=e.outputFile}retrieveResponseFromExecutable(e){return new Promise((r,n)=>{let i=zz.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(e)}}),s="";i.stdout.on("data",d=>{s+=d}),i.stderr.on("data",d=>{s+=d});let c=setTimeout(()=>(i.removeAllListeners(),i.kill(),n(new Error("The executable failed to finish within the timeout specified."))),this.timeoutMillis);i.on("close",d=>{if(clearTimeout(c),d===0)try{let l=JSON.parse(s),f=new fo.ExecutableResponse(l);return r(f)}catch(l){return l instanceof fo.ExecutableResponseError?n(l):n(new fo.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}else return n(new lc(s,d.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let e;try{e=await hf.promises.realpath(this.outputFile)}catch{return}if(!(await hf.promises.lstat(e)).isFile())return;let r=await hf.promises.readFile(e,{encoding:"utf8"});if(r!=="")try{let n=JSON.parse(r);return new fo.ExecutableResponse(n).isValid()?new fo.ExecutableResponse(n):void 0}catch(n){throw n instanceof fo.ExecutableResponseError?n:new fo.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(e){let r=e.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r)throw new Error(`Provided command: "${e}" could not be parsed.`);for(let n=0;n<r.length;n++)r[n][0]==='"'&&r[n].slice(-1)==='"'&&(r[n]=r[n].slice(1,-1));return r}};fi.PluggableAuthHandler=gf});var vf=k(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.PluggableAuthClient=mi.ExecutableError=void 0;var Dz=Bn(),Uz=mf(),WE=yf(),Mz=yf();Object.defineProperty(mi,"ExecutableError",{enumerable:!0,get:o(function(){return Mz.ExecutableError},"get")});var jz=30*1e3,ZE=5*1e3,KE=120*1e3,Lz="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",JE=1,_f=class extends Dz.BaseExternalAccountClient{static{o(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(e){if(super(e),!e.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=e.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(e.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=jz;else if(this.timeoutMillis=e.credential_source.executable.timeout_millis,this.timeoutMillis<ZE||this.timeoutMillis>KE)throw new Error(`Timeout must be between ${ZE} and ${KE} milliseconds.`);this.outputFile=e.credential_source.executable.output_file,this.handler=new WE.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[Lz]!=="1")throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let e;if(this.outputFile&&(e=await this.handler.retrieveCachedResponse()),!e){let r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile&&r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let n=this.getServiceAccountEmail();n&&r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n),e=await this.handler.retrieveResponseFromExecutable(r)}if(e.version>JE)throw new Error(`Version of executable is not currently supported, maximum supported version is ${JE}.`);if(!e.success)throw new WE.ExecutableError(e.errorMessage,e.errorCode);if(this.outputFile&&!e.expirationTime)throw new Uz.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(e.isExpired())throw new Error("Executable response is expired.");return e.subjectToken}};mi.PluggableAuthClient=_f});var Pf=k(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.ExternalAccountClient=void 0;var Fz=Bn(),Bz=nf(),qz=cf(),Vz=vf(),bf=class{static{o(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(e){return e&&e.type===Fz.EXTERNAL_ACCOUNT_TYPE?e.credential_source?.environment_id?new qz.AwsClient(e):e.credential_source?.executable?new Vz.PluggableAuthClient(e):new Bz.IdentityPoolClient(e):null}};dc.ExternalAccountClient=bf});var Tf=k(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.ExternalAccountAuthorizedUserClient=hi.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var XE=Ht(),YE=Hp(),QE=st(),Hz=require("stream"),Gz=Bn();hi.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var Wz="https://sts.{universeDomain}/v1/oauthtoken",Sf=class t extends YE.OAuthClientAuthHandler{static{o(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(e){super(e),this.#e=e.tokenRefreshEndpoint}async refreshToken(e,r){let n={...t.RETRY_CONFIG,url:this.#e,method:"POST",headers:r,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:e})};XE.AuthClient.setMethodName(n,"refreshToken"),this.applyClientAuthenticationOptions(n);try{let i=await this.transporter.request(n),s=i.data;return s.res=i,s}catch(i){throw i instanceof QE.GaxiosError&&i.response?(0,YE.getErrorFromOAuthErrorResponse)(i.response.data,i):i}}},Ef=class extends XE.AuthClient{static{o(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(e){super(e),e.universe_domain&&(this.universeDomain=e.universe_domain),this.refreshToken=e.refresh_token;let r={confidentialClientType:"basic",clientId:e.client_id,clientSecret:e.client_secret};this.externalAccountAuthorizedUserHandler=new Sf({tokenRefreshEndpoint:e.token_url??Wz.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:r}),this.cachedAccessToken=null,this.quotaProjectId=e.quota_project_id,typeof e?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=Gz.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!e?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=QE.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let c=s.status,d=s.config.data instanceof Hz.Readable;if(!r&&(c===401||c===403)&&!d&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){let e=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:e.access_token,expiry_date:new Date().getTime()+e.expires_in*1e3,res:e.res},e.refresh_token!==void 0&&(this.refreshToken=e.refresh_token),this.cachedAccessToken}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};hi.ExternalAccountAuthorizedUserClient=Ef});var nT=k(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.GoogleAuth=Er.GoogleAuthExceptionMessages=void 0;var Zz=require("child_process"),Oa=require("fs"),Kz=st(),Ca=ga(),Jz=require("os"),xf=require("path"),Yz=ya(),Xz=yp(),Qz=vp(),eD=bp(),gi=jp(),eT=Fp(),yi=qp(),tD=Pf(),$a=Bn(),Af=Ht(),tT=Tf(),rT=vr();Er.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
45
+ ${f}
46
+ ${y}`,h=`${s}/${t.region}/${o}/${j2}`,_=`${G$}
47
+ ${i}
48
+ ${h}
49
+ `+await t.crypto.sha256DigestHex(m),E=await L2(t.crypto,t.securityCredentials.secretAccessKey,s,t.region,o),P=await Iu(t.crypto,E,_),x=`${G$} Credential=${t.securityCredentials.accessKeyId}/${h}, SignedHeaders=${f}, Signature=${(0,W$.fromArrayBufferToHex)(P)}`;return{amzDate:e.has("date")?void 0:i,authorizationHeader:x,canonicalQuerystring:t.canonicalQuerystring}}a(F2,"generateAuthenticationHeaderMap")});var J$=N(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.DefaultAwsSecurityCredentialsSupplier=void 0;var _m=mr(),oE=class{static{a(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(e){this.regionUrl=e.regionUrl,this.securityCredentialsUrl=e.securityCredentialsUrl,this.imdsV2SessionTokenUrl=e.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getAwsRegion(e){if(this.#n)return this.#n;let n=new Headers;if(!this.#n&&this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(e.transporter)),!this.regionUrl)throw new RangeError('Unable to determine AWS region due to missing "options.credential_source.region_url"');let o={...this.additionalGaxiosOptions,url:this.regionUrl,method:"GET",headers:n};_m.AuthClient.setMethodName(o,"getAwsRegion");let r=await e.transporter.request(o);return r.data.substr(0,r.data.length-1)}async getAwsSecurityCredentials(e){if(this.#o)return this.#o;let n=new Headers;this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(e.transporter));let o=await this.#t(n,e.transporter),r=await this.#r(o,n,e.transporter);return{accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,token:r.Token}}async#e(e){let n={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return _m.AuthClient.setMethodName(n,"#getImdsV2SessionToken"),(await e.request(n)).data}async#t(e,n){if(!this.securityCredentialsUrl)throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"');let o={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:"GET",headers:e};return _m.AuthClient.setMethodName(o,"#getAwsRoleName"),(await n.request(o)).data}async#r(e,n,o){let r={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${e}`,headers:n};return _m.AuthClient.setMethodName(r,"#retrieveAwsSecurityCredentials"),(await o.request(r)).data}get#n(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}get#o(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}};vm.DefaultAwsSecurityCredentialsSupplier=oE});var aE=N(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.AwsClient=void 0;var B2=nE(),q2=Ao(),V2=J$(),K$=Gr(),Z2=gt(),iE=class t extends q2.BaseExternalAccountClient{static{a(this,"AwsClient")}environmentId;awsSecurityCredentialsSupplier;regionalCredVerificationUrl;awsRequestSigner;region;static#e="https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15";static AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";static AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254";constructor(e){super(e);let n=(0,K$.originalOrCamelOptions)(e),o=n.get("credential_source"),r=n.get("aws_security_credentials_supplier");if(!o&&!r)throw new Error("A credential source or AWS security credentials supplier must be specified.");if(o&&r)throw new Error("Only one of credential source or AWS security credentials supplier can be specified.");if(r)this.awsSecurityCredentialsSupplier=r,this.regionalCredVerificationUrl=t.#e,this.credentialSourceType="programmatic";else{let i=(0,K$.originalOrCamelOptions)(o);this.environmentId=i.get("environment_id");let s=i.get("region_url"),u=i.get("url"),l=i.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new V2.DefaultAwsSecurityCredentialsSupplier({regionUrl:s,securityCredentialsUrl:u,imdsV2SessionTokenUrl:l}),this.regionalCredVerificationUrl=i.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let e=this.environmentId?.match(/^(aws)(\d+)$/);if(!e||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(e[2],10)!==1)throw new Error(`aws version "${e[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new B2.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let e=await this.awsRequestSigner.getRequestOptions({...t.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),n=[];return Z2.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},e.headers).forEach((r,i)=>n.push({key:i,value:r})),encodeURIComponent(JSON.stringify({url:e.url,method:e.method,headers:n}))}};bm.AwsClient=iE});var dE=N(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InvalidSubjectTokenError=_t.InvalidMessageFieldError=_t.InvalidCodeFieldError=_t.InvalidTokenTypeFieldError=_t.InvalidExpirationTimeFieldError=_t.InvalidSuccessFieldError=_t.InvalidVersionFieldError=_t.ExecutableResponseError=_t.ExecutableResponse=void 0;var Sm="urn:ietf:params:oauth:token-type:saml2",sE="urn:ietf:params:oauth:token-type:id_token",cE="urn:ietf:params:oauth:token-type:jwt",uE=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(e){if(!e.version)throw new Em("Executable response must contain a 'version' field.");if(e.success===void 0)throw new Pm("Executable response must contain a 'success' field.");if(this.version=e.version,this.success=e.success,this.success){if(this.expirationTime=e.expiration_time,this.tokenType=e.token_type,this.tokenType!==Sm&&this.tokenType!==sE&&this.tokenType!==cE)throw new xm(`Executable response must contain a 'token_type' field when successful and it must be one of ${sE}, ${cE}, or ${Sm}.`);if(this.tokenType===Sm){if(!e.saml_response)throw new Ru(`Executable response must contain a 'saml_response' field when token_type=${Sm}.`);this.subjectToken=e.saml_response}else{if(!e.id_token)throw new Ru(`Executable response must contain a 'id_token' field when token_type=${sE} or ${cE}.`);this.subjectToken=e.id_token}}else{if(!e.code)throw new Tm("Executable response must contain a 'code' field when unsuccessful.");if(!e.message)throw new Am("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=e.code,this.errorMessage=e.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};_t.ExecutableResponse=uE;var dn=class extends Error{static{a(this,"ExecutableResponseError")}constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};_t.ExecutableResponseError=dn;var Em=class extends dn{static{a(this,"InvalidVersionFieldError")}};_t.InvalidVersionFieldError=Em;var Pm=class extends dn{static{a(this,"InvalidSuccessFieldError")}};_t.InvalidSuccessFieldError=Pm;var lE=class extends dn{static{a(this,"InvalidExpirationTimeFieldError")}};_t.InvalidExpirationTimeFieldError=lE;var xm=class extends dn{static{a(this,"InvalidTokenTypeFieldError")}};_t.InvalidTokenTypeFieldError=xm;var Tm=class extends dn{static{a(this,"InvalidCodeFieldError")}};_t.InvalidCodeFieldError=Tm;var Am=class extends dn{static{a(this,"InvalidMessageFieldError")}};_t.InvalidMessageFieldError=Am;var Ru=class extends dn{static{a(this,"InvalidSubjectTokenError")}};_t.InvalidSubjectTokenError=Ru});var mE=N(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.PluggableAuthHandler=qa.ExecutableError=void 0;var gi=dE(),H2=require("child_process"),pE=require("fs"),wm=class extends Error{static{a(this,"ExecutableError")}code;constructor(e,n){super(`The executable failed with exit code: ${n} and error message: ${e}.`),this.code=n,Object.setPrototypeOf(this,new.target.prototype)}};qa.ExecutableError=wm;var fE=class t{static{a(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(e){if(!e.command)throw new Error("No command provided.");if(this.commandComponents=t.parseCommand(e.command),this.timeoutMillis=e.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=e.outputFile}retrieveResponseFromExecutable(e){return new Promise((n,o)=>{let r=H2.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(e)}}),i="";r.stdout.on("data",u=>{i+=u}),r.stderr.on("data",u=>{i+=u});let s=setTimeout(()=>(r.removeAllListeners(),r.kill(),o(new Error("The executable failed to finish within the timeout specified."))),this.timeoutMillis);r.on("close",u=>{if(clearTimeout(s),u===0)try{let l=JSON.parse(i),p=new gi.ExecutableResponse(l);return n(p)}catch(l){return l instanceof gi.ExecutableResponseError?o(l):o(new gi.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new wm(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let e;try{e=await pE.promises.realpath(this.outputFile)}catch{return}if(!(await pE.promises.lstat(e)).isFile())return;let n=await pE.promises.readFile(e,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new gi.ExecutableResponse(o).isValid()?new gi.ExecutableResponse(o):void 0}catch(o){throw o instanceof gi.ExecutableResponseError?o:new gi.ExecutableResponseError(`The output file contained an invalid response: ${n}`)}}static parseCommand(e){let n=e.match(/(?:[^\s"]+|"[^"]*")+/g);if(!n)throw new Error(`Provided command: "${e}" could not be parsed.`);for(let o=0;o<n.length;o++)n[o][0]==='"'&&n[o].slice(-1)==='"'&&(n[o]=n[o].slice(1,-1));return n}};qa.PluggableAuthHandler=fE});var gE=N(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.PluggableAuthClient=Va.ExecutableError=void 0;var G2=Ao(),W2=dE(),X$=mE(),J2=mE();Object.defineProperty(Va,"ExecutableError",{enumerable:!0,get:a(function(){return J2.ExecutableError},"get")});var K2=30*1e3,Y$=5*1e3,Q$=120*1e3,X2="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",ek=1,hE=class extends G2.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(e){if(super(e),!e.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=e.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(e.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=K2;else if(this.timeoutMillis=e.credential_source.executable.timeout_millis,this.timeoutMillis<Y$||this.timeoutMillis>Q$)throw new Error(`Timeout must be between ${Y$} and ${Q$} milliseconds.`);this.outputFile=e.credential_source.executable.output_file,this.handler=new X$.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[X2]!=="1")throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.");let e;if(this.outputFile&&(e=await this.handler.retrieveCachedResponse()),!e){let n=new Map;n.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience),n.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType),n.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0"),this.outputFile&&n.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile);let o=this.getServiceAccountEmail();o&&n.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",o),e=await this.handler.retrieveResponseFromExecutable(n)}if(e.version>ek)throw new Error(`Version of executable is not currently supported, maximum supported version is ${ek}.`);if(!e.success)throw new X$.ExecutableError(e.errorMessage,e.errorCode);if(this.outputFile&&!e.expirationTime)throw new W2.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(e.isExpired())throw new Error("Executable response is expired.");return e.subjectToken}};Va.PluggableAuthClient=hE});var _E=N(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.ExternalAccountClient=void 0;var Y2=Ao(),Q2=tE(),eV=aE(),tV=gE(),yE=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(e){return e&&e.type===Y2.EXTERNAL_ACCOUNT_TYPE?e.credential_source?.environment_id?new eV.AwsClient(e):e.credential_source?.executable?new tV.PluggableAuthClient(e):new Q2.IdentityPoolClient(e):null}};Im.ExternalAccountClient=yE});var SE=N(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.ExternalAccountAuthorizedUserClient=Za.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var rk=mr(),tk=qS(),nk=gt(),rV=require("stream"),nV=Ao();Za.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var oV="https://sts.{universeDomain}/v1/oauthtoken",vE=class t extends tk.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(e){super(e),this.#e=e.tokenRefreshEndpoint}async refreshToken(e,n){let o={...t.RETRY_CONFIG,url:this.#e,method:"POST",headers:n,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:e})};rk.AuthClient.setMethodName(o,"refreshToken"),this.applyClientAuthenticationOptions(o);try{let r=await this.transporter.request(o),i=r.data;return i.res=r,i}catch(r){throw r instanceof nk.GaxiosError&&r.response?(0,tk.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},bE=class extends rk.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(e){super(e),e.universe_domain&&(this.universeDomain=e.universe_domain),this.refreshToken=e.refresh_token;let n={confidentialClientType:"basic",clientId:e.client_id,clientSecret:e.client_secret};this.externalAccountAuthorizedUserHandler=new vE({tokenRefreshEndpoint:e.token_url??oV.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=e.quota_project_id,typeof e?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=nV.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!e?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(n)}request(e,n){if(n)this.requestAsync(e).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(e)}async requestAsync(e,n=!1){let o;try{let r=await this.getRequestHeaders();e.headers=nk.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,r),o=await this.transporter.request(e)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof rV.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw r}return o}async refreshAccessTokenAsync(){let e=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:e.access_token,expiry_date:new Date().getTime()+e.expires_in*1e3,res:e.res},e.refresh_token!==void 0&&(this.refreshToken=e.refresh_token),this.cachedAccessToken}isExpired(e){let n=new Date().getTime();return e.expiry_date?n>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};Za.ExternalAccountAuthorizedUserClient=bE});var sk=N(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.GoogleAuth=Xr.GoogleAuthExceptionMessages=void 0;var iV=require("child_process"),Ou=require("fs"),aV=gt(),Cu=gu(),sV=require("os"),EE=require("path"),cV=yu(),uV=hS(),lV=yS(),dV=_S(),Ha=US(),ok=jS(),Ga=FS(),pV=_E(),$u=Ao(),PE=mr(),ik=SE(),ak=Gr();Xr.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:"API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.",NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
50
50
  To learn more about authentication and Google APIs, visit:
51
51
  https://cloud.google.com/docs/authentication/getting-started`,NO_CREDENTIALS_FOUND:`Unable to find credentials in current environment.
52
52
  To learn more about authentication and Google APIs, visit:
53
53
  https://cloud.google.com/docs/authentication/getting-started`,NO_ADC_FOUND:"Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.",NO_UNIVERSE_DOMAIN_FOUND:`Unable to detect a Universe Domain in the current environment.
54
54
  To learn more about Universe Domain retrieval, visit:
55
- https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var wf=class{static{o(this,"GoogleAuth")}checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#e=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(e={}){if(this._cachedProjectId=e.projectId||null,this.cachedCredential=e.authClient||null,this.keyFilename=e.keyFilename||e.keyFile,this.scopes=e.scopes,this.clientOptions=e.clientOptions||{},this.jsonContent=e.credentials||null,this.apiKey=e.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(Er.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);e.universeDomain&&(this.clientOptions.universeDomain=e.universeDomain)}setGapicJWTValues(e){e.defaultServicePath=this.defaultServicePath,e.useJWTAccessWithScope=this.useJWTAccessWithScope,e.defaultScopes=this.defaultScopes}getProjectId(e){if(e)this.getProjectIdAsync().then(r=>e(null,r),e);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(e){if(e instanceof Error&&e.message===Er.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw e}}async findAndCacheProjectId(){let e=null;if(e||=await this.getProductionProjectId(),e||=await this.getFileProjectId(),e||=await this.getDefaultServiceProjectId(),e||=await this.getGCEProjectId(),e||=await this.getExternalAccountClientProjectId(),e)return this._cachedProjectId=e,e;throw new Error(Er.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let e;try{e=await Ca.universe("universe-domain"),e||=Af.DEFAULT_UNIVERSE}catch(r){if(r&&r?.response?.status===404)e=Af.DEFAULT_UNIVERSE;else throw r}return e}async getUniverseDomain(){let e=(0,rT.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{e??=(await this.getClient()).universeDomain}catch{e??=Af.DEFAULT_UNIVERSE}return e}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(e={},r){let n;if(typeof e=="function"?r=e:n=e,r)this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r);else return this.getApplicationDefaultAsync(n)}async getApplicationDefaultAsync(e={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let r;if(r=await this._tryGetApplicationCredentialsFromEnvironmentVariable(e),r)return r instanceof gi.JWT?r.scopes=this.scopes:r instanceof $a.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(r=await this._tryGetApplicationCredentialsFromWellKnownFile(e),r)return r instanceof gi.JWT?r.scopes=this.scopes:r instanceof $a.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(await this._checkIsGCE())return e.scopes=this.getAnyScopes(),await this.#t(new Xz.Compute(e));throw new Error(Er.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(e,r=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let n=await this.getProjectIdOptional();return r&&(e.quotaProjectId=r),this.cachedCredential=e,{credential:e,projectId:n}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=Ca.getGCPResidency()||await Ca.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(e){let r=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!r||r.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(r,e)}catch(n){throw n instanceof Error&&(n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`),n}}async _tryGetApplicationCredentialsFromWellKnownFile(e){let r=null;if(this._isWindows())r=process.env.APPDATA;else{let i=process.env.HOME;i&&(r=xf.join(i,".config"))}return r&&(r=xf.join(r,"gcloud","application_default_credentials.json"),Oa.existsSync(r)||(r=null)),r?await this._getApplicationCredentialsFromFilePath(r,e):null}async _getApplicationCredentialsFromFilePath(e,r={}){if(!e||e.length===0)throw new Error("The file path is invalid.");try{if(e=Oa.realpathSync(e),!Oa.lstatSync(e).isFile())throw new Error}catch(i){throw i instanceof Error&&(i.message=`The file at ${e} does not exist, or it is not a file. ${i.message}`),i}let n=Oa.createReadStream(e);return this.fromStream(n,r)}fromImpersonatedJSON(e){if(!e)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(e.type!==yi.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${yi.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!e.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!e.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let r=this.fromJSON(e.source_credentials);if(e.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${e.service_account_impersonation_url}`);let n=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(e.service_account_impersonation_url)?.groups?.target;if(!n)throw new RangeError(`Cannot extract target principal from ${e.service_account_impersonation_url}`);let i=(this.scopes||e.scopes||this.defaultScopes)??[];return new yi.Impersonated({...e,sourceClient:r,targetPrincipal:n,targetScopes:Array.isArray(i)?i:[i]})}fromJSON(e,r={}){let n,i=(0,rT.originalOrCamelOptions)(r).get("universe_domain");return e.type===eT.USER_REFRESH_ACCOUNT_TYPE?(n=new eT.UserRefreshClient(r),n.fromJSON(e)):e.type===yi.IMPERSONATED_ACCOUNT_TYPE?n=this.fromImpersonatedJSON(e):e.type===$a.EXTERNAL_ACCOUNT_TYPE?(n=tD.ExternalAccountClient.fromJSON({...e,...r}),n.scopes=this.getAnyScopes()):e.type===tT.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?n=new tT.ExternalAccountAuthorizedUserClient({...e,...r}):(r.scopes=this.scopes,n=new gi.JWT(r),this.setGapicJWTValues(n),n.fromJSON(e)),i&&(n.universeDomain=i),n}_cacheClientFromJSON(e,r){let n=this.fromJSON(e,r);return this.jsonContent=e,this.cachedCredential=n,n}fromStream(e,r={},n){let i={};if(typeof r=="function"?n=r:i=r,n)this.fromStreamAsync(e,i).then(s=>n(null,s),n);else return this.fromStreamAsync(e,i)}fromStreamAsync(e,r){return new Promise((n,i)=>{if(!e)throw new Error("Must pass in a stream containing the Google auth settings.");let s=[];e.setEncoding("utf8").on("error",i).on("data",c=>s.push(c)).on("end",()=>{try{try{let c=JSON.parse(s.join("")),d=this._cacheClientFromJSON(c,r);return n(d)}catch(c){if(!this.keyFilename)throw c;let d=new gi.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=d,this.setGapicJWTValues(d),n(d)}}catch(c){return i(c)}})})}fromAPIKey(e,r={}){return new gi.JWT({...r,apiKey:e})}_isWindows(){let e=Jz.platform();return!!(e&&e.length>=3&&e.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(e=>{(0,Zz.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n)try{let i=JSON.parse(n).configuration.properties.core.project;e(i);return}catch{}e(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let r=await this.getClient();if(r&&r.projectId)return r.projectId}let e=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return e?e.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==$a.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Ca.project("project-id")}catch{return null}}getCredentials(e){if(e)this.getCredentialsAsync().then(r=>e(null,r),e);else return this.getCredentialsAsync()}async getCredentialsAsync(){let e=await this.getClient();if(e instanceof yi.Impersonated)return{client_email:e.getTargetPrincipal()};if(e instanceof $a.BaseExternalAccountClient){let r=e.getServiceAccountEmail();if(r)return{client_email:r,universe_domain:e.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[r,n]=await Promise.all([Ca.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:r,universe_domain:n}}throw new Error(Er.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#e=this.#e||this.#r();try{return await this.#e}finally{this.#e=null}}async#r(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let e=xf.resolve(this.keyFilename),r=Oa.createReadStream(e);return await this.fromStreamAsync(r,this.clientOptions)}else if(this.apiKey){let e=await this.fromAPIKey(this.apiKey,this.clientOptions);e.scopes=this.scopes;let{credential:r}=await this.#t(e);return r}else{let{credential:e}=await this.getApplicationDefaultAsync(this.clientOptions);return e}}async getIdTokenClient(e){let r=await this.getClient();if(!("fetchIdToken"in r))throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new Qz.IdTokenClient({targetAudience:e,idTokenProvider:r})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(e){return(await this.getClient()).getRequestHeaders(e)}async authorizeRequest(e={}){let r=e.url,i=await(await this.getClient()).getRequestHeaders(r);return e.headers=Kz.Gaxios.mergeHeaders(e.headers,i),e}async fetch(...e){return(await this.getClient()).fetch(...e)}async request(e){return(await this.getClient()).request(e)}getEnv(){return(0,eD.getEnv)()}async sign(e,r){let n=await this.getClient(),i=await this.getUniverseDomain();if(r=r||`https://iamcredentials.${i}/v1/projects/-/serviceAccounts/`,n instanceof yi.Impersonated)return(await n.sign(e)).signedBlob;let s=(0,Yz.createCrypto)();if(n instanceof gi.JWT&&n.key)return await s.sign(n.key,e);let c=await this.getCredentials();if(!c.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(s,c.client_email,e,r)}async signBlob(e,r,n,i){let s=new URL(i+`${r}:signBlob`);return(await this.request({method:"POST",url:s.href,data:{payload:e.encodeBase64StringUtf8(n)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};Er.GoogleAuth=wf});var oT=k(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.IAMAuth=void 0;var If=class{static{o(this,"IAMAuth")}selector;token;constructor(e,r){this.selector=e,this.token=r,this.selector=e,this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};pc.IAMAuth=If});var iT=k(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.DownscopedClient=Mr.EXPIRATION_TIME_OFFSET=Mr.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var rD=st(),nD=require("stream"),Rf=Ht(),oD=Gu(),iD="urn:ietf:params:oauth:grant-type:token-exchange",aD="urn:ietf:params:oauth:token-type:access_token",sD="urn:ietf:params:oauth:token-type:access_token";Mr.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;Mr.EXPIRATION_TIME_OFFSET=300*1e3;var Of=class extends Rf.AuthClient{static{o(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(e,r={accessBoundary:{accessBoundaryRules:[]}}){if(super(e instanceof Rf.AuthClient?{}:e),e instanceof Rf.AuthClient?(this.authClient=e,this.credentialAccessBoundary=r):(this.authClient=e.authClient,this.credentialAccessBoundary=e.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw new Error("At least one access boundary rule needs to be defined.");if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>Mr.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${Mr.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let n of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(n.availablePermissions.length===0)throw new Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new oD.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(e){if(!e.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(e),this.cachedDownscopedAccessToken=e}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),r=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(r)}request(e,r){if(r)this.requestAsync(e).then(n=>r(null,n),n=>r(n,n.response));else return this.requestAsync(e)}async requestAsync(e,r=!1){let n;try{let i=await this.getRequestHeaders();e.headers=rD.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let c=s.status,d=s.config.data instanceof nD.Readable;if(!r&&(c===401||c===403)&&!d&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw i}return n}async refreshAccessTokenAsync(){let e=(await this.authClient.getAccessToken()).token,r={grantType:iD,requestedTokenType:aD,subjectToken:e,subjectTokenType:sD},n=await this.stsCredential.exchangeToken(r,void 0,this.credentialAccessBoundary),i=this.authClient.credentials?.expiry_date||null,s=n.expires_in?new Date().getTime()+n.expires_in*1e3:i;return this.cachedDownscopedAccessToken={access_token:n.access_token,expiry_date:s,res:n.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(e){let r=new Date().getTime();return e.expiry_date?r>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};Mr.DownscopedClient=Of});var aT=k(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.PassThroughClient=void 0;var uD=Ht(),Cf=class extends uD.AuthClient{static{o(this,"PassThroughClient")}async request(e){return this.transporter.request(e)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};fc.PassThroughClient=Cf});var ka=k(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.GoogleAuth=se.auth=se.PassThroughClient=se.ExternalAccountAuthorizedUserClient=se.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=se.ExecutableError=se.PluggableAuthClient=se.DownscopedClient=se.BaseExternalAccountClient=se.ExternalAccountClient=se.IdentityPoolClient=se.AwsRequestSigner=se.AwsClient=se.UserRefreshClient=se.LoginTicket=se.ClientAuthentication=se.OAuth2Client=se.CodeChallengeMethod=se.Impersonated=se.JWT=se.JWTAccess=se.IdTokenClient=se.IAMAuth=se.GCPEnv=se.Compute=se.DEFAULT_UNIVERSE=se.AuthClient=se.gaxios=se.gcpMetadata=void 0;var sT=nT();Object.defineProperty(se,"GoogleAuth",{enumerable:!0,get:o(function(){return sT.GoogleAuth},"get")});se.gcpMetadata=ga();se.gaxios=st();var uT=Ht();Object.defineProperty(se,"AuthClient",{enumerable:!0,get:o(function(){return uT.AuthClient},"get")});Object.defineProperty(se,"DEFAULT_UNIVERSE",{enumerable:!0,get:o(function(){return uT.DEFAULT_UNIVERSE},"get")});var cD=yp();Object.defineProperty(se,"Compute",{enumerable:!0,get:o(function(){return cD.Compute},"get")});var lD=bp();Object.defineProperty(se,"GCPEnv",{enumerable:!0,get:o(function(){return lD.GCPEnv},"get")});var dD=oT();Object.defineProperty(se,"IAMAuth",{enumerable:!0,get:o(function(){return dD.IAMAuth},"get")});var pD=vp();Object.defineProperty(se,"IdTokenClient",{enumerable:!0,get:o(function(){return pD.IdTokenClient},"get")});var fD=Up();Object.defineProperty(se,"JWTAccess",{enumerable:!0,get:o(function(){return fD.JWTAccess},"get")});var mD=jp();Object.defineProperty(se,"JWT",{enumerable:!0,get:o(function(){return mD.JWT},"get")});var hD=qp();Object.defineProperty(se,"Impersonated",{enumerable:!0,get:o(function(){return hD.Impersonated},"get")});var $f=po();Object.defineProperty(se,"CodeChallengeMethod",{enumerable:!0,get:o(function(){return $f.CodeChallengeMethod},"get")});Object.defineProperty(se,"OAuth2Client",{enumerable:!0,get:o(function(){return $f.OAuth2Client},"get")});Object.defineProperty(se,"ClientAuthentication",{enumerable:!0,get:o(function(){return $f.ClientAuthentication},"get")});var gD=fp();Object.defineProperty(se,"LoginTicket",{enumerable:!0,get:o(function(){return gD.LoginTicket},"get")});var yD=Fp();Object.defineProperty(se,"UserRefreshClient",{enumerable:!0,get:o(function(){return yD.UserRefreshClient},"get")});var _D=cf();Object.defineProperty(se,"AwsClient",{enumerable:!0,get:o(function(){return _D.AwsClient},"get")});var vD=af();Object.defineProperty(se,"AwsRequestSigner",{enumerable:!0,get:o(function(){return vD.AwsRequestSigner},"get")});var bD=nf();Object.defineProperty(se,"IdentityPoolClient",{enumerable:!0,get:o(function(){return bD.IdentityPoolClient},"get")});var PD=Pf();Object.defineProperty(se,"ExternalAccountClient",{enumerable:!0,get:o(function(){return PD.ExternalAccountClient},"get")});var SD=Bn();Object.defineProperty(se,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return SD.BaseExternalAccountClient},"get")});var ED=iT();Object.defineProperty(se,"DownscopedClient",{enumerable:!0,get:o(function(){return ED.DownscopedClient},"get")});var cT=vf();Object.defineProperty(se,"PluggableAuthClient",{enumerable:!0,get:o(function(){return cT.PluggableAuthClient},"get")});Object.defineProperty(se,"ExecutableError",{enumerable:!0,get:o(function(){return cT.ExecutableError},"get")});var lT=Tf();Object.defineProperty(se,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:o(function(){return lT.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(se,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:o(function(){return lT.ExternalAccountAuthorizedUserClient},"get")});var TD=aT();Object.defineProperty(se,"PassThroughClient",{enumerable:!0,get:o(function(){return TD.PassThroughClient},"get")});var xD=new sT.GoogleAuth;se.auth=xD});var dT=k(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.getAPI=AD;function AD(t,e,r,n){let i;if(typeof e=="string")i=e,e={};else if(typeof e=="object")i=e.version,delete e.version;else throw new Error("Argument error: Accepts only string or object");try{let s=r[i],c=new s(e,n);return Object.freeze(c)}catch(s){throw new Error(`Unable to load endpoint ${t}("${i}"): ${s.message}`)}}o(AD,"getAPI")});var fT=k((d7,pT)=>{pT.exports=require("util").inspect});var Ma=k((p7,kT)=>{var qf=typeof Map=="function"&&Map.prototype,Nf=Object.getOwnPropertyDescriptor&&qf?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hc=qf&&Nf&&typeof Nf.get=="function"?Nf.get:null,mT=qf&&Map.prototype.forEach,Vf=typeof Set=="function"&&Set.prototype,zf=Object.getOwnPropertyDescriptor&&Vf?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gc=Vf&&zf&&typeof zf.get=="function"?zf.get:null,hT=Vf&&Set.prototype.forEach,wD=typeof WeakMap=="function"&&WeakMap.prototype,za=wD?WeakMap.prototype.has:null,ID=typeof WeakSet=="function"&&WeakSet.prototype,Da=ID?WeakSet.prototype.has:null,RD=typeof WeakRef=="function"&&WeakRef.prototype,gT=RD?WeakRef.prototype.deref:null,OD=Boolean.prototype.valueOf,CD=Object.prototype.toString,$D=Function.prototype.toString,kD=String.prototype.match,Hf=String.prototype.slice,qn=String.prototype.replace,ND=String.prototype.toUpperCase,yT=String.prototype.toLowerCase,AT=RegExp.prototype.test,_T=Array.prototype.concat,jr=Array.prototype.join,zD=Array.prototype.slice,vT=Math.floor,Mf=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Df=Object.getOwnPropertySymbols,jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_i=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ua=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_i||!0)?Symbol.toStringTag:null,wT=Object.prototype.propertyIsEnumerable,bT=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function PT(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||AT.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-vT(-t):vT(t);if(n!==t){var i=String(n),s=Hf.call(e,i.length+1);return qn.call(i,r,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(e,r,"$&_")}o(PT,"addNumericSeparator");var Lf=fT(),ST=Lf.custom,ET=OT(ST)?ST:null,IT={__proto__:null,double:'"',single:"'"},DD={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};kT.exports=o(function t(e,r,n,i){var s=r||{};if(cn(s,"quoteStyle")&&!cn(IT,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(cn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=cn(s,"customInspect")?s.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(cn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(cn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return $T(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return d?PT(e,l):l}if(typeof e=="bigint"){var f=String(e)+"n";return d?PT(e,f):f}var p=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof e=="object")return Ff(e)?"[Array]":"[Object]";var _=eU(s,n);if(typeof i>"u")i=[];else if(CT(i,e)>=0)return"[Circular]";function h(q,J,W){if(J&&(i=zD.call(i),i.push(J)),W){var re={depth:s.depth};return cn(s,"quoteStyle")&&(re.quoteStyle=s.quoteStyle),t(q,re,n+1,i)}return t(q,s,n+1,i)}if(o(h,"inspect"),typeof e=="function"&&!TT(e)){var g=HD(e),y=mc(e,h);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(y.length>0?" { "+jr.call(y,", ")+" }":"")}if(OT(e)){var T=_i?qn.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):jf.call(e);return typeof e=="object"&&!_i?Na(T):T}if(YD(e)){for(var P="<"+yT.call(String(e.nodeName)),x=e.attributes||[],N=0;N<x.length;N++)P+=" "+x[N].name+"="+RT(UD(x[N].value),"double",s);return P+=">",e.childNodes&&e.childNodes.length&&(P+="..."),P+="</"+yT.call(String(e.nodeName))+">",P}if(Ff(e)){if(e.length===0)return"[]";var F=mc(e,h);return _&&!QD(F)?"["+Bf(F,_)+"]":"[ "+jr.call(F,", ")+" ]"}if(jD(e)){var X=mc(e,h);return!("cause"in Error.prototype)&&"cause"in e&&!wT.call(e,"cause")?"{ ["+String(e)+"] "+jr.call(_T.call("[cause]: "+h(e.cause),X),", ")+" }":X.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+jr.call(X,", ")+" }"}if(typeof e=="object"&&c){if(ET&&typeof e[ET]=="function"&&Lf)return Lf(e,{depth:p-n});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(GD(e)){var Z=[];return mT&&mT.call(e,function(q,J){Z.push(h(J,e,!0)+" => "+h(q,e))}),xT("Map",hc.call(e),Z,_)}if(KD(e)){var G=[];return hT&&hT.call(e,function(q){G.push(h(q,e))}),xT("Set",gc.call(e),G,_)}if(WD(e))return Uf("WeakMap");if(JD(e))return Uf("WeakSet");if(ZD(e))return Uf("WeakRef");if(FD(e))return Na(h(Number(e)));if(qD(e))return Na(h(Mf.call(e)));if(BD(e))return Na(OD.call(e));if(LD(e))return Na(h(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof global<"u"&&e===global)return"{ [object globalThis] }";if(!MD(e)&&!TT(e)){var Y=mc(e,h),ee=bT?bT(e)===Object.prototype:e instanceof Object||e.constructor===Object,K=e instanceof Object?"":"null prototype",Oe=!ee&&Ua&&Object(e)===e&&Ua in e?Hf.call(Vn(e),8,-1):K?"Object":"",te=ee||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=te+(Oe||K?"["+jr.call(_T.call([],Oe||[],K||[]),": ")+"] ":"");return Y.length===0?V+"{}":_?V+"{"+Bf(Y,_)+"}":V+"{ "+jr.call(Y,", ")+" }"}return String(e)},"inspect_");function RT(t,e,r){var n=r.quoteStyle||e,i=IT[n];return i+t+i}o(RT,"wrapQuotes");function UD(t){return qn.call(String(t),/"/g,"&quot;")}o(UD,"quote");function mo(t){return!Ua||!(typeof t=="object"&&(Ua in t||typeof t[Ua]<"u"))}o(mo,"canTrustToString");function Ff(t){return Vn(t)==="[object Array]"&&mo(t)}o(Ff,"isArray");function MD(t){return Vn(t)==="[object Date]"&&mo(t)}o(MD,"isDate");function TT(t){return Vn(t)==="[object RegExp]"&&mo(t)}o(TT,"isRegExp");function jD(t){return Vn(t)==="[object Error]"&&mo(t)}o(jD,"isError");function LD(t){return Vn(t)==="[object String]"&&mo(t)}o(LD,"isString");function FD(t){return Vn(t)==="[object Number]"&&mo(t)}o(FD,"isNumber");function BD(t){return Vn(t)==="[object Boolean]"&&mo(t)}o(BD,"isBoolean");function OT(t){if(_i)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!jf)return!1;try{return jf.call(t),!0}catch{}return!1}o(OT,"isSymbol");function qD(t){if(!t||typeof t!="object"||!Mf)return!1;try{return Mf.call(t),!0}catch{}return!1}o(qD,"isBigInt");var VD=Object.prototype.hasOwnProperty||function(t){return t in this};function cn(t,e){return VD.call(t,e)}o(cn,"has");function Vn(t){return CD.call(t)}o(Vn,"toStr");function HD(t){if(t.name)return t.name;var e=kD.call($D.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}o(HD,"nameOf");function CT(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}o(CT,"indexOf");function GD(t){if(!hc||!t||typeof t!="object")return!1;try{hc.call(t);try{gc.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}o(GD,"isMap");function WD(t){if(!za||!t||typeof t!="object")return!1;try{za.call(t,za);try{Da.call(t,Da)}catch{return!0}return t instanceof WeakMap}catch{}return!1}o(WD,"isWeakMap");function ZD(t){if(!gT||!t||typeof t!="object")return!1;try{return gT.call(t),!0}catch{}return!1}o(ZD,"isWeakRef");function KD(t){if(!gc||!t||typeof t!="object")return!1;try{gc.call(t);try{hc.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}o(KD,"isSet");function JD(t){if(!Da||!t||typeof t!="object")return!1;try{Da.call(t,Da);try{za.call(t,za)}catch{return!0}return t instanceof WeakSet}catch{}return!1}o(JD,"isWeakSet");function YD(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}o(YD,"isElement");function $T(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return $T(Hf.call(t,0,e.maxStringLength),e)+n}var i=DD[e.quoteStyle||"single"];i.lastIndex=0;var s=qn.call(qn.call(t,i,"\\$1"),/[\x00-\x1f]/g,XD);return RT(s,"single",e)}o($T,"inspectString");function XD(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+ND.call(e.toString(16))}o(XD,"lowbyte");function Na(t){return"Object("+t+")"}o(Na,"markBoxed");function Uf(t){return t+" { ? }"}o(Uf,"weakCollectionOf");function xT(t,e,r,n){var i=n?Bf(r,n):jr.call(r,", ");return t+" ("+e+") {"+i+"}"}o(xT,"collectionOf");function QD(t){for(var e=0;e<t.length;e++)if(CT(t[e],`
56
- `)>=0)return!1;return!0}o(QD,"singleLineValues");function eU(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=jr.call(Array(t.indent+1)," ");else return null;return{base:r,prev:jr.call(Array(e+1),r)}}o(eU,"getIndent");function Bf(t,e){if(t.length===0)return"";var r=`
57
- `+e.prev+e.base;return r+jr.call(t,","+r)+`
58
- `+e.prev}o(Bf,"indentedJoin");function mc(t,e){var r=Ff(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=cn(t,i)?e(t[i],t):""}var s=typeof Df=="function"?Df(t):[],c;if(_i){c={};for(var d=0;d<s.length;d++)c["$"+s[d]]=s[d]}for(var l in t)cn(t,l)&&(r&&String(Number(l))===l&&l<t.length||_i&&c["$"+l]instanceof Symbol||(AT.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if(typeof Df=="function")for(var f=0;f<s.length;f++)wT.call(t,s[f])&&n.push("["+e(s[f])+"]: "+e(t[s[f]],t));return n}o(mc,"arrObjKeys")});var zT=k((m7,NT)=>{"use strict";var tU=Ma(),rU=$n(),yc=o(function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},"listGetNode"),nU=o(function(t,e){if(t){var r=yc(t,e);return r&&r.value}},"listGet"),oU=o(function(t,e,r){var n=yc(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},"listSet"),iU=o(function(t,e){return t?!!yc(t,e):!1},"listHas"),aU=o(function(t,e){if(t)return yc(t,e,!0)},"listDelete");NT.exports=o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new rU("Side channel does not contain "+tU(n))},"assert"),delete:o(function(n){var i=aU(e,n);return i&&e&&!e.next&&(e=void 0),!!i},"delete"),get:o(function(n){return nU(e,n)},"get"),has:o(function(n){return iU(e,n)},"has"),set:o(function(n,i){e||(e={next:void 0}),oU(e,n,i)},"set")};return r},"getSideChannelList")});var Gf=k((g7,MT)=>{"use strict";var DT=ea(),UT=id(),sU=UT([DT("%String.prototype.indexOf%")]);MT.exports=o(function(e,r){var n=DT(e,!!r);return typeof n=="function"&&sU(e,".prototype.")>-1?UT([n]):n},"callBoundIntrinsic")});var Wf=k((_7,LT)=>{"use strict";var uU=ea(),ja=Gf(),cU=Ma(),lU=$n(),jT=uU("%Map%",!0),dU=ja("Map.prototype.get",!0),pU=ja("Map.prototype.set",!0),fU=ja("Map.prototype.has",!0),mU=ja("Map.prototype.delete",!0),hU=ja("Map.prototype.size",!0);LT.exports=!!jT&&o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new lU("Side channel does not contain "+cU(n))},"assert"),delete:o(function(n){if(e){var i=mU(e,n);return hU(e)===0&&(e=void 0),i}return!1},"delete"),get:o(function(n){if(e)return dU(e,n)},"get"),has:o(function(n){return e?fU(e,n):!1},"has"),set:o(function(n,i){e||(e=new jT),pU(e,n,i)},"set")};return r},"getSideChannelMap")});var BT=k((b7,FT)=>{"use strict";var gU=ea(),vc=Gf(),yU=Ma(),_c=Wf(),_U=$n(),vi=gU("%WeakMap%",!0),vU=vc("WeakMap.prototype.get",!0),bU=vc("WeakMap.prototype.set",!0),PU=vc("WeakMap.prototype.has",!0),SU=vc("WeakMap.prototype.delete",!0);FT.exports=vi?o(function(){var e,r,n={assert:o(function(i){if(!n.has(i))throw new _U("Side channel does not contain "+yU(i))},"assert"),delete:o(function(i){if(vi&&i&&(typeof i=="object"||typeof i=="function")){if(e)return SU(e,i)}else if(_c&&r)return r.delete(i);return!1},"delete"),get:o(function(i){return vi&&i&&(typeof i=="object"||typeof i=="function")&&e?vU(e,i):r&&r.get(i)},"get"),has:o(function(i){return vi&&i&&(typeof i=="object"||typeof i=="function")&&e?PU(e,i):!!r&&r.has(i)},"has"),set:o(function(i,s){vi&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new vi),bU(e,i,s)):_c&&(r||(r=_c()),r.set(i,s))},"set")};return n},"getSideChannelWeakMap"):_c});var Zf=k((S7,qT)=>{"use strict";var EU=$n(),TU=Ma(),xU=zT(),AU=Wf(),wU=BT(),IU=wU||AU||xU;qT.exports=o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new EU("Side channel does not contain "+TU(n))},"assert"),delete:o(function(n){return!!e&&e.delete(n)},"delete"),get:o(function(n){return e&&e.get(n)},"get"),has:o(function(n){return!!e&&e.has(n)},"has"),set:o(function(n,i){e||(e=IU()),e.set(n,i)},"set")};return r},"getSideChannel")});var bc=k((T7,VT)=>{"use strict";var RU=String.prototype.replace,OU=/%20/g,Kf={RFC1738:"RFC1738",RFC3986:"RFC3986"};VT.exports={default:Kf.RFC3986,formatters:{RFC1738:o(function(t){return RU.call(t,OU,"+")},"RFC1738"),RFC3986:o(function(t){return String(t)},"RFC3986")},RFC1738:Kf.RFC1738,RFC3986:Kf.RFC3986}});var Qf=k((A7,HT)=>{"use strict";var CU=bc(),$U=Zf(),Jf=Object.prototype.hasOwnProperty,ho=Array.isArray,Pc=$U(),bi=o(function(e,r){return Pc.set(e,r),e},"markOverflow"),go=o(function(e){return Pc.has(e)},"isOverflow"),La=o(function(e){return Pc.get(e)},"getMaxIndex"),Xf=o(function(e,r){Pc.set(e,r)},"setMaxIndex"),Lr=(function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t})(),kU=o(function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(ho(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&(i[i.length]=n[s]);r.obj[r.prop]=i}}},"compactQueue"),Fa=o(function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},"arrayToObject"),NU=o(function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(ho(e)){var i=e.length;if(n&&typeof n.arrayLimit=="number"&&i>n.arrayLimit)return bi(Fa(e.concat(r),n),i);e[i]=r}else if(e&&typeof e=="object")if(go(e)){var s=La(e)+1;e[s]=r,Xf(e,s)}else{if(n&&n.strictMerge)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Jf.call(Object.prototype,r))&&(e[r]=!0)}else return[e,r];return e}if(!e||typeof e!="object"){if(go(r)){for(var c=Object.keys(r),d=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},l=0;l<c.length;l++){var f=parseInt(c[l],10);d[f+1]=r[c[l]]}return bi(d,La(r)+1)}var p=[e].concat(r);return n&&typeof n.arrayLimit=="number"&&p.length>n.arrayLimit?bi(Fa(p,n),p.length-1):p}var _=e;return ho(e)&&!ho(r)&&(_=Fa(e,n)),ho(e)&&ho(r)?(r.forEach(function(h,g){if(Jf.call(e,g)){var y=e[g];y&&typeof y=="object"&&h&&typeof h=="object"?e[g]=t(y,h,n):e[e.length]=h}else e[g]=h}),e):Object.keys(r).reduce(function(h,g){var y=r[g];if(Jf.call(h,g)?h[g]=t(h[g],y,n):h[g]=y,go(r)&&!go(h)&&bi(h,La(r)),go(h)){var T=parseInt(g,10);String(T)===g&&T>=0&&T>La(h)&&Xf(h,T)}return h},_)},"merge"),zU=o(function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},"assignSingleSource"),DU=o(function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},"decode"),Yf=1024,UU=o(function(e,r,n,i,s){if(e.length===0)return e;var c=e;if(typeof e=="symbol"?c=Symbol.prototype.toString.call(e):typeof e!="string"&&(c=String(e)),n==="iso-8859-1")return escape(c).replace(/%u[0-9a-f]{4}/gi,function(g){return"%26%23"+parseInt(g.slice(2),16)+"%3B"});for(var d="",l=0;l<c.length;l+=Yf){for(var f=c.length>=Yf?c.slice(l,l+Yf):c,p=[],_=0;_<f.length;++_){var h=f.charCodeAt(_);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===CU.RFC1738&&(h===40||h===41)){p[p.length]=f.charAt(_);continue}if(h<128){p[p.length]=Lr[h];continue}if(h<2048){p[p.length]=Lr[192|h>>6]+Lr[128|h&63];continue}if(h<55296||h>=57344){p[p.length]=Lr[224|h>>12]+Lr[128|h>>6&63]+Lr[128|h&63];continue}_+=1,h=65536+((h&1023)<<10|f.charCodeAt(_)&1023),p[p.length]=Lr[240|h>>18]+Lr[128|h>>12&63]+Lr[128|h>>6&63]+Lr[128|h&63]}d+=p.join("")}return d},"encode"),MU=o(function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],c=s.obj[s.prop],d=Object.keys(c),l=0;l<d.length;++l){var f=d[l],p=c[f];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r[r.length]={obj:c,prop:f},n[n.length]=p)}return kU(r),e},"compact"),jU=o(function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},"isRegExp"),LU=o(function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},"isBuffer"),FU=o(function(e,r,n,i){if(go(e)){var s=La(e)+1;return e[s]=r,Xf(e,s),e}var c=[].concat(e,r);return c.length>n?bi(Fa(c,{plainObjects:i}),c.length-1):c},"combine"),BU=o(function(e,r){if(ho(e)){for(var n=[],i=0;i<e.length;i+=1)n[n.length]=r(e[i]);return n}return r(e)},"maybeMap");HT.exports={arrayToObject:Fa,assign:zU,combine:FU,compact:MU,decode:DU,encode:UU,isBuffer:LU,isOverflow:go,isRegExp:jU,markOverflow:bi,maybeMap:BU,merge:NU}});var YT=k((I7,JT)=>{"use strict";var WT=Zf(),Sc=Qf(),Ba=bc(),qU=Object.prototype.hasOwnProperty,ZT={brackets:o(function(e){return e+"[]"},"brackets"),comma:"comma",indices:o(function(e,r){return e+"["+r+"]"},"indices"),repeat:o(function(e){return e},"repeat")},Fr=Array.isArray,VU=Array.prototype.push,KT=o(function(t,e){VU.apply(t,Fr(e)?e:[e])},"pushToArray"),HU=Date.prototype.toISOString,GT=Ba.default,mt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Sc.encode,encodeValuesOnly:!1,filter:void 0,format:GT,formatter:Ba.formatters[GT],indices:!1,serializeDate:o(function(e){return HU.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},GU=o(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),em={},WU=o(function t(e,r,n,i,s,c,d,l,f,p,_,h,g,y,T,P,x,N){for(var F=e,X=N,Z=0,G=!1;(X=X.get(em))!==void 0&&!G;){var Y=X.get(e);if(Z+=1,typeof Y<"u"){if(Y===Z)throw new RangeError("Cyclic object value");G=!0}typeof X.get(em)>"u"&&(Z=0)}if(typeof p=="function"?F=p(r,F):F instanceof Date?F=g(F):n==="comma"&&Fr(F)&&(F=Sc.maybeMap(F,function(Be){return Be instanceof Date?g(Be):Be})),F===null){if(c)return f&&!P?f(r,mt.encoder,x,"key",y):r;F=""}if(GU(F)||Sc.isBuffer(F)){if(f){var ee=P?r:f(r,mt.encoder,x,"key",y);return[T(ee)+"="+T(f(F,mt.encoder,x,"value",y))]}return[T(r)+"="+T(String(F))]}var K=[];if(typeof F>"u")return K;var Oe;if(n==="comma"&&Fr(F))P&&f&&(F=Sc.maybeMap(F,f)),Oe=[{value:F.length>0?F.join(",")||null:void 0}];else if(Fr(p))Oe=p;else{var te=Object.keys(F);Oe=_?te.sort(_):te}var V=l?String(r).replace(/\./g,"%2E"):String(r),q=i&&Fr(F)&&F.length===1?V+"[]":V;if(s&&Fr(F)&&F.length===0)return q+"[]";for(var J=0;J<Oe.length;++J){var W=Oe[J],re=typeof W=="object"&&W&&typeof W.value<"u"?W.value:F[W];if(!(d&&re===null)){var oe=h&&l?String(W).replace(/\./g,"%2E"):String(W),Ie=Fr(F)?typeof n=="function"?n(q,oe):q:q+(h?"."+oe:"["+oe+"]");N.set(e,Z);var Ce=WT();Ce.set(em,N),KT(K,t(re,Ie,n,i,s,c,d,l,n==="comma"&&P&&Fr(F)?null:f,p,_,h,g,y,T,P,x,Ce))}}return K},"stringify"),ZU=o(function(e){if(!e)return mt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||mt.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Ba.default;if(typeof e.format<"u"){if(!qU.call(Ba.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Ba.formatters[n],s=mt.filter;(typeof e.filter=="function"||Fr(e.filter))&&(s=e.filter);var c;if(e.arrayFormat in ZT?c=e.arrayFormat:"indices"in e?c=e.indices?"indices":"repeat":c=mt.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:mt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:mt.addQueryPrefix,allowDots:d,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:mt.allowEmptyArrays,arrayFormat:c,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:mt.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?mt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:mt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:mt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:mt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:mt.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:mt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:mt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:mt.strictNullHandling}},"normalizeStringifyOptions");JT.exports=function(t,e){var r=t,n=ZU(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):Fr(n.filter)&&(s=n.filter,i=s);var c=[];if(typeof r!="object"||r===null)return"";var d=ZT[n.arrayFormat],l=d==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var f=WT(),p=0;p<i.length;++p){var _=i[p],h=r[_];n.skipNulls&&h===null||KT(c,WU(h,_,d,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,f))}var g=c.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),g.length>0?y+g:""}});var ex=k((O7,QT)=>{"use strict";var Br=Qf(),Ec=Object.prototype.hasOwnProperty,tm=Array.isArray,tt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Br.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},KU=o(function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},"interpretNumericEntities"),XT=o(function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},"parseArrayValue"),JU="utf8=%26%2310003%3B",YU="utf8=%E2%9C%93",XU=o(function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=r.parameterLimit===1/0?void 0:r.parameterLimit,c=i.split(r.delimiter,r.throwOnLimitExceeded&&typeof s<"u"?s+1:s);if(r.throwOnLimitExceeded&&typeof s<"u"&&c.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var d=-1,l,f=r.charset;if(r.charsetSentinel)for(l=0;l<c.length;++l)c[l].indexOf("utf8=")===0&&(c[l]===YU?f="utf-8":c[l]===JU&&(f="iso-8859-1"),d=l,l=c.length);for(l=0;l<c.length;++l)if(l!==d){var p=c[l],_=p.indexOf("]="),h=_===-1?p.indexOf("="):_+1,g,y;if(h===-1?(g=r.decoder(p,tt.decoder,f,"key"),y=r.strictNullHandling?null:""):(g=r.decoder(p.slice(0,h),tt.decoder,f,"key"),g!==null&&(y=Br.maybeMap(XT(p.slice(h+1),r,tm(n[g])?n[g].length:0),function(P){return r.decoder(P,tt.decoder,f,"value")}))),y&&r.interpretNumericEntities&&f==="iso-8859-1"&&(y=KU(String(y))),p.indexOf("[]=")>-1&&(y=tm(y)?[y]:y),r.comma&&tm(y)&&y.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");y=Br.combine([],y,r.arrayLimit,r.plainObjects)}if(g!==null){var T=Ec.call(n,g);T&&(r.duplicates==="combine"||p.indexOf("[]=")>-1)?n[g]=Br.combine(n[g],y,r.arrayLimit,r.plainObjects):(!T||r.duplicates==="last")&&(n[g]=y)}}return n},"parseQueryStringValues"),QU=o(function(t,e,r,n){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var c=n?e:XT(e,r,i),d=t.length-1;d>=0;--d){var l,f=t[d];if(f==="[]"&&r.parseArrays)Br.isOverflow(c)?l=c:l=r.allowEmptyArrays&&(c===""||r.strictNullHandling&&c===null)?[]:Br.combine([],c,r.arrayLimit,r.plainObjects);else{l=r.plainObjects?{__proto__:null}:{};var p=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,_=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,h=parseInt(_,10),g=!isNaN(h)&&f!==_&&String(h)===_&&h>=0&&r.parseArrays;if(!r.parseArrays&&_==="")l={0:c};else if(g&&h<r.arrayLimit)l=[],l[h]=c;else{if(g&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");g?(l[h]=c,Br.markOverflow(l,h)):_!=="__proto__"&&(l[_]=c)}}c=l}return c},"parseObject"),e1=o(function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&Ec.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=i.exec(n),d=c?n.slice(0,c.index):n,l=[];if(d){if(!r.plainObjects&&Ec.call(Object.prototype,d)&&!r.allowPrototypes)return;l[l.length]=d}for(var f=0;(c=s.exec(n))!==null&&f<r.depth;){f+=1;var p=c[1].slice(1,-1);if(!r.plainObjects&&Ec.call(Object.prototype,p)&&!r.allowPrototypes)return;l[l.length]=c[1]}if(c){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");l[l.length]="["+n.slice(c.index)+"]"}return l},"splitKeyIntoSegments"),t1=o(function(e,r,n,i){if(e){var s=e1(e,n);if(s)return QU(s,r,n,i)}},"parseQueryStringKeys"),r1=o(function(e){if(!e)return tt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset>"u"?tt.charset:e.charset,n=typeof e.duplicates>"u"?tt.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:tt.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:tt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:tt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:tt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:tt.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:tt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:tt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:tt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:tt.decoder,delimiter:typeof e.delimiter=="string"||Br.isRegExp(e.delimiter)?e.delimiter:tt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:tt.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:tt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:tt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:tt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:tt.strictDepth,strictMerge:typeof e.strictMerge=="boolean"?!!e.strictMerge:tt.strictMerge,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:tt.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},"normalizeParseOptions");QT.exports=function(t,e){var r=r1(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?XU(t,r):t,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(n),c=0;c<s.length;++c){var d=s[c],l=t1(d,n[d],r,typeof t=="string");i=Br.merge(i,l,r)}return r.allowSparse===!0?i:Br.compact(i)}});var rm=k(($7,tx)=>{"use strict";var n1=YT(),o1=ex(),i1=bc();tx.exports={formats:i1,parse:o1,stringify:n1}});var nx=k((nm,rx)=>{(function(t,e){typeof nm=="object"?rx.exports=e():typeof define=="function"&&define.amd?define([],e):t.urltemplate=e()})(nm,function(){function t(){}return o(t,"UrlTemplate"),t.prototype.encodeReserved=function(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(r){return/%[0-9A-Fa-f]/.test(r)||(r=encodeURI(r).replace(/%5B/g,"[").replace(/%5D/g,"]")),r}).join("")},t.prototype.encodeUnreserved=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(r){return"%"+r.charCodeAt(0).toString(16).toUpperCase()})},t.prototype.encodeValue=function(e,r,n){return r=e==="+"||e==="#"?this.encodeReserved(r):this.encodeUnreserved(r),n?this.encodeUnreserved(n)+"="+r:r},t.prototype.isDefined=function(e){return e!=null},t.prototype.isKeyOperator=function(e){return e===";"||e==="&"||e==="?"},t.prototype.getValues=function(e,r,n,i){var s=e[n],c=[];if(this.isDefined(s)&&s!=="")if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")s=s.toString(),i&&i!=="*"&&(s=s.substring(0,parseInt(i,10))),c.push(this.encodeValue(r,s,this.isKeyOperator(r)?n:null));else if(i==="*")Array.isArray(s)?s.filter(this.isDefined).forEach(function(l){c.push(this.encodeValue(r,l,this.isKeyOperator(r)?n:null))},this):Object.keys(s).forEach(function(l){this.isDefined(s[l])&&c.push(this.encodeValue(r,s[l],l))},this);else{var d=[];Array.isArray(s)?s.filter(this.isDefined).forEach(function(l){d.push(this.encodeValue(r,l))},this):Object.keys(s).forEach(function(l){this.isDefined(s[l])&&(d.push(this.encodeUnreserved(l)),d.push(this.encodeValue(r,s[l].toString())))},this),this.isKeyOperator(r)?c.push(this.encodeUnreserved(n)+"="+d.join(",")):d.length!==0&&c.push(d.join(","))}else r===";"?this.isDefined(s)&&c.push(this.encodeUnreserved(n)):s===""&&(r==="&"||r==="?")?c.push(this.encodeUnreserved(n)+"="):s===""&&c.push("");return c},t.prototype.parse=function(e){var r=this,n=["+","#",".","/",";","?","&"];return{expand:o(function(i){return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(s,c,d){if(c){var l=null,f=[];if(n.indexOf(c.charAt(0))!==-1&&(l=c.charAt(0),c=c.substr(1)),c.split(/,/g).forEach(function(_){var h=/([^:\*]*)(?::(\d+)|(\*))?/.exec(_);f.push.apply(f,r.getValues(i,l,h[1],h[2]||h[3]))}),l&&l!=="+"){var p=",";return l==="?"?p="&":l!=="#"&&(p=l),(f.length!==0?l:"")+f.join(p)}else return f.join(",")}else return r.encodeReserved(d)})},"expand")}},new t})});var ox=k(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.isBrowser=a1;function a1(){return typeof window<"u"}o(a1,"isBrowser")});var xc=k(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.headersToClassicHeaders=ix;Tc.marshallGaxiosResponse=s1;function ix(t){let e={};if(t instanceof Headers)t.forEach((r,n)=>{e[n]=r});else if(Array.isArray(t))for(let[r,n]of t)e[r]=n;else e=t||{};return e}o(ix,"headersToClassicHeaders");function s1(t){return Object.defineProperties(t||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:ix(t?.headers)}})}o(s1,"marshallGaxiosResponse")});var ux=k(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.sessions=void 0;Jt.request=b1;Jt.closeSession=im;var sx=require("http2"),u1=require("zlib"),c1=require("url"),l1=rm(),d1=ra(),p1=require("stream"),f1=require("util"),m1=require("process"),h1=xc(),{HTTP2_HEADER_CONTENT_ENCODING:g1,HTTP2_HEADER_CONTENT_TYPE:ax,HTTP2_HEADER_METHOD:y1,HTTP2_HEADER_PATH:_1,HTTP2_HEADER_STATUS:v1}=sx.constants,qa=!!m1.env.HTTP2_DEBUG;Jt.sessions={};async function b1(t){let e=d1(!0,{},t);e.validateStatus=e.validateStatus||P1,e.responseType=e.responseType||"json";let r=new c1.URL(e.url),n=S1(r.host);n.timeoutHandle!==void 0&&clearTimeout(n.timeoutHandle);let i=r.pathname;if(t.params&&Object.keys(t.params).length>0){let _=(t.paramsSerializer||l1.stringify)(e.params);i+=`?${_}`}let s=(0,h1.headersToClassicHeaders)(e.headers);s[_1]=i,s[y1]=t.method||"GET",e.headers=s,s[ax]||e.responseType!=="text"&&(s[ax]="application/json");let c={config:t,headers:{},status:0,data:{},statusText:""},d=[],l=n.session,f;return new Promise((p,_)=>{try{f=l.request(s).on("response",h=>{Object.assign(c,{headers:h,status:h[v1]});let g=f;if(h[g1]==="gzip"&&(g=f.pipe(u1.createGunzip())),e.responseType==="stream"){c.data=g,p(c);return}g.on("data",y=>{d.push(y)}).on("error",y=>{_(y)}).on("end",()=>{let y=Buffer.concat(d),T=y;if(y){if(e.responseType==="json")try{T=JSON.parse(y.toString("utf8"))}catch{T=y.toString("utf8")}else e.responseType==="text"?T=y.toString("utf8"):e.responseType==="arraybuffer"&&(T=y.buffer);c.data=T}if(!e.validateStatus(c.status)){let P=`Request failed with status code ${c.status}. `;if(c.data&&typeof c.data=="object"){let x=f1.inspect(c.data,{depth:5});P=`${P}
59
- '${x}`}_(new Error(P,{cause:c}))}p(c)})}).on("error",h=>{_(h)})}catch(h){im(r).then(()=>_(h)).catch(_);return}if(c.request=f,t.data){if(t.data instanceof p1.Stream)t.data.pipe(f);else if(typeof t.data=="string"){let h=Buffer.from(t.data);f.end(h)}else if(typeof t.data=="object"){let h=JSON.stringify(t.data);f.end(h)}}n.timeoutHandle=setTimeout(()=>im(r),500)})}o(b1,"request");function P1(t){return t>=200&&t<300}o(P1,"validateStatus");function S1(t){if(Jt.sessions[t])qa&&console.log(`Used cached client for ${t}`);else{qa&&console.log(`Creating client for ${t}`);let e=sx.connect(`https://${t}`);e.on("error",r=>{console.error(`*ERROR*: ${r}`),delete Jt.sessions[t]}).on("goaway",(r,n)=>{console.error(`*GOAWAY*: ${r} : ${n}`),delete Jt.sessions[t]}),Jt.sessions[t]={session:e}}return Jt.sessions[t]}o(S1,"_getClient");async function im(t){let e=Jt.sessions[t.host];if(!e)return;let{session:r}=e;delete Jt.sessions[t.host],qa&&console.error(`Closing ${t.host}`),r.close(()=>{qa&&console.error(`Closed ${t.host}`)}),setTimeout(()=>{r&&!r.destroyed&&(qa&&console.log(`Forcing close ${t.host}`),r&&r.destroy())},1e3)}o(im,"closeSession")});var cx=k((L7,E1)=>{E1.exports={name:"googleapis-common",version:"8.0.2",description:"A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",repository:{type:"git",directory:"packages/nodejs-googleapis-common",url:"https://github.com/googleapis/google-cloud-node-core.git"},main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src","!build/src/**/*.map"],scripts:{prebenchmark:"npm run compile",benchmark:"node build/benchmark/bench.js",compile:"tsc -p .",test:"c8 mocha build/test","system-test":"c8 mocha build/system-test --timeout 600000","presystem-test":"npm run compile",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",lint:"gts check","samples-test":"mocha build/samples-test",docs:"jsdoc -c .jsdoc.js",webpack:"webpack","browser-test":"karma start",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},keywords:[],author:"Google LLC",license:"Apache-2.0",dependencies:{extend:"^3.0.2",gaxios:"7.1.3","google-auth-library":"10.5.0","google-logging-utils":"1.1.3",qs:"^6.7.0","url-template":"^2.0.8"},devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/nock":"^11.0.0","@types/proxyquire":"^1.3.31","@types/qs":"^6.5.3","@types/sinon":"^21.0.0","@types/tmp":"^0.2.6","@types/url-template":"^2.0.28",c8:"^10.1.3",codecov:"^3.8.3",gts:"^6.0.2",http2spy:"^2.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","path-to-regexp":"^6.0.0",proxyquire:"^2.1.3",puppeteer:"^24.0.0",sinon:"21.0.3",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},engines:{node:">=18.0.0"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/nodejs-googleapis-common"}});var Ac=k(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.createAPIRequest=I1;var am=st(),T1=rm(),mx=require("stream"),lx=nx(),dx=ra(),um=ox(),x1=ux(),sm=xc(),hx=cx(),px=o(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function A1(t){return t!==null&&typeof t=="object"&&typeof t.pipe=="function"&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object"}o(A1,"isReadableStream");function w1(t,e){let r=new Array;return e.forEach(n=>{t[n]===void 0&&r.push(n)}),r.length>0?r:null}o(w1,"getMissingParams");function I1(t,e){if(e)fx(t).then(r=>e(null,r),e);else return fx(t)}o(I1,"createAPIRequest");async function fx(t){let e=dx(!0,{},t.context.google?._options||{},t.context._options||{},t.options),r=dx(!0,{},e.params,t.params);e.userAgentDirectives=e.userAgentDirectives||[];let n=r.media||{},i=r.requestBody;!r.requestBody&&r.resource&&(!t.requiredParams.includes("resource")||typeof r.resource!="string")&&(i=r.resource,delete r.resource),delete r.requestBody;let s=r.auth||e.auth,c=typeof n.body=="string"?"text/plain":"application/octet-stream";delete r.media,delete r.auth;let d=(0,sm.headersToClassicHeaders)(r.headers||{});R1(d,e.apiVersion),delete r.headers,Object.keys(r).forEach(g=>{if(g.slice(-1)==="_"){let y=g.slice(0,-1);r[y]=r[g],delete r[g]}});let l=w1(r,t.requiredParams);if(l)throw new Error("Missing required parameters: "+l.join(", "));if(e.url){let g=e.url;typeof g=="object"&&(g=g.toString()),e.url=lx.parse(g).expand(r)}if(t.mediaUrl&&(t.mediaUrl=lx.parse(t.mediaUrl).expand(r)),t.context._options.rootUrl!==void 0&&e.url!==void 0){let g=new URL(e.url),y=g.href.substr(g.origin.length);e.url=new URL(y,t.context._options.rootUrl).href}e.paramsSerializer=g=>T1.stringify(g,{arrayFormat:"repeat"}),t.pathParams.forEach(g=>delete r[g]),typeof s=="string"&&(r.key=r.key||s,s=void 0);function f(g){let y=px(),T=`--${y}--`,P=new mx.PassThrough({flush(F){this.push(`\r
60
- `),this.push(T),F()}}),x=new cm,N=A1(g[1].body);d["content-type"]=`multipart/related; boundary=${y}`;for(let F of g){let X=`--${y}\r
61
- content-type: ${F["content-type"]}\r
55
+ https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var xE=class{static{a(this,"GoogleAuth")}checkIsGCE=void 0;useJWTAccessWithScope;defaultServicePath;get isGCE(){return this.checkIsGCE}_findProjectIdPromise;_cachedProjectId;jsonContent=null;apiKey;cachedCredential=null;#e=null;defaultScopes;keyFilename;scopes;clientOptions={};constructor(e={}){if(this._cachedProjectId=e.projectId||null,this.cachedCredential=e.authClient||null,this.keyFilename=e.keyFilename||e.keyFile,this.scopes=e.scopes,this.clientOptions=e.clientOptions||{},this.jsonContent=e.credentials||null,this.apiKey=e.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(Xr.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);e.universeDomain&&(this.clientOptions.universeDomain=e.universeDomain)}setGapicJWTValues(e){e.defaultServicePath=this.defaultServicePath,e.useJWTAccessWithScope=this.useJWTAccessWithScope,e.defaultScopes=this.defaultScopes}getProjectId(e){if(e)this.getProjectIdAsync().then(n=>e(null,n),e);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(e){if(e instanceof Error&&e.message===Xr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw e}}async findAndCacheProjectId(){let e=null;if(e||=await this.getProductionProjectId(),e||=await this.getFileProjectId(),e||=await this.getDefaultServiceProjectId(),e||=await this.getGCEProjectId(),e||=await this.getExternalAccountClientProjectId(),e)return this._cachedProjectId=e,e;throw new Error(Xr.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let e;try{e=await Cu.universe("universe-domain"),e||=PE.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)e=PE.DEFAULT_UNIVERSE;else throw n}return e}async getUniverseDomain(){let e=(0,ak.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{e??=(await this.getClient()).universeDomain}catch{e??=PE.DEFAULT_UNIVERSE}return e}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(e={},n){let o;if(typeof e=="function"?n=e:o=e,n)this.getApplicationDefaultAsync(o).then(r=>n(null,r.credential,r.projectId),n);else return this.getApplicationDefaultAsync(o)}async getApplicationDefaultAsync(e={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let n;if(n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(e),n)return n instanceof Ha.JWT?n.scopes=this.scopes:n instanceof $u.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(e),n)return n instanceof Ha.JWT?n.scopes=this.scopes:n instanceof $u.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return e.scopes=this.getAnyScopes(),await this.#t(new uV.Compute(e));throw new Error(Xr.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(e,n=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let o=await this.getProjectIdOptional();return n&&(e.quotaProjectId=n),this.cachedCredential=e,{credential:e,projectId:o}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=Cu.getGCPResidency()||await Cu.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(e){let n=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!n||n.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(n,e)}catch(o){throw o instanceof Error&&(o.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${o.message}`),o}}async _tryGetApplicationCredentialsFromWellKnownFile(e){let n=null;if(this._isWindows())n=process.env.APPDATA;else{let r=process.env.HOME;r&&(n=EE.join(r,".config"))}return n&&(n=EE.join(n,"gcloud","application_default_credentials.json"),Ou.existsSync(n)||(n=null)),n?await this._getApplicationCredentialsFromFilePath(n,e):null}async _getApplicationCredentialsFromFilePath(e,n={}){if(!e||e.length===0)throw new Error("The file path is invalid.");try{if(e=Ou.realpathSync(e),!Ou.lstatSync(e).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${e} does not exist, or it is not a file. ${r.message}`),r}let o=Ou.createReadStream(e);return this.fromStream(o,n)}fromImpersonatedJSON(e){if(!e)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(e.type!==Ga.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${Ga.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!e.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!e.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let n=this.fromJSON(e.source_credentials);if(e.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${e.service_account_impersonation_url}`);let o=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(e.service_account_impersonation_url)?.groups?.target;if(!o)throw new RangeError(`Cannot extract target principal from ${e.service_account_impersonation_url}`);let r=(this.scopes||e.scopes||this.defaultScopes)??[];return new Ga.Impersonated({...e,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(e,n={}){let o,r=(0,ak.originalOrCamelOptions)(n).get("universe_domain");return e.type===ok.USER_REFRESH_ACCOUNT_TYPE?(o=new ok.UserRefreshClient(n),o.fromJSON(e)):e.type===Ga.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(e):e.type===$u.EXTERNAL_ACCOUNT_TYPE?(o=pV.ExternalAccountClient.fromJSON({...e,...n}),o.scopes=this.getAnyScopes()):e.type===ik.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new ik.ExternalAccountAuthorizedUserClient({...e,...n}):(n.scopes=this.scopes,o=new Ha.JWT(n),this.setGapicJWTValues(o),o.fromJSON(e)),r&&(o.universeDomain=r),o}_cacheClientFromJSON(e,n){let o=this.fromJSON(e,n);return this.jsonContent=e,this.cachedCredential=o,o}fromStream(e,n={},o){let r={};if(typeof n=="function"?o=n:r=n,o)this.fromStreamAsync(e,r).then(i=>o(null,i),o);else return this.fromStreamAsync(e,r)}fromStreamAsync(e,n){return new Promise((o,r)=>{if(!e)throw new Error("Must pass in a stream containing the Google auth settings.");let i=[];e.setEncoding("utf8").on("error",r).on("data",s=>i.push(s)).on("end",()=>{try{try{let s=JSON.parse(i.join("")),u=this._cacheClientFromJSON(s,n);return o(u)}catch(s){if(!this.keyFilename)throw s;let u=new Ha.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=u,this.setGapicJWTValues(u),o(u)}}catch(s){return r(s)}})})}fromAPIKey(e,n={}){return new Ha.JWT({...n,apiKey:e})}_isWindows(){let e=sV.platform();return!!(e&&e.length>=3&&e.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(e=>{(0,iV.exec)("gcloud config config-helper --format json",(n,o)=>{if(!n&&o)try{let r=JSON.parse(o).configuration.properties.core.project;e(r);return}catch{}e(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let n=await this.getClient();if(n&&n.projectId)return n.projectId}let e=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return e?e.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==$u.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Cu.project("project-id")}catch{return null}}getCredentials(e){if(e)this.getCredentialsAsync().then(n=>e(null,n),e);else return this.getCredentialsAsync()}async getCredentialsAsync(){let e=await this.getClient();if(e instanceof Ga.Impersonated)return{client_email:e.getTargetPrincipal()};if(e instanceof $u.BaseExternalAccountClient){let n=e.getServiceAccountEmail();if(n)return{client_email:n,universe_domain:e.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[n,o]=await Promise.all([Cu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(Xr.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;this.#e=this.#e||this.#r();try{return await this.#e}finally{this.#e=null}}async#r(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let e=EE.resolve(this.keyFilename),n=Ou.createReadStream(e);return await this.fromStreamAsync(n,this.clientOptions)}else if(this.apiKey){let e=await this.fromAPIKey(this.apiKey,this.clientOptions);e.scopes=this.scopes;let{credential:n}=await this.#t(e);return n}else{let{credential:e}=await this.getApplicationDefaultAsync(this.clientOptions);return e}}async getIdTokenClient(e){let n=await this.getClient();if(!("fetchIdToken"in n))throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.");return new lV.IdTokenClient({targetAudience:e,idTokenProvider:n})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(e){return(await this.getClient()).getRequestHeaders(e)}async authorizeRequest(e={}){let n=e.url,r=await(await this.getClient()).getRequestHeaders(n);return e.headers=aV.Gaxios.mergeHeaders(e.headers,r),e}async fetch(...e){return(await this.getClient()).fetch(...e)}async request(e){return(await this.getClient()).request(e)}getEnv(){return(0,dV.getEnv)()}async sign(e,n){let o=await this.getClient(),r=await this.getUniverseDomain();if(n=n||`https://iamcredentials.${r}/v1/projects/-/serviceAccounts/`,o instanceof Ga.Impersonated)return(await o.sign(e)).signedBlob;let i=(0,cV.createCrypto)();if(o instanceof Ha.JWT&&o.key)return await i.sign(o.key,e);let s=await this.getCredentials();if(!s.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(i,s.client_email,e,n)}async signBlob(e,n,o,r){let i=new URL(r+`${n}:signBlob`);return(await this.request({method:"POST",url:i.href,data:{payload:e.encodeBase64StringUtf8(o)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};Xr.GoogleAuth=xE});var ck=N(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.IAMAuth=void 0;var TE=class{static{a(this,"IAMAuth")}selector;token;constructor(e,n){this.selector=e,this.token=n,this.selector=e,this.token=n}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};Rm.IAMAuth=TE});var uk=N(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.DownscopedClient=pn.EXPIRATION_TIME_OFFSET=pn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var fV=gt(),mV=require("stream"),AE=mr(),hV=um(),gV="urn:ietf:params:oauth:grant-type:token-exchange",yV="urn:ietf:params:oauth:token-type:access_token",_V="urn:ietf:params:oauth:token-type:access_token";pn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;pn.EXPIRATION_TIME_OFFSET=300*1e3;var wE=class extends AE.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(e,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(e instanceof AE.AuthClient?{}:e),e instanceof AE.AuthClient?(this.authClient=e,this.credentialAccessBoundary=n):(this.authClient=e.authClient,this.credentialAccessBoundary=e.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw new Error("At least one access boundary rule needs to be defined.");if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>pn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${pn.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let o of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(o.availablePermissions.length===0)throw new Error("At least one permission should be defined in access boundary rules.");this.stsCredential=new hV.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(e){if(!e.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(e),this.cachedDownscopedAccessToken=e}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(n)}request(e,n){if(n)this.requestAsync(e).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(e)}async requestAsync(e,n=!1){let o;try{let r=await this.getRequestHeaders();e.headers=fV.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,r),o=await this.transporter.request(e)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof mV.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw r}return o}async refreshAccessTokenAsync(){let e=(await this.authClient.getAccessToken()).token,n={grantType:gV,requestedTokenType:yV,subjectToken:e,subjectTokenType:_V},o=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary),r=this.authClient.credentials?.expiry_date||null,i=o.expires_in?new Date().getTime()+o.expires_in*1e3:r;return this.cachedDownscopedAccessToken={access_token:o.access_token,expiry_date:i,res:o.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null}),this.cachedDownscopedAccessToken}isExpired(e){let n=new Date().getTime();return e.expiry_date?n>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}};pn.DownscopedClient=wE});var lk=N(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.PassThroughClient=void 0;var vV=mr(),IE=class extends vV.AuthClient{static{a(this,"PassThroughClient")}async request(e){return this.transporter.request(e)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Om.PassThroughClient=IE});var ku=N(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.GoogleAuth=fe.auth=fe.PassThroughClient=fe.ExternalAccountAuthorizedUserClient=fe.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=fe.ExecutableError=fe.PluggableAuthClient=fe.DownscopedClient=fe.BaseExternalAccountClient=fe.ExternalAccountClient=fe.IdentityPoolClient=fe.AwsRequestSigner=fe.AwsClient=fe.UserRefreshClient=fe.LoginTicket=fe.ClientAuthentication=fe.OAuth2Client=fe.CodeChallengeMethod=fe.Impersonated=fe.JWT=fe.JWTAccess=fe.IdTokenClient=fe.IAMAuth=fe.GCPEnv=fe.Compute=fe.DEFAULT_UNIVERSE=fe.AuthClient=fe.gaxios=fe.gcpMetadata=void 0;var dk=sk();Object.defineProperty(fe,"GoogleAuth",{enumerable:!0,get:a(function(){return dk.GoogleAuth},"get")});fe.gcpMetadata=gu();fe.gaxios=gt();var pk=mr();Object.defineProperty(fe,"AuthClient",{enumerable:!0,get:a(function(){return pk.AuthClient},"get")});Object.defineProperty(fe,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return pk.DEFAULT_UNIVERSE},"get")});var bV=hS();Object.defineProperty(fe,"Compute",{enumerable:!0,get:a(function(){return bV.Compute},"get")});var SV=_S();Object.defineProperty(fe,"GCPEnv",{enumerable:!0,get:a(function(){return SV.GCPEnv},"get")});var EV=ck();Object.defineProperty(fe,"IAMAuth",{enumerable:!0,get:a(function(){return EV.IAMAuth},"get")});var PV=yS();Object.defineProperty(fe,"IdTokenClient",{enumerable:!0,get:a(function(){return PV.IdTokenClient},"get")});var xV=zS();Object.defineProperty(fe,"JWTAccess",{enumerable:!0,get:a(function(){return xV.JWTAccess},"get")});var TV=US();Object.defineProperty(fe,"JWT",{enumerable:!0,get:a(function(){return TV.JWT},"get")});var AV=FS();Object.defineProperty(fe,"Impersonated",{enumerable:!0,get:a(function(){return AV.Impersonated},"get")});var RE=hi();Object.defineProperty(fe,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return RE.CodeChallengeMethod},"get")});Object.defineProperty(fe,"OAuth2Client",{enumerable:!0,get:a(function(){return RE.OAuth2Client},"get")});Object.defineProperty(fe,"ClientAuthentication",{enumerable:!0,get:a(function(){return RE.ClientAuthentication},"get")});var wV=dS();Object.defineProperty(fe,"LoginTicket",{enumerable:!0,get:a(function(){return wV.LoginTicket},"get")});var IV=jS();Object.defineProperty(fe,"UserRefreshClient",{enumerable:!0,get:a(function(){return IV.UserRefreshClient},"get")});var RV=aE();Object.defineProperty(fe,"AwsClient",{enumerable:!0,get:a(function(){return RV.AwsClient},"get")});var OV=nE();Object.defineProperty(fe,"AwsRequestSigner",{enumerable:!0,get:a(function(){return OV.AwsRequestSigner},"get")});var CV=tE();Object.defineProperty(fe,"IdentityPoolClient",{enumerable:!0,get:a(function(){return CV.IdentityPoolClient},"get")});var $V=_E();Object.defineProperty(fe,"ExternalAccountClient",{enumerable:!0,get:a(function(){return $V.ExternalAccountClient},"get")});var kV=Ao();Object.defineProperty(fe,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return kV.BaseExternalAccountClient},"get")});var NV=uk();Object.defineProperty(fe,"DownscopedClient",{enumerable:!0,get:a(function(){return NV.DownscopedClient},"get")});var fk=gE();Object.defineProperty(fe,"PluggableAuthClient",{enumerable:!0,get:a(function(){return fk.PluggableAuthClient},"get")});Object.defineProperty(fe,"ExecutableError",{enumerable:!0,get:a(function(){return fk.ExecutableError},"get")});var mk=SE();Object.defineProperty(fe,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return mk.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(fe,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return mk.ExternalAccountAuthorizedUserClient},"get")});var zV=lk();Object.defineProperty(fe,"PassThroughClient",{enumerable:!0,get:a(function(){return zV.PassThroughClient},"get")});var DV=new dk.GoogleAuth;fe.auth=DV});var hk=N(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.getAPI=UV;function UV(t,e,n,o){let r;if(typeof e=="string")r=e,e={};else if(typeof e=="object")r=e.version,delete e.version;else throw new Error("Argument error: Accepts only string or object");try{let i=n[r],s=new i(e,o);return Object.freeze(s)}catch(i){throw new Error(`Unable to load endpoint ${t}("${r}"): ${i.message}`)}}a(UV,"getAPI")});var yk=N((Bae,gk)=>{gk.exports=require("util").inspect});var Mu=N((qae,Uk)=>{var LE=typeof Map=="function"&&Map.prototype,CE=Object.getOwnPropertyDescriptor&&LE?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$m=LE&&CE&&typeof CE.get=="function"?CE.get:null,_k=LE&&Map.prototype.forEach,FE=typeof Set=="function"&&Set.prototype,$E=Object.getOwnPropertyDescriptor&&FE?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,km=FE&&$E&&typeof $E.get=="function"?$E.get:null,vk=FE&&Set.prototype.forEach,MV=typeof WeakMap=="function"&&WeakMap.prototype,zu=MV?WeakMap.prototype.has:null,jV=typeof WeakSet=="function"&&WeakSet.prototype,Du=jV?WeakSet.prototype.has:null,LV=typeof WeakRef=="function"&&WeakRef.prototype,bk=LV?WeakRef.prototype.deref:null,FV=Boolean.prototype.valueOf,BV=Object.prototype.toString,qV=Function.prototype.toString,VV=String.prototype.match,BE=String.prototype.slice,wo=String.prototype.replace,ZV=String.prototype.toUpperCase,Sk=String.prototype.toLowerCase,Ok=RegExp.prototype.test,Ek=Array.prototype.concat,fn=Array.prototype.join,HV=Array.prototype.slice,Pk=Math.floor,zE=typeof BigInt=="function"?BigInt.prototype.valueOf:null,kE=Object.getOwnPropertySymbols,DE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Uu=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Wa||!0)?Symbol.toStringTag:null,Ck=Object.prototype.propertyIsEnumerable,xk=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Tk(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ok.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var o=t<0?-Pk(-t):Pk(t);if(o!==t){var r=String(o),i=BE.call(e,r.length+1);return wo.call(r,n,"$&_")+"."+wo.call(wo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wo.call(e,n,"$&_")}a(Tk,"addNumericSeparator");var UE=yk(),Ak=UE.custom,wk=Nk(Ak)?Ak:null,$k={__proto__:null,double:'"',single:"'"},GV={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Uk.exports=a(function t(e,n,o,r){var i=n||{};if(jn(i,"quoteStyle")&&!jn($k,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(jn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=jn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(jn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(jn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Dk(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return u?Tk(e,l):l}if(typeof e=="bigint"){var p=String(e)+"n";return u?Tk(e,p):p}var f=typeof i.depth>"u"?5:i.depth;if(typeof o>"u"&&(o=0),o>=f&&f>0&&typeof e=="object")return ME(e)?"[Array]":"[Object]";var y=dZ(i,o);if(typeof r>"u")r=[];else if(zk(r,e)>=0)return"[Circular]";function m(H,re,X){if(re&&(r=HV.call(r),r.push(re)),X){var ue={depth:i.depth};return jn(i,"quoteStyle")&&(ue.quoteStyle=i.quoteStyle),t(H,ue,o+1,r)}return t(H,i,o+1,r)}if(a(m,"inspect"),typeof e=="function"&&!Ik(e)){var h=rZ(e),_=Cm(e,m);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(_.length>0?" { "+fn.call(_,", ")+" }":"")}if(Nk(e)){var E=Wa?wo.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):DE.call(e);return typeof e=="object"&&!Wa?Nu(E):E}if(cZ(e)){for(var P="<"+Sk.call(String(e.nodeName)),x=e.attributes||[],z=0;z<x.length;z++)P+=" "+x[z].name+"="+kk(WV(x[z].value),"double",i);return P+=">",e.childNodes&&e.childNodes.length&&(P+="..."),P+="</"+Sk.call(String(e.nodeName))+">",P}if(ME(e)){if(e.length===0)return"[]";var M=Cm(e,m);return y&&!lZ(M)?"["+jE(M,y)+"]":"[ "+fn.call(M,", ")+" ]"}if(KV(e)){var K=Cm(e,m);return!("cause"in Error.prototype)&&"cause"in e&&!Ck.call(e,"cause")?"{ ["+String(e)+"] "+fn.call(Ek.call("[cause]: "+m(e.cause),K),", ")+" }":K.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fn.call(K,", ")+" }"}if(typeof e=="object"&&s){if(wk&&typeof e[wk]=="function"&&UE)return UE(e,{depth:f-o});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(nZ(e)){var Z=[];return _k&&_k.call(e,function(H,re){Z.push(m(re,e,!0)+" => "+m(H,e))}),Rk("Map",$m.call(e),Z,y)}if(aZ(e)){var J=[];return vk&&vk.call(e,function(H){J.push(m(H,e))}),Rk("Set",km.call(e),J,y)}if(oZ(e))return NE("WeakMap");if(sZ(e))return NE("WeakSet");if(iZ(e))return NE("WeakRef");if(YV(e))return Nu(m(Number(e)));if(eZ(e))return Nu(m(zE.call(e)));if(QV(e))return Nu(FV.call(e));if(XV(e))return Nu(m(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof global<"u"&&e===global)return"{ [object globalThis] }";if(!JV(e)&&!Ik(e)){var ee=Cm(e,m),ae=xk?xk(e)===Object.prototype:e instanceof Object||e.constructor===Object,Y=e instanceof Object?"":"null prototype",ze=!ae&&Uu&&Object(e)===e&&Uu in e?BE.call(Io(e),8,-1):Y?"Object":"",se=ae||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",G=se+(ze||Y?"["+fn.call(Ek.call([],ze||[],Y||[]),": ")+"] ":"");return ee.length===0?G+"{}":y?G+"{"+jE(ee,y)+"}":G+"{ "+fn.call(ee,", ")+" }"}return String(e)},"inspect_");function kk(t,e,n){var o=n.quoteStyle||e,r=$k[o];return r+t+r}a(kk,"wrapQuotes");function WV(t){return wo.call(String(t),/"/g,"&quot;")}a(WV,"quote");function yi(t){return!Uu||!(typeof t=="object"&&(Uu in t||typeof t[Uu]<"u"))}a(yi,"canTrustToString");function ME(t){return Io(t)==="[object Array]"&&yi(t)}a(ME,"isArray");function JV(t){return Io(t)==="[object Date]"&&yi(t)}a(JV,"isDate");function Ik(t){return Io(t)==="[object RegExp]"&&yi(t)}a(Ik,"isRegExp");function KV(t){return Io(t)==="[object Error]"&&yi(t)}a(KV,"isError");function XV(t){return Io(t)==="[object String]"&&yi(t)}a(XV,"isString");function YV(t){return Io(t)==="[object Number]"&&yi(t)}a(YV,"isNumber");function QV(t){return Io(t)==="[object Boolean]"&&yi(t)}a(QV,"isBoolean");function Nk(t){if(Wa)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!DE)return!1;try{return DE.call(t),!0}catch{}return!1}a(Nk,"isSymbol");function eZ(t){if(!t||typeof t!="object"||!zE)return!1;try{return zE.call(t),!0}catch{}return!1}a(eZ,"isBigInt");var tZ=Object.prototype.hasOwnProperty||function(t){return t in this};function jn(t,e){return tZ.call(t,e)}a(jn,"has");function Io(t){return BV.call(t)}a(Io,"toStr");function rZ(t){if(t.name)return t.name;var e=VV.call(qV.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}a(rZ,"nameOf");function zk(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,o=t.length;n<o;n++)if(t[n]===e)return n;return-1}a(zk,"indexOf");function nZ(t){if(!$m||!t||typeof t!="object")return!1;try{$m.call(t);try{km.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}a(nZ,"isMap");function oZ(t){if(!zu||!t||typeof t!="object")return!1;try{zu.call(t,zu);try{Du.call(t,Du)}catch{return!0}return t instanceof WeakMap}catch{}return!1}a(oZ,"isWeakMap");function iZ(t){if(!bk||!t||typeof t!="object")return!1;try{return bk.call(t),!0}catch{}return!1}a(iZ,"isWeakRef");function aZ(t){if(!km||!t||typeof t!="object")return!1;try{km.call(t);try{$m.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}a(aZ,"isSet");function sZ(t){if(!Du||!t||typeof t!="object")return!1;try{Du.call(t,Du);try{zu.call(t,zu)}catch{return!0}return t instanceof WeakSet}catch{}return!1}a(sZ,"isWeakSet");function cZ(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}a(cZ,"isElement");function Dk(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return Dk(BE.call(t,0,e.maxStringLength),e)+o}var r=GV[e.quoteStyle||"single"];r.lastIndex=0;var i=wo.call(wo.call(t,r,"\\$1"),/[\x00-\x1f]/g,uZ);return kk(i,"single",e)}a(Dk,"inspectString");function uZ(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+ZV.call(e.toString(16))}a(uZ,"lowbyte");function Nu(t){return"Object("+t+")"}a(Nu,"markBoxed");function NE(t){return t+" { ? }"}a(NE,"weakCollectionOf");function Rk(t,e,n,o){var r=o?jE(n,o):fn.call(n,", ");return t+" ("+e+") {"+r+"}"}a(Rk,"collectionOf");function lZ(t){for(var e=0;e<t.length;e++)if(zk(t[e],`
56
+ `)>=0)return!1;return!0}a(lZ,"singleLineValues");function dZ(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=fn.call(Array(t.indent+1)," ");else return null;return{base:n,prev:fn.call(Array(e+1),n)}}a(dZ,"getIndent");function jE(t,e){if(t.length===0)return"";var n=`
57
+ `+e.prev+e.base;return n+fn.call(t,","+n)+`
58
+ `+e.prev}a(jE,"indentedJoin");function Cm(t,e){var n=ME(t),o=[];if(n){o.length=t.length;for(var r=0;r<t.length;r++)o[r]=jn(t,r)?e(t[r],t):""}var i=typeof kE=="function"?kE(t):[],s;if(Wa){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var l in t)jn(t,l)&&(n&&String(Number(l))===l&&l<t.length||Wa&&s["$"+l]instanceof Symbol||(Ok.call(/[^\w$]/,l)?o.push(e(l,t)+": "+e(t[l],t)):o.push(l+": "+e(t[l],t))));if(typeof kE=="function")for(var p=0;p<i.length;p++)Ck.call(t,i[p])&&o.push("["+e(i[p])+"]: "+e(t[i[p]],t));return o}a(Cm,"arrObjKeys")});var jk=N((Zae,Mk)=>{"use strict";var pZ=Mu(),fZ=go(),Nm=a(function(t,e,n){for(var o=t,r;(r=o.next)!=null;o=r)if(r.key===e)return o.next=r.next,n||(r.next=t.next,t.next=r),r},"listGetNode"),mZ=a(function(t,e){if(t){var n=Nm(t,e);return n&&n.value}},"listGet"),hZ=a(function(t,e,n){var o=Nm(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}},"listSet"),gZ=a(function(t,e){return t?!!Nm(t,e):!1},"listHas"),yZ=a(function(t,e){if(t)return Nm(t,e,!0)},"listDelete");Mk.exports=a(function(){var e,n={assert:a(function(o){if(!n.has(o))throw new fZ("Side channel does not contain "+pZ(o))},"assert"),delete:a(function(o){var r=yZ(e,o);return r&&e&&!e.next&&(e=void 0),!!r},"delete"),get:a(function(o){return mZ(e,o)},"get"),has:a(function(o){return gZ(e,o)},"has"),set:a(function(o,r){e||(e={next:void 0}),hZ(e,o,r)},"set")};return n},"getSideChannelList")});var qE=N((Gae,Bk)=>{"use strict";var Lk=eu(),Fk=nb(),_Z=Fk([Lk("%String.prototype.indexOf%")]);Bk.exports=a(function(e,n){var o=Lk(e,!!n);return typeof o=="function"&&_Z(e,".prototype.")>-1?Fk([o]):o},"callBoundIntrinsic")});var VE=N((Jae,Vk)=>{"use strict";var vZ=eu(),ju=qE(),bZ=Mu(),SZ=go(),qk=vZ("%Map%",!0),EZ=ju("Map.prototype.get",!0),PZ=ju("Map.prototype.set",!0),xZ=ju("Map.prototype.has",!0),TZ=ju("Map.prototype.delete",!0),AZ=ju("Map.prototype.size",!0);Vk.exports=!!qk&&a(function(){var e,n={assert:a(function(o){if(!n.has(o))throw new SZ("Side channel does not contain "+bZ(o))},"assert"),delete:a(function(o){if(e){var r=TZ(e,o);return AZ(e)===0&&(e=void 0),r}return!1},"delete"),get:a(function(o){if(e)return EZ(e,o)},"get"),has:a(function(o){return e?xZ(e,o):!1},"has"),set:a(function(o,r){e||(e=new qk),PZ(e,o,r)},"set")};return n},"getSideChannelMap")});var Hk=N((Xae,Zk)=>{"use strict";var wZ=eu(),Dm=qE(),IZ=Mu(),zm=VE(),RZ=go(),Ja=wZ("%WeakMap%",!0),OZ=Dm("WeakMap.prototype.get",!0),CZ=Dm("WeakMap.prototype.set",!0),$Z=Dm("WeakMap.prototype.has",!0),kZ=Dm("WeakMap.prototype.delete",!0);Zk.exports=Ja?a(function(){var e,n,o={assert:a(function(r){if(!o.has(r))throw new RZ("Side channel does not contain "+IZ(r))},"assert"),delete:a(function(r){if(Ja&&r&&(typeof r=="object"||typeof r=="function")){if(e)return kZ(e,r)}else if(zm&&n)return n.delete(r);return!1},"delete"),get:a(function(r){return Ja&&r&&(typeof r=="object"||typeof r=="function")&&e?OZ(e,r):n&&n.get(r)},"get"),has:a(function(r){return Ja&&r&&(typeof r=="object"||typeof r=="function")&&e?$Z(e,r):!!n&&n.has(r)},"has"),set:a(function(r,i){Ja&&r&&(typeof r=="object"||typeof r=="function")?(e||(e=new Ja),CZ(e,r,i)):zm&&(n||(n=zm()),n.set(r,i))},"set")};return o},"getSideChannelWeakMap"):zm});var ZE=N((Qae,Gk)=>{"use strict";var NZ=go(),zZ=Mu(),DZ=jk(),UZ=VE(),MZ=Hk(),jZ=MZ||UZ||DZ;Gk.exports=a(function(){var e,n={assert:a(function(o){if(!n.has(o))throw new NZ("Side channel does not contain "+zZ(o))},"assert"),delete:a(function(o){return!!e&&e.delete(o)},"delete"),get:a(function(o){return e&&e.get(o)},"get"),has:a(function(o){return!!e&&e.has(o)},"has"),set:a(function(o,r){e||(e=jZ()),e.set(o,r)},"set")};return n},"getSideChannel")});var Um=N((tse,Wk)=>{"use strict";var LZ=String.prototype.replace,FZ=/%20/g,HE={RFC1738:"RFC1738",RFC3986:"RFC3986"};Wk.exports={default:HE.RFC3986,formatters:{RFC1738:a(function(t){return LZ.call(t,FZ,"+")},"RFC1738"),RFC3986:a(function(t){return String(t)},"RFC3986")},RFC1738:HE.RFC1738,RFC3986:HE.RFC3986}});var KE=N((nse,Jk)=>{"use strict";var BZ=Um(),qZ=ZE(),GE=Object.prototype.hasOwnProperty,_i=Array.isArray,Mm=qZ(),Ka=a(function(e,n){return Mm.set(e,n),e},"markOverflow"),vi=a(function(e){return Mm.has(e)},"isOverflow"),Lu=a(function(e){return Mm.get(e)},"getMaxIndex"),JE=a(function(e,n){Mm.set(e,n)},"setMaxIndex"),mn=(function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t})(),VZ=a(function(e){for(;e.length>1;){var n=e.pop(),o=n.obj[n.prop];if(_i(o)){for(var r=[],i=0;i<o.length;++i)typeof o[i]<"u"&&(r[r.length]=o[i]);n.obj[n.prop]=r}}},"compactQueue"),Fu=a(function(e,n){for(var o=n&&n.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)typeof e[r]<"u"&&(o[r]=e[r]);return o},"arrayToObject"),ZZ=a(function t(e,n,o){if(!n)return e;if(typeof n!="object"&&typeof n!="function"){if(_i(e)){var r=e.length;if(o&&typeof o.arrayLimit=="number"&&r>o.arrayLimit)return Ka(Fu(e.concat(n),o),r);e[r]=n}else if(e&&typeof e=="object")if(vi(e)){var i=Lu(e)+1;e[i]=n,JE(e,i)}else{if(o&&o.strictMerge)return[e,n];(o&&(o.plainObjects||o.allowPrototypes)||!GE.call(Object.prototype,n))&&(e[n]=!0)}else return[e,n];return e}if(!e||typeof e!="object"){if(vi(n)){for(var s=Object.keys(n),u=o&&o.plainObjects?{__proto__:null,0:e}:{0:e},l=0;l<s.length;l++){var p=parseInt(s[l],10);u[p+1]=n[s[l]]}return Ka(u,Lu(n)+1)}var f=[e].concat(n);return o&&typeof o.arrayLimit=="number"&&f.length>o.arrayLimit?Ka(Fu(f,o),f.length-1):f}var y=e;return _i(e)&&!_i(n)&&(y=Fu(e,o)),_i(e)&&_i(n)?(n.forEach(function(m,h){if(GE.call(e,h)){var _=e[h];_&&typeof _=="object"&&m&&typeof m=="object"?e[h]=t(_,m,o):e[e.length]=m}else e[h]=m}),e):Object.keys(n).reduce(function(m,h){var _=n[h];if(GE.call(m,h)?m[h]=t(m[h],_,o):m[h]=_,vi(n)&&!vi(m)&&Ka(m,Lu(n)),vi(m)){var E=parseInt(h,10);String(E)===h&&E>=0&&E>Lu(m)&&JE(m,E)}return m},y)},"merge"),HZ=a(function(e,n){return Object.keys(n).reduce(function(o,r){return o[r]=n[r],o},e)},"assignSingleSource"),GZ=a(function(t,e,n){var o=t.replace(/\+/g," ");if(n==="iso-8859-1")return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch{return o}},"decode"),WE=1024,WZ=a(function(e,n,o,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),o==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var u="",l=0;l<s.length;l+=WE){for(var p=s.length>=WE?s.slice(l,l+WE):s,f=[],y=0;y<p.length;++y){var m=p.charCodeAt(y);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===BZ.RFC1738&&(m===40||m===41)){f[f.length]=p.charAt(y);continue}if(m<128){f[f.length]=mn[m];continue}if(m<2048){f[f.length]=mn[192|m>>6]+mn[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=mn[224|m>>12]+mn[128|m>>6&63]+mn[128|m&63];continue}y+=1,m=65536+((m&1023)<<10|p.charCodeAt(y)&1023),f[f.length]=mn[240|m>>18]+mn[128|m>>12&63]+mn[128|m>>6&63]+mn[128|m&63]}u+=f.join("")}return u},"encode"),JZ=a(function(e){for(var n=[{obj:{o:e},prop:"o"}],o=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],u=Object.keys(s),l=0;l<u.length;++l){var p=u[l],f=s[p];typeof f=="object"&&f!==null&&o.indexOf(f)===-1&&(n[n.length]={obj:s,prop:p},o[o.length]=f)}return VZ(n),e},"compact"),KZ=a(function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},"isRegExp"),XZ=a(function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},"isBuffer"),YZ=a(function(e,n,o,r){if(vi(e)){var i=Lu(e)+1;return e[i]=n,JE(e,i),e}var s=[].concat(e,n);return s.length>o?Ka(Fu(s,{plainObjects:r}),s.length-1):s},"combine"),QZ=a(function(e,n){if(_i(e)){for(var o=[],r=0;r<e.length;r+=1)o[o.length]=n(e[r]);return o}return n(e)},"maybeMap");Jk.exports={arrayToObject:Fu,assign:HZ,combine:YZ,compact:JZ,decode:GZ,encode:WZ,isBuffer:XZ,isOverflow:vi,isRegExp:KZ,markOverflow:Ka,maybeMap:QZ,merge:ZZ}});var tN=N((ise,eN)=>{"use strict";var Xk=ZE(),jm=KE(),Bu=Um(),eH=Object.prototype.hasOwnProperty,Yk={brackets:a(function(e){return e+"[]"},"brackets"),comma:"comma",indices:a(function(e,n){return e+"["+n+"]"},"indices"),repeat:a(function(e){return e},"repeat")},hn=Array.isArray,tH=Array.prototype.push,Qk=a(function(t,e){tH.apply(t,hn(e)?e:[e])},"pushToArray"),rH=Date.prototype.toISOString,Kk=Bu.default,Pt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:jm.encode,encodeValuesOnly:!1,filter:void 0,format:Kk,formatter:Bu.formatters[Kk],indices:!1,serializeDate:a(function(e){return rH.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},nH=a(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),XE={},oH=a(function t(e,n,o,r,i,s,u,l,p,f,y,m,h,_,E,P,x,z){for(var M=e,K=z,Z=0,J=!1;(K=K.get(XE))!==void 0&&!J;){var ee=K.get(e);if(Z+=1,typeof ee<"u"){if(ee===Z)throw new RangeError("Cyclic object value");J=!0}typeof K.get(XE)>"u"&&(Z=0)}if(typeof f=="function"?M=f(n,M):M instanceof Date?M=h(M):o==="comma"&&hn(M)&&(M=jm.maybeMap(M,function(Je){return Je instanceof Date?h(Je):Je})),M===null){if(s)return p&&!P?p(n,Pt.encoder,x,"key",_):n;M=""}if(nH(M)||jm.isBuffer(M)){if(p){var ae=P?n:p(n,Pt.encoder,x,"key",_);return[E(ae)+"="+E(p(M,Pt.encoder,x,"value",_))]}return[E(n)+"="+E(String(M))]}var Y=[];if(typeof M>"u")return Y;var ze;if(o==="comma"&&hn(M))P&&p&&(M=jm.maybeMap(M,p)),ze=[{value:M.length>0?M.join(",")||null:void 0}];else if(hn(f))ze=f;else{var se=Object.keys(M);ze=y?se.sort(y):se}var G=l?String(n).replace(/\./g,"%2E"):String(n),H=r&&hn(M)&&M.length===1?G+"[]":G;if(i&&hn(M)&&M.length===0)return H+"[]";for(var re=0;re<ze.length;++re){var X=ze[re],ue=typeof X=="object"&&X&&typeof X.value<"u"?X.value:M[X];if(!(u&&ue===null)){var de=m&&l?String(X).replace(/\./g,"%2E"):String(X),Ce=hn(M)?typeof o=="function"?o(H,de):H:H+(m?"."+de:"["+de+"]");z.set(e,Z);var De=Xk();De.set(XE,z),Qk(Y,t(ue,Ce,o,r,i,s,u,l,o==="comma"&&P&&hn(M)?null:p,f,y,m,h,_,E,P,x,De))}}return Y},"stringify"),iH=a(function(e){if(!e)return Pt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||Pt.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=Bu.default;if(typeof e.format<"u"){if(!eH.call(Bu.formatters,e.format))throw new TypeError("Unknown format option provided.");o=e.format}var r=Bu.formatters[o],i=Pt.filter;(typeof e.filter=="function"||hn(e.filter))&&(i=e.filter);var s;if(e.arrayFormat in Yk?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=Pt.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Pt.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Pt.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Pt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Pt.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Pt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Pt.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Pt.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Pt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Pt.encodeValuesOnly,filter:i,format:o,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Pt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Pt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Pt.strictNullHandling}},"normalizeStringifyOptions");eN.exports=function(t,e){var n=t,o=iH(e),r,i;typeof o.filter=="function"?(i=o.filter,n=i("",n)):hn(o.filter)&&(i=o.filter,r=i);var s=[];if(typeof n!="object"||n===null)return"";var u=Yk[o.arrayFormat],l=u==="comma"&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var p=Xk(),f=0;f<r.length;++f){var y=r[f],m=n[y];o.skipNulls&&m===null||Qk(s,oH(m,y,u,l,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,p))}var h=s.join(o.delimiter),_=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),h.length>0?_+h:""}});var oN=N((sse,nN)=>{"use strict";var gn=KE(),Lm=Object.prototype.hasOwnProperty,YE=Array.isArray,lt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:gn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},aH=a(function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),rN=a(function(t,e,n){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&n>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},"parseArrayValue"),sH="utf8=%26%2310003%3B",cH="utf8=%E2%9C%93",uH=a(function(e,n){var o={__proto__:null},r=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;r=r.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=r.split(n.delimiter,n.throwOnLimitExceeded&&typeof i<"u"?i+1:i);if(n.throwOnLimitExceeded&&typeof i<"u"&&s.length>i)throw new RangeError("Parameter limit exceeded. Only "+i+" parameter"+(i===1?"":"s")+" allowed.");var u=-1,l,p=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===cH?p="utf-8":s[l]===sH&&(p="iso-8859-1"),u=l,l=s.length);for(l=0;l<s.length;++l)if(l!==u){var f=s[l],y=f.indexOf("]="),m=y===-1?f.indexOf("="):y+1,h,_;if(m===-1?(h=n.decoder(f,lt.decoder,p,"key"),_=n.strictNullHandling?null:""):(h=n.decoder(f.slice(0,m),lt.decoder,p,"key"),h!==null&&(_=gn.maybeMap(rN(f.slice(m+1),n,YE(o[h])?o[h].length:0),function(P){return n.decoder(P,lt.decoder,p,"value")}))),_&&n.interpretNumericEntities&&p==="iso-8859-1"&&(_=aH(String(_))),f.indexOf("[]=")>-1&&(_=YE(_)?[_]:_),n.comma&&YE(_)&&_.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");_=gn.combine([],_,n.arrayLimit,n.plainObjects)}if(h!==null){var E=Lm.call(o,h);E&&(n.duplicates==="combine"||f.indexOf("[]=")>-1)?o[h]=gn.combine(o[h],_,n.arrayLimit,n.plainObjects):(!E||n.duplicates==="last")&&(o[h]=_)}}return o},"parseQueryStringValues"),lH=a(function(t,e,n,o){var r=0;if(t.length>0&&t[t.length-1]==="[]"){var i=t.slice(0,-1).join("");r=Array.isArray(e)&&e[i]?e[i].length:0}for(var s=o?e:rN(e,n,r),u=t.length-1;u>=0;--u){var l,p=t[u];if(p==="[]"&&n.parseArrays)gn.isOverflow(s)?l=s:l=n.allowEmptyArrays&&(s===""||n.strictNullHandling&&s===null)?[]:gn.combine([],s,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var f=p.charAt(0)==="["&&p.charAt(p.length-1)==="]"?p.slice(1,-1):p,y=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,m=parseInt(y,10),h=!isNaN(m)&&p!==y&&String(m)===y&&m>=0&&n.parseArrays;if(!n.parseArrays&&y==="")l={0:s};else if(h&&m<n.arrayLimit)l=[],l[m]=s;else{if(h&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");h?(l[m]=s,gn.markOverflow(l,m)):y!=="__proto__"&&(l[y]=s)}}s=l}return s},"parseObject"),dH=a(function(e,n){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(n.depth<=0)return!n.plainObjects&&Lm.call(Object.prototype,o)&&!n.allowPrototypes?void 0:[o];var r=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,s=r.exec(o),u=s?o.slice(0,s.index):o,l=[];if(u){if(!n.plainObjects&&Lm.call(Object.prototype,u)&&!n.allowPrototypes)return;l[l.length]=u}for(var p=0;(s=i.exec(o))!==null&&p<n.depth;){p+=1;var f=s[1].slice(1,-1);if(!n.plainObjects&&Lm.call(Object.prototype,f)&&!n.allowPrototypes)return;l[l.length]=s[1]}if(s){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");l[l.length]="["+o.slice(s.index)+"]"}return l},"splitKeyIntoSegments"),pH=a(function(e,n,o,r){if(e){var i=dH(e,o);if(i)return lH(i,n,o,r)}},"parseQueryStringKeys"),fH=a(function(e){if(!e)return lt;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var n=typeof e.charset>"u"?lt.charset:e.charset,o=typeof e.duplicates>"u"?lt.duplicates:e.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var r=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:lt.allowDots:!!e.allowDots;return{allowDots:r,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:lt.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:lt.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:lt.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:lt.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:lt.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:lt.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:lt.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:lt.decoder,delimiter:typeof e.delimiter=="string"||gn.isRegExp(e.delimiter)?e.delimiter:lt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:lt.depth,duplicates:o,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:lt.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:lt.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:lt.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:lt.strictDepth,strictMerge:typeof e.strictMerge=="boolean"?!!e.strictMerge:lt.strictMerge,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:lt.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},"normalizeParseOptions");nN.exports=function(t,e){var n=fH(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?{__proto__:null}:{};for(var o=typeof t=="string"?uH(t,n):t,r=n.plainObjects?{__proto__:null}:{},i=Object.keys(o),s=0;s<i.length;++s){var u=i[s],l=pH(u,o[u],n,typeof t=="string");r=gn.merge(r,l,n)}return n.allowSparse===!0?r:gn.compact(r)}});var QE=N((use,iN)=>{"use strict";var mH=tN(),hH=oN(),gH=Um();iN.exports={formats:gH,parse:hH,stringify:mH}});var sN=N((eP,aN)=>{(function(t,e){typeof eP=="object"?aN.exports=e():typeof define=="function"&&define.amd?define([],e):t.urltemplate=e()})(eP,function(){function t(){}return a(t,"UrlTemplate"),t.prototype.encodeReserved=function(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(n){return/%[0-9A-Fa-f]/.test(n)||(n=encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),n}).join("")},t.prototype.encodeUnreserved=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})},t.prototype.encodeValue=function(e,n,o){return n=e==="+"||e==="#"?this.encodeReserved(n):this.encodeUnreserved(n),o?this.encodeUnreserved(o)+"="+n:n},t.prototype.isDefined=function(e){return e!=null},t.prototype.isKeyOperator=function(e){return e===";"||e==="&"||e==="?"},t.prototype.getValues=function(e,n,o,r){var i=e[o],s=[];if(this.isDefined(i)&&i!=="")if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")i=i.toString(),r&&r!=="*"&&(i=i.substring(0,parseInt(r,10))),s.push(this.encodeValue(n,i,this.isKeyOperator(n)?o:null));else if(r==="*")Array.isArray(i)?i.filter(this.isDefined).forEach(function(l){s.push(this.encodeValue(n,l,this.isKeyOperator(n)?o:null))},this):Object.keys(i).forEach(function(l){this.isDefined(i[l])&&s.push(this.encodeValue(n,i[l],l))},this);else{var u=[];Array.isArray(i)?i.filter(this.isDefined).forEach(function(l){u.push(this.encodeValue(n,l))},this):Object.keys(i).forEach(function(l){this.isDefined(i[l])&&(u.push(this.encodeUnreserved(l)),u.push(this.encodeValue(n,i[l].toString())))},this),this.isKeyOperator(n)?s.push(this.encodeUnreserved(o)+"="+u.join(",")):u.length!==0&&s.push(u.join(","))}else n===";"?this.isDefined(i)&&s.push(this.encodeUnreserved(o)):i===""&&(n==="&"||n==="?")?s.push(this.encodeUnreserved(o)+"="):i===""&&s.push("");return s},t.prototype.parse=function(e){var n=this,o=["+","#",".","/",";","?","&"];return{expand:a(function(r){return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(i,s,u){if(s){var l=null,p=[];if(o.indexOf(s.charAt(0))!==-1&&(l=s.charAt(0),s=s.substr(1)),s.split(/,/g).forEach(function(y){var m=/([^:\*]*)(?::(\d+)|(\*))?/.exec(y);p.push.apply(p,n.getValues(r,l,m[1],m[2]||m[3]))}),l&&l!=="+"){var f=",";return l==="?"?f="&":l!=="#"&&(f=l),(p.length!==0?l:"")+p.join(f)}else return p.join(",")}else return n.encodeReserved(u)})},"expand")}},new t})});var cN=N(tP=>{"use strict";Object.defineProperty(tP,"__esModule",{value:!0});tP.isBrowser=yH;function yH(){return typeof window<"u"}a(yH,"isBrowser")});var Bm=N(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.headersToClassicHeaders=uN;Fm.marshallGaxiosResponse=_H;function uN(t){let e={};if(t instanceof Headers)t.forEach((n,o)=>{e[o]=n});else if(Array.isArray(t))for(let[n,o]of t)e[n]=o;else e=t||{};return e}a(uN,"headersToClassicHeaders");function _H(t){return Object.defineProperties(t||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:uN(t?.headers)}})}a(_H,"marshallGaxiosResponse")});var pN=N(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.sessions=void 0;vr.request=CH;vr.closeSession=rP;var dN=require("http2"),vH=require("zlib"),bH=require("url"),SH=QE(),EH=ru(),PH=require("stream"),xH=require("util"),TH=require("process"),AH=Bm(),{HTTP2_HEADER_CONTENT_ENCODING:wH,HTTP2_HEADER_CONTENT_TYPE:lN,HTTP2_HEADER_METHOD:IH,HTTP2_HEADER_PATH:RH,HTTP2_HEADER_STATUS:OH}=dN.constants,qu=!!TH.env.HTTP2_DEBUG;vr.sessions={};async function CH(t){let e=EH(!0,{},t);e.validateStatus=e.validateStatus||$H,e.responseType=e.responseType||"json";let n=new bH.URL(e.url),o=kH(n.host);o.timeoutHandle!==void 0&&clearTimeout(o.timeoutHandle);let r=n.pathname;if(t.params&&Object.keys(t.params).length>0){let y=(t.paramsSerializer||SH.stringify)(e.params);r+=`?${y}`}let i=(0,AH.headersToClassicHeaders)(e.headers);i[RH]=r,i[IH]=t.method||"GET",e.headers=i,i[lN]||e.responseType!=="text"&&(i[lN]="application/json");let s={config:t,headers:{},status:0,data:{},statusText:""},u=[],l=o.session,p;return new Promise((f,y)=>{try{p=l.request(i).on("response",m=>{Object.assign(s,{headers:m,status:m[OH]});let h=p;if(m[wH]==="gzip"&&(h=p.pipe(vH.createGunzip())),e.responseType==="stream"){s.data=h,f(s);return}h.on("data",_=>{u.push(_)}).on("error",_=>{y(_)}).on("end",()=>{let _=Buffer.concat(u),E=_;if(_){if(e.responseType==="json")try{E=JSON.parse(_.toString("utf8"))}catch{E=_.toString("utf8")}else e.responseType==="text"?E=_.toString("utf8"):e.responseType==="arraybuffer"&&(E=_.buffer);s.data=E}if(!e.validateStatus(s.status)){let P=`Request failed with status code ${s.status}. `;if(s.data&&typeof s.data=="object"){let x=xH.inspect(s.data,{depth:5});P=`${P}
59
+ '${x}`}y(new Error(P,{cause:s}))}f(s)})}).on("error",m=>{y(m)})}catch(m){rP(n).then(()=>y(m)).catch(y);return}if(s.request=p,t.data){if(t.data instanceof PH.Stream)t.data.pipe(p);else if(typeof t.data=="string"){let m=Buffer.from(t.data);p.end(m)}else if(typeof t.data=="object"){let m=JSON.stringify(t.data);p.end(m)}}o.timeoutHandle=setTimeout(()=>rP(n),500)})}a(CH,"request");function $H(t){return t>=200&&t<300}a($H,"validateStatus");function kH(t){if(vr.sessions[t])qu&&console.log(`Used cached client for ${t}`);else{qu&&console.log(`Creating client for ${t}`);let e=dN.connect(`https://${t}`);e.on("error",n=>{console.error(`*ERROR*: ${n}`),delete vr.sessions[t]}).on("goaway",(n,o)=>{console.error(`*GOAWAY*: ${n} : ${o}`),delete vr.sessions[t]}),vr.sessions[t]={session:e}}return vr.sessions[t]}a(kH,"_getClient");async function rP(t){let e=vr.sessions[t.host];if(!e)return;let{session:n}=e;delete vr.sessions[t.host],qu&&console.error(`Closing ${t.host}`),n.close(()=>{qu&&console.error(`Closed ${t.host}`)}),setTimeout(()=>{n&&!n.destroyed&&(qu&&console.log(`Forcing close ${t.host}`),n&&n.destroy())},1e3)}a(rP,"closeSession")});var fN=N((yse,NH)=>{NH.exports={name:"googleapis-common",version:"8.0.2",description:"A common tooling library used by the googleapis npm module. You probably don't want to use this directly.",repository:{type:"git",directory:"packages/nodejs-googleapis-common",url:"https://github.com/googleapis/google-cloud-node-core.git"},main:"build/src/index.js",types:"build/src/index.d.ts",files:["build/src","!build/src/**/*.map"],scripts:{prebenchmark:"npm run compile",benchmark:"node build/benchmark/bench.js",compile:"tsc -p .",test:"c8 mocha build/test","system-test":"c8 mocha build/system-test --timeout 600000","presystem-test":"npm run compile",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",lint:"gts check","samples-test":"mocha build/samples-test",docs:"jsdoc -c .jsdoc.js",webpack:"webpack","browser-test":"karma start",prelint:"cd samples; npm link ../; npm install",clean:"gts clean",precompile:"gts clean"},keywords:[],author:"Google LLC",license:"Apache-2.0",dependencies:{extend:"^3.0.2",gaxios:"7.1.3","google-auth-library":"10.5.0","google-logging-utils":"1.1.3",qs:"^6.7.0","url-template":"^2.0.8"},devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/nock":"^11.0.0","@types/proxyquire":"^1.3.31","@types/qs":"^6.5.3","@types/sinon":"^21.0.0","@types/tmp":"^0.2.6","@types/url-template":"^2.0.28",c8:"^10.1.3",codecov:"^3.8.3",gts:"^6.0.2",http2spy:"^2.0.0","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",mocha:"^11.1.0",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","path-to-regexp":"^6.0.0",proxyquire:"^2.1.3",puppeteer:"^24.0.0",sinon:"21.0.3",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},engines:{node:">=18.0.0"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/nodejs-googleapis-common"}});var qm=N(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0});sP.createAPIRequest=jH;var nP=gt(),zH=QE(),_N=require("stream"),mN=sN(),hN=ru(),iP=cN(),DH=pN(),oP=Bm(),vN=fN(),gN=a(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function UH(t){return t!==null&&typeof t=="object"&&typeof t.pipe=="function"&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object"}a(UH,"isReadableStream");function MH(t,e){let n=new Array;return e.forEach(o=>{t[o]===void 0&&n.push(o)}),n.length>0?n:null}a(MH,"getMissingParams");function jH(t,e){if(e)yN(t).then(n=>e(null,n),e);else return yN(t)}a(jH,"createAPIRequest");async function yN(t){let e=hN(!0,{},t.context.google?._options||{},t.context._options||{},t.options),n=hN(!0,{},e.params,t.params);e.userAgentDirectives=e.userAgentDirectives||[];let o=n.media||{},r=n.requestBody;!n.requestBody&&n.resource&&(!t.requiredParams.includes("resource")||typeof n.resource!="string")&&(r=n.resource,delete n.resource),delete n.requestBody;let i=n.auth||e.auth,s=typeof o.body=="string"?"text/plain":"application/octet-stream";delete n.media,delete n.auth;let u=(0,oP.headersToClassicHeaders)(n.headers||{});LH(u,e.apiVersion),delete n.headers,Object.keys(n).forEach(h=>{if(h.slice(-1)==="_"){let _=h.slice(0,-1);n[_]=n[h],delete n[h]}});let l=MH(n,t.requiredParams);if(l)throw new Error("Missing required parameters: "+l.join(", "));if(e.url){let h=e.url;typeof h=="object"&&(h=h.toString()),e.url=mN.parse(h).expand(n)}if(t.mediaUrl&&(t.mediaUrl=mN.parse(t.mediaUrl).expand(n)),t.context._options.rootUrl!==void 0&&e.url!==void 0){let h=new URL(e.url),_=h.href.substr(h.origin.length);e.url=new URL(_,t.context._options.rootUrl).href}e.paramsSerializer=h=>zH.stringify(h,{arrayFormat:"repeat"}),t.pathParams.forEach(h=>delete n[h]),typeof i=="string"&&(n.key=n.key||i,i=void 0);function p(h){let _=gN(),E=`--${_}--`,P=new _N.PassThrough({flush(M){this.push(`\r
60
+ `),this.push(E),M()}}),x=new aP,z=UH(h[1].body);u["content-type"]=`multipart/related; boundary=${_}`;for(let M of h){let K=`--${_}\r
61
+ content-type: ${M["content-type"]}\r
62
62
  \r
63
- `;P.push(X),typeof F.body=="string"?(P.push(F.body),P.push(`\r
64
- `)):(x.on("progress",Z=>{e.onUploadProgress&&e.onUploadProgress({bytesRead:Z})}),F.body.pipe(x).pipe(P))}N||(P.push(T),P.push(null)),e.data=P}o(f,"multipartUpload");function p(g){let y=px(),T=`--${y}--`;d["content-type"]=`multipart/related; boundary=${y}`;let P="";for(let x of g){let N=`--${y}\r
63
+ `;P.push(K),typeof M.body=="string"?(P.push(M.body),P.push(`\r
64
+ `)):(x.on("progress",Z=>{e.onUploadProgress&&e.onUploadProgress({bytesRead:Z})}),M.body.pipe(x).pipe(P))}z||(P.push(E),P.push(null)),e.data=P}a(p,"multipartUpload");function f(h){let _=gN(),E=`--${_}--`;u["content-type"]=`multipart/related; boundary=${_}`;let P="";for(let x of h){let z=`--${_}\r
65
65
  content-type: ${x["content-type"]}\r
66
66
  \r
67
- `;P+=N,typeof x.body=="string"&&(P+=x.body,P+=`\r
68
- `)}P+=T,e.data=P}if(o(p,"browserMultipartUpload"),t.mediaUrl&&n.body)if(e.url=t.mediaUrl,i){r.uploadType="multipart";let g=[{"content-type":"application/json",body:JSON.stringify(i)},{"content-type":n.mimeType||i&&i.mimeType||c,body:n.body}];(0,um.isBrowser)()?p(g):f(g)}else r.uploadType="media",Object.assign(d,{"content-type":n.mimeType||c}),e.data=n.body;else e.data=i||void 0;if(e.headers=am.Gaxios.mergeHeaders(e.headers||{},d),e.params=r,!(0,um.isBrowser)()){e.headers.set("Accept-Encoding","gzip"),e.userAgentDirectives.push({product:"google-api-nodejs-client",version:hx.version,comment:"gzip"});let g=e.userAgentDirectives.map(y=>{let T=`${y.product}/${y.version}`;return y.comment&&(T+=` (${y.comment})`),T}).join(" ");e.headers.set("User-Agent",g)}if(e.validateStatus||(e.validateStatus=g=>g>=200&&g<300||g===304),e.retry=e.retry===void 0?!0:e.retry,delete e.auth,e.universeDomain&&e.universe_domain&&e.universeDomain!==e.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let _=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,h=e.universeDomain??e.universe_domain??_??"googleapis.com";if(h!=="googleapis.com"&&e.url){let g=new URL(e.url);g.hostname.endsWith(".googleapis.com")&&(g.hostname=g.hostname.replace(/googleapis\.com$/,h),e.url=g.toString())}if(Object.keys(e.params).length||(delete e.params,delete e.paramsSerializer),s&&typeof s=="object"){let g=typeof s.getUniverseDomain=="function"?await s.getUniverseDomain():void 0;if(g&&h!==g)throw new Error(`The configured universe domain (${h}) does not match the universe domain found in the credentials (${g}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(e.http2){let y=await s.getRequestHeaders(e.url),T=Object.assign({},e);return T.headers=am.Gaxios.mergeHeaders(T.headers,y),x1.request(T)}else{let y=await s.request(e);return(0,sm.marshallGaxiosResponse)(y)}}else return new am.Gaxios().request(e).then(g=>(0,sm.marshallGaxiosResponse)(g))}o(fx,"createAPIRequestAsync");var cm=class extends mx.Transform{static{o(this,"ProgressStream")}bytesRead=0;_transform(e,r,n){this.bytesRead+=e.length,this.emit("progress",this.bytesRead),this.push(e),n()}};function R1(t,e){(0,um.isBrowser)()||(t["x-goog-api-client"]=`gdcl/${hx.version} gl-node/${process.versions.node}`),e&&(t["x-goog-api-version"]=e)}o(R1,"populateAPIHeader")});var gx=k(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.AuthPlus=void 0;var ln=ka(),dm=class extends ln.GoogleAuth{static{o(this,"AuthPlus")}JWT=ln.JWT;Compute=ln.Compute;OAuth2=ln.OAuth2Client;GoogleAuth=ln.GoogleAuth;AwsClient=ln.AwsClient;IdentityPoolClient=ln.IdentityPoolClient;ExternalAccountClient=ln.ExternalAccountClient;_cachedAuth;async getClient(e){return this._cachedAuth=new ln.GoogleAuth(e),this._cachedAuth.getClient()}getProjectId(e){return e?this._cachedAuth?this._cachedAuth.getProjectId(e):super.getProjectId(e):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};wc.AuthPlus=dm});var fm=k(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.Endpoint=void 0;var yx=Ac(),pm=class{static{o(this,"Endpoint")}_options;google;constructor(e){this._options=e||{}}applySchema(e,r,n,i){if(this.applyMethodsFromSchema(e,r,n,i),n.resources){for(let s in n.resources)if(Object.prototype.hasOwnProperty.call(n.resources,s)){let c=n.resources[s];e[s]||(e[s]={}),this.applySchema(e[s],r,c,i)}}}applyMethodsFromSchema(e,r,n,i){if(n.methods){for(let s in n.methods)if(Object.prototype.hasOwnProperty.call(n.methods,s)){let c=n.methods[s];e[s]=this.makeMethod(r,c,i)}}}makeMethod(e,r,n){return(i,s)=>{let c=typeof i=="function"?{}:i;s=typeof i=="function"?i:s;let d=_x(e.rootUrl+e.servicePath+r.path),l={options:{url:d.substring(1,d.length-1),method:r.httpMethod,apiVersion:r.apiVersion},params:c,requiredParams:r.parameterOrder||[],pathParams:this.getPathParams(r.parameters),context:n};if(r.mediaUpload&&r.mediaUpload.protocols&&r.mediaUpload.protocols.simple&&r.mediaUpload.protocols.simple.path){let f=_x(e.rootUrl+r.mediaUpload.protocols.simple.path);l.mediaUrl=f.substring(1,f.length-1)}if(!s)return(0,yx.createAPIRequest)(l);(0,yx.createAPIRequest)(l,s)}}getPathParams(e){let r=new Array;return typeof e!="object"&&(e={}),Object.keys(e).forEach(n=>{e[n].location==="path"&&r.push(n)}),r}};Ic.Endpoint=pm;function _x(t){return t?`'${t}'`.replace(/([^:]\/)\/+/g,"$1"):""}o(_x,"buildurl")});var bx=k(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.Discovery=void 0;var O1=require("fs"),C1=st(),$1=require("url"),vx=require("util"),k1=Ac(),N1=fm(),z1=vx.promisify(O1.readFile),mm=class{static{o(this,"Discovery")}transporter=new C1.Gaxios;options;constructor(e){this.options=e||{}}makeEndpoint(e){return r=>{let n=new N1.Endpoint(r);return n.applySchema(n,e,e,n),n}}log(...e){this.options&&this.options.debug&&console.log(...e)}async discoverAllAPIs(e){let r=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),i=(await this.transporter.request({url:e,headers:r})).data.items,s=await Promise.all(i.map(async l=>{let f=await this.discoverAPI(l.discoveryRestUrl);return{api:l,endpointCreator:f}})),c={},d={};for(let l of s)d[l.api.name]||(c[l.api.name]={},d[l.api.name]=f=>{let p=typeof f,_;if(p==="string")_=f,f={};else if(p==="object")_=f.version,delete f.version;else throw new Error("Argument error: Accepts only string or object");try{let h=l.endpointCreator(f,this);return Object.freeze(h)}catch(h){throw new Error(vx.format('Unable to load endpoint %s("%s"): %s',l.api.name,_,h.message))}}),c[l.api.name][l.api.version]=l.endpointCreator;return d}async discoverAPI(e){if(typeof e=="string"){let r=$1.parse(e);if(e&&!r.protocol){this.log("Reading from file "+e);let n=await z1(e,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(n))}else{this.log("Requesting "+e);let n=await this.transporter.request({url:e});return this.makeEndpoint(n.data)}}else{let r=e;this.log("Requesting "+r.url);let n=r.url;delete r.url;let i={options:{url:n,method:"GET"},requiredParams:[],pathParams:[],params:r,context:{google:{_options:{}},_options:{}}},s=await(0,k1.createAPIRequest)(i);return this.makeEndpoint(s.data)}}};Rc.Discovery=mm});var Oc=k(we=>{"use strict";var D1=we&&we.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),U1=we&&we.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&D1(e,t,r)};Object.defineProperty(we,"__esModule",{value:!0});we.Endpoint=we.Discovery=we.AuthPlus=we.createAPIRequest=we.getAPI=we.GaxiosError=we.Gaxios=we.AwsClient=we.IdentityPoolClient=we.BaseExternalAccountClient=we.ExternalAccountClient=we.GoogleAuth=we.UserRefreshClient=we.Compute=we.JWT=we.OAuth2Client=we.gaxios=we.googleAuthLibrary=void 0;we.googleAuthLibrary=ka();we.gaxios=st();var dn=ka();Object.defineProperty(we,"OAuth2Client",{enumerable:!0,get:o(function(){return dn.OAuth2Client},"get")});Object.defineProperty(we,"JWT",{enumerable:!0,get:o(function(){return dn.JWT},"get")});Object.defineProperty(we,"Compute",{enumerable:!0,get:o(function(){return dn.Compute},"get")});Object.defineProperty(we,"UserRefreshClient",{enumerable:!0,get:o(function(){return dn.UserRefreshClient},"get")});Object.defineProperty(we,"GoogleAuth",{enumerable:!0,get:o(function(){return dn.GoogleAuth},"get")});Object.defineProperty(we,"ExternalAccountClient",{enumerable:!0,get:o(function(){return dn.ExternalAccountClient},"get")});Object.defineProperty(we,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return dn.BaseExternalAccountClient},"get")});Object.defineProperty(we,"IdentityPoolClient",{enumerable:!0,get:o(function(){return dn.IdentityPoolClient},"get")});Object.defineProperty(we,"AwsClient",{enumerable:!0,get:o(function(){return dn.AwsClient},"get")});var Px=st();Object.defineProperty(we,"Gaxios",{enumerable:!0,get:o(function(){return Px.Gaxios},"get")});Object.defineProperty(we,"GaxiosError",{enumerable:!0,get:o(function(){return Px.GaxiosError},"get")});var M1=dT();Object.defineProperty(we,"getAPI",{enumerable:!0,get:o(function(){return M1.getAPI},"get")});var j1=Ac();Object.defineProperty(we,"createAPIRequest",{enumerable:!0,get:o(function(){return j1.createAPIRequest},"get")});var L1=gx();Object.defineProperty(we,"AuthPlus",{enumerable:!0,get:o(function(){return L1.AuthPlus},"get")});var F1=bx();Object.defineProperty(we,"Discovery",{enumerable:!0,get:o(function(){return F1.Discovery},"get")});var B1=fm();Object.defineProperty(we,"Endpoint",{enumerable:!0,get:o(function(){return B1.Endpoint},"get")});U1(xc(),we)});var Ex=k(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.people_v1=void 0;var ge=Oc(),Sx;(function(t){class e{static{o(this,"People")}context;contactGroups;otherContacts;people;constructor(l,f){this.context={_options:l||{},google:f},this.contactGroups=new r(this.context),this.otherContacts=new i(this.context),this.people=new s(this.context)}}t.People=e;class r{static{o(this,"Resource$Contactgroups")}context;members;constructor(l){this.context=l,this.members=new n(this.context)}batchGet(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/contactGroups:batchGet").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}create(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/contactGroups").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}delete(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}get(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}list(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/contactGroups").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}update(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}}t.Resource$Contactgroups=r;class n{static{o(this,"Resource$Contactgroups$Members")}context;constructor(l){this.context=l}modify(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}/members:modify").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}}t.Resource$Contactgroups$Members=n;class i{static{o(this,"Resource$Othercontacts")}context;constructor(l){this.context=l}copyOtherContactToMyContactsGroup(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}:copyOtherContactToMyContactsGroup").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}list(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/otherContacts").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}search(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/otherContacts:search").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}}t.Resource$Othercontacts=i;class s{static{o(this,"Resource$People")}context;connections;constructor(l){this.context=l,this.connections=new c(this.context)}batchCreateContacts(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:batchCreateContacts").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}batchDeleteContacts(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:batchDeleteContacts").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}batchUpdateContacts(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:batchUpdateContacts").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}createContact(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:createContact").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}deleteContact(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}:deleteContact").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}deleteContactPhoto(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}:deleteContactPhoto").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}get(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}getBatchGet(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:batchGet").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}listDirectoryPeople(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:listDirectoryPeople").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}searchContacts(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:searchContacts").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}searchDirectoryPeople(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/people:searchDirectoryPeople").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:[],pathParams:[],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}updateContact(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}:updateContact").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}updateContactPhoto(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}:updateContactPhoto").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}}t.Resource$People=s;class c{static{o(this,"Resource$People$Connections")}context;constructor(l){this.context=l}list(l,f,p){let _=l||{},h=f||{};typeof l=="function"&&(p=l,_={},h={}),typeof f=="function"&&(p=f,h={});let g=h.rootUrl||"https://people.googleapis.com/",y={options:Object.assign({url:(g+"/v1/{+resourceName}/connections").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},h),params:_,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(p)(0,ge.createAPIRequest)(y,p);else return(0,ge.createAPIRequest)(y)}}t.Resource$People$Connections=c})(Sx||(Cc.people_v1=Sx={}))});var Ax=k(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.AuthPlus=ur.people_v1=ur.auth=ur.VERSIONS=void 0;ur.people=q1;var Tx=Oc(),xx=Ex();Object.defineProperty(ur,"people_v1",{enumerable:!0,get:o(function(){return xx.people_v1},"get")});ur.VERSIONS={v1:xx.people_v1.People};function q1(t){return(0,Tx.getAPI)("people",t,ur.VERSIONS,this)}o(q1,"people");var V1=new Tx.AuthPlus;ur.auth=V1;var H1=Oc();Object.defineProperty(ur,"AuthPlus",{enumerable:!0,get:o(function(){return H1.AuthPlus},"get")})});var wx=k((hm,gm)=>{(function(t,e){typeof hm=="object"&&typeof gm<"u"?gm.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(hm,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",c="hour",d="day",l="week",f="month",p="quarter",_="year",h="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,P={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:o(function(te){var V=["th","st","nd","rd"],q=te%100;return"["+te+(V[(q-20)%10]||V[q]||V[0])+"]"},"ordinal")},x=o(function(te,V,q){var J=String(te);return!J||J.length>=V?te:""+Array(V+1-J.length).join(q)+te},"m"),N={s:x,z:o(function(te){var V=-te.utcOffset(),q=Math.abs(V),J=Math.floor(q/60),W=q%60;return(V<=0?"+":"-")+x(J,2,"0")+":"+x(W,2,"0")},"z"),m:o(function te(V,q){if(V.date()<q.date())return-te(q,V);var J=12*(q.year()-V.year())+(q.month()-V.month()),W=V.clone().add(J,f),re=q-W<0,oe=V.clone().add(J+(re?-1:1),f);return+(-(J+(q-W)/(re?W-oe:oe-W))||0)},"t"),a:o(function(te){return te<0?Math.ceil(te)||0:Math.floor(te)},"a"),p:o(function(te){return{M:f,y:_,w:l,d,D:h,h:c,m:s,s:i,ms:n,Q:p}[te]||String(te||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(te){return te===void 0},"u")},F="en",X={};X[F]=P;var Z=o(function(te){return te instanceof K},"p"),G=o(function te(V,q,J){var W;if(!V)return F;if(typeof V=="string"){var re=V.toLowerCase();X[re]&&(W=re),q&&(X[re]=q,W=re);var oe=V.split("-");if(!W&&oe.length>1)return te(oe[0])}else{var Ie=V.name;X[Ie]=V,W=Ie}return!J&&W&&(F=W),W||!J&&F},"t"),Y=o(function(te,V){if(Z(te))return te.clone();var q=typeof V=="object"?V:{};return q.date=te,q.args=arguments,new K(q)},"w"),ee=N;ee.l=G,ee.i=Z,ee.w=function(te,V){return Y(te,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var K=(function(){function te(q){this.$L=G(q.locale,null,!0),this.parse(q)}o(te,"M");var V=te.prototype;return V.parse=function(q){this.$d=(function(J){var W=J.date,re=J.utc;if(W===null)return new Date(NaN);if(ee.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var oe=W.match(y);if(oe){var Ie=oe[2]-1||0,Ce=(oe[7]||"0").substring(0,3);return re?new Date(Date.UTC(oe[1],Ie,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Ce)):new Date(oe[1],Ie,oe[3]||1,oe[4]||0,oe[5]||0,oe[6]||0,Ce)}}return new Date(W)})(q),this.$x=q.x||{},this.init()},V.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},V.$utils=function(){return ee},V.isValid=function(){return this.$d.toString()!==g},V.isSame=function(q,J){var W=Y(q);return this.startOf(J)<=W&&W<=this.endOf(J)},V.isAfter=function(q,J){return Y(q)<this.startOf(J)},V.isBefore=function(q,J){return this.endOf(J)<Y(q)},V.$g=function(q,J,W){return ee.u(q)?this[J]:this.set(W,q)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(q,J){var W=this,re=!!ee.u(J)||J,oe=ee.p(q),Ie=o(function(Nt,Fe){var qe=ee.w(W.$u?Date.UTC(W.$y,Fe,Nt):new Date(W.$y,Fe,Nt),W);return re?qe:qe.endOf(d)},"l"),Ce=o(function(Nt,Fe){return ee.w(W.toDate()[Nt].apply(W.toDate("s"),(re?[0,0,0,0]:[23,59,59,999]).slice(Fe)),W)},"$"),Be=this.$W,Ge=this.$M,ht=this.$D,Q="set"+(this.$u?"UTC":"");switch(oe){case _:return re?Ie(1,0):Ie(31,11);case f:return re?Ie(1,Ge):Ie(0,Ge+1);case l:var rt=this.$locale().weekStart||0,it=(Be<rt?Be+7:Be)-rt;return Ie(re?ht-it:ht+(6-it),Ge);case d:case h:return Ce(Q+"Hours",0);case c:return Ce(Q+"Minutes",1);case s:return Ce(Q+"Seconds",2);case i:return Ce(Q+"Milliseconds",3);default:return this.clone()}},V.endOf=function(q){return this.startOf(q,!1)},V.$set=function(q,J){var W,re=ee.p(q),oe="set"+(this.$u?"UTC":""),Ie=(W={},W[d]=oe+"Date",W[h]=oe+"Date",W[f]=oe+"Month",W[_]=oe+"FullYear",W[c]=oe+"Hours",W[s]=oe+"Minutes",W[i]=oe+"Seconds",W[n]=oe+"Milliseconds",W)[re],Ce=re===d?this.$D+(J-this.$W):J;if(re===f||re===_){var Be=this.clone().set(h,1);Be.$d[Ie](Ce),Be.init(),this.$d=Be.set(h,Math.min(this.$D,Be.daysInMonth())).$d}else Ie&&this.$d[Ie](Ce);return this.init(),this},V.set=function(q,J){return this.clone().$set(q,J)},V.get=function(q){return this[ee.p(q)]()},V.add=function(q,J){var W,re=this;q=Number(q);var oe=ee.p(J),Ie=o(function(Ge){var ht=Y(re);return ee.w(ht.date(ht.date()+Math.round(Ge*q)),re)},"y");if(oe===f)return this.set(f,this.$M+q);if(oe===_)return this.set(_,this.$y+q);if(oe===d)return Ie(1);if(oe===l)return Ie(7);var Ce=(W={},W[s]=e,W[c]=r,W[i]=t,W)[oe]||1,Be=this.$d.getTime()+q*Ce;return ee.w(Be,this)},V.subtract=function(q,J){return this.add(-1*q,J)},V.format=function(q){var J=this,W=this.$locale();if(!this.isValid())return W.invalidDate||g;var re=q||"YYYY-MM-DDTHH:mm:ssZ",oe=ee.z(this),Ie=this.$H,Ce=this.$m,Be=this.$M,Ge=W.weekdays,ht=W.months,Q=W.meridiem,rt=o(function(Fe,qe,b,E){return Fe&&(Fe[qe]||Fe(J,re))||b[qe].slice(0,E)},"h"),it=o(function(Fe){return ee.s(Ie%12||12,Fe,"0")},"d"),Nt=Q||function(Fe,qe,b){var E=Fe<12?"AM":"PM";return b?E.toLowerCase():E};return re.replace(T,(function(Fe,qe){return qe||(function(b){switch(b){case"YY":return String(J.$y).slice(-2);case"YYYY":return ee.s(J.$y,4,"0");case"M":return Be+1;case"MM":return ee.s(Be+1,2,"0");case"MMM":return rt(W.monthsShort,Be,ht,3);case"MMMM":return rt(ht,Be);case"D":return J.$D;case"DD":return ee.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return rt(W.weekdaysMin,J.$W,Ge,2);case"ddd":return rt(W.weekdaysShort,J.$W,Ge,3);case"dddd":return Ge[J.$W];case"H":return String(Ie);case"HH":return ee.s(Ie,2,"0");case"h":return it(1);case"hh":return it(2);case"a":return Nt(Ie,Ce,!0);case"A":return Nt(Ie,Ce,!1);case"m":return String(Ce);case"mm":return ee.s(Ce,2,"0");case"s":return String(J.$s);case"ss":return ee.s(J.$s,2,"0");case"SSS":return ee.s(J.$ms,3,"0");case"Z":return oe}return null})(Fe)||oe.replace(":","")}))},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(q,J,W){var re,oe=this,Ie=ee.p(J),Ce=Y(q),Be=(Ce.utcOffset()-this.utcOffset())*e,Ge=this-Ce,ht=o(function(){return ee.m(oe,Ce)},"D");switch(Ie){case _:re=ht()/12;break;case f:re=ht();break;case p:re=ht()/3;break;case l:re=(Ge-Be)/6048e5;break;case d:re=(Ge-Be)/864e5;break;case c:re=Ge/r;break;case s:re=Ge/e;break;case i:re=Ge/t;break;default:re=Ge}return W?re:ee.a(re)},V.daysInMonth=function(){return this.endOf(f).$D},V.$locale=function(){return X[this.$L]},V.locale=function(q,J){if(!q)return this.$L;var W=this.clone(),re=G(q,J,!0);return re&&(W.$L=re),W},V.clone=function(){return ee.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},te})(),Oe=K.prototype;return Y.prototype=Oe,[["$ms",n],["$s",i],["$m",s],["$H",c],["$W",d],["$M",f],["$y",_],["$D",h]].forEach((function(te){Oe[te[1]]=function(V){return this.$g(V,te[0],te[1])}})),Y.extend=function(te,V){return te.$i||(te(V,K,Y),te.$i=!0),Y},Y.locale=G,Y.isDayjs=Z,Y.unix=function(te){return Y(1e3*te)},Y.en=X[F],Y.Ls=X,Y.p={},Y}))});var W1={};ys(W1,{googleContacts:()=>G1});module.exports=_w(W1);var vw=Object.freeze({status:"aborted"});function ae(t,e,r){function n(d,l){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:l,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(t))return;d._zod.traits.add(t),e(d,l);let f=c.prototype,p=Object.keys(f);for(let _=0;_<p.length;_++){let h=p[_];h in d||(d[h]=f[h].bind(d))}}o(n,"init");let i=r?.Parent??Object;class s extends i{static{o(this,"Definition")}}Object.defineProperty(s,"name",{value:t});function c(d){var l;let f=r?.Parent?new s:this;n(f,d),(l=f._zod).deferred??(l.deferred=[]);for(let p of f._zod.deferred)p();return f}return o(c,"_"),Object.defineProperty(c,"init",{value:n}),Object.defineProperty(c,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(t),"value")}),Object.defineProperty(c,"name",{value:t}),c}o(ae,"$constructor");var xr=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},_s=class extends Error{static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},al={};function Jr(t){return t&&Object.assign(al,t),al}o(Jr,"config");function ul(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}o(ul,"getEnumValues");function Ph(t,e){return typeof e=="bigint"?e.toString():e}o(Ph,"jsonStringifyReplacer");function bs(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(bs,"cached");function Sh(t){return t==null}o(Sh,"nullish");function Ps(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}o(Ps,"cleanRegex");var bh=Symbol("evaluating");function ut(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==bh)return n===void 0&&(n=bh,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}o(ut,"defineLazy");var cl="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Oi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}o(Oi,"isObject");var bw=bs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Eh(t){if(Oi(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Oi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(Eh,"isPlainObject");var Th=new Set(["string","number","symbol"]);function Co(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(Co,"escapeRegex");function Ss(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}o(Ss,"clone");function Xe(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:o(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:o(()=>e.error,"error")}:e}o(Xe,"normalizeParams");function xh(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}o(xh,"optionalKeys");var Ah={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function $o(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}o($o,"aborted");function bn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}o(bn,"prefixIssues");function vs(t){return typeof t=="string"?t:t?.message}o(vs,"unwrapMessage");function Pn(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=vs(t.inst?._zod.def?.error?.(t))??vs(e?.error?.(t))??vs(r.customError?.(t))??vs(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}o(Pn,"finalizeIssue");function wh(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}o(wh,"getLengthableOrigin");function ll(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}o(ll,"issue");var Ih=o((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Ph,2),Object.defineProperty(t,"toString",{value:o(()=>t.message,"value"),enumerable:!1})},"initializer"),Rh=ae("$ZodError",Ih),Ci=ae("$ZodError",Ih,{Parent:Error});var Sw=o(t=>(e,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new xr;if(c.issues.length){let d=new(i?.Err??t)(c.issues.map(l=>Pn(l,s,Jr())));throw cl(d,i?.callee),d}return c.value},"_parse"),Es=Sw(Ci),Ew=o(t=>async(e,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},c=e._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let d=new(i?.Err??t)(c.issues.map(l=>Pn(l,s,Jr())));throw cl(d,i?.callee),d}return c.value},"_parseAsync"),Ts=Ew(Ci),Tw=o(t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new xr;return s.issues.length?{success:!1,error:new(t??Rh)(s.issues.map(c=>Pn(c,i,Jr())))}:{success:!0,data:s.value}},"_safeParse"),$i=Tw(Ci),xw=o(t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(c=>Pn(c,i,Jr())))}:{success:!0,data:s.value}},"_safeParseAsync"),ki=xw(Ci);var Aw="(?:(?:\\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])))",ww=new RegExp(`^${Aw}$`);var Oh=o(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),Ch=/^-?\d+n?$/,$h=/^-?\d+$/,dl=/^-?\d+(?:\.\d+)?$/,kh=/^(?:true|false)$/i;var Sn=ae("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Iw={number:"number",bigint:"bigint",object:"date"};var Nh=ae("$ZodCheckGreaterThan",(t,e)=>{Sn.init(t,e);let r=Iw[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}});var zh=ae("$ZodCheckNumberFormat",(t,e)=>{Sn.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,s]=Ah[e.format];t._zod.onattach.push(c=>{let d=c._zod.bag;d.format=e.format,d.minimum=i,d.maximum=s,r&&(d.pattern=$h)}),t._zod.check=c=>{let d=c.value;if(r){if(!Number.isInteger(d)){c.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:d,inst:t});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}d<i&&c.issues.push({origin:"number",input:d,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),d>s&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}});var Dh=ae("$ZodCheckMinLength",(t,e)=>{var r;Sn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!Sh(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let c=wh(i);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});var pl=ae("$ZodCheckStringFormat",(t,e)=>{var r,n;Sn.init(t,e),t._zod.onattach.push(i=>{let s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Uh=ae("$ZodCheckRegex",(t,e)=>{pl.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}});var jh={major:4,minor:3,patch:6};var nt=ae("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=jh;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=o((c,d,l)=>{let f=$o(c),p;for(let _ of d){if(_._zod.def.when){if(!_._zod.def.when(c))continue}else if(f)continue;let h=c.issues.length,g=_._zod.check(c);if(g instanceof Promise&&l?.async===!1)throw new xr;if(p||g instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await g,c.issues.length!==h&&(f||(f=$o(c,h)))});else{if(c.issues.length===h)continue;f||(f=$o(c,h))}}return p?p.then(()=>c):c},"runChecks"),s=o((c,d,l)=>{if($o(c))return c.aborted=!0,c;let f=i(d,n,l);if(f instanceof Promise){if(l.async===!1)throw new xr;return f.then(p=>t._zod.parse(p,l))}return t._zod.parse(f,l)},"handleCanaryResult");t._zod.run=(c,d)=>{if(d.skipChecks)return t._zod.parse(c,d);if(d.direction==="backward"){let f=t._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return f instanceof Promise?f.then(p=>s(p,c,d)):s(f,c,d)}let l=t._zod.parse(c,d);if(l instanceof Promise){if(d.async===!1)throw new xr;return l.then(f=>i(f,n,d))}return i(l,n,d)}}ut(t,"~standard",()=>({validate:o(i=>{try{let s=$i(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return ki(t,i).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},"validate"),vendor:"zod",version:1}))}),ws=ae("$ZodString",(t,e)=>{nt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Oh(t._zod.bag),t._zod.parse=(r,n)=>{if(e.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:t}),r}}),fl=ae("$ZodStringFormat",(t,e)=>{pl.init(t,e),ws.init(t,e)});var Vh=ae("$ZodURL",(t,e)=>{fl.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}});var ml=ae("$ZodNumber",(t,e)=>{nt.init(t,e),t._zod.pattern=t._zod.bag.pattern??dl,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...s?{received:s}:{}}),r}}),Hh=ae("$ZodNumberFormat",(t,e)=>{zh.init(t,e),ml.init(t,e)}),hl=ae("$ZodBoolean",(t,e)=>{nt.init(t,e),t._zod.pattern=kh,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),Gh=ae("$ZodBigInt",(t,e)=>{nt.init(t,e),t._zod.pattern=Ch,t._zod.parse=(r,n)=>{if(e.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:t}),r}});var Wh=ae("$ZodAny",(t,e)=>{nt.init(t,e),t._zod.parse=r=>r}),Zh=ae("$ZodUnknown",(t,e)=>{nt.init(t,e),t._zod.parse=r=>r});var Kh=ae("$ZodVoid",(t,e)=>{nt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),Jh=ae("$ZodDate",(t,e)=>{nt.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:t}),r}});function Lh(t,e,r){t.issues.length&&e.issues.push(...bn(r,t.issues)),e.value[r]=t.value}o(Lh,"handleArrayResult");var Yh=ae("$ZodArray",(t,e)=>{nt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let s=[];for(let c=0;c<i.length;c++){let d=i[c],l=e.element._zod.run({value:d,issues:[]},n);l instanceof Promise?s.push(l.then(f=>Lh(f,r,c))):Lh(l,r,c)}return s.length?Promise.all(s).then(()=>r):r}});function As(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...bn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}o(As,"handlePropertyResult");function Rw(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=xh(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}o(Rw,"normalizeDef");function Ow(t,e,r,n,i,s){let c=[],d=i.keySet,l=i.catchall._zod,f=l.def.type,p=l.optout==="optional";for(let _ in e){if(d.has(_))continue;if(f==="never"){c.push(_);continue}let h=l.run({value:e[_],issues:[]},n);h instanceof Promise?t.push(h.then(g=>As(g,r,_,e,p))):As(h,r,_,e,p)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:e,inst:s}),t.length?Promise.all(t).then(()=>r):r}o(Ow,"handleCatchall");var Xh=ae("$ZodObject",(t,e)=>{if(nt.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let d=e.shape;Object.defineProperty(e,"shape",{get:o(()=>{let l={...d};return Object.defineProperty(e,"shape",{value:l}),l},"get")})}let n=bs(()=>Rw(e));ut(t._zod,"propValues",()=>{let d=e.shape,l={};for(let f in d){let p=d[f]._zod;if(p.values){l[f]??(l[f]=new Set);for(let _ of p.values)l[f].add(_)}}return l});let i=Oi,s=e.catchall,c;t._zod.parse=(d,l)=>{c??(c=n.value);let f=d.value;if(!i(f))return d.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),d;d.value={};let p=[],_=c.shape;for(let h of c.keys){let g=_[h],y=g._zod.optout==="optional",T=g._zod.run({value:f[h],issues:[]},l);T instanceof Promise?p.push(T.then(P=>As(P,d,h,f,y))):As(T,d,h,f,y)}return s?Ow(p,f,d,l,n.value,t):p.length?Promise.all(p).then(()=>d):d}});function Fh(t,e,r,n){for(let s of t)if(s.issues.length===0)return e.value=s.value,e;let i=t.filter(s=>!$o(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(c=>Pn(c,n,Jr())))}),e)}o(Fh,"handleUnionResults");var gl=ae("$ZodUnion",(t,e)=>{nt.init(t,e),ut(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ut(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ut(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),ut(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Ps(s.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(r)return n(i,s);let c=!1,d=[];for(let l of e.options){let f=l._zod.run({value:i.value,issues:[]},s);if(f instanceof Promise)d.push(f),c=!0;else{if(f.issues.length===0)return f;d.push(f)}}return c?Promise.all(d).then(l=>Fh(l,i,t,s)):Fh(d,i,t,s)}});var Qh=ae("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,gl.init(t,e);let r=t._zod.parse;ut(t._zod,"propValues",()=>{let i={};for(let s of e.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[d,l]of Object.entries(c)){i[d]||(i[d]=new Set);for(let f of l)i[d].add(f)}}return i});let n=bs(()=>{let i=e.options,s=new Map;for(let c of i){let d=c._zod.propValues?.[e.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(c)}"`);for(let l of d){if(s.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);s.set(l,c)}}return s});t._zod.parse=(i,s)=>{let c=i.value;if(!Oi(c))return i.issues.push({code:"invalid_type",expected:"object",input:c,inst:t}),i;let d=n.value.get(c?.[e.discriminator]);return d?d._zod.run(i,s):e.unionFallback?r(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:c,path:[e.discriminator],inst:t}),i)}});var eg=ae("$ZodRecord",(t,e)=>{nt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Eh(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let s=[],c=e.keyType._zod.values;if(c){r.value={};let d=new Set;for(let f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){d.add(typeof f=="number"?f.toString():f);let p=e.valueType._zod.run({value:i[f],issues:[]},n);p instanceof Promise?s.push(p.then(_=>{_.issues.length&&r.issues.push(...bn(f,_.issues)),r.value[f]=_.value})):(p.issues.length&&r.issues.push(...bn(f,p.issues)),r.value[f]=p.value)}let l;for(let f in i)d.has(f)||(l=l??[],l.push(f));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:l})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let l=e.keyType._zod.run({value:d,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&dl.test(d)&&l.issues.length){let _=e.keyType._zod.run({value:Number(d),issues:[]},n);if(_ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");_.issues.length===0&&(l=_)}if(l.issues.length){e.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(_=>Pn(_,n,Jr())),input:d,path:[d],inst:t});continue}let p=e.valueType._zod.run({value:i[d],issues:[]},n);p instanceof Promise?s.push(p.then(_=>{_.issues.length&&r.issues.push(...bn(d,_.issues)),r.value[l.value]=_.value})):(p.issues.length&&r.issues.push(...bn(d,p.issues)),r.value[l.value]=p.value)}}return s.length?Promise.all(s).then(()=>r):r}});var tg=ae("$ZodEnum",(t,e)=>{nt.init(t,e);let r=ul(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>Th.has(typeof i)).map(i=>typeof i=="string"?Co(i):i.toString()).join("|")})$`),t._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:r,input:c,inst:t}),i}}),rg=ae("$ZodLiteral",(t,e)=>{if(nt.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Co(n):n?Co(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let s=n.value;return r.has(s)||n.issues.push({code:"invalid_value",values:e.values,input:s,inst:t}),n}});var ng=ae("$ZodTransform",(t,e)=>{nt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new _s(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(r.value=c,r));if(i instanceof Promise)throw new xr;return r.value=i,r}});function Bh(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}o(Bh,"handleOptionalResult");var og=ae("$ZodOptional",(t,e)=>{nt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",ut(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),ut(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Ps(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s=>Bh(s,r.value)):Bh(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});var ig=ae("$ZodNullable",(t,e)=>{nt.init(t,e),ut(t._zod,"optin",()=>e.innerType._zod.optin),ut(t._zod,"optout",()=>e.innerType._zod.optout),ut(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Ps(r.source)}|null)$`):void 0}),ut(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)});var ag=ae("$ZodPipe",(t,e)=>{nt.init(t,e),ut(t._zod,"values",()=>e.in._zod.values),ut(t._zod,"optin",()=>e.in._zod.optin),ut(t._zod,"optout",()=>e.out._zod.optout),ut(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let s=e.out._zod.run(r,n);return s instanceof Promise?s.then(c=>xs(c,e.in,n)):xs(s,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>xs(s,e.out,n)):xs(i,e.out,n)}});function xs(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}o(xs,"handlePipeResult");var sg=ae("$ZodCustom",(t,e)=>{Sn.init(t,e),nt.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(s=>qh(s,r,n,t));qh(i,r,n,t)}});function qh(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(ll(i))}}o(qh,"handleRefineResult");var cg;var yl=class{static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function lg(){return new yl}o(lg,"registry");(cg=globalThis).__zod_globalRegistry??(cg.__zod_globalRegistry=lg());var _l=globalThis.__zod_globalRegistry;function dg(t,e){return new t({type:"string",...Xe(e)})}o(dg,"_string");function pg(t,e){return new t({type:"string",coerce:!0,...Xe(e)})}o(pg,"_coercedString");function fg(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Xe(e)})}o(fg,"_url");function mg(t,e){return new t({type:"number",checks:[],...Xe(e)})}o(mg,"_number");function hg(t,e){return new t({type:"number",coerce:!0,checks:[],...Xe(e)})}o(hg,"_coercedNumber");function gg(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...Xe(e)})}o(gg,"_int");function yg(t,e){return new t({type:"boolean",...Xe(e)})}o(yg,"_boolean");function _g(t,e){return new t({type:"boolean",coerce:!0,...Xe(e)})}o(_g,"_coercedBoolean");function vg(t,e){return new t({type:"bigint",coerce:!0,...Xe(e)})}o(vg,"_coercedBigint");function bg(t){return new t({type:"any"})}o(bg,"_any");function Pg(t){return new t({type:"unknown"})}o(Pg,"_unknown");function Sg(t,e){return new t({type:"void",...Xe(e)})}o(Sg,"_void");function Eg(t,e){return new t({type:"date",coerce:!0,...Xe(e)})}o(Eg,"_coercedDate");function Is(t,e){return new Nh({check:"greater_than",...Xe(e),value:t,inclusive:!0})}o(Is,"_gte");function pr(t,e){return new Dh({check:"min_length",...Xe(e),minimum:t})}o(pr,"_minLength");function En(t,e){return new Uh({check:"string_format",format:"regex",...Xe(e),pattern:t})}o(En,"_regex");function Tg(t,e,r){let n=Xe(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}o(Tg,"_custom");var ct=ae("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");nt.init(t,e),t.def=e,t.type=e.type,t.parse=(r,n)=>Es(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>$i(t,r,n),t.parseAsync=async(r,n)=>Ts(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>ki(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),t.with=t.check,t.clone=(r,n)=>Ss(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.apply=r=>r(t)}),Os=ae("ZodMiniString",(t,e)=>{ws.init(t,e),ct.init(t,e)});function v(t){return dg(Os,t)}o(v,"string");var xg=ae("ZodMiniStringFormat",(t,e)=>{fl.init(t,e),Os.init(t,e)});var qw=ae("ZodMiniURL",(t,e)=>{Vh.init(t,e),xg.init(t,e)});function Ag(t){return fg(qw,t)}o(Ag,"url");var Cs=ae("ZodMiniNumber",(t,e)=>{ml.init(t,e),ct.init(t,e)});function yt(t){return mg(Cs,t)}o(yt,"number");var Vw=ae("ZodMiniNumberFormat",(t,e)=>{Hh.init(t,e),Cs.init(t,e)});function wg(t){return gg(Vw,t)}o(wg,"int");var vl=ae("ZodMiniBoolean",(t,e)=>{hl.init(t,e),ct.init(t,e)});function Me(t){return yg(vl,t)}o(Me,"boolean");var Ig=ae("ZodMiniBigInt",(t,e)=>{Gh.init(t,e),ct.init(t,e)});var Hw=ae("ZodMiniAny",(t,e)=>{Wh.init(t,e),ct.init(t,e)});function zi(){return bg(Hw)}o(zi,"any");var Gw=ae("ZodMiniUnknown",(t,e)=>{Zh.init(t,e),ct.init(t,e)});function Se(){return Pg(Gw)}o(Se,"unknown");var Ww=ae("ZodMiniVoid",(t,e)=>{Kh.init(t,e),ct.init(t,e)});function Rg(t){return Sg(Ww,t)}o(Rg,"_void");var Og=ae("ZodMiniDate",(t,e)=>{Jh.init(t,e),ct.init(t,e)});var Zw=ae("ZodMiniArray",(t,e)=>{Yh.init(t,e),ct.init(t,e)});function _e(t,e){return new Zw({type:"array",element:t,...Xe(e)})}o(_e,"array");var Kw=ae("ZodMiniObject",(t,e)=>{Xh.init(t,e),ct.init(t,e),ut(t,"shape",()=>e.shape)});function O(t,e){let r={type:"object",shape:t??{},...Xe(e)};return new Kw(r)}o(O,"object");var Jw=ae("ZodMiniUnion",(t,e)=>{gl.init(t,e),ct.init(t,e)});function Re(t,e){return new Jw({type:"union",options:t,...Xe(e)})}o(Re,"union");var Yw=ae("ZodMiniDiscriminatedUnion",(t,e)=>{Qh.init(t,e),ct.init(t,e)});function Tn(t,e,r){return new Yw({type:"union",options:e,discriminator:t,...Xe(r)})}o(Tn,"discriminatedUnion");var Xw=ae("ZodMiniRecord",(t,e)=>{eg.init(t,e),ct.init(t,e)});function Ee(t,e,r){return new Xw({type:"record",keyType:t,valueType:e,...Xe(r)})}o(Ee,"record");var Qw=ae("ZodMiniEnum",(t,e)=>{tg.init(t,e),ct.init(t,e),t.options=Object.values(e.entries)});function me(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Qw({type:"enum",entries:r,...Xe(e)})}o(me,"_enum");var eI=ae("ZodMiniLiteral",(t,e)=>{rg.init(t,e),ct.init(t,e)});function de(t,e){return new eI({type:"literal",values:Array.isArray(t)?t:[t],...Xe(e)})}o(de,"literal");var tI=ae("ZodMiniTransform",(t,e)=>{ng.init(t,e),ct.init(t,e)});function xn(t){return new tI({type:"transform",transform:t})}o(xn,"transform");var rI=ae("ZodMiniOptional",(t,e)=>{og.init(t,e),ct.init(t,e)});function L(t){return new rI({type:"optional",innerType:t})}o(L,"optional");var nI=ae("ZodMiniNullable",(t,e)=>{ig.init(t,e),ct.init(t,e)});function Di(t){return new nI({type:"nullable",innerType:t})}o(Di,"nullable");var oI=ae("ZodMiniPipe",(t,e)=>{ag.init(t,e),ct.init(t,e)});function An(t,e){return new oI({type:"pipe",in:t,out:e})}o(An,"pipe");var iI=ae("ZodMiniCustom",(t,e)=>{sg.init(t,e),ct.init(t,e)});function $s(t,e){return Tg(iI,t??(()=>!0),e)}o($s,"custom");var Ui={};ys(Ui,{bigint:()=>dI,boolean:()=>lI,date:()=>pI,number:()=>cI,string:()=>uI});function uI(t){return pg(Os,t)}o(uI,"string");function cI(t){return hg(Cs,t)}o(cI,"number");function lI(t){return _g(vl,t)}o(lI,"boolean");function dI(t){return vg(Ig,t)}o(dI,"bigint");function pI(t){return Eg(Og,t)}o(pI,"date");var Pl=O({retryOnFailure:O({defaultValue:L(Me()),hide:L(Me())}),continueOnFailure:O({defaultValue:L(Me()),hide:L(Me())})}),bl=class{constructor(e,r,n,i,s,c,d,l,f,p,_,h,g){this.name=e;this.displayName=r;this.description=n;this.props=i;this.propertyGroups=s;this.run=c;this.test=d;this.requireAuth=l;this.errorHandlingOptions=f;this.outputSchema=p;this.audience=_;this.aiMetadata=h;this.classification=g}static{o(this,"IAction")}},wn=o(t=>new bl(t.name,t.displayName,t.description,t.props,t.propertyGroups,t.run,t.test??t.run,t.requireAuth??!0,t.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},t.outputSchema,t.audience,t.aiMetadata,t.classification),"createAction");var ze=O({displayName:v(),description:L(v()),advanced:L(Me()),width:L(me(["half","full"])),icon:L(v()),placeholder:L(v())}),Te=o((t,e)=>O({type:de(e),required:Me(),defaultValue:L(zi())}),"TPropertyValue");var Ut=O({...ze.shape,...Te(v(),"SHORT_TEXT").shape}),Yr=O({...ze.shape,...Te(v(),"LONG_TEXT").shape});var $g=O({label:v(),value:Se(),description:L(v()),icon:L(v())}),ks=O({disabled:L(Me()),placeholder:L(v()),options:_e($g)});var mI=me(["cards"]),Mt=O({...ze.shape,options:ks,display:L(mI),...Te(Se(),"STATIC_DROPDOWN").shape}),Xr=O({...ze.shape,options:ks,...Te(_e(Se()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Sl=O({...ze.shape,...Te(Se(),"DROPDOWN").shape,refreshers:_e(v())}),Mi=O({...ze.shape,...Te(_e(Se()),"MULTI_SELECT_DROPDOWN").shape,refreshers:_e(v())});var Qr=O({...ze.shape,reveals:L(_e(v())),...Te(Me(),"CHECKBOX").shape});var en=O({...ze.shape,display:L(me(["stepper"])),min:L(yt()),max:L(yt()),step:L(yt()),...Te(yt(),"NUMBER").shape});var ji=O({...ze.shape,streaming:L(Me()),...Te(Se(),"FILE").shape});var Li=O({...ze.shape,...Te(v(),"DATE_TIME").shape});var kg=Ee(v(),Re([Ut,Yr,Mt,Mi,Xr,Qr,en,ji,Li])),Fi=O({...ze.shape,properties:kg,...Te(_e(Se()),"ARRAY").shape});var Ng=me(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),zg=O({preset:L(Ng),after:L(v()),before:L(v())}),El=O({...ze.shape,display:L(me(["dropdown"])),...Te(zg,"DATE_RANGE").shape});var Bi=O({...ze.shape,...Te(Re([Ee(v(),Se())]),"JSON").shape});var Dg=Re([Ut,Mt,Bi,Fi,Xr]),hI=Ee(v(),Dg),Tl=O({refreshers:_e(v()),...ze.shape,...Te(Se(),"DYNAMIC").shape});var Ns=O({...ze.shape,...Te(Rg(),"MARKDOWN").shape});var qi=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(qi||{}),ko=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(ko||{}),No=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(No||{});var Vi=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(Vi||{}),xl="both_client_credentials_and_authorization_code";var In=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(In||{}),Hi=(s=>(s.NONE="NONE",s.HEADER_PRESENT="HEADER_PRESENT",s.QUERY_PRESENT="QUERY_PRESENT",s.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",s.HEAD_REQUEST="HEAD_REQUEST",s))(Hi||{}),gI=O({strategy:me(Hi),paramName:L(v())}),Gi=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(Gi||{});var zs=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(zs||{}),Ug=O({status:L(yt()),body:L(Se()),headers:L(Ee(v(),v()))}),Mg=O({type:de("DELAY"),resumeDateTime:v(),requestIdToReply:L(v()),handlerId:L(v()),streamStepProgress:L(me(zs))}),jg=O({type:de("WEBHOOK"),requestId:v(),requestIdToReply:L(v()),response:Ug,handlerId:L(v()),streamStepProgress:L(me(zs))}),yI=Re([Mg,jg]);var _I=O({body:Se(),rawBody:L(Se()),headers:Ee(v(),v()),queryParams:Ee(v(),v())});function at(t){return t==null}o(at,"isNil");function Wi(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}o(Wi,"isEmpty");function Ds(t,e){if(t==null)throw new Error(`${e} is null or undefined`)}o(Ds,"assertNotNullOrUndefined");var Al=ft(require("crypto"),1);var vI=128,Rn,zo,bI=o(t=>{if(t<0)throw new RangeError("Wrong ID size");try{!Rn||Rn.length<t?(Rn=Buffer.allocUnsafe(t*vI),Al.default.randomFillSync(Rn),zo=0):zo+t>Rn.length&&(Al.default.randomFillSync(Rn),zo=0)}catch(e){throw Rn=void 0,e}zo+=t},"fillPool"),PI=o(t=>(bI(t|=0),Rn.subarray(zo-t,zo)),"random"),SI=o((t,e,r)=>{let n=(2<<31-Math.clz32(t.length-1|1))-1,i=Math.ceil(1.6*n*e/t.length);return(s=e)=>{if(s<=0)return"";let c="";for(;;){let d=r(i),l=i;for(;l--;)if(c+=t[d[l]&n]||"",c.length===s)return c}}},"customRandom"),Fg=o((t,e=21)=>SI(t,e,PI),"customAlphabet");var EI="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Bg=21,CV=v().check(En(new RegExp(`^[0-9a-zA-Z]{${Bg}}$`))),TI=Fg(EI,Bg);var On=An(xn(t=>t instanceof Date?t.toISOString():t),v()),Qt={id:v(),created:On,updated:On},et=o(t=>L(Di(t)),"Nullable");function wl(t){return L(Di(me(t)))}o(wl,"NullableEnum");var NV=An(xn(t=>t==="true"||t===!0?!0:t==="false"||t===!1?!1:void 0),L(Me())),Us=o(t=>An(xn(e=>Array.isArray(e)?e:e!==void 0?[e]:void 0),L(_e(t))),"OptionalArrayFromQuery");var UV=Ee(v(),Se());var Zi=(p=>(p.OPENAI="openai",p.OPENROUTER="openrouter",p.ANTHROPIC="anthropic",p.AZURE="azure",p.GOOGLE="google",p.ACTIVEPIECES="activepieces",p.CLOUDFLARE_GATEWAY="cloudflare-gateway",p.CUSTOM="custom",p.BEDROCK="bedrock",p.MISTRAL="mistral",p))(Zi||{});var KV=v().check(En(/^#[0-9A-Fa-f]{6}$/));var YV=O({filename:v(),data:Se(),type:de("file"),mimetype:L(v())});var xI=ft(Vg());var oH=O({...Qt,name:v(),permissions:_e(v()),platformId:et(v()),type:v(),userCount:L(yt())});var Hg=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(Hg||{}),Il=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Il||{}),Rl=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Rl||{});var Ol=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(Ol||{});var Cl=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Cl||{});var AI=O({mode:me(Hg),value:Se()}),wI=O({auth:L(v()),fields:Ee(v(),AI)}),II=O({pieceName:v(),pieceVersion:v(),actionName:v(),predefinedInput:L(wI)}),RI=O({type:de("PIECE"),toolName:v().check(pr(1)),pieceMetadata:II}),OI=O({type:de("none")}),CI=O({type:de("access_token"),accessToken:v()}),$I=O({type:de("api_key"),apiKey:v(),apiKeyHeader:v()}),kI=O({type:de("headers"),headers:Ee(v(),v())}),NI=Tn("type",[OI,CI,$I,kI]),Gg=O({type:de("FLOW"),toolName:v().check(pr(1)),externalFlowId:v(),flowDisplayName:L(v())}),Wg=O({type:de("MCP"),toolName:v().check(pr(1)),serverUrl:Ag(),protocol:me(Rl),auth:NI}),Zg=O({type:de("KNOWLEDGE_BASE"),toolName:v().check(pr(1)),sourceType:me(Il),sourceId:v(),sourceName:v()}),zI=Tn("type",[RI,Gg,Wg,Zg]),DI=O({displayName:v(),description:L(v()),type:me(Ol)}),Kg=O({type:de("MARKDOWN"),markdown:v()}),Do={type:de("TOOL_CALL"),input:et(Ee(v(),Se())),output:L(Se()),toolName:v(),status:me(Cl),toolCallId:v(),startTime:v(),endTime:L(v())},zH=O(Do),Jg=Tn("toolCallType",[O({...Do,toolCallType:de("PIECE"),pieceName:v(),pieceVersion:v(),actionName:v()}),O({...Do,toolCallType:de("FLOW"),displayName:v(),externalFlowId:v()}),O({...Do,toolCallType:de("MCP"),displayName:v(),serverUrl:v()}),O({...Do,toolCallType:de("KNOWLEDGE_BASE"),displayName:v(),sourceType:v()}),O({...Do,toolCallType:de("UNKNOWN"),displayName:v()})]),UI=Re([Kg,Jg]);var $l=(r=>(r.IMAGE="image",r.TEXT="text",r))($l||{}),tn=O({apiKey:v()}),MI=tn,jI=O({apiKey:v(),apiKeyHash:v()}),LI=tn,FI=tn,BI=tn,qI=tn,VI=tn,HI=tn,GI=tn,ty=O({accessKeyId:v().check(pr(1)),secretAccessKey:v().check(pr(1))}),WI=O({}),ZI=O({}),KI=O({}),JI=O({}),YI=O({}),XI=O({}),ry=O({modelId:v(),modelName:v(),modelType:me($l)}),ny=O({apiKeyHeader:v(),baseUrl:v(),models:_e(ry),defaultHeaders:L(Ee(v(),v()))}),oy=O({accountId:v(),gatewayId:v(),models:_e(ry),vertexProject:L(v()),vertexRegion:L(v())}),iy=O({resourceName:v(),apiVersion:An(xn(t=>typeof t=="string"&&t.trim().length===0?void 0:t),L(v()))}),ay=O({region:v().check(pr(1))}),QI=Re([MI,BI,qI,VI,HI,FI,LI,jI,ty,GI]),sy=Re([ny,oy,iy,ay,WI,KI,JI,YI,ZI,XI]),eR=O({id:v(),name:v(),type:me($l)}),tR=O({id:v(),name:v(),provider:me(Zi),config:sy,enabledForChat:Me()}),rR=O({provider:me(Zi),config:sy,auth:QI,platformId:v()});var jH={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Yg=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],nR=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],oR=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Xg=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],iR=["grok-4.20","grok-4.1-fast"],aR={openai:Yg,anthropic:nR,google:Xg,activepieces:[...oR.map(t=>`anthropic/${t}`),...Yg.map(t=>`openai/${t}`),...Xg.map(t=>`google/${t}`),...iR.map(t=>`x-ai/${t}`)]};var Qg=128e3,sR={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function uR({provider:t}){return t?sR[t]??Qg:Qg}o(uR,"getMaxContextTokens");var ey={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"},cR={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},lR=new Set(["anthropic","mistral"]);function Ar(t){return{chatModels:aR[t],maxContextTokens:uR({provider:t}),defaultEmbeddingModel:ey[t],supportsEmbedding:ey[t]!==void 0,supportsImageGeneration:!lR.has(t),webSearch:cR[t]}}o(Ar,"buildProviderCapabilities");var dR={openai:Ar("openai"),anthropic:Ar("anthropic"),openrouter:Ar("openrouter"),azure:Ar("azure"),google:Ar("google"),"cloudflare-gateway":Ar("cloudflare-gateway"),custom:Ar("custom"),bedrock:Ar("bedrock"),mistral:Ar("mistral"),activepieces:Ar("activepieces")};var pR=O({base64Url:v(),fileName:v(),extension:L(v())}),fR=O({mimeType:v(),url:v(),fileName:L(v())}),kl=Re([pR,fR]);var mR=Re([O({type:de("file"),value:kl}),O({type:de("markdown"),value:v(),files:L(_e(kl))})]),hR=O({sessionId:v(),message:v(),files:L(_e(v()))});var cy=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(cy||{}),ly=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(ly||{}),Nl=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Nl||{});var gR=Re([O({...Qt,name:v(),externalId:v(),type:de("STATIC_DROPDOWN"),tableId:v(),projectId:v(),data:O({options:_e(O({value:v()}))})}),O({...Qt,name:v(),externalId:v(),type:Re([de("TEXT"),de("NUMBER"),de("DATE"),de("DATETIME")]),tableId:v(),projectId:v()})]),yR=O({...Qt,name:v(),folderId:et(v()),projectId:v(),externalId:v(),status:wl(ly),trigger:wl(cy)}),_R=O({...Qt,tableId:v(),projectId:v(),cells:Ee(v(),O({updated:v(),created:v(),value:Se(),fieldName:v()}))}),vR=O({events:_e(me(Nl)),webhookUrl:v(),flowId:v()}),bR=O({fields:_e(O({id:v(),name:v()})),rows:_e(Ee(v(),v())),name:v()}),PR=O({projectId:v(),limit:L(Ui.number()),cursor:L(v()),name:L(v()),externalIds:Us(v()),folderId:L(v()),folderIds:Us(v())}),SR=O({records:_e(_e(O({fieldId:v(),value:py()}))),tableId:v()}),ER=O({cells:L(_e(O({fieldId:v(),value:py()}))),tableId:v(),agentUpdate:L(Me())}),dy=Tn("operator",[Qn("eq"),Qn("neq"),Qn("gt"),Qn("gte"),Qn("lt"),Qn("lte"),Qn("co"),uy("exists"),uy("not_exists")]),TR=O({tableId:v(),limit:L(Ui.number()),cursor:L(v()),filters:Us(dy)});function py(){return An(xn(t=>t==null?t:String(t)),Di(v()))}o(py,"coerceToString");function Qn(t){return O({fieldId:v(),operator:de(t),value:v()})}o(Qn,"valueFilter");function uy(t){return O({fieldId:v(),operator:de(t)})}o(uy,"existenceFilter");var xR=O({status:L(yt()),body:L(Se()),headers:L(Ee(v(),v()))}),AR=O({...Qt,deleted:et(On),ownerId:v(),displayName:v(),platformId:v(),externalId:et(v())});var fy=O({name:v(),description:L(v()),type:v(),required:Me()}),wR=O({pieceName:v(),triggerName:v(),input:O({toolName:v(),toolDescription:v(),inputSchema:_e(fy),returnsResponse:Me()})});var my="^[0-9]+\\.[0-9]+\\.[0-9]+$",oG=new RegExp(my),RR="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",iG=v().check(En(new RegExp(my))),aG=v().check(En(new RegExp(RR))),OR=O({packageType:de("ARCHIVE"),pieceType:me(ko),pieceName:v(),pieceVersion:v(),archiveId:v(),platformId:v()}),hy=O({packageType:de("REGISTRY"),pieceType:de("OFFICIAL"),pieceName:v(),pieceVersion:v()}),gy=O({packageType:de("REGISTRY"),pieceType:de("CUSTOM"),pieceName:v(),pieceVersion:v(),platformId:v()}),sG=Re([hy,gy]),uG=Re([OR,hy,gy]);var CR=Tn("type",[O({type:de("CRON_EXPRESSION"),cronExpression:v(),timezone:v()}),O({type:de("INTERVAL"),intervalMs:wg().check(Is(6e4))})]),cG=O({...Qt,type:me(In),projectId:v(),flowId:v(),triggerName:v(),schedule:et(CR),flowVersionId:v(),pieceName:v(),pieceVersion:v(),deleted:et(v()),simulate:Me()}),yy=(P=>(P.UNKNOWN="UNKNOWN",P.FLOW_RUN_LOG="FLOW_RUN_LOG",P.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",P.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",P.FLOW_STEP_FILE="FLOW_STEP_FILE",P.SAMPLE_DATA="SAMPLE_DATA",P.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",P.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",P.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",P.PROJECT_RELEASE="PROJECT_RELEASE",P.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",P.PLATFORM_ASSET="PLATFORM_ASSET",P.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",P.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",P.KNOWLEDGE_BASE="KNOWLEDGE_BASE",P.FLOW_BUNDLE="FLOW_BUNDLE",P))(yy||{}),_y=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(_y||{}),vy=(r=>(r.S3="S3",r.DB="DB",r))(vy||{}),lG=O({...Qt,projectId:et(v()),platformId:et(v()),type:me(yy),compression:me(_y),data:L(Se()),location:me(vy),size:et(yt()),fileName:et(v()),s3Key:et(v()),metadata:et(Ee(v(),v()))}),by=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(by||{}),Py=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Py||{}),dG=O({id:v(),email:v(),firstName:v(),status:me(Py),externalId:et(v()),platformId:et(v()),platformRole:me(by),lastName:v(),created:On,updated:On,lastActiveDate:et(On),imageUrl:et(v())});var zl=O({...ze.shape,...Te(Ee(v(),Se()),"OBJECT").shape});var Dl=O({...ze.shape,formatProperty:L(v()),...Te(v(),"RICH_TEXT").shape});var xy=O({...ze.shape,...Te(v(),"COLOR").shape});var Ul=Re([Ut,Yr,Dl,Ns,Qr,Mt,Xr,Sl,Mi,Tl,en,Fi,zl,Bi,Li,El,ji,xy]),Ae={ShortText(t){return{...t,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(t){return{...t,valueSchema:void 0,type:"CHECKBOX"}},LongText(t){return{...t,valueSchema:void 0,type:"LONG_TEXT"}},RichText(t){return{...t,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(t){return{displayName:"Markdown",required:!1,description:t.value,type:"MARKDOWN",valueSchema:void 0,variant:t.variant??"INFO"}},Number(t){return{...t,valueSchema:void 0,type:"NUMBER"}},Json(t){return{...t,valueSchema:void 0,type:"JSON"}},Array(t){return{...t,valueSchema:void 0,type:"ARRAY"}},Object(t){return{...t,valueSchema:void 0,type:"OBJECT"}},Dropdown(t){return{...t,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(t){return{...t,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(t){return{...t,valueSchema:void 0,type:"DATE_TIME"}},DateRange(t){return{...t,valueSchema:void 0,type:"DATE_RANGE"}},File(t){return{...t,valueSchema:void 0,type:"FILE"}},Custom(t){let e=t.code.toString();return{...t,code:e,valueSchema:void 0,type:"CUSTOM"}},Color(t){return{...t,valueSchema:void 0,type:"COLOR"}}};var wr=O({displayName:v(),description:L(v()),hasConnectionIdentifier:L(Me())});var Ay=O({username:v(),password:v()}),Ml=O({...wr.shape,username:O({displayName:v(),description:L(v())}),password:O({displayName:v(),description:L(v())}),...Te(Ay,"BASIC_AUTH").shape});var zR=Ee(v(),Re([Ut,Yr,en,Qr,Mt])),jl=O({...wr.shape,props:zR,...Te(Se(),"CUSTOM_AUTH").shape});var eo=O({...wr.shape,...Te(O({auth:v()}),"SECRET_TEXT").shape});var DR=Ee(v(),Re([Ut,Yr,eo,en,Qr,Mt,Xr,Ns])),wy=O({...wr.shape,props:DR,...Te(Se(),"OIDC").shape});var Ll=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Ll||{}),Iy=Re([Ut,eo,Mt]),Ry=Ee(v(),Iy),UR=O({props:L(Ee(v(),Iy)),authUrl:v(),tokenUrl:v(),scope:_e(v()),prompt:L(Re([de("none"),de("consent"),de("login"),de("omit")])),pkce:L(Me()),pkceMethod:L(Re([de("plain"),de("S256")])),authorizationMethod:L(me(Ll)),grantType:L(Re([me(Vi),de(xl)])),extra:L(Ee(v(),v()))}),Oy=O({access_token:v(),props:L(Ry),data:Ee(v(),zi())}),Fl=O({...wr.shape,...UR.shape,...Te(Oy,"OAUTH2").shape});var Uo=Re([Ml,jl,wy,Fl,eo]),Ki="Connection",Bl={SecretText(t){return{...t,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(t){return{...t,valueSchema:void 0,type:"OAUTH2",displayName:t.displayName||Ki}},BasicAuth(t){return{...t,valueSchema:void 0,type:"BASIC_AUTH",displayName:t.displayName||Ki,required:!0}},CustomAuth(t){return{...t,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:t.displayName||Ki}},OIDC(t){return{...t,valueSchema:void 0,type:"OIDC",displayName:t.displayName||Ki}},None(){}};var ZW={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 MR=O({...ze.shape,...Te(Se(),"CUSTOM").shape,code:v()});var jR=Re([Ul,Uo]),ql=Ee(v(),jR),hZ=Ee(v(),Ul);var Cy=Re([O({strategy:de("CRON"),cronExpression:v()}),O({strategy:de("NONE")})]),Mo=class{constructor(e,r,n,i,s,c,d,l,f,p,_,h,g,y,T,P,x,N,F,X,Z){this.name=e;this.displayName=r;this.description=n;this.requireAuth=i;this.props=s;this.type=c;this.handshakeConfiguration=d;this.onHandshake=l;this.renewConfiguration=f;this.onRenew=p;this.onEnable=_;this.onDisable=h;this.onStart=g;this.run=y;this.test=T;this.sampleData=P;this.testStrategy=x;this.outputSchema=N;this.aiMetadata=F;this.classification=X;this.propertyGroups=Z}static{o(this,"ITrigger")}},$y=o(t=>{switch(t.type){case"WEBHOOK":return new Mo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,t.handshakeConfiguration??{strategy:"NONE"},t.onHandshake??(async()=>({status:200})),t.renewConfiguration??{strategy:"NONE"},t.onRenew??(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,t.test?"TEST_FUNCTION":"SIMULATION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"POLLING":return new Mo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"MANUAL":return new Mo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"APP_WEBHOOK":return new Mo(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,at(t.sampleData)&&at(t.test)?"SIMULATION":"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups)}},"createTrigger");var ky="2",js="0.82.0";var Vl=class{constructor(e,r,n,i,s,c,d,l,f=js,p,_="",h){this.displayName=e;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=l;this.minimumSupportedRelease=f;this.maximumSupportedRelease=p;this.description=_;this.deprecated=h;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:ky}),"getContextInfo");(!FR(f)||BR(f,js))&&(this.minimumSupportedRelease=js),s.forEach(g=>this._actions[g.name]=g),c.forEach(g=>this._triggers[g.name]=g)}static{o(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:LR(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(e){return this._actions[e]}getTrigger(e){return this._triggers[e]}actions(){return this._actions}triggers(){return this._triggers}},zy=o(t=>{if(t.auth&&Array.isArray(t.auth)&&!t.auth.every((r,n,i)=>n===i.findIndex(s=>s.type===r.type)))throw new Error("Auth properties must be unique by type");return new Vl(t.displayName,t.logoUrl,t.authors??[],t.events,t.actions,t.triggers,t.categories??[],t.auth,t.minimumSupportedRelease,t.maximumSupportedRelease,t.description,t.deprecated)},"createPiece");function LR(t){if(t!==void 0)return Array.isArray(t)?t.map(Ny):Ny(t)}o(LR,"withConnectionIdentifierFlag");function Ny(t){return{...t,hasConnectionIdentifier:t.getConnectionIdentifier!==void 0}}o(Ny,"flagConnectionIdentifier");function FR(t){return/^\d+\.\d+\.\d+$/.test(t)}o(FR,"isValidSimpleSemver");function BR(t,e){let[r,n,i]=t.split(".").map(Number),[s,c,d]=e.split(".").map(Number);return r!==s?r<s:n!==c?n<c:i<d}o(BR,"isSemverLessThan");var qR=L(Ee(v(),Ee(v(),v()))),Dy=O({id:L(v()),name:v(),displayName:v(),logoUrl:v(),description:v(),authors:_e(v()),platformId:L(v()),directoryPath:L(v()),auth:L(Re([Uo,_e(Uo)])),version:v(),categories:L(_e(me(No))),minimumSupportedRelease:L(v()),maximumSupportedRelease:L(v()),deprecated:L(Me()),i18n:qR}),VR=me(["human","ai","both"]),Uy=O({description:L(v()),idempotent:L(Me())}),My=me(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var HR=me(["tabs","section","summary","builder","footer"]),jy=O({key:v(),display:HR,label:L(v()),description:L(v()),icon:L(v()),props:_e(v())}),Ly=O({name:v(),displayName:v(),description:v(),props:ql,propertyGroups:L(_e(jy)),requireAuth:Me(),errorHandlingOptions:L(Pl),outputSchema:L($s()),audience:L(VR),aiMetadata:L(Uy),classification:L(My)}),Fy=O({name:v(),displayName:v(),description:v(),props:ql,propertyGroups:L(_e(jy)),errorHandlingOptions:L(Pl),type:me(In),sampleData:Se(),handshakeConfiguration:L($s()),renewConfiguration:L(Cy),testStrategy:me(Gi),outputSchema:L($s()),aiMetadata:L(Uy),classification:L(My)}),GR=O({...Dy.shape,actions:Ee(v(),Ly),triggers:Ee(v(),Fy)}),WR=O({...Dy.shape,actions:yt(),triggers:yt(),suggestedActions:L(_e(Ly)),suggestedTriggers:L(_e(Fy))}),By=O({projectUsage:yt(),pieceType:me(ko),packageType:me(qi),platformId:L(v()),archiveId:L(v())}),y3=O({...GR.shape,...By.shape}),_3=O({...WR.shape,...By.shape}),v3=O({name:v(),version:v()});var ZR=ft(require("path")),KR=ft(require("fs/promises"));var Lo=require("node:stream");var Ls=class{constructor(e,r){this.baseUrl=e;this.authenticationConverter=r}static{o(this,"BaseHttpClient")}getUrl(e){let r=new URL(`${this.baseUrl}${e.url}`),n=`${r.origin}${r.pathname}`,i=new URLSearchParams;return r.searchParams.forEach((s,c)=>{i.append(c,s)}),{urlWithoutQueryParams:n,queryParams:i}}getHeaders(e){let r={Accept:"application/json"};return e.authentication&&this.populateAuthentication(e.authentication,r),e.body&&(e.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),e.headers&&(r={...r,...e.headers}),r}populateAuthentication(e,r){this.authenticationConverter.convert(e,r)}};var Fs=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(e=new Hl,r=new Gl){this.converters={BEARER_TOKEN:e,BASIC:r}}convert(e,r){return this.converters[e.type].convert(e,r)}},Hl=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(e,r){return r.Authorization=`Bearer ${e.token}`,r}},Gl=class{static{o(this,"BasicTokenAuthenticationConverter")}convert(e,r){let n=`${e.username}:${e.password}`,i=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${i}`,r}};var Ji=class extends Error{constructor(r,n){let i=n.status||500,s=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:i,body:s},request:{body:r}}));this.requestBody=r;this.status=i,this.responseBody=s}static{o(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function qy({error:t,requestBody:e}){return t instanceof Ji?t.errorMessage():{response:{status:0,body:t instanceof Error?t.message:String(t)},request:{body:e}}}o(qy,"toFailsafeOutput");var jo=(c=>(c.GET="GET",c.POST="POST",c.PATCH="PATCH",c.PUT="PUT",c.DELETE="DELETE",c.HEAD="HEAD",c))(jo||{});var Bs=class extends Ls{static{o(this,"FetchHttpClient")}constructor(e="",r=new Fs){super(e,r)}async sendRequest(e,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:i}=this.getUrl(e),s=this.getHeaders(e),c=e.queryParams??{};for(let[F,X]of Object.entries(c))i.append(F,X);let d=i.toString(),l=d?`${n}?${d}`:n,f=e.responseType??"json",p=e.followRedirects??!0,_=e.retries??0,{body:h,extraHeaders:g,isStream:y}=JR(e.method)?YR(e.body,s):{body:void 0,extraHeaders:{},isStream:!1},T=QR({...s,...g}),P=await XR(async()=>{let F=new AbortController,X=e.timeout&&e.timeout>0?setTimeout(()=>F.abort(),e.timeout):void 0;try{let Z={method:e.method.toString(),headers:T,body:h,redirect:p?"follow":"manual",signal:F.signal};return y&&(Z.duplex="half"),r?.dispatcher!==void 0&&(Z.dispatcher=r.dispatcher),await fetch(l,Z)}finally{X!==void 0&&clearTimeout(X)}},y?0:_),x=p?300:400;if(P.status<200||P.status>=x){let F=await Vy(P,f==="stream"?"text":f),X=new Ji(e.body,{status:P.status,responseBody:F});throw console.error("[HttpClient#(sanitized error message)] Request failed:",X),X}let N=await Vy(P,f);return{status:P.status,headers:eO(P.headers),body:N}}};function JR(t){return t!=="GET"&&t!=="HEAD"}o(JR,"acceptsRequestBody");function YR(t,e){if(Gy(t))return{body:void 0,extraHeaders:{},isStream:!1};if(tO(t)){let n=new Lo.PassThrough;return t.on("error",i=>n.destroy(i)),t.pipe(n),{body:n,extraHeaders:t.getHeaders(),isStream:!0}}return t instanceof Lo.Readable?{body:t,extraHeaders:{},isStream:!0}:typeof t=="string"||Buffer.isBuffer(t)||t instanceof URLSearchParams||t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof Blob<"u"&&t instanceof Blob?{body:t,extraHeaders:{},isStream:!1}:(e["Content-Type"]??e["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(t).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(t),extraHeaders:{},isStream:!1}}o(YR,"serializeBody");async function Vy(t,e){switch(e){case"arraybuffer":return Buffer.from(await t.arrayBuffer());case"stream":return Gy(t.body)?Lo.Readable.from([]):Lo.Readable.fromWeb(t.body);case"blob":return await t.blob();case"text":return await t.text();default:{let r=await t.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}o(Vy,"parseResponseBody");async function XR(t,e){let r;for(let n=0;n<=e;n++)try{let i=await t();if(i.status>=500&&n<e){await Hy(n);continue}return i}catch(i){if(r=i,n<e){await Hy(n);continue}throw i}throw r}o(XR,"sendWithRetries");function Hy(t){let e=Math.min(1e3*2**t,3e4);return new Promise(r=>setTimeout(r,e))}o(Hy,"backoff");function QR(t){let e={};for(let[r,n]of Object.entries(t))n!==void 0&&(e[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return e}o(QR,"normalizeHeaders");function eO(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}o(eO,"toHttpHeaders");function tO(t){return typeof t=="object"&&t!==null&&typeof t.getHeaders=="function"&&typeof t.pipe=="function"&&typeof t.on=="function"}o(tO,"isNodeFormData");function Gy(t){return t==null}o(Gy,"isNil");var Cn=new Bs;var BC=ft(require("fs")),Jv=ft(Kv());var qC={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function VC(t){let e=t.split(";")[0].trim().toLowerCase();return qC[e]??""}o(VC,"contentTypeToExtension");var HC=o(({baseUrl:t,relativePath:e})=>{let r=t.endsWith("/")?t:`${t}/`,n=e.startsWith("/")?e.slice(1):e;return`${r}${n}`},"joinBaseUrlWithRelativePath"),GC=o((t,e)=>{let r="https://api.example.com";try{let n=e?t(e):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Yv({auth:t,baseUrl:e,authMapping:r,description:n,displayName:i,name:s,props:c,extraProps:d,authLocation:l="headers",classification:f="WRITE"}){return wn({audience:"human",name:s||"custom_api_call",classification:f,displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:t,requireAuth:!!t,props:{url:Ae.DynamicProperties({auth:t,displayName:"",required:!0,refreshers:[],props:o(async({auth:p})=>({url:Ae.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
69
- i.e ${GC(e,p)}/resource or /resource`,required:!0,defaultValue:p?e(p):"",...c?.url??{}})}),"props")}),method:Ae.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(jo).map(p=>({label:p,value:p}))},...c?.method??{}}),headers:Ae.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...c?.headers??{}}),queryParams:Ae.Object({displayName:"Query Parameters",required:!0,...c?.queryParams??{}}),body_type:Ae.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:Ae.DynamicProperties({auth:t,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:p})=>{if(!p)return{};let _=p,h={};switch(_){case"none":break;case"json":h.data=Ae.Json({displayName:"JSON Body",required:!0,...c?.body??{}});break;case"raw":h.data=Ae.LongText({displayName:"Raw Body",required:!0});break;case"form_data":h.data=Ae.Array({displayName:"Form Data",required:!0,properties:{fieldName:Ae.ShortText({displayName:"Field Name",required:!0}),fieldType:Ae.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:Ae.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:Ae.File({displayName:"File Field Value",required:!1})}});break}return h},"props")}),response_is_binary:Ae.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:Ae.Checkbox({displayName:"No Error on Failure",required:!1,...c?.failsafe??{}}),timeout:Ae.Number({displayName:"Timeout (in seconds)",required:!1,...c?.timeout??{}}),followRedirects:Ae.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async p=>{let{method:_,url:h,headers:g,queryParams:y,body:T,body_type:P,failsafe:x,timeout:N,response_is_binary:F,followRedirects:X}=p.propsValue;Ds(_,"Method"),Ds(h,"URL");let Z=at(r)?{}:await r(p.auth,p.propsValue),G=h.url,Y=G.startsWith("http://")||G.startsWith("https://")?G:HC({baseUrl:e(p.auth),relativePath:G}),ee={method:_,url:Y,headers:{...g??{},...l==="headers"||!at(l)?Z:{}},queryParams:{...l==="queryParams"?Z:{},...y??{}},timeout:N?N*1e3:0,followRedirects:X};if(F&&(ee.responseType="arraybuffer"),T)if(P&&P!=="none"){let K=T.data;if(P==="form_data"){let Oe=K,te=new Jv.default;for(let{fieldName:V,fieldType:q,textFieldValue:J,fileFieldValue:W}of Oe)q==="text"&&!Wi(J)?te.append(V,J):q==="file"&&!Wi(W)&&te.append(V,W.data,{filename:W?.filename});ee.body=te,ee.headers={...ee.headers,...te.getHeaders()}}else ee.body=K}else P||(ee.body=T);try{let K=await Cn.sendRequest(ee);return await WC(p.files,K.body,K.status,K.headers,F)}catch(K){if(x)return qy({error:K,requestBody:ee.body});throw K}},"run")})}o(Yv,"createCustomApiCallAction");var WC=o(async(t,e,r,n,i)=>{let s;if(i&&ZC(e)){let c=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=VC(c??"")||"txt",l;e instanceof ArrayBuffer?l=Buffer.from(new Uint8Array(e)):Buffer.isBuffer(e)?l=e:l=Buffer.from(e),s=await t.write({fileName:`output.${d}`,data:l})}else s=e;return{status:r,headers:n,body:s}},"handleBinaryResponse"),ZC=o(t=>t instanceof ArrayBuffer||Buffer.isBuffer(t),"isBinaryBody");var ta={async poll(t,{store:e,auth:r,propsValue:n,maxItemsToPoll:i,files:s,server:c}){switch(t.strategy){case 0:{let d=await e.get("lastPoll");if(at(d))throw new Error("lastPoll doesn't exist in the store.");let l=await t.items({store:e,auth:r,propsValue:n,lastFetchEpochMS:d,server:c}),f=l.reduce((p,_)=>Math.max(p,_.epochMilliSeconds),d);return await e.put("lastPoll",f),l.filter(p=>p.epochMilliSeconds>d).map(p=>p.data)}case 1:{let d=await e.get("lastItem"),l=await t.items({store:e,auth:r,propsValue:n,lastItemId:d,files:s,server:c}),f=l.findIndex(h=>h.id===d),p=[];at(d)||f==-1?p=l??[]:p=l?.slice(0,f)??[],at(i)||(p=p.slice(-i));let _=p?.[0]?.id;return at(_)||await e.put("lastItem",_),p.map(h=>h.data)}}},async onEnable(t,{store:e,auth:r,propsValue:n,server:i,isRepublish:s}){switch(t.strategy){case 0:{if(s&&!at(await e.get("lastPoll")))break;await e.put("lastPoll",Date.now());break}case 1:{if(s&&!at(await e.get("lastItem")))break;let d=(await t.items({store:e,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;at(d)?await e.delete("lastItem"):await e.put("lastItem",d);break}}},async onDisable(t,e){switch(t.strategy){case 0:case 1:return}},async test(t,{auth:e,propsValue:r,store:n,files:i,server:s}){let c=[];switch(t.strategy){case 0:{c=await t.items({store:n,auth:e,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{c=await t.items({store:n,auth:e,propsValue:r,lastItemId:null,files:i,server:s});break}}return KC(c.map(d=>d.data))}};function KC(t){return t.length<=5?t:t.slice(0,5)}o(KC,"getFirstFiveOrAll");var Nn={baseUrl:"https://people.googleapis.com/v1/people"};var mr=Bl.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:["https://www.googleapis.com/auth/contacts","email"]});var JC=[{key:"displayName",label:"Display Name"},{key:"givenName",label:"First Name"},{key:"middleName",label:"Middle Name"},{key:"familyName",label:"Last Name"},{key:"displayNameLastFirst",label:"Display Name (Last, First)"},{key:"unstructuredName",label:"Unstructured Name"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],YC=[{key:"value",label:"Email Address",format:"email"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],XC=[{key:"value",label:"Phone Number"},{key:"canonicalForm",label:"Canonical Form"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],QC=[{key:"name",label:"Company"},{key:"title",label:"Job Title"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],e0=[{key:"url",label:"Photo URL",format:"image"},{key:"default",label:"Is Placeholder",format:"boolean"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],t0=[{key:"contactGroupId",label:"Contact Group ID",value:"contactGroupMembership.contactGroupId"},{key:"contactGroupResourceName",label:"Contact Group Resource Name",value:"contactGroupMembership.contactGroupResourceName"}],r0=[{key:"objectType",label:"Object Type"},{key:"sources",label:"Sources",labelKey:"updateTime",listItems:[{key:"type",label:"Source Type"},{key:"id",label:"Source ID"},{key:"updateTime",label:"Last Updated",format:"datetime"}]}],Ys=[{key:"resourceName",label:"Resource Name"},{key:"etag",label:"ETag"},{key:"names",label:"Names",labelKey:"displayName",listItems:JC},{key:"emailAddresses",label:"Email Addresses",labelKey:"value",listItems:YC},{key:"phoneNumbers",label:"Phone Numbers",labelKey:"value",listItems:XC},{key:"organizations",label:"Organizations",labelKey:"name",listItems:QC},{key:"photos",label:"Photos",labelKey:"url",listItems:e0},{key:"memberships",label:"Group Memberships",labelKey:"contactGroupMembership.contactGroupId",listItems:t0},{key:"metadata",label:"Metadata",children:r0}],Xv={fields:Ys},Qv={fields:Ys},eb={fields:[{key:"results",label:"Matching Contacts",listItems:[{key:"person",label:"Contact",children:Ys}]}]},tb={fields:Ys};var nb=wn({auth:mr,name:"add_contact",classification:"WRITE",description:"Add a contact to a Google Contacts account",audience:"both",aiMetadata:{description:"Creates a new person in the authenticated Google Contacts account from name, email, phone, company, and job title fields. Use when an agent needs to add someone to address book contacts; first and last name are required. Not idempotent \u2014 each call creates a separate contact even with identical input, so guard against duplicates.",idempotent:!1},displayName:"Add Contact",outputSchema:Xv,props:{firstName:Ae.ShortText({displayName:"First Name",description:"The first name of the contact",required:!0}),middleName:Ae.ShortText({displayName:"Middle Name",description:"The middle name of the contact",required:!1}),lastName:Ae.ShortText({displayName:"Last Name",description:"The last name of the contact",required:!0}),jobTitle:Ae.ShortText({displayName:"Job Title",description:"The job title of the contact",required:!1}),company:Ae.ShortText({displayName:"Company",description:"The company of the contact",required:!1}),email:Ae.ShortText({displayName:"Email",description:"The email address of the contact",required:!1}),phoneNumber:Ae.ShortText({displayName:"Phone Number",description:"The phone number of the contact",required:!1})},async run(t){let e={names:[{givenName:t.propsValue.firstName,middleName:t.propsValue.middleName,familyName:t.propsValue.lastName}]},r={};t.propsValue.email&&(r.emailAddresses=[{value:t.propsValue.email}]),t.propsValue.phoneNumber&&(r.phoneNumbers=[{value:t.propsValue.phoneNumber}]),(t.propsValue.company||t.propsValue.jobTitle)&&(r.organizations=[{name:t.propsValue.company||void 0,title:t.propsValue.jobTitle||void 0}]),e={...e,...r};let n={method:"POST",url:`${Nn.baseUrl}:createContact`,body:e,authentication:{type:"BEARER_TOKEN",token:t.auth.access_token}};return(await Cn.sendRequest(n)).body}});var ob=wn({auth:mr,name:"update_contact",classification:"WRITE",description:"Update a contact in Google Contacts account.",audience:"both",aiMetadata:{description:"Updates fields (name, email, phone, company, job title) on an existing Google Contacts person identified by its resourceName (people/{id}). Use when an agent needs to modify a known contact; requires both the resourceName and the current etag, and a field mask listing which fields to update \u2014 the call is rejected if the contact changed since the etag was fetched. Repeating the same update with the same etag/values is safe and yields the same result.",idempotent:!0},displayName:"Update Contact",outputSchema:Qv,props:{resourceName:Ae.ShortText({displayName:"Resource Name",description:"The resource name for the person, assigned by the server. An ASCII string in the form of people/{person_id}.",required:!0}),etag:Ae.ShortText({displayName:"Etag",description:"The `etag` ensures contact updates only apply if the contact hasn't changed since last retrieved.",required:!0}),updatePersonFields:Ae.StaticMultiSelectDropdown({displayName:"Update Field Mask",description:"A field mask to restrict which fields on the person are updated.",required:!0,options:{options:[{label:"Names",value:"names"},{label:"Email",value:"emailAddresses"},{label:"Phone Number",value:"phoneNumbers"},{label:"Job Title / Company",value:"organizations"}]},defaultValue:["names","emailAddresses"]}),firstName:Ae.ShortText({displayName:"First Name",description:"The first name of the contact",required:!1}),middleName:Ae.ShortText({displayName:"Middle Name",description:"The middle name of the contact",required:!1}),lastName:Ae.ShortText({displayName:"Last Name",description:"The last name of the contact",required:!1}),jobTitle:Ae.ShortText({displayName:"Job Title",description:"The job title of the contact",required:!1}),company:Ae.ShortText({displayName:"Company",description:"The company of the contact",required:!1}),email:Ae.ShortText({displayName:"Email",description:"The email address of the contact",required:!1}),phoneNumber:Ae.ShortText({displayName:"Phone Number",description:"The phone number of the contact",required:!1})},async run(t){let e=t.propsValue.resourceName.substring(6),r={etag:t.propsValue.etag},n={updatePersonFields:t.propsValue.updatePersonFields.join(",")};(t.propsValue.firstName||t.propsValue.middleName||t.propsValue.lastName)&&(r.names=[{givenName:t.propsValue.firstName||void 0,middleName:t.propsValue.middleName||void 0,familyName:t.propsValue.lastName||void 0}]),t.propsValue.email&&(r.emailAddresses=[{value:t.propsValue.email}]),t.propsValue.phoneNumber&&(r.phoneNumbers=[{value:t.propsValue.phoneNumber}]),(t.propsValue.company||t.propsValue.jobTitle)&&(r.organizations=[{name:t.propsValue.company||void 0,title:t.propsValue.jobTitle||void 0}]);let i={method:"PATCH",url:`${Nn.baseUrl}${e}:updateContact`,body:r,authentication:{type:"BEARER_TOKEN",token:t.auth.access_token},queryParams:n};return(await Cn.sendRequest(i)).body}});var ib=wn({auth:mr,name:"search_contact",classification:"SEARCH",description:"Search contacts in Google Contacts account.",audience:"both",aiMetadata:{description:"Searches the authenticated Google Contacts account for people matching a plain-text query, which prefix-matches against contact fields. Use when an agent needs to find a contact or its resourceName before updating it; the query is required and a read mask selects which fields come back (max 30 results). Read-only and idempotent.",idempotent:!0},displayName:"Search Contacts",outputSchema:eb,props:{query:Ae.ShortText({displayName:"Query",description:'The plain-text query for the request.The query is used to match prefix phrases of the fields on a person. For example, a person with name "foo name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "oo n".',required:!0}),readMask:Ae.StaticMultiSelectDropdown({displayName:"Read Mask",description:"A field mask to restrict which fields on each person are returned.",required:!0,options:{options:[{label:"addresses",value:"addresses"},{label:"ageRanges",value:"ageRanges"},{label:"biographies",value:"biographies"},{label:"birthdays",value:"birthdays"},{label:"calendarUrls",value:"calendarUrls"},{label:"clientData",value:"clientData"},{label:"coverPhotos",value:"coverPhotos"},{label:"emailAddresses",value:"emailAddresses"},{label:"events",value:"events"},{label:"externalIds",value:"externalIds"},{label:"genders",value:"genders"},{label:"imClients",value:"imClients"},{label:"interests",value:"interests"},{label:"locales",value:"locales"},{label:"locations",value:"locations"},{label:"memberships",value:"memberships"},{label:"metadata",value:"metadata"},{label:"miscKeywords",value:"miscKeywords"},{label:"names",value:"names"},{label:"nicknames",value:"nicknames"},{label:"occupations",value:"occupations"},{label:"organizations",value:"organizations"},{label:"phoneNumbers",value:"phoneNumbers"},{label:"photos",value:"photos"},{label:"relations",value:"relations"},{label:"sipAddresses",value:"sipAddresses"},{label:"skills",value:"skills"},{label:"urls",value:"urls"},{label:"userDefined",value:"userDefined"}]},defaultValue:["names","emailAddresses"]}),pageSize:Ae.Number({displayName:"Page Size",description:"The number of results to return. Maximum 30.",required:!1})},async run(t){let e={query:t.propsValue.query,readMask:t.propsValue.readMask.join(",")};t.propsValue.pageSize&&(e.pageSize=String(t.propsValue.pageSize));let r={method:"GET",url:`${Nn.baseUrl}:searchContacts`,authentication:{type:"BEARER_TOKEN",token:t.auth.access_token},queryParams:e};return(await Cn.sendRequest(r)).body}});var Ix=ft(Ax()),Rx=ft(ka()),Ox=ft(wx());var $c={strategy:0,items:o(async({store:t,auth:e})=>{let r=new Rx.OAuth2Client;r.setCredentials(e);let n=(0,Ix.people)({version:"v1",auth:r}),i,s=[];do{let c=await n.people.connections.list({resourceName:"people/me",pageToken:i,pageSize:100,sortOrder:"LAST_MODIFIED_DESCENDING",personFields:["addresses","ageRanges","biographies","birthdays","calendarUrls","clientData","coverPhotos","emailAddresses","events","externalIds","genders","imClients","interests","locales","locations","memberships","metadata","miscKeywords","names","nicknames","occupations","organizations","phoneNumbers","photos","relations","sipAddresses","skills","urls","userDefined"].join()});for(let d of c.data.connections||[])d.metadata?.deleted!==!0&&s.push({data:d,epochMilliSeconds:(0,Ox.default)(d.metadata?.sources?.[0].updateTime).valueOf()});i=c.data.nextPageToken}while(i);return s},"items")},Cx=$y({auth:mr,name:"new_or_updated_contact",classification:"READ",displayName:"New Or Updated Contact",description:"Triggers when there is a new or updated contact",aiMetadata:{description:"Fires when a contact in the authenticated Google Contacts account is newly created or has been modified since the last poll. Each event represents one person record with its current fields; deleted contacts are excluded."},props:{},outputSchema:tb,sampleData:{resourceName:"people/c4278485694217203807",etag:"%EiMBAgMFBgcICQoLDA0ODxATFBUWGSEiIyQlJicuNDU3PT4/QBoEAQIFByIMZFVwNlJPNEVKUzg9",metadata:{sources:[{type:"CONTACT",id:"3b603c120c68305f",etag:"#dUp6RO4EJS8=",updateTime:"2023-01-30T14:35:18.142565Z"}],objectType:"PERSON"},names:[{metadata:{primary:!0,source:{type:"CONTACT",id:"3b603c120c68305f"}},displayName:"Shahed Mashni",familyName:"Mashni",givenName:"Shahed",displayNameLastFirst:"Mashni, Shahed",unstructuredName:"Shahed Mashni"}],photos:[{metadata:{primary:!0,source:{type:"CONTACT",id:"3b603c120c68305f"}},url:"https://lh3.googleusercontent.com/cm/AAkddurmZojs4vCcxrpkfSxH9tnqcH-hI82ESDnwv6eq86nZeLStcjYEIe_TCx8r8g5Y=s100",default:!0}],memberships:[{metadata:{source:{type:"CONTACT",id:"3b603c120c68305f"}},contactGroupMembership:{contactGroupId:"myContacts",contactGroupResourceName:"contactGroups/myContacts"}}]},type:"POLLING",async onEnable(t){return await ta.onEnable($c,{store:t.store,auth:t.auth,propsValue:{}})},async onDisable(t){return await ta.onEnable($c,{store:t.store,auth:t.auth,propsValue:{}})},async run(t){return await ta.poll($c,{store:t.store,auth:t.auth,propsValue:{},files:t.files})},test:o(async t=>await ta.test($c,{store:t.store,auth:t.auth,propsValue:{},files:t.files}),"test")});var G1=zy({minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/google-contacts.png",categories:["SALES_AND_CRM"],actions:[nb,ob,ib,Yv({baseUrl:o(()=>Nn.baseUrl,"baseUrl"),auth:mr,authMapping:o(async t=>({Authorization:`Bearer ${t.access_token}`}),"authMapping")})],displayName:"Google Contacts",description:"Stay connected and organized",authors:["Abdallah-Alwarawreh","Salem-Alaa","kishanprmr","MoShizzle","khaledmashaly","abuaboud","ikus060"],triggers:[Cx],auth:mr});0&&(module.exports={googleContacts});
67
+ `;P+=z,typeof x.body=="string"&&(P+=x.body,P+=`\r
68
+ `)}P+=E,e.data=P}if(a(f,"browserMultipartUpload"),t.mediaUrl&&o.body)if(e.url=t.mediaUrl,r){n.uploadType="multipart";let h=[{"content-type":"application/json",body:JSON.stringify(r)},{"content-type":o.mimeType||r&&r.mimeType||s,body:o.body}];(0,iP.isBrowser)()?f(h):p(h)}else n.uploadType="media",Object.assign(u,{"content-type":o.mimeType||s}),e.data=o.body;else e.data=r||void 0;if(e.headers=nP.Gaxios.mergeHeaders(e.headers||{},u),e.params=n,!(0,iP.isBrowser)()){e.headers.set("Accept-Encoding","gzip"),e.userAgentDirectives.push({product:"google-api-nodejs-client",version:vN.version,comment:"gzip"});let h=e.userAgentDirectives.map(_=>{let E=`${_.product}/${_.version}`;return _.comment&&(E+=` (${_.comment})`),E}).join(" ");e.headers.set("User-Agent",h)}if(e.validateStatus||(e.validateStatus=h=>h>=200&&h<300||h===304),e.retry=e.retry===void 0?!0:e.retry,delete e.auth,e.universeDomain&&e.universe_domain&&e.universeDomain!==e.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let y=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,m=e.universeDomain??e.universe_domain??y??"googleapis.com";if(m!=="googleapis.com"&&e.url){let h=new URL(e.url);h.hostname.endsWith(".googleapis.com")&&(h.hostname=h.hostname.replace(/googleapis\.com$/,m),e.url=h.toString())}if(Object.keys(e.params).length||(delete e.params,delete e.paramsSerializer),i&&typeof i=="object"){let h=typeof i.getUniverseDomain=="function"?await i.getUniverseDomain():void 0;if(h&&m!==h)throw new Error(`The configured universe domain (${m}) does not match the universe domain found in the credentials (${h}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(e.http2){let _=await i.getRequestHeaders(e.url),E=Object.assign({},e);return E.headers=nP.Gaxios.mergeHeaders(E.headers,_),DH.request(E)}else{let _=await i.request(e);return(0,oP.marshallGaxiosResponse)(_)}}else return new nP.Gaxios().request(e).then(h=>(0,oP.marshallGaxiosResponse)(h))}a(yN,"createAPIRequestAsync");var aP=class extends _N.Transform{static{a(this,"ProgressStream")}bytesRead=0;_transform(e,n,o){this.bytesRead+=e.length,this.emit("progress",this.bytesRead),this.push(e),o()}};function LH(t,e){(0,iP.isBrowser)()||(t["x-goog-api-client"]=`gdcl/${vN.version} gl-node/${process.versions.node}`),e&&(t["x-goog-api-version"]=e)}a(LH,"populateAPIHeader")});var bN=N(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.AuthPlus=void 0;var Ln=ku(),cP=class extends Ln.GoogleAuth{static{a(this,"AuthPlus")}JWT=Ln.JWT;Compute=Ln.Compute;OAuth2=Ln.OAuth2Client;GoogleAuth=Ln.GoogleAuth;AwsClient=Ln.AwsClient;IdentityPoolClient=Ln.IdentityPoolClient;ExternalAccountClient=Ln.ExternalAccountClient;_cachedAuth;async getClient(e){return this._cachedAuth=new Ln.GoogleAuth(e),this._cachedAuth.getClient()}getProjectId(e){return e?this._cachedAuth?this._cachedAuth.getProjectId(e):super.getProjectId(e):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};Vm.AuthPlus=cP});var lP=N(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.Endpoint=void 0;var SN=qm(),uP=class{static{a(this,"Endpoint")}_options;google;constructor(e){this._options=e||{}}applySchema(e,n,o,r){if(this.applyMethodsFromSchema(e,n,o,r),o.resources){for(let i in o.resources)if(Object.prototype.hasOwnProperty.call(o.resources,i)){let s=o.resources[i];e[i]||(e[i]={}),this.applySchema(e[i],n,s,r)}}}applyMethodsFromSchema(e,n,o,r){if(o.methods){for(let i in o.methods)if(Object.prototype.hasOwnProperty.call(o.methods,i)){let s=o.methods[i];e[i]=this.makeMethod(n,s,r)}}}makeMethod(e,n,o){return(r,i)=>{let s=typeof r=="function"?{}:r;i=typeof r=="function"?r:i;let u=EN(e.rootUrl+e.servicePath+n.path),l={options:{url:u.substring(1,u.length-1),method:n.httpMethod,apiVersion:n.apiVersion},params:s,requiredParams:n.parameterOrder||[],pathParams:this.getPathParams(n.parameters),context:o};if(n.mediaUpload&&n.mediaUpload.protocols&&n.mediaUpload.protocols.simple&&n.mediaUpload.protocols.simple.path){let p=EN(e.rootUrl+n.mediaUpload.protocols.simple.path);l.mediaUrl=p.substring(1,p.length-1)}if(!i)return(0,SN.createAPIRequest)(l);(0,SN.createAPIRequest)(l,i)}}getPathParams(e){let n=new Array;return typeof e!="object"&&(e={}),Object.keys(e).forEach(o=>{e[o].location==="path"&&n.push(o)}),n}};Zm.Endpoint=uP;function EN(t){return t?`'${t}'`.replace(/([^:]\/)\/+/g,"$1"):""}a(EN,"buildurl")});var xN=N(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.Discovery=void 0;var FH=require("fs"),BH=gt(),qH=require("url"),PN=require("util"),VH=qm(),ZH=lP(),HH=PN.promisify(FH.readFile),dP=class{static{a(this,"Discovery")}transporter=new BH.Gaxios;options;constructor(e){this.options=e||{}}makeEndpoint(e){return n=>{let o=new ZH.Endpoint(n);return o.applySchema(o,e,e,o),o}}log(...e){this.options&&this.options.debug&&console.log(...e)}async discoverAllAPIs(e){let n=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),r=(await this.transporter.request({url:e,headers:n})).data.items,i=await Promise.all(r.map(async l=>{let p=await this.discoverAPI(l.discoveryRestUrl);return{api:l,endpointCreator:p}})),s={},u={};for(let l of i)u[l.api.name]||(s[l.api.name]={},u[l.api.name]=p=>{let f=typeof p,y;if(f==="string")y=p,p={};else if(f==="object")y=p.version,delete p.version;else throw new Error("Argument error: Accepts only string or object");try{let m=l.endpointCreator(p,this);return Object.freeze(m)}catch(m){throw new Error(PN.format('Unable to load endpoint %s("%s"): %s',l.api.name,y,m.message))}}),s[l.api.name][l.api.version]=l.endpointCreator;return u}async discoverAPI(e){if(typeof e=="string"){let n=qH.parse(e);if(e&&!n.protocol){this.log("Reading from file "+e);let o=await HH(e,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(o))}else{this.log("Requesting "+e);let o=await this.transporter.request({url:e});return this.makeEndpoint(o.data)}}else{let n=e;this.log("Requesting "+n.url);let o=n.url;delete n.url;let r={options:{url:o,method:"GET"},requiredParams:[],pathParams:[],params:n,context:{google:{_options:{}},_options:{}}},i=await(0,VH.createAPIRequest)(r);return this.makeEndpoint(i.data)}}};Hm.Discovery=dP});var Gm=N(Oe=>{"use strict";var GH=Oe&&Oe.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return e[n]},"get")}),Object.defineProperty(t,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]})),WH=Oe&&Oe.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&GH(e,t,n)};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Endpoint=Oe.Discovery=Oe.AuthPlus=Oe.createAPIRequest=Oe.getAPI=Oe.GaxiosError=Oe.Gaxios=Oe.AwsClient=Oe.IdentityPoolClient=Oe.BaseExternalAccountClient=Oe.ExternalAccountClient=Oe.GoogleAuth=Oe.UserRefreshClient=Oe.Compute=Oe.JWT=Oe.OAuth2Client=Oe.gaxios=Oe.googleAuthLibrary=void 0;Oe.googleAuthLibrary=ku();Oe.gaxios=gt();var Fn=ku();Object.defineProperty(Oe,"OAuth2Client",{enumerable:!0,get:a(function(){return Fn.OAuth2Client},"get")});Object.defineProperty(Oe,"JWT",{enumerable:!0,get:a(function(){return Fn.JWT},"get")});Object.defineProperty(Oe,"Compute",{enumerable:!0,get:a(function(){return Fn.Compute},"get")});Object.defineProperty(Oe,"UserRefreshClient",{enumerable:!0,get:a(function(){return Fn.UserRefreshClient},"get")});Object.defineProperty(Oe,"GoogleAuth",{enumerable:!0,get:a(function(){return Fn.GoogleAuth},"get")});Object.defineProperty(Oe,"ExternalAccountClient",{enumerable:!0,get:a(function(){return Fn.ExternalAccountClient},"get")});Object.defineProperty(Oe,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return Fn.BaseExternalAccountClient},"get")});Object.defineProperty(Oe,"IdentityPoolClient",{enumerable:!0,get:a(function(){return Fn.IdentityPoolClient},"get")});Object.defineProperty(Oe,"AwsClient",{enumerable:!0,get:a(function(){return Fn.AwsClient},"get")});var TN=gt();Object.defineProperty(Oe,"Gaxios",{enumerable:!0,get:a(function(){return TN.Gaxios},"get")});Object.defineProperty(Oe,"GaxiosError",{enumerable:!0,get:a(function(){return TN.GaxiosError},"get")});var JH=hk();Object.defineProperty(Oe,"getAPI",{enumerable:!0,get:a(function(){return JH.getAPI},"get")});var KH=qm();Object.defineProperty(Oe,"createAPIRequest",{enumerable:!0,get:a(function(){return KH.createAPIRequest},"get")});var XH=bN();Object.defineProperty(Oe,"AuthPlus",{enumerable:!0,get:a(function(){return XH.AuthPlus},"get")});var YH=xN();Object.defineProperty(Oe,"Discovery",{enumerable:!0,get:a(function(){return YH.Discovery},"get")});var QH=lP();Object.defineProperty(Oe,"Endpoint",{enumerable:!0,get:a(function(){return QH.Endpoint},"get")});WH(Bm(),Oe)});var wN=N(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.people_v1=void 0;var Pe=Gm(),AN;(function(t){class e{static{a(this,"People")}context;contactGroups;otherContacts;people;constructor(l,p){this.context={_options:l||{},google:p},this.contactGroups=new n(this.context),this.otherContacts=new r(this.context),this.people=new i(this.context)}}t.People=e;class n{static{a(this,"Resource$Contactgroups")}context;members;constructor(l){this.context=l,this.members=new o(this.context)}batchGet(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/contactGroups:batchGet").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}create(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/contactGroups").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}delete(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}get(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}list(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/contactGroups").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}update(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}}t.Resource$Contactgroups=n;class o{static{a(this,"Resource$Contactgroups$Members")}context;constructor(l){this.context=l}modify(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}/members:modify").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}}t.Resource$Contactgroups$Members=o;class r{static{a(this,"Resource$Othercontacts")}context;constructor(l){this.context=l}copyOtherContactToMyContactsGroup(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}:copyOtherContactToMyContactsGroup").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}list(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/otherContacts").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}search(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/otherContacts:search").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}}t.Resource$Othercontacts=r;class i{static{a(this,"Resource$People")}context;connections;constructor(l){this.context=l,this.connections=new s(this.context)}batchCreateContacts(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:batchCreateContacts").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}batchDeleteContacts(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:batchDeleteContacts").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}batchUpdateContacts(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:batchUpdateContacts").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}createContact(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:createContact").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}deleteContact(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}:deleteContact").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}deleteContactPhoto(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}:deleteContactPhoto").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}get(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}getBatchGet(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:batchGet").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}listDirectoryPeople(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:listDirectoryPeople").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}searchContacts(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:searchContacts").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}searchDirectoryPeople(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/people:searchDirectoryPeople").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:[],pathParams:[],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}updateContact(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}:updateContact").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}updateContactPhoto(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}:updateContactPhoto").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}}t.Resource$People=i;class s{static{a(this,"Resource$People$Connections")}context;constructor(l){this.context=l}list(l,p,f){let y=l||{},m=p||{};typeof l=="function"&&(f=l,y={},m={}),typeof p=="function"&&(f=p,m={});let h=m.rootUrl||"https://people.googleapis.com/",_={options:Object.assign({url:(h+"/v1/{+resourceName}/connections").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},m),params:y,requiredParams:["resourceName"],pathParams:["resourceName"],context:this.context};if(f)(0,Pe.createAPIRequest)(_,f);else return(0,Pe.createAPIRequest)(_)}}t.Resource$People$Connections=s})(AN||(Wm.people_v1=AN={}))});var ON=N(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.AuthPlus=kr.people_v1=kr.auth=kr.VERSIONS=void 0;kr.people=eG;var IN=Gm(),RN=wN();Object.defineProperty(kr,"people_v1",{enumerable:!0,get:a(function(){return RN.people_v1},"get")});kr.VERSIONS={v1:RN.people_v1.People};function eG(t){return(0,IN.getAPI)("people",t,kr.VERSIONS,this)}a(eG,"people");var tG=new IN.AuthPlus;kr.auth=tG;var rG=Gm();Object.defineProperty(kr,"AuthPlus",{enumerable:!0,get:a(function(){return rG.AuthPlus},"get")})});var CN=N((pP,fP)=>{(function(t,e){typeof pP=="object"&&typeof fP<"u"?fP.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(pP,(function(){"use strict";var t=1e3,e=6e4,n=36e5,o="millisecond",r="second",i="minute",s="hour",u="day",l="week",p="month",f="quarter",y="year",m="date",h="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|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,P={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(se){var G=["th","st","nd","rd"],H=se%100;return"["+se+(G[(H-20)%10]||G[H]||G[0])+"]"},"ordinal")},x=a(function(se,G,H){var re=String(se);return!re||re.length>=G?se:""+Array(G+1-re.length).join(H)+se},"m"),z={s:x,z:a(function(se){var G=-se.utcOffset(),H=Math.abs(G),re=Math.floor(H/60),X=H%60;return(G<=0?"+":"-")+x(re,2,"0")+":"+x(X,2,"0")},"z"),m:a(function se(G,H){if(G.date()<H.date())return-se(H,G);var re=12*(H.year()-G.year())+(H.month()-G.month()),X=G.clone().add(re,p),ue=H-X<0,de=G.clone().add(re+(ue?-1:1),p);return+(-(re+(H-X)/(ue?X-de:de-X))||0)},"t"),a:a(function(se){return se<0?Math.ceil(se)||0:Math.floor(se)},"a"),p:a(function(se){return{M:p,y,w:l,d:u,D:m,h:s,m:i,s:r,ms:o,Q:f}[se]||String(se||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(se){return se===void 0},"u")},M="en",K={};K[M]=P;var Z=a(function(se){return se instanceof Y},"p"),J=a(function se(G,H,re){var X;if(!G)return M;if(typeof G=="string"){var ue=G.toLowerCase();K[ue]&&(X=ue),H&&(K[ue]=H,X=ue);var de=G.split("-");if(!X&&de.length>1)return se(de[0])}else{var Ce=G.name;K[Ce]=G,X=Ce}return!re&&X&&(M=X),X||!re&&M},"t"),ee=a(function(se,G){if(Z(se))return se.clone();var H=typeof G=="object"?G:{};return H.date=se,H.args=arguments,new Y(H)},"w"),ae=z;ae.l=J,ae.i=Z,ae.w=function(se,G){return ee(se,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var Y=(function(){function se(H){this.$L=J(H.locale,null,!0),this.parse(H)}a(se,"M");var G=se.prototype;return G.parse=function(H){this.$d=(function(re){var X=re.date,ue=re.utc;if(X===null)return new Date(NaN);if(ae.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var de=X.match(_);if(de){var Ce=de[2]-1||0,De=(de[7]||"0").substring(0,3);return ue?new Date(Date.UTC(de[1],Ce,de[3]||1,de[4]||0,de[5]||0,de[6]||0,De)):new Date(de[1],Ce,de[3]||1,de[4]||0,de[5]||0,de[6]||0,De)}}return new Date(X)})(H),this.$x=H.x||{},this.init()},G.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},G.$utils=function(){return ae},G.isValid=function(){return this.$d.toString()!==h},G.isSame=function(H,re){var X=ee(H);return this.startOf(re)<=X&&X<=this.endOf(re)},G.isAfter=function(H,re){return ee(H)<this.startOf(re)},G.isBefore=function(H,re){return this.endOf(re)<ee(H)},G.$g=function(H,re,X){return ae.u(H)?this[re]:this.set(X,H)},G.unix=function(){return Math.floor(this.valueOf()/1e3)},G.valueOf=function(){return this.$d.getTime()},G.startOf=function(H,re){var X=this,ue=!!ae.u(re)||re,de=ae.p(H),Ce=a(function(er,He){var Ke=ae.w(X.$u?Date.UTC(X.$y,He,er):new Date(X.$y,He,er),X);return ue?Ke:Ke.endOf(u)},"l"),De=a(function(er,He){return ae.w(X.toDate()[er].apply(X.toDate("s"),(ue?[0,0,0,0]:[23,59,59,999]).slice(He)),X)},"$"),Je=this.$W,tt=this.$M,xt=this.$D,ie="set"+(this.$u?"UTC":"");switch(de){case y:return ue?Ce(1,0):Ce(31,11);case p:return ue?Ce(1,tt):Ce(0,tt+1);case l:var dt=this.$locale().weekStart||0,ft=(Je<dt?Je+7:Je)-dt;return Ce(ue?xt-ft:xt+(6-ft),tt);case u:case m:return De(ie+"Hours",0);case s:return De(ie+"Minutes",1);case i:return De(ie+"Seconds",2);case r:return De(ie+"Milliseconds",3);default:return this.clone()}},G.endOf=function(H){return this.startOf(H,!1)},G.$set=function(H,re){var X,ue=ae.p(H),de="set"+(this.$u?"UTC":""),Ce=(X={},X[u]=de+"Date",X[m]=de+"Date",X[p]=de+"Month",X[y]=de+"FullYear",X[s]=de+"Hours",X[i]=de+"Minutes",X[r]=de+"Seconds",X[o]=de+"Milliseconds",X)[ue],De=ue===u?this.$D+(re-this.$W):re;if(ue===p||ue===y){var Je=this.clone().set(m,1);Je.$d[Ce](De),Je.init(),this.$d=Je.set(m,Math.min(this.$D,Je.daysInMonth())).$d}else Ce&&this.$d[Ce](De);return this.init(),this},G.set=function(H,re){return this.clone().$set(H,re)},G.get=function(H){return this[ae.p(H)]()},G.add=function(H,re){var X,ue=this;H=Number(H);var de=ae.p(re),Ce=a(function(tt){var xt=ee(ue);return ae.w(xt.date(xt.date()+Math.round(tt*H)),ue)},"y");if(de===p)return this.set(p,this.$M+H);if(de===y)return this.set(y,this.$y+H);if(de===u)return Ce(1);if(de===l)return Ce(7);var De=(X={},X[i]=e,X[s]=n,X[r]=t,X)[de]||1,Je=this.$d.getTime()+H*De;return ae.w(Je,this)},G.subtract=function(H,re){return this.add(-1*H,re)},G.format=function(H){var re=this,X=this.$locale();if(!this.isValid())return X.invalidDate||h;var ue=H||"YYYY-MM-DDTHH:mm:ssZ",de=ae.z(this),Ce=this.$H,De=this.$m,Je=this.$M,tt=X.weekdays,xt=X.months,ie=X.meridiem,dt=a(function(He,Ke,b,T){return He&&(He[Ke]||He(re,ue))||b[Ke].slice(0,T)},"h"),ft=a(function(He){return ae.s(Ce%12||12,He,"0")},"d"),er=ie||function(He,Ke,b){var T=He<12?"AM":"PM";return b?T.toLowerCase():T};return ue.replace(E,(function(He,Ke){return Ke||(function(b){switch(b){case"YY":return String(re.$y).slice(-2);case"YYYY":return ae.s(re.$y,4,"0");case"M":return Je+1;case"MM":return ae.s(Je+1,2,"0");case"MMM":return dt(X.monthsShort,Je,xt,3);case"MMMM":return dt(xt,Je);case"D":return re.$D;case"DD":return ae.s(re.$D,2,"0");case"d":return String(re.$W);case"dd":return dt(X.weekdaysMin,re.$W,tt,2);case"ddd":return dt(X.weekdaysShort,re.$W,tt,3);case"dddd":return tt[re.$W];case"H":return String(Ce);case"HH":return ae.s(Ce,2,"0");case"h":return ft(1);case"hh":return ft(2);case"a":return er(Ce,De,!0);case"A":return er(Ce,De,!1);case"m":return String(De);case"mm":return ae.s(De,2,"0");case"s":return String(re.$s);case"ss":return ae.s(re.$s,2,"0");case"SSS":return ae.s(re.$ms,3,"0");case"Z":return de}return null})(He)||de.replace(":","")}))},G.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},G.diff=function(H,re,X){var ue,de=this,Ce=ae.p(re),De=ee(H),Je=(De.utcOffset()-this.utcOffset())*e,tt=this-De,xt=a(function(){return ae.m(de,De)},"D");switch(Ce){case y:ue=xt()/12;break;case p:ue=xt();break;case f:ue=xt()/3;break;case l:ue=(tt-Je)/6048e5;break;case u:ue=(tt-Je)/864e5;break;case s:ue=tt/n;break;case i:ue=tt/e;break;case r:ue=tt/t;break;default:ue=tt}return X?ue:ae.a(ue)},G.daysInMonth=function(){return this.endOf(p).$D},G.$locale=function(){return K[this.$L]},G.locale=function(H,re){if(!H)return this.$L;var X=this.clone(),ue=J(H,re,!0);return ue&&(X.$L=ue),X},G.clone=function(){return ae.w(this.$d,this)},G.toDate=function(){return new Date(this.valueOf())},G.toJSON=function(){return this.isValid()?this.toISOString():null},G.toISOString=function(){return this.$d.toISOString()},G.toString=function(){return this.$d.toUTCString()},se})(),ze=Y.prototype;return ee.prototype=ze,[["$ms",o],["$s",r],["$m",i],["$H",s],["$W",u],["$M",p],["$y",y],["$D",m]].forEach((function(se){ze[se[1]]=function(G){return this.$g(G,se[0],se[1])}})),ee.extend=function(se,G){return se.$i||(se(G,Y,ee),se.$i=!0),ee},ee.locale=J,ee.isDayjs=Z,ee.unix=function(se){return ee(1e3*se)},ee.en=K[M],ee.Ls=K,ee.p={},ee}))});var oG={};nr(oG,{googleContacts:()=>nG});module.exports=ED(oG);var ir={};nr(ir,{$ZodAny:()=>bs,$ZodArray:()=>xs,$ZodAsyncError:()=>Ur,$ZodBase64:()=>id,$ZodBase64URL:()=>ad,$ZodBigInt:()=>Gi,$ZodBigIntFormat:()=>ld,$ZodBoolean:()=>Fo,$ZodCIDRv4:()=>nd,$ZodCIDRv6:()=>od,$ZodCUID:()=>Zl,$ZodCUID2:()=>Hl,$ZodCatch:()=>Ad,$ZodCheck:()=>Ye,$ZodCheckBigIntFormat:()=>cg,$ZodCheckEndsWith:()=>bg,$ZodCheckGreaterThan:()=>Nl,$ZodCheckIncludes:()=>_g,$ZodCheckLengthEquals:()=>mg,$ZodCheckLessThan:()=>kl,$ZodCheckLowerCase:()=>gg,$ZodCheckMaxLength:()=>pg,$ZodCheckMaxSize:()=>ug,$ZodCheckMimeType:()=>Eg,$ZodCheckMinLength:()=>fg,$ZodCheckMinSize:()=>lg,$ZodCheckMultipleOf:()=>ag,$ZodCheckNumberFormat:()=>sg,$ZodCheckOverwrite:()=>Pg,$ZodCheckProperty:()=>Sg,$ZodCheckRegex:()=>hg,$ZodCheckSizeEquals:()=>dg,$ZodCheckStartsWith:()=>vg,$ZodCheckStringFormat:()=>Zi,$ZodCheckUpperCase:()=>yg,$ZodCodec:()=>Ji,$ZodCustom:()=>ks,$ZodCustomStringFormat:()=>ud,$ZodDate:()=>Ps,$ZodDefault:()=>Ed,$ZodDiscriminatedUnion:()=>Ts,$ZodE164:()=>sd,$ZodEmail:()=>Bl,$ZodEmoji:()=>ql,$ZodEncodeError:()=>Kn,$ZodEnum:()=>Is,$ZodError:()=>ms,$ZodExactOptional:()=>Sd,$ZodFile:()=>bd,$ZodFunction:()=>Od,$ZodGUID:()=>Ll,$ZodIPv4:()=>ed,$ZodIPv6:()=>td,$ZodISODate:()=>Xl,$ZodISODateTime:()=>Kl,$ZodISODuration:()=>Ql,$ZodISOTime:()=>Yl,$ZodIntersection:()=>yd,$ZodJWT:()=>cd,$ZodKSUID:()=>Jl,$ZodLazy:()=>$d,$ZodLiteral:()=>Rs,$ZodMAC:()=>rd,$ZodMap:()=>_d,$ZodNaN:()=>wd,$ZodNanoID:()=>Vl,$ZodNever:()=>md,$ZodNonOptional:()=>xd,$ZodNull:()=>fd,$ZodNullable:()=>Cs,$ZodNumber:()=>Hi,$ZodNumberFormat:()=>vs,$ZodObject:()=>hd,$ZodObjectJIT:()=>wg,$ZodOptional:()=>Wi,$ZodPipe:()=>$s,$ZodPrefault:()=>Pd,$ZodPromise:()=>Cd,$ZodReadonly:()=>Id,$ZodRealError:()=>Ht,$ZodRecord:()=>ws,$ZodRegistry:()=>kd,$ZodSet:()=>vd,$ZodString:()=>Tn,$ZodStringFormat:()=>Ge,$ZodSuccess:()=>Td,$ZodSymbol:()=>dd,$ZodTemplateLiteral:()=>Rd,$ZodTransform:()=>Os,$ZodTuple:()=>As,$ZodType:()=>Se,$ZodULID:()=>Gl,$ZodURL:()=>_s,$ZodUUID:()=>Fl,$ZodUndefined:()=>pd,$ZodUnion:()=>Bo,$ZodUnknown:()=>Ss,$ZodVoid:()=>Es,$ZodXID:()=>Wl,$ZodXor:()=>gd,$brand:()=>ss,$constructor:()=>w,$input:()=>zd,$output:()=>Nd,Doc:()=>ys,JSONSchema:()=>uT,JSONSchemaGenerator:()=>lp,NEVER:()=>yl,TimePrecision:()=>Ud,_any:()=>fc,_array:()=>by,_base64:()=>nc,_base64url:()=>oc,_bigint:()=>Hd,_boolean:()=>lc,_catch:()=>IM,_check:()=>cT,_cidrv4:()=>tc,_cidrv6:()=>rc,_coercedBigint:()=>pc,_coercedBoolean:()=>dc,_coercedDate:()=>gc,_coercedNumber:()=>cc,_coercedString:()=>Ls,_cuid:()=>Ws,_cuid2:()=>Js,_custom:()=>Ec,_date:()=>Qd,_decode:()=>xl,_decodeAsync:()=>Al,_default:()=>TM,_discriminatedUnion:()=>fM,_e164:()=>ic,_email:()=>Fs,_emoji:()=>Hs,_encode:()=>Pl,_encodeAsync:()=>Tl,_endsWith:()=>Wo,_enum:()=>vM,_file:()=>tp,_float32:()=>Bd,_float64:()=>qd,_gt:()=>jr,_gte:()=>Et,_guid:()=>Yi,_includes:()=>Ho,_int:()=>uc,_int32:()=>Vd,_int64:()=>Gd,_intersection:()=>mM,_ipv4:()=>Qs,_ipv6:()=>ec,_isoDate:()=>jd,_isoDateTime:()=>Md,_isoDuration:()=>Fd,_isoTime:()=>Ld,_jwt:()=>ac,_ksuid:()=>Ys,_lazy:()=>$M,_length:()=>no,_literal:()=>SM,_lowercase:()=>Vo,_lt:()=>Mr,_lte:()=>Lt,_mac:()=>Dd,_map:()=>yM,_max:()=>Lt,_maxLength:()=>ro,_maxSize:()=>wn,_mime:()=>Jo,_min:()=>Et,_minLength:()=>mt,_minSize:()=>Lr,_multipleOf:()=>An,_nan:()=>ep,_nanoid:()=>Gs,_nativeEnum:()=>bM,_negative:()=>_c,_never:()=>Yd,_nonnegative:()=>bc,_nonoptional:()=>AM,_nonpositive:()=>vc,_normalize:()=>Ko,_null:()=>Xd,_nullable:()=>xM,_number:()=>sc,_optional:()=>PM,_overwrite:()=>Pr,_parse:()=>ji,_parseAsync:()=>Li,_pipe:()=>RM,_positive:()=>yc,_promise:()=>kM,_property:()=>Sc,_readonly:()=>OM,_record:()=>gM,_refine:()=>rp,_regex:()=>kt,_safeDecode:()=>Il,_safeDecodeAsync:()=>Ol,_safeEncode:()=>wl,_safeEncodeAsync:()=>Rl,_safeParse:()=>Fi,_safeParseAsync:()=>qi,_set:()=>_M,_size:()=>to,_slugify:()=>Qi,_startsWith:()=>Go,_string:()=>js,_stringFormat:()=>ei,_stringbool:()=>ap,_success:()=>wM,_superRefine:()=>np,_symbol:()=>Jd,_templateLiteral:()=>CM,_toLowerCase:()=>Yo,_toUpperCase:()=>Qo,_transform:()=>EM,_trim:()=>Xo,_tuple:()=>hM,_uint32:()=>Zd,_uint64:()=>Wd,_ulid:()=>Ks,_undefined:()=>Kd,_union:()=>dM,_unknown:()=>mc,_uppercase:()=>Zo,_url:()=>qo,_uuid:()=>Bs,_uuidv4:()=>qs,_uuidv6:()=>Vs,_uuidv7:()=>Zs,_void:()=>hc,_xid:()=>Xs,_xor:()=>pM,clone:()=>At,config:()=>ct,createStandardJSONSchemaMethod:()=>ea,createToJSONSchemaMethod:()=>Sy,decode:()=>Rx,decodeAsync:()=>Cx,describe:()=>op,encode:()=>Ix,encodeAsync:()=>Ox,extractDefs:()=>io,finalize:()=>ao,flattenError:()=>Ui,formatError:()=>Mi,globalConfig:()=>as,globalRegistry:()=>wt,initializeContext:()=>oo,isValidBase64:()=>Ag,isValidBase64URL:()=>Qx,isValidJWT:()=>eT,locales:()=>Xi,meta:()=>ip,parse:()=>Mo,parseAsync:()=>jo,prettifyError:()=>El,process:()=>We,regexes:()=>Gt,registry:()=>Ms,safeDecode:()=>kx,safeDecodeAsync:()=>zx,safeEncode:()=>$x,safeEncodeAsync:()=>Nx,safeParse:()=>Bi,safeParseAsync:()=>Vi,toDotPath:()=>wx,toJSONSchema:()=>Pc,treeifyError:()=>Sl,util:()=>ne,version:()=>xg});var yl=Object.freeze({status:"aborted"});function w(t,e,n){function o(u,l){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(t))return;u._zod.traits.add(t),e(u,l);let p=s.prototype,f=Object.keys(p);for(let y=0;y<f.length;y++){let m=f[y];m in u||(u[m]=p[m].bind(u))}}a(o,"init");let r=n?.Parent??Object;class i extends r{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:t});function s(u){var l;let p=n?.Parent?new i:this;o(p,u),(l=p._zod).deferred??(l.deferred=[]);for(let f of p._zod.deferred)f();return p}return a(s,"_"),Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a(u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(t),"value")}),Object.defineProperty(s,"name",{value:t}),s}a(w,"$constructor");var ss=Symbol("zod_brand"),Ur=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Kn=class extends Error{static{a(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},as={};function ct(t){return t&&Object.assign(as,t),as}a(ct,"config");var ne={};nr(ne,{BIGINT_FORMAT_RANGES:()=>Ch,Class:()=>xh,NUMBER_FORMAT_RANGES:()=>Oh,aborted:()=>eo,allowsEval:()=>wh,assert:()=>wD,assertEqual:()=>PD,assertIs:()=>TD,assertNever:()=>AD,assertNotEqual:()=>xD,assignProp:()=>Yn,base64ToUint8Array:()=>xx,base64urlToUint8Array:()=>MD,cached:()=>zi,captureStackTrace:()=>vl,cleanEnum:()=>UD,cleanRegex:()=>ls,clone:()=>At,cloneDef:()=>RD,createTransparentProxy:()=>zD,defineLazy:()=>$e,esc:()=>_l,escapeRegex:()=>Er,extend:()=>bx,finalizeIssue:()=>Zt,floatSafeRemainder:()=>Th,getElementAtPath:()=>OD,getEnumValues:()=>us,getLengthableOrigin:()=>fs,getParsedType:()=>ND,getSizableOrigin:()=>ps,hexToUint8Array:()=>LD,isObject:()=>Uo,isPlainObject:()=>Qn,issue:()=>Di,joinValues:()=>B,jsonStringifyReplacer:()=>Ni,merge:()=>DD,mergeDefs:()=>xn,normalizeParams:()=>Q,nullish:()=>Xn,numKeys:()=>kD,objectClone:()=>ID,omit:()=>vx,optionalKeys:()=>Rh,parsedType:()=>oe,partial:()=>Ex,pick:()=>_x,prefixIssues:()=>or,primitiveTypes:()=>Ih,promiseAllObject:()=>CD,propertyKeyTypes:()=>ds,randomString:()=>$D,required:()=>Px,safeExtend:()=>Sx,shallowClone:()=>bl,slugify:()=>Ah,stringifyPrimitive:()=>te,uint8ArrayToBase64:()=>Tx,uint8ArrayToBase64url:()=>jD,uint8ArrayToHex:()=>FD,unwrapMessage:()=>cs});function PD(t){return t}a(PD,"assertEqual");function xD(t){return t}a(xD,"assertNotEqual");function TD(t){}a(TD,"assertIs");function AD(t){throw new Error("Unexpected value in exhaustive check")}a(AD,"assertNever");function wD(t){}a(wD,"assert");function us(t){let e=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,r])=>e.indexOf(+o)===-1).map(([o,r])=>r)}a(us,"getEnumValues");function B(t,e="|"){return t.map(n=>te(n)).join(e)}a(B,"joinValues");function Ni(t,e){return typeof e=="bigint"?e.toString():e}a(Ni,"jsonStringifyReplacer");function zi(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(zi,"cached");function Xn(t){return t==null}a(Xn,"nullish");function ls(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}a(ls,"cleanRegex");function Th(t,e){let n=(t.toString().split(".")[1]||"").length,o=e.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let l=o.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}let i=n>r?n:r,s=Number.parseInt(t.toFixed(i).replace(".","")),u=Number.parseInt(e.toFixed(i).replace(".",""));return s%u/10**i}a(Th,"floatSafeRemainder");var yx=Symbol("evaluating");function $e(t,e,n){let o;Object.defineProperty(t,e,{get(){if(o!==yx)return o===void 0&&(o=yx,o=n()),o},set(r){Object.defineProperty(t,e,{value:r})},configurable:!0})}a($e,"defineLazy");function ID(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}a(ID,"objectClone");function Yn(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(Yn,"assignProp");function xn(...t){let e={};for(let n of t){let o=Object.getOwnPropertyDescriptors(n);Object.assign(e,o)}return Object.defineProperties({},e)}a(xn,"mergeDefs");function RD(t){return xn(t._zod.def)}a(RD,"cloneDef");function OD(t,e){return e?e.reduce((n,o)=>n?.[o],t):t}a(OD,"getElementAtPath");function CD(t){let e=Object.keys(t),n=e.map(o=>t[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<e.length;i++)r[e[i]]=o[i];return r})}a(CD,"promiseAllObject");function $D(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<t;o++)n+=e[Math.floor(Math.random()*e.length)];return n}a($D,"randomString");function _l(t){return JSON.stringify(t)}a(_l,"esc");function Ah(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(Ah,"slugify");var vl="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Uo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}a(Uo,"isObject");var wh=zi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Qn(t){if(Uo(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(Uo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(Qn,"isPlainObject");function bl(t){return Qn(t)?{...t}:Array.isArray(t)?[...t]:t}a(bl,"shallowClone");function kD(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}a(kD,"numKeys");var ND=a(t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},"getParsedType"),ds=new Set(["string","number","symbol"]),Ih=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Er(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Er,"escapeRegex");function At(t,e,n){let o=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(o._zod.parent=t),o}a(At,"clone");function Q(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:a(()=>e,"error")};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:a(()=>e.error,"error")}:e}a(Q,"normalizeParams");function zD(t){let e;return new Proxy({},{get(n,o,r){return e??(e=t()),Reflect.get(e,o,r)},set(n,o,r,i){return e??(e=t()),Reflect.set(e,o,r,i)},has(n,o){return e??(e=t()),Reflect.has(e,o)},deleteProperty(n,o){return e??(e=t()),Reflect.deleteProperty(e,o)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,o){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,o)},defineProperty(n,o,r){return e??(e=t()),Reflect.defineProperty(e,o,r)}})}a(zD,"createTransparentProxy");function te(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}a(te,"stringifyPrimitive");function Rh(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}a(Rh,"optionalKeys");var Oh={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]},Ch={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function _x(t,e){let n=t._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=xn(t._zod.def,{get shape(){let s={};for(let u in e){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);e[u]&&(s[u]=n.shape[u])}return Yn(this,"shape",s),s},checks:[]});return At(t,i)}a(_x,"pick");function vx(t,e){let n=t._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=xn(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let u in e){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);e[u]&&delete s[u]}return Yn(this,"shape",s),s},checks:[]});return At(t,i)}a(vx,"omit");function bx(t,e){if(!Qn(e))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let i=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=xn(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return Yn(this,"shape",i),i}});return At(t,r)}a(bx,"extend");function Sx(t,e){if(!Qn(e))throw new Error("Invalid input to safeExtend: expected a plain object");let n=xn(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return Yn(this,"shape",o),o}});return At(t,n)}a(Sx,"safeExtend");function DD(t,e){let n=xn(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e._zod.def.shape};return Yn(this,"shape",o),o},get catchall(){return e._zod.def.catchall},checks:[]});return At(t,n)}a(DD,"merge");function Ex(t,e,n){let r=e._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=xn(e._zod.def,{get shape(){let u=e._zod.def.shape,l={...u};if(n)for(let p in n){if(!(p in u))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(l[p]=t?new t({type:"optional",innerType:u[p]}):u[p])}else for(let p in u)l[p]=t?new t({type:"optional",innerType:u[p]}):u[p];return Yn(this,"shape",l),l},checks:[]});return At(e,s)}a(Ex,"partial");function Px(t,e,n){let o=xn(e._zod.def,{get shape(){let r=e._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new t({type:"nonoptional",innerType:r[s]}))}else for(let s in r)i[s]=new t({type:"nonoptional",innerType:r[s]});return Yn(this,"shape",i),i}});return At(e,o)}a(Px,"required");function eo(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}a(eo,"aborted");function or(t,e){return e.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(t),n})}a(or,"prefixIssues");function cs(t){return typeof t=="string"?t:t?.message}a(cs,"unwrapMessage");function Zt(t,e,n){let o={...t,path:t.path??[]};if(!t.message){let r=cs(t.inst?._zod.def?.error?.(t))??cs(e?.error?.(t))??cs(n.customError?.(t))??cs(n.localeError?.(t))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,e?.reportInput||delete o.input,o}a(Zt,"finalizeIssue");function ps(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}a(ps,"getSizableOrigin");function fs(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}a(fs,"getLengthableOrigin");function oe(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}a(oe,"parsedType");function Di(...t){let[e,n,o]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:o}:{...e}}a(Di,"issue");function UD(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}a(UD,"cleanEnum");function xx(t){let e=atob(t),n=new Uint8Array(e.length);for(let o=0;o<e.length;o++)n[o]=e.charCodeAt(o);return n}a(xx,"base64ToUint8Array");function Tx(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}a(Tx,"uint8ArrayToBase64");function MD(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return xx(e+n)}a(MD,"base64urlToUint8Array");function jD(t){return Tx(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(jD,"uint8ArrayToBase64url");function LD(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let o=0;o<e.length;o+=2)n[o/2]=Number.parseInt(e.slice(o,o+2),16);return n}a(LD,"hexToUint8Array");function FD(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}a(FD,"uint8ArrayToHex");var xh=class{static{a(this,"Class")}constructor(...e){}};var Ax=a((t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Ni,2),Object.defineProperty(t,"toString",{value:a(()=>t.message,"value"),enumerable:!1})},"initializer"),ms=w("$ZodError",Ax),Ht=w("$ZodError",Ax,{Parent:Error});function Ui(t,e=n=>n.message){let n={},o=[];for(let r of t.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(e(r))):o.push(e(r));return{formErrors:o,fieldErrors:n}}a(Ui,"flattenError");function Mi(t,e=n=>n.message){let n={_errors:[]},o=a(r=>{for(let i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)n._errors.push(e(i));else{let s=n,u=0;for(;u<i.path.length;){let l=i.path[u];u===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(e(i))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}},"processError");return o(t),n}a(Mi,"formatError");function Sl(t,e=n=>n.message){let n={errors:[]},o=a((r,i=[])=>{var s,u;for(let l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(p=>o({issues:p},l.path));else if(l.code==="invalid_key")o({issues:l.issues},l.path);else if(l.code==="invalid_element")o({issues:l.issues},l.path);else{let p=[...i,...l.path];if(p.length===0){n.errors.push(e(l));continue}let f=n,y=0;for(;y<p.length;){let m=p[y],h=y===p.length-1;typeof m=="string"?(f.properties??(f.properties={}),(s=f.properties)[m]??(s[m]={errors:[]}),f=f.properties[m]):(f.items??(f.items=[]),(u=f.items)[m]??(u[m]={errors:[]}),f=f.items[m]),h&&f.errors.push(e(l)),y++}}},"processError");return o(t),n}a(Sl,"treeifyError");function wx(t){let e=[],n=t.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?e.push(`[${o}]`):typeof o=="symbol"?e.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?e.push(`[${JSON.stringify(o)}]`):(e.length&&e.push("."),e.push(o));return e.join("")}a(wx,"toDotPath");function El(t){let e=[],n=[...t.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)e.push(`\u2716 ${o.message}`),o.path?.length&&e.push(` \u2192 at ${wx(o.path)}`);return e.join(`
69
+ `)}a(El,"prettifyError");var ji=a(t=>(e,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Ur;if(s.issues.length){let u=new(r?.Err??t)(s.issues.map(l=>Zt(l,i,ct())));throw vl(u,r?.callee),u}return s.value},"_parse"),Mo=ji(Ht),Li=a(t=>async(e,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(r?.Err??t)(s.issues.map(l=>Zt(l,i,ct())));throw vl(u,r?.callee),u}return s.value},"_parseAsync"),jo=Li(Ht),Fi=a(t=>(e,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Ur;return i.issues.length?{success:!1,error:new(t??ms)(i.issues.map(s=>Zt(s,r,ct())))}:{success:!0,data:i.value}},"_safeParse"),Bi=Fi(Ht),qi=a(t=>async(e,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=e._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>Zt(s,r,ct())))}:{success:!0,data:i.value}},"_safeParseAsync"),Vi=qi(Ht),Pl=a(t=>(e,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ji(t)(e,n,r)},"_encode"),Ix=Pl(Ht),xl=a(t=>(e,n,o)=>ji(t)(e,n,o),"_decode"),Rx=xl(Ht),Tl=a(t=>async(e,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Li(t)(e,n,r)},"_encodeAsync"),Ox=Tl(Ht),Al=a(t=>async(e,n,o)=>Li(t)(e,n,o),"_decodeAsync"),Cx=Al(Ht),wl=a(t=>(e,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Fi(t)(e,n,r)},"_safeEncode"),$x=wl(Ht),Il=a(t=>(e,n,o)=>Fi(t)(e,n,o),"_safeDecode"),kx=Il(Ht),Rl=a(t=>async(e,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return qi(t)(e,n,r)},"_safeEncodeAsync"),Nx=Rl(Ht),Ol=a(t=>async(e,n,o)=>qi(t)(e,n,o),"_safeDecodeAsync"),zx=Ol(Ht);var Gt={};nr(Gt,{base64:()=>Gh,base64url:()=>Cl,bigint:()=>Qh,boolean:()=>tg,browserEmail:()=>KD,cidrv4:()=>Zh,cidrv6:()=>Hh,cuid:()=>$h,cuid2:()=>kh,date:()=>Jh,datetime:()=>Xh,domain:()=>QD,duration:()=>Mh,e164:()=>Wh,email:()=>Lh,emoji:()=>Fh,extendedDuration:()=>qD,guid:()=>jh,hex:()=>eU,hostname:()=>YD,html5Email:()=>GD,idnEmail:()=>JD,integer:()=>eg,ipv4:()=>Bh,ipv6:()=>qh,ksuid:()=>Dh,lowercase:()=>og,mac:()=>Vh,md5_base64:()=>rU,md5_base64url:()=>nU,md5_hex:()=>tU,nanoid:()=>Uh,null:()=>rg,number:()=>$l,rfc5322Email:()=>WD,sha1_base64:()=>iU,sha1_base64url:()=>aU,sha1_hex:()=>oU,sha256_base64:()=>cU,sha256_base64url:()=>uU,sha256_hex:()=>sU,sha384_base64:()=>dU,sha384_base64url:()=>pU,sha384_hex:()=>lU,sha512_base64:()=>mU,sha512_base64url:()=>hU,sha512_hex:()=>fU,string:()=>Yh,time:()=>Kh,ulid:()=>Nh,undefined:()=>ng,unicodeEmail:()=>Dx,uppercase:()=>ig,uuid:()=>Lo,uuid4:()=>VD,uuid6:()=>ZD,uuid7:()=>HD,xid:()=>zh});var $h=/^[cC][^\s-]{8,}$/,kh=/^[0-9a-z]+$/,Nh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zh=/^[0-9a-vA-V]{20}$/,Dh=/^[A-Za-z0-9]{27}$/,Uh=/^[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)?)?)$/,qD=/^[-+]?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)?)??$/,jh=/^([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})$/,Lo=a(t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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"),VD=Lo(4),ZD=Lo(6),HD=Lo(7),Lh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,GD=/^[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])?)*$/,WD=/^(([^<>()\[\]\\.,;:\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,}))$/,Dx=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,JD=Dx,KD=/^[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])?)*$/,XD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fh(){return new RegExp(XD,"u")}a(Fh,"emoji");var Bh=/^(?:(?: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])$/,qh=/^(([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}|:))$/,Vh=a(t=>{let e=Er(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},"mac"),Zh=/^((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])$/,Hh=/^(([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])$/,Gh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cl=/^[A-Za-z0-9_-]*$/,YD=/^(?=.{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])?)*\.?$/,QD=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Wh=/^\+[1-9]\d{6,14}$/,Ux="(?:(?:\\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])))",Jh=new RegExp(`^${Ux}$`);function Mx(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}a(Mx,"timeSource");function Kh(t){return new RegExp(`^${Mx(t)}$`)}a(Kh,"time");function Xh(t){let e=Mx({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${e}(?:${n.join("|")})`;return new RegExp(`^${Ux}T(?:${o})$`)}a(Xh,"datetime");var Yh=a(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),Qh=/^-?\d+n?$/,eg=/^-?\d+$/,$l=/^-?\d+(?:\.\d+)?$/,tg=/^(?:true|false)$/i,rg=/^null$/i;var ng=/^undefined$/i;var og=/^[^A-Z]*$/,ig=/^[^a-z]*$/,eU=/^[0-9a-fA-F]*$/;function hs(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}a(hs,"fixedBase64");function gs(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}a(gs,"fixedBase64url");var tU=/^[0-9a-fA-F]{32}$/,rU=hs(22,"=="),nU=gs(22),oU=/^[0-9a-fA-F]{40}$/,iU=hs(27,"="),aU=gs(27),sU=/^[0-9a-fA-F]{64}$/,cU=hs(43,"="),uU=gs(43),lU=/^[0-9a-fA-F]{96}$/,dU=hs(64,""),pU=gs(64),fU=/^[0-9a-fA-F]{128}$/,mU=hs(86,"=="),hU=gs(86);var Ye=w("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Lx={number:"number",bigint:"bigint",object:"date"},kl=w("$ZodCheckLessThan",(t,e)=>{Ye.init(t,e);let n=Lx[typeof e.value];t._zod.onattach.push(o=>{let r=o._zod.bag,i=(e.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value<=e.value:o.value<e.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Nl=w("$ZodCheckGreaterThan",(t,e)=>{Ye.init(t,e);let n=Lx[typeof e.value];t._zod.onattach.push(o=>{let r=o._zod.bag,i=(e.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),t._zod.check=o=>{(e.inclusive?o.value>=e.value:o.value>e.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:o.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ag=w("$ZodCheckMultipleOf",(t,e)=>{Ye.init(t,e),t._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Th(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),sg=w("$ZodCheckNumberFormat",(t,e)=>{Ye.init(t,e),e.format=e.format||"float64";let n=e.format?.includes("int"),o=n?"int":"number",[r,i]=Oh[e.format];t._zod.onattach.push(s=>{let u=s._zod.bag;u.format=e.format,u.minimum=r,u.maximum=i,n&&(u.pattern=eg)}),t._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:o,format:e.format,code:"invalid_type",continue:!1,input:u,inst:t});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!e.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!e.abort});return}}u<r&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),cg=w("$ZodCheckBigIntFormat",(t,e)=>{Ye.init(t,e);let[n,o]=Ch[e.format];t._zod.onattach.push(r=>{let i=r._zod.bag;i.format=e.format,i.minimum=n,i.maximum=o}),t._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),ug=w("$ZodCheckMaxSize",(t,e)=>{var n;Ye.init(t,e),(n=t._zod.def).when??(n.when=o=>{let r=o.value;return!Xn(r)&&r.size!==void 0}),t._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(o._zod.bag.maximum=e.maximum)}),t._zod.check=o=>{let r=o.value;r.size<=e.maximum||o.issues.push({origin:ps(r),code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),lg=w("$ZodCheckMinSize",(t,e)=>{var n;Ye.init(t,e),(n=t._zod.def).when??(n.when=o=>{let r=o.value;return!Xn(r)&&r.size!==void 0}),t._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{let r=o.value;r.size>=e.minimum||o.issues.push({origin:ps(r),code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),dg=w("$ZodCheckSizeEquals",(t,e)=>{var n;Ye.init(t,e),(n=t._zod.def).when??(n.when=o=>{let r=o.value;return!Xn(r)&&r.size!==void 0}),t._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=e.size,r.maximum=e.size,r.size=e.size}),t._zod.check=o=>{let r=o.value,i=r.size;if(i===e.size)return;let s=i>e.size;o.issues.push({origin:ps(r),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),pg=w("$ZodCheckMaxLength",(t,e)=>{var n;Ye.init(t,e),(n=t._zod.def).when??(n.when=o=>{let r=o.value;return!Xn(r)&&r.length!==void 0}),t._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<r&&(o._zod.bag.maximum=e.maximum)}),t._zod.check=o=>{let r=o.value;if(r.length<=e.maximum)return;let s=fs(r);o.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),fg=w("$ZodCheckMinLength",(t,e)=>{var n;Ye.init(t,e),(n=t._zod.def).when??(n.when=o=>{let r=o.value;return!Xn(r)&&r.length!==void 0}),t._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>r&&(o._zod.bag.minimum=e.minimum)}),t._zod.check=o=>{let r=o.value;if(r.length>=e.minimum)return;let s=fs(r);o.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:r,inst:t,continue:!e.abort})}}),mg=w("$ZodCheckLengthEquals",(t,e)=>{var n;Ye.init(t,e),(n=t._zod.def).when??(n.when=o=>{let r=o.value;return!Xn(r)&&r.length!==void 0}),t._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=e.length,r.maximum=e.length,r.length=e.length}),t._zod.check=o=>{let r=o.value,i=r.length;if(i===e.length)return;let s=fs(r),u=i>e.length;o.issues.push({origin:s,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!e.abort})}}),Zi=w("$ZodCheckStringFormat",(t,e)=>{var n,o;Ye.init(t,e),t._zod.onattach.push(r=>{let i=r._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:e.format,input:r.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(o=t._zod).check??(o.check=()=>{})}),hg=w("$ZodCheckRegex",(t,e)=>{Zi.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),gg=w("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=og),Zi.init(t,e)}),yg=w("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ig),Zi.init(t,e)}),_g=w("$ZodCheckIncludes",(t,e)=>{Ye.init(t,e);let n=Er(e.includes),o=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=o,t._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),t._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:t,continue:!e.abort})}}),vg=w("$ZodCheckStartsWith",(t,e)=>{Ye.init(t,e);let n=new RegExp(`^${Er(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=o=>{o.value.startsWith(e.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:o.value,inst:t,continue:!e.abort})}}),bg=w("$ZodCheckEndsWith",(t,e)=>{Ye.init(t,e);let n=new RegExp(`.*${Er(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),t._zod.check=o=>{o.value.endsWith(e.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:o.value,inst:t,continue:!e.abort})}});function jx(t,e,n){t.issues.length&&e.issues.push(...or(n,t.issues))}a(jx,"handleCheckPropertyResult");var Sg=w("$ZodCheckProperty",(t,e)=>{Ye.init(t,e),t._zod.check=n=>{let o=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>jx(r,n,e.property));jx(o,n,e.property)}}),Eg=w("$ZodCheckMimeType",(t,e)=>{Ye.init(t,e);let n=new Set(e.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=e.mime}),t._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:e.mime,input:o.value.type,inst:t,continue:!e.abort})}}),Pg=w("$ZodCheckOverwrite",(t,e)=>{Ye.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var ys=class{static{a(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let o=e.split(`
70
+ `).filter(s=>s),r=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let e=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...n,r.join(`
71
+ `))}};var xg={major:4,minor:3,patch:6};var Se=w("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=xg;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let r of o)for(let i of r._zod.onattach)i(t);if(o.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let r=a((s,u,l)=>{let p=eo(s),f;for(let y of u){if(y._zod.def.when){if(!y._zod.def.when(s))continue}else if(p)continue;let m=s.issues.length,h=y._zod.check(s);if(h instanceof Promise&&l?.async===!1)throw new Ur;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==m&&(p||(p=eo(s,m)))});else{if(s.issues.length===m)continue;p||(p=eo(s,m))}}return f?f.then(()=>s):s},"runChecks"),i=a((s,u,l)=>{if(eo(s))return s.aborted=!0,s;let p=r(u,o,l);if(p instanceof Promise){if(l.async===!1)throw new Ur;return p.then(f=>t._zod.parse(f,l))}return t._zod.parse(p,l)},"handleCanaryResult");t._zod.run=(s,u)=>{if(u.skipChecks)return t._zod.parse(s,u);if(u.direction==="backward"){let p=t._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return p instanceof Promise?p.then(f=>i(f,s,u)):i(p,s,u)}let l=t._zod.parse(s,u);if(l instanceof Promise){if(u.async===!1)throw new Ur;return l.then(p=>r(p,o,u))}return r(l,o,u)}}$e(t,"~standard",()=>({validate:a(r=>{try{let i=Bi(t,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Vi(t,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Tn=w("$ZodString",(t,e)=>{Se.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Yh(t._zod.bag),t._zod.parse=(n,o)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),Ge=w("$ZodStringFormat",(t,e)=>{Zi.init(t,e),Tn.init(t,e)}),Ll=w("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=jh),Ge.init(t,e)}),Fl=w("$ZodUUID",(t,e)=>{if(e.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(o===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Lo(o))}else e.pattern??(e.pattern=Lo());Ge.init(t,e)}),Bl=w("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Lh),Ge.init(t,e)}),_s=w("$ZodURL",(t,e)=>{Ge.init(t,e),t._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),ql=w("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Fh()),Ge.init(t,e)}),Vl=w("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Uh),Ge.init(t,e)}),Zl=w("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=$h),Ge.init(t,e)}),Hl=w("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=kh),Ge.init(t,e)}),Gl=w("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Nh),Ge.init(t,e)}),Wl=w("$ZodXID",(t,e)=>{e.pattern??(e.pattern=zh),Ge.init(t,e)}),Jl=w("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Dh),Ge.init(t,e)}),Kl=w("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Xh(e)),Ge.init(t,e)}),Xl=w("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Jh),Ge.init(t,e)}),Yl=w("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Kh(e)),Ge.init(t,e)}),Ql=w("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Mh),Ge.init(t,e)}),ed=w("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Bh),Ge.init(t,e),t._zod.bag.format="ipv4"}),td=w("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=qh),Ge.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),rd=w("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=Vh(e.delimiter)),Ge.init(t,e),t._zod.bag.format="mac"}),nd=w("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Zh),Ge.init(t,e)}),od=w("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Hh),Ge.init(t,e),t._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Ag(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}a(Ag,"isValidBase64");var id=w("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Gh),Ge.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{Ag(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function Qx(t){if(!Cl.test(t))return!1;let e=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Ag(n)}a(Qx,"isValidBase64URL");var ad=w("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Cl),Ge.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{Qx(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),sd=w("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Wh),Ge.init(t,e)});function eT(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch{return!1}}a(eT,"isValidJWT");var cd=w("$ZodJWT",(t,e)=>{Ge.init(t,e),t._zod.check=n=>{eT(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),ud=w("$ZodCustomStringFormat",(t,e)=>{Ge.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),Hi=w("$ZodNumber",(t,e)=>{Se.init(t,e),t._zod.pattern=t._zod.bag.pattern??$l,t._zod.parse=(n,o)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:t,...i?{received:i}:{}}),n}}),vs=w("$ZodNumberFormat",(t,e)=>{sg.init(t,e),Hi.init(t,e)}),Fo=w("$ZodBoolean",(t,e)=>{Se.init(t,e),t._zod.pattern=tg,t._zod.parse=(n,o)=>{if(e.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:t}),n}}),Gi=w("$ZodBigInt",(t,e)=>{Se.init(t,e),t._zod.pattern=Qh,t._zod.parse=(n,o)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),ld=w("$ZodBigIntFormat",(t,e)=>{cg.init(t,e),Gi.init(t,e)}),dd=w("$ZodSymbol",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:t}),n}}),pd=w("$ZodUndefined",(t,e)=>{Se.init(t,e),t._zod.pattern=ng,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:t}),n}}),fd=w("$ZodNull",(t,e)=>{Se.init(t,e),t._zod.pattern=rg,t._zod.values=new Set([null]),t._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:t}),n}}),bs=w("$ZodAny",(t,e)=>{Se.init(t,e),t._zod.parse=n=>n}),Ss=w("$ZodUnknown",(t,e)=>{Se.init(t,e),t._zod.parse=n=>n}),md=w("$ZodNever",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),Es=w("$ZodVoid",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:t}),n}}),Ps=w("$ZodDate",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:t}),n}});function Bx(t,e,n){t.issues.length&&e.issues.push(...or(n,t.issues)),e.value[n]=t.value}a(Bx,"handleArrayResult");var xs=w("$ZodArray",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:t}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let u=r[s],l=e.element._zod.run({value:u,issues:[]},o);l instanceof Promise?i.push(l.then(p=>Bx(p,n,s))):Bx(l,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function jl(t,e,n,o,r){if(t.issues.length){if(r&&!(n in o))return;e.issues.push(...or(n,t.issues))}t.value===void 0?n in o&&(e.value[n]=void 0):e.value[n]=t.value}a(jl,"handlePropertyResult");function tT(t){let e=Object.keys(t.shape);for(let o of e)if(!t.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Rh(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}a(tT,"normalizeDef");function rT(t,e,n,o,r,i){let s=[],u=r.keySet,l=r.catchall._zod,p=l.def.type,f=l.optout==="optional";for(let y in e){if(u.has(y))continue;if(p==="never"){s.push(y);continue}let m=l.run({value:e[y],issues:[]},o);m instanceof Promise?t.push(m.then(h=>jl(h,n,y,e,f))):jl(m,n,y,e,f)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:i}),t.length?Promise.all(t).then(()=>n):n}a(rT,"handleCatchall");var hd=w("$ZodObject",(t,e)=>{if(Se.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let u=e.shape;Object.defineProperty(e,"shape",{get:a(()=>{let l={...u};return Object.defineProperty(e,"shape",{value:l}),l},"get")})}let o=zi(()=>tT(e));$e(t._zod,"propValues",()=>{let u=e.shape,l={};for(let p in u){let f=u[p]._zod;if(f.values){l[p]??(l[p]=new Set);for(let y of f.values)l[p].add(y)}}return l});let r=Uo,i=e.catchall,s;t._zod.parse=(u,l)=>{s??(s=o.value);let p=u.value;if(!r(p))return u.issues.push({expected:"object",code:"invalid_type",input:p,inst:t}),u;u.value={};let f=[],y=s.shape;for(let m of s.keys){let h=y[m],_=h._zod.optout==="optional",E=h._zod.run({value:p[m],issues:[]},l);E instanceof Promise?f.push(E.then(P=>jl(P,u,m,p,_))):jl(E,u,m,p,_)}return i?rT(f,p,u,l,o.value,t):f.length?Promise.all(f).then(()=>u):u}}),wg=w("$ZodObjectJIT",(t,e)=>{hd.init(t,e);let n=t._zod.parse,o=zi(()=>tT(e)),r=a(m=>{let h=new ys(["shape","payload","ctx"]),_=o.value,E=a(M=>{let K=_l(M);return`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`},"parseStr");h.write("const input = payload.value;");let P=Object.create(null),x=0;for(let M of _.keys)P[M]=`key_${x++}`;h.write("const newResult = {};");for(let M of _.keys){let K=P[M],Z=_l(M),ee=m[M]?._zod?.optout==="optional";h.write(`const ${K} = ${E(M)};`),ee?h.write(`
72
+ if (${K}.issues.length) {
73
+ if (${Z} in input) {
74
+ payload.issues = payload.issues.concat(${K}.issues.map(iss => ({
75
+ ...iss,
76
+ path: iss.path ? [${Z}, ...iss.path] : [${Z}]
77
+ })));
78
+ }
79
+ }
80
+
81
+ if (${K}.value === undefined) {
82
+ if (${Z} in input) {
83
+ newResult[${Z}] = undefined;
84
+ }
85
+ } else {
86
+ newResult[${Z}] = ${K}.value;
87
+ }
88
+
89
+ `):h.write(`
90
+ if (${K}.issues.length) {
91
+ payload.issues = payload.issues.concat(${K}.issues.map(iss => ({
92
+ ...iss,
93
+ path: iss.path ? [${Z}, ...iss.path] : [${Z}]
94
+ })));
95
+ }
96
+
97
+ if (${K}.value === undefined) {
98
+ if (${Z} in input) {
99
+ newResult[${Z}] = undefined;
100
+ }
101
+ } else {
102
+ newResult[${Z}] = ${K}.value;
103
+ }
104
+
105
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let z=h.compile();return(M,K)=>z(m,M,K)},"generateFastpass"),i,s=Uo,u=!as.jitless,p=u&&wh.value,f=e.catchall,y;t._zod.parse=(m,h)=>{y??(y=o.value);let _=m.value;return s(_)?u&&p&&h?.async===!1&&h.jitless!==!0?(i||(i=r(e.shape)),m=i(m,h),f?rT([],_,m,h,y,t):m):n(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:_,inst:t}),m)}});function qx(t,e,n,o){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;let r=t.filter(i=>!eo(i));return r.length===1?(e.value=r[0].value,r[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(i=>i.issues.map(s=>Zt(s,o,ct())))}),e)}a(qx,"handleUnionResults");var Bo=w("$ZodUnion",(t,e)=>{Se.init(t,e),$e(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),$e(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),$e(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),$e(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>ls(i.source)).join("|")})$`)}});let n=e.options.length===1,o=e.options[0]._zod.run;t._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let l of e.options){let p=l._zod.run({value:r.value,issues:[]},i);if(p instanceof Promise)u.push(p),s=!0;else{if(p.issues.length===0)return p;u.push(p)}}return s?Promise.all(u).then(l=>qx(l,r,t,i)):qx(u,r,t,i)}});function Vx(t,e,n,o){let r=t.filter(i=>i.issues.length===0);return r.length===1?(e.value=r[0].value,e):(r.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(i=>i.issues.map(s=>Zt(s,o,ct())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1}),e)}a(Vx,"handleExclusiveUnionResults");var gd=w("$ZodXor",(t,e)=>{Bo.init(t,e),e.inclusive=!1;let n=e.options.length===1,o=e.options[0]._zod.run;t._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let l of e.options){let p=l._zod.run({value:r.value,issues:[]},i);p instanceof Promise?(u.push(p),s=!0):u.push(p)}return s?Promise.all(u).then(l=>Vx(l,r,t,i)):Vx(u,r,t,i)}}),Ts=w("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Bo.init(t,e);let n=t._zod.parse;$e(t._zod,"propValues",()=>{let r={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[u,l]of Object.entries(s)){r[u]||(r[u]=new Set);for(let p of l)r[u].add(p)}}return r});let o=zi(()=>{let r=e.options,i=new Map;for(let s of r){let u=s._zod.propValues?.[e.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let l of u){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});t._zod.parse=(r,i)=>{let s=r.value;if(!Uo(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),r;let u=o.value.get(s?.[e.discriminator]);return u?u._zod.run(r,i):e.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),r)}}),yd=w("$ZodIntersection",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value,i=e.left._zod.run({value:r,issues:[]},o),s=e.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,p])=>Zx(n,l,p)):Zx(n,i,s)}});function Tg(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Qn(t)&&Qn(e)){let n=Object.keys(e),o=Object.keys(t).filter(i=>n.indexOf(i)!==-1),r={...t,...e};for(let i of o){let s=Tg(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<t.length;o++){let r=t[o],i=e[o],s=Tg(r,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}a(Tg,"mergeValues");function Zx(t,e,n){let o=new Map,r;for(let u of e.issues)if(u.code==="unrecognized_keys"){r??(r=u);for(let l of u.keys)o.has(l)||o.set(l,{}),o.get(l).l=!0}else t.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let l of u.keys)o.has(l)||o.set(l,{}),o.get(l).r=!0;else t.issues.push(u);let i=[...o].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&r&&t.issues.push({...r,keys:i}),eo(t))return t;let s=Tg(e.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}a(Zx,"handleIntersectionResults");var As=w("$ZodTuple",(t,e)=>{Se.init(t,e);let n=e.items;t._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:t,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],u=[...n].reverse().findIndex(f=>f._zod.optin!=="optional"),l=u===-1?0:n.length-u;if(!e.rest){let f=i.length>n.length,y=i.length<l-1;if(f||y)return o.issues.push({...f?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:t,origin:"array"}),o}let p=-1;for(let f of n){if(p++,p>=i.length&&p>=l)continue;let y=f._zod.run({value:i[p],issues:[]},r);y instanceof Promise?s.push(y.then(m=>zl(m,o,p))):zl(y,o,p)}if(e.rest){let f=i.slice(n.length);for(let y of f){p++;let m=e.rest._zod.run({value:y,issues:[]},r);m instanceof Promise?s.push(m.then(h=>zl(h,o,p))):zl(m,o,p)}}return s.length?Promise.all(s).then(()=>o):o}});function zl(t,e,n){t.issues.length&&e.issues.push(...or(n,t.issues)),e.value[n]=t.value}a(zl,"handleTupleResult");var ws=w("$ZodRecord",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;if(!Qn(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:t}),n;let i=[],s=e.keyType._zod.values;if(s){n.value={};let u=new Set;for(let p of s)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){u.add(typeof p=="number"?p.toString():p);let f=e.valueType._zod.run({value:r[p],issues:[]},o);f instanceof Promise?i.push(f.then(y=>{y.issues.length&&n.issues.push(...or(p,y.issues)),n.value[p]=y.value})):(f.issues.length&&n.issues.push(...or(p,f.issues)),n.value[p]=f.value)}let l;for(let p in r)u.has(p)||(l=l??[],l.push(p));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:t,keys:l})}else{n.value={};for(let u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let l=e.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&$l.test(u)&&l.issues.length){let y=e.keyType._zod.run({value:Number(u),issues:[]},o);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(l=y)}if(l.issues.length){e.mode==="loose"?n.value[u]=r[u]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(y=>Zt(y,o,ct())),input:u,path:[u],inst:t});continue}let f=e.valueType._zod.run({value:r[u],issues:[]},o);f instanceof Promise?i.push(f.then(y=>{y.issues.length&&n.issues.push(...or(u,y.issues)),n.value[l.value]=y.value})):(f.issues.length&&n.issues.push(...or(u,f.issues)),n.value[l.value]=f.value)}}return i.length?Promise.all(i).then(()=>n):n}}),_d=w("$ZodMap",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:t}),n;let i=[];n.value=new Map;for(let[s,u]of r){let l=e.keyType._zod.run({value:s,issues:[]},o),p=e.valueType._zod.run({value:u,issues:[]},o);l instanceof Promise||p instanceof Promise?i.push(Promise.all([l,p]).then(([f,y])=>{Hx(f,y,n,s,r,t,o)})):Hx(l,p,n,s,r,t,o)}return i.length?Promise.all(i).then(()=>n):n}});function Hx(t,e,n,o,r,i,s){t.issues.length&&(ds.has(typeof o)?n.issues.push(...or(o,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:t.issues.map(u=>Zt(u,s,ct()))})),e.issues.length&&(ds.has(typeof o)?n.issues.push(...or(o,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:e.issues.map(u=>Zt(u,s,ct()))})),n.value.set(t.value,e.value)}a(Hx,"handleMapResult");var vd=w("$ZodSet",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:t,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let u=e.valueType._zod.run({value:s,issues:[]},o);u instanceof Promise?i.push(u.then(l=>Gx(l,n))):Gx(u,n)}return i.length?Promise.all(i).then(()=>n):n}});function Gx(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}a(Gx,"handleSetResult");var Is=w("$ZodEnum",(t,e)=>{Se.init(t,e);let n=us(e.entries),o=new Set(n);t._zod.values=o,t._zod.pattern=new RegExp(`^(${n.filter(r=>ds.has(typeof r)).map(r=>typeof r=="string"?Er(r):r.toString()).join("|")})$`),t._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:t}),r}}),Rs=w("$ZodLiteral",(t,e)=>{if(Se.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(e.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${e.values.map(o=>typeof o=="string"?Er(o):o?Er(o.toString()):String(o)).join("|")})$`),t._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),o}}),bd=w("$ZodFile",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:t}),n}}),Os=w("$ZodTransform",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Kn(t.constructor.name);let r=e.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Ur;return n.value=r,n}});function Wx(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}a(Wx,"handleOptionalResult");var Wi=w("$ZodOptional",(t,e)=>{Se.init(t,e),t._zod.optin="optional",t._zod.optout="optional",$e(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),$e(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${ls(n.source)})?$`):void 0}),t._zod.parse=(n,o)=>{if(e.innerType._zod.optin==="optional"){let r=e.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Wx(i,n.value)):Wx(r,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,o)}}),Sd=w("$ZodExactOptional",(t,e)=>{Wi.init(t,e),$e(t._zod,"values",()=>e.innerType._zod.values),$e(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,o)=>e.innerType._zod.run(n,o)}),Cs=w("$ZodNullable",(t,e)=>{Se.init(t,e),$e(t._zod,"optin",()=>e.innerType._zod.optin),$e(t._zod,"optout",()=>e.innerType._zod.optout),$e(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${ls(n.source)}|null)$`):void 0}),$e(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,o)=>n.value===null?n:e.innerType._zod.run(n,o)}),Ed=w("$ZodDefault",(t,e)=>{Se.init(t,e),t._zod.optin="optional",$e(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,o)=>{if(o.direction==="backward")return e.innerType._zod.run(n,o);if(n.value===void 0)return n.value=e.defaultValue,n;let r=e.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Jx(i,e)):Jx(r,e)}});function Jx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}a(Jx,"handleDefaultResult");var Pd=w("$ZodPrefault",(t,e)=>{Se.init(t,e),t._zod.optin="optional",$e(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,o))}),xd=w("$ZodNonOptional",(t,e)=>{Se.init(t,e),$e(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),t._zod.parse=(n,o)=>{let r=e.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Kx(i,t)):Kx(r,t)}});function Kx(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}a(Kx,"handleNonOptionalResult");var Td=w("$ZodSuccess",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Kn("ZodSuccess");let r=e.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Ad=w("$ZodCatch",(t,e)=>{Se.init(t,e),$e(t._zod,"optin",()=>e.innerType._zod.optin),$e(t._zod,"optout",()=>e.innerType._zod.optout),$e(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,o)=>{if(o.direction==="backward")return e.innerType._zod.run(n,o);let r=e.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>Zt(s,o,ct()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=e.catchValue({...n,error:{issues:r.issues.map(i=>Zt(i,o,ct()))},input:n.value}),n.issues=[]),n)}}),wd=w("$ZodNaN",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),$s=w("$ZodPipe",(t,e)=>{Se.init(t,e),$e(t._zod,"values",()=>e.in._zod.values),$e(t._zod,"optin",()=>e.in._zod.optin),$e(t._zod,"optout",()=>e.out._zod.optout),$e(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=e.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Dl(s,e.in,o)):Dl(i,e.in,o)}let r=e.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Dl(i,e.out,o)):Dl(r,e.out,o)}});function Dl(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}a(Dl,"handlePipeResult");var Ji=w("$ZodCodec",(t,e)=>{Se.init(t,e),$e(t._zod,"values",()=>e.in._zod.values),$e(t._zod,"optin",()=>e.in._zod.optin),$e(t._zod,"optout",()=>e.out._zod.optout),$e(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=e.in._zod.run(n,o);return i instanceof Promise?i.then(s=>Ul(s,e,o)):Ul(i,e,o)}else{let i=e.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Ul(s,e,o)):Ul(i,e,o)}}});function Ul(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let r=e.transform(t.value,t);return r instanceof Promise?r.then(i=>Ml(t,i,e.out,n)):Ml(t,r,e.out,n)}else{let r=e.reverseTransform(t.value,t);return r instanceof Promise?r.then(i=>Ml(t,i,e.in,n)):Ml(t,r,e.in,n)}}a(Ul,"handleCodecAResult");function Ml(t,e,n,o){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},o)}a(Ml,"handleCodecTxResult");var Id=w("$ZodReadonly",(t,e)=>{Se.init(t,e),$e(t._zod,"propValues",()=>e.innerType._zod.propValues),$e(t._zod,"values",()=>e.innerType._zod.values),$e(t._zod,"optin",()=>e.innerType?._zod?.optin),$e(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(n,o)=>{if(o.direction==="backward")return e.innerType._zod.run(n,o);let r=e.innerType._zod.run(n,o);return r instanceof Promise?r.then(Xx):Xx(r)}});function Xx(t){return t.value=Object.freeze(t.value),t}a(Xx,"handleReadonlyResult");var Rd=w("$ZodTemplateLiteral",(t,e)=>{Se.init(t,e);let n=[];for(let o of e.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,s))}else if(o===null||Ih.has(typeof o))n.push(Er(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:t,expected:"string",code:"invalid_type"}),o):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),o)}),Od=w("$ZodFunction",(t,e)=>(Se.init(t,e),t._def=e,t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=t._def.input?Mo(t._def.input,o):o,i=Reflect.apply(n,this,r);return t._def.output?Mo(t._def.output,i):i}},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=t._def.input?await jo(t._def.input,o):o,i=await Reflect.apply(n,this,r);return t._def.output?await jo(t._def.output,i):i}},t._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let o=t.constructor;return Array.isArray(n[0])?new o({type:"function",input:new As({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new o({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let o=t.constructor;return new o({type:"function",input:t._def.input,output:n})},t)),Cd=w("$ZodPromise",(t,e)=>{Se.init(t,e),t._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>e.innerType._zod.run({value:r,issues:[]},o))}),$d=w("$ZodLazy",(t,e)=>{Se.init(t,e),$e(t._zod,"innerType",()=>e.getter()),$e(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),$e(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),$e(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),$e(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(n,o)=>t._zod.innerType._zod.run(n,o)}),ks=w("$ZodCustom",(t,e)=>{Ye.init(t,e),Se.init(t,e),t._zod.parse=(n,o)=>n,t._zod.check=n=>{let o=n.value,r=e.fn(o);if(r instanceof Promise)return r.then(i=>Yx(i,n,o,t));Yx(r,n,o,t)}});function Yx(t,e,n,o){if(!t){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),e.issues.push(Di(r))}}a(Yx,"handleRefineResult");var Xi={};nr(Xi,{ar:()=>Ig,az:()=>Rg,be:()=>Og,bg:()=>Cg,ca:()=>$g,cs:()=>kg,da:()=>Ng,de:()=>zg,en:()=>Ns,eo:()=>Dg,es:()=>Ug,fa:()=>Mg,fi:()=>jg,fr:()=>Lg,frCA:()=>Fg,he:()=>Bg,hu:()=>qg,hy:()=>Vg,id:()=>Zg,is:()=>Hg,it:()=>Gg,ja:()=>Wg,ka:()=>Jg,kh:()=>Kg,km:()=>zs,ko:()=>Xg,lt:()=>Yg,mk:()=>Qg,ms:()=>ey,nl:()=>ty,no:()=>ry,ota:()=>ny,pl:()=>iy,ps:()=>oy,pt:()=>ay,ru:()=>sy,sl:()=>cy,sv:()=>uy,ta:()=>ly,th:()=>dy,tr:()=>py,ua:()=>fy,uk:()=>Us,ur:()=>my,uz:()=>hy,vi:()=>gy,yo:()=>vy,zhCN:()=>yy,zhTW:()=>_y});var yU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`:`\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 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`}case"invalid_value":return r.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 ${te(r.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: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.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 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.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 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${r.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${B(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.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 ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function Ig(){return{localeError:yU()}}a(Ig,"default");var _U=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${u}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${te(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Rg(){return{localeError:_U()}}a(Rg,"default");function nT(t,e,n,o){let r=Math.abs(t),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?e:i>=2&&i<=4?n:o}a(nT,"getBelarusianPlural");var vU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`}case"invalid_value":return r.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 ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);if(s){let u=Number(r.maximum),l=nT(u,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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.maximum.toString()} ${l}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);if(s){let u=Number(r.minimum),l=nT(u,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 ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function Og(){return{localeError:vU()}}a(Og,"default");var bU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.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 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;if(i.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 "${i.prefix}"`;if(i.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 "${i.suffix}"`;if(i.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 "${i.includes}"`;if(i.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 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function Cg(){return{localeError:bU()}}a(Cg,"default");var SU=a(()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${u}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${te(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${B(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",s=e(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function $g(){return{localeError:SU()}}a($g,"default");var EU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${u}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${te(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${B(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function kg(){return{localeError:EU()}}a(kg,"default");var PU=a(()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${u}`:`Ugyldigt input: forventede ${i}, fik ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${te(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin),u=o[r.origin]??r.origin;return s?`For stor: forventede ${u??"value"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin),u=o[r.origin]??r.origin;return s?`For lille: forventede ${u} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${u} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}},"error");function Ng(){return{localeError:PU()}}a(Ng,"default");var xU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${u}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${te(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function zg(){return{localeError:xU()}}a(zg,"default");var TU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${te(r.values[0])}`:`Invalid option: expected one of ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}},"error");function Ns(){return{localeError:TU()}}a(Ns,"default");var AU=a(()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${u}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${te(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}},"error");function Dg(){return{localeError:AU()}}a(Dg,"default");var wU=a(()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${te(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin),u=o[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin),u=o[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${i}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function Ug(){return{localeError:wU()}}a(Ug,"default");var IU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \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 ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${te(r.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 ${B(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.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 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${B(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.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 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function Mg(){return{localeError:IU()}}a(Mg,"default");var RU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${u}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${te(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${B(r.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 jg(){return{localeError:RU()}}a(jg,"default");var OU=a(()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${u} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${te(r.values[0])} attendu`:`Option invalide : une valeur parmi ${B(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Trop grand : ${r.origin??"valeur"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Trop petit : ${r.origin} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${B(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Lg(){return{localeError:OU()}}a(Lg,"default");var CU=a(()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${u}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${te(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",s=e(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",s=e(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${B(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Fg(){return{localeError:CU()}}a(Fg,"default");var $U=a(()=>{let t={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"}},e={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"}},n=a(p=>p?t[p]:void 0,"typeEntry"),o=a(p=>{let f=n(p);return f?f.label:p??t.unknown.label},"typeLabel"),r=a(p=>`\u05D4${o(p)}`,"withDefinite"),i=a(p=>(n(p)?.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(p=>p?e[p]??null:null,"getSizing"),u={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"}},l={nan:"NaN"};return p=>{switch(p.code){case"invalid_type":{let f=p.expected,y=l[f??""]??o(f),m=oe(p.input),h=l[m]??t[m]?.label??m;return/^[A-Z]/.test(p.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${p.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 ${y}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(p.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 ${te(p.values[0])}`;let f=p.values.map(h=>te(h));if(p.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 y=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 ${y}`}case"too_big":{let f=s(p.origin),y=r(p.origin??"value");if(p.origin==="string")return`${f?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.maximum.toString()} ${f?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(p.origin==="number"){let _=p.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${p.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(p.origin==="array"||p.origin==="set"){let _=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",E=p.inclusive?`${p.maximum} ${f?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${p.maximum} ${f?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${y} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let m=p.inclusive?"<=":"<",h=i(p.origin??"value");return f?.unit?`${f.longLabel} \u05DE\u05D3\u05D9: ${y} ${h} ${m}${p.maximum.toString()} ${f.unit}`:`${f?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${y} ${h} ${m}${p.maximum.toString()}`}case"too_small":{let f=s(p.origin),y=r(p.origin??"value");if(p.origin==="string")return`${f?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${p.minimum.toString()} ${f?.unit??""} ${p.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(p.origin==="number"){let _=p.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${p.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${p.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}`}if(p.origin==="array"||p.origin==="set"){let _=p.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(p.minimum===1&&p.inclusive){let P=(p.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`}let E=p.inclusive?`${p.minimum} ${f?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${p.minimum} ${f?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} ${_} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let m=p.inclusive?">=":">",h=i(p.origin??"value");return f?.unit?`${f.shortLabel} \u05DE\u05D3\u05D9: ${y} ${h} ${m}${p.minimum.toString()} ${f.unit}`:`${f?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${y} ${h} ${m}${p.minimum.toString()}`}case"invalid_format":{let f=p;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 y=u[f.format],m=y?.label??f.format,_=(y?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \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 ${p.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${p.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${p.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${B(p.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${r(p.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Bg(){return{localeError:$U()}}a(Bg,"default");var kU=a(()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${u}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${te(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function qg(){return{localeError:kU()}}a(qg,"default");function oT(t,e,n){return Math.abs(t)===1?e:n}a(oT,"getArmenianPlural");function Ki(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(e.includes(n)?"\u0576":"\u0568")}a(Ki,"withDefiniteArticle");var NU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`:`\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 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`}case"invalid_value":return r.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 ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);if(s){let u=Number(r.maximum),l=oT(u,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 ${Ki(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${l}`}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 ${Ki(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);if(s){let u=Number(r.minimum),l=oT(u,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 ${Ki(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${l}`}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 ${Ki(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.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 ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.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 ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${B(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ki(r.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 ${Ki(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Vg(){return{localeError:NU()}}a(Vg,"default");var zU=a(()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${i}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${te(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}},"error");function Zg(){return{localeError:zU()}}a(Zg,"default");var DU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${te(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${B(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}},"error");function Hg(){return{localeError:DU()}}a(Hg,"default");var UU=a(()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${u}`:`Input non valido: atteso ${i}, ricevuto ${u}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${te(r.values[0])}`:`Opzione non valida: atteso uno tra ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${B(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}},"error");function Gg(){return{localeError:UU()}}a(Gg,"default");var MU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${te(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${B(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.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${r.keys.length>1?"\u7FA4":""}: ${B(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function Wg(){return{localeError:MU()}}a(Wg,"default");var jU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`:`\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 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`}case"invalid_value":return r.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 ${te(r.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 ${B(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.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 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${r.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 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.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 ${r.origin} ${s.verb} ${i}${r.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 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"-\u10D8\u10D7`:i.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 "${i.suffix}"-\u10D8\u10D7`:i.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 "${i.includes}"-\u10E1`:i.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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.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 ${r.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${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.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 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function Jg(){return{localeError:jU()}}a(Jg,"default");var LU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`:`\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 ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`}case"invalid_value":return r.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 ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${B(r.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 ${r.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 ${r.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 zs(){return{localeError:LU()}}a(zs,"default");function Kg(){return zs()}a(Kg,"default");var FU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${te(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${B(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=e(r.origin),l=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${s}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=e(r.origin),l=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${B(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Xg(){return{localeError:FU()}}a(Xg,"default");var Ds=a(t=>t.charAt(0).toUpperCase()+t.slice(1),"capitalizeFirstCharacter");function iT(t){let e=Math.abs(t),n=e%10,o=e%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}a(iT,"getUnitTypeFromNumber");var BU=a(()=>{let t={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 e(r,i,s,u){let l=t[r]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[u][s?"inclusive":"notInclusive"]}}a(e,"getSizing");let n={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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${te(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${B(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,s=e(r.origin,iT(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Ds(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let u=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ds(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,s=e(r.origin,iT(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Ds(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let u=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ds(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${B(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${Ds(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Yg(){return{localeError:BU()}}a(Yg,"default");var qU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.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 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.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 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`Invalid ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`${r.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"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.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 ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Qg(){return{localeError:qU()}}a(Qg,"default");var VU=a(()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${u}`:`Input tidak sah: dijangka ${i}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${te(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${B(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}},"error");function ey(){return{localeError:VU()}}a(ey,"default");var ZU=a(()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${i}, ontving ${u}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${te(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin),u=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${u}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${u}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin),u=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${u}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${u}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}},"error");function ty(){return{localeError:ZU()}}a(ty,"default");var HU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${u}`:`Ugyldig input: forventet ${i}, fikk ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${te(r.values[0])}`:`Ugyldig valg: forventet en av ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}},"error");function ry(){return{localeError:HU()}}a(ry,"default");var GU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${te(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function ny(){return{localeError:GU()}}a(ny,"default");var WU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${te(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${B(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${B(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.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 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function oy(){return{localeError:WU()}}a(oy,"default");var JU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${u}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${te(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function iy(){return{localeError:JU()}}a(iy,"default");var KU=a(()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${te(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${B(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}},"error");function ay(){return{localeError:KU()}}a(ay,"default");function aT(t,e,n,o){let r=Math.abs(t),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?e:i>=2&&i<=4?n:o}a(aT,"getRussianPlural");var XU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);if(s){let u=Number(r.maximum),l=aT(u,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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${l}`}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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);if(s){let u=Number(r.minimum),l=aT(u,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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${l}`}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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.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 sy(){return{localeError:XU()}}a(sy,"default");var YU=a(()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${u}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${te(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${B(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}},"error");function cy(){return{localeError:YU()}}a(cy,"default");var QU=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${u}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${te(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${B(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function uy(){return{localeError:QU()}}a(uy,"default");var eM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`:`\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 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`}case"invalid_value":return r.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 ${te(r.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 ${B(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.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 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.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 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.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 ${r.origin} ${i}${r.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 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.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 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.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${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.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`${r.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 ly(){return{localeError:eM()}}a(ly,"default");var tM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`:`\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 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.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 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.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 ${r.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: ${B(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.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 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function dy(){return{localeError:tM()}}a(dy,"default");var rM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${te(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function py(){return{localeError:rM()}}a(py,"default");var nM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.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 ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`:`\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 ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`}case"invalid_value":return r.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 ${te(r.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 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.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 ${r.origin} ${s.verb} ${i}${r.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 ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${B(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.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 Us(){return{localeError:nM()}}a(Us,"default");function fy(){return Us()}a(fy,"default");var oM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${te(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${B(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.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: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.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${r.keys.length>1?"\u0632":""}: ${B(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function my(){return{localeError:oM()}}a(my,"default");var iM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${u}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${te(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function hy(){return{localeError:iM()}}a(hy,"default");var aM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${te(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${B(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.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 ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function gy(){return{localeError:aM()}}a(gy,"default");var sM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${te(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${B(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function yy(){return{localeError:sM()}}a(yy,"default");var cM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${u}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${te(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${B(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function _y(){return{localeError:cM()}}a(_y,"default");var uM=a(()=>{let t={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 e(r){return t[r]??null}a(e,"getSizing");let n={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"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,s=oe(r.input),u=o[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${te(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=e(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${i}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",s=e(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.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 "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${B(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.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 ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function vy(){return{localeError:uM()}}a(vy,"default");var sT,Nd=Symbol("ZodOutput"),zd=Symbol("ZodInput"),kd=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let o=n[0];return this._map.set(e,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ms(){return new kd}a(Ms,"registry");(sT=globalThis).__zod_globalRegistry??(sT.__zod_globalRegistry=Ms());var wt=globalThis.__zod_globalRegistry;function js(t,e){return new t({type:"string",...Q(e)})}a(js,"_string");function Ls(t,e){return new t({type:"string",coerce:!0,...Q(e)})}a(Ls,"_coercedString");function Fs(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Q(e)})}a(Fs,"_email");function Yi(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Q(e)})}a(Yi,"_guid");function Bs(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Q(e)})}a(Bs,"_uuid");function qs(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Q(e)})}a(qs,"_uuidv4");function Vs(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Q(e)})}a(Vs,"_uuidv6");function Zs(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Q(e)})}a(Zs,"_uuidv7");function qo(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Q(e)})}a(qo,"_url");function Hs(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Q(e)})}a(Hs,"_emoji");function Gs(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Q(e)})}a(Gs,"_nanoid");function Ws(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Q(e)})}a(Ws,"_cuid");function Js(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Q(e)})}a(Js,"_cuid2");function Ks(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Q(e)})}a(Ks,"_ulid");function Xs(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Q(e)})}a(Xs,"_xid");function Ys(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Q(e)})}a(Ys,"_ksuid");function Qs(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Q(e)})}a(Qs,"_ipv4");function ec(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Q(e)})}a(ec,"_ipv6");function Dd(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...Q(e)})}a(Dd,"_mac");function tc(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Q(e)})}a(tc,"_cidrv4");function rc(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Q(e)})}a(rc,"_cidrv6");function nc(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Q(e)})}a(nc,"_base64");function oc(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Q(e)})}a(oc,"_base64url");function ic(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Q(e)})}a(ic,"_e164");function ac(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Q(e)})}a(ac,"_jwt");var Ud={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Md(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Q(e)})}a(Md,"_isoDateTime");function jd(t,e){return new t({type:"string",format:"date",check:"string_format",...Q(e)})}a(jd,"_isoDate");function Ld(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Q(e)})}a(Ld,"_isoTime");function Fd(t,e){return new t({type:"string",format:"duration",check:"string_format",...Q(e)})}a(Fd,"_isoDuration");function sc(t,e){return new t({type:"number",checks:[],...Q(e)})}a(sc,"_number");function cc(t,e){return new t({type:"number",coerce:!0,checks:[],...Q(e)})}a(cc,"_coercedNumber");function uc(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...Q(e)})}a(uc,"_int");function Bd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...Q(e)})}a(Bd,"_float32");function qd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...Q(e)})}a(qd,"_float64");function Vd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...Q(e)})}a(Vd,"_int32");function Zd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...Q(e)})}a(Zd,"_uint32");function lc(t,e){return new t({type:"boolean",...Q(e)})}a(lc,"_boolean");function dc(t,e){return new t({type:"boolean",coerce:!0,...Q(e)})}a(dc,"_coercedBoolean");function Hd(t,e){return new t({type:"bigint",...Q(e)})}a(Hd,"_bigint");function pc(t,e){return new t({type:"bigint",coerce:!0,...Q(e)})}a(pc,"_coercedBigint");function Gd(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Q(e)})}a(Gd,"_int64");function Wd(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Q(e)})}a(Wd,"_uint64");function Jd(t,e){return new t({type:"symbol",...Q(e)})}a(Jd,"_symbol");function Kd(t,e){return new t({type:"undefined",...Q(e)})}a(Kd,"_undefined");function Xd(t,e){return new t({type:"null",...Q(e)})}a(Xd,"_null");function fc(t){return new t({type:"any"})}a(fc,"_any");function mc(t){return new t({type:"unknown"})}a(mc,"_unknown");function Yd(t,e){return new t({type:"never",...Q(e)})}a(Yd,"_never");function hc(t,e){return new t({type:"void",...Q(e)})}a(hc,"_void");function Qd(t,e){return new t({type:"date",...Q(e)})}a(Qd,"_date");function gc(t,e){return new t({type:"date",coerce:!0,...Q(e)})}a(gc,"_coercedDate");function ep(t,e){return new t({type:"nan",...Q(e)})}a(ep,"_nan");function Mr(t,e){return new kl({check:"less_than",...Q(e),value:t,inclusive:!1})}a(Mr,"_lt");function Lt(t,e){return new kl({check:"less_than",...Q(e),value:t,inclusive:!0})}a(Lt,"_lte");function jr(t,e){return new Nl({check:"greater_than",...Q(e),value:t,inclusive:!1})}a(jr,"_gt");function Et(t,e){return new Nl({check:"greater_than",...Q(e),value:t,inclusive:!0})}a(Et,"_gte");function yc(t){return jr(0,t)}a(yc,"_positive");function _c(t){return Mr(0,t)}a(_c,"_negative");function vc(t){return Lt(0,t)}a(vc,"_nonpositive");function bc(t){return Et(0,t)}a(bc,"_nonnegative");function An(t,e){return new ag({check:"multiple_of",...Q(e),value:t})}a(An,"_multipleOf");function wn(t,e){return new ug({check:"max_size",...Q(e),maximum:t})}a(wn,"_maxSize");function Lr(t,e){return new lg({check:"min_size",...Q(e),minimum:t})}a(Lr,"_minSize");function to(t,e){return new dg({check:"size_equals",...Q(e),size:t})}a(to,"_size");function ro(t,e){return new pg({check:"max_length",...Q(e),maximum:t})}a(ro,"_maxLength");function mt(t,e){return new fg({check:"min_length",...Q(e),minimum:t})}a(mt,"_minLength");function no(t,e){return new mg({check:"length_equals",...Q(e),length:t})}a(no,"_length");function kt(t,e){return new hg({check:"string_format",format:"regex",...Q(e),pattern:t})}a(kt,"_regex");function Vo(t){return new gg({check:"string_format",format:"lowercase",...Q(t)})}a(Vo,"_lowercase");function Zo(t){return new yg({check:"string_format",format:"uppercase",...Q(t)})}a(Zo,"_uppercase");function Ho(t,e){return new _g({check:"string_format",format:"includes",...Q(e),includes:t})}a(Ho,"_includes");function Go(t,e){return new vg({check:"string_format",format:"starts_with",...Q(e),prefix:t})}a(Go,"_startsWith");function Wo(t,e){return new bg({check:"string_format",format:"ends_with",...Q(e),suffix:t})}a(Wo,"_endsWith");function Sc(t,e,n){return new Sg({check:"property",property:t,schema:e,...Q(n)})}a(Sc,"_property");function Jo(t,e){return new Eg({check:"mime_type",mime:t,...Q(e)})}a(Jo,"_mime");function Pr(t){return new Pg({check:"overwrite",tx:t})}a(Pr,"_overwrite");function Ko(t){return Pr(e=>e.normalize(t))}a(Ko,"_normalize");function Xo(){return Pr(t=>t.trim())}a(Xo,"_trim");function Yo(){return Pr(t=>t.toLowerCase())}a(Yo,"_toLowerCase");function Qo(){return Pr(t=>t.toUpperCase())}a(Qo,"_toUpperCase");function Qi(){return Pr(t=>Ah(t))}a(Qi,"_slugify");function by(t,e,n){return new t({type:"array",element:e,...Q(n)})}a(by,"_array");function dM(t,e,n){return new t({type:"union",options:e,...Q(n)})}a(dM,"_union");function pM(t,e,n){return new t({type:"union",options:e,inclusive:!1,...Q(n)})}a(pM,"_xor");function fM(t,e,n,o){return new t({type:"union",options:n,discriminator:e,...Q(o)})}a(fM,"_discriminatedUnion");function mM(t,e,n){return new t({type:"intersection",left:e,right:n})}a(mM,"_intersection");function hM(t,e,n,o){let r=n instanceof Se,i=r?o:n,s=r?n:null;return new t({type:"tuple",items:e,rest:s,...Q(i)})}a(hM,"_tuple");function gM(t,e,n,o){return new t({type:"record",keyType:e,valueType:n,...Q(o)})}a(gM,"_record");function yM(t,e,n,o){return new t({type:"map",keyType:e,valueType:n,...Q(o)})}a(yM,"_map");function _M(t,e,n){return new t({type:"set",valueType:e,...Q(n)})}a(_M,"_set");function vM(t,e,n){let o=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new t({type:"enum",entries:o,...Q(n)})}a(vM,"_enum");function bM(t,e,n){return new t({type:"enum",entries:e,...Q(n)})}a(bM,"_nativeEnum");function SM(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...Q(n)})}a(SM,"_literal");function tp(t,e){return new t({type:"file",...Q(e)})}a(tp,"_file");function EM(t,e){return new t({type:"transform",transform:e})}a(EM,"_transform");function PM(t,e){return new t({type:"optional",innerType:e})}a(PM,"_optional");function xM(t,e){return new t({type:"nullable",innerType:e})}a(xM,"_nullable");function TM(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():bl(n)}})}a(TM,"_default");function AM(t,e,n){return new t({type:"nonoptional",innerType:e,...Q(n)})}a(AM,"_nonoptional");function wM(t,e){return new t({type:"success",innerType:e})}a(wM,"_success");function IM(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}a(IM,"_catch");function RM(t,e,n){return new t({type:"pipe",in:e,out:n})}a(RM,"_pipe");function OM(t,e){return new t({type:"readonly",innerType:e})}a(OM,"_readonly");function CM(t,e,n){return new t({type:"template_literal",parts:e,...Q(n)})}a(CM,"_templateLiteral");function $M(t,e){return new t({type:"lazy",getter:e})}a($M,"_lazy");function kM(t,e){return new t({type:"promise",innerType:e})}a(kM,"_promise");function Ec(t,e,n){let o=Q(n);return o.abort??(o.abort=!0),new t({type:"custom",check:"custom",fn:e,...o})}a(Ec,"_custom");function rp(t,e,n){return new t({type:"custom",check:"custom",fn:e,...Q(n)})}a(rp,"_refine");function np(t){let e=cT(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Di(o,n.value,e._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),r.continue??(r.continue=!e._zod.def.abort),n.issues.push(Di(r))}},t(n.value,n)));return e}a(np,"_superRefine");function cT(t,e){let n=new Ye({check:"custom",...Q(e)});return n._zod.check=t,n}a(cT,"_check");function op(t){let e=new Ye({check:"describe"});return e._zod.onattach=[n=>{let o=wt.get(n)??{};wt.add(n,{...o,description:t})}],e._zod.check=()=>{},e}a(op,"describe");function ip(t){let e=new Ye({check:"meta"});return e._zod.onattach=[n=>{let o=wt.get(n)??{};wt.add(n,{...o,...t})}],e._zod.check=()=>{},e}a(ip,"meta");function ap(t,e){let n=Q(e),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),r=r.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(r),u=t.Codec??Ji,l=t.Boolean??Fo,p=t.String??Tn,f=new p({type:"string",error:n.error}),y=new l({type:"boolean",error:n.error}),m=new u({type:"pipe",in:f,out:y,transform:a(((h,_)=>{let E=h;return n.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?!0:s.has(E)?!1:(_.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:_.value,inst:m,continue:!1}),{})}),"transform"),reverseTransform:a(((h,_)=>h===!0?o[0]||"true":r[0]||"false"),"reverseTransform"),error:n.error});return m}a(ap,"_stringbool");function ei(t,e,n,o={}){let r=Q(o),i={...Q(o),check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:u=>n.test(u),...r};return n instanceof RegExp&&(i.pattern=n),new t(i)}a(ei,"_stringFormat");function oo(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??wt,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}a(oo,"initializeContext");function We(t,e,n={path:[],schemaPath:[]}){var o;let r=t._zod.def,i=e.seen.get(t);if(i)return i.count++,n.schemaPath.includes(t)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,s);let u=t._zod.toJSONSchema?.();if(u)s.schema=u;else{let f={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,f);else{let m=s.schema,h=e.processors[r.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);h(t,e,m,f)}let y=t._zod.parent;y&&(s.ref||(s.ref=y),We(y,e,f),e.seen.get(y).isParent=!0)}let l=e.metadataRegistry.get(t);return l&&Object.assign(s.schema,l),e.io==="input"&&Ft(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}a(We,"process");function io(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of t.seen.entries()){let u=t.metadataRegistry.get(s[0])?.id;if(u){let l=o.get(u);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(u,s[0])}}let r=a(s=>{let u=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let y=t.external.registry.get(s[0])?.id,m=t.external.uri??(_=>_);if(y)return{ref:m(y)};let h=s[1].defId??s[1].schema.id??`schema${t.counter++}`;return s[1].defId=h,{defId:h,ref:`${m("__shared")}#/${u}/${h}`}}if(s[1]===n)return{ref:"#"};let p=`#/${u}/`,f=s[1].schema.id??`__schema${t.counter++}`;return{defId:f,ref:p+f}},"makeURI"),i=a(s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:l,defId:p}=r(s);u.def={...u.schema},p&&(u.defId=p);let f=u.schema;for(let y in f)delete f[y];f.$ref=l},"extractToDef");if(t.cycles==="throw")for(let s of t.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
106
+
107
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of t.seen.entries()){let u=s[1];if(e===s[0]){i(s);continue}if(t.external){let p=t.external.registry.get(s[0])?.id;if(e!==s[0]&&p){i(s);continue}}if(t.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&t.reused==="ref"){i(s);continue}}}a(io,"extractDefs");function ao(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a(s=>{let u=t.seen.get(s);if(u.ref===null)return;let l=u.def??u.schema,p={...l},f=u.ref;if(u.ref=null,f){o(f);let m=t.seen.get(f),h=m.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,p),s._zod.parent===f)for(let E in l)E==="$ref"||E==="allOf"||E in p||delete l[E];if(h.$ref&&m.def)for(let E in l)E==="$ref"||E==="allOf"||E in m.def&&JSON.stringify(l[E])===JSON.stringify(m.def[E])&&delete l[E]}let y=s._zod.parent;if(y&&y!==f){o(y);let m=t.seen.get(y);if(m?.schema.$ref&&(l.$ref=m.schema.$ref,m.def))for(let h in l)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(l[h])===JSON.stringify(m.def[h])&&delete l[h]}t.override({zodSchema:s,jsonSchema:l,path:u.path??[]})},"flattenRef");for(let s of[...t.seen.entries()].reverse())o(s[0]);let r={};if(t.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=t.external.uri(s)}Object.assign(r,n.def??n.schema);let i=t.external?.defs??{};for(let s of t.seen.entries()){let u=s[1];u.def&&u.defId&&(i[u.defId]=u.def)}t.external||Object.keys(i).length>0&&(t.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:ea(e,"input",t.processors),output:ea(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(ao,"finalize");function Ft(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let o=t._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ft(o.element,n);if(o.type==="set")return Ft(o.valueType,n);if(o.type==="lazy")return Ft(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ft(o.innerType,n);if(o.type==="intersection")return Ft(o.left,n)||Ft(o.right,n);if(o.type==="record"||o.type==="map")return Ft(o.keyType,n)||Ft(o.valueType,n);if(o.type==="pipe")return Ft(o.in,n)||Ft(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Ft(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Ft(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Ft(r,n))return!0;return!!(o.rest&&Ft(o.rest,n))}return!1}a(Ft,"isTransforming");var Sy=a((t,e={})=>n=>{let o=oo({...n,processors:e});return We(t,o),io(o,t),ao(o,t)},"createToJSONSchemaMethod"),ea=a((t,e,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=oo({...r??{},target:i,io:e,processors:n});return We(t,s),io(s,t),ao(s,t)},"createStandardJSONSchemaMethod");var NM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ey=a((t,e,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:u,patterns:l,contentEncoding:p}=t._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),u&&(r.format=NM[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),p&&(r.contentEncoding=p),l&&l.size>0){let f=[...l];f.length===1?r.pattern=f[0].source:f.length>1&&(r.allOf=[...f.map(y=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},"stringProcessor"),Py=a((t,e,n,o)=>{let r=n,{minimum:i,maximum:s,format:u,multipleOf:l,exclusiveMaximum:p,exclusiveMinimum:f}=t._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof f=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(r.minimum=f,r.exclusiveMinimum=!0):r.exclusiveMinimum=f),typeof i=="number"&&(r.minimum=i,typeof f=="number"&&e.target!=="draft-04"&&(f>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof p=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(r.maximum=p,r.exclusiveMaximum=!0):r.exclusiveMaximum=p),typeof s=="number"&&(r.maximum=s,typeof p=="number"&&e.target!=="draft-04"&&(p<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof l=="number"&&(r.multipleOf=l)},"numberProcessor"),xy=a((t,e,n,o)=>{n.type="boolean"},"booleanProcessor"),Ty=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Ay=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),wy=a((t,e,n,o)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Iy=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Ry=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),Oy=a((t,e,n,o)=>{n.not={}},"neverProcessor"),Cy=a((t,e,n,o)=>{},"anyProcessor"),$y=a((t,e,n,o)=>{},"unknownProcessor"),ky=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),Ny=a((t,e,n,o)=>{let r=t._zod.def,i=us(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),zy=a((t,e,n,o)=>{let r=t._zod.def,i=[];for(let s of r.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},"literalProcessor"),Dy=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),Uy=a((t,e,n,o)=>{let r=n,i=t._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},"templateLiteralProcessor"),My=a((t,e,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:l}=t._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),l?l.length===1?(i.contentMediaType=l[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=l.map(p=>({contentMediaType:p}))):Object.assign(r,i)},"fileProcessor"),jy=a((t,e,n,o)=>{n.type="boolean"},"successProcessor"),Ly=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Fy=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),By=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),qy=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),Vy=a((t,e,n,o)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),Zy=a((t,e,n,o)=>{let r=n,i=t._zod.def,{minimum:s,maximum:u}=t._zod.bag;typeof s=="number"&&(r.minItems=s),typeof u=="number"&&(r.maxItems=u),r.type="array",r.items=We(i.element,e,{...o,path:[...o.path,"items"]})},"arrayProcessor"),Hy=a((t,e,n,o)=>{let r=n,i=t._zod.def;r.type="object",r.properties={};let s=i.shape;for(let p in s)r.properties[p]=We(s[p],e,{...o,path:[...o.path,"properties",p]});let u=new Set(Object.keys(s)),l=new Set([...u].filter(p=>{let f=i.shape[p]._zod;return e.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(r.required=Array.from(l)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=We(i.catchall,e,{...o,path:[...o.path,"additionalProperties"]})):e.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),cp=a((t,e,n,o)=>{let r=t._zod.def,i=r.inclusive===!1,s=r.options.map((u,l)=>We(u,e,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),Gy=a((t,e,n,o)=>{let r=t._zod.def,i=We(r.left,e,{...o,path:[...o.path,"allOf",0]}),s=We(r.right,e,{...o,path:[...o.path,"allOf",1]}),u=a(p=>"allOf"in p&&Object.keys(p).length===1,"isSimpleIntersection"),l=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=l},"intersectionProcessor"),Wy=a((t,e,n,o)=>{let r=n,i=t._zod.def;r.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",u=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((m,h)=>We(m,e,{...o,path:[...o.path,s,h]})),p=i.rest?We(i.rest,e,{...o,path:[...o.path,u,...e.target==="openapi-3.0"?[i.items.length]:[]]}):null;e.target==="draft-2020-12"?(r.prefixItems=l,p&&(r.items=p)):e.target==="openapi-3.0"?(r.items={anyOf:l},p&&r.items.anyOf.push(p),r.minItems=l.length,p||(r.maxItems=l.length)):(r.items=l,p&&(r.additionalItems=p));let{minimum:f,maximum:y}=t._zod.bag;typeof f=="number"&&(r.minItems=f),typeof y=="number"&&(r.maxItems=y)},"tupleProcessor"),Jy=a((t,e,n,o)=>{let r=n,i=t._zod.def;r.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let f=We(i.valueType,e,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let y of l)r.patternProperties[y.source]=f}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(r.propertyNames=We(i.keyType,e,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=We(i.valueType,e,{...o,path:[...o.path,"additionalProperties"]});let p=s._zod.values;if(p){let f=[...p].filter(y=>typeof y=="string"||typeof y=="number");f.length>0&&(r.required=f)}},"recordProcessor"),Ky=a((t,e,n,o)=>{let r=t._zod.def,i=We(r.innerType,e,o),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},"nullableProcessor"),Xy=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType},"nonoptionalProcessor"),Yy=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),Qy=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},"prefaultProcessor"),e_=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},"catchProcessor"),t_=a((t,e,n,o)=>{let r=t._zod.def,i=e.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;We(i,e,o);let s=e.seen.get(t);s.ref=i},"pipeProcessor"),r_=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),n_=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType},"promiseProcessor"),up=a((t,e,n,o)=>{let r=t._zod.def;We(r.innerType,e,o);let i=e.seen.get(t);i.ref=r.innerType},"optionalProcessor"),o_=a((t,e,n,o)=>{let r=t._zod.innerType;We(r,e,o);let i=e.seen.get(t);i.ref=r},"lazyProcessor"),sp={string:Ey,number:Py,boolean:xy,bigint:Ty,symbol:Ay,null:wy,undefined:Iy,void:Ry,never:Oy,any:Cy,unknown:$y,date:ky,enum:Ny,literal:zy,nan:Dy,template_literal:Uy,file:My,success:jy,custom:Ly,function:Fy,transform:By,map:qy,set:Vy,array:Zy,object:Hy,union:cp,intersection:Gy,tuple:Wy,record:Jy,nullable:Ky,nonoptional:Xy,default:Yy,prefault:Qy,catch:e_,pipe:t_,readonly:r_,promise:n_,optional:up,lazy:o_};function Pc(t,e){if("_idmap"in t){let o=t,r=oo({...e,processors:sp}),i={};for(let l of o._idmap.entries()){let[p,f]=l;We(f,r)}let s={},u={registry:o,uri:e?.uri,defs:i};r.external=u;for(let l of o._idmap.entries()){let[p,f]=l;io(r,f),s[p]=ao(r,f)}if(Object.keys(i).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=oo({...e,processors:sp});return We(t,n),io(n,t),ao(n,t)}a(Pc,"toJSONSchema");var lp=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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=oo({processors:sp,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return We(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),io(this.ctx,e);let o=ao(this.ctx,e),{"~standard":r,...i}=o;return i}};var uT={};var yt=w("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Se.init(t,e),t.def=e,t.type=e.type,t.parse=(n,o)=>Mo(t,n,o,{callee:t.parse}),t.safeParse=(n,o)=>Bi(t,n,o),t.parseAsync=async(n,o)=>jo(t,n,o,{callee:t.parseAsync}),t.safeParseAsync=async(n,o)=>Vi(t,n,o),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),t.with=t.check,t.clone=(n,o)=>At(t,n,o),t.brand=()=>t,t.register=((n,o)=>(n.add(t,o),t)),t.apply=n=>n(t)}),dp=w("ZodMiniString",(t,e)=>{Tn.init(t,e),yt.init(t,e)});function v(t){return js(dp,t)}a(v,"string");var lT=w("ZodMiniStringFormat",(t,e)=>{Ge.init(t,e),dp.init(t,e)});var UM=w("ZodMiniURL",(t,e)=>{_s.init(t,e),lT.init(t,e)});function dT(t){return qo(UM,t)}a(dT,"url");var pp=w("ZodMiniNumber",(t,e)=>{Hi.init(t,e),yt.init(t,e)});function It(t){return sc(pp,t)}a(It,"number");var MM=w("ZodMiniNumberFormat",(t,e)=>{vs.init(t,e),pp.init(t,e)});function pT(t){return uc(MM,t)}a(pT,"int");var i_=w("ZodMiniBoolean",(t,e)=>{Fo.init(t,e),yt.init(t,e)});function Be(t){return lc(i_,t)}a(Be,"boolean");var fT=w("ZodMiniBigInt",(t,e)=>{Gi.init(t,e),yt.init(t,e)});var jM=w("ZodMiniAny",(t,e)=>{bs.init(t,e),yt.init(t,e)});function xc(){return fc(jM)}a(xc,"any");var LM=w("ZodMiniUnknown",(t,e)=>{Ss.init(t,e),yt.init(t,e)});function Te(){return mc(LM)}a(Te,"unknown");var FM=w("ZodMiniVoid",(t,e)=>{Es.init(t,e),yt.init(t,e)});function mT(t){return hc(FM,t)}a(mT,"_void");var hT=w("ZodMiniDate",(t,e)=>{Ps.init(t,e),yt.init(t,e)});var BM=w("ZodMiniArray",(t,e)=>{xs.init(t,e),yt.init(t,e)});function be(t,e){return new BM({type:"array",element:t,...Q(e)})}a(be,"array");var qM=w("ZodMiniObject",(t,e)=>{hd.init(t,e),yt.init(t,e),$e(t,"shape",()=>e.shape)});function C(t,e){let n={type:"object",shape:t??{},...Q(e)};return new qM(n)}a(C,"object");var VM=w("ZodMiniUnion",(t,e)=>{Bo.init(t,e),yt.init(t,e)});function ke(t,e){return new VM({type:"union",options:t,...Q(e)})}a(ke,"union");var ZM=w("ZodMiniDiscriminatedUnion",(t,e)=>{Ts.init(t,e),yt.init(t,e)});function so(t,e,n){return new ZM({type:"union",options:e,discriminator:t,...Q(n)})}a(so,"discriminatedUnion");var HM=w("ZodMiniRecord",(t,e)=>{ws.init(t,e),yt.init(t,e)});function Ae(t,e,n){return new HM({type:"record",keyType:t,valueType:e,...Q(n)})}a(Ae,"record");var GM=w("ZodMiniEnum",(t,e)=>{Is.init(t,e),yt.init(t,e),t.options=Object.values(e.entries)});function _e(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new GM({type:"enum",entries:n,...Q(e)})}a(_e,"_enum");var WM=w("ZodMiniLiteral",(t,e)=>{Rs.init(t,e),yt.init(t,e)});function ge(t,e){return new WM({type:"literal",values:Array.isArray(t)?t:[t],...Q(e)})}a(ge,"literal");var JM=w("ZodMiniTransform",(t,e)=>{Os.init(t,e),yt.init(t,e)});function co(t){return new JM({type:"transform",transform:t})}a(co,"transform");var KM=w("ZodMiniOptional",(t,e)=>{Wi.init(t,e),yt.init(t,e)});function q(t){return new KM({type:"optional",innerType:t})}a(q,"optional");var XM=w("ZodMiniNullable",(t,e)=>{Cs.init(t,e),yt.init(t,e)});function Tc(t){return new XM({type:"nullable",innerType:t})}a(Tc,"nullable");var YM=w("ZodMiniPipe",(t,e)=>{$s.init(t,e),yt.init(t,e)});function uo(t,e){return new YM({type:"pipe",in:t,out:e})}a(uo,"pipe");var QM=w("ZodMiniCustom",(t,e)=>{ks.init(t,e),yt.init(t,e)});function fp(t,e){return Ec(QM,t??(()=>!0),e)}a(fp,"custom");var Ac={};nr(Ac,{bigint:()=>o1,boolean:()=>n1,date:()=>i1,number:()=>r1,string:()=>t1});function t1(t){return Ls(dp,t)}a(t1,"string");function r1(t){return cc(pp,t)}a(r1,"number");function n1(t){return dc(i_,t)}a(n1,"boolean");function o1(t){return pc(fT,t)}a(o1,"bigint");function i1(t){return gc(hT,t)}a(i1,"date");var s_=C({retryOnFailure:C({defaultValue:q(Be()),hide:q(Be())}),continueOnFailure:C({defaultValue:q(Be()),hide:q(Be())})}),a_=class{constructor(e,n,o,r,i,s,u,l,p,f,y,m,h){this.name=e;this.displayName=n;this.description=o;this.props=r;this.propertyGroups=i;this.run=s;this.test=u;this.requireAuth=l;this.errorHandlingOptions=p;this.outputSchema=f;this.audience=y;this.aiMetadata=m;this.classification=h}static{a(this,"IAction")}},lo=a(t=>new a_(t.name,t.displayName,t.description,t.props,t.propertyGroups,t.run,t.test??t.run,t.requireAuth??!0,t.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},t.outputSchema,t.audience,t.aiMetadata,t.classification),"createAction");var Le=C({displayName:v(),description:q(v()),advanced:q(Be()),width:q(_e(["half","full"])),icon:q(v()),placeholder:q(v())}),we=a((t,e)=>C({type:ge(e),required:Be(),defaultValue:q(xc())}),"TPropertyValue");var ar=C({...Le.shape,...we(v(),"SHORT_TEXT").shape}),In=C({...Le.shape,...we(v(),"LONG_TEXT").shape});var yT=C({label:v(),value:Te(),description:q(v()),icon:q(v())}),mp=C({disabled:q(Be()),placeholder:q(v()),options:be(yT)});var s1=_e(["cards"]),sr=C({...Le.shape,options:mp,display:q(s1),...we(Te(),"STATIC_DROPDOWN").shape}),Rn=C({...Le.shape,options:mp,...we(be(Te()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var c_=C({...Le.shape,...we(Te(),"DROPDOWN").shape,refreshers:be(v())}),wc=C({...Le.shape,...we(be(Te()),"MULTI_SELECT_DROPDOWN").shape,refreshers:be(v())});var On=C({...Le.shape,reveals:q(be(v())),...we(Be(),"CHECKBOX").shape});var Cn=C({...Le.shape,display:q(_e(["stepper"])),min:q(It()),max:q(It()),step:q(It()),...we(It(),"NUMBER").shape});var Ic=C({...Le.shape,streaming:q(Be()),...we(Te(),"FILE").shape});var Rc=C({...Le.shape,...we(v(),"DATE_TIME").shape});var _T=Ae(v(),ke([ar,In,sr,wc,Rn,On,Cn,Ic,Rc])),Oc=C({...Le.shape,properties:_T,...we(be(Te()),"ARRAY").shape});var vT=_e(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),bT=C({preset:q(vT),after:q(v()),before:q(v())}),u_=C({...Le.shape,display:q(_e(["dropdown"])),...we(bT,"DATE_RANGE").shape});var Cc=C({...Le.shape,...we(ke([Ae(v(),Te())]),"JSON").shape});var ST=ke([ar,sr,Cc,Oc,Rn]),c1=Ae(v(),ST),l_=C({refreshers:be(v()),...Le.shape,...we(Te(),"DYNAMIC").shape});var hp=C({...Le.shape,...we(mT(),"MARKDOWN").shape});var $c=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))($c||{}),ta=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(ta||{}),ra=(x=>(x.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",x.COMMUNICATION="COMMUNICATION",x.COMMERCE="COMMERCE",x.CORE="CORE",x.UNIVERSAL_AI="UNIVERSAL_AI",x.FLOW_CONTROL="FLOW_CONTROL",x.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",x.ACCOUNTING="ACCOUNTING",x.PRODUCTIVITY="PRODUCTIVITY",x.CONTENT_AND_FILES="CONTENT_AND_FILES",x.DEVELOPER_TOOLS="DEVELOPER_TOOLS",x.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",x.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",x.HUMAN_RESOURCES="HUMAN_RESOURCES",x.PAYMENT_PROCESSING="PAYMENT_PROCESSING",x.MARKETING="MARKETING",x.SALES_AND_CRM="SALES_AND_CRM",x))(ra||{});var kc=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(kc||{}),d_="both_client_credentials_and_authorization_code";var po=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(po||{}),Nc=(i=>(i.NONE="NONE",i.HEADER_PRESENT="HEADER_PRESENT",i.QUERY_PRESENT="QUERY_PRESENT",i.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",i.HEAD_REQUEST="HEAD_REQUEST",i))(Nc||{}),u1=C({strategy:_e(Nc),paramName:q(v())}),zc=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(zc||{});var gp=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(gp||{}),ET=C({status:q(It()),body:q(Te()),headers:q(Ae(v(),v()))}),PT=C({type:ge("DELAY"),resumeDateTime:v(),requestIdToReply:q(v()),handlerId:q(v()),streamStepProgress:q(_e(gp))}),xT=C({type:ge("WEBHOOK"),requestId:v(),requestIdToReply:q(v()),response:ET,handlerId:q(v()),streamStepProgress:q(_e(gp))}),l1=ke([PT,xT]);var d1=C({body:Te(),rawBody:q(Te()),headers:Ae(v(),v()),queryParams:Ae(v(),v())});function ht(t){return t==null}a(ht,"isNil");function Dc(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}a(Dc,"isEmpty");function yp(t,e){if(t==null)throw new Error(`${e} is null or undefined`)}a(yp,"assertNotNullOrUndefined");function p_(t){try{return{data:t(),error:null}}catch(e){return{data:null,error:e}}}a(p_,"tryCatchSync");var f_=St(require("crypto"),1);var p1=128,fo,na,f1=a(t=>{if(t<0)throw new RangeError("Wrong ID size");try{!fo||fo.length<t?(fo=Buffer.allocUnsafe(t*p1),f_.default.randomFillSync(fo),na=0):na+t>fo.length&&(f_.default.randomFillSync(fo),na=0)}catch(e){throw fo=void 0,e}na+=t},"fillPool"),m1=a(t=>(f1(t|=0),fo.subarray(na-t,na)),"random"),h1=a((t,e,n)=>{let o=(2<<31-Math.clz32(t.length-1|1))-1,r=Math.ceil(1.6*o*e/t.length);return(i=e)=>{if(i<=0)return"";let s="";for(;;){let u=n(r),l=r;for(;l--;)if(s+=t[u[l]&o]||"",s.length===i)return s}}},"customRandom"),AT=a((t,e=21)=>h1(t,e,m1),"customAlphabet");var g1="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wT=21,E8=v().check(kt(new RegExp(`^[0-9a-zA-Z]{${wT}}$`))),y1=AT(g1,wT);var mo=uo(co(t=>t instanceof Date?t.toISOString():t),v()),xr={id:v(),created:mo,updated:mo},ut=a(t=>q(Tc(t)),"Nullable");function m_(t){return q(Tc(_e(t)))}a(m_,"NullableEnum");var T8=uo(co(t=>t==="true"||t===!0?!0:t==="false"||t===!1?!1:void 0),q(Be())),_p=a(t=>uo(co(e=>Array.isArray(e)?e:e!==void 0?[e]:void 0),q(be(t))),"OptionalArrayFromQuery");var I8=Ae(v(),Te());var oa=(x=>(x.OPENAI="openai",x.OPENROUTER="openrouter",x.ANTHROPIC="anthropic",x.AZURE="azure",x.GOOGLE="google",x.ACTIVEPIECES="activepieces",x.CLOUDFLARE_GATEWAY="cloudflare-gateway",x.CUSTOM="custom",x.BEDROCK="bedrock",x.VERTEX="vertex",x.MISTRAL="mistral",x.XAI="xai",x.DEEPSEEK="deepseek",x.ZAI="zai",x.QWEN="qwen",x.MINIMAX="minimax",x.MOONSHOT="moonshot",x))(oa||{});var F8=v().check(kt(/^#[0-9A-Fa-f]{6}$/));var q8=C({filename:v(),data:Te(),type:ge("file"),mimetype:q(v())});var _1=St(RT());var K8=C({...xr,name:v(),permissions:be(v()),platformId:ut(v()),type:v(),userCount:q(It())});var Qp={};nr(Qp,{$brand:()=>ss,$input:()=>zd,$output:()=>Nd,NEVER:()=>yl,TimePrecision:()=>Ud,ZodAny:()=>M_,ZodArray:()=>B_,ZodBase64:()=>Lp,ZodBase64URL:()=>Fp,ZodBigInt:()=>da,ZodBigIntFormat:()=>Vp,ZodBoolean:()=>la,ZodCIDRv4:()=>Mp,ZodCIDRv6:()=>jp,ZodCUID:()=>Cp,ZodCUID2:()=>$p,ZodCatch:()=>lv,ZodCodec:()=>Yp,ZodCustom:()=>Wc,ZodCustomStringFormat:()=>ca,ZodDate:()=>qc,ZodDefault:()=>ov,ZodDiscriminatedUnion:()=>V_,ZodE164:()=>Bp,ZodEmail:()=>Ip,ZodEmoji:()=>Rp,ZodEnum:()=>aa,ZodError:()=>v1,ZodExactOptional:()=>tv,ZodFile:()=>Q_,ZodFirstPartyTypeKind:()=>Ev,ZodFunction:()=>vv,ZodGUID:()=>Mc,ZodIPv4:()=>Dp,ZodIPv6:()=>Up,ZodISODate:()=>Ep,ZodISODateTime:()=>Sp,ZodISODuration:()=>xp,ZodISOTime:()=>Pp,ZodIntersection:()=>Z_,ZodIssueCode:()=>S1,ZodJWT:()=>qp,ZodKSUID:()=>zp,ZodLazy:()=>gv,ZodLiteral:()=>Y_,ZodMAC:()=>C_,ZodMap:()=>K_,ZodNaN:()=>pv,ZodNanoID:()=>Op,ZodNever:()=>L_,ZodNonOptional:()=>Kp,ZodNull:()=>D_,ZodNullable:()=>nv,ZodNumber:()=>ua,ZodNumberFormat:()=>ri,ZodObject:()=>Zc,ZodOptional:()=>Jp,ZodPipe:()=>Xp,ZodPrefault:()=>av,ZodPromise:()=>_v,ZodReadonly:()=>fv,ZodRealError:()=>Wt,ZodRecord:()=>Gc,ZodSet:()=>X_,ZodString:()=>sa,ZodStringFormat:()=>Qe,ZodSuccess:()=>uv,ZodSymbol:()=>N_,ZodTemplateLiteral:()=>hv,ZodTransform:()=>ev,ZodTuple:()=>G_,ZodType:()=>Ne,ZodULID:()=>kp,ZodURL:()=>Bc,ZodUUID:()=>Qr,ZodUndefined:()=>z_,ZodUnion:()=>Hc,ZodUnknown:()=>j_,ZodVoid:()=>F_,ZodXID:()=>Np,ZodXor:()=>q_,_ZodString:()=>wp,_default:()=>iv,_function:()=>DA,any:()=>mA,array:()=>Vc,base64:()=>XT,base64url:()=>YT,bigint:()=>uA,boolean:()=>k_,catch:()=>dv,check:()=>UA,cidrv4:()=>JT,cidrv6:()=>KT,clone:()=>At,codec:()=>kA,coerce:()=>Pv,config:()=>ct,core:()=>ir,cuid:()=>FT,cuid2:()=>BT,custom:()=>MA,date:()=>gA,decode:()=>x_,decodeAsync:()=>A_,describe:()=>jA,discriminatedUnion:()=>EA,e164:()=>QT,email:()=>CT,emoji:()=>jT,encode:()=>P_,encodeAsync:()=>T_,endsWith:()=>Wo,enum:()=>Gp,exactOptional:()=>rv,file:()=>RA,flattenError:()=>Ui,float32:()=>iA,float64:()=>aA,formatError:()=>Mi,fromJSONSchema:()=>HA,function:()=>DA,getErrorMap:()=>P1,globalRegistry:()=>wt,gt:()=>jr,gte:()=>Et,guid:()=>$T,hash:()=>oA,hex:()=>nA,hostname:()=>rA,httpUrl:()=>MT,includes:()=>Ho,instanceof:()=>FA,int:()=>Ap,int32:()=>sA,int64:()=>lA,intersection:()=>H_,ipv4:()=>HT,ipv6:()=>WT,iso:()=>ia,json:()=>qA,jwt:()=>eA,keyof:()=>yA,ksuid:()=>ZT,lazy:()=>yv,length:()=>no,literal:()=>IA,locales:()=>Xi,looseObject:()=>bA,looseRecord:()=>xA,lowercase:()=>Vo,lt:()=>Mr,lte:()=>Lt,mac:()=>GT,map:()=>TA,maxLength:()=>ro,maxSize:()=>wn,meta:()=>LA,mime:()=>Jo,minLength:()=>mt,minSize:()=>Lr,multipleOf:()=>An,nan:()=>$A,nanoid:()=>LT,nativeEnum:()=>wA,negative:()=>_c,never:()=>Zp,nonnegative:()=>bc,nonoptional:()=>cv,nonpositive:()=>vc,normalize:()=>Ko,null:()=>U_,nullable:()=>Lc,nullish:()=>OA,number:()=>$_,object:()=>_A,optional:()=>jc,overwrite:()=>Pr,parse:()=>v_,parseAsync:()=>b_,partialRecord:()=>PA,pipe:()=>Fc,positive:()=>yc,prefault:()=>sv,preprocess:()=>VA,prettifyError:()=>El,promise:()=>zA,property:()=>Sc,readonly:()=>mv,record:()=>J_,refine:()=>bv,regex:()=>kt,regexes:()=>Gt,registry:()=>Ms,safeDecode:()=>I_,safeDecodeAsync:()=>O_,safeEncode:()=>w_,safeEncodeAsync:()=>R_,safeParse:()=>S_,safeParseAsync:()=>E_,set:()=>AA,setErrorMap:()=>E1,size:()=>to,slugify:()=>Qi,startsWith:()=>Go,strictObject:()=>vA,string:()=>Tp,stringFormat:()=>tA,stringbool:()=>BA,success:()=>CA,superRefine:()=>Sv,symbol:()=>pA,templateLiteral:()=>NA,toJSONSchema:()=>Pc,toLowerCase:()=>Yo,toUpperCase:()=>Qo,transform:()=>Wp,treeifyError:()=>Sl,trim:()=>Xo,tuple:()=>W_,uint32:()=>cA,uint64:()=>dA,ulid:()=>qT,undefined:()=>fA,union:()=>Hp,unknown:()=>ti,uppercase:()=>Zo,url:()=>UT,util:()=>ne,uuid:()=>kT,uuidv4:()=>NT,uuidv6:()=>zT,uuidv7:()=>DT,void:()=>hA,xid:()=>VT,xor:()=>SA});var Uc={};nr(Uc,{ZodAny:()=>M_,ZodArray:()=>B_,ZodBase64:()=>Lp,ZodBase64URL:()=>Fp,ZodBigInt:()=>da,ZodBigIntFormat:()=>Vp,ZodBoolean:()=>la,ZodCIDRv4:()=>Mp,ZodCIDRv6:()=>jp,ZodCUID:()=>Cp,ZodCUID2:()=>$p,ZodCatch:()=>lv,ZodCodec:()=>Yp,ZodCustom:()=>Wc,ZodCustomStringFormat:()=>ca,ZodDate:()=>qc,ZodDefault:()=>ov,ZodDiscriminatedUnion:()=>V_,ZodE164:()=>Bp,ZodEmail:()=>Ip,ZodEmoji:()=>Rp,ZodEnum:()=>aa,ZodExactOptional:()=>tv,ZodFile:()=>Q_,ZodFunction:()=>vv,ZodGUID:()=>Mc,ZodIPv4:()=>Dp,ZodIPv6:()=>Up,ZodIntersection:()=>Z_,ZodJWT:()=>qp,ZodKSUID:()=>zp,ZodLazy:()=>gv,ZodLiteral:()=>Y_,ZodMAC:()=>C_,ZodMap:()=>K_,ZodNaN:()=>pv,ZodNanoID:()=>Op,ZodNever:()=>L_,ZodNonOptional:()=>Kp,ZodNull:()=>D_,ZodNullable:()=>nv,ZodNumber:()=>ua,ZodNumberFormat:()=>ri,ZodObject:()=>Zc,ZodOptional:()=>Jp,ZodPipe:()=>Xp,ZodPrefault:()=>av,ZodPromise:()=>_v,ZodReadonly:()=>fv,ZodRecord:()=>Gc,ZodSet:()=>X_,ZodString:()=>sa,ZodStringFormat:()=>Qe,ZodSuccess:()=>uv,ZodSymbol:()=>N_,ZodTemplateLiteral:()=>hv,ZodTransform:()=>ev,ZodTuple:()=>G_,ZodType:()=>Ne,ZodULID:()=>kp,ZodURL:()=>Bc,ZodUUID:()=>Qr,ZodUndefined:()=>z_,ZodUnion:()=>Hc,ZodUnknown:()=>j_,ZodVoid:()=>F_,ZodXID:()=>Np,ZodXor:()=>q_,_ZodString:()=>wp,_default:()=>iv,_function:()=>DA,any:()=>mA,array:()=>Vc,base64:()=>XT,base64url:()=>YT,bigint:()=>uA,boolean:()=>k_,catch:()=>dv,check:()=>UA,cidrv4:()=>JT,cidrv6:()=>KT,codec:()=>kA,cuid:()=>FT,cuid2:()=>BT,custom:()=>MA,date:()=>gA,describe:()=>jA,discriminatedUnion:()=>EA,e164:()=>QT,email:()=>CT,emoji:()=>jT,enum:()=>Gp,exactOptional:()=>rv,file:()=>RA,float32:()=>iA,float64:()=>aA,function:()=>DA,guid:()=>$T,hash:()=>oA,hex:()=>nA,hostname:()=>rA,httpUrl:()=>MT,instanceof:()=>FA,int:()=>Ap,int32:()=>sA,int64:()=>lA,intersection:()=>H_,ipv4:()=>HT,ipv6:()=>WT,json:()=>qA,jwt:()=>eA,keyof:()=>yA,ksuid:()=>ZT,lazy:()=>yv,literal:()=>IA,looseObject:()=>bA,looseRecord:()=>xA,mac:()=>GT,map:()=>TA,meta:()=>LA,nan:()=>$A,nanoid:()=>LT,nativeEnum:()=>wA,never:()=>Zp,nonoptional:()=>cv,null:()=>U_,nullable:()=>Lc,nullish:()=>OA,number:()=>$_,object:()=>_A,optional:()=>jc,partialRecord:()=>PA,pipe:()=>Fc,prefault:()=>sv,preprocess:()=>VA,promise:()=>zA,readonly:()=>mv,record:()=>J_,refine:()=>bv,set:()=>AA,strictObject:()=>vA,string:()=>Tp,stringFormat:()=>tA,stringbool:()=>BA,success:()=>CA,superRefine:()=>Sv,symbol:()=>pA,templateLiteral:()=>NA,transform:()=>Wp,tuple:()=>W_,uint32:()=>cA,uint64:()=>dA,ulid:()=>qT,undefined:()=>fA,union:()=>Hp,unknown:()=>ti,url:()=>UT,uuid:()=>kT,uuidv4:()=>NT,uuidv6:()=>zT,uuidv7:()=>DT,void:()=>hA,xid:()=>VT,xor:()=>SA});var bp={};nr(bp,{endsWith:()=>Wo,gt:()=>jr,gte:()=>Et,includes:()=>Ho,length:()=>no,lowercase:()=>Vo,lt:()=>Mr,lte:()=>Lt,maxLength:()=>ro,maxSize:()=>wn,mime:()=>Jo,minLength:()=>mt,minSize:()=>Lr,multipleOf:()=>An,negative:()=>_c,nonnegative:()=>bc,nonpositive:()=>vc,normalize:()=>Ko,overwrite:()=>Pr,positive:()=>yc,property:()=>Sc,regex:()=>kt,size:()=>to,slugify:()=>Qi,startsWith:()=>Go,toLowerCase:()=>Yo,toUpperCase:()=>Qo,trim:()=>Xo,uppercase:()=>Zo});var ia={};nr(ia,{ZodISODate:()=>Ep,ZodISODateTime:()=>Sp,ZodISODuration:()=>xp,ZodISOTime:()=>Pp,date:()=>g_,datetime:()=>h_,duration:()=>__,time:()=>y_});var Sp=w("ZodISODateTime",(t,e)=>{Kl.init(t,e),Qe.init(t,e)});function h_(t){return Md(Sp,t)}a(h_,"datetime");var Ep=w("ZodISODate",(t,e)=>{Xl.init(t,e),Qe.init(t,e)});function g_(t){return jd(Ep,t)}a(g_,"date");var Pp=w("ZodISOTime",(t,e)=>{Yl.init(t,e),Qe.init(t,e)});function y_(t){return Ld(Pp,t)}a(y_,"time");var xp=w("ZodISODuration",(t,e)=>{Ql.init(t,e),Qe.init(t,e)});function __(t){return Fd(xp,t)}a(__,"duration");var OT=a((t,e)=>{ms.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:a(n=>Mi(t,n),"value")},flatten:{value:a(n=>Ui(t,n),"value")},addIssue:{value:a(n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,Ni,2)},"value")},addIssues:{value:a(n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,Ni,2)},"value")},isEmpty:{get(){return t.issues.length===0}}})},"initializer"),v1=w("ZodError",OT),Wt=w("ZodError",OT,{Parent:Error});var v_=ji(Wt),b_=Li(Wt),S_=Fi(Wt),E_=qi(Wt),P_=Pl(Wt),x_=xl(Wt),T_=Tl(Wt),A_=Al(Wt),w_=wl(Wt),I_=Il(Wt),R_=Rl(Wt),O_=Ol(Wt);var Ne=w("ZodType",(t,e)=>(Se.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:ea(t,"input"),output:ea(t,"output")}}),t.toJSONSchema=Sy(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(ne.mergeDefs(e,{checks:[...e.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),t.with=t.check,t.clone=(n,o)=>At(t,n,o),t.brand=()=>t,t.register=((n,o)=>(n.add(t,o),t)),t.parse=(n,o)=>v_(t,n,o,{callee:t.parse}),t.safeParse=(n,o)=>S_(t,n,o),t.parseAsync=async(n,o)=>b_(t,n,o,{callee:t.parseAsync}),t.safeParseAsync=async(n,o)=>E_(t,n,o),t.spa=t.safeParseAsync,t.encode=(n,o)=>P_(t,n,o),t.decode=(n,o)=>x_(t,n,o),t.encodeAsync=async(n,o)=>T_(t,n,o),t.decodeAsync=async(n,o)=>A_(t,n,o),t.safeEncode=(n,o)=>w_(t,n,o),t.safeDecode=(n,o)=>I_(t,n,o),t.safeEncodeAsync=async(n,o)=>R_(t,n,o),t.safeDecodeAsync=async(n,o)=>O_(t,n,o),t.refine=(n,o)=>t.check(bv(n,o)),t.superRefine=n=>t.check(Sv(n)),t.overwrite=n=>t.check(Pr(n)),t.optional=()=>jc(t),t.exactOptional=()=>rv(t),t.nullable=()=>Lc(t),t.nullish=()=>jc(Lc(t)),t.nonoptional=n=>cv(t,n),t.array=()=>Vc(t),t.or=n=>Hp([t,n]),t.and=n=>H_(t,n),t.transform=n=>Fc(t,Wp(n)),t.default=n=>iv(t,n),t.prefault=n=>sv(t,n),t.catch=n=>dv(t,n),t.pipe=n=>Fc(t,n),t.readonly=()=>mv(t),t.describe=n=>{let o=t.clone();return wt.add(o,{description:n}),o},Object.defineProperty(t,"description",{get(){return wt.get(t)?.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return wt.get(t);let o=t.clone();return wt.add(o,n[0]),o},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=n=>n(t),t)),wp=w("_ZodString",(t,e)=>{Tn.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(o,r,i)=>Ey(t,o,r,i);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...o)=>t.check(kt(...o)),t.includes=(...o)=>t.check(Ho(...o)),t.startsWith=(...o)=>t.check(Go(...o)),t.endsWith=(...o)=>t.check(Wo(...o)),t.min=(...o)=>t.check(mt(...o)),t.max=(...o)=>t.check(ro(...o)),t.length=(...o)=>t.check(no(...o)),t.nonempty=(...o)=>t.check(mt(1,...o)),t.lowercase=o=>t.check(Vo(o)),t.uppercase=o=>t.check(Zo(o)),t.trim=()=>t.check(Xo()),t.normalize=(...o)=>t.check(Ko(...o)),t.toLowerCase=()=>t.check(Yo()),t.toUpperCase=()=>t.check(Qo()),t.slugify=()=>t.check(Qi())}),sa=w("ZodString",(t,e)=>{Tn.init(t,e),wp.init(t,e),t.email=n=>t.check(Fs(Ip,n)),t.url=n=>t.check(qo(Bc,n)),t.jwt=n=>t.check(ac(qp,n)),t.emoji=n=>t.check(Hs(Rp,n)),t.guid=n=>t.check(Yi(Mc,n)),t.uuid=n=>t.check(Bs(Qr,n)),t.uuidv4=n=>t.check(qs(Qr,n)),t.uuidv6=n=>t.check(Vs(Qr,n)),t.uuidv7=n=>t.check(Zs(Qr,n)),t.nanoid=n=>t.check(Gs(Op,n)),t.guid=n=>t.check(Yi(Mc,n)),t.cuid=n=>t.check(Ws(Cp,n)),t.cuid2=n=>t.check(Js($p,n)),t.ulid=n=>t.check(Ks(kp,n)),t.base64=n=>t.check(nc(Lp,n)),t.base64url=n=>t.check(oc(Fp,n)),t.xid=n=>t.check(Xs(Np,n)),t.ksuid=n=>t.check(Ys(zp,n)),t.ipv4=n=>t.check(Qs(Dp,n)),t.ipv6=n=>t.check(ec(Up,n)),t.cidrv4=n=>t.check(tc(Mp,n)),t.cidrv6=n=>t.check(rc(jp,n)),t.e164=n=>t.check(ic(Bp,n)),t.datetime=n=>t.check(h_(n)),t.date=n=>t.check(g_(n)),t.time=n=>t.check(y_(n)),t.duration=n=>t.check(__(n))});function Tp(t){return js(sa,t)}a(Tp,"string");var Qe=w("ZodStringFormat",(t,e)=>{Ge.init(t,e),wp.init(t,e)}),Ip=w("ZodEmail",(t,e)=>{Bl.init(t,e),Qe.init(t,e)});function CT(t){return Fs(Ip,t)}a(CT,"email");var Mc=w("ZodGUID",(t,e)=>{Ll.init(t,e),Qe.init(t,e)});function $T(t){return Yi(Mc,t)}a($T,"guid");var Qr=w("ZodUUID",(t,e)=>{Fl.init(t,e),Qe.init(t,e)});function kT(t){return Bs(Qr,t)}a(kT,"uuid");function NT(t){return qs(Qr,t)}a(NT,"uuidv4");function zT(t){return Vs(Qr,t)}a(zT,"uuidv6");function DT(t){return Zs(Qr,t)}a(DT,"uuidv7");var Bc=w("ZodURL",(t,e)=>{_s.init(t,e),Qe.init(t,e)});function UT(t){return qo(Bc,t)}a(UT,"url");function MT(t){return qo(Bc,{protocol:/^https?$/,hostname:Gt.domain,...ne.normalizeParams(t)})}a(MT,"httpUrl");var Rp=w("ZodEmoji",(t,e)=>{ql.init(t,e),Qe.init(t,e)});function jT(t){return Hs(Rp,t)}a(jT,"emoji");var Op=w("ZodNanoID",(t,e)=>{Vl.init(t,e),Qe.init(t,e)});function LT(t){return Gs(Op,t)}a(LT,"nanoid");var Cp=w("ZodCUID",(t,e)=>{Zl.init(t,e),Qe.init(t,e)});function FT(t){return Ws(Cp,t)}a(FT,"cuid");var $p=w("ZodCUID2",(t,e)=>{Hl.init(t,e),Qe.init(t,e)});function BT(t){return Js($p,t)}a(BT,"cuid2");var kp=w("ZodULID",(t,e)=>{Gl.init(t,e),Qe.init(t,e)});function qT(t){return Ks(kp,t)}a(qT,"ulid");var Np=w("ZodXID",(t,e)=>{Wl.init(t,e),Qe.init(t,e)});function VT(t){return Xs(Np,t)}a(VT,"xid");var zp=w("ZodKSUID",(t,e)=>{Jl.init(t,e),Qe.init(t,e)});function ZT(t){return Ys(zp,t)}a(ZT,"ksuid");var Dp=w("ZodIPv4",(t,e)=>{ed.init(t,e),Qe.init(t,e)});function HT(t){return Qs(Dp,t)}a(HT,"ipv4");var C_=w("ZodMAC",(t,e)=>{rd.init(t,e),Qe.init(t,e)});function GT(t){return Dd(C_,t)}a(GT,"mac");var Up=w("ZodIPv6",(t,e)=>{td.init(t,e),Qe.init(t,e)});function WT(t){return ec(Up,t)}a(WT,"ipv6");var Mp=w("ZodCIDRv4",(t,e)=>{nd.init(t,e),Qe.init(t,e)});function JT(t){return tc(Mp,t)}a(JT,"cidrv4");var jp=w("ZodCIDRv6",(t,e)=>{od.init(t,e),Qe.init(t,e)});function KT(t){return rc(jp,t)}a(KT,"cidrv6");var Lp=w("ZodBase64",(t,e)=>{id.init(t,e),Qe.init(t,e)});function XT(t){return nc(Lp,t)}a(XT,"base64");var Fp=w("ZodBase64URL",(t,e)=>{ad.init(t,e),Qe.init(t,e)});function YT(t){return oc(Fp,t)}a(YT,"base64url");var Bp=w("ZodE164",(t,e)=>{sd.init(t,e),Qe.init(t,e)});function QT(t){return ic(Bp,t)}a(QT,"e164");var qp=w("ZodJWT",(t,e)=>{cd.init(t,e),Qe.init(t,e)});function eA(t){return ac(qp,t)}a(eA,"jwt");var ca=w("ZodCustomStringFormat",(t,e)=>{ud.init(t,e),Qe.init(t,e)});function tA(t,e,n={}){return ei(ca,t,e,n)}a(tA,"stringFormat");function rA(t){return ei(ca,"hostname",Gt.hostname,t)}a(rA,"hostname");function nA(t){return ei(ca,"hex",Gt.hex,t)}a(nA,"hex");function oA(t,e){let n=e?.enc??"hex",o=`${t}_${n}`,r=Gt[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return ei(ca,o,r,e)}a(oA,"hash");var ua=w("ZodNumber",(t,e)=>{Hi.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(o,r,i)=>Py(t,o,r,i),t.gt=(o,r)=>t.check(jr(o,r)),t.gte=(o,r)=>t.check(Et(o,r)),t.min=(o,r)=>t.check(Et(o,r)),t.lt=(o,r)=>t.check(Mr(o,r)),t.lte=(o,r)=>t.check(Lt(o,r)),t.max=(o,r)=>t.check(Lt(o,r)),t.int=o=>t.check(Ap(o)),t.safe=o=>t.check(Ap(o)),t.positive=o=>t.check(jr(0,o)),t.nonnegative=o=>t.check(Et(0,o)),t.negative=o=>t.check(Mr(0,o)),t.nonpositive=o=>t.check(Lt(0,o)),t.multipleOf=(o,r)=>t.check(An(o,r)),t.step=(o,r)=>t.check(An(o,r)),t.finite=()=>t;let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function $_(t){return sc(ua,t)}a($_,"number");var ri=w("ZodNumberFormat",(t,e)=>{vs.init(t,e),ua.init(t,e)});function Ap(t){return uc(ri,t)}a(Ap,"int");function iA(t){return Bd(ri,t)}a(iA,"float32");function aA(t){return qd(ri,t)}a(aA,"float64");function sA(t){return Vd(ri,t)}a(sA,"int32");function cA(t){return Zd(ri,t)}a(cA,"uint32");var la=w("ZodBoolean",(t,e)=>{Fo.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>xy(t,n,o,r)});function k_(t){return lc(la,t)}a(k_,"boolean");var da=w("ZodBigInt",(t,e)=>{Gi.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(o,r,i)=>Ty(t,o,r,i),t.gte=(o,r)=>t.check(Et(o,r)),t.min=(o,r)=>t.check(Et(o,r)),t.gt=(o,r)=>t.check(jr(o,r)),t.gte=(o,r)=>t.check(Et(o,r)),t.min=(o,r)=>t.check(Et(o,r)),t.lt=(o,r)=>t.check(Mr(o,r)),t.lte=(o,r)=>t.check(Lt(o,r)),t.max=(o,r)=>t.check(Lt(o,r)),t.positive=o=>t.check(jr(BigInt(0),o)),t.negative=o=>t.check(Mr(BigInt(0),o)),t.nonpositive=o=>t.check(Lt(BigInt(0),o)),t.nonnegative=o=>t.check(Et(BigInt(0),o)),t.multipleOf=(o,r)=>t.check(An(o,r));let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null});function uA(t){return Hd(da,t)}a(uA,"bigint");var Vp=w("ZodBigIntFormat",(t,e)=>{ld.init(t,e),da.init(t,e)});function lA(t){return Gd(Vp,t)}a(lA,"int64");function dA(t){return Wd(Vp,t)}a(dA,"uint64");var N_=w("ZodSymbol",(t,e)=>{dd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Ay(t,n,o,r)});function pA(t){return Jd(N_,t)}a(pA,"symbol");var z_=w("ZodUndefined",(t,e)=>{pd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Iy(t,n,o,r)});function fA(t){return Kd(z_,t)}a(fA,"_undefined");var D_=w("ZodNull",(t,e)=>{fd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>wy(t,n,o,r)});function U_(t){return Xd(D_,t)}a(U_,"_null");var M_=w("ZodAny",(t,e)=>{bs.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Cy(t,n,o,r)});function mA(){return fc(M_)}a(mA,"any");var j_=w("ZodUnknown",(t,e)=>{Ss.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>$y(t,n,o,r)});function ti(){return mc(j_)}a(ti,"unknown");var L_=w("ZodNever",(t,e)=>{md.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Oy(t,n,o,r)});function Zp(t){return Yd(L_,t)}a(Zp,"never");var F_=w("ZodVoid",(t,e)=>{Es.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Ry(t,n,o,r)});function hA(t){return hc(F_,t)}a(hA,"_void");var qc=w("ZodDate",(t,e)=>{Ps.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(o,r,i)=>ky(t,o,r,i),t.min=(o,r)=>t.check(Et(o,r)),t.max=(o,r)=>t.check(Lt(o,r));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function gA(t){return Qd(qc,t)}a(gA,"date");var B_=w("ZodArray",(t,e)=>{xs.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Zy(t,n,o,r),t.element=e.element,t.min=(n,o)=>t.check(mt(n,o)),t.nonempty=n=>t.check(mt(1,n)),t.max=(n,o)=>t.check(ro(n,o)),t.length=(n,o)=>t.check(no(n,o)),t.unwrap=()=>t.element});function Vc(t,e){return by(B_,t,e)}a(Vc,"array");function yA(t){let e=t._zod.def.shape;return Gp(Object.keys(e))}a(yA,"keyof");var Zc=w("ZodObject",(t,e)=>{wg.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Hy(t,n,o,r),ne.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Gp(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:ti()}),t.loose=()=>t.clone({...t._zod.def,catchall:ti()}),t.strict=()=>t.clone({...t._zod.def,catchall:Zp()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>ne.extend(t,n),t.safeExtend=n=>ne.safeExtend(t,n),t.merge=n=>ne.merge(t,n),t.pick=n=>ne.pick(t,n),t.omit=n=>ne.omit(t,n),t.partial=(...n)=>ne.partial(Jp,t,n[0]),t.required=(...n)=>ne.required(Kp,t,n[0])});function _A(t,e){let n={type:"object",shape:t??{},...ne.normalizeParams(e)};return new Zc(n)}a(_A,"object");function vA(t,e){return new Zc({type:"object",shape:t,catchall:Zp(),...ne.normalizeParams(e)})}a(vA,"strictObject");function bA(t,e){return new Zc({type:"object",shape:t,catchall:ti(),...ne.normalizeParams(e)})}a(bA,"looseObject");var Hc=w("ZodUnion",(t,e)=>{Bo.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>cp(t,n,o,r),t.options=e.options});function Hp(t,e){return new Hc({type:"union",options:t,...ne.normalizeParams(e)})}a(Hp,"union");var q_=w("ZodXor",(t,e)=>{Hc.init(t,e),gd.init(t,e),t._zod.processJSONSchema=(n,o,r)=>cp(t,n,o,r),t.options=e.options});function SA(t,e){return new q_({type:"union",options:t,inclusive:!1,...ne.normalizeParams(e)})}a(SA,"xor");var V_=w("ZodDiscriminatedUnion",(t,e)=>{Hc.init(t,e),Ts.init(t,e)});function EA(t,e,n){return new V_({type:"union",options:e,discriminator:t,...ne.normalizeParams(n)})}a(EA,"discriminatedUnion");var Z_=w("ZodIntersection",(t,e)=>{yd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Gy(t,n,o,r)});function H_(t,e){return new Z_({type:"intersection",left:t,right:e})}a(H_,"intersection");var G_=w("ZodTuple",(t,e)=>{As.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Wy(t,n,o,r),t.rest=n=>t.clone({...t._zod.def,rest:n})});function W_(t,e,n){let o=e instanceof Se,r=o?n:e,i=o?e:null;return new G_({type:"tuple",items:t,rest:i,...ne.normalizeParams(r)})}a(W_,"tuple");var Gc=w("ZodRecord",(t,e)=>{ws.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Jy(t,n,o,r),t.keyType=e.keyType,t.valueType=e.valueType});function J_(t,e,n){return new Gc({type:"record",keyType:t,valueType:e,...ne.normalizeParams(n)})}a(J_,"record");function PA(t,e,n){let o=At(t);return o._zod.values=void 0,new Gc({type:"record",keyType:o,valueType:e,...ne.normalizeParams(n)})}a(PA,"partialRecord");function xA(t,e,n){return new Gc({type:"record",keyType:t,valueType:e,mode:"loose",...ne.normalizeParams(n)})}a(xA,"looseRecord");var K_=w("ZodMap",(t,e)=>{_d.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>qy(t,n,o,r),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(Lr(...n)),t.nonempty=n=>t.check(Lr(1,n)),t.max=(...n)=>t.check(wn(...n)),t.size=(...n)=>t.check(to(...n))});function TA(t,e,n){return new K_({type:"map",keyType:t,valueType:e,...ne.normalizeParams(n)})}a(TA,"map");var X_=w("ZodSet",(t,e)=>{vd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Vy(t,n,o,r),t.min=(...n)=>t.check(Lr(...n)),t.nonempty=n=>t.check(Lr(1,n)),t.max=(...n)=>t.check(wn(...n)),t.size=(...n)=>t.check(to(...n))});function AA(t,e){return new X_({type:"set",valueType:t,...ne.normalizeParams(e)})}a(AA,"set");var aa=w("ZodEnum",(t,e)=>{Is.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(o,r,i)=>Ny(t,o,r,i),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new aa({...e,checks:[],...ne.normalizeParams(r),entries:i})},t.exclude=(o,r)=>{let i={...e.entries};for(let s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new aa({...e,checks:[],...ne.normalizeParams(r),entries:i})}});function Gp(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new aa({type:"enum",entries:n,...ne.normalizeParams(e)})}a(Gp,"_enum");function wA(t,e){return new aa({type:"enum",entries:t,...ne.normalizeParams(e)})}a(wA,"nativeEnum");var Y_=w("ZodLiteral",(t,e)=>{Rs.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>zy(t,n,o,r),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function IA(t,e){return new Y_({type:"literal",values:Array.isArray(t)?t:[t],...ne.normalizeParams(e)})}a(IA,"literal");var Q_=w("ZodFile",(t,e)=>{bd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>My(t,n,o,r),t.min=(n,o)=>t.check(Lr(n,o)),t.max=(n,o)=>t.check(wn(n,o)),t.mime=(n,o)=>t.check(Jo(Array.isArray(n)?n:[n],o))});function RA(t){return tp(Q_,t)}a(RA,"file");var ev=w("ZodTransform",(t,e)=>{Os.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>By(t,n,o,r),t._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Kn(t.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(ne.issue(i,n.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),n.issues.push(ne.issue(s))}};let r=e.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function Wp(t){return new ev({type:"transform",transform:t})}a(Wp,"transform");var Jp=w("ZodOptional",(t,e)=>{Wi.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>up(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function jc(t){return new Jp({type:"optional",innerType:t})}a(jc,"optional");var tv=w("ZodExactOptional",(t,e)=>{Sd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>up(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function rv(t){return new tv({type:"optional",innerType:t})}a(rv,"exactOptional");var nv=w("ZodNullable",(t,e)=>{Cs.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Ky(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function Lc(t){return new nv({type:"nullable",innerType:t})}a(Lc,"nullable");function OA(t){return jc(Lc(t))}a(OA,"nullish");var ov=w("ZodDefault",(t,e)=>{Ed.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Yy(t,n,o,r),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function iv(t,e){return new ov({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ne.shallowClone(e)}})}a(iv,"_default");var av=w("ZodPrefault",(t,e)=>{Pd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Qy(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function sv(t,e){return new av({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ne.shallowClone(e)}})}a(sv,"prefault");var Kp=w("ZodNonOptional",(t,e)=>{xd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Xy(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function cv(t,e){return new Kp({type:"nonoptional",innerType:t,...ne.normalizeParams(e)})}a(cv,"nonoptional");var uv=w("ZodSuccess",(t,e)=>{Td.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>jy(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function CA(t){return new uv({type:"success",innerType:t})}a(CA,"success");var lv=w("ZodCatch",(t,e)=>{Ad.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>e_(t,n,o,r),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function dv(t,e){return new lv({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}a(dv,"_catch");var pv=w("ZodNaN",(t,e)=>{wd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Dy(t,n,o,r)});function $A(t){return ep(pv,t)}a($A,"nan");var Xp=w("ZodPipe",(t,e)=>{$s.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>t_(t,n,o,r),t.in=e.in,t.out=e.out});function Fc(t,e){return new Xp({type:"pipe",in:t,out:e})}a(Fc,"pipe");var Yp=w("ZodCodec",(t,e)=>{Xp.init(t,e),Ji.init(t,e)});function kA(t,e,n){return new Yp({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}a(kA,"codec");var fv=w("ZodReadonly",(t,e)=>{Id.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>r_(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function mv(t){return new fv({type:"readonly",innerType:t})}a(mv,"readonly");var hv=w("ZodTemplateLiteral",(t,e)=>{Rd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Uy(t,n,o,r)});function NA(t,e){return new hv({type:"template_literal",parts:t,...ne.normalizeParams(e)})}a(NA,"templateLiteral");var gv=w("ZodLazy",(t,e)=>{$d.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>o_(t,n,o,r),t.unwrap=()=>t._zod.def.getter()});function yv(t){return new gv({type:"lazy",getter:t})}a(yv,"lazy");var _v=w("ZodPromise",(t,e)=>{Cd.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>n_(t,n,o,r),t.unwrap=()=>t._zod.def.innerType});function zA(t){return new _v({type:"promise",innerType:t})}a(zA,"promise");var vv=w("ZodFunction",(t,e)=>{Od.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Fy(t,n,o,r)});function DA(t){return new vv({type:"function",input:Array.isArray(t?.input)?W_(t?.input):t?.input??Vc(ti()),output:t?.output??ti()})}a(DA,"_function");var Wc=w("ZodCustom",(t,e)=>{ks.init(t,e),Ne.init(t,e),t._zod.processJSONSchema=(n,o,r)=>Ly(t,n,o,r)});function UA(t){let e=new Ye({check:"custom"});return e._zod.check=t,e}a(UA,"check");function MA(t,e){return Ec(Wc,t??(()=>!0),e)}a(MA,"custom");function bv(t,e={}){return rp(Wc,t,e)}a(bv,"refine");function Sv(t){return np(t)}a(Sv,"superRefine");var jA=op,LA=ip;function FA(t,e={}){let n=new Wc({type:"custom",check:"custom",fn:a(o=>o instanceof t,"fn"),abort:!0,...ne.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=o=>{o.value instanceof t||o.issues.push({code:"invalid_type",expected:t.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}a(FA,"_instanceof");var BA=a((...t)=>ap({Codec:Yp,Boolean:la,String:sa},...t),"stringbool");function qA(t){let e=yv(()=>Hp([Tp(t),$_(),k_(),U_(),Vc(e),J_(Tp(),e)]));return e}a(qA,"json");function VA(t,e){return Fc(Wp(t),e)}a(VA,"preprocess");var S1={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 E1(t){ct({customError:t})}a(E1,"setErrorMap");function P1(){return ct().customError}a(P1,"getErrorMap");var Ev;Ev||(Ev={});var ce={...Uc,...bp,iso:ia},x1=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 T1(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}a(T1,"detectVersion");function A1(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let o=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!e.defs[r])throw new Error(`Reference not found: ${t}`);return e.defs[r]}throw new Error(`Reference not found: ${t}`)}a(A1,"resolveRef");function ZA(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return ce.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let r=t.$ref;if(e.refs.has(r))return e.refs.get(r);if(e.processing.has(r))return ce.lazy(()=>{if(!e.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return e.refs.get(r)});e.processing.add(r);let i=A1(r,e),s=Ut(i,e);return e.refs.set(r,s),e.processing.delete(r),s}if(t.enum!==void 0){let r=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&r.length===1&&r[0]===null)return ce.null();if(r.length===0)return ce.never();if(r.length===1)return ce.literal(r[0]);if(r.every(s=>typeof s=="string"))return ce.enum(r);let i=r.map(s=>ce.literal(s));return i.length<2?i[0]:ce.union([i[0],i[1],...i.slice(2)])}if(t.const!==void 0)return ce.literal(t.const);let n=t.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...t,type:i};return ZA(s,e)});return r.length===0?ce.never():r.length===1?r[0]:ce.union(r)}if(!n)return ce.any();let o;switch(n){case"string":{let r=ce.string();if(t.format){let i=t.format;i==="email"?r=r.check(ce.email()):i==="uri"||i==="uri-reference"?r=r.check(ce.url()):i==="uuid"||i==="guid"?r=r.check(ce.uuid()):i==="date-time"?r=r.check(ce.iso.datetime()):i==="date"?r=r.check(ce.iso.date()):i==="time"?r=r.check(ce.iso.time()):i==="duration"?r=r.check(ce.iso.duration()):i==="ipv4"?r=r.check(ce.ipv4()):i==="ipv6"?r=r.check(ce.ipv6()):i==="mac"?r=r.check(ce.mac()):i==="cidr"?r=r.check(ce.cidrv4()):i==="cidr-v6"?r=r.check(ce.cidrv6()):i==="base64"?r=r.check(ce.base64()):i==="base64url"?r=r.check(ce.base64url()):i==="e164"?r=r.check(ce.e164()):i==="jwt"?r=r.check(ce.jwt()):i==="emoji"?r=r.check(ce.emoji()):i==="nanoid"?r=r.check(ce.nanoid()):i==="cuid"?r=r.check(ce.cuid()):i==="cuid2"?r=r.check(ce.cuid2()):i==="ulid"?r=r.check(ce.ulid()):i==="xid"?r=r.check(ce.xid()):i==="ksuid"&&(r=r.check(ce.ksuid()))}typeof t.minLength=="number"&&(r=r.min(t.minLength)),typeof t.maxLength=="number"&&(r=r.max(t.maxLength)),t.pattern&&(r=r.regex(new RegExp(t.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?ce.number().int():ce.number();typeof t.minimum=="number"&&(r=r.min(t.minimum)),typeof t.maximum=="number"&&(r=r.max(t.maximum)),typeof t.exclusiveMinimum=="number"?r=r.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(r=r.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?r=r.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(r=r.lt(t.maximum)),typeof t.multipleOf=="number"&&(r=r.multipleOf(t.multipleOf)),o=r;break}case"boolean":{o=ce.boolean();break}case"null":{o=ce.null();break}case"object":{let r={},i=t.properties||{},s=new Set(t.required||[]);for(let[l,p]of Object.entries(i)){let f=Ut(p,e);r[l]=s.has(l)?f:f.optional()}if(t.propertyNames){let l=Ut(t.propertyNames,e),p=t.additionalProperties&&typeof t.additionalProperties=="object"?Ut(t.additionalProperties,e):ce.any();if(Object.keys(r).length===0){o=ce.record(l,p);break}let f=ce.object(r).passthrough(),y=ce.looseRecord(l,p);o=ce.intersection(f,y);break}if(t.patternProperties){let l=t.patternProperties,p=Object.keys(l),f=[];for(let m of p){let h=Ut(l[m],e),_=ce.string().regex(new RegExp(m));f.push(ce.looseRecord(_,h))}let y=[];if(Object.keys(r).length>0&&y.push(ce.object(r).passthrough()),y.push(...f),y.length===0)o=ce.object({}).passthrough();else if(y.length===1)o=y[0];else{let m=ce.intersection(y[0],y[1]);for(let h=2;h<y.length;h++)m=ce.intersection(m,y[h]);o=m}break}let u=ce.object(r);t.additionalProperties===!1?o=u.strict():typeof t.additionalProperties=="object"?o=u.catchall(Ut(t.additionalProperties,e)):o=u.passthrough();break}case"array":{let r=t.prefixItems,i=t.items;if(r&&Array.isArray(r)){let s=r.map(l=>Ut(l,e)),u=i&&typeof i=="object"&&!Array.isArray(i)?Ut(i,e):void 0;u?o=ce.tuple(s).rest(u):o=ce.tuple(s),typeof t.minItems=="number"&&(o=o.check(ce.minLength(t.minItems))),typeof t.maxItems=="number"&&(o=o.check(ce.maxLength(t.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>Ut(l,e)),u=t.additionalItems&&typeof t.additionalItems=="object"?Ut(t.additionalItems,e):void 0;u?o=ce.tuple(s).rest(u):o=ce.tuple(s),typeof t.minItems=="number"&&(o=o.check(ce.minLength(t.minItems))),typeof t.maxItems=="number"&&(o=o.check(ce.maxLength(t.maxItems)))}else if(i!==void 0){let s=Ut(i,e),u=ce.array(s);typeof t.minItems=="number"&&(u=u.min(t.minItems)),typeof t.maxItems=="number"&&(u=u.max(t.maxItems)),o=u}else o=ce.array(ce.any());break}default:throw new Error(`Unsupported type: ${n}`)}return t.description&&(o=o.describe(t.description)),t.default!==void 0&&(o=o.default(t.default)),o}a(ZA,"convertBaseSchema");function Ut(t,e){if(typeof t=="boolean")return t?ce.any():ce.never();let n=ZA(t,e),o=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let u=t.anyOf.map(p=>Ut(p,e)),l=ce.union(u);n=o?ce.intersection(n,l):l}if(t.oneOf&&Array.isArray(t.oneOf)){let u=t.oneOf.map(p=>Ut(p,e)),l=ce.xor(u);n=o?ce.intersection(n,l):l}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=o?n:ce.any();else{let u=o?n:Ut(t.allOf[0],e),l=o?0:1;for(let p=l;p<t.allOf.length;p++)u=ce.intersection(u,Ut(t.allOf[p],e));n=u}t.nullable===!0&&e.version==="openapi-3.0"&&(n=ce.nullable(n)),t.readOnly===!0&&(n=ce.readonly(n));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in t&&(r[u]=t[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in t&&(r[u]=t[u]);for(let u of Object.keys(t))x1.has(u)||(r[u]=t[u]);return Object.keys(r).length>0&&e.registry.add(n,r),n}a(Ut,"convertSchema");function HA(t,e){if(typeof t=="boolean")return t?ce.any():ce.never();let n=T1(t,e?.defaultTarget),o=t.$defs||t.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??wt};return Ut(t,r)}a(HA,"fromJSONSchema");var Pv={};nr(Pv,{bigint:()=>O1,boolean:()=>R1,date:()=>C1,number:()=>I1,string:()=>w1});function w1(t){return Ls(sa,t)}a(w1,"string");function I1(t){return cc(ua,t)}a(I1,"number");function R1(t){return dc(la,t)}a(R1,"boolean");function O1(t){return pc(da,t)}a(O1,"bigint");function C1(t){return gc(qc,t)}a(C1,"date");ct(Ns());var D5=Qp.enum(["active","out_of_credits","rejected","unreachable"]);var GA=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(GA||{}),xv=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(xv||{}),Tv=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(Tv||{});var Av=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(Av||{});var wv=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(wv||{});var $1=C({mode:_e(GA),value:Te()}),k1=C({auth:q(v()),fields:Ae(v(),$1)}),N1=C({pieceName:v(),pieceVersion:v(),actionName:v(),predefinedInput:q(k1)}),z1=C({type:ge("PIECE"),toolName:v().check(mt(1)),pieceMetadata:N1}),D1=C({type:ge("none")}),U1=C({type:ge("access_token"),accessToken:v()}),M1=C({type:ge("api_key"),apiKey:v(),apiKeyHeader:v()}),j1=C({type:ge("headers"),headers:Ae(v(),v())}),L1=so("type",[D1,U1,M1,j1]),WA=C({type:ge("FLOW"),toolName:v().check(mt(1)),externalFlowId:v(),flowDisplayName:q(v())}),JA=C({type:ge("MCP"),toolName:v().check(mt(1)),serverUrl:dT(),protocol:_e(Tv),auth:L1}),KA=C({type:ge("KNOWLEDGE_BASE"),toolName:v().check(mt(1)),sourceType:_e(xv),sourceId:v(),sourceName:v()}),F1=so("type",[z1,WA,JA,KA]),B1=C({displayName:v(),description:q(v()),type:_e(Av)}),XA=C({type:ge("MARKDOWN"),markdown:v()}),pa={type:ge("TOOL_CALL"),input:ut(Ae(v(),Te())),output:q(Te()),toolName:v(),status:_e(wv),toolCallId:v(),startTime:v(),endTime:q(v())},l9=C(pa),YA=so("toolCallType",[C({...pa,toolCallType:ge("PIECE"),pieceName:v(),pieceVersion:v(),actionName:v()}),C({...pa,toolCallType:ge("FLOW"),displayName:v(),externalFlowId:v()}),C({...pa,toolCallType:ge("MCP"),displayName:v(),serverUrl:v()}),C({...pa,toolCallType:ge("KNOWLEDGE_BASE"),displayName:v(),sourceType:v()}),C({...pa,toolCallType:ge("UNKNOWN"),displayName:v()})]),q1=ke([XA,YA]);var V1=10800*1e3,Z1=900*1e3;var Rv=(n=>(n.IMAGE="image",n.TEXT="text",n))(Rv||{}),$n=C({apiKey:v()}),G1=$n,W1=C({apiKey:v(),apiKeyHash:v()}),J1=$n,K1=$n,X1=$n,Y1=$n,Q1=$n,ej=$n,tj=$n,rw=C({serviceAccountJson:v().check(mt(1))}),nw=C({accessKeyId:v().check(mt(1)),secretAccessKey:v().check(mt(1))}),rj=C({}),nj=C({}),oj=C({}),ij=C({}),aj=C({}),sj=C({}),Ov=C({modelId:v(),modelName:v(),modelType:_e(Rv)}),ow=C({apiKeyHeader:v(),baseUrl:v(),models:be(Ov),defaultHeaders:q(Ae(v(),v())),apiStyle:q(_e(["chat","responses"]))}),iw=C({accountId:v(),gatewayId:v(),models:be(Ov),vertexProject:q(v()),vertexRegion:q(v())}),aw=C({resourceName:v(),apiVersion:uo(co(t=>typeof t=="string"&&t.trim().length===0?void 0:t),q(v()))}),sw=C({region:v().check(mt(1))}),cw=C({project:v().check(kt(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:v().check(kt(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:be(Ov)}),uw=C({}),cj=ke([G1,X1,Y1,Q1,ej,K1,J1,W1,nw,rw,tj]),lw=ke([ow,iw,aw,cw,sw,rj,oj,ij,aj,nj,sj,uw]),uj=C({id:v(),name:v(),type:_e(Rv)}),lj=C({id:v(),name:v(),provider:_e(oa),config:lw,enabledForChat:Be()}),dj=C({provider:_e(oa),name:v(),enabledForChat:Be(),keys:be(C({id:v(),name:v()}))}),pj=C({provider:_e(oa),configId:v(),config:lw,auth:cj,platformId:v()});var m9={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},QA=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],fj=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],dw=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],Iv=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],mj=["grok-4.20"],h9=dw.map(t=>`anthropic/${t}`),hj={openai:QA,anthropic:fj,google:Iv,vertex:Iv,activepieces:[...dw.map(t=>`anthropic/${t}`),...QA.map(t=>`openai/${t}`),...Iv.map(t=>`google/${t}`),...mj.map(t=>`x-ai/${t}`)]};var ew=128e3,gj={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function yj({provider:t}){return t?gj[t]??ew:ew}a(yj,"getMaxContextTokens");var tw={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"},_j={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},vj=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),bj={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 Nt(t){return{chatModels:hj[t],maxContextTokens:yj({provider:t}),defaultEmbeddingModel:tw[t],supportsEmbedding:tw[t]!==void 0,supportsImageGeneration:!vj.has(t),webSearch:_j[t]}}a(Nt,"buildProviderCapabilities");var Sj={openai:Nt("openai"),anthropic:Nt("anthropic"),openrouter:Nt("openrouter"),azure:Nt("azure"),google:Nt("google"),"cloudflare-gateway":Nt("cloudflare-gateway"),custom:Nt("custom"),bedrock:Nt("bedrock"),vertex:Nt("vertex"),mistral:Nt("mistral"),activepieces:Nt("activepieces"),xai:Nt("xai"),deepseek:Nt("deepseek"),zai:Nt("zai"),qwen:Nt("qwen"),minimax:Nt("minimax"),moonshot:Nt("moonshot")};var Ej=C({base64Url:v(),fileName:v(),extension:q(v())}),Pj=C({mimeType:v(),url:v(),fileName:q(v())}),Cv=ke([Ej,Pj]);var xj=ke([C({type:ge("file"),value:Cv}),C({type:ge("markdown"),value:v(),files:q(be(Cv))})]),Tj=C({sessionId:v(),message:v(),files:q(be(v()))});var fw=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(fw||{}),mw=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(mw||{}),$v=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))($v||{});var Aj=ke([C({...xr,name:v(),externalId:v(),type:ge("STATIC_DROPDOWN"),tableId:v(),projectId:v(),data:C({options:be(C({value:v()}))})}),C({...xr,name:v(),externalId:v(),type:ke([ge("TEXT"),ge("NUMBER"),ge("DATE"),ge("DATETIME")]),tableId:v(),projectId:v()})]),wj=C({...xr,name:v(),folderId:ut(v()),projectId:v(),externalId:v(),status:m_(mw),trigger:m_(fw)}),Ij=C({...xr,tableId:v(),projectId:v(),cells:Ae(v(),C({updated:v(),created:v(),value:Te(),fieldName:v()}))}),Rj=C({events:be(_e($v)),webhookUrl:v(),flowId:v()}),Oj=C({fields:be(C({id:v(),name:v()})),rows:be(Ae(v(),v())),name:v()}),Cj=C({projectId:v(),limit:q(Ac.number()),cursor:q(v()),name:q(v()),externalIds:_p(v()),folderId:q(v()),folderIds:_p(v())}),$j=C({records:be(be(C({fieldId:v(),value:gw()}))),tableId:v()}),kj=C({cells:q(be(C({fieldId:v(),value:gw()}))),tableId:v(),agentUpdate:q(Be())}),hw=so("operator",[ni("eq"),ni("neq"),ni("gt"),ni("gte"),ni("lt"),ni("lte"),ni("co"),pw("exists"),pw("not_exists")]),Nj=C({tableId:v(),limit:q(Ac.number()),cursor:q(v()),filters:_p(hw)});function gw(){return uo(co(t=>t==null?t:String(t)),Tc(v()))}a(gw,"coerceToString");function ni(t){return C({fieldId:v(),operator:ge(t),value:v()})}a(ni,"valueFilter");function pw(t){return C({fieldId:v(),operator:ge(t)})}a(pw,"existenceFilter");var zj=C({status:q(It()),body:q(Te()),headers:q(Ae(v(),v()))}),Dj=C({...xr,deleted:ut(mo),ownerId:v(),displayName:v(),platformId:v(),externalId:ut(v())});var yw=C({name:v(),description:q(v()),type:v(),required:Be()}),Uj=C({pieceName:v(),triggerName:v(),input:C({toolName:v(),toolDescription:v(),inputSchema:be(yw),returnsResponse:Be()})});var _w="^[0-9]+\\.[0-9]+\\.[0-9]+$",N9=new RegExp(_w),jj="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",z9=v().check(kt(new RegExp(_w))),D9=v().check(kt(new RegExp(jj))),Lj=C({packageType:ge("ARCHIVE"),pieceType:_e(ta),pieceName:v(),pieceVersion:v(),archiveId:v(),platformId:v()}),vw=C({packageType:ge("REGISTRY"),pieceType:ge("OFFICIAL"),pieceName:v(),pieceVersion:v()}),bw=C({packageType:ge("REGISTRY"),pieceType:ge("CUSTOM"),pieceName:v(),pieceVersion:v(),platformId:v()}),U9=ke([vw,bw]),M9=ke([Lj,vw,bw]);var Fj=so("type",[C({type:ge("CRON_EXPRESSION"),cronExpression:v(),timezone:v()}),C({type:ge("INTERVAL"),intervalMs:pT().check(Et(6e4))})]),j9=C({...xr,type:_e(po),projectId:v(),flowId:v(),triggerName:v(),schedule:ut(Fj),flowVersionId:v(),pieceName:v(),pieceVersion:v(),deleted:ut(v()),simulate:Be()}),Sw=(x=>(x.UNKNOWN="UNKNOWN",x.FLOW_RUN_LOG="FLOW_RUN_LOG",x.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",x.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",x.FLOW_STEP_FILE="FLOW_STEP_FILE",x.SAMPLE_DATA="SAMPLE_DATA",x.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",x.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",x.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",x.PROJECT_RELEASE="PROJECT_RELEASE",x.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",x.PLATFORM_ASSET="PLATFORM_ASSET",x.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",x.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",x.KNOWLEDGE_BASE="KNOWLEDGE_BASE",x.FLOW_BUNDLE="FLOW_BUNDLE",x.PREWARM_SCOPE="PREWARM_SCOPE",x))(Sw||{}),Ew=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(Ew||{}),Pw=(n=>(n.S3="S3",n.DB="DB",n))(Pw||{}),L9=C({...xr,projectId:ut(v()),platformId:ut(v()),type:_e(Sw),compression:_e(Ew),data:q(Te()),location:_e(Pw),size:ut(It()),fileName:ut(v()),s3Key:ut(v()),metadata:ut(Ae(v(),v()))}),xw=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(xw||{}),Tw=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(Tw||{}),F9=C({id:v(),email:v(),firstName:v(),status:_e(Tw),externalId:ut(v()),platformId:ut(v()),platformRole:_e(xw),lastName:v(),created:mo,updated:mo,lastActiveDate:ut(mo),imageUrl:ut(v())});var kv=C({...Le.shape,...we(Ae(v(),Te()),"OBJECT").shape});var Nv=C({...Le.shape,formatProperty:q(v()),...we(v(),"RICH_TEXT").shape});var Rw=C({...Le.shape,...we(v(),"COLOR").shape});var zv=ke([ar,In,Nv,hp,On,sr,Rn,c_,wc,l_,Cn,Oc,kv,Cc,Rc,u_,Ic,Rw]),Re={ShortText(t){return{...t,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(t){return{...t,valueSchema:void 0,type:"CHECKBOX"}},LongText(t){return{...t,valueSchema:void 0,type:"LONG_TEXT"}},RichText(t){return{...t,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(t){return{displayName:"Markdown",required:!1,description:t.value,type:"MARKDOWN",valueSchema:void 0,variant:t.variant??"INFO"}},Number(t){return{...t,valueSchema:void 0,type:"NUMBER"}},Json(t){return{...t,valueSchema:void 0,type:"JSON"}},Array(t){return{...t,valueSchema:void 0,type:"ARRAY"}},Object(t){return{...t,valueSchema:void 0,type:"OBJECT"}},Dropdown(t){return{...t,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(t){return{...t,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(t){return{...t,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(t){return{...t,valueSchema:void 0,type:"DATE_TIME"}},DateRange(t){return{...t,valueSchema:void 0,type:"DATE_RANGE"}},File(t){return{...t,valueSchema:void 0,type:"FILE"}},Custom(t){let e=t.code.toString();return{...t,code:e,valueSchema:void 0,type:"CUSTOM"}},Color(t){return{...t,valueSchema:void 0,type:"COLOR"}}};var en=C({displayName:v(),description:q(v()),hasConnectionIdentifier:q(Be())});var Ow=C({username:v(),password:v()}),Dv=C({...en.shape,username:C({displayName:v(),description:q(v())}),password:C({displayName:v(),description:q(v())}),...we(Ow,"BASIC_AUTH").shape});var Zj=Ae(v(),ke([ar,In,Cn,On,sr])),Uv=C({...en.shape,props:Zj,...we(Te(),"CUSTOM_AUTH").shape});var oi=C({...en.shape,...we(C({auth:v()}),"SECRET_TEXT").shape});var Hj=Ae(v(),ke([ar,In,oi,Cn,On,sr,Rn,hp])),Cw=C({...en.shape,props:Hj,...we(Te(),"OIDC").shape});var Mv=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(Mv||{}),$w=ke([ar,oi,sr]),kw=Ae(v(),$w),Gj=C({props:q(Ae(v(),$w)),authUrl:v(),tokenUrl:v(),scope:be(v()),prompt:q(ke([ge("none"),ge("consent"),ge("login"),ge("omit")])),pkce:q(Be()),pkceMethod:q(ke([ge("plain"),ge("S256")])),authorizationMethod:q(_e(Mv)),grantType:q(ke([_e(kc),ge(d_)])),extra:q(Ae(v(),v()))}),Nw=C({access_token:v(),props:q(kw),data:Ae(v(),xc())}),jv=C({...en.shape,...Gj.shape,...we(Nw,"OAUTH2").shape});var fa=ke([Dv,Uv,Cw,jv,oi]),Jc="Connection",Lv={SecretText(t){return{...t,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(t){return{...t,valueSchema:void 0,type:"OAUTH2",displayName:t.displayName||Jc}},BasicAuth(t){return{...t,valueSchema:void 0,type:"BASIC_AUTH",displayName:t.displayName||Jc,required:!0}},CustomAuth(t){return{...t,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:t.displayName||Jc}},OIDC(t){return{...t,valueSchema:void 0,type:"OIDC",displayName:t.displayName||Jc}},None(){}};var xY={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 Wj=C({...Le.shape,...we(Te(),"CUSTOM").shape,code:v()});var Jj=ke([zv,fa]),Fv=Ae(v(),Jj),ZY=Ae(v(),zv);var zw=ke([C({strategy:ge("CRON"),cronExpression:v()}),C({strategy:ge("NONE")})]),ma=class{constructor(e,n,o,r,i,s,u,l,p,f,y,m,h,_,E,P,x,z,M,K,Z){this.name=e;this.displayName=n;this.description=o;this.requireAuth=r;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=l;this.renewConfiguration=p;this.onRenew=f;this.onEnable=y;this.onDisable=m;this.onStart=h;this.run=_;this.test=E;this.sampleData=P;this.testStrategy=x;this.outputSchema=z;this.aiMetadata=M;this.classification=K;this.propertyGroups=Z}static{a(this,"ITrigger")}},Dw=a(t=>{switch(t.type){case"WEBHOOK":return new ma(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,t.handshakeConfiguration??{strategy:"NONE"},t.onHandshake??(async()=>({status:200})),t.renewConfiguration??{strategy:"NONE"},t.onRenew??(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,t.test?"TEST_FUNCTION":"SIMULATION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"POLLING":return new ma(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"MANUAL":return new ma(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups);case"APP_WEBHOOK":return new ma(t.name,t.displayName,t.description,t.requireAuth??!0,t.props,t.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),t.onEnable,t.onDisable,t.onStart??(async()=>Promise.resolve()),t.run,t.test??(()=>Promise.resolve([t.sampleData])),t.sampleData,ht(t.sampleData)&&ht(t.test)?"SIMULATION":"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups)}},"createTrigger");var Uw="2",ef="0.82.0";var Bv=class{constructor(e,n,o,r,i,s,u,l,p=ef,f,y="",m){this.displayName=e;this.logoUrl=n;this.authors=o;this.events=r;this.categories=u;this.auth=l;this.minimumSupportedRelease=p;this.maximumSupportedRelease=f;this.description=y;this.deprecated=m;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:Uw}),"getContextInfo");(!Xj(p)||Yj(p,ef))&&(this.minimumSupportedRelease=ef),i.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:Kj(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(e){return this._actions[e]}getTrigger(e){return this._triggers[e]}actions(){return this._actions}triggers(){return this._triggers}},jw=a(t=>{if(t.auth&&Array.isArray(t.auth)&&!t.auth.every((n,o,r)=>o===r.findIndex(i=>i.type===n.type)))throw new Error("Auth properties must be unique by type");return new Bv(t.displayName,t.logoUrl,t.authors??[],t.events,t.actions,t.triggers,t.categories??[],t.auth,t.minimumSupportedRelease,t.maximumSupportedRelease,t.description,t.deprecated)},"createPiece");function Kj(t){if(t!==void 0)return Array.isArray(t)?t.map(Mw):Mw(t)}a(Kj,"withConnectionIdentifierFlag");function Mw(t){return{...t,hasConnectionIdentifier:t.getConnectionIdentifier!==void 0}}a(Mw,"flagConnectionIdentifier");function Xj(t){return/^\d+\.\d+\.\d+$/.test(t)}a(Xj,"isValidSimpleSemver");function Yj(t,e){let[n,o,r]=t.split(".").map(Number),[i,s,u]=e.split(".").map(Number);return n!==i?n<i:o!==s?o<s:r<u}a(Yj,"isSemverLessThan");var Qj=q(Ae(v(),Ae(v(),v()))),Lw=C({id:q(v()),name:v(),displayName:v(),logoUrl:v(),description:v(),authors:be(v()),platformId:q(v()),directoryPath:q(v()),auth:q(ke([fa,be(fa)])),version:v(),categories:q(be(_e(ra))),minimumSupportedRelease:q(v()),maximumSupportedRelease:q(v()),deprecated:q(Be()),i18n:Qj}),eL=_e(["human","ai","both"]),Fw=C({description:q(v()),idempotent:q(Be())}),Bw=_e(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var tL=_e(["tabs","section","summary","builder","footer"]),qw=C({key:v(),display:tL,label:q(v()),description:q(v()),icon:q(v()),props:be(v())}),Vw=C({name:v(),displayName:v(),description:v(),props:Fv,propertyGroups:q(be(qw)),requireAuth:Be(),errorHandlingOptions:q(s_),outputSchema:q(fp()),audience:q(eL),aiMetadata:q(Fw),classification:q(Bw)}),Zw=C({name:v(),displayName:v(),description:v(),props:Fv,propertyGroups:q(be(qw)),errorHandlingOptions:q(s_),type:_e(po),sampleData:Te(),handshakeConfiguration:q(fp()),renewConfiguration:q(zw),testStrategy:_e(zc),outputSchema:q(fp()),aiMetadata:q(Fw),classification:q(Bw)}),rL=C({...Lw.shape,actions:Ae(v(),Vw),triggers:Ae(v(),Zw)}),nL=C({...Lw.shape,actions:It(),triggers:It(),suggestedActions:q(be(Vw)),suggestedTriggers:q(be(Zw))}),Hw=C({projectUsage:It(),pieceType:_e(ta),packageType:_e($c),platformId:q(v()),archiveId:q(v())}),W7=C({...rL.shape,...Hw.shape}),J7=C({...nL.shape,...Hw.shape}),K7=C({name:v(),version:v()});var oL=St(require("path")),iL=St(require("fs/promises"));var ga=require("node:stream");var tf=class{constructor(e,n){this.baseUrl=e;this.authenticationConverter=n}static{a(this,"BaseHttpClient")}getUrl(e){let n=new URL(`${this.baseUrl}${e.url}`),o=`${n.origin}${n.pathname}`,r=new URLSearchParams;return n.searchParams.forEach((i,s)=>{r.append(s,i)}),{urlWithoutQueryParams:o,queryParams:r}}getHeaders(e){let n={Accept:"application/json"};return e.authentication&&this.populateAuthentication(e.authentication,n),e.body&&(e.headers?.["Content-Type"]==="text/csv"?n["Content-Type"]="text/csv":n["Content-Type"]="application/json"),e.headers&&(n={...n,...e.headers}),n}populateAuthentication(e,n){this.authenticationConverter.convert(e,n)}};var rf=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(e=new qv,n=new Vv){this.converters={BEARER_TOKEN:e,BASIC:n}}convert(e,n){return this.converters[e.type].convert(e,n)}},qv=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(e,n){return n.Authorization=`Bearer ${e.token}`,n}},Vv=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(e,n){let o=`${e.username}:${e.password}`,r=Buffer.from(o).toString("base64");return n.Authorization=`Basic ${r}`,n}};var Kc=class extends Error{constructor(n,o){let r=o.status||500,i=Buffer.isBuffer(o.responseBody)?o.responseBody.toString():o.responseBody;super(JSON.stringify({response:{status:r,body:i},request:{body:n}}));this.requestBody=n;this.status=r,this.responseBody=i}static{a(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Gw({error:t,requestBody:e}){return t instanceof Kc?t.errorMessage():{response:{status:0,body:t instanceof Error?t.message:String(t)},request:{body:e}}}a(Gw,"toFailsafeOutput");var ha=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(ha||{});var nf=class extends tf{static{a(this,"FetchHttpClient")}constructor(e="",n=new rf){super(e,n)}async sendRequest(e,n){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:o,queryParams:r}=this.getUrl(e),i=this.getHeaders(e),s=e.queryParams??{};for(let[M,K]of Object.entries(s))r.append(M,K);let u=r.toString(),l=u?`${o}?${u}`:o,p=e.responseType??"json",f=e.followRedirects??!0,y=e.retries??0,{body:m,extraHeaders:h,isStream:_}=of(e.method)?aL(e.body,i):{body:void 0,extraHeaders:{},isStream:!1},E=cL({...i,...h}),P=await sL(async()=>{let M=new AbortController,K=e.timeout&&e.timeout>0?setTimeout(()=>M.abort(),e.timeout):void 0;try{let Z={method:e.method.toString(),headers:E,body:m,redirect:f?"follow":"manual",signal:M.signal};return _&&(Z.duplex="half"),n?.dispatcher!==void 0&&(Z.dispatcher=n.dispatcher),await fetch(l,Z)}finally{K!==void 0&&clearTimeout(K)}},_?0:y),x=f?300:400;if(P.status<200||P.status>=x){let M=await Ww(P,p==="stream"?"text":p),K=new Kc(e.body,{status:P.status,responseBody:M});throw console.error("[HttpClient#(sanitized error message)] Request failed:",K),K}let z=await Ww(P,p);return{status:P.status,headers:uL(P.headers),body:z}}};function of(t){return t!=="GET"&&t!=="HEAD"}a(of,"acceptsRequestBody");function aL(t,e){if(Kw(t))return{body:void 0,extraHeaders:{},isStream:!1};if(dL(t)){let o=lL(t);if(o!==null)return{body:o,extraHeaders:t.getHeaders(),isStream:!1};let r=new ga.PassThrough;return t.on("error",i=>r.destroy(i)),t.pipe(r),{body:r,extraHeaders:t.getHeaders(),isStream:!0}}return t instanceof ga.Readable?{body:t,extraHeaders:{},isStream:!0}:typeof t=="string"||Buffer.isBuffer(t)||t instanceof URLSearchParams||t instanceof ArrayBuffer||typeof FormData<"u"&&t instanceof FormData||typeof Blob<"u"&&t instanceof Blob?{body:t,extraHeaders:{},isStream:!1}:(e["Content-Type"]??e["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(t).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(t),extraHeaders:{},isStream:!1}}a(aL,"serializeBody");async function Ww(t,e){switch(e){case"arraybuffer":return Buffer.from(await t.arrayBuffer());case"stream":return Kw(t.body)?ga.Readable.from([]):ga.Readable.fromWeb(t.body);case"blob":return await t.blob();case"text":return await t.text();default:{let n=await t.text();if(n.length===0)return;try{return JSON.parse(n)}catch{return n}}}}a(Ww,"parseResponseBody");async function sL(t,e){let n;for(let o=0;o<=e;o++)try{let r=await t();if(r.status>=500&&o<e){await Jw(o);continue}return r}catch(r){if(n=r,o<e){await Jw(o);continue}throw r}throw n}a(sL,"sendWithRetries");function Jw(t){let e=Math.min(1e3*2**t,3e4);return new Promise(n=>setTimeout(n,e))}a(Jw,"backoff");function cL(t){let e=new Map;for(let[n,o]of Object.entries(t))o!==void 0&&e.set(n.toLowerCase(),[n,Array.isArray(o)?o.join(", "):o]);return Object.fromEntries(e.values())}a(cL,"normalizeHeaders");function uL(t){let e={};return t.forEach((n,o)=>{e[o]=n}),e}a(uL,"toHttpHeaders");function lL(t){if(!t.hasKnownLength()||t.getLengthSync()>pL)return null;let{data:e}=p_(()=>t.getBuffer());return e}a(lL,"bufferFormDataIfSafe");function dL(t){return typeof t=="object"&&t!==null&&typeof t.getHeaders=="function"&&typeof t.pipe=="function"&&typeof t.on=="function"}a(dL,"isNodeFormData");function Kw(t){return t==null}a(Kw,"isNil");var pL=100*1024*1024;var ho=new nf;var QF=St(require("fs")),eO=St(QR());var eB={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function tB(t){let e=t.split(";")[0].trim().toLowerCase();return eB[e]??""}a(tB,"contentTypeToExtension");var rB=a(({baseUrl:t,relativePath:e})=>{let n=t.endsWith("/")?t:`${t}/`,o=e.startsWith("/")?e.slice(1):e;return`${n}${o}`},"joinBaseUrlWithRelativePath"),nB=a((t,e)=>{let n="https://api.example.com";try{let o=e?t(e):void 0;return(o?.endsWith("/")?o.slice(0,-1):o)??n}catch{return n}},"getBaseUrlForDescription");function tO({auth:t,baseUrl:e,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:l="headers",classification:p="WRITE"}){return lo({audience:"human",name:i||"custom_api_call",classification:p,displayName:r||"Custom API Call",description:o||"Make a custom API call to a specific endpoint",auth:t,requireAuth:!!t,props:{url:Re.DynamicProperties({auth:t,displayName:"",required:!0,refreshers:[],props:a(async({auth:f})=>({url:Re.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${nB(e,f)}`,required:!0,placeholder:"/resource",defaultValue:f?e(f):"",...s?.url??{}})}),"props")}),method:Re.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(ha).map(f=>({label:f,value:f}))},...s?.method??{}}),headers:Re.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:Re.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:Re.Dropdown({auth:t,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:f})=>of(f)?{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}:{disabled:!0,placeholder:"Not available for GET or HEAD requests",options:[]},"options")}),body:Re.DynamicProperties({auth:t,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:f,method:y})=>{if(!f||!of(y))return{};let m=f,h={};switch(m){case"none":break;case"json":h.data=Re.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":h.data=Re.LongText({displayName:"Raw Body",required:!0});break;case"form_data":h.data=Re.Array({displayName:"Form Data",required:!0,properties:{fieldName:Re.ShortText({displayName:"Field Name",required:!0}),fieldType:Re.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:Re.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:Re.File({displayName:"File Field Value",required:!1})}});break}return h},"props")}),response_is_binary:Re.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:Re.Checkbox({displayName:"Return Error as Output",description:"On a failed request, output the error instead of failing the step.",required:!1,advanced:!0,...s?.failsafe??{}}),timeout:Re.Number({displayName:"Timeout",description:"Seconds to wait for a response. Empty: up to the flow limit (10 min).",required:!1,advanced:!0,...s?.timeout??{}}),followRedirects:Re.Checkbox({displayName:"Follow redirects",description:"Follow 3xx redirects instead of returning them as the response.",required:!1,defaultValue:!1,advanced:!0,...s?.followRedirects??{}}),...u},run:a(async f=>{let{method:y,url:m,headers:h,queryParams:_,body:E,body_type:P,failsafe:x,timeout:z,response_is_binary:M,followRedirects:K}=f.propsValue;yp(y,"Method"),yp(m,"URL");let Z=ht(n)?{}:await n(f.auth,f.propsValue),J=m.url,ee=J.startsWith("http://")||J.startsWith("https://")?J:rB({baseUrl:e(f.auth),relativePath:J}),ae={method:y,url:ee,headers:{...h??{},...l==="headers"||!ht(l)?Z:{}},queryParams:{...l==="queryParams"?Z:{},..._??{}},timeout:z?z*1e3:0,followRedirects:K};if(M&&(ae.responseType="arraybuffer"),E)if(P&&P!=="none"){let Y=E.data;if(P==="form_data"){let ze=Y,se=new eO.default;for(let{fieldName:G,fieldType:H,textFieldValue:re,fileFieldValue:X}of ze)H==="text"&&!Dc(re)?se.append(G,re):H==="file"&&!Dc(X)&&se.append(G,X.data,{filename:X?.filename});ae.body=se,ae.headers={...ae.headers,...se.getHeaders()}}else ae.body=Y}else P||(ae.body=E);try{let Y=await ho.sendRequest(ae);return await oB(f.files,Y.body,Y.status,Y.headers,M)}catch(Y){if(x)return Gw({error:Y,requestBody:ae.body});throw Y}},"run")})}a(tO,"createCustomApiCallAction");var oB=a(async(t,e,n,o,r)=>{let i;if(r&&iB(e)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=tB(s??"")||"txt",l;e instanceof ArrayBuffer?l=Buffer.from(new Uint8Array(e)):Buffer.isBuffer(e)?l=e:l=Buffer.from(e),i=await t.write({fileName:`output.${u}`,data:l})}else i=e;return{status:n,headers:o,body:i}},"handleBinaryResponse"),iB=a(t=>t instanceof ArrayBuffer||Buffer.isBuffer(t),"isBinaryBody");var tu={async poll(t,{store:e,auth:n,propsValue:o,maxItemsToPoll:r,files:i,server:s}){switch(t.strategy){case 0:{let u=await e.get("lastPoll");if(ht(u))throw new Error("lastPoll doesn't exist in the store.");let l=await t.items({store:e,auth:n,propsValue:o,lastFetchEpochMS:u,server:s}),p=l.reduce((f,y)=>Math.max(f,y.epochMilliSeconds),u);return await e.put("lastPoll",p),l.filter(f=>f.epochMilliSeconds>u).map(f=>f.data)}case 1:{let u=await e.get("lastItem"),l=await t.items({store:e,auth:n,propsValue:o,lastItemId:u,files:i,server:s}),p=l.findIndex(m=>m.id===u),f=[];ht(u)||p==-1?f=l??[]:f=l?.slice(0,p)??[],ht(r)||(f=f.slice(-r));let y=f?.[0]?.id;return ht(y)||await e.put("lastItem",y),f.map(m=>m.data)}}},async onEnable(t,{store:e,auth:n,propsValue:o,server:r,isRepublish:i}){switch(t.strategy){case 0:{if(i&&!ht(await e.get("lastPoll")))break;await e.put("lastPoll",Date.now());break}case 1:{if(i&&!ht(await e.get("lastItem")))break;let u=(await t.items({store:e,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;ht(u)?await e.delete("lastItem"):await e.put("lastItem",u);break}}},async onDisable(t,e){switch(t.strategy){case 0:case 1:return}},async test(t,{auth:e,propsValue:n,store:o,files:r,server:i}){let s=[];switch(t.strategy){case 0:{s=await t.items({store:o,auth:e,propsValue:n,lastFetchEpochMS:0,server:i});break}case 1:{s=await t.items({store:o,auth:e,propsValue:n,lastItemId:null,files:r,server:i});break}}return aB(s.map(u=>u.data))}};function aB(t){return t.length<=5?t:t.slice(0,5)}a(aB,"getFirstFiveOrAll");var _o={baseUrl:"https://people.googleapis.com/v1/people"};var Br=Lv.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,scope:["https://www.googleapis.com/auth/contacts","email"]});var sB=[{key:"displayName",label:"Display Name"},{key:"givenName",label:"First Name"},{key:"middleName",label:"Middle Name"},{key:"familyName",label:"Last Name"},{key:"displayNameLastFirst",label:"Display Name (Last, First)"},{key:"unstructuredName",label:"Unstructured Name"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],cB=[{key:"value",label:"Email Address",format:"email"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],uB=[{key:"value",label:"Phone Number"},{key:"canonicalForm",label:"Canonical Form"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],lB=[{key:"name",label:"Company"},{key:"title",label:"Job Title"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],dB=[{key:"url",label:"Photo URL",format:"image"},{key:"default",label:"Is Placeholder",format:"boolean"},{key:"primary",label:"Primary",value:"metadata.primary",format:"boolean"}],pB=[{key:"contactGroupId",label:"Contact Group ID",value:"contactGroupMembership.contactGroupId"},{key:"contactGroupResourceName",label:"Contact Group Resource Name",value:"contactGroupMembership.contactGroupResourceName"}],fB=[{key:"objectType",label:"Object Type"},{key:"sources",label:"Sources",labelKey:"updateTime",listItems:[{key:"type",label:"Source Type"},{key:"id",label:"Source ID"},{key:"updateTime",label:"Last Updated",format:"datetime"}]}],mf=[{key:"resourceName",label:"Resource Name"},{key:"etag",label:"ETag"},{key:"names",label:"Names",labelKey:"displayName",listItems:sB},{key:"emailAddresses",label:"Email Addresses",labelKey:"value",listItems:cB},{key:"phoneNumbers",label:"Phone Numbers",labelKey:"value",listItems:uB},{key:"organizations",label:"Organizations",labelKey:"name",listItems:lB},{key:"photos",label:"Photos",labelKey:"url",listItems:dB},{key:"memberships",label:"Group Memberships",labelKey:"contactGroupMembership.contactGroupId",listItems:pB},{key:"metadata",label:"Metadata",children:fB}],rO={fields:mf},nO={fields:mf},oO={fields:[{key:"results",label:"Matching Contacts",listItems:[{key:"person",label:"Contact",children:mf}]}]},iO={fields:mf};var sO=lo({auth:Br,name:"add_contact",classification:"WRITE",description:"Add a contact to a Google Contacts account",audience:"both",aiMetadata:{description:"Creates a new person in the authenticated Google Contacts account from name, email, phone, company, and job title fields. Use when an agent needs to add someone to address book contacts; first and last name are required. Not idempotent \u2014 each call creates a separate contact even with identical input, so guard against duplicates.",idempotent:!1},displayName:"Add Contact",outputSchema:rO,props:{firstName:Re.ShortText({displayName:"First Name",description:"The first name of the contact",required:!0}),middleName:Re.ShortText({displayName:"Middle Name",description:"The middle name of the contact",required:!1}),lastName:Re.ShortText({displayName:"Last Name",description:"The last name of the contact",required:!0}),jobTitle:Re.ShortText({displayName:"Job Title",description:"The job title of the contact",required:!1}),company:Re.ShortText({displayName:"Company",description:"The company of the contact",required:!1}),email:Re.ShortText({displayName:"Email",description:"The email address of the contact",required:!1}),phoneNumber:Re.ShortText({displayName:"Phone Number",description:"The phone number of the contact",required:!1})},async run(t){let e={names:[{givenName:t.propsValue.firstName,middleName:t.propsValue.middleName,familyName:t.propsValue.lastName}]},n={};t.propsValue.email&&(n.emailAddresses=[{value:t.propsValue.email}]),t.propsValue.phoneNumber&&(n.phoneNumbers=[{value:t.propsValue.phoneNumber}]),(t.propsValue.company||t.propsValue.jobTitle)&&(n.organizations=[{name:t.propsValue.company||void 0,title:t.propsValue.jobTitle||void 0}]),e={...e,...n};let o={method:"POST",url:`${_o.baseUrl}:createContact`,body:e,authentication:{type:"BEARER_TOKEN",token:t.auth.access_token}};return(await ho.sendRequest(o)).body}});var cO=lo({auth:Br,name:"update_contact",classification:"WRITE",description:"Update a contact in Google Contacts account.",audience:"both",aiMetadata:{description:"Updates fields (name, email, phone, company, job title) on an existing Google Contacts person identified by its resourceName (people/{id}). Use when an agent needs to modify a known contact; requires both the resourceName and the current etag, and a field mask listing which fields to update \u2014 the call is rejected if the contact changed since the etag was fetched. Repeating the same update with the same etag/values is safe and yields the same result.",idempotent:!0},displayName:"Update Contact",outputSchema:nO,props:{resourceName:Re.ShortText({displayName:"Resource Name",description:"The resource name for the person, assigned by the server. An ASCII string in the form of people/{person_id}.",required:!0}),etag:Re.ShortText({displayName:"Etag",description:"The `etag` ensures contact updates only apply if the contact hasn't changed since last retrieved.",required:!0}),updatePersonFields:Re.StaticMultiSelectDropdown({displayName:"Update Field Mask",description:"A field mask to restrict which fields on the person are updated.",required:!0,options:{options:[{label:"Names",value:"names"},{label:"Email",value:"emailAddresses"},{label:"Phone Number",value:"phoneNumbers"},{label:"Job Title / Company",value:"organizations"}]},defaultValue:["names","emailAddresses"]}),firstName:Re.ShortText({displayName:"First Name",description:"The first name of the contact",required:!1}),middleName:Re.ShortText({displayName:"Middle Name",description:"The middle name of the contact",required:!1}),lastName:Re.ShortText({displayName:"Last Name",description:"The last name of the contact",required:!1}),jobTitle:Re.ShortText({displayName:"Job Title",description:"The job title of the contact",required:!1}),company:Re.ShortText({displayName:"Company",description:"The company of the contact",required:!1}),email:Re.ShortText({displayName:"Email",description:"The email address of the contact",required:!1}),phoneNumber:Re.ShortText({displayName:"Phone Number",description:"The phone number of the contact",required:!1})},async run(t){let e=t.propsValue.resourceName.substring(6),n={etag:t.propsValue.etag},o={updatePersonFields:t.propsValue.updatePersonFields.join(",")};(t.propsValue.firstName||t.propsValue.middleName||t.propsValue.lastName)&&(n.names=[{givenName:t.propsValue.firstName||void 0,middleName:t.propsValue.middleName||void 0,familyName:t.propsValue.lastName||void 0}]),t.propsValue.email&&(n.emailAddresses=[{value:t.propsValue.email}]),t.propsValue.phoneNumber&&(n.phoneNumbers=[{value:t.propsValue.phoneNumber}]),(t.propsValue.company||t.propsValue.jobTitle)&&(n.organizations=[{name:t.propsValue.company||void 0,title:t.propsValue.jobTitle||void 0}]);let r={method:"PATCH",url:`${_o.baseUrl}${e}:updateContact`,body:n,authentication:{type:"BEARER_TOKEN",token:t.auth.access_token},queryParams:o};return(await ho.sendRequest(r)).body}});var uO=lo({auth:Br,name:"search_contact",classification:"SEARCH",description:"Search contacts in Google Contacts account.",audience:"both",aiMetadata:{description:"Searches the authenticated Google Contacts account for people matching a plain-text query, which prefix-matches against contact fields. Use when an agent needs to find a contact or its resourceName before updating it; the query is required and a read mask selects which fields come back (max 30 results). Read-only and idempotent.",idempotent:!0},displayName:"Search Contacts",outputSchema:oO,props:{query:Re.ShortText({displayName:"Query",description:'The plain-text query for the request.The query is used to match prefix phrases of the fields on a person. For example, a person with name "foo name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "oo n".',required:!0}),readMask:Re.StaticMultiSelectDropdown({displayName:"Read Mask",description:"A field mask to restrict which fields on each person are returned.",required:!0,options:{options:[{label:"addresses",value:"addresses"},{label:"ageRanges",value:"ageRanges"},{label:"biographies",value:"biographies"},{label:"birthdays",value:"birthdays"},{label:"calendarUrls",value:"calendarUrls"},{label:"clientData",value:"clientData"},{label:"coverPhotos",value:"coverPhotos"},{label:"emailAddresses",value:"emailAddresses"},{label:"events",value:"events"},{label:"externalIds",value:"externalIds"},{label:"genders",value:"genders"},{label:"imClients",value:"imClients"},{label:"interests",value:"interests"},{label:"locales",value:"locales"},{label:"locations",value:"locations"},{label:"memberships",value:"memberships"},{label:"metadata",value:"metadata"},{label:"miscKeywords",value:"miscKeywords"},{label:"names",value:"names"},{label:"nicknames",value:"nicknames"},{label:"occupations",value:"occupations"},{label:"organizations",value:"organizations"},{label:"phoneNumbers",value:"phoneNumbers"},{label:"photos",value:"photos"},{label:"relations",value:"relations"},{label:"sipAddresses",value:"sipAddresses"},{label:"skills",value:"skills"},{label:"urls",value:"urls"},{label:"userDefined",value:"userDefined"}]},defaultValue:["names","emailAddresses"]}),pageSize:Re.Number({displayName:"Page Size",description:"The number of results to return. Maximum 30.",required:!1})},async run(t){let e={query:t.propsValue.query,readMask:t.propsValue.readMask.join(",")};t.propsValue.pageSize&&(e.pageSize=String(t.propsValue.pageSize));let n={method:"GET",url:`${_o.baseUrl}:searchContacts`,authentication:{type:"BEARER_TOKEN",token:t.auth.access_token},queryParams:e};return(await ho.sendRequest(n)).body}});var $N=St(ON()),kN=St(ku()),NN=St(CN());var Jm={strategy:0,items:a(async({store:t,auth:e})=>{let n=new kN.OAuth2Client;n.setCredentials(e);let o=(0,$N.people)({version:"v1",auth:n}),r,i=[];do{let s=await o.people.connections.list({resourceName:"people/me",pageToken:r,pageSize:100,sortOrder:"LAST_MODIFIED_DESCENDING",personFields:["addresses","ageRanges","biographies","birthdays","calendarUrls","clientData","coverPhotos","emailAddresses","events","externalIds","genders","imClients","interests","locales","locations","memberships","metadata","miscKeywords","names","nicknames","occupations","organizations","phoneNumbers","photos","relations","sipAddresses","skills","urls","userDefined"].join()});for(let u of s.data.connections||[])u.metadata?.deleted!==!0&&i.push({data:u,epochMilliSeconds:(0,NN.default)(u.metadata?.sources?.[0].updateTime).valueOf()});r=s.data.nextPageToken}while(r);return i},"items")},zN=Dw({auth:Br,name:"new_or_updated_contact",classification:"READ",displayName:"New Or Updated Contact",description:"Triggers when there is a new or updated contact",aiMetadata:{description:"Fires when a contact in the authenticated Google Contacts account is newly created or has been modified since the last poll. Each event represents one person record with its current fields; deleted contacts are excluded."},props:{},outputSchema:iO,sampleData:{resourceName:"people/c4278485694217203807",etag:"%EiMBAgMFBgcICQoLDA0ODxATFBUWGSEiIyQlJicuNDU3PT4/QBoEAQIFByIMZFVwNlJPNEVKUzg9",metadata:{sources:[{type:"CONTACT",id:"3b603c120c68305f",etag:"#dUp6RO4EJS8=",updateTime:"2023-01-30T14:35:18.142565Z"}],objectType:"PERSON"},names:[{metadata:{primary:!0,source:{type:"CONTACT",id:"3b603c120c68305f"}},displayName:"Shahed Mashni",familyName:"Mashni",givenName:"Shahed",displayNameLastFirst:"Mashni, Shahed",unstructuredName:"Shahed Mashni"}],photos:[{metadata:{primary:!0,source:{type:"CONTACT",id:"3b603c120c68305f"}},url:"https://lh3.googleusercontent.com/cm/AAkddurmZojs4vCcxrpkfSxH9tnqcH-hI82ESDnwv6eq86nZeLStcjYEIe_TCx8r8g5Y=s100",default:!0}],memberships:[{metadata:{source:{type:"CONTACT",id:"3b603c120c68305f"}},contactGroupMembership:{contactGroupId:"myContacts",contactGroupResourceName:"contactGroups/myContacts"}}]},type:"POLLING",async onEnable(t){return await tu.onEnable(Jm,{store:t.store,auth:t.auth,propsValue:{}})},async onDisable(t){return await tu.onEnable(Jm,{store:t.store,auth:t.auth,propsValue:{}})},async run(t){return await tu.poll(Jm,{store:t.store,auth:t.auth,propsValue:{},files:t.files})},test:a(async t=>await tu.test(Jm,{store:t.store,auth:t.auth,propsValue:{},files:t.files}),"test")});var nG=jw({minimumSupportedRelease:"0.30.0",logoUrl:"https://cdn.activepieces.com/pieces/google-contacts.png",categories:["SALES_AND_CRM"],actions:[sO,cO,uO,tO({baseUrl:a(()=>_o.baseUrl,"baseUrl"),auth:Br,authMapping:a(async t=>({Authorization:`Bearer ${t.access_token}`}),"authMapping")})],displayName:"Google Contacts",description:"Stay connected and organized",authors:["Abdallah-Alwarawreh","Salem-Alaa","kishanprmr","MoShizzle","khaledmashaly","abuaboud","ikus060"],triggers:[zN],auth:Br});0&&(module.exports={googleContacts});
70
108
  /*! Bundled license information:
71
109
 
72
110
  mime-types/index.js: