@activepieces/piece-google-calendar 0.10.3 → 0.11.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 +90 -52
package/src/index.js CHANGED
@@ -1,72 +1,110 @@
1
- "use strict";var JI=Object.create;var ji=Object.defineProperty;var YI=Object.getOwnPropertyDescriptor;var XI=Object.getOwnPropertyNames;var QI=Object.getPrototypeOf,eR=Object.prototype.hasOwnProperty;var o=(t,e)=>ji(t,"name",{value:e,configurable:!0});var wt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var D=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Rs=(t,e)=>{for(var r in e)ji(t,r,{get:e[r],enumerable:!0})},mg=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of XI(e))!eR.call(t,i)&&i!==r&&ji(t,i,{get:()=>e[i],enumerable:!(n=YI(e,i))||n.enumerable});return t};var Be=(t,e,r)=>(r=t!=null?JI(QI(t)):{},mg(e||!t||!t.__esModule?ji(r,"default",{value:t,enumerable:!0}):r,t)),tR=t=>mg(ji({},"__esModule",{value:!0}),t);var Ly=D((My,Js)=>{(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,}",u="(?:[0-9a-f]+::?)+",d={zoneIndex:new RegExp(s,"i"),native:new RegExp(`^(::)?(${u})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${e}\\.${e}\\.${e}\\.${e}(${s})?)$`,"i"),transitional:new RegExp(`^((?:${u})|(?:::)(?:${u})?)${e}\\.${e}\\.${e}\\.${e}(${s})?$`,"i")};function p(l,g){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let v=0,E=-1,b=(l.match(d.zoneIndex)||[])[0],C,U;for(b&&(b=b.substring(1),l=l.replace(/%.+$/,""));(E=l.indexOf(":",E+1))>=0;)v++;if(l.substr(0,2)==="::"&&v--,l.substr(-2,2)==="::"&&v--,v>g)return null;for(U=g-v,C=":";U--;)C+="0:";return l=l.replace("::",C),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),g=(function(){let Y=l.split(":"),Z=[];for(let G=0;G<Y.length;G++)Z.push(parseInt(Y[G],16));return Z})(),{parts:g,zoneId:b}}o(p,"expandIPv6");function h(l,g,v,E){if(l.length!==g.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,C;for(;E>0;){if(C=v-E,C<0&&(C=0),l[b]>>C!==g[b]>>C)return!1;E-=v,b+=1}return!0}o(h,"matchCIDR");function y(l){if(i.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}o(y,"parseIntAuto");function m(l,g){for(;l.length<g;)l=`0${l}`;return l}o(m,"padPart");let f={};f.IPv4=(function(){function l(g){if(g.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let v,E;for(v=0;v<g.length;v++)if(E=g[v],!(0<=E&&E<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=g}return o(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(g,v){let E;if(v===void 0&&(E=g,g=E[0],v=E[1]),g.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,g.octets,8,v)},l.prototype.prefixLengthFromSubnetMask=function(){let g=0,v=!1,E={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},b,C,U;for(b=3;b>=0;b-=1)if(C=this.octets[b],C in E){if(U=E[C],v&&U!==0)return null;U!==8&&(v=!0),g+=U}else return null;return 32-g},l.prototype.range=function(){return f.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return f.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l})(),f.IPv4.broadcastAddressFromCIDR=function(l){try{let g=this.parseCIDR(l),v=g[0].toByteArray(),E=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],C=0;for(;C<4;)b.push(parseInt(v[C],10)|parseInt(E[C],10)^255),C++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},f.IPv4.isIPv4=function(l){return this.parser(l)!==null},f.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},f.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},f.IPv4.isValidFourPartDecimal=function(l){return!!(f.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},f.IPv4.isValidCIDRFourPartDecimal=function(l){let g=l.match(/^(.+)\/(\d+)$/);return!f.IPv4.isValidCIDR(l)||!g?!1:f.IPv4.isValidFourPartDecimal(g[1])},f.IPv4.networkAddressFromCIDR=function(l){let g,v,E,b,C;try{for(g=this.parseCIDR(l),E=g[0].toByteArray(),C=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],v=0;v<4;)b.push(parseInt(E[v],10)&parseInt(C[v],10)),v++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},f.IPv4.parse=function(l){let g=this.parser(l);if(g===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(g)},f.IPv4.parseCIDR=function(l){let g;if(g=l.match(/^(.+)\/(\d+)$/)){let v=parseInt(g[2]);if(v>=0&&v<=32){let E=[this.parse(g[1]),v];return Object.defineProperty(E,"toString",{value:o(function(){return this.join("/")},"value")}),E}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},f.IPv4.parser=function(l){let g,v,E;if(g=l.match(r.fourOctet))return(function(){let b=g.slice(1,6),C=[];for(let U=0;U<b.length;U++)v=b[U],C.push(y(v));return C})();if(g=l.match(r.longValue)){if(E=y(g[1]),E>4294967295||E<0)throw new Error("ipaddr: address outside defined range");return(function(){let b=[],C;for(C=0;C<=24;C+=8)b.push(E>>C&255);return b})().reverse()}else return(g=l.match(r.twoOctet))?(function(){let b=g.slice(1,4),C=[];if(E=y(b[1]),E>16777215||E<0)throw new Error("ipaddr: address outside defined range");return C.push(y(b[0])),C.push(E>>16&255),C.push(E>>8&255),C.push(E&255),C})():(g=l.match(r.threeOctet))?(function(){let b=g.slice(1,5),C=[];if(E=y(b[2]),E>65535||E<0)throw new Error("ipaddr: address outside defined range");return C.push(y(b[0])),C.push(y(b[1])),C.push(E>>8&255),C.push(E&255),C})():null},f.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let g=[0,0,0,0],v=0,E=Math.floor(l/8);for(;v<E;)g[v]=255,v++;return E<4&&(g[E]=Math.pow(2,l%8)-1<<8-l%8),new this(g)},f.IPv6=(function(){function l(g,v){let E,b;if(g.length===16)for(this.parts=[],E=0;E<=14;E+=2)this.parts.push(g[E]<<8|g[E+1]);else if(g.length===8)this.parts=g;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(E=0;E<this.parts.length;E++)if(b=this.parts[E],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");v&&(this.zoneId=v)}return o(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(g,v){let E;if(v===void 0&&(E=g,g=E[0],v=E[1]),g.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,g.parts,16,v)},l.prototype.prefixLengthFromSubnetMask=function(){let g=0,v=!1,E={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},b,C;for(let U=7;U>=0;U-=1)if(b=this.parts[U],b in E){if(C=E[b],v&&C!==0)return null;C!==16&&(v=!0),g+=C}else return null;return 128-g},l.prototype.range=function(){return f.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let g,v=[],E=this.parts;for(let b=0;b<E.length;b++)g=E[b],v.push(g>>8),v.push(g&255);return v},l.prototype.toFixedLengthString=function(){let g=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(m(this.parts[b].toString(16),4));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),g+v},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let g=this.parts.slice(-2),v=g[0],E=g[1];return new f.IPv4([v>>8,v&255,E>>8,E&255])},l.prototype.toNormalizedString=function(){let g=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(this.parts[b].toString(16));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),g+v},l.prototype.toRFC5952String=function(){let g=/((^|:)(0(:|$)){2,})/g,v=this.toNormalizedString(),E=0,b=-1,C;for(;C=g.exec(v);)C[0].length>b&&(E=C.index,b=C[0].length);return b<0?v:`${v.substring(0,E)}::${v.substring(E+b)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),f.IPv6.broadcastAddressFromCIDR=function(l){try{let g=this.parseCIDR(l),v=g[0].toByteArray(),E=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],C=0;for(;C<16;)b.push(parseInt(v[C],10)|parseInt(E[C],10)^255),C++;return new this(b)}catch(g){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${g})`)}},f.IPv6.isIPv6=function(l){return this.parser(l)!==null},f.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let g=this.parser(l);return new this(g.parts,g.zoneId),!0}catch{return!1}},f.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},f.IPv6.networkAddressFromCIDR=function(l){let g,v,E,b,C;try{for(g=this.parseCIDR(l),E=g[0].toByteArray(),C=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],v=0;v<16;)b.push(parseInt(E[v],10)&parseInt(C[v],10)),v++;return new this(b)}catch(U){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${U})`)}},f.IPv6.parse=function(l){let g=this.parser(l);if(g.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(g.parts,g.zoneId)},f.IPv6.parseCIDR=function(l){let g,v,E;if((v=l.match(/^(.+)\/(\d+)$/))&&(g=parseInt(v[2]),g>=0&&g<=128))return E=[this.parse(v[1]),g],Object.defineProperty(E,"toString",{value:o(function(){return this.join("/")},"value")}),E;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},f.IPv6.parser=function(l){let g,v,E,b,C,U;if(E=l.match(d.deprecatedTransitional))return this.parser(`::ffff:${E[1]}`);if(d.native.test(l))return p(l,8);if((E=l.match(d.transitional))&&(U=E[6]||"",g=E[1],E[1].endsWith("::")||(g=g.slice(0,-1)),g=p(g+U,6),g.parts)){for(C=[parseInt(E[2]),parseInt(E[3]),parseInt(E[4]),parseInt(E[5])],v=0;v<C.length;v++)if(b=C[v],!(0<=b&&b<=255))return null;return g.parts.push(C[0]<<8|C[1]),g.parts.push(C[2]<<8|C[3]),{parts:g.parts,zoneId:g.zoneId}}return null},f.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=0,E=Math.floor(l/8);for(;v<E;)g[v]=255,v++;return E<16&&(g[E]=Math.pow(2,l%8)-1<<8-l%8),new this(g)},f.fromByteArray=function(l){let g=l.length;if(g===4)return new f.IPv4(l);if(g===16)return new f.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},f.isValid=function(l){return f.IPv6.isValid(l)||f.IPv4.isValid(l)},f.isValidCIDR=function(l){return f.IPv6.isValidCIDR(l)||f.IPv4.isValidCIDR(l)},f.parse=function(l){if(f.IPv6.isValid(l))return f.IPv6.parse(l);if(f.IPv4.isValid(l))return f.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},f.parseCIDR=function(l){try{return f.IPv6.parseCIDR(l)}catch{try{return f.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},f.process=function(l){let g=this.parse(l);return g.kind()==="ipv6"&&g.isIPv4MappedAddress()?g.toIPv4Address():g},f.subnetMatch=function(l,g,v){let E,b,C,U;v==null&&(v="unicast");for(b in g)if(Object.prototype.hasOwnProperty.call(g,b)){for(C=g[b],C[0]&&!(C[0]instanceof Array)&&(C=[C]),E=0;E<C.length;E++)if(U=C[E],l.kind()===U[0].kind()&&l.match.apply(l,U))return b}return v},typeof Js<"u"&&Js.exports?Js.exports=f:t.ipaddr=f})(My)});var qv=D((AJ,Fv)=>{var jv=require("stream").Stream,L0=require("util");Fv.exports=Ar;function Ar(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(Ar,"DelayedStream");L0.inherits(Ar,jv);Ar.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(Ar.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});Ar.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ar.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ar.prototype.pause=function(){this.source.pause()};Ar.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Ar.prototype.pipe=function(){var t=jv.prototype.pipe.apply(this,arguments);return this.resume(),t};Ar.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)};Ar.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 Hv=D((RJ,Gv)=>{var j0=require("util"),Vv=require("stream").Stream,Bv=qv();Gv.exports=ft;function ft(){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(ft,"CombinedStream");j0.inherits(ft,Vv);ft.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};ft.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ft.prototype.append=function(t){var e=ft.isStreamLike(t);if(e){if(!(t instanceof Bv)){var r=Bv.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};ft.prototype.pipe=function(t,e){return Vv.prototype.pipe.call(this,t,e),this.resume(),t};ft.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}};ft.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=ft.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ft.prototype._pipeNext=function(t){this._currentStream=t;var e=ft.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()};ft.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};ft.prototype.write=function(t){this.emit("data",t)};ft.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ft.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")};ft.prototype.end=function(){this._reset(),this.emit("end")};ft.prototype.destroy=function(){this._reset(),this.emit("close")};ft.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ft.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ft.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)};ft.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var Zv=D((OJ,Wv)=>{"use strict";Wv.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 Yv=D(Ft=>{"use strict";var rc=Zv(),F0=require("path").extname,Kv=/^\s*([^;\s]*)(?:;|\s|$)/,q0=/^text\//i;Ft.charset=Jv;Ft.charsets={lookup:Jv};Ft.contentType=B0;Ft.extension=V0;Ft.extensions=Object.create(null);Ft.lookup=G0;Ft.types=Object.create(null);H0(Ft.extensions,Ft.types);function Jv(t){if(!t||typeof t!="string")return!1;var e=Kv.exec(t),r=e&&rc[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&q0.test(e[1])?"UTF-8":!1}o(Jv,"charset");function B0(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Ft.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=Ft.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}o(B0,"contentType");function V0(t){if(!t||typeof t!="string")return!1;var e=Kv.exec(t),r=e&&Ft.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}o(V0,"extension");function G0(t){if(!t||typeof t!="string")return!1;var e=F0("x."+t).toLowerCase().substr(1);return e&&Ft.types[e]||!1}o(G0,"lookup");function H0(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(rc).forEach(o(function(i){var s=rc[i],u=s.extensions;if(!(!u||!u.length)){t[i]=u;for(var d=0;d<u.length;d++){var p=u[d];if(e[p]){var h=r.indexOf(rc[e[p]].source),y=r.indexOf(s.source);if(e[p]!=="application/octet-stream"&&(h>y||h===y&&e[p].substr(0,12)==="application/"))continue}e[p]=i}}},"forEachMimeType"))}o(H0,"populateMaps")});var Qv=D((DJ,Xv)=>{Xv.exports=W0;function W0(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}o(W0,"defer")});var yd=D((zJ,t_)=>{var e_=Qv();t_.exports=Z0;function Z0(t){var e=!1;return e_(function(){e=!0}),o(function(n,i){e?t(n,i):e_(o(function(){t(n,i)},"nextTick_callback"))},"async_callback")}o(Z0,"async")});var vd=D((MJ,r_)=>{r_.exports=K0;function K0(t){Object.keys(t.jobs).forEach(J0.bind(t)),t.jobs={}}o(K0,"abort");function J0(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}o(J0,"clean")});var _d=D((jJ,o_)=>{var n_=yd(),Y0=vd();o_.exports=X0;function X0(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=Q0(e,i,t[i],function(s,u){i in r.jobs&&(delete r.jobs[i],s?Y0(r):r.results[i]=u,n(s,r.results))})}o(X0,"iterate");function Q0(t,e,r,n){var i;return t.length==2?i=t(r,n_(n)):i=t(r,e,n_(n)),i}o(Q0,"runJob")});var bd=D((qJ,i_)=>{i_.exports=eO;function eO(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(eO,"state")});var Ed=D((VJ,a_)=>{var tO=vd(),rO=yd();a_.exports=nO;function nO(t){Object.keys(this.jobs).length&&(this.index=this.size,tO(this),rO(t)(null,this.results))}o(nO,"terminator")});var c_=D((HJ,s_)=>{var oO=_d(),iO=bd(),aO=Ed();s_.exports=sO;function sO(t,e,r){for(var n=iO(t);n.index<(n.keyedList||t).length;)oO(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 aO.bind(n,r)}o(sO,"parallel")});var Sd=D((ZJ,nc)=>{var u_=_d(),cO=bd(),uO=Ed();nc.exports=lO;nc.exports.ascending=l_;nc.exports.descending=dO;function lO(t,e,r,n){var i=cO(t,r);return u_(t,e,i,o(function s(u,d){if(u){n(u,d);return}if(i.index++,i.index<(i.keyedList||t).length){u_(t,e,i,s);return}n(null,i.results)},"iteratorHandler")),uO.bind(i,n)}o(lO,"serialOrdered");function l_(t,e){return t<e?-1:t>e?1:0}o(l_,"ascending");function dO(t,e){return-1*l_(t,e)}o(dO,"descending")});var p_=D((JJ,d_)=>{var pO=Sd();d_.exports=fO;function fO(t,e,r){return pO(t,e,null,r)}o(fO,"serial")});var m_=D((XJ,f_)=>{f_.exports={parallel:c_(),serial:p_(),serialOrdered:Sd()}});var Td=D((QJ,h_)=>{"use strict";h_.exports=Object});var y_=D((e5,g_)=>{"use strict";g_.exports=Error});var __=D((t5,v_)=>{"use strict";v_.exports=EvalError});var E_=D((r5,b_)=>{"use strict";b_.exports=RangeError});var T_=D((n5,S_)=>{"use strict";S_.exports=ReferenceError});var P_=D((o5,w_)=>{"use strict";w_.exports=SyntaxError});var Vn=D((i5,x_)=>{"use strict";x_.exports=TypeError});var I_=D((a5,A_)=>{"use strict";A_.exports=URIError});var C_=D((s5,R_)=>{"use strict";R_.exports=Math.abs});var k_=D((c5,O_)=>{"use strict";O_.exports=Math.floor});var D_=D((u5,$_)=>{"use strict";$_.exports=Math.max});var z_=D((l5,N_)=>{"use strict";N_.exports=Math.min});var M_=D((d5,U_)=>{"use strict";U_.exports=Math.pow});var j_=D((p5,L_)=>{"use strict";L_.exports=Math.round});var q_=D((f5,F_)=>{"use strict";F_.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var V_=D((h5,B_)=>{"use strict";var mO=q_();B_.exports=o(function(e){return mO(e)||e===0?e:e<0?-1:1},"sign")});var H_=D((y5,G_)=>{"use strict";G_.exports=Object.getOwnPropertyDescriptor});var wd=D((v5,W_)=>{"use strict";var oc=H_();if(oc)try{oc([],"length")}catch{oc=null}W_.exports=oc});var K_=D((_5,Z_)=>{"use strict";var ic=Object.defineProperty||!1;if(ic)try{ic({},"a",{value:1})}catch{ic=!1}Z_.exports=ic});var Pd=D((b5,J_)=>{"use strict";J_.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 u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[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 Q_=D((S5,X_)=>{"use strict";var Y_=typeof Symbol<"u"&&Symbol,hO=Pd();X_.exports=o(function(){return typeof Y_!="function"||typeof Symbol!="function"||typeof Y_("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hO()},"hasNativeSymbols")});var xd=D((w5,eb)=>{"use strict";eb.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Ad=D((P5,tb)=>{"use strict";var gO=Td();tb.exports=gO.getPrototypeOf||null});var ob=D((x5,nb)=>{"use strict";var yO="Function.prototype.bind called on incompatible ",vO=Object.prototype.toString,_O=Math.max,bO="[object Function]",rb=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"),EO=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"),SO=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");nb.exports=o(function(e){var r=this;if(typeof r!="function"||vO.apply(r)!==bO)throw new TypeError(yO+r);for(var n=EO(arguments,1),i,s=o(function(){if(this instanceof i){var y=r.apply(this,rb(n,arguments));return Object(y)===y?y:this}return r.apply(e,rb(n,arguments))},"binder"),u=_O(0,r.length-n.length),d=[],p=0;p<u;p++)d[p]="$"+p;if(i=Function("binder","return function ("+SO(d,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var h=o(function(){},"Empty");h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},"bind")});var Yo=D((I5,ib)=>{"use strict";var TO=ob();ib.exports=Function.prototype.bind||TO});var ac=D((R5,ab)=>{"use strict";ab.exports=Function.prototype.call});var Id=D((C5,sb)=>{"use strict";sb.exports=Function.prototype.apply});var ub=D((O5,cb)=>{"use strict";cb.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var db=D((k5,lb)=>{"use strict";var wO=Yo(),PO=Id(),xO=ac(),AO=ub();lb.exports=AO||wO.call(xO,PO)});var Rd=D(($5,pb)=>{"use strict";var IO=Yo(),RO=Vn(),CO=ac(),OO=db();pb.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new RO("a function is required");return OO(IO,CO,e)},"callBindBasic")});var vb=D((N5,yb)=>{"use strict";var kO=Rd(),fb=wd(),hb;try{hb=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Cd=!!hb&&fb&&fb(Object.prototype,"__proto__"),gb=Object,mb=gb.getPrototypeOf;yb.exports=Cd&&typeof Cd.get=="function"?kO([Cd.get]):typeof mb=="function"?o(function(e){return mb(e==null?e:gb(e))},"getDunder"):!1});var Tb=D((U5,Sb)=>{"use strict";var _b=xd(),bb=Ad(),Eb=vb();Sb.exports=_b?o(function(e){return _b(e)},"getProto"):bb?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return bb(e)},"getProto"):Eb?o(function(e){return Eb(e)},"getProto"):null});var Od=D((L5,wb)=>{"use strict";var $O=Function.prototype.call,DO=Object.prototype.hasOwnProperty,NO=Yo();wb.exports=NO.call($O,DO)});var da=D((j5,Cb)=>{"use strict";var Me,zO=Td(),UO=y_(),MO=__(),LO=E_(),jO=T_(),ti=P_(),ei=Vn(),FO=I_(),qO=C_(),BO=k_(),VO=D_(),GO=z_(),HO=M_(),WO=j_(),ZO=V_(),Ib=Function,kd=o(function(t){try{return Ib('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),ca=wd(),KO=K_(),$d=o(function(){throw new ei},"throwTypeError"),JO=ca?(function(){try{return arguments.callee,$d}catch{try{return ca(arguments,"callee").get}catch{return $d}}})():$d,Xo=Q_()(),xt=Tb(),YO=Ad(),XO=xd(),Rb=Id(),ua=ac(),Qo={},QO=typeof Uint8Array>"u"||!xt?Me:xt(Uint8Array),fo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Me:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Me:ArrayBuffer,"%ArrayIteratorPrototype%":Xo&&xt?xt([][Symbol.iterator]()):Me,"%AsyncFromSyncIteratorPrototype%":Me,"%AsyncFunction%":Qo,"%AsyncGenerator%":Qo,"%AsyncGeneratorFunction%":Qo,"%AsyncIteratorPrototype%":Qo,"%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%":UO,"%eval%":eval,"%EvalError%":MO,"%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%":Ib,"%GeneratorFunction%":Qo,"%Int8Array%":typeof Int8Array>"u"?Me:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Me:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Xo&&xt?xt(xt([][Symbol.iterator]())):Me,"%JSON%":typeof JSON=="object"?JSON:Me,"%Map%":typeof Map>"u"?Me:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Xo||!xt?Me:xt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":zO,"%Object.getOwnPropertyDescriptor%":ca,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Me:Promise,"%Proxy%":typeof Proxy>"u"?Me:Proxy,"%RangeError%":LO,"%ReferenceError%":jO,"%Reflect%":typeof Reflect>"u"?Me:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Me:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Xo||!xt?Me:xt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Xo&&xt?xt(""[Symbol.iterator]()):Me,"%Symbol%":Xo?Symbol:Me,"%SyntaxError%":ti,"%ThrowTypeError%":JO,"%TypedArray%":QO,"%TypeError%":ei,"%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%":FO,"%WeakMap%":typeof WeakMap>"u"?Me:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Me:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Me:WeakSet,"%Function.prototype.call%":ua,"%Function.prototype.apply%":Rb,"%Object.defineProperty%":KO,"%Object.getPrototypeOf%":YO,"%Math.abs%":qO,"%Math.floor%":BO,"%Math.max%":VO,"%Math.min%":GO,"%Math.pow%":HO,"%Math.round%":WO,"%Math.sign%":ZO,"%Reflect.getPrototypeOf%":XO};if(xt)try{null.error}catch(t){Pb=xt(xt(t)),fo["%Error.prototype%"]=Pb}var Pb,ek=o(function t(e){var r;if(e==="%AsyncFunction%")r=kd("async function () {}");else if(e==="%GeneratorFunction%")r=kd("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=kd("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&xt&&(r=xt(i.prototype))}return fo[e]=r,r},"doEval"),xb={__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"]},la=Yo(),sc=Od(),tk=la.call(ua,Array.prototype.concat),rk=la.call(Rb,Array.prototype.splice),Ab=la.call(ua,String.prototype.replace),cc=la.call(ua,String.prototype.slice),nk=la.call(ua,RegExp.prototype.exec),ok=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ik=/\\(\\)?/g,ak=o(function(e){var r=cc(e,0,1),n=cc(e,-1);if(r==="%"&&n!=="%")throw new ti("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ti("invalid intrinsic syntax, expected opening `%`");var i=[];return Ab(e,ok,function(s,u,d,p){i[i.length]=d?Ab(p,ik,"$1"):u||s}),i},"stringToPath"),sk=o(function(e,r){var n=e,i;if(sc(xb,n)&&(i=xb[n],n="%"+i[0]+"%"),sc(fo,n)){var s=fo[n];if(s===Qo&&(s=ek(n)),typeof s>"u"&&!r)throw new ei("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new ti("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");Cb.exports=o(function(e,r){if(typeof e!="string"||e.length===0)throw new ei("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ei('"allowMissing" argument must be a boolean');if(nk(/^%?[^%]*%?$/,e)===null)throw new ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ak(e),i=n.length>0?n[0]:"",s=sk("%"+i+"%",r),u=s.name,d=s.value,p=!1,h=s.alias;h&&(i=h[0],rk(n,tk([0,1],h)));for(var y=1,m=!0;y<n.length;y+=1){var f=n[y],l=cc(f,0,1),g=cc(f,-1);if((l==='"'||l==="'"||l==="`"||g==='"'||g==="'"||g==="`")&&l!==g)throw new ti("property names with quotes must have matching quotes");if((f==="constructor"||!m)&&(p=!0),i+="."+f,u="%"+i+"%",sc(fo,u))d=fo[u];else if(d!=null){if(!(f in d)){if(!r)throw new ei("base intrinsic for "+e+" exists, but the property is not available.");return}if(ca&&y+1>=n.length){var v=ca(d,f);m=!!v,m&&"get"in v&&!("originalValue"in v.get)?d=v.get:d=d[f]}else m=sc(d,f),d=d[f];m&&!p&&(fo[u]=d)}}return d},"GetIntrinsic")});var kb=D((q5,Ob)=>{"use strict";var ck=Pd();Ob.exports=o(function(){return ck()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Nb=D((V5,Db)=>{"use strict";var uk=da(),$b=uk("%Object.defineProperty%",!0),lk=kb()(),dk=Od(),pk=Vn(),uc=lk?Symbol.toStringTag:null;Db.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 pk("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");uc&&(n||!dk(e,uc))&&($b?$b(e,uc,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[uc]=r)},"setToStringTag")});var Ub=D((H5,zb)=>{"use strict";var fk=Function.prototype.call,mk=Object.prototype.hasOwnProperty,hk=Yo();zb.exports=hk.call(fk,mk)});var Lb=D((W5,Mb)=>{"use strict";Mb.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var qb=D((Z5,Fb)=>{"use strict";var Ud=Hv(),gk=require("util"),Dd=require("path"),yk=require("http"),vk=require("https"),_k=require("url").parse,bk=require("fs"),Ek=require("stream").Stream,Sk=require("crypto"),Nd=Yv(),Tk=m_(),wk=Nb(),Gn=Ub(),zd=Lb();function jb(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}o(jb,"escapeHeaderParam");function Ge(t){if(!(this instanceof Ge))return new Ge(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ud.call(this),t=t||{};for(var e in t)this[e]=t[e]}o(Ge,"FormData");gk.inherits(Ge,Ud);Ge.LINE_BREAK=`\r
2
- `;Ge.DEFAULT_CONTENT_TYPE="application/octet-stream";Ge.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Ud.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)};Ge.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)+Ge.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Gn(e,"httpVersion"))&&!(e instanceof Ek))&&(r.knownLength||this._valuesToMeasure.push(e))};Ge.prototype._lengthRetriever=function(t,e){Gn(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):bk.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):Gn(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Gn(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};Ge.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="",u={"Content-Disposition":["form-data",'name="'+jb(t)+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&zd(u,r.header);var d;for(var p in u)if(Gn(u,p)){if(d=u[p],d==null)continue;Array.isArray(d)||(d=[d]),d.length&&(s+=p+": "+d.join("; ")+Ge.LINE_BREAK)}return"--"+this.getBoundary()+Ge.LINE_BREAK+s+Ge.LINE_BREAK};Ge.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=Dd.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Dd.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Gn(t,"httpVersion")&&(r=Dd.basename(t.client._httpMessage.path||"")),r)return'filename="'+jb(r)+'"'};Ge.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=Nd.lookup(t.name)),!r&&t&&t.path&&(r=Nd.lookup(t.path)),!r&&t&&t.readable&&Gn(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=Nd.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=Ge.DEFAULT_CONTENT_TYPE),r};Ge.prototype._multiPartFooter=function(){return function(t){var e=Ge.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ge.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ge.LINE_BREAK};Ge.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Gn(t,e)&&(r[e.toLowerCase()]=t[e]);return r};Ge.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Ge.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ge.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(Ge.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ge.prototype._generateBoundary=function(){this._boundary="--------------------------"+Sk.randomBytes(12).toString("hex")};Ge.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};Ge.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Ge.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}Tk.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};Ge.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=_k(t),n=zd({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=zd(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=vk.request(n):r=yk.request(n),this.getLength(function(s,u){if(s&&s!=="Unknown stream"){this._error(s);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),e){var d,p=o(function(h,y){return r.removeListener("error",p),r.removeListener("response",d),e.call(this,h,y)},"callback");d=p.bind(this,null),r.on("error",p),r.on("response",d)}}.bind(this)),r};Ge.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Ge.prototype.toString=function(){return"[object FormData]"};wk(Ge.prototype,"FormData");Fb.exports=Ge});var fa=D((k9,rE)=>{"use strict";var pc=Object.prototype.hasOwnProperty,tE=Object.prototype.toString,Kb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,Yb=o(function(e){return typeof Array.isArray=="function"?Array.isArray(e):tE.call(e)==="[object Array]"},"isArray"),Xb=o(function(e){if(!e||tE.call(e)!=="[object Object]")return!1;var r=pc.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&pc.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||pc.call(e,i)},"isPlainObject"),Qb=o(function(e,r){Kb&&r.name==="__proto__"?Kb(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},"setProperty"),eE=o(function(e,r){if(r==="__proto__")if(pc.call(e,r)){if(Jb)return Jb(e,r).value}else return;return e[r]},"getProperty");rE.exports=o(function t(){var e,r,n,i,s,u,d=arguments[0],p=1,h=arguments.length,y=!1;for(typeof d=="boolean"&&(y=d,d=arguments[1]||{},p=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});p<h;++p)if(e=arguments[p],e!=null)for(r in e)n=eE(d,r),i=eE(e,r),d!==i&&(y&&i&&(Xb(i)||(s=Yb(i)))?(s?(s=!1,u=n&&Yb(n)?n:[]):u=n&&Xb(n)?n:{},Qb(d,{name:r,newValue:t(y,u,i)})):typeof i<"u"&&Qb(d,{name:r,newValue:i}));return d},"extend")});var nE=D((D9,$k)=>{$k.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 iE=D((N9,oE)=>{"use strict";var Dk=nE();oE.exports={pkg:Dk}});var qd=D(fr=>{"use strict";var sE=fr&&fr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fr,"__esModule",{value:!0});fr.GaxiosError=fr.GAXIOS_ERROR_SYMBOL=void 0;fr.defaultErrorRedactor=cE;var aE=sE(fa()),Nk=sE(iE()),jd=Nk.default.pkg;fr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${jd.name}-gaxios-error`);var Fd=class t extends Error{static{o(this,"GaxiosError")}config;response;code;status;error;[fr.GAXIOS_ERROR_SYMBOL]=jd.version;static[Symbol.hasInstance](e){return e&&typeof e=="object"&&fr.GAXIOS_ERROR_SYMBOL in e&&e[fr.GAXIOS_ERROR_SYMBOL]===jd.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,aE.default)(!0,{},r),this.response&&(this.response.config=(0,aE.default)(!0,{},this.response.config)),this.response){try{this.response.data=zk(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 u=[];for(let d of e.data.error.errors)typeof d=="object"&&"message"in d&&typeof d.message=="string"&&u.push(d.message);return Object.assign({message:u.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}}};fr.GaxiosError=Fd;function zk(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(zk,"translateData");function cE(t){let e="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function r(s){s&&s.forEach((u,d)=>{(/^authentication$/i.test(d)||/^authorization$/i.test(d)||/secret/i.test(d))&&s.set(d,e)})}o(r,"redactHeaders");function n(s,u){if(typeof s=="object"&&s!==null&&typeof s[u]=="string"){let d=s[u];(/grant_type=/i.test(d)||/assertion=/i.test(d)||/secret/i.test(d))&&(s[u]=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((u,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&&(cE({config:t.response.config}),r(t.response.headers),t.response.bodyUsed&&(n(t.response,"data"),i(t.response.data))),t}o(cE,"defaultErrorRedactor")});var lE=D(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.getRetryConfig=Uk;async function Uk(t){let e=uE(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||Mk)(t))return{shouldRetry:!1,config:t.config};let i=Lk(e);t.config.retryConfig.currentRetryAttempt+=1;let s=e.retryBackoff?e.retryBackoff(t,i):new Promise(u=>{setTimeout(u,i)});return e.onRetryAttempt&&await e.onRetryAttempt(t),await s,{shouldRetry:!0,config:t.config}}o(Uk,"getRetryConfig");function Mk(t){let e=uE(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(Mk,"shouldRetryRequest");function uE(t){if(t&&t.config&&t.config.retryConfig)return t.config.retryConfig}o(uE,"getConfig");function Lk(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(Lk,"getNextRetryDelay")});var Gd=D(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.GaxiosInterceptorManager=void 0;var Vd=class extends Set{static{o(this,"GaxiosInterceptorManager")}};fc.GaxiosInterceptorManager=Vd});var pE=D((q9,dE)=>{var ri=1e3,ni=ri*60,oi=ni*60,mo=oi*24,jk=mo*7,Fk=mo*365.25;dE.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return qk(t);if(r==="number"&&isFinite(t))return e.long?Vk(t):Bk(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function qk(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*Fk;case"weeks":case"week":case"w":return r*jk;case"days":case"day":case"d":return r*mo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*oi;case"minutes":case"minute":case"mins":case"min":case"m":return r*ni;case"seconds":case"second":case"secs":case"sec":case"s":return r*ri;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}o(qk,"parse");function Bk(t){var e=Math.abs(t);return e>=mo?Math.round(t/mo)+"d":e>=oi?Math.round(t/oi)+"h":e>=ni?Math.round(t/ni)+"m":e>=ri?Math.round(t/ri)+"s":t+"ms"}o(Bk,"fmtShort");function Vk(t){var e=Math.abs(t);return e>=mo?mc(t,e,mo,"day"):e>=oi?mc(t,e,oi,"hour"):e>=ni?mc(t,e,ni,"minute"):e>=ri?mc(t,e,ri,"second"):t+" ms"}o(Vk,"fmtLong");function mc(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}o(mc,"plural")});var Hd=D((V9,fE)=>{function Gk(t){r.debug=r,r.default=r,r.coerce=p,r.disable=u,r.enable=i,r.enabled=d,r.humanize=pE(),r.destroy=h,Object.keys(t).forEach(y=>{r[y]=t[y]}),r.names=[],r.skips=[],r.formatters={};function e(y){let m=0;for(let f=0;f<y.length;f++)m=(m<<5)-m+y.charCodeAt(f),m|=0;return r.colors[Math.abs(m)%r.colors.length]}o(e,"selectColor"),r.selectColor=e;function r(y){let m,f=null,l,g;function v(...E){if(!v.enabled)return;let b=v,C=Number(new Date),U=C-(m||C);b.diff=U,b.prev=m,b.curr=C,m=C,E[0]=r.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let Y=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(G,X)=>{if(G==="%%")return"%";Y++;let te=r.formatters[X];if(typeof te=="function"){let J=E[Y];G=te.call(b,J),E.splice(Y,1),Y--}return G}),r.formatArgs.call(b,E),(b.log||r.log).apply(b,E)}return o(v,"debug"),v.namespace=y,v.useColors=r.useColors(),v.color=r.selectColor(y),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:o(()=>f!==null?f:(l!==r.namespaces&&(l=r.namespaces,g=r.enabled(y)),g),"get"),set:o(E=>{f=E},"set")}),typeof r.init=="function"&&r.init(v),v}o(r,"createDebug");function n(y,m){let f=r(this.namespace+(typeof m>"u"?":":m)+y);return f.log=this.log,f}o(n,"extend");function i(y){r.save(y),r.namespaces=y,r.names=[],r.skips=[];let m=(typeof y=="string"?y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of m)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}o(i,"enable");function s(y,m){let f=0,l=0,g=-1,v=0;for(;f<y.length;)if(l<m.length&&(m[l]===y[f]||m[l]==="*"))m[l]==="*"?(g=l,v=f,l++):(f++,l++);else if(g!==-1)l=g+1,v++,f=v;else return!1;for(;l<m.length&&m[l]==="*";)l++;return l===m.length}o(s,"matchesTemplate");function u(){let y=[...r.names,...r.skips.map(m=>"-"+m)].join(",");return r.enable(""),y}o(u,"disable");function d(y){for(let m of r.skips)if(s(y,m))return!1;for(let m of r.names)if(s(y,m))return!0;return!1}o(d,"enabled");function p(y){return y instanceof Error?y.stack||y.message:y}o(p,"coerce");function h(){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(h,"destroy"),r.enable(r.load()),r}o(Gk,"setup");fE.exports=Gk});var mE=D((qt,hc)=>{qt.formatArgs=Wk;qt.save=Zk;qt.load=Kk;qt.useColors=Hk;qt.storage=Jk();qt.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`."))}})();qt.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 Hk(){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(Hk,"useColors");function Wk(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+hc.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(Wk,"formatArgs");qt.log=console.debug||console.log||(()=>{});function Zk(t){try{t?qt.storage.setItem("debug",t):qt.storage.removeItem("debug")}catch{}}o(Zk,"save");function Kk(){let t;try{t=qt.storage.getItem("debug")||qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(Kk,"load");function Jk(){try{return localStorage}catch{}}o(Jk,"localstorage");hc.exports=Hd()(qt);var{formatters:Yk}=hc.exports;Yk.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var gE=D((W9,hE)=>{"use strict";hE.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 _E=D((Z9,vE)=>{"use strict";var Xk=require("os"),yE=require("tty"),mr=gE(),{env:At}=process,Hn;mr("no-color")||mr("no-colors")||mr("color=false")||mr("color=never")?Hn=0:(mr("color")||mr("colors")||mr("color=true")||mr("color=always"))&&(Hn=1);"FORCE_COLOR"in At&&(At.FORCE_COLOR==="true"?Hn=1:At.FORCE_COLOR==="false"?Hn=0:Hn=At.FORCE_COLOR.length===0?1:Math.min(parseInt(At.FORCE_COLOR,10),3));function Wd(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}o(Wd,"translateLevel");function Zd(t,e){if(Hn===0)return 0;if(mr("color=16m")||mr("color=full")||mr("color=truecolor"))return 3;if(mr("color=256"))return 2;if(t&&!e&&Hn===void 0)return 0;let r=Hn||0;if(At.TERM==="dumb")return r;if(process.platform==="win32"){let n=Xk.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in At)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in At)||At.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in At)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(At.TEAMCITY_VERSION)?1:0;if(At.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in At){let n=parseInt((At.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(At.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(At.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(At.TERM)||"COLORTERM"in At?1:r}o(Zd,"supportsColor");function Qk(t){let e=Zd(t,t&&t.isTTY);return Wd(e)}o(Qk,"getSupportLevel");vE.exports={supportsColor:Qk,stdout:Wd(Zd(!0,yE.isatty(1))),stderr:Wd(Zd(!0,yE.isatty(2)))}});var EE=D((It,yc)=>{var e$=require("tty"),gc=require("util");It.init=s$;It.log=o$;It.formatArgs=r$;It.save=i$;It.load=a$;It.useColors=t$;It.destroy=gc.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");It.colors=[6,2,3,4,5,1];try{let t=_E();t&&(t.stderr||t).level>=2&&(It.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{}It.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 t$(){return"colors"in It.inspectOpts?!!It.inspectOpts.colors:e$.isatty(process.stderr.fd)}o(t$,"useColors");function r$(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 eM=Object.create;var gs=Object.defineProperty;var tM=Object.getOwnPropertyDescriptor;var rM=Object.getOwnPropertyNames;var nM=Object.getPrototypeOf,oM=Object.prototype.hasOwnProperty;var a=(e,t)=>gs(e,"name",{value:t,configurable:!0});var $t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(o){throw n=[o],o}};var z=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},hr=(e,t)=>{for(var n in t)gs(e,n,{get:t[n],enumerable:!0})},dw=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of rM(t))!oM.call(e,r)&&r!==n&&gs(e,r,{get:()=>t[r],enumerable:!(o=tM(t,r))||o.enumerable});return e};var Ke=(e,t,n)=>(n=e!=null?eM(nM(e)):{},dw(t||!e||!e.__esModule?gs(n,"default",{value:e,enumerable:!0}):n,e)),iM=e=>dw(gs({},"__esModule",{value:!0}),e);var Px=z((Tx,Op)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},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(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${i})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${i})?$`,"i")};function d(p,y){if(p.indexOf("::")!==p.lastIndexOf("::"))return null;let v=0,E=-1,b=(p.match(u.zoneIndex)||[])[0],k,N;for(b&&(b=b.substring(1),p=p.replace(/%.+$/,""));(E=p.indexOf(":",E+1))>=0;)v++;if(p.substr(0,2)==="::"&&v--,p.substr(-2,2)==="::"&&v--,v>y)return null;for(N=y-v,k=":";N--;)k+="0:";return p=p.replace("::",k),p[0]===":"&&(p=p.slice(1)),p[p.length-1]===":"&&(p=p.slice(0,-1)),y=(function(){let Z=p.split(":"),H=[];for(let K=0;K<Z.length;K++)H.push(parseInt(Z[K],16));return H})(),{parts:y,zoneId:b}}a(d,"expandIPv6");function f(p,y,v,E){if(p.length!==y.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,k;for(;E>0;){if(k=v-E,k<0&&(k=0),p[b]>>k!==y[b]>>k)return!1;E-=v,b+=1}return!0}a(f,"matchCIDR");function h(p){if(r.test(p))return parseInt(p,16);if(p[0]==="0"&&!isNaN(parseInt(p[1],10))){if(o.test(p))return parseInt(p,8);throw new Error(`ipaddr: cannot parse ${p} as octal`)}return parseInt(p,10)}a(h,"parseIntAuto");function g(p,y){for(;p.length<y;)p=`0${p}`;return p}a(g,"padPart");let m={};m.IPv4=(function(){function p(y){if(y.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let v,E;for(v=0;v<y.length;v++)if(E=y[v],!(0<=E&&E<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=y}return a(p,"IPv4"),p.prototype.SpecialRanges={unspecified:[[new p([0,0,0,0]),8]],broadcast:[[new p([255,255,255,255]),32]],multicast:[[new p([224,0,0,0]),4]],linkLocal:[[new p([169,254,0,0]),16]],loopback:[[new p([127,0,0,0]),8]],carrierGradeNat:[[new p([100,64,0,0]),10]],private:[[new p([10,0,0,0]),8],[new p([172,16,0,0]),12],[new p([192,168,0,0]),16]],reserved:[[new p([192,0,0,0]),24],[new p([192,0,2,0]),24],[new p([192,88,99,0]),24],[new p([198,18,0,0]),15],[new p([198,51,100,0]),24],[new p([203,0,113,0]),24],[new p([240,0,0,0]),4]],as112:[[new p([192,175,48,0]),24],[new p([192,31,196,0]),24]],amt:[[new p([192,52,193,0]),24]]},p.prototype.kind=function(){return"ipv4"},p.prototype.match=function(y,v){let E;if(v===void 0&&(E=y,y=E[0],v=E[1]),y.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return f(this.octets,y.octets,8,v)},p.prototype.prefixLengthFromSubnetMask=function(){let y=0,v=!1,E={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},b,k,N;for(b=3;b>=0;b-=1)if(k=this.octets[b],k in E){if(N=E[k],v&&N!==0)return null;N!==8&&(v=!0),y+=N}else return null;return 32-y},p.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},p.prototype.toByteArray=function(){return this.octets.slice(0)},p.prototype.toIPv4MappedAddress=function(){return m.IPv6.parse(`::ffff:${this.toString()}`)},p.prototype.toNormalizedString=function(){return this.toString()},p.prototype.toString=function(){return this.octets.join(".")},p})(),m.IPv4.broadcastAddressFromCIDR=function(p){try{let y=this.parseCIDR(p),v=y[0].toByteArray(),E=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],k=0;for(;k<4;)b.push(parseInt(v[k],10)|parseInt(E[k],10)^255),k++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.isIPv4=function(p){return this.parser(p)!==null},m.IPv4.isValid=function(p){try{return new this(this.parser(p)),!0}catch{return!1}},m.IPv4.isValidCIDR=function(p){try{return this.parseCIDR(p),!0}catch{return!1}},m.IPv4.isValidFourPartDecimal=function(p){return!!(m.IPv4.isValid(p)&&p.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},m.IPv4.isValidCIDRFourPartDecimal=function(p){let y=p.match(/^(.+)\/(\d+)$/);return!m.IPv4.isValidCIDR(p)||!y?!1:m.IPv4.isValidFourPartDecimal(y[1])},m.IPv4.networkAddressFromCIDR=function(p){let y,v,E,b,k;try{for(y=this.parseCIDR(p),E=y[0].toByteArray(),k=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],v=0;v<4;)b.push(parseInt(E[v],10)&parseInt(k[v],10)),v++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},m.IPv4.parse=function(p){let y=this.parser(p);if(y===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(y)},m.IPv4.parseCIDR=function(p){let y;if(y=p.match(/^(.+)\/(\d+)$/)){let v=parseInt(y[2]);if(v>=0&&v<=32){let E=[this.parse(y[1]),v];return Object.defineProperty(E,"toString",{value:a(function(){return this.join("/")},"value")}),E}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},m.IPv4.parser=function(p){let y,v,E;if(y=p.match(n.fourOctet))return(function(){let b=y.slice(1,6),k=[];for(let N=0;N<b.length;N++)v=b[N],k.push(h(v));return k})();if(y=p.match(n.longValue)){if(E=h(y[1]),E>4294967295||E<0)throw new Error("ipaddr: address outside defined range");return(function(){let b=[],k;for(k=0;k<=24;k+=8)b.push(E>>k&255);return b})().reverse()}else return(y=p.match(n.twoOctet))?(function(){let b=y.slice(1,4),k=[];if(E=h(b[1]),E>16777215||E<0)throw new Error("ipaddr: address outside defined range");return k.push(h(b[0])),k.push(E>>16&255),k.push(E>>8&255),k.push(E&255),k})():(y=p.match(n.threeOctet))?(function(){let b=y.slice(1,5),k=[];if(E=h(b[2]),E>65535||E<0)throw new Error("ipaddr: address outside defined range");return k.push(h(b[0])),k.push(h(b[1])),k.push(E>>8&255),k.push(E&255),k})():null},m.IPv4.subnetMaskFromPrefixLength=function(p){if(p=parseInt(p),p<0||p>32)throw new Error("ipaddr: invalid IPv4 prefix length");let y=[0,0,0,0],v=0,E=Math.floor(p/8);for(;v<E;)y[v]=255,v++;return E<4&&(y[E]=Math.pow(2,p%8)-1<<8-p%8),new this(y)},m.IPv6=(function(){function p(y,v){let E,b;if(y.length===16)for(this.parts=[],E=0;E<=14;E+=2)this.parts.push(y[E]<<8|y[E+1]);else if(y.length===8)this.parts=y;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(E=0;E<this.parts.length;E++)if(b=this.parts[E],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");v&&(this.zoneId=v)}return a(p,"IPv6"),p.prototype.SpecialRanges={unspecified:[new p([0,0,0,0,0,0,0,0]),128],linkLocal:[new p([65152,0,0,0,0,0,0,0]),10],multicast:[new p([65280,0,0,0,0,0,0,0]),8],loopback:[new p([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new p([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new p([0,0,0,0,0,65535,0,0]),96],discard:[new p([256,0,0,0,0,0,0,0]),64],rfc6145:[new p([0,0,0,0,65535,0,0,0]),96],rfc6052:[new p([100,65435,0,0,0,0,0,0]),96],"6to4":[new p([8194,0,0,0,0,0,0,0]),16],teredo:[new p([8193,0,0,0,0,0,0,0]),32],benchmarking:[new p([8193,2,0,0,0,0,0,0]),48],amt:[new p([8193,3,0,0,0,0,0,0]),32],as112v6:[[new p([8193,4,274,0,0,0,0,0]),48],[new p([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new p([8193,16,0,0,0,0,0,0]),28],orchid2:[new p([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new p([8193,48,0,0,0,0,0,0]),28],reserved:[[new p([8193,0,0,0,0,0,0,0]),23],[new p([8193,3512,0,0,0,0,0,0]),32]]},p.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},p.prototype.kind=function(){return"ipv6"},p.prototype.match=function(y,v){let E;if(v===void 0&&(E=y,y=E[0],v=E[1]),y.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return f(this.parts,y.parts,16,v)},p.prototype.prefixLengthFromSubnetMask=function(){let y=0,v=!1,E={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},b,k;for(let N=7;N>=0;N-=1)if(b=this.parts[N],b in E){if(k=E[b],v&&k!==0)return null;k!==16&&(v=!0),y+=k}else return null;return 128-y},p.prototype.range=function(){return m.subnetMatch(this,this.SpecialRanges)},p.prototype.toByteArray=function(){let y,v=[],E=this.parts;for(let b=0;b<E.length;b++)y=E[b],v.push(y>>8),v.push(y&255);return v},p.prototype.toFixedLengthString=function(){let y=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(g(this.parts[b].toString(16),4));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),y+v},p.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),v=y[0],E=y[1];return new m.IPv4([v>>8,v&255,E>>8,E&255])},p.prototype.toNormalizedString=function(){let y=(function(){let E=[];for(let b=0;b<this.parts.length;b++)E.push(this.parts[b].toString(16));return E}).call(this).join(":"),v="";return this.zoneId&&(v=`%${this.zoneId}`),y+v},p.prototype.toRFC5952String=function(){let y=/((^|:)(0(:|$)){2,})/g,v=this.toNormalizedString(),E=0,b=-1,k;for(;k=y.exec(v);)k[0].length>b&&(E=k.index,b=k[0].length);return b<0?v:`${v.substring(0,E)}::${v.substring(E+b)}`},p.prototype.toString=function(){return this.toRFC5952String()},p})(),m.IPv6.broadcastAddressFromCIDR=function(p){try{let y=this.parseCIDR(p),v=y[0].toByteArray(),E=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],k=0;for(;k<16;)b.push(parseInt(v[k],10)|parseInt(E[k],10)^255),k++;return new this(b)}catch(y){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${y})`)}},m.IPv6.isIPv6=function(p){return this.parser(p)!==null},m.IPv6.isValid=function(p){if(typeof p=="string"&&p.indexOf(":")===-1)return!1;try{let y=this.parser(p);return new this(y.parts,y.zoneId),!0}catch{return!1}},m.IPv6.isValidCIDR=function(p){if(typeof p=="string"&&p.indexOf(":")===-1)return!1;try{return this.parseCIDR(p),!0}catch{return!1}},m.IPv6.networkAddressFromCIDR=function(p){let y,v,E,b,k;try{for(y=this.parseCIDR(p),E=y[0].toByteArray(),k=this.subnetMaskFromPrefixLength(y[1]).toByteArray(),b=[],v=0;v<16;)b.push(parseInt(E[v],10)&parseInt(k[v],10)),v++;return new this(b)}catch(N){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${N})`)}},m.IPv6.parse=function(p){let y=this.parser(p);if(y.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(y.parts,y.zoneId)},m.IPv6.parseCIDR=function(p){let y,v,E;if((v=p.match(/^(.+)\/(\d+)$/))&&(y=parseInt(v[2]),y>=0&&y<=128))return E=[this.parse(v[1]),y],Object.defineProperty(E,"toString",{value:a(function(){return this.join("/")},"value")}),E;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},m.IPv6.parser=function(p){let y,v,E,b,k,N;if(E=p.match(u.deprecatedTransitional))return this.parser(`::ffff:${E[1]}`);if(u.native.test(p))return d(p,8);if((E=p.match(u.transitional))&&(N=E[6]||"",y=E[1],E[1].endsWith("::")||(y=y.slice(0,-1)),y=d(y+N,6),y.parts)){for(k=[parseInt(E[2]),parseInt(E[3]),parseInt(E[4]),parseInt(E[5])],v=0;v<k.length;v++)if(b=k[v],!(0<=b&&b<=255))return null;return y.parts.push(k[0]<<8|k[1]),y.parts.push(k[2]<<8|k[3]),{parts:y.parts,zoneId:y.zoneId}}return null},m.IPv6.subnetMaskFromPrefixLength=function(p){if(p=parseInt(p),p<0||p>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],v=0,E=Math.floor(p/8);for(;v<E;)y[v]=255,v++;return E<16&&(y[E]=Math.pow(2,p%8)-1<<8-p%8),new this(y)},m.fromByteArray=function(p){let y=p.length;if(y===4)return new m.IPv4(p);if(y===16)return new m.IPv6(p);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},m.isValid=function(p){return m.IPv6.isValid(p)||m.IPv4.isValid(p)},m.isValidCIDR=function(p){return m.IPv6.isValidCIDR(p)||m.IPv4.isValidCIDR(p)},m.parse=function(p){if(m.IPv6.isValid(p))return m.IPv6.parse(p);if(m.IPv4.isValid(p))return m.IPv4.parse(p);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},m.parseCIDR=function(p){try{return m.IPv6.parseCIDR(p)}catch{try{return m.IPv4.parseCIDR(p)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},m.process=function(p){let y=this.parse(p);return y.kind()==="ipv6"&&y.isIPv4MappedAddress()?y.toIPv4Address():y},m.subnetMatch=function(p,y,v){let E,b,k,N;v==null&&(v="unicast");for(b in y)if(Object.prototype.hasOwnProperty.call(y,b)){for(k=y[b],k[0]&&!(k[0]instanceof Array)&&(k=[k]),E=0;E<k.length;E++)if(N=k[E],p.kind()===N[0].kind()&&p.match.apply(p,N))return b}return v},typeof Op<"u"&&Op.exports?Op.exports=m:e.ipaddr=m})(Tx)});var HI=z((ore,GI)=>{var VI=require("stream").Stream,JF=require("util");GI.exports=tn;function tn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}a(tn,"DelayedStream");JF.inherits(tn,VI);tn.create=function(e,t){var n=new this;t=t||{};for(var o in t)n[o]=t[o];n.source=e;var r=e.emit;return e.emit=function(){return n._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(tn.prototype,"readable",{configurable:!0,enumerable:!0,get:a(function(){return this.source.readable},"get")});tn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};tn.prototype.resume=function(){this._released||this.release(),this.source.resume()};tn.prototype.pause=function(){this.source.pause()};tn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};tn.prototype.pipe=function(){var e=VI.prototype.pipe.apply(this,arguments);return this.resume(),e};tn.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};tn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var JI=z((are,KI)=>{var YF=require("util"),WI=require("stream").Stream,ZI=HI();KI.exports=Et;function Et(){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(Et,"CombinedStream");YF.inherits(Et,WI);Et.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};Et.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Et.prototype.append=function(e){var t=Et.isStreamLike(e);if(t){if(!(e instanceof ZI)){var n=ZI.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=n}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Et.prototype.pipe=function(e,t){return WI.prototype.pipe.call(this,e,t),this.resume(),e};Et.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}};Et.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(n){var o=Et.isStreamLike(n);o&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};Et.prototype._pipeNext=function(e){this._currentStream=e;var t=Et.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var n=e;this.write(n),this._getNext()};Et.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};Et.prototype.write=function(e){this.emit("data",e)};Et.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Et.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")};Et.prototype.end=function(){this._reset(),this.emit("end")};Et.prototype.destroy=function(){this._reset(),this.emit("close")};Et.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Et.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Et.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Et.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var XI=z((cre,YI)=>{"use strict";YI.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 tR=z(sr=>{"use strict";var _f=XI(),XF=require("path").extname,QI=/^\s*([^;\s]*)(?:;|\s|$)/,QF=/^text\//i;sr.charset=eR;sr.charsets={lookup:eR};sr.contentType=eB;sr.extension=tB;sr.extensions=Object.create(null);sr.lookup=rB;sr.types=Object.create(null);nB(sr.extensions,sr.types);function eR(e){if(!e||typeof e!="string")return!1;var t=QI.exec(e),n=t&&_f[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&QF.test(t[1])?"UTF-8":!1}a(eR,"charset");function eB(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?sr.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=sr.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}a(eB,"contentType");function tB(e){if(!e||typeof e!="string")return!1;var t=QI.exec(e),n=t&&sr.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}a(tB,"extension");function rB(e){if(!e||typeof e!="string")return!1;var t=XF("x."+e).toLowerCase().substr(1);return t&&sr.types[t]||!1}a(rB,"lookup");function nB(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(_f).forEach(a(function(r){var i=_f[r],s=i.extensions;if(!(!s||!s.length)){e[r]=s;for(var u=0;u<s.length;u++){var d=s[u];if(t[d]){var f=n.indexOf(_f[t[d]].source),h=n.indexOf(i.source);if(t[d]!=="application/octet-stream"&&(f>h||f===h&&t[d].substr(0,12)==="application/"))continue}t[d]=r}}},"forEachMimeType"))}a(nB,"populateMaps")});var nR=z((dre,rR)=>{rR.exports=oB;function oB(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}a(oB,"defer")});var hb=z((fre,iR)=>{var oR=nR();iR.exports=iB;function iB(e){var t=!1;return oR(function(){t=!0}),a(function(o,r){t?e(o,r):oR(a(function(){e(o,r)},"nextTick_callback"))},"async_callback")}a(iB,"async")});var gb=z((hre,aR)=>{aR.exports=aB;function aB(e){Object.keys(e.jobs).forEach(sB.bind(e)),e.jobs={}}a(aB,"abort");function sB(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}a(sB,"clean")});var yb=z((yre,cR)=>{var sR=hb(),cB=gb();cR.exports=uB;function uB(e,t,n,o){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=lB(t,r,e[r],function(i,s){r in n.jobs&&(delete n.jobs[r],i?cB(n):n.results[r]=s,o(i,n.results))})}a(uB,"iterate");function lB(e,t,n,o){var r;return e.length==2?r=e(n,sR(o)):r=e(n,t,sR(o)),r}a(lB,"runJob")});var vb=z((_re,uR)=>{uR.exports=dB;function dB(e,t){var n=!Array.isArray(e),o={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&o.keyedList.sort(n?t:function(r,i){return t(e[r],e[i])}),o}a(dB,"state")});var _b=z((Ere,lR)=>{var pB=gb(),fB=hb();lR.exports=mB;function mB(e){Object.keys(this.jobs).length&&(this.index=this.size,pB(this),fB(e)(null,this.results))}a(mB,"terminator")});var pR=z((Tre,dR)=>{var hB=yb(),gB=vb(),yB=_b();dR.exports=vB;function vB(e,t,n){for(var o=gB(e);o.index<(o.keyedList||e).length;)hB(e,t,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 yB.bind(o,n)}a(vB,"parallel")});var bb=z((wre,bf)=>{var fR=yb(),_B=vb(),bB=_b();bf.exports=EB;bf.exports.ascending=mR;bf.exports.descending=SB;function EB(e,t,n,o){var r=_B(e,n);return fR(e,t,r,a(function i(s,u){if(s){o(s,u);return}if(r.index++,r.index<(r.keyedList||e).length){fR(e,t,r,i);return}o(null,r.results)},"iteratorHandler")),bB.bind(r,o)}a(EB,"serialOrdered");function mR(e,t){return e<t?-1:e>t?1:0}a(mR,"ascending");function SB(e,t){return-1*mR(e,t)}a(SB,"descending")});var gR=z((Are,hR)=>{var TB=bb();hR.exports=PB;function PB(e,t,n){return TB(e,t,null,n)}a(PB,"serial")});var vR=z((Rre,yR)=>{yR.exports={parallel:pR(),serial:gR(),serialOrdered:bb()}});var Eb=z((Cre,_R)=>{"use strict";_R.exports=Object});var ER=z((Ore,bR)=>{"use strict";bR.exports=Error});var TR=z((kre,SR)=>{"use strict";SR.exports=EvalError});var wR=z(($re,PR)=>{"use strict";PR.exports=RangeError});var AR=z((Dre,xR)=>{"use strict";xR.exports=ReferenceError});var RR=z((Nre,IR)=>{"use strict";IR.exports=SyntaxError});var Io=z((zre,CR)=>{"use strict";CR.exports=TypeError});var kR=z((Ure,OR)=>{"use strict";OR.exports=URIError});var DR=z((Mre,$R)=>{"use strict";$R.exports=Math.abs});var zR=z((Lre,NR)=>{"use strict";NR.exports=Math.floor});var MR=z((jre,UR)=>{"use strict";UR.exports=Math.max});var jR=z((Fre,LR)=>{"use strict";LR.exports=Math.min});var BR=z((Bre,FR)=>{"use strict";FR.exports=Math.pow});var VR=z((qre,qR)=>{"use strict";qR.exports=Math.round});var HR=z((Vre,GR)=>{"use strict";GR.exports=Number.isNaN||a(function(t){return t!==t},"isNaN")});var WR=z((Hre,ZR)=>{"use strict";var wB=HR();ZR.exports=a(function(t){return wB(t)||t===0?t:t<0?-1:1},"sign")});var JR=z((Wre,KR)=>{"use strict";KR.exports=Object.getOwnPropertyDescriptor});var Sb=z((Kre,YR)=>{"use strict";var Ef=JR();if(Ef)try{Ef([],"length")}catch{Ef=null}YR.exports=Ef});var QR=z((Jre,XR)=>{"use strict";var Sf=Object.defineProperty||!1;if(Sf)try{Sf({},"a",{value:1})}catch{Sf=!1}XR.exports=Sf});var Tb=z((Yre,eC)=>{"use strict";eC.exports=a(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},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;t[n]=r;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,n);if(u.value!==r||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var nC=z((Qre,rC)=>{"use strict";var tC=typeof Symbol<"u"&&Symbol,xB=Tb();rC.exports=a(function(){return typeof tC!="function"||typeof Symbol!="function"||typeof tC("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:xB()},"hasNativeSymbols")});var Pb=z((tne,oC)=>{"use strict";oC.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var wb=z((rne,iC)=>{"use strict";var AB=Eb();iC.exports=AB.getPrototypeOf||null});var cC=z((nne,sC)=>{"use strict";var IB="Function.prototype.bind called on incompatible ",RB=Object.prototype.toString,CB=Math.max,OB="[object Function]",aC=a(function(t,n){for(var o=[],r=0;r<t.length;r+=1)o[r]=t[r];for(var i=0;i<n.length;i+=1)o[i+t.length]=n[i];return o},"concatty"),kB=a(function(t,n){for(var o=[],r=n||0,i=0;r<t.length;r+=1,i+=1)o[i]=t[r];return o},"slicy"),$B=a(function(e,t){for(var n="",o=0;o<e.length;o+=1)n+=e[o],o+1<e.length&&(n+=t);return n},"joiny");sC.exports=a(function(t){var n=this;if(typeof n!="function"||RB.apply(n)!==OB)throw new TypeError(IB+n);for(var o=kB(arguments,1),r,i=a(function(){if(this instanceof r){var h=n.apply(this,aC(o,arguments));return Object(h)===h?h:this}return n.apply(t,aC(o,arguments))},"binder"),s=CB(0,n.length-o.length),u=[],d=0;d<s;d++)u[d]="$"+d;if(r=Function("binder","return function ("+$B(u,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var f=a(function(){},"Empty");f.prototype=n.prototype,r.prototype=new f,f.prototype=null}return r},"bind")});var Aa=z((ine,uC)=>{"use strict";var DB=cC();uC.exports=Function.prototype.bind||DB});var Tf=z((ane,lC)=>{"use strict";lC.exports=Function.prototype.call});var xb=z((sne,dC)=>{"use strict";dC.exports=Function.prototype.apply});var fC=z((cne,pC)=>{"use strict";pC.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var hC=z((une,mC)=>{"use strict";var NB=Aa(),zB=xb(),UB=Tf(),MB=fC();mC.exports=MB||NB.call(UB,zB)});var Ab=z((lne,gC)=>{"use strict";var LB=Aa(),jB=Io(),FB=Tf(),BB=hC();gC.exports=a(function(t){if(t.length<1||typeof t[0]!="function")throw new jB("a function is required");return BB(LB,FB,t)},"callBindBasic")});var SC=z((pne,EC)=>{"use strict";var qB=Ab(),yC=Sb(),_C;try{_C=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ib=!!_C&&yC&&yC(Object.prototype,"__proto__"),bC=Object,vC=bC.getPrototypeOf;EC.exports=Ib&&typeof Ib.get=="function"?qB([Ib.get]):typeof vC=="function"?a(function(t){return vC(t==null?t:bC(t))},"getDunder"):!1});var AC=z((mne,xC)=>{"use strict";var TC=Pb(),PC=wb(),wC=SC();xC.exports=TC?a(function(t){return TC(t)},"getProto"):PC?a(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return PC(t)},"getProto"):wC?a(function(t){return wC(t)},"getProto"):null});var Rb=z((gne,IC)=>{"use strict";var VB=Function.prototype.call,GB=Object.prototype.hasOwnProperty,HB=Aa();IC.exports=HB.call(VB,GB)});var du=z((yne,DC)=>{"use strict";var qe,ZB=Eb(),WB=ER(),KB=TR(),JB=wR(),YB=AR(),Oa=RR(),Ca=Io(),XB=kR(),QB=DR(),eq=zR(),tq=MR(),rq=jR(),nq=BR(),oq=VR(),iq=WR(),kC=Function,Cb=a(function(e){try{return kC('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),cu=Sb(),aq=QR(),Ob=a(function(){throw new Ca},"throwTypeError"),sq=cu?(function(){try{return arguments.callee,Ob}catch{try{return cu(arguments,"callee").get}catch{return Ob}}})():Ob,Ia=nC()(),Ut=AC(),cq=wb(),uq=Pb(),$C=xb(),uu=Tf(),Ra={},lq=typeof Uint8Array>"u"||!Ut?qe:Ut(Uint8Array),gi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qe:ArrayBuffer,"%ArrayIteratorPrototype%":Ia&&Ut?Ut([][Symbol.iterator]()):qe,"%AsyncFromSyncIteratorPrototype%":qe,"%AsyncFunction%":Ra,"%AsyncGenerator%":Ra,"%AsyncGeneratorFunction%":Ra,"%AsyncIteratorPrototype%":Ra,"%Atomics%":typeof Atomics>"u"?qe:Atomics,"%BigInt%":typeof BigInt>"u"?qe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":WB,"%eval%":eval,"%EvalError%":KB,"%Float16Array%":typeof Float16Array>"u"?qe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?qe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qe:FinalizationRegistry,"%Function%":kC,"%GeneratorFunction%":Ra,"%Int8Array%":typeof Int8Array>"u"?qe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ia&&Ut?Ut(Ut([][Symbol.iterator]())):qe,"%JSON%":typeof JSON=="object"?JSON:qe,"%Map%":typeof Map>"u"?qe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ia||!Ut?qe:Ut(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ZB,"%Object.getOwnPropertyDescriptor%":cu,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qe:Promise,"%Proxy%":typeof Proxy>"u"?qe:Proxy,"%RangeError%":JB,"%ReferenceError%":YB,"%Reflect%":typeof Reflect>"u"?qe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ia||!Ut?qe:Ut(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ia&&Ut?Ut(""[Symbol.iterator]()):qe,"%Symbol%":Ia?Symbol:qe,"%SyntaxError%":Oa,"%ThrowTypeError%":sq,"%TypedArray%":lq,"%TypeError%":Ca,"%Uint8Array%":typeof Uint8Array>"u"?qe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qe:Uint32Array,"%URIError%":XB,"%WeakMap%":typeof WeakMap>"u"?qe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qe:WeakSet,"%Function.prototype.call%":uu,"%Function.prototype.apply%":$C,"%Object.defineProperty%":aq,"%Object.getPrototypeOf%":cq,"%Math.abs%":QB,"%Math.floor%":eq,"%Math.max%":tq,"%Math.min%":rq,"%Math.pow%":nq,"%Math.round%":oq,"%Math.sign%":iq,"%Reflect.getPrototypeOf%":uq};if(Ut)try{null.error}catch(e){RC=Ut(Ut(e)),gi["%Error.prototype%"]=RC}var RC,dq=a(function e(t){var n;if(t==="%AsyncFunction%")n=Cb("async function () {}");else if(t==="%GeneratorFunction%")n=Cb("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Cb("async function* () {}");else if(t==="%AsyncGenerator%"){var o=e("%AsyncGeneratorFunction%");o&&(n=o.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Ut&&(n=Ut(r.prototype))}return gi[t]=n,n},"doEval"),CC={__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"]},lu=Aa(),Pf=Rb(),pq=lu.call(uu,Array.prototype.concat),fq=lu.call($C,Array.prototype.splice),OC=lu.call(uu,String.prototype.replace),wf=lu.call(uu,String.prototype.slice),mq=lu.call(uu,RegExp.prototype.exec),hq=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gq=/\\(\\)?/g,yq=a(function(t){var n=wf(t,0,1),o=wf(t,-1);if(n==="%"&&o!=="%")throw new Oa("invalid intrinsic syntax, expected closing `%`");if(o==="%"&&n!=="%")throw new Oa("invalid intrinsic syntax, expected opening `%`");var r=[];return OC(t,hq,function(i,s,u,d){r[r.length]=u?OC(d,gq,"$1"):s||i}),r},"stringToPath"),vq=a(function(t,n){var o=t,r;if(Pf(CC,o)&&(r=CC[o],o="%"+r[0]+"%"),Pf(gi,o)){var i=gi[o];if(i===Ra&&(i=dq(o)),typeof i>"u"&&!n)throw new Ca("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new Oa("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");DC.exports=a(function(t,n){if(typeof t!="string"||t.length===0)throw new Ca("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ca('"allowMissing" argument must be a boolean');if(mq(/^%?[^%]*%?$/,t)===null)throw new Oa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var o=yq(t),r=o.length>0?o[0]:"",i=vq("%"+r+"%",n),s=i.name,u=i.value,d=!1,f=i.alias;f&&(r=f[0],fq(o,pq([0,1],f)));for(var h=1,g=!0;h<o.length;h+=1){var m=o[h],p=wf(m,0,1),y=wf(m,-1);if((p==='"'||p==="'"||p==="`"||y==='"'||y==="'"||y==="`")&&p!==y)throw new Oa("property names with quotes must have matching quotes");if((m==="constructor"||!g)&&(d=!0),r+="."+m,s="%"+r+"%",Pf(gi,s))u=gi[s];else if(u!=null){if(!(m in u)){if(!n)throw new Ca("base intrinsic for "+t+" exists, but the property is not available.");return}if(cu&&h+1>=o.length){var v=cu(u,m);g=!!v,g&&"get"in v&&!("originalValue"in v.get)?u=v.get:u=u[m]}else g=Pf(u,m),u=u[m];g&&!d&&(gi[s]=u)}}return u},"GetIntrinsic")});var zC=z((_ne,NC)=>{"use strict";var _q=Tb();NC.exports=a(function(){return _q()&&!!Symbol.toStringTag},"hasToStringTagShams")});var LC=z((Ene,MC)=>{"use strict";var bq=du(),UC=bq("%Object.defineProperty%",!0),Eq=zC()(),Sq=Rb(),Tq=Io(),xf=Eq?Symbol.toStringTag:null;MC.exports=a(function(t,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 Tq("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");xf&&(o||!Sq(t,xf))&&(UC?UC(t,xf,{configurable:!r,enumerable:!1,value:n,writable:!1}):t[xf]=n)},"setToStringTag")});var FC=z((Tne,jC)=>{"use strict";var Pq=Function.prototype.call,wq=Object.prototype.hasOwnProperty,xq=Aa();jC.exports=xq.call(Pq,wq)});var qC=z((Pne,BC)=>{"use strict";BC.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var HC=z((wne,GC)=>{"use strict";var Nb=JI(),Aq=require("util"),kb=require("path"),Iq=require("http"),Rq=require("https"),Cq=require("url").parse,Oq=require("fs"),kq=require("stream").Stream,$q=require("crypto"),$b=tR(),Dq=vR(),Nq=LC(),Ro=FC(),Db=qC();function VC(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}a(VC,"escapeHeaderParam");function Je(e){if(!(this instanceof Je))return new Je(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Nb.call(this),e=e||{};for(var t in e)this[t]=e[t]}a(Je,"FormData");Aq.inherits(Je,Nb);Je.LINE_BREAK=`\r
2
+ `;Je.DEFAULT_CONTENT_TYPE="application/octet-stream";Je.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var o=Nb.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,n),i=this._multiPartFooter();o(r),o(t),o(i),this._trackLength(r,t,n)};Je.prototype._trackLength=function(e,t,n){var o=0;n.knownLength!=null?o+=Number(n.knownLength):Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(e)+Je.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ro(t,"httpVersion"))&&!(t instanceof kq))&&(n.knownLength||this._valuesToMeasure.push(t))};Je.prototype._lengthRetriever=function(e,t){Ro(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Oq.stat(e.path,function(n,o){if(n){t(n);return}var r=o.size-(e.start?e.start:0);t(null,r)}):Ro(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ro(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")};Je.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string")return n.header;var o=this._getContentDisposition(t,n),r=this._getContentType(t,n),i="",s={"Content-Disposition":["form-data",'name="'+VC(e)+'"'].concat(o||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&Db(s,n.header);var u;for(var d in s)if(Ro(s,d)){if(u=s[d],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=d+": "+u.join("; ")+Je.LINE_BREAK)}return"--"+this.getBoundary()+Je.LINE_BREAK+i+Je.LINE_BREAK};Je.prototype._getContentDisposition=function(e,t){var n;if(typeof t.filepath=="string"?n=kb.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=kb.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ro(e,"httpVersion")&&(n=kb.basename(e.client._httpMessage.path||"")),n)return'filename="'+VC(n)+'"'};Je.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=$b.lookup(e.name)),!n&&e&&e.path&&(n=$b.lookup(e.path)),!n&&e&&e.readable&&Ro(e,"httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=$b.lookup(t.filepath||t.filename)),!n&&e&&typeof e=="object"&&(n=Je.DEFAULT_CONTENT_TYPE),n};Je.prototype._multiPartFooter=function(){return function(e){var t=Je.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};Je.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Je.LINE_BREAK};Je.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ro(e,t)&&(n[t.toLowerCase()]=e[t]);return n};Je.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};Je.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Je.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,o=this._streams.length;n<o;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?e=Buffer.concat([e,this._streams[n]]):e=Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(Je.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};Je.prototype._generateBoundary=function(){this._boundary="--------------------------"+$q.randomBytes(12).toString("hex")};Je.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};Je.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};Je.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Dq.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,o){if(n){e(n);return}o.forEach(function(r){t+=r}),e(null,t)})};Je.prototype.submit=function(e,t){var n,o,r={method:"post"};return typeof e=="string"?(e=Cq(e),o=Db({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(o=Db(e,r),o.port||(o.port=o.protocol==="https:"?443:80)),o.headers=this.getHeaders(e.headers),o.protocol==="https:"?n=Rq.request(o):n=Iq.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),t){var u,d=a(function(f,h){return n.removeListener("error",d),n.removeListener("response",u),t.call(this,f,h)},"callback");u=d.bind(this,null),n.on("error",d),n.on("response",u)}}.bind(this)),n};Je.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};Je.prototype.toString=function(){return"[object FormData]"};Nq(Je.prototype,"FormData");GC.exports=Je});var fu=z((uoe,a0)=>{"use strict";var Rf=Object.prototype.hasOwnProperty,i0=Object.prototype.toString,QC=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,t0=a(function(t){return typeof Array.isArray=="function"?Array.isArray(t):i0.call(t)==="[object Array]"},"isArray"),r0=a(function(t){if(!t||i0.call(t)!=="[object Object]")return!1;var n=Rf.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&Rf.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||Rf.call(t,r)},"isPlainObject"),n0=a(function(t,n){QC&&n.name==="__proto__"?QC(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},"setProperty"),o0=a(function(t,n){if(n==="__proto__")if(Rf.call(t,n)){if(e0)return e0(t,n).value}else return;return t[n]},"getProperty");a0.exports=a(function e(){var t,n,o,r,i,s,u=arguments[0],d=1,f=arguments.length,h=!1;for(typeof u=="boolean"&&(h=u,u=arguments[1]||{},d=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});d<f;++d)if(t=arguments[d],t!=null)for(n in t)o=o0(u,n),r=o0(t,n),u!==r&&(h&&r&&(r0(r)||(i=t0(r)))?(i?(i=!1,s=o&&t0(o)?o:[]):s=o&&r0(o)?o:{},n0(u,{name:n,newValue:e(h,s,r)})):typeof r<"u"&&n0(u,{name:n,newValue:r}));return u},"extend")});var s0=z((doe,Vq)=>{Vq.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 u0=z((poe,c0)=>{"use strict";var Gq=s0();c0.exports={pkg:Gq}});var jb=z(Mr=>{"use strict";var d0=Mr&&Mr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.GaxiosError=Mr.GAXIOS_ERROR_SYMBOL=void 0;Mr.defaultErrorRedactor=p0;var l0=d0(fu()),Hq=d0(u0()),Mb=Hq.default.pkg;Mr.GAXIOS_ERROR_SYMBOL=Symbol.for(`${Mb.name}-gaxios-error`);var Lb=class e extends Error{static{a(this,"GaxiosError")}config;response;code;status;error;[Mr.GAXIOS_ERROR_SYMBOL]=Mb.version;static[Symbol.hasInstance](t){return t&&typeof t=="object"&&Mr.GAXIOS_ERROR_SYMBOL in t&&t[Mr.GAXIOS_ERROR_SYMBOL]===Mb.version?!0:Function.prototype[Symbol.hasInstance].call(e,t)}constructor(t,n,o,r){if(super(t,{cause:r}),this.config=n,this.response=o,this.error=r instanceof Error?r:void 0,this.config=(0,l0.default)(!0,{},n),this.response&&(this.response.config=(0,l0.default)(!0,{},this.response.config)),this.response){try{this.response.data=Zq(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(t,n="The request failed"){let o=n;if(typeof t.data=="string"&&(o=t.data),t.data&&typeof t.data=="object"&&"error"in t.data&&t.data.error&&!t.ok){if(typeof t.data.error=="string")return{message:t.data.error,code:t.status,status:t.statusText};if(typeof t.data.error=="object"){o="message"in t.data.error&&typeof t.data.error.message=="string"?t.data.error.message:o;let r="status"in t.data.error&&typeof t.data.error.status=="string"?t.data.error.status:t.statusText,i="code"in t.data.error&&typeof t.data.error.code=="number"?t.data.error.code:t.status;if("errors"in t.data.error&&Array.isArray(t.data.error.errors)){let s=[];for(let u of t.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},t.data.error)}return Object.assign({message:o,code:i,status:r},t.data.error)}}return{message:o,code:t.status,status:t.statusText}}};Mr.GaxiosError=Lb;function Zq(e,t){switch(e){case"stream":return t;case"json":return JSON.parse(JSON.stringify(t));case"arraybuffer":return JSON.parse(Buffer.from(t).toString("utf8"));case"blob":return JSON.parse(t.text());default:return t}}a(Zq,"translateData");function p0(e){let t="<<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,t)})}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]=t)}}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,t)}):("grant_type"in i&&(i.grant_type=t),"assertion"in i&&(i.assertion=t),"client_secret"in i&&(i.client_secret=t)))}return a(r,"redactObject"),e.config&&(n(e.config.headers),o(e.config,"data"),r(e.config.data),o(e.config,"body"),r(e.config.body),e.config.url.searchParams.has("token")&&e.config.url.searchParams.set("token",t),e.config.url.searchParams.has("client_secret")&&e.config.url.searchParams.set("client_secret",t)),e.response&&(p0({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(o(e.response,"data"),r(e.response.data))),e}a(p0,"defaultErrorRedactor")});var m0=z(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:!0});Fb.getRetryConfig=Wq;async function Wq(e){let t=f0(e);if(!e||!e.config||!t&&!e.config.retry)return{shouldRetry:!1};t=t||{},t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry=t.retry===void 0||t.retry===null?3:t.retry,t.httpMethodsToRetry=t.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries=t.noResponseRetries===void 0||t.noResponseRetries===null?2:t.noResponseRetries,t.retryDelayMultiplier=t.retryDelayMultiplier?t.retryDelayMultiplier:2,t.timeOfFirstRequest=t.timeOfFirstRequest?t.timeOfFirstRequest:Date.now(),t.totalTimeout=t.totalTimeout?t.totalTimeout:Number.MAX_SAFE_INTEGER,t.maxRetryDelay=t.maxRetryDelay?t.maxRetryDelay:Number.MAX_SAFE_INTEGER;let n=[[100,199],[408,408],[429,429],[500,599]];if(t.statusCodesToRetry=t.statusCodesToRetry||n,e.config.retryConfig=t,!await(t.shouldRetry||Kq)(e))return{shouldRetry:!1,config:e.config};let r=Jq(t);e.config.retryConfig.currentRetryAttempt+=1;let i=t.retryBackoff?t.retryBackoff(e,r):new Promise(s=>{setTimeout(s,r)});return t.onRetryAttempt&&await t.onRetryAttempt(e),await i,{shouldRetry:!0,config:e.config}}a(Wq,"getRetryConfig");function Kq(e){let t=f0(e);if(e.config.signal?.aborted&&e.code!=="TimeoutError"||e.code==="AbortError"||!t||t.retry===0||!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries||!t.httpMethodsToRetry||!t.httpMethodsToRetry.includes(e.config.method?.toUpperCase()||"GET"))return!1;if(e.response&&e.response.status){let n=!1;for(let[o,r]of t.statusCodesToRetry){let i=e.response.status;if(i>=o&&i<=r){n=!0;break}}if(!n)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}a(Kq,"shouldRetryRequest");function f0(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}a(f0,"getConfig");function Jq(e){let n=(e.currentRetryAttempt?0:e.retryDelay??100)+(Math.pow(e.retryDelayMultiplier,e.currentRetryAttempt)-1)/2*1e3,o=e.totalTimeout-(Date.now()-e.timeOfFirstRequest);return Math.min(n,o,e.maxRetryDelay)}a(Jq,"getNextRetryDelay")});var qb=z(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.GaxiosInterceptorManager=void 0;var Bb=class extends Set{static{a(this,"GaxiosInterceptorManager")}};Cf.GaxiosInterceptorManager=Bb});var g0=z((_oe,h0)=>{var ka=1e3,$a=ka*60,Da=$a*60,yi=Da*24,Yq=yi*7,Xq=yi*365.25;h0.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Qq(e);if(n==="number"&&isFinite(e))return t.long?t4(e):e4(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Qq(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*Xq;case"weeks":case"week":case"w":return n*Yq;case"days":case"day":case"d":return n*yi;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Da;case"minutes":case"minute":case"mins":case"min":case"m":return n*$a;case"seconds":case"second":case"secs":case"sec":case"s":return n*ka;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}a(Qq,"parse");function e4(e){var t=Math.abs(e);return t>=yi?Math.round(e/yi)+"d":t>=Da?Math.round(e/Da)+"h":t>=$a?Math.round(e/$a)+"m":t>=ka?Math.round(e/ka)+"s":e+"ms"}a(e4,"fmtShort");function t4(e){var t=Math.abs(e);return t>=yi?Of(e,t,yi,"day"):t>=Da?Of(e,t,Da,"hour"):t>=$a?Of(e,t,$a,"minute"):t>=ka?Of(e,t,ka,"second"):e+" ms"}a(t4,"fmtLong");function Of(e,t,n,o){var r=t>=n*1.5;return Math.round(e/n)+" "+o+(r?"s":"")}a(Of,"plural")});var Vb=z((Eoe,y0)=>{function r4(e){n.debug=n,n.default=n,n.coerce=d,n.disable=s,n.enable=r,n.enabled=u,n.humanize=g0(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let g=0;for(let m=0;m<h.length;m++)g=(g<<5)-g+h.charCodeAt(m),g|=0;return n.colors[Math.abs(g)%n.colors.length]}a(t,"selectColor"),n.selectColor=t;function n(h){let g,m=null,p,y;function v(...E){if(!v.enabled)return;let b=v,k=Number(new Date),N=k-(g||k);b.diff=N,b.prev=g,b.curr=k,g=k,E[0]=n.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let Z=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(K,ee)=>{if(K==="%%")return"%";Z++;let se=n.formatters[ee];if(typeof se=="function"){let Q=E[Z];K=se.call(b,Q),E.splice(Z,1),Z--}return K}),n.formatArgs.call(b,E),(b.log||n.log).apply(b,E)}return a(v,"debug"),v.namespace=h,v.useColors=n.useColors(),v.color=n.selectColor(h),v.extend=o,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:a(()=>m!==null?m:(p!==n.namespaces&&(p=n.namespaces,y=n.enabled(h)),y),"get"),set:a(E=>{m=E},"set")}),typeof n.init=="function"&&n.init(v),v}a(n,"createDebug");function o(h,g){let m=n(this.namespace+(typeof g>"u"?":":g)+h);return m.log=this.log,m}a(o,"extend");function r(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let g=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of g)m[0]==="-"?n.skips.push(m.slice(1)):n.names.push(m)}a(r,"enable");function i(h,g){let m=0,p=0,y=-1,v=0;for(;m<h.length;)if(p<g.length&&(g[p]===h[m]||g[p]==="*"))g[p]==="*"?(y=p,v=m,p++):(m++,p++);else if(y!==-1)p=y+1,v++,m=v;else return!1;for(;p<g.length&&g[p]==="*";)p++;return p===g.length}a(i,"matchesTemplate");function s(){let h=[...n.names,...n.skips.map(g=>"-"+g)].join(",");return n.enable(""),h}a(s,"disable");function u(h){for(let g of n.skips)if(i(h,g))return!1;for(let g of n.names)if(i(h,g))return!0;return!1}a(u,"enabled");function d(h){return h instanceof Error?h.stack||h.message:h}a(d,"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 a(f,"destroy"),n.enable(n.load()),n}a(r4,"setup");y0.exports=r4});var v0=z((cr,kf)=>{cr.formatArgs=o4;cr.save=i4;cr.load=a4;cr.useColors=n4;cr.storage=s4();cr.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})();cr.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 n4(){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 e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(n4,"useColors");function o4(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+kf.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(n++,r==="%c"&&(o=n))}),e.splice(o,0,t)}a(o4,"formatArgs");cr.log=console.debug||console.log||(()=>{});function i4(e){try{e?cr.storage.setItem("debug",e):cr.storage.removeItem("debug")}catch{}}a(i4,"save");function a4(){let e;try{e=cr.storage.getItem("debug")||cr.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(a4,"load");function s4(){try{return localStorage}catch{}}a(s4,"localstorage");kf.exports=Vb()(cr);var{formatters:c4}=kf.exports;c4.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var b0=z((Poe,_0)=>{"use strict";_0.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(n+e),r=t.indexOf("--");return o!==-1&&(r===-1||o<r)}});var T0=z((woe,S0)=>{"use strict";var u4=require("os"),E0=require("tty"),Lr=b0(),{env:Mt}=process,Co;Lr("no-color")||Lr("no-colors")||Lr("color=false")||Lr("color=never")?Co=0:(Lr("color")||Lr("colors")||Lr("color=true")||Lr("color=always"))&&(Co=1);"FORCE_COLOR"in Mt&&(Mt.FORCE_COLOR==="true"?Co=1:Mt.FORCE_COLOR==="false"?Co=0:Co=Mt.FORCE_COLOR.length===0?1:Math.min(parseInt(Mt.FORCE_COLOR,10),3));function Gb(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}a(Gb,"translateLevel");function Hb(e,t){if(Co===0)return 0;if(Lr("color=16m")||Lr("color=full")||Lr("color=truecolor"))return 3;if(Lr("color=256"))return 2;if(e&&!t&&Co===void 0)return 0;let n=Co||0;if(Mt.TERM==="dumb")return n;if(process.platform==="win32"){let o=u4.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Mt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Mt)||Mt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Mt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Mt.TEAMCITY_VERSION)?1:0;if(Mt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Mt){let o=parseInt((Mt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Mt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Mt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Mt.TERM)||"COLORTERM"in Mt?1:n}a(Hb,"supportsColor");function l4(e){let t=Hb(e,e&&e.isTTY);return Gb(t)}a(l4,"getSupportLevel");S0.exports={supportsColor:l4,stdout:Gb(Hb(!0,E0.isatty(1))),stderr:Gb(Hb(!0,E0.isatty(2)))}});var w0=z((Lt,Df)=>{var d4=require("tty"),$f=require("util");Lt.init=v4;Lt.log=h4;Lt.formatArgs=f4;Lt.save=g4;Lt.load=y4;Lt.useColors=p4;Lt.destroy=$f.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Lt.colors=[6,2,3,4,5,1];try{let e=T0();e&&(e.stderr||e).level>=2&&(Lt.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{}Lt.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),o=process.env[t];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),e[n]=o,e},{});function p4(){return"colors"in Lt.inspectOpts?!!Lt.inspectOpts.colors:d4.isatty(process.stderr.fd)}a(p4,"useColors");function f4(e){let{namespace:t,useColors:n}=this;if(n){let o=this.color,r="\x1B[3"+(o<8?o:"8;5;"+o),i=` ${r};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
4
4
  `).join(`
5
- `+s),t.push(i+"m+"+yc.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=n$()+e+" "+t[0]}o(r$,"formatArgs");function n$(){return It.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(n$,"getDate");function o$(...t){return process.stderr.write(gc.formatWithOptions(It.inspectOpts,...t)+`
6
- `)}o(o$,"log");function i$(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(i$,"save");function a$(){return process.env.DEBUG}o(a$,"load");function s$(t){t.inspectOpts={};let e=Object.keys(It.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=It.inspectOpts[e[r]]}o(s$,"init");yc.exports=Hd()(It);var{formatters:bE}=yc.exports;bE.o=function(t){return this.inspectOpts.colors=this.useColors,gc.inspect(t,this.inspectOpts).split(`
7
- `).map(e=>e.trim()).join(" ")};bE.O=function(t){return this.inspectOpts.colors=this.useColors,gc.inspect(t,this.inspectOpts)}});var Jd=D((Y9,Kd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Kd.exports=mE():Kd.exports=EE()});var wE=D(Bt=>{"use strict";var c$=Bt&&Bt.__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]})),u$=Bt&&Bt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),SE=Bt&&Bt.__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)&&c$(e,t,r);return u$(e,t),e};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.req=Bt.json=Bt.toBuffer=void 0;var l$=SE(require("http")),d$=SE(require("https"));async function TE(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(TE,"toBuffer");Bt.toBuffer=TE;async function p$(t){let r=(await TE(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(p$,"json");Bt.json=p$;function f$(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?d$:l$).request(t,e),i=new Promise((s,u)=>{n.once("response",s).once("error",u).end()});return n.then=i.then.bind(i),n}o(f$,"req");Bt.req=f$});var IE=D(Yt=>{"use strict";var xE=Yt&&Yt.__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]})),m$=Yt&&Yt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),AE=Yt&&Yt.__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)&&xE(e,t,r);return m$(e,t),e},h$=Yt&&Yt.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xE(e,t,r)};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.Agent=void 0;var g$=AE(require("net")),PE=AE(require("http")),y$=require("https");h$(wE(),Yt);var Fr=Symbol("AgentBaseInternalState"),Yd=class extends PE.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Fr]={}}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 g$.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)?y$.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),u=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(d=>{if(this.decrementSockets(s,u),d instanceof PE.Agent)try{return d.addRequest(e,i)}catch(p){return n(p)}this[Fr].currentSocket=d,super.createSocket(e,r,n)},d=>{this.decrementSockets(s,u),n(d)})}createConnection(){let e=this[Fr].currentSocket;if(this[Fr].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Fr].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Fr]&&(this[Fr].defaultPort=e)}get protocol(){return this[Fr].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Fr]&&(this[Fr].protocol=e)}};Yt.Agent=Yd});var RE=D(ii=>{"use strict";var v$=ii&&ii.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ii,"__esModule",{value:!0});ii.parseProxyResponse=void 0;var _$=v$(Jd()),vc=(0,_$.default)("https-proxy-agent:parse-proxy-response");function b$(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let y=t.read();y?h(y):t.once("readable",s)}o(s,"read");function u(){t.removeListener("end",d),t.removeListener("error",p),t.removeListener("readable",s)}o(u,"cleanup");function d(){u(),vc("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(d,"onend");function p(y){u(),vc("onerror %o",y),r(y)}o(p,"onerror");function h(y){i.push(y),n+=y.length;let m=Buffer.concat(i,n),f=m.indexOf(`\r
5
+ `+i),e.push(r+"m+"+Df.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=m4()+t+" "+e[0]}a(f4,"formatArgs");function m4(){return Lt.inspectOpts.hideDate?"":new Date().toISOString()+" "}a(m4,"getDate");function h4(...e){return process.stderr.write($f.formatWithOptions(Lt.inspectOpts,...e)+`
6
+ `)}a(h4,"log");function g4(e){e?process.env.DEBUG=e:delete process.env.DEBUG}a(g4,"save");function y4(){return process.env.DEBUG}a(y4,"load");function v4(e){e.inspectOpts={};let t=Object.keys(Lt.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Lt.inspectOpts[t[n]]}a(v4,"init");Df.exports=Vb()(Lt);var{formatters:P0}=Df.exports;P0.o=function(e){return this.inspectOpts.colors=this.useColors,$f.inspect(e,this.inspectOpts).split(`
7
+ `).map(t=>t.trim()).join(" ")};P0.O=function(e){return this.inspectOpts.colors=this.useColors,$f.inspect(e,this.inspectOpts)}});var Wb=z((Ioe,Zb)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Zb.exports=v0():Zb.exports=w0()});var I0=z(ur=>{"use strict";var _4=ur&&ur.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),b4=ur&&ur.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),x0=ur&&ur.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&_4(t,e,n);return b4(t,e),t};Object.defineProperty(ur,"__esModule",{value:!0});ur.req=ur.json=ur.toBuffer=void 0;var E4=x0(require("http")),S4=x0(require("https"));async function A0(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}a(A0,"toBuffer");ur.toBuffer=A0;async function T4(e){let n=(await A0(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let r=o;throw r.message+=` (input: ${n})`,r}}a(T4,"json");ur.json=T4;function P4(e,t={}){let o=((typeof e=="string"?e:e.href).startsWith("https:")?S4:E4).request(e,t),r=new Promise((i,s)=>{o.once("response",i).once("error",s).end()});return o.then=r.then.bind(r),o}a(P4,"req");ur.req=P4});var k0=z(br=>{"use strict";var C0=br&&br.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),w4=br&&br.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O0=br&&br.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&C0(t,e,n);return w4(t,e),t},x4=br&&br.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&C0(t,e,n)};Object.defineProperty(br,"__esModule",{value:!0});br.Agent=void 0;var A4=O0(require("net")),R0=O0(require("http")),I4=require("https");x4(I0(),br);var hn=Symbol("AgentBaseInternalState"),Kb=class extends R0.Agent{static{a(this,"Agent")}constructor(t){super(t),this[hn]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.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(t){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[t]||(this.sockets[t]=[]);let n=new A4.Socket({writable:!1});return this.sockets[t].push(n),this.totalSocketCount++,n}decrementSockets(t,n){if(!this.sockets[t]||n===null)return;let o=this.sockets[t],r=o.indexOf(n);r!==-1&&(o.splice(r,1),this.totalSocketCount--,o.length===0&&delete this.sockets[t])}getName(t){return this.isSecureEndpoint(t)?I4.Agent.prototype.getName.call(this,t):super.getName(t)}createSocket(t,n,o){let r={...n,secureEndpoint:this.isSecureEndpoint(n)},i=this.getName(r),s=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(t,r)).then(u=>{if(this.decrementSockets(i,s),u instanceof R0.Agent)try{return u.addRequest(t,r)}catch(d){return o(d)}this[hn].currentSocket=u,super.createSocket(t,n,o)},u=>{this.decrementSockets(i,s),o(u)})}createConnection(){let t=this[hn].currentSocket;if(this[hn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[hn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[hn]&&(this[hn].defaultPort=t)}get protocol(){return this[hn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[hn]&&(this[hn].protocol=t)}};br.Agent=Kb});var $0=z(Na=>{"use strict";var R4=Na&&Na.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Na,"__esModule",{value:!0});Na.parseProxyResponse=void 0;var C4=R4(Wb()),Nf=(0,C4.default)("https-proxy-agent:parse-proxy-response");function O4(e){return new Promise((t,n)=>{let o=0,r=[];function i(){let h=e.read();h?f(h):e.once("readable",i)}a(i,"read");function s(){e.removeListener("end",u),e.removeListener("error",d),e.removeListener("readable",i)}a(s,"cleanup");function u(){s(),Nf("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}a(u,"onend");function d(h){s(),Nf("onerror %o",h),n(h)}a(d,"onerror");function f(h){r.push(h),o+=h.length;let g=Buffer.concat(r,o),m=g.indexOf(`\r
9
9
  \r
10
- `);if(f===-1){vc("have not received end of HTTP headers yet..."),s();return}let l=m.slice(0,f).toString("ascii").split(`\r
11
- `),g=l.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let v=g.split(" "),E=+v[1],b=v.slice(2).join(" "),C={};for(let U of l){if(!U)continue;let Y=U.indexOf(":");if(Y===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${U}"`));let Z=U.slice(0,Y).toLowerCase(),G=U.slice(Y+1).trimStart(),X=C[Z];typeof X=="string"?C[Z]=[X,G]:Array.isArray(X)?X.push(G):C[Z]=G}vc("got proxy server response: %o %o",g,C),u(),e({connect:{statusCode:E,statusText:b,headers:C},buffered:m})}o(h,"ondata"),t.on("error",p),t.on("end",d),s()})}o(b$,"parseProxyResponse");ii.parseProxyResponse=b$});var NE=D(hr=>{"use strict";var E$=hr&&hr.__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]})),S$=hr&&hr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$E=hr&&hr.__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)&&E$(e,t,r);return S$(e,t),e},DE=hr&&hr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hr,"__esModule",{value:!0});hr.HttpsProxyAgent=void 0;var _c=$E(require("net")),CE=$E(require("tls")),T$=DE(require("assert")),w$=DE(Jd()),P$=IE(),x$=require("url"),A$=RE(),ma=(0,w$.default)("https-proxy-agent"),OE=o(t=>t.servername===void 0&&t.host&&!_c.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),bc=class extends P$.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new x$.URL(e):e,this.proxyHeaders=r?.headers??{},ma("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?kE(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:"?(ma("Creating `tls.Socket`: %o",this.connectOpts),i=CE.connect(OE(this.connectOpts))):(ma("Creating `net.Socket`: %o",this.connectOpts),i=_c.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},u=_c.isIPv6(r.host)?`[${r.host}]`:r.host,d=`CONNECT ${u}:${r.port} HTTP/1.1\r
12
- `;if(n.username||n.password){let f=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}s.Host=`${u}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(s))d+=`${f}: ${s[f]}\r
13
- `;let p=(0,A$.parseProxyResponse)(i);i.write(`${d}\r
14
- `);let{connect:h,buffered:y}=await p;if(e.emit("proxyConnect",h),this.emit("proxyConnect",h,e),h.statusCode===200)return e.once("socket",I$),r.secureEndpoint?(ma("Upgrading socket connection to TLS"),CE.connect({...kE(OE(r),"host","path","port"),socket:i})):i;i.destroy();let m=new _c.Socket({writable:!1});return m.readable=!0,e.once("socket",f=>{ma("Replaying proxy buffer for failed request"),(0,T$.default)(f.listenerCount("data")>0),f.push(y),f.push(null)}),m}};bc.protocols=["http","https"];hr.HttpsProxyAgent=bc;function I$(t){t.resume()}o(I$,"resume");function kE(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(kE,"omit")});function R$(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",u=s;for(let y=1;y<r.length;y++)r[y]==="base64"?i=!0:r[y]&&(u+=`;${r[y]}`,r[y].indexOf("charset=")===0&&(n=r[y].substring(8)));!r[0]&&!n.length&&(u+=";charset=US-ASCII",n="US-ASCII");let d=i?"base64":"ascii",p=unescape(t.substring(e+1)),h=Buffer.from(p,d);return h.type=s,h.typeFull=u,h.charset=n,h}var zE,UE=wt(()=>{o(R$,"dataUriToBuffer");zE=R$});var LE=D((Ec,ME)=>{(function(t,e){typeof Ec=="object"&&typeof ME<"u"?e(Ec):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(Ec,(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,c){try{Object.defineProperty(a,"name",{value:c,configurable:!0})}catch{}}o(i,"setFunctionName");let s=Promise,u=Promise.prototype.then,d=Promise.reject.bind(s);function p(a){return new s(a)}o(p,"newPromise");function h(a){return p(c=>c(a))}o(h,"promiseResolvedWith");function y(a){return d(a)}o(y,"promiseRejectedWith");function m(a,c,_){return u.call(a,c,_)}o(m,"PerformPromiseThen");function f(a,c,_){m(m(a,c,_),void 0,n)}o(f,"uponPromise");function l(a,c){f(a,c)}o(l,"uponFulfillment");function g(a,c){f(a,void 0,c)}o(g,"uponRejection");function v(a,c,_){return m(a,c,_)}o(v,"transformPromiseWith");function E(a){m(a,void 0,n)}o(E,"setPromiseIsHandledToTrue");let b=o(a=>{if(typeof queueMicrotask=="function")b=queueMicrotask;else{let c=h(void 0);b=o(_=>m(c,_),"_queueMicrotask")}return b(a)},"_queueMicrotask");function C(a,c,_){if(typeof a!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(a,c,_)}o(C,"reflectCall");function U(a,c,_){try{return h(C(a,c,_))}catch(w){return y(w)}}o(U,"promiseCall");let Y=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(c){let _=this._back,w=_;_._elements.length===Y-1&&(w={_elements:[],_next:void 0}),_._elements.push(c),w!==_&&(this._back=w,_._next=w),++this._size}shift(){let c=this._front,_=c,w=this._cursor,A=w+1,L=c._elements,B=L[w];return A===Y&&(_=c._next,A=0),--this._size,this._cursor=A,c!==_&&(this._front=_),L[w]=void 0,B}forEach(c){let _=this._cursor,w=this._front,A=w._elements;for(;(_!==A.length||w._next!==void 0)&&!(_===A.length&&(w=w._next,A=w._elements,_=0,A.length===0));)c(A[_]),++_}peek(){let c=this._front,_=this._cursor;return c._elements[_]}}let G=Symbol("[[AbortSteps]]"),X=Symbol("[[ErrorSteps]]"),te=Symbol("[[CancelSteps]]"),J=Symbol("[[PullSteps]]"),De=Symbol("[[ReleaseSteps]]");function re(a,c){a._ownerReadableStream=c,c._reader=a,c._state==="readable"?K(a):c._state==="closed"?ce(a):ie(a,c._storedError)}o(re,"ReadableStreamReaderGenericInitialize");function H(a,c){let _=a._ownerReadableStream;return wr(_,c)}o(H,"ReadableStreamReaderGenericCancel");function V(a){let c=a._ownerReadableStream;c._state==="readable"?ke(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Ne(a,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),c._readableStreamController[De](),c._reader=void 0,a._ownerReadableStream=void 0}o(V,"ReadableStreamReaderGenericRelease");function Q(a){return new TypeError("Cannot "+a+" a stream using a released reader")}o(Q,"readerLockException");function K(a){a._closedPromise=p((c,_)=>{a._closedPromise_resolve=c,a._closedPromise_reject=_})}o(K,"defaultReaderClosedPromiseInitialize");function ie(a,c){K(a),ke(a,c)}o(ie,"defaultReaderClosedPromiseInitializeAsRejected");function ce(a){K(a),Ke(a)}o(ce,"defaultReaderClosedPromiseInitializeAsResolved");function ke(a,c){a._closedPromise_reject!==void 0&&(E(a._closedPromise),a._closedPromise_reject(c),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(ke,"defaultReaderClosedPromiseReject");function Ne(a,c){ie(a,c)}o(Ne,"defaultReaderClosedPromiseResetToRejected");function Ke(a){a._closedPromise_resolve!==void 0&&(a._closedPromise_resolve(void 0),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0)}o(Ke,"defaultReaderClosedPromiseResolve");let et=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},Tt=Math.trunc||function(a){return a<0?Math.ceil(a):Math.floor(a)};function ee(a){return typeof a=="object"||typeof a=="function"}o(ee,"isDictionary");function dt(a,c){if(a!==void 0&&!ee(a))throw new TypeError(`${c} is not an object.`)}o(dt,"assertDictionary");function mt(a,c){if(typeof a!="function")throw new TypeError(`${c} is not a function.`)}o(mt,"assertFunction");function Ht(a){return typeof a=="object"&&a!==null||typeof a=="function"}o(Ht,"isObject");function We(a,c){if(!Ht(a))throw new TypeError(`${c} is not an object.`)}o(We,"assertObject");function Ye(a,c,_){if(a===void 0)throw new TypeError(`Parameter ${c} is required in '${_}'.`)}o(Ye,"assertRequiredArgument");function T(a,c,_){if(a===void 0)throw new TypeError(`${c} is required in '${_}'.`)}o(T,"assertRequiredField");function P(a){return Number(a)}o(P,"convertUnrestrictedDouble");function x(a){return a===0?0:a}o(x,"censorNegativeZero");function z(a){return x(Tt(a))}o(z,"integerPart");function R(a,c){let w=Number.MAX_SAFE_INTEGER,A=Number(a);if(A=x(A),!et(A))throw new TypeError(`${c} is not a finite number`);if(A=z(A),A<0||A>w)throw new TypeError(`${c} is outside the accepted range of 0 to ${w}, inclusive`);return!et(A)||A===0?0:A}o(R,"convertUnsignedLongLongWithEnforceRange");function $(a,c){if(!On(a))throw new TypeError(`${c} is not a ReadableStream.`)}o($,"assertReadableStream");function j(a){return new W(a)}o(j,"AcquireReadableStreamDefaultReader");function I(a,c){a._reader._readRequests.push(c)}o(I,"ReadableStreamAddReadRequest");function k(a,c,_){let A=a._reader._readRequests.shift();_?A._closeSteps():A._chunkSteps(c)}o(k,"ReadableStreamFulfillReadRequest");function M(a){return a._reader._readRequests.length}o(M,"ReadableStreamGetNumReadRequests");function N(a){let c=a._reader;return!(c===void 0||!ue(c))}o(N,"ReadableStreamHasDefaultReader");class W{static{o(this,"ReadableStreamDefaultReader")}constructor(c){if(Ye(c,1,"ReadableStreamDefaultReader"),$(c,"First parameter"),kn(c))throw new TypeError("This stream has already been locked for exclusive reading by another reader");re(this,c),this._readRequests=new Z}get closed(){return ue(this)?this._closedPromise:y(at("closed"))}cancel(c=void 0){return ue(this)?this._ownerReadableStream===void 0?y(Q("cancel")):H(this,c):y(at("cancel"))}read(){if(!ue(this))return y(at("read"));if(this._ownerReadableStream===void 0)return y(Q("read from"));let c,_,w=p((L,B)=>{c=L,_=B});return pe(this,{_chunkSteps:o(L=>c({value:L,done:!1}),"_chunkSteps"),_closeSteps:o(()=>c({value:void 0,done:!0}),"_closeSteps"),_errorSteps:o(L=>_(L),"_errorSteps")}),w}releaseLock(){if(!ue(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}}),i(W.prototype.cancel,"cancel"),i(W.prototype.read,"read"),i(W.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(W.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ue(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readRequests")?!1:a instanceof W}o(ue,"IsReadableStreamDefaultReader");function pe(a,c){let _=a._ownerReadableStream;_._disturbed=!0,_._state==="closed"?c._closeSteps():_._state==="errored"?c._errorSteps(_._storedError):_._readableStreamController[J](c)}o(pe,"ReadableStreamDefaultReaderRead");function qe(a){V(a);let c=new TypeError("Reader was released");it(a,c)}o(qe,"ReadableStreamDefaultReaderRelease");function it(a,c){let _=a._readRequests;a._readRequests=new Z,_.forEach(w=>{w._errorSteps(c)})}o(it,"ReadableStreamDefaultReaderErrorReadRequests");function at(a){return new TypeError(`ReadableStreamDefaultReader.prototype.${a} can only be used on a ReadableStreamDefaultReader`)}o(at,"defaultReaderBrandCheckException");let Fe=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class He{static{o(this,"ReadableStreamAsyncIteratorImpl")}constructor(c,_){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=c,this._preventCancel=_}next(){let c=o(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,c,c):c(),this._ongoingPromise}return(c){let _=o(()=>this._returnSteps(c),"returnSteps");return this._ongoingPromise?v(this._ongoingPromise,_,_):_()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let c=this._reader,_,w,A=p((B,se)=>{_=B,w=se});return pe(c,{_chunkSteps:o(B=>{this._ongoingPromise=void 0,b(()=>_({value:B,done:!1}))},"_chunkSteps"),_closeSteps:o(()=>{this._ongoingPromise=void 0,this._isFinished=!0,V(c),_({value:void 0,done:!0})},"_closeSteps"),_errorSteps:o(B=>{this._ongoingPromise=void 0,this._isFinished=!0,V(c),w(B)},"_errorSteps")}),A}_returnSteps(c){if(this._isFinished)return Promise.resolve({value:c,done:!0});this._isFinished=!0;let _=this._reader;if(!this._preventCancel){let w=H(_,c);return V(_),v(w,()=>({value:c,done:!0}))}return V(_),h({value:c,done:!0})}}let bt={next(){return Ro(this)?this._asyncIteratorImpl.next():y(Co("next"))},return(a){return Ro(this)?this._asyncIteratorImpl.return(a):y(Co("return"))}};Object.setPrototypeOf(bt,Fe);function Io(a,c){let _=j(a),w=new He(_,c),A=Object.create(bt);return A._asyncIteratorImpl=w,A}o(Io,"AcquireReadableStreamAsyncIterator");function Ro(a){if(!r(a)||!Object.prototype.hasOwnProperty.call(a,"_asyncIteratorImpl"))return!1;try{return a._asyncIteratorImpl instanceof He}catch{return!1}}o(Ro,"IsReadableStreamAsyncIterator");function Co(a){return new TypeError(`ReadableStreamAsyncIterator.${a} can only be used on a ReadableSteamAsyncIterator`)}o(Co,"streamAsyncIteratorBrandCheckException");let Wt=Number.isNaN||function(a){return a!==a};var rn,Ct,Et;function Xe(a){return a.slice()}o(Xe,"CreateArrayFromList");function ph(a,c,_,w,A){new Uint8Array(a).set(new Uint8Array(_,w,A),c)}o(ph,"CopyDataBlockBytes");let nn=o(a=>(typeof a.transfer=="function"?nn=o(c=>c.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?nn=o(c=>structuredClone(c,{transfer:[c]}),"TransferArrayBuffer"):nn=o(c=>c,"TransferArrayBuffer"),nn(a)),"TransferArrayBuffer"),An=o(a=>(typeof a.detached=="boolean"?An=o(c=>c.detached,"IsDetachedBuffer"):An=o(c=>c.byteLength===0,"IsDetachedBuffer"),An(a)),"IsDetachedBuffer");function fh(a,c,_){if(a.slice)return a.slice(c,_);let w=_-c,A=new ArrayBuffer(w);return ph(A,0,a,c,w),A}o(fh,"ArrayBufferSlice");function rs(a,c){let _=a[c];if(_!=null){if(typeof _!="function")throw new TypeError(`${String(c)} is not a function`);return _}}o(rs,"GetMethod");function hA(a){let c={[Symbol.iterator]:()=>a.iterator},_=(async function*(){return yield*c})(),w=_.next;return{iterator:_,nextMethod:w,done:!1}}o(hA,"CreateAsyncFromSyncIterator");let nl=(Et=(rn=Symbol.asyncIterator)!==null&&rn!==void 0?rn:(Ct=Symbol.for)===null||Ct===void 0?void 0:Ct.call(Symbol,"Symbol.asyncIterator"))!==null&&Et!==void 0?Et:"@@asyncIterator";function mh(a,c="sync",_){if(_===void 0)if(c==="async"){if(_=rs(a,nl),_===void 0){let L=rs(a,Symbol.iterator),B=mh(a,"sync",L);return hA(B)}}else _=rs(a,Symbol.iterator);if(_===void 0)throw new TypeError("The object is not iterable");let w=C(_,a,[]);if(!r(w))throw new TypeError("The iterator method must return an object");let A=w.next;return{iterator:w,nextMethod:A,done:!1}}o(mh,"GetIterator");function gA(a){let c=C(a.nextMethod,a.iterator,[]);if(!r(c))throw new TypeError("The iterator.next() method must return an object");return c}o(gA,"IteratorNext");function yA(a){return!!a.done}o(yA,"IteratorComplete");function vA(a){return a.value}o(vA,"IteratorValue");function _A(a){return!(typeof a!="number"||Wt(a)||a<0)}o(_A,"IsNonNegativeNumber");function hh(a){let c=fh(a.buffer,a.byteOffset,a.byteOffset+a.byteLength);return new Uint8Array(c)}o(hh,"CloneAsUint8Array");function ol(a){let c=a._queue.shift();return a._queueTotalSize-=c.size,a._queueTotalSize<0&&(a._queueTotalSize=0),c.value}o(ol,"DequeueValue");function il(a,c,_){if(!_A(_)||_===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");a._queue.push({value:c,size:_}),a._queueTotalSize+=_}o(il,"EnqueueValueWithSize");function bA(a){return a._queue.peek().value}o(bA,"PeekQueueValue");function In(a){a._queue=new Z,a._queueTotalSize=0}o(In,"ResetQueue");function gh(a){return a===DataView}o(gh,"isDataViewConstructor");function EA(a){return gh(a.constructor)}o(EA,"isDataView");function SA(a){return gh(a)?1:a.BYTES_PER_ELEMENT}o(SA,"arrayBufferViewElementSize");class ro{static{o(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!al(this))throw dl("view");return this._view}respond(c){if(!al(this))throw dl("respond");if(Ye(c,1,"respond"),c=R(c,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(An(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");as(this._associatedReadableByteStreamController,c)}respondWithNewView(c){if(!al(this))throw dl("respondWithNewView");if(Ye(c,1,"respondWithNewView"),!ArrayBuffer.isView(c))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(An(c.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");ss(this._associatedReadableByteStreamController,c)}}Object.defineProperties(ro.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),i(ro.prototype.respond,"respond"),i(ro.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ro.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class on{static{o(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!no(this))throw $i("byobRequest");return ll(this)}get desiredSize(){if(!no(this))throw $i("desiredSize");return xh(this)}close(){if(!no(this))throw $i("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let c=this._controlledReadableByteStream._state;if(c!=="readable")throw new TypeError(`The stream (in ${c} state) is not in the readable state and cannot be closed`);ki(this)}enqueue(c){if(!no(this))throw $i("enqueue");if(Ye(c,1,"enqueue"),!ArrayBuffer.isView(c))throw new TypeError("chunk must be an array buffer view");if(c.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(c.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 _=this._controlledReadableByteStream._state;if(_!=="readable")throw new TypeError(`The stream (in ${_} state) is not in the readable state and cannot be enqueued to`);is(this,c)}error(c=void 0){if(!no(this))throw $i("error");ur(this,c)}[te](c){yh(this),In(this);let _=this._cancelAlgorithm(c);return os(this),_}[J](c){let _=this._controlledReadableByteStream;if(this._queueTotalSize>0){Ph(this,c);return}let w=this._autoAllocateChunkSize;if(w!==void 0){let A;try{A=new ArrayBuffer(w)}catch(B){c._errorSteps(B);return}let L={buffer:A,bufferByteLength:w,byteOffset:0,byteLength:w,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(L)}I(_,c),oo(this)}[De](){if(this._pendingPullIntos.length>0){let c=this._pendingPullIntos.peek();c.readerType="none",this._pendingPullIntos=new Z,this._pendingPullIntos.push(c)}}}Object.defineProperties(on.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),i(on.prototype.close,"close"),i(on.prototype.enqueue,"enqueue"),i(on.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(on.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function no(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableByteStream")?!1:a instanceof on}o(no,"IsReadableByteStreamController");function al(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_associatedReadableByteStreamController")?!1:a instanceof ro}o(al,"IsReadableStreamBYOBRequest");function oo(a){if(!AA(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let _=a._pullAlgorithm();f(_,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,oo(a)),null),w=>(ur(a,w),null))}o(oo,"ReadableByteStreamControllerCallPullIfNeeded");function yh(a){cl(a),a._pendingPullIntos=new Z}o(yh,"ReadableByteStreamControllerClearPendingPullIntos");function sl(a,c){let _=!1;a._state==="closed"&&(_=!0);let w=vh(c);c.readerType==="default"?k(a,w,_):$A(a,w,_)}o(sl,"ReadableByteStreamControllerCommitPullIntoDescriptor");function vh(a){let c=a.bytesFilled,_=a.elementSize;return new a.viewConstructor(a.buffer,a.byteOffset,c/_)}o(vh,"ReadableByteStreamControllerConvertPullIntoDescriptor");function ns(a,c,_,w){a._queue.push({buffer:c,byteOffset:_,byteLength:w}),a._queueTotalSize+=w}o(ns,"ReadableByteStreamControllerEnqueueChunkToQueue");function _h(a,c,_,w){let A;try{A=fh(c,_,_+w)}catch(L){throw ur(a,L),L}ns(a,A,0,w)}o(_h,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function bh(a,c){c.bytesFilled>0&&_h(a,c.buffer,c.byteOffset,c.bytesFilled),Oo(a)}o(bh,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function Eh(a,c){let _=Math.min(a._queueTotalSize,c.byteLength-c.bytesFilled),w=c.bytesFilled+_,A=_,L=!1,B=w%c.elementSize,se=w-B;se>=c.minimumFill&&(A=se-c.bytesFilled,L=!0);let Ee=a._queue;for(;A>0;){let me=Ee.peek(),Re=Math.min(A,me.byteLength),ze=c.byteOffset+c.bytesFilled;ph(c.buffer,ze,me.buffer,me.byteOffset,Re),me.byteLength===Re?Ee.shift():(me.byteOffset+=Re,me.byteLength-=Re),a._queueTotalSize-=Re,Sh(a,Re,c),A-=Re}return L}o(Eh,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function Sh(a,c,_){_.bytesFilled+=c}o(Sh,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function Th(a){a._queueTotalSize===0&&a._closeRequested?(os(a),Li(a._controlledReadableByteStream)):oo(a)}o(Th,"ReadableByteStreamControllerHandleQueueDrain");function cl(a){a._byobRequest!==null&&(a._byobRequest._associatedReadableByteStreamController=void 0,a._byobRequest._view=null,a._byobRequest=null)}o(cl,"ReadableByteStreamControllerInvalidateBYOBRequest");function ul(a){for(;a._pendingPullIntos.length>0;){if(a._queueTotalSize===0)return;let c=a._pendingPullIntos.peek();Eh(a,c)&&(Oo(a),sl(a._controlledReadableByteStream,c))}}o(ul,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function TA(a){let c=a._controlledReadableByteStream._reader;for(;c._readRequests.length>0;){if(a._queueTotalSize===0)return;let _=c._readRequests.shift();Ph(a,_)}}o(TA,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function wA(a,c,_,w){let A=a._controlledReadableByteStream,L=c.constructor,B=SA(L),{byteOffset:se,byteLength:Ee}=c,me=_*B,Re;try{Re=nn(c.buffer)}catch(tt){w._errorSteps(tt);return}let ze={buffer:Re,bufferByteLength:Re.byteLength,byteOffset:se,byteLength:Ee,bytesFilled:0,minimumFill:me,elementSize:B,viewConstructor:L,readerType:"byob"};if(a._pendingPullIntos.length>0){a._pendingPullIntos.push(ze),Rh(A,w);return}if(A._state==="closed"){let tt=new L(ze.buffer,ze.byteOffset,0);w._closeSteps(tt);return}if(a._queueTotalSize>0){if(Eh(a,ze)){let tt=vh(ze);Th(a),w._chunkSteps(tt);return}if(a._closeRequested){let tt=new TypeError("Insufficient bytes to fill elements in the given buffer");ur(a,tt),w._errorSteps(tt);return}}a._pendingPullIntos.push(ze),Rh(A,w),oo(a)}o(wA,"ReadableByteStreamControllerPullInto");function PA(a,c){c.readerType==="none"&&Oo(a);let _=a._controlledReadableByteStream;if(pl(_))for(;Ch(_)>0;){let w=Oo(a);sl(_,w)}}o(PA,"ReadableByteStreamControllerRespondInClosedState");function xA(a,c,_){if(Sh(a,c,_),_.readerType==="none"){bh(a,_),ul(a);return}if(_.bytesFilled<_.minimumFill)return;Oo(a);let w=_.bytesFilled%_.elementSize;if(w>0){let A=_.byteOffset+_.bytesFilled;_h(a,_.buffer,A-w,w)}_.bytesFilled-=w,sl(a._controlledReadableByteStream,_),ul(a)}o(xA,"ReadableByteStreamControllerRespondInReadableState");function wh(a,c){let _=a._pendingPullIntos.peek();cl(a),a._controlledReadableByteStream._state==="closed"?PA(a,_):xA(a,c,_),oo(a)}o(wh,"ReadableByteStreamControllerRespondInternal");function Oo(a){return a._pendingPullIntos.shift()}o(Oo,"ReadableByteStreamControllerShiftPendingPullInto");function AA(a){let c=a._controlledReadableByteStream;return c._state!=="readable"||a._closeRequested||!a._started?!1:!!(N(c)&&M(c)>0||pl(c)&&Ch(c)>0||xh(a)>0)}o(AA,"ReadableByteStreamControllerShouldCallPull");function os(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0}o(os,"ReadableByteStreamControllerClearAlgorithms");function ki(a){let c=a._controlledReadableByteStream;if(!(a._closeRequested||c._state!=="readable")){if(a._queueTotalSize>0){a._closeRequested=!0;return}if(a._pendingPullIntos.length>0){let _=a._pendingPullIntos.peek();if(_.bytesFilled%_.elementSize!==0){let w=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ur(a,w),w}}os(a),Li(c)}}o(ki,"ReadableByteStreamControllerClose");function is(a,c){let _=a._controlledReadableByteStream;if(a._closeRequested||_._state!=="readable")return;let{buffer:w,byteOffset:A,byteLength:L}=c;if(An(w))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let B=nn(w);if(a._pendingPullIntos.length>0){let se=a._pendingPullIntos.peek();if(An(se.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");cl(a),se.buffer=nn(se.buffer),se.readerType==="none"&&bh(a,se)}if(N(_))if(TA(a),M(_)===0)ns(a,B,A,L);else{a._pendingPullIntos.length>0&&Oo(a);let se=new Uint8Array(B,A,L);k(_,se,!1)}else pl(_)?(ns(a,B,A,L),ul(a)):ns(a,B,A,L);oo(a)}o(is,"ReadableByteStreamControllerEnqueue");function ur(a,c){let _=a._controlledReadableByteStream;_._state==="readable"&&(yh(a),In(a),os(a),eg(_,c))}o(ur,"ReadableByteStreamControllerError");function Ph(a,c){let _=a._queue.shift();a._queueTotalSize-=_.byteLength,Th(a);let w=new Uint8Array(_.buffer,_.byteOffset,_.byteLength);c._chunkSteps(w)}o(Ph,"ReadableByteStreamControllerFillReadRequestFromQueue");function ll(a){if(a._byobRequest===null&&a._pendingPullIntos.length>0){let c=a._pendingPullIntos.peek(),_=new Uint8Array(c.buffer,c.byteOffset+c.bytesFilled,c.byteLength-c.bytesFilled),w=Object.create(ro.prototype);RA(w,a,_),a._byobRequest=w}return a._byobRequest}o(ll,"ReadableByteStreamControllerGetBYOBRequest");function xh(a){let c=a._controlledReadableByteStream._state;return c==="errored"?null:c==="closed"?0:a._strategyHWM-a._queueTotalSize}o(xh,"ReadableByteStreamControllerGetDesiredSize");function as(a,c){let _=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(c!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(c===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(_.bytesFilled+c>_.byteLength)throw new RangeError("bytesWritten out of range")}_.buffer=nn(_.buffer),wh(a,c)}o(as,"ReadableByteStreamControllerRespond");function ss(a,c){let _=a._pendingPullIntos.peek();if(a._controlledReadableByteStream._state==="closed"){if(c.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(c.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(_.byteOffset+_.bytesFilled!==c.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(_.bufferByteLength!==c.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(_.bytesFilled+c.byteLength>_.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let A=c.byteLength;_.buffer=nn(c.buffer),wh(a,A)}o(ss,"ReadableByteStreamControllerRespondWithNewView");function Ah(a,c,_,w,A,L,B){c._controlledReadableByteStream=a,c._pullAgain=!1,c._pulling=!1,c._byobRequest=null,c._queue=c._queueTotalSize=void 0,In(c),c._closeRequested=!1,c._started=!1,c._strategyHWM=L,c._pullAlgorithm=w,c._cancelAlgorithm=A,c._autoAllocateChunkSize=B,c._pendingPullIntos=new Z,a._readableStreamController=c;let se=_();f(h(se),()=>(c._started=!0,oo(c),null),Ee=>(ur(c,Ee),null))}o(Ah,"SetUpReadableByteStreamController");function IA(a,c,_){let w=Object.create(on.prototype),A,L,B;c.start!==void 0?A=o(()=>c.start(w),"startAlgorithm"):A=o(()=>{},"startAlgorithm"),c.pull!==void 0?L=o(()=>c.pull(w),"pullAlgorithm"):L=o(()=>h(void 0),"pullAlgorithm"),c.cancel!==void 0?B=o(Ee=>c.cancel(Ee),"cancelAlgorithm"):B=o(()=>h(void 0),"cancelAlgorithm");let se=c.autoAllocateChunkSize;if(se===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ah(a,w,A,L,B,_,se)}o(IA,"SetUpReadableByteStreamControllerFromUnderlyingSource");function RA(a,c,_){a._associatedReadableByteStreamController=c,a._view=_}o(RA,"SetUpReadableStreamBYOBRequest");function dl(a){return new TypeError(`ReadableStreamBYOBRequest.prototype.${a} can only be used on a ReadableStreamBYOBRequest`)}o(dl,"byobRequestBrandCheckException");function $i(a){return new TypeError(`ReadableByteStreamController.prototype.${a} can only be used on a ReadableByteStreamController`)}o($i,"byteStreamControllerBrandCheckException");function CA(a,c){dt(a,c);let _=a?.mode;return{mode:_===void 0?void 0:OA(_,`${c} has member 'mode' that`)}}o(CA,"convertReaderOptions");function OA(a,c){if(a=`${a}`,a!=="byob")throw new TypeError(`${c} '${a}' is not a valid enumeration value for ReadableStreamReaderMode`);return a}o(OA,"convertReadableStreamReaderMode");function kA(a,c){var _;dt(a,c);let w=(_=a?.min)!==null&&_!==void 0?_:1;return{min:R(w,`${c} has member 'min' that`)}}o(kA,"convertByobReadOptions");function Ih(a){return new Rn(a)}o(Ih,"AcquireReadableStreamBYOBReader");function Rh(a,c){a._reader._readIntoRequests.push(c)}o(Rh,"ReadableStreamAddReadIntoRequest");function $A(a,c,_){let A=a._reader._readIntoRequests.shift();_?A._closeSteps(c):A._chunkSteps(c)}o($A,"ReadableStreamFulfillReadIntoRequest");function Ch(a){return a._reader._readIntoRequests.length}o(Ch,"ReadableStreamGetNumReadIntoRequests");function pl(a){let c=a._reader;return!(c===void 0||!io(c))}o(pl,"ReadableStreamHasBYOBReader");class Rn{static{o(this,"ReadableStreamBYOBReader")}constructor(c){if(Ye(c,1,"ReadableStreamBYOBReader"),$(c,"First parameter"),kn(c))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!no(c._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");re(this,c),this._readIntoRequests=new Z}get closed(){return io(this)?this._closedPromise:y(cs("closed"))}cancel(c=void 0){return io(this)?this._ownerReadableStream===void 0?y(Q("cancel")):H(this,c):y(cs("cancel"))}read(c,_={}){if(!io(this))return y(cs("read"));if(!ArrayBuffer.isView(c))return y(new TypeError("view must be an array buffer view"));if(c.byteLength===0)return y(new TypeError("view must have non-zero byteLength"));if(c.buffer.byteLength===0)return y(new TypeError("view's buffer must have non-zero byteLength"));if(An(c.buffer))return y(new TypeError("view's buffer has been detached"));let w;try{w=kA(_,"options")}catch(me){return y(me)}let A=w.min;if(A===0)return y(new TypeError("options.min must be greater than 0"));if(EA(c)){if(A>c.byteLength)return y(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(A>c.length)return y(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return y(Q("read from"));let L,B,se=p((me,Re)=>{L=me,B=Re});return Oh(this,c,A,{_chunkSteps:o(me=>L({value:me,done:!1}),"_chunkSteps"),_closeSteps:o(me=>L({value:me,done:!0}),"_closeSteps"),_errorSteps:o(me=>B(me),"_errorSteps")}),se}releaseLock(){if(!io(this))throw cs("releaseLock");this._ownerReadableStream!==void 0&&DA(this)}}Object.defineProperties(Rn.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),i(Rn.prototype.cancel,"cancel"),i(Rn.prototype.read,"read"),i(Rn.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Rn.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function io(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readIntoRequests")?!1:a instanceof Rn}o(io,"IsReadableStreamBYOBReader");function Oh(a,c,_,w){let A=a._ownerReadableStream;A._disturbed=!0,A._state==="errored"?w._errorSteps(A._storedError):wA(A._readableStreamController,c,_,w)}o(Oh,"ReadableStreamBYOBReaderRead");function DA(a){V(a);let c=new TypeError("Reader was released");kh(a,c)}o(DA,"ReadableStreamBYOBReaderRelease");function kh(a,c){let _=a._readIntoRequests;a._readIntoRequests=new Z,_.forEach(w=>{w._errorSteps(c)})}o(kh,"ReadableStreamBYOBReaderErrorReadIntoRequests");function cs(a){return new TypeError(`ReadableStreamBYOBReader.prototype.${a} can only be used on a ReadableStreamBYOBReader`)}o(cs,"byobReaderBrandCheckException");function Di(a,c){let{highWaterMark:_}=a;if(_===void 0)return c;if(Wt(_)||_<0)throw new RangeError("Invalid highWaterMark");return _}o(Di,"ExtractHighWaterMark");function us(a){let{size:c}=a;return c||(()=>1)}o(us,"ExtractSizeAlgorithm");function ls(a,c){dt(a,c);let _=a?.highWaterMark,w=a?.size;return{highWaterMark:_===void 0?void 0:P(_),size:w===void 0?void 0:NA(w,`${c} has member 'size' that`)}}o(ls,"convertQueuingStrategy");function NA(a,c){return mt(a,c),_=>P(a(_))}o(NA,"convertQueuingStrategySize");function zA(a,c){dt(a,c);let _=a?.abort,w=a?.close,A=a?.start,L=a?.type,B=a?.write;return{abort:_===void 0?void 0:UA(_,a,`${c} has member 'abort' that`),close:w===void 0?void 0:MA(w,a,`${c} has member 'close' that`),start:A===void 0?void 0:LA(A,a,`${c} has member 'start' that`),write:B===void 0?void 0:jA(B,a,`${c} has member 'write' that`),type:L}}o(zA,"convertUnderlyingSink");function UA(a,c,_){return mt(a,_),w=>U(a,c,[w])}o(UA,"convertUnderlyingSinkAbortCallback");function MA(a,c,_){return mt(a,_),()=>U(a,c,[])}o(MA,"convertUnderlyingSinkCloseCallback");function LA(a,c,_){return mt(a,_),w=>C(a,c,[w])}o(LA,"convertUnderlyingSinkStartCallback");function jA(a,c,_){return mt(a,_),(w,A)=>U(a,c,[w,A])}o(jA,"convertUnderlyingSinkWriteCallback");function $h(a,c){if(!ko(a))throw new TypeError(`${c} is not a WritableStream.`)}o($h,"assertWritableStream");function FA(a){if(typeof a!="object"||a===null)return!1;try{return typeof a.aborted=="boolean"}catch{return!1}}o(FA,"isAbortSignal");let qA=typeof AbortController=="function";function BA(){if(qA)return new AbortController}o(BA,"createAbortController");class Cn{static{o(this,"WritableStream")}constructor(c={},_={}){c===void 0?c=null:We(c,"First parameter");let w=ls(_,"Second parameter"),A=zA(c,"First parameter");if(Nh(this),A.type!==void 0)throw new RangeError("Invalid type is specified");let B=us(w),se=Di(w,1);nI(this,A,se,B)}get locked(){if(!ko(this))throw hs("locked");return $o(this)}abort(c=void 0){return ko(this)?$o(this)?y(new TypeError("Cannot abort a stream that already has a writer")):ds(this,c):y(hs("abort"))}close(){return ko(this)?$o(this)?y(new TypeError("Cannot close a stream that already has a writer")):Ur(this)?y(new TypeError("Cannot close an already-closing stream")):zh(this):y(hs("close"))}getWriter(){if(!ko(this))throw hs("getWriter");return Dh(this)}}Object.defineProperties(Cn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),i(Cn.prototype.abort,"abort"),i(Cn.prototype.close,"close"),i(Cn.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Cn.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function Dh(a){return new an(a)}o(Dh,"AcquireWritableStreamDefaultWriter");function VA(a,c,_,w,A=1,L=()=>1){let B=Object.create(Cn.prototype);Nh(B);let se=Object.create(Do.prototype);return qh(B,se,a,c,_,w,A,L),B}o(VA,"CreateWritableStream");function Nh(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(Nh,"InitializeWritableStream");function ko(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_writableStreamController")?!1:a instanceof Cn}o(ko,"IsWritableStream");function $o(a){return a._writer!==void 0}o($o,"IsWritableStreamLocked");function ds(a,c){var _;if(a._state==="closed"||a._state==="errored")return h(void 0);a._writableStreamController._abortReason=c,(_=a._writableStreamController._abortController)===null||_===void 0||_.abort(c);let w=a._state;if(w==="closed"||w==="errored")return h(void 0);if(a._pendingAbortRequest!==void 0)return a._pendingAbortRequest._promise;let A=!1;w==="erroring"&&(A=!0,c=void 0);let L=p((B,se)=>{a._pendingAbortRequest={_promise:void 0,_resolve:B,_reject:se,_reason:c,_wasAlreadyErroring:A}});return a._pendingAbortRequest._promise=L,A||ml(a,c),L}o(ds,"WritableStreamAbort");function zh(a){let c=a._state;if(c==="closed"||c==="errored")return y(new TypeError(`The stream (in ${c} state) is not in the writable state and cannot be closed`));let _=p((A,L)=>{let B={_resolve:A,_reject:L};a._closeRequest=B}),w=a._writer;return w!==void 0&&a._backpressure&&c==="writable"&&Sl(w),oI(a._writableStreamController),_}o(zh,"WritableStreamClose");function GA(a){return p((_,w)=>{let A={_resolve:_,_reject:w};a._writeRequests.push(A)})}o(GA,"WritableStreamAddWriteRequest");function fl(a,c){if(a._state==="writable"){ml(a,c);return}hl(a)}o(fl,"WritableStreamDealWithRejection");function ml(a,c){let _=a._writableStreamController;a._state="erroring",a._storedError=c;let w=a._writer;w!==void 0&&Mh(w,c),!JA(a)&&_._started&&hl(a)}o(ml,"WritableStreamStartErroring");function hl(a){a._state="errored",a._writableStreamController[X]();let c=a._storedError;if(a._writeRequests.forEach(A=>{A._reject(c)}),a._writeRequests=new Z,a._pendingAbortRequest===void 0){ps(a);return}let _=a._pendingAbortRequest;if(a._pendingAbortRequest=void 0,_._wasAlreadyErroring){_._reject(c),ps(a);return}let w=a._writableStreamController[G](_._reason);f(w,()=>(_._resolve(),ps(a),null),A=>(_._reject(A),ps(a),null))}o(hl,"WritableStreamFinishErroring");function HA(a){a._inFlightWriteRequest._resolve(void 0),a._inFlightWriteRequest=void 0}o(HA,"WritableStreamFinishInFlightWrite");function WA(a,c){a._inFlightWriteRequest._reject(c),a._inFlightWriteRequest=void 0,fl(a,c)}o(WA,"WritableStreamFinishInFlightWriteWithError");function ZA(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 _=a._writer;_!==void 0&&Hh(_)}o(ZA,"WritableStreamFinishInFlightClose");function KA(a,c){a._inFlightCloseRequest._reject(c),a._inFlightCloseRequest=void 0,a._pendingAbortRequest!==void 0&&(a._pendingAbortRequest._reject(c),a._pendingAbortRequest=void 0),fl(a,c)}o(KA,"WritableStreamFinishInFlightCloseWithError");function Ur(a){return!(a._closeRequest===void 0&&a._inFlightCloseRequest===void 0)}o(Ur,"WritableStreamCloseQueuedOrInFlight");function JA(a){return!(a._inFlightWriteRequest===void 0&&a._inFlightCloseRequest===void 0)}o(JA,"WritableStreamHasOperationMarkedInFlight");function YA(a){a._inFlightCloseRequest=a._closeRequest,a._closeRequest=void 0}o(YA,"WritableStreamMarkCloseRequestInFlight");function XA(a){a._inFlightWriteRequest=a._writeRequests.shift()}o(XA,"WritableStreamMarkFirstWriteRequestInFlight");function ps(a){a._closeRequest!==void 0&&(a._closeRequest._reject(a._storedError),a._closeRequest=void 0);let c=a._writer;c!==void 0&&bl(c,a._storedError)}o(ps,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function gl(a,c){let _=a._writer;_!==void 0&&c!==a._backpressure&&(c?dI(_):Sl(_)),a._backpressure=c}o(gl,"WritableStreamUpdateBackpressure");class an{static{o(this,"WritableStreamDefaultWriter")}constructor(c){if(Ye(c,1,"WritableStreamDefaultWriter"),$h(c,"First parameter"),$o(c))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=c,c._writer=this;let _=c._state;if(_==="writable")!Ur(c)&&c._backpressure?ys(this):Wh(this),gs(this);else if(_==="erroring")El(this,c._storedError),gs(this);else if(_==="closed")Wh(this),uI(this);else{let w=c._storedError;El(this,w),Gh(this,w)}}get closed(){return ao(this)?this._closedPromise:y(so("closed"))}get desiredSize(){if(!ao(this))throw so("desiredSize");if(this._ownerWritableStream===void 0)throw zi("desiredSize");return rI(this)}get ready(){return ao(this)?this._readyPromise:y(so("ready"))}abort(c=void 0){return ao(this)?this._ownerWritableStream===void 0?y(zi("abort")):QA(this,c):y(so("abort"))}close(){if(!ao(this))return y(so("close"));let c=this._ownerWritableStream;return c===void 0?y(zi("close")):Ur(c)?y(new TypeError("Cannot close an already-closing stream")):Uh(this)}releaseLock(){if(!ao(this))throw so("releaseLock");this._ownerWritableStream!==void 0&&Lh(this)}write(c=void 0){return ao(this)?this._ownerWritableStream===void 0?y(zi("write to")):jh(this,c):y(so("write"))}}Object.defineProperties(an.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),i(an.prototype.abort,"abort"),i(an.prototype.close,"close"),i(an.prototype.releaseLock,"releaseLock"),i(an.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(an.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ao(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_ownerWritableStream")?!1:a instanceof an}o(ao,"IsWritableStreamDefaultWriter");function QA(a,c){let _=a._ownerWritableStream;return ds(_,c)}o(QA,"WritableStreamDefaultWriterAbort");function Uh(a){let c=a._ownerWritableStream;return zh(c)}o(Uh,"WritableStreamDefaultWriterClose");function eI(a){let c=a._ownerWritableStream,_=c._state;return Ur(c)||_==="closed"?h(void 0):_==="errored"?y(c._storedError):Uh(a)}o(eI,"WritableStreamDefaultWriterCloseWithErrorPropagation");function tI(a,c){a._closedPromiseState==="pending"?bl(a,c):lI(a,c)}o(tI,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function Mh(a,c){a._readyPromiseState==="pending"?Zh(a,c):pI(a,c)}o(Mh,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function rI(a){let c=a._ownerWritableStream,_=c._state;return _==="errored"||_==="erroring"?null:_==="closed"?0:Bh(c._writableStreamController)}o(rI,"WritableStreamDefaultWriterGetDesiredSize");function Lh(a){let c=a._ownerWritableStream,_=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Mh(a,_),tI(a,_),c._writer=void 0,a._ownerWritableStream=void 0}o(Lh,"WritableStreamDefaultWriterRelease");function jh(a,c){let _=a._ownerWritableStream,w=_._writableStreamController,A=iI(w,c);if(_!==a._ownerWritableStream)return y(zi("write to"));let L=_._state;if(L==="errored")return y(_._storedError);if(Ur(_)||L==="closed")return y(new TypeError("The stream is closing or closed and cannot be written to"));if(L==="erroring")return y(_._storedError);let B=GA(_);return aI(w,c,A),B}o(jh,"WritableStreamDefaultWriterWrite");let Fh={};class Do{static{o(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!yl(this))throw _l("abortReason");return this._abortReason}get signal(){if(!yl(this))throw _l("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(c=void 0){if(!yl(this))throw _l("error");this._controlledWritableStream._state==="writable"&&Vh(this,c)}[G](c){let _=this._abortAlgorithm(c);return fs(this),_}[X](){In(this)}}Object.defineProperties(Do.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Do.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function yl(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledWritableStream")?!1:a instanceof Do}o(yl,"IsWritableStreamDefaultController");function qh(a,c,_,w,A,L,B,se){c._controlledWritableStream=a,a._writableStreamController=c,c._queue=void 0,c._queueTotalSize=void 0,In(c),c._abortReason=void 0,c._abortController=BA(),c._started=!1,c._strategySizeAlgorithm=se,c._strategyHWM=B,c._writeAlgorithm=w,c._closeAlgorithm=A,c._abortAlgorithm=L;let Ee=vl(c);gl(a,Ee);let me=_(),Re=h(me);f(Re,()=>(c._started=!0,ms(c),null),ze=>(c._started=!0,fl(a,ze),null))}o(qh,"SetUpWritableStreamDefaultController");function nI(a,c,_,w){let A=Object.create(Do.prototype),L,B,se,Ee;c.start!==void 0?L=o(()=>c.start(A),"startAlgorithm"):L=o(()=>{},"startAlgorithm"),c.write!==void 0?B=o(me=>c.write(me,A),"writeAlgorithm"):B=o(()=>h(void 0),"writeAlgorithm"),c.close!==void 0?se=o(()=>c.close(),"closeAlgorithm"):se=o(()=>h(void 0),"closeAlgorithm"),c.abort!==void 0?Ee=o(me=>c.abort(me),"abortAlgorithm"):Ee=o(()=>h(void 0),"abortAlgorithm"),qh(a,A,L,B,se,Ee,_,w)}o(nI,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function fs(a){a._writeAlgorithm=void 0,a._closeAlgorithm=void 0,a._abortAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(fs,"WritableStreamDefaultControllerClearAlgorithms");function oI(a){il(a,Fh,0),ms(a)}o(oI,"WritableStreamDefaultControllerClose");function iI(a,c){try{return a._strategySizeAlgorithm(c)}catch(_){return Ni(a,_),1}}o(iI,"WritableStreamDefaultControllerGetChunkSize");function Bh(a){return a._strategyHWM-a._queueTotalSize}o(Bh,"WritableStreamDefaultControllerGetDesiredSize");function aI(a,c,_){try{il(a,c,_)}catch(A){Ni(a,A);return}let w=a._controlledWritableStream;if(!Ur(w)&&w._state==="writable"){let A=vl(a);gl(w,A)}ms(a)}o(aI,"WritableStreamDefaultControllerWrite");function ms(a){let c=a._controlledWritableStream;if(!a._started||c._inFlightWriteRequest!==void 0)return;if(c._state==="erroring"){hl(c);return}if(a._queue.length===0)return;let w=bA(a);w===Fh?sI(a):cI(a,w)}o(ms,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function Ni(a,c){a._controlledWritableStream._state==="writable"&&Vh(a,c)}o(Ni,"WritableStreamDefaultControllerErrorIfNeeded");function sI(a){let c=a._controlledWritableStream;YA(c),ol(a);let _=a._closeAlgorithm();fs(a),f(_,()=>(ZA(c),null),w=>(KA(c,w),null))}o(sI,"WritableStreamDefaultControllerProcessClose");function cI(a,c){let _=a._controlledWritableStream;XA(_);let w=a._writeAlgorithm(c);f(w,()=>{HA(_);let A=_._state;if(ol(a),!Ur(_)&&A==="writable"){let L=vl(a);gl(_,L)}return ms(a),null},A=>(_._state==="writable"&&fs(a),WA(_,A),null))}o(cI,"WritableStreamDefaultControllerProcessWrite");function vl(a){return Bh(a)<=0}o(vl,"WritableStreamDefaultControllerGetBackpressure");function Vh(a,c){let _=a._controlledWritableStream;fs(a),ml(_,c)}o(Vh,"WritableStreamDefaultControllerError");function hs(a){return new TypeError(`WritableStream.prototype.${a} can only be used on a WritableStream`)}o(hs,"streamBrandCheckException$2");function _l(a){return new TypeError(`WritableStreamDefaultController.prototype.${a} can only be used on a WritableStreamDefaultController`)}o(_l,"defaultControllerBrandCheckException$2");function so(a){return new TypeError(`WritableStreamDefaultWriter.prototype.${a} can only be used on a WritableStreamDefaultWriter`)}o(so,"defaultWriterBrandCheckException");function zi(a){return new TypeError("Cannot "+a+" a stream using a released writer")}o(zi,"defaultWriterLockException");function gs(a){a._closedPromise=p((c,_)=>{a._closedPromise_resolve=c,a._closedPromise_reject=_,a._closedPromiseState="pending"})}o(gs,"defaultWriterClosedPromiseInitialize");function Gh(a,c){gs(a),bl(a,c)}o(Gh,"defaultWriterClosedPromiseInitializeAsRejected");function uI(a){gs(a),Hh(a)}o(uI,"defaultWriterClosedPromiseInitializeAsResolved");function bl(a,c){a._closedPromise_reject!==void 0&&(E(a._closedPromise),a._closedPromise_reject(c),a._closedPromise_resolve=void 0,a._closedPromise_reject=void 0,a._closedPromiseState="rejected")}o(bl,"defaultWriterClosedPromiseReject");function lI(a,c){Gh(a,c)}o(lI,"defaultWriterClosedPromiseResetToRejected");function Hh(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(Hh,"defaultWriterClosedPromiseResolve");function ys(a){a._readyPromise=p((c,_)=>{a._readyPromise_resolve=c,a._readyPromise_reject=_}),a._readyPromiseState="pending"}o(ys,"defaultWriterReadyPromiseInitialize");function El(a,c){ys(a),Zh(a,c)}o(El,"defaultWriterReadyPromiseInitializeAsRejected");function Wh(a){ys(a),Sl(a)}o(Wh,"defaultWriterReadyPromiseInitializeAsResolved");function Zh(a,c){a._readyPromise_reject!==void 0&&(E(a._readyPromise),a._readyPromise_reject(c),a._readyPromise_resolve=void 0,a._readyPromise_reject=void 0,a._readyPromiseState="rejected")}o(Zh,"defaultWriterReadyPromiseReject");function dI(a){ys(a)}o(dI,"defaultWriterReadyPromiseReset");function pI(a,c){El(a,c)}o(pI,"defaultWriterReadyPromiseResetToRejected");function Sl(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(Sl,"defaultWriterReadyPromiseResolve");function fI(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}o(fI,"getGlobals");let Tl=fI();function mI(a){if(!(typeof a=="function"||typeof a=="object")||a.name!=="DOMException")return!1;try{return new a,!0}catch{return!1}}o(mI,"isDOMExceptionConstructor");function hI(){let a=Tl?.DOMException;return mI(a)?a:void 0}o(hI,"getFromGlobal");function gI(){let a=o(function(_,w){this.message=_||"",this.name=w||"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(gI,"createPolyfill");let yI=hI()||gI();function Kh(a,c,_,w,A,L){let B=j(a),se=Dh(c);a._disturbed=!0;let Ee=!1,me=h(void 0);return p((Re,ze)=>{let tt;if(L!==void 0){if(tt=o(()=>{let ge=L.reason!==void 0?L.reason:new yI("Aborted","AbortError"),Le=[];w||Le.push(()=>c._state==="writable"?ds(c,ge):h(void 0)),A||Le.push(()=>a._state==="readable"?wr(a,ge):h(void 0)),Mt(()=>Promise.all(Le.map(nt=>nt())),!0,ge)},"abortAlgorithm"),L.aborted){tt();return}L.addEventListener("abort",tt)}function Pr(){return p((ge,Le)=>{function nt(Zt){Zt?ge():m(Mo(),nt,Le)}o(nt,"next"),nt(!1)})}o(Pr,"pipeLoop");function Mo(){return Ee?h(!0):m(se._readyPromise,()=>p((ge,Le)=>{pe(B,{_chunkSteps:o(nt=>{me=m(jh(se,nt),void 0,e),ge(!1)},"_chunkSteps"),_closeSteps:o(()=>ge(!0),"_closeSteps"),_errorSteps:Le})}))}if(o(Mo,"pipeStep"),cn(a,B._closedPromise,ge=>(w?lr(!0,ge):Mt(()=>ds(c,ge),!0,ge),null)),cn(c,se._closedPromise,ge=>(A?lr(!0,ge):Mt(()=>wr(a,ge),!0,ge),null)),Nt(a,B._closedPromise,()=>(_?lr():Mt(()=>eI(se)),null)),Ur(c)||c._state==="closed"){let ge=new TypeError("the destination writable stream closed before all data could be piped to it");A?lr(!0,ge):Mt(()=>wr(a,ge),!0,ge)}E(Pr());function Dn(){let ge=me;return m(me,()=>ge!==me?Dn():void 0)}o(Dn,"waitForWritesToFinish");function cn(ge,Le,nt){ge._state==="errored"?nt(ge._storedError):g(Le,nt)}o(cn,"isOrBecomesErrored");function Nt(ge,Le,nt){ge._state==="closed"?nt():l(Le,nt)}o(Nt,"isOrBecomesClosed");function Mt(ge,Le,nt){if(Ee)return;Ee=!0,c._state==="writable"&&!Ur(c)?l(Dn(),Zt):Zt();function Zt(){return f(ge(),()=>un(Le,nt),Lo=>un(!0,Lo)),null}o(Zt,"doTheRest")}o(Mt,"shutdownWithAction");function lr(ge,Le){Ee||(Ee=!0,c._state==="writable"&&!Ur(c)?l(Dn(),()=>un(ge,Le)):un(ge,Le))}o(lr,"shutdown");function un(ge,Le){return Lh(se),V(B),L!==void 0&&L.removeEventListener("abort",tt),ge?ze(Le):Re(void 0),null}o(un,"finalize")})}o(Kh,"ReadableStreamPipeTo");class sn{static{o(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!vs(this))throw bs("desiredSize");return wl(this)}close(){if(!vs(this))throw bs("close");if(!zo(this))throw new TypeError("The stream is not in a state that permits close");co(this)}enqueue(c=void 0){if(!vs(this))throw bs("enqueue");if(!zo(this))throw new TypeError("The stream is not in a state that permits enqueue");return No(this,c)}error(c=void 0){if(!vs(this))throw bs("error");Tr(this,c)}[te](c){In(this);let _=this._cancelAlgorithm(c);return _s(this),_}[J](c){let _=this._controlledReadableStream;if(this._queue.length>0){let w=ol(this);this._closeRequested&&this._queue.length===0?(_s(this),Li(_)):Ui(this),c._chunkSteps(w)}else I(_,c),Ui(this)}[De](){}}Object.defineProperties(sn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),i(sn.prototype.close,"close"),i(sn.prototype.enqueue,"enqueue"),i(sn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(sn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function vs(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledReadableStream")?!1:a instanceof sn}o(vs,"IsReadableStreamDefaultController");function Ui(a){if(!Jh(a))return;if(a._pulling){a._pullAgain=!0;return}a._pulling=!0;let _=a._pullAlgorithm();f(_,()=>(a._pulling=!1,a._pullAgain&&(a._pullAgain=!1,Ui(a)),null),w=>(Tr(a,w),null))}o(Ui,"ReadableStreamDefaultControllerCallPullIfNeeded");function Jh(a){let c=a._controlledReadableStream;return!zo(a)||!a._started?!1:!!(kn(c)&&M(c)>0||wl(a)>0)}o(Jh,"ReadableStreamDefaultControllerShouldCallPull");function _s(a){a._pullAlgorithm=void 0,a._cancelAlgorithm=void 0,a._strategySizeAlgorithm=void 0}o(_s,"ReadableStreamDefaultControllerClearAlgorithms");function co(a){if(!zo(a))return;let c=a._controlledReadableStream;a._closeRequested=!0,a._queue.length===0&&(_s(a),Li(c))}o(co,"ReadableStreamDefaultControllerClose");function No(a,c){if(!zo(a))return;let _=a._controlledReadableStream;if(kn(_)&&M(_)>0)k(_,c,!1);else{let w;try{w=a._strategySizeAlgorithm(c)}catch(A){throw Tr(a,A),A}try{il(a,c,w)}catch(A){throw Tr(a,A),A}}Ui(a)}o(No,"ReadableStreamDefaultControllerEnqueue");function Tr(a,c){let _=a._controlledReadableStream;_._state==="readable"&&(In(a),_s(a),eg(_,c))}o(Tr,"ReadableStreamDefaultControllerError");function wl(a){let c=a._controlledReadableStream._state;return c==="errored"?null:c==="closed"?0:a._strategyHWM-a._queueTotalSize}o(wl,"ReadableStreamDefaultControllerGetDesiredSize");function vI(a){return!Jh(a)}o(vI,"ReadableStreamDefaultControllerHasBackpressure");function zo(a){let c=a._controlledReadableStream._state;return!a._closeRequested&&c==="readable"}o(zo,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function Yh(a,c,_,w,A,L,B){c._controlledReadableStream=a,c._queue=void 0,c._queueTotalSize=void 0,In(c),c._started=!1,c._closeRequested=!1,c._pullAgain=!1,c._pulling=!1,c._strategySizeAlgorithm=B,c._strategyHWM=L,c._pullAlgorithm=w,c._cancelAlgorithm=A,a._readableStreamController=c;let se=_();f(h(se),()=>(c._started=!0,Ui(c),null),Ee=>(Tr(c,Ee),null))}o(Yh,"SetUpReadableStreamDefaultController");function _I(a,c,_,w){let A=Object.create(sn.prototype),L,B,se;c.start!==void 0?L=o(()=>c.start(A),"startAlgorithm"):L=o(()=>{},"startAlgorithm"),c.pull!==void 0?B=o(()=>c.pull(A),"pullAlgorithm"):B=o(()=>h(void 0),"pullAlgorithm"),c.cancel!==void 0?se=o(Ee=>c.cancel(Ee),"cancelAlgorithm"):se=o(()=>h(void 0),"cancelAlgorithm"),Yh(a,A,L,B,se,_,w)}o(_I,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function bs(a){return new TypeError(`ReadableStreamDefaultController.prototype.${a} can only be used on a ReadableStreamDefaultController`)}o(bs,"defaultControllerBrandCheckException$1");function bI(a,c){return no(a._readableStreamController)?SI(a):EI(a)}o(bI,"ReadableStreamTee");function EI(a,c){let _=j(a),w=!1,A=!1,L=!1,B=!1,se,Ee,me,Re,ze,tt=p(Nt=>{ze=Nt});function Pr(){return w?(A=!0,h(void 0)):(w=!0,pe(_,{_chunkSteps:o(Mt=>{b(()=>{A=!1;let lr=Mt,un=Mt;L||No(me._readableStreamController,lr),B||No(Re._readableStreamController,un),w=!1,A&&Pr()})},"_chunkSteps"),_closeSteps:o(()=>{w=!1,L||co(me._readableStreamController),B||co(Re._readableStreamController),(!L||!B)&&ze(void 0)},"_closeSteps"),_errorSteps:o(()=>{w=!1},"_errorSteps")}),h(void 0))}o(Pr,"pullAlgorithm");function Mo(Nt){if(L=!0,se=Nt,B){let Mt=Xe([se,Ee]),lr=wr(a,Mt);ze(lr)}return tt}o(Mo,"cancel1Algorithm");function Dn(Nt){if(B=!0,Ee=Nt,L){let Mt=Xe([se,Ee]),lr=wr(a,Mt);ze(lr)}return tt}o(Dn,"cancel2Algorithm");function cn(){}return o(cn,"startAlgorithm"),me=Mi(cn,Pr,Mo),Re=Mi(cn,Pr,Dn),g(_._closedPromise,Nt=>(Tr(me._readableStreamController,Nt),Tr(Re._readableStreamController,Nt),(!L||!B)&&ze(void 0),null)),[me,Re]}o(EI,"ReadableStreamDefaultTee");function SI(a){let c=j(a),_=!1,w=!1,A=!1,L=!1,B=!1,se,Ee,me,Re,ze,tt=p(ge=>{ze=ge});function Pr(ge){g(ge._closedPromise,Le=>(ge!==c||(ur(me._readableStreamController,Le),ur(Re._readableStreamController,Le),(!L||!B)&&ze(void 0)),null))}o(Pr,"forwardReaderError");function Mo(){io(c)&&(V(c),c=j(a),Pr(c)),pe(c,{_chunkSteps:o(Le=>{b(()=>{w=!1,A=!1;let nt=Le,Zt=Le;if(!L&&!B)try{Zt=hh(Le)}catch(Lo){ur(me._readableStreamController,Lo),ur(Re._readableStreamController,Lo),ze(wr(a,Lo));return}L||is(me._readableStreamController,nt),B||is(Re._readableStreamController,Zt),_=!1,w?cn():A&&Nt()})},"_chunkSteps"),_closeSteps:o(()=>{_=!1,L||ki(me._readableStreamController),B||ki(Re._readableStreamController),me._readableStreamController._pendingPullIntos.length>0&&as(me._readableStreamController,0),Re._readableStreamController._pendingPullIntos.length>0&&as(Re._readableStreamController,0),(!L||!B)&&ze(void 0)},"_closeSteps"),_errorSteps:o(()=>{_=!1},"_errorSteps")})}o(Mo,"pullWithDefaultReader");function Dn(ge,Le){ue(c)&&(V(c),c=Ih(a),Pr(c));let nt=Le?Re:me,Zt=Le?me:Re;Oh(c,ge,1,{_chunkSteps:o(jo=>{b(()=>{w=!1,A=!1;let Fo=Le?B:L;if(Le?L:B)Fo||ss(nt._readableStreamController,jo);else{let fg;try{fg=hh(jo)}catch(Rl){ur(nt._readableStreamController,Rl),ur(Zt._readableStreamController,Rl),ze(wr(a,Rl));return}Fo||ss(nt._readableStreamController,jo),is(Zt._readableStreamController,fg)}_=!1,w?cn():A&&Nt()})},"_chunkSteps"),_closeSteps:o(jo=>{_=!1;let Fo=Le?B:L,Is=Le?L:B;Fo||ki(nt._readableStreamController),Is||ki(Zt._readableStreamController),jo!==void 0&&(Fo||ss(nt._readableStreamController,jo),!Is&&Zt._readableStreamController._pendingPullIntos.length>0&&as(Zt._readableStreamController,0)),(!Fo||!Is)&&ze(void 0)},"_closeSteps"),_errorSteps:o(()=>{_=!1},"_errorSteps")})}o(Dn,"pullWithBYOBReader");function cn(){if(_)return w=!0,h(void 0);_=!0;let ge=ll(me._readableStreamController);return ge===null?Mo():Dn(ge._view,!1),h(void 0)}o(cn,"pull1Algorithm");function Nt(){if(_)return A=!0,h(void 0);_=!0;let ge=ll(Re._readableStreamController);return ge===null?Mo():Dn(ge._view,!0),h(void 0)}o(Nt,"pull2Algorithm");function Mt(ge){if(L=!0,se=ge,B){let Le=Xe([se,Ee]),nt=wr(a,Le);ze(nt)}return tt}o(Mt,"cancel1Algorithm");function lr(ge){if(B=!0,Ee=ge,L){let Le=Xe([se,Ee]),nt=wr(a,Le);ze(nt)}return tt}o(lr,"cancel2Algorithm");function un(){}return o(un,"startAlgorithm"),me=Qh(un,cn,Mt),Re=Qh(un,Nt,lr),Pr(c),[me,Re]}o(SI,"ReadableByteStreamTee");function TI(a){return r(a)&&typeof a.getReader<"u"}o(TI,"isReadableStreamLike");function wI(a){return TI(a)?xI(a.getReader()):PI(a)}o(wI,"ReadableStreamFrom");function PI(a){let c,_=mh(a,"async"),w=e;function A(){let B;try{B=gA(_)}catch(Ee){return y(Ee)}let se=h(B);return v(se,Ee=>{if(!r(Ee))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(yA(Ee))co(c._readableStreamController);else{let Re=vA(Ee);No(c._readableStreamController,Re)}})}o(A,"pullAlgorithm");function L(B){let se=_.iterator,Ee;try{Ee=rs(se,"return")}catch(ze){return y(ze)}if(Ee===void 0)return h(void 0);let me;try{me=C(Ee,se,[B])}catch(ze){return y(ze)}let Re=h(me);return v(Re,ze=>{if(!r(ze))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return o(L,"cancelAlgorithm"),c=Mi(w,A,L,0),c}o(PI,"ReadableStreamFromIterable");function xI(a){let c,_=e;function w(){let L;try{L=a.read()}catch(B){return y(B)}return v(L,B=>{if(!r(B))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(B.done)co(c._readableStreamController);else{let se=B.value;No(c._readableStreamController,se)}})}o(w,"pullAlgorithm");function A(L){try{return h(a.cancel(L))}catch(B){return y(B)}}return o(A,"cancelAlgorithm"),c=Mi(_,w,A,0),c}o(xI,"ReadableStreamFromDefaultReader");function AI(a,c){dt(a,c);let _=a,w=_?.autoAllocateChunkSize,A=_?.cancel,L=_?.pull,B=_?.start,se=_?.type;return{autoAllocateChunkSize:w===void 0?void 0:R(w,`${c} has member 'autoAllocateChunkSize' that`),cancel:A===void 0?void 0:II(A,_,`${c} has member 'cancel' that`),pull:L===void 0?void 0:RI(L,_,`${c} has member 'pull' that`),start:B===void 0?void 0:CI(B,_,`${c} has member 'start' that`),type:se===void 0?void 0:OI(se,`${c} has member 'type' that`)}}o(AI,"convertUnderlyingDefaultOrByteSource");function II(a,c,_){return mt(a,_),w=>U(a,c,[w])}o(II,"convertUnderlyingSourceCancelCallback");function RI(a,c,_){return mt(a,_),w=>U(a,c,[w])}o(RI,"convertUnderlyingSourcePullCallback");function CI(a,c,_){return mt(a,_),w=>C(a,c,[w])}o(CI,"convertUnderlyingSourceStartCallback");function OI(a,c){if(a=`${a}`,a!=="bytes")throw new TypeError(`${c} '${a}' is not a valid enumeration value for ReadableStreamType`);return a}o(OI,"convertReadableStreamType");function kI(a,c){return dt(a,c),{preventCancel:!!a?.preventCancel}}o(kI,"convertIteratorOptions");function Xh(a,c){dt(a,c);let _=a?.preventAbort,w=a?.preventCancel,A=a?.preventClose,L=a?.signal;return L!==void 0&&$I(L,`${c} has member 'signal' that`),{preventAbort:!!_,preventCancel:!!w,preventClose:!!A,signal:L}}o(Xh,"convertPipeOptions");function $I(a,c){if(!FA(a))throw new TypeError(`${c} is not an AbortSignal.`)}o($I,"assertAbortSignal");function DI(a,c){dt(a,c);let _=a?.readable;T(_,"readable","ReadableWritablePair"),$(_,`${c} has member 'readable' that`);let w=a?.writable;return T(w,"writable","ReadableWritablePair"),$h(w,`${c} has member 'writable' that`),{readable:_,writable:w}}o(DI,"convertReadableWritablePair");class Ot{static{o(this,"ReadableStream")}constructor(c={},_={}){c===void 0?c=null:We(c,"First parameter");let w=ls(_,"Second parameter"),A=AI(c,"First parameter");if(Pl(this),A.type==="bytes"){if(w.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let L=Di(w,0);IA(this,A,L)}else{let L=us(w),B=Di(w,1);_I(this,A,B,L)}}get locked(){if(!On(this))throw uo("locked");return kn(this)}cancel(c=void 0){return On(this)?kn(this)?y(new TypeError("Cannot cancel a stream that already has a reader")):wr(this,c):y(uo("cancel"))}getReader(c=void 0){if(!On(this))throw uo("getReader");return CA(c,"First parameter").mode===void 0?j(this):Ih(this)}pipeThrough(c,_={}){if(!On(this))throw uo("pipeThrough");Ye(c,1,"pipeThrough");let w=DI(c,"First parameter"),A=Xh(_,"Second parameter");if(kn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if($o(w.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let L=Kh(this,w.writable,A.preventClose,A.preventAbort,A.preventCancel,A.signal);return E(L),w.readable}pipeTo(c,_={}){if(!On(this))return y(uo("pipeTo"));if(c===void 0)return y("Parameter 1 is required in 'pipeTo'.");if(!ko(c))return y(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let w;try{w=Xh(_,"Second parameter")}catch(A){return y(A)}return kn(this)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):$o(c)?y(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Kh(this,c,w.preventClose,w.preventAbort,w.preventCancel,w.signal)}tee(){if(!On(this))throw uo("tee");let c=bI(this);return Xe(c)}values(c=void 0){if(!On(this))throw uo("values");let _=kI(c,"First parameter");return Io(this,_.preventCancel)}[nl](c){return this.values(c)}static from(c){return wI(c)}}Object.defineProperties(Ot,{from:{enumerable:!0}}),Object.defineProperties(Ot.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),i(Ot.from,"from"),i(Ot.prototype.cancel,"cancel"),i(Ot.prototype.getReader,"getReader"),i(Ot.prototype.pipeThrough,"pipeThrough"),i(Ot.prototype.pipeTo,"pipeTo"),i(Ot.prototype.tee,"tee"),i(Ot.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ot.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Ot.prototype,nl,{value:Ot.prototype.values,writable:!0,configurable:!0});function Mi(a,c,_,w=1,A=()=>1){let L=Object.create(Ot.prototype);Pl(L);let B=Object.create(sn.prototype);return Yh(L,B,a,c,_,w,A),L}o(Mi,"CreateReadableStream");function Qh(a,c,_){let w=Object.create(Ot.prototype);Pl(w);let A=Object.create(on.prototype);return Ah(w,A,a,c,_,0,void 0),w}o(Qh,"CreateReadableByteStream");function Pl(a){a._state="readable",a._reader=void 0,a._storedError=void 0,a._disturbed=!1}o(Pl,"InitializeReadableStream");function On(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_readableStreamController")?!1:a instanceof Ot}o(On,"IsReadableStream");function kn(a){return a._reader!==void 0}o(kn,"IsReadableStreamLocked");function wr(a,c){if(a._disturbed=!0,a._state==="closed")return h(void 0);if(a._state==="errored")return y(a._storedError);Li(a);let _=a._reader;if(_!==void 0&&io(_)){let A=_._readIntoRequests;_._readIntoRequests=new Z,A.forEach(L=>{L._closeSteps(void 0)})}let w=a._readableStreamController[te](c);return v(w,e)}o(wr,"ReadableStreamCancel");function Li(a){a._state="closed";let c=a._reader;if(c!==void 0&&(Ke(c),ue(c))){let _=c._readRequests;c._readRequests=new Z,_.forEach(w=>{w._closeSteps()})}}o(Li,"ReadableStreamClose");function eg(a,c){a._state="errored",a._storedError=c;let _=a._reader;_!==void 0&&(ke(_,c),ue(_)?it(_,c):kh(_,c))}o(eg,"ReadableStreamError");function uo(a){return new TypeError(`ReadableStream.prototype.${a} can only be used on a ReadableStream`)}o(uo,"streamBrandCheckException$1");function tg(a,c){dt(a,c);let _=a?.highWaterMark;return T(_,"highWaterMark","QueuingStrategyInit"),{highWaterMark:P(_)}}o(tg,"convertQueuingStrategyInit");let rg=o(a=>a.byteLength,"byteLengthSizeFunction");i(rg,"size");class Es{static{o(this,"ByteLengthQueuingStrategy")}constructor(c){Ye(c,1,"ByteLengthQueuingStrategy"),c=tg(c,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=c.highWaterMark}get highWaterMark(){if(!og(this))throw ng("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!og(this))throw ng("size");return rg}}Object.defineProperties(Es.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Es.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ng(a){return new TypeError(`ByteLengthQueuingStrategy.prototype.${a} can only be used on a ByteLengthQueuingStrategy`)}o(ng,"byteLengthBrandCheckException");function og(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_byteLengthQueuingStrategyHighWaterMark")?!1:a instanceof Es}o(og,"IsByteLengthQueuingStrategy");let ig=o(()=>1,"countSizeFunction");i(ig,"size");class Ss{static{o(this,"CountQueuingStrategy")}constructor(c){Ye(c,1,"CountQueuingStrategy"),c=tg(c,"First parameter"),this._countQueuingStrategyHighWaterMark=c.highWaterMark}get highWaterMark(){if(!sg(this))throw ag("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!sg(this))throw ag("size");return ig}}Object.defineProperties(Ss.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ss.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function ag(a){return new TypeError(`CountQueuingStrategy.prototype.${a} can only be used on a CountQueuingStrategy`)}o(ag,"countBrandCheckException");function sg(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_countQueuingStrategyHighWaterMark")?!1:a instanceof Ss}o(sg,"IsCountQueuingStrategy");function NI(a,c){dt(a,c);let _=a?.cancel,w=a?.flush,A=a?.readableType,L=a?.start,B=a?.transform,se=a?.writableType;return{cancel:_===void 0?void 0:LI(_,a,`${c} has member 'cancel' that`),flush:w===void 0?void 0:zI(w,a,`${c} has member 'flush' that`),readableType:A,start:L===void 0?void 0:UI(L,a,`${c} has member 'start' that`),transform:B===void 0?void 0:MI(B,a,`${c} has member 'transform' that`),writableType:se}}o(NI,"convertTransformer");function zI(a,c,_){return mt(a,_),w=>U(a,c,[w])}o(zI,"convertTransformerFlushCallback");function UI(a,c,_){return mt(a,_),w=>C(a,c,[w])}o(UI,"convertTransformerStartCallback");function MI(a,c,_){return mt(a,_),(w,A)=>U(a,c,[w,A])}o(MI,"convertTransformerTransformCallback");function LI(a,c,_){return mt(a,_),w=>U(a,c,[w])}o(LI,"convertTransformerCancelCallback");class Ts{static{o(this,"TransformStream")}constructor(c={},_={},w={}){c===void 0&&(c=null);let A=ls(_,"Second parameter"),L=ls(w,"Third parameter"),B=NI(c,"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 se=Di(L,0),Ee=us(L),me=Di(A,1),Re=us(A),ze,tt=p(Pr=>{ze=Pr});jI(this,tt,me,Re,se,Ee),qI(this,B),B.start!==void 0?ze(B.start(this._transformStreamController)):ze(void 0)}get readable(){if(!cg(this))throw pg("readable");return this._readable}get writable(){if(!cg(this))throw pg("writable");return this._writable}}Object.defineProperties(Ts.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ts.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function jI(a,c,_,w,A,L){function B(){return c}o(B,"startAlgorithm");function se(tt){return GI(a,tt)}o(se,"writeAlgorithm");function Ee(tt){return HI(a,tt)}o(Ee,"abortAlgorithm");function me(){return WI(a)}o(me,"closeAlgorithm"),a._writable=VA(B,se,me,Ee,_,w);function Re(){return ZI(a)}o(Re,"pullAlgorithm");function ze(tt){return KI(a,tt)}o(ze,"cancelAlgorithm"),a._readable=Mi(B,Re,ze,A,L),a._backpressure=void 0,a._backpressureChangePromise=void 0,a._backpressureChangePromise_resolve=void 0,ws(a,!0),a._transformStreamController=void 0}o(jI,"InitializeTransformStream");function cg(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_transformStreamController")?!1:a instanceof Ts}o(cg,"IsTransformStream");function ug(a,c){Tr(a._readable._readableStreamController,c),xl(a,c)}o(ug,"TransformStreamError");function xl(a,c){xs(a._transformStreamController),Ni(a._writable._writableStreamController,c),Al(a)}o(xl,"TransformStreamErrorWritableAndUnblockWrite");function Al(a){a._backpressure&&ws(a,!1)}o(Al,"TransformStreamUnblockWrite");function ws(a,c){a._backpressureChangePromise!==void 0&&a._backpressureChangePromise_resolve(),a._backpressureChangePromise=p(_=>{a._backpressureChangePromise_resolve=_}),a._backpressure=c}o(ws,"TransformStreamSetBackpressure");class $n{static{o(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ps(this))throw As("desiredSize");let c=this._controlledTransformStream._readable._readableStreamController;return wl(c)}enqueue(c=void 0){if(!Ps(this))throw As("enqueue");lg(this,c)}error(c=void 0){if(!Ps(this))throw As("error");BI(this,c)}terminate(){if(!Ps(this))throw As("terminate");VI(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 Ps(a){return!r(a)||!Object.prototype.hasOwnProperty.call(a,"_controlledTransformStream")?!1:a instanceof $n}o(Ps,"IsTransformStreamDefaultController");function FI(a,c,_,w,A){c._controlledTransformStream=a,a._transformStreamController=c,c._transformAlgorithm=_,c._flushAlgorithm=w,c._cancelAlgorithm=A,c._finishPromise=void 0,c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0}o(FI,"SetUpTransformStreamDefaultController");function qI(a,c){let _=Object.create($n.prototype),w,A,L;c.transform!==void 0?w=o(B=>c.transform(B,_),"transformAlgorithm"):w=o(B=>{try{return lg(_,B),h(void 0)}catch(se){return y(se)}},"transformAlgorithm"),c.flush!==void 0?A=o(()=>c.flush(_),"flushAlgorithm"):A=o(()=>h(void 0),"flushAlgorithm"),c.cancel!==void 0?L=o(B=>c.cancel(B),"cancelAlgorithm"):L=o(()=>h(void 0),"cancelAlgorithm"),FI(a,_,w,A,L)}o(qI,"SetUpTransformStreamDefaultControllerFromTransformer");function xs(a){a._transformAlgorithm=void 0,a._flushAlgorithm=void 0,a._cancelAlgorithm=void 0}o(xs,"TransformStreamDefaultControllerClearAlgorithms");function lg(a,c){let _=a._controlledTransformStream,w=_._readable._readableStreamController;if(!zo(w))throw new TypeError("Readable side is not in a state that permits enqueue");try{No(w,c)}catch(L){throw xl(_,L),_._readable._storedError}vI(w)!==_._backpressure&&ws(_,!0)}o(lg,"TransformStreamDefaultControllerEnqueue");function BI(a,c){ug(a._controlledTransformStream,c)}o(BI,"TransformStreamDefaultControllerError");function dg(a,c){let _=a._transformAlgorithm(c);return v(_,void 0,w=>{throw ug(a._controlledTransformStream,w),w})}o(dg,"TransformStreamDefaultControllerPerformTransform");function VI(a){let c=a._controlledTransformStream,_=c._readable._readableStreamController;co(_);let w=new TypeError("TransformStream terminated");xl(c,w)}o(VI,"TransformStreamDefaultControllerTerminate");function GI(a,c){let _=a._transformStreamController;if(a._backpressure){let w=a._backpressureChangePromise;return v(w,()=>{let A=a._writable;if(A._state==="erroring")throw A._storedError;return dg(_,c)})}return dg(_,c)}o(GI,"TransformStreamDefaultSinkWriteAlgorithm");function HI(a,c){let _=a._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let w=a._readable;_._finishPromise=p((L,B)=>{_._finishPromise_resolve=L,_._finishPromise_reject=B});let A=_._cancelAlgorithm(c);return xs(_),f(A,()=>(w._state==="errored"?Uo(_,w._storedError):(Tr(w._readableStreamController,c),Il(_)),null),L=>(Tr(w._readableStreamController,L),Uo(_,L),null)),_._finishPromise}o(HI,"TransformStreamDefaultSinkAbortAlgorithm");function WI(a){let c=a._transformStreamController;if(c._finishPromise!==void 0)return c._finishPromise;let _=a._readable;c._finishPromise=p((A,L)=>{c._finishPromise_resolve=A,c._finishPromise_reject=L});let w=c._flushAlgorithm();return xs(c),f(w,()=>(_._state==="errored"?Uo(c,_._storedError):(co(_._readableStreamController),Il(c)),null),A=>(Tr(_._readableStreamController,A),Uo(c,A),null)),c._finishPromise}o(WI,"TransformStreamDefaultSinkCloseAlgorithm");function ZI(a){return ws(a,!1),a._backpressureChangePromise}o(ZI,"TransformStreamDefaultSourcePullAlgorithm");function KI(a,c){let _=a._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let w=a._writable;_._finishPromise=p((L,B)=>{_._finishPromise_resolve=L,_._finishPromise_reject=B});let A=_._cancelAlgorithm(c);return xs(_),f(A,()=>(w._state==="errored"?Uo(_,w._storedError):(Ni(w._writableStreamController,c),Al(a),Il(_)),null),L=>(Ni(w._writableStreamController,L),Al(a),Uo(_,L),null)),_._finishPromise}o(KI,"TransformStreamDefaultSourceCancelAlgorithm");function As(a){return new TypeError(`TransformStreamDefaultController.prototype.${a} can only be used on a TransformStreamDefaultController`)}o(As,"defaultControllerBrandCheckException");function Il(a){a._finishPromise_resolve!==void 0&&(a._finishPromise_resolve(),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(Il,"defaultControllerFinishPromiseResolve");function Uo(a,c){a._finishPromise_reject!==void 0&&(E(a._finishPromise),a._finishPromise_reject(c),a._finishPromise_resolve=void 0,a._finishPromise_reject=void 0)}o(Uo,"defaultControllerFinishPromiseReject");function pg(a){return new TypeError(`TransformStream.prototype.${a} can only be used on a TransformStream`)}o(pg,"streamBrandCheckException"),t.ByteLengthQueuingStrategy=Es,t.CountQueuingStrategy=Ss,t.ReadableByteStreamController=on,t.ReadableStream=Ot,t.ReadableStreamBYOBReader=Rn,t.ReadableStreamBYOBRequest=ro,t.ReadableStreamDefaultController=sn,t.ReadableStreamDefaultReader=W,t.TransformStream=Ts,t.TransformStreamDefaultController=$n,t.WritableStream=Cn,t.WritableStreamDefaultController=Do,t.WritableStreamDefaultWriter=an}))});var jE=D(()=>{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,LE())}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*Xd(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,FE),u=r.buffer.slice(n,n+s);n+=u.byteLength,yield new Uint8Array(u)}}else yield r;else{let n=0,i=r;for(;n!==i.size;){let u=await i.slice(n,Math.min(i.size,n+FE)).arrayBuffer();n+=u.byteLength,yield new Uint8Array(u)}}}var pY,FE,qE,C$,Ir,ha=wt(()=>{pY=Be(jE(),1);FE=65536;o(Xd,"toIterator");qE=class Qd{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 u;ArrayBuffer.isView(s)?u=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?u=new Uint8Array(s.slice(0)):s instanceof Qd?u=s:u=n.encode(`${s}`),this.#r+=ArrayBuffer.isView(u)?u.byteLength:u.size,this.#e.push(u)}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 Xd(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 Xd(this.#e,!1))e.set(n,r),r+=n.length;return e.buffer}stream(){let e=Xd(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),u=r<0?Math.max(i+r,0):Math.min(r,i),d=Math.max(u-s,0),p=this.#e,h=[],y=0;for(let f of p){if(y>=d)break;let l=ArrayBuffer.isView(f)?f.byteLength:f.size;if(s&&l<=s)s-=l,u-=l;else{let g;ArrayBuffer.isView(f)?(g=f.subarray(s,Math.min(l,u)),y+=g.byteLength):(g=f.slice(s,Math.min(l,u)),y+=g.size),u-=l,h.push(g),s=0}}let m=new Qd([],{type:String(n).toLowerCase()});return m.#r=d,m.#e=h,m}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(qE.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});C$=qE,Ir=C$});var O$,k$,Wn,ep=wt(()=>{ha();O$=class extends Ir{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 Ir&&/^(File)$/.test(e[Symbol.toStringTag])}},k$=O$,Wn=k$});function GE(t,e=Ir){var r=`${BE()}${BE()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),n=[],i=`--${r}\r
15
- Content-Disposition: form-data; name="`;return t.forEach((s,u)=>typeof s=="string"?n.push(i+tp(u)+`"\r
10
+ `);if(m===-1){Nf("have not received end of HTTP headers yet..."),i();return}let p=g.slice(0,m).toString("ascii").split(`\r
11
+ `),y=p.shift();if(!y)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let v=y.split(" "),E=+v[1],b=v.slice(2).join(" "),k={};for(let N of p){if(!N)continue;let Z=N.indexOf(":");if(Z===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${N}"`));let H=N.slice(0,Z).toLowerCase(),K=N.slice(Z+1).trimStart(),ee=k[H];typeof ee=="string"?k[H]=[ee,K]:Array.isArray(ee)?ee.push(K):k[H]=K}Nf("got proxy server response: %o %o",y,k),s(),t({connect:{statusCode:E,statusText:b,headers:k},buffered:g})}a(f,"ondata"),e.on("error",d),e.on("end",u),i()})}a(O4,"parseProxyResponse");Na.parseProxyResponse=O4});var L0=z(jr=>{"use strict";var k4=jr&&jr.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),$4=jr&&jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),U0=jr&&jr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&k4(t,e,n);return $4(t,e),t},M0=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HttpsProxyAgent=void 0;var zf=U0(require("net")),D0=U0(require("tls")),D4=M0(require("assert")),N4=M0(Wb()),z4=k0(),U4=require("url"),M4=$0(),mu=(0,N4.default)("https-proxy-agent"),N0=a(e=>e.servername===void 0&&e.host&&!zf.isIP(e.host)?{...e,servername:e.host}:e,"setServernameFromNonIpHost"),Uf=class extends z4.Agent{static{a(this,"HttpsProxyAgent")}constructor(t,n){super(n),this.options={path:void 0},this.proxy=typeof t=="string"?new U4.URL(t):t,this.proxyHeaders=n?.headers??{},mu("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?z0(n,"headers"):null,host:o,port:r}}async connect(t,n){let{proxy:o}=this;if(!n.host)throw new TypeError('No "host" provided');let r;o.protocol==="https:"?(mu("Creating `tls.Socket`: %o",this.connectOpts),r=D0.connect(N0(this.connectOpts))):(mu("Creating `net.Socket`: %o",this.connectOpts),r=zf.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=zf.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 d=(0,M4.parseProxyResponse)(r);r.write(`${u}\r
14
+ `);let{connect:f,buffered:h}=await d;if(t.emit("proxyConnect",f),this.emit("proxyConnect",f,t),f.statusCode===200)return t.once("socket",L4),n.secureEndpoint?(mu("Upgrading socket connection to TLS"),D0.connect({...z0(N0(n),"host","path","port"),socket:r})):r;r.destroy();let g=new zf.Socket({writable:!1});return g.readable=!0,t.once("socket",m=>{mu("Replaying proxy buffer for failed request"),(0,D4.default)(m.listenerCount("data")>0),m.push(h),m.push(null)}),g}};Uf.protocols=["http","https"];jr.HttpsProxyAgent=Uf;function L4(e){e.resume()}a(L4,"resume");function z0(e,...t){let n={},o;for(o in e)t.includes(o)||(n[o]=e[o]);return n}a(z0,"omit")});function j4(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");let t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let n=e.substring(5,t).split(";"),o="",r=!1,i=n[0]||"text/plain",s=i;for(let h=1;h<n.length;h++)n[h]==="base64"?r=!0:n[h]&&(s+=`;${n[h]}`,n[h].indexOf("charset=")===0&&(o=n[h].substring(8)));!n[0]&&!o.length&&(s+=";charset=US-ASCII",o="US-ASCII");let u=r?"base64":"ascii",d=unescape(e.substring(t+1)),f=Buffer.from(d,u);return f.type=i,f.typeFull=s,f.charset=o,f}var j0,F0=$t(()=>{a(j4,"dataUriToBuffer");j0=j4});var q0=z((Mf,B0)=>{(function(e,t){typeof Mf=="object"&&typeof B0<"u"?t(Mf):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.WebStreamsPolyfill={}))})(Mf,(function(e){"use strict";function t(){}a(t,"noop");function n(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(n,"typeIsObject");let o=t;function r(c,l){try{Object.defineProperty(c,"name",{value:l,configurable:!0})}catch{}}a(r,"setFunctionName");let i=Promise,s=Promise.prototype.then,u=Promise.reject.bind(i);function d(c){return new i(c)}a(d,"newPromise");function f(c){return d(l=>l(c))}a(f,"promiseResolvedWith");function h(c){return u(c)}a(h,"promiseRejectedWith");function g(c,l,_){return s.call(c,l,_)}a(g,"PerformPromiseThen");function m(c,l,_){g(g(c,l,_),void 0,o)}a(m,"uponPromise");function p(c,l){m(c,l)}a(p,"uponFulfillment");function y(c,l){m(c,void 0,l)}a(y,"uponRejection");function v(c,l,_){return g(c,l,_)}a(v,"transformPromiseWith");function E(c){g(c,void 0,o)}a(E,"setPromiseIsHandledToTrue");let b=a(c=>{if(typeof queueMicrotask=="function")b=queueMicrotask;else{let l=f(void 0);b=a(_=>g(l,_),"_queueMicrotask")}return b(c)},"_queueMicrotask");function k(c,l,_){if(typeof c!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(c,l,_)}a(k,"reflectCall");function N(c,l,_){try{return f(k(c,l,_))}catch(P){return h(P)}}a(N,"promiseCall");let Z=16384;class H{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(l){let _=this._back,P=_;_._elements.length===Z-1&&(P={_elements:[],_next:void 0}),_._elements.push(l),P!==_&&(this._back=P,_._next=P),++this._size}shift(){let l=this._front,_=l,P=this._cursor,I=P+1,j=l._elements,G=j[P];return I===Z&&(_=l._next,I=0),--this._size,this._cursor=I,l!==_&&(this._front=_),j[P]=void 0,G}forEach(l){let _=this._cursor,P=this._front,I=P._elements;for(;(_!==I.length||P._next!==void 0)&&!(_===I.length&&(P=P._next,I=P._elements,_=0,I.length===0));)l(I[_]),++_}peek(){let l=this._front,_=this._cursor;return l._elements[_]}}let K=Symbol("[[AbortSteps]]"),ee=Symbol("[[ErrorSteps]]"),se=Symbol("[[CancelSteps]]"),Q=Symbol("[[PullSteps]]"),Le=Symbol("[[ReleaseSteps]]");function ce(c,l){c._ownerReadableStream=l,l._reader=c,l._state==="readable"?X(c):l._state==="closed"?he(c):pe(c,l._storedError)}a(ce,"ReadableStreamReaderGenericInitialize");function J(c,l){let _=c._ownerReadableStream;return Kr(_,l)}a(J,"ReadableStreamReaderGenericCancel");function W(c){let l=c._ownerReadableStream;l._state==="readable"?Ne(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):je(c,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),l._readableStreamController[Le](),l._reader=void 0,c._ownerReadableStream=void 0}a(W,"ReadableStreamReaderGenericRelease");function ne(c){return new TypeError("Cannot "+c+" a stream using a released reader")}a(ne,"readerLockException");function X(c){c._closedPromise=d((l,_)=>{c._closedPromise_resolve=l,c._closedPromise_reject=_})}a(X,"defaultReaderClosedPromiseInitialize");function pe(c,l){X(c),Ne(c,l)}a(pe,"defaultReaderClosedPromiseInitializeAsRejected");function he(c){X(c),rt(c)}a(he,"defaultReaderClosedPromiseInitializeAsResolved");function Ne(c,l){c._closedPromise_reject!==void 0&&(E(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(Ne,"defaultReaderClosedPromiseReject");function je(c,l){pe(c,l)}a(je,"defaultReaderClosedPromiseResetToRejected");function rt(c){c._closedPromise_resolve!==void 0&&(c._closedPromise_resolve(void 0),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0)}a(rt,"defaultReaderClosedPromiseResolve");let ut=Number.isFinite||function(c){return typeof c=="number"&&isFinite(c)},kt=Math.trunc||function(c){return c<0?Math.ceil(c):Math.floor(c)};function ae(c){return typeof c=="object"||typeof c=="function"}a(ae,"isDictionary");function bt(c,l){if(c!==void 0&&!ae(c))throw new TypeError(`${l} is not an object.`)}a(bt,"assertDictionary");function St(c,l){if(typeof c!="function")throw new TypeError(`${l} is not a function.`)}a(St,"assertFunction");function pr(c){return typeof c=="object"&&c!==null||typeof c=="function"}a(pr,"isObject");function Xe(c,l){if(!pr(c))throw new TypeError(`${l} is not an object.`)}a(Xe,"assertObject");function ot(c,l,_){if(c===void 0)throw new TypeError(`Parameter ${l} is required in '${_}'.`)}a(ot,"assertRequiredArgument");function T(c,l,_){if(c===void 0)throw new TypeError(`${l} is required in '${_}'.`)}a(T,"assertRequiredField");function w(c){return Number(c)}a(w,"convertUnrestrictedDouble");function x(c){return c===0?0:c}a(x,"censorNegativeZero");function M(c){return x(kt(c))}a(M,"integerPart");function C(c,l){let P=Number.MAX_SAFE_INTEGER,I=Number(c);if(I=x(I),!ut(I))throw new TypeError(`${l} is not a finite number`);if(I=M(I),I<0||I>P)throw new TypeError(`${l} is outside the accepted range of 0 to ${P}, inclusive`);return!ut(I)||I===0?0:I}a(C,"convertUnsignedLongLongWithEnforceRange");function D(c,l){if(!so(c))throw new TypeError(`${l} is not a ReadableStream.`)}a(D,"assertReadableStream");function F(c){return new Y(c)}a(F,"AcquireReadableStreamDefaultReader");function R(c,l){c._reader._readRequests.push(l)}a(R,"ReadableStreamAddReadRequest");function $(c,l,_){let I=c._reader._readRequests.shift();_?I._closeSteps():I._chunkSteps(l)}a($,"ReadableStreamFulfillReadRequest");function L(c){return c._reader._readRequests.length}a(L,"ReadableStreamGetNumReadRequests");function U(c){let l=c._reader;return!(l===void 0||!ge(l))}a(U,"ReadableStreamHasDefaultReader");class Y{static{a(this,"ReadableStreamDefaultReader")}constructor(l){if(ot(l,1,"ReadableStreamDefaultReader"),D(l,"First parameter"),co(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");ce(this,l),this._readRequests=new H}get closed(){return ge(this)?this._closedPromise:h(ht("closed"))}cancel(l=void 0){return ge(this)?this._ownerReadableStream===void 0?h(ne("cancel")):J(this,l):h(ht("cancel"))}read(){if(!ge(this))return h(ht("read"));if(this._ownerReadableStream===void 0)return h(ne("read from"));let l,_,P=d((j,G)=>{l=j,_=G});return ve(this,{_chunkSteps:a(j=>l({value:j,done:!1}),"_chunkSteps"),_closeSteps:a(()=>l({value:void 0,done:!0}),"_closeSteps"),_errorSteps:a(j=>_(j),"_errorSteps")}),P}releaseLock(){if(!ge(this))throw ht("releaseLock");this._ownerReadableStream!==void 0&&We(this)}}Object.defineProperties(Y.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(Y.prototype.cancel,"cancel"),r(Y.prototype.read,"read"),r(Y.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Y.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ge(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readRequests")?!1:c instanceof Y}a(ge,"IsReadableStreamDefaultReader");function ve(c,l){let _=c._ownerReadableStream;_._disturbed=!0,_._state==="closed"?l._closeSteps():_._state==="errored"?l._errorSteps(_._storedError):_._readableStreamController[Q](l)}a(ve,"ReadableStreamDefaultReaderRead");function We(c){W(c);let l=new TypeError("Reader was released");mt(c,l)}a(We,"ReadableStreamDefaultReaderRelease");function mt(c,l){let _=c._readRequests;c._readRequests=new H,_.forEach(P=>{P._errorSteps(l)})}a(mt,"ReadableStreamDefaultReaderErrorReadRequests");function ht(c){return new TypeError(`ReadableStreamDefaultReader.prototype.${c} can only be used on a ReadableStreamDefaultReader`)}a(ht,"defaultReaderBrandCheckException");let He=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ye{static{a(this,"ReadableStreamAsyncIteratorImpl")}constructor(l,_){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=l,this._preventCancel=_}next(){let l=a(()=>this._nextSteps(),"nextSteps");return this._ongoingPromise=this._ongoingPromise?v(this._ongoingPromise,l,l):l(),this._ongoingPromise}return(l){let _=a(()=>this._returnSteps(l),"returnSteps");return this._ongoingPromise?v(this._ongoingPromise,_,_):_()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let l=this._reader,_,P,I=d((G,me)=>{_=G,P=me});return ve(l,{_chunkSteps:a(G=>{this._ongoingPromise=void 0,b(()=>_({value:G,done:!1}))},"_chunkSteps"),_closeSteps:a(()=>{this._ongoingPromise=void 0,this._isFinished=!0,W(l),_({value:void 0,done:!0})},"_closeSteps"),_errorSteps:a(G=>{this._ongoingPromise=void 0,this._isFinished=!0,W(l),P(G)},"_errorSteps")}),I}_returnSteps(l){if(this._isFinished)return Promise.resolve({value:l,done:!0});this._isFinished=!0;let _=this._reader;if(!this._preventCancel){let P=J(_,l);return W(_),v(P,()=>({value:l,done:!0}))}return W(_),f({value:l,done:!0})}}let It={next(){return ki(this)?this._asyncIteratorImpl.next():h($i("next"))},return(c){return ki(this)?this._asyncIteratorImpl.return(c):h($i("return"))}};Object.setPrototypeOf(It,He);function Oi(c,l){let _=F(c),P=new Ye(_,l),I=Object.create(It);return I._asyncIteratorImpl=P,I}a(Oi,"AcquireReadableStreamAsyncIterator");function ki(c){if(!n(c)||!Object.prototype.hasOwnProperty.call(c,"_asyncIteratorImpl"))return!1;try{return c._asyncIteratorImpl instanceof Ye}catch{return!1}}a(ki,"IsReadableStreamAsyncIterator");function $i(c){return new TypeError(`ReadableStreamAsyncIterator.${c} can only be used on a ReadableSteamAsyncIterator`)}a($i,"streamAsyncIteratorBrandCheckException");let fr=Number.isNaN||function(c){return c!==c};var Cn,qt,Rt;function it(c){return c.slice()}a(it,"CreateArrayFromList");function uP(c,l,_,P,I){new Uint8Array(c).set(new Uint8Array(_,P,I),l)}a(uP,"CopyDataBlockBytes");let On=a(c=>(typeof c.transfer=="function"?On=a(l=>l.transfer(),"TransferArrayBuffer"):typeof structuredClone=="function"?On=a(l=>structuredClone(l,{transfer:[l]}),"TransferArrayBuffer"):On=a(l=>l,"TransferArrayBuffer"),On(c)),"TransferArrayBuffer"),no=a(c=>(typeof c.detached=="boolean"?no=a(l=>l.detached,"IsDetachedBuffer"):no=a(l=>l.byteLength===0,"IsDetachedBuffer"),no(c)),"IsDetachedBuffer");function lP(c,l,_){if(c.slice)return c.slice(l,_);let P=_-l,I=new ArrayBuffer(P);return uP(I,0,c,l,P),I}a(lP,"ArrayBufferSlice");function rl(c,l){let _=c[l];if(_!=null){if(typeof _!="function")throw new TypeError(`${String(l)} is not a function`);return _}}a(rl,"GetMethod");function _z(c){let l={[Symbol.iterator]:()=>c.iterator},_=(async function*(){return yield*l})(),P=_.next;return{iterator:_,nextMethod:P,done:!1}}a(_z,"CreateAsyncFromSyncIterator");let bh=(Rt=(Cn=Symbol.asyncIterator)!==null&&Cn!==void 0?Cn:(qt=Symbol.for)===null||qt===void 0?void 0:qt.call(Symbol,"Symbol.asyncIterator"))!==null&&Rt!==void 0?Rt:"@@asyncIterator";function dP(c,l="sync",_){if(_===void 0)if(l==="async"){if(_=rl(c,bh),_===void 0){let j=rl(c,Symbol.iterator),G=dP(c,"sync",j);return _z(G)}}else _=rl(c,Symbol.iterator);if(_===void 0)throw new TypeError("The object is not iterable");let P=k(_,c,[]);if(!n(P))throw new TypeError("The iterator method must return an object");let I=P.next;return{iterator:P,nextMethod:I,done:!1}}a(dP,"GetIterator");function bz(c){let l=k(c.nextMethod,c.iterator,[]);if(!n(l))throw new TypeError("The iterator.next() method must return an object");return l}a(bz,"IteratorNext");function Ez(c){return!!c.done}a(Ez,"IteratorComplete");function Sz(c){return c.value}a(Sz,"IteratorValue");function Tz(c){return!(typeof c!="number"||fr(c)||c<0)}a(Tz,"IsNonNegativeNumber");function pP(c){let l=lP(c.buffer,c.byteOffset,c.byteOffset+c.byteLength);return new Uint8Array(l)}a(pP,"CloneAsUint8Array");function Eh(c){let l=c._queue.shift();return c._queueTotalSize-=l.size,c._queueTotalSize<0&&(c._queueTotalSize=0),l.value}a(Eh,"DequeueValue");function Sh(c,l,_){if(!Tz(_)||_===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");c._queue.push({value:l,size:_}),c._queueTotalSize+=_}a(Sh,"EnqueueValueWithSize");function Pz(c){return c._queue.peek().value}a(Pz,"PeekQueueValue");function oo(c){c._queue=new H,c._queueTotalSize=0}a(oo,"ResetQueue");function fP(c){return c===DataView}a(fP,"isDataViewConstructor");function wz(c){return fP(c.constructor)}a(wz,"isDataView");function xz(c){return fP(c)?1:c.BYTES_PER_ELEMENT}a(xz,"arrayBufferViewElementSize");class jo{static{a(this,"ReadableStreamBYOBRequest")}constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Th(this))throw Ih("view");return this._view}respond(l){if(!Th(this))throw Ih("respond");if(ot(l,1,"respond"),l=C(l,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(no(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");al(this._associatedReadableByteStreamController,l)}respondWithNewView(l){if(!Th(this))throw Ih("respondWithNewView");if(ot(l,1,"respondWithNewView"),!ArrayBuffer.isView(l))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(no(l.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");sl(this._associatedReadableByteStreamController,l)}}Object.defineProperties(jo.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),r(jo.prototype.respond,"respond"),r(jo.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(jo.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class kn{static{a(this,"ReadableByteStreamController")}constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Fo(this))throw us("byobRequest");return Ah(this)}get desiredSize(){if(!Fo(this))throw us("desiredSize");return TP(this)}close(){if(!Fo(this))throw us("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let l=this._controlledReadableByteStream._state;if(l!=="readable")throw new TypeError(`The stream (in ${l} state) is not in the readable state and cannot be closed`);cs(this)}enqueue(l){if(!Fo(this))throw us("enqueue");if(ot(l,1,"enqueue"),!ArrayBuffer.isView(l))throw new TypeError("chunk must be an array buffer view");if(l.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(l.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 _=this._controlledReadableByteStream._state;if(_!=="readable")throw new TypeError(`The stream (in ${_} state) is not in the readable state and cannot be enqueued to`);il(this,l)}error(l=void 0){if(!Fo(this))throw us("error");kr(this,l)}[se](l){mP(this),oo(this);let _=this._cancelAlgorithm(l);return ol(this),_}[Q](l){let _=this._controlledReadableByteStream;if(this._queueTotalSize>0){SP(this,l);return}let P=this._autoAllocateChunkSize;if(P!==void 0){let I;try{I=new ArrayBuffer(P)}catch(G){l._errorSteps(G);return}let j={buffer:I,bufferByteLength:P,byteOffset:0,byteLength:P,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(j)}R(_,l),Bo(this)}[Le](){if(this._pendingPullIntos.length>0){let l=this._pendingPullIntos.peek();l.readerType="none",this._pendingPullIntos=new H,this._pendingPullIntos.push(l)}}}Object.defineProperties(kn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),r(kn.prototype.close,"close"),r(kn.prototype.enqueue,"enqueue"),r(kn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(kn.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function Fo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableByteStream")?!1:c instanceof kn}a(Fo,"IsReadableByteStreamController");function Th(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_associatedReadableByteStreamController")?!1:c instanceof jo}a(Th,"IsReadableStreamBYOBRequest");function Bo(c){if(!Oz(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let _=c._pullAlgorithm();m(_,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,Bo(c)),null),P=>(kr(c,P),null))}a(Bo,"ReadableByteStreamControllerCallPullIfNeeded");function mP(c){wh(c),c._pendingPullIntos=new H}a(mP,"ReadableByteStreamControllerClearPendingPullIntos");function Ph(c,l){let _=!1;c._state==="closed"&&(_=!0);let P=hP(l);l.readerType==="default"?$(c,P,_):Uz(c,P,_)}a(Ph,"ReadableByteStreamControllerCommitPullIntoDescriptor");function hP(c){let l=c.bytesFilled,_=c.elementSize;return new c.viewConstructor(c.buffer,c.byteOffset,l/_)}a(hP,"ReadableByteStreamControllerConvertPullIntoDescriptor");function nl(c,l,_,P){c._queue.push({buffer:l,byteOffset:_,byteLength:P}),c._queueTotalSize+=P}a(nl,"ReadableByteStreamControllerEnqueueChunkToQueue");function gP(c,l,_,P){let I;try{I=lP(l,_,_+P)}catch(j){throw kr(c,j),j}nl(c,I,0,P)}a(gP,"ReadableByteStreamControllerEnqueueClonedChunkToQueue");function yP(c,l){l.bytesFilled>0&&gP(c,l.buffer,l.byteOffset,l.bytesFilled),Di(c)}a(yP,"ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue");function vP(c,l){let _=Math.min(c._queueTotalSize,l.byteLength-l.bytesFilled),P=l.bytesFilled+_,I=_,j=!1,G=P%l.elementSize,me=P-G;me>=l.minimumFill&&(I=me-l.bytesFilled,j=!0);let Ie=c._queue;for(;I>0;){let _e=Ie.peek(),ke=Math.min(I,_e.byteLength),Fe=l.byteOffset+l.bytesFilled;uP(l.buffer,Fe,_e.buffer,_e.byteOffset,ke),_e.byteLength===ke?Ie.shift():(_e.byteOffset+=ke,_e.byteLength-=ke),c._queueTotalSize-=ke,_P(c,ke,l),I-=ke}return j}a(vP,"ReadableByteStreamControllerFillPullIntoDescriptorFromQueue");function _P(c,l,_){_.bytesFilled+=l}a(_P,"ReadableByteStreamControllerFillHeadPullIntoDescriptor");function bP(c){c._queueTotalSize===0&&c._closeRequested?(ol(c),hs(c._controlledReadableByteStream)):Bo(c)}a(bP,"ReadableByteStreamControllerHandleQueueDrain");function wh(c){c._byobRequest!==null&&(c._byobRequest._associatedReadableByteStreamController=void 0,c._byobRequest._view=null,c._byobRequest=null)}a(wh,"ReadableByteStreamControllerInvalidateBYOBRequest");function xh(c){for(;c._pendingPullIntos.length>0;){if(c._queueTotalSize===0)return;let l=c._pendingPullIntos.peek();vP(c,l)&&(Di(c),Ph(c._controlledReadableByteStream,l))}}a(xh,"ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue");function Az(c){let l=c._controlledReadableByteStream._reader;for(;l._readRequests.length>0;){if(c._queueTotalSize===0)return;let _=l._readRequests.shift();SP(c,_)}}a(Az,"ReadableByteStreamControllerProcessReadRequestsUsingQueue");function Iz(c,l,_,P){let I=c._controlledReadableByteStream,j=l.constructor,G=xz(j),{byteOffset:me,byteLength:Ie}=l,_e=_*G,ke;try{ke=On(l.buffer)}catch(lt){P._errorSteps(lt);return}let Fe={buffer:ke,bufferByteLength:ke.byteLength,byteOffset:me,byteLength:Ie,bytesFilled:0,minimumFill:_e,elementSize:G,viewConstructor:j,readerType:"byob"};if(c._pendingPullIntos.length>0){c._pendingPullIntos.push(Fe),xP(I,P);return}if(I._state==="closed"){let lt=new j(Fe.buffer,Fe.byteOffset,0);P._closeSteps(lt);return}if(c._queueTotalSize>0){if(vP(c,Fe)){let lt=hP(Fe);bP(c),P._chunkSteps(lt);return}if(c._closeRequested){let lt=new TypeError("Insufficient bytes to fill elements in the given buffer");kr(c,lt),P._errorSteps(lt);return}}c._pendingPullIntos.push(Fe),xP(I,P),Bo(c)}a(Iz,"ReadableByteStreamControllerPullInto");function Rz(c,l){l.readerType==="none"&&Di(c);let _=c._controlledReadableByteStream;if(Rh(_))for(;AP(_)>0;){let P=Di(c);Ph(_,P)}}a(Rz,"ReadableByteStreamControllerRespondInClosedState");function Cz(c,l,_){if(_P(c,l,_),_.readerType==="none"){yP(c,_),xh(c);return}if(_.bytesFilled<_.minimumFill)return;Di(c);let P=_.bytesFilled%_.elementSize;if(P>0){let I=_.byteOffset+_.bytesFilled;gP(c,_.buffer,I-P,P)}_.bytesFilled-=P,Ph(c._controlledReadableByteStream,_),xh(c)}a(Cz,"ReadableByteStreamControllerRespondInReadableState");function EP(c,l){let _=c._pendingPullIntos.peek();wh(c),c._controlledReadableByteStream._state==="closed"?Rz(c,_):Cz(c,l,_),Bo(c)}a(EP,"ReadableByteStreamControllerRespondInternal");function Di(c){return c._pendingPullIntos.shift()}a(Di,"ReadableByteStreamControllerShiftPendingPullInto");function Oz(c){let l=c._controlledReadableByteStream;return l._state!=="readable"||c._closeRequested||!c._started?!1:!!(U(l)&&L(l)>0||Rh(l)&&AP(l)>0||TP(c)>0)}a(Oz,"ReadableByteStreamControllerShouldCallPull");function ol(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0}a(ol,"ReadableByteStreamControllerClearAlgorithms");function cs(c){let l=c._controlledReadableByteStream;if(!(c._closeRequested||l._state!=="readable")){if(c._queueTotalSize>0){c._closeRequested=!0;return}if(c._pendingPullIntos.length>0){let _=c._pendingPullIntos.peek();if(_.bytesFilled%_.elementSize!==0){let P=new TypeError("Insufficient bytes to fill elements in the given buffer");throw kr(c,P),P}}ol(c),hs(l)}}a(cs,"ReadableByteStreamControllerClose");function il(c,l){let _=c._controlledReadableByteStream;if(c._closeRequested||_._state!=="readable")return;let{buffer:P,byteOffset:I,byteLength:j}=l;if(no(P))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let G=On(P);if(c._pendingPullIntos.length>0){let me=c._pendingPullIntos.peek();if(no(me.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");wh(c),me.buffer=On(me.buffer),me.readerType==="none"&&yP(c,me)}if(U(_))if(Az(c),L(_)===0)nl(c,G,I,j);else{c._pendingPullIntos.length>0&&Di(c);let me=new Uint8Array(G,I,j);$(_,me,!1)}else Rh(_)?(nl(c,G,I,j),xh(c)):nl(c,G,I,j);Bo(c)}a(il,"ReadableByteStreamControllerEnqueue");function kr(c,l){let _=c._controlledReadableByteStream;_._state==="readable"&&(mP(c),oo(c),ol(c),YP(_,l))}a(kr,"ReadableByteStreamControllerError");function SP(c,l){let _=c._queue.shift();c._queueTotalSize-=_.byteLength,bP(c);let P=new Uint8Array(_.buffer,_.byteOffset,_.byteLength);l._chunkSteps(P)}a(SP,"ReadableByteStreamControllerFillReadRequestFromQueue");function Ah(c){if(c._byobRequest===null&&c._pendingPullIntos.length>0){let l=c._pendingPullIntos.peek(),_=new Uint8Array(l.buffer,l.byteOffset+l.bytesFilled,l.byteLength-l.bytesFilled),P=Object.create(jo.prototype);$z(P,c,_),c._byobRequest=P}return c._byobRequest}a(Ah,"ReadableByteStreamControllerGetBYOBRequest");function TP(c){let l=c._controlledReadableByteStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(TP,"ReadableByteStreamControllerGetDesiredSize");function al(c,l){let _=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(l!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(l===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(_.bytesFilled+l>_.byteLength)throw new RangeError("bytesWritten out of range")}_.buffer=On(_.buffer),EP(c,l)}a(al,"ReadableByteStreamControllerRespond");function sl(c,l){let _=c._pendingPullIntos.peek();if(c._controlledReadableByteStream._state==="closed"){if(l.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(l.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(_.byteOffset+_.bytesFilled!==l.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(_.bufferByteLength!==l.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(_.bytesFilled+l.byteLength>_.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let I=l.byteLength;_.buffer=On(l.buffer),EP(c,I)}a(sl,"ReadableByteStreamControllerRespondWithNewView");function PP(c,l,_,P,I,j,G){l._controlledReadableByteStream=c,l._pullAgain=!1,l._pulling=!1,l._byobRequest=null,l._queue=l._queueTotalSize=void 0,oo(l),l._closeRequested=!1,l._started=!1,l._strategyHWM=j,l._pullAlgorithm=P,l._cancelAlgorithm=I,l._autoAllocateChunkSize=G,l._pendingPullIntos=new H,c._readableStreamController=l;let me=_();m(f(me),()=>(l._started=!0,Bo(l),null),Ie=>(kr(l,Ie),null))}a(PP,"SetUpReadableByteStreamController");function kz(c,l,_){let P=Object.create(kn.prototype),I,j,G;l.start!==void 0?I=a(()=>l.start(P),"startAlgorithm"):I=a(()=>{},"startAlgorithm"),l.pull!==void 0?j=a(()=>l.pull(P),"pullAlgorithm"):j=a(()=>f(void 0),"pullAlgorithm"),l.cancel!==void 0?G=a(Ie=>l.cancel(Ie),"cancelAlgorithm"):G=a(()=>f(void 0),"cancelAlgorithm");let me=l.autoAllocateChunkSize;if(me===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");PP(c,P,I,j,G,_,me)}a(kz,"SetUpReadableByteStreamControllerFromUnderlyingSource");function $z(c,l,_){c._associatedReadableByteStreamController=l,c._view=_}a($z,"SetUpReadableStreamBYOBRequest");function Ih(c){return new TypeError(`ReadableStreamBYOBRequest.prototype.${c} can only be used on a ReadableStreamBYOBRequest`)}a(Ih,"byobRequestBrandCheckException");function us(c){return new TypeError(`ReadableByteStreamController.prototype.${c} can only be used on a ReadableByteStreamController`)}a(us,"byteStreamControllerBrandCheckException");function Dz(c,l){bt(c,l);let _=c?.mode;return{mode:_===void 0?void 0:Nz(_,`${l} has member 'mode' that`)}}a(Dz,"convertReaderOptions");function Nz(c,l){if(c=`${c}`,c!=="byob")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamReaderMode`);return c}a(Nz,"convertReadableStreamReaderMode");function zz(c,l){var _;bt(c,l);let P=(_=c?.min)!==null&&_!==void 0?_:1;return{min:C(P,`${l} has member 'min' that`)}}a(zz,"convertByobReadOptions");function wP(c){return new io(c)}a(wP,"AcquireReadableStreamBYOBReader");function xP(c,l){c._reader._readIntoRequests.push(l)}a(xP,"ReadableStreamAddReadIntoRequest");function Uz(c,l,_){let I=c._reader._readIntoRequests.shift();_?I._closeSteps(l):I._chunkSteps(l)}a(Uz,"ReadableStreamFulfillReadIntoRequest");function AP(c){return c._reader._readIntoRequests.length}a(AP,"ReadableStreamGetNumReadIntoRequests");function Rh(c){let l=c._reader;return!(l===void 0||!qo(l))}a(Rh,"ReadableStreamHasBYOBReader");class io{static{a(this,"ReadableStreamBYOBReader")}constructor(l){if(ot(l,1,"ReadableStreamBYOBReader"),D(l,"First parameter"),co(l))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Fo(l._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");ce(this,l),this._readIntoRequests=new H}get closed(){return qo(this)?this._closedPromise:h(cl("closed"))}cancel(l=void 0){return qo(this)?this._ownerReadableStream===void 0?h(ne("cancel")):J(this,l):h(cl("cancel"))}read(l,_={}){if(!qo(this))return h(cl("read"));if(!ArrayBuffer.isView(l))return h(new TypeError("view must be an array buffer view"));if(l.byteLength===0)return h(new TypeError("view must have non-zero byteLength"));if(l.buffer.byteLength===0)return h(new TypeError("view's buffer must have non-zero byteLength"));if(no(l.buffer))return h(new TypeError("view's buffer has been detached"));let P;try{P=zz(_,"options")}catch(_e){return h(_e)}let I=P.min;if(I===0)return h(new TypeError("options.min must be greater than 0"));if(wz(l)){if(I>l.byteLength)return h(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(I>l.length)return h(new RangeError("options.min must be less than or equal to view's length"));if(this._ownerReadableStream===void 0)return h(ne("read from"));let j,G,me=d((_e,ke)=>{j=_e,G=ke});return IP(this,l,I,{_chunkSteps:a(_e=>j({value:_e,done:!1}),"_chunkSteps"),_closeSteps:a(_e=>j({value:_e,done:!0}),"_closeSteps"),_errorSteps:a(_e=>G(_e),"_errorSteps")}),me}releaseLock(){if(!qo(this))throw cl("releaseLock");this._ownerReadableStream!==void 0&&Mz(this)}}Object.defineProperties(io.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),r(io.prototype.cancel,"cancel"),r(io.prototype.read,"read"),r(io.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(io.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function qo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readIntoRequests")?!1:c instanceof io}a(qo,"IsReadableStreamBYOBReader");function IP(c,l,_,P){let I=c._ownerReadableStream;I._disturbed=!0,I._state==="errored"?P._errorSteps(I._storedError):Iz(I._readableStreamController,l,_,P)}a(IP,"ReadableStreamBYOBReaderRead");function Mz(c){W(c);let l=new TypeError("Reader was released");RP(c,l)}a(Mz,"ReadableStreamBYOBReaderRelease");function RP(c,l){let _=c._readIntoRequests;c._readIntoRequests=new H,_.forEach(P=>{P._errorSteps(l)})}a(RP,"ReadableStreamBYOBReaderErrorReadIntoRequests");function cl(c){return new TypeError(`ReadableStreamBYOBReader.prototype.${c} can only be used on a ReadableStreamBYOBReader`)}a(cl,"byobReaderBrandCheckException");function ls(c,l){let{highWaterMark:_}=c;if(_===void 0)return l;if(fr(_)||_<0)throw new RangeError("Invalid highWaterMark");return _}a(ls,"ExtractHighWaterMark");function ul(c){let{size:l}=c;return l||(()=>1)}a(ul,"ExtractSizeAlgorithm");function ll(c,l){bt(c,l);let _=c?.highWaterMark,P=c?.size;return{highWaterMark:_===void 0?void 0:w(_),size:P===void 0?void 0:Lz(P,`${l} has member 'size' that`)}}a(ll,"convertQueuingStrategy");function Lz(c,l){return St(c,l),_=>w(c(_))}a(Lz,"convertQueuingStrategySize");function jz(c,l){bt(c,l);let _=c?.abort,P=c?.close,I=c?.start,j=c?.type,G=c?.write;return{abort:_===void 0?void 0:Fz(_,c,`${l} has member 'abort' that`),close:P===void 0?void 0:Bz(P,c,`${l} has member 'close' that`),start:I===void 0?void 0:qz(I,c,`${l} has member 'start' that`),write:G===void 0?void 0:Vz(G,c,`${l} has member 'write' that`),type:j}}a(jz,"convertUnderlyingSink");function Fz(c,l,_){return St(c,_),P=>N(c,l,[P])}a(Fz,"convertUnderlyingSinkAbortCallback");function Bz(c,l,_){return St(c,_),()=>N(c,l,[])}a(Bz,"convertUnderlyingSinkCloseCallback");function qz(c,l,_){return St(c,_),P=>k(c,l,[P])}a(qz,"convertUnderlyingSinkStartCallback");function Vz(c,l,_){return St(c,_),(P,I)=>N(c,l,[P,I])}a(Vz,"convertUnderlyingSinkWriteCallback");function CP(c,l){if(!Ni(c))throw new TypeError(`${l} is not a WritableStream.`)}a(CP,"assertWritableStream");function Gz(c){if(typeof c!="object"||c===null)return!1;try{return typeof c.aborted=="boolean"}catch{return!1}}a(Gz,"isAbortSignal");let Hz=typeof AbortController=="function";function Zz(){if(Hz)return new AbortController}a(Zz,"createAbortController");class ao{static{a(this,"WritableStream")}constructor(l={},_={}){l===void 0?l=null:Xe(l,"First parameter");let P=ll(_,"Second parameter"),I=jz(l,"First parameter");if(kP(this),I.type!==void 0)throw new RangeError("Invalid type is specified");let G=ul(P),me=ls(P,1);sU(this,I,me,G)}get locked(){if(!Ni(this))throw hl("locked");return zi(this)}abort(l=void 0){return Ni(this)?zi(this)?h(new TypeError("Cannot abort a stream that already has a writer")):dl(this,l):h(hl("abort"))}close(){return Ni(this)?zi(this)?h(new TypeError("Cannot close a stream that already has a writer")):pn(this)?h(new TypeError("Cannot close an already-closing stream")):$P(this):h(hl("close"))}getWriter(){if(!Ni(this))throw hl("getWriter");return OP(this)}}Object.defineProperties(ao.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),r(ao.prototype.abort,"abort"),r(ao.prototype.close,"close"),r(ao.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ao.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function OP(c){return new $n(c)}a(OP,"AcquireWritableStreamDefaultWriter");function Wz(c,l,_,P,I=1,j=()=>1){let G=Object.create(ao.prototype);kP(G);let me=Object.create(Ui.prototype);return LP(G,me,c,l,_,P,I,j),G}a(Wz,"CreateWritableStream");function kP(c){c._state="writable",c._storedError=void 0,c._writer=void 0,c._writableStreamController=void 0,c._writeRequests=new H,c._inFlightWriteRequest=void 0,c._closeRequest=void 0,c._inFlightCloseRequest=void 0,c._pendingAbortRequest=void 0,c._backpressure=!1}a(kP,"InitializeWritableStream");function Ni(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_writableStreamController")?!1:c instanceof ao}a(Ni,"IsWritableStream");function zi(c){return c._writer!==void 0}a(zi,"IsWritableStreamLocked");function dl(c,l){var _;if(c._state==="closed"||c._state==="errored")return f(void 0);c._writableStreamController._abortReason=l,(_=c._writableStreamController._abortController)===null||_===void 0||_.abort(l);let P=c._state;if(P==="closed"||P==="errored")return f(void 0);if(c._pendingAbortRequest!==void 0)return c._pendingAbortRequest._promise;let I=!1;P==="erroring"&&(I=!0,l=void 0);let j=d((G,me)=>{c._pendingAbortRequest={_promise:void 0,_resolve:G,_reject:me,_reason:l,_wasAlreadyErroring:I}});return c._pendingAbortRequest._promise=j,I||Oh(c,l),j}a(dl,"WritableStreamAbort");function $P(c){let l=c._state;if(l==="closed"||l==="errored")return h(new TypeError(`The stream (in ${l} state) is not in the writable state and cannot be closed`));let _=d((I,j)=>{let G={_resolve:I,_reject:j};c._closeRequest=G}),P=c._writer;return P!==void 0&&c._backpressure&&l==="writable"&&Lh(P),cU(c._writableStreamController),_}a($P,"WritableStreamClose");function Kz(c){return d((_,P)=>{let I={_resolve:_,_reject:P};c._writeRequests.push(I)})}a(Kz,"WritableStreamAddWriteRequest");function Ch(c,l){if(c._state==="writable"){Oh(c,l);return}kh(c)}a(Ch,"WritableStreamDealWithRejection");function Oh(c,l){let _=c._writableStreamController;c._state="erroring",c._storedError=l;let P=c._writer;P!==void 0&&NP(P,l),!eU(c)&&_._started&&kh(c)}a(Oh,"WritableStreamStartErroring");function kh(c){c._state="errored",c._writableStreamController[ee]();let l=c._storedError;if(c._writeRequests.forEach(I=>{I._reject(l)}),c._writeRequests=new H,c._pendingAbortRequest===void 0){pl(c);return}let _=c._pendingAbortRequest;if(c._pendingAbortRequest=void 0,_._wasAlreadyErroring){_._reject(l),pl(c);return}let P=c._writableStreamController[K](_._reason);m(P,()=>(_._resolve(),pl(c),null),I=>(_._reject(I),pl(c),null))}a(kh,"WritableStreamFinishErroring");function Jz(c){c._inFlightWriteRequest._resolve(void 0),c._inFlightWriteRequest=void 0}a(Jz,"WritableStreamFinishInFlightWrite");function Yz(c,l){c._inFlightWriteRequest._reject(l),c._inFlightWriteRequest=void 0,Ch(c,l)}a(Yz,"WritableStreamFinishInFlightWriteWithError");function Xz(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 _=c._writer;_!==void 0&&qP(_)}a(Xz,"WritableStreamFinishInFlightClose");function Qz(c,l){c._inFlightCloseRequest._reject(l),c._inFlightCloseRequest=void 0,c._pendingAbortRequest!==void 0&&(c._pendingAbortRequest._reject(l),c._pendingAbortRequest=void 0),Ch(c,l)}a(Qz,"WritableStreamFinishInFlightCloseWithError");function pn(c){return!(c._closeRequest===void 0&&c._inFlightCloseRequest===void 0)}a(pn,"WritableStreamCloseQueuedOrInFlight");function eU(c){return!(c._inFlightWriteRequest===void 0&&c._inFlightCloseRequest===void 0)}a(eU,"WritableStreamHasOperationMarkedInFlight");function tU(c){c._inFlightCloseRequest=c._closeRequest,c._closeRequest=void 0}a(tU,"WritableStreamMarkCloseRequestInFlight");function rU(c){c._inFlightWriteRequest=c._writeRequests.shift()}a(rU,"WritableStreamMarkFirstWriteRequestInFlight");function pl(c){c._closeRequest!==void 0&&(c._closeRequest._reject(c._storedError),c._closeRequest=void 0);let l=c._writer;l!==void 0&&Uh(l,c._storedError)}a(pl,"WritableStreamRejectCloseAndClosedPromiseIfNeeded");function $h(c,l){let _=c._writer;_!==void 0&&l!==c._backpressure&&(l?hU(_):Lh(_)),c._backpressure=l}a($h,"WritableStreamUpdateBackpressure");class $n{static{a(this,"WritableStreamDefaultWriter")}constructor(l){if(ot(l,1,"WritableStreamDefaultWriter"),CP(l,"First parameter"),zi(l))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=l,l._writer=this;let _=l._state;if(_==="writable")!pn(l)&&l._backpressure?yl(this):VP(this),gl(this);else if(_==="erroring")Mh(this,l._storedError),gl(this);else if(_==="closed")VP(this),fU(this);else{let P=l._storedError;Mh(this,P),BP(this,P)}}get closed(){return Vo(this)?this._closedPromise:h(Go("closed"))}get desiredSize(){if(!Vo(this))throw Go("desiredSize");if(this._ownerWritableStream===void 0)throw ps("desiredSize");return aU(this)}get ready(){return Vo(this)?this._readyPromise:h(Go("ready"))}abort(l=void 0){return Vo(this)?this._ownerWritableStream===void 0?h(ps("abort")):nU(this,l):h(Go("abort"))}close(){if(!Vo(this))return h(Go("close"));let l=this._ownerWritableStream;return l===void 0?h(ps("close")):pn(l)?h(new TypeError("Cannot close an already-closing stream")):DP(this)}releaseLock(){if(!Vo(this))throw Go("releaseLock");this._ownerWritableStream!==void 0&&zP(this)}write(l=void 0){return Vo(this)?this._ownerWritableStream===void 0?h(ps("write to")):UP(this,l):h(Go("write"))}}Object.defineProperties($n.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),r($n.prototype.abort,"abort"),r($n.prototype.close,"close"),r($n.prototype.releaseLock,"releaseLock"),r($n.prototype.write,"write"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty($n.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Vo(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_ownerWritableStream")?!1:c instanceof $n}a(Vo,"IsWritableStreamDefaultWriter");function nU(c,l){let _=c._ownerWritableStream;return dl(_,l)}a(nU,"WritableStreamDefaultWriterAbort");function DP(c){let l=c._ownerWritableStream;return $P(l)}a(DP,"WritableStreamDefaultWriterClose");function oU(c){let l=c._ownerWritableStream,_=l._state;return pn(l)||_==="closed"?f(void 0):_==="errored"?h(l._storedError):DP(c)}a(oU,"WritableStreamDefaultWriterCloseWithErrorPropagation");function iU(c,l){c._closedPromiseState==="pending"?Uh(c,l):mU(c,l)}a(iU,"WritableStreamDefaultWriterEnsureClosedPromiseRejected");function NP(c,l){c._readyPromiseState==="pending"?GP(c,l):gU(c,l)}a(NP,"WritableStreamDefaultWriterEnsureReadyPromiseRejected");function aU(c){let l=c._ownerWritableStream,_=l._state;return _==="errored"||_==="erroring"?null:_==="closed"?0:jP(l._writableStreamController)}a(aU,"WritableStreamDefaultWriterGetDesiredSize");function zP(c){let l=c._ownerWritableStream,_=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");NP(c,_),iU(c,_),l._writer=void 0,c._ownerWritableStream=void 0}a(zP,"WritableStreamDefaultWriterRelease");function UP(c,l){let _=c._ownerWritableStream,P=_._writableStreamController,I=uU(P,l);if(_!==c._ownerWritableStream)return h(ps("write to"));let j=_._state;if(j==="errored")return h(_._storedError);if(pn(_)||j==="closed")return h(new TypeError("The stream is closing or closed and cannot be written to"));if(j==="erroring")return h(_._storedError);let G=Kz(_);return lU(P,l,I),G}a(UP,"WritableStreamDefaultWriterWrite");let MP={};class Ui{static{a(this,"WritableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Dh(this))throw zh("abortReason");return this._abortReason}get signal(){if(!Dh(this))throw zh("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(l=void 0){if(!Dh(this))throw zh("error");this._controlledWritableStream._state==="writable"&&FP(this,l)}[K](l){let _=this._abortAlgorithm(l);return fl(this),_}[ee](){oo(this)}}Object.defineProperties(Ui.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Ui.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Dh(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledWritableStream")?!1:c instanceof Ui}a(Dh,"IsWritableStreamDefaultController");function LP(c,l,_,P,I,j,G,me){l._controlledWritableStream=c,c._writableStreamController=l,l._queue=void 0,l._queueTotalSize=void 0,oo(l),l._abortReason=void 0,l._abortController=Zz(),l._started=!1,l._strategySizeAlgorithm=me,l._strategyHWM=G,l._writeAlgorithm=P,l._closeAlgorithm=I,l._abortAlgorithm=j;let Ie=Nh(l);$h(c,Ie);let _e=_(),ke=f(_e);m(ke,()=>(l._started=!0,ml(l),null),Fe=>(l._started=!0,Ch(c,Fe),null))}a(LP,"SetUpWritableStreamDefaultController");function sU(c,l,_,P){let I=Object.create(Ui.prototype),j,G,me,Ie;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.write!==void 0?G=a(_e=>l.write(_e,I),"writeAlgorithm"):G=a(()=>f(void 0),"writeAlgorithm"),l.close!==void 0?me=a(()=>l.close(),"closeAlgorithm"):me=a(()=>f(void 0),"closeAlgorithm"),l.abort!==void 0?Ie=a(_e=>l.abort(_e),"abortAlgorithm"):Ie=a(()=>f(void 0),"abortAlgorithm"),LP(c,I,j,G,me,Ie,_,P)}a(sU,"SetUpWritableStreamDefaultControllerFromUnderlyingSink");function fl(c){c._writeAlgorithm=void 0,c._closeAlgorithm=void 0,c._abortAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(fl,"WritableStreamDefaultControllerClearAlgorithms");function cU(c){Sh(c,MP,0),ml(c)}a(cU,"WritableStreamDefaultControllerClose");function uU(c,l){try{return c._strategySizeAlgorithm(l)}catch(_){return ds(c,_),1}}a(uU,"WritableStreamDefaultControllerGetChunkSize");function jP(c){return c._strategyHWM-c._queueTotalSize}a(jP,"WritableStreamDefaultControllerGetDesiredSize");function lU(c,l,_){try{Sh(c,l,_)}catch(I){ds(c,I);return}let P=c._controlledWritableStream;if(!pn(P)&&P._state==="writable"){let I=Nh(c);$h(P,I)}ml(c)}a(lU,"WritableStreamDefaultControllerWrite");function ml(c){let l=c._controlledWritableStream;if(!c._started||l._inFlightWriteRequest!==void 0)return;if(l._state==="erroring"){kh(l);return}if(c._queue.length===0)return;let P=Pz(c);P===MP?dU(c):pU(c,P)}a(ml,"WritableStreamDefaultControllerAdvanceQueueIfNeeded");function ds(c,l){c._controlledWritableStream._state==="writable"&&FP(c,l)}a(ds,"WritableStreamDefaultControllerErrorIfNeeded");function dU(c){let l=c._controlledWritableStream;tU(l),Eh(c);let _=c._closeAlgorithm();fl(c),m(_,()=>(Xz(l),null),P=>(Qz(l,P),null))}a(dU,"WritableStreamDefaultControllerProcessClose");function pU(c,l){let _=c._controlledWritableStream;rU(_);let P=c._writeAlgorithm(l);m(P,()=>{Jz(_);let I=_._state;if(Eh(c),!pn(_)&&I==="writable"){let j=Nh(c);$h(_,j)}return ml(c),null},I=>(_._state==="writable"&&fl(c),Yz(_,I),null))}a(pU,"WritableStreamDefaultControllerProcessWrite");function Nh(c){return jP(c)<=0}a(Nh,"WritableStreamDefaultControllerGetBackpressure");function FP(c,l){let _=c._controlledWritableStream;fl(c),Oh(_,l)}a(FP,"WritableStreamDefaultControllerError");function hl(c){return new TypeError(`WritableStream.prototype.${c} can only be used on a WritableStream`)}a(hl,"streamBrandCheckException$2");function zh(c){return new TypeError(`WritableStreamDefaultController.prototype.${c} can only be used on a WritableStreamDefaultController`)}a(zh,"defaultControllerBrandCheckException$2");function Go(c){return new TypeError(`WritableStreamDefaultWriter.prototype.${c} can only be used on a WritableStreamDefaultWriter`)}a(Go,"defaultWriterBrandCheckException");function ps(c){return new TypeError("Cannot "+c+" a stream using a released writer")}a(ps,"defaultWriterLockException");function gl(c){c._closedPromise=d((l,_)=>{c._closedPromise_resolve=l,c._closedPromise_reject=_,c._closedPromiseState="pending"})}a(gl,"defaultWriterClosedPromiseInitialize");function BP(c,l){gl(c),Uh(c,l)}a(BP,"defaultWriterClosedPromiseInitializeAsRejected");function fU(c){gl(c),qP(c)}a(fU,"defaultWriterClosedPromiseInitializeAsResolved");function Uh(c,l){c._closedPromise_reject!==void 0&&(E(c._closedPromise),c._closedPromise_reject(l),c._closedPromise_resolve=void 0,c._closedPromise_reject=void 0,c._closedPromiseState="rejected")}a(Uh,"defaultWriterClosedPromiseReject");function mU(c,l){BP(c,l)}a(mU,"defaultWriterClosedPromiseResetToRejected");function qP(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(qP,"defaultWriterClosedPromiseResolve");function yl(c){c._readyPromise=d((l,_)=>{c._readyPromise_resolve=l,c._readyPromise_reject=_}),c._readyPromiseState="pending"}a(yl,"defaultWriterReadyPromiseInitialize");function Mh(c,l){yl(c),GP(c,l)}a(Mh,"defaultWriterReadyPromiseInitializeAsRejected");function VP(c){yl(c),Lh(c)}a(VP,"defaultWriterReadyPromiseInitializeAsResolved");function GP(c,l){c._readyPromise_reject!==void 0&&(E(c._readyPromise),c._readyPromise_reject(l),c._readyPromise_resolve=void 0,c._readyPromise_reject=void 0,c._readyPromiseState="rejected")}a(GP,"defaultWriterReadyPromiseReject");function hU(c){yl(c)}a(hU,"defaultWriterReadyPromiseReset");function gU(c,l){Mh(c,l)}a(gU,"defaultWriterReadyPromiseResetToRejected");function Lh(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(Lh,"defaultWriterReadyPromiseResolve");function yU(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof global<"u")return global}a(yU,"getGlobals");let jh=yU();function vU(c){if(!(typeof c=="function"||typeof c=="object")||c.name!=="DOMException")return!1;try{return new c,!0}catch{return!1}}a(vU,"isDOMExceptionConstructor");function _U(){let c=jh?.DOMException;return vU(c)?c:void 0}a(_U,"getFromGlobal");function bU(){let c=a(function(_,P){this.message=_||"",this.name=P||"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(bU,"createPolyfill");let EU=_U()||bU();function HP(c,l,_,P,I,j){let G=F(c),me=OP(l);c._disturbed=!0;let Ie=!1,_e=f(void 0);return d((ke,Fe)=>{let lt;if(j!==void 0){if(lt=a(()=>{let Ee=j.reason!==void 0?j.reason:new EU("Aborted","AbortError"),Ve=[];P||Ve.push(()=>l._state==="writable"?dl(l,Ee):f(void 0)),I||Ve.push(()=>c._state==="readable"?Kr(c,Ee):f(void 0)),er(()=>Promise.all(Ve.map(pt=>pt())),!0,Ee)},"abortAlgorithm"),j.aborted){lt();return}j.addEventListener("abort",lt)}function Jr(){return d((Ee,Ve)=>{function pt(mr){mr?Ee():g(Fi(),pt,Ve)}a(pt,"next"),pt(!1)})}a(Jr,"pipeLoop");function Fi(){return Ie?f(!0):g(me._readyPromise,()=>d((Ee,Ve)=>{ve(G,{_chunkSteps:a(pt=>{_e=g(UP(me,pt),void 0,t),Ee(!1)},"_chunkSteps"),_closeSteps:a(()=>Ee(!0),"_closeSteps"),_errorSteps:Ve})}))}if(a(Fi,"pipeStep"),Nn(c,G._closedPromise,Ee=>(P?$r(!0,Ee):er(()=>dl(l,Ee),!0,Ee),null)),Nn(l,me._closedPromise,Ee=>(I?$r(!0,Ee):er(()=>Kr(c,Ee),!0,Ee),null)),Kt(c,G._closedPromise,()=>(_?$r():er(()=>oU(me)),null)),pn(l)||l._state==="closed"){let Ee=new TypeError("the destination writable stream closed before all data could be piped to it");I?$r(!0,Ee):er(()=>Kr(c,Ee),!0,Ee)}E(Jr());function lo(){let Ee=_e;return g(_e,()=>Ee!==_e?lo():void 0)}a(lo,"waitForWritesToFinish");function Nn(Ee,Ve,pt){Ee._state==="errored"?pt(Ee._storedError):y(Ve,pt)}a(Nn,"isOrBecomesErrored");function Kt(Ee,Ve,pt){Ee._state==="closed"?pt():p(Ve,pt)}a(Kt,"isOrBecomesClosed");function er(Ee,Ve,pt){if(Ie)return;Ie=!0,l._state==="writable"&&!pn(l)?p(lo(),mr):mr();function mr(){return m(Ee(),()=>zn(Ve,pt),Bi=>zn(!0,Bi)),null}a(mr,"doTheRest")}a(er,"shutdownWithAction");function $r(Ee,Ve){Ie||(Ie=!0,l._state==="writable"&&!pn(l)?p(lo(),()=>zn(Ee,Ve)):zn(Ee,Ve))}a($r,"shutdown");function zn(Ee,Ve){return zP(me),W(G),j!==void 0&&j.removeEventListener("abort",lt),Ee?Fe(Ve):ke(void 0),null}a(zn,"finalize")})}a(HP,"ReadableStreamPipeTo");class Dn{static{a(this,"ReadableStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!vl(this))throw bl("desiredSize");return Fh(this)}close(){if(!vl(this))throw bl("close");if(!Li(this))throw new TypeError("The stream is not in a state that permits close");Ho(this)}enqueue(l=void 0){if(!vl(this))throw bl("enqueue");if(!Li(this))throw new TypeError("The stream is not in a state that permits enqueue");return Mi(this,l)}error(l=void 0){if(!vl(this))throw bl("error");Wr(this,l)}[se](l){oo(this);let _=this._cancelAlgorithm(l);return _l(this),_}[Q](l){let _=this._controlledReadableStream;if(this._queue.length>0){let P=Eh(this);this._closeRequested&&this._queue.length===0?(_l(this),hs(_)):fs(this),l._chunkSteps(P)}else R(_,l),fs(this)}[Le](){}}Object.defineProperties(Dn.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),r(Dn.prototype.close,"close"),r(Dn.prototype.enqueue,"enqueue"),r(Dn.prototype.error,"error"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Dn.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function vl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledReadableStream")?!1:c instanceof Dn}a(vl,"IsReadableStreamDefaultController");function fs(c){if(!ZP(c))return;if(c._pulling){c._pullAgain=!0;return}c._pulling=!0;let _=c._pullAlgorithm();m(_,()=>(c._pulling=!1,c._pullAgain&&(c._pullAgain=!1,fs(c)),null),P=>(Wr(c,P),null))}a(fs,"ReadableStreamDefaultControllerCallPullIfNeeded");function ZP(c){let l=c._controlledReadableStream;return!Li(c)||!c._started?!1:!!(co(l)&&L(l)>0||Fh(c)>0)}a(ZP,"ReadableStreamDefaultControllerShouldCallPull");function _l(c){c._pullAlgorithm=void 0,c._cancelAlgorithm=void 0,c._strategySizeAlgorithm=void 0}a(_l,"ReadableStreamDefaultControllerClearAlgorithms");function Ho(c){if(!Li(c))return;let l=c._controlledReadableStream;c._closeRequested=!0,c._queue.length===0&&(_l(c),hs(l))}a(Ho,"ReadableStreamDefaultControllerClose");function Mi(c,l){if(!Li(c))return;let _=c._controlledReadableStream;if(co(_)&&L(_)>0)$(_,l,!1);else{let P;try{P=c._strategySizeAlgorithm(l)}catch(I){throw Wr(c,I),I}try{Sh(c,l,P)}catch(I){throw Wr(c,I),I}}fs(c)}a(Mi,"ReadableStreamDefaultControllerEnqueue");function Wr(c,l){let _=c._controlledReadableStream;_._state==="readable"&&(oo(c),_l(c),YP(_,l))}a(Wr,"ReadableStreamDefaultControllerError");function Fh(c){let l=c._controlledReadableStream._state;return l==="errored"?null:l==="closed"?0:c._strategyHWM-c._queueTotalSize}a(Fh,"ReadableStreamDefaultControllerGetDesiredSize");function SU(c){return!ZP(c)}a(SU,"ReadableStreamDefaultControllerHasBackpressure");function Li(c){let l=c._controlledReadableStream._state;return!c._closeRequested&&l==="readable"}a(Li,"ReadableStreamDefaultControllerCanCloseOrEnqueue");function WP(c,l,_,P,I,j,G){l._controlledReadableStream=c,l._queue=void 0,l._queueTotalSize=void 0,oo(l),l._started=!1,l._closeRequested=!1,l._pullAgain=!1,l._pulling=!1,l._strategySizeAlgorithm=G,l._strategyHWM=j,l._pullAlgorithm=P,l._cancelAlgorithm=I,c._readableStreamController=l;let me=_();m(f(me),()=>(l._started=!0,fs(l),null),Ie=>(Wr(l,Ie),null))}a(WP,"SetUpReadableStreamDefaultController");function TU(c,l,_,P){let I=Object.create(Dn.prototype),j,G,me;l.start!==void 0?j=a(()=>l.start(I),"startAlgorithm"):j=a(()=>{},"startAlgorithm"),l.pull!==void 0?G=a(()=>l.pull(I),"pullAlgorithm"):G=a(()=>f(void 0),"pullAlgorithm"),l.cancel!==void 0?me=a(Ie=>l.cancel(Ie),"cancelAlgorithm"):me=a(()=>f(void 0),"cancelAlgorithm"),WP(c,I,j,G,me,_,P)}a(TU,"SetUpReadableStreamDefaultControllerFromUnderlyingSource");function bl(c){return new TypeError(`ReadableStreamDefaultController.prototype.${c} can only be used on a ReadableStreamDefaultController`)}a(bl,"defaultControllerBrandCheckException$1");function PU(c,l){return Fo(c._readableStreamController)?xU(c):wU(c)}a(PU,"ReadableStreamTee");function wU(c,l){let _=F(c),P=!1,I=!1,j=!1,G=!1,me,Ie,_e,ke,Fe,lt=d(Kt=>{Fe=Kt});function Jr(){return P?(I=!0,f(void 0)):(P=!0,ve(_,{_chunkSteps:a(er=>{b(()=>{I=!1;let $r=er,zn=er;j||Mi(_e._readableStreamController,$r),G||Mi(ke._readableStreamController,zn),P=!1,I&&Jr()})},"_chunkSteps"),_closeSteps:a(()=>{P=!1,j||Ho(_e._readableStreamController),G||Ho(ke._readableStreamController),(!j||!G)&&Fe(void 0)},"_closeSteps"),_errorSteps:a(()=>{P=!1},"_errorSteps")}),f(void 0))}a(Jr,"pullAlgorithm");function Fi(Kt){if(j=!0,me=Kt,G){let er=it([me,Ie]),$r=Kr(c,er);Fe($r)}return lt}a(Fi,"cancel1Algorithm");function lo(Kt){if(G=!0,Ie=Kt,j){let er=it([me,Ie]),$r=Kr(c,er);Fe($r)}return lt}a(lo,"cancel2Algorithm");function Nn(){}return a(Nn,"startAlgorithm"),_e=ms(Nn,Jr,Fi),ke=ms(Nn,Jr,lo),y(_._closedPromise,Kt=>(Wr(_e._readableStreamController,Kt),Wr(ke._readableStreamController,Kt),(!j||!G)&&Fe(void 0),null)),[_e,ke]}a(wU,"ReadableStreamDefaultTee");function xU(c){let l=F(c),_=!1,P=!1,I=!1,j=!1,G=!1,me,Ie,_e,ke,Fe,lt=d(Ee=>{Fe=Ee});function Jr(Ee){y(Ee._closedPromise,Ve=>(Ee!==l||(kr(_e._readableStreamController,Ve),kr(ke._readableStreamController,Ve),(!j||!G)&&Fe(void 0)),null))}a(Jr,"forwardReaderError");function Fi(){qo(l)&&(W(l),l=F(c),Jr(l)),ve(l,{_chunkSteps:a(Ve=>{b(()=>{P=!1,I=!1;let pt=Ve,mr=Ve;if(!j&&!G)try{mr=pP(Ve)}catch(Bi){kr(_e._readableStreamController,Bi),kr(ke._readableStreamController,Bi),Fe(Kr(c,Bi));return}j||il(_e._readableStreamController,pt),G||il(ke._readableStreamController,mr),_=!1,P?Nn():I&&Kt()})},"_chunkSteps"),_closeSteps:a(()=>{_=!1,j||cs(_e._readableStreamController),G||cs(ke._readableStreamController),_e._readableStreamController._pendingPullIntos.length>0&&al(_e._readableStreamController,0),ke._readableStreamController._pendingPullIntos.length>0&&al(ke._readableStreamController,0),(!j||!G)&&Fe(void 0)},"_closeSteps"),_errorSteps:a(()=>{_=!1},"_errorSteps")})}a(Fi,"pullWithDefaultReader");function lo(Ee,Ve){ge(l)&&(W(l),l=wP(c),Jr(l));let pt=Ve?ke:_e,mr=Ve?_e:ke;IP(l,Ee,1,{_chunkSteps:a(qi=>{b(()=>{P=!1,I=!1;let Vi=Ve?G:j;if(Ve?j:G)Vi||sl(pt._readableStreamController,qi);else{let lw;try{lw=pP(qi)}catch(Hh){kr(pt._readableStreamController,Hh),kr(mr._readableStreamController,Hh),Fe(Kr(c,Hh));return}Vi||sl(pt._readableStreamController,qi),il(mr._readableStreamController,lw)}_=!1,P?Nn():I&&Kt()})},"_chunkSteps"),_closeSteps:a(qi=>{_=!1;let Vi=Ve?G:j,Il=Ve?j:G;Vi||cs(pt._readableStreamController),Il||cs(mr._readableStreamController),qi!==void 0&&(Vi||sl(pt._readableStreamController,qi),!Il&&mr._readableStreamController._pendingPullIntos.length>0&&al(mr._readableStreamController,0)),(!Vi||!Il)&&Fe(void 0)},"_closeSteps"),_errorSteps:a(()=>{_=!1},"_errorSteps")})}a(lo,"pullWithBYOBReader");function Nn(){if(_)return P=!0,f(void 0);_=!0;let Ee=Ah(_e._readableStreamController);return Ee===null?Fi():lo(Ee._view,!1),f(void 0)}a(Nn,"pull1Algorithm");function Kt(){if(_)return I=!0,f(void 0);_=!0;let Ee=Ah(ke._readableStreamController);return Ee===null?Fi():lo(Ee._view,!0),f(void 0)}a(Kt,"pull2Algorithm");function er(Ee){if(j=!0,me=Ee,G){let Ve=it([me,Ie]),pt=Kr(c,Ve);Fe(pt)}return lt}a(er,"cancel1Algorithm");function $r(Ee){if(G=!0,Ie=Ee,j){let Ve=it([me,Ie]),pt=Kr(c,Ve);Fe(pt)}return lt}a($r,"cancel2Algorithm");function zn(){}return a(zn,"startAlgorithm"),_e=JP(zn,Nn,er),ke=JP(zn,Kt,$r),Jr(l),[_e,ke]}a(xU,"ReadableByteStreamTee");function AU(c){return n(c)&&typeof c.getReader<"u"}a(AU,"isReadableStreamLike");function IU(c){return AU(c)?CU(c.getReader()):RU(c)}a(IU,"ReadableStreamFrom");function RU(c){let l,_=dP(c,"async"),P=t;function I(){let G;try{G=bz(_)}catch(Ie){return h(Ie)}let me=f(G);return v(me,Ie=>{if(!n(Ie))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ez(Ie))Ho(l._readableStreamController);else{let ke=Sz(Ie);Mi(l._readableStreamController,ke)}})}a(I,"pullAlgorithm");function j(G){let me=_.iterator,Ie;try{Ie=rl(me,"return")}catch(Fe){return h(Fe)}if(Ie===void 0)return f(void 0);let _e;try{_e=k(Ie,me,[G])}catch(Fe){return h(Fe)}let ke=f(_e);return v(ke,Fe=>{if(!n(Fe))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")})}return a(j,"cancelAlgorithm"),l=ms(P,I,j,0),l}a(RU,"ReadableStreamFromIterable");function CU(c){let l,_=t;function P(){let j;try{j=c.read()}catch(G){return h(G)}return v(j,G=>{if(!n(G))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(G.done)Ho(l._readableStreamController);else{let me=G.value;Mi(l._readableStreamController,me)}})}a(P,"pullAlgorithm");function I(j){try{return f(c.cancel(j))}catch(G){return h(G)}}return a(I,"cancelAlgorithm"),l=ms(_,P,I,0),l}a(CU,"ReadableStreamFromDefaultReader");function OU(c,l){bt(c,l);let _=c,P=_?.autoAllocateChunkSize,I=_?.cancel,j=_?.pull,G=_?.start,me=_?.type;return{autoAllocateChunkSize:P===void 0?void 0:C(P,`${l} has member 'autoAllocateChunkSize' that`),cancel:I===void 0?void 0:kU(I,_,`${l} has member 'cancel' that`),pull:j===void 0?void 0:$U(j,_,`${l} has member 'pull' that`),start:G===void 0?void 0:DU(G,_,`${l} has member 'start' that`),type:me===void 0?void 0:NU(me,`${l} has member 'type' that`)}}a(OU,"convertUnderlyingDefaultOrByteSource");function kU(c,l,_){return St(c,_),P=>N(c,l,[P])}a(kU,"convertUnderlyingSourceCancelCallback");function $U(c,l,_){return St(c,_),P=>N(c,l,[P])}a($U,"convertUnderlyingSourcePullCallback");function DU(c,l,_){return St(c,_),P=>k(c,l,[P])}a(DU,"convertUnderlyingSourceStartCallback");function NU(c,l){if(c=`${c}`,c!=="bytes")throw new TypeError(`${l} '${c}' is not a valid enumeration value for ReadableStreamType`);return c}a(NU,"convertReadableStreamType");function zU(c,l){return bt(c,l),{preventCancel:!!c?.preventCancel}}a(zU,"convertIteratorOptions");function KP(c,l){bt(c,l);let _=c?.preventAbort,P=c?.preventCancel,I=c?.preventClose,j=c?.signal;return j!==void 0&&UU(j,`${l} has member 'signal' that`),{preventAbort:!!_,preventCancel:!!P,preventClose:!!I,signal:j}}a(KP,"convertPipeOptions");function UU(c,l){if(!Gz(c))throw new TypeError(`${l} is not an AbortSignal.`)}a(UU,"assertAbortSignal");function MU(c,l){bt(c,l);let _=c?.readable;T(_,"readable","ReadableWritablePair"),D(_,`${l} has member 'readable' that`);let P=c?.writable;return T(P,"writable","ReadableWritablePair"),CP(P,`${l} has member 'writable' that`),{readable:_,writable:P}}a(MU,"convertReadableWritablePair");class Vt{static{a(this,"ReadableStream")}constructor(l={},_={}){l===void 0?l=null:Xe(l,"First parameter");let P=ll(_,"Second parameter"),I=OU(l,"First parameter");if(Bh(this),I.type==="bytes"){if(P.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let j=ls(P,0);kz(this,I,j)}else{let j=ul(P),G=ls(P,1);TU(this,I,G,j)}}get locked(){if(!so(this))throw Zo("locked");return co(this)}cancel(l=void 0){return so(this)?co(this)?h(new TypeError("Cannot cancel a stream that already has a reader")):Kr(this,l):h(Zo("cancel"))}getReader(l=void 0){if(!so(this))throw Zo("getReader");return Dz(l,"First parameter").mode===void 0?F(this):wP(this)}pipeThrough(l,_={}){if(!so(this))throw Zo("pipeThrough");ot(l,1,"pipeThrough");let P=MU(l,"First parameter"),I=KP(_,"Second parameter");if(co(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(zi(P.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let j=HP(this,P.writable,I.preventClose,I.preventAbort,I.preventCancel,I.signal);return E(j),P.readable}pipeTo(l,_={}){if(!so(this))return h(Zo("pipeTo"));if(l===void 0)return h("Parameter 1 is required in 'pipeTo'.");if(!Ni(l))return h(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let P;try{P=KP(_,"Second parameter")}catch(I){return h(I)}return co(this)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):zi(l)?h(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):HP(this,l,P.preventClose,P.preventAbort,P.preventCancel,P.signal)}tee(){if(!so(this))throw Zo("tee");let l=PU(this);return it(l)}values(l=void 0){if(!so(this))throw Zo("values");let _=zU(l,"First parameter");return Oi(this,_.preventCancel)}[bh](l){return this.values(l)}static from(l){return IU(l)}}Object.defineProperties(Vt,{from:{enumerable:!0}}),Object.defineProperties(Vt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),r(Vt.from,"from"),r(Vt.prototype.cancel,"cancel"),r(Vt.prototype.getReader,"getReader"),r(Vt.prototype.pipeThrough,"pipeThrough"),r(Vt.prototype.pipeTo,"pipeTo"),r(Vt.prototype.tee,"tee"),r(Vt.prototype.values,"values"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Vt.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Vt.prototype,bh,{value:Vt.prototype.values,writable:!0,configurable:!0});function ms(c,l,_,P=1,I=()=>1){let j=Object.create(Vt.prototype);Bh(j);let G=Object.create(Dn.prototype);return WP(j,G,c,l,_,P,I),j}a(ms,"CreateReadableStream");function JP(c,l,_){let P=Object.create(Vt.prototype);Bh(P);let I=Object.create(kn.prototype);return PP(P,I,c,l,_,0,void 0),P}a(JP,"CreateReadableByteStream");function Bh(c){c._state="readable",c._reader=void 0,c._storedError=void 0,c._disturbed=!1}a(Bh,"InitializeReadableStream");function so(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_readableStreamController")?!1:c instanceof Vt}a(so,"IsReadableStream");function co(c){return c._reader!==void 0}a(co,"IsReadableStreamLocked");function Kr(c,l){if(c._disturbed=!0,c._state==="closed")return f(void 0);if(c._state==="errored")return h(c._storedError);hs(c);let _=c._reader;if(_!==void 0&&qo(_)){let I=_._readIntoRequests;_._readIntoRequests=new H,I.forEach(j=>{j._closeSteps(void 0)})}let P=c._readableStreamController[se](l);return v(P,t)}a(Kr,"ReadableStreamCancel");function hs(c){c._state="closed";let l=c._reader;if(l!==void 0&&(rt(l),ge(l))){let _=l._readRequests;l._readRequests=new H,_.forEach(P=>{P._closeSteps()})}}a(hs,"ReadableStreamClose");function YP(c,l){c._state="errored",c._storedError=l;let _=c._reader;_!==void 0&&(Ne(_,l),ge(_)?mt(_,l):RP(_,l))}a(YP,"ReadableStreamError");function Zo(c){return new TypeError(`ReadableStream.prototype.${c} can only be used on a ReadableStream`)}a(Zo,"streamBrandCheckException$1");function XP(c,l){bt(c,l);let _=c?.highWaterMark;return T(_,"highWaterMark","QueuingStrategyInit"),{highWaterMark:w(_)}}a(XP,"convertQueuingStrategyInit");let QP=a(c=>c.byteLength,"byteLengthSizeFunction");r(QP,"size");class El{static{a(this,"ByteLengthQueuingStrategy")}constructor(l){ot(l,1,"ByteLengthQueuingStrategy"),l=XP(l,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!tw(this))throw ew("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!tw(this))throw ew("size");return QP}}Object.defineProperties(El.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(El.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function ew(c){return new TypeError(`ByteLengthQueuingStrategy.prototype.${c} can only be used on a ByteLengthQueuingStrategy`)}a(ew,"byteLengthBrandCheckException");function tw(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_byteLengthQueuingStrategyHighWaterMark")?!1:c instanceof El}a(tw,"IsByteLengthQueuingStrategy");let rw=a(()=>1,"countSizeFunction");r(rw,"size");class Sl{static{a(this,"CountQueuingStrategy")}constructor(l){ot(l,1,"CountQueuingStrategy"),l=XP(l,"First parameter"),this._countQueuingStrategyHighWaterMark=l.highWaterMark}get highWaterMark(){if(!ow(this))throw nw("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ow(this))throw nw("size");return rw}}Object.defineProperties(Sl.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Sl.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function nw(c){return new TypeError(`CountQueuingStrategy.prototype.${c} can only be used on a CountQueuingStrategy`)}a(nw,"countBrandCheckException");function ow(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_countQueuingStrategyHighWaterMark")?!1:c instanceof Sl}a(ow,"IsCountQueuingStrategy");function LU(c,l){bt(c,l);let _=c?.cancel,P=c?.flush,I=c?.readableType,j=c?.start,G=c?.transform,me=c?.writableType;return{cancel:_===void 0?void 0:qU(_,c,`${l} has member 'cancel' that`),flush:P===void 0?void 0:jU(P,c,`${l} has member 'flush' that`),readableType:I,start:j===void 0?void 0:FU(j,c,`${l} has member 'start' that`),transform:G===void 0?void 0:BU(G,c,`${l} has member 'transform' that`),writableType:me}}a(LU,"convertTransformer");function jU(c,l,_){return St(c,_),P=>N(c,l,[P])}a(jU,"convertTransformerFlushCallback");function FU(c,l,_){return St(c,_),P=>k(c,l,[P])}a(FU,"convertTransformerStartCallback");function BU(c,l,_){return St(c,_),(P,I)=>N(c,l,[P,I])}a(BU,"convertTransformerTransformCallback");function qU(c,l,_){return St(c,_),P=>N(c,l,[P])}a(qU,"convertTransformerCancelCallback");class Tl{static{a(this,"TransformStream")}constructor(l={},_={},P={}){l===void 0&&(l=null);let I=ll(_,"Second parameter"),j=ll(P,"Third parameter"),G=LU(l,"First parameter");if(G.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(G.writableType!==void 0)throw new RangeError("Invalid writableType specified");let me=ls(j,0),Ie=ul(j),_e=ls(I,1),ke=ul(I),Fe,lt=d(Jr=>{Fe=Jr});VU(this,lt,_e,ke,me,Ie),HU(this,G),G.start!==void 0?Fe(G.start(this._transformStreamController)):Fe(void 0)}get readable(){if(!iw(this))throw uw("readable");return this._readable}get writable(){if(!iw(this))throw uw("writable");return this._writable}}Object.defineProperties(Tl.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(Tl.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function VU(c,l,_,P,I,j){function G(){return l}a(G,"startAlgorithm");function me(lt){return KU(c,lt)}a(me,"writeAlgorithm");function Ie(lt){return JU(c,lt)}a(Ie,"abortAlgorithm");function _e(){return YU(c)}a(_e,"closeAlgorithm"),c._writable=Wz(G,me,_e,Ie,_,P);function ke(){return XU(c)}a(ke,"pullAlgorithm");function Fe(lt){return QU(c,lt)}a(Fe,"cancelAlgorithm"),c._readable=ms(G,ke,Fe,I,j),c._backpressure=void 0,c._backpressureChangePromise=void 0,c._backpressureChangePromise_resolve=void 0,Pl(c,!0),c._transformStreamController=void 0}a(VU,"InitializeTransformStream");function iw(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_transformStreamController")?!1:c instanceof Tl}a(iw,"IsTransformStream");function aw(c,l){Wr(c._readable._readableStreamController,l),qh(c,l)}a(aw,"TransformStreamError");function qh(c,l){xl(c._transformStreamController),ds(c._writable._writableStreamController,l),Vh(c)}a(qh,"TransformStreamErrorWritableAndUnblockWrite");function Vh(c){c._backpressure&&Pl(c,!1)}a(Vh,"TransformStreamUnblockWrite");function Pl(c,l){c._backpressureChangePromise!==void 0&&c._backpressureChangePromise_resolve(),c._backpressureChangePromise=d(_=>{c._backpressureChangePromise_resolve=_}),c._backpressure=l}a(Pl,"TransformStreamSetBackpressure");class uo{static{a(this,"TransformStreamDefaultController")}constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!wl(this))throw Al("desiredSize");let l=this._controlledTransformStream._readable._readableStreamController;return Fh(l)}enqueue(l=void 0){if(!wl(this))throw Al("enqueue");sw(this,l)}error(l=void 0){if(!wl(this))throw Al("error");ZU(this,l)}terminate(){if(!wl(this))throw Al("terminate");WU(this)}}Object.defineProperties(uo.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),r(uo.prototype.enqueue,"enqueue"),r(uo.prototype.error,"error"),r(uo.prototype.terminate,"terminate"),typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(uo.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function wl(c){return!n(c)||!Object.prototype.hasOwnProperty.call(c,"_controlledTransformStream")?!1:c instanceof uo}a(wl,"IsTransformStreamDefaultController");function GU(c,l,_,P,I){l._controlledTransformStream=c,c._transformStreamController=l,l._transformAlgorithm=_,l._flushAlgorithm=P,l._cancelAlgorithm=I,l._finishPromise=void 0,l._finishPromise_resolve=void 0,l._finishPromise_reject=void 0}a(GU,"SetUpTransformStreamDefaultController");function HU(c,l){let _=Object.create(uo.prototype),P,I,j;l.transform!==void 0?P=a(G=>l.transform(G,_),"transformAlgorithm"):P=a(G=>{try{return sw(_,G),f(void 0)}catch(me){return h(me)}},"transformAlgorithm"),l.flush!==void 0?I=a(()=>l.flush(_),"flushAlgorithm"):I=a(()=>f(void 0),"flushAlgorithm"),l.cancel!==void 0?j=a(G=>l.cancel(G),"cancelAlgorithm"):j=a(()=>f(void 0),"cancelAlgorithm"),GU(c,_,P,I,j)}a(HU,"SetUpTransformStreamDefaultControllerFromTransformer");function xl(c){c._transformAlgorithm=void 0,c._flushAlgorithm=void 0,c._cancelAlgorithm=void 0}a(xl,"TransformStreamDefaultControllerClearAlgorithms");function sw(c,l){let _=c._controlledTransformStream,P=_._readable._readableStreamController;if(!Li(P))throw new TypeError("Readable side is not in a state that permits enqueue");try{Mi(P,l)}catch(j){throw qh(_,j),_._readable._storedError}SU(P)!==_._backpressure&&Pl(_,!0)}a(sw,"TransformStreamDefaultControllerEnqueue");function ZU(c,l){aw(c._controlledTransformStream,l)}a(ZU,"TransformStreamDefaultControllerError");function cw(c,l){let _=c._transformAlgorithm(l);return v(_,void 0,P=>{throw aw(c._controlledTransformStream,P),P})}a(cw,"TransformStreamDefaultControllerPerformTransform");function WU(c){let l=c._controlledTransformStream,_=l._readable._readableStreamController;Ho(_);let P=new TypeError("TransformStream terminated");qh(l,P)}a(WU,"TransformStreamDefaultControllerTerminate");function KU(c,l){let _=c._transformStreamController;if(c._backpressure){let P=c._backpressureChangePromise;return v(P,()=>{let I=c._writable;if(I._state==="erroring")throw I._storedError;return cw(_,l)})}return cw(_,l)}a(KU,"TransformStreamDefaultSinkWriteAlgorithm");function JU(c,l){let _=c._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let P=c._readable;_._finishPromise=d((j,G)=>{_._finishPromise_resolve=j,_._finishPromise_reject=G});let I=_._cancelAlgorithm(l);return xl(_),m(I,()=>(P._state==="errored"?ji(_,P._storedError):(Wr(P._readableStreamController,l),Gh(_)),null),j=>(Wr(P._readableStreamController,j),ji(_,j),null)),_._finishPromise}a(JU,"TransformStreamDefaultSinkAbortAlgorithm");function YU(c){let l=c._transformStreamController;if(l._finishPromise!==void 0)return l._finishPromise;let _=c._readable;l._finishPromise=d((I,j)=>{l._finishPromise_resolve=I,l._finishPromise_reject=j});let P=l._flushAlgorithm();return xl(l),m(P,()=>(_._state==="errored"?ji(l,_._storedError):(Ho(_._readableStreamController),Gh(l)),null),I=>(Wr(_._readableStreamController,I),ji(l,I),null)),l._finishPromise}a(YU,"TransformStreamDefaultSinkCloseAlgorithm");function XU(c){return Pl(c,!1),c._backpressureChangePromise}a(XU,"TransformStreamDefaultSourcePullAlgorithm");function QU(c,l){let _=c._transformStreamController;if(_._finishPromise!==void 0)return _._finishPromise;let P=c._writable;_._finishPromise=d((j,G)=>{_._finishPromise_resolve=j,_._finishPromise_reject=G});let I=_._cancelAlgorithm(l);return xl(_),m(I,()=>(P._state==="errored"?ji(_,P._storedError):(ds(P._writableStreamController,l),Vh(c),Gh(_)),null),j=>(ds(P._writableStreamController,j),Vh(c),ji(_,j),null)),_._finishPromise}a(QU,"TransformStreamDefaultSourceCancelAlgorithm");function Al(c){return new TypeError(`TransformStreamDefaultController.prototype.${c} can only be used on a TransformStreamDefaultController`)}a(Al,"defaultControllerBrandCheckException");function Gh(c){c._finishPromise_resolve!==void 0&&(c._finishPromise_resolve(),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(Gh,"defaultControllerFinishPromiseResolve");function ji(c,l){c._finishPromise_reject!==void 0&&(E(c._finishPromise),c._finishPromise_reject(l),c._finishPromise_resolve=void 0,c._finishPromise_reject=void 0)}a(ji,"defaultControllerFinishPromiseReject");function uw(c){return new TypeError(`TransformStream.prototype.${c} can only be used on a TransformStream`)}a(uw,"streamBrandCheckException"),e.ByteLengthQueuingStrategy=El,e.CountQueuingStrategy=Sl,e.ReadableByteStreamController=kn,e.ReadableStream=Vt,e.ReadableStreamBYOBReader=io,e.ReadableStreamBYOBRequest=jo,e.ReadableStreamDefaultController=Dn,e.ReadableStreamDefaultReader=Y,e.TransformStream=Tl,e.TransformStreamDefaultController=uo,e.WritableStream=ao,e.WritableStreamDefaultController=Ui,e.WritableStreamDefaultWriter=$n}))});var V0=z(()=>{if(!globalThis.ReadableStream)try{let e=require("node:process"),{emitWarning:t}=e;try{e.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),e.emitWarning=t}catch(n){throw e.emitWarning=t,n}}catch{Object.assign(globalThis,q0())}try{let{Blob:e}=require("buffer");e&&!e.prototype.stream&&(e.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*Jb(e,t=!0){for(let n of e)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(t){let o=n.byteOffset,r=n.byteOffset+n.byteLength;for(;o!==r;){let i=Math.min(r-o,G0),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+G0)).arrayBuffer();o+=s.byteLength,yield new Uint8Array(s)}}}var qoe,G0,H0,F4,rn,hu=$t(()=>{qoe=Ke(V0(),1);G0=65536;a(Jb,"toIterator");H0=class Yb{static{a(this,"Blob")}#e=[];#t="";#r=0;#n="transparent";constructor(t=[],n={}){if(typeof t!="object"||t===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof t[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 t){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 Yb?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 t=new TextDecoder,n="";for await(let o of Jb(this.#e,!1))n+=t.decode(o,{stream:!0});return n+=t.decode(),n}async arrayBuffer(){let t=new Uint8Array(this.size),n=0;for await(let o of Jb(this.#e,!1))t.set(o,n),n+=o.length;return t.buffer}stream(){let t=Jb(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let o=await t.next();o.done?n.close():n.enqueue(o.value)},async cancel(){await t.return()}})}slice(t=0,n=this.size,o=""){let{size:r}=this,i=t<0?Math.max(r+t,0):Math.min(t,r),s=n<0?Math.max(r+n,0):Math.min(n,r),u=Math.max(s-i,0),d=this.#e,f=[],h=0;for(let m of d){if(h>=u)break;let p=ArrayBuffer.isView(m)?m.byteLength:m.size;if(i&&p<=i)i-=p,s-=p;else{let y;ArrayBuffer.isView(m)?(y=m.subarray(i,Math.min(p,s)),h+=y.byteLength):(y=m.slice(i,Math.min(p,s)),h+=y.size),s-=p,f.push(y),i=0}}let g=new Yb([],{type:String(o).toLowerCase()});return g.#r=u,g.#e=f,g}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t=="object"&&typeof t.constructor=="function"&&(typeof t.stream=="function"||typeof t.arrayBuffer=="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(H0.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});F4=H0,rn=F4});var B4,q4,Oo,Xb=$t(()=>{hu();B4=class extends rn{static{a(this,"File")}#e=0;#t="";constructor(t,n,o={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(t,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](t){return!!t&&t instanceof rn&&/^(File)$/.test(t[Symbol.toStringTag])}},q4=B4,Oo=q4});function K0(e,t=rn){var n=`${Z0()}${Z0()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),o=[],r=`--${n}\r
15
+ Content-Disposition: form-data; name="`;return e.forEach((i,s)=>typeof i=="string"?o.push(r+Qb(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+tp(u)+`"; filename="${tp(s.name,1)}"\r
20
- Content-Type: ${s.type||"application/octet-stream"}\r
19
+ `):o.push(r+Qb(s)+`"; filename="${Qb(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 ga,$$,D$,BE,N$,VE,tp,ho,Zn,Sc=wt(()=>{ha();ep();({toStringTag:ga,iterator:$$,hasInstance:D$}=Symbol),BE=Math.random,N$="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),VE=o((t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[ga])?[(r=r!==void 0?r+"":e[ga]=="File"?e.name:"blob",t),e.name!==r||e[ga]=="blob"?new Wn([e],r,e):e]:[t,e+""]),"f"),tp=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"),ho=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"),Zn=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[ga](){return"FormData"}[$$](){return this.entries()}static[D$](e){return e&&typeof e=="object"&&e[ga]==="FormData"&&!N$.some(r=>typeof e[r]!="function")}append(...e){ho("append",arguments,2),this.#e.push(VE(...e))}delete(e){ho("delete",arguments,1),e+="",this.#e=this.#e.filter(([r])=>r!==e)}get(e){ho("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 ho("getAll",arguments,1),r=[],e+="",this.#e.forEach(n=>n[0]===e&&r.push(n[1])),r}has(e){return ho("has",arguments,1),e+="",this.#e.some(r=>r[0]===e)}forEach(e,r){ho("forEach",arguments,1);for(var[n,i]of this)e.call(r,i,n,this)}set(...e){ho("set",arguments,2);var r=[],n=!0;e=VE(...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(GE,"formDataToBlob")});var gn,Tc=wt(()=>{gn=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 zt,rp=wt(()=>{Tc();zt=class extends gn{static{o(this,"FetchError")}constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}});var wc,np,ya,HE,WE,ZE,Pc=wt(()=>{wc=Symbol.toStringTag,np=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[wc]==="URLSearchParams","isURLSearchParameters"),ya=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[wc]),"isBlob"),HE=o(t=>typeof t=="object"&&(t[wc]==="AbortSignal"||t[wc]==="EventTarget"),"isAbortSignal"),WE=o((t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},"isDomainOrSubdomain"),ZE=o((t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n},"isSameProtocol")});var JE=D((OY,KE)=>{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)}KE.exports=globalThis.DOMException});var go,YE,XE,op,QE,eS,tS,rS,nS,oS,xc,ip=wt(()=>{go=require("node:fs"),YE=require("node:path"),XE=Be(JE(),1);ep();ha();({stat:op}=go.promises),QE=o((t,e)=>nS((0,go.statSync)(t),t,e),"blobFromSync"),eS=o((t,e)=>op(t).then(r=>nS(r,t,e)),"blobFrom"),tS=o((t,e)=>op(t).then(r=>oS(r,t,e)),"fileFrom"),rS=o((t,e)=>oS((0,go.statSync)(t),t,e),"fileFromSync"),nS=o((t,e,r="")=>new Ir([new xc({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],{type:r}),"fromBlob"),oS=o((t,e,r="")=>new Wn([new xc({path:e,size:t.size,lastModified:t.mtimeMs,start:0})],(0,YE.basename)(e),{type:r,lastModified:t.mtimeMs}),"fromFile"),xc=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 op(this.#e);if(e>this.lastModified)throw new XE.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,go.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var aS={};Rs(aS,{toFormData:()=>q$});function F$(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 q$(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 ap(r[1]||r[2]),i,s,u,d,p,h,y=[],m=new Zn,f=o(b=>{u+=E.decode(b,{stream:!0})},"onPartData"),l=o(b=>{y.push(b)},"appendToFile"),g=o(()=>{let b=new Wn(y,h,{type:p});m.append(d,b)},"appendFileToFormData"),v=o(()=>{m.append(d,u)},"appendEntryToFormData"),E=new TextDecoder("utf-8");E.decode(),n.onPartBegin=function(){n.onPartData=f,n.onPartEnd=v,i="",s="",u="",d="",p="",h=null,y.length=0},n.onHeaderField=function(b){i+=E.decode(b,{stream:!0})},n.onHeaderValue=function(b){s+=E.decode(b,{stream:!0})},n.onHeaderEnd=function(){if(s+=E.decode(),i=i.toLowerCase(),i==="content-disposition"){let b=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);b&&(d=b[2]||b[3]||""),h=F$(s),h&&(n.onPartData=l,n.onPartEnd=g)}else i==="content-type"&&(p=s);s="",i=""};for await(let b of t)n.write(b);return n.end(),m}var qr,ot,iS,Kn,Ac,Ic,z$,va,U$,M$,L$,j$,yo,ap,sS=wt(()=>{ip();Sc();qr=0,ot={START_BOUNDARY:qr++,HEADER_FIELD_START:qr++,HEADER_FIELD:qr++,HEADER_VALUE_START:qr++,HEADER_VALUE:qr++,HEADER_VALUE_ALMOST_DONE:qr++,HEADERS_ALMOST_DONE:qr++,PART_DATA_START:qr++,PART_DATA:qr++,END:qr++},iS=1,Kn={PART_BOUNDARY:iS,LAST_BOUNDARY:iS*=2},Ac=10,Ic=13,z$=32,va=45,U$=58,M$=97,L$=122,j$=o(t=>t|32,"lower"),yo=o(()=>{},"noop"),ap=class{static{o(this,"MultipartParser")}constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=yo,this.onHeaderField=yo,this.onHeadersEnd=yo,this.onHeaderValue=yo,this.onPartBegin=yo,this.onPartData=yo,this.onPartEnd=yo,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=ot.START_BOUNDARY}write(e){let r=0,n=e.length,i=this.index,{lookbehind:s,boundary:u,boundaryChars:d,index:p,state:h,flags:y}=this,m=this.boundary.length,f=m-1,l=e.length,g,v,E=o(Y=>{this[Y+"Mark"]=r},"mark"),b=o(Y=>{delete this[Y+"Mark"]},"clear"),C=o((Y,Z,G,X)=>{(Z===void 0||Z!==G)&&this[Y](X&&X.subarray(Z,G))},"callback"),U=o((Y,Z)=>{let G=Y+"Mark";G in this&&(Z?(C(Y,this[G],r,e),delete this[G]):(C(Y,this[G],e.length,e),this[G]=0))},"dataCallback");for(r=0;r<n;r++)switch(g=e[r],h){case ot.START_BOUNDARY:if(p===u.length-2){if(g===va)y|=Kn.LAST_BOUNDARY;else if(g!==Ic)return;p++;break}else if(p-1===u.length-2){if(y&Kn.LAST_BOUNDARY&&g===va)h=ot.END,y=0;else if(!(y&Kn.LAST_BOUNDARY)&&g===Ac)p=0,C("onPartBegin"),h=ot.HEADER_FIELD_START;else return;break}g!==u[p+2]&&(p=-2),g===u[p+2]&&p++;break;case ot.HEADER_FIELD_START:h=ot.HEADER_FIELD,E("onHeaderField"),p=0;case ot.HEADER_FIELD:if(g===Ic){b("onHeaderField"),h=ot.HEADERS_ALMOST_DONE;break}if(p++,g===va)break;if(g===U$){if(p===1)return;U("onHeaderField",!0),h=ot.HEADER_VALUE_START;break}if(v=j$(g),v<M$||v>L$)return;break;case ot.HEADER_VALUE_START:if(g===z$)break;E("onHeaderValue"),h=ot.HEADER_VALUE;case ot.HEADER_VALUE:g===Ic&&(U("onHeaderValue",!0),C("onHeaderEnd"),h=ot.HEADER_VALUE_ALMOST_DONE);break;case ot.HEADER_VALUE_ALMOST_DONE:if(g!==Ac)return;h=ot.HEADER_FIELD_START;break;case ot.HEADERS_ALMOST_DONE:if(g!==Ac)return;C("onHeadersEnd"),h=ot.PART_DATA_START;break;case ot.PART_DATA_START:h=ot.PART_DATA,E("onPartData");case ot.PART_DATA:if(i=p,p===0){for(r+=f;r<l&&!(e[r]in d);)r+=m;r-=f,g=e[r]}if(p<u.length)u[p]===g?(p===0&&U("onPartData",!0),p++):p=0;else if(p===u.length)p++,g===Ic?y|=Kn.PART_BOUNDARY:g===va?y|=Kn.LAST_BOUNDARY:p=0;else if(p-1===u.length)if(y&Kn.PART_BOUNDARY){if(p=0,g===Ac){y&=~Kn.PART_BOUNDARY,C("onPartEnd"),C("onPartBegin"),h=ot.HEADER_FIELD_START;break}}else y&Kn.LAST_BOUNDARY&&g===va?(C("onPartEnd"),h=ot.END,y=0):p=0;if(p>0)s[p-1]=g;else if(i>0){let Y=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);C("onPartData",0,i,Y),i=0,E("onPartData"),r--}break;case ot.END:break;default:throw new Error(`Unexpected state entered: ${h}`)}U("onHeaderField"),U("onHeaderValue"),U("onPartData"),this.index=p,this.state=h,this.flags=y}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")}};o(F$,"_fileName");o(q$,"toFormData")});async function sp(t){if(t[Vt].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[Vt].disturbed=!0,t[Vt].error)throw t[Vt].error;let{body:e}=t;if(e===null)return Xt.Buffer.alloc(0);if(!(e instanceof gr.default))return Xt.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 zt(`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 gn?i:new zt(`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")?Xt.Buffer.from(r.join("")):Xt.Buffer.concat(r,n)}catch(i){throw new zt(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new zt(`Premature close of server response while trying to fetch ${t.url}`)}var gr,yn,Xt,B$,Vt,Br,ai,V$,Rc,cS,uS,Cc=wt(()=>{gr=Be(require("node:stream"),1),yn=require("node:util"),Xt=require("node:buffer");ha();Sc();rp();Tc();Pc();B$=(0,yn.promisify)(gr.default.pipeline),Vt=Symbol("Body internals"),Br=class{static{o(this,"Body")}constructor(e,{size:r=0}={}){let n=null;e===null?e=null:np(e)?e=Xt.Buffer.from(e.toString()):ya(e)||Xt.Buffer.isBuffer(e)||(yn.types.isAnyArrayBuffer(e)?e=Xt.Buffer.from(e):ArrayBuffer.isView(e)?e=Xt.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof gr.default||(e instanceof Zn?(e=GE(e),n=e.type.split("=")[1]):e=Xt.Buffer.from(String(e))));let i=e;Xt.Buffer.isBuffer(e)?i=gr.default.Readable.from(e):ya(e)&&(i=gr.default.Readable.from(e.stream())),this[Vt]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof gr.default&&e.on("error",s=>{let u=s instanceof gn?s:new zt(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[Vt].error=u})}get body(){return this[Vt].stream}get bodyUsed(){return this[Vt].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await sp(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 Zn,i=new URLSearchParams(await this.text());for(let[s,u]of i)n.append(s,u);return n}let{toFormData:r}=await Promise.resolve().then(()=>(sS(),aS));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[Vt].body&&this[Vt].body.type||"",r=await this.arrayBuffer();return new Ir([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await sp(this);return new TextDecoder().decode(e)}buffer(){return sp(this)}};Br.prototype.buffer=(0,yn.deprecate)(Br.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Br.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,yn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});o(sp,"consumeBody");ai=o((t,e)=>{let r,n,{body:i}=t[Vt];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof gr.default&&typeof i.getBoundary!="function"&&(r=new gr.PassThrough({highWaterMark:e}),n=new gr.PassThrough({highWaterMark:e}),i.pipe(r),i.pipe(n),t[Vt].stream=r,i=n),i},"clone"),V$=(0,yn.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"),Rc=o((t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":np(t)?"application/x-www-form-urlencoded;charset=UTF-8":ya(t)?t.type||null:Xt.Buffer.isBuffer(t)||yn.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof Zn?`multipart/form-data; boundary=${e[Vt].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${V$(t)}`:t instanceof gr.default?null:"text/plain;charset=UTF-8","extractContentType"),cS=o(t=>{let{body:e}=t[Vt];return e===null?0:ya(e)?e.size:Xt.Buffer.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},"getTotalBytes"),uS=o(async(t,{body:e})=>{e===null?t.end():await B$(e,t)},"writeToStream")});function lS(t=[]){return new Gt(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Oc(e),up(e,String(r)),!0}catch{return!1}}))}var cp,_a,Oc,up,Gt,kc=wt(()=>{cp=require("node:util"),_a=Be(require("node:http"),1),Oc=typeof _a.default.validateHeaderName=="function"?_a.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}},up=typeof _a.default.validateHeaderValue=="function"?_a.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}},Gt=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(u=>[i,u]))}else if(e!=null)if(typeof e=="object"&&!cp.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"||cp.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])=>(Oc(n),up(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(u,d)=>(Oc(u),up(u,String(d)),URLSearchParams.prototype[i].call(n,String(u).toLowerCase(),String(d)));case"delete":case"has":case"getAll":return u=>(Oc(u),URLSearchParams.prototype[i].call(n,String(u).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(Gt.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));o(lS,"fromRawHeaders")});var G$,ba,lp=wt(()=>{G$=new Set([301,302,303,307,308]),ba=o(t=>G$.has(t),"isRedirect")});var Rr,Qt,dS=wt(()=>{kc();Cc();lp();Rr=Symbol("Response internals"),Qt=class t extends Br{static{o(this,"Response")}constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new Gt(r.headers);if(e!==null&&!i.has("Content-Type")){let s=Rc(e,this);s&&i.append("Content-Type",s)}this[Rr]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Rr].type}get url(){return this[Rr].url||""}get status(){return this[Rr].status}get ok(){return this[Rr].status>=200&&this[Rr].status<300}get redirected(){return this[Rr].counter>0}get statusText(){return this[Rr].statusText}get headers(){return this[Rr].headers}get highWaterMark(){return this[Rr].highWaterMark}clone(){return new t(ai(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(!ba(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[Rr].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 Gt(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(Qt.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 pS,fS=wt(()=>{pS=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 mS(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 vS(t){if(!gS.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function H$(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=(0,hS.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 si(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:H$(t)}function _S(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=mS(i),u=mS(i,!0);s.toString().length>4096&&(s=u),e&&(s=e(s)),r&&(u=r(u));let d=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return s;case"strict-origin":return si(s)&&!si(d)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return s.origin===d.origin?s:si(s)&&!si(d)?"no-referrer":u;case"same-origin":return s.origin===d.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===d.origin?s:u;case"no-referrer-when-downgrade":return si(s)&&!si(d)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function bS(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&gS.has(n)&&(r=n);return r}var hS,gS,yS,dp=wt(()=>{hS=require("node:net");o(mS,"stripURLForUseAsAReferrer");gS=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),yS="strict-origin-when-cross-origin";o(vS,"validateReferrerPolicy");o(H$,"isOriginPotentiallyTrustworthy");o(si,"isUrlPotentiallyTrustworthy");o(_S,"determineRequestsReferrer");o(bS,"parseReferrerPolicyFromHeader")});var ES,SS,Rt,Ea,W$,Jn,TS,wS=wt(()=>{ES=require("node:url"),SS=require("node:util");kc();Cc();Pc();fS();dp();Rt=Symbol("Request internals"),Ea=o(t=>typeof t=="object"&&typeof t[Rt]=="object","isRequest"),W$=(0,SS.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 Br{static{o(this,"Request")}constructor(e,r={}){let n;if(Ea(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()),!Ea(r)&&"data"in r&&W$(),(r.body!=null||Ea(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:Ea(e)&&e.body!==null?ai(e):null;super(s,{size:r.size||e.size||0});let u=new Gt(r.headers||e.headers||{});if(s!==null&&!u.has("Content-Type")){let h=Rc(s,this);h&&u.set("Content-Type",h)}let d=Ea(e)?e.signal:null;if("signal"in r&&(d=r.signal),d!=null&&!HE(d))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let p=r.referrer==null?e.referrer:r.referrer;if(p==="")p="no-referrer";else if(p){let h=new URL(p);p=/^about:(\/\/)?client$/.test(h)?"client":h}else p=void 0;this[Rt]={method:i,redirect:r.redirect||e.redirect||"follow",headers:u,parsedURL:n,signal:d,referrer:p},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[Rt].method}get url(){return(0,ES.format)(this[Rt].parsedURL)}get headers(){return this[Rt].headers}get redirect(){return this[Rt].redirect}get signal(){return this[Rt].signal}get referrer(){if(this[Rt].referrer==="no-referrer")return"";if(this[Rt].referrer==="client")return"about:client";if(this[Rt].referrer)return this[Rt].referrer.toString()}get referrerPolicy(){return this[Rt].referrerPolicy}set referrerPolicy(e){this[Rt].referrerPolicy=vS(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}});TS=o(t=>{let{parsedURL:e}=t[Rt],r=new Gt(t[Rt].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=cS(t);typeof d=="number"&&!Number.isNaN(d)&&(n=String(d))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=yS),t.referrer&&t.referrer!=="no-referrer"?t[Rt].referrer=_S(t):t[Rt].referrer="no-referrer",t[Rt].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=pS(e),u={path:e.pathname+s,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:u}},"getNodeRequestOptions")});var Sa,PS=wt(()=>{Tc();Sa=class extends gn{static{o(this,"AbortError")}constructor(e,r="aborted"){super(e,r)}}});var IS={};Rs(IS,{AbortError:()=>Sa,Blob:()=>Ir,FetchError:()=>zt,File:()=>Wn,FormData:()=>Zn,Headers:()=>Gt,Request:()=>Jn,Response:()=>Qt,blobFrom:()=>eS,blobFromSync:()=>QE,default:()=>pp,fileFrom:()=>tS,fileFromSync:()=>rS,isRedirect:()=>ba});async function pp(t,e){return new Promise((r,n)=>{let i=new Jn(t,e),{parsedURL:s,options:u}=TS(i);if(!Z$.has(s.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let g=zE(i.url),v=new Qt(g,{headers:{"Content-Type":g.typeFull}});r(v);return}let d=(s.protocol==="https:"?AS.default:xS.default).request,{signal:p}=i,h=null,y=o(()=>{let g=new Sa("The operation was aborted.");n(g),i.body&&i.body instanceof er.default.Readable&&i.body.destroy(g),!(!h||!h.body)&&h.body.emit("error",g)},"abort");if(p&&p.aborted){y();return}let m=o(()=>{y(),l()},"abortAndFinalize"),f=d(s.toString(),u);p&&p.addEventListener("abort",m);let l=o(()=>{f.abort(),p&&p.removeEventListener("abort",m)},"finalize");f.on("error",g=>{n(new zt(`request to ${i.url} failed, reason: ${g.message}`,"system",g)),l()}),K$(f,g=>{h&&h.body&&h.body.destroy(g)}),process.version<"v14"&&f.on("socket",g=>{let v;g.prependListener("end",()=>{v=g._eventsCount}),g.prependListener("close",E=>{if(h&&v<g._eventsCount&&!E){let b=new Error("Premature close");b.code="ERR_STREAM_PREMATURE_CLOSE",h.body.emit("error",b)}})}),f.on("response",g=>{f.setTimeout(0);let v=lS(g.rawHeaders);if(ba(g.statusCode)){let Y=v.get("Location"),Z=null;try{Z=Y===null?null:new URL(Y,i.url)}catch{if(i.redirect!=="manual"){n(new zt(`uri requested responds with an invalid redirect URL: ${Y}`,"invalid-redirect")),l();return}}switch(i.redirect){case"error":n(new zt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),l();return;case"manual":break;case"follow":{if(Z===null)break;if(i.counter>=i.follow){n(new zt(`maximum redirect reached at: ${i.url}`,"max-redirect")),l();return}let G={headers:new Gt(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:ai(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!WE(i.url,Z)||!ZE(i.url,Z))for(let te of["authorization","www-authenticate","cookie","cookie2"])G.headers.delete(te);if(g.statusCode!==303&&i.body&&e.body instanceof er.default.Readable){n(new zt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),l();return}(g.statusCode===303||(g.statusCode===301||g.statusCode===302)&&i.method==="POST")&&(G.method="GET",G.body=void 0,G.headers.delete("content-length"));let X=bS(v);X&&(G.referrerPolicy=X),r(pp(new Jn(Z,G))),l();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}p&&g.once("end",()=>{p.removeEventListener("abort",m)});let E=(0,er.pipeline)(g,new er.PassThrough,Y=>{Y&&n(Y)});process.version<"v12.10"&&g.on("aborted",m);let b={url:i.url,status:g.statusCode,statusText:g.statusMessage,headers:v,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},C=v.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||C===null||g.statusCode===204||g.statusCode===304){h=new Qt(E,b),r(h);return}let U={flush:vo.default.Z_SYNC_FLUSH,finishFlush:vo.default.Z_SYNC_FLUSH};if(C==="gzip"||C==="x-gzip"){E=(0,er.pipeline)(E,vo.default.createGunzip(U),Y=>{Y&&n(Y)}),h=new Qt(E,b),r(h);return}if(C==="deflate"||C==="x-deflate"){let Y=(0,er.pipeline)(g,new er.PassThrough,Z=>{Z&&n(Z)});Y.once("data",Z=>{(Z[0]&15)===8?E=(0,er.pipeline)(E,vo.default.createInflate(),G=>{G&&n(G)}):E=(0,er.pipeline)(E,vo.default.createInflateRaw(),G=>{G&&n(G)}),h=new Qt(E,b),r(h)}),Y.once("end",()=>{h||(h=new Qt(E,b),r(h))});return}if(C==="br"){E=(0,er.pipeline)(E,vo.default.createBrotliDecompress(),Y=>{Y&&n(Y)}),h=new Qt(E,b),r(h);return}h=new Qt(E,b),r(h)}),uS(f,i).catch(n)})}function K$(t,e){let r=Ta.Buffer.from(`0\r
22
+ `,i,`\r
23
+ `)),o.push(`--${n}--`),new t(o,{type:"multipart/form-data; boundary="+n})}var gu,V4,G4,Z0,H4,W0,Qb,vi,ko,Lf=$t(()=>{hu();Xb();({toStringTag:gu,iterator:V4,hasInstance:G4}=Symbol),Z0=Math.random,H4="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),W0=a((e,t,n)=>(e+="",/^(Blob|File)$/.test(t&&t[gu])?[(n=n!==void 0?n+"":t[gu]=="File"?t.name:"blob",e),t.name!==n||t[gu]=="blob"?new Oo([t],n,t):t]:[e,t+""]),"f"),Qb=a((e,t)=>(t?e:e.replace(/\r?\n|\r/g,`\r
24
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e"),vi=a((e,t,n)=>{if(t.length<n)throw new TypeError(`Failed to execute '${e}' on 'FormData': ${n} arguments required, but only ${t.length} present.`)},"x"),ko=class{static{a(this,"FormData")}#e=[];constructor(...t){if(t.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[gu](){return"FormData"}[V4](){return this.entries()}static[G4](t){return t&&typeof t=="object"&&t[gu]==="FormData"&&!H4.some(n=>typeof t[n]!="function")}append(...t){vi("append",arguments,2),this.#e.push(W0(...t))}delete(t){vi("delete",arguments,1),t+="",this.#e=this.#e.filter(([n])=>n!==t)}get(t){vi("get",arguments,1),t+="";for(var n=this.#e,o=n.length,r=0;r<o;r++)if(n[r][0]===t)return n[r][1];return null}getAll(t,n){return vi("getAll",arguments,1),n=[],t+="",this.#e.forEach(o=>o[0]===t&&n.push(o[1])),n}has(t){return vi("has",arguments,1),t+="",this.#e.some(n=>n[0]===t)}forEach(t,n){vi("forEach",arguments,1);for(var[o,r]of this)t.call(n,r,o,this)}set(...t){vi("set",arguments,2);var n=[],o=!0;t=W0(...t),this.#e.forEach(r=>{r[0]===t[0]?o&&(o=!n.push(t)):n.push(r)}),o&&n.push(t),this.#e=n}*entries(){yield*this.#e}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};a(K0,"formDataToBlob")});var Hn,jf=$t(()=>{Hn=class extends Error{static{a(this,"FetchBaseError")}constructor(t,n){super(t),Error.captureStackTrace(this,this.constructor),this.type=n}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}});var Xt,eE=$t(()=>{jf();Xt=class extends Hn{static{a(this,"FetchError")}constructor(t,n,o){super(t,n),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}}});var Ff,tE,yu,J0,Y0,X0,Bf=$t(()=>{Ff=Symbol.toStringTag,tE=a(e=>typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&typeof e.sort=="function"&&e[Ff]==="URLSearchParams","isURLSearchParameters"),yu=a(e=>e&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&/^(Blob|File)$/.test(e[Ff]),"isBlob"),J0=a(e=>typeof e=="object"&&(e[Ff]==="AbortSignal"||e[Ff]==="EventTarget"),"isAbortSignal"),Y0=a((e,t)=>{let n=new URL(t).hostname,o=new URL(e).hostname;return n===o||n.endsWith(`.${o}`)},"isDomainOrSubdomain"),X0=a((e,t)=>{let n=new URL(t).protocol,o=new URL(e).protocol;return n===o},"isSameProtocol")});var eO=z((cie,Q0)=>{if(!globalThis.DOMException)try{let{MessageChannel:e}=require("worker_threads"),t=new e().port1,n=new ArrayBuffer;t.postMessage(n,[n,n])}catch(e){e.constructor.name==="DOMException"&&(globalThis.DOMException=e.constructor)}Q0.exports=globalThis.DOMException});var _i,tO,rO,rE,nO,oO,iO,aO,sO,cO,qf,nE=$t(()=>{_i=require("node:fs"),tO=require("node:path"),rO=Ke(eO(),1);Xb();hu();({stat:rE}=_i.promises),nO=a((e,t)=>sO((0,_i.statSync)(e),e,t),"blobFromSync"),oO=a((e,t)=>rE(e).then(n=>sO(n,e,t)),"blobFrom"),iO=a((e,t)=>rE(e).then(n=>cO(n,e,t)),"fileFrom"),aO=a((e,t)=>cO((0,_i.statSync)(e),e,t),"fileFromSync"),sO=a((e,t,n="")=>new rn([new qf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],{type:n}),"fromBlob"),cO=a((e,t,n="")=>new Oo([new qf({path:t,size:e.size,lastModified:e.mtimeMs,start:0})],(0,tO.basename)(t),{type:n,lastModified:e.mtimeMs}),"fromFile"),qf=class e{static{a(this,"BlobDataItem")}#e;#t;constructor(t){this.#e=t.path,this.#t=t.start,this.size=t.size,this.lastModified=t.lastModified}slice(t,n){return new e({path:this.#e,lastModified:this.lastModified,size:n-t,start:this.#t+t})}async*stream(){let{mtimeMs:t}=await rE(this.#e);if(t>this.lastModified)throw new rO.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,_i.createReadStream)(this.#e,{start:this.#t,end:this.#t+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}});var lO={};hr(lO,{toFormData:()=>Q4});function X4(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[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 Q4(e,t){if(!/multipart/i.test(t))throw new TypeError("Failed to fetch");let n=t.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n)throw new TypeError("no or bad content-type header, no multipart boundary");let o=new oE(n[1]||n[2]),r,i,s,u,d,f,h=[],g=new ko,m=a(b=>{s+=E.decode(b,{stream:!0})},"onPartData"),p=a(b=>{h.push(b)},"appendToFile"),y=a(()=>{let b=new Oo(h,f,{type:d});g.append(u,b)},"appendFileToFormData"),v=a(()=>{g.append(u,s)},"appendEntryToFormData"),E=new TextDecoder("utf-8");E.decode(),o.onPartBegin=function(){o.onPartData=m,o.onPartEnd=v,r="",i="",s="",u="",d="",f=null,h.length=0},o.onHeaderField=function(b){r+=E.decode(b,{stream:!0})},o.onHeaderValue=function(b){i+=E.decode(b,{stream:!0})},o.onHeaderEnd=function(){if(i+=E.decode(),r=r.toLowerCase(),r==="content-disposition"){let b=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);b&&(u=b[2]||b[3]||""),f=X4(i),f&&(o.onPartData=p,o.onPartEnd=y)}else r==="content-type"&&(d=i);i="",r=""};for await(let b of e)o.write(b);return o.end(),g}var gn,ft,uO,$o,Vf,Gf,Z4,vu,W4,K4,J4,Y4,bi,oE,dO=$t(()=>{nE();Lf();gn=0,ft={START_BOUNDARY:gn++,HEADER_FIELD_START:gn++,HEADER_FIELD:gn++,HEADER_VALUE_START:gn++,HEADER_VALUE:gn++,HEADER_VALUE_ALMOST_DONE:gn++,HEADERS_ALMOST_DONE:gn++,PART_DATA_START:gn++,PART_DATA:gn++,END:gn++},uO=1,$o={PART_BOUNDARY:uO,LAST_BOUNDARY:uO*=2},Vf=10,Gf=13,Z4=32,vu=45,W4=58,K4=97,J4=122,Y4=a(e=>e|32,"lower"),bi=a(()=>{},"noop"),oE=class{static{a(this,"MultipartParser")}constructor(t){this.index=0,this.flags=0,this.onHeaderEnd=bi,this.onHeaderField=bi,this.onHeadersEnd=bi,this.onHeaderValue=bi,this.onPartBegin=bi,this.onPartData=bi,this.onPartEnd=bi,this.boundaryChars={},t=`\r
25
+ --`+t;let n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o),this.boundaryChars[n[o]]=!0;this.boundary=n,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=ft.START_BOUNDARY}write(t){let n=0,o=t.length,r=this.index,{lookbehind:i,boundary:s,boundaryChars:u,index:d,state:f,flags:h}=this,g=this.boundary.length,m=g-1,p=t.length,y,v,E=a(Z=>{this[Z+"Mark"]=n},"mark"),b=a(Z=>{delete this[Z+"Mark"]},"clear"),k=a((Z,H,K,ee)=>{(H===void 0||H!==K)&&this[Z](ee&&ee.subarray(H,K))},"callback"),N=a((Z,H)=>{let K=Z+"Mark";K in this&&(H?(k(Z,this[K],n,t),delete this[K]):(k(Z,this[K],t.length,t),this[K]=0))},"dataCallback");for(n=0;n<o;n++)switch(y=t[n],f){case ft.START_BOUNDARY:if(d===s.length-2){if(y===vu)h|=$o.LAST_BOUNDARY;else if(y!==Gf)return;d++;break}else if(d-1===s.length-2){if(h&$o.LAST_BOUNDARY&&y===vu)f=ft.END,h=0;else if(!(h&$o.LAST_BOUNDARY)&&y===Vf)d=0,k("onPartBegin"),f=ft.HEADER_FIELD_START;else return;break}y!==s[d+2]&&(d=-2),y===s[d+2]&&d++;break;case ft.HEADER_FIELD_START:f=ft.HEADER_FIELD,E("onHeaderField"),d=0;case ft.HEADER_FIELD:if(y===Gf){b("onHeaderField"),f=ft.HEADERS_ALMOST_DONE;break}if(d++,y===vu)break;if(y===W4){if(d===1)return;N("onHeaderField",!0),f=ft.HEADER_VALUE_START;break}if(v=Y4(y),v<K4||v>J4)return;break;case ft.HEADER_VALUE_START:if(y===Z4)break;E("onHeaderValue"),f=ft.HEADER_VALUE;case ft.HEADER_VALUE:y===Gf&&(N("onHeaderValue",!0),k("onHeaderEnd"),f=ft.HEADER_VALUE_ALMOST_DONE);break;case ft.HEADER_VALUE_ALMOST_DONE:if(y!==Vf)return;f=ft.HEADER_FIELD_START;break;case ft.HEADERS_ALMOST_DONE:if(y!==Vf)return;k("onHeadersEnd"),f=ft.PART_DATA_START;break;case ft.PART_DATA_START:f=ft.PART_DATA,E("onPartData");case ft.PART_DATA:if(r=d,d===0){for(n+=m;n<p&&!(t[n]in u);)n+=g;n-=m,y=t[n]}if(d<s.length)s[d]===y?(d===0&&N("onPartData",!0),d++):d=0;else if(d===s.length)d++,y===Gf?h|=$o.PART_BOUNDARY:y===vu?h|=$o.LAST_BOUNDARY:d=0;else if(d-1===s.length)if(h&$o.PART_BOUNDARY){if(d=0,y===Vf){h&=~$o.PART_BOUNDARY,k("onPartEnd"),k("onPartBegin"),f=ft.HEADER_FIELD_START;break}}else h&$o.LAST_BOUNDARY&&y===vu?(k("onPartEnd"),f=ft.END,h=0):d=0;if(d>0)i[d-1]=y;else if(r>0){let Z=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);k("onPartData",0,r,Z),r=0,E("onPartData"),n--}break;case ft.END:break;default:throw new Error(`Unexpected state entered: ${f}`)}N("onHeaderField"),N("onHeaderValue"),N("onPartData"),this.index=d,this.state=f,this.flags=h}end(){if(this.state===ft.HEADER_FIELD_START&&this.index===0||this.state===ft.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==ft.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}};a(X4,"_fileName");a(Q4,"toFormData")});async function iE(e){if(e[lr].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[lr].disturbed=!0,e[lr].error)throw e[lr].error;let{body:t}=e;if(t===null)return Er.Buffer.alloc(0);if(!(t instanceof Fr.default))return Er.Buffer.alloc(0);let n=[],o=0;try{for await(let r of t){if(e.size>0&&o+r.length>e.size){let i=new Xt(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw t.destroy(i),i}o+=r.length,n.push(r)}}catch(r){throw r instanceof Hn?r:new Xt(`Invalid response body while trying to fetch ${e.url}: ${r.message}`,"system",r)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return n.every(r=>typeof r=="string")?Er.Buffer.from(n.join("")):Er.Buffer.concat(n,o)}catch(r){throw new Xt(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r)}else throw new Xt(`Premature close of server response while trying to fetch ${e.url}`)}var Fr,Zn,Er,e6,lr,yn,za,t6,Hf,pO,fO,Zf=$t(()=>{Fr=Ke(require("node:stream"),1),Zn=require("node:util"),Er=require("node:buffer");hu();Lf();eE();jf();Bf();e6=(0,Zn.promisify)(Fr.default.pipeline),lr=Symbol("Body internals"),yn=class{static{a(this,"Body")}constructor(t,{size:n=0}={}){let o=null;t===null?t=null:tE(t)?t=Er.Buffer.from(t.toString()):yu(t)||Er.Buffer.isBuffer(t)||(Zn.types.isAnyArrayBuffer(t)?t=Er.Buffer.from(t):ArrayBuffer.isView(t)?t=Er.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof Fr.default||(t instanceof ko?(t=K0(t),o=t.type.split("=")[1]):t=Er.Buffer.from(String(t))));let r=t;Er.Buffer.isBuffer(t)?r=Fr.default.Readable.from(t):yu(t)&&(r=Fr.default.Readable.from(t.stream())),this[lr]={body:t,stream:r,boundary:o,disturbed:!1,error:null},this.size=n,t instanceof Fr.default&&t.on("error",i=>{let s=i instanceof Hn?i:new Xt(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i);this[lr].error=s})}get body(){return this[lr].stream}get bodyUsed(){return this[lr].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:n,byteLength:o}=await iE(this);return t.slice(n,n+o)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let o=new ko,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(()=>(dO(),lO));return n(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[lr].body&&this[lr].body.type||"",n=await this.arrayBuffer();return new rn([n],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await iE(this);return new TextDecoder().decode(t)}buffer(){return iE(this)}};yn.prototype.buffer=(0,Zn.deprecate)(yn.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(yn.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Zn.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});a(iE,"consumeBody");za=a((e,t)=>{let n,o,{body:r}=e[lr];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof Fr.default&&typeof r.getBoundary!="function"&&(n=new Fr.PassThrough({highWaterMark:t}),o=new Fr.PassThrough({highWaterMark:t}),r.pipe(n),r.pipe(o),e[lr].stream=n,r=o),r},"clone"),t6=(0,Zn.deprecate)(e=>e.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Hf=a((e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":tE(e)?"application/x-www-form-urlencoded;charset=UTF-8":yu(e)?e.type||null:Er.Buffer.isBuffer(e)||Zn.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof ko?`multipart/form-data; boundary=${t[lr].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${t6(e)}`:e instanceof Fr.default?null:"text/plain;charset=UTF-8","extractContentType"),pO=a(e=>{let{body:t}=e[lr];return t===null?0:yu(t)?t.size:Er.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},"getTotalBytes"),fO=a(async(e,{body:t})=>{t===null?e.end():await e6(t,e)},"writeToStream")});function mO(e=[]){return new dr(e.reduce((t,n,o,r)=>(o%2===0&&t.push(r.slice(o,o+2)),t),[]).filter(([t,n])=>{try{return Wf(t),sE(t,String(n)),!0}catch{return!1}}))}var aE,_u,Wf,sE,dr,Kf=$t(()=>{aE=require("node:util"),_u=Ke(require("node:http"),1),Wf=typeof _u.default.validateHeaderName=="function"?_u.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},sE=typeof _u.default.validateHeaderValue=="function"?_u.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let n=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(n,"code",{value:"ERR_INVALID_CHAR"}),n}},dr=class e extends URLSearchParams{static{a(this,"Headers")}constructor(t){let n=[];if(t instanceof e){let o=t.raw();for(let[r,i]of Object.entries(o))n.push(...i.map(s=>[r,s]))}else if(t!=null)if(typeof t=="object"&&!aE.types.isBoxedPrimitive(t)){let o=t[Symbol.iterator];if(o==null)n.push(...Object.entries(t));else{if(typeof o!="function")throw new TypeError("Header pairs must be iterable");n=[...t].map(r=>{if(typeof r!="object"||aE.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])=>(Wf(o),sE(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)=>(Wf(s),sE(s,String(u)),URLSearchParams.prototype[r].call(o,String(s).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return s=>(Wf(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(t){let n=this.getAll(t);if(n.length===0)return null;let o=n.join(", ");return/^content-encoding$/i.test(t)&&(o=o.toLowerCase()),o}forEach(t,n=void 0){for(let o of this.keys())Reflect.apply(t,n,[this.get(o),o,this])}*values(){for(let t of this.keys())yield this.get(t)}*entries(){for(let t of this.keys())yield[t,this.get(t)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((t,n)=>(t[n]=this.getAll(n),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((t,n)=>{let o=this.getAll(n);return n==="host"?t[n]=o[0]:t[n]=o.length>1?o:o[0],t},{})}};Object.defineProperties(dr.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));a(mO,"fromRawHeaders")});var r6,bu,cE=$t(()=>{r6=new Set([301,302,303,307,308]),bu=a(e=>r6.has(e),"isRedirect")});var nn,Sr,hO=$t(()=>{Kf();Zf();cE();nn=Symbol("Response internals"),Sr=class e extends yn{static{a(this,"Response")}constructor(t=null,n={}){super(t,n);let o=n.status!=null?n.status:200,r=new dr(n.headers);if(t!==null&&!r.has("Content-Type")){let i=Hf(t,this);i&&r.append("Content-Type",i)}this[nn]={type:"default",url:n.url,status:o,statusText:n.statusText||"",headers:r,counter:n.counter,highWaterMark:n.highWaterMark}}get type(){return this[nn].type}get url(){return this[nn].url||""}get status(){return this[nn].status}get ok(){return this[nn].status>=200&&this[nn].status<300}get redirected(){return this[nn].counter>0}get statusText(){return this[nn].statusText}get headers(){return this[nn].headers}get highWaterMark(){return this[nn].highWaterMark}clone(){return new e(za(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(t,n=302){if(!bu(n))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new e(null,{headers:{location:new URL(t).toString()},status:n})}static error(){let t=new e(null,{status:0,statusText:""});return t[nn].type="error",t}static json(t=void 0,n={}){let o=JSON.stringify(t);if(o===void 0)throw new TypeError("data is not JSON serializable");let r=new dr(n&&n.headers);return r.has("content-type")||r.set("content-type","application/json"),new e(o,{...n,headers:r})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Sr.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 gO,yO=$t(()=>{gO=a(e=>{if(e.search)return e.search;let t=e.href.length-1,n=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-n.length]==="?"?"?":""},"getSearch")});function vO(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?"no-referrer":(e.username="",e.password="",e.hash="",t&&(e.pathname="",e.search=""),e)}function SO(e){if(!bO.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function n6(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,""),n=(0,_O.isIP)(t);return n===4&&/^127\./.test(t)||n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host==="localhost"||e.host.endsWith(".localhost")?!1:e.protocol==="file:"}function Ua(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:n6(e)}function TO(e,{referrerURLCallback:t,referrerOriginCallback:n}={}){if(e.referrer==="no-referrer"||e.referrerPolicy==="")return null;let o=e.referrerPolicy;if(e.referrer==="about:client")return"no-referrer";let r=e.referrer,i=vO(r),s=vO(r,!0);i.toString().length>4096&&(i=s),t&&(i=t(i)),n&&(s=n(s));let u=new URL(e.url);switch(o){case"no-referrer":return"no-referrer";case"origin":return s;case"unsafe-url":return i;case"strict-origin":return Ua(i)&&!Ua(u)?"no-referrer":s.toString();case"strict-origin-when-cross-origin":return i.origin===u.origin?i:Ua(i)&&!Ua(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 Ua(i)&&!Ua(u)?"no-referrer":i;default:throw new TypeError(`Invalid referrerPolicy: ${o}`)}}function PO(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),n="";for(let o of t)o&&bO.has(o)&&(n=o);return n}var _O,bO,EO,uE=$t(()=>{_O=require("node:net");a(vO,"stripURLForUseAsAReferrer");bO=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),EO="strict-origin-when-cross-origin";a(SO,"validateReferrerPolicy");a(n6,"isOriginPotentiallyTrustworthy");a(Ua,"isUrlPotentiallyTrustworthy");a(TO,"determineRequestsReferrer");a(PO,"parseReferrerPolicyFromHeader")});var wO,xO,jt,Eu,o6,Do,AO,IO=$t(()=>{wO=require("node:url"),xO=require("node:util");Kf();Zf();Bf();yO();uE();jt=Symbol("Request internals"),Eu=a(e=>typeof e=="object"&&typeof e[jt]=="object","isRequest"),o6=(0,xO.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),Do=class e extends yn{static{a(this,"Request")}constructor(t,n={}){let o;if(Eu(t)?o=new URL(t.url):(o=new URL(t),t={}),o.username!==""||o.password!=="")throw new TypeError(`${o} is an url with embedded credentials.`);let r=n.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(r)&&(r=r.toUpperCase()),!Eu(n)&&"data"in n&&o6(),(n.body!=null||Eu(t)&&t.body!==null)&&(r==="GET"||r==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let i=n.body?n.body:Eu(t)&&t.body!==null?za(t):null;super(i,{size:n.size||t.size||0});let s=new dr(n.headers||t.headers||{});if(i!==null&&!s.has("Content-Type")){let f=Hf(i,this);f&&s.set("Content-Type",f)}let u=Eu(t)?t.signal:null;if("signal"in n&&(u=n.signal),u!=null&&!J0(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=n.referrer==null?t.referrer:n.referrer;if(d==="")d="no-referrer";else if(d){let f=new URL(d);d=/^about:(\/\/)?client$/.test(f)?"client":f}else d=void 0;this[jt]={method:r,redirect:n.redirect||t.redirect||"follow",headers:s,parsedURL:o,signal:u,referrer:d},this.follow=n.follow===void 0?t.follow===void 0?20:t.follow:n.follow,this.compress=n.compress===void 0?t.compress===void 0?!0:t.compress:n.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent,this.highWaterMark=n.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=n.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=n.referrerPolicy||t.referrerPolicy||""}get method(){return this[jt].method}get url(){return(0,wO.format)(this[jt].parsedURL)}get headers(){return this[jt].headers}get redirect(){return this[jt].redirect}get signal(){return this[jt].signal}get referrer(){if(this[jt].referrer==="no-referrer")return"";if(this[jt].referrer==="client")return"about:client";if(this[jt].referrer)return this[jt].referrer.toString()}get referrerPolicy(){return this[jt].referrerPolicy}set referrerPolicy(t){this[jt].referrerPolicy=SO(t)}clone(){return new e(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(Do.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}});AO=a(e=>{let{parsedURL:t}=e[jt],n=new dr(e[jt].headers);n.has("Accept")||n.set("Accept","*/*");let o=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(o="0"),e.body!==null){let u=pO(e);typeof u=="number"&&!Number.isNaN(u)&&(o=String(u))}o&&n.set("Content-Length",o),e.referrerPolicy===""&&(e.referrerPolicy=EO),e.referrer&&e.referrer!=="no-referrer"?e[jt].referrer=TO(e):e[jt].referrer="no-referrer",e[jt].referrer instanceof URL&&n.set("Referer",e.referrer),n.has("User-Agent")||n.set("User-Agent","node-fetch"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip, deflate, br");let{agent:r}=e;typeof r=="function"&&(r=r(t));let i=gO(t),s={path:t.pathname+i,method:e.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:r};return{parsedURL:t,options:s}},"getNodeRequestOptions")});var Su,RO=$t(()=>{jf();Su=class extends Hn{static{a(this,"AbortError")}constructor(t,n="aborted"){super(t,n)}}});var kO={};hr(kO,{AbortError:()=>Su,Blob:()=>rn,FetchError:()=>Xt,File:()=>Oo,FormData:()=>ko,Headers:()=>dr,Request:()=>Do,Response:()=>Sr,blobFrom:()=>oO,blobFromSync:()=>nO,default:()=>lE,fileFrom:()=>iO,fileFromSync:()=>aO,isRedirect:()=>bu});async function lE(e,t){return new Promise((n,o)=>{let r=new Do(e,t),{parsedURL:i,options:s}=AO(r);if(!i6.has(i.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${i.protocol.replace(/:$/,"")}" is not supported.`);if(i.protocol==="data:"){let y=j0(r.url),v=new Sr(y,{headers:{"Content-Type":y.typeFull}});n(v);return}let u=(i.protocol==="https:"?OO.default:CO.default).request,{signal:d}=r,f=null,h=a(()=>{let y=new Su("The operation was aborted.");o(y),r.body&&r.body instanceof Tr.default.Readable&&r.body.destroy(y),!(!f||!f.body)&&f.body.emit("error",y)},"abort");if(d&&d.aborted){h();return}let g=a(()=>{h(),p()},"abortAndFinalize"),m=u(i.toString(),s);d&&d.addEventListener("abort",g);let p=a(()=>{m.abort(),d&&d.removeEventListener("abort",g)},"finalize");m.on("error",y=>{o(new Xt(`request to ${r.url} failed, reason: ${y.message}`,"system",y)),p()}),a6(m,y=>{f&&f.body&&f.body.destroy(y)}),process.version<"v14"&&m.on("socket",y=>{let v;y.prependListener("end",()=>{v=y._eventsCount}),y.prependListener("close",E=>{if(f&&v<y._eventsCount&&!E){let b=new Error("Premature close");b.code="ERR_STREAM_PREMATURE_CLOSE",f.body.emit("error",b)}})}),m.on("response",y=>{m.setTimeout(0);let v=mO(y.rawHeaders);if(bu(y.statusCode)){let Z=v.get("Location"),H=null;try{H=Z===null?null:new URL(Z,r.url)}catch{if(r.redirect!=="manual"){o(new Xt(`uri requested responds with an invalid redirect URL: ${Z}`,"invalid-redirect")),p();return}}switch(r.redirect){case"error":o(new Xt(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if(H===null)break;if(r.counter>=r.follow){o(new Xt(`maximum redirect reached at: ${r.url}`,"max-redirect")),p();return}let K={headers:new dr(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:za(r),signal:r.signal,size:r.size,referrer:r.referrer,referrerPolicy:r.referrerPolicy};if(!Y0(r.url,H)||!X0(r.url,H))for(let se of["authorization","www-authenticate","cookie","cookie2"])K.headers.delete(se);if(y.statusCode!==303&&r.body&&t.body instanceof Tr.default.Readable){o(new Xt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&r.method==="POST")&&(K.method="GET",K.body=void 0,K.headers.delete("content-length"));let ee=PO(v);ee&&(K.referrerPolicy=ee),n(lE(new Do(H,K))),p();return}default:return o(new TypeError(`Redirect option '${r.redirect}' is not a valid value of RequestRedirect`))}}d&&y.once("end",()=>{d.removeEventListener("abort",g)});let E=(0,Tr.pipeline)(y,new Tr.PassThrough,Z=>{Z&&o(Z)});process.version<"v12.10"&&y.on("aborted",g);let b={url:r.url,status:y.statusCode,statusText:y.statusMessage,headers:v,size:r.size,counter:r.counter,highWaterMark:r.highWaterMark},k=v.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||k===null||y.statusCode===204||y.statusCode===304){f=new Sr(E,b),n(f);return}let N={flush:Ei.default.Z_SYNC_FLUSH,finishFlush:Ei.default.Z_SYNC_FLUSH};if(k==="gzip"||k==="x-gzip"){E=(0,Tr.pipeline)(E,Ei.default.createGunzip(N),Z=>{Z&&o(Z)}),f=new Sr(E,b),n(f);return}if(k==="deflate"||k==="x-deflate"){let Z=(0,Tr.pipeline)(y,new Tr.PassThrough,H=>{H&&o(H)});Z.once("data",H=>{(H[0]&15)===8?E=(0,Tr.pipeline)(E,Ei.default.createInflate(),K=>{K&&o(K)}):E=(0,Tr.pipeline)(E,Ei.default.createInflateRaw(),K=>{K&&o(K)}),f=new Sr(E,b),n(f)}),Z.once("end",()=>{f||(f=new Sr(E,b),n(f))});return}if(k==="br"){E=(0,Tr.pipeline)(E,Ei.default.createBrotliDecompress(),Z=>{Z&&o(Z)}),f=new Sr(E,b),n(f);return}f=new Sr(E,b),n(f)}),fO(m,r).catch(o)})}function a6(e,t){let n=Tu.Buffer.from(`0\r
26
26
  \r
27
- `),n=!1,i=!1,s;t.on("response",u=>{let{headers:d}=u;n=d["transfer-encoding"]==="chunked"&&!d["content-length"]}),t.on("socket",u=>{let d=o(()=>{if(n&&!i){let h=new Error("Premature close");h.code="ERR_STREAM_PREMATURE_CLOSE",e(h)}},"onSocketClose"),p=o(h=>{i=Ta.Buffer.compare(h.slice(-5),r)===0,!i&&s&&(i=Ta.Buffer.compare(s.slice(-3),r.slice(0,3))===0&&Ta.Buffer.compare(h.slice(-2),r.slice(3))===0),s=h},"onData");u.prependListener("close",d),u.on("data",p),t.on("close",()=>{u.removeListener("close",d),u.removeListener("data",p)})})}var xS,AS,vo,er,Ta,Z$,RS=wt(()=>{xS=Be(require("node:http"),1),AS=Be(require("node:https"),1),vo=Be(require("node:zlib"),1),er=Be(require("node:stream"),1),Ta=require("node:buffer");UE();Cc();dS();kc();wS();rp();PS();lp();Sc();Pc();dp();ip();Z$=new Set(["data:","http:","https:"]);o(pp,"fetch");o(K$,"fixResponseChunkedTransferBadEnding")});var kS=D(ui=>{"use strict";var J$=ui&&ui.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},ci;Object.defineProperty(ui,"__esModule",{value:!0});ui.Gaxios=void 0;var Y$=J$(fa()),X$=require("https"),_o=qd(),Q$=lE(),CS=require("stream"),OS=Gd(),eD=o(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),tD=204,$c=class{static{o(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(e){this.defaults=e||{},this.interceptors={request:new OS.GaxiosInterceptorManager,response:new OS.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&&ci.mergeHeaders(s,r.headers),n&&ci.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 ci.#c(),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=_o.GaxiosError.extractAPIErrorFromResponse(r,`Request failed with status code ${r.status}`);throw new _o.GaxiosError(n?.message,e,r,n)}return r}catch(r){let n;r instanceof _o.GaxiosError?n=r:r instanceof Error?n=new _o.GaxiosError(r.message,e,void 0,r):n=new _o.GaxiosError("Unexpected Gaxios Error",e,void 0,r);let{shouldRetry:i,config:s}=await(0,Q$.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===tD)return"";if(e.maxContentLength&&r.headers.has("content-length")&&e.maxContentLength<Number.parseInt(r.headers?.get("content-length")||""))throw new _o.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 u of s)i.push(u.trim());for(let u of i)if(u instanceof RegExp){if(u.test(n.toString()))return!1}else if(u instanceof URL){if(u.origin===n.origin)return!1}else if(u.startsWith("*.")||u.startsWith(".")){let d=u.replace(/^\*\./,".");if(n.hostname.endsWith(d))return!1}else if(u===n.origin||u===n.hostname||u===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);ci.mergeHeaders(r,e.headers);let n=(0,Y$.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 u=n.paramsSerializer(n.params);u.startsWith("?")&&(u=u.slice(1));let d=n.url.toString().includes("?")?"&":"?";n.url=n.url+d+u}else{let u=n.url instanceof URL?n.url:new URL(n.url);for(let[d,p]of new URLSearchParams(n.params))u.searchParams.append(d,p);n.url=u}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 CS.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 u=await eD();r.set("content-type",`multipart/related; boundary=${u}`),n.body=CS.Readable.from(this.getMultipartRequest(n.multipart,u))}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 u=await ci.#s();this.agentCache.has(s)?n.agent=this.agentCache.get(s):(n.agent=new u(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 X$.Agent({cert:n.cert,key:n.key}),this.agentCache.set(n.key,n.agent)));return typeof n.errorRedactor!="function"&&n.errorRedactor!==!1&&(n.errorRedactor=_o.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;e.on("response",s=>{let{headers:u}=s;o=u["transfer-encoding"]==="chunked"&&!u["content-length"]}),e.on("socket",s=>{let u=a(()=>{if(o&&!r){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",t(f)}},"onSocketClose"),d=a(f=>{r=Tu.Buffer.compare(f.slice(-5),n)===0,!r&&i&&(r=Tu.Buffer.compare(i.slice(-3),n.slice(0,3))===0&&Tu.Buffer.compare(f.slice(-2),n.slice(3))===0),i=f},"onData");s.prependListener("close",u),s.on("data",d),e.on("close",()=>{s.removeListener("close",u),s.removeListener("data",d)})})}var CO,OO,Ei,Tr,Tu,i6,$O=$t(()=>{CO=Ke(require("node:http"),1),OO=Ke(require("node:https"),1),Ei=Ke(require("node:zlib"),1),Tr=Ke(require("node:stream"),1),Tu=require("node:buffer");F0();Zf();hO();Kf();IO();eE();RO();cE();Lf();Bf();uE();nE();i6=new Set(["data:","http:","https:"]);a(lE,"fetch");a(a6,"fixResponseChunkedTransferBadEnding")});var zO=z(La=>{"use strict";var s6=La&&La.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ma;Object.defineProperty(La,"__esModule",{value:!0});La.Gaxios=void 0;var c6=s6(fu()),u6=require("https"),Si=jb(),l6=m0(),DO=require("stream"),NO=qb(),d6=a(async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),"randomUUID"),p6=204,Jf=class{static{a(this,"Gaxios")}agentCache=new Map;defaults;interceptors;constructor(t){this.defaults=t||{},this.interceptors={request:new NO.GaxiosInterceptorManager,response:new NO.GaxiosInterceptorManager}}fetch(...t){let n=t[0],o=t[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&&Ma.mergeHeaders(i,n.headers),o&&Ma.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(t={}){let n=await this.#n(t);return n=await this.#t(n),this.#r(this._request(n))}async _defaultAdapter(t){let n=t.fetchImplementation||this.defaults.fetchImplementation||await Ma.#c(),o={...t};delete o.data;let r=await n(t.url,o),i=await this.getResponseData(t,r);return Object.getOwnPropertyDescriptor(r,"data")?.configurable||Object.defineProperties(r,{data:{configurable:!0,writable:!0,enumerable:!0,value:i}}),Object.assign(r,{config:t,data:i})}async _request(t){try{let n;if(t.adapter?n=await t.adapter(t,this._defaultAdapter.bind(this)):n=await this._defaultAdapter(t),!t.validateStatus(n.status)){if(t.responseType==="stream"){let r=[];for await(let i of n.data)r.push(i);n.data=r.toString()}let o=Si.GaxiosError.extractAPIErrorFromResponse(n,`Request failed with status code ${n.status}`);throw new Si.GaxiosError(o?.message,t,n,o)}return n}catch(n){let o;n instanceof Si.GaxiosError?o=n:n instanceof Error?o=new Si.GaxiosError(n.message,t,void 0,n):o=new Si.GaxiosError("Unexpected Gaxios Error",t,void 0,n);let{shouldRetry:r,config:i}=await(0,l6.getRetryConfig)(o);if(r&&i)return o.config.retryConfig.currentRetryAttempt=i.retryConfig.currentRetryAttempt,t.retryConfig=o.config?.retryConfig,this.#o(t),this._request(t);throw t.errorRedactor&&t.errorRedactor(o),o}}async getResponseData(t,n){if(n.status===p6)return"";if(t.maxContentLength&&n.headers.has("content-length")&&t.maxContentLength<Number.parseInt(n.headers?.get("content-length")||""))throw new Si.GaxiosError("Response's `Content-Length` is over the limit.",t,Object.assign(n,{config:t}));switch(t.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(t,n=[]){let o=new URL(t),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(t){let n=Promise.resolve(t);for(let o of this.interceptors.request.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#r(t){let n=Promise.resolve(t);for(let o of this.interceptors.response.values())o&&(n=n.then(o.resolved,o.rejected));return n}async#n(t){let n=new Headers(this.defaults.headers);Ma.mergeHeaders(n,t.headers);let o=(0,c6.default)(!0,{},this.defaults,t);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,d]of new URLSearchParams(o.params))s.searchParams.append(u,d);o.url=s}typeof t.maxContentLength=="number"&&(o.size=t.maxContentLength),typeof t.maxRedirects=="number"&&(o.follow=t.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 DO.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 d6();n.set("content-type",`multipart/related; boundary=${s}`),o.body=DO.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 Ma.#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 u6.Agent({cert:o.cert,key:o.key}),this.agentCache.set(o.key,o.agent)));return typeof o.errorRedactor!="function"&&o.errorRedactor!==!1&&(o.errorRedactor=Si.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(t){if(t.timeout){let n=AbortSignal.timeout(t.timeout);t.signal&&!t.signal.aborted?t.signal=AbortSignal.any([t.signal,n]):t.signal=n}}validateStatus(t){return t>=200&&t<300}async getResponseDataFromContentType(t){let n=t.headers.get("Content-Type");if(n===null)return t.text();if(n=n.toLowerCase(),n.includes("application/json")){let o=await t.text();try{o=JSON.parse(o)}catch{}return o}else return n.match(/^text\//)?t.text():t.blob()}async*getMultipartRequest(t,n){let o=`--${n}--`;for(let r of t){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(()=>Be(NE()))).HttpsProxyAgent,this.#i}static async#c(){let e=typeof window<"u"&&!!window;return this.#a||=e?window.fetch:(await Promise.resolve().then(()=>(RS(),IS))).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,u)=>{u==="set-cookie"?e.append(u,s):e.set(u,s)});return e}};ui.Gaxios=$c;ci=$c});var ht=D(Ut=>{"use strict";var rD=Ut&&Ut.__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]})),nD=Ut&&Ut.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rD(e,t,r)};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.instance=Ut.Gaxios=Ut.GaxiosError=void 0;Ut.request=iD;var $S=kS();Object.defineProperty(Ut,"Gaxios",{enumerable:!0,get:o(function(){return $S.Gaxios},"get")});var oD=qd();Object.defineProperty(Ut,"GaxiosError",{enumerable:!0,get:o(function(){return oD.GaxiosError},"get")});nD(Gd(),Ut);Ut.instance=new $S.Gaxios;async function iD(t){return Ut.instance.request(t)}o(iD,"request")});var fp=D((DS,Dc)=>{(function(t){"use strict";var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,s="[BigNumber Error] ",u=s+"Number primitive has more than 15 significant digits: ",d=1e14,p=14,h=9007199254740991,y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,f=1e9;function l(Z){var G,X,te,J=ee.prototype={constructor:ee,toString:null,valueOf:null},De=new ee(1),re=20,H=4,V=-7,Q=21,K=-1e7,ie=1e7,ce=!1,ke=1,Ne=0,Ke={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},et="0123456789abcdefghijklmnopqrstuvwxyz",Tt=!0;function ee(T,P){var x,z,R,$,j,I,k,M,N=this;if(!(N instanceof ee))return new ee(T,P);if(P==null){if(T&&T._isBigNumber===!0){N.s=T.s,!T.c||T.e>ie?N.c=N.e=null:T.e<K?N.c=[N.e=0]:(N.e=T.e,N.c=T.c.slice());return}if((I=typeof T=="number")&&T*0==0){if(N.s=1/T<0?(T=-T,-1):1,T===~~T){for($=0,j=T;j>=10;j/=10,$++);$>ie?N.c=N.e=null:(N.e=$,N.c=[T]);return}M=String(T)}else{if(!r.test(M=String(T)))return te(N,M,I);N.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}($=M.indexOf("."))>-1&&(M=M.replace(".","")),(j=M.search(/e/i))>0?($<0&&($=j),$+=+M.slice(j+1),M=M.substring(0,j)):$<0&&($=M.length)}else{if(b(P,2,et.length,"Base"),P==10&&Tt)return N=new ee(T),We(N,re+N.e+1,H);if(M=String(T),I=typeof T=="number"){if(T*0!=0)return te(N,M,I,P);if(N.s=1/T<0?(M=M.slice(1),-1):1,ee.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(u+T)}else N.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(x=et.slice(0,P),$=j=0,k=M.length;j<k;j++)if(x.indexOf(z=M.charAt(j))<0){if(z=="."){if(j>$){$=k;continue}}else if(!R&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){R=!0,j=-1,$=0;continue}return te(N,String(T),I,P)}I=!1,M=X(M,P,10,N.s),($=M.indexOf("."))>-1?M=M.replace(".",""):$=M.length}for(j=0;M.charCodeAt(j)===48;j++);for(k=M.length;M.charCodeAt(--k)===48;);if(M=M.slice(j,++k)){if(k-=j,I&&ee.DEBUG&&k>15&&(T>h||T!==i(T)))throw Error(u+N.s*T);if(($=$-j-1)>ie)N.c=N.e=null;else if($<K)N.c=[N.e=0];else{if(N.e=$,N.c=[],j=($+1)%p,$<0&&(j+=p),j<k){for(j&&N.c.push(+M.slice(0,j)),k-=p;j<k;)N.c.push(+M.slice(j,j+=p));j=p-(M=M.slice(j)).length}else j-=k;for(;j--;M+="0");N.c.push(+M)}}else N.c=[N.e=0]}o(ee,"BigNumber"),ee.clone=l,ee.ROUND_UP=0,ee.ROUND_DOWN=1,ee.ROUND_CEIL=2,ee.ROUND_FLOOR=3,ee.ROUND_HALF_UP=4,ee.ROUND_HALF_DOWN=5,ee.ROUND_HALF_EVEN=6,ee.ROUND_HALF_CEIL=7,ee.ROUND_HALF_FLOOR=8,ee.EUCLID=9,ee.config=ee.set=function(T){var P,x;if(T!=null)if(typeof T=="object"){if(T.hasOwnProperty(P="DECIMAL_PLACES")&&(x=T[P],b(x,0,f,P),re=x),T.hasOwnProperty(P="ROUNDING_MODE")&&(x=T[P],b(x,0,8,P),H=x),T.hasOwnProperty(P="EXPONENTIAL_AT")&&(x=T[P],x&&x.pop?(b(x[0],-f,0,P),b(x[1],0,f,P),V=x[0],Q=x[1]):(b(x,-f,f,P),V=-(Q=x<0?-x:x))),T.hasOwnProperty(P="RANGE"))if(x=T[P],x&&x.pop)b(x[0],-f,-1,P),b(x[1],1,f,P),K=x[0],ie=x[1];else if(b(x,-f,f,P),x)K=-(ie=x<0?-x:x);else throw Error(s+P+" cannot be zero: "+x);if(T.hasOwnProperty(P="CRYPTO"))if(x=T[P],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))ce=x;else throw ce=!x,Error(s+"crypto unavailable");else ce=x;else throw Error(s+P+" not true or false: "+x);if(T.hasOwnProperty(P="MODULO_MODE")&&(x=T[P],b(x,0,9,P),ke=x),T.hasOwnProperty(P="POW_PRECISION")&&(x=T[P],b(x,0,f,P),Ne=x),T.hasOwnProperty(P="FORMAT"))if(x=T[P],typeof x=="object")Ke=x;else throw Error(s+P+" not an object: "+x);if(T.hasOwnProperty(P="ALPHABET"))if(x=T[P],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))Tt=x.slice(0,10)=="0123456789",et=x;else throw Error(s+P+" invalid: "+x)}else throw Error(s+"Object expected: "+T);return{DECIMAL_PLACES:re,ROUNDING_MODE:H,EXPONENTIAL_AT:[V,Q],RANGE:[K,ie],CRYPTO:ce,MODULO_MODE:ke,POW_PRECISION:Ne,FORMAT:Ke,ALPHABET:et}},ee.isBigNumber=function(T){if(!T||T._isBigNumber!==!0)return!1;if(!ee.DEBUG)return!0;var P,x,z=T.c,R=T.e,$=T.s;e:if({}.toString.call(z)=="[object Array]"){if(($===1||$===-1)&&R>=-f&&R<=f&&R===i(R)){if(z[0]===0){if(R===0&&z.length===1)return!0;break e}if(P=(R+1)%p,P<1&&(P+=p),String(z[0]).length==P){for(P=0;P<z.length;P++)if(x=z[P],x<0||x>=d||x!==i(x))break e;if(x!==0)return!0}}}else if(z===null&&R===null&&($===null||$===1||$===-1))return!0;throw Error(s+"Invalid BigNumber: "+T)},ee.maximum=ee.max=function(){return mt(arguments,-1)},ee.minimum=ee.min=function(){return mt(arguments,1)},ee.random=(function(){var T=9007199254740992,P=Math.random()*T&2097151?function(){return i(Math.random()*T)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var z,R,$,j,I,k=0,M=[],N=new ee(De);if(x==null?x=re:b(x,0,f),j=n(x/p),ce)if(crypto.getRandomValues){for(z=crypto.getRandomValues(new Uint32Array(j*=2));k<j;)I=z[k]*131072+(z[k+1]>>>11),I>=9e15?(R=crypto.getRandomValues(new Uint32Array(2)),z[k]=R[0],z[k+1]=R[1]):(M.push(I%1e14),k+=2);k=j/2}else if(crypto.randomBytes){for(z=crypto.randomBytes(j*=7);k<j;)I=(z[k]&31)*281474976710656+z[k+1]*1099511627776+z[k+2]*4294967296+z[k+3]*16777216+(z[k+4]<<16)+(z[k+5]<<8)+z[k+6],I>=9e15?crypto.randomBytes(7).copy(z,k):(M.push(I%1e14),k+=7);k=j/7}else throw ce=!1,Error(s+"crypto unavailable");if(!ce)for(;k<j;)I=P(),I<9e15&&(M[k++]=I%1e14);for(j=M[--k],x%=p,j&&x&&(I=y[p-x],M[k]=i(j/I)*I);M[k]===0;M.pop(),k--);if(k<0)M=[$=0];else{for($=-1;M[0]===0;M.splice(0,1),$-=p);for(k=1,I=M[0];I>=10;I/=10,k++);k<p&&($-=p-k)}return N.e=$,N.c=M,N}})(),ee.sum=function(){for(var T=1,P=arguments,x=new ee(P[0]);T<P.length;)x=x.plus(P[T++]);return x},X=(function(){var T="0123456789";function P(x,z,R,$){for(var j,I=[0],k,M=0,N=x.length;M<N;){for(k=I.length;k--;I[k]*=z);for(I[0]+=$.indexOf(x.charAt(M++)),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(P,"toBaseOut"),function(x,z,R,$,j){var I,k,M,N,W,ue,pe,qe,it=x.indexOf("."),at=re,Fe=H;for(it>=0&&(N=Ne,Ne=0,x=x.replace(".",""),qe=new ee(z),ue=qe.pow(x.length-it),Ne=N,qe.c=P(Y(v(ue.c),ue.e,"0"),10,R,T),qe.e=qe.c.length),pe=P(x,z,R,j?(I=et,T):(I=T,et)),M=N=pe.length;pe[--N]==0;pe.pop());if(!pe[0])return I.charAt(0);if(it<0?--M:(ue.c=pe,ue.e=M,ue.s=$,ue=G(ue,qe,at,Fe,R),pe=ue.c,W=ue.r,M=ue.e),k=M+at+1,it=pe[k],N=R/2,W=W||k<0||pe[k+1]!=null,W=Fe<4?(it!=null||W)&&(Fe==0||Fe==(ue.s<0?3:2)):it>N||it==N&&(Fe==4||W||Fe==6&&pe[k-1]&1||Fe==(ue.s<0?8:7)),k<1||!pe[0])x=W?Y(I.charAt(1),-at,I.charAt(0)):I.charAt(0);else{if(pe.length=k,W)for(--R;++pe[--k]>R;)pe[k]=0,k||(++M,pe=[1].concat(pe));for(N=pe.length;!pe[--N];);for(it=0,x="";it<=N;x+=I.charAt(pe[it++]));x=Y(x,M,I.charAt(0))}return x}})(),G=(function(){function T(z,R,$){var j,I,k,M,N=0,W=z.length,ue=R%m,pe=R/m|0;for(z=z.slice();W--;)k=z[W]%m,M=z[W]/m|0,j=pe*k+M*ue,I=ue*k+j%m*m+N,N=(I/$|0)+(j/m|0)+pe*M,z[W]=I%$;return N&&(z=[N].concat(z)),z}o(T,"multiply");function P(z,R,$,j){var I,k;if($!=j)k=$>j?1:-1;else for(I=k=0;I<$;I++)if(z[I]!=R[I]){k=z[I]>R[I]?1:-1;break}return k}o(P,"compare");function x(z,R,$,j){for(var I=0;$--;)z[$]-=I,I=z[$]<R[$]?1:0,z[$]=I*j+z[$]-R[$];for(;!z[0]&&z.length>1;z.splice(0,1));}return o(x,"subtract"),function(z,R,$,j,I){var k,M,N,W,ue,pe,qe,it,at,Fe,He,bt,Io,Ro,Co,Wt,rn,Ct=z.s==R.s?1:-1,Et=z.c,Xe=R.c;if(!Et||!Et[0]||!Xe||!Xe[0])return new ee(!z.s||!R.s||(Et?Xe&&Et[0]==Xe[0]:!Xe)?NaN:Et&&Et[0]==0||!Xe?Ct*0:Ct/0);for(it=new ee(Ct),at=it.c=[],M=z.e-R.e,Ct=$+M+1,I||(I=d,M=g(z.e/p)-g(R.e/p),Ct=Ct/p|0),N=0;Xe[N]==(Et[N]||0);N++);if(Xe[N]>(Et[N]||0)&&M--,Ct<0)at.push(1),W=!0;else{for(Ro=Et.length,Wt=Xe.length,N=0,Ct+=2,ue=i(I/(Xe[0]+1)),ue>1&&(Xe=T(Xe,ue,I),Et=T(Et,ue,I),Wt=Xe.length,Ro=Et.length),Io=Wt,Fe=Et.slice(0,Wt),He=Fe.length;He<Wt;Fe[He++]=0);rn=Xe.slice(),rn=[0].concat(rn),Co=Xe[0],Xe[1]>=I/2&&Co++;do{if(ue=0,k=P(Xe,Fe,Wt,He),k<0){if(bt=Fe[0],Wt!=He&&(bt=bt*I+(Fe[1]||0)),ue=i(bt/Co),ue>1)for(ue>=I&&(ue=I-1),pe=T(Xe,ue,I),qe=pe.length,He=Fe.length;P(pe,Fe,qe,He)==1;)ue--,x(pe,Wt<qe?rn:Xe,qe,I),qe=pe.length,k=1;else ue==0&&(k=ue=1),pe=Xe.slice(),qe=pe.length;if(qe<He&&(pe=[0].concat(pe)),x(Fe,pe,He,I),He=Fe.length,k==-1)for(;P(Xe,Fe,Wt,He)<1;)ue++,x(Fe,Wt<He?rn:Xe,He,I),He=Fe.length}else k===0&&(ue++,Fe=[0]);at[N++]=ue,Fe[0]?Fe[He++]=Et[Io]||0:(Fe=[Et[Io]],He=1)}while((Io++<Ro||Fe[0]!=null)&&Ct--);W=Fe[0]!=null,at[0]||at.splice(0,1)}if(I==d){for(N=1,Ct=at[0];Ct>=10;Ct/=10,N++);We(it,$+(it.e=N+M*p-1)+1,j,W)}else it.e=M,it.r=+W;return it}})();function dt(T,P,x,z){var R,$,j,I,k;if(x==null?x=H:b(x,0,8),!T.c)return T.toString();if(R=T.c[0],j=T.e,P==null)k=v(T.c),k=z==1||z==2&&(j<=V||j>=Q)?U(k,j):Y(k,j,"0");else if(T=We(new ee(T),P,x),$=T.e,k=v(T.c),I=k.length,z==1||z==2&&(P<=$||$<=V)){for(;I<P;k+="0",I++);k=U(k,$)}else if(P-=j+(z===2&&$>j),k=Y(k,$,"0"),$+1>I){if(--P>0)for(k+=".";P--;k+="0");}else if(P+=$-I,P>0)for($+1==I&&(k+=".");P--;k+="0");return T.s<0&&R?"-"+k:k}o(dt,"format");function mt(T,P){for(var x,z,R=1,$=new ee(T[0]);R<T.length;R++)z=new ee(T[R]),(!z.s||(x=E($,z))===P||x===0&&$.s===P)&&($=z);return $}o(mt,"maxOrMin");function Ht(T,P,x){for(var z=1,R=P.length;!P[--R];P.pop());for(R=P[0];R>=10;R/=10,z++);return(x=z+x*p-1)>ie?T.c=T.e=null:x<K?T.c=[T.e=0]:(T.e=x,T.c=P),T}o(Ht,"normalise"),te=(function(){var T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,P=/^([^.]+)\.$/,x=/^\.([^.]+)$/,z=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function($,j,I,k){var M,N=I?j:j.replace(R,"");if(z.test(N))$.s=isNaN(N)?null:N<0?-1:1;else{if(!I&&(N=N.replace(T,function(W,ue,pe){return M=(pe=pe.toLowerCase())=="x"?16:pe=="b"?2:8,!k||k==M?ue:W}),k&&(M=k,N=N.replace(P,"$1").replace(x,"0.$1")),j!=N))return new ee(N,M);if(ee.DEBUG)throw Error(s+"Not a"+(k?" base "+k:"")+" number: "+j);$.s=null}$.c=$.e=null}})();function We(T,P,x,z){var R,$,j,I,k,M,N,W=T.c,ue=y;if(W){e:{for(R=1,I=W[0];I>=10;I/=10,R++);if($=P-R,$<0)$+=p,j=P,k=W[M=0],N=i(k/ue[R-j-1]%10);else if(M=n(($+1)/p),M>=W.length)if(z){for(;W.length<=M;W.push(0));k=N=0,R=1,$%=p,j=$-p+1}else break e;else{for(k=I=W[M],R=1;I>=10;I/=10,R++);$%=p,j=$-p+R,N=j<0?0:i(k/ue[R-j-1]%10)}if(z=z||P<0||W[M+1]!=null||(j<0?k:k%ue[R-j-1]),z=x<4?(N||z)&&(x==0||x==(T.s<0?3:2)):N>5||N==5&&(x==4||z||x==6&&($>0?j>0?k/ue[R-j]:0:W[M-1])%10&1||x==(T.s<0?8:7)),P<1||!W[0])return W.length=0,z?(P-=T.e+1,W[0]=ue[(p-P%p)%p],T.e=-P||0):W[0]=T.e=0,T;if($==0?(W.length=M,I=1,M--):(W.length=M+1,I=ue[p-$],W[M]=j>0?i(k/ue[R-j]%ue[j])*I:0),z)for(;;)if(M==0){for($=1,j=W[0];j>=10;j/=10,$++);for(j=W[0]+=I,I=1;j>=10;j/=10,I++);$!=I&&(T.e++,W[0]==d&&(W[0]=1));break}else{if(W[M]+=I,W[M]!=d)break;W[M--]=0,I=1}for($=W.length;W[--$]===0;W.pop());}T.e>ie?T.c=T.e=null:T.e<K&&(T.c=[T.e=0])}return T}o(We,"round");function Ye(T){var P,x=T.e;return x===null?T.toString():(P=v(T.c),P=x<=V||x>=Q?U(P,x):Y(P,x,"0"),T.s<0?"-"+P:P)}return o(Ye,"valueOf"),J.absoluteValue=J.abs=function(){var T=new ee(this);return T.s<0&&(T.s=1),T},J.comparedTo=function(T,P){return E(this,new ee(T,P))},J.decimalPlaces=J.dp=function(T,P){var x,z,R,$=this;if(T!=null)return b(T,0,f),P==null?P=H:b(P,0,8),We(new ee($),T+$.e+1,P);if(!(x=$.c))return null;if(z=((R=x.length-1)-g(this.e/p))*p,R=x[R])for(;R%10==0;R/=10,z--);return z<0&&(z=0),z},J.dividedBy=J.div=function(T,P){return G(this,new ee(T,P),re,H)},J.dividedToIntegerBy=J.idiv=function(T,P){return G(this,new ee(T,P),0,1)},J.exponentiatedBy=J.pow=function(T,P){var x,z,R,$,j,I,k,M,N,W=this;if(T=new ee(T),T.c&&!T.isInteger())throw Error(s+"Exponent not an integer: "+Ye(T));if(P!=null&&(P=new ee(P)),I=T.e>14,!W.c||!W.c[0]||W.c[0]==1&&!W.e&&W.c.length==1||!T.c||!T.c[0])return N=new ee(Math.pow(+Ye(W),I?T.s*(2-C(T)):+Ye(T))),P?N.mod(P):N;if(k=T.s<0,P){if(P.c?!P.c[0]:!P.s)return new ee(NaN);z=!k&&W.isInteger()&&P.isInteger(),z&&(W=W.mod(P))}else{if(T.e>9&&(W.e>0||W.e<-1||(W.e==0?W.c[0]>1||I&&W.c[1]>=24e7:W.c[0]<8e13||I&&W.c[0]<=9999975e7)))return $=W.s<0&&C(T)?-0:0,W.e>-1&&($=1/$),new ee(k?1/$:$);Ne&&($=n(Ne/p+2))}for(I?(x=new ee(.5),k&&(T.s=1),M=C(T)):(R=Math.abs(+Ye(T)),M=R%2),N=new ee(De);;){if(M){if(N=N.times(W),!N.c)break;$?N.c.length>$&&(N.c.length=$):z&&(N=N.mod(P))}if(R){if(R=i(R/2),R===0)break;M=R%2}else if(T=T.times(x),We(T,T.e+1,1),T.e>14)M=C(T);else{if(R=+Ye(T),R===0)break;M=R%2}W=W.times(W),$?W.c&&W.c.length>$&&(W.c.length=$):z&&(W=W.mod(P))}return z?N:(k&&(N=De.div(N)),P?N.mod(P):$?We(N,Ne,H,j):N)},J.integerValue=function(T){var P=new ee(this);return T==null?T=H:b(T,0,8),We(P,P.e+1,T)},J.isEqualTo=J.eq=function(T,P){return E(this,new ee(T,P))===0},J.isFinite=function(){return!!this.c},J.isGreaterThan=J.gt=function(T,P){return E(this,new ee(T,P))>0},J.isGreaterThanOrEqualTo=J.gte=function(T,P){return(P=E(this,new ee(T,P)))===1||P===0},J.isInteger=function(){return!!this.c&&g(this.e/p)>this.c.length-2},J.isLessThan=J.lt=function(T,P){return E(this,new ee(T,P))<0},J.isLessThanOrEqualTo=J.lte=function(T,P){return(P=E(this,new ee(T,P)))===-1||P===0},J.isNaN=function(){return!this.s},J.isNegative=function(){return this.s<0},J.isPositive=function(){return this.s>0},J.isZero=function(){return!!this.c&&this.c[0]==0},J.minus=function(T,P){var x,z,R,$,j=this,I=j.s;if(T=new ee(T,P),P=T.s,!I||!P)return new ee(NaN);if(I!=P)return T.s=-P,j.plus(T);var k=j.e/p,M=T.e/p,N=j.c,W=T.c;if(!k||!M){if(!N||!W)return N?(T.s=-P,T):new ee(W?j:NaN);if(!N[0]||!W[0])return W[0]?(T.s=-P,T):new ee(N[0]?j:H==3?-0:0)}if(k=g(k),M=g(M),N=N.slice(),I=k-M){for(($=I<0)?(I=-I,R=N):(M=k,R=W),R.reverse(),P=I;P--;R.push(0));R.reverse()}else for(z=($=(I=N.length)<(P=W.length))?I:P,I=P=0;P<z;P++)if(N[P]!=W[P]){$=N[P]<W[P];break}if($&&(R=N,N=W,W=R,T.s=-T.s),P=(z=W.length)-(x=N.length),P>0)for(;P--;N[x++]=0);for(P=d-1;z>I;){if(N[--z]<W[z]){for(x=z;x&&!N[--x];N[x]=P);--N[x],N[z]+=d}N[z]-=W[z]}for(;N[0]==0;N.splice(0,1),--M);return N[0]?Ht(T,N,M):(T.s=H==3?-1:1,T.c=[T.e=0],T)},J.modulo=J.mod=function(T,P){var x,z,R=this;return T=new ee(T,P),!R.c||!T.s||T.c&&!T.c[0]?new ee(NaN):!T.c||R.c&&!R.c[0]?new ee(R):(ke==9?(z=T.s,T.s=1,x=G(R,T,0,3),T.s=z,x.s*=z):x=G(R,T,0,ke),T=R.minus(x.times(T)),!T.c[0]&&ke==1&&(T.s=R.s),T)},J.multipliedBy=J.times=function(T,P){var x,z,R,$,j,I,k,M,N,W,ue,pe,qe,it,at,Fe=this,He=Fe.c,bt=(T=new ee(T,P)).c;if(!He||!bt||!He[0]||!bt[0])return!Fe.s||!T.s||He&&!He[0]&&!bt||bt&&!bt[0]&&!He?T.c=T.e=T.s=null:(T.s*=Fe.s,!He||!bt?T.c=T.e=null:(T.c=[0],T.e=0)),T;for(z=g(Fe.e/p)+g(T.e/p),T.s*=Fe.s,k=He.length,W=bt.length,k<W&&(qe=He,He=bt,bt=qe,R=k,k=W,W=R),R=k+W,qe=[];R--;qe.push(0));for(it=d,at=m,R=W;--R>=0;){for(x=0,ue=bt[R]%at,pe=bt[R]/at|0,j=k,$=R+j;$>R;)M=He[--j]%at,N=He[j]/at|0,I=pe*M+N*ue,M=ue*M+I%at*at+qe[$]+x,x=(M/it|0)+(I/at|0)+pe*N,qe[$--]=M%it;qe[$]=x}return x?++z:qe.splice(0,1),Ht(T,qe,z)},J.negated=function(){var T=new ee(this);return T.s=-T.s||null,T},J.plus=function(T,P){var x,z=this,R=z.s;if(T=new ee(T,P),P=T.s,!R||!P)return new ee(NaN);if(R!=P)return T.s=-P,z.minus(T);var $=z.e/p,j=T.e/p,I=z.c,k=T.c;if(!$||!j){if(!I||!k)return new ee(R/0);if(!I[0]||!k[0])return k[0]?T:new ee(I[0]?z:R*0)}if($=g($),j=g(j),I=I.slice(),R=$-j){for(R>0?(j=$,x=k):(R=-R,x=I),x.reverse();R--;x.push(0));x.reverse()}for(R=I.length,P=k.length,R-P<0&&(x=k,k=I,I=x,P=R),R=0;P;)R=(I[--P]=I[P]+k[P]+R)/d|0,I[P]=d===I[P]?0:I[P]%d;return R&&(I=[R].concat(I),++j),Ht(T,I,j)},J.precision=J.sd=function(T,P){var x,z,R,$=this;if(T!=null&&T!==!!T)return b(T,1,f),P==null?P=H:b(P,0,8),We(new ee($),T,P);if(!(x=$.c))return null;if(R=x.length-1,z=R*p+1,R=x[R]){for(;R%10==0;R/=10,z--);for(R=x[0];R>=10;R/=10,z++);}return T&&$.e+1>z&&(z=$.e+1),z},J.shiftedBy=function(T){return b(T,-h,h),this.times("1e"+T)},J.squareRoot=J.sqrt=function(){var T,P,x,z,R,$=this,j=$.c,I=$.s,k=$.e,M=re+4,N=new ee("0.5");if(I!==1||!j||!j[0])return new ee(!I||I<0&&(!j||j[0])?NaN:j?$:1/0);if(I=Math.sqrt(+Ye($)),I==0||I==1/0?(P=v(j),(P.length+k)%2==0&&(P+="0"),I=Math.sqrt(+P),k=g((k+1)/2)-(k<0||k%2),I==1/0?P="5e"+k:(P=I.toExponential(),P=P.slice(0,P.indexOf("e")+1)+k),x=new ee(P)):x=new ee(I+""),x.c[0]){for(k=x.e,I=k+M,I<3&&(I=0);;)if(R=x,x=N.times(R.plus(G($,R,M,1))),v(R.c).slice(0,I)===(P=v(x.c)).slice(0,I))if(x.e<k&&--I,P=P.slice(I-3,I+1),P=="9999"||!z&&P=="4999"){if(!z&&(We(R,R.e+re+2,0),R.times(R).eq($))){x=R;break}M+=4,I+=4,z=1}else{(!+P||!+P.slice(1)&&P.charAt(0)=="5")&&(We(x,x.e+re+2,1),T=!x.times(x).eq($));break}}return We(x,x.e+re+1,H,T)},J.toExponential=function(T,P){return T!=null&&(b(T,0,f),T++),dt(this,T,P,1)},J.toFixed=function(T,P){return T!=null&&(b(T,0,f),T=T+this.e+1),dt(this,T,P)},J.toFormat=function(T,P,x){var z,R=this;if(x==null)T!=null&&P&&typeof P=="object"?(x=P,P=null):T&&typeof T=="object"?(x=T,T=P=null):x=Ke;else if(typeof x!="object")throw Error(s+"Argument not an object: "+x);if(z=R.toFixed(T,P),R.c){var $,j=z.split("."),I=+x.groupSize,k=+x.secondaryGroupSize,M=x.groupSeparator||"",N=j[0],W=j[1],ue=R.s<0,pe=ue?N.slice(1):N,qe=pe.length;if(k&&($=I,I=k,k=$,qe-=$),I>0&&qe>0){for($=qe%I||I,N=pe.substr(0,$);$<qe;$+=I)N+=M+pe.substr($,I);k>0&&(N+=M+pe.slice($)),ue&&(N="-"+N)}z=W?N+(x.decimalSeparator||"")+((k=+x.fractionGroupSize)?W.replace(new RegExp("\\d{"+k+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):W):N}return(x.prefix||"")+z+(x.suffix||"")},J.toFraction=function(T){var P,x,z,R,$,j,I,k,M,N,W,ue,pe=this,qe=pe.c;if(T!=null&&(I=new ee(T),!I.isInteger()&&(I.c||I.s!==1)||I.lt(De)))throw Error(s+"Argument "+(I.isInteger()?"out of range: ":"not an integer: ")+Ye(I));if(!qe)return new ee(pe);for(P=new ee(De),M=x=new ee(De),z=k=new ee(De),ue=v(qe),$=P.e=ue.length-pe.e-1,P.c[0]=y[(j=$%p)<0?p+j:j],T=!T||I.comparedTo(P)>0?$>0?P:M:I,j=ie,ie=1/0,I=new ee(ue),k.c[0]=0;N=G(I,P,0,1),R=x.plus(N.times(z)),R.comparedTo(T)!=1;)x=z,z=R,M=k.plus(N.times(R=M)),k=R,P=I.minus(N.times(R=P)),I=R;return R=G(T.minus(x),z,0,1),k=k.plus(R.times(M)),x=x.plus(R.times(z)),k.s=M.s=pe.s,$=$*2,W=G(M,z,$,H).minus(pe).abs().comparedTo(G(k,x,$,H).minus(pe).abs())<1?[M,z]:[k,x],ie=j,W},J.toNumber=function(){return+Ye(this)},J.toPrecision=function(T,P){return T!=null&&b(T,1,f),dt(this,T,P,2)},J.toString=function(T){var P,x=this,z=x.s,R=x.e;return R===null?z?(P="Infinity",z<0&&(P="-"+P)):P="NaN":(T==null?P=R<=V||R>=Q?U(v(x.c),R):Y(v(x.c),R,"0"):T===10&&Tt?(x=We(new ee(x),re+R+1,H),P=Y(v(x.c),x.e,"0")):(b(T,2,et.length,"Base"),P=X(Y(v(x.c),R,"0"),10,T,z,!0)),z<0&&x.c[0]&&(P="-"+P)),P},J.valueOf=J.toJSON=function(){return Ye(this)},J._isBigNumber=!0,Z!=null&&ee.set(Z),ee}o(l,"clone");function g(Z){var G=Z|0;return Z>0||Z===G?G:G-1}o(g,"bitFloor");function v(Z){for(var G,X,te=1,J=Z.length,De=Z[0]+"";te<J;){for(G=Z[te++]+"",X=p-G.length;X--;G="0"+G);De+=G}for(J=De.length;De.charCodeAt(--J)===48;);return De.slice(0,J+1||1)}o(v,"coeffToString");function E(Z,G){var X,te,J=Z.c,De=G.c,re=Z.s,H=G.s,V=Z.e,Q=G.e;if(!re||!H)return null;if(X=J&&!J[0],te=De&&!De[0],X||te)return X?te?0:-H:re;if(re!=H)return re;if(X=re<0,te=V==Q,!J||!De)return te?0:!J^X?1:-1;if(!te)return V>Q^X?1:-1;for(H=(V=J.length)<(Q=De.length)?V:Q,re=0;re<H;re++)if(J[re]!=De[re])return J[re]>De[re]^X?1:-1;return V==Q?0:V>Q^X?1:-1}o(E,"compare");function b(Z,G,X,te){if(Z<G||Z>X||Z!==i(Z))throw Error(s+(te||"Argument")+(typeof Z=="number"?Z<G||Z>X?" out of range: ":" not an integer: ":" not a primitive number: ")+String(Z))}o(b,"intCheck");function C(Z){var G=Z.c.length-1;return g(Z.e/p)==G&&Z.c[G]%2!=0}o(C,"isOdd");function U(Z,G){return(Z.length>1?Z.charAt(0)+"."+Z.slice(1):Z)+(G<0?"e":"e+")+G}o(U,"toExponential");function Y(Z,G,X){var te,J;if(G<0){for(J=X+".";++G;J+=X);Z=J+Z}else if(te=Z.length,++G>te){for(J=X,G-=te;--G;J+=X);Z+=J}else G<te&&(Z=Z.slice(0,G)+"."+Z.slice(G));return Z}o(Y,"toFixedPoint"),e=l(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof Dc<"u"&&Dc.exports?Dc.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(DS)});var MS=D(($X,US)=>{var NS=fp(),zS=US.exports;(function(){"use strict";function t(h){return h<10?"0"+h:h}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",'"':'\\"',"\\":"\\\\"},u;function d(h){return r.lastIndex=0,r.test(h)?'"'+h.replace(r,function(y){var m=s[y];return typeof m=="string"?m:"\\u"+("0000"+y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+h+'"'}o(d,"quote");function p(h,y){var m,f,l,g,v=n,E,b=y[h],C=b!=null&&(b instanceof NS||NS.isBigNumber(b));switch(b&&typeof b=="object"&&typeof b.toJSON=="function"&&(b=b.toJSON(h)),typeof u=="function"&&(b=u.call(y,h,b)),typeof b){case"string":return C?b:d(b);case"number":return isFinite(b)?String(b):"null";case"boolean":case"null":case"bigint":return String(b);case"object":if(!b)return"null";if(n+=i,E=[],Object.prototype.toString.apply(b)==="[object Array]"){for(g=b.length,m=0;m<g;m+=1)E[m]=p(m,b)||"null";return l=E.length===0?"[]":n?`[
32
- `+n+E.join(`,
33
- `+n)+`
34
- `+v+"]":"["+E.join(",")+"]",n=v,l}if(u&&typeof u=="object")for(g=u.length,m=0;m<g;m+=1)typeof u[m]=="string"&&(f=u[m],l=p(f,b),l&&E.push(d(f)+(n?": ":":")+l));else Object.keys(b).forEach(function(U){var Y=p(U,b);Y&&E.push(d(U)+(n?": ":":")+Y)});return l=E.length===0?"{}":n?`{
35
- `+n+E.join(`,
36
- `+n)+`
37
- `+v+"}":"{"+E.join(",")+"}",n=v,l}}o(p,"str"),typeof zS.stringify!="function"&&(zS.stringify=function(h,y,m){var f;if(n="",i="",typeof m=="number")for(f=0;f<m;f+=1)i+=" ";else typeof m=="string"&&(i=m);if(u=y,y&&typeof y!="function"&&(typeof y!="object"||typeof y.length!="number"))throw new Error("JSON.stringify");return p("",{"":h})})})()});var jS=D((NX,LS)=>{var Nc=null,aD=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,sD=/(?: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)/,cD=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,u=o(function(v){throw{name:"SyntaxError",message:v,at:r,text:s}},"error"),d=o(function(v){return v&&v!==n&&u("Expected '"+v+"' instead of '"+n+"'"),n=s.charAt(r),r+=1,n},"next"),p=o(function(){var v,E="";for(n==="-"&&(E="-",d("-"));n>="0"&&n<="9";)E+=n,d();if(n===".")for(E+=".";d()&&n>="0"&&n<="9";)E+=n;if(n==="e"||n==="E")for(E+=n,d(),(n==="-"||n==="+")&&(E+=n,d());n>="0"&&n<="9";)E+=n,d();if(v=+E,!isFinite(v))u("Bad number");else return Nc==null&&(Nc=fp()),E.length>15?e.storeAsString?E:e.useNativeBigInt?BigInt(E):new Nc(E):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(v):new Nc(v):v},"number"),h=o(function(){var v,E,b="",C;if(n==='"')for(var U=r;d();){if(n==='"')return r-1>U&&(b+=s.substring(U,r-1)),d(),b;if(n==="\\"){if(r-1>U&&(b+=s.substring(U,r-1)),d(),n==="u"){for(C=0,E=0;E<4&&(v=parseInt(d(),16),!!isFinite(v));E+=1)C=C*16+v;b+=String.fromCharCode(C)}else if(typeof i[n]=="string")b+=i[n];else break;U=r}}u("Bad string")},"string"),y=o(function(){for(;n&&n<=" ";)d()},"white"),m=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}u("Unexpected '"+n+"'")},"word"),f,l=o(function(){var v=[];if(n==="["){if(d("["),y(),n==="]")return d("]"),v;for(;n;){if(v.push(f()),y(),n==="]")return d("]"),v;d(","),y()}}u("Bad array")},"array"),g=o(function(){var v,E=Object.create(null);if(n==="{"){if(d("{"),y(),n==="}")return d("}"),E;for(;n;){if(v=h(),y(),d(":"),e.strict===!0&&Object.hasOwnProperty.call(E,v)&&u('Duplicate key "'+v+'"'),aD.test(v)===!0?e.protoAction==="error"?u("Object contains forbidden prototype property"):e.protoAction==="ignore"?f():E[v]=f():sD.test(v)===!0?e.constructorAction==="error"?u("Object contains forbidden constructor property"):e.constructorAction==="ignore"?f():E[v]=f():E[v]=f(),y(),n==="}")return d("}"),E;d(","),y()}}u("Bad object")},"object");return f=o(function(){switch(y(),n){case"{":return g();case"[":return l();case'"':return h();case"-":return p();default:return n>="0"&&n<="9"?p():m()}},"value"),function(v,E){var b;return s=v+"",r=0,n=" ",b=f(),y(),n&&u("Syntax error"),typeof E=="function"?o((function C(U,Y){var Z,G,X=U[Y];return X&&typeof X=="object"&&Object.keys(X).forEach(function(te){G=C(X,te),G!==void 0?X[te]=G:delete X[te]}),E.call(U,Y,X)}),"walk")({"":b},""):b}},"json_parse");LS.exports=cD});var BS=D((UX,zc)=>{var FS=MS().stringify,qS=jS();zc.exports=function(t){return{parse:qS(t),stringify:FS}};zc.exports.parse=qS();zc.exports.stringify=FS});var mp=D(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.GCE_LINUX_BIOS_PATHS=void 0;Cr.isGoogleCloudServerless=HS;Cr.isGoogleComputeEngineLinux=WS;Cr.isGoogleComputeEngineMACAddress=ZS;Cr.isGoogleComputeEngine=KS;Cr.detectGCPResidency=lD;var VS=require("fs"),GS=require("os");Cr.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var uD=/^42:01/;function HS(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}o(HS,"isGoogleCloudServerless");function WS(){if((0,GS.platform)()!=="linux")return!1;try{(0,VS.statSync)(Cr.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let t=(0,VS.readFileSync)(Cr.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(t)}catch{return!1}}o(WS,"isGoogleComputeEngineLinux");function ZS(){let t=(0,GS.networkInterfaces)();for(let e of Object.values(t))if(e){for(let{mac:r}of e)if(uD.test(r))return!0}return!1}o(ZS,"isGoogleComputeEngineMACAddress");function KS(){return WS()||ZS()}o(KS,"isGoogleComputeEngine");function lD(){return HS()||KS()}o(lD,"detectGCPResidency")});var JS=D(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.Colours=void 0;var Dt=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="")}};Uc.Colours=Dt;Dt.enabled=!1;Dt.reset="";Dt.bright="";Dt.dim="";Dt.red="";Dt.green="";Dt.yellow="";Dt.blue="";Dt.magenta="";Dt.cyan="";Dt.white="";Dt.grey="";Dt.refresh()});var eT=D(Qe=>{"use strict";var dD=Qe&&Qe.__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]})),pD=Qe&&Qe.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),YS=Qe&&Qe.__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"&&dD(r,e,n[i]);return pD(r,e),r}})();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.env=Qe.DebugLogBackendBase=Qe.placeholder=Qe.AdhocDebugLogger=Qe.LogSeverity=void 0;Qe.getNodeBackend=gp;Qe.getDebugBackend=mD;Qe.getStructuredBackend=hD;Qe.setBackend=gD;Qe.log=QS;var fD=require("events"),wa=YS(require("process")),XS=YS(require("util")),tr=JS(),Or;(function(t){t.DEFAULT="DEFAULT",t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR"})(Or||(Qe.LogSeverity=Or={}));var Pa=class extends fD.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(Or.DEBUG,...n),this.func.info=(...n)=>this.invokeSeverity(Or.INFO,...n),this.func.warn=(...n)=>this.invokeSeverity(Or.WARNING,...n),this.func.error=(...n)=>this.invokeSeverity(Or.ERROR,...n),this.func.sublog=n=>QS(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)}};Qe.AdhocDebugLogger=Pa;Qe.placeholder=new Pa("",()=>{}).func;var li=class{static{o(this,"DebugLogBackendBase")}constructor(){var e;this.cached=new Map,this.filters=[],this.filtersSet=!1;let r=(e=wa.env[Qe.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)}}};Qe.DebugLogBackendBase=li;var hp=class extends li{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=`${tr.Colours.green}${e}${tr.Colours.reset}`,u=`${tr.Colours.yellow}${wa.pid}${tr.Colours.reset}`,d;switch(r.severity){case Or.ERROR:d=`${tr.Colours.red}${r.severity}${tr.Colours.reset}`;break;case Or.INFO:d=`${tr.Colours.magenta}${r.severity}${tr.Colours.reset}`;break;case Or.WARNING:d=`${tr.Colours.yellow}${r.severity}${tr.Colours.reset}`;break;default:d=(i=r.severity)!==null&&i!==void 0?i:Or.DEFAULT;break}let p=XS.formatWithOptions({colors:tr.Colours.enabled},...n),h=Object.assign({},r);delete h.severity;let y=Object.getOwnPropertyNames(h).length?JSON.stringify(h):"",m=y?`${tr.Colours.grey}${y}${tr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",u,s,d,p,y?` ${m}`:"")}:()=>{}}setFilters(){let r=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${r}$`,"i")}};function gp(){return new hp}o(gp,"getNodeBackend");var yp=class extends li{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=wa.env.NODE_DEBUG)!==null&&e!==void 0?e:"";wa.env.NODE_DEBUG=`${r}${r?",":""}${this.filters.join(",")}`}};function mD(t){return new yp(t)}o(mD,"getDebugBackend");var vp=class extends li{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 u;let d=(u=i.severity)!==null&&u!==void 0?u:Or.INFO,p=Object.assign({severity:d,message:XS.format(...s)},i),h=JSON.stringify(p);n?n(i,h):console.log("%s",h)}}setFilters(){var e;(e=this.upstream)===null||e===void 0||e.setFilters()}};function hD(t){return new vp(t)}o(hD,"getStructuredBackend");Qe.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var _p=new Map,rr;function gD(t){rr=t,_p.clear()}o(gD,"setBackend");function QS(t,e){if(!rr&&!wa.env[Qe.env.nodeEnables]||!t)return Qe.placeholder;e&&(t=`${e.instance.namespace}:${t}`);let r=_p.get(t);if(r)return r.func;if(rr===null)return Qe.placeholder;rr===void 0&&(rr=gp());let n=(()=>{let i;return new Pa(t,(u,...d)=>{if(i!==rr){if(rr===null)return;rr===void 0&&(rr=gp()),i=rr}rr?.log(t,u,...d)})})();return _p.set(t,n),n.func}o(QS,"log")});var bp=D(bo=>{"use strict";var yD=bo&&bo.__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]})),vD=bo&&bo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yD(e,t,r)};Object.defineProperty(bo,"__esModule",{value:!0});vD(eT(),bo)});var Aa=D(ye=>{"use strict";var rT=ye&&ye.__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=ye&&ye.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bD=ye&&ye.__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"&&rT(r,e,n[i]);return _D(r,e),r}})(),ED=ye&&ye.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&rT(e,t,r)};Object.defineProperty(ye,"__esModule",{value:!0});ye.gcpResidencyCache=ye.METADATA_SERVER_DETECTION=ye.HEADERS=ye.HEADER_VALUE=ye.HEADER_NAME=ye.SECONDARY_HOST_ADDRESS=ye.HOST_ADDRESS=ye.BASE_PATH=void 0;ye.instance=AD;ye.project=ID;ye.universe=RD;ye.bulk=CD;ye.isAvailable=kD;ye.resetIsAvailableCache=$D;ye.getGCPResidency=Tp;ye.setGCPResidency=nT;ye.requestTimeout=oT;var Ep=ht(),SD=BS(),TD=mp(),wD=bD(bp());ye.BASE_PATH="/computeMetadata/v1";ye.HOST_ADDRESS="http://169.254.169.254";ye.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";ye.HEADER_NAME="Metadata-Flavor";ye.HEADER_VALUE="Google";ye.HEADERS=Object.freeze({[ye.HEADER_NAME]:ye.HEADER_VALUE});var tT=wD.log("gcp-metadata");ye.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 Sp(t){return t||(t=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||ye.HOST_ADDRESS),/^https?:\/\//.test(t)||(t=`http://${t}`),new URL(ye.BASE_PATH,t).href}o(Sp,"getBaseUrl");function PD(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(PD,"validate");async function xa(t,e={},r=3,n=!1){let i=new Headers(ye.HEADERS),s="",u={};if(typeof t=="object"){let m=t;new Headers(m.headers).forEach((f,l)=>i.set(l,f)),s=m.metadataKey,u=m.params||u,r=m.noResponseRetries||r,n=m.fastFail||n}else s=t;typeof e=="string"?s+=`/${e}`:(PD(e),e.property&&(s+=`/${e.property}`),new Headers(e.headers).forEach((m,f)=>i.set(f,m)),u=e.params||u);let d=n?xD:Ep.request,p={url:`${Sp()}/${s}`,headers:i,retryConfig:{noResponseRetries:r},params:u,responseType:"text",timeout:oT()};tT.info("instance request %j",p);let h=await d(p);tT.info("instance metadata is %s",h.data);let y=h.headers.get(ye.HEADER_NAME);if(y!==ye.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${ye.HEADER_NAME} header. Expected '${ye.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`);if(typeof h.data=="string")try{return SD.parse(h.data)}catch{}return h.data}o(xa,"metadataAccessor");async function xD(t){let e={...t,url:t.url?.toString().replace(Sp(),Sp(ye.SECONDARY_HOST_ADDRESS))},r=(0,Ep.request)(t),n=(0,Ep.request)(e);return Promise.any([r,n])}o(xD,"fastFailMetadataRequest");function AD(t){return xa("instance",t)}o(AD,"instance");function ID(t){return xa("project",t)}o(ID,"project");function RD(t){return xa("universe",t)}o(RD,"universe");async function CD(t){let e={};return await Promise.all(t.map(r=>(async()=>{let n=await xa(r),i=r.metadataKey;e[i]=n})())),e}o(CD,"bulk");function OD(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}o(OD,"detectGCPAvailableRetries");var Mc;async function kD(){if(process.env.METADATA_SERVER_DETECTION){let t=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(t in ye.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${t}\`, but it should be \`${Object.keys(ye.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(t){case"assume-present":return!0;case"none":return!1;case"bios-only":return Tp();case"ping-only":}}try{return Mc===void 0&&(Mc=xa("instance",void 0,OD(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await Mc,!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(kD,"isAvailable");function $D(){Mc=void 0}o($D,"resetIsAvailableCache");ye.gcpResidencyCache=null;function Tp(){return ye.gcpResidencyCache===null&&nT(),ye.gcpResidencyCache}o(Tp,"getGCPResidency");function nT(t=null){ye.gcpResidencyCache=t!==null?t:(0,TD.detectGCPResidency)()}o(nT,"setGCPResidency");function oT(){return Tp()?0:3e3}o(oT,"requestTimeout");ED(mp(),ye)});var sT=D(Lc=>{"use strict";Lc.byteLength=ND;Lc.toByteArray=UD;Lc.fromByteArray=jD;var Vr=[],yr=[],DD=typeof Uint8Array<"u"?Uint8Array:Array,wp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Eo=0,iT=wp.length;Eo<iT;++Eo)Vr[Eo]=wp[Eo],yr[wp.charCodeAt(Eo)]=Eo;var Eo,iT;yr[45]=62;yr[95]=63;function aT(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(aT,"getLens");function ND(t){var e=aT(t),r=e[0],n=e[1];return(r+n)*3/4-n}o(ND,"byteLength");function zD(t,e,r){return(e+r)*3/4-r}o(zD,"_byteLength");function UD(t){var e,r=aT(t),n=r[0],i=r[1],s=new DD(zD(t,n,i)),u=0,d=i>0?n-4:n,p;for(p=0;p<d;p+=4)e=yr[t.charCodeAt(p)]<<18|yr[t.charCodeAt(p+1)]<<12|yr[t.charCodeAt(p+2)]<<6|yr[t.charCodeAt(p+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=e&255;return i===2&&(e=yr[t.charCodeAt(p)]<<2|yr[t.charCodeAt(p+1)]>>4,s[u++]=e&255),i===1&&(e=yr[t.charCodeAt(p)]<<10|yr[t.charCodeAt(p+1)]<<4|yr[t.charCodeAt(p+2)]>>2,s[u++]=e>>8&255,s[u++]=e&255),s}o(UD,"toByteArray");function MD(t){return Vr[t>>18&63]+Vr[t>>12&63]+Vr[t>>6&63]+Vr[t&63]}o(MD,"tripletToBase64");function LD(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(MD(n));return i.join("")}o(LD,"encodeChunk");function jD(t){for(var e,r=t.length,n=r%3,i=[],s=16383,u=0,d=r-n;u<d;u+=s)i.push(LD(t,u,u+s>d?d:u+s));return n===1?(e=t[r-1],i.push(Vr[e>>2]+Vr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Vr[e>>10]+Vr[e>>4&63]+Vr[e<<2&63]+"=")),i.join("")}o(jD,"fromByteArray")});var xp=D(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.fromArrayBufferToHex=FD;function FD(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}o(FD,"fromArrayBufferToHex")});var cT=D(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.BrowserCrypto=void 0;var di=sT(),qD=xp(),Ap=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 di.fromByteArray(new Uint8Array(n))}randomBytesBase64(e){let r=new Uint8Array(e);return window.crypto.getRandomValues(r),di.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),u=di.toByteArray(t.padBase64(n)),d=await window.crypto.subtle.importKey("jwk",e,i,!0,["verify"]);return await window.crypto.subtle.verify(i,d,u,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"]),u=await window.crypto.subtle.sign(n,s,i);return di.fromByteArray(new Uint8Array(u))}decodeBase64StringUtf8(e){let r=di.toByteArray(t.padBase64(e));return new TextDecoder().decode(r)}encodeBase64StringUtf8(e){let r=new TextEncoder().encode(e);return di.fromByteArray(r)}async sha256DigestHex(e){let r=new TextEncoder().encode(e),n=await window.crypto.subtle.digest("SHA-256",r);return(0,qD.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))}};jc.BrowserCrypto=Ap});var uT=D(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.NodeCrypto=void 0;var pi=require("crypto"),Ip=class{static{o(this,"NodeCrypto")}async sha256DigestBase64(e){return pi.createHash("sha256").update(e).digest("base64")}randomBytesBase64(e){return pi.randomBytes(e).toString("base64")}async verify(e,r,n){let i=pi.createVerify("RSA-SHA256");return i.update(r),i.end(),i.verify(e,n,"base64")}async sign(e,r){let n=pi.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 pi.createHash("sha256").update(e).digest("hex")}async signWithHmacSha256(e,r){let n=typeof e=="string"?e:VD(e);return BD(pi.createHmac("sha256",n).update(r).digest())}};Fc.NodeCrypto=Ip;function BD(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}o(BD,"toArrayBuffer");function VD(t){return Buffer.from(t)}o(VD,"toBuffer")});var Ia=D(vn=>{"use strict";var GD=vn&&vn.__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]})),HD=vn&&vn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&GD(e,t,r)};Object.defineProperty(vn,"__esModule",{value:!0});vn.createCrypto=KD;vn.hasBrowserCrypto=lT;var WD=cT(),ZD=uT();HD(xp(),vn);function KD(){return lT()?new WD.BrowserCrypto:new ZD.NodeCrypto}o(KD,"createCrypto");function lT(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}o(lT,"hasBrowserCrypto")});var fi=D((Rp,pT)=>{var qc=require("buffer"),Gr=qc.Buffer;function dT(t,e){for(var r in t)e[r]=t[r]}o(dT,"copyProps");Gr.from&&Gr.alloc&&Gr.allocUnsafe&&Gr.allocUnsafeSlow?pT.exports=qc:(dT(qc,Rp),Rp.Buffer=So);function So(t,e,r){return Gr(t,e,r)}o(So,"SafeBuffer");So.prototype=Object.create(Gr.prototype);dT(Gr,So);So.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Gr(t,e,r)};So.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Gr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};So.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Gr(t)};So.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return qc.SlowBuffer(t)}});var mT=D((i7,fT)=>{"use strict";function Cp(t){var e=(t/8|0)+(t%8===0?0:1);return e}o(Cp,"getParamSize");var JD={ES256:Cp(256),ES384:Cp(384),ES512:Cp(521)};function YD(t){var e=JD[t];if(e)return e;throw new Error('Unknown algorithm "'+t+'"')}o(YD,"getParamBytesForAlg");fT.exports=YD});var Op=D((s7,bT)=>{"use strict";var Bc=fi().Buffer,gT=mT(),Vc=128,yT=0,XD=32,QD=16,eN=2,vT=QD|XD|yT<<6,Gc=eN|yT<<6;function tN(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(tN,"base64Url");function _T(t){if(Bc.isBuffer(t))return t;if(typeof t=="string")return Bc.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}o(_T,"signatureAsBuffer");function rN(t,e){t=_T(t);var r=gT(e),n=r+1,i=t.length,s=0;if(t[s++]!==vT)throw new Error('Could not find expected "seq"');var u=t[s++];if(u===(Vc|1)&&(u=t[s++]),i-s<u)throw new Error('"seq" specified length of "'+u+'", only "'+(i-s)+'" remaining');if(t[s++]!==Gc)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 p=s;if(s+=d,t[s++]!==Gc)throw new Error('Could not find expected "int" for "s"');var h=t[s++];if(i-s!==h)throw new Error('"s" specified length of "'+h+'", expected "'+(i-s)+'"');if(n<h)throw new Error('"s" specified length of "'+h+'", max of "'+n+'" is acceptable');var y=s;if(s+=h,s!==i)throw new Error('Expected to consume entire buffer, but "'+(i-s)+'" bytes remain');var m=r-d,f=r-h,l=Bc.allocUnsafe(m+d+f+h);for(s=0;s<m;++s)l[s]=0;t.copy(l,s,p+Math.max(-m,0),p+d),s=r;for(var g=s;s<g+f;++s)l[s]=0;return t.copy(l,s,y+Math.max(-f,0),y+h),l=l.toString("base64"),l=tN(l),l}o(rN,"derToJose");function hT(t,e,r){for(var n=0;e+n<r&&t[e+n]===0;)++n;var i=t[e+n]>=Vc;return i&&--n,n}o(hT,"countPadding");function nN(t,e){t=_T(t);var r=gT(e),n=t.length;if(n!==r*2)throw new TypeError('"'+e+'" signatures must be "'+r*2+'" bytes, saw "'+n+'"');var i=hT(t,0,r),s=hT(t,r,t.length),u=r-i,d=r-s,p=2+u+1+1+d,h=p<Vc,y=Bc.allocUnsafe((h?2:3)+p),m=0;return y[m++]=vT,h?y[m++]=p:(y[m++]=Vc|1,y[m++]=p&255),y[m++]=Gc,y[m++]=u,i<0?(y[m++]=0,m+=t.copy(y,m,0,r)):m+=t.copy(y,m,i,r),y[m++]=Gc,y[m++]=d,s<0?(y[m++]=0,t.copy(y,m,r)):t.copy(y,m,r+s),y}o(nN,"joseToDer");bT.exports={derToJose:rN,joseToDer:nN}});var kr=D(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.LRUCache=void 0;_n.snakeToCamel=ST;_n.originalOrCamelOptions=sN;_n.removeUndefinedValuesInObject=cN;_n.isValidFile=uN;_n.getWellKnownCertificateConfigFileLocation=lN;var oN=require("fs"),iN=require("os"),kp=require("path"),aN="certificate_config.json",ET="gcloud";function ST(t){return t.replace(/([_][^_])/g,e=>e.slice(1).toUpperCase())}o(ST,"snakeToCamel");function sN(t){function e(r){let n=t||{};return n[r]??n[ST(r)]}return o(e,"get"),{get:e}}o(sN,"originalOrCamelOptions");var $p=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()}};_n.LRUCache=$p;function cN(t){return Object.entries(t).forEach(([e,r])=>{(r===void 0||r==="undefined")&&delete t[e]}),t}o(cN,"removeUndefinedValuesInObject");async function uN(t){try{return(await oN.promises.lstat(t)).isFile()}catch{return!1}}o(uN,"isValidFile");function lN(){let t=process.env.CLOUDSDK_CONFIG||(dN()?kp.join(process.env.APPDATA||"",ET):kp.join(process.env.HOME||"",".config",ET));return kp.join(t,aN)}o(lN,"getWellKnownCertificateConfigFileLocation");function dN(){return iN.platform().startsWith("win")}o(dN,"_isWindows")});var TT=D((d7,pN)=>{pN.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 Dp=D(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.USER_AGENT=Yn.PRODUCT_NAME=Yn.pkg=void 0;var wT=TT();Yn.pkg=wT;var PT="google-api-nodejs-client";Yn.PRODUCT_NAME=PT;var fN=`${PT}/${wT.version}`;Yn.USER_AGENT=fN});var nr=D($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.AuthClient=$r.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=$r.DEFAULT_UNIVERSE=void 0;var mN=require("events"),Np=ht(),hN=kr(),gN=bp(),zp=Dp();$r.DEFAULT_UNIVERSE="googleapis.com";$r.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var Up=class t extends mN.EventEmitter{static{o(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=$r.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=$r.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(e={}){super();let r=(0,hN.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")??$r.DEFAULT_UNIVERSE,this.transporter=e.transporter??new Np.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&&Np.Gaxios.mergeHeaders(s,r.headers),n&&Np.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,gN.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(`${zp.PRODUCT_NAME}/`)||e.headers.set("User-Agent",`${r} ${zp.USER_AGENT}`):e.headers.set("User-Agent",zp.USER_AGENT);try{let n=e,i=n[t.RequestMethodNameSymbol],s=`${Math.floor(Math.random()*1e3)}`;n[t.RequestLogIdSymbol]=s;let u={url:e.url,headers:e.headers};i?t.log.info("%s [%s] request %j",i,s,u):t.log.info("[%s] request %j",s,u)}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"]}}}};$r.AuthClient=Up});var Lp=D(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.LoginTicket=void 0;var Mp=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()}}};Hc.LoginTicket=Mp});var To=D(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.OAuth2Client=Hr.ClientAuthentication=Hr.CertificateFormat=Hr.CodeChallengeMethod=void 0;var xT=ht(),yN=require("querystring"),vN=require("stream"),_N=Op(),AT=kr(),jp=Ia(),mi=nr(),bN=Lp(),IT;(function(t){t.Plain="plain",t.S256="S256"})(IT||(Hr.CodeChallengeMethod=IT={}));var bn;(function(t){t.PEM="PEM",t.JWK="JWK"})(bn||(Hr.CertificateFormat=bn={}));var Ra;(function(t){t.ClientSecretPost="ClientSecretPost",t.ClientSecretBasic="ClientSecretBasic",t.None="None"})(Ra||(Hr.ClientAuthentication=Ra={}));var Fp=class t extends mi.AuthClient{static{o(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=bn.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||Ra.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()+"?"+yN.stringify(e)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let e=(0,jp.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===Ra.ClientSecretBasic){let p=Buffer.from(`${this._clientId}:${this._clientSecret}`);n.set("authorization",`Basic ${p.toString("base64")}`)}this.clientAuthentication===Ra.ClientSecretPost&&(i.client_secret=this._clientSecret);let s={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,AT.removeUndefinedValuesInObject)(i)),headers:n};mi.AuthClient.setMethodName(s,"getTokenAsync");let u=await this.transporter.request(s),d=u.data;return u.data&&u.data.expires_in&&(d.expiry_date=new Date().getTime()+u.data.expires_in*1e3,delete d.expires_in),this.emit("tokens",d),{tokens:d,res:u}}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 u={...t.RETRY_CONFIG,method:"POST",url:r,data:new URLSearchParams((0,AT.removeUndefinedValuesInObject)(n))};mi.AuthClient.setMethodName(u,"refreshTokenNoCache"),i=await this.transporter.request(u)}catch(u){throw u instanceof xT.GaxiosError&&u.message==="invalid_grant"&&u.response?.data&&/ReAuth/i.test(u.response.data.error_description)&&(u.message=JSON.stringify(u.response.data)),u}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 p=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(p)}}}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 p=d;throw p.response&&(p.response.status===403||p.response.status===404)&&(p.message=`Could not refresh access token: ${p.message}`),p}let s=this.credentials;s.token_type=s.token_type||"Bearer",i.refresh_token=s.refresh_token,this.credentials=i;let u=new Headers({authorization:s.token_type+" "+i.access_token});return{headers:this.addSharedMetadataHeaders(u),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(mi.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=xT.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,u=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,p=i.config.data instanceof vN.Readable,h=s===401||s===403;if(!r&&h&&!p&&u)return await this.refreshAccessTokenAsync(),this.requestAsync(e,!0);if(!r&&h&&!p&&d){let y=await this.processAndValidateRefreshHandler();return y?.access_token&&this.setCredentials(y),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,jp.hasBrowserCrypto)()?bn.JWK:bn.PEM;if(this.certificateExpiry&&e<this.certificateExpiry.getTime()&&this.certificateCacheFormat===r)return{certs:this.certificateCache,format:r};let n,i;switch(r){case bn.PEM:i=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case bn.JWK:i=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${r}`)}try{let h={...t.RETRY_CONFIG,url:i};mi.AuthClient.setMethodName(h,"getFederatedSignonCertsAsync"),n=await this.transporter.request(h)}catch(h){throw h instanceof Error&&(h.message=`Failed to retrieve verification certificates: ${h.message}`),h}let s=n?.headers.get("cache-control"),u=-1;if(s){let h=/max-age=(?<maxAge>[0-9]+)/.exec(s)?.groups?.maxAge;h&&(u=Number(h)*1e3)}let d={};switch(r){case bn.PEM:d=n.data;break;case bn.JWK:for(let h of n.data.keys)d[h.kid]=h;break;default:throw new Error(`Unsupported certificate format ${r}`)}let p=new Date;return this.certificateExpiry=u===-1?null:new Date(p.getTime()+u),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};mi.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 u=(0,jp.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 p=d[0]+"."+d[1],h=d[2],y,m;try{y=JSON.parse(u.decodeBase64StringUtf8(d[0]))}catch(U){throw U instanceof Error&&(U.message=`Can't parse token envelope: ${d[0]}': ${U.message}`),U}if(!y)throw new Error("Can't parse token envelope: "+d[0]);try{m=JSON.parse(u.decodeBase64StringUtf8(d[1]))}catch(U){throw U instanceof Error&&(U.message=`Can't parse token payload '${d[0]}`),U}if(!m)throw new Error("Can't parse token payload: "+d[1]);if(!Object.prototype.hasOwnProperty.call(r,y.kid))throw new Error("No pem found for envelope: "+JSON.stringify(y));let f=r[y.kid];if(y.alg==="ES256"&&(h=_N.joseToDer(h,"ES256").toString("base64")),!await u.verify(f,p,h))throw new Error("Invalid token signature: "+e);if(!m.iat)throw new Error("No issue time in token: "+JSON.stringify(m));if(!m.exp)throw new Error("No expiration time in token: "+JSON.stringify(m));let g=Number(m.iat);if(isNaN(g))throw new Error("iat field using invalid format");let v=Number(m.exp);if(isNaN(v))throw new Error("exp field using invalid format");let E=new Date().getTime()/1e3;if(v>=E+s)throw new Error("Expiration time too far in future: "+JSON.stringify(m));let b=g-t.CLOCK_SKEW_SECS_,C=v+t.CLOCK_SKEW_SECS_;if(E<b)throw new Error("Token used too early, "+E+" < "+b+": "+JSON.stringify(m));if(E>C)throw new Error("Token used too late, "+E+" > "+C+": "+JSON.stringify(m));if(i&&i.indexOf(m.iss)<0)throw new Error("Invalid issuer, expected one of ["+i+"], but got "+m.iss);if(typeof n<"u"&&n!==null){let U=m.aud,Y=!1;if(n.constructor===Array?Y=n.indexOf(U)>-1:Y=U===n,!Y)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new bN.LoginTicket(y,m)}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}};Hr.OAuth2Client=Fp});var Bp=D(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.Compute=void 0;var EN=ht(),RT=Aa(),SN=To(),qp=class extends SN.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 RT.instance(i)}catch(i){throw i instanceof EN.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 RT.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))}};Wc.Compute=qp});var Gp=D(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.IdTokenClient=void 0;var TN=To(),Vp=class extends TN.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}};Zc.IdTokenClient=Vp});var Hp=D(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.GCPEnv=void 0;hi.clear=wN;hi.getEnv=PN;var CT=Aa(),Wr;(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"})(Wr||(hi.GCPEnv=Wr={}));var Ca;function wN(){Ca=void 0}o(wN,"clear");async function PN(){return Ca||(Ca=xN(),Ca)}o(PN,"getEnv");async function xN(){let t=Wr.NONE;return AN()?t=Wr.APP_ENGINE:IN()?t=Wr.CLOUD_FUNCTIONS:await kN()?await ON()?t=Wr.KUBERNETES_ENGINE:RN()?t=Wr.CLOUD_RUN:CN()?t=Wr.CLOUD_RUN_JOBS:t=Wr.COMPUTE_ENGINE:t=Wr.NONE,t}o(xN,"getEnvMemoized");function AN(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}o(AN,"isAppEngine");function IN(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}o(IN,"isCloudFunction");function RN(){return!!process.env.K_CONFIGURATION}o(RN,"isCloudRun");function CN(){return!!process.env.CLOUD_RUN_JOB}o(CN,"isCloudRunJob");async function ON(){try{return await CT.instance("attributes/cluster-name"),!0}catch{return!1}}o(ON,"isKubernetesEngine");async function kN(){return CT.isAvailable()}o(kN,"isComputeEngine")});var Wp=D((P7,OT)=>{var Kc=fi().Buffer,$N=require("stream"),DN=require("util");function Jc(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=Kc.alloc(0),this;if(typeof t.pipe=="function")return this.buffer=Kc.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(Jc,"DataStream");DN.inherits(Jc,$N);Jc.prototype.write=o(function(e){this.buffer=Kc.concat([this.buffer,Kc.from(e)]),this.emit("data",e)},"write");Jc.prototype.end=o(function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},"end");OT.exports=Jc});var $T=D((A7,kT)=>{"use strict";var Oa=require("buffer").Buffer,Zp=require("buffer").SlowBuffer;kT.exports=Yc;function Yc(t,e){if(!Oa.isBuffer(t)||!Oa.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(Yc,"bufferEq");Yc.install=function(){Oa.prototype.equal=Zp.prototype.equal=o(function(e){return Yc(this,e)},"equal")};var NN=Oa.prototype.equal,zN=Zp.prototype.equal;Yc.restore=function(){Oa.prototype.equal=NN,Zp.prototype.equal=zN}});var Xp=D((R7,qT)=>{var yi=fi().Buffer,vr=require("crypto"),NT=Op(),DT=require("util"),UN=`"%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(()=>Ke(L0()))).HttpsProxyAgent,this.#i}static async#c(){let t=typeof window<"u"&&!!window;return this.#a||=t?window.fetch:(await Promise.resolve().then(()=>($O(),kO))).default,this.#a}static mergeHeaders(t,...n){t=t instanceof Headers?t:new Headers(t);for(let o of n)(o instanceof Headers?o:new Headers(o)).forEach((i,s)=>{s==="set-cookie"?t.append(s,i):t.set(s,i)});return t}};La.Gaxios=Jf;Ma=Jf});var Pt=z(Qt=>{"use strict";var f6=Qt&&Qt.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),m6=Qt&&Qt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&f6(t,e,n)};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.instance=Qt.Gaxios=Qt.GaxiosError=void 0;Qt.request=g6;var UO=zO();Object.defineProperty(Qt,"Gaxios",{enumerable:!0,get:a(function(){return UO.Gaxios},"get")});var h6=jb();Object.defineProperty(Qt,"GaxiosError",{enumerable:!0,get:a(function(){return h6.GaxiosError},"get")});m6(qb(),Qt);Qt.instance=new UO.Gaxios;async function g6(e){return Qt.instance.request(e)}a(g6,"request")});var dE=z((MO,Yf)=>{(function(e){"use strict";var t,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,d=14,f=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function p(H){var K,ee,se,Q=ae.prototype={constructor:ae,toString:null,valueOf:null},Le=new ae(1),ce=20,J=4,W=-7,ne=21,X=-1e7,pe=1e7,he=!1,Ne=1,je=0,rt={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},ut="0123456789abcdefghijklmnopqrstuvwxyz",kt=!0;function ae(T,w){var x,M,C,D,F,R,$,L,U=this;if(!(U instanceof ae))return new ae(T,w);if(w==null){if(T&&T._isBigNumber===!0){U.s=T.s,!T.c||T.e>pe?U.c=U.e=null:T.e<X?U.c=[U.e=0]:(U.e=T.e,U.c=T.c.slice());return}if((R=typeof T=="number")&&T*0==0){if(U.s=1/T<0?(T=-T,-1):1,T===~~T){for(D=0,F=T;F>=10;F/=10,D++);D>pe?U.c=U.e=null:(U.e=D,U.c=[T]);return}L=String(T)}else{if(!n.test(L=String(T)))return se(U,L,R);U.s=L.charCodeAt(0)==45?(L=L.slice(1),-1):1}(D=L.indexOf("."))>-1&&(L=L.replace(".","")),(F=L.search(/e/i))>0?(D<0&&(D=F),D+=+L.slice(F+1),L=L.substring(0,F)):D<0&&(D=L.length)}else{if(b(w,2,ut.length,"Base"),w==10&&kt)return U=new ae(T),Xe(U,ce+U.e+1,J);if(L=String(T),R=typeof T=="number"){if(T*0!=0)return se(U,L,R,w);if(U.s=1/T<0?(L=L.slice(1),-1):1,ae.DEBUG&&L.replace(/^0\.0*|\./,"").length>15)throw Error(s+T)}else U.s=L.charCodeAt(0)===45?(L=L.slice(1),-1):1;for(x=ut.slice(0,w),D=F=0,$=L.length;F<$;F++)if(x.indexOf(M=L.charAt(F))<0){if(M=="."){if(F>D){D=$;continue}}else if(!C&&(L==L.toUpperCase()&&(L=L.toLowerCase())||L==L.toLowerCase()&&(L=L.toUpperCase()))){C=!0,F=-1,D=0;continue}return se(U,String(T),R,w)}R=!1,L=ee(L,w,10,U.s),(D=L.indexOf("."))>-1?L=L.replace(".",""):D=L.length}for(F=0;L.charCodeAt(F)===48;F++);for($=L.length;L.charCodeAt(--$)===48;);if(L=L.slice(F,++$)){if($-=F,R&&ae.DEBUG&&$>15&&(T>f||T!==r(T)))throw Error(s+U.s*T);if((D=D-F-1)>pe)U.c=U.e=null;else if(D<X)U.c=[U.e=0];else{if(U.e=D,U.c=[],F=(D+1)%d,D<0&&(F+=d),F<$){for(F&&U.c.push(+L.slice(0,F)),$-=d;F<$;)U.c.push(+L.slice(F,F+=d));F=d-(L=L.slice(F)).length}else F-=$;for(;F--;L+="0");U.c.push(+L)}}else U.c=[U.e=0]}a(ae,"BigNumber"),ae.clone=p,ae.ROUND_UP=0,ae.ROUND_DOWN=1,ae.ROUND_CEIL=2,ae.ROUND_FLOOR=3,ae.ROUND_HALF_UP=4,ae.ROUND_HALF_DOWN=5,ae.ROUND_HALF_EVEN=6,ae.ROUND_HALF_CEIL=7,ae.ROUND_HALF_FLOOR=8,ae.EUCLID=9,ae.config=ae.set=function(T){var w,x;if(T!=null)if(typeof T=="object"){if(T.hasOwnProperty(w="DECIMAL_PLACES")&&(x=T[w],b(x,0,m,w),ce=x),T.hasOwnProperty(w="ROUNDING_MODE")&&(x=T[w],b(x,0,8,w),J=x),T.hasOwnProperty(w="EXPONENTIAL_AT")&&(x=T[w],x&&x.pop?(b(x[0],-m,0,w),b(x[1],0,m,w),W=x[0],ne=x[1]):(b(x,-m,m,w),W=-(ne=x<0?-x:x))),T.hasOwnProperty(w="RANGE"))if(x=T[w],x&&x.pop)b(x[0],-m,-1,w),b(x[1],1,m,w),X=x[0],pe=x[1];else if(b(x,-m,m,w),x)X=-(pe=x<0?-x:x);else throw Error(i+w+" cannot be zero: "+x);if(T.hasOwnProperty(w="CRYPTO"))if(x=T[w],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))he=x;else throw he=!x,Error(i+"crypto unavailable");else he=x;else throw Error(i+w+" not true or false: "+x);if(T.hasOwnProperty(w="MODULO_MODE")&&(x=T[w],b(x,0,9,w),Ne=x),T.hasOwnProperty(w="POW_PRECISION")&&(x=T[w],b(x,0,m,w),je=x),T.hasOwnProperty(w="FORMAT"))if(x=T[w],typeof x=="object")rt=x;else throw Error(i+w+" not an object: "+x);if(T.hasOwnProperty(w="ALPHABET"))if(x=T[w],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))kt=x.slice(0,10)=="0123456789",ut=x;else throw Error(i+w+" invalid: "+x)}else throw Error(i+"Object expected: "+T);return{DECIMAL_PLACES:ce,ROUNDING_MODE:J,EXPONENTIAL_AT:[W,ne],RANGE:[X,pe],CRYPTO:he,MODULO_MODE:Ne,POW_PRECISION:je,FORMAT:rt,ALPHABET:ut}},ae.isBigNumber=function(T){if(!T||T._isBigNumber!==!0)return!1;if(!ae.DEBUG)return!0;var w,x,M=T.c,C=T.e,D=T.s;e:if({}.toString.call(M)=="[object Array]"){if((D===1||D===-1)&&C>=-m&&C<=m&&C===r(C)){if(M[0]===0){if(C===0&&M.length===1)return!0;break e}if(w=(C+1)%d,w<1&&(w+=d),String(M[0]).length==w){for(w=0;w<M.length;w++)if(x=M[w],x<0||x>=u||x!==r(x))break e;if(x!==0)return!0}}}else if(M===null&&C===null&&(D===null||D===1||D===-1))return!0;throw Error(i+"Invalid BigNumber: "+T)},ae.maximum=ae.max=function(){return St(arguments,-1)},ae.minimum=ae.min=function(){return St(arguments,1)},ae.random=(function(){var T=9007199254740992,w=Math.random()*T&2097151?function(){return r(Math.random()*T)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var M,C,D,F,R,$=0,L=[],U=new ae(Le);if(x==null?x=ce:b(x,0,m),F=o(x/d),he)if(crypto.getRandomValues){for(M=crypto.getRandomValues(new Uint32Array(F*=2));$<F;)R=M[$]*131072+(M[$+1]>>>11),R>=9e15?(C=crypto.getRandomValues(new Uint32Array(2)),M[$]=C[0],M[$+1]=C[1]):(L.push(R%1e14),$+=2);$=F/2}else if(crypto.randomBytes){for(M=crypto.randomBytes(F*=7);$<F;)R=(M[$]&31)*281474976710656+M[$+1]*1099511627776+M[$+2]*4294967296+M[$+3]*16777216+(M[$+4]<<16)+(M[$+5]<<8)+M[$+6],R>=9e15?crypto.randomBytes(7).copy(M,$):(L.push(R%1e14),$+=7);$=F/7}else throw he=!1,Error(i+"crypto unavailable");if(!he)for(;$<F;)R=w(),R<9e15&&(L[$++]=R%1e14);for(F=L[--$],x%=d,F&&x&&(R=h[d-x],L[$]=r(F/R)*R);L[$]===0;L.pop(),$--);if($<0)L=[D=0];else{for(D=-1;L[0]===0;L.splice(0,1),D-=d);for($=1,R=L[0];R>=10;R/=10,$++);$<d&&(D-=d-$)}return U.e=D,U.c=L,U}})(),ae.sum=function(){for(var T=1,w=arguments,x=new ae(w[0]);T<w.length;)x=x.plus(w[T++]);return x},ee=(function(){var T="0123456789";function w(x,M,C,D){for(var F,R=[0],$,L=0,U=x.length;L<U;){for($=R.length;$--;R[$]*=M);for(R[0]+=D.indexOf(x.charAt(L++)),F=0;F<R.length;F++)R[F]>C-1&&(R[F+1]==null&&(R[F+1]=0),R[F+1]+=R[F]/C|0,R[F]%=C)}return R.reverse()}return a(w,"toBaseOut"),function(x,M,C,D,F){var R,$,L,U,Y,ge,ve,We,mt=x.indexOf("."),ht=ce,He=J;for(mt>=0&&(U=je,je=0,x=x.replace(".",""),We=new ae(M),ge=We.pow(x.length-mt),je=U,We.c=w(Z(v(ge.c),ge.e,"0"),10,C,T),We.e=We.c.length),ve=w(x,M,C,F?(R=ut,T):(R=T,ut)),L=U=ve.length;ve[--U]==0;ve.pop());if(!ve[0])return R.charAt(0);if(mt<0?--L:(ge.c=ve,ge.e=L,ge.s=D,ge=K(ge,We,ht,He,C),ve=ge.c,Y=ge.r,L=ge.e),$=L+ht+1,mt=ve[$],U=C/2,Y=Y||$<0||ve[$+1]!=null,Y=He<4?(mt!=null||Y)&&(He==0||He==(ge.s<0?3:2)):mt>U||mt==U&&(He==4||Y||He==6&&ve[$-1]&1||He==(ge.s<0?8:7)),$<1||!ve[0])x=Y?Z(R.charAt(1),-ht,R.charAt(0)):R.charAt(0);else{if(ve.length=$,Y)for(--C;++ve[--$]>C;)ve[$]=0,$||(++L,ve=[1].concat(ve));for(U=ve.length;!ve[--U];);for(mt=0,x="";mt<=U;x+=R.charAt(ve[mt++]));x=Z(x,L,R.charAt(0))}return x}})(),K=(function(){function T(M,C,D){var F,R,$,L,U=0,Y=M.length,ge=C%g,ve=C/g|0;for(M=M.slice();Y--;)$=M[Y]%g,L=M[Y]/g|0,F=ve*$+L*ge,R=ge*$+F%g*g+U,U=(R/D|0)+(F/g|0)+ve*L,M[Y]=R%D;return U&&(M=[U].concat(M)),M}a(T,"multiply");function w(M,C,D,F){var R,$;if(D!=F)$=D>F?1:-1;else for(R=$=0;R<D;R++)if(M[R]!=C[R]){$=M[R]>C[R]?1:-1;break}return $}a(w,"compare");function x(M,C,D,F){for(var R=0;D--;)M[D]-=R,R=M[D]<C[D]?1:0,M[D]=R*F+M[D]-C[D];for(;!M[0]&&M.length>1;M.splice(0,1));}return a(x,"subtract"),function(M,C,D,F,R){var $,L,U,Y,ge,ve,We,mt,ht,He,Ye,It,Oi,ki,$i,fr,Cn,qt=M.s==C.s?1:-1,Rt=M.c,it=C.c;if(!Rt||!Rt[0]||!it||!it[0])return new ae(!M.s||!C.s||(Rt?it&&Rt[0]==it[0]:!it)?NaN:Rt&&Rt[0]==0||!it?qt*0:qt/0);for(mt=new ae(qt),ht=mt.c=[],L=M.e-C.e,qt=D+L+1,R||(R=u,L=y(M.e/d)-y(C.e/d),qt=qt/d|0),U=0;it[U]==(Rt[U]||0);U++);if(it[U]>(Rt[U]||0)&&L--,qt<0)ht.push(1),Y=!0;else{for(ki=Rt.length,fr=it.length,U=0,qt+=2,ge=r(R/(it[0]+1)),ge>1&&(it=T(it,ge,R),Rt=T(Rt,ge,R),fr=it.length,ki=Rt.length),Oi=fr,He=Rt.slice(0,fr),Ye=He.length;Ye<fr;He[Ye++]=0);Cn=it.slice(),Cn=[0].concat(Cn),$i=it[0],it[1]>=R/2&&$i++;do{if(ge=0,$=w(it,He,fr,Ye),$<0){if(It=He[0],fr!=Ye&&(It=It*R+(He[1]||0)),ge=r(It/$i),ge>1)for(ge>=R&&(ge=R-1),ve=T(it,ge,R),We=ve.length,Ye=He.length;w(ve,He,We,Ye)==1;)ge--,x(ve,fr<We?Cn:it,We,R),We=ve.length,$=1;else ge==0&&($=ge=1),ve=it.slice(),We=ve.length;if(We<Ye&&(ve=[0].concat(ve)),x(He,ve,Ye,R),Ye=He.length,$==-1)for(;w(it,He,fr,Ye)<1;)ge++,x(He,fr<Ye?Cn:it,Ye,R),Ye=He.length}else $===0&&(ge++,He=[0]);ht[U++]=ge,He[0]?He[Ye++]=Rt[Oi]||0:(He=[Rt[Oi]],Ye=1)}while((Oi++<ki||He[0]!=null)&&qt--);Y=He[0]!=null,ht[0]||ht.splice(0,1)}if(R==u){for(U=1,qt=ht[0];qt>=10;qt/=10,U++);Xe(mt,D+(mt.e=U+L*d-1)+1,F,Y)}else mt.e=L,mt.r=+Y;return mt}})();function bt(T,w,x,M){var C,D,F,R,$;if(x==null?x=J:b(x,0,8),!T.c)return T.toString();if(C=T.c[0],F=T.e,w==null)$=v(T.c),$=M==1||M==2&&(F<=W||F>=ne)?N($,F):Z($,F,"0");else if(T=Xe(new ae(T),w,x),D=T.e,$=v(T.c),R=$.length,M==1||M==2&&(w<=D||D<=W)){for(;R<w;$+="0",R++);$=N($,D)}else if(w-=F+(M===2&&D>F),$=Z($,D,"0"),D+1>R){if(--w>0)for($+=".";w--;$+="0");}else if(w+=D-R,w>0)for(D+1==R&&($+=".");w--;$+="0");return T.s<0&&C?"-"+$:$}a(bt,"format");function St(T,w){for(var x,M,C=1,D=new ae(T[0]);C<T.length;C++)M=new ae(T[C]),(!M.s||(x=E(D,M))===w||x===0&&D.s===w)&&(D=M);return D}a(St,"maxOrMin");function pr(T,w,x){for(var M=1,C=w.length;!w[--C];w.pop());for(C=w[0];C>=10;C/=10,M++);return(x=M+x*d-1)>pe?T.c=T.e=null:x<X?T.c=[T.e=0]:(T.e=x,T.c=w),T}a(pr,"normalise"),se=(function(){var T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,x=/^\.([^.]+)$/,M=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(D,F,R,$){var L,U=R?F:F.replace(C,"");if(M.test(U))D.s=isNaN(U)?null:U<0?-1:1;else{if(!R&&(U=U.replace(T,function(Y,ge,ve){return L=(ve=ve.toLowerCase())=="x"?16:ve=="b"?2:8,!$||$==L?ge:Y}),$&&(L=$,U=U.replace(w,"$1").replace(x,"0.$1")),F!=U))return new ae(U,L);if(ae.DEBUG)throw Error(i+"Not a"+($?" base "+$:"")+" number: "+F);D.s=null}D.c=D.e=null}})();function Xe(T,w,x,M){var C,D,F,R,$,L,U,Y=T.c,ge=h;if(Y){e:{for(C=1,R=Y[0];R>=10;R/=10,C++);if(D=w-C,D<0)D+=d,F=w,$=Y[L=0],U=r($/ge[C-F-1]%10);else if(L=o((D+1)/d),L>=Y.length)if(M){for(;Y.length<=L;Y.push(0));$=U=0,C=1,D%=d,F=D-d+1}else break e;else{for($=R=Y[L],C=1;R>=10;R/=10,C++);D%=d,F=D-d+C,U=F<0?0:r($/ge[C-F-1]%10)}if(M=M||w<0||Y[L+1]!=null||(F<0?$:$%ge[C-F-1]),M=x<4?(U||M)&&(x==0||x==(T.s<0?3:2)):U>5||U==5&&(x==4||M||x==6&&(D>0?F>0?$/ge[C-F]:0:Y[L-1])%10&1||x==(T.s<0?8:7)),w<1||!Y[0])return Y.length=0,M?(w-=T.e+1,Y[0]=ge[(d-w%d)%d],T.e=-w||0):Y[0]=T.e=0,T;if(D==0?(Y.length=L,R=1,L--):(Y.length=L+1,R=ge[d-D],Y[L]=F>0?r($/ge[C-F]%ge[F])*R:0),M)for(;;)if(L==0){for(D=1,F=Y[0];F>=10;F/=10,D++);for(F=Y[0]+=R,R=1;F>=10;F/=10,R++);D!=R&&(T.e++,Y[0]==u&&(Y[0]=1));break}else{if(Y[L]+=R,Y[L]!=u)break;Y[L--]=0,R=1}for(D=Y.length;Y[--D]===0;Y.pop());}T.e>pe?T.c=T.e=null:T.e<X&&(T.c=[T.e=0])}return T}a(Xe,"round");function ot(T){var w,x=T.e;return x===null?T.toString():(w=v(T.c),w=x<=W||x>=ne?N(w,x):Z(w,x,"0"),T.s<0?"-"+w:w)}return a(ot,"valueOf"),Q.absoluteValue=Q.abs=function(){var T=new ae(this);return T.s<0&&(T.s=1),T},Q.comparedTo=function(T,w){return E(this,new ae(T,w))},Q.decimalPlaces=Q.dp=function(T,w){var x,M,C,D=this;if(T!=null)return b(T,0,m),w==null?w=J:b(w,0,8),Xe(new ae(D),T+D.e+1,w);if(!(x=D.c))return null;if(M=((C=x.length-1)-y(this.e/d))*d,C=x[C])for(;C%10==0;C/=10,M--);return M<0&&(M=0),M},Q.dividedBy=Q.div=function(T,w){return K(this,new ae(T,w),ce,J)},Q.dividedToIntegerBy=Q.idiv=function(T,w){return K(this,new ae(T,w),0,1)},Q.exponentiatedBy=Q.pow=function(T,w){var x,M,C,D,F,R,$,L,U,Y=this;if(T=new ae(T),T.c&&!T.isInteger())throw Error(i+"Exponent not an integer: "+ot(T));if(w!=null&&(w=new ae(w)),R=T.e>14,!Y.c||!Y.c[0]||Y.c[0]==1&&!Y.e&&Y.c.length==1||!T.c||!T.c[0])return U=new ae(Math.pow(+ot(Y),R?T.s*(2-k(T)):+ot(T))),w?U.mod(w):U;if($=T.s<0,w){if(w.c?!w.c[0]:!w.s)return new ae(NaN);M=!$&&Y.isInteger()&&w.isInteger(),M&&(Y=Y.mod(w))}else{if(T.e>9&&(Y.e>0||Y.e<-1||(Y.e==0?Y.c[0]>1||R&&Y.c[1]>=24e7:Y.c[0]<8e13||R&&Y.c[0]<=9999975e7)))return D=Y.s<0&&k(T)?-0:0,Y.e>-1&&(D=1/D),new ae($?1/D:D);je&&(D=o(je/d+2))}for(R?(x=new ae(.5),$&&(T.s=1),L=k(T)):(C=Math.abs(+ot(T)),L=C%2),U=new ae(Le);;){if(L){if(U=U.times(Y),!U.c)break;D?U.c.length>D&&(U.c.length=D):M&&(U=U.mod(w))}if(C){if(C=r(C/2),C===0)break;L=C%2}else if(T=T.times(x),Xe(T,T.e+1,1),T.e>14)L=k(T);else{if(C=+ot(T),C===0)break;L=C%2}Y=Y.times(Y),D?Y.c&&Y.c.length>D&&(Y.c.length=D):M&&(Y=Y.mod(w))}return M?U:($&&(U=Le.div(U)),w?U.mod(w):D?Xe(U,je,J,F):U)},Q.integerValue=function(T){var w=new ae(this);return T==null?T=J:b(T,0,8),Xe(w,w.e+1,T)},Q.isEqualTo=Q.eq=function(T,w){return E(this,new ae(T,w))===0},Q.isFinite=function(){return!!this.c},Q.isGreaterThan=Q.gt=function(T,w){return E(this,new ae(T,w))>0},Q.isGreaterThanOrEqualTo=Q.gte=function(T,w){return(w=E(this,new ae(T,w)))===1||w===0},Q.isInteger=function(){return!!this.c&&y(this.e/d)>this.c.length-2},Q.isLessThan=Q.lt=function(T,w){return E(this,new ae(T,w))<0},Q.isLessThanOrEqualTo=Q.lte=function(T,w){return(w=E(this,new ae(T,w)))===-1||w===0},Q.isNaN=function(){return!this.s},Q.isNegative=function(){return this.s<0},Q.isPositive=function(){return this.s>0},Q.isZero=function(){return!!this.c&&this.c[0]==0},Q.minus=function(T,w){var x,M,C,D,F=this,R=F.s;if(T=new ae(T,w),w=T.s,!R||!w)return new ae(NaN);if(R!=w)return T.s=-w,F.plus(T);var $=F.e/d,L=T.e/d,U=F.c,Y=T.c;if(!$||!L){if(!U||!Y)return U?(T.s=-w,T):new ae(Y?F:NaN);if(!U[0]||!Y[0])return Y[0]?(T.s=-w,T):new ae(U[0]?F:J==3?-0:0)}if($=y($),L=y(L),U=U.slice(),R=$-L){for((D=R<0)?(R=-R,C=U):(L=$,C=Y),C.reverse(),w=R;w--;C.push(0));C.reverse()}else for(M=(D=(R=U.length)<(w=Y.length))?R:w,R=w=0;w<M;w++)if(U[w]!=Y[w]){D=U[w]<Y[w];break}if(D&&(C=U,U=Y,Y=C,T.s=-T.s),w=(M=Y.length)-(x=U.length),w>0)for(;w--;U[x++]=0);for(w=u-1;M>R;){if(U[--M]<Y[M]){for(x=M;x&&!U[--x];U[x]=w);--U[x],U[M]+=u}U[M]-=Y[M]}for(;U[0]==0;U.splice(0,1),--L);return U[0]?pr(T,U,L):(T.s=J==3?-1:1,T.c=[T.e=0],T)},Q.modulo=Q.mod=function(T,w){var x,M,C=this;return T=new ae(T,w),!C.c||!T.s||T.c&&!T.c[0]?new ae(NaN):!T.c||C.c&&!C.c[0]?new ae(C):(Ne==9?(M=T.s,T.s=1,x=K(C,T,0,3),T.s=M,x.s*=M):x=K(C,T,0,Ne),T=C.minus(x.times(T)),!T.c[0]&&Ne==1&&(T.s=C.s),T)},Q.multipliedBy=Q.times=function(T,w){var x,M,C,D,F,R,$,L,U,Y,ge,ve,We,mt,ht,He=this,Ye=He.c,It=(T=new ae(T,w)).c;if(!Ye||!It||!Ye[0]||!It[0])return!He.s||!T.s||Ye&&!Ye[0]&&!It||It&&!It[0]&&!Ye?T.c=T.e=T.s=null:(T.s*=He.s,!Ye||!It?T.c=T.e=null:(T.c=[0],T.e=0)),T;for(M=y(He.e/d)+y(T.e/d),T.s*=He.s,$=Ye.length,Y=It.length,$<Y&&(We=Ye,Ye=It,It=We,C=$,$=Y,Y=C),C=$+Y,We=[];C--;We.push(0));for(mt=u,ht=g,C=Y;--C>=0;){for(x=0,ge=It[C]%ht,ve=It[C]/ht|0,F=$,D=C+F;D>C;)L=Ye[--F]%ht,U=Ye[F]/ht|0,R=ve*L+U*ge,L=ge*L+R%ht*ht+We[D]+x,x=(L/mt|0)+(R/ht|0)+ve*U,We[D--]=L%mt;We[D]=x}return x?++M:We.splice(0,1),pr(T,We,M)},Q.negated=function(){var T=new ae(this);return T.s=-T.s||null,T},Q.plus=function(T,w){var x,M=this,C=M.s;if(T=new ae(T,w),w=T.s,!C||!w)return new ae(NaN);if(C!=w)return T.s=-w,M.minus(T);var D=M.e/d,F=T.e/d,R=M.c,$=T.c;if(!D||!F){if(!R||!$)return new ae(C/0);if(!R[0]||!$[0])return $[0]?T:new ae(R[0]?M:C*0)}if(D=y(D),F=y(F),R=R.slice(),C=D-F){for(C>0?(F=D,x=$):(C=-C,x=R),x.reverse();C--;x.push(0));x.reverse()}for(C=R.length,w=$.length,C-w<0&&(x=$,$=R,R=x,w=C),C=0;w;)C=(R[--w]=R[w]+$[w]+C)/u|0,R[w]=u===R[w]?0:R[w]%u;return C&&(R=[C].concat(R),++F),pr(T,R,F)},Q.precision=Q.sd=function(T,w){var x,M,C,D=this;if(T!=null&&T!==!!T)return b(T,1,m),w==null?w=J:b(w,0,8),Xe(new ae(D),T,w);if(!(x=D.c))return null;if(C=x.length-1,M=C*d+1,C=x[C]){for(;C%10==0;C/=10,M--);for(C=x[0];C>=10;C/=10,M++);}return T&&D.e+1>M&&(M=D.e+1),M},Q.shiftedBy=function(T){return b(T,-f,f),this.times("1e"+T)},Q.squareRoot=Q.sqrt=function(){var T,w,x,M,C,D=this,F=D.c,R=D.s,$=D.e,L=ce+4,U=new ae("0.5");if(R!==1||!F||!F[0])return new ae(!R||R<0&&(!F||F[0])?NaN:F?D:1/0);if(R=Math.sqrt(+ot(D)),R==0||R==1/0?(w=v(F),(w.length+$)%2==0&&(w+="0"),R=Math.sqrt(+w),$=y(($+1)/2)-($<0||$%2),R==1/0?w="5e"+$:(w=R.toExponential(),w=w.slice(0,w.indexOf("e")+1)+$),x=new ae(w)):x=new ae(R+""),x.c[0]){for($=x.e,R=$+L,R<3&&(R=0);;)if(C=x,x=U.times(C.plus(K(D,C,L,1))),v(C.c).slice(0,R)===(w=v(x.c)).slice(0,R))if(x.e<$&&--R,w=w.slice(R-3,R+1),w=="9999"||!M&&w=="4999"){if(!M&&(Xe(C,C.e+ce+2,0),C.times(C).eq(D))){x=C;break}L+=4,R+=4,M=1}else{(!+w||!+w.slice(1)&&w.charAt(0)=="5")&&(Xe(x,x.e+ce+2,1),T=!x.times(x).eq(D));break}}return Xe(x,x.e+ce+1,J,T)},Q.toExponential=function(T,w){return T!=null&&(b(T,0,m),T++),bt(this,T,w,1)},Q.toFixed=function(T,w){return T!=null&&(b(T,0,m),T=T+this.e+1),bt(this,T,w)},Q.toFormat=function(T,w,x){var M,C=this;if(x==null)T!=null&&w&&typeof w=="object"?(x=w,w=null):T&&typeof T=="object"?(x=T,T=w=null):x=rt;else if(typeof x!="object")throw Error(i+"Argument not an object: "+x);if(M=C.toFixed(T,w),C.c){var D,F=M.split("."),R=+x.groupSize,$=+x.secondaryGroupSize,L=x.groupSeparator||"",U=F[0],Y=F[1],ge=C.s<0,ve=ge?U.slice(1):U,We=ve.length;if($&&(D=R,R=$,$=D,We-=D),R>0&&We>0){for(D=We%R||R,U=ve.substr(0,D);D<We;D+=R)U+=L+ve.substr(D,R);$>0&&(U+=L+ve.slice(D)),ge&&(U="-"+U)}M=Y?U+(x.decimalSeparator||"")+(($=+x.fractionGroupSize)?Y.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):Y):U}return(x.prefix||"")+M+(x.suffix||"")},Q.toFraction=function(T){var w,x,M,C,D,F,R,$,L,U,Y,ge,ve=this,We=ve.c;if(T!=null&&(R=new ae(T),!R.isInteger()&&(R.c||R.s!==1)||R.lt(Le)))throw Error(i+"Argument "+(R.isInteger()?"out of range: ":"not an integer: ")+ot(R));if(!We)return new ae(ve);for(w=new ae(Le),L=x=new ae(Le),M=$=new ae(Le),ge=v(We),D=w.e=ge.length-ve.e-1,w.c[0]=h[(F=D%d)<0?d+F:F],T=!T||R.comparedTo(w)>0?D>0?w:L:R,F=pe,pe=1/0,R=new ae(ge),$.c[0]=0;U=K(R,w,0,1),C=x.plus(U.times(M)),C.comparedTo(T)!=1;)x=M,M=C,L=$.plus(U.times(C=L)),$=C,w=R.minus(U.times(C=w)),R=C;return C=K(T.minus(x),M,0,1),$=$.plus(C.times(L)),x=x.plus(C.times(M)),$.s=L.s=ve.s,D=D*2,Y=K(L,M,D,J).minus(ve).abs().comparedTo(K($,x,D,J).minus(ve).abs())<1?[L,M]:[$,x],pe=F,Y},Q.toNumber=function(){return+ot(this)},Q.toPrecision=function(T,w){return T!=null&&b(T,1,m),bt(this,T,w,2)},Q.toString=function(T){var w,x=this,M=x.s,C=x.e;return C===null?M?(w="Infinity",M<0&&(w="-"+w)):w="NaN":(T==null?w=C<=W||C>=ne?N(v(x.c),C):Z(v(x.c),C,"0"):T===10&&kt?(x=Xe(new ae(x),ce+C+1,J),w=Z(v(x.c),x.e,"0")):(b(T,2,ut.length,"Base"),w=ee(Z(v(x.c),C,"0"),10,T,M,!0)),M<0&&x.c[0]&&(w="-"+w)),w},Q.valueOf=Q.toJSON=function(){return ot(this)},Q._isBigNumber=!0,H!=null&&ae.set(H),ae}a(p,"clone");function y(H){var K=H|0;return H>0||H===K?K:K-1}a(y,"bitFloor");function v(H){for(var K,ee,se=1,Q=H.length,Le=H[0]+"";se<Q;){for(K=H[se++]+"",ee=d-K.length;ee--;K="0"+K);Le+=K}for(Q=Le.length;Le.charCodeAt(--Q)===48;);return Le.slice(0,Q+1||1)}a(v,"coeffToString");function E(H,K){var ee,se,Q=H.c,Le=K.c,ce=H.s,J=K.s,W=H.e,ne=K.e;if(!ce||!J)return null;if(ee=Q&&!Q[0],se=Le&&!Le[0],ee||se)return ee?se?0:-J:ce;if(ce!=J)return ce;if(ee=ce<0,se=W==ne,!Q||!Le)return se?0:!Q^ee?1:-1;if(!se)return W>ne^ee?1:-1;for(J=(W=Q.length)<(ne=Le.length)?W:ne,ce=0;ce<J;ce++)if(Q[ce]!=Le[ce])return Q[ce]>Le[ce]^ee?1:-1;return W==ne?0:W>ne^ee?1:-1}a(E,"compare");function b(H,K,ee,se){if(H<K||H>ee||H!==r(H))throw Error(i+(se||"Argument")+(typeof H=="number"?H<K||H>ee?" out of range: ":" not an integer: ":" not a primitive number: ")+String(H))}a(b,"intCheck");function k(H){var K=H.c.length-1;return y(H.e/d)==K&&H.c[K]%2!=0}a(k,"isOdd");function N(H,K){return(H.length>1?H.charAt(0)+"."+H.slice(1):H)+(K<0?"e":"e+")+K}a(N,"toExponential");function Z(H,K,ee){var se,Q;if(K<0){for(Q=ee+".";++K;Q+=ee);H=Q+H}else if(se=H.length,++K>se){for(Q=ee,K-=se;--K;Q+=ee);H+=Q}else K<se&&(H=H.slice(0,K)+"."+H.slice(K));return H}a(Z,"toFixedPoint"),t=p(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof Yf<"u"&&Yf.exports?Yf.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(MO)});var BO=z((lae,FO)=>{var LO=dE(),jO=FO.exports;(function(){"use strict";function e(f){return f<10?"0"+f:f}a(e,"f");var t=/[\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(f){return n.lastIndex=0,n.test(f)?'"'+f.replace(n,function(h){var g=i[h];return typeof g=="string"?g:"\\u"+("0000"+h.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}a(u,"quote");function d(f,h){var g,m,p,y,v=o,E,b=h[f],k=b!=null&&(b instanceof LO||LO.isBigNumber(b));switch(b&&typeof b=="object"&&typeof b.toJSON=="function"&&(b=b.toJSON(f)),typeof s=="function"&&(b=s.call(h,f,b)),typeof b){case"string":return k?b:u(b);case"number":return isFinite(b)?String(b):"null";case"boolean":case"null":case"bigint":return String(b);case"object":if(!b)return"null";if(o+=r,E=[],Object.prototype.toString.apply(b)==="[object Array]"){for(y=b.length,g=0;g<y;g+=1)E[g]=d(g,b)||"null";return p=E.length===0?"[]":o?`[
32
+ `+o+E.join(`,
33
+ `+o)+`
34
+ `+v+"]":"["+E.join(",")+"]",o=v,p}if(s&&typeof s=="object")for(y=s.length,g=0;g<y;g+=1)typeof s[g]=="string"&&(m=s[g],p=d(m,b),p&&E.push(u(m)+(o?": ":":")+p));else Object.keys(b).forEach(function(N){var Z=d(N,b);Z&&E.push(u(N)+(o?": ":":")+Z)});return p=E.length===0?"{}":o?`{
35
+ `+o+E.join(`,
36
+ `+o)+`
37
+ `+v+"}":"{"+E.join(",")+"}",o=v,p}}a(d,"str"),typeof jO.stringify!="function"&&(jO.stringify=function(f,h,g){var m;if(o="",r="",typeof g=="number")for(m=0;m<g;m+=1)r+=" ";else typeof g=="string"&&(r=g);if(s=h,h&&typeof h!="function"&&(typeof h!="object"||typeof h.length!="number"))throw new Error("JSON.stringify");return d("",{"":f})})})()});var VO=z((pae,qO)=>{var Xf=null,y6=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,v6=/(?: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)/,_6=a(function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(e!=null){if(e.strict===!0&&(t.strict=!0),e.storeAsString===!0&&(t.storeAsString=!0),t.alwaysParseAsBig=e.alwaysParseAsBig===!0?e.alwaysParseAsBig:!1,t.useNativeBigInt=e.useNativeBigInt===!0?e.useNativeBigInt:!1,typeof e.constructorAction<"u")if(e.constructorAction==="error"||e.constructorAction==="ignore"||e.constructorAction==="preserve")t.constructorAction=e.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);if(typeof e.protoAction<"u")if(e.protoAction==="error"||e.protoAction==="ignore"||e.protoAction==="preserve")t.protoAction=e.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`)}var n,o,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
38
+ `,r:"\r",t:" "},i,s=a(function(v){throw{name:"SyntaxError",message:v,at:n,text:i}},"error"),u=a(function(v){return v&&v!==o&&s("Expected '"+v+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},"next"),d=a(function(){var v,E="";for(o==="-"&&(E="-",u("-"));o>="0"&&o<="9";)E+=o,u();if(o===".")for(E+=".";u()&&o>="0"&&o<="9";)E+=o;if(o==="e"||o==="E")for(E+=o,u(),(o==="-"||o==="+")&&(E+=o,u());o>="0"&&o<="9";)E+=o,u();if(v=+E,!isFinite(v))s("Bad number");else return Xf==null&&(Xf=dE()),E.length>15?t.storeAsString?E:t.useNativeBigInt?BigInt(E):new Xf(E):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(v):new Xf(v):v},"number"),f=a(function(){var v,E,b="",k;if(o==='"')for(var N=n;u();){if(o==='"')return n-1>N&&(b+=i.substring(N,n-1)),u(),b;if(o==="\\"){if(n-1>N&&(b+=i.substring(N,n-1)),u(),o==="u"){for(k=0,E=0;E<4&&(v=parseInt(u(),16),!!isFinite(v));E+=1)k=k*16+v;b+=String.fromCharCode(k)}else if(typeof r[o]=="string")b+=r[o];else break;N=n}}s("Bad string")},"string"),h=a(function(){for(;o&&o<=" ";)u()},"white"),g=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,p=a(function(){var v=[];if(o==="["){if(u("["),h(),o==="]")return u("]"),v;for(;o;){if(v.push(m()),h(),o==="]")return u("]"),v;u(","),h()}}s("Bad array")},"array"),y=a(function(){var v,E=Object.create(null);if(o==="{"){if(u("{"),h(),o==="}")return u("}"),E;for(;o;){if(v=f(),h(),u(":"),t.strict===!0&&Object.hasOwnProperty.call(E,v)&&s('Duplicate key "'+v+'"'),y6.test(v)===!0?t.protoAction==="error"?s("Object contains forbidden prototype property"):t.protoAction==="ignore"?m():E[v]=m():v6.test(v)===!0?t.constructorAction==="error"?s("Object contains forbidden constructor property"):t.constructorAction==="ignore"?m():E[v]=m():E[v]=m(),h(),o==="}")return u("}"),E;u(","),h()}}s("Bad object")},"object");return m=a(function(){switch(h(),o){case"{":return y();case"[":return p();case'"':return f();case"-":return d();default:return o>="0"&&o<="9"?d():g()}},"value"),function(v,E){var b;return i=v+"",n=0,o=" ",b=m(),h(),o&&s("Syntax error"),typeof E=="function"?a((function k(N,Z){var H,K,ee=N[Z];return ee&&typeof ee=="object"&&Object.keys(ee).forEach(function(se){K=k(ee,se),K!==void 0?ee[se]=K:delete ee[se]}),E.call(N,Z,ee)}),"walk")({"":b},""):b}},"json_parse");qO.exports=_6});var ZO=z((mae,Qf)=>{var GO=BO().stringify,HO=VO();Qf.exports=function(e){return{parse:HO(e),stringify:GO}};Qf.exports.parse=HO();Qf.exports.stringify=GO});var pE=z(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.GCE_LINUX_BIOS_PATHS=void 0;on.isGoogleCloudServerless=JO;on.isGoogleComputeEngineLinux=YO;on.isGoogleComputeEngineMACAddress=XO;on.isGoogleComputeEngine=QO;on.detectGCPResidency=E6;var WO=require("fs"),KO=require("os");on.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};var b6=/^42:01/;function JO(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}a(JO,"isGoogleCloudServerless");function YO(){if((0,KO.platform)()!=="linux")return!1;try{(0,WO.statSync)(on.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let e=(0,WO.readFileSync)(on.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return!1}}a(YO,"isGoogleComputeEngineLinux");function XO(){let e=(0,KO.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:n}of t)if(b6.test(n))return!0}return!1}a(XO,"isGoogleComputeEngineMACAddress");function QO(){return YO()||XO()}a(QO,"isGoogleComputeEngine");function E6(){return JO()||QO()}a(E6,"detectGCPResidency")});var ek=z(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});em.Colours=void 0;var Wt=class e{static{a(this,"Colours")}static isEnabled(t){return t&&t.isTTY&&(typeof t.getColorDepth=="function"?t.getColorDepth()>2:!0)}static refresh(){e.enabled=e.isEnabled(process==null?void 0:process.stderr),this.enabled?(e.reset="\x1B[0m",e.bright="\x1B[1m",e.dim="\x1B[2m",e.red="\x1B[31m",e.green="\x1B[32m",e.yellow="\x1B[33m",e.blue="\x1B[34m",e.magenta="\x1B[35m",e.cyan="\x1B[36m",e.white="\x1B[37m",e.grey="\x1B[90m"):(e.reset="",e.bright="",e.dim="",e.red="",e.green="",e.yellow="",e.blue="",e.magenta="",e.cyan="",e.white="",e.grey="")}};em.Colours=Wt;Wt.enabled=!1;Wt.reset="";Wt.bright="";Wt.dim="";Wt.red="";Wt.green="";Wt.yellow="";Wt.blue="";Wt.magenta="";Wt.cyan="";Wt.white="";Wt.grey="";Wt.refresh()});var ok=z(ct=>{"use strict";var S6=ct&&ct.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),T6=ct&&ct.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tk=ct&&ct.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&S6(n,t,o[r]);return T6(n,t),n}})();Object.defineProperty(ct,"__esModule",{value:!0});ct.env=ct.DebugLogBackendBase=ct.placeholder=ct.AdhocDebugLogger=ct.LogSeverity=void 0;ct.getNodeBackend=mE;ct.getDebugBackend=w6;ct.getStructuredBackend=x6;ct.setBackend=A6;ct.log=nk;var P6=require("events"),Pu=tk(require("process")),rk=tk(require("util")),Pr=ek(),an;(function(e){e.DEFAULT="DEFAULT",e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR"})(an||(ct.LogSeverity=an={}));var wu=class extends P6.EventEmitter{static{a(this,"AdhocDebugLogger")}constructor(t,n){super(),this.namespace=t,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(an.DEBUG,...o),this.func.info=(...o)=>this.invokeSeverity(an.INFO,...o),this.func.warn=(...o)=>this.invokeSeverity(an.WARNING,...o),this.func.error=(...o)=>this.invokeSeverity(an.ERROR,...o),this.func.sublog=o=>nk(o,this.func)}invoke(t,...n){if(this.upstream)try{this.upstream(t,...n)}catch{}try{this.emit("log",t,n)}catch{}}invokeSeverity(t,...n){this.invoke({severity:t},...n)}};ct.AdhocDebugLogger=wu;ct.placeholder=new wu("",()=>{}).func;var ja=class{static{a(this,"DebugLogBackendBase")}constructor(){var t;this.cached=new Map,this.filters=[],this.filtersSet=!1;let n=(t=Pu.env[ct.env.nodeEnables])!==null&&t!==void 0?t:"*";n==="all"&&(n="*"),this.filters=n.split(",")}log(t,n,...o){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let r=this.cached.get(t);r||(r=this.makeLogger(t),this.cached.set(t,r)),r(n,...o)}catch(r){console.error(r)}}};ct.DebugLogBackendBase=ja;var fE=class extends ja{static{a(this,"NodeBackend")}constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(t){return this.enabledRegexp.test(t)}makeLogger(t){return this.enabledRegexp.test(t)?(n,...o)=>{var r;let i=`${Pr.Colours.green}${t}${Pr.Colours.reset}`,s=`${Pr.Colours.yellow}${Pu.pid}${Pr.Colours.reset}`,u;switch(n.severity){case an.ERROR:u=`${Pr.Colours.red}${n.severity}${Pr.Colours.reset}`;break;case an.INFO:u=`${Pr.Colours.magenta}${n.severity}${Pr.Colours.reset}`;break;case an.WARNING:u=`${Pr.Colours.yellow}${n.severity}${Pr.Colours.reset}`;break;default:u=(r=n.severity)!==null&&r!==void 0?r:an.DEFAULT;break}let d=rk.formatWithOptions({colors:Pr.Colours.enabled},...o),f=Object.assign({},n);delete f.severity;let h=Object.getOwnPropertyNames(f).length?JSON.stringify(f):"",g=h?`${Pr.Colours.grey}${h}${Pr.Colours.reset}`:"";console.error("%s [%s|%s] %s%s",s,i,u,d,h?` ${g}`:"")}:()=>{}}setFilters(){let n=this.filters.join(",").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^");this.enabledRegexp=new RegExp(`^${n}$`,"i")}};function mE(){return new fE}a(mE,"getNodeBackend");var hE=class extends ja{static{a(this,"DebugBackend")}constructor(t){super(),this.debugPkg=t}makeLogger(t){let n=this.debugPkg(t);return(o,...r)=>{n(r[0],...r.slice(1))}}setFilters(){var t;let n=(t=Pu.env.NODE_DEBUG)!==null&&t!==void 0?t:"";Pu.env.NODE_DEBUG=`${n}${n?",":""}${this.filters.join(",")}`}};function w6(e){return new hE(e)}a(w6,"getDebugBackend");var gE=class extends ja{static{a(this,"StructuredBackend")}constructor(t){var n;super(),this.upstream=(n=t)!==null&&n!==void 0?n:void 0}makeLogger(t){var n;let o=(n=this.upstream)===null||n===void 0?void 0:n.makeLogger(t);return(r,...i)=>{var s;let u=(s=r.severity)!==null&&s!==void 0?s:an.INFO,d=Object.assign({severity:u,message:rk.format(...i)},r),f=JSON.stringify(d);o?o(r,f):console.log("%s",f)}}setFilters(){var t;(t=this.upstream)===null||t===void 0||t.setFilters()}};function x6(e){return new gE(e)}a(x6,"getStructuredBackend");ct.env={nodeEnables:"GOOGLE_SDK_NODE_LOGGING"};var yE=new Map,wr;function A6(e){wr=e,yE.clear()}a(A6,"setBackend");function nk(e,t){if(!wr&&!Pu.env[ct.env.nodeEnables]||!e)return ct.placeholder;t&&(e=`${t.instance.namespace}:${e}`);let n=yE.get(e);if(n)return n.func;if(wr===null)return ct.placeholder;wr===void 0&&(wr=mE());let o=(()=>{let r;return new wu(e,(s,...u)=>{if(r!==wr){if(wr===null)return;wr===void 0&&(wr=mE()),r=wr}wr?.log(e,s,...u)})})();return yE.set(e,o),o.func}a(nk,"log")});var vE=z(Ti=>{"use strict";var I6=Ti&&Ti.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),R6=Ti&&Ti.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&I6(t,e,n)};Object.defineProperty(Ti,"__esModule",{value:!0});R6(ok(),Ti)});var Au=z(Te=>{"use strict";var ak=Te&&Te.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),C6=Te&&Te.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O6=Te&&Te.__importStar||(function(){var e=a(function(t){return e=Object.getOwnPropertyNames||function(n){var o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},e(t)},"ownKeys");return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&ak(n,t,o[r]);return C6(n,t),n}})(),k6=Te&&Te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ak(t,e,n)};Object.defineProperty(Te,"__esModule",{value:!0});Te.gcpResidencyCache=Te.METADATA_SERVER_DETECTION=Te.HEADERS=Te.HEADER_VALUE=Te.HEADER_NAME=Te.SECONDARY_HOST_ADDRESS=Te.HOST_ADDRESS=Te.BASE_PATH=void 0;Te.instance=M6;Te.project=L6;Te.universe=j6;Te.bulk=F6;Te.isAvailable=q6;Te.resetIsAvailableCache=V6;Te.getGCPResidency=EE;Te.setGCPResidency=sk;Te.requestTimeout=ck;var _E=Pt(),$6=ZO(),D6=pE(),N6=O6(vE());Te.BASE_PATH="/computeMetadata/v1";Te.HOST_ADDRESS="http://169.254.169.254";Te.SECONDARY_HOST_ADDRESS="http://metadata.google.internal.";Te.HEADER_NAME="Metadata-Flavor";Te.HEADER_VALUE="Google";Te.HEADERS=Object.freeze({[Te.HEADER_NAME]:Te.HEADER_VALUE});var ik=N6.log("gcp-metadata");Te.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 bE(e){return e||(e=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||Te.HOST_ADDRESS),/^https?:\/\//.test(e)||(e=`http://${e}`),new URL(Te.BASE_PATH,e).href}a(bE,"getBaseUrl");function z6(e){Object.keys(e).forEach(t=>{switch(t){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(`'${t}' is not a valid configuration option.`)}})}a(z6,"validate");async function xu(e,t={},n=3,o=!1){let r=new Headers(Te.HEADERS),i="",s={};if(typeof e=="object"){let g=e;new Headers(g.headers).forEach((m,p)=>r.set(p,m)),i=g.metadataKey,s=g.params||s,n=g.noResponseRetries||n,o=g.fastFail||o}else i=e;typeof t=="string"?i+=`/${t}`:(z6(t),t.property&&(i+=`/${t.property}`),new Headers(t.headers).forEach((g,m)=>r.set(m,g)),s=t.params||s);let u=o?U6:_E.request,d={url:`${bE()}/${i}`,headers:r,retryConfig:{noResponseRetries:n},params:s,responseType:"text",timeout:ck()};ik.info("instance request %j",d);let f=await u(d);ik.info("instance metadata is %s",f.data);let h=f.headers.get(Te.HEADER_NAME);if(h!==Te.HEADER_VALUE)throw new RangeError(`Invalid response from metadata service: incorrect ${Te.HEADER_NAME} header. Expected '${Te.HEADER_VALUE}', got ${h?`'${h}'`:"no header"}`);if(typeof f.data=="string")try{return $6.parse(f.data)}catch{}return f.data}a(xu,"metadataAccessor");async function U6(e){let t={...e,url:e.url?.toString().replace(bE(),bE(Te.SECONDARY_HOST_ADDRESS))},n=(0,_E.request)(e),o=(0,_E.request)(t);return Promise.any([n,o])}a(U6,"fastFailMetadataRequest");function M6(e){return xu("instance",e)}a(M6,"instance");function L6(e){return xu("project",e)}a(L6,"project");function j6(e){return xu("universe",e)}a(j6,"universe");async function F6(e){let t={};return await Promise.all(e.map(n=>(async()=>{let o=await xu(n),r=n.metadataKey;t[r]=o})())),t}a(F6,"bulk");function B6(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}a(B6,"detectGCPAvailableRetries");var tm;async function q6(){if(process.env.METADATA_SERVER_DETECTION){let e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in Te.METADATA_SERVER_DETECTION))throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(Te.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(e){case"assume-present":return!0;case"none":return!1;case"bios-only":return EE();case"ping-only":}}try{return tm===void 0&&(tm=xu("instance",void 0,B6(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await tm,!0}catch(e){let t=e;if(process.env.DEBUG_AUTH&&console.info(t),t.type==="request-timeout"||t.response&&t.response.status===404)return!1;if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let n="UNKNOWN";t.code&&(n=t.code.toString()),process.emitWarning(`received unexpected error = ${t.message} code = ${n}`,"MetadataLookupWarning")}return!1}}a(q6,"isAvailable");function V6(){tm=void 0}a(V6,"resetIsAvailableCache");Te.gcpResidencyCache=null;function EE(){return Te.gcpResidencyCache===null&&sk(),Te.gcpResidencyCache}a(EE,"getGCPResidency");function sk(e=null){Te.gcpResidencyCache=e!==null?e:(0,D6.detectGCPResidency)()}a(sk,"setGCPResidency");function ck(){return EE()?0:3e3}a(ck,"requestTimeout");k6(pE(),Te)});var dk=z(rm=>{"use strict";rm.byteLength=H6;rm.toByteArray=W6;rm.fromByteArray=Y6;var vn=[],Br=[],G6=typeof Uint8Array<"u"?Uint8Array:Array,SE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Pi=0,uk=SE.length;Pi<uk;++Pi)vn[Pi]=SE[Pi],Br[SE.charCodeAt(Pi)]=Pi;var Pi,uk;Br[45]=62;Br[95]=63;function lk(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}a(lk,"getLens");function H6(e){var t=lk(e),n=t[0],o=t[1];return(n+o)*3/4-o}a(H6,"byteLength");function Z6(e,t,n){return(t+n)*3/4-n}a(Z6,"_byteLength");function W6(e){var t,n=lk(e),o=n[0],r=n[1],i=new G6(Z6(e,o,r)),s=0,u=r>0?o-4:o,d;for(d=0;d<u;d+=4)t=Br[e.charCodeAt(d)]<<18|Br[e.charCodeAt(d+1)]<<12|Br[e.charCodeAt(d+2)]<<6|Br[e.charCodeAt(d+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return r===2&&(t=Br[e.charCodeAt(d)]<<2|Br[e.charCodeAt(d+1)]>>4,i[s++]=t&255),r===1&&(t=Br[e.charCodeAt(d)]<<10|Br[e.charCodeAt(d+1)]<<4|Br[e.charCodeAt(d+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}a(W6,"toByteArray");function K6(e){return vn[e>>18&63]+vn[e>>12&63]+vn[e>>6&63]+vn[e&63]}a(K6,"tripletToBase64");function J6(e,t,n){for(var o,r=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),r.push(K6(o));return r.join("")}a(J6,"encodeChunk");function Y6(e){for(var t,n=e.length,o=n%3,r=[],i=16383,s=0,u=n-o;s<u;s+=i)r.push(J6(e,s,s+i>u?u:s+i));return o===1?(t=e[n-1],r.push(vn[t>>2]+vn[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],r.push(vn[t>>10]+vn[t>>4&63]+vn[t<<2&63]+"=")),r.join("")}a(Y6,"fromByteArray")});var PE=z(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.fromArrayBufferToHex=X6;function X6(e){return Array.from(new Uint8Array(e)).map(n=>n.toString(16).padStart(2,"0")).join("")}a(X6,"fromArrayBufferToHex")});var pk=z(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.BrowserCrypto=void 0;var Fa=dk(),Q6=PE(),wE=class e{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(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return Fa.fromByteArray(new Uint8Array(o))}randomBytesBase64(t){let n=new Uint8Array(t);return window.crypto.getRandomValues(n),Fa.fromByteArray(n)}static padBase64(t){for(;t.length%4!==0;)t+="=";return t}async verify(t,n,o){let r={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},i=new TextEncoder().encode(n),s=Fa.toByteArray(e.padBase64(o)),u=await window.crypto.subtle.importKey("jwk",t,r,!0,["verify"]);return await window.crypto.subtle.verify(r,u,s,i)}async sign(t,n){let o={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},r=new TextEncoder().encode(n),i=await window.crypto.subtle.importKey("jwk",t,o,!0,["sign"]),s=await window.crypto.subtle.sign(o,i,r);return Fa.fromByteArray(new Uint8Array(s))}decodeBase64StringUtf8(t){let n=Fa.toByteArray(e.padBase64(t));return new TextDecoder().decode(n)}encodeBase64StringUtf8(t){let n=new TextEncoder().encode(t);return Fa.fromByteArray(n)}async sha256DigestHex(t){let n=new TextEncoder().encode(t),o=await window.crypto.subtle.digest("SHA-256",n);return(0,Q6.fromArrayBufferToHex)(o)}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:String.fromCharCode(...new Uint16Array(t)),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))}};nm.BrowserCrypto=wE});var fk=z(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.NodeCrypto=void 0;var Ba=require("crypto"),xE=class{static{a(this,"NodeCrypto")}async sha256DigestBase64(t){return Ba.createHash("sha256").update(t).digest("base64")}randomBytesBase64(t){return Ba.randomBytes(t).toString("base64")}async verify(t,n,o){let r=Ba.createVerify("RSA-SHA256");return r.update(n),r.end(),r.verify(t,o,"base64")}async sign(t,n){let o=Ba.createSign("RSA-SHA256");return o.update(n),o.end(),o.sign(t,"base64")}decodeBase64StringUtf8(t){return Buffer.from(t,"base64").toString("utf-8")}encodeBase64StringUtf8(t){return Buffer.from(t,"utf-8").toString("base64")}async sha256DigestHex(t){return Ba.createHash("sha256").update(t).digest("hex")}async signWithHmacSha256(t,n){let o=typeof t=="string"?t:t2(t);return e2(Ba.createHmac("sha256",o).update(n).digest())}};om.NodeCrypto=xE;function e2(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}a(e2,"toArrayBuffer");function t2(e){return Buffer.from(e)}a(t2,"toBuffer")});var Iu=z(Wn=>{"use strict";var r2=Wn&&Wn.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),n2=Wn&&Wn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r2(t,e,n)};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.createCrypto=a2;Wn.hasBrowserCrypto=mk;var o2=pk(),i2=fk();n2(PE(),Wn);function a2(){return mk()?new o2.BrowserCrypto:new i2.NodeCrypto}a(a2,"createCrypto");function mk(){return typeof window<"u"&&typeof window.crypto<"u"&&typeof window.crypto.subtle<"u"}a(mk,"hasBrowserCrypto")});var qa=z((AE,gk)=>{var im=require("buffer"),_n=im.Buffer;function hk(e,t){for(var n in e)t[n]=e[n]}a(hk,"copyProps");_n.from&&_n.alloc&&_n.allocUnsafe&&_n.allocUnsafeSlow?gk.exports=im:(hk(im,AE),AE.Buffer=wi);function wi(e,t,n){return _n(e,t,n)}a(wi,"SafeBuffer");wi.prototype=Object.create(_n.prototype);hk(_n,wi);wi.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _n(e,t,n)};wi.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=_n(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};wi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _n(e)};wi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return im.SlowBuffer(e)}});var vk=z((zae,yk)=>{"use strict";function IE(e){var t=(e/8|0)+(e%8===0?0:1);return t}a(IE,"getParamSize");var s2={ES256:IE(256),ES384:IE(384),ES512:IE(521)};function c2(e){var t=s2[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')}a(c2,"getParamBytesForAlg");yk.exports=c2});var RE=z((Mae,Pk)=>{"use strict";var am=qa().Buffer,bk=vk(),sm=128,Ek=0,u2=32,l2=16,d2=2,Sk=l2|u2|Ek<<6,cm=d2|Ek<<6;function p2(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(p2,"base64Url");function Tk(e){if(am.isBuffer(e))return e;if(typeof e=="string")return am.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}a(Tk,"signatureAsBuffer");function f2(e,t){e=Tk(e);var n=bk(t),o=n+1,r=e.length,i=0;if(e[i++]!==Sk)throw new Error('Could not find expected "seq"');var s=e[i++];if(s===(sm|1)&&(s=e[i++]),r-i<s)throw new Error('"seq" specified length of "'+s+'", only "'+(r-i)+'" remaining');if(e[i++]!==cm)throw new Error('Could not find expected "int" for "r"');var u=e[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 d=i;if(i+=u,e[i++]!==cm)throw new Error('Could not find expected "int" for "s"');var f=e[i++];if(r-i!==f)throw new Error('"s" specified length of "'+f+'", expected "'+(r-i)+'"');if(o<f)throw new Error('"s" specified length of "'+f+'", max of "'+o+'" is acceptable');var h=i;if(i+=f,i!==r)throw new Error('Expected to consume entire buffer, but "'+(r-i)+'" bytes remain');var g=n-u,m=n-f,p=am.allocUnsafe(g+u+m+f);for(i=0;i<g;++i)p[i]=0;e.copy(p,i,d+Math.max(-g,0),d+u),i=n;for(var y=i;i<y+m;++i)p[i]=0;return e.copy(p,i,h+Math.max(-m,0),h+f),p=p.toString("base64"),p=p2(p),p}a(f2,"derToJose");function _k(e,t,n){for(var o=0;t+o<n&&e[t+o]===0;)++o;var r=e[t+o]>=sm;return r&&--o,o}a(_k,"countPadding");function m2(e,t){e=Tk(e);var n=bk(t),o=e.length;if(o!==n*2)throw new TypeError('"'+t+'" signatures must be "'+n*2+'" bytes, saw "'+o+'"');var r=_k(e,0,n),i=_k(e,n,e.length),s=n-r,u=n-i,d=2+s+1+1+u,f=d<sm,h=am.allocUnsafe((f?2:3)+d),g=0;return h[g++]=Sk,f?h[g++]=d:(h[g++]=sm|1,h[g++]=d&255),h[g++]=cm,h[g++]=s,r<0?(h[g++]=0,g+=e.copy(h,g,0,n)):g+=e.copy(h,g,r,n),h[g++]=cm,h[g++]=u,i<0?(h[g++]=0,e.copy(h,g,n)):e.copy(h,g,n+i),h}a(m2,"joseToDer");Pk.exports={derToJose:f2,joseToDer:m2}});var sn=z(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=void 0;Kn.snakeToCamel=xk;Kn.originalOrCamelOptions=v2;Kn.removeUndefinedValuesInObject=_2;Kn.isValidFile=b2;Kn.getWellKnownCertificateConfigFileLocation=E2;var h2=require("fs"),g2=require("os"),CE=require("path"),y2="certificate_config.json",wk="gcloud";function xk(e){return e.replace(/([_][^_])/g,t=>t.slice(1).toUpperCase())}a(xk,"snakeToCamel");function v2(e){function t(n){let o=e||{};return o[n]??o[xk(n)]}return a(t,"get"),{get:t}}a(v2,"originalOrCamelOptions");var OE=class{static{a(this,"LRUCache")}capacity;#e=new Map;maxAge;constructor(t){this.capacity=t.capacity,this.maxAge=t.maxAge}#t(t,n){this.#e.delete(t),this.#e.set(t,{value:n,lastAccessed:Date.now()})}set(t,n){this.#t(t,n),this.#r()}get(t){let n=this.#e.get(t);if(n)return this.#t(t,n.value),this.#r(),n.value}#r(){let t=this.maxAge?Date.now()-this.maxAge:0,n=this.#e.entries().next();for(;!n.done&&(this.#e.size>this.capacity||n.value[1].lastAccessed<t);)this.#e.delete(n.value[0]),n=this.#e.entries().next()}};Kn.LRUCache=OE;function _2(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n==="undefined")&&delete e[t]}),e}a(_2,"removeUndefinedValuesInObject");async function b2(e){try{return(await h2.promises.lstat(e)).isFile()}catch{return!1}}a(b2,"isValidFile");function E2(){let e=process.env.CLOUDSDK_CONFIG||(S2()?CE.join(process.env.APPDATA||"",wk):CE.join(process.env.HOME||"",".config",wk));return CE.join(e,y2)}a(E2,"getWellKnownCertificateConfigFileLocation");function S2(){return g2.platform().startsWith("win")}a(S2,"_isWindows")});var Ak=z((Bae,T2)=>{T2.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 kE=z(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.USER_AGENT=No.PRODUCT_NAME=No.pkg=void 0;var Ik=Ak();No.pkg=Ik;var Rk="google-api-nodejs-client";No.PRODUCT_NAME=Rk;var P2=`${Rk}/${Ik.version}`;No.USER_AGENT=P2});var xr=z(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.AuthClient=cn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=cn.DEFAULT_UNIVERSE=void 0;var w2=require("events"),$E=Pt(),x2=sn(),A2=vE(),DE=kE();cn.DEFAULT_UNIVERSE="googleapis.com";cn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var NE=class e extends w2.EventEmitter{static{a(this,"AuthClient")}apiKey;projectId;quotaProjectId;transporter;credentials={};eagerRefreshThresholdMillis=cn.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS;forceRefreshOnFailure=!1;universeDomain=cn.DEFAULT_UNIVERSE;static RequestMethodNameSymbol=Symbol("request method name");static RequestLogIdSymbol=Symbol("request log id");constructor(t={}){super();let n=(0,x2.originalOrCamelOptions)(t);this.apiKey=t.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")??cn.DEFAULT_UNIVERSE,this.transporter=t.transporter??new $E.Gaxios(t.transporterOptions),n.get("useAuthRequestParameters")!==!1&&(this.transporter.interceptors.request.add(e.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(e.DEFAULT_RESPONSE_INTERCEPTOR)),t.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=t.forceRefreshOnFailure??!1}fetch(...t){let n=t[0],o=t[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&&$E.Gaxios.mergeHeaders(i,n.headers),o&&$E.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(t){this.credentials=t}addSharedMetadataHeaders(t){return!t.has("x-goog-user-project")&&this.quotaProjectId&&t.set("x-goog-user-project",this.quotaProjectId),t}addUserProjectAndAuthHeaders(t,n){let o=n.get("x-goog-user-project"),r=n.get("authorization");return o&&t.set("x-goog-user-project",o),r&&t.set("authorization",r),t}static log=(0,A2.log)("auth");static DEFAULT_REQUEST_INTERCEPTOR={resolved:a(async t=>{if(!t.headers.has("x-goog-api-client")){let o=process.version.replace(/^v/,"");t.headers.set("x-goog-api-client",`gl-node/${o}`)}let n=t.headers.get("User-Agent");n?n.includes(`${DE.PRODUCT_NAME}/`)||t.headers.set("User-Agent",`${n} ${DE.USER_AGENT}`):t.headers.set("User-Agent",DE.USER_AGENT);try{let o=t,r=o[e.RequestMethodNameSymbol],i=`${Math.floor(Math.random()*1e3)}`;o[e.RequestLogIdSymbol]=i;let s={url:t.url,headers:t.headers};r?e.log.info("%s [%s] request %j",r,i,s):e.log.info("[%s] request %j",i,s)}catch{}return t},"resolved")};static DEFAULT_RESPONSE_INTERCEPTOR={resolved:a(async t=>{try{let n=t.config,o=n[e.RequestMethodNameSymbol],r=n[e.RequestLogIdSymbol];o?e.log.info("%s [%s] response %j",o,r,t.data):e.log.info("[%s] response %j",r,t.data)}catch{}return t},"resolved"),rejected:a(async t=>{try{let n=t.config,o=n[e.RequestMethodNameSymbol],r=n[e.RequestLogIdSymbol];o?e.log.info("%s [%s] error %j",o,r,t.response?.data):e.log.error("[%s] error %j",r,t.response?.data)}catch{}throw t},"rejected")};static setMethodName(t,n){try{let o=t;o[e.RequestMethodNameSymbol]=n}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:["GET","PUT","POST","HEAD","OPTIONS","DELETE"]}}}};cn.AuthClient=NE});var UE=z(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.LoginTicket=void 0;var zE=class{static{a(this,"LoginTicket")}envelope;payload;constructor(t,n){this.envelope=t,this.payload=n}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let t=this.getPayload();return t&&t.sub?t.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}};um.LoginTicket=zE});var xi=z(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.OAuth2Client=bn.ClientAuthentication=bn.CertificateFormat=bn.CodeChallengeMethod=void 0;var Ck=Pt(),I2=require("querystring"),R2=require("stream"),C2=RE(),Ok=sn(),ME=Iu(),Va=xr(),O2=UE(),kk;(function(e){e.Plain="plain",e.S256="S256"})(kk||(bn.CodeChallengeMethod=kk={}));var Jn;(function(e){e.PEM="PEM",e.JWK="JWK"})(Jn||(bn.CertificateFormat=Jn={}));var Ru;(function(e){e.ClientSecretPost="ClientSecretPost",e.ClientSecretBasic="ClientSecretBasic",e.None="None"})(Ru||(bn.ClientAuthentication=Ru={}));var LE=class e extends Va.AuthClient{static{a(this,"OAuth2Client")}redirectUri;certificateCache={};certificateExpiry=null;certificateCacheFormat=Jn.PEM;refreshTokenPromises=new Map;endpoints;issuers;clientAuthentication;_clientId;_clientSecret;refreshHandler;constructor(t={},n,o){super(typeof t=="object"?t:{}),typeof t!="object"&&(t={clientId:t,clientSecret:n,redirectUri:o}),this._clientId=t.clientId||t.client_id,this._clientSecret=t.clientSecret||t.client_secret,this.redirectUri=t.redirectUri||t.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",...t.endpoints},this.clientAuthentication=t.clientAuthentication||Ru.ClientSecretPost,this.issuers=t.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(t={}){if(t.code_challenge_method&&!t.code_challenge)throw new Error("If a code_challenge_method is provided, code_challenge must be included.");return t.response_type=t.response_type||"code",t.client_id=t.client_id||this._clientId,t.redirect_uri=t.redirect_uri||this.redirectUri,Array.isArray(t.scope)&&(t.scope=t.scope.join(" ")),this.endpoints.oauth2AuthBaseUrl.toString()+"?"+I2.stringify(t)}generateCodeVerifier(){throw new Error("generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.")}async generateCodeVerifierAsync(){let t=(0,ME.createCrypto)(),o=t.randomBytesBase64(96).replace(/\+/g,"~").replace(/=/g,"_").replace(/\//g,"-"),i=(await t.sha256DigestBase64(o)).split("=")[0].replace(/\+/g,"-").replace(/\//g,"_");return{codeVerifier:o,codeChallenge:i}}getToken(t,n){let o=typeof t=="string"?{code:t}:t;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(t){let n=this.endpoints.oauth2TokenUrl.toString(),o=new Headers,r={client_id:t.client_id||this._clientId,code_verifier:t.codeVerifier,code:t.code,grant_type:"authorization_code",redirect_uri:t.redirect_uri||this.redirectUri};if(this.clientAuthentication===Ru.ClientSecretBasic){let d=Buffer.from(`${this._clientId}:${this._clientSecret}`);o.set("authorization",`Basic ${d.toString("base64")}`)}this.clientAuthentication===Ru.ClientSecretPost&&(r.client_secret=this._clientSecret);let i={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,Ok.removeUndefinedValuesInObject)(r)),headers:o};Va.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(t){if(!t)return this.refreshTokenNoCache(t);if(this.refreshTokenPromises.has(t))return this.refreshTokenPromises.get(t);let n=this.refreshTokenNoCache(t).then(o=>(this.refreshTokenPromises.delete(t),o),o=>{throw this.refreshTokenPromises.delete(t),o});return this.refreshTokenPromises.set(t,n),n}async refreshTokenNoCache(t){if(!t)throw new Error("No refresh token is set.");let n=this.endpoints.oauth2TokenUrl.toString(),o={refresh_token:t,client_id:this._clientId,client_secret:this._clientSecret,grant_type:"refresh_token"},r;try{let s={...e.RETRY_CONFIG,method:"POST",url:n,data:new URLSearchParams((0,Ok.removeUndefinedValuesInObject)(o))};Va.AuthClient.setMethodName(s,"refreshTokenNoCache"),r=await this.transporter.request(s)}catch(s){throw s instanceof Ck.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(t){if(t)this.refreshAccessTokenAsync().then(n=>t(null,n.credentials,n.res),t);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let t=await this.refreshToken(this.credentials.refresh_token),n=t.tokens;return n.refresh_token=this.credentials.refresh_token,this.credentials=n,{credentials:this.credentials,res:t.res}}getAccessToken(t){if(t)this.getAccessTokenAsync().then(n=>t(null,n.token,n.res),t);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(t){return(await this.getRequestMetadataAsync(t)).headers}async getRequestMetadataAsync(t){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 d=new Headers({authorization:"Bearer "+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(d)}}}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 d=u;throw d.response&&(d.response.status===403||d.response.status===404)&&(d.message=`Could not refresh access token: ${d.message}`),d}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(t){return new e().getRevokeTokenURL(t).toString()}getRevokeTokenURL(t){let n=new URL(this.endpoints.oauth2RevokeUrl);return n.searchParams.append("token",t),n}revokeToken(t,n){let o={...e.RETRY_CONFIG,url:this.getRevokeTokenURL(t).toString(),method:"POST"};if(Va.AuthClient.setMethodName(o,"revokeToken"),n)this.transporter.request(o).then(r=>n(null,r),n);else return this.transporter.request(o)}revokeCredentials(t){if(t)this.revokeCredentialsAsync().then(n=>t(null,n),t);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let t=this.credentials.access_token;if(this.credentials={},t)return this.revokeToken(t);throw new Error("No access token to revoke.")}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){try{let o=await this.getRequestMetadataAsync();return t.headers=Ck.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,o.headers),this.apiKey&&t.headers.set("X-Goog-Api-Key",this.apiKey),await this.transporter.request(t)}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,d=r.config.data instanceof R2.Readable,f=i===401||i===403;if(!n&&f&&!d&&s)return await this.refreshAccessTokenAsync(),this.requestAsync(t,!0);if(!n&&f&&!d&&u){let h=await this.processAndValidateRefreshHandler();return h?.access_token&&this.setCredentials(h),this.requestAsync(t,!0)}}throw o}}verifyIdToken(t,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(t).then(o=>n(null,o),n);else return this.verifyIdTokenAsync(t)}async verifyIdTokenAsync(t){if(!t.idToken)throw new Error("The verifyIdToken method requires an ID Token");let n=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(t.idToken,n.certs,t.audience,this.issuers,t.maxExpiry)}async getTokenInfo(t){let{data:n}=await this.transporter.request({...e.RETRY_CONFIG,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8",authorization:`Bearer ${t}`},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(t){if(t)this.getFederatedSignonCertsAsync().then(n=>t(null,n.certs,n.res),t);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let t=new Date().getTime(),n=(0,ME.hasBrowserCrypto)()?Jn.JWK:Jn.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let o,r;switch(n){case Jn.PEM:r=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case Jn.JWK:r=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw new Error(`Unsupported certificate format ${n}`)}try{let f={...e.RETRY_CONFIG,url:r};Va.AuthClient.setMethodName(f,"getFederatedSignonCertsAsync"),o=await this.transporter.request(f)}catch(f){throw f instanceof Error&&(f.message=`Failed to retrieve verification certificates: ${f.message}`),f}let i=o?.headers.get("cache-control"),s=-1;if(i){let f=/max-age=(?<maxAge>[0-9]+)/.exec(i)?.groups?.maxAge;f&&(s=Number(f)*1e3)}let u={};switch(n){case Jn.PEM:u=o.data;break;case Jn.JWK:for(let f of o.data.keys)u[f.kid]=f;break;default:throw new Error(`Unsupported certificate format ${n}`)}let d=new Date;return this.certificateExpiry=s===-1?null:new Date(d.getTime()+s),this.certificateCache=u,this.certificateCacheFormat=n,{certs:u,format:n,res:o}}getIapPublicKeys(t){if(t)this.getIapPublicKeysAsync().then(n=>t(null,n.pubkeys,n.res),t);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let t,n=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let o={...e.RETRY_CONFIG,url:n};Va.AuthClient.setMethodName(o,"getIapPublicKeysAsync"),t=await this.transporter.request(o)}catch(o){throw o instanceof Error&&(o.message=`Failed to retrieve verification certificates: ${o.message}`),o}return{pubkeys:t.data,res:t}}verifySignedJwtWithCerts(){throw new Error("verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.")}async verifySignedJwtWithCertsAsync(t,n,o,r,i){let s=(0,ME.createCrypto)();i||(i=e.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let u=t.split(".");if(u.length!==3)throw new Error("Wrong number of segments in token: "+t);let d=u[0]+"."+u[1],f=u[2],h,g;try{h=JSON.parse(s.decodeBase64StringUtf8(u[0]))}catch(N){throw N instanceof Error&&(N.message=`Can't parse token envelope: ${u[0]}': ${N.message}`),N}if(!h)throw new Error("Can't parse token envelope: "+u[0]);try{g=JSON.parse(s.decodeBase64StringUtf8(u[1]))}catch(N){throw N instanceof Error&&(N.message=`Can't parse token payload '${u[0]}`),N}if(!g)throw new Error("Can't parse token payload: "+u[1]);if(!Object.prototype.hasOwnProperty.call(n,h.kid))throw new Error("No pem found for envelope: "+JSON.stringify(h));let m=n[h.kid];if(h.alg==="ES256"&&(f=C2.joseToDer(f,"ES256").toString("base64")),!await s.verify(m,d,f))throw new Error("Invalid token signature: "+t);if(!g.iat)throw new Error("No issue time in token: "+JSON.stringify(g));if(!g.exp)throw new Error("No expiration time in token: "+JSON.stringify(g));let y=Number(g.iat);if(isNaN(y))throw new Error("iat field using invalid format");let v=Number(g.exp);if(isNaN(v))throw new Error("exp field using invalid format");let E=new Date().getTime()/1e3;if(v>=E+i)throw new Error("Expiration time too far in future: "+JSON.stringify(g));let b=y-e.CLOCK_SKEW_SECS_,k=v+e.CLOCK_SKEW_SECS_;if(E<b)throw new Error("Token used too early, "+E+" < "+b+": "+JSON.stringify(g));if(E>k)throw new Error("Token used too late, "+E+" > "+k+": "+JSON.stringify(g));if(r&&r.indexOf(g.iss)<0)throw new Error("Invalid issuer, expected one of ["+r+"], but got "+g.iss);if(typeof o<"u"&&o!==null){let N=g.aud,Z=!1;if(o.constructor===Array?Z=o.indexOf(N)>-1:Z=N===o,!Z)throw new Error("Wrong recipient, payload audience != requiredAudience")}return new O2.LoginTicket(h,g)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let t=await this.refreshHandler();if(!t.access_token)throw new Error("No access token is returned by the refreshHandler callback.");return t}}isTokenExpiring(){let t=this.credentials.expiry_date;return t?t<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};bn.OAuth2Client=LE});var FE=z(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.Compute=void 0;var k2=Pt(),$k=Au(),$2=xi(),jE=class extends $2.OAuth2Client{static{a(this,"Compute")}serviceAccountEmail;scopes;constructor(t={}){super(t),this.credentials={expiry_date:1,refresh_token:"compute-placeholder"},this.serviceAccountEmail=t.serviceAccountEmail||"default",this.scopes=Array.isArray(t.scopes)?t.scopes:t.scopes?[t.scopes]:[]}async refreshTokenNoCache(){let t=`service-accounts/${this.serviceAccountEmail}/token`,n;try{let r={property:t};this.scopes.length>0&&(r.params={scopes:this.scopes.join(",")}),n=await $k.instance(r)}catch(r){throw r instanceof k2.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(t){let n=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${t}`,o;try{let r={property:n};o=await $k.instance(r)}catch(r){throw r instanceof Error&&(r.message=`Could not fetch ID token: ${r.message}`),r}return o}wrapError(t){let n=t.response;n&&n.status&&(t.status=n.status,n.status===403?t.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: "+t.message:n.status===404&&(t.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: "+t.message))}};lm.Compute=jE});var qE=z(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.IdTokenClient=void 0;var D2=xi(),BE=class extends D2.OAuth2Client{static{a(this,"IdTokenClient")}targetAudience;idTokenProvider;constructor(t){super(t),this.targetAudience=t.targetAudience,this.idTokenProvider=t.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(t){let n=t.split(".")[1];if(n)return JSON.parse(Buffer.from(n,"base64").toString("ascii")).exp*1e3}};dm.IdTokenClient=BE});var VE=z(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.GCPEnv=void 0;Ga.clear=N2;Ga.getEnv=z2;var Dk=Au(),En;(function(e){e.APP_ENGINE="APP_ENGINE",e.KUBERNETES_ENGINE="KUBERNETES_ENGINE",e.CLOUD_FUNCTIONS="CLOUD_FUNCTIONS",e.COMPUTE_ENGINE="COMPUTE_ENGINE",e.CLOUD_RUN="CLOUD_RUN",e.CLOUD_RUN_JOBS="CLOUD_RUN_JOBS",e.NONE="NONE"})(En||(Ga.GCPEnv=En={}));var Cu;function N2(){Cu=void 0}a(N2,"clear");async function z2(){return Cu||(Cu=U2(),Cu)}a(z2,"getEnv");async function U2(){let e=En.NONE;return M2()?e=En.APP_ENGINE:L2()?e=En.CLOUD_FUNCTIONS:await q2()?await B2()?e=En.KUBERNETES_ENGINE:j2()?e=En.CLOUD_RUN:F2()?e=En.CLOUD_RUN_JOBS:e=En.COMPUTE_ENGINE:e=En.NONE,e}a(U2,"getEnvMemoized");function M2(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}a(M2,"isAppEngine");function L2(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}a(L2,"isCloudFunction");function j2(){return!!process.env.K_CONFIGURATION}a(j2,"isCloudRun");function F2(){return!!process.env.CLOUD_RUN_JOB}a(F2,"isCloudRunJob");async function B2(){try{return await Dk.instance("attributes/cluster-name"),!0}catch{return!1}}a(B2,"isKubernetesEngine");async function q2(){return Dk.isAvailable()}a(q2,"isComputeEngine")});var GE=z((rse,Nk)=>{var pm=qa().Buffer,V2=require("stream"),G2=require("util");function fm(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=pm.alloc(0),this;if(typeof e.pipe=="function")return this.buffer=pm.alloc(0),e.pipe(this),this;if(e.length||typeof e=="object")return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}a(fm,"DataStream");G2.inherits(fm,V2);fm.prototype.write=a(function(t){this.buffer=pm.concat([this.buffer,pm.from(t)]),this.emit("data",t)},"write");fm.prototype.end=a(function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},"end");Nk.exports=fm});var Uk=z((ose,zk)=>{"use strict";var Ou=require("buffer").Buffer,HE=require("buffer").SlowBuffer;zk.exports=mm;function mm(e,t){if(!Ou.isBuffer(e)||!Ou.isBuffer(t)||e.length!==t.length)return!1;for(var n=0,o=0;o<e.length;o++)n|=e[o]^t[o];return n===0}a(mm,"bufferEq");mm.install=function(){Ou.prototype.equal=HE.prototype.equal=a(function(t){return mm(this,t)},"equal")};var H2=Ou.prototype.equal,Z2=HE.prototype.equal;mm.restore=function(){Ou.prototype.equal=H2,HE.prototype.equal=Z2}});var JE=z((ase,Hk)=>{var Za=qa().Buffer,qr=require("crypto"),Lk=RE(),Mk=require("util"),W2=`"%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".`,ka="secret must be a string or buffer",gi="key must be a string or a buffer",MN="key must be a string, a buffer or an object",Jp=typeof vr.createPublicKey=="function";Jp&&(gi+=" or a KeyObject",ka+="or a KeyObject");function zT(t){if(!yi.isBuffer(t)&&typeof t!="string"&&(!Jp||typeof t!="object"||typeof t.type!="string"||typeof t.asymmetricKeyType!="string"||typeof t.export!="function"))throw Dr(gi)}o(zT,"checkIsPublicKey");function UT(t){if(!yi.isBuffer(t)&&typeof t!="string"&&typeof t!="object")throw Dr(MN)}o(UT,"checkIsPrivateKey");function LN(t){if(!yi.isBuffer(t)){if(typeof t=="string")return t;if(!Jp||typeof t!="object"||t.type!=="secret"||typeof t.export!="function")throw Dr(ka)}}o(LN,"checkIsSecretKey");function Yp(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(Yp,"fromBase64");function MT(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(MT,"toBase64");function Dr(t){var e=[].slice.call(arguments,1),r=DT.format.bind(DT,t).apply(null,e);return new TypeError(r)}o(Dr,"typeError");function jN(t){return yi.isBuffer(t)||typeof t=="string"}o(jN,"bufferOrString");function $a(t){return jN(t)||(t=JSON.stringify(t)),t}o($a,"normalizeInput");function LT(t){return o(function(r,n){LN(n),r=$a(r);var i=vr.createHmac("sha"+t,n),s=(i.update(r),i.digest("base64"));return Yp(s)},"sign")}o(LT,"createHmacSigner");var Kp,FN="timingSafeEqual"in vr?o(function(e,r){return e.byteLength!==r.byteLength?!1:vr.timingSafeEqual(e,r)},"timingSafeEqual"):o(function(e,r){return Kp||(Kp=$T()),Kp(e,r)},"timingSafeEqual");function qN(t){return o(function(r,n,i){var s=LT(t)(r,i);return FN(yi.from(n),yi.from(s))},"verify")}o(qN,"createHmacVerifier");function jT(t){return o(function(r,n){UT(n),r=$a(r);var i=vr.createSign("RSA-SHA"+t),s=(i.update(r),i.sign(n,"base64"));return Yp(s)},"sign")}o(jT,"createKeySigner");function FT(t){return o(function(r,n,i){zT(i),r=$a(r),n=MT(n);var s=vr.createVerify("RSA-SHA"+t);return s.update(r),s.verify(i,n,"base64")},"verify")}o(FT,"createKeyVerifier");function BN(t){return o(function(r,n){UT(n),r=$a(r);var i=vr.createSign("RSA-SHA"+t),s=(i.update(r),i.sign({key:n,padding:vr.constants.RSA_PKCS1_PSS_PADDING,saltLength:vr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return Yp(s)},"sign")}o(BN,"createPSSKeySigner");function VN(t){return o(function(r,n,i){zT(i),r=$a(r),n=MT(n);var s=vr.createVerify("RSA-SHA"+t);return s.update(r),s.verify({key:i,padding:vr.constants.RSA_PKCS1_PSS_PADDING,saltLength:vr.constants.RSA_PSS_SALTLEN_DIGEST},n,"base64")},"verify")}o(VN,"createPSSKeyVerifier");function GN(t){var e=jT(t);return o(function(){var n=e.apply(null,arguments);return n=NT.derToJose(n,"ES"+t),n},"sign")}o(GN,"createECDSASigner");function HN(t){var e=FT(t);return o(function(n,i,s){i=NT.joseToDer(i,"ES"+t).toString("base64");var u=e(n,i,s);return u},"verify")}o(HN,"createECDSAVerifer");function WN(){return o(function(){return""},"sign")}o(WN,"createNoneSigner");function ZN(){return o(function(e,r){return r===""},"verify")}o(ZN,"createNoneVerifier");qT.exports=o(function(e){var r={hs:LT,rs:jT,ps:BN,es:GN,none:WN},n={hs:qN,rs:FT,ps:VN,es:HN,none:ZN},i=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!i)throw Dr(UN,e);var s=(i[1]||i[3]).toLowerCase(),u=i[2];return{sign:r[s](u),verify:n[s](u)}},"jwa")});var Qp=D((O7,BT)=>{var KN=require("buffer").Buffer;BT.exports=o(function(e){return typeof e=="string"?e:typeof e=="number"||KN.isBuffer(e)?e.toString():JSON.stringify(e)},"toString")});var KT=D(($7,ZT)=>{var JN=fi().Buffer,VT=Wp(),YN=Xp(),XN=require("stream"),GT=Qp(),ef=require("util");function HT(t,e){return JN.from(t,e).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o(HT,"base64url");function QN(t,e,r){r=r||"utf8";var n=HT(GT(t),"binary"),i=HT(GT(e),r);return ef.format("%s.%s",n,i)}o(QN,"jwsSecuredInput");function WT(t){var e=t.header,r=t.payload,n=t.secret||t.privateKey,i=t.encoding,s=YN(e.alg),u=QN(e,r,i),d=s.sign(u,n);return ef.format("%s.%s",u,d)}o(WT,"jwsSign");function Xc(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 VT(e);this.readable=!0,this.header=t.header,this.encoding=t.encoding,this.secret=this.privateKey=this.key=r,this.payload=new VT(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(Xc,"SignStream");ef.inherits(Xc,XN);Xc.prototype.sign=o(function(){try{var e=WT({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");Xc.sign=WT;ZT.exports=Xc});var iw=D((N7,ow)=>{var YT=fi().Buffer,JT=Wp(),ez=Xp(),tz=require("stream"),XT=Qp(),rz=require("util"),nz=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function oz(t){return Object.prototype.toString.call(t)==="[object Object]"}o(oz,"isObject");function iz(t){if(oz(t))return t;try{return JSON.parse(t)}catch{return}}o(iz,"safeJsonParse");function QT(t){var e=t.split(".",1)[0];return iz(YT.from(e,"base64").toString("binary"))}o(QT,"headerFromJWS");function az(t){return t.split(".",2).join(".")}o(az,"securedInputFromJWS");function ew(t){return t.split(".")[2]}o(ew,"signatureFromJWS");function sz(t,e){e=e||"utf8";var r=t.split(".")[1];return YT.from(r,"base64").toString(e)}o(sz,"payloadFromJWS");function tw(t){return nz.test(t)&&!!QT(t)}o(tw,"isValidJws");function rw(t,e,r){if(!e){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}t=XT(t);var i=ew(t),s=az(t),u=ez(e);return u.verify(s,i,r)}o(rw,"jwsVerify");function nw(t,e){if(e=e||{},t=XT(t),!tw(t))return null;var r=QT(t);if(!r)return null;var n=sz(t);return(r.typ==="JWT"||e.json)&&(n=JSON.parse(n,e.encoding)),{header:r,payload:n,signature:ew(t)}}o(nw,"jwsDecode");function vi(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 JT(e);this.readable=!0,this.algorithm=t.algorithm,this.encoding=t.encoding,this.secret=this.publicKey=this.key=r,this.signature=new JT(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(vi,"VerifyStream");rz.inherits(vi,tz);vi.prototype.verify=o(function(){try{var e=rw(this.signature.buffer,this.algorithm,this.key.buffer),r=nw(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");vi.decode=nw;vi.isValid=tw;vi.verify=rw;ow.exports=vi});var tf=D(Xn=>{var aw=KT(),Qc=iw(),cz=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];Xn.ALGORITHMS=cz;Xn.sign=aw.sign;Xn.verify=Qc.verify;Xn.decode=Qc.decode;Xn.isValid=Qc.isValid;Xn.createSign=o(function(e){return new aw(e)},"createSign");Xn.createVerify=o(function(e){return new Qc(e)},"createVerify")});var Ew=D(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.GoogleToken=void 0;var sw=eu(require("fs")),uz=ht(),lz=eu(tf()),dz=eu(require("path")),pz=require("util");function eu(t,e){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(eu=o(function(s,u){if(!u&&s&&s.__esModule)return s;var d,p,h={__proto__:null,default:s};if(s===null||En(s)!="object"&&typeof s!="function")return h;if(d=u?n:r){if(d.has(s))return d.get(s);d.set(s,h)}for(var y in s)y!=="default"&&{}.hasOwnProperty.call(s,y)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,y))&&(p.get||p.set)?d(h,y,p):h[y]=s[y]);return h},"_interopRequireWildcard"))(t,e)}o(eu,"_interopRequireWildcard");function En(t){"@babel/helpers - typeof";return En=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},En(t)}o(En,"_typeof");function fz(t,e){gw(t,e),e.add(t)}o(fz,"_classPrivateMethodInitSpec");function mz(t,e,r){gw(t,e),e.set(t,r)}o(mz,"_classPrivateFieldInitSpec");function gw(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(gw,"_checkPrivateRedeclaration");function cw(t,e,r){return t.set(Nr(t,e),r),r}o(cw,"_classPrivateFieldSet");function uw(t,e){return t.get(Nr(t,e))}o(uw,"_classPrivateFieldGet");function Nr(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(Nr,"_assertClassBrand");function lw(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,_w(n.key),n)}}o(lw,"_defineProperties");function yw(t,e,r){return e&&lw(t.prototype,e),r&&lw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}o(yw,"_createClass");function vw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}o(vw,"_classCallCheck");function hz(t,e,r){return e=Ua(e),gz(t,cf()?Reflect.construct(e,r||[],Ua(t).constructor):e.apply(t,r))}o(hz,"_callSuper");function gz(t,e){if(e&&(En(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yz(t)}o(gz,"_possibleConstructorReturn");function yz(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}o(yz,"_assertThisInitialized");function vz(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&&za(t,e)}o(vz,"_inherits");function rf(t){var e=typeof Map=="function"?new Map:void 0;return rf=o(function(n){if(n===null||!bz(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 _z(n,arguments,Ua(this).constructor)}return o(i,"Wrapper"),i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),za(i,n)},"_wrapNativeSuper"),rf(t)}o(rf,"_wrapNativeSuper");function _z(t,e,r){if(cf())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&za(i,r.prototype),i}o(_z,"_construct");function cf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cf=o(function(){return!!t},"_isNativeReflectConstruct"))()}o(cf,"_isNativeReflectConstruct");function bz(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}o(bz,"_isNativeFunction");function za(t,e){return za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},za(t,e)}o(za,"_setPrototypeOf");function Ua(t){return Ua=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ua(t)}o(Ua,"_getPrototypeOf");function or(t,e,r){return(e=_w(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}o(or,"_defineProperty");function _w(t){var e=Ez(t,"string");return En(e)=="symbol"?e:e+""}o(_w,"_toPropertyKey");function Ez(t,e){if(En(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(En(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}o(Ez,"_toPrimitive");function ar(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function s(l,g,v,E){var b=g&&g.prototype instanceof d?g:d,C=Object.create(b.prototype);return ir(C,"_invoke",(function(U,Y,Z){var G,X,te,J=0,De=Z||[],re=!1,H={p:0,n:0,v:t,a:V,f:V.bind(t,4),d:o(function(K,ie){return G=K,X=0,te=t,H.n=ie,u},"d")};function V(Q,K){for(X=Q,te=K,e=0;!re&&J&&!ie&&e<De.length;e++){var ie,ce=De[e],ke=H.p,Ne=ce[2];Q>3?(ie=Ne===K)&&(te=ce[(X=ce[4])?5:(X=3,3)],ce[4]=ce[5]=t):ce[0]<=ke&&((ie=Q<2&&ke<ce[1])?(X=0,H.v=K,H.n=ce[1]):ke<Ne&&(ie=Q<3||ce[0]>K||K>Ne)&&(ce[4]=Q,ce[5]=K,H.n=Ne,X=0))}if(ie||Q>1)return u;throw re=!0,K}return o(V,"d"),function(Q,K,ie){if(J>1)throw TypeError("Generator is already running");for(re&&K===1&&V(K,ie),X=K,te=ie;(e=X<2?t:te)||!re;){G||(X?X<3?(X>1&&(H.n=-1),V(X,te)):H.n=te:H.v=te);try{if(J=2,G){if(X||(Q="next"),e=G[Q]){if(!(e=e.call(G,te)))throw TypeError("iterator result is not an object");if(!e.done)return e;te=e.value,X<2&&(X=0)}else X===1&&(e=G.return)&&e.call(G),X<2&&(te=TypeError("The iterator does not provide a '"+Q+"' method"),X=1);G=t}else if((e=(re=H.n<0)?te:U.call(Y,H))!==u)break}catch(ce){G=t,X=1,te=ce}finally{J=1}}return{value:e,done:re}}})(l,v,E),!0),C}o(s,"i");var u={};function d(){}o(d,"Generator");function p(){}o(p,"GeneratorFunction");function h(){}o(h,"GeneratorFunctionPrototype"),e=Object.getPrototypeOf;var y=[][n]?e(e([][n]())):(ir(e={},n,function(){return this}),e),m=h.prototype=d.prototype=Object.create(y);function f(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,h):(l.__proto__=h,ir(l,i,"GeneratorFunction")),l.prototype=Object.create(m),l}return o(f,"f"),p.prototype=h,ir(m,"constructor",h),ir(h,"constructor",p),p.displayName="GeneratorFunction",ir(h,i,"GeneratorFunction"),ir(m),ir(m,i,"Generator"),ir(m,n,function(){return this}),ir(m,"toString",function(){return"[object Generator]"}),(ar=o(function(){return{w:s,m:f}},"_regenerator"))()}o(ar,"_regenerator");function ir(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ir=o(function(u,d,p,h){if(d)i?i(u,d,{value:p,enumerable:!h,configurable:!h,writable:!h}):u[d]=p;else{var y=o(function(f,l){ir(u,f,function(g){return this._invoke(f,l,g)})},"o");y("next",0),y("throw",1),y("return",2)}},"_regeneratorDefine"),ir(t,e,r,n)}o(ir,"_regeneratorDefine2");function dw(t,e,r,n,i,s,u){try{var d=t[s](u),p=d.value}catch(h){return void r(h)}d.done?e(p):Promise.resolve(p).then(n,i)}o(dw,"asyncGeneratorStep");function _i(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function u(p){dw(s,n,i,u,d,"next",p)}o(u,"_next");function d(p){dw(s,n,i,u,d,"throw",p)}o(d,"_throw"),u(void 0)})}}o(_i,"_asyncToGenerator");var pw=sw.readFile?(0,pz.promisify)(sw.readFile):_i(ar().m(o(function t(){return ar().w(function(e){for(;;)switch(e.n){case 0:throw new Na("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}},t)},"_callee"))),fw="https://oauth2.googleapis.com/token",Sz="https://oauth2.googleapis.com/revoke?token=",Na=(function(t){function e(r,n){var i;return vw(this,e),i=hz(this,e,[r]),or(i,"code",void 0),i.code=n,i}return o(e,"ErrorWithCode"),vz(e,t),yw(e)})(rf(Error)),Da=new WeakMap,Zr=new WeakSet,L7=tu.GoogleToken=(function(){function t(e){vw(this,t),fz(this,Zr),or(this,"expiresAt",void 0),or(this,"key",void 0),or(this,"keyFile",void 0),or(this,"iss",void 0),or(this,"sub",void 0),or(this,"scope",void 0),or(this,"rawToken",void 0),or(this,"tokenExpires",void 0),or(this,"email",void 0),or(this,"additionalClaims",void 0),or(this,"eagerRefreshThresholdMillis",void 0),or(this,"transporter",{request:o(function(n){return(0,uz.request)(n)},"request")}),mz(this,Da,void 0),Nr(Zr,this,bw).call(this,e)}return o(t,"GoogleToken"),yw(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(En(r)==="object"&&(n=r,r=void 0),n=Object.assign({forceRefresh:!1},n),r){var i=r;Nr(Zr,this,mw).call(this,n).then(function(s){return i(null,s)},r);return}return Nr(Zr,this,mw).call(this,n)},"getToken")},{key:"getCredentials",value:(function(){var e=_i(ar().m(o(function n(i){var s,u,d,p,h,y,m;return ar().w(function(f){for(;;)switch(f.n){case 0:s=dz.extname(i),m=s,f.n=m===".json"?1:m===".der"||m===".crt"||m===".pem"?4:m===".p12"||m===".pfx"?6:7;break;case 1:return f.n=2,pw(i,"utf8");case 2:if(u=f.v,d=JSON.parse(u),p=d.private_key,h=d.client_email,!(!p||!h)){f.n=3;break}throw new Na("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return f.a(2,{privateKey:p,clientEmail:h});case 4:return f.n=5,pw(i,"utf8");case 5:return y=f.v,f.a(2,{privateKey:y});case 6:throw new Na("*.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 Na("Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return f.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){Nr(Zr,this,hw).call(this).then(function(){return r()},r);return}return Nr(Zr,this,hw).call(this)},"revokeToken")}])})();function mw(t){return nf.apply(this,arguments)}o(mw,"_getTokenAsync");function nf(){return nf=_i(ar().m(o(function t(e){return ar().w(function(r){for(;;)switch(r.n){case 0:if(!(uw(Da,this)&&!e.forceRefresh)){r.n=1;break}return r.a(2,uw(Da,this));case 1:return r.p=1,r.n=2,cw(Da,this,Nr(Zr,this,Tz).call(this,e));case 2:return r.a(2,r.v);case 3:return r.p=3,cw(Da,this,void 0),r.f(3);case 4:return r.a(2)}},t,this,[[1,,3,4]])},"_callee3"))),nf.apply(this,arguments)}o(nf,"_getTokenAsync2");function Tz(t){return of.apply(this,arguments)}o(Tz,"_getTokenAsyncInner");function of(){return of=_i(ar().m(o(function t(e){var r;return ar().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||Nr(Zr,this,wz).call(this);case 4:return n.a(2,Nr(Zr,this,Pz).call(this))}},t,this)},"_callee4"))),of.apply(this,arguments)}o(of,"_getTokenAsyncInner2");function wz(){if(!this.iss)throw new Na("email is required.","MISSING_CREDENTIALS")}o(wz,"_ensureEmail");function hw(){return af.apply(this,arguments)}o(hw,"_revokeTokenAsync");function af(){return af=_i(ar().m(o(function t(){var e;return ar().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=Sz+this.accessToken,r.n=2,this.transporter.request({url:e,retry:!0});case 2:Nr(Zr,this,bw).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"))),af.apply(this,arguments)}o(af,"_revokeTokenAsync2");function bw(){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,En(t.scope)==="object"?this.scope=t.scope.join(" "):this.scope=t.scope,this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,t.transporter&&(this.transporter=t.transporter)}o(bw,"_configure");function Pz(){return sf.apply(this,arguments)}o(Pz,"_requestToken");function sf(){return sf=_i(ar().m(o(function t(){var e,r,n,i,s,u,d,p,h,y;return ar().w(function(m){for(;;)switch(m.n){case 0:return e=Math.floor(new Date().getTime()/1e3),r=this.additionalClaims||{},n=Object.assign({iss:this.iss,scope:this.scope,aud:fw,exp:e+3600,iat:e,sub:this.sub},r),i=lz.sign({header:{alg:"RS256"},payload:n,secret:this.key}),m.p=1,m.n=2,this.transporter.request({method:"POST",url:fw,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return s=m.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,m.a(2,this.rawToken);case 3:throw m.p=3,y=m.v,this.rawToken=void 0,this.tokenExpires=void 0,p=y.response&&(u=y.response)!==null&&u!==void 0&&u.data?(d=y.response)===null||d===void 0?void 0:d.data:{},p.error&&(h=p.error_description?": ".concat(p.error_description):"",y.message="".concat(p.error).concat(h)),y;case 4:return m.a(2)}},t,this,[[1,3]])},"_callee6"))),sf.apply(this,arguments)}o(sf,"_requestToken2")});var lf=D(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.JWTAccess=void 0;var xz=tf(),Az=kr(),Sw={alg:"RS256",typ:"JWT"},uf=class t{static{o(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new Az.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),u=Date.now();if(s&&s.expiration-u>this.eagerRefreshThresholdMillis)return new Headers(s.headers);let d=Math.floor(Date.now()/1e3),p=t.getExpirationTime(d),h;if(Array.isArray(n)&&(n=n.join(" ")),n?h={iss:this.email,sub:this.email,scope:n,exp:p,iat:d}:h={iss:this.email,sub:this.email,aud:e,exp:p,iat:d},r){for(let g in h)if(r[g])throw new Error(`The '${g}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let y=this.keyId?{...Sw,kid:this.keyId}:Sw,m=Object.assign(h,r),f=xz.sign({header:y,payload:m,secret:this.key}),l=new Headers({authorization:`Bearer ${f}`});return this.cache.set(i,{expiration:p*1e3,headers:l}),l}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)}})})}};ru.JWTAccess=uf});var pf=D(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.JWT=void 0;var Tw=Ew(),Iz=lf(),Rz=To(),nu=nr(),df=class t extends Rz.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!==nu.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==nu.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${nu.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 Iz.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!==nu.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 Tw.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 Tw.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.")}};ou.JWT=df});var mf=D(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.UserRefreshClient=bi.USER_REFRESH_ACCOUNT_TYPE=void 0;var Cz=To(),Oz=nr();bi.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var ff=class t extends Cz.OAuth2Client{static{o(this,"UserRefreshClient")}_refreshToken;constructor(e,r,n,i,s){let u=e&&typeof e=="object"?e:{clientId:e,clientSecret:r,refreshToken:n,eagerRefreshThresholdMillis:i,forceRefreshOnFailure:s};super(u),this._refreshToken=u.refreshToken,this.credentials.refresh_token=u.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 Oz.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}};bi.UserRefreshClient=ff});var gf=D(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.Impersonated=Ei.IMPERSONATED_ACCOUNT_TYPE=void 0;var ww=To(),kz=ht(),$z=kr();Ei.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var hf=class t extends ww.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 ww.OAuth2Client,this.targetPrincipal=e.targetPrincipal??"",this.delegates=e.delegates??[],this.targetScopes=e.targetScopes??[],this.lifetime=e.lifetime??3600,!!!(0,$z.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 kz.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}};Ei.Impersonated=hf});var vf=D(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.OAuthClientAuthHandler=void 0;Ma.getErrorFromOAuthErrorResponse=zz;var Si=ht(),Dz=Ia(),Nz=["PUT","POST","PATCH"],yf=class{static{o(this,"OAuthClientAuthHandler")}#e=(0,Dz.createCrypto)();#t;transporter;constructor(e){e&&"clientId"in e?(this.#t=e,this.transporter=new Si.Gaxios):(this.#t=e?.clientAuthentication,this.transporter=e?.transporter||new Si.Gaxios)}applyClientAuthenticationOptions(e,r){e.headers=Si.Gaxios.mergeHeaders(e.headers),this.injectAuthenticatedHeaders(e,r),r||this.injectAuthenticatedRequestBody(e)}injectAuthenticatedHeaders(e,r){if(r)e.headers=Si.Gaxios.mergeHeaders(e.headers,{authorization:`Bearer ${r}`});else if(this.#t?.confidentialClientType==="basic"){e.headers=Si.Gaxios.mergeHeaders(e.headers);let n=this.#t.clientId,i=this.#t.clientSecret||"",s=this.#e.encodeBase64StringUtf8(`${n}:${i}`);Si.Gaxios.mergeHeaders(e.headers,{authorization:`Basic ${s}`})}}injectAuthenticatedRequestBody(e){if(this.#t?.confidentialClientType==="request-body"){let r=(e.method||"GET").toUpperCase();if(!Nz.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"]}}}};Ma.OAuthClientAuthHandler=yf;function zz(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 u=new Error(s);if(e){let d=Object.keys(e);e.stack&&d.push("stack"),d.forEach(p=>{p!=="message"&&Object.defineProperty(u,p,{value:e[p],writable:!1,enumerable:!0})})}return u}o(zz,"getErrorFromOAuthErrorResponse")});var au=D(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.StsCredentials=void 0;var Uz=ht(),Mz=nr(),Pw=vf(),Lz=kr(),_f=class t extends Pw.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,Lz.removeUndefinedValuesInObject)(i))};Mz.AuthClient.setMethodName(s,"exchangeToken"),this.applyClientAuthenticationOptions(s);try{let u=await this.transporter.request(s),d=u.data;return d.res=u,d}catch(u){throw u instanceof Uz.GaxiosError&&u.response?(0,Pw.getErrorFromOAuthErrorResponse)(u.response.data,u):u}}};iu.StsCredentials=_f});var Qn=D(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.BaseExternalAccountClient=_r.CLOUD_RESOURCE_MANAGER=_r.EXTERNAL_ACCOUNT_TYPE=_r.EXPIRATION_TIME_OFFSET=void 0;var jz=ht(),Fz=require("stream"),bf=nr(),qz=au(),xw=kr(),Bz=Dp(),Vz="urn:ietf:params:oauth:grant-type:token-exchange",Gz="urn:ietf:params:oauth:token-type:access_token",Ef="https://www.googleapis.com/auth/cloud-platform",Hz=3600;_r.EXPIRATION_TIME_OFFSET=300*1e3;_r.EXTERNAL_ACCOUNT_TYPE="external_account";_r.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var Wz="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",Zz="https://sts.{universeDomain}/v1/token",Sf=class t extends bf.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,xw.originalOrCamelOptions)(e),n=r.get("type");if(n&&n!==_r.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${_r.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")??Zz.replace("{universeDomain}",this.universeDomain);let u=r.get("subject_token_type"),d=r.get("workforce_pool_user_project"),p=r.get("service_account_impersonation_url"),h=r.get("service_account_impersonation"),y=(0,xw.originalOrCamelOptions)(h).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 qz.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=r.get("scopes")||[Ef],this.cachedAccessToken=null,this.audience=r.get("audience"),this.subjectTokenType=u,this.workforcePoolUserProject=d;let m=new RegExp(Wz);if(this.workforcePoolUserProject&&!this.audience.match(m))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=p,this.serviceAccountImpersonationLifetime=y,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=Hz),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}`};bf.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=jz.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let u=s.status,d=s.config.data instanceof Fz.Readable;if(!r&&(u===401||u===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:Vz,audience:this.audience,requestedTokenType:Gz,subjectToken:e,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[Ef]: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"}};bf.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||[Ef]}getMetricsHeaderValue(){let e=process.version.replace(/^v/,""),r=this.serviceAccountImpersonationUrl!==void 0,n=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${e} auth/${Bz.pkg.version} google-byoid-sdk source/${n} sa-impersonation/${r} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};_r.BaseExternalAccountClient=Sf});var Aw=D(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.FileSubjectTokenSupplier=void 0;var wf=require("util"),Pf=require("fs"),Kz=(0,wf.promisify)(Pf.readFile??(()=>{})),Jz=(0,wf.promisify)(Pf.realpath??(()=>{})),Yz=(0,wf.promisify)(Pf.lstat??(()=>{})),Tf=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 Jz(e),!(await Yz(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 Kz(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}};su.FileSubjectTokenSupplier=Tf});var Iw=D(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.UrlSubjectTokenSupplier=void 0;var Xz=nr(),xf=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};Xz.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}};cu.UrlSubjectTokenSupplier=xf});var Rw=D(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.CertificateSubjectTokenSupplier=sr.InvalidConfigurationError=sr.CertificateSourceUnavailableError=sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var uu=kr(),lu=require("fs"),du=require("crypto"),Qz=require("https");sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Kr=class extends Error{static{o(this,"CertificateSourceUnavailableError")}constructor(e){super(e),this.name="CertificateSourceUnavailableError"}};sr.CertificateSourceUnavailableError=Kr;var br=class extends Error{static{o(this,"InvalidConfigurationError")}constructor(e){super(e),this.name="InvalidConfigurationError"}};sr.InvalidConfigurationError=br;var Af=class{static{o(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(e){if(!e.useDefaultCertificateConfig&&!e.certificateConfigLocation)throw new br("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(e.useDefaultCertificateConfig&&e.certificateConfigLocation)throw new br("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=e.trustChainPath,this.certificateConfigPath=e.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new br("Cannot create mTLS Agent with missing certificate or key");return new Qz.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,uu.isValidFile)(e))return e;throw new Kr(`Provided certificate config path is invalid: ${e}`)}let r=process.env[sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(r){if(await(0,uu.isValidFile)(r))return r;throw new Kr(`Path from environment variable "${sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${r}`)}let n=(0,uu.getWellKnownCertificateConfigFileLocation)();if(await(0,uu.isValidFile)(n))return n;throw new Kr(`Could not find certificate configuration file. Searched override path, the "${sr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${n}).`)}async#t(){let e=this.certificateConfigPath,r;try{r=await lu.promises.readFile(e,"utf8")}catch{throw new Kr(`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 br(`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 br?n:new br(`Failed to parse certificate config from ${e}: ${n.message}`)}}async#r(e,r){let n,i;try{n=await lu.promises.readFile(e),new du.X509Certificate(n)}catch(s){let u=s instanceof Error?s.message:String(s);throw new Kr(`Failed to read certificate file at ${e}: ${u}`)}try{i=await lu.promises.readFile(r),(0,du.createPrivateKey)(i)}catch(s){let u=s instanceof Error?s.message:String(s);throw new Kr(`Failed to read private key file at ${r}: ${u}`)}return{cert:n,key:i}}async#n(e){let r=new du.X509Certificate(e);if(!this.trustChainPath)return JSON.stringify([r.raw.toString("base64")]);try{let s=((await lu.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((p,h)=>{try{return new du.X509Certificate(p)}catch(y){let m=y instanceof Error?y.message:String(y);throw new br(`Failed to parse certificate at index ${h} in trust chain file ${this.trustChainPath}: ${m}`)}}),u=s.findIndex(p=>r.raw.equals(p.raw)),d;if(u===-1)d=[r,...s];else if(u===0)d=s;else throw new br(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${u}).`);return JSON.stringify(d.map(p=>p.raw.toString("base64")))}catch(n){if(n instanceof br)throw n;let i=n instanceof Error?n.message:String(n);throw new Kr(`Failed to process certificate chain from ${this.trustChainPath}: ${i}`)}}};sr.CertificateSubjectTokenSupplier=Af});var Cf=D(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.IdentityPoolClient=void 0;var eU=Qn(),If=kr(),tU=Aw(),rU=Iw(),Cw=Rw(),nU=au(),Ow=ht(),Rf=class t extends eU.BaseExternalAccountClient{static{o(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(e){super(e);let r=(0,If.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,If.originalOrCamelOptions)(n),u=(0,If.originalOrCamelOptions)(s.get("format")),d=u.get("type")||"text",p=u.get("subject_token_field_name");if(d!=="json"&&d!=="text")throw new Error(`Invalid credential_source format "${d}"`);if(d==="json"&&!p)throw new Error("Missing subject_token_field_name for JSON credential_source format");let h=s.get("file"),y=s.get("url"),m=s.get("certificate"),f=s.get("headers");if(h&&y||y&&m||h&&m)throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.');if(h)this.credentialSourceType="file",this.subjectTokenSupplier=new tU.FileSubjectTokenSupplier({filePath:h,formatType:d,subjectTokenFieldName:p});else if(y)this.credentialSourceType="url",this.subjectTokenSupplier=new rU.UrlSubjectTokenSupplier({url:y,formatType:d,subjectTokenFieldName:p,headers:f,additionalGaxiosOptions:t.RETRY_CONFIG});else if(m){this.credentialSourceType="certificate";let l=new Cw.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:m.use_default_certificate_config,certificateConfigLocation:m.certificate_config_location,trustChainPath:m.trust_chain_path});this.subjectTokenSupplier=l}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 Cw.CertificateSubjectTokenSupplier){let r=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new nU.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new Ow.Gaxios({agent:r})}),this.transporter=new Ow.Gaxios({...this.transporter.defaults||{},agent:r})}return e}};pu.IdentityPoolClient=Rf});var kf=D(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.AwsRequestSigner=void 0;var fu=ht(),$w=Ia(),kw="AWS4-HMAC-SHA256",oU="aws4_request",Of=class{static{o(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(e,r){this.getCredentials=e,this.region=r,this.crypto=(0,$w.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,u=e.headers,d=await this.getCredentials(),p=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 h=await aU({crypto:this.crypto,host:p.host,canonicalUri:p.pathname,canonicalQuerystring:p.search.slice(1),method:i,region:this.region,securityCredentials:d,requestPayload:s,additionalAmzHeaders:u}),y=fu.Gaxios.mergeHeaders(h.amzDate?{"x-amz-date":h.amzDate}:{},{authorization:h.authorizationHeader,host:p.host},u||{});d.token&&fu.Gaxios.mergeHeaders(y,{"x-amz-security-token":d.token});let m={url:n,method:i,headers:y};return s!==void 0&&(m.body=s),m}};mu.AwsRequestSigner=Of;async function La(t,e,r){return await t.signWithHmacSha256(e,r)}o(La,"sign");async function iU(t,e,r,n,i){let s=await La(t,`AWS4${e}`,r),u=await La(t,s,n),d=await La(t,u,i);return await La(t,d,"aws4_request")}o(iU,"getSigningKey");async function aU(t){let e=fu.Gaxios.mergeHeaders(t.additionalAmzHeaders),r=t.requestPayload||"",n=t.host.split(".")[0],i=new Date,s=i.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),u=i.toISOString().replace(/[-]/g,"").replace(/T.*/,"");t.securityCredentials.token&&e.set("x-amz-security-token",t.securityCredentials.token);let d=fu.Gaxios.mergeHeaders({host:t.host},e.has("date")?{}:{"x-amz-date":s},e),p="",h=[...d.keys()].sort();h.forEach(C=>{p+=`${C}:${d.get(C)}
41
- `});let y=h.join(";"),m=await t.crypto.sha256DigestHex(r),f=`${t.method.toUpperCase()}
42
- ${t.canonicalUri}
43
- ${t.canonicalQuerystring}
40
+ "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,ku="secret must be a string or buffer",Ha="key must be a string or a buffer",K2="key must be a string, a buffer or an object",WE=typeof qr.createPublicKey=="function";WE&&(Ha+=" or a KeyObject",ku+="or a KeyObject");function jk(e){if(!Za.isBuffer(e)&&typeof e!="string"&&(!WE||typeof e!="object"||typeof e.type!="string"||typeof e.asymmetricKeyType!="string"||typeof e.export!="function"))throw un(Ha)}a(jk,"checkIsPublicKey");function Fk(e){if(!Za.isBuffer(e)&&typeof e!="string"&&typeof e!="object")throw un(K2)}a(Fk,"checkIsPrivateKey");function J2(e){if(!Za.isBuffer(e)){if(typeof e=="string")return e;if(!WE||typeof e!="object"||e.type!=="secret"||typeof e.export!="function")throw un(ku)}}a(J2,"checkIsSecretKey");function KE(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(KE,"fromBase64");function Bk(e){e=e.toString();var t=4-e.length%4;if(t!==4)for(var n=0;n<t;++n)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}a(Bk,"toBase64");function un(e){var t=[].slice.call(arguments,1),n=Mk.format.bind(Mk,e).apply(null,t);return new TypeError(n)}a(un,"typeError");function Y2(e){return Za.isBuffer(e)||typeof e=="string"}a(Y2,"bufferOrString");function $u(e){return Y2(e)||(e=JSON.stringify(e)),e}a($u,"normalizeInput");function qk(e){return a(function(n,o){J2(o),n=$u(n);var r=qr.createHmac("sha"+e,o),i=(r.update(n),r.digest("base64"));return KE(i)},"sign")}a(qk,"createHmacSigner");var ZE,X2="timingSafeEqual"in qr?a(function(t,n){return t.byteLength!==n.byteLength?!1:qr.timingSafeEqual(t,n)},"timingSafeEqual"):a(function(t,n){return ZE||(ZE=Uk()),ZE(t,n)},"timingSafeEqual");function Q2(e){return a(function(n,o,r){var i=qk(e)(n,r);return X2(Za.from(o),Za.from(i))},"verify")}a(Q2,"createHmacVerifier");function Vk(e){return a(function(n,o){Fk(o),n=$u(n);var r=qr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign(o,"base64"));return KE(i)},"sign")}a(Vk,"createKeySigner");function Gk(e){return a(function(n,o,r){jk(r),n=$u(n),o=Bk(o);var i=qr.createVerify("RSA-SHA"+e);return i.update(n),i.verify(r,o,"base64")},"verify")}a(Gk,"createKeyVerifier");function eV(e){return a(function(n,o){Fk(o),n=$u(n);var r=qr.createSign("RSA-SHA"+e),i=(r.update(n),r.sign({key:o,padding:qr.constants.RSA_PKCS1_PSS_PADDING,saltLength:qr.constants.RSA_PSS_SALTLEN_DIGEST},"base64"));return KE(i)},"sign")}a(eV,"createPSSKeySigner");function tV(e){return a(function(n,o,r){jk(r),n=$u(n),o=Bk(o);var i=qr.createVerify("RSA-SHA"+e);return i.update(n),i.verify({key:r,padding:qr.constants.RSA_PKCS1_PSS_PADDING,saltLength:qr.constants.RSA_PSS_SALTLEN_DIGEST},o,"base64")},"verify")}a(tV,"createPSSKeyVerifier");function rV(e){var t=Vk(e);return a(function(){var o=t.apply(null,arguments);return o=Lk.derToJose(o,"ES"+e),o},"sign")}a(rV,"createECDSASigner");function nV(e){var t=Gk(e);return a(function(o,r,i){r=Lk.joseToDer(r,"ES"+e).toString("base64");var s=t(o,r,i);return s},"verify")}a(nV,"createECDSAVerifer");function oV(){return a(function(){return""},"sign")}a(oV,"createNoneSigner");function iV(){return a(function(t,n){return n===""},"verify")}a(iV,"createNoneVerifier");Hk.exports=a(function(t){var n={hs:qk,rs:Vk,ps:eV,es:rV,none:oV},o={hs:Q2,rs:Gk,ps:tV,es:nV,none:iV},r=t.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw un(W2,t);var i=(r[1]||r[3]).toLowerCase(),s=r[2];return{sign:n[i](s),verify:o[i](s)}},"jwa")});var YE=z((cse,Zk)=>{var aV=require("buffer").Buffer;Zk.exports=a(function(t){return typeof t=="string"?t:typeof t=="number"||aV.isBuffer(t)?t.toString():JSON.stringify(t)},"toString")});var Qk=z((lse,Xk)=>{var sV=qa().Buffer,Wk=GE(),cV=JE(),uV=require("stream"),Kk=YE(),XE=require("util");function Jk(e,t){return sV.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}a(Jk,"base64url");function lV(e,t,n){n=n||"utf8";var o=Jk(Kk(e),"binary"),r=Jk(Kk(t),n);return XE.format("%s.%s",o,r)}a(lV,"jwsSecuredInput");function Yk(e){var t=e.header,n=e.payload,o=e.secret||e.privateKey,r=e.encoding,i=cV(t.alg),s=lV(t,n,r),u=i.sign(s,o);return XE.format("%s.%s",s,u)}a(Yk,"jwsSign");function hm(e){var t=e.secret;if(t=t??e.privateKey,t=t??e.key,/^hs/i.test(e.header.alg)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new Wk(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new Wk(e.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(hm,"SignStream");XE.inherits(hm,uV);hm.prototype.sign=a(function(){try{var t=Yk({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",t),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(n){this.readable=!1,this.emit("error",n),this.emit("close")}},"sign");hm.sign=Yk;Xk.exports=hm});var u$=z((pse,c$)=>{var t$=qa().Buffer,e$=GE(),dV=JE(),pV=require("stream"),r$=YE(),fV=require("util"),mV=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function hV(e){return Object.prototype.toString.call(e)==="[object Object]"}a(hV,"isObject");function gV(e){if(hV(e))return e;try{return JSON.parse(e)}catch{return}}a(gV,"safeJsonParse");function n$(e){var t=e.split(".",1)[0];return gV(t$.from(t,"base64").toString("binary"))}a(n$,"headerFromJWS");function yV(e){return e.split(".",2).join(".")}a(yV,"securedInputFromJWS");function o$(e){return e.split(".")[2]}a(o$,"signatureFromJWS");function vV(e,t){t=t||"utf8";var n=e.split(".")[1];return t$.from(n,"base64").toString(t)}a(vV,"payloadFromJWS");function i$(e){return mV.test(e)&&!!n$(e)}a(i$,"isValidJws");function a$(e,t,n){if(!t){var o=new Error("Missing algorithm parameter for jws.verify");throw o.code="MISSING_ALGORITHM",o}e=r$(e);var r=o$(e),i=yV(e),s=dV(t);return s.verify(i,r,n)}a(a$,"jwsVerify");function s$(e,t){if(t=t||{},e=r$(e),!i$(e))return null;var n=n$(e);if(!n)return null;var o=vV(e);return(n.typ==="JWT"||t.json)&&(o=JSON.parse(o,t.encoding)),{header:n,payload:o,signature:o$(e)}}a(s$,"jwsDecode");function Wa(e){e=e||{};var t=e.secret;if(t=t??e.publicKey,t=t??e.key,/^hs/i.test(e.algorithm)===!0&&t==null)throw new TypeError("secret must be a string or buffer or a KeyObject");var n=new e$(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new e$(e.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(Wa,"VerifyStream");fV.inherits(Wa,pV);Wa.prototype.verify=a(function(){try{var t=a$(this.signature.buffer,this.algorithm,this.key.buffer),n=s$(this.signature.buffer,this.encoding);return this.emit("done",t,n),this.emit("data",t),this.emit("end"),this.readable=!1,t}catch(o){this.readable=!1,this.emit("error",o),this.emit("close")}},"verify");Wa.decode=s$;Wa.isValid=i$;Wa.verify=a$;c$.exports=Wa});var QE=z(zo=>{var l$=Qk(),gm=u$(),_V=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];zo.ALGORITHMS=_V;zo.sign=l$.sign;zo.verify=gm.verify;zo.decode=gm.decode;zo.isValid=gm.isValid;zo.createSign=a(function(t){return new l$(t)},"createSign");zo.createVerify=a(function(t){return new gm(t)},"createVerify")});var w$=z(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.GoogleToken=void 0;var d$=ym(require("fs")),bV=Pt(),EV=ym(QE()),SV=ym(require("path")),TV=require("util");function ym(e,t){if(typeof WeakMap=="function")var n=new WeakMap,o=new WeakMap;return(ym=a(function(i,s){if(!s&&i&&i.__esModule)return i;var u,d,f={__proto__:null,default:i};if(i===null||Yn(i)!="object"&&typeof i!="function")return f;if(u=s?o:n){if(u.has(i))return u.get(i);u.set(i,f)}for(var h in i)h!=="default"&&{}.hasOwnProperty.call(i,h)&&((d=(u=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,h))&&(d.get||d.set)?u(f,h,d):f[h]=i[h]);return f},"_interopRequireWildcard"))(e,t)}a(ym,"_interopRequireWildcard");function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}a(Yn,"_typeof");function PV(e,t){b$(e,t),t.add(e)}a(PV,"_classPrivateMethodInitSpec");function wV(e,t,n){b$(e,t),t.set(e,n)}a(wV,"_classPrivateFieldInitSpec");function b$(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}a(b$,"_checkPrivateRedeclaration");function p$(e,t,n){return e.set(ln(e,t),n),n}a(p$,"_classPrivateFieldSet");function f$(e,t){return e.get(ln(e,t))}a(f$,"_classPrivateFieldGet");function ln(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}a(ln,"_assertClassBrand");function m$(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T$(o.key),o)}}a(m$,"_defineProperties");function E$(e,t,n){return t&&m$(e.prototype,t),n&&m$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}a(E$,"_createClass");function S$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}a(S$,"_classCallCheck");function xV(e,t,n){return t=Uu(t),AV(e,iS()?Reflect.construct(t,n||[],Uu(e).constructor):t.apply(e,n))}a(xV,"_callSuper");function AV(e,t){if(t&&(Yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IV(e)}a(AV,"_possibleConstructorReturn");function IV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}a(IV,"_assertThisInitialized");function RV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}a(RV,"_inherits");function eS(e){var t=typeof Map=="function"?new Map:void 0;return eS=a(function(o){if(o===null||!OV(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return CV(o,arguments,Uu(this).constructor)}return a(r,"Wrapper"),r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),zu(r,o)},"_wrapNativeSuper"),eS(e)}a(eS,"_wrapNativeSuper");function CV(e,t,n){if(iS())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&zu(r,n.prototype),r}a(CV,"_construct");function iS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iS=a(function(){return!!e},"_isNativeReflectConstruct"))()}a(iS,"_isNativeReflectConstruct");function OV(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}a(OV,"_isNativeFunction");function zu(e,t){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},zu(e,t)}a(zu,"_setPrototypeOf");function Uu(e){return Uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Uu(e)}a(Uu,"_getPrototypeOf");function Ar(e,t,n){return(t=T$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}a(Ar,"_defineProperty");function T$(e){var t=kV(e,"string");return Yn(t)=="symbol"?t:t+""}a(T$,"_toPropertyKey");function kV(e,t){if(Yn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Yn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}a(kV,"_toPrimitive");function Rr(){var e,t,n=typeof Symbol=="function"?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(p,y,v,E){var b=y&&y.prototype instanceof u?y:u,k=Object.create(b.prototype);return Ir(k,"_invoke",(function(N,Z,H){var K,ee,se,Q=0,Le=H||[],ce=!1,J={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:a(function(X,pe){return K=X,ee=0,se=e,J.n=pe,s},"d")};function W(ne,X){for(ee=ne,se=X,t=0;!ce&&Q&&!pe&&t<Le.length;t++){var pe,he=Le[t],Ne=J.p,je=he[2];ne>3?(pe=je===X)&&(se=he[(ee=he[4])?5:(ee=3,3)],he[4]=he[5]=e):he[0]<=Ne&&((pe=ne<2&&Ne<he[1])?(ee=0,J.v=X,J.n=he[1]):Ne<je&&(pe=ne<3||he[0]>X||X>je)&&(he[4]=ne,he[5]=X,J.n=je,ee=0))}if(pe||ne>1)return s;throw ce=!0,X}return a(W,"d"),function(ne,X,pe){if(Q>1)throw TypeError("Generator is already running");for(ce&&X===1&&W(X,pe),ee=X,se=pe;(t=ee<2?e:se)||!ce;){K||(ee?ee<3?(ee>1&&(J.n=-1),W(ee,se)):J.n=se:J.v=se);try{if(Q=2,K){if(ee||(ne="next"),t=K[ne]){if(!(t=t.call(K,se)))throw TypeError("iterator result is not an object");if(!t.done)return t;se=t.value,ee<2&&(ee=0)}else ee===1&&(t=K.return)&&t.call(K),ee<2&&(se=TypeError("The iterator does not provide a '"+ne+"' method"),ee=1);K=e}else if((t=(ce=J.n<0)?se:N.call(Z,J))!==s)break}catch(he){K=e,ee=1,se=he}finally{Q=1}}return{value:t,done:ce}}})(p,v,E),!0),k}a(i,"i");var s={};function u(){}a(u,"Generator");function d(){}a(d,"GeneratorFunction");function f(){}a(f,"GeneratorFunctionPrototype"),t=Object.getPrototypeOf;var h=[][o]?t(t([][o]())):(Ir(t={},o,function(){return this}),t),g=f.prototype=u.prototype=Object.create(h);function m(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,f):(p.__proto__=f,Ir(p,r,"GeneratorFunction")),p.prototype=Object.create(g),p}return a(m,"f"),d.prototype=f,Ir(g,"constructor",f),Ir(f,"constructor",d),d.displayName="GeneratorFunction",Ir(f,r,"GeneratorFunction"),Ir(g),Ir(g,r,"Generator"),Ir(g,o,function(){return this}),Ir(g,"toString",function(){return"[object Generator]"}),(Rr=a(function(){return{w:i,m}},"_regenerator"))()}a(Rr,"_regenerator");function Ir(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch{r=0}Ir=a(function(s,u,d,f){if(u)r?r(s,u,{value:d,enumerable:!f,configurable:!f,writable:!f}):s[u]=d;else{var h=a(function(m,p){Ir(s,m,function(y){return this._invoke(m,p,y)})},"o");h("next",0),h("throw",1),h("return",2)}},"_regeneratorDefine"),Ir(e,t,n,o)}a(Ir,"_regeneratorDefine2");function h$(e,t,n,o,r,i,s){try{var u=e[i](s),d=u.value}catch(f){return void n(f)}u.done?t(d):Promise.resolve(d).then(o,r)}a(h$,"asyncGeneratorStep");function Ka(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function s(d){h$(i,o,r,s,u,"next",d)}a(s,"_next");function u(d){h$(i,o,r,s,u,"throw",d)}a(u,"_throw"),s(void 0)})}}a(Ka,"_asyncToGenerator");var g$=d$.readFile?(0,TV.promisify)(d$.readFile):Ka(Rr().m(a(function e(){return Rr().w(function(t){for(;;)switch(t.n){case 0:throw new Nu("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return t.a(2)}},e)},"_callee"))),y$="https://oauth2.googleapis.com/token",$V="https://oauth2.googleapis.com/revoke?token=",Nu=(function(e){function t(n,o){var r;return S$(this,t),r=xV(this,t,[n]),Ar(r,"code",void 0),r.code=o,r}return a(t,"ErrorWithCode"),RV(t,e),E$(t)})(eS(Error)),Du=new WeakMap,Sn=new WeakSet,gse=vm.GoogleToken=(function(){function e(t){S$(this,e),PV(this,Sn),Ar(this,"expiresAt",void 0),Ar(this,"key",void 0),Ar(this,"keyFile",void 0),Ar(this,"iss",void 0),Ar(this,"sub",void 0),Ar(this,"scope",void 0),Ar(this,"rawToken",void 0),Ar(this,"tokenExpires",void 0),Ar(this,"email",void 0),Ar(this,"additionalClaims",void 0),Ar(this,"eagerRefreshThresholdMillis",void 0),Ar(this,"transporter",{request:a(function(o){return(0,bV.request)(o)},"request")}),wV(this,Du,void 0),ln(Sn,this,P$).call(this,t)}return a(e,"GoogleToken"),E$(e,[{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(Yn(n)==="object"&&(o=n,n=void 0),o=Object.assign({forceRefresh:!1},o),n){var r=n;ln(Sn,this,v$).call(this,o).then(function(i){return r(null,i)},n);return}return ln(Sn,this,v$).call(this,o)},"getToken")},{key:"getCredentials",value:(function(){var t=Ka(Rr().m(a(function o(r){var i,s,u,d,f,h,g;return Rr().w(function(m){for(;;)switch(m.n){case 0:i=SV.extname(r),g=i,m.n=g===".json"?1:g===".der"||g===".crt"||g===".pem"?4:g===".p12"||g===".pfx"?6:7;break;case 1:return m.n=2,g$(r,"utf8");case 2:if(s=m.v,u=JSON.parse(s),d=u.private_key,f=u.client_email,!(!d||!f)){m.n=3;break}throw new Nu("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return m.a(2,{privateKey:d,clientEmail:f});case 4:return m.n=5,g$(r,"utf8");case 5:return h=m.v,m.a(2,{privateKey:h});case 6:throw new Nu("*.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 Nu("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 t.apply(this,arguments)}return a(n,"getCredentials"),n})()},{key:"revokeToken",value:a(function(n){if(n){ln(Sn,this,_$).call(this).then(function(){return n()},n);return}return ln(Sn,this,_$).call(this)},"revokeToken")}])})();function v$(e){return tS.apply(this,arguments)}a(v$,"_getTokenAsync");function tS(){return tS=Ka(Rr().m(a(function e(t){return Rr().w(function(n){for(;;)switch(n.n){case 0:if(!(f$(Du,this)&&!t.forceRefresh)){n.n=1;break}return n.a(2,f$(Du,this));case 1:return n.p=1,n.n=2,p$(Du,this,ln(Sn,this,DV).call(this,t));case 2:return n.a(2,n.v);case 3:return n.p=3,p$(Du,this,void 0),n.f(3);case 4:return n.a(2)}},e,this,[[1,,3,4]])},"_callee3"))),tS.apply(this,arguments)}a(tS,"_getTokenAsync2");function DV(e){return rS.apply(this,arguments)}a(DV,"_getTokenAsyncInner");function rS(){return rS=Ka(Rr().m(a(function e(t){var n;return Rr().w(function(o){for(;;)switch(o.n){case 0:if(!(this.isTokenExpiring()===!1&&t.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||ln(Sn,this,NV).call(this);case 4:return o.a(2,ln(Sn,this,zV).call(this))}},e,this)},"_callee4"))),rS.apply(this,arguments)}a(rS,"_getTokenAsyncInner2");function NV(){if(!this.iss)throw new Nu("email is required.","MISSING_CREDENTIALS")}a(NV,"_ensureEmail");function _$(){return nS.apply(this,arguments)}a(_$,"_revokeTokenAsync");function nS(){return nS=Ka(Rr().m(a(function e(){var t;return Rr().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 t=$V+this.accessToken,n.n=2,this.transporter.request({url:t,retry:!0});case 2:ln(Sn,this,P$).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)}},e,this)},"_callee5"))),nS.apply(this,arguments)}a(nS,"_revokeTokenAsync2");function P$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.keyFile=e.keyFile,this.key=e.key,this.rawToken=void 0,this.iss=e.email||e.iss,this.sub=e.sub,this.additionalClaims=e.additionalClaims,Yn(e.scope)==="object"?this.scope=e.scope.join(" "):this.scope=e.scope,this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis,e.transporter&&(this.transporter=e.transporter)}a(P$,"_configure");function zV(){return oS.apply(this,arguments)}a(zV,"_requestToken");function oS(){return oS=Ka(Rr().m(a(function e(){var t,n,o,r,i,s,u,d,f,h;return Rr().w(function(g){for(;;)switch(g.n){case 0:return t=Math.floor(new Date().getTime()/1e3),n=this.additionalClaims||{},o=Object.assign({iss:this.iss,scope:this.scope,aud:y$,exp:t+3600,iat:t,sub:this.sub},n),r=EV.sign({header:{alg:"RS256"},payload:o,secret:this.key}),g.p=1,g.n=2,this.transporter.request({method:"POST",url:y$,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:return i=g.v,this.rawToken=i.data,this.expiresAt=i.data.expires_in===null||i.data.expires_in===void 0?void 0:(t+i.data.expires_in)*1e3,g.a(2,this.rawToken);case 3:throw g.p=3,h=g.v,this.rawToken=void 0,this.tokenExpires=void 0,d=h.response&&(s=h.response)!==null&&s!==void 0&&s.data?(u=h.response)===null||u===void 0?void 0:u.data:{},d.error&&(f=d.error_description?": ".concat(d.error_description):"",h.message="".concat(d.error).concat(f)),h;case 4:return g.a(2)}},e,this,[[1,3]])},"_callee6"))),oS.apply(this,arguments)}a(oS,"_requestToken2")});var sS=z(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.JWTAccess=void 0;var UV=QE(),MV=sn(),x$={alg:"RS256",typ:"JWT"},aS=class e{static{a(this,"JWTAccess")}email;key;keyId;projectId;eagerRefreshThresholdMillis;cache=new MV.LRUCache({capacity:500,maxAge:3600*1e3});constructor(t,n,o,r){this.email=t,this.key=n,this.keyId=o,this.eagerRefreshThresholdMillis=r??300*1e3}getCachedKey(t,n){let o=t;if(n&&Array.isArray(n)&&n.length?o=t?`${t}_${n.join("_")}`:`${n.join("_")}`:typeof n=="string"&&(o=t?`${t}_${n}`:n),!o)throw Error("Scopes or url must be provided");return o}getRequestHeaders(t,n,o){let r=this.getCachedKey(t,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),d=e.getExpirationTime(u),f;if(Array.isArray(o)&&(o=o.join(" ")),o?f={iss:this.email,sub:this.email,scope:o,exp:d,iat:u}:f={iss:this.email,sub:this.email,aud:t,exp:d,iat:u},n){for(let y in f)if(n[y])throw new Error(`The '${y}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let h=this.keyId?{...x$,kid:this.keyId}:x$,g=Object.assign(f,n),m=UV.sign({header:h,payload:g,secret:this.key}),p=new Headers({authorization:`Bearer ${m}`});return this.cache.set(r,{expiration:d*1e3,headers:p}),p}static getExpirationTime(t){return t+3600}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!t.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!t.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=t.client_email,this.key=t.private_key,this.keyId=t.private_key_id,this.projectId=t.project_id}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}fromStreamAsync(t){return new Promise((n,o)=>{t||o(new Error("Must pass in a stream containing the service account auth settings."));let r="";t.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)}})})}};_m.JWTAccess=aS});var uS=z(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.JWT=void 0;var A$=w$(),LV=sS(),jV=xi(),bm=xr(),cS=class e extends jV.OAuth2Client{static{a(this,"JWT")}email;keyFile;key;keyId;defaultScopes;scopes;scope;subject;gtoken;additionalClaims;useJWTAccessWithScope;defaultServicePath;access;constructor(t={}){super(t),this.email=t.email,this.keyFile=t.keyFile,this.key=t.key,this.keyId=t.keyId,this.scopes=t.scopes,this.subject=t.subject,this.additionalClaims=t.additionalClaims,this.credentials={refresh_token:"jwt-placeholder",expiry_date:1}}createScoped(t){let n=new e(this);return n.scopes=t,n}async getRequestMetadataAsync(t){t=this.defaultServicePath?`https://${this.defaultServicePath}/`:t;let n=!this.hasUserScopes()&&t||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==bm.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==bm.DEFAULT_UNIVERSE)throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${bm.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 LV.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let o;this.hasUserScopes()?o=this.scopes:t||(o=this.defaultScopes);let r=this.useJWTAccessWithScope||this.universeDomain!==bm.DEFAULT_UNIVERSE,i=await this.access.getRequestHeaders(t??void 0,this.additionalClaims,r?o:void 0);return{headers:this.addSharedMetadataHeaders(i)}}else return this.hasAnyScopes()||this.apiKey?super.getRequestMetadataAsync(t):{headers:new Headers}}async fetchIdToken(t){let n=new A$.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:t},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(t){if(t)this.authorizeAsync().then(n=>t(null,n),t);else return this.authorizeAsync()}async authorizeAsync(){let t=await this.refreshToken();if(!t)throw new Error("No result returned");return this.credentials=t.tokens,this.credentials.refresh_token="jwt-placeholder",this.key=this.gtoken.key,this.email=this.gtoken.iss,t.tokens}async refreshTokenNoCache(){let t=this.createGToken(),o={access_token:(await t.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:"Bearer",expiry_date:t.expiresAt,id_token:t.idToken};return this.emit("tokens",o),{res:null,tokens:o}}createGToken(){return this.gtoken||(this.gtoken=new A$.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(t){if(!t)throw new Error("Must pass in a JSON object containing the service account auth settings.");if(!t.client_email)throw new Error("The incoming JSON object does not contain a client_email field");if(!t.private_key)throw new Error("The incoming JSON object does not contain a private_key field");this.email=t.client_email,this.key=t.private_key,this.keyId=t.private_key_id,this.projectId=t.project_id,this.quotaProjectId=t.quota_project_id,this.universeDomain=t.universe_domain||this.universeDomain}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}fromStreamAsync(t){return new Promise((n,o)=>{if(!t)throw new Error("Must pass in a stream containing the service account auth settings.");let r="";t.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(t){if(typeof t!="string")throw new Error("Must provide an API Key string.");this.apiKey=t}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.")}};Em.JWT=cS});var dS=z(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.UserRefreshClient=Ja.USER_REFRESH_ACCOUNT_TYPE=void 0;var FV=xi(),BV=xr();Ja.USER_REFRESH_ACCOUNT_TYPE="authorized_user";var lS=class e extends FV.OAuth2Client{static{a(this,"UserRefreshClient")}_refreshToken;constructor(t,n,o,r,i){let s=t&&typeof t=="object"?t:{clientId:t,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(t){let n={...e.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:t})};return BV.AuthClient.setMethodName(n,"fetchIdToken"),(await this.transporter.request(n)).data.id_token}fromJSON(t){if(!t)throw new Error("Must pass in a JSON object containing the user refresh token");if(t.type!=="authorized_user")throw new Error('The incoming JSON object does not have the "authorized_user" type');if(!t.client_id)throw new Error("The incoming JSON object does not contain a client_id field");if(!t.client_secret)throw new Error("The incoming JSON object does not contain a client_secret field");if(!t.refresh_token)throw new Error("The incoming JSON object does not contain a refresh_token field");this._clientId=t.client_id,this._clientSecret=t.client_secret,this._refreshToken=t.refresh_token,this.credentials.refresh_token=t.refresh_token,this.quotaProjectId=t.quota_project_id,this.universeDomain=t.universe_domain||this.universeDomain}fromStream(t,n){if(n)this.fromStreamAsync(t).then(()=>n(),n);else return this.fromStreamAsync(t)}async fromStreamAsync(t){return new Promise((n,o)=>{if(!t)return o(new Error("Must pass in a stream containing the user refresh token."));let r="";t.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(t){let n=new e;return n.fromJSON(t),n}};Ja.UserRefreshClient=lS});var fS=z(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.Impersonated=Ya.IMPERSONATED_ACCOUNT_TYPE=void 0;var I$=xi(),qV=Pt(),VV=sn();Ya.IMPERSONATED_ACCOUNT_TYPE="impersonated_service_account";var pS=class e extends I$.OAuth2Client{static{a(this,"Impersonated")}sourceClient;targetPrincipal;targetScopes;delegates;lifetime;endpoint;constructor(t={}){if(super(t),this.credentials={expiry_date:1,refresh_token:"impersonated-placeholder"},this.sourceClient=t.sourceClient??new I$.OAuth2Client,this.targetPrincipal=t.targetPrincipal??"",this.delegates=t.delegates??[],this.targetScopes=t.targetScopes??[],this.lifetime=t.lifetime??3600,!!!(0,VV.originalOrCamelOptions)(t).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=t.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(t){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,o=`${this.endpoint}/v1/${n}:signBlob`,r={delegates:this.delegates,payload:Buffer.from(t).toString("base64")};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:o,data:r,method:"POST"})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let t="projects/-/serviceAccounts/"+this.targetPrincipal,n=`${this.endpoint}/v1/${t}:generateAccessToken`,o={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+"s"},r=await this.sourceClient.request({...e.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(t){if(!(t instanceof Error))throw t;let n=0,o="";throw t instanceof qV.GaxiosError&&(n=t?.response?.data?.error?.status,o=t?.response?.data?.error?.message),n&&o?(t.message=`${n}: unable to impersonate: ${o}`,t):(t.message=`unable to impersonate: ${t}`,t)}}async fetchIdToken(t,n){await this.sourceClient.getAccessToken();let o=`projects/-/serviceAccounts/${this.targetPrincipal}`,r=`${this.endpoint}/v1/${o}:generateIdToken`,i={delegates:this.delegates,audience:t,includeEmail:n?.includeEmail??!0,useEmailAzp:n?.includeEmail??!0};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:r,data:i,method:"POST"})).data.token}};Ya.Impersonated=pS});var hS=z(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.OAuthClientAuthHandler=void 0;Mu.getErrorFromOAuthErrorResponse=ZV;var Xa=Pt(),GV=Iu(),HV=["PUT","POST","PATCH"],mS=class{static{a(this,"OAuthClientAuthHandler")}#e=(0,GV.createCrypto)();#t;transporter;constructor(t){t&&"clientId"in t?(this.#t=t,this.transporter=new Xa.Gaxios):(this.#t=t?.clientAuthentication,this.transporter=t?.transporter||new Xa.Gaxios)}applyClientAuthenticationOptions(t,n){t.headers=Xa.Gaxios.mergeHeaders(t.headers),this.injectAuthenticatedHeaders(t,n),n||this.injectAuthenticatedRequestBody(t)}injectAuthenticatedHeaders(t,n){if(n)t.headers=Xa.Gaxios.mergeHeaders(t.headers,{authorization:`Bearer ${n}`});else if(this.#t?.confidentialClientType==="basic"){t.headers=Xa.Gaxios.mergeHeaders(t.headers);let o=this.#t.clientId,r=this.#t.clientSecret||"",i=this.#e.encodeBase64StringUtf8(`${o}:${r}`);Xa.Gaxios.mergeHeaders(t.headers,{authorization:`Basic ${i}`})}}injectAuthenticatedRequestBody(t){if(this.#t?.confidentialClientType==="request-body"){let n=(t.method||"GET").toUpperCase();if(!HV.includes(n))throw new Error(`${n} HTTP method does not support ${this.#t.confidentialClientType} client authentication`);let r=new Headers(t.headers).get("content-type");if(r?.startsWith("application/x-www-form-urlencoded")||t.data instanceof URLSearchParams){let i=new URLSearchParams(t.data??"");i.append("client_id",this.#t.clientId),i.append("client_secret",this.#t.clientSecret||""),t.data=i}else if(r?.startsWith("application/json"))t.data=t.data||{},Object.assign(t.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"]}}}};Mu.OAuthClientAuthHandler=mS;function ZV(e,t){let n=e.error,o=e.error_description,r=e.error_uri,i=`Error code ${n}`;typeof o<"u"&&(i+=`: ${o}`),typeof r<"u"&&(i+=` - ${r}`);let s=new Error(i);if(t){let u=Object.keys(t);t.stack&&u.push("stack"),u.forEach(d=>{d!=="message"&&Object.defineProperty(s,d,{value:t[d],writable:!1,enumerable:!0})})}return s}a(ZV,"getErrorFromOAuthErrorResponse")});var Tm=z(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.StsCredentials=void 0;var WV=Pt(),KV=xr(),R$=hS(),JV=sn(),gS=class e extends R$.OAuthClientAuthHandler{static{a(this,"StsCredentials")}#e;constructor(t={tokenExchangeEndpoint:""},n){(typeof t!="object"||t instanceof URL)&&(t={tokenExchangeEndpoint:t,clientAuthentication:n}),super(t),this.#e=t.tokenExchangeEndpoint}async exchangeToken(t,n,o){let r={grant_type:t.grantType,resource:t.resource,audience:t.audience,scope:t.scope?.join(" "),requested_token_type:t.requestedTokenType,subject_token:t.subjectToken,subject_token_type:t.subjectTokenType,actor_token:t.actingParty?.actorToken,actor_token_type:t.actingParty?.actorTokenType,options:o&&JSON.stringify(o)},i={...e.RETRY_CONFIG,url:this.#e.toString(),method:"POST",headers:n,data:new URLSearchParams((0,JV.removeUndefinedValuesInObject)(r))};KV.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 WV.GaxiosError&&s.response?(0,R$.getErrorFromOAuthErrorResponse)(s.response.data,s):s}}};Sm.StsCredentials=gS});var Uo=z(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.BaseExternalAccountClient=Vr.CLOUD_RESOURCE_MANAGER=Vr.EXTERNAL_ACCOUNT_TYPE=Vr.EXPIRATION_TIME_OFFSET=void 0;var YV=Pt(),XV=require("stream"),yS=xr(),QV=Tm(),C$=sn(),eG=kE(),tG="urn:ietf:params:oauth:grant-type:token-exchange",rG="urn:ietf:params:oauth:token-type:access_token",vS="https://www.googleapis.com/auth/cloud-platform",nG=3600;Vr.EXPIRATION_TIME_OFFSET=300*1e3;Vr.EXTERNAL_ACCOUNT_TYPE="external_account";Vr.CLOUD_RESOURCE_MANAGER="https://cloudresourcemanager.googleapis.com/v1/projects/";var oG="//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+",iG="https://sts.{universeDomain}/v1/token",_S=class e extends yS.AuthClient{static{a(this,"BaseExternalAccountClient")}scopes;projectNumber;audience;subjectTokenType;stsCredential;clientAuth;credentialSourceType;cachedAccessToken;serviceAccountImpersonationUrl;serviceAccountImpersonationLifetime;workforcePoolUserProject;configLifetimeRequested;tokenUrl;cloudResourceManagerURL;supplierContext;#e=null;constructor(t){super(t);let n=(0,C$.originalOrCamelOptions)(t),o=n.get("type");if(o&&o!==Vr.EXTERNAL_ACCOUNT_TYPE)throw new Error(`Expected "${Vr.EXTERNAL_ACCOUNT_TYPE}" type but received "${t.type}"`);let r=n.get("client_id"),i=n.get("client_secret");this.tokenUrl=n.get("token_url")??iG.replace("{universeDomain}",this.universeDomain);let s=n.get("subject_token_type"),u=n.get("workforce_pool_user_project"),d=n.get("service_account_impersonation_url"),f=n.get("service_account_impersonation"),h=(0,C$.originalOrCamelOptions)(f).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 QV.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get("scopes")||[vS],this.cachedAccessToken=null,this.audience=n.get("audience"),this.subjectTokenType=s,this.workforcePoolUserProject=u;let g=new RegExp(oG);if(this.workforcePoolUserProject&&!this.audience.match(g))throw new Error("workforcePoolUserProject should not be set for non-workforce pool credentials.");this.serviceAccountImpersonationUrl=d,this.serviceAccountImpersonationLifetime=h,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=nG),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(t){super.setCredentials(t),this.cachedAccessToken=t}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async getProjectId(){let t=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(t){let n=await this.getRequestHeaders(),o={...e.RETRY_CONFIG,headers:n,url:`${this.cloudResourceManagerURL.toString()}${t}`};yS.AuthClient.setMethodName(o,"getProjectId");let r=await this.transporter.request(o);return this.projectId=r.data.projectId,this.projectId}return null}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=YV.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof XV.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!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 t=await this.retrieveSubjectToken(),n={grantType:tG,audience:this.audience,requestedTokenType:rG,subjectToken:t,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[vS]: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(t){let n=t.match(/\/projects\/([^/]+)/);return n?n[1]:null}async getImpersonatedAccessToken(t){let n={...e.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${t}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+"s"}};yS.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(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes=="string"?[this.scopes]:this.scopes||[vS]}getMetricsHeaderValue(){let t=process.version.replace(/^v/,""),n=this.serviceAccountImpersonationUrl!==void 0,o=this.credentialSourceType?this.credentialSourceType:"unknown";return`gl-node/${t} auth/${eG.pkg.version} google-byoid-sdk source/${o} sa-impersonation/${n} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};Vr.BaseExternalAccountClient=_S});var O$=z(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.FileSubjectTokenSupplier=void 0;var ES=require("util"),SS=require("fs"),aG=(0,ES.promisify)(SS.readFile??(()=>{})),sG=(0,ES.promisify)(SS.realpath??(()=>{})),cG=(0,ES.promisify)(SS.lstat??(()=>{})),bS=class{static{a(this,"FileSubjectTokenSupplier")}filePath;formatType;subjectTokenFieldName;constructor(t){this.filePath=t.filePath,this.formatType=t.formatType,this.subjectTokenFieldName=t.subjectTokenFieldName}async getSubjectToken(){let t=this.filePath;try{if(t=await sG(t),!(await cG(t)).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${t} does not exist, or it is not a file. ${r.message}`),r}let n,o=await aG(t,{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}};Pm.FileSubjectTokenSupplier=bS});var k$=z(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.UrlSubjectTokenSupplier=void 0;var uG=xr(),TS=class{static{a(this,"UrlSubjectTokenSupplier")}url;headers;formatType;subjectTokenFieldName;additionalGaxiosOptions;constructor(t){this.url=t.url,this.formatType=t.formatType,this.subjectTokenFieldName=t.subjectTokenFieldName,this.headers=t.headers,this.additionalGaxiosOptions=t.additionalGaxiosOptions}async getSubjectToken(t){let n={...this.additionalGaxiosOptions,url:this.url,method:"GET",headers:this.headers};uG.AuthClient.setMethodName(n,"getSubjectToken");let o;if(this.formatType==="text"?o=(await t.transporter.request(n)).data:this.formatType==="json"&&this.subjectTokenFieldName&&(o=(await t.transporter.request(n)).data[this.subjectTokenFieldName]),!o)throw new Error("Unable to parse the subject_token from the credential_source URL");return o}};wm.UrlSubjectTokenSupplier=TS});var $$=z(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.CertificateSubjectTokenSupplier=Cr.InvalidConfigurationError=Cr.CertificateSourceUnavailableError=Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var xm=sn(),Am=require("fs"),Im=require("crypto"),lG=require("https");Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE="GOOGLE_API_CERTIFICATE_CONFIG";var Tn=class extends Error{static{a(this,"CertificateSourceUnavailableError")}constructor(t){super(t),this.name="CertificateSourceUnavailableError"}};Cr.CertificateSourceUnavailableError=Tn;var Gr=class extends Error{static{a(this,"InvalidConfigurationError")}constructor(t){super(t),this.name="InvalidConfigurationError"}};Cr.InvalidConfigurationError=Gr;var PS=class{static{a(this,"CertificateSubjectTokenSupplier")}certificateConfigPath;trustChainPath;cert;key;constructor(t){if(!t.useDefaultCertificateConfig&&!t.certificateConfigLocation)throw new Gr("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(t.useDefaultCertificateConfig&&t.certificateConfigLocation)throw new Gr("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=t.trustChainPath,this.certificateConfigPath=t.certificateConfigLocation??""}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new Gr("Cannot create mTLS Agent with missing certificate or key");return new lG.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await this.#e();let{certPath:t,keyPath:n}=await this.#t();return{cert:this.cert,key:this.key}=await this.#r(t,n),await this.#n(this.cert)}async#e(){let t=this.certificateConfigPath;if(t){if(await(0,xm.isValidFile)(t))return t;throw new Tn(`Provided certificate config path is invalid: ${t}`)}let n=process.env[Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(n){if(await(0,xm.isValidFile)(n))return n;throw new Tn(`Path from environment variable "${Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${n}`)}let o=(0,xm.getWellKnownCertificateConfigFileLocation)();if(await(0,xm.isValidFile)(o))return o;throw new Tn(`Could not find certificate configuration file. Searched override path, the "${Cr.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${o}).`)}async#t(){let t=this.certificateConfigPath,n;try{n=await Am.promises.readFile(t,"utf8")}catch{throw new Tn(`Failed to read certificate config file at: ${t}`)}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 Gr(`Certificate config file (${t}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:r,keyPath:i}}catch(o){throw o instanceof Gr?o:new Gr(`Failed to parse certificate config from ${t}: ${o.message}`)}}async#r(t,n){let o,r;try{o=await Am.promises.readFile(t),new Im.X509Certificate(o)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read certificate file at ${t}: ${s}`)}try{r=await Am.promises.readFile(n),(0,Im.createPrivateKey)(r)}catch(i){let s=i instanceof Error?i.message:String(i);throw new Tn(`Failed to read private key file at ${n}: ${s}`)}return{cert:o,key:r}}async#n(t){let n=new Im.X509Certificate(t);if(!this.trustChainPath)return JSON.stringify([n.raw.toString("base64")]);try{let i=((await Am.promises.readFile(this.trustChainPath,"utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((d,f)=>{try{return new Im.X509Certificate(d)}catch(h){let g=h instanceof Error?h.message:String(h);throw new Gr(`Failed to parse certificate at index ${f} in trust chain file ${this.trustChainPath}: ${g}`)}}),s=i.findIndex(d=>n.raw.equals(d.raw)),u;if(s===-1)u=[n,...i];else if(s===0)u=i;else throw new Gr(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${s}).`);return JSON.stringify(u.map(d=>d.raw.toString("base64")))}catch(o){if(o instanceof Gr)throw o;let r=o instanceof Error?o.message:String(o);throw new Tn(`Failed to process certificate chain from ${this.trustChainPath}: ${r}`)}}};Cr.CertificateSubjectTokenSupplier=PS});var AS=z(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.IdentityPoolClient=void 0;var dG=Uo(),wS=sn(),pG=O$(),fG=k$(),D$=$$(),mG=Tm(),N$=Pt(),xS=class e extends dG.BaseExternalAccountClient{static{a(this,"IdentityPoolClient")}subjectTokenSupplier;constructor(t){super(t);let n=(0,wS.originalOrCamelOptions)(t),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,wS.originalOrCamelOptions)(o),s=(0,wS.originalOrCamelOptions)(i.get("format")),u=s.get("type")||"text",d=s.get("subject_token_field_name");if(u!=="json"&&u!=="text")throw new Error(`Invalid credential_source format "${u}"`);if(u==="json"&&!d)throw new Error("Missing subject_token_field_name for JSON credential_source format");let f=i.get("file"),h=i.get("url"),g=i.get("certificate"),m=i.get("headers");if(f&&h||h&&g||f&&g)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 pG.FileSubjectTokenSupplier({filePath:f,formatType:u,subjectTokenFieldName:d});else if(h)this.credentialSourceType="url",this.subjectTokenSupplier=new fG.UrlSubjectTokenSupplier({url:h,formatType:u,subjectTokenFieldName:d,headers:m,additionalGaxiosOptions:e.RETRY_CONFIG});else if(g){this.credentialSourceType="certificate";let p=new D$.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:g.use_default_certificate_config,certificateConfigLocation:g.certificate_config_location,trustChainPath:g.trust_chain_path});this.subjectTokenSupplier=p}else throw new Error('No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.')}}async retrieveSubjectToken(){let t=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof D$.CertificateSubjectTokenSupplier){let n=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new mG.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new N$.Gaxios({agent:n})}),this.transporter=new N$.Gaxios({...this.transporter.defaults||{},agent:n})}return t}};Rm.IdentityPoolClient=xS});var RS=z(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.AwsRequestSigner=void 0;var Cm=Pt(),U$=Iu(),z$="AWS4-HMAC-SHA256",hG="aws4_request",IS=class{static{a(this,"AwsRequestSigner")}getCredentials;region;crypto;constructor(t,n){this.getCredentials=t,this.region=n,this.crypto=(0,U$.createCrypto)()}async getRequestOptions(t){if(!t.url)throw new RangeError('"url" is required in "amzOptions"');let n=typeof t.data=="object"?JSON.stringify(t.data):t.data,o=t.url,r=t.method||"GET",i=t.body||n,s=t.headers,u=await this.getCredentials(),d=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 f=await yG({crypto:this.crypto,host:d.host,canonicalUri:d.pathname,canonicalQuerystring:d.search.slice(1),method:r,region:this.region,securityCredentials:u,requestPayload:i,additionalAmzHeaders:s}),h=Cm.Gaxios.mergeHeaders(f.amzDate?{"x-amz-date":f.amzDate}:{},{authorization:f.authorizationHeader,host:d.host},s||{});u.token&&Cm.Gaxios.mergeHeaders(h,{"x-amz-security-token":u.token});let g={url:o,method:r,headers:h};return i!==void 0&&(g.body=i),g}};Om.AwsRequestSigner=IS;async function Lu(e,t,n){return await e.signWithHmacSha256(t,n)}a(Lu,"sign");async function gG(e,t,n,o,r){let i=await Lu(e,`AWS4${t}`,n),s=await Lu(e,i,o),u=await Lu(e,s,r);return await Lu(e,u,"aws4_request")}a(gG,"getSigningKey");async function yG(e){let t=Cm.Gaxios.mergeHeaders(e.additionalAmzHeaders),n=e.requestPayload||"",o=e.host.split(".")[0],r=new Date,i=r.toISOString().replace(/[-:]/g,"").replace(/\.[0-9]+/,""),s=r.toISOString().replace(/[-]/g,"").replace(/T.*/,"");e.securityCredentials.token&&t.set("x-amz-security-token",e.securityCredentials.token);let u=Cm.Gaxios.mergeHeaders({host:e.host},t.has("date")?{}:{"x-amz-date":i},t),d="",f=[...u.keys()].sort();f.forEach(k=>{d+=`${k}:${u.get(k)}
41
+ `});let h=f.join(";"),g=await e.crypto.sha256DigestHex(n),m=`${e.method.toUpperCase()}
42
+ ${e.canonicalUri}
43
+ ${e.canonicalQuerystring}
44
+ ${d}
45
+ ${h}
46
+ ${g}`,p=`${s}/${e.region}/${o}/${hG}`,y=`${z$}
47
+ ${i}
44
48
  ${p}
45
- ${y}
46
- ${m}`,l=`${u}/${t.region}/${n}/${oU}`,g=`${kw}
47
- ${s}
48
- ${l}
49
- `+await t.crypto.sha256DigestHex(f),v=await iU(t.crypto,t.securityCredentials.secretAccessKey,u,t.region,n),E=await La(t.crypto,v,g),b=`${kw} Credential=${t.securityCredentials.accessKeyId}/${l}, SignedHeaders=${y}, Signature=${(0,$w.fromArrayBufferToHex)(E)}`;return{amzDate:e.has("date")?void 0:s,authorizationHeader:b,canonicalQuerystring:t.canonicalQuerystring}}o(aU,"generateAuthenticationHeaderMap")});var Dw=D(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.DefaultAwsSecurityCredentialsSupplier=void 0;var hu=nr(),$f=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};hu.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 hu.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 hu.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 hu.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}};gu.DefaultAwsSecurityCredentialsSupplier=$f});var Nf=D(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.AwsClient=void 0;var sU=kf(),cU=Qn(),uU=Dw(),Nw=kr(),lU=ht(),Df=class t extends cU.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,Nw.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,Nw.originalOrCamelOptions)(n);this.environmentId=s.get("environment_id");let u=s.get("region_url"),d=s.get("url"),p=s.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new uU.DefaultAwsSecurityCredentialsSupplier({regionUrl:u,securityCredentialsUrl:d,imdsV2SessionTokenUrl:p}),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 sU.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 lU.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}))}};yu.AwsClient=Df});var jf=D(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.InvalidSubjectTokenError=vt.InvalidMessageFieldError=vt.InvalidCodeFieldError=vt.InvalidTokenTypeFieldError=vt.InvalidExpirationTimeFieldError=vt.InvalidSuccessFieldError=vt.InvalidVersionFieldError=vt.ExecutableResponseError=vt.ExecutableResponse=void 0;var vu="urn:ietf:params:oauth:token-type:saml2",zf="urn:ietf:params:oauth:token-type:id_token",Uf="urn:ietf:params:oauth:token-type:jwt",Mf=class{static{o(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(e){if(!e.version)throw new _u("Executable response must contain a 'version' field.");if(e.success===void 0)throw new bu("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!==vu&&this.tokenType!==zf&&this.tokenType!==Uf)throw new Eu(`Executable response must contain a 'token_type' field when successful and it must be one of ${zf}, ${Uf}, or ${vu}.`);if(this.tokenType===vu){if(!e.saml_response)throw new ja(`Executable response must contain a 'saml_response' field when token_type=${vu}.`);this.subjectToken=e.saml_response}else{if(!e.id_token)throw new ja(`Executable response must contain a 'id_token' field when token_type=${zf} or ${Uf}.`);this.subjectToken=e.id_token}}else{if(!e.code)throw new Su("Executable response must contain a 'code' field when unsuccessful.");if(!e.message)throw new Tu("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)}};vt.ExecutableResponse=Mf;var Jr=class extends Error{static{o(this,"ExecutableResponseError")}constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};vt.ExecutableResponseError=Jr;var _u=class extends Jr{static{o(this,"InvalidVersionFieldError")}};vt.InvalidVersionFieldError=_u;var bu=class extends Jr{static{o(this,"InvalidSuccessFieldError")}};vt.InvalidSuccessFieldError=bu;var Lf=class extends Jr{static{o(this,"InvalidExpirationTimeFieldError")}};vt.InvalidExpirationTimeFieldError=Lf;var Eu=class extends Jr{static{o(this,"InvalidTokenTypeFieldError")}};vt.InvalidTokenTypeFieldError=Eu;var Su=class extends Jr{static{o(this,"InvalidCodeFieldError")}};vt.InvalidCodeFieldError=Su;var Tu=class extends Jr{static{o(this,"InvalidMessageFieldError")}};vt.InvalidMessageFieldError=Tu;var ja=class extends Jr{static{o(this,"InvalidSubjectTokenError")}};vt.InvalidSubjectTokenError=ja});var Bf=D(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.PluggableAuthHandler=Ti.ExecutableError=void 0;var wo=jf(),dU=require("child_process"),Ff=require("fs"),wu=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)}};Ti.ExecutableError=wu;var qf=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=dU.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 u=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(u),d===0)try{let p=JSON.parse(s),h=new wo.ExecutableResponse(p);return r(h)}catch(p){return p instanceof wo.ExecutableResponseError?n(p):n(new wo.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}else return n(new wu(s,d.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let e;try{e=await Ff.promises.realpath(this.outputFile)}catch{return}if(!(await Ff.promises.lstat(e)).isFile())return;let r=await Ff.promises.readFile(e,{encoding:"utf8"});if(r!=="")try{let n=JSON.parse(r);return new wo.ExecutableResponse(n).isValid()?new wo.ExecutableResponse(n):void 0}catch(n){throw n instanceof wo.ExecutableResponseError?n:new wo.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}};Ti.PluggableAuthHandler=qf});var Gf=D(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.PluggableAuthClient=wi.ExecutableError=void 0;var pU=Qn(),fU=jf(),zw=Bf(),mU=Bf();Object.defineProperty(wi,"ExecutableError",{enumerable:!0,get:o(function(){return mU.ExecutableError},"get")});var hU=30*1e3,Uw=5*1e3,Mw=120*1e3,gU="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",Lw=1,Vf=class extends pU.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=hU;else if(this.timeoutMillis=e.credential_source.executable.timeout_millis,this.timeoutMillis<Uw||this.timeoutMillis>Mw)throw new Error(`Timeout must be between ${Uw} and ${Mw} milliseconds.`);this.outputFile=e.credential_source.executable.output_file,this.handler=new zw.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[gU]!=="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>Lw)throw new Error(`Version of executable is not currently supported, maximum supported version is ${Lw}.`);if(!e.success)throw new zw.ExecutableError(e.errorMessage,e.errorCode);if(this.outputFile&&!e.expirationTime)throw new fU.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}};wi.PluggableAuthClient=Vf});var Wf=D(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.ExternalAccountClient=void 0;var yU=Qn(),vU=Cf(),_U=Nf(),bU=Gf(),Hf=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===yU.EXTERNAL_ACCOUNT_TYPE?e.credential_source?.environment_id?new _U.AwsClient(e):e.credential_source?.executable?new bU.PluggableAuthClient(e):new vU.IdentityPoolClient(e):null}};Pu.ExternalAccountClient=Hf});var Jf=D(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.ExternalAccountAuthorizedUserClient=Pi.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var Fw=nr(),jw=vf(),qw=ht(),EU=require("stream"),SU=Qn();Pi.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var TU="https://sts.{universeDomain}/v1/oauthtoken",Zf=class t extends jw.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})};Fw.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 qw.GaxiosError&&i.response?(0,jw.getErrorFromOAuthErrorResponse)(i.response.data,i):i}}},Kf=class extends Fw.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 Zf({tokenRefreshEndpoint:e.token_url??TU.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:r}),this.cachedAccessToken=null,this.quotaProjectId=e.quota_project_id,typeof e?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=SU.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=qw.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let u=s.status,d=s.config.data instanceof EU.Readable;if(!r&&(u===401||u===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}};Pi.ExternalAccountAuthorizedUserClient=Kf});var Hw=D(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.GoogleAuth=zr.GoogleAuthExceptionMessages=void 0;var wU=require("child_process"),Fa=require("fs"),PU=ht(),qa=Aa(),xU=require("os"),Yf=require("path"),AU=Ia(),IU=Bp(),RU=Gp(),CU=Hp(),xi=pf(),Bw=mf(),Ai=gf(),OU=Wf(),Ba=Qn(),Xf=nr(),Vw=Jf(),Gw=kr();zr.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.
49
+ `+await e.crypto.sha256DigestHex(m),v=await gG(e.crypto,e.securityCredentials.secretAccessKey,s,e.region,o),E=await Lu(e.crypto,v,y),b=`${z$} Credential=${e.securityCredentials.accessKeyId}/${p}, SignedHeaders=${h}, Signature=${(0,U$.fromArrayBufferToHex)(E)}`;return{amzDate:t.has("date")?void 0:i,authorizationHeader:b,canonicalQuerystring:e.canonicalQuerystring}}a(yG,"generateAuthenticationHeaderMap")});var M$=z($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.DefaultAwsSecurityCredentialsSupplier=void 0;var km=xr(),CS=class{static{a(this,"DefaultAwsSecurityCredentialsSupplier")}regionUrl;securityCredentialsUrl;imdsV2SessionTokenUrl;additionalGaxiosOptions;constructor(t){this.regionUrl=t.regionUrl,this.securityCredentialsUrl=t.securityCredentialsUrl,this.imdsV2SessionTokenUrl=t.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=t.additionalGaxiosOptions}async getAwsRegion(t){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(t.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};km.AuthClient.setMethodName(o,"getAwsRegion");let r=await t.transporter.request(o);return r.data.substr(0,r.data.length-1)}async getAwsSecurityCredentials(t){if(this.#o)return this.#o;let n=new Headers;this.imdsV2SessionTokenUrl&&n.set("x-aws-ec2-metadata-token",await this.#e(t.transporter));let o=await this.#t(n,t.transporter),r=await this.#r(o,n,t.transporter);return{accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,token:r.Token}}async#e(t){let n={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};return km.AuthClient.setMethodName(n,"#getImdsV2SessionToken"),(await t.request(n)).data}async#t(t,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:t};return km.AuthClient.setMethodName(o,"#getAwsRoleName"),(await n.request(o)).data}async#r(t,n,o){let r={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${t}`,headers:n};return km.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}};$m.DefaultAwsSecurityCredentialsSupplier=CS});var kS=z(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.AwsClient=void 0;var vG=RS(),_G=Uo(),bG=M$(),L$=sn(),EG=Pt(),OS=class e extends _G.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(t){super(t);let n=(0,L$.originalOrCamelOptions)(t),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=e.#e,this.credentialSourceType="programmatic";else{let i=(0,L$.originalOrCamelOptions)(o);this.environmentId=i.get("environment_id");let s=i.get("region_url"),u=i.get("url"),d=i.get("imdsv2_session_token_url");this.awsSecurityCredentialsSupplier=new bG.DefaultAwsSecurityCredentialsSupplier({regionUrl:s,securityCredentialsUrl:u,imdsV2SessionTokenUrl:d}),this.regionalCredVerificationUrl=i.get("regional_cred_verification_url"),this.credentialSourceType="aws",this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=""}validateEnvironmentId(){let t=this.environmentId?.match(/^(aws)(\d+)$/);if(!t||!this.regionalCredVerificationUrl)throw new Error('No valid AWS "credential_source" provided');if(parseInt(t[2],10)!==1)throw new Error(`aws version "${t[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new vG.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let t=await this.awsRequestSigner.getRequestOptions({...e.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"}),n=[];return EG.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},t.headers).forEach((r,i)=>n.push({key:i,value:r})),encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:n}))}};Dm.AwsClient=OS});var US=z(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.InvalidSubjectTokenError=xt.InvalidMessageFieldError=xt.InvalidCodeFieldError=xt.InvalidTokenTypeFieldError=xt.InvalidExpirationTimeFieldError=xt.InvalidSuccessFieldError=xt.InvalidVersionFieldError=xt.ExecutableResponseError=xt.ExecutableResponse=void 0;var Nm="urn:ietf:params:oauth:token-type:saml2",$S="urn:ietf:params:oauth:token-type:id_token",DS="urn:ietf:params:oauth:token-type:jwt",NS=class{static{a(this,"ExecutableResponse")}version;success;expirationTime;tokenType;errorCode;errorMessage;subjectToken;constructor(t){if(!t.version)throw new zm("Executable response must contain a 'version' field.");if(t.success===void 0)throw new Um("Executable response must contain a 'success' field.");if(this.version=t.version,this.success=t.success,this.success){if(this.expirationTime=t.expiration_time,this.tokenType=t.token_type,this.tokenType!==Nm&&this.tokenType!==$S&&this.tokenType!==DS)throw new Mm(`Executable response must contain a 'token_type' field when successful and it must be one of ${$S}, ${DS}, or ${Nm}.`);if(this.tokenType===Nm){if(!t.saml_response)throw new ju(`Executable response must contain a 'saml_response' field when token_type=${Nm}.`);this.subjectToken=t.saml_response}else{if(!t.id_token)throw new ju(`Executable response must contain a 'id_token' field when token_type=${$S} or ${DS}.`);this.subjectToken=t.id_token}}else{if(!t.code)throw new Lm("Executable response must contain a 'code' field when unsuccessful.");if(!t.message)throw new jm("Executable response must contain a 'message' field when unsuccessful.");this.errorCode=t.code,this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};xt.ExecutableResponse=NS;var Pn=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}};xt.ExecutableResponseError=Pn;var zm=class extends Pn{static{a(this,"InvalidVersionFieldError")}};xt.InvalidVersionFieldError=zm;var Um=class extends Pn{static{a(this,"InvalidSuccessFieldError")}};xt.InvalidSuccessFieldError=Um;var zS=class extends Pn{static{a(this,"InvalidExpirationTimeFieldError")}};xt.InvalidExpirationTimeFieldError=zS;var Mm=class extends Pn{static{a(this,"InvalidTokenTypeFieldError")}};xt.InvalidTokenTypeFieldError=Mm;var Lm=class extends Pn{static{a(this,"InvalidCodeFieldError")}};xt.InvalidCodeFieldError=Lm;var jm=class extends Pn{static{a(this,"InvalidMessageFieldError")}};xt.InvalidMessageFieldError=jm;var ju=class extends Pn{static{a(this,"InvalidSubjectTokenError")}};xt.InvalidSubjectTokenError=ju});var jS=z(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.PluggableAuthHandler=Qa.ExecutableError=void 0;var Ai=US(),SG=require("child_process"),MS=require("fs"),Fm=class extends Error{static{a(this,"ExecutableError")}code;constructor(t,n){super(`The executable failed with exit code: ${n} and error message: ${t}.`),this.code=n,Object.setPrototypeOf(this,new.target.prototype)}};Qa.ExecutableError=Fm;var LS=class e{static{a(this,"PluggableAuthHandler")}commandComponents;timeoutMillis;outputFile;constructor(t){if(!t.command)throw new Error("No command provided.");if(this.commandComponents=e.parseCommand(t.command),this.timeoutMillis=t.timeoutMillis,!this.timeoutMillis)throw new Error("No timeoutMillis provided.");this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((n,o)=>{let r=SG.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}}),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 d=JSON.parse(i),f=new Ai.ExecutableResponse(d);return n(f)}catch(d){return d instanceof Ai.ExecutableResponseError?o(d):o(new Ai.ExecutableResponseError(`The executable returned an invalid response: ${i}`))}else return o(new Fm(i,u.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let t;try{t=await MS.promises.realpath(this.outputFile)}catch{return}if(!(await MS.promises.lstat(t)).isFile())return;let n=await MS.promises.readFile(t,{encoding:"utf8"});if(n!=="")try{let o=JSON.parse(n);return new Ai.ExecutableResponse(o).isValid()?new Ai.ExecutableResponse(o):void 0}catch(o){throw o instanceof Ai.ExecutableResponseError?o:new Ai.ExecutableResponseError(`The output file contained an invalid response: ${n}`)}}static parseCommand(t){let n=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!n)throw new Error(`Provided command: "${t}" 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=LS});var BS=z(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.PluggableAuthClient=es.ExecutableError=void 0;var TG=Uo(),PG=US(),j$=jS(),wG=jS();Object.defineProperty(es,"ExecutableError",{enumerable:!0,get:a(function(){return wG.ExecutableError},"get")});var xG=30*1e3,F$=5*1e3,B$=120*1e3,AG="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES",q$=1,FS=class extends TG.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}command;timeoutMillis;outputFile;handler;constructor(t){if(super(t),!t.credential_source.executable)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(this.command=t.credential_source.executable.command,!this.command)throw new Error('No valid Pluggable Auth "credential_source" provided.');if(t.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=xG;else if(this.timeoutMillis=t.credential_source.executable.timeout_millis,this.timeoutMillis<F$||this.timeoutMillis>B$)throw new Error(`Timeout must be between ${F$} and ${B$} milliseconds.`);this.outputFile=t.credential_source.executable.output_file,this.handler=new j$.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType="executable"}async retrieveSubjectToken(){if(process.env[AG]!=="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 t;if(this.outputFile&&(t=await this.handler.retrieveCachedResponse()),!t){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),t=await this.handler.retrieveResponseFromExecutable(n)}if(t.version>q$)throw new Error(`Version of executable is not currently supported, maximum supported version is ${q$}.`);if(!t.success)throw new j$.ExecutableError(t.errorMessage,t.errorCode);if(this.outputFile&&!t.expirationTime)throw new PG.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(t.isExpired())throw new Error("Executable response is expired.");return t.subjectToken}};es.PluggableAuthClient=FS});var VS=z(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.ExternalAccountClient=void 0;var IG=Uo(),RG=AS(),CG=kS(),OG=BS(),qS=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(t){return t&&t.type===IG.EXTERNAL_ACCOUNT_TYPE?t.credential_source?.environment_id?new CG.AwsClient(t):t.credential_source?.executable?new OG.PluggableAuthClient(t):new RG.IdentityPoolClient(t):null}};Bm.ExternalAccountClient=qS});var ZS=z(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.ExternalAccountAuthorizedUserClient=ts.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var G$=xr(),V$=hS(),H$=Pt(),kG=require("stream"),$G=Uo();ts.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var DG="https://sts.{universeDomain}/v1/oauthtoken",GS=class e extends V$.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}#e;constructor(t){super(t),this.#e=t.tokenRefreshEndpoint}async refreshToken(t,n){let o={...e.RETRY_CONFIG,url:this.#e,method:"POST",headers:n,data:new URLSearchParams({grant_type:"refresh_token",refresh_token:t})};G$.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 H$.GaxiosError&&r.response?(0,V$.getErrorFromOAuthErrorResponse)(r.response.data,r):r}}},HS=class extends G$.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}cachedAccessToken;externalAccountAuthorizedUserHandler;refreshToken;constructor(t){super(t),t.universe_domain&&(this.universeDomain=t.universe_domain),this.refreshToken=t.refresh_token;let n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new GS({tokenRefreshEndpoint:t.token_url??DG.replace("{universeDomain}",this.universeDomain),transporter:this.transporter,clientAuthentication:n}),this.cachedAccessToken=null,this.quotaProjectId=t.quota_project_id,typeof t?.eagerRefreshThresholdMillis!="number"?this.eagerRefreshThresholdMillis=$G.EXPIRATION_TIME_OFFSET:this.eagerRefreshThresholdMillis=t.eagerRefreshThresholdMillis,this.forceRefreshOnFailure=!!t?.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 t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=H$.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof kG.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){let t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res},t.refresh_token!==void 0&&(this.refreshToken=t.refresh_token),this.cachedAccessToken}isExpired(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}};ts.ExternalAccountAuthorizedUserClient=HS});var J$=z(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.GoogleAuth=dn.GoogleAuthExceptionMessages=void 0;var NG=require("child_process"),Fu=require("fs"),zG=Pt(),Bu=Au(),UG=require("os"),WS=require("path"),MG=Iu(),LG=FE(),jG=qE(),FG=VE(),rs=uS(),Z$=dS(),ns=fS(),BG=VS(),qu=Uo(),KS=xr(),W$=ZS(),K$=sn();dn.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 Qf=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(zr.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===zr.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(zr.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 qa.universe("universe-domain"),e||=Xf.DEFAULT_UNIVERSE}catch(r){if(r&&r?.response?.status===404)e=Xf.DEFAULT_UNIVERSE;else throw r}return e}async getUniverseDomain(){let e=(0,Gw.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{e??=(await this.getClient()).universeDomain}catch{e??=Xf.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 xi.JWT?r.scopes=this.scopes:r instanceof Ba.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(r=await this._tryGetApplicationCredentialsFromWellKnownFile(e),r)return r instanceof xi.JWT?r.scopes=this.scopes:r instanceof Ba.BaseExternalAccountClient&&(r.scopes=this.getAnyScopes()),await this.#t(r);if(await this._checkIsGCE())return e.scopes=this.getAnyScopes(),await this.#t(new IU.Compute(e));throw new Error(zr.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=qa.getGCPResidency()||await qa.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=Yf.join(i,".config"))}return r&&(r=Yf.join(r,"gcloud","application_default_credentials.json"),Fa.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=Fa.realpathSync(e),!Fa.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=Fa.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!==Ai.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${Ai.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 Ai.Impersonated({...e,sourceClient:r,targetPrincipal:n,targetScopes:Array.isArray(i)?i:[i]})}fromJSON(e,r={}){let n,i=(0,Gw.originalOrCamelOptions)(r).get("universe_domain");return e.type===Bw.USER_REFRESH_ACCOUNT_TYPE?(n=new Bw.UserRefreshClient(r),n.fromJSON(e)):e.type===Ai.IMPERSONATED_ACCOUNT_TYPE?n=this.fromImpersonatedJSON(e):e.type===Ba.EXTERNAL_ACCOUNT_TYPE?(n=OU.ExternalAccountClient.fromJSON({...e,...r}),n.scopes=this.getAnyScopes()):e.type===Vw.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?n=new Vw.ExternalAccountAuthorizedUserClient({...e,...r}):(r.scopes=this.scopes,n=new xi.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",u=>s.push(u)).on("end",()=>{try{try{let u=JSON.parse(s.join("")),d=this._cacheClientFromJSON(u,r);return n(d)}catch(u){if(!this.keyFilename)throw u;let d=new xi.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=d,this.setGapicJWTValues(d),n(d)}}catch(u){return i(u)}})})}fromAPIKey(e,r={}){return new xi.JWT({...r,apiKey:e})}_isWindows(){let e=xU.platform();return!!(e&&e.length>=3&&e.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(e=>{(0,wU.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!==Ba.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await qa.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 Ai.Impersonated)return{client_email:e.getTargetPrincipal()};if(e instanceof Ba.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([qa.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:r,universe_domain:n}}throw new Error(zr.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=Yf.resolve(this.keyFilename),r=Fa.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 RU.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=PU.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,CU.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 Ai.Impersonated)return(await n.sign(e)).signedBlob;let s=(0,AU.createCrypto)();if(n instanceof xi.JWT&&n.key)return await s.sign(n.key,e);let u=await this.getCredentials();if(!u.client_email)throw new Error("Cannot sign data without `client_email`.");return this.signBlob(s,u.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}};zr.GoogleAuth=Qf});var Ww=D(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.IAMAuth=void 0;var em=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}}};xu.IAMAuth=em});var Zw=D(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.DownscopedClient=Yr.EXPIRATION_TIME_OFFSET=Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var kU=ht(),$U=require("stream"),tm=nr(),DU=au(),NU="urn:ietf:params:oauth:grant-type:token-exchange",zU="urn:ietf:params:oauth:token-type:access_token",UU="urn:ietf:params:oauth:token-type:access_token";Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;Yr.EXPIRATION_TIME_OFFSET=300*1e3;var rm=class extends tm.AuthClient{static{o(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(e,r={accessBoundary:{accessBoundaryRules:[]}}){if(super(e instanceof tm.AuthClient?{}:e),e instanceof tm.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>Yr.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${Yr.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 DU.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=kU.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,i),n=await this.transporter.request(e)}catch(i){let s=i.response;if(s){let u=s.status,d=s.config.data instanceof $U.Readable;if(!r&&(u===401||u===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:NU,requestedTokenType:zU,subjectToken:e,subjectTokenType:UU},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}};Yr.DownscopedClient=rm});var Kw=D(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.PassThroughClient=void 0;var MU=nr(),nm=class extends MU.AuthClient{static{o(this,"PassThroughClient")}async request(e){return this.transporter.request(e)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Au.PassThroughClient=nm});var Va=D(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.GoogleAuth=de.auth=de.PassThroughClient=de.ExternalAccountAuthorizedUserClient=de.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=de.ExecutableError=de.PluggableAuthClient=de.DownscopedClient=de.BaseExternalAccountClient=de.ExternalAccountClient=de.IdentityPoolClient=de.AwsRequestSigner=de.AwsClient=de.UserRefreshClient=de.LoginTicket=de.ClientAuthentication=de.OAuth2Client=de.CodeChallengeMethod=de.Impersonated=de.JWT=de.JWTAccess=de.IdTokenClient=de.IAMAuth=de.GCPEnv=de.Compute=de.DEFAULT_UNIVERSE=de.AuthClient=de.gaxios=de.gcpMetadata=void 0;var Jw=Hw();Object.defineProperty(de,"GoogleAuth",{enumerable:!0,get:o(function(){return Jw.GoogleAuth},"get")});de.gcpMetadata=Aa();de.gaxios=ht();var Yw=nr();Object.defineProperty(de,"AuthClient",{enumerable:!0,get:o(function(){return Yw.AuthClient},"get")});Object.defineProperty(de,"DEFAULT_UNIVERSE",{enumerable:!0,get:o(function(){return Yw.DEFAULT_UNIVERSE},"get")});var LU=Bp();Object.defineProperty(de,"Compute",{enumerable:!0,get:o(function(){return LU.Compute},"get")});var jU=Hp();Object.defineProperty(de,"GCPEnv",{enumerable:!0,get:o(function(){return jU.GCPEnv},"get")});var FU=Ww();Object.defineProperty(de,"IAMAuth",{enumerable:!0,get:o(function(){return FU.IAMAuth},"get")});var qU=Gp();Object.defineProperty(de,"IdTokenClient",{enumerable:!0,get:o(function(){return qU.IdTokenClient},"get")});var BU=lf();Object.defineProperty(de,"JWTAccess",{enumerable:!0,get:o(function(){return BU.JWTAccess},"get")});var VU=pf();Object.defineProperty(de,"JWT",{enumerable:!0,get:o(function(){return VU.JWT},"get")});var GU=gf();Object.defineProperty(de,"Impersonated",{enumerable:!0,get:o(function(){return GU.Impersonated},"get")});var om=To();Object.defineProperty(de,"CodeChallengeMethod",{enumerable:!0,get:o(function(){return om.CodeChallengeMethod},"get")});Object.defineProperty(de,"OAuth2Client",{enumerable:!0,get:o(function(){return om.OAuth2Client},"get")});Object.defineProperty(de,"ClientAuthentication",{enumerable:!0,get:o(function(){return om.ClientAuthentication},"get")});var HU=Lp();Object.defineProperty(de,"LoginTicket",{enumerable:!0,get:o(function(){return HU.LoginTicket},"get")});var WU=mf();Object.defineProperty(de,"UserRefreshClient",{enumerable:!0,get:o(function(){return WU.UserRefreshClient},"get")});var ZU=Nf();Object.defineProperty(de,"AwsClient",{enumerable:!0,get:o(function(){return ZU.AwsClient},"get")});var KU=kf();Object.defineProperty(de,"AwsRequestSigner",{enumerable:!0,get:o(function(){return KU.AwsRequestSigner},"get")});var JU=Cf();Object.defineProperty(de,"IdentityPoolClient",{enumerable:!0,get:o(function(){return JU.IdentityPoolClient},"get")});var YU=Wf();Object.defineProperty(de,"ExternalAccountClient",{enumerable:!0,get:o(function(){return YU.ExternalAccountClient},"get")});var XU=Qn();Object.defineProperty(de,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return XU.BaseExternalAccountClient},"get")});var QU=Zw();Object.defineProperty(de,"DownscopedClient",{enumerable:!0,get:o(function(){return QU.DownscopedClient},"get")});var Xw=Gf();Object.defineProperty(de,"PluggableAuthClient",{enumerable:!0,get:o(function(){return Xw.PluggableAuthClient},"get")});Object.defineProperty(de,"ExecutableError",{enumerable:!0,get:o(function(){return Xw.ExecutableError},"get")});var Qw=Jf();Object.defineProperty(de,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:o(function(){return Qw.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(de,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:o(function(){return Qw.ExternalAccountAuthorizedUserClient},"get")});var eM=Kw();Object.defineProperty(de,"PassThroughClient",{enumerable:!0,get:o(function(){return eM.PassThroughClient},"get")});var tM=new Jw.GoogleAuth;de.auth=tM});var Sn=D((am,sm)=>{(function(t,e){typeof am=="object"&&typeof sm<"u"?sm.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(am,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",s="minute",u="hour",d="day",p="week",h="month",y="quarter",m="year",f="date",l="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,E={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(re){var H=["th","st","nd","rd"],V=re%100;return"["+re+(H[(V-20)%10]||H[V]||H[0])+"]"},"ordinal")},b=o(function(re,H,V){var Q=String(re);return!Q||Q.length>=H?re:""+Array(H+1-Q.length).join(V)+re},"m"),C={s:b,z:o(function(re){var H=-re.utcOffset(),V=Math.abs(H),Q=Math.floor(V/60),K=V%60;return(H<=0?"+":"-")+b(Q,2,"0")+":"+b(K,2,"0")},"z"),m:o(function re(H,V){if(H.date()<V.date())return-re(V,H);var Q=12*(V.year()-H.year())+(V.month()-H.month()),K=H.clone().add(Q,h),ie=V-K<0,ce=H.clone().add(Q+(ie?-1:1),h);return+(-(Q+(V-K)/(ie?K-ce:ce-K))||0)},"t"),a:o(function(re){return re<0?Math.ceil(re)||0:Math.floor(re)},"a"),p:o(function(re){return{M:h,y:m,w:p,d,D:f,h:u,m:s,s:i,ms:n,Q:y}[re]||String(re||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(re){return re===void 0},"u")},U="en",Y={};Y[U]=E;var Z=o(function(re){return re instanceof J},"p"),G=o(function re(H,V,Q){var K;if(!H)return U;if(typeof H=="string"){var ie=H.toLowerCase();Y[ie]&&(K=ie),V&&(Y[ie]=V,K=ie);var ce=H.split("-");if(!K&&ce.length>1)return re(ce[0])}else{var ke=H.name;Y[ke]=H,K=ke}return!Q&&K&&(U=K),K||!Q&&U},"t"),X=o(function(re,H){if(Z(re))return re.clone();var V=typeof H=="object"?H:{};return V.date=re,V.args=arguments,new J(V)},"w"),te=C;te.l=G,te.i=Z,te.w=function(re,H){return X(re,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var J=(function(){function re(V){this.$L=G(V.locale,null,!0),this.parse(V)}o(re,"M");var H=re.prototype;return H.parse=function(V){this.$d=(function(Q){var K=Q.date,ie=Q.utc;if(K===null)return new Date(NaN);if(te.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var ce=K.match(g);if(ce){var ke=ce[2]-1||0,Ne=(ce[7]||"0").substring(0,3);return ie?new Date(Date.UTC(ce[1],ke,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,Ne)):new Date(ce[1],ke,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,Ne)}}return new Date(K)})(V),this.$x=V.x||{},this.init()},H.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},H.$utils=function(){return te},H.isValid=function(){return this.$d.toString()!==l},H.isSame=function(V,Q){var K=X(V);return this.startOf(Q)<=K&&K<=this.endOf(Q)},H.isAfter=function(V,Q){return X(V)<this.startOf(Q)},H.isBefore=function(V,Q){return this.endOf(Q)<X(V)},H.$g=function(V,Q,K){return te.u(V)?this[Q]:this.set(K,V)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(V,Q){var K=this,ie=!!te.u(Q)||Q,ce=te.p(V),ke=o(function(Ht,We){var Ye=te.w(K.$u?Date.UTC(K.$y,We,Ht):new Date(K.$y,We,Ht),K);return ie?Ye:Ye.endOf(d)},"l"),Ne=o(function(Ht,We){return te.w(K.toDate()[Ht].apply(K.toDate("s"),(ie?[0,0,0,0]:[23,59,59,999]).slice(We)),K)},"$"),Ke=this.$W,et=this.$M,Tt=this.$D,ee="set"+(this.$u?"UTC":"");switch(ce){case m:return ie?ke(1,0):ke(31,11);case h:return ie?ke(1,et):ke(0,et+1);case p:var dt=this.$locale().weekStart||0,mt=(Ke<dt?Ke+7:Ke)-dt;return ke(ie?Tt-mt:Tt+(6-mt),et);case d:case f:return Ne(ee+"Hours",0);case u:return Ne(ee+"Minutes",1);case s:return Ne(ee+"Seconds",2);case i:return Ne(ee+"Milliseconds",3);default:return this.clone()}},H.endOf=function(V){return this.startOf(V,!1)},H.$set=function(V,Q){var K,ie=te.p(V),ce="set"+(this.$u?"UTC":""),ke=(K={},K[d]=ce+"Date",K[f]=ce+"Date",K[h]=ce+"Month",K[m]=ce+"FullYear",K[u]=ce+"Hours",K[s]=ce+"Minutes",K[i]=ce+"Seconds",K[n]=ce+"Milliseconds",K)[ie],Ne=ie===d?this.$D+(Q-this.$W):Q;if(ie===h||ie===m){var Ke=this.clone().set(f,1);Ke.$d[ke](Ne),Ke.init(),this.$d=Ke.set(f,Math.min(this.$D,Ke.daysInMonth())).$d}else ke&&this.$d[ke](Ne);return this.init(),this},H.set=function(V,Q){return this.clone().$set(V,Q)},H.get=function(V){return this[te.p(V)]()},H.add=function(V,Q){var K,ie=this;V=Number(V);var ce=te.p(Q),ke=o(function(et){var Tt=X(ie);return te.w(Tt.date(Tt.date()+Math.round(et*V)),ie)},"y");if(ce===h)return this.set(h,this.$M+V);if(ce===m)return this.set(m,this.$y+V);if(ce===d)return ke(1);if(ce===p)return ke(7);var Ne=(K={},K[s]=e,K[u]=r,K[i]=t,K)[ce]||1,Ke=this.$d.getTime()+V*Ne;return te.w(Ke,this)},H.subtract=function(V,Q){return this.add(-1*V,Q)},H.format=function(V){var Q=this,K=this.$locale();if(!this.isValid())return K.invalidDate||l;var ie=V||"YYYY-MM-DDTHH:mm:ssZ",ce=te.z(this),ke=this.$H,Ne=this.$m,Ke=this.$M,et=K.weekdays,Tt=K.months,ee=K.meridiem,dt=o(function(We,Ye,T,P){return We&&(We[Ye]||We(Q,ie))||T[Ye].slice(0,P)},"h"),mt=o(function(We){return te.s(ke%12||12,We,"0")},"d"),Ht=ee||function(We,Ye,T){var P=We<12?"AM":"PM";return T?P.toLowerCase():P};return ie.replace(v,(function(We,Ye){return Ye||(function(T){switch(T){case"YY":return String(Q.$y).slice(-2);case"YYYY":return te.s(Q.$y,4,"0");case"M":return Ke+1;case"MM":return te.s(Ke+1,2,"0");case"MMM":return dt(K.monthsShort,Ke,Tt,3);case"MMMM":return dt(Tt,Ke);case"D":return Q.$D;case"DD":return te.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return dt(K.weekdaysMin,Q.$W,et,2);case"ddd":return dt(K.weekdaysShort,Q.$W,et,3);case"dddd":return et[Q.$W];case"H":return String(ke);case"HH":return te.s(ke,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return Ht(ke,Ne,!0);case"A":return Ht(ke,Ne,!1);case"m":return String(Ne);case"mm":return te.s(Ne,2,"0");case"s":return String(Q.$s);case"ss":return te.s(Q.$s,2,"0");case"SSS":return te.s(Q.$ms,3,"0");case"Z":return ce}return null})(We)||ce.replace(":","")}))},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(V,Q,K){var ie,ce=this,ke=te.p(Q),Ne=X(V),Ke=(Ne.utcOffset()-this.utcOffset())*e,et=this-Ne,Tt=o(function(){return te.m(ce,Ne)},"D");switch(ke){case m:ie=Tt()/12;break;case h:ie=Tt();break;case y:ie=Tt()/3;break;case p:ie=(et-Ke)/6048e5;break;case d:ie=(et-Ke)/864e5;break;case u:ie=et/r;break;case s:ie=et/e;break;case i:ie=et/t;break;default:ie=et}return K?ie:te.a(ie)},H.daysInMonth=function(){return this.endOf(h).$D},H.$locale=function(){return Y[this.$L]},H.locale=function(V,Q){if(!V)return this.$L;var K=this.clone(),ie=G(V,Q,!0);return ie&&(K.$L=ie),K},H.clone=function(){return te.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},re})(),De=J.prototype;return X.prototype=De,[["$ms",n],["$s",i],["$m",s],["$H",u],["$W",d],["$M",h],["$y",m],["$D",f]].forEach((function(re){De[re[1]]=function(H){return this.$g(H,re[0],re[1])}})),X.extend=function(re,H){return re.$i||(re(H,J,X),re.$i=!0),X},X.locale=G,X.isDayjs=Z,X.unix=function(re){return X(1e3*re)},X.en=Y[U],X.Ls=Y,X.p={},X}))});var eP=D(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.getAPI=rM;function rM(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],u=new s(e,n);return Object.freeze(u)}catch(s){throw new Error(`Unable to load endpoint ${t}("${i}"): ${s.message}`)}}o(rM,"getAPI")});var rP=D((QQ,tP)=>{tP.exports=require("util").inspect});var Ka=D((eee,SP)=>{var vm=typeof Map=="function"&&Map.prototype,um=Object.getOwnPropertyDescriptor&&vm?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Cu=vm&&um&&typeof um.get=="function"?um.get:null,nP=vm&&Map.prototype.forEach,_m=typeof Set=="function"&&Set.prototype,lm=Object.getOwnPropertyDescriptor&&_m?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ou=_m&&lm&&typeof lm.get=="function"?lm.get:null,oP=_m&&Set.prototype.forEach,nM=typeof WeakMap=="function"&&WeakMap.prototype,Ha=nM?WeakMap.prototype.has:null,oM=typeof WeakSet=="function"&&WeakSet.prototype,Wa=oM?WeakSet.prototype.has:null,iM=typeof WeakRef=="function"&&WeakRef.prototype,iP=iM?WeakRef.prototype.deref:null,aM=Boolean.prototype.valueOf,sM=Object.prototype.toString,cM=Function.prototype.toString,uM=String.prototype.match,bm=String.prototype.slice,eo=String.prototype.replace,lM=String.prototype.toUpperCase,aP=String.prototype.toLowerCase,hP=RegExp.prototype.test,sP=Array.prototype.concat,Xr=Array.prototype.join,dM=Array.prototype.slice,cP=Math.floor,fm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dm=Object.getOwnPropertySymbols,mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Za=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ii||!0)?Symbol.toStringTag:null,gP=Object.prototype.propertyIsEnumerable,uP=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function lP(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||hP.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-cP(-t):cP(t);if(n!==t){var i=String(n),s=bm.call(e,i.length+1);return eo.call(i,r,"$&_")+"."+eo.call(eo.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return eo.call(e,r,"$&_")}o(lP,"addNumericSeparator");var hm=rP(),dP=hm.custom,pP=_P(dP)?dP:null,yP={__proto__:null,double:'"',single:"'"},pM={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};SP.exports=o(function t(e,r,n,i){var s=r||{};if(Tn(s,"quoteStyle")&&!Tn(yP,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Tn(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 u=Tn(s,"customInspect")?s.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Tn(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(Tn(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 EP(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var p=String(e);return d?lP(e,p):p}if(typeof e=="bigint"){var h=String(e)+"n";return d?lP(e,h):h}var y=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=y&&y>0&&typeof e=="object")return gm(e)?"[Array]":"[Object]";var m=CM(s,n);if(typeof i>"u")i=[];else if(bP(i,e)>=0)return"[Circular]";function f(V,Q,K){if(Q&&(i=dM.call(i),i.push(Q)),K){var ie={depth:s.depth};return Tn(s,"quoteStyle")&&(ie.quoteStyle=s.quoteStyle),t(V,ie,n+1,i)}return t(V,s,n+1,i)}if(o(f,"inspect"),typeof e=="function"&&!fP(e)){var l=EM(e),g=Ru(e,f);return"[Function"+(l?": "+l:" (anonymous)")+"]"+(g.length>0?" { "+Xr.call(g,", ")+" }":"")}if(_P(e)){var v=Ii?eo.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):mm.call(e);return typeof e=="object"&&!Ii?Ga(v):v}if(AM(e)){for(var E="<"+aP.call(String(e.nodeName)),b=e.attributes||[],C=0;C<b.length;C++)E+=" "+b[C].name+"="+vP(fM(b[C].value),"double",s);return E+=">",e.childNodes&&e.childNodes.length&&(E+="..."),E+="</"+aP.call(String(e.nodeName))+">",E}if(gm(e)){if(e.length===0)return"[]";var U=Ru(e,f);return m&&!RM(U)?"["+ym(U,m)+"]":"[ "+Xr.call(U,", ")+" ]"}if(hM(e)){var Y=Ru(e,f);return!("cause"in Error.prototype)&&"cause"in e&&!gP.call(e,"cause")?"{ ["+String(e)+"] "+Xr.call(sP.call("[cause]: "+f(e.cause),Y),", ")+" }":Y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Xr.call(Y,", ")+" }"}if(typeof e=="object"&&u){if(pP&&typeof e[pP]=="function"&&hm)return hm(e,{depth:y-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(SM(e)){var Z=[];return nP&&nP.call(e,function(V,Q){Z.push(f(Q,e,!0)+" => "+f(V,e))}),mP("Map",Cu.call(e),Z,m)}if(PM(e)){var G=[];return oP&&oP.call(e,function(V){G.push(f(V,e))}),mP("Set",Ou.call(e),G,m)}if(TM(e))return pm("WeakMap");if(xM(e))return pm("WeakSet");if(wM(e))return pm("WeakRef");if(yM(e))return Ga(f(Number(e)));if(_M(e))return Ga(f(fm.call(e)));if(vM(e))return Ga(aM.call(e));if(gM(e))return Ga(f(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(!mM(e)&&!fP(e)){var X=Ru(e,f),te=uP?uP(e)===Object.prototype:e instanceof Object||e.constructor===Object,J=e instanceof Object?"":"null prototype",De=!te&&Za&&Object(e)===e&&Za in e?bm.call(to(e),8,-1):J?"Object":"",re=te||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",H=re+(De||J?"["+Xr.call(sP.call([],De||[],J||[]),": ")+"] ":"");return X.length===0?H+"{}":m?H+"{"+ym(X,m)+"}":H+"{ "+Xr.call(X,", ")+" }"}return String(e)},"inspect_");function vP(t,e,r){var n=r.quoteStyle||e,i=yP[n];return i+t+i}o(vP,"wrapQuotes");function fM(t){return eo.call(String(t),/"/g,"&quot;")}o(fM,"quote");function Po(t){return!Za||!(typeof t=="object"&&(Za in t||typeof t[Za]<"u"))}o(Po,"canTrustToString");function gm(t){return to(t)==="[object Array]"&&Po(t)}o(gm,"isArray");function mM(t){return to(t)==="[object Date]"&&Po(t)}o(mM,"isDate");function fP(t){return to(t)==="[object RegExp]"&&Po(t)}o(fP,"isRegExp");function hM(t){return to(t)==="[object Error]"&&Po(t)}o(hM,"isError");function gM(t){return to(t)==="[object String]"&&Po(t)}o(gM,"isString");function yM(t){return to(t)==="[object Number]"&&Po(t)}o(yM,"isNumber");function vM(t){return to(t)==="[object Boolean]"&&Po(t)}o(vM,"isBoolean");function _P(t){if(Ii)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!mm)return!1;try{return mm.call(t),!0}catch{}return!1}o(_P,"isSymbol");function _M(t){if(!t||typeof t!="object"||!fm)return!1;try{return fm.call(t),!0}catch{}return!1}o(_M,"isBigInt");var bM=Object.prototype.hasOwnProperty||function(t){return t in this};function Tn(t,e){return bM.call(t,e)}o(Tn,"has");function to(t){return sM.call(t)}o(to,"toStr");function EM(t){if(t.name)return t.name;var e=uM.call(cM.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}o(EM,"nameOf");function bP(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(bP,"indexOf");function SM(t){if(!Cu||!t||typeof t!="object")return!1;try{Cu.call(t);try{Ou.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}o(SM,"isMap");function TM(t){if(!Ha||!t||typeof t!="object")return!1;try{Ha.call(t,Ha);try{Wa.call(t,Wa)}catch{return!0}return t instanceof WeakMap}catch{}return!1}o(TM,"isWeakMap");function wM(t){if(!iP||!t||typeof t!="object")return!1;try{return iP.call(t),!0}catch{}return!1}o(wM,"isWeakRef");function PM(t){if(!Ou||!t||typeof t!="object")return!1;try{Ou.call(t);try{Cu.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}o(PM,"isSet");function xM(t){if(!Wa||!t||typeof t!="object")return!1;try{Wa.call(t,Wa);try{Ha.call(t,Ha)}catch{return!0}return t instanceof WeakSet}catch{}return!1}o(xM,"isWeakSet");function AM(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}o(AM,"isElement");function EP(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return EP(bm.call(t,0,e.maxStringLength),e)+n}var i=pM[e.quoteStyle||"single"];i.lastIndex=0;var s=eo.call(eo.call(t,i,"\\$1"),/[\x00-\x1f]/g,IM);return vP(s,"single",e)}o(EP,"inspectString");function IM(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":"")+lM.call(e.toString(16))}o(IM,"lowbyte");function Ga(t){return"Object("+t+")"}o(Ga,"markBoxed");function pm(t){return t+" { ? }"}o(pm,"weakCollectionOf");function mP(t,e,r,n){var i=n?ym(r,n):Xr.call(r,", ");return t+" ("+e+") {"+i+"}"}o(mP,"collectionOf");function RM(t){for(var e=0;e<t.length;e++)if(bP(t[e],`
56
- `)>=0)return!1;return!0}o(RM,"singleLineValues");function CM(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Xr.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Xr.call(Array(e+1),r)}}o(CM,"getIndent");function ym(t,e){if(t.length===0)return"";var r=`
57
- `+e.prev+e.base;return r+Xr.call(t,","+r)+`
58
- `+e.prev}o(ym,"indentedJoin");function Ru(t,e){var r=gm(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Tn(t,i)?e(t[i],t):""}var s=typeof dm=="function"?dm(t):[],u;if(Ii){u={};for(var d=0;d<s.length;d++)u["$"+s[d]]=s[d]}for(var p in t)Tn(t,p)&&(r&&String(Number(p))===p&&p<t.length||Ii&&u["$"+p]instanceof Symbol||(hP.call(/[^\w$]/,p)?n.push(e(p,t)+": "+e(t[p],t)):n.push(p+": "+e(t[p],t))));if(typeof dm=="function")for(var h=0;h<s.length;h++)gP.call(t,s[h])&&n.push("["+e(s[h])+"]: "+e(t[s[h]],t));return n}o(Ru,"arrObjKeys")});var wP=D((ree,TP)=>{"use strict";var OM=Ka(),kM=Vn(),ku=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"),$M=o(function(t,e){if(t){var r=ku(t,e);return r&&r.value}},"listGet"),DM=o(function(t,e,r){var n=ku(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},"listSet"),NM=o(function(t,e){return t?!!ku(t,e):!1},"listHas"),zM=o(function(t,e){if(t)return ku(t,e,!0)},"listDelete");TP.exports=o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new kM("Side channel does not contain "+OM(n))},"assert"),delete:o(function(n){var i=zM(e,n);return i&&e&&!e.next&&(e=void 0),!!i},"delete"),get:o(function(n){return $M(e,n)},"get"),has:o(function(n){return NM(e,n)},"has"),set:o(function(n,i){e||(e={next:void 0}),DM(e,n,i)},"set")};return r},"getSideChannelList")});var Em=D((oee,AP)=>{"use strict";var PP=da(),xP=Rd(),UM=xP([PP("%String.prototype.indexOf%")]);AP.exports=o(function(e,r){var n=PP(e,!!r);return typeof n=="function"&&UM(e,".prototype.")>-1?xP([n]):n},"callBoundIntrinsic")});var Sm=D((aee,RP)=>{"use strict";var MM=da(),Ja=Em(),LM=Ka(),jM=Vn(),IP=MM("%Map%",!0),FM=Ja("Map.prototype.get",!0),qM=Ja("Map.prototype.set",!0),BM=Ja("Map.prototype.has",!0),VM=Ja("Map.prototype.delete",!0),GM=Ja("Map.prototype.size",!0);RP.exports=!!IP&&o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new jM("Side channel does not contain "+LM(n))},"assert"),delete:o(function(n){if(e){var i=VM(e,n);return GM(e)===0&&(e=void 0),i}return!1},"delete"),get:o(function(n){if(e)return FM(e,n)},"get"),has:o(function(n){return e?BM(e,n):!1},"has"),set:o(function(n,i){e||(e=new IP),qM(e,n,i)},"set")};return r},"getSideChannelMap")});var OP=D((cee,CP)=>{"use strict";var HM=da(),Du=Em(),WM=Ka(),$u=Sm(),ZM=Vn(),Ri=HM("%WeakMap%",!0),KM=Du("WeakMap.prototype.get",!0),JM=Du("WeakMap.prototype.set",!0),YM=Du("WeakMap.prototype.has",!0),XM=Du("WeakMap.prototype.delete",!0);CP.exports=Ri?o(function(){var e,r,n={assert:o(function(i){if(!n.has(i))throw new ZM("Side channel does not contain "+WM(i))},"assert"),delete:o(function(i){if(Ri&&i&&(typeof i=="object"||typeof i=="function")){if(e)return XM(e,i)}else if($u&&r)return r.delete(i);return!1},"delete"),get:o(function(i){return Ri&&i&&(typeof i=="object"||typeof i=="function")&&e?KM(e,i):r&&r.get(i)},"get"),has:o(function(i){return Ri&&i&&(typeof i=="object"||typeof i=="function")&&e?YM(e,i):!!r&&r.has(i)},"has"),set:o(function(i,s){Ri&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Ri),JM(e,i,s)):$u&&(r||(r=$u()),r.set(i,s))},"set")};return n},"getSideChannelWeakMap"):$u});var Tm=D((lee,kP)=>{"use strict";var QM=Vn(),e1=Ka(),t1=wP(),r1=Sm(),n1=OP(),o1=n1||r1||t1;kP.exports=o(function(){var e,r={assert:o(function(n){if(!r.has(n))throw new QM("Side channel does not contain "+e1(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=o1()),e.set(n,i)},"set")};return r},"getSideChannel")});var Nu=D((pee,$P)=>{"use strict";var i1=String.prototype.replace,a1=/%20/g,wm={RFC1738:"RFC1738",RFC3986:"RFC3986"};$P.exports={default:wm.RFC3986,formatters:{RFC1738:o(function(t){return i1.call(t,a1,"+")},"RFC1738"),RFC3986:o(function(t){return String(t)},"RFC3986")},RFC1738:wm.RFC1738,RFC3986:wm.RFC3986}});var Im=D((mee,DP)=>{"use strict";var s1=Nu(),c1=Tm(),Pm=Object.prototype.hasOwnProperty,xo=Array.isArray,zu=c1(),Ci=o(function(e,r){return zu.set(e,r),e},"markOverflow"),Ao=o(function(e){return zu.has(e)},"isOverflow"),Ya=o(function(e){return zu.get(e)},"getMaxIndex"),Am=o(function(e,r){zu.set(e,r)},"setMaxIndex"),Qr=(function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t})(),u1=o(function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(xo(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"),Xa=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"),l1=o(function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(xo(e)){var i=e.length;if(n&&typeof n.arrayLimit=="number"&&i>n.arrayLimit)return Ci(Xa(e.concat(r),n),i);e[i]=r}else if(e&&typeof e=="object")if(Ao(e)){var s=Ya(e)+1;e[s]=r,Am(e,s)}else{if(n&&n.strictMerge)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Pm.call(Object.prototype,r))&&(e[r]=!0)}else return[e,r];return e}if(!e||typeof e!="object"){if(Ao(r)){for(var u=Object.keys(r),d=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},p=0;p<u.length;p++){var h=parseInt(u[p],10);d[h+1]=r[u[p]]}return Ci(d,Ya(r)+1)}var y=[e].concat(r);return n&&typeof n.arrayLimit=="number"&&y.length>n.arrayLimit?Ci(Xa(y,n),y.length-1):y}var m=e;return xo(e)&&!xo(r)&&(m=Xa(e,n)),xo(e)&&xo(r)?(r.forEach(function(f,l){if(Pm.call(e,l)){var g=e[l];g&&typeof g=="object"&&f&&typeof f=="object"?e[l]=t(g,f,n):e[e.length]=f}else e[l]=f}),e):Object.keys(r).reduce(function(f,l){var g=r[l];if(Pm.call(f,l)?f[l]=t(f[l],g,n):f[l]=g,Ao(r)&&!Ao(f)&&Ci(f,Ya(r)),Ao(f)){var v=parseInt(l,10);String(v)===l&&v>=0&&v>Ya(f)&&Am(f,v)}return f},m)},"merge"),d1=o(function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},"assignSingleSource"),p1=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"),xm=1024,f1=o(function(e,r,n,i,s){if(e.length===0)return e;var u=e;if(typeof e=="symbol"?u=Symbol.prototype.toString.call(e):typeof e!="string"&&(u=String(e)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var d="",p=0;p<u.length;p+=xm){for(var h=u.length>=xm?u.slice(p,p+xm):u,y=[],m=0;m<h.length;++m){var f=h.charCodeAt(m);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===s1.RFC1738&&(f===40||f===41)){y[y.length]=h.charAt(m);continue}if(f<128){y[y.length]=Qr[f];continue}if(f<2048){y[y.length]=Qr[192|f>>6]+Qr[128|f&63];continue}if(f<55296||f>=57344){y[y.length]=Qr[224|f>>12]+Qr[128|f>>6&63]+Qr[128|f&63];continue}m+=1,f=65536+((f&1023)<<10|h.charCodeAt(m)&1023),y[y.length]=Qr[240|f>>18]+Qr[128|f>>12&63]+Qr[128|f>>6&63]+Qr[128|f&63]}d+=y.join("")}return d},"encode"),m1=o(function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],u=s.obj[s.prop],d=Object.keys(u),p=0;p<d.length;++p){var h=d[p],y=u[h];typeof y=="object"&&y!==null&&n.indexOf(y)===-1&&(r[r.length]={obj:u,prop:h},n[n.length]=y)}return u1(r),e},"compact"),h1=o(function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},"isRegExp"),g1=o(function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},"isBuffer"),y1=o(function(e,r,n,i){if(Ao(e)){var s=Ya(e)+1;return e[s]=r,Am(e,s),e}var u=[].concat(e,r);return u.length>n?Ci(Xa(u,{plainObjects:i}),u.length-1):u},"combine"),v1=o(function(e,r){if(xo(e)){for(var n=[],i=0;i<e.length;i+=1)n[n.length]=r(e[i]);return n}return r(e)},"maybeMap");DP.exports={arrayToObject:Xa,assign:d1,combine:y1,compact:m1,decode:p1,encode:f1,isBuffer:g1,isOverflow:Ao,isRegExp:h1,markOverflow:Ci,maybeMap:v1,merge:l1}});var jP=D((gee,LP)=>{"use strict";var zP=Tm(),Uu=Im(),Qa=Nu(),_1=Object.prototype.hasOwnProperty,UP={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")},en=Array.isArray,b1=Array.prototype.push,MP=o(function(t,e){b1.apply(t,en(e)?e:[e])},"pushToArray"),E1=Date.prototype.toISOString,NP=Qa.default,St={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Uu.encode,encodeValuesOnly:!1,filter:void 0,format:NP,formatter:Qa.formatters[NP],indices:!1,serializeDate:o(function(e){return E1.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},S1=o(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),Rm={},T1=o(function t(e,r,n,i,s,u,d,p,h,y,m,f,l,g,v,E,b,C){for(var U=e,Y=C,Z=0,G=!1;(Y=Y.get(Rm))!==void 0&&!G;){var X=Y.get(e);if(Z+=1,typeof X<"u"){if(X===Z)throw new RangeError("Cyclic object value");G=!0}typeof Y.get(Rm)>"u"&&(Z=0)}if(typeof y=="function"?U=y(r,U):U instanceof Date?U=l(U):n==="comma"&&en(U)&&(U=Uu.maybeMap(U,function(Ke){return Ke instanceof Date?l(Ke):Ke})),U===null){if(u)return h&&!E?h(r,St.encoder,b,"key",g):r;U=""}if(S1(U)||Uu.isBuffer(U)){if(h){var te=E?r:h(r,St.encoder,b,"key",g);return[v(te)+"="+v(h(U,St.encoder,b,"value",g))]}return[v(r)+"="+v(String(U))]}var J=[];if(typeof U>"u")return J;var De;if(n==="comma"&&en(U))E&&h&&(U=Uu.maybeMap(U,h)),De=[{value:U.length>0?U.join(",")||null:void 0}];else if(en(y))De=y;else{var re=Object.keys(U);De=m?re.sort(m):re}var H=p?String(r).replace(/\./g,"%2E"):String(r),V=i&&en(U)&&U.length===1?H+"[]":H;if(s&&en(U)&&U.length===0)return V+"[]";for(var Q=0;Q<De.length;++Q){var K=De[Q],ie=typeof K=="object"&&K&&typeof K.value<"u"?K.value:U[K];if(!(d&&ie===null)){var ce=f&&p?String(K).replace(/\./g,"%2E"):String(K),ke=en(U)?typeof n=="function"?n(V,ce):V:V+(f?"."+ce:"["+ce+"]");C.set(e,Z);var Ne=zP();Ne.set(Rm,C),MP(J,t(ie,ke,n,i,s,u,d,p,n==="comma"&&E&&en(U)?null:h,y,m,f,l,g,v,E,b,Ne))}}return J},"stringify"),w1=o(function(e){if(!e)return St;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||St.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=Qa.default;if(typeof e.format<"u"){if(!_1.call(Qa.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Qa.formatters[n],s=St.filter;(typeof e.filter=="function"||en(e.filter))&&(s=e.filter);var u;if(e.arrayFormat in UP?u=e.arrayFormat:"indices"in e?u=e.indices?"indices":"repeat":u=St.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:St.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:St.addQueryPrefix,allowDots:d,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:St.allowEmptyArrays,arrayFormat:u,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:St.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?St.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:St.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:St.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:St.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:St.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:St.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:St.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:St.strictNullHandling}},"normalizeStringifyOptions");LP.exports=function(t,e){var r=t,n=w1(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):en(n.filter)&&(s=n.filter,i=s);var u=[];if(typeof r!="object"||r===null)return"";var d=UP[n.arrayFormat],p=d==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var h=zP(),y=0;y<i.length;++y){var m=i[y],f=r[m];n.skipNulls&&f===null||MP(u,T1(f,m,d,p,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,h))}var l=u.join(n.delimiter),g=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),l.length>0?g+l:""}});var BP=D((vee,qP)=>{"use strict";var tn=Im(),Mu=Object.prototype.hasOwnProperty,Cm=Array.isArray,lt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:tn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},P1=o(function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},"interpretNumericEntities"),FP=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"),x1="utf8=%26%2310003%3B",A1="utf8=%E2%9C%93",I1=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,u=i.split(r.delimiter,r.throwOnLimitExceeded&&typeof s<"u"?s+1:s);if(r.throwOnLimitExceeded&&typeof s<"u"&&u.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var d=-1,p,h=r.charset;if(r.charsetSentinel)for(p=0;p<u.length;++p)u[p].indexOf("utf8=")===0&&(u[p]===A1?h="utf-8":u[p]===x1&&(h="iso-8859-1"),d=p,p=u.length);for(p=0;p<u.length;++p)if(p!==d){var y=u[p],m=y.indexOf("]="),f=m===-1?y.indexOf("="):m+1,l,g;if(f===-1?(l=r.decoder(y,lt.decoder,h,"key"),g=r.strictNullHandling?null:""):(l=r.decoder(y.slice(0,f),lt.decoder,h,"key"),l!==null&&(g=tn.maybeMap(FP(y.slice(f+1),r,Cm(n[l])?n[l].length:0),function(E){return r.decoder(E,lt.decoder,h,"value")}))),g&&r.interpretNumericEntities&&h==="iso-8859-1"&&(g=P1(String(g))),y.indexOf("[]=")>-1&&(g=Cm(g)?[g]:g),r.comma&&Cm(g)&&g.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");g=tn.combine([],g,r.arrayLimit,r.plainObjects)}if(l!==null){var v=Mu.call(n,l);v&&(r.duplicates==="combine"||y.indexOf("[]=")>-1)?n[l]=tn.combine(n[l],g,r.arrayLimit,r.plainObjects):(!v||r.duplicates==="last")&&(n[l]=g)}}return n},"parseQueryStringValues"),R1=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 u=n?e:FP(e,r,i),d=t.length-1;d>=0;--d){var p,h=t[d];if(h==="[]"&&r.parseArrays)tn.isOverflow(u)?p=u:p=r.allowEmptyArrays&&(u===""||r.strictNullHandling&&u===null)?[]:tn.combine([],u,r.arrayLimit,r.plainObjects);else{p=r.plainObjects?{__proto__:null}:{};var y=h.charAt(0)==="["&&h.charAt(h.length-1)==="]"?h.slice(1,-1):h,m=r.decodeDotInKeys?y.replace(/%2E/g,"."):y,f=parseInt(m,10),l=!isNaN(f)&&h!==m&&String(f)===m&&f>=0&&r.parseArrays;if(!r.parseArrays&&m==="")p={0:u};else if(l&&f<r.arrayLimit)p=[],p[f]=u;else{if(l&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");l?(p[f]=u,tn.markOverflow(p,f)):m!=="__proto__"&&(p[m]=u)}}u=p}return u},"parseObject"),C1=o(function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&Mu.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=i.exec(n),d=u?n.slice(0,u.index):n,p=[];if(d){if(!r.plainObjects&&Mu.call(Object.prototype,d)&&!r.allowPrototypes)return;p[p.length]=d}for(var h=0;(u=s.exec(n))!==null&&h<r.depth;){h+=1;var y=u[1].slice(1,-1);if(!r.plainObjects&&Mu.call(Object.prototype,y)&&!r.allowPrototypes)return;p[p.length]=u[1]}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");p[p.length]="["+n.slice(u.index)+"]"}return p},"splitKeyIntoSegments"),O1=o(function(e,r,n,i){if(e){var s=C1(e,n);if(s)return R1(s,r,n,i)}},"parseQueryStringKeys"),k1=o(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 r=typeof e.charset>"u"?lt.charset:e.charset,n=typeof e.duplicates>"u"?lt.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:lt.allowDots:!!e.allowDots;return{allowDots:i,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:r,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"||tn.isRegExp(e.delimiter)?e.delimiter:lt.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:lt.depth,duplicates:n,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");qP.exports=function(t,e){var r=k1(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?I1(t,r):t,i=r.plainObjects?{__proto__:null}:{},s=Object.keys(n),u=0;u<s.length;++u){var d=s[u],p=O1(d,n[d],r,typeof t=="string");i=tn.merge(i,p,r)}return r.allowSparse===!0?i:tn.compact(i)}});var Om=D((bee,VP)=>{"use strict";var $1=jP(),D1=BP(),N1=Nu();VP.exports={formats:N1,parse:D1,stringify:$1}});var HP=D((km,GP)=>{(function(t,e){typeof km=="object"?GP.exports=e():typeof define=="function"&&define.amd?define([],e):t.urltemplate=e()})(km,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],u=[];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))),u.push(this.encodeValue(r,s,this.isKeyOperator(r)?n:null));else if(i==="*")Array.isArray(s)?s.filter(this.isDefined).forEach(function(p){u.push(this.encodeValue(r,p,this.isKeyOperator(r)?n:null))},this):Object.keys(s).forEach(function(p){this.isDefined(s[p])&&u.push(this.encodeValue(r,s[p],p))},this);else{var d=[];Array.isArray(s)?s.filter(this.isDefined).forEach(function(p){d.push(this.encodeValue(r,p))},this):Object.keys(s).forEach(function(p){this.isDefined(s[p])&&(d.push(this.encodeUnreserved(p)),d.push(this.encodeValue(r,s[p].toString())))},this),this.isKeyOperator(r)?u.push(this.encodeUnreserved(n)+"="+d.join(",")):d.length!==0&&u.push(d.join(","))}else r===";"?this.isDefined(s)&&u.push(this.encodeUnreserved(n)):s===""&&(r==="&"||r==="?")?u.push(this.encodeUnreserved(n)+"="):s===""&&u.push("");return u},t.prototype.parse=function(e){var r=this,n=["+","#",".","/",";","?","&"];return{expand:o(function(i){return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(s,u,d){if(u){var p=null,h=[];if(n.indexOf(u.charAt(0))!==-1&&(p=u.charAt(0),u=u.substr(1)),u.split(/,/g).forEach(function(m){var f=/([^:\*]*)(?::(\d+)|(\*))?/.exec(m);h.push.apply(h,r.getValues(i,p,f[1],f[2]||f[3]))}),p&&p!=="+"){var y=",";return p==="?"?y="&":p!=="#"&&(y=p),(h.length!==0?p:"")+h.join(y)}else return h.join(",")}else return r.encodeReserved(d)})},"expand")}},new t})});var WP=D($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.isBrowser=z1;function z1(){return typeof window<"u"}o(z1,"isBrowser")});var ju=D(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.headersToClassicHeaders=ZP;Lu.marshallGaxiosResponse=U1;function ZP(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(ZP,"headersToClassicHeaders");function U1(t){return Object.defineProperties(t||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:ZP(t?.headers)}})}o(U1,"marshallGaxiosResponse")});var YP=D(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.sessions=void 0;cr.request=J1;cr.closeSession=Dm;var JP=require("http2"),M1=require("zlib"),L1=require("url"),j1=Om(),F1=fa(),q1=require("stream"),B1=require("util"),V1=require("process"),G1=ju(),{HTTP2_HEADER_CONTENT_ENCODING:H1,HTTP2_HEADER_CONTENT_TYPE:KP,HTTP2_HEADER_METHOD:W1,HTTP2_HEADER_PATH:Z1,HTTP2_HEADER_STATUS:K1}=JP.constants,es=!!V1.env.HTTP2_DEBUG;cr.sessions={};async function J1(t){let e=F1(!0,{},t);e.validateStatus=e.validateStatus||Y1,e.responseType=e.responseType||"json";let r=new L1.URL(e.url),n=X1(r.host);n.timeoutHandle!==void 0&&clearTimeout(n.timeoutHandle);let i=r.pathname;if(t.params&&Object.keys(t.params).length>0){let m=(t.paramsSerializer||j1.stringify)(e.params);i+=`?${m}`}let s=(0,G1.headersToClassicHeaders)(e.headers);s[Z1]=i,s[W1]=t.method||"GET",e.headers=s,s[KP]||e.responseType!=="text"&&(s[KP]="application/json");let u={config:t,headers:{},status:0,data:{},statusText:""},d=[],p=n.session,h;return new Promise((y,m)=>{try{h=p.request(s).on("response",f=>{Object.assign(u,{headers:f,status:f[K1]});let l=h;if(f[H1]==="gzip"&&(l=h.pipe(M1.createGunzip())),e.responseType==="stream"){u.data=l,y(u);return}l.on("data",g=>{d.push(g)}).on("error",g=>{m(g)}).on("end",()=>{let g=Buffer.concat(d),v=g;if(g){if(e.responseType==="json")try{v=JSON.parse(g.toString("utf8"))}catch{v=g.toString("utf8")}else e.responseType==="text"?v=g.toString("utf8"):e.responseType==="arraybuffer"&&(v=g.buffer);u.data=v}if(!e.validateStatus(u.status)){let E=`Request failed with status code ${u.status}. `;if(u.data&&typeof u.data=="object"){let b=B1.inspect(u.data,{depth:5});E=`${E}
59
- '${b}`}m(new Error(E,{cause:u}))}y(u)})}).on("error",f=>{m(f)})}catch(f){Dm(r).then(()=>m(f)).catch(m);return}if(u.request=h,t.data){if(t.data instanceof q1.Stream)t.data.pipe(h);else if(typeof t.data=="string"){let f=Buffer.from(t.data);h.end(f)}else if(typeof t.data=="object"){let f=JSON.stringify(t.data);h.end(f)}}n.timeoutHandle=setTimeout(()=>Dm(r),500)})}o(J1,"request");function Y1(t){return t>=200&&t<300}o(Y1,"validateStatus");function X1(t){if(cr.sessions[t])es&&console.log(`Used cached client for ${t}`);else{es&&console.log(`Creating client for ${t}`);let e=JP.connect(`https://${t}`);e.on("error",r=>{console.error(`*ERROR*: ${r}`),delete cr.sessions[t]}).on("goaway",(r,n)=>{console.error(`*GOAWAY*: ${r} : ${n}`),delete cr.sessions[t]}),cr.sessions[t]={session:e}}return cr.sessions[t]}o(X1,"_getClient");async function Dm(t){let e=cr.sessions[t.host];if(!e)return;let{session:r}=e;delete cr.sessions[t.host],es&&console.error(`Closing ${t.host}`),r.close(()=>{es&&console.error(`Closed ${t.host}`)}),setTimeout(()=>{r&&!r.destroyed&&(es&&console.log(`Forcing close ${t.host}`),r&&r.destroy())},1e3)}o(Dm,"closeSession")});var XP=D((Iee,Q1)=>{Q1.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 Fu=D(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.createAPIRequest=oL;var Nm=ht(),eL=Om(),nx=require("stream"),QP=HP(),ex=fa(),Um=WP(),tL=YP(),zm=ju(),ox=XP(),tx=o(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function rL(t){return t!==null&&typeof t=="object"&&typeof t.pipe=="function"&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object"}o(rL,"isReadableStream");function nL(t,e){let r=new Array;return e.forEach(n=>{t[n]===void 0&&r.push(n)}),r.length>0?r:null}o(nL,"getMissingParams");function oL(t,e){if(e)rx(t).then(r=>e(null,r),e);else return rx(t)}o(oL,"createAPIRequest");async function rx(t){let e=ex(!0,{},t.context.google?._options||{},t.context._options||{},t.options),r=ex(!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,u=typeof n.body=="string"?"text/plain":"application/octet-stream";delete r.media,delete r.auth;let d=(0,zm.headersToClassicHeaders)(r.headers||{});iL(d,e.apiVersion),delete r.headers,Object.keys(r).forEach(l=>{if(l.slice(-1)==="_"){let g=l.slice(0,-1);r[g]=r[l],delete r[l]}});let p=nL(r,t.requiredParams);if(p)throw new Error("Missing required parameters: "+p.join(", "));if(e.url){let l=e.url;typeof l=="object"&&(l=l.toString()),e.url=QP.parse(l).expand(r)}if(t.mediaUrl&&(t.mediaUrl=QP.parse(t.mediaUrl).expand(r)),t.context._options.rootUrl!==void 0&&e.url!==void 0){let l=new URL(e.url),g=l.href.substr(l.origin.length);e.url=new URL(g,t.context._options.rootUrl).href}e.paramsSerializer=l=>eL.stringify(l,{arrayFormat:"repeat"}),t.pathParams.forEach(l=>delete r[l]),typeof s=="string"&&(r.key=r.key||s,s=void 0);function h(l){let g=tx(),v=`--${g}--`,E=new nx.PassThrough({flush(U){this.push(`\r
60
- `),this.push(v),U()}}),b=new Mm,C=rL(l[1].body);d["content-type"]=`multipart/related; boundary=${g}`;for(let U of l){let Y=`--${g}\r
61
- content-type: ${U["content-type"]}\r
55
+ https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var JS=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(t={}){if(this._cachedProjectId=t.projectId||null,this.cachedCredential=t.authClient||null,this.keyFilename=t.keyFilename||t.keyFile,this.scopes=t.scopes,this.clientOptions=t.clientOptions||{},this.jsonContent=t.credentials||null,this.apiKey=t.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw new RangeError(dn.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);t.universeDomain&&(this.clientOptions.universeDomain=t.universeDomain)}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath,t.useJWTAccessWithScope=this.useJWTAccessWithScope,t.defaultScopes=this.defaultScopes}getProjectId(t){if(t)this.getProjectIdAsync().then(n=>t(null,n),t);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===dn.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw t}}async findAndCacheProjectId(){let t=null;if(t||=await this.getProductionProjectId(),t||=await this.getFileProjectId(),t||=await this.getDefaultServiceProjectId(),t||=await this.getGCEProjectId(),t||=await this.getExternalAccountClientProjectId(),t)return this._cachedProjectId=t,t;throw new Error(dn.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let t;try{t=await Bu.universe("universe-domain"),t||=KS.DEFAULT_UNIVERSE}catch(n){if(n&&n?.response?.status===404)t=KS.DEFAULT_UNIVERSE;else throw n}return t}async getUniverseDomain(){let t=(0,K$.originalOrCamelOptions)(this.clientOptions).get("universe_domain");try{t??=(await this.getClient()).universeDomain}catch{t??=KS.DEFAULT_UNIVERSE}return t}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},n){let o;if(typeof t=="function"?n=t:o=t,n)this.getApplicationDefaultAsync(o).then(r=>n(null,r.credential,r.projectId),n);else return this.getApplicationDefaultAsync(o)}async getApplicationDefaultAsync(t={}){if(this.cachedCredential)return await this.#t(this.cachedCredential,null);let n;if(n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t),n)return n instanceof rs.JWT?n.scopes=this.scopes:n instanceof qu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n)return n instanceof rs.JWT?n.scopes=this.scopes:n instanceof qu.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await this.#t(n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await this.#t(new LG.Compute(t));throw new Error(dn.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async#t(t,n=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let o=await this.getProjectIdOptional();return n&&(t.quotaProjectId=n),this.cachedCredential=t,{credential:t,projectId:o}}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=Bu.getGCPResidency()||await Bu.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){let n=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!n||n.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(n,t)}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(t){let n=null;if(this._isWindows())n=process.env.APPDATA;else{let r=process.env.HOME;r&&(n=WS.join(r,".config"))}return n&&(n=WS.join(n,"gcloud","application_default_credentials.json"),Fu.existsSync(n)||(n=null)),n?await this._getApplicationCredentialsFromFilePath(n,t):null}async _getApplicationCredentialsFromFilePath(t,n={}){if(!t||t.length===0)throw new Error("The file path is invalid.");try{if(t=Fu.realpathSync(t),!Fu.lstatSync(t).isFile())throw new Error}catch(r){throw r instanceof Error&&(r.message=`The file at ${t} does not exist, or it is not a file. ${r.message}`),r}let o=Fu.createReadStream(t);return this.fromStream(o,n)}fromImpersonatedJSON(t){if(!t)throw new Error("Must pass in a JSON object containing an impersonated refresh token");if(t.type!==ns.IMPERSONATED_ACCOUNT_TYPE)throw new Error(`The incoming JSON object does not have the "${ns.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!t.source_credentials)throw new Error("The incoming JSON object does not contain a source_credentials field");if(!t.service_account_impersonation_url)throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field");let n=this.fromJSON(t.source_credentials);if(t.service_account_impersonation_url?.length>256)throw new RangeError(`Target principal is too long: ${t.service_account_impersonation_url}`);let o=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(t.service_account_impersonation_url)?.groups?.target;if(!o)throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`);let r=(this.scopes||t.scopes||this.defaultScopes)??[];return new ns.Impersonated({...t,sourceClient:n,targetPrincipal:o,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(t,n={}){let o,r=(0,K$.originalOrCamelOptions)(n).get("universe_domain");return t.type===Z$.USER_REFRESH_ACCOUNT_TYPE?(o=new Z$.UserRefreshClient(n),o.fromJSON(t)):t.type===ns.IMPERSONATED_ACCOUNT_TYPE?o=this.fromImpersonatedJSON(t):t.type===qu.EXTERNAL_ACCOUNT_TYPE?(o=BG.ExternalAccountClient.fromJSON({...t,...n}),o.scopes=this.getAnyScopes()):t.type===W$.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?o=new W$.ExternalAccountAuthorizedUserClient({...t,...n}):(n.scopes=this.scopes,o=new rs.JWT(n),this.setGapicJWTValues(o),o.fromJSON(t)),r&&(o.universeDomain=r),o}_cacheClientFromJSON(t,n){let o=this.fromJSON(t,n);return this.jsonContent=t,this.cachedCredential=o,o}fromStream(t,n={},o){let r={};if(typeof n=="function"?o=n:r=n,o)this.fromStreamAsync(t,r).then(i=>o(null,i),o);else return this.fromStreamAsync(t,r)}fromStreamAsync(t,n){return new Promise((o,r)=>{if(!t)throw new Error("Must pass in a stream containing the Google auth settings.");let i=[];t.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 rs.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=u,this.setGapicJWTValues(u),o(u)}}catch(s){return r(s)}})})}fromAPIKey(t,n={}){return new rs.JWT({...n,apiKey:t})}_isWindows(){let t=UG.platform();return!!(t&&t.length>=3&&t.substring(0,3).toLowerCase()==="win")}async getDefaultServiceProjectId(){return new Promise(t=>{(0,NG.exec)("gcloud config config-helper --format json",(n,o)=>{if(!n&&o)try{let r=JSON.parse(o).configuration.properties.core.project;t(r);return}catch{}t(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 t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return t?t.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==qu.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await Bu.project("project-id")}catch{return null}}getCredentials(t){if(t)this.getCredentialsAsync().then(n=>t(null,n),t);else return this.getCredentialsAsync()}async getCredentialsAsync(){let t=await this.getClient();if(t instanceof ns.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof qu.BaseExternalAccountClient){let n=t.getServiceAccountEmail();if(n)return{client_email:n,universe_domain:t.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([Bu.instance("service-accounts/default/email"),this.getUniverseDomain()]);return{client_email:n,universe_domain:o}}throw new Error(dn.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 t=WS.resolve(this.keyFilename),n=Fu.createReadStream(t);return await this.fromStreamAsync(n,this.clientOptions)}else if(this.apiKey){let t=await this.fromAPIKey(this.apiKey,this.clientOptions);t.scopes=this.scopes;let{credential:n}=await this.#t(t);return n}else{let{credential:t}=await this.getApplicationDefaultAsync(this.clientOptions);return t}}async getIdTokenClient(t){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 jG.IdTokenClient({targetAudience:t,idTokenProvider:n})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(t){return(await this.getClient()).getRequestHeaders(t)}async authorizeRequest(t={}){let n=t.url,r=await(await this.getClient()).getRequestHeaders(n);return t.headers=zG.Gaxios.mergeHeaders(t.headers,r),t}async fetch(...t){return(await this.getClient()).fetch(...t)}async request(t){return(await this.getClient()).request(t)}getEnv(){return(0,FG.getEnv)()}async sign(t,n){let o=await this.getClient(),r=await this.getUniverseDomain();if(n=n||`https://iamcredentials.${r}/v1/projects/-/serviceAccounts/`,o instanceof ns.Impersonated)return(await o.sign(t)).signedBlob;let i=(0,MG.createCrypto)();if(o instanceof rs.JWT&&o.key)return await i.sign(o.key,t);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,t,n)}async signBlob(t,n,o,r){let i=new URL(r+`${n}:signBlob`);return(await this.request({method:"POST",url:i.href,data:{payload:t.encodeBase64StringUtf8(o)},retry:!0,retryConfig:{httpMethodsToRetry:["POST"]}})).data.signedBlob}};dn.GoogleAuth=JS});var Y$=z(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.IAMAuth=void 0;var YS=class{static{a(this,"IAMAuth")}selector;token;constructor(t,n){this.selector=t,this.token=n,this.selector=t,this.token=n}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};qm.IAMAuth=YS});var X$=z(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.DownscopedClient=wn.EXPIRATION_TIME_OFFSET=wn.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var qG=Pt(),VG=require("stream"),XS=xr(),GG=Tm(),HG="urn:ietf:params:oauth:grant-type:token-exchange",ZG="urn:ietf:params:oauth:token-type:access_token",WG="urn:ietf:params:oauth:token-type:access_token";wn.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;wn.EXPIRATION_TIME_OFFSET=300*1e3;var QS=class extends XS.AuthClient{static{a(this,"DownscopedClient")}authClient;credentialAccessBoundary;cachedDownscopedAccessToken;stsCredential;constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof XS.AuthClient?{}:t),t instanceof XS.AuthClient?(this.authClient=t,this.credentialAccessBoundary=n):(this.authClient=t.authClient,this.credentialAccessBoundary=t.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>wn.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw new Error(`The provided access boundary has more than ${wn.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 GG.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(t){if(!t.expiry_date)throw new Error("The access token expiry_date field is missing in the provided credentials.");super.setCredentials(t),this.cachedDownscopedAccessToken=t}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 t=await this.getAccessToken(),n=new Headers({authorization:`Bearer ${t.token}`});return this.addSharedMetadataHeaders(n)}request(t,n){if(n)this.requestAsync(t).then(o=>n(null,o),o=>n(o,o.response));else return this.requestAsync(t)}async requestAsync(t,n=!1){let o;try{let r=await this.getRequestHeaders();t.headers=qG.Gaxios.mergeHeaders(t.headers),this.addUserProjectAndAuthHeaders(t.headers,r),o=await this.transporter.request(t)}catch(r){let i=r.response;if(i){let s=i.status,u=i.config.data instanceof VG.Readable;if(!n&&(s===401||s===403)&&!u&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(t,!0)}throw r}return o}async refreshAccessTokenAsync(){let t=(await this.authClient.getAccessToken()).token,n={grantType:HG,requestedTokenType:ZG,subjectToken:t,subjectTokenType:WG},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(t){let n=new Date().getTime();return t.expiry_date?n>=t.expiry_date-this.eagerRefreshThresholdMillis:!1}};wn.DownscopedClient=QS});var Q$=z(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.PassThroughClient=void 0;var KG=xr(),eT=class extends KG.AuthClient{static{a(this,"PassThroughClient")}async request(t){return this.transporter.request(t)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}};Vm.PassThroughClient=eT});var Vu=z(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.GoogleAuth=ye.auth=ye.PassThroughClient=ye.ExternalAccountAuthorizedUserClient=ye.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=ye.ExecutableError=ye.PluggableAuthClient=ye.DownscopedClient=ye.BaseExternalAccountClient=ye.ExternalAccountClient=ye.IdentityPoolClient=ye.AwsRequestSigner=ye.AwsClient=ye.UserRefreshClient=ye.LoginTicket=ye.ClientAuthentication=ye.OAuth2Client=ye.CodeChallengeMethod=ye.Impersonated=ye.JWT=ye.JWTAccess=ye.IdTokenClient=ye.IAMAuth=ye.GCPEnv=ye.Compute=ye.DEFAULT_UNIVERSE=ye.AuthClient=ye.gaxios=ye.gcpMetadata=void 0;var eD=J$();Object.defineProperty(ye,"GoogleAuth",{enumerable:!0,get:a(function(){return eD.GoogleAuth},"get")});ye.gcpMetadata=Au();ye.gaxios=Pt();var tD=xr();Object.defineProperty(ye,"AuthClient",{enumerable:!0,get:a(function(){return tD.AuthClient},"get")});Object.defineProperty(ye,"DEFAULT_UNIVERSE",{enumerable:!0,get:a(function(){return tD.DEFAULT_UNIVERSE},"get")});var JG=FE();Object.defineProperty(ye,"Compute",{enumerable:!0,get:a(function(){return JG.Compute},"get")});var YG=VE();Object.defineProperty(ye,"GCPEnv",{enumerable:!0,get:a(function(){return YG.GCPEnv},"get")});var XG=Y$();Object.defineProperty(ye,"IAMAuth",{enumerable:!0,get:a(function(){return XG.IAMAuth},"get")});var QG=qE();Object.defineProperty(ye,"IdTokenClient",{enumerable:!0,get:a(function(){return QG.IdTokenClient},"get")});var eH=sS();Object.defineProperty(ye,"JWTAccess",{enumerable:!0,get:a(function(){return eH.JWTAccess},"get")});var tH=uS();Object.defineProperty(ye,"JWT",{enumerable:!0,get:a(function(){return tH.JWT},"get")});var rH=fS();Object.defineProperty(ye,"Impersonated",{enumerable:!0,get:a(function(){return rH.Impersonated},"get")});var tT=xi();Object.defineProperty(ye,"CodeChallengeMethod",{enumerable:!0,get:a(function(){return tT.CodeChallengeMethod},"get")});Object.defineProperty(ye,"OAuth2Client",{enumerable:!0,get:a(function(){return tT.OAuth2Client},"get")});Object.defineProperty(ye,"ClientAuthentication",{enumerable:!0,get:a(function(){return tT.ClientAuthentication},"get")});var nH=UE();Object.defineProperty(ye,"LoginTicket",{enumerable:!0,get:a(function(){return nH.LoginTicket},"get")});var oH=dS();Object.defineProperty(ye,"UserRefreshClient",{enumerable:!0,get:a(function(){return oH.UserRefreshClient},"get")});var iH=kS();Object.defineProperty(ye,"AwsClient",{enumerable:!0,get:a(function(){return iH.AwsClient},"get")});var aH=RS();Object.defineProperty(ye,"AwsRequestSigner",{enumerable:!0,get:a(function(){return aH.AwsRequestSigner},"get")});var sH=AS();Object.defineProperty(ye,"IdentityPoolClient",{enumerable:!0,get:a(function(){return sH.IdentityPoolClient},"get")});var cH=VS();Object.defineProperty(ye,"ExternalAccountClient",{enumerable:!0,get:a(function(){return cH.ExternalAccountClient},"get")});var uH=Uo();Object.defineProperty(ye,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return uH.BaseExternalAccountClient},"get")});var lH=X$();Object.defineProperty(ye,"DownscopedClient",{enumerable:!0,get:a(function(){return lH.DownscopedClient},"get")});var rD=BS();Object.defineProperty(ye,"PluggableAuthClient",{enumerable:!0,get:a(function(){return rD.PluggableAuthClient},"get")});Object.defineProperty(ye,"ExecutableError",{enumerable:!0,get:a(function(){return rD.ExecutableError},"get")});var nD=ZS();Object.defineProperty(ye,"EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE",{enumerable:!0,get:a(function(){return nD.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE},"get")});Object.defineProperty(ye,"ExternalAccountAuthorizedUserClient",{enumerable:!0,get:a(function(){return nD.ExternalAccountAuthorizedUserClient},"get")});var dH=Q$();Object.defineProperty(ye,"PassThroughClient",{enumerable:!0,get:a(function(){return dH.PassThroughClient},"get")});var pH=new eD.GoogleAuth;ye.auth=pH});var Xn=z((nT,oT)=>{(function(e,t){typeof nT=="object"&&typeof oT<"u"?oT.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(nT,(function(){"use strict";var e=1e3,t=6e4,n=36e5,o="millisecond",r="second",i="minute",s="hour",u="day",d="week",f="month",h="quarter",g="year",m="date",p="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,E={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(ce){var J=["th","st","nd","rd"],W=ce%100;return"["+ce+(J[(W-20)%10]||J[W]||J[0])+"]"},"ordinal")},b=a(function(ce,J,W){var ne=String(ce);return!ne||ne.length>=J?ce:""+Array(J+1-ne.length).join(W)+ce},"m"),k={s:b,z:a(function(ce){var J=-ce.utcOffset(),W=Math.abs(J),ne=Math.floor(W/60),X=W%60;return(J<=0?"+":"-")+b(ne,2,"0")+":"+b(X,2,"0")},"z"),m:a(function ce(J,W){if(J.date()<W.date())return-ce(W,J);var ne=12*(W.year()-J.year())+(W.month()-J.month()),X=J.clone().add(ne,f),pe=W-X<0,he=J.clone().add(ne+(pe?-1:1),f);return+(-(ne+(W-X)/(pe?X-he:he-X))||0)},"t"),a:a(function(ce){return ce<0?Math.ceil(ce)||0:Math.floor(ce)},"a"),p:a(function(ce){return{M:f,y:g,w:d,d:u,D:m,h:s,m:i,s:r,ms:o,Q:h}[ce]||String(ce||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(ce){return ce===void 0},"u")},N="en",Z={};Z[N]=E;var H=a(function(ce){return ce instanceof Q},"p"),K=a(function ce(J,W,ne){var X;if(!J)return N;if(typeof J=="string"){var pe=J.toLowerCase();Z[pe]&&(X=pe),W&&(Z[pe]=W,X=pe);var he=J.split("-");if(!X&&he.length>1)return ce(he[0])}else{var Ne=J.name;Z[Ne]=J,X=Ne}return!ne&&X&&(N=X),X||!ne&&N},"t"),ee=a(function(ce,J){if(H(ce))return ce.clone();var W=typeof J=="object"?J:{};return W.date=ce,W.args=arguments,new Q(W)},"w"),se=k;se.l=K,se.i=H,se.w=function(ce,J){return ee(ce,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var Q=(function(){function ce(W){this.$L=K(W.locale,null,!0),this.parse(W)}a(ce,"M");var J=ce.prototype;return J.parse=function(W){this.$d=(function(ne){var X=ne.date,pe=ne.utc;if(X===null)return new Date(NaN);if(se.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var he=X.match(y);if(he){var Ne=he[2]-1||0,je=(he[7]||"0").substring(0,3);return pe?new Date(Date.UTC(he[1],Ne,he[3]||1,he[4]||0,he[5]||0,he[6]||0,je)):new Date(he[1],Ne,he[3]||1,he[4]||0,he[5]||0,he[6]||0,je)}}return new Date(X)})(W),this.$x=W.x||{},this.init()},J.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},J.$utils=function(){return se},J.isValid=function(){return this.$d.toString()!==p},J.isSame=function(W,ne){var X=ee(W);return this.startOf(ne)<=X&&X<=this.endOf(ne)},J.isAfter=function(W,ne){return ee(W)<this.startOf(ne)},J.isBefore=function(W,ne){return this.endOf(ne)<ee(W)},J.$g=function(W,ne,X){return se.u(W)?this[ne]:this.set(X,W)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(W,ne){var X=this,pe=!!se.u(ne)||ne,he=se.p(W),Ne=a(function(pr,Xe){var ot=se.w(X.$u?Date.UTC(X.$y,Xe,pr):new Date(X.$y,Xe,pr),X);return pe?ot:ot.endOf(u)},"l"),je=a(function(pr,Xe){return se.w(X.toDate()[pr].apply(X.toDate("s"),(pe?[0,0,0,0]:[23,59,59,999]).slice(Xe)),X)},"$"),rt=this.$W,ut=this.$M,kt=this.$D,ae="set"+(this.$u?"UTC":"");switch(he){case g:return pe?Ne(1,0):Ne(31,11);case f:return pe?Ne(1,ut):Ne(0,ut+1);case d:var bt=this.$locale().weekStart||0,St=(rt<bt?rt+7:rt)-bt;return Ne(pe?kt-St:kt+(6-St),ut);case u:case m:return je(ae+"Hours",0);case s:return je(ae+"Minutes",1);case i:return je(ae+"Seconds",2);case r:return je(ae+"Milliseconds",3);default:return this.clone()}},J.endOf=function(W){return this.startOf(W,!1)},J.$set=function(W,ne){var X,pe=se.p(W),he="set"+(this.$u?"UTC":""),Ne=(X={},X[u]=he+"Date",X[m]=he+"Date",X[f]=he+"Month",X[g]=he+"FullYear",X[s]=he+"Hours",X[i]=he+"Minutes",X[r]=he+"Seconds",X[o]=he+"Milliseconds",X)[pe],je=pe===u?this.$D+(ne-this.$W):ne;if(pe===f||pe===g){var rt=this.clone().set(m,1);rt.$d[Ne](je),rt.init(),this.$d=rt.set(m,Math.min(this.$D,rt.daysInMonth())).$d}else Ne&&this.$d[Ne](je);return this.init(),this},J.set=function(W,ne){return this.clone().$set(W,ne)},J.get=function(W){return this[se.p(W)]()},J.add=function(W,ne){var X,pe=this;W=Number(W);var he=se.p(ne),Ne=a(function(ut){var kt=ee(pe);return se.w(kt.date(kt.date()+Math.round(ut*W)),pe)},"y");if(he===f)return this.set(f,this.$M+W);if(he===g)return this.set(g,this.$y+W);if(he===u)return Ne(1);if(he===d)return Ne(7);var je=(X={},X[i]=t,X[s]=n,X[r]=e,X)[he]||1,rt=this.$d.getTime()+W*je;return se.w(rt,this)},J.subtract=function(W,ne){return this.add(-1*W,ne)},J.format=function(W){var ne=this,X=this.$locale();if(!this.isValid())return X.invalidDate||p;var pe=W||"YYYY-MM-DDTHH:mm:ssZ",he=se.z(this),Ne=this.$H,je=this.$m,rt=this.$M,ut=X.weekdays,kt=X.months,ae=X.meridiem,bt=a(function(Xe,ot,T,w){return Xe&&(Xe[ot]||Xe(ne,pe))||T[ot].slice(0,w)},"h"),St=a(function(Xe){return se.s(Ne%12||12,Xe,"0")},"d"),pr=ae||function(Xe,ot,T){var w=Xe<12?"AM":"PM";return T?w.toLowerCase():w};return pe.replace(v,(function(Xe,ot){return ot||(function(T){switch(T){case"YY":return String(ne.$y).slice(-2);case"YYYY":return se.s(ne.$y,4,"0");case"M":return rt+1;case"MM":return se.s(rt+1,2,"0");case"MMM":return bt(X.monthsShort,rt,kt,3);case"MMMM":return bt(kt,rt);case"D":return ne.$D;case"DD":return se.s(ne.$D,2,"0");case"d":return String(ne.$W);case"dd":return bt(X.weekdaysMin,ne.$W,ut,2);case"ddd":return bt(X.weekdaysShort,ne.$W,ut,3);case"dddd":return ut[ne.$W];case"H":return String(Ne);case"HH":return se.s(Ne,2,"0");case"h":return St(1);case"hh":return St(2);case"a":return pr(Ne,je,!0);case"A":return pr(Ne,je,!1);case"m":return String(je);case"mm":return se.s(je,2,"0");case"s":return String(ne.$s);case"ss":return se.s(ne.$s,2,"0");case"SSS":return se.s(ne.$ms,3,"0");case"Z":return he}return null})(Xe)||he.replace(":","")}))},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(W,ne,X){var pe,he=this,Ne=se.p(ne),je=ee(W),rt=(je.utcOffset()-this.utcOffset())*t,ut=this-je,kt=a(function(){return se.m(he,je)},"D");switch(Ne){case g:pe=kt()/12;break;case f:pe=kt();break;case h:pe=kt()/3;break;case d:pe=(ut-rt)/6048e5;break;case u:pe=(ut-rt)/864e5;break;case s:pe=ut/n;break;case i:pe=ut/t;break;case r:pe=ut/e;break;default:pe=ut}return X?pe:se.a(pe)},J.daysInMonth=function(){return this.endOf(f).$D},J.$locale=function(){return Z[this.$L]},J.locale=function(W,ne){if(!W)return this.$L;var X=this.clone(),pe=K(W,ne,!0);return pe&&(X.$L=pe),X},J.clone=function(){return se.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},ce})(),Le=Q.prototype;return ee.prototype=Le,[["$ms",o],["$s",r],["$m",i],["$H",s],["$W",u],["$M",f],["$y",g],["$D",m]].forEach((function(ce){Le[ce[1]]=function(J){return this.$g(J,ce[0],ce[1])}})),ee.extend=function(ce,J){return ce.$i||(ce(J,Q,ee),ce.$i=!0),ee},ee.locale=K,ee.isDayjs=H,ee.unix=function(ce){return ee(1e3*ce)},ee.en=Z[N],ee.Ls=Z,ee.p={},ee}))});var oD=z(iT=>{"use strict";Object.defineProperty(iT,"__esModule",{value:!0});iT.getAPI=fH;function fH(e,t,n,o){let r;if(typeof t=="string")r=t,t={};else if(typeof t=="object")r=t.version,delete t.version;else throw new Error("Argument error: Accepts only string or object");try{let i=n[r],s=new i(t,o);return Object.freeze(s)}catch(i){throw new Error(`Unable to load endpoint ${e}("${r}"): ${i.message}`)}}a(fH,"getAPI")});var aD=z((Cce,iD)=>{iD.exports=require("util").inspect});var Ku=z((Oce,xD)=>{var hT=typeof Map=="function"&&Map.prototype,aT=Object.getOwnPropertyDescriptor&&hT?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Zm=hT&&aT&&typeof aT.get=="function"?aT.get:null,sD=hT&&Map.prototype.forEach,gT=typeof Set=="function"&&Set.prototype,sT=Object.getOwnPropertyDescriptor&&gT?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wm=gT&&sT&&typeof sT.get=="function"?sT.get:null,cD=gT&&Set.prototype.forEach,mH=typeof WeakMap=="function"&&WeakMap.prototype,Hu=mH?WeakMap.prototype.has:null,hH=typeof WeakSet=="function"&&WeakSet.prototype,Zu=hH?WeakSet.prototype.has:null,gH=typeof WeakRef=="function"&&WeakRef.prototype,uD=gH?WeakRef.prototype.deref:null,yH=Boolean.prototype.valueOf,vH=Object.prototype.toString,_H=Function.prototype.toString,bH=String.prototype.match,yT=String.prototype.slice,Mo=String.prototype.replace,EH=String.prototype.toUpperCase,lD=String.prototype.toLowerCase,_D=RegExp.prototype.test,dD=Array.prototype.concat,xn=Array.prototype.join,SH=Array.prototype.slice,pD=Math.floor,lT=typeof BigInt=="function"?BigInt.prototype.valueOf:null,cT=Object.getOwnPropertySymbols,dT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,os=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Wu=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===os||!0)?Symbol.toStringTag:null,bD=Object.prototype.propertyIsEnumerable,fD=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function mD(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||_D.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var o=e<0?-pD(-e):pD(e);if(o!==e){var r=String(o),i=yT.call(t,r.length+1);return Mo.call(r,n,"$&_")+"."+Mo.call(Mo.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mo.call(t,n,"$&_")}a(mD,"addNumericSeparator");var pT=aD(),hD=pT.custom,gD=TD(hD)?hD:null,ED={__proto__:null,double:'"',single:"'"},TH={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};xD.exports=a(function e(t,n,o,r){var i=n||{};if(Qn(i,"quoteStyle")&&!Qn(ED,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(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=Qn(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(Qn(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(Qn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return wD(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var d=String(t);return u?mD(t,d):d}if(typeof t=="bigint"){var f=String(t)+"n";return u?mD(t,f):f}var h=typeof i.depth>"u"?5:i.depth;if(typeof o>"u"&&(o=0),o>=h&&h>0&&typeof t=="object")return fT(t)?"[Array]":"[Object]";var g=FH(i,o);if(typeof r>"u")r=[];else if(PD(r,t)>=0)return"[Circular]";function m(W,ne,X){if(ne&&(r=SH.call(r),r.push(ne)),X){var pe={depth:i.depth};return Qn(i,"quoteStyle")&&(pe.quoteStyle=i.quoteStyle),e(W,pe,o+1,r)}return e(W,i,o+1,r)}if(a(m,"inspect"),typeof t=="function"&&!yD(t)){var p=kH(t),y=Hm(t,m);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(y.length>0?" { "+xn.call(y,", ")+" }":"")}if(TD(t)){var v=os?Mo.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):dT.call(t);return typeof t=="object"&&!os?Gu(v):v}if(MH(t)){for(var E="<"+lD.call(String(t.nodeName)),b=t.attributes||[],k=0;k<b.length;k++)E+=" "+b[k].name+"="+SD(PH(b[k].value),"double",i);return E+=">",t.childNodes&&t.childNodes.length&&(E+="..."),E+="</"+lD.call(String(t.nodeName))+">",E}if(fT(t)){if(t.length===0)return"[]";var N=Hm(t,m);return g&&!jH(N)?"["+mT(N,g)+"]":"[ "+xn.call(N,", ")+" ]"}if(xH(t)){var Z=Hm(t,m);return!("cause"in Error.prototype)&&"cause"in t&&!bD.call(t,"cause")?"{ ["+String(t)+"] "+xn.call(dD.call("[cause]: "+m(t.cause),Z),", ")+" }":Z.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+xn.call(Z,", ")+" }"}if(typeof t=="object"&&s){if(gD&&typeof t[gD]=="function"&&pT)return pT(t,{depth:h-o});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($H(t)){var H=[];return sD&&sD.call(t,function(W,ne){H.push(m(ne,t,!0)+" => "+m(W,t))}),vD("Map",Zm.call(t),H,g)}if(zH(t)){var K=[];return cD&&cD.call(t,function(W){K.push(m(W,t))}),vD("Set",Wm.call(t),K,g)}if(DH(t))return uT("WeakMap");if(UH(t))return uT("WeakSet");if(NH(t))return uT("WeakRef");if(IH(t))return Gu(m(Number(t)));if(CH(t))return Gu(m(lT.call(t)));if(RH(t))return Gu(yH.call(t));if(AH(t))return Gu(m(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof global<"u"&&t===global)return"{ [object globalThis] }";if(!wH(t)&&!yD(t)){var ee=Hm(t,m),se=fD?fD(t)===Object.prototype:t instanceof Object||t.constructor===Object,Q=t instanceof Object?"":"null prototype",Le=!se&&Wu&&Object(t)===t&&Wu in t?yT.call(Lo(t),8,-1):Q?"Object":"",ce=se||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",J=ce+(Le||Q?"["+xn.call(dD.call([],Le||[],Q||[]),": ")+"] ":"");return ee.length===0?J+"{}":g?J+"{"+mT(ee,g)+"}":J+"{ "+xn.call(ee,", ")+" }"}return String(t)},"inspect_");function SD(e,t,n){var o=n.quoteStyle||t,r=ED[o];return r+e+r}a(SD,"wrapQuotes");function PH(e){return Mo.call(String(e),/"/g,"&quot;")}a(PH,"quote");function Ii(e){return!Wu||!(typeof e=="object"&&(Wu in e||typeof e[Wu]<"u"))}a(Ii,"canTrustToString");function fT(e){return Lo(e)==="[object Array]"&&Ii(e)}a(fT,"isArray");function wH(e){return Lo(e)==="[object Date]"&&Ii(e)}a(wH,"isDate");function yD(e){return Lo(e)==="[object RegExp]"&&Ii(e)}a(yD,"isRegExp");function xH(e){return Lo(e)==="[object Error]"&&Ii(e)}a(xH,"isError");function AH(e){return Lo(e)==="[object String]"&&Ii(e)}a(AH,"isString");function IH(e){return Lo(e)==="[object Number]"&&Ii(e)}a(IH,"isNumber");function RH(e){return Lo(e)==="[object Boolean]"&&Ii(e)}a(RH,"isBoolean");function TD(e){if(os)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!dT)return!1;try{return dT.call(e),!0}catch{}return!1}a(TD,"isSymbol");function CH(e){if(!e||typeof e!="object"||!lT)return!1;try{return lT.call(e),!0}catch{}return!1}a(CH,"isBigInt");var OH=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return OH.call(e,t)}a(Qn,"has");function Lo(e){return vH.call(e)}a(Lo,"toStr");function kH(e){if(e.name)return e.name;var t=bH.call(_H.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}a(kH,"nameOf");function PD(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1}a(PD,"indexOf");function $H(e){if(!Zm||!e||typeof e!="object")return!1;try{Zm.call(e);try{Wm.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}a($H,"isMap");function DH(e){if(!Hu||!e||typeof e!="object")return!1;try{Hu.call(e,Hu);try{Zu.call(e,Zu)}catch{return!0}return e instanceof WeakMap}catch{}return!1}a(DH,"isWeakMap");function NH(e){if(!uD||!e||typeof e!="object")return!1;try{return uD.call(e),!0}catch{}return!1}a(NH,"isWeakRef");function zH(e){if(!Wm||!e||typeof e!="object")return!1;try{Wm.call(e);try{Zm.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}a(zH,"isSet");function UH(e){if(!Zu||!e||typeof e!="object")return!1;try{Zu.call(e,Zu);try{Hu.call(e,Hu)}catch{return!0}return e instanceof WeakSet}catch{}return!1}a(UH,"isWeakSet");function MH(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}a(MH,"isElement");function wD(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return wD(yT.call(e,0,t.maxStringLength),t)+o}var r=TH[t.quoteStyle||"single"];r.lastIndex=0;var i=Mo.call(Mo.call(e,r,"\\$1"),/[\x00-\x1f]/g,LH);return SD(i,"single",t)}a(wD,"inspectString");function LH(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+EH.call(t.toString(16))}a(LH,"lowbyte");function Gu(e){return"Object("+e+")"}a(Gu,"markBoxed");function uT(e){return e+" { ? }"}a(uT,"weakCollectionOf");function vD(e,t,n,o){var r=o?mT(n,o):xn.call(n,", ");return e+" ("+t+") {"+r+"}"}a(vD,"collectionOf");function jH(e){for(var t=0;t<e.length;t++)if(PD(e[t],`
56
+ `)>=0)return!1;return!0}a(jH,"singleLineValues");function FH(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=xn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:xn.call(Array(t+1),n)}}a(FH,"getIndent");function mT(e,t){if(e.length===0)return"";var n=`
57
+ `+t.prev+t.base;return n+xn.call(e,","+n)+`
58
+ `+t.prev}a(mT,"indentedJoin");function Hm(e,t){var n=fT(e),o=[];if(n){o.length=e.length;for(var r=0;r<e.length;r++)o[r]=Qn(e,r)?t(e[r],e):""}var i=typeof cT=="function"?cT(e):[],s;if(os){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var d in e)Qn(e,d)&&(n&&String(Number(d))===d&&d<e.length||os&&s["$"+d]instanceof Symbol||(_D.call(/[^\w$]/,d)?o.push(t(d,e)+": "+t(e[d],e)):o.push(d+": "+t(e[d],e))));if(typeof cT=="function")for(var f=0;f<i.length;f++)bD.call(e,i[f])&&o.push("["+t(i[f])+"]: "+t(e[i[f]],e));return o}a(Hm,"arrObjKeys")});var ID=z(($ce,AD)=>{"use strict";var BH=Ku(),qH=Io(),Km=a(function(e,t,n){for(var o=e,r;(r=o.next)!=null;o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r},"listGetNode"),VH=a(function(e,t){if(e){var n=Km(e,t);return n&&n.value}},"listGet"),GH=a(function(e,t,n){var o=Km(e,t);o?o.value=n:e.next={key:t,next:e.next,value:n}},"listSet"),HH=a(function(e,t){return e?!!Km(e,t):!1},"listHas"),ZH=a(function(e,t){if(e)return Km(e,t,!0)},"listDelete");AD.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new qH("Side channel does not contain "+BH(o))},"assert"),delete:a(function(o){var r=ZH(t,o);return r&&t&&!t.next&&(t=void 0),!!r},"delete"),get:a(function(o){return VH(t,o)},"get"),has:a(function(o){return HH(t,o)},"has"),set:a(function(o,r){t||(t={next:void 0}),GH(t,o,r)},"set")};return n},"getSideChannelList")});var vT=z((Nce,OD)=>{"use strict";var RD=du(),CD=Ab(),WH=CD([RD("%String.prototype.indexOf%")]);OD.exports=a(function(t,n){var o=RD(t,!!n);return typeof o=="function"&&WH(t,".prototype.")>-1?CD([o]):o},"callBoundIntrinsic")});var _T=z((Uce,$D)=>{"use strict";var KH=du(),Ju=vT(),JH=Ku(),YH=Io(),kD=KH("%Map%",!0),XH=Ju("Map.prototype.get",!0),QH=Ju("Map.prototype.set",!0),eZ=Ju("Map.prototype.has",!0),tZ=Ju("Map.prototype.delete",!0),rZ=Ju("Map.prototype.size",!0);$D.exports=!!kD&&a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new YH("Side channel does not contain "+JH(o))},"assert"),delete:a(function(o){if(t){var r=tZ(t,o);return rZ(t)===0&&(t=void 0),r}return!1},"delete"),get:a(function(o){if(t)return XH(t,o)},"get"),has:a(function(o){return t?eZ(t,o):!1},"has"),set:a(function(o,r){t||(t=new kD),QH(t,o,r)},"set")};return n},"getSideChannelMap")});var ND=z((Lce,DD)=>{"use strict";var nZ=du(),Ym=vT(),oZ=Ku(),Jm=_T(),iZ=Io(),is=nZ("%WeakMap%",!0),aZ=Ym("WeakMap.prototype.get",!0),sZ=Ym("WeakMap.prototype.set",!0),cZ=Ym("WeakMap.prototype.has",!0),uZ=Ym("WeakMap.prototype.delete",!0);DD.exports=is?a(function(){var t,n,o={assert:a(function(r){if(!o.has(r))throw new iZ("Side channel does not contain "+oZ(r))},"assert"),delete:a(function(r){if(is&&r&&(typeof r=="object"||typeof r=="function")){if(t)return uZ(t,r)}else if(Jm&&n)return n.delete(r);return!1},"delete"),get:a(function(r){return is&&r&&(typeof r=="object"||typeof r=="function")&&t?aZ(t,r):n&&n.get(r)},"get"),has:a(function(r){return is&&r&&(typeof r=="object"||typeof r=="function")&&t?cZ(t,r):!!n&&n.has(r)},"has"),set:a(function(r,i){is&&r&&(typeof r=="object"||typeof r=="function")?(t||(t=new is),sZ(t,r,i)):Jm&&(n||(n=Jm()),n.set(r,i))},"set")};return o},"getSideChannelWeakMap"):Jm});var bT=z((Fce,zD)=>{"use strict";var lZ=Io(),dZ=Ku(),pZ=ID(),fZ=_T(),mZ=ND(),hZ=mZ||fZ||pZ;zD.exports=a(function(){var t,n={assert:a(function(o){if(!n.has(o))throw new lZ("Side channel does not contain "+dZ(o))},"assert"),delete:a(function(o){return!!t&&t.delete(o)},"delete"),get:a(function(o){return t&&t.get(o)},"get"),has:a(function(o){return!!t&&t.has(o)},"has"),set:a(function(o,r){t||(t=hZ()),t.set(o,r)},"set")};return n},"getSideChannel")});var Xm=z((qce,UD)=>{"use strict";var gZ=String.prototype.replace,yZ=/%20/g,ET={RFC1738:"RFC1738",RFC3986:"RFC3986"};UD.exports={default:ET.RFC3986,formatters:{RFC1738:a(function(e){return gZ.call(e,yZ,"+")},"RFC1738"),RFC3986:a(function(e){return String(e)},"RFC3986")},RFC1738:ET.RFC1738,RFC3986:ET.RFC3986}});var wT=z((Gce,MD)=>{"use strict";var vZ=Xm(),_Z=bT(),ST=Object.prototype.hasOwnProperty,Ri=Array.isArray,Qm=_Z(),as=a(function(t,n){return Qm.set(t,n),t},"markOverflow"),Ci=a(function(t){return Qm.has(t)},"isOverflow"),Yu=a(function(t){return Qm.get(t)},"getMaxIndex"),PT=a(function(t,n){Qm.set(t,n)},"setMaxIndex"),An=(function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e})(),bZ=a(function(t){for(;t.length>1;){var n=t.pop(),o=n.obj[n.prop];if(Ri(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"),Xu=a(function(t,n){for(var o=n&&n.plainObjects?{__proto__:null}:{},r=0;r<t.length;++r)typeof t[r]<"u"&&(o[r]=t[r]);return o},"arrayToObject"),EZ=a(function e(t,n,o){if(!n)return t;if(typeof n!="object"&&typeof n!="function"){if(Ri(t)){var r=t.length;if(o&&typeof o.arrayLimit=="number"&&r>o.arrayLimit)return as(Xu(t.concat(n),o),r);t[r]=n}else if(t&&typeof t=="object")if(Ci(t)){var i=Yu(t)+1;t[i]=n,PT(t,i)}else{if(o&&o.strictMerge)return[t,n];(o&&(o.plainObjects||o.allowPrototypes)||!ST.call(Object.prototype,n))&&(t[n]=!0)}else return[t,n];return t}if(!t||typeof t!="object"){if(Ci(n)){for(var s=Object.keys(n),u=o&&o.plainObjects?{__proto__:null,0:t}:{0:t},d=0;d<s.length;d++){var f=parseInt(s[d],10);u[f+1]=n[s[d]]}return as(u,Yu(n)+1)}var h=[t].concat(n);return o&&typeof o.arrayLimit=="number"&&h.length>o.arrayLimit?as(Xu(h,o),h.length-1):h}var g=t;return Ri(t)&&!Ri(n)&&(g=Xu(t,o)),Ri(t)&&Ri(n)?(n.forEach(function(m,p){if(ST.call(t,p)){var y=t[p];y&&typeof y=="object"&&m&&typeof m=="object"?t[p]=e(y,m,o):t[t.length]=m}else t[p]=m}),t):Object.keys(n).reduce(function(m,p){var y=n[p];if(ST.call(m,p)?m[p]=e(m[p],y,o):m[p]=y,Ci(n)&&!Ci(m)&&as(m,Yu(n)),Ci(m)){var v=parseInt(p,10);String(v)===p&&v>=0&&v>Yu(m)&&PT(m,v)}return m},g)},"merge"),SZ=a(function(t,n){return Object.keys(n).reduce(function(o,r){return o[r]=n[r],o},t)},"assignSingleSource"),TZ=a(function(e,t,n){var o=e.replace(/\+/g," ");if(n==="iso-8859-1")return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch{return o}},"decode"),TT=1024,PZ=a(function(t,n,o,r,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),o==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var u="",d=0;d<s.length;d+=TT){for(var f=s.length>=TT?s.slice(d,d+TT):s,h=[],g=0;g<f.length;++g){var m=f.charCodeAt(g);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===vZ.RFC1738&&(m===40||m===41)){h[h.length]=f.charAt(g);continue}if(m<128){h[h.length]=An[m];continue}if(m<2048){h[h.length]=An[192|m>>6]+An[128|m&63];continue}if(m<55296||m>=57344){h[h.length]=An[224|m>>12]+An[128|m>>6&63]+An[128|m&63];continue}g+=1,m=65536+((m&1023)<<10|f.charCodeAt(g)&1023),h[h.length]=An[240|m>>18]+An[128|m>>12&63]+An[128|m>>6&63]+An[128|m&63]}u+=h.join("")}return u},"encode"),wZ=a(function(t){for(var n=[{obj:{o:t},prop:"o"}],o=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],u=Object.keys(s),d=0;d<u.length;++d){var f=u[d],h=s[f];typeof h=="object"&&h!==null&&o.indexOf(h)===-1&&(n[n.length]={obj:s,prop:f},o[o.length]=h)}return bZ(n),t},"compact"),xZ=a(function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},"isRegExp"),AZ=a(function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},"isBuffer"),IZ=a(function(t,n,o,r){if(Ci(t)){var i=Yu(t)+1;return t[i]=n,PT(t,i),t}var s=[].concat(t,n);return s.length>o?as(Xu(s,{plainObjects:r}),s.length-1):s},"combine"),RZ=a(function(t,n){if(Ri(t)){for(var o=[],r=0;r<t.length;r+=1)o[o.length]=n(t[r]);return o}return n(t)},"maybeMap");MD.exports={arrayToObject:Xu,assign:SZ,combine:IZ,compact:wZ,decode:TZ,encode:PZ,isBuffer:AZ,isOverflow:Ci,isRegExp:xZ,markOverflow:as,maybeMap:RZ,merge:EZ}});var VD=z((Zce,qD)=>{"use strict";var jD=bT(),eh=wT(),Qu=Xm(),CZ=Object.prototype.hasOwnProperty,FD={brackets:a(function(t){return t+"[]"},"brackets"),comma:"comma",indices:a(function(t,n){return t+"["+n+"]"},"indices"),repeat:a(function(t){return t},"repeat")},In=Array.isArray,OZ=Array.prototype.push,BD=a(function(e,t){OZ.apply(e,In(t)?t:[t])},"pushToArray"),kZ=Date.prototype.toISOString,LD=Qu.default,Ot={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:eh.encode,encodeValuesOnly:!1,filter:void 0,format:LD,formatter:Qu.formatters[LD],indices:!1,serializeDate:a(function(t){return kZ.call(t)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},$Z=a(function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},"isNonNullishPrimitive"),xT={},DZ=a(function e(t,n,o,r,i,s,u,d,f,h,g,m,p,y,v,E,b,k){for(var N=t,Z=k,H=0,K=!1;(Z=Z.get(xT))!==void 0&&!K;){var ee=Z.get(t);if(H+=1,typeof ee<"u"){if(ee===H)throw new RangeError("Cyclic object value");K=!0}typeof Z.get(xT)>"u"&&(H=0)}if(typeof h=="function"?N=h(n,N):N instanceof Date?N=p(N):o==="comma"&&In(N)&&(N=eh.maybeMap(N,function(rt){return rt instanceof Date?p(rt):rt})),N===null){if(s)return f&&!E?f(n,Ot.encoder,b,"key",y):n;N=""}if($Z(N)||eh.isBuffer(N)){if(f){var se=E?n:f(n,Ot.encoder,b,"key",y);return[v(se)+"="+v(f(N,Ot.encoder,b,"value",y))]}return[v(n)+"="+v(String(N))]}var Q=[];if(typeof N>"u")return Q;var Le;if(o==="comma"&&In(N))E&&f&&(N=eh.maybeMap(N,f)),Le=[{value:N.length>0?N.join(",")||null:void 0}];else if(In(h))Le=h;else{var ce=Object.keys(N);Le=g?ce.sort(g):ce}var J=d?String(n).replace(/\./g,"%2E"):String(n),W=r&&In(N)&&N.length===1?J+"[]":J;if(i&&In(N)&&N.length===0)return W+"[]";for(var ne=0;ne<Le.length;++ne){var X=Le[ne],pe=typeof X=="object"&&X&&typeof X.value<"u"?X.value:N[X];if(!(u&&pe===null)){var he=m&&d?String(X).replace(/\./g,"%2E"):String(X),Ne=In(N)?typeof o=="function"?o(W,he):W:W+(m?"."+he:"["+he+"]");k.set(t,H);var je=jD();je.set(xT,k),BD(Q,e(pe,Ne,o,r,i,s,u,d,o==="comma"&&E&&In(N)?null:f,h,g,m,p,y,v,E,b,je))}}return Q},"stringify"),NZ=a(function(t){if(!t)return Ot;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Ot.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var o=Qu.default;if(typeof t.format<"u"){if(!CZ.call(Qu.formatters,t.format))throw new TypeError("Unknown format option provided.");o=t.format}var r=Qu.formatters[o],i=Ot.filter;(typeof t.filter=="function"||In(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in FD?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=Ot.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Ot.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ot.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ot.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ot.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Ot.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ot.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Ot.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Ot.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ot.encodeValuesOnly,filter:i,format:o,formatter:r,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ot.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ot.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ot.strictNullHandling}},"normalizeStringifyOptions");qD.exports=function(e,t){var n=e,o=NZ(t),r,i;typeof o.filter=="function"?(i=o.filter,n=i("",n)):In(o.filter)&&(i=o.filter,r=i);var s=[];if(typeof n!="object"||n===null)return"";var u=FD[o.arrayFormat],d=u==="comma"&&o.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var f=jD(),h=0;h<r.length;++h){var g=r[h],m=n[g];o.skipNulls&&m===null||BD(s,DZ(m,g,u,d,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,f))}var p=s.join(o.delimiter),y=o.addQueryPrefix===!0?"?":"";return o.charsetSentinel&&(o.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),p.length>0?y+p:""}});var ZD=z((Kce,HD)=>{"use strict";var Rn=wT(),th=Object.prototype.hasOwnProperty,AT=Array.isArray,_t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Rn.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},zZ=a(function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},"interpretNumericEntities"),GD=a(function(e,t,n){if(e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return e},"parseArrayValue"),UZ="utf8=%26%2310003%3B",MZ="utf8=%E2%9C%93",LZ=a(function(t,n){var o={__proto__:null},r=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;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,d,f=n.charset;if(n.charsetSentinel)for(d=0;d<s.length;++d)s[d].indexOf("utf8=")===0&&(s[d]===MZ?f="utf-8":s[d]===UZ&&(f="iso-8859-1"),u=d,d=s.length);for(d=0;d<s.length;++d)if(d!==u){var h=s[d],g=h.indexOf("]="),m=g===-1?h.indexOf("="):g+1,p,y;if(m===-1?(p=n.decoder(h,_t.decoder,f,"key"),y=n.strictNullHandling?null:""):(p=n.decoder(h.slice(0,m),_t.decoder,f,"key"),p!==null&&(y=Rn.maybeMap(GD(h.slice(m+1),n,AT(o[p])?o[p].length:0),function(E){return n.decoder(E,_t.decoder,f,"value")}))),y&&n.interpretNumericEntities&&f==="iso-8859-1"&&(y=zZ(String(y))),h.indexOf("[]=")>-1&&(y=AT(y)?[y]:y),n.comma&&AT(y)&&y.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");y=Rn.combine([],y,n.arrayLimit,n.plainObjects)}if(p!==null){var v=th.call(o,p);v&&(n.duplicates==="combine"||h.indexOf("[]=")>-1)?o[p]=Rn.combine(o[p],y,n.arrayLimit,n.plainObjects):(!v||n.duplicates==="last")&&(o[p]=y)}}return o},"parseQueryStringValues"),jZ=a(function(e,t,n,o){var r=0;if(e.length>0&&e[e.length-1]==="[]"){var i=e.slice(0,-1).join("");r=Array.isArray(t)&&t[i]?t[i].length:0}for(var s=o?t:GD(t,n,r),u=e.length-1;u>=0;--u){var d,f=e[u];if(f==="[]"&&n.parseArrays)Rn.isOverflow(s)?d=s:d=n.allowEmptyArrays&&(s===""||n.strictNullHandling&&s===null)?[]:Rn.combine([],s,n.arrayLimit,n.plainObjects);else{d=n.plainObjects?{__proto__:null}:{};var h=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,g=n.decodeDotInKeys?h.replace(/%2E/g,"."):h,m=parseInt(g,10),p=!isNaN(m)&&f!==g&&String(m)===g&&m>=0&&n.parseArrays;if(!n.parseArrays&&g==="")d={0:s};else if(p&&m<n.arrayLimit)d=[],d[m]=s;else{if(p&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");p?(d[m]=s,Rn.markOverflow(d,m)):g!=="__proto__"&&(d[g]=s)}}s=d}return s},"parseObject"),FZ=a(function(t,n){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(n.depth<=0)return!n.plainObjects&&th.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,d=[];if(u){if(!n.plainObjects&&th.call(Object.prototype,u)&&!n.allowPrototypes)return;d[d.length]=u}for(var f=0;(s=i.exec(o))!==null&&f<n.depth;){f+=1;var h=s[1].slice(1,-1);if(!n.plainObjects&&th.call(Object.prototype,h)&&!n.allowPrototypes)return;d[d.length]=s[1]}if(s){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");d[d.length]="["+o.slice(s.index)+"]"}return d},"splitKeyIntoSegments"),BZ=a(function(t,n,o,r){if(t){var i=FZ(t,o);if(i)return jZ(i,n,o,r)}},"parseQueryStringKeys"),qZ=a(function(t){if(!t)return _t;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var n=typeof t.charset>"u"?_t.charset:t.charset,o=typeof t.duplicates>"u"?_t.duplicates:t.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var r=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:_t.allowDots:!!t.allowDots;return{allowDots:r,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:_t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:_t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:_t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:_t.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:_t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:_t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:_t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:_t.decoder,delimiter:typeof t.delimiter=="string"||Rn.isRegExp(t.delimiter)?t.delimiter:_t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:_t.depth,duplicates:o,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:_t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:_t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:_t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:_t.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:_t.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:_t.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},"normalizeParseOptions");HD.exports=function(e,t){var n=qZ(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?{__proto__:null}:{};for(var o=typeof e=="string"?LZ(e,n):e,r=n.plainObjects?{__proto__:null}:{},i=Object.keys(o),s=0;s<i.length;++s){var u=i[s],d=BZ(u,o[u],n,typeof e=="string");r=Rn.merge(r,d,n)}return n.allowSparse===!0?r:Rn.compact(r)}});var IT=z((Yce,WD)=>{"use strict";var VZ=VD(),GZ=ZD(),HZ=Xm();WD.exports={formats:HZ,parse:GZ,stringify:VZ}});var JD=z((RT,KD)=>{(function(e,t){typeof RT=="object"?KD.exports=t():typeof define=="function"&&define.amd?define([],t):e.urltemplate=t()})(RT,function(){function e(){}return a(e,"UrlTemplate"),e.prototype.encodeReserved=function(t){return t.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("")},e.prototype.encodeUnreserved=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})},e.prototype.encodeValue=function(t,n,o){return n=t==="+"||t==="#"?this.encodeReserved(n):this.encodeUnreserved(n),o?this.encodeUnreserved(o)+"="+n:n},e.prototype.isDefined=function(t){return t!=null},e.prototype.isKeyOperator=function(t){return t===";"||t==="&"||t==="?"},e.prototype.getValues=function(t,n,o,r){var i=t[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(d){s.push(this.encodeValue(n,d,this.isKeyOperator(n)?o:null))},this):Object.keys(i).forEach(function(d){this.isDefined(i[d])&&s.push(this.encodeValue(n,i[d],d))},this);else{var u=[];Array.isArray(i)?i.filter(this.isDefined).forEach(function(d){u.push(this.encodeValue(n,d))},this):Object.keys(i).forEach(function(d){this.isDefined(i[d])&&(u.push(this.encodeUnreserved(d)),u.push(this.encodeValue(n,i[d].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},e.prototype.parse=function(t){var n=this,o=["+","#",".","/",";","?","&"];return{expand:a(function(r){return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(i,s,u){if(s){var d=null,f=[];if(o.indexOf(s.charAt(0))!==-1&&(d=s.charAt(0),s=s.substr(1)),s.split(/,/g).forEach(function(g){var m=/([^:\*]*)(?::(\d+)|(\*))?/.exec(g);f.push.apply(f,n.getValues(r,d,m[1],m[2]||m[3]))}),d&&d!=="+"){var h=",";return d==="?"?h="&":d!=="#"&&(h=d),(f.length!==0?d:"")+f.join(h)}else return f.join(",")}else return n.encodeReserved(u)})},"expand")}},new e})});var YD=z(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.isBrowser=ZZ;function ZZ(){return typeof window<"u"}a(ZZ,"isBrowser")});var nh=z(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});rh.headersToClassicHeaders=XD;rh.marshallGaxiosResponse=WZ;function XD(e){let t={};if(e instanceof Headers)e.forEach((n,o)=>{t[o]=n});else if(Array.isArray(e))for(let[n,o]of e)t[n]=o;else t=e||{};return t}a(XD,"headersToClassicHeaders");function WZ(e){return Object.defineProperties(e||{},{headers:{configurable:!0,writable:!0,enumerable:!0,value:XD(e?.headers)}})}a(WZ,"marshallGaxiosResponse")});var tN=z(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.sessions=void 0;Or.request=sW;Or.closeSession=OT;var eN=require("http2"),KZ=require("zlib"),JZ=require("url"),YZ=IT(),XZ=fu(),QZ=require("stream"),eW=require("util"),tW=require("process"),rW=nh(),{HTTP2_HEADER_CONTENT_ENCODING:nW,HTTP2_HEADER_CONTENT_TYPE:QD,HTTP2_HEADER_METHOD:oW,HTTP2_HEADER_PATH:iW,HTTP2_HEADER_STATUS:aW}=eN.constants,el=!!tW.env.HTTP2_DEBUG;Or.sessions={};async function sW(e){let t=XZ(!0,{},e);t.validateStatus=t.validateStatus||cW,t.responseType=t.responseType||"json";let n=new JZ.URL(t.url),o=uW(n.host);o.timeoutHandle!==void 0&&clearTimeout(o.timeoutHandle);let r=n.pathname;if(e.params&&Object.keys(e.params).length>0){let g=(e.paramsSerializer||YZ.stringify)(t.params);r+=`?${g}`}let i=(0,rW.headersToClassicHeaders)(t.headers);i[iW]=r,i[oW]=e.method||"GET",t.headers=i,i[QD]||t.responseType!=="text"&&(i[QD]="application/json");let s={config:e,headers:{},status:0,data:{},statusText:""},u=[],d=o.session,f;return new Promise((h,g)=>{try{f=d.request(i).on("response",m=>{Object.assign(s,{headers:m,status:m[aW]});let p=f;if(m[nW]==="gzip"&&(p=f.pipe(KZ.createGunzip())),t.responseType==="stream"){s.data=p,h(s);return}p.on("data",y=>{u.push(y)}).on("error",y=>{g(y)}).on("end",()=>{let y=Buffer.concat(u),v=y;if(y){if(t.responseType==="json")try{v=JSON.parse(y.toString("utf8"))}catch{v=y.toString("utf8")}else t.responseType==="text"?v=y.toString("utf8"):t.responseType==="arraybuffer"&&(v=y.buffer);s.data=v}if(!t.validateStatus(s.status)){let E=`Request failed with status code ${s.status}. `;if(s.data&&typeof s.data=="object"){let b=eW.inspect(s.data,{depth:5});E=`${E}
59
+ '${b}`}g(new Error(E,{cause:s}))}h(s)})}).on("error",m=>{g(m)})}catch(m){OT(n).then(()=>g(m)).catch(g);return}if(s.request=f,e.data){if(e.data instanceof QZ.Stream)e.data.pipe(f);else if(typeof e.data=="string"){let m=Buffer.from(e.data);f.end(m)}else if(typeof e.data=="object"){let m=JSON.stringify(e.data);f.end(m)}}o.timeoutHandle=setTimeout(()=>OT(n),500)})}a(sW,"request");function cW(e){return e>=200&&e<300}a(cW,"validateStatus");function uW(e){if(Or.sessions[e])el&&console.log(`Used cached client for ${e}`);else{el&&console.log(`Creating client for ${e}`);let t=eN.connect(`https://${e}`);t.on("error",n=>{console.error(`*ERROR*: ${n}`),delete Or.sessions[e]}).on("goaway",(n,o)=>{console.error(`*GOAWAY*: ${n} : ${o}`),delete Or.sessions[e]}),Or.sessions[e]={session:t}}return Or.sessions[e]}a(uW,"_getClient");async function OT(e){let t=Or.sessions[e.host];if(!t)return;let{session:n}=t;delete Or.sessions[e.host],el&&console.error(`Closing ${e.host}`),n.close(()=>{el&&console.error(`Closed ${e.host}`)}),setTimeout(()=>{n&&!n.destroyed&&(el&&console.log(`Forcing close ${e.host}`),n&&n.destroy())},1e3)}a(OT,"closeSession")});var rN=z((iue,lW)=>{lW.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 oh=z(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});zT.createAPIRequest=hW;var kT=Pt(),dW=IT(),sN=require("stream"),nN=JD(),oN=fu(),DT=YD(),pW=tN(),$T=nh(),cN=rN(),iN=a(()=>globalThis.crypto?.randomUUID()||require("crypto").randomUUID(),"randomUUID");function fW(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"}a(fW,"isReadableStream");function mW(e,t){let n=new Array;return t.forEach(o=>{e[o]===void 0&&n.push(o)}),n.length>0?n:null}a(mW,"getMissingParams");function hW(e,t){if(t)aN(e).then(n=>t(null,n),t);else return aN(e)}a(hW,"createAPIRequest");async function aN(e){let t=oN(!0,{},e.context.google?._options||{},e.context._options||{},e.options),n=oN(!0,{},t.params,e.params);t.userAgentDirectives=t.userAgentDirectives||[];let o=n.media||{},r=n.requestBody;!n.requestBody&&n.resource&&(!e.requiredParams.includes("resource")||typeof n.resource!="string")&&(r=n.resource,delete n.resource),delete n.requestBody;let i=n.auth||t.auth,s=typeof o.body=="string"?"text/plain":"application/octet-stream";delete n.media,delete n.auth;let u=(0,$T.headersToClassicHeaders)(n.headers||{});gW(u,t.apiVersion),delete n.headers,Object.keys(n).forEach(p=>{if(p.slice(-1)==="_"){let y=p.slice(0,-1);n[y]=n[p],delete n[p]}});let d=mW(n,e.requiredParams);if(d)throw new Error("Missing required parameters: "+d.join(", "));if(t.url){let p=t.url;typeof p=="object"&&(p=p.toString()),t.url=nN.parse(p).expand(n)}if(e.mediaUrl&&(e.mediaUrl=nN.parse(e.mediaUrl).expand(n)),e.context._options.rootUrl!==void 0&&t.url!==void 0){let p=new URL(t.url),y=p.href.substr(p.origin.length);t.url=new URL(y,e.context._options.rootUrl).href}t.paramsSerializer=p=>dW.stringify(p,{arrayFormat:"repeat"}),e.pathParams.forEach(p=>delete n[p]),typeof i=="string"&&(n.key=n.key||i,i=void 0);function f(p){let y=iN(),v=`--${y}--`,E=new sN.PassThrough({flush(N){this.push(`\r
60
+ `),this.push(v),N()}}),b=new NT,k=fW(p[1].body);u["content-type"]=`multipart/related; boundary=${y}`;for(let N of p){let Z=`--${y}\r
61
+ content-type: ${N["content-type"]}\r
62
62
  \r
63
- `;E.push(Y),typeof U.body=="string"?(E.push(U.body),E.push(`\r
64
- `)):(b.on("progress",Z=>{e.onUploadProgress&&e.onUploadProgress({bytesRead:Z})}),U.body.pipe(b).pipe(E))}C||(E.push(v),E.push(null)),e.data=E}o(h,"multipartUpload");function y(l){let g=tx(),v=`--${g}--`;d["content-type"]=`multipart/related; boundary=${g}`;let E="";for(let b of l){let C=`--${g}\r
63
+ `;E.push(Z),typeof N.body=="string"?(E.push(N.body),E.push(`\r
64
+ `)):(b.on("progress",H=>{t.onUploadProgress&&t.onUploadProgress({bytesRead:H})}),N.body.pipe(b).pipe(E))}k||(E.push(v),E.push(null)),t.data=E}a(f,"multipartUpload");function h(p){let y=iN(),v=`--${y}--`;u["content-type"]=`multipart/related; boundary=${y}`;let E="";for(let b of p){let k=`--${y}\r
65
65
  content-type: ${b["content-type"]}\r
66
66
  \r
67
- `;E+=C,typeof b.body=="string"&&(E+=b.body,E+=`\r
68
- `)}E+=v,e.data=E}if(o(y,"browserMultipartUpload"),t.mediaUrl&&n.body)if(e.url=t.mediaUrl,i){r.uploadType="multipart";let l=[{"content-type":"application/json",body:JSON.stringify(i)},{"content-type":n.mimeType||i&&i.mimeType||u,body:n.body}];(0,Um.isBrowser)()?y(l):h(l)}else r.uploadType="media",Object.assign(d,{"content-type":n.mimeType||u}),e.data=n.body;else e.data=i||void 0;if(e.headers=Nm.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:ox.version,comment:"gzip"});let l=e.userAgentDirectives.map(g=>{let v=`${g.product}/${g.version}`;return g.comment&&(v+=` (${g.comment})`),v}).join(" ");e.headers.set("User-Agent",l)}if(e.validateStatus||(e.validateStatus=l=>l>=200&&l<300||l===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 m=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,f=e.universeDomain??e.universe_domain??m??"googleapis.com";if(f!=="googleapis.com"&&e.url){let l=new URL(e.url);l.hostname.endsWith(".googleapis.com")&&(l.hostname=l.hostname.replace(/googleapis\.com$/,f),e.url=l.toString())}if(Object.keys(e.params).length||(delete e.params,delete e.paramsSerializer),s&&typeof s=="object"){let l=typeof s.getUniverseDomain=="function"?await s.getUniverseDomain():void 0;if(l&&f!==l)throw new Error(`The configured universe domain (${f}) does not match the universe domain found in the credentials (${l}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(e.http2){let g=await s.getRequestHeaders(e.url),v=Object.assign({},e);return v.headers=Nm.Gaxios.mergeHeaders(v.headers,g),tL.request(v)}else{let g=await s.request(e);return(0,zm.marshallGaxiosResponse)(g)}}else return new Nm.Gaxios().request(e).then(l=>(0,zm.marshallGaxiosResponse)(l))}o(rx,"createAPIRequestAsync");var Mm=class extends nx.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 iL(t,e){(0,Um.isBrowser)()||(t["x-goog-api-client"]=`gdcl/${ox.version} gl-node/${process.versions.node}`),e&&(t["x-goog-api-version"]=e)}o(iL,"populateAPIHeader")});var ix=D(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.AuthPlus=void 0;var wn=Va(),jm=class extends wn.GoogleAuth{static{o(this,"AuthPlus")}JWT=wn.JWT;Compute=wn.Compute;OAuth2=wn.OAuth2Client;GoogleAuth=wn.GoogleAuth;AwsClient=wn.AwsClient;IdentityPoolClient=wn.IdentityPoolClient;ExternalAccountClient=wn.ExternalAccountClient;_cachedAuth;async getClient(e){return this._cachedAuth=new wn.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()}};qu.AuthPlus=jm});var qm=D(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.Endpoint=void 0;var ax=Fu(),Fm=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 u=n.resources[s];e[s]||(e[s]={}),this.applySchema(e[s],r,u,i)}}}applyMethodsFromSchema(e,r,n,i){if(n.methods){for(let s in n.methods)if(Object.prototype.hasOwnProperty.call(n.methods,s)){let u=n.methods[s];e[s]=this.makeMethod(r,u,i)}}}makeMethod(e,r,n){return(i,s)=>{let u=typeof i=="function"?{}:i;s=typeof i=="function"?i:s;let d=sx(e.rootUrl+e.servicePath+r.path),p={options:{url:d.substring(1,d.length-1),method:r.httpMethod,apiVersion:r.apiVersion},params:u,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 h=sx(e.rootUrl+r.mediaUpload.protocols.simple.path);p.mediaUrl=h.substring(1,h.length-1)}if(!s)return(0,ax.createAPIRequest)(p);(0,ax.createAPIRequest)(p,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}};Bu.Endpoint=Fm;function sx(t){return t?`'${t}'`.replace(/([^:]\/)\/+/g,"$1"):""}o(sx,"buildurl")});var ux=D(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.Discovery=void 0;var aL=require("fs"),sL=ht(),cL=require("url"),cx=require("util"),uL=Fu(),lL=qm(),dL=cx.promisify(aL.readFile),Bm=class{static{o(this,"Discovery")}transporter=new sL.Gaxios;options;constructor(e){this.options=e||{}}makeEndpoint(e){return r=>{let n=new lL.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 p=>{let h=await this.discoverAPI(p.discoveryRestUrl);return{api:p,endpointCreator:h}})),u={},d={};for(let p of s)d[p.api.name]||(u[p.api.name]={},d[p.api.name]=h=>{let y=typeof h,m;if(y==="string")m=h,h={};else if(y==="object")m=h.version,delete h.version;else throw new Error("Argument error: Accepts only string or object");try{let f=p.endpointCreator(h,this);return Object.freeze(f)}catch(f){throw new Error(cx.format('Unable to load endpoint %s("%s"): %s',p.api.name,m,f.message))}}),u[p.api.name][p.api.version]=p.endpointCreator;return d}async discoverAPI(e){if(typeof e=="string"){let r=cL.parse(e);if(e&&!r.protocol){this.log("Reading from file "+e);let n=await dL(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,uL.createAPIRequest)(i);return this.makeEndpoint(s.data)}}};Vu.Discovery=Bm});var Gu=D(Oe=>{"use strict";var pL=Oe&&Oe.__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]})),fL=Oe&&Oe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pL(e,t,r)};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=Va();Oe.gaxios=ht();var Pn=Va();Object.defineProperty(Oe,"OAuth2Client",{enumerable:!0,get:o(function(){return Pn.OAuth2Client},"get")});Object.defineProperty(Oe,"JWT",{enumerable:!0,get:o(function(){return Pn.JWT},"get")});Object.defineProperty(Oe,"Compute",{enumerable:!0,get:o(function(){return Pn.Compute},"get")});Object.defineProperty(Oe,"UserRefreshClient",{enumerable:!0,get:o(function(){return Pn.UserRefreshClient},"get")});Object.defineProperty(Oe,"GoogleAuth",{enumerable:!0,get:o(function(){return Pn.GoogleAuth},"get")});Object.defineProperty(Oe,"ExternalAccountClient",{enumerable:!0,get:o(function(){return Pn.ExternalAccountClient},"get")});Object.defineProperty(Oe,"BaseExternalAccountClient",{enumerable:!0,get:o(function(){return Pn.BaseExternalAccountClient},"get")});Object.defineProperty(Oe,"IdentityPoolClient",{enumerable:!0,get:o(function(){return Pn.IdentityPoolClient},"get")});Object.defineProperty(Oe,"AwsClient",{enumerable:!0,get:o(function(){return Pn.AwsClient},"get")});var lx=ht();Object.defineProperty(Oe,"Gaxios",{enumerable:!0,get:o(function(){return lx.Gaxios},"get")});Object.defineProperty(Oe,"GaxiosError",{enumerable:!0,get:o(function(){return lx.GaxiosError},"get")});var mL=eP();Object.defineProperty(Oe,"getAPI",{enumerable:!0,get:o(function(){return mL.getAPI},"get")});var hL=Fu();Object.defineProperty(Oe,"createAPIRequest",{enumerable:!0,get:o(function(){return hL.createAPIRequest},"get")});var gL=ix();Object.defineProperty(Oe,"AuthPlus",{enumerable:!0,get:o(function(){return gL.AuthPlus},"get")});var yL=ux();Object.defineProperty(Oe,"Discovery",{enumerable:!0,get:o(function(){return yL.Discovery},"get")});var vL=qm();Object.defineProperty(Oe,"Endpoint",{enumerable:!0,get:o(function(){return vL.Endpoint},"get")});fL(ju(),Oe)});var px=D(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.calendar_v3=void 0;var oe=Gu(),dx;(function(t){class e{static{o(this,"Calendar")}context;acl;calendarList;calendars;channels;colors;events;freebusy;settings;constructor(m,f){this.context={_options:m||{},google:f},this.acl=new r(this.context),this.calendarList=new n(this.context),this.calendars=new i(this.context),this.channels=new s(this.context),this.colors=new u(this.context),this.events=new d(this.context),this.freebusy=new p(this.context),this.settings=new h(this.context)}}t.Calendar=e;class r{static{o(this,"Resource$Acl")}context;constructor(m){this.context=m}delete(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Acl=r;class n{static{o(this,"Resource$Calendarlist")}context;constructor(m){this.context=m}delete(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Calendarlist=n;class i{static{o(this,"Resource$Calendars")}context;constructor(m){this.context=m}clear(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/clear").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}delete(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Calendars=i;class s{static{o(this,"Resource$Channels")}context;constructor(m){this.context=m}stop(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Channels=s;class u{static{o(this,"Resource$Colors")}context;constructor(m){this.context=m}get(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/colors").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Colors=u;class d{static{o(this,"Resource$Events")}context;constructor(m){this.context=m}delete(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}get(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}import(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/import").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}insert(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}instances(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/instances").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}move(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/move").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId","destination"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}patch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}quickAdd(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/quickAdd").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId","text"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}update(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:g,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Events=d;class p{static{o(this,"Resource$Freebusy")}context;constructor(m){this.context=m}query(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/freeBusy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Freebusy=p;class h{static{o(this,"Resource$Settings")}context;constructor(m){this.context=m}get(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/{setting}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:["setting"],pathParams:["setting"],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}list(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}watch(m,f,l){let g=m||{},v=f||{};typeof m=="function"&&(l=m,g={},v={}),typeof f=="function"&&(l=f,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:g,requiredParams:[],pathParams:[],context:this.context};if(l)(0,oe.createAPIRequest)(b,l);else return(0,oe.createAPIRequest)(b)}}t.Resource$Settings=h})(dx||(Hu.calendar_v3=dx={}))});var xn=D(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.AuthPlus=Er.calendar_v3=Er.auth=Er.VERSIONS=void 0;Er.calendar=_L;var fx=Gu(),mx=px();Object.defineProperty(Er,"calendar_v3",{enumerable:!0,get:o(function(){return mx.calendar_v3},"get")});Er.VERSIONS={v3:mx.calendar_v3.Calendar};function _L(t){return(0,fx.getAPI)("calendar",t,Er.VERSIONS,this)}o(_L,"calendar");var bL=new fx.AuthPlus;Er.auth=bL;var EL=Gu();Object.defineProperty(Er,"AuthPlus",{enumerable:!0,get:o(function(){return EL.AuthPlus},"get")})});var Fx=D((oh,ih)=>{(function(t,e){typeof oh=="object"&&typeof ih<"u"?ih.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_utc=e()})(oh,(function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,s){var u=i.prototype;s.utc=function(l){var g={date:l,utc:!0,args:arguments};return new i(g)},u.utc=function(l){var g=s(this.toDate(),{locale:this.$L,utc:!0});return l?g.add(this.utcOffset(),t):g},u.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var d=u.parse;u.parse=function(l){l.utc&&(this.$u=!0),this.$utils().u(l.$offset)||(this.$offset=l.$offset),d.call(this,l)};var p=u.init;u.init=function(){if(this.$u){var l=this.$d;this.$y=l.getUTCFullYear(),this.$M=l.getUTCMonth(),this.$D=l.getUTCDate(),this.$W=l.getUTCDay(),this.$H=l.getUTCHours(),this.$m=l.getUTCMinutes(),this.$s=l.getUTCSeconds(),this.$ms=l.getUTCMilliseconds()}else p.call(this)};var h=u.utcOffset;u.utcOffset=function(l,g){var v=this.$utils().u;if(v(l))return this.$u?0:v(this.$offset)?h.call(this):this.$offset;if(typeof l=="string"&&(l=(function(U){U===void 0&&(U="");var Y=U.match(e);if(!Y)return null;var Z=(""+Y[0]).match(r)||["-",0,0],G=Z[0],X=60*+Z[1]+ +Z[2];return X===0?0:G==="+"?X:-X})(l),l===null))return this;var E=Math.abs(l)<=16?60*l:l,b=this;if(g)return b.$offset=E,b.$u=l===0,b;if(l!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(E+C,t)).$offset=E,b.$x.$localOffset=C}else b=this.utc();return b};var y=u.format;u.format=function(l){var g=l||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,g)},u.valueOf=function(){var l=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*l},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var m=u.toDate;u.toDate=function(l){return l==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var f=u.diff;u.diff=function(l,g,v){if(l&&this.$u===l.$u)return f.call(this,l,g,v);var E=this.local(),b=s(l).local();return f.call(E,b,g,v)}}}))});var kL={};Rs(kL,{createGoogleClient:()=>_t,getAccessToken:()=>Ce,googleCalendar:()=>OL,googleCalendarAuth:()=>ne});module.exports=tR(kL);var rR=Object.freeze({status:"aborted"});function le(t,e,r){function n(d,p){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:p,constr:u,traits:new Set},enumerable:!1}),d._zod.traits.has(t))return;d._zod.traits.add(t),e(d,p);let h=u.prototype,y=Object.keys(h);for(let m=0;m<y.length;m++){let f=y[m];f in d||(d[f]=h[f].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 u(d){var p;let h=r?.Parent?new s:this;n(h,d),(p=h._zod).deferred??(p.deferred=[]);for(let y of h._zod.deferred)y();return h}return o(u,"_"),Object.defineProperty(u,"init",{value:n}),Object.defineProperty(u,Symbol.hasInstance,{value:o(d=>r?.Parent&&d instanceof r.Parent?!0:d?._zod?.traits?.has(t),"value")}),Object.defineProperty(u,"name",{value:t}),u}o(le,"$constructor");var Mr=class extends Error{static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Cs=class extends Error{static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},Cl={};function ln(t){return t&&Object.assign(Cl,t),Cl}o(ln,"config");function kl(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(kl,"getEnumValues");function gg(t,e){return typeof e=="bigint"?e.toString():e}o(gg,"jsonStringifyReplacer");function ks(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}o(ks,"cached");function yg(t){return t==null}o(yg,"nullish");function $s(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}o($s,"cleanRegex");var hg=Symbol("evaluating");function gt(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==hg)return n===void 0&&(n=hg,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}o(gt,"defineLazy");var $l="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Fi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}o(Fi,"isObject");var nR=ks(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function vg(t){if(Fi(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Fi(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}o(vg,"isPlainObject");var _g=new Set(["string","number","symbol"]);function qo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(qo,"escapeRegex");function Ds(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}o(Ds,"clone");function st(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(st,"normalizeParams");function bg(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}o(bg,"optionalKeys");var Eg={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 Bo(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(Bo,"aborted");function Nn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}o(Nn,"prefixIssues");function Os(t){return typeof t=="string"?t:t?.message}o(Os,"unwrapMessage");function zn(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Os(t.inst?._zod.def?.error?.(t))??Os(e?.error?.(t))??Os(r.customError?.(t))??Os(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}o(zn,"finalizeIssue");function Sg(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}o(Sg,"getLengthableOrigin");function Dl(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}o(Dl,"issue");var Tg=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,gg,2),Object.defineProperty(t,"toString",{value:o(()=>t.message,"value"),enumerable:!1})},"initializer"),wg=le("$ZodError",Tg),qi=le("$ZodError",Tg,{Parent:Error});var iR=o(t=>(e,r,n,i)=>{let s=n?Object.assign(n,{async:!1}):{async:!1},u=e._zod.run({value:r,issues:[]},s);if(u instanceof Promise)throw new Mr;if(u.issues.length){let d=new(i?.Err??t)(u.issues.map(p=>zn(p,s,ln())));throw $l(d,i?.callee),d}return u.value},"_parse"),Ns=iR(qi),aR=o(t=>async(e,r,n,i)=>{let s=n?Object.assign(n,{async:!0}):{async:!0},u=e._zod.run({value:r,issues:[]},s);if(u instanceof Promise&&(u=await u),u.issues.length){let d=new(i?.Err??t)(u.issues.map(p=>zn(p,s,ln())));throw $l(d,i?.callee),d}return u.value},"_parseAsync"),zs=aR(qi),sR=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 Mr;return s.issues.length?{success:!1,error:new(t??wg)(s.issues.map(u=>zn(u,i,ln())))}:{success:!0,data:s.value}},"_safeParse"),Bi=sR(qi),cR=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(u=>zn(u,i,ln())))}:{success:!0,data:s.value}},"_safeParseAsync"),Vi=cR(qi);var uR="(?:(?:\\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])))",lR=new RegExp(`^${uR}$`);var Pg=o(t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},"string"),xg=/^-?\d+n?$/,Ag=/^-?\d+$/,Nl=/^-?\d+(?:\.\d+)?$/,Ig=/^(?:true|false)$/i;var Un=le("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),dR={number:"number",bigint:"bigint",object:"date"};var Rg=le("$ZodCheckGreaterThan",(t,e)=>{Un.init(t,e);let r=dR[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 Cg=le("$ZodCheckNumberFormat",(t,e)=>{Un.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,s]=Eg[e.format];t._zod.onattach.push(u=>{let d=u._zod.bag;d.format=e.format,d.minimum=i,d.maximum=s,r&&(d.pattern=Ag)}),t._zod.check=u=>{let d=u.value;if(r){if(!Number.isInteger(d)){u.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:d,inst:t});return}if(!Number.isSafeInteger(d)){d>0?u.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}):u.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&&u.issues.push({origin:"number",input:d,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),d>s&&u.issues.push({origin:"number",input:d,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}});var Og=le("$ZodCheckMinLength",(t,e)=>{var r;Un.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!yg(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 u=Sg(i);n.issues.push({origin:u,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}});var zl=le("$ZodCheckStringFormat",(t,e)=>{var r,n;Un.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=()=>{})}),kg=le("$ZodCheckRegex",(t,e)=>{zl.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 Dg={major:4,minor:3,patch:6};var pt=le("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Dg;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((u,d,p)=>{let h=Bo(u),y;for(let m of d){if(m._zod.def.when){if(!m._zod.def.when(u))continue}else if(h)continue;let f=u.issues.length,l=m._zod.check(u);if(l instanceof Promise&&p?.async===!1)throw new Mr;if(y||l instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await l,u.issues.length!==f&&(h||(h=Bo(u,f)))});else{if(u.issues.length===f)continue;h||(h=Bo(u,f))}}return y?y.then(()=>u):u},"runChecks"),s=o((u,d,p)=>{if(Bo(u))return u.aborted=!0,u;let h=i(d,n,p);if(h instanceof Promise){if(p.async===!1)throw new Mr;return h.then(y=>t._zod.parse(y,p))}return t._zod.parse(h,p)},"handleCanaryResult");t._zod.run=(u,d)=>{if(d.skipChecks)return t._zod.parse(u,d);if(d.direction==="backward"){let h=t._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return h instanceof Promise?h.then(y=>s(y,u,d)):s(h,u,d)}let p=t._zod.parse(u,d);if(p instanceof Promise){if(d.async===!1)throw new Mr;return p.then(h=>i(h,n,d))}return i(p,n,d)}}gt(t,"~standard",()=>({validate:o(i=>{try{let s=Bi(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Vi(t,i).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Ls=le("$ZodString",(t,e)=>{pt.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Pg(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}}),Ul=le("$ZodStringFormat",(t,e)=>{zl.init(t,e),Ls.init(t,e)});var Lg=le("$ZodURL",(t,e)=>{Ul.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=le("$ZodNumber",(t,e)=>{pt.init(t,e),t._zod.pattern=t._zod.bag.pattern??Nl,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}}),jg=le("$ZodNumberFormat",(t,e)=>{Cg.init(t,e),Ml.init(t,e)}),Ll=le("$ZodBoolean",(t,e)=>{pt.init(t,e),t._zod.pattern=Ig,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}}),Fg=le("$ZodBigInt",(t,e)=>{pt.init(t,e),t._zod.pattern=xg,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 qg=le("$ZodAny",(t,e)=>{pt.init(t,e),t._zod.parse=r=>r}),Bg=le("$ZodUnknown",(t,e)=>{pt.init(t,e),t._zod.parse=r=>r});var Vg=le("$ZodVoid",(t,e)=>{pt.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}}),Gg=le("$ZodDate",(t,e)=>{pt.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 Ng(t,e,r){t.issues.length&&e.issues.push(...Nn(r,t.issues)),e.value[r]=t.value}o(Ng,"handleArrayResult");var Hg=le("$ZodArray",(t,e)=>{pt.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 u=0;u<i.length;u++){let d=i[u],p=e.element._zod.run({value:d,issues:[]},n);p instanceof Promise?s.push(p.then(h=>Ng(h,r,u))):Ng(p,r,u)}return s.length?Promise.all(s).then(()=>r):r}});function Ms(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...Nn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}o(Ms,"handlePropertyResult");function pR(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=bg(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}o(pR,"normalizeDef");function fR(t,e,r,n,i,s){let u=[],d=i.keySet,p=i.catchall._zod,h=p.def.type,y=p.optout==="optional";for(let m in e){if(d.has(m))continue;if(h==="never"){u.push(m);continue}let f=p.run({value:e[m],issues:[]},n);f instanceof Promise?t.push(f.then(l=>Ms(l,r,m,e,y))):Ms(f,r,m,e,y)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:e,inst:s}),t.length?Promise.all(t).then(()=>r):r}o(fR,"handleCatchall");var Wg=le("$ZodObject",(t,e)=>{if(pt.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let d=e.shape;Object.defineProperty(e,"shape",{get:o(()=>{let p={...d};return Object.defineProperty(e,"shape",{value:p}),p},"get")})}let n=ks(()=>pR(e));gt(t._zod,"propValues",()=>{let d=e.shape,p={};for(let h in d){let y=d[h]._zod;if(y.values){p[h]??(p[h]=new Set);for(let m of y.values)p[h].add(m)}}return p});let i=Fi,s=e.catchall,u;t._zod.parse=(d,p)=>{u??(u=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d;d.value={};let y=[],m=u.shape;for(let f of u.keys){let l=m[f],g=l._zod.optout==="optional",v=l._zod.run({value:h[f],issues:[]},p);v instanceof Promise?y.push(v.then(E=>Ms(E,d,f,h,g))):Ms(v,d,f,h,g)}return s?fR(y,h,d,p,n.value,t):y.length?Promise.all(y).then(()=>d):d}});function zg(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=>!Bo(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(u=>zn(u,n,ln())))}),e)}o(zg,"handleUnionResults");var jl=le("$ZodUnion",(t,e)=>{pt.init(t,e),gt(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),gt(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),gt(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),gt(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=>$s(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 u=!1,d=[];for(let p of e.options){let h=p._zod.run({value:i.value,issues:[]},s);if(h instanceof Promise)d.push(h),u=!0;else{if(h.issues.length===0)return h;d.push(h)}}return u?Promise.all(d).then(p=>zg(p,i,t,s)):zg(d,i,t,s)}});var Zg=le("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,jl.init(t,e);let r=t._zod.parse;gt(t._zod,"propValues",()=>{let i={};for(let s of e.options){let u=s._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[d,p]of Object.entries(u)){i[d]||(i[d]=new Set);for(let h of p)i[d].add(h)}}return i});let n=ks(()=>{let i=e.options,s=new Map;for(let u of i){let d=u._zod.propValues?.[e.discriminator];if(!d||d.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(u)}"`);for(let p of d){if(s.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);s.set(p,u)}}return s});t._zod.parse=(i,s)=>{let u=i.value;if(!Fi(u))return i.issues.push({code:"invalid_type",expected:"object",input:u,inst:t}),i;let d=n.value.get(u?.[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:u,path:[e.discriminator],inst:t}),i)}});var Kg=le("$ZodRecord",(t,e)=>{pt.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!vg(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let s=[],u=e.keyType._zod.values;if(u){r.value={};let d=new Set;for(let h of u)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){d.add(typeof h=="number"?h.toString():h);let y=e.valueType._zod.run({value:i[h],issues:[]},n);y instanceof Promise?s.push(y.then(m=>{m.issues.length&&r.issues.push(...Nn(h,m.issues)),r.value[h]=m.value})):(y.issues.length&&r.issues.push(...Nn(h,y.issues)),r.value[h]=y.value)}let p;for(let h in i)d.has(h)||(p=p??[],p.push(h));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:p})}else{r.value={};for(let d of Reflect.ownKeys(i)){if(d==="__proto__")continue;let p=e.keyType._zod.run({value:d,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&Nl.test(d)&&p.issues.length){let m=e.keyType._zod.run({value:Number(d),issues:[]},n);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(p=m)}if(p.issues.length){e.mode==="loose"?r.value[d]=i[d]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(m=>zn(m,n,ln())),input:d,path:[d],inst:t});continue}let y=e.valueType._zod.run({value:i[d],issues:[]},n);y instanceof Promise?s.push(y.then(m=>{m.issues.length&&r.issues.push(...Nn(d,m.issues)),r.value[p.value]=m.value})):(y.issues.length&&r.issues.push(...Nn(d,y.issues)),r.value[p.value]=y.value)}}return s.length?Promise.all(s).then(()=>r):r}});var Jg=le("$ZodEnum",(t,e)=>{pt.init(t,e);let r=kl(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>_g.has(typeof i)).map(i=>typeof i=="string"?qo(i):i.toString()).join("|")})$`),t._zod.parse=(i,s)=>{let u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:r,input:u,inst:t}),i}}),Yg=le("$ZodLiteral",(t,e)=>{if(pt.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"?qo(n):n?qo(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 Xg=le("$ZodTransform",(t,e)=>{pt.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Cs(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(u=>(r.value=u,r));if(i instanceof Promise)throw new Mr;return r.value=i,r}});function Ug(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}o(Ug,"handleOptionalResult");var Qg=le("$ZodOptional",(t,e)=>{pt.init(t,e),t._zod.optin="optional",t._zod.optout="optional",gt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),gt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${$s(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=>Ug(s,r.value)):Ug(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}});var ey=le("$ZodNullable",(t,e)=>{pt.init(t,e),gt(t._zod,"optin",()=>e.innerType._zod.optin),gt(t._zod,"optout",()=>e.innerType._zod.optout),gt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${$s(r.source)}|null)$`):void 0}),gt(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 ty=le("$ZodPipe",(t,e)=>{pt.init(t,e),gt(t._zod,"values",()=>e.in._zod.values),gt(t._zod,"optin",()=>e.in._zod.optin),gt(t._zod,"optout",()=>e.out._zod.optout),gt(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(u=>Us(u,e.in,n)):Us(s,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Us(s,e.out,n)):Us(i,e.out,n)}});function Us(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}o(Us,"handlePipeResult");var ry=le("$ZodCustom",(t,e)=>{Un.init(t,e),pt.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=>Mg(s,r,n,t));Mg(i,r,n,t)}});function Mg(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(Dl(i))}}o(Mg,"handleRefineResult");var oy;var Fl=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 iy(){return new Fl}o(iy,"registry");(oy=globalThis).__zod_globalRegistry??(oy.__zod_globalRegistry=iy());var ql=globalThis.__zod_globalRegistry;function ay(t,e){return new t({type:"string",...st(e)})}o(ay,"_string");function sy(t,e){return new t({type:"string",coerce:!0,...st(e)})}o(sy,"_coercedString");function cy(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...st(e)})}o(cy,"_url");function uy(t,e){return new t({type:"number",checks:[],...st(e)})}o(uy,"_number");function ly(t,e){return new t({type:"number",coerce:!0,checks:[],...st(e)})}o(ly,"_coercedNumber");function dy(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...st(e)})}o(dy,"_int");function py(t,e){return new t({type:"boolean",...st(e)})}o(py,"_boolean");function fy(t,e){return new t({type:"boolean",coerce:!0,...st(e)})}o(fy,"_coercedBoolean");function my(t,e){return new t({type:"bigint",coerce:!0,...st(e)})}o(my,"_coercedBigint");function hy(t){return new t({type:"any"})}o(hy,"_any");function gy(t){return new t({type:"unknown"})}o(gy,"_unknown");function yy(t,e){return new t({type:"void",...st(e)})}o(yy,"_void");function vy(t,e){return new t({type:"date",coerce:!0,...st(e)})}o(vy,"_coercedDate");function js(t,e){return new Rg({check:"greater_than",...st(e),value:t,inclusive:!0})}o(js,"_gte");function xr(t,e){return new Og({check:"min_length",...st(e),minimum:t})}o(xr,"_minLength");function Mn(t,e){return new kg({check:"string_format",format:"regex",...st(e),pattern:t})}o(Mn,"_regex");function _y(t,e,r){let n=st(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}o(_y,"_custom");var yt=le("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");pt.init(t,e),t.def=e,t.type=e.type,t.parse=(r,n)=>Ns(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>Bi(t,r,n),t.parseAsync=async(r,n)=>zs(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>Vi(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)=>Ds(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.apply=r=>r(t)}),qs=le("ZodMiniString",(t,e)=>{Ls.init(t,e),yt.init(t,e)});function S(t){return ay(qs,t)}o(S,"string");var by=le("ZodMiniStringFormat",(t,e)=>{Ul.init(t,e),qs.init(t,e)});var xR=le("ZodMiniURL",(t,e)=>{Lg.init(t,e),by.init(t,e)});function Ey(t){return cy(xR,t)}o(Ey,"url");var Bs=le("ZodMiniNumber",(t,e)=>{Ml.init(t,e),yt.init(t,e)});function Pt(t){return uy(Bs,t)}o(Pt,"number");var AR=le("ZodMiniNumberFormat",(t,e)=>{jg.init(t,e),Bs.init(t,e)});function Sy(t){return dy(AR,t)}o(Sy,"int");var Bl=le("ZodMiniBoolean",(t,e)=>{Ll.init(t,e),yt.init(t,e)});function Ve(t){return py(Bl,t)}o(Ve,"boolean");var Ty=le("ZodMiniBigInt",(t,e)=>{Fg.init(t,e),yt.init(t,e)});var IR=le("ZodMiniAny",(t,e)=>{qg.init(t,e),yt.init(t,e)});function Hi(){return hy(IR)}o(Hi,"any");var RR=le("ZodMiniUnknown",(t,e)=>{Bg.init(t,e),yt.init(t,e)});function xe(){return gy(RR)}o(xe,"unknown");var CR=le("ZodMiniVoid",(t,e)=>{Vg.init(t,e),yt.init(t,e)});function wy(t){return yy(CR,t)}o(wy,"_void");var Py=le("ZodMiniDate",(t,e)=>{Gg.init(t,e),yt.init(t,e)});var OR=le("ZodMiniArray",(t,e)=>{Hg.init(t,e),yt.init(t,e)});function Se(t,e){return new OR({type:"array",element:t,...st(e)})}o(Se,"array");var kR=le("ZodMiniObject",(t,e)=>{Wg.init(t,e),yt.init(t,e),gt(t,"shape",()=>e.shape)});function O(t,e){let r={type:"object",shape:t??{},...st(e)};return new kR(r)}o(O,"object");var $R=le("ZodMiniUnion",(t,e)=>{jl.init(t,e),yt.init(t,e)});function $e(t,e){return new $R({type:"union",options:t,...st(e)})}o($e,"union");var DR=le("ZodMiniDiscriminatedUnion",(t,e)=>{Zg.init(t,e),yt.init(t,e)});function Ln(t,e,r){return new DR({type:"union",options:e,discriminator:t,...st(r)})}o(Ln,"discriminatedUnion");var NR=le("ZodMiniRecord",(t,e)=>{Kg.init(t,e),yt.init(t,e)});function Ae(t,e,r){return new NR({type:"record",keyType:t,valueType:e,...st(r)})}o(Ae,"record");var zR=le("ZodMiniEnum",(t,e)=>{Jg.init(t,e),yt.init(t,e),t.options=Object.values(e.entries)});function _e(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new zR({type:"enum",entries:r,...st(e)})}o(_e,"_enum");var UR=le("ZodMiniLiteral",(t,e)=>{Yg.init(t,e),yt.init(t,e)});function he(t,e){return new UR({type:"literal",values:Array.isArray(t)?t:[t],...st(e)})}o(he,"literal");var MR=le("ZodMiniTransform",(t,e)=>{Xg.init(t,e),yt.init(t,e)});function jn(t){return new MR({type:"transform",transform:t})}o(jn,"transform");var LR=le("ZodMiniOptional",(t,e)=>{Qg.init(t,e),yt.init(t,e)});function F(t){return new LR({type:"optional",innerType:t})}o(F,"optional");var jR=le("ZodMiniNullable",(t,e)=>{ey.init(t,e),yt.init(t,e)});function Wi(t){return new jR({type:"nullable",innerType:t})}o(Wi,"nullable");var FR=le("ZodMiniPipe",(t,e)=>{ty.init(t,e),yt.init(t,e)});function Fn(t,e){return new FR({type:"pipe",in:t,out:e})}o(Fn,"pipe");var qR=le("ZodMiniCustom",(t,e)=>{ry.init(t,e),yt.init(t,e)});function Vs(t,e){return _y(qR,t??(()=>!0),e)}o(Vs,"custom");var Zi={};Rs(Zi,{bigint:()=>ZR,boolean:()=>WR,date:()=>KR,number:()=>HR,string:()=>GR});function GR(t){return sy(qs,t)}o(GR,"string");function HR(t){return ly(Bs,t)}o(HR,"number");function WR(t){return fy(Bl,t)}o(WR,"boolean");function ZR(t){return my(Ty,t)}o(ZR,"bigint");function KR(t){return vy(Py,t)}o(KR,"date");var Gl=O({retryOnFailure:O({defaultValue:F(Ve()),hide:F(Ve())}),continueOnFailure:O({defaultValue:F(Ve()),hide:F(Ve())})}),Vl=class{constructor(e,r,n,i,s,u,d,p,h,y,m,f,l){this.name=e;this.displayName=r;this.description=n;this.props=i;this.propertyGroups=s;this.run=u;this.test=d;this.requireAuth=p;this.errorHandlingOptions=h;this.outputSchema=y;this.audience=m;this.aiMetadata=f;this.classification=l}static{o(this,"IAction")}},ve=o(t=>new Vl(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 je=O({displayName:S(),description:F(S()),advanced:F(Ve()),width:F(_e(["half","full"])),icon:F(S()),placeholder:F(S())}),Ie=o((t,e)=>O({type:he(e),required:Ve(),defaultValue:F(Hi())}),"TPropertyValue");var Kt=O({...je.shape,...Ie(S(),"SHORT_TEXT").shape}),dn=O({...je.shape,...Ie(S(),"LONG_TEXT").shape});var Ay=O({label:S(),value:xe(),description:F(S()),icon:F(S())}),Gs=O({disabled:F(Ve()),placeholder:F(S()),options:Se(Ay)});var YR=_e(["cards"]),Jt=O({...je.shape,options:Gs,display:F(YR),...Ie(xe(),"STATIC_DROPDOWN").shape}),pn=O({...je.shape,options:Gs,...Ie(Se(xe()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var Hl=O({...je.shape,...Ie(xe(),"DROPDOWN").shape,refreshers:Se(S())}),Ki=O({...je.shape,...Ie(Se(xe()),"MULTI_SELECT_DROPDOWN").shape,refreshers:Se(S())});var fn=O({...je.shape,reveals:F(Se(S())),...Ie(Ve(),"CHECKBOX").shape});var mn=O({...je.shape,display:F(_e(["stepper"])),min:F(Pt()),max:F(Pt()),step:F(Pt()),...Ie(Pt(),"NUMBER").shape});var Ji=O({...je.shape,streaming:F(Ve()),...Ie(xe(),"FILE").shape});var Yi=O({...je.shape,...Ie(S(),"DATE_TIME").shape});var Iy=Ae(S(),$e([Kt,dn,Jt,Ki,pn,fn,mn,Ji,Yi])),Xi=O({...je.shape,properties:Iy,...Ie(Se(xe()),"ARRAY").shape});var Ry=_e(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),Cy=O({preset:F(Ry),after:F(S()),before:F(S())}),Wl=O({...je.shape,display:F(_e(["dropdown"])),...Ie(Cy,"DATE_RANGE").shape});var Qi=O({...je.shape,...Ie($e([Ae(S(),xe())]),"JSON").shape});var Oy=$e([Kt,Jt,Qi,Xi,pn]),XR=Ae(S(),Oy),Zl=O({refreshers:Se(S()),...je.shape,...Ie(xe(),"DYNAMIC").shape});var Hs=O({...je.shape,...Ie(wy(),"MARKDOWN").shape});var ea=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ea||{}),Vo=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Vo||{}),Go=(b=>(b.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",b.COMMUNICATION="COMMUNICATION",b.COMMERCE="COMMERCE",b.CORE="CORE",b.UNIVERSAL_AI="UNIVERSAL_AI",b.FLOW_CONTROL="FLOW_CONTROL",b.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",b.ACCOUNTING="ACCOUNTING",b.PRODUCTIVITY="PRODUCTIVITY",b.CONTENT_AND_FILES="CONTENT_AND_FILES",b.DEVELOPER_TOOLS="DEVELOPER_TOOLS",b.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",b.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",b.HUMAN_RESOURCES="HUMAN_RESOURCES",b.PAYMENT_PROCESSING="PAYMENT_PROCESSING",b.MARKETING="MARKETING",b.SALES_AND_CRM="SALES_AND_CRM",b))(Go||{});var ta=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ta||{}),Kl="both_client_credentials_and_authorization_code";var Lt=(i=>(i.POLLING="POLLING",i.WEBHOOK="WEBHOOK",i.APP_WEBHOOK="APP_WEBHOOK",i.MANUAL="MANUAL",i))(Lt||{}),ra=(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))(ra||{}),QR=O({strategy:_e(ra),paramName:F(S())}),na=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(na||{});var Ws=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Ws||{}),ky=O({status:F(Pt()),body:F(xe()),headers:F(Ae(S(),S()))}),$y=O({type:he("DELAY"),resumeDateTime:S(),requestIdToReply:F(S()),handlerId:F(S()),streamStepProgress:F(_e(Ws))}),Dy=O({type:he("WEBHOOK"),requestId:S(),requestIdToReply:F(S()),response:ky,handlerId:F(S()),streamStepProgress:F(_e(Ws))}),eC=$e([$y,Dy]);var tC=O({body:xe(),rawBody:F(xe()),headers:Ae(S(),S()),queryParams:Ae(S(),S())});function rt(t){return t==null}o(rt,"isNil");function oa(t){return t==null?!0:typeof t=="string"||Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}o(oa,"isEmpty");function Zs(t,e){if(t==null)throw new Error(`${e} is null or undefined`)}o(Zs,"assertNotNullOrUndefined");var Jl=Be(require("crypto"),1);var rC=128,qn,Ho,nC=o(t=>{if(t<0)throw new RangeError("Wrong ID size");try{!qn||qn.length<t?(qn=Buffer.allocUnsafe(t*rC),Jl.default.randomFillSync(qn),Ho=0):Ho+t>qn.length&&(Jl.default.randomFillSync(qn),Ho=0)}catch(e){throw qn=void 0,e}Ho+=t},"fillPool"),oC=o(t=>(nC(t|=0),qn.subarray(Ho-t,Ho)),"random"),iC=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 u="";for(;;){let d=r(i),p=i;for(;p--;)if(u+=t[d[p]&n]||"",u.length===s)return u}}},"customRandom"),zy=o((t,e=21)=>iC(t,e,oC),"customAlphabet");var aC="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Uy=21,gH=S().check(Mn(new RegExp(`^[0-9a-zA-Z]{${Uy}}$`))),sC=zy(aC,Uy);var Bn=Fn(jn(t=>t instanceof Date?t.toISOString():t),S()),dr={id:S(),created:Bn,updated:Bn},ut=o(t=>F(Wi(t)),"Nullable");function Yl(t){return F(Wi(_e(t)))}o(Yl,"NullableEnum");var _H=Fn(jn(t=>t==="true"||t===!0?!0:t==="false"||t===!1?!1:void 0),F(Ve())),Ks=o(t=>Fn(jn(e=>Array.isArray(e)?e:e!==void 0?[e]:void 0),F(Se(t))),"OptionalArrayFromQuery");var SH=Ae(S(),xe());var ia=(y=>(y.OPENAI="openai",y.OPENROUTER="openrouter",y.ANTHROPIC="anthropic",y.AZURE="azure",y.GOOGLE="google",y.ACTIVEPIECES="activepieces",y.CLOUDFLARE_GATEWAY="cloudflare-gateway",y.CUSTOM="custom",y.BEDROCK="bedrock",y.MISTRAL="mistral",y))(ia||{});var DH=S().check(Mn(/^#[0-9A-Fa-f]{6}$/));var zH=O({filename:S(),data:xe(),type:he("file"),mimetype:F(S())});var cC=Be(Ly());var BH=O({...dr,name:S(),permissions:Se(S()),platformId:ut(S()),type:S(),userCount:F(Pt())});var jy=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(jy||{}),Xl=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Xl||{}),Ql=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ql||{});var ed=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(ed||{});var td=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(td||{});var uC=O({mode:_e(jy),value:xe()}),lC=O({auth:F(S()),fields:Ae(S(),uC)}),dC=O({pieceName:S(),pieceVersion:S(),actionName:S(),predefinedInput:F(lC)}),pC=O({type:he("PIECE"),toolName:S().check(xr(1)),pieceMetadata:dC}),fC=O({type:he("none")}),mC=O({type:he("access_token"),accessToken:S()}),hC=O({type:he("api_key"),apiKey:S(),apiKeyHeader:S()}),gC=O({type:he("headers"),headers:Ae(S(),S())}),yC=Ln("type",[fC,mC,hC,gC]),Fy=O({type:he("FLOW"),toolName:S().check(xr(1)),externalFlowId:S(),flowDisplayName:F(S())}),qy=O({type:he("MCP"),toolName:S().check(xr(1)),serverUrl:Ey(),protocol:_e(Ql),auth:yC}),By=O({type:he("KNOWLEDGE_BASE"),toolName:S().check(xr(1)),sourceType:_e(Xl),sourceId:S(),sourceName:S()}),vC=Ln("type",[pC,Fy,qy,By]),_C=O({displayName:S(),description:F(S()),type:_e(ed)}),Vy=O({type:he("MARKDOWN"),markdown:S()}),Wo={type:he("TOOL_CALL"),input:ut(Ae(S(),xe())),output:F(xe()),toolName:S(),status:_e(td),toolCallId:S(),startTime:S(),endTime:F(S())},bW=O(Wo),Gy=Ln("toolCallType",[O({...Wo,toolCallType:he("PIECE"),pieceName:S(),pieceVersion:S(),actionName:S()}),O({...Wo,toolCallType:he("FLOW"),displayName:S(),externalFlowId:S()}),O({...Wo,toolCallType:he("MCP"),displayName:S(),serverUrl:S()}),O({...Wo,toolCallType:he("KNOWLEDGE_BASE"),displayName:S(),sourceType:S()}),O({...Wo,toolCallType:he("UNKNOWN"),displayName:S()})]),bC=$e([Vy,Gy]);var rd=(r=>(r.IMAGE="image",r.TEXT="text",r))(rd||{}),hn=O({apiKey:S()}),EC=hn,SC=O({apiKey:S(),apiKeyHash:S()}),TC=hn,wC=hn,PC=hn,xC=hn,AC=hn,IC=hn,RC=hn,Jy=O({accessKeyId:S().check(xr(1)),secretAccessKey:S().check(xr(1))}),CC=O({}),OC=O({}),kC=O({}),$C=O({}),DC=O({}),NC=O({}),Yy=O({modelId:S(),modelName:S(),modelType:_e(rd)}),Xy=O({apiKeyHeader:S(),baseUrl:S(),models:Se(Yy),defaultHeaders:F(Ae(S(),S()))}),Qy=O({accountId:S(),gatewayId:S(),models:Se(Yy),vertexProject:F(S()),vertexRegion:F(S())}),ev=O({resourceName:S(),apiVersion:Fn(jn(t=>typeof t=="string"&&t.trim().length===0?void 0:t),F(S()))}),tv=O({region:S().check(xr(1))}),zC=$e([EC,PC,xC,AC,IC,wC,TC,SC,Jy,RC]),rv=$e([Xy,Qy,ev,tv,CC,kC,$C,DC,OC,NC]),UC=O({id:S(),name:S(),type:_e(rd)}),MC=O({id:S(),name:S(),provider:_e(ia),config:rv,enabledForChat:Ve()}),LC=O({provider:_e(ia),config:rv,auth:zC,platformId:S()});var wW={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},Hy=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],jC=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],FC=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],Wy=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],qC=["grok-4.20","grok-4.1-fast"],BC={openai:Hy,anthropic:jC,google:Wy,activepieces:[...FC.map(t=>`anthropic/${t}`),...Hy.map(t=>`openai/${t}`),...Wy.map(t=>`google/${t}`),...qC.map(t=>`x-ai/${t}`)]};var Zy=128e3,VC={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function GC({provider:t}){return t?VC[t]??Zy:Zy}o(GC,"getMaxContextTokens");var Ky={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"},HC={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},WC=new Set(["anthropic","mistral"]);function Lr(t){return{chatModels:BC[t],maxContextTokens:GC({provider:t}),defaultEmbeddingModel:Ky[t],supportsEmbedding:Ky[t]!==void 0,supportsImageGeneration:!WC.has(t),webSearch:HC[t]}}o(Lr,"buildProviderCapabilities");var ZC={openai:Lr("openai"),anthropic:Lr("anthropic"),openrouter:Lr("openrouter"),azure:Lr("azure"),google:Lr("google"),"cloudflare-gateway":Lr("cloudflare-gateway"),custom:Lr("custom"),bedrock:Lr("bedrock"),mistral:Lr("mistral"),activepieces:Lr("activepieces")};var KC=O({base64Url:S(),fileName:S(),extension:F(S())}),JC=O({mimeType:S(),url:S(),fileName:F(S())}),nd=$e([KC,JC]);var YC=$e([O({type:he("file"),value:nd}),O({type:he("markdown"),value:S(),files:F(Se(nd))})]),XC=O({sessionId:S(),message:S(),files:F(Se(S()))});var ov=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ov||{}),iv=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(iv||{}),od=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(od||{});var QC=$e([O({...dr,name:S(),externalId:S(),type:he("STATIC_DROPDOWN"),tableId:S(),projectId:S(),data:O({options:Se(O({value:S()}))})}),O({...dr,name:S(),externalId:S(),type:$e([he("TEXT"),he("NUMBER"),he("DATE"),he("DATETIME")]),tableId:S(),projectId:S()})]),e0=O({...dr,name:S(),folderId:ut(S()),projectId:S(),externalId:S(),status:Yl(iv),trigger:Yl(ov)}),t0=O({...dr,tableId:S(),projectId:S(),cells:Ae(S(),O({updated:S(),created:S(),value:xe(),fieldName:S()}))}),r0=O({events:Se(_e(od)),webhookUrl:S(),flowId:S()}),n0=O({fields:Se(O({id:S(),name:S()})),rows:Se(Ae(S(),S())),name:S()}),o0=O({projectId:S(),limit:F(Zi.number()),cursor:F(S()),name:F(S()),externalIds:Ks(S()),folderId:F(S()),folderIds:Ks(S())}),i0=O({records:Se(Se(O({fieldId:S(),value:sv()}))),tableId:S()}),a0=O({cells:F(Se(O({fieldId:S(),value:sv()}))),tableId:S(),agentUpdate:F(Ve())}),av=Ln("operator",[lo("eq"),lo("neq"),lo("gt"),lo("gte"),lo("lt"),lo("lte"),lo("co"),nv("exists"),nv("not_exists")]),s0=O({tableId:S(),limit:F(Zi.number()),cursor:F(S()),filters:Ks(av)});function sv(){return Fn(jn(t=>t==null?t:String(t)),Wi(S()))}o(sv,"coerceToString");function lo(t){return O({fieldId:S(),operator:he(t),value:S()})}o(lo,"valueFilter");function nv(t){return O({fieldId:S(),operator:he(t)})}o(nv,"existenceFilter");var c0=O({status:F(Pt()),body:F(xe()),headers:F(Ae(S(),S()))}),u0=O({...dr,deleted:ut(Bn),ownerId:S(),displayName:S(),platformId:S(),externalId:ut(S())});var cv=O({name:S(),description:F(S()),type:S(),required:Ve()}),l0=O({pieceName:S(),triggerName:S(),input:O({toolName:S(),toolDescription:S(),inputSchema:Se(cv),returnsResponse:Ve()})});var uv="^[0-9]+\\.[0-9]+\\.[0-9]+$",BW=new RegExp(uv),p0="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",VW=S().check(Mn(new RegExp(uv))),GW=S().check(Mn(new RegExp(p0))),f0=O({packageType:he("ARCHIVE"),pieceType:_e(Vo),pieceName:S(),pieceVersion:S(),archiveId:S(),platformId:S()}),lv=O({packageType:he("REGISTRY"),pieceType:he("OFFICIAL"),pieceName:S(),pieceVersion:S()}),dv=O({packageType:he("REGISTRY"),pieceType:he("CUSTOM"),pieceName:S(),pieceVersion:S(),platformId:S()}),HW=$e([lv,dv]),WW=$e([f0,lv,dv]);var m0=Ln("type",[O({type:he("CRON_EXPRESSION"),cronExpression:S(),timezone:S()}),O({type:he("INTERVAL"),intervalMs:Sy().check(js(6e4))})]),ZW=O({...dr,type:_e(Lt),projectId:S(),flowId:S(),triggerName:S(),schedule:ut(m0),flowVersionId:S(),pieceName:S(),pieceVersion:S(),deleted:ut(S()),simulate:Ve()}),pv=(E=>(E.UNKNOWN="UNKNOWN",E.FLOW_RUN_LOG="FLOW_RUN_LOG",E.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",E.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",E.FLOW_STEP_FILE="FLOW_STEP_FILE",E.SAMPLE_DATA="SAMPLE_DATA",E.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",E.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",E.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",E.PROJECT_RELEASE="PROJECT_RELEASE",E.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",E.PLATFORM_ASSET="PLATFORM_ASSET",E.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",E.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",E.KNOWLEDGE_BASE="KNOWLEDGE_BASE",E.FLOW_BUNDLE="FLOW_BUNDLE",E))(pv||{}),fv=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(fv||{}),mv=(r=>(r.S3="S3",r.DB="DB",r))(mv||{}),KW=O({...dr,projectId:ut(S()),platformId:ut(S()),type:_e(pv),compression:_e(fv),data:F(xe()),location:_e(mv),size:ut(Pt()),fileName:ut(S()),s3Key:ut(S()),metadata:ut(Ae(S(),S()))}),hv=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(hv||{}),gv=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(gv||{}),JW=O({id:S(),email:S(),firstName:S(),status:_e(gv),externalId:ut(S()),platformId:ut(S()),platformRole:_e(hv),lastName:S(),created:Bn,updated:Bn,lastActiveDate:ut(Bn),imageUrl:ut(S())});var ad=O({...je.shape,...Ie(Ae(S(),xe()),"OBJECT").shape});var sd=O({...je.shape,formatProperty:F(S()),...Ie(S(),"RICH_TEXT").shape});var _v=O({...je.shape,...Ie(S(),"COLOR").shape});var cd=$e([Kt,dn,sd,Hs,fn,Jt,pn,Hl,Ki,Zl,mn,Xi,ad,Qi,Yi,Wl,Ji,_v]),q={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 jr=O({displayName:S(),description:F(S()),hasConnectionIdentifier:F(Ve())});var bv=O({username:S(),password:S()}),ud=O({...jr.shape,username:O({displayName:S(),description:F(S())}),password:O({displayName:S(),description:F(S())}),...Ie(bv,"BASIC_AUTH").shape});var v0=Ae(S(),$e([Kt,dn,mn,fn,Jt])),ld=O({...jr.shape,props:v0,...Ie(xe(),"CUSTOM_AUTH").shape});var po=O({...jr.shape,...Ie(O({auth:S()}),"SECRET_TEXT").shape});var _0=Ae(S(),$e([Kt,dn,po,mn,fn,Jt,pn,Hs])),Ev=O({...jr.shape,props:_0,...Ie(xe(),"OIDC").shape});var dd=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(dd||{}),Sv=$e([Kt,po,Jt]),Tv=Ae(S(),Sv),b0=O({props:F(Ae(S(),Sv)),authUrl:S(),tokenUrl:S(),scope:Se(S()),prompt:F($e([he("none"),he("consent"),he("login"),he("omit")])),pkce:F(Ve()),pkceMethod:F($e([he("plain"),he("S256")])),authorizationMethod:F(_e(dd)),grantType:F($e([_e(ta),he(Kl)])),extra:F(Ae(S(),S()))}),wv=O({access_token:S(),props:F(Tv),data:Ae(S(),Hi())}),pd=O({...jr.shape,...b0.shape,...Ie(wv,"OAUTH2").shape});var Zo=$e([ud,ld,Ev,pd,po]),aa="Connection",Ys={SecretText(t){return{...t,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(t){return{...t,valueSchema:void 0,type:"OAUTH2",displayName:t.displayName||aa}},BasicAuth(t){return{...t,valueSchema:void 0,type:"BASIC_AUTH",displayName:t.displayName||aa,required:!0}},CustomAuth(t){return{...t,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:t.displayName||aa}},OIDC(t){return{...t,valueSchema:void 0,type:"OIDC",displayName:t.displayName||aa}},None(){}};var $3={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 E0=O({...je.shape,...Ie(xe(),"CUSTOM").shape,code:S()});var S0=$e([cd,Zo]),fd=Ae(S(),S0),eK=Ae(S(),cd);var Pv=$e([O({strategy:he("CRON"),cronExpression:S()}),O({strategy:he("NONE")})]),Ko=class{constructor(e,r,n,i,s,u,d,p,h,y,m,f,l,g,v,E,b,C,U,Y,Z){this.name=e;this.displayName=r;this.description=n;this.requireAuth=i;this.props=s;this.type=u;this.handshakeConfiguration=d;this.onHandshake=p;this.renewConfiguration=h;this.onRenew=y;this.onEnable=m;this.onDisable=f;this.onStart=l;this.run=g;this.test=v;this.sampleData=E;this.testStrategy=b;this.outputSchema=C;this.aiMetadata=U;this.classification=Y;this.propertyGroups=Z}static{o(this,"ITrigger")}},jt=o(t=>{switch(t.type){case"WEBHOOK":return new Ko(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 Ko(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 Ko(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 Ko(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,rt(t.sampleData)&&rt(t.test)?"SIMULATION":"TEST_FUNCTION",t.outputSchema,t.aiMetadata,t.classification,t.propertyGroups)}},"createTrigger");var xv="2",Xs="0.82.0";var md=class{constructor(e,r,n,i,s,u,d,p,h=Xs,y,m="",f){this.displayName=e;this.logoUrl=r;this.authors=n;this.events=i;this.categories=d;this.auth=p;this.minimumSupportedRelease=h;this.maximumSupportedRelease=y;this.description=m;this.deprecated=f;this._actions={};this._triggers={};this.getContextInfo=o(()=>({version:xv}),"getContextInfo");(!w0(h)||P0(h,Xs))&&(this.minimumSupportedRelease=Xs),s.forEach(l=>this._actions[l.name]=l),u.forEach(l=>this._triggers[l.name]=l)}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:T0(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}},Iv=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 md(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 T0(t){if(t!==void 0)return Array.isArray(t)?t.map(Av):Av(t)}o(T0,"withConnectionIdentifierFlag");function Av(t){return{...t,hasConnectionIdentifier:t.getConnectionIdentifier!==void 0}}o(Av,"flagConnectionIdentifier");function w0(t){return/^\d+\.\d+\.\d+$/.test(t)}o(w0,"isValidSimpleSemver");function P0(t,e){let[r,n,i]=t.split(".").map(Number),[s,u,d]=e.split(".").map(Number);return r!==s?r<s:n!==u?n<u:i<d}o(P0,"isSemverLessThan");var x0=F(Ae(S(),Ae(S(),S()))),Rv=O({id:F(S()),name:S(),displayName:S(),logoUrl:S(),description:S(),authors:Se(S()),platformId:F(S()),directoryPath:F(S()),auth:F($e([Zo,Se(Zo)])),version:S(),categories:F(Se(_e(Go))),minimumSupportedRelease:F(S()),maximumSupportedRelease:F(S()),deprecated:F(Ve()),i18n:x0}),A0=_e(["human","ai","both"]),Cv=O({description:F(S()),idempotent:F(Ve())}),Ov=_e(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var I0=_e(["tabs","section","summary","builder","footer"]),kv=O({key:S(),display:I0,label:F(S()),description:F(S()),icon:F(S()),props:Se(S())}),$v=O({name:S(),displayName:S(),description:S(),props:fd,propertyGroups:F(Se(kv)),requireAuth:Ve(),errorHandlingOptions:F(Gl),outputSchema:F(Vs()),audience:F(A0),aiMetadata:F(Cv),classification:F(Ov)}),Dv=O({name:S(),displayName:S(),description:S(),props:fd,propertyGroups:F(Se(kv)),errorHandlingOptions:F(Gl),type:_e(Lt),sampleData:xe(),handshakeConfiguration:F(Vs()),renewConfiguration:F(Pv),testStrategy:_e(na),outputSchema:F(Vs()),aiMetadata:F(Cv),classification:F(Ov)}),R0=O({...Rv.shape,actions:Ae(S(),$v),triggers:Ae(S(),Dv)}),C0=O({...Rv.shape,actions:Pt(),triggers:Pt(),suggestedActions:F(Se($v)),suggestedTriggers:F(Se(Dv))}),Nv=O({projectUsage:Pt(),pieceType:_e(Vo),packageType:_e(ea),platformId:F(S()),archiveId:F(S())}),r8=O({...R0.shape,...Nv.shape}),n8=O({...C0.shape,...Nv.shape}),o8=O({name:S(),version:S()});var O0=Be(require("path")),k0=Be(require("fs/promises"));var Jo=require("node:stream");var Qs=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,u)=>{i.append(u,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 ec=class{static{o(this,"DelegatingAuthenticationConverter")}constructor(e=new hd,r=new gd){this.converters={BEARER_TOKEN:e,BASIC:r}}convert(e,r){return this.converters[e.type].convert(e,r)}},hd=class{static{o(this,"BearerTokenAuthenticationConverter")}convert(e,r){return r.Authorization=`Bearer ${e.token}`,r}},gd=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 sa=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 zv({error:t,requestBody:e}){return t instanceof sa?t.errorMessage():{response:{status:0,body:t instanceof Error?t.message:String(t)},request:{body:e}}}o(zv,"toFailsafeOutput");var kt=(u=>(u.GET="GET",u.POST="POST",u.PATCH="PATCH",u.PUT="PUT",u.DELETE="DELETE",u.HEAD="HEAD",u))(kt||{});var tc=class extends Qs{static{o(this,"FetchHttpClient")}constructor(e="",r=new ec){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),u=e.queryParams??{};for(let[U,Y]of Object.entries(u))i.append(U,Y);let d=i.toString(),p=d?`${n}?${d}`:n,h=e.responseType??"json",y=e.followRedirects??!0,m=e.retries??0,{body:f,extraHeaders:l,isStream:g}=$0(e.method)?D0(e.body,s):{body:void 0,extraHeaders:{},isStream:!1},v=z0({...s,...l}),E=await N0(async()=>{let U=new AbortController,Y=e.timeout&&e.timeout>0?setTimeout(()=>U.abort(),e.timeout):void 0;try{let Z={method:e.method.toString(),headers:v,body:f,redirect:y?"follow":"manual",signal:U.signal};return g&&(Z.duplex="half"),r?.dispatcher!==void 0&&(Z.dispatcher=r.dispatcher),await fetch(p,Z)}finally{Y!==void 0&&clearTimeout(Y)}},g?0:m),b=y?300:400;if(E.status<200||E.status>=b){let U=await Uv(E,h==="stream"?"text":h),Y=new sa(e.body,{status:E.status,responseBody:U});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Y),Y}let C=await Uv(E,h);return{status:E.status,headers:U0(E.headers),body:C}}};function $0(t){return t!=="GET"&&t!=="HEAD"}o($0,"acceptsRequestBody");function D0(t,e){if(Lv(t))return{body:void 0,extraHeaders:{},isStream:!1};if(M0(t)){let n=new Jo.PassThrough;return t.on("error",i=>n.destroy(i)),t.pipe(n),{body:n,extraHeaders:t.getHeaders(),isStream:!0}}return t instanceof Jo.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(D0,"serializeBody");async function Uv(t,e){switch(e){case"arraybuffer":return Buffer.from(await t.arrayBuffer());case"stream":return Lv(t.body)?Jo.Readable.from([]):Jo.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(Uv,"parseResponseBody");async function N0(t,e){let r;for(let n=0;n<=e;n++)try{let i=await t();if(i.status>=500&&n<e){await Mv(n);continue}return i}catch(i){if(r=i,n<e){await Mv(n);continue}throw i}throw r}o(N0,"sendWithRetries");function Mv(t){let e=Math.min(1e3*2**t,3e4);return new Promise(r=>setTimeout(r,e))}o(Mv,"backoff");function z0(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(z0,"normalizeHeaders");function U0(t){let e={};return t.forEach((r,n)=>{e[n]=r}),e}o(U0,"toHttpHeaders");function M0(t){return typeof t=="object"&&t!==null&&typeof t.getHeaders=="function"&&typeof t.pipe=="function"&&typeof t.on=="function"}o(M0,"isNodeFormData");function Lv(t){return t==null}o(Lv,"isNil");var Ue=new tc;var Pk=Be(require("fs")),Bb=Be(qb());var xk={"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 Ak(t){let e=t.split(";")[0].trim().toLowerCase();return xk[e]??""}o(Ak,"contentTypeToExtension");var Ik=o(({baseUrl:t,relativePath:e})=>{let r=t.endsWith("/")?t:`${t}/`,n=e.startsWith("/")?e.slice(1):e;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Rk=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 Vb({auth:t,baseUrl:e,authMapping:r,description:n,displayName:i,name:s,props:u,extraProps:d,authLocation:p="headers",classification:h="WRITE"}){return ve({audience:"human",name:s||"custom_api_call",classification:h,displayName:i||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:t,requireAuth:!!t,props:{url:q.DynamicProperties({auth:t,displayName:"",required:!0,refreshers:[],props:o(async({auth:y})=>({url:q.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
69
- i.e ${Rk(e,y)}/resource or /resource`,required:!0,defaultValue:y?e(y):"",...u?.url??{}})}),"props")}),method:q.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(kt).map(y=>({label:y,value:y}))},...u?.method??{}}),headers:q.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...u?.headers??{}}),queryParams:q.Object({displayName:"Query Parameters",required:!0,...u?.queryParams??{}}),body_type:q.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:q.DynamicProperties({auth:t,displayName:"Body",refreshers:["body_type"],required:!1,props:o(async({body_type:y})=>{if(!y)return{};let m=y,f={};switch(m){case"none":break;case"json":f.data=q.Json({displayName:"JSON Body",required:!0,...u?.body??{}});break;case"raw":f.data=q.LongText({displayName:"Raw Body",required:!0});break;case"form_data":f.data=q.Array({displayName:"Form Data",required:!0,properties:{fieldName:q.ShortText({displayName:"Field Name",required:!0}),fieldType:q.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:q.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:q.File({displayName:"File Field Value",required:!1})}});break}return f},"props")}),response_is_binary:q.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:q.Checkbox({displayName:"No Error on Failure",required:!1,...u?.failsafe??{}}),timeout:q.Number({displayName:"Timeout (in seconds)",required:!1,...u?.timeout??{}}),followRedirects:q.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...d},run:o(async y=>{let{method:m,url:f,headers:l,queryParams:g,body:v,body_type:E,failsafe:b,timeout:C,response_is_binary:U,followRedirects:Y}=y.propsValue;Zs(m,"Method"),Zs(f,"URL");let Z=rt(r)?{}:await r(y.auth,y.propsValue),G=f.url,X=G.startsWith("http://")||G.startsWith("https://")?G:Ik({baseUrl:e(y.auth),relativePath:G}),te={method:m,url:X,headers:{...l??{},...p==="headers"||!rt(p)?Z:{}},queryParams:{...p==="queryParams"?Z:{},...g??{}},timeout:C?C*1e3:0,followRedirects:Y};if(U&&(te.responseType="arraybuffer"),v)if(E&&E!=="none"){let J=v.data;if(E==="form_data"){let De=J,re=new Bb.default;for(let{fieldName:H,fieldType:V,textFieldValue:Q,fileFieldValue:K}of De)V==="text"&&!oa(Q)?re.append(H,Q):V==="file"&&!oa(K)&&re.append(H,K.data,{filename:K?.filename});te.body=re,te.headers={...te.headers,...re.getHeaders()}}else te.body=J}else E||(te.body=v);try{let J=await Ue.sendRequest(te);return await Ck(y.files,J.body,J.status,J.headers,U)}catch(J){if(b)return zv({error:J,requestBody:te.body});throw J}},"run")})}o(Vb,"createCustomApiCallAction");var Ck=o(async(t,e,r,n,i)=>{let s;if(i&&Ok(e)){let u=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],d=Ak(u??"")||"txt",p;e instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(e)):Buffer.isBuffer(e)?p=e:p=Buffer.from(e),s=await t.write({fileName:`output.${d}`,data:p})}else s=e;return{status:r,headers:n,body:s}},"handleBinaryResponse"),Ok=o(t=>t instanceof ArrayBuffer||Buffer.isBuffer(t),"isBinaryBody");var Je={async poll(t,{store:e,auth:r,propsValue:n,maxItemsToPoll:i,files:s,server:u}){switch(t.strategy){case 0:{let d=await e.get("lastPoll");if(rt(d))throw new Error("lastPoll doesn't exist in the store.");let p=await t.items({store:e,auth:r,propsValue:n,lastFetchEpochMS:d,server:u}),h=p.reduce((y,m)=>Math.max(y,m.epochMilliSeconds),d);return await e.put("lastPoll",h),p.filter(y=>y.epochMilliSeconds>d).map(y=>y.data)}case 1:{let d=await e.get("lastItem"),p=await t.items({store:e,auth:r,propsValue:n,lastItemId:d,files:s,server:u}),h=p.findIndex(f=>f.id===d),y=[];rt(d)||h==-1?y=p??[]:y=p?.slice(0,h)??[],rt(i)||(y=y.slice(-i));let m=y?.[0]?.id;return rt(m)||await e.put("lastItem",m),y.map(f=>f.data)}}},async onEnable(t,{store:e,auth:r,propsValue:n,server:i,isRepublish:s}){switch(t.strategy){case 0:{if(s&&!rt(await e.get("lastPoll")))break;await e.put("lastPoll",Date.now());break}case 1:{if(s&&!rt(await e.get("lastItem")))break;let d=(await t.items({store:e,auth:r,propsValue:n,lastItemId:null,server:i}))?.[0]?.id;rt(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 u=[];switch(t.strategy){case 0:{u=await t.items({store:n,auth:e,propsValue:r,lastFetchEpochMS:0,server:s});break}case 1:{u=await t.items({store:n,auth:e,propsValue:r,lastItemId:null,files:i,server:s});break}}return kk(u.map(d=>d.data))}};function kk(t){return t.length<=5?t:t.slice(0,5)}o(kk,"getFirstFiveOrAll");var Gb=require("crypto");async function Md(t,e){let r={method:"POST",url:`${ae.baseUrl}/channels/stop`,body:{id:t?.id,resourceId:t?.resourceId},authentication:{type:"BEARER_TOKEN",token:await Ce(e)}};await Ue.sendRequest(r)}o(Md,"stopWatchEvent");async function Ld(t,e,r){let n=Date.now()+5184e5,i={method:"POST",url:`${ae.baseUrl}/calendars/${t}/events/watch`,body:{id:(0,Gb.randomUUID)(),type:"web_hook",address:e,expiration:n.toString()},authentication:{type:"BEARER_TOKEN",token:await Ce(r)}},{body:s}=await Ue.sendRequest(i);return s}o(Ld,"watchEvent");async function lc({calendarId:t,authProp:e}){let r=await Ce(e),n={singleEvents:"true",showDeleted:"true",maxResults:"2500"},i="",s;do{i&&(n.pageToken=i);let u={method:"GET",url:`${ae.baseUrl}/calendars/${t}/events`,queryParams:n,authentication:{type:"BEARER_TOKEN",token:r}},{body:d}=await Ue.sendRequest(u);i=d.nextPageToken,s=d.nextSyncToken}while(i);return s}o(lc,"getInitialSyncToken");async function Hb({calendarId:t,syncToken:e,authProp:r}){let n=await Ce(r),i={syncToken:e,maxResults:"2500"},s="",u,d=[];do{s&&(i.pageToken=s);let p={method:"GET",url:`${ae.baseUrl}/calendars/${t}/events`,queryParams:i,authentication:{type:"BEARER_TOKEN",token:n}};try{let{body:h}=await Ue.sendRequest(p);h.items?.length>0&&(d=[...d,...h.items]),s=h.nextPageToken,u=h.nextSyncToken}catch(h){if(h?.response?.status===410)return{items:[],nextSyncToken:void 0,syncTokenInvalid:!0};throw h}}while(s);return{items:d,nextSyncToken:u,syncTokenInvalid:!1}}o(Hb,"listEventsWithSyncToken");async function $t(t,e){let r={showDeleted:"false"};e&&(r.minAccessRole=e);let n={method:"GET",url:`${ae.baseUrl}/users/me/calendarList`,queryParams:r,authentication:{type:"BEARER_TOKEN",token:await Ce(t)}};return(await Ue.sendRequest(n)).body.items}o($t,"getCalendars");async function dc(t){let e={method:"GET",url:`${ae.baseUrl}/colors`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)}};return(await Ue.sendRequest(e)).body}o(dc,"getColors");async function pa(t,e,r,n){let i=new Date,s=new Date;s.setDate(i.getDate()-1);let u={updatedMin:n?.toISOString()??s.toISOString(),maxResults:"2500",orderBy:"updated",singleEvents:e?"true":"false",showDeleted:"true"},d=await Ce(r),p={method:"GET",url:`${ae.baseUrl}/calendars/${t}/events`,queryParams:u,authentication:{type:"BEARER_TOKEN",token:d}},h=[],y="";do{u.pageToken=y;let{body:m}=await Ue.sendRequest(p);m.items.length>0&&(h=[...h,...m.items]),y=m.nextPageToken}while(y);return h}o(pa,"getEvents");async function Wb(t,e){return(await pa(t,!1,e)).pop()}o(Wb,"getLatestEvent");async function Zb(t,e,r=50){if(!e)return[];try{let n=new Date,i=new Date;i.setDate(n.getDate()+30);let s={singleEvents:"true",orderBy:"startTime",timeMin:n.toISOString(),timeMax:i.toISOString(),maxResults:r.toString(),showDeleted:"false"},u={method:"GET",url:`${ae.baseUrl}/calendars/${encodeURIComponent(e)}/events`,queryParams:s,authentication:{type:"BEARER_TOKEN",token:await Ce(t)}},d=await Ue.sendRequest(u);return!d.body.items||d.body.items.length===0?[]:d.body.items.map(p=>{let h=p.start?.dateTime||p.start?.date||"",y=h?new Date(h).toLocaleDateString():"",m=h?new Date(h).toLocaleTimeString():"",f=p.summary||"Untitled Event";return y&&(f+=` (${y}`,p.start?.dateTime&&(f+=` at ${m}`),f+=")"),{label:f,value:p.id||""}}).filter(p=>p.value!=="")}catch(n){return console.error("Error fetching events for dropdown:",n),[]}}o(Zb,"getEventsForDropdown");var Iu=Be(Va());var im=["https://www.googleapis.com/auth/calendar.events","https://www.googleapis.com/auth/calendar.readonly","email"],ne=[Ys.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,pkce:!0,scope:im}),Ys.CustomAuth({displayName:"Service Account (Advanced)",description:"Authenticate via service account from https://console.cloud.google.com/ > IAM & Admin > Service Accounts > Create Service Account > Keys > Add key. <br> <br> You can optionally use domain-wide delegation (https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client) to access calendars without adding the service account to each one. <br> <br> **Note:** Without a user email, the service account only has access to calendars you explicitly share with it.",required:!0,props:{serviceAccount:q.ShortText({displayName:"Service Account JSON Key",required:!0}),userEmail:q.ShortText({displayName:"User Email",required:!1,description:"Email address of the user to impersonate for domain-wide delegation."})},validate:o(async({auth:t})=>{try{await Ce({type:"CUSTOM_AUTH",props:{...t}})}catch(e){return{valid:!1,error:e.message}}return{valid:!0}},"validate")})];async function _t(t){if(t.type==="CUSTOM_AUTH"){let r=JSON.parse(t.props.serviceAccount);return new Iu.JWT({email:r.client_email,key:r.private_key,scopes:im,subject:t.props.userEmail})}let e=new Iu.OAuth2Client;return e.setCredentials(t),e}o(_t,"createGoogleClient");var Ce=o(async t=>{if(t.type==="CUSTOM_AUTH"){let r=await(await _t(t)).getAccessToken();if(r.token)return r.token;throw new Error("Could not retrieve access token from service account json")}return t.access_token},"getAccessToken");var ae={baseUrl:"https://www.googleapis.com/calendar/v3",calendarDropdown:o(t=>q.Dropdown({auth:ne,displayName:"Calendar",refreshers:[],required:!0,options:o(async({auth:e})=>e?{disabled:!1,options:(await $t(e,t)).map(i=>({label:i.summary,value:i.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"calendarDropdown"),eventDropdown:o((t=!1)=>q.Dropdown({displayName:"Event",refreshers:["calendar_id"],required:t,auth:ne,options:o(async({auth:e,calendar_id:r})=>e?r?{disabled:!1,options:await Zb(e,r)}:{disabled:!0,placeholder:"Please select a calendar first",options:[]}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"eventDropdown"),colorId:q.Dropdown({auth:ne,displayName:"Color",refreshers:[],required:!1,options:o(async({auth:t})=>{if(!t)return{disabled:!0,placeholder:"Please connect your account first",options:[]};let e=await dc(t);return{disabled:!1,options:Object.entries(e.event).map(([r,n])=>({label:n.background,value:r}))}},"options")})};var Ku=Be(Sn()),xx=Be(xn()),Ax=require("crypto");var Ze={fields:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"start",label:"Start",children:[{key:"dateTime",label:"Start Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",children:[{key:"dateTime",label:"End Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]},hx={fields:[{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"id",label:"Calendar ID"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"isOwned",label:"Is Owned",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"isShared",label:"Is Shared",format:"boolean"},{key:"calendarType",label:"Calendar Type"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"},{key:"colorId",label:"Color ID"}]},Wu={fields:[{key:"status",label:"Status Code"},{key:"summary",label:"Calendar Summary",value:"body.summary"},{key:"timeZone",label:"Time Zone",value:"body.timeZone"},{key:"accessRole",label:"Access Role",value:"body.accessRole"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"items",label:"Events",value:"body.items",labelKey:"summary",listItems:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"creatorEmail",label:"Creator Email",value:"creator.email",format:"email"},{key:"organizerEmail",label:"Organizer Email",value:"organizer.email",format:"email"},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]}]},gx={fields:[{key:"summary",label:"Summary",value:"body.summary"},{key:"status",label:"Status",value:"body.status"},{key:"id",label:"Event ID",value:"body.id"},{key:"htmlLink",label:"Event Link",value:"body.htmlLink",format:"url"},{key:"created",label:"Created",value:"body.created",format:"datetime"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"start",label:"Start",value:"body.start",children:[{key:"dateTime",label:"Start Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",value:"body.end",children:[{key:"dateTime",label:"End Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",value:"body.creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",value:"body.organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"eventType",label:"Event Type",value:"body.eventType"},{key:"iCalUID",label:"iCal UID",value:"body.iCalUID"}]},yx={fields:[{key:"summary",label:"Name"},{key:"id",label:"Calendar ID"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"}]};var vx={fields:[{key:"calendar",label:"Calendar Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]},{key:"event",label:"Event Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]}]},_x={fields:[{key:"calendars",label:"Calendars",labelKey:"summary",listItems:[{key:"id",label:"Calendar ID"},{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"}]},{key:"count",label:"Count",format:"number"}]},bx={fields:[{key:"items",label:"Settings",labelKey:"id",listItems:[{key:"id",label:"Setting ID"},{key:"value",label:"Value"}]},{key:"count",label:"Count",format:"number"}]},Ex={fields:[{key:"removed",label:"Removed",format:"boolean"},{key:"attendee_email",label:"Attendee Email",format:"email"},{key:"message",label:"Message"},{key:"event",label:"Event",children:Ze.fields}]},Sx={fields:[{key:"free_slots",label:"Free Slots",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"},{key:"duration_minutes",label:"Duration (Minutes)",format:"number"}]},{key:"count",label:"Count",format:"number"}]},SL=[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Instance Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"originalStartDateTime",label:"Original Start",value:"originalStartTime.dateTime",format:"datetime"}],Tx={fields:[{key:"instances",label:"Instances",labelKey:"summary",listItems:SL},{key:"count",label:"Count",format:"number"},{key:"nextPageToken",label:"Next Page Token"}]},wx={fields:[{key:"moved",label:"Moved",format:"boolean"},{key:"already_in_destination",label:"Already in Destination",format:"boolean"},{key:"event",label:"Event",children:Ze.fields}]},Px={fields:[{key:"events",label:"Events",labelKey:"summary",listItems:[{key:"calendarId",label:"Calendar ID"},{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"}]},{key:"count",label:"Count",format:"number"},{key:"calendars_searched",label:"Calendars Searched",format:"number"},{key:"warning",label:"Warning"}]},Zu={fields:[{key:"timeMin",label:"Time Min",format:"datetime"},{key:"timeMax",label:"Time Max",format:"datetime"},{key:"calendars",label:"Calendars",dynamicKey:!0,children:[{key:"busy",label:"Busy Periods",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"}]}]}]};var Vm={calendar_id:ae.calendarDropdown("writer"),title:q.ShortText({displayName:"Title of the event",required:!0}),start_date_time:q.DateTime({displayName:"Start date time of the event",required:!0}),end_date_time:q.DateTime({displayName:"End date time of the event",description:"By default it'll be 30 min post start time",required:!1}),location:q.ShortText({displayName:"Location",required:!1}),description:q.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:ae.colorId,attendees:q.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:q.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:q.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:q.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1}),send_notifications:q.StaticDropdown({displayName:"Send Notifications",defaultValue:"all",options:{options:[{label:"Yes, to everyone",value:"all"},{label:"To non-Google Calendar guests only",value:"externalOnly"},{label:"To no one",value:"none"}]},required:!0}),create_meet_link:q.Checkbox({displayName:"Create Google Meet Link",description:"Automatically create a Google Meet video conference link for this event",defaultValue:!1,required:!1})};async function Gm(t){let{calendar_id:e,title:r,start_date_time:n,end_date_time:i,location:s,description:u,colorId:d,guests_can_modify:p,guests_can_invite_others:h,guests_can_see_other_guests:y,create_meet_link:m}=t.propsValue,f={dateTime:(0,Ku.default)(n).format("YYYY-MM-DDTHH:mm:ss.sssZ")},l=i||(0,Ku.default)(n).add(30,"m"),g={dateTime:(0,Ku.default)(l).format("YYYY-MM-DDTHH:mm:ss.sssZ")},v=t.propsValue.attendees,E=t.propsValue.send_notifications,b=[];if(v)for(let G of v)b.push({email:G});let C=await _t(t.auth),U=(0,xx.calendar)({version:"v3",auth:C}),Y={summary:r,start:f,end:g,colorId:d,location:s??"",description:u??"",attendees:b,guestsCanInviteOthers:h,guestsCanModify:p,guestsCanSeeOtherGuests:y};return m&&(Y.conferenceData={createRequest:{conferenceSolutionKey:{type:"hangoutsMeet"},requestId:(0,Ax.randomUUID)()}}),(await U.events.insert({calendarId:e,sendUpdates:E,conferenceDataVersion:m?1:0,requestBody:Y})).data}o(Gm,"runCreateEvent");var Ix=ve({auth:ne,name:"create_google_calendar_event",classification:"WRITE",description:"Add Event",audience:"human",aiMetadata:{description:"Creates a Google Calendar event with structured fields (title, start/end times, location, description, attendees, color, guest permissions) and can optionally attach a Google Meet link. Use this when you have explicit event details; choose Create Quick Event instead when working from a single natural-language phrase. Requires a title and start time (end defaults to 30 minutes after start). Not idempotent: each call creates a new event.",idempotent:!1},displayName:"Create Event",props:Vm,outputSchema:Ze,run:Gm});var Rx=ve({auth:ne,name:"create_quick_event",classification:"WRITE",description:"Add Quick Calendar Event",audience:"both",aiMetadata:{description:`Creates a calendar event from a single natural-language phrase (e.g. "Lunch with Sam tomorrow at 1pm") via Google's quickAdd parsing, letting Google infer the time, title, and date. Use when you have free-form text rather than structured fields; prefer Create Event when you have explicit start/end times or attendees. Not idempotent: each call creates a new event.`,idempotent:!1},displayName:"Create Quick Event",props:{calendar_id:ae.calendarDropdown("writer"),text:q.LongText({displayName:"Summary",description:"The text describing the event to be created",required:!0}),send_updates:q.StaticDropdown({displayName:"Send Updates",description:"Guests who should receive notifications about the creation of the new event.",required:!1,options:{disabled:!1,options:[{label:"All",value:"all"},{label:"External Only",value:"externalOnly"},{label:"none",value:"none"}]}})},outputSchema:gx,async run(t){let e=t.propsValue.calendar_id,r=`${ae.baseUrl}/calendars/${e}/events/quickAdd`,n={text:t.propsValue.text,sendUpdates:t.propsValue.send_updates||"none"},i={method:"POST",url:r,body:{},authentication:{type:"BEARER_TOKEN",token:await Ce(t.auth)},queryParams:n};return await Ue.sendRequest(i)}});var Cx=Be(xn());var TL={calendar_id:ae.calendarDropdown("writer"),eventId:q.ShortText({displayName:"Event ID",required:!0})};async function Hm(t){let e=await _t(t.auth),r=t.propsValue.calendar_id,n=t.propsValue.eventId;return(await(0,Cx.calendar)({version:"v3",auth:e}).events.delete({calendarId:r,eventId:n})).data}o(Hm,"runDeleteEvent");var Ox=ve({displayName:"Delete Event",auth:ne,name:"delete_event",classification:"DESTRUCTIVE",description:"Deletes an event from Google Calendar.",audience:"human",aiMetadata:{description:"Permanently removes an event from a Google Calendar, identified by calendar and event ID. Use to cancel or delete an existing event. Requires the event ID and cannot be undone. Idempotent: once the event is deleted, repeating the call leaves it absent (a second call may report it as already gone).",idempotent:!0},props:TL,run:Hm});var Wm=Be(Sn());var Zm={calendar_id:ae.calendarDropdown("writer"),event_types:q.StaticMultiSelectDropdown({displayName:"Event types",description:"Select event types",required:!0,defaultValue:["default","focusTime","outOfOffice"],options:{options:[{label:"Default",value:"default"},{label:"Out Of Office",value:"outOfOffice"},{label:"Focus Time",value:"focusTime"},{label:"Working Location",value:"workingLocation"}]}}),search:q.ShortText({displayName:"Search Term",required:!1}),start_date:q.DateTime({displayName:"Date from",required:!1}),end_date:q.DateTime({displayName:"Date to",required:!1}),singleEvents:q.Checkbox({displayName:"Expand Recurring Event?",description:"Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",required:!0,defaultValue:!1})};async function Km(t){let{calendar_id:e,start_date:r,end_date:n,search:i,event_types:s,singleEvents:u}=t.propsValue,d=await Ce(t.auth),p={showDeleted:"false"},h=`${ae.baseUrl}/calendars/${e}/events`;u!==null&&(p.singleEvents=u?"true":"false"),i&&(p.q=`"${i}"`),r&&(p.timeMin=(0,Wm.default)(r).format("YYYY-MM-DDTHH:mm:ss.sssZ")),r&&n&&(p.timeMax=(0,Wm.default)(n).format("YYYY-MM-DDTHH:mm:ss.sssZ")),s.length>0&&(h+=`?${s.map(m=>`eventTypes=${m}`).join("&")}`);let y={method:"GET",url:h,queryParams:p,authentication:{type:"BEARER_TOKEN",token:d}};return await Ue.sendRequest(y)}o(Km,"runGetEvents");var kx=ve({auth:ne,name:"google_calendar_get_events",classification:"SEARCH",description:"Get Events",audience:"human",aiMetadata:{description:"Lists events from a Google Calendar, optionally filtered by a date range, search term, and event types, and can expand recurring events into individual instances. Use to look up or browse multiple events when you do not already have a specific event ID; use Get Event by ID for a single known event. Read-only and idempotent.",idempotent:!0},displayName:"Get all Events",props:Zm,outputSchema:Wu,run:Km});var $x=Be(xn());var Jm=Be(Sn());var Ju={calendar_id:ae.calendarDropdown("writer"),eventId:q.ShortText({displayName:"Event ID",required:!0}),title:q.ShortText({displayName:"Title of the event",required:!1}),start_date_time:q.DateTime({displayName:"Start date time of the event",required:!1}),end_date_time:q.DateTime({displayName:"End date time of the event",required:!1}),location:q.ShortText({displayName:"Location",required:!1}),description:q.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:ae.colorId,attendees:q.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:q.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:q.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:q.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1})};async function Ym(t){let{calendar_id:e,eventId:r,title:n,start_date_time:i,end_date_time:s,location:u,description:d,colorId:p,guests_can_invite_others:h,guests_can_modify:y,guests_can_see_other_guests:m}=t.propsValue,f=t.propsValue.attendees,l=await _t(t.auth),g=(0,$x.calendar)({version:"v3",auth:l}),v=await g.events.get({calendarId:e,eventId:r}),E=[];return Array.isArray(f)&&f.length>0?E=f.map(C=>({email:C})):v.data.attendees&&Array.isArray(v.data.attendees)&&(E=v.data.attendees),(await g.events.update({calendarId:e,eventId:r,requestBody:{summary:n??v.data.summary,attendees:E,description:d??v.data.description,colorId:p,location:u??v.data.location,start:i?{dateTime:(0,Jm.default)(i).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.start,end:s?{dateTime:(0,Jm.default)(s).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.end,guestsCanInviteOthers:h??v.data.guestsCanInviteOthers,guestsCanModify:y??v.data.guestsCanModify,guestsCanSeeOtherGuests:m??v.data.guestsCanSeeOtherGuests}})).data}o(Ym,"runUpdateEvent");var Dx=ve({displayName:"Update Event",auth:ne,name:"update_event",classification:"WRITE",description:"Updates an event in Google Calendar.",audience:"human",aiMetadata:{description:"Updates the fields of an existing Google Calendar event identified by calendar and event ID (title, times, location, description, color, attendees, guest permissions); unset fields retain their current values. Use to modify or reschedule an event that already exists rather than creating a new one. Requires the event ID. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:Ju,outputSchema:Ze,run:Ym});var Yu={strategy:0,items:o(async({auth:t,propsValue:{calendarId:e,expandRecurringEvent:r},lastFetchEpochMS:n})=>{let i=new Date(n);if(n===0){let d=new Date,p=new Date;p.setDate(d.getDate()-7),i=p}return(await pa(e,r,t,i)??[]).map(d=>({epochMilliSeconds:new Date(d.updated).getTime(),data:d}))},"items")},Nx=jt({auth:ne,name:"new_or_updated_event",classification:"READ",displayName:"New or Updated Event",description:"Triggers when an event is added or updated",aiMetadata:{description:"Fires when any event in the selected calendar is created or modified, polling by last-updated time. Each fired item is the affected event; can optionally expand recurring events so every occurrence fires separately."},props:{calendar_id:ae.calendarDropdown(),expandRecurringEvent:q.Checkbox({displayName:"Expand Recurring Event?",description:"If true, the trigger will activate for every occurrence of a recurring event.",required:!0,defaultValue:!1})},sampleData:{kind:"calendar#event",etag:"3350849506974000",id:"0nsfi5ttd2b17ac76ma2f37oi9",htmlLink:"https://www.google.com/calendar/event?eid=kgjb90uioj4klrgfmdsnjsjvlgkm",summary:"ap-event-test",created:"2023-02-03T11:36:36.000Z",updated:"2023-02-03T11:45:53.487Z",description:"Sample description",status:"canceled",creator:{email:"test@test.com",self:!0},organizer:{email:"test@test.com",self:!0},start:{dateTime:"2023-02-02T22:30:00+03:00",timeZone:"Asia/Amman"},end:{dateTime:"2023-02-02T23:30:00+03:00",timeZone:"Asia/Amman"},transparency:"transparent",iCalUID:"0nsfi5ttd2b17ac76ma2f37oi9@google.com",sequence:1,attendees:[{email:"attende@test.com",responseStatus:"needsAction"},{email:"test@test.com",organizer:!0,self:!0,responseStatus:"accepted"}],reminders:{useDefault:!0},eventType:"default"},outputSchema:Ze,type:"POLLING",async test({store:t,auth:e,propsValue:r,files:n}){return await Je.test(Yu,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent},files:n})},async onEnable({store:t,auth:e,propsValue:r}){await Je.onEnable(Yu,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent}})},async onDisable({store:t,auth:e,propsValue:r}){await Je.onDisable(Yu,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent}})},async run({store:t,auth:e,propsValue:r,files:n}){return await Je.poll(Yu,{store:t,auth:e,propsValue:{calendarId:r.calendar_id,expandRecurringEvent:r.expandRecurringEvent},files:n})}});var zx=Be(xn());var Ux=ve({auth:ne,name:"google-calendar-add-attendees",classification:"WRITE",displayName:"Add Attendees to Event",description:"Add one or more person to existing event.",audience:"both",aiMetadata:{description:"Adds one or more guests (by email) to an existing Google Calendar event, identified by calendar and event ID, preserving the current attendee list. Use to invite people to an event that already exists rather than recreating it. Not idempotent: re-running appends the same emails again, producing duplicate attendee entries.",idempotent:!1},props:{calendar_id:ae.calendarDropdown("writer"),eventId:q.ShortText({displayName:"Event ID",required:!0}),attendees:q.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!0})},outputSchema:Ze,async run(t){let{calendar_id:e,eventId:r}=t.propsValue,n=t.propsValue.attendees,i=await _t(t.auth),s=(0,zx.calendar)({version:"v3",auth:i}),u=await s.events.get({calendarId:e,eventId:r}),d=u.data.attendees??[],p=[];return p.push(...d),p.push(...n.map(y=>({email:y}))),(await s.events.update({calendarId:e,eventId:r,requestBody:{...u.data,attendees:p}})).data}});var Xm=Be(Sn());var Qm={calendar_ids:q.MultiSelectDropdown({auth:ne,displayName:"Calendars",description:"Select the calendars to check for busy periods.",required:!0,refreshers:[],options:o(async({auth:t})=>t?{disabled:!1,options:(await $t(t)).map(n=>({label:n.summary,value:n.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:q.DateTime({displayName:"Start Time",description:"The start of the time range to check.",required:!0}),end_date:q.DateTime({displayName:"End Time",description:"The end of the time range to check.",required:!0})};async function eh(t){let{calendar_ids:e,start_date:r,end_date:n}=t.propsValue,i=await Ce(t.auth),s={timeMin:(0,Xm.default)(r).toISOString(),timeMax:(0,Xm.default)(n).toISOString(),items:e.map(p=>({id:p}))},u={method:"POST",url:`${ae.baseUrl}/freeBusy`,body:s,authentication:{type:"BEARER_TOKEN",token:i}};return(await Ue.sendRequest(u)).body}o(eh,"runFindFreeBusy");var Mx=ve({auth:ne,name:"google_calendar_find_busy_free_periods",classification:"SEARCH",displayName:"Find Busy/Free Periods in Calendar",description:"Finds free/busy calendar details from Google Calendar.",audience:"human",aiMetadata:{description:"Queries one or more calendars for their busy time blocks within a given start/end window, without exposing event details. Use to check availability or find open slots before scheduling a meeting. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:Qm,outputSchema:Zu,run:eh});var th={calendar_id:ae.calendarDropdown(),event_id:q.ShortText({displayName:"Event ID",description:'The unique ID of the event (e.g., "abc123def456"). You can find this in the event URL or from other calendar actions.',required:!0}),max_attendees:q.Number({displayName:"Max Attendees",description:"Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.",required:!1}),time_zone:q.ShortText({displayName:"Time Zone",description:`Time zone for the response (e.g., "America/New_York", "Europe/London"). Defaults to the calendar's time zone if not specified.`,required:!1})};async function rh(t){let{calendar_id:e,event_id:r,max_attendees:n,time_zone:i}=t.propsValue,s=await Ce(t.auth);if(!e||typeof e!="string"||e.trim().length===0)throw new Error("Calendar ID is required");if(!r||typeof r!="string"||r.trim().length===0)throw new Error("Event ID cannot be empty");if(r.length<5||r.length>1024)throw new Error("Event ID must be between 5 and 1024 characters");let u={};n!==void 0&&n>0&&(u.maxAttendees=n.toString()),i&&typeof i=="string"&&i.trim().length>0&&(u.timeZone=i.trim());let d=`${ae.baseUrl}/calendars/${encodeURIComponent(e.trim())}/events/${encodeURIComponent(r.trim())}`,p={method:"GET",url:d,queryParams:u,authentication:{type:"BEARER_TOKEN",token:s}};try{return(await Ue.sendRequest(p)).body}catch(h){throw h.response?.status===404?new Error(`Event with ID "${r}" not found in calendar "${e}". Please verify the event ID and calendar selection.`):h.response?.status===403?new Error(`Access denied to event "${r}" in calendar "${e}". Please check your permissions.`):h.response?.status===400?new Error("Invalid request parameters. Please check the event ID format and other parameters."):h.response?.status===401?new Error("Authentication failed. Please reconnect your Google Calendar account."):new Error(`Failed to fetch event: ${h.message||"Unknown error occurred"}`)}}o(rh,"runGetEventById");var Lx=ve({auth:ne,name:"google_calendar_get_event_by_id",classification:"READ",displayName:"Get Event by ID",description:"Fetch event details by its unique ID from Google Calendar.",audience:"human",aiMetadata:{description:"Fetches the full details of a single Google Calendar event by its unique event ID within a given calendar. Use when you already have an event ID (e.g. from a trigger or a list action) and need its details; use Get all Events to search when you do not. Requires a valid event ID. Read-only and idempotent.",idempotent:!0},props:th,outputSchema:Ze,run:rh});var nh=Be(Sn()),jx=ve({auth:ne,name:"google_calendar_search_events_all_calendars",classification:"SEARCH",displayName:"Search Events Across Calendars",description:"Searches every calendar the account can access for events matching a keyword within a required time window.",audience:"ai",aiMetadata:{description:"Search all of the user's calendars at once for events matching a text query within a required time window, returning each match tagged with its owning calendarId so you can then get/update/delete it. Use this instead of Get all Events when you know a keyword and time range but do NOT know which calendar the event lives in (Get all Events searches a single calendar). A start and end time are mandatory to bound the cross-calendar scan; matching uses Google's native q= filter, not semantic search. Read-only and idempotent.",idempotent:!0},props:{query:q.ShortText({displayName:"Search Term",description:`Free-text query matched against event fields (summary, description, location, attendee names/emails) using Google's native search. Example: "budget review".`,required:!0}),start_date:q.DateTime({displayName:"Start Time",description:`Lower bound (inclusive) for an event's end time, as an ISO 8601 timestamp (e.g. "2026-06-01T00:00:00Z"). Required to bound the cross-calendar scan.`,required:!0}),end_date:q.DateTime({displayName:"End Time",description:`Upper bound (exclusive) for an event's start time, as an ISO 8601 timestamp (e.g. "2026-06-30T23:59:59Z"). Required to bound the cross-calendar scan.`,required:!0}),single_events:q.Checkbox({displayName:"Expand Recurring Events?",description:"When enabled, recurring events are expanded into their individual instances instead of returning the underlying recurring event.",required:!1,defaultValue:!0})},outputSchema:Px,async run(t){let{query:e,start_date:r,end_date:n,single_events:i}=t.propsValue,s=await Ce(t.auth),u=(0,nh.default)(r).toISOString(),d=(0,nh.default)(n).toISOString(),p=await $t(t.auth),h=[],y=[];for(let m of p){let f="";do{let l={q:e,timeMin:u,timeMax:d,singleEvents:i?"true":"false",showDeleted:"false",maxResults:"250"};f&&(l.pageToken=f);let g={method:"GET",url:`${ae.baseUrl}/calendars/${encodeURIComponent(m.id)}/events`,queryParams:l,authentication:{type:"BEARER_TOKEN",token:s}};try{let v=await Ue.sendRequest(g),E=v.body.items??[];for(let b of E)h.push({...b,calendarId:m.id});f=v.body.nextPageToken}catch(v){let E=v.response?.status;if(E===403||E===404){y.push({calendarId:m.id,status:E}),f="";continue}throw E===429?new Error("Google Calendar rate limit reached while searching calendars. Please retry shortly."):v}}while(f)}return{events:h,count:h.length,calendars_searched:p.length-y.length,...y.length>0?{skipped_calendars:y,warning:"Some calendars could not be searched (access denied or not found); a missing match may live in a skipped calendar. See skipped_calendars."}:{}}}});var Sr=Be(Sn()),qx=Be(Fx());Sr.default.extend(qx.default);function wL(t){if(t.length===0)return[];let e=[...t].sort((n,i)=>n.start-i.start),r=[{...e[0]}];for(let n=1;n<e.length;n++){let i=r[r.length-1],s=e[n];s.start<=i.end?i.end=Math.max(i.end,s.end):r.push({...s})}return r}o(wL,"mergeIntervals");function PL(t,e,r){let n=[],i=e;for(let s of t)if(s.start>i&&n.push({start:i,end:Math.min(s.start,r)}),i=Math.max(i,s.end),i>=r)break;return i<r&&n.push({start:i,end:r}),n.filter(s=>s.end>s.start)}o(PL,"complement");function xL(t,e,r){let n=[];for(let i of t){let s=Sr.default.utc(i.start).startOf("day"),u=Sr.default.utc(i.end);for(;s.valueOf()<i.end;){let d=s.add(e,"hour"),p=s.add(r,"hour"),h=Math.max(i.start,d.valueOf()),y=Math.min(i.end,p.valueOf());if(y>h&&n.push({start:h,end:y}),s=s.add(1,"day"),s.valueOf()>u.valueOf())break}}return n}o(xL,"clipToWorkingHours");var Bx=ve({auth:ne,name:"google_calendar_find_free_slots",classification:"SEARCH",displayName:"Find Free Time Slots",description:"Computes open time slots shared across one or more calendars within a window, by inverting their busy blocks.",audience:"ai",aiMetadata:{description:'Return the OPEN time slots common to the selected calendars within a window \u2014 the inverse of their combined busy blocks, optionally filtered to a minimum duration and to working hours. Use this instead of Find Busy/Free Periods (which returns only busy blocks and forces you to invert and reconcile them yourself) when you need the actual free intervals to answer "when can everyone meet". Idempotent because it performs no writes, but the result depends entirely on the window: pass absolute start/end times, since a window relative to "now" yields a shifting set of slots.',idempotent:!0},props:{calendar_ids:q.MultiSelectDropdown({auth:ne,displayName:"Calendars",description:"The calendars whose schedules must all be free. A slot is returned only when it is open on every selected calendar.",required:!0,refreshers:[],options:o(async({auth:t})=>t?{disabled:!1,options:(await $t(t)).map(n=>({label:n.summary,value:n.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:q.DateTime({displayName:"Window Start",description:'Start of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z"). Prefer absolute times over relative ones.',required:!0}),end_date:q.DateTime({displayName:"Window End",description:'End of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-05T18:00:00Z").',required:!0}),min_duration_minutes:q.Number({displayName:"Minimum Slot Duration (minutes)",description:"Discard any open slot shorter than this many minutes. Leave empty to return every open slot regardless of length.",required:!1}),working_hours_start:q.Number({displayName:"Working Hours Start (hour 0-23)",description:"If set together with Working Hours End, each day's open slots are clipped to this hour range, interpreted in UTC (not the calendar's local time zone). Example: 9 for 09:00 UTC. Leave both unset to return slots across the full window.",required:!1}),working_hours_end:q.Number({displayName:"Working Hours End (hour 0-23)",description:"Upper bound of the daily working-hours window. Example: 17 for 5 PM. Ignored unless Working Hours Start is also set.",required:!1})},outputSchema:Sx,async run(t){let{calendar_ids:e,start_date:r,end_date:n,min_duration_minutes:i,working_hours_start:s,working_hours_end:u}=t.propsValue,d=await Ce(t.auth),p=(0,Sr.default)(r).valueOf(),h=(0,Sr.default)(n).valueOf();if(h<=p)throw new Error("Window End must be after Window Start.");let y={method:"POST",url:`${ae.baseUrl}/freeBusy`,body:{timeMin:(0,Sr.default)(r).toISOString(),timeMax:(0,Sr.default)(n).toISOString(),items:e.map(b=>({id:b}))},authentication:{type:"BEARER_TOKEN",token:d}},m=await Ue.sendRequest(y),f=[],l=[];for(let b of Object.keys(m.body.calendars)){let C=m.body.calendars[b];if(C.errors?.length){l.push({calendarId:b,errors:C.errors});continue}let U=C.busy??[];for(let Y of U)f.push({start:(0,Sr.default)(Y.start).valueOf(),end:(0,Sr.default)(Y.end).valueOf()})}if(l.length>0)throw new Error(`Could not read availability for calendar(s): ${l.map(b=>`${b.calendarId} (${b.errors.map(C=>C.reason).join(", ")})`).join("; ")}. A slot can only be marked free if every selected calendar is free, so free slots cannot be computed while any of them are unreadable. Verify the calendar IDs with List Calendars.`);let g=wL(f),v=PL(g,p,h);if(s!==void 0&&u!==void 0&&u>s&&(v=xL(v,s,u)),i!==void 0&&i>0){let b=i*60*1e3;v=v.filter(C=>C.end-C.start>=b)}let E=v.map(b=>({start:(0,Sr.default)(b.start).toISOString(),end:(0,Sr.default)(b.end).toISOString(),duration_minutes:Math.round((b.end-b.start)/6e4)}));return{free_slots:E,count:E.length}}});var Vx=Be(xn());var ah=Be(Sn()),Gx=ve({auth:ne,name:"google_calendar_list_recurring_event_instances",classification:"SEARCH",displayName:"List Recurring Event Instances",description:"Lists the individual occurrences of one recurring event series, each with its own instance event ID.",audience:"ai",aiMetadata:{description:"List the individual occurrences of a single recurring event series, identified by its recurring-event ID, each returned with its own distinct instance event ID. Use this when you need to inspect, reschedule, or cancel ONE occurrence of a series rather than the whole series; Get all Events expands recurring events only across a whole-calendar window and cannot target one series by ID. Requires the recurring series' event ID; optionally bound by a time range. Read-only and idempotent.",idempotent:!0},props:{calendar_id:ae.calendarDropdown(),event_id:q.ShortText({displayName:"Recurring Event ID",description:'The event ID of the recurring SERIES (the parent), e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events. Individual instance IDs will not work here.',required:!0}),time_min:q.DateTime({displayName:"Start Time",description:`Optional lower bound (inclusive) for an instance's end time, as an ISO 8601 timestamp with offset (e.g. "2026-06-01T00:00:00Z").`,required:!1}),time_max:q.DateTime({displayName:"End Time",description:`Optional upper bound (exclusive) for an instance's start time, as an ISO 8601 timestamp with offset (e.g. "2026-06-30T23:59:59Z").`,required:!1}),show_deleted:q.Checkbox({displayName:"Include Cancelled Instances",description:"Whether to include cancelled (deleted) instances of the series in the result. Defaults to false.",required:!1,defaultValue:!1}),max_results:q.Number({displayName:"Max Results",description:"Maximum number of instances to return per page (1-2500). Defaults to the API default of 250.",required:!1})},outputSchema:Tx,async run(t){let{calendar_id:e,event_id:r,time_min:n,time_max:i,show_deleted:s,max_results:u}=t.propsValue,d=await _t(t.auth),p=(0,Vx.calendar)({version:"v3",auth:d});try{let h=await p.events.instances({calendarId:e,eventId:r,timeMin:n?(0,ah.default)(n).toISOString():void 0,timeMax:i?(0,ah.default)(i).toISOString():void 0,showDeleted:s??!1,maxResults:u}),y=h.data.items??[];return{instances:y,count:y.length,nextPageToken:h.data.nextPageToken??null}}catch(h){let y=h.response?.status??h.code;throw y===404?new Error(`Recurring event "${r}" not found in calendar "${e}". Verify the ID belongs to a recurring series.`):y===400?new Error(`Invalid request: "${r}" may not be a recurring event. The instances endpoint only works on recurring series.`):y===403?new Error(`Access denied to event "${r}" in calendar "${e}". Check your permissions.`):h}}});var Hx=Be(xn());var Wx=ve({auth:ne,name:"google_calendar_move_event",classification:"WRITE",displayName:"Move Event to Another Calendar",description:"Moves an existing event from one calendar to another, preserving its event ID and metadata.",audience:"ai",aiMetadata:{description:"Move an existing event from a source calendar to a destination calendar in place, preserving the event ID, conferencing, and attendee state. Use this instead of deleting and recreating the event (which loses the ID and metadata) when you need to transfer an event between calendars. Idempotent: moving an event to the calendar it already lives on is treated as a no-op. The source and destination must be writable calendars.",idempotent:!0},props:{calendar_id:ae.calendarDropdown("writer"),event_id:q.ShortText({displayName:"Event ID",description:'The ID of the event to move, e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events.',required:!0}),destination_calendar_id:q.Dropdown({auth:ne,displayName:"Destination Calendar",description:"The calendar to move the event to.",refreshers:[],required:!0,options:o(async({auth:t})=>t?{disabled:!1,options:(await $t(t,"writer")).map(r=>({label:r.summary,value:r.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),send_updates:q.StaticDropdown({displayName:"Send Notifications",description:"Who should receive notifications about the change of the event's organizer.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:wx,async run(t){let{calendar_id:e,event_id:r,destination_calendar_id:n,send_updates:i}=t.propsValue,s=await _t(t.auth),u=(0,Hx.calendar)({version:"v3",auth:s});if(e===n)return{moved:!1,already_in_destination:!0,event:(await u.events.get({calendarId:n,eventId:r})).data};try{return await u.events.move({calendarId:e,eventId:r,destination:n,sendUpdates:i??"none"}),{moved:!0,already_in_destination:!1,event:(await u.events.get({calendarId:n,eventId:r})).data}}catch(d){let p=d.response?.status??d.code;throw p===404?new Error(`Event "${r}" not found in source calendar "${e}". Verify the event ID and source calendar.`):p===403?new Error(`Access denied while moving event "${r}". Both the source and destination calendars must be writable.`):p===400?new Error(`Invalid move request for event "${r}". The destination must differ from the source and both must be valid calendars.`):d}}});var Zx=ve({auth:ne,name:"google_calendar_create_event",classification:"WRITE",displayName:"Create Event",description:"Create a new event on a Google Calendar with structured fields (title, start/end, location, description, attendees, color) and an optional Google Meet link.",audience:"ai",aiMetadata:{description:'Create a new event on a calendar from explicit structured fields (title, start/end times, location, description, attendees, color, guest permissions) with an optional Google Meet link. Use this when you already have the event details; for a single natural-language phrase use the quick-add path instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Requires a title and start time; end defaults to 30 minutes after start. Not idempotent: each call creates a new event.',idempotent:!1},props:Vm,outputSchema:Ze,run:Gm});var{eventId:Lre,calendar_id:jre,guests_can_modify:Fre,guests_can_invite_others:qre,guests_can_see_other_guests:Bre,...AL}=Ju;function sh(t){return q.StaticDropdown({displayName:t,description:"Leave unset to keep the event's current value.",required:!1,options:{options:[{label:"True",value:"true"},{label:"False",value:"false"}]}})}o(sh,"guestPermissionProp");function ch(t){return t===void 0?void 0:t==="true"}o(ch,"toOptionalBoolean");var IL={calendar_id:Ju.calendar_id,event_id:q.ShortText({displayName:"Event ID",description:"The ID of the event to update. Resolve it via List Events or Search Events Across Calendars.",required:!0}),...AL,guests_can_modify:sh("Guests can modify"),guests_can_invite_others:sh("Guests can invite others"),guests_can_see_other_guests:sh("Guests can see other guests")},Kx=ve({auth:ne,name:"google_calendar_update_event",classification:"WRITE",displayName:"Update Event",description:"Update fields of an existing Google Calendar event by ID using a safe get-then-merge; fields you leave unset keep their current values.",audience:"ai",aiMetadata:{description:"Update fields of an existing event (title, times, location, description, color, attendees, guest permissions) identified by calendar and event ID. It fetches the event first and merges, so unset fields keep their current values (it never blanks out attendees/recurrence/conferencing). Use this to edit or reschedule an existing event rather than recreating it. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:IL,outputSchema:Ze,run:o(t=>Ym({...t,propsValue:{...t.propsValue,eventId:t.propsValue.event_id,guests_can_modify:ch(t.propsValue.guests_can_modify),guests_can_invite_others:ch(t.propsValue.guests_can_invite_others),guests_can_see_other_guests:ch(t.propsValue.guests_can_see_other_guests)}}),"run")});var RL={calendar_id:ae.calendarDropdown("writer"),event_id:q.ShortText({displayName:"Event ID",description:"The ID of the event to delete. Resolve it via List Events or Search Events Across Calendars.",required:!0})},Jx=ve({auth:ne,name:"google_calendar_delete_event",classification:"DESTRUCTIVE",displayName:"Delete Event",description:"Permanently delete an event from a Google Calendar by its event ID.",audience:"ai",aiMetadata:{description:"Permanently delete an event from a calendar, identified by calendar and event ID. Use to cancel or remove an existing event; this cannot be undone, so confirm the event ID first. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: once deleted, re-running leaves the event absent (a repeat call may report it as already gone).",idempotent:!0},props:RL,run:o(t=>Hm({...t,propsValue:{calendar_id:t.propsValue.calendar_id,eventId:t.propsValue.event_id}}),"run")});var Yx=ve({auth:ne,name:"google_calendar_get_event",classification:"READ",displayName:"Get Event",description:"Fetch the full details of a single Google Calendar event by its event ID.",audience:"ai",aiMetadata:{description:"Fetch the full details of one event by its unique event ID within a calendar. Use this when you already have an event ID (from a trigger or a list action) and need its current details; to find an event when you do not have its ID, use google_calendar_list_events or google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Read-only and idempotent.",idempotent:!0},props:th,outputSchema:Ze,run:rh});var Xx=ve({auth:ne,name:"google_calendar_list_events",classification:"SEARCH",displayName:"List Events",description:"List events from one Google Calendar, optionally filtered by date range, free-text search, and event types.",audience:"ai",aiMetadata:{description:`List events from one calendar, optionally narrowed by a date range, a free-text search term (matched with Google's native q= filter), and event types, optionally expanding recurring events into individual instances. Use this to browse or find events in a known calendar, including text search within that calendar; to search across every calendar when you do not know which one holds the event, use google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:Zm,outputSchema:Wu,run:Km});var Qx=ve({auth:ne,name:"google_calendar_find_busy_periods",classification:"SEARCH",displayName:"Find Busy Periods",description:"Return the raw busy time blocks of one or more calendars within a window, via the freebusy query.",audience:"ai",aiMetadata:{description:"Query one or more calendars for their raw busy time blocks within a start/end window, without exposing event details (the low-level freebusy primitive). Use this when you need the busy intervals themselves (e.g. across several shared calendars); to get the inverse open slots directly, use google_calendar_find_free_slots instead. Resolve calendarId values via google_calendar_list_calendars. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:Qm,outputSchema:Zu,run:eh});var eA=Be(xn());var tA=ve({auth:ne,name:"google_calendar_remove_attendee",classification:"WRITE",displayName:"Remove Attendee",description:"Remove one attendee (by email) from an existing Google Calendar event, preserving the rest of the guest list.",audience:"ai",aiMetadata:{description:"Remove a single attendee, matched by email, from an existing event by fetching the current attendee list, dropping that one guest, and patching the event. Use this to uninvite one person without disturbing the other guests; to add guests use the add-attendees action instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Not idempotent (notifications may fire), though re-removing an already-absent attendee is a no-op on state. It uses optimistic concurrency (If-Match on the event revision), so a simultaneous edit by someone else fails with a retry-able conflict instead of silently clobbering their change.",idempotent:!1},props:{calendar_id:ae.calendarDropdown("writer"),event_id:q.ShortText({displayName:"Event ID",description:"The ID of the event to remove the attendee from. Resolve it via List Events or Search Events Across Calendars.",required:!0}),attendee_email:q.ShortText({displayName:"Attendee Email",description:"Email address of the attendee to remove from the event.",required:!0}),send_updates:q.StaticDropdown({displayName:"Send Notifications",description:"Who should be notified about the attendee change.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:Ex,async run(t){let{calendar_id:e,event_id:r,attendee_email:n,send_updates:i}=t.propsValue,s=await _t(t.auth),u=(0,eA.calendar)({version:"v3",auth:s}),d=n.trim().toLowerCase();try{let p=await u.events.get({calendarId:e,eventId:r}),h=p.data.attendees??[],y=h.filter(l=>(l.email??"").trim().toLowerCase()!==d);if(y.length===h.length)return{removed:!1,attendee_email:n,message:`Attendee "${n}" was not on event "${r}"; nothing to remove.`,event:p.data};let m=p.data.etag??void 0,f=await u.events.patch({calendarId:e,eventId:r,sendUpdates:i??"none",requestBody:{attendees:y}},m?{headers:{"If-Match":m}}:{});return{removed:!0,attendee_email:n,event:f.data}}catch(p){let h=p.response?.status??p.code;throw h===412?new Error(`Event "${r}" changed since it was read (a concurrent edit). Re-run Remove Attendee to retry against the latest version.`):h===404?new Error(`Event "${r}" not found in calendar "${e}". Verify the event ID and calendar.`):h===403?new Error(`Access denied while editing event "${r}". The calendar must be writable.`):p}}});var rA=Be(xn());var uh=Be(Sn()),nA=ve({auth:ne,name:"google_calendar_import_event",classification:"WRITE",displayName:"Import Event",description:"Import an existing event (by iCalUID) into a Google Calendar as a private copy, using events.import.",audience:"ai",aiMetadata:{description:'Import an existing event into a calendar as a private copy, keyed by its iCalUID with a start and end time (the events.import primitive, distinct from creating a brand-new event or moving one). Use this to copy or de-duplicate an event across calendars; re-importing the same iCalUID updates the existing copy rather than duplicating it. Resolve calendarId via google_calendar_list_calendars (default "primary"). Only default (non-special) events can be imported. Not idempotent: each import can create or mutate the destination copy.',idempotent:!1},props:{calendar_id:ae.calendarDropdown("writer"),ical_uid:q.ShortText({displayName:"iCal UID",description:`The event's iCalUID (its globally unique identifier, e.g. "abc123@google.com"). This is the dedup key: re-importing the same UID updates the existing copy.`,required:!0}),summary:q.ShortText({displayName:"Title",description:"Title (summary) of the imported event.",required:!0}),start_date_time:q.DateTime({displayName:"Start Time",description:'Event start as an ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z").',required:!0}),end_date_time:q.DateTime({displayName:"End Time",description:'Event end as an ISO 8601 timestamp (e.g. "2026-06-01T10:00:00Z").',required:!0}),location:q.ShortText({displayName:"Location",required:!1}),description:q.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1})},outputSchema:Ze,async run(t){let{calendar_id:e,ical_uid:r,summary:n,start_date_time:i,end_date_time:s,location:u,description:d}=t.propsValue,p=await _t(t.auth),h=(0,rA.calendar)({version:"v3",auth:p});try{return(await h.events.import({calendarId:e,requestBody:{iCalUID:r,summary:n,location:u??void 0,description:d??void 0,start:{dateTime:(0,uh.default)(i).toISOString()},end:{dateTime:(0,uh.default)(s).toISOString()}}})).data}catch(y){let m=y.response?.status??y.code;throw m===403?new Error(`Access denied while importing into calendar "${e}". The calendar must be writable.`):m===400?new Error(`Invalid import request. Ensure iCalUID, start, and end are provided and that the event is a default (non-special) event. (${y.message})`):y}}});var oA=ve({auth:ne,name:"google_calendar_list_calendars",classification:"SEARCH",displayName:"List Calendars",description:"List every calendar in the user's calendar list, returning each calendar's id, summary, access role, time zone, and whether it is primary.",audience:"ai",aiMetadata:{description:`List all calendars on the user's calendar list, returning each one's calendarId, summary, accessRole, timeZone, and whether it is the primary calendar. This is the calendarId resolver: call it first to discover which calendars exist and obtain the calendarId that every event/freebusy atomic needs (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:_x,async run(t){await Ce(t.auth);let e=await $t(t.auth);return{calendars:e.map(r=>({id:r.id,summary:r.summary,description:r.description,location:r.location,timeZone:r.timeZone,accessRole:r.accessRole,primary:r.primary??!1,selected:r.selected??!1,backgroundColor:r.backgroundColor,foregroundColor:r.foregroundColor})),count:e.length}}});var iA=ve({auth:ne,name:"google_calendar_get_calendar",classification:"READ",displayName:"Get Calendar",description:"Fetch one calendar's metadata (summary, time zone, description, location) by its calendar ID.",audience:"ai",aiMetadata:{description:`Fetch one calendar's metadata \u2014 summary, timeZone, description, and location \u2014 by its calendar ID. Use this to read a calendar's time zone, which is load-bearing when constructing correct event start/end windows. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{calendar_id:ae.calendarDropdown()},outputSchema:yx,async run(t){let{calendar_id:e}=t.propsValue,r=await Ce(t.auth),n={method:"GET",url:`${ae.baseUrl}/calendars/${encodeURIComponent(e)}`,authentication:{type:"BEARER_TOKEN",token:r}};try{return(await Ue.sendRequest(n)).body}catch(i){let s=i.response?.status;throw s===404?new Error(`Calendar "${e}" not found. Verify the calendar ID via List Calendars.`):s===403?new Error(`Access denied to calendar "${e}". Check your permissions.`):i}}});var aA=ve({auth:ne,name:"google_calendar_get_colors",classification:"READ",displayName:"Get Colors",description:"Fetch the Google Calendar color palette mapping colorId values to their hex background/foreground colors.",audience:"ai",aiMetadata:{description:"Fetch the global color palette: the mapping from each colorId to its background/foreground hex color, for both events and calendars. Use this to resolve a colorId before setting the color on google_calendar_create_event or google_calendar_update_event. Read-only and idempotent.",idempotent:!0},props:{},outputSchema:vx,async run(t){return await dc(t.auth)}});var sA=ve({auth:ne,name:"google_calendar_list_settings",classification:"SEARCH",displayName:"List Settings",description:"List the user's Google Calendar account settings (time zone, week start, date/time format, and more).",audience:"ai",aiMetadata:{description:`List all of the user's Google Calendar account settings as id/value pairs \u2014 including the account "timezone", "weekStart", and "format24HourTime". Use this to read the account time zone to anchor relative-date reasoning before building event windows, or to read a single setting (just pick its id from the returned list). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:bx,async run(t){let e=await Ce(t.auth),r={method:"GET",url:`${ae.baseUrl}/users/me/settings`,authentication:{type:"BEARER_TOKEN",token:e}},i=(await Ue.sendRequest(r)).body.items??[],s={};for(let u of i)s[u.id]=u.value;return{settings:s,items:i,count:i.length}}});var Xu="google_calendar_watch",Oi="google_calendar_sync_token",lh="google_calendar_seen_event_ids",CL=500;function cA(t,{event_types:e,search_filter:r,exclude_all_day:n}){if(e&&e.length>0){let i=t.eventType||"default";if(!e.includes(i))return!1}if(r&&r.trim()){let i=r.toLowerCase().trim(),s=(t.summary||"").toLowerCase(),u=(t.description||"").toLowerCase(),d=(t.location||"").toLowerCase();if(!(s.includes(i)||u.includes(i)||d.includes(i)))return!1}return!(n&&t.start?.date&&!t.start?.dateTime)}o(cA,"matchesFilters");var uA=jt({auth:ne,name:"new_event",classification:"READ",displayName:"New Event",description:"Fires when a new event is created in a calendar.",aiMetadata:{description:"Fires when a brand-new event is created in the selected calendar (not on edits or cancellations), via Google push notifications. Each fired item is the new event; can be narrowed by event type, a text search across title/description/location, and an option to skip all-day events."},props:{calendar_id:ae.calendarDropdown("writer"),event_types:q.StaticMultiSelectDropdown({displayName:"Event Types to Monitor",description:"Filter by specific event types (leave empty to monitor all event types)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_filter:q.ShortText({displayName:"Search Filter",description:"Only trigger for events containing this text in title, description, or location (optional)",required:!1}),exclude_all_day:q.Checkbox({displayName:"Exclude All-Day Events",description:"Skip triggering for all-day events",required:!1,defaultValue:!1})},outputSchema:Ze,type:"WEBHOOK",renewConfiguration:{strategy:"CRON",cronExpression:"0 */12 * * *"},sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_12345",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzEyMzQ1",created:"2025-08-15T11:02:27.000Z",updated:"2025-08-15T11:02:27.491Z",summary:"Team Sync",creator:{email:"creator@example.com"},organizer:{email:"creator@example.com",self:!0},start:{dateTime:"2025-08-18T10:00:00-07:00",timeZone:"America/Los_Angeles"},end:{dateTime:"2025-08-18T11:00:00-07:00",timeZone:"America/Los_Angeles"},iCalUID:"sample_event_id_12345@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(t){let e=t.propsValue.calendar_id,r=t.auth,n=await Ld(e,t.webhookUrl,r);await t.store.put(Xu,n);let i=await lc({calendarId:e,authProp:r});rt(i)||await t.store.put(Oi,i)},async onDisable(t){let e=t.auth,r=await t.store.get(Xu);r&&await Md(r,e),await t.store.delete(Oi),await t.store.delete(lh)},async onRenew(t){let e=t.propsValue.calendar_id,r=t.auth,n=await t.store.get(Xu);n&&await Md(n,r);let i=await Ld(e,t.webhookUrl,r);await t.store.put(Xu,i)},async run(t){let n=t.payload.headers["x-goog-resource-state"],i={event_types:t.propsValue.event_types,search_filter:t.propsValue.search_filter,exclude_all_day:t.propsValue.exclude_all_day};if(n==="sync")return[];if(n!=="exists")return[];let s=t.propsValue.calendar_id,u=t.auth,d=await t.store.get(Oi);if(rt(d)){let g=await lc({calendarId:s,authProp:u});return rt(g)||await t.store.put(Oi,g),[]}let{items:p,nextSyncToken:h,syncTokenInvalid:y}=await Hb({calendarId:s,syncToken:d,authProp:u});if(y){let g=await lc({calendarId:s,authProp:u});return rt(g)||await t.store.put(Oi,g),[]}rt(h)||await t.store.put(Oi,h);let m=await t.store.get(lh),f=new Set(m??[]),l=[];for(let g of p)!g.id||g.status==="cancelled"||f.has(g.id)||(f.add(g.id),cA(g,i)&&l.push(g));if(f.size!==(m?.length??0)){let g=Array.from(f).slice(-CL);await t.store.put(lh,g)}return l},async test(t){let e=t.auth,r={event_types:t.propsValue.event_types,search_filter:t.propsValue.search_filter,exclude_all_day:t.propsValue.exclude_all_day},n=await Wb(t.propsValue.calendar_id,e);return cA(n,r)?[n]:[]}});var Qu={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{if(r===0)return[];let{calendar_id:n,specific_event:i,event_id:s}=e;if(!n)return[];if(i&&!s)return[];let u=[];if(i&&s){let h={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events/${s}`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)}};try{let m=(await Ue.sendRequest(h)).body,f=m.end?.dateTime??m.end?.date;f&&new Date(f).getTime()>r&&(u=[m])}catch(y){return console.error("Error fetching specific event:",y),[]}}else{let h={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:new Date(r).toISOString()}};u=(await Ue.sendRequest(h)).body.items}let d=[],p=Date.now();for(let h of u){let y=h.end?.dateTime??h.end?.date;if(!y)continue;let m=new Date(y).getTime();m>r&&m<=p&&d.push({epochMilliSeconds:m,data:h})}return d},"items")},lA=jt({auth:ne,name:"event_ends",classification:"READ",displayName:"Event Ends",description:"Fires when an event ends.",aiMetadata:{description:"Fires once an event in the selected calendar reaches its end time, detected by polling. Each fired item is the event that just ended. Can watch all events in the calendar or be scoped to a single specific event."},props:{calendar_id:ae.calendarDropdown("writer"),specific_event:q.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:ae.eventDropdown(!1)},outputSchema:Ze,type:"POLLING",sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_67890",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzY3ODkw",created:"2025-08-14T09:00:00.000Z",updated:"2025-08-14T09:00:00.000Z",summary:"Project Deadline",creator:{email:"manager@example.com"},organizer:{email:"manager@example.com",self:!0},start:{dateTime:"2025-08-14T14:30:00+05:30",timeZone:"Asia/Kolkata"},end:{dateTime:"2025-08-14T15:30:00+05:30",timeZone:"Asia/Kolkata"},iCalUID:"sample_event_id_67890@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(t){await Je.onEnable(Qu,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(Qu,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(Qu,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(Qu,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var el={strategy:0,items:o(async({auth:t,propsValue:e})=>{let{calendar_id:r,specific_event:n,event_id:i,time_value:s,time_unit:u}=e;if(!r||!s||!u)return[];if(n&&!i)return[];let d=s*60*1e3;u==="hours"?d=s*60*60*1e3:u==="days"&&(d=s*24*60*60*1e3);let p=Date.now(),h=300*1e3,y=new Date(p+d).toISOString(),m=new Date(p+d+h).toISOString(),f=[];if(n&&i){let l={method:"GET",url:`${ae.baseUrl}/calendars/${r}/events/${i}`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)}};try{let v=(await Ue.sendRequest(l)).body,b=new Date(v.start?.dateTime??v.start?.date??0).getTime()-d;b>=p&&b<=p+h&&(f=[v])}catch(g){return console.error("Error fetching specific event:",g),[]}}else{let l={method:"GET",url:`${ae.baseUrl}/calendars/${r}/events`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:y,timeMax:m}};f=(await Ue.sendRequest(l)).body.items}return f.map(l=>({epochMilliSeconds:new Date(l.start?.dateTime??l.start?.date??0).getTime()-d,data:l}))},"items")},dA=jt({auth:ne,name:"event_starts_in",classification:"READ",displayName:"Event Start (Time Before)",description:"Fires at a specified amount of time before an event starts (e.g., a reminder).",aiMetadata:{description:"Fires a configurable lead time (in minutes, hours, or days) before an event in the selected calendar begins, acting as a pre-event reminder. Each fired item is the upcoming event. Can watch all events or a single specific event."},props:{calendar_id:ae.calendarDropdown("writer"),specific_event:q.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:ae.eventDropdown(!1),time_value:q.Number({displayName:"Time Before",description:"The amount of time before the event starts.",required:!0,defaultValue:15}),time_unit:q.StaticDropdown({displayName:"Time Unit",required:!0,options:{options:[{label:"Minutes",value:"minutes"},{label:"Hours",value:"hours"},{label:"Days",value:"days"}]},defaultValue:"minutes"})},outputSchema:Ze,type:"POLLING",sampleData:{},async onEnable(t){await Je.onEnable(el,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(el,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(el,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(el,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var tl={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{calendar_id:n,search_term:i,event_types:s,search_fields:u}=e;if(!n||!i)return[];let d;r===0?(d=new Date,d.setDate(d.getDate()-1)):d=new Date(r);let p={singleEvents:"true",orderBy:"updated",updatedMin:d.toISOString(),q:i};s&&s.length>0&&s.forEach(l=>{p.eventTypes?p.eventTypes+="&eventTypes="+l:p.eventTypes=l});let h={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)},queryParams:p};return(await Ue.sendRequest(h)).body.items.filter(l=>{let g=new Date(l.created??0).getTime();if(!(new Date(l.updated??0).getTime()-g<5e3))return!1;if(u&&u.length>0){let b=i.toLowerCase();return u.some(C=>{switch(C){case"summary":return l.summary?.toLowerCase().includes(b)||!1;case"description":return l.description?.toLowerCase().includes(b)||!1;case"location":return l.location?.toLowerCase().includes(b)||!1;case"attendees":return l.attendees?.some(U=>U.email?.toLowerCase().includes(b)||U.displayName?.toLowerCase().includes(b))||!1;default:return!1}})}return!0}).map(l=>({epochMilliSeconds:new Date(l.updated).getTime(),data:l}))},"items")},pA=jt({auth:ne,name:"new_event_matching_search",classification:"READ",displayName:"New Event Matching Search",description:"Fires when a new event is created that matches a specified search term.",aiMetadata:{description:"Fires when a newly created event in the selected calendar matches a required search term (matched across title, description, location, and attendees by default, or restricted to chosen fields). Each fired item is the matching new event; can also be filtered by event type."},props:{calendar_id:ae.calendarDropdown("writer"),search_term:q.ShortText({displayName:"Search Term",description:"The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).",required:!0}),event_types:q.StaticMultiSelectDropdown({displayName:"Event Types",description:"Filter by specific event types (optional)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_fields:q.StaticMultiSelectDropdown({displayName:"Search In Fields",description:"Specify which fields to search in (leave empty to use Google's default search across all fields)",required:!1,options:{options:[{label:"Event Title/Summary",value:"summary"},{label:"Event Description",value:"description"},{label:"Event Location",value:"location"},{label:"Attendee Names/Emails",value:"attendees"}]}})},outputSchema:Ze,type:"POLLING",sampleData:{id:"abc123def456",summary:"Final Project Review",description:"Review of the Q3 final project deliverables.",status:"confirmed",created:"2025-08-14T09:05:00.000Z",updated:"2025-08-14T09:05:01.000Z",start:{dateTime:"2025-09-01T10:00:00-07:00"},end:{dateTime:"2025-09-01T11:30:00-07:00"},organizer:{email:"project.manager@example.com"}},async onEnable(t){await Je.onEnable(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(tl,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var rl={strategy:0,items:o(async({auth:t,propsValue:e,lastFetchEpochMS:r})=>{let{calendar_id:n,specific_event:i,event_id:s,cancellation_reason:u}=e;if(!n)return[];if(i&&!s)return[];let d;r===0?(d=new Date,d.setDate(d.getDate()-1)):d=new Date(r);let p=[];if(i&&s){let h={method:"GET",url:`${ae.baseUrl}/calendars/${n}/events/${s}`,authentication:{type:"BEARER_TOKEN",token:await Ce(t)}};try{let m=(await Ue.sendRequest(h)).body;new Date(m.updated??0).getTime()>r&&m.status==="cancelled"&&(p=[m])}catch(y){return console.error("Error fetching specific event:",y),[]}}else p=(await pa(n,!0,t,d)).filter(y=>y.status==="cancelled");return u&&u.length>0&&(p=p.filter(h=>u.some(y=>{switch(y){case"deleted":return!h.summary||h.summary.includes("Deleted");case"declined":return h.attendees?.some(m=>m.responseStatus==="declined")||!1;case"rescheduled":return h.summary?.toLowerCase().includes("rescheduled")||h.description?.toLowerCase().includes("rescheduled")||!1;case"other":return!0;default:return!0}}))),p.map(h=>({epochMilliSeconds:new Date(h.updated).getTime(),data:h}))},"items")},fA=jt({auth:ne,name:"event_cancelled",classification:"READ",displayName:"Event Cancelled",description:"Fires when an event is canceled or deleted.",aiMetadata:{description:"Fires when an event in the selected calendar transitions to a cancelled (or deleted) state, detected by polling. Each fired item is the cancelled event; can optionally be filtered by cancellation reason (deleted, attendee declined, rescheduled, other) and scoped to a single specific event."},props:{calendar_id:ae.calendarDropdown("writer"),specific_event:q.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:ae.eventDropdown(!1),cancellation_reason:q.StaticMultiSelectDropdown({displayName:"Cancellation Reasons",description:"Filter by specific types of cancellations (optional)",required:!1,options:{options:[{label:"Event Deleted",value:"deleted"},{label:"Attendee Declined",value:"declined"},{label:"Event Rescheduled",value:"rescheduled"},{label:"Other Cancellations",value:"other"}]}})},outputSchema:Ze,type:"POLLING",sampleData:{id:"abc123def456_cancelled",summary:"Cancelled: Q3 Planning Session",status:"cancelled",created:"2025-07-20T10:00:00.000Z",updated:"2025-08-14T09:30:00.000Z",organizer:{email:"project.manager@example.com"},start:{dateTime:"2025-08-25T10:00:00-07:00"},end:{dateTime:"2025-08-25T11:30:00-07:00"}},async onEnable(t){await Je.onEnable(rl,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(rl,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(rl,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return await Je.test(rl,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})}});var dh={strategy:1,items:o(async({auth:t,store:e,propsValue:r})=>{let{access_role_filter:n,calendar_name_filter:i,exclude_shared:s}=r,d=await $t(t);if(n&&n.length>0&&(d=d.filter(f=>n.includes(f.accessRole))),i&&i.trim()){let f=i.toLowerCase().trim();d=d.filter(l=>l.summary?.toLowerCase().includes(f)||l.description?.toLowerCase().includes(f))}s&&(d=d.filter(f=>f.accessRole==="owner"||f.primary));let p=d.map(f=>f.id),h=await e.get("calendars")||[],y=new Set(h),m=d.filter(f=>!y.has(f.id));return await e.put("calendars",p),m.map(f=>({id:f.id,data:{...f,isOwned:f.accessRole==="owner"||f.primary,isShared:f.accessRole!=="owner"&&!f.primary,calendarType:f.primary?"primary":f.accessRole==="owner"?"owned":"shared"}}))},"items")},mA=jt({auth:ne,name:"new_calendar",classification:"READ",displayName:"New Calendar",description:"Fires when a new calendar is created or becomes accessible.",aiMetadata:{description:"Fires when a calendar newly appears in the connected account's calendar list, whether created or shared in, detected by polling. Each fired item is the new calendar. Can be filtered by access role, a name/description text match, and an option to exclude shared calendars."},props:{access_role_filter:q.StaticMultiSelectDropdown({displayName:"Access Role Filter",description:"Only trigger for calendars with specific access roles (optional)",required:!1,options:{options:[{label:"Owner",value:"owner"},{label:"Writer",value:"writer"},{label:"Reader",value:"reader"},{label:"Free/Busy Reader",value:"freeBusyReader"}]}}),calendar_name_filter:q.ShortText({displayName:"Calendar Name Filter",description:"Only trigger for calendars containing this text in name or description (optional)",required:!1}),exclude_shared:q.Checkbox({displayName:"Exclude Shared Calendars",description:"Only trigger for calendars you own, not shared calendars",required:!1,defaultValue:!1})},outputSchema:hx,type:"POLLING",sampleData:{id:"sample_calendar_id@group.calendar.google.com",summary:"New Project Team Calendar",description:"A shared calendar for the new project team.",timeZone:"Asia/Kolkata",backgroundColor:"#9fe1e7",foregroundColor:"#000000",accessRole:"owner",isOwned:!0,isShared:!1,calendarType:"owned",primary:!1},async onEnable(t){let e=await $t(t.auth),{access_role_filter:r,calendar_name_filter:n,exclude_shared:i}=t.propsValue,s=e;if(r&&r.length>0&&(s=s.filter(u=>r.includes(u.accessRole))),n&&n.trim()){let u=n.toLowerCase().trim();s=s.filter(d=>d.summary?.toLowerCase().includes(u)||d.description?.toLowerCase().includes(u))}i&&(s=s.filter(u=>u.accessRole==="owner"||u.primary)),await t.store.put("calendars",s.map(u=>u.id)),await Je.onEnable(dh,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async onDisable(t){await Je.onDisable(dh,{auth:t.auth,store:t.store,propsValue:t.propsValue})},async run(t){return await Je.poll(dh,{auth:t.auth,store:t.store,propsValue:t.propsValue,files:t.files})},async test(t){return(await $t(t.auth)).slice(-1).map(n=>({id:n.id,data:{...n,isOwned:n.accessRole==="owner"||n.primary,isShared:n.accessRole!=="owner"&&!n.primary,calendarType:n.primary?"primary":n.accessRole==="owner"?"owned":"shared"}}))}});var OL=Iv({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-calendar.png",categories:["PRODUCTIVITY"],displayName:"Google Calendar",description:"Get organized and stay on schedule",authors:["OsamaHaikal","bibhuty-did-this","Vitalini","pfernandez98","kishanprmr","MoShizzle","khaledmashaly","abuaboud","ikus060","Cloudieunnie","sanket-a11y","geekyme"],auth:ne,actions:[Ux,Rx,Ix,kx,Dx,Ox,Mx,Lx,jx,Bx,Gx,Wx,Zx,Kx,Jx,Yx,Xx,Qx,tA,nA,oA,iA,aA,sA,Vb({auth:ne,baseUrl(){return ae.baseUrl},authMapping:o(async t=>({Authorization:`Bearer ${await Ce(t)}`}),"authMapping")})],triggers:[Nx,uA,lA,dA,pA,fA,mA]});0&&(module.exports={createGoogleClient,getAccessToken,googleCalendar,googleCalendarAuth});
67
+ `;E+=k,typeof b.body=="string"&&(E+=b.body,E+=`\r
68
+ `)}E+=v,t.data=E}if(a(h,"browserMultipartUpload"),e.mediaUrl&&o.body)if(t.url=e.mediaUrl,r){n.uploadType="multipart";let p=[{"content-type":"application/json",body:JSON.stringify(r)},{"content-type":o.mimeType||r&&r.mimeType||s,body:o.body}];(0,DT.isBrowser)()?h(p):f(p)}else n.uploadType="media",Object.assign(u,{"content-type":o.mimeType||s}),t.data=o.body;else t.data=r||void 0;if(t.headers=kT.Gaxios.mergeHeaders(t.headers||{},u),t.params=n,!(0,DT.isBrowser)()){t.headers.set("Accept-Encoding","gzip"),t.userAgentDirectives.push({product:"google-api-nodejs-client",version:cN.version,comment:"gzip"});let p=t.userAgentDirectives.map(y=>{let v=`${y.product}/${y.version}`;return y.comment&&(v+=` (${y.comment})`),v}).join(" ");t.headers.set("User-Agent",p)}if(t.validateStatus||(t.validateStatus=p=>p>=200&&p<300||p===304),t.retry=t.retry===void 0?!0:t.retry,delete t.auth,t.universeDomain&&t.universe_domain&&t.universeDomain!==t.universe_domain)throw new Error("Please set either universe_domain or universeDomain, but not both.");let g=typeof process=="object"&&typeof process.env=="object"?process.env.GOOGLE_CLOUD_UNIVERSE_DOMAIN:void 0,m=t.universeDomain??t.universe_domain??g??"googleapis.com";if(m!=="googleapis.com"&&t.url){let p=new URL(t.url);p.hostname.endsWith(".googleapis.com")&&(p.hostname=p.hostname.replace(/googleapis\.com$/,m),t.url=p.toString())}if(Object.keys(t.params).length||(delete t.params,delete t.paramsSerializer),i&&typeof i=="object"){let p=typeof i.getUniverseDomain=="function"?await i.getUniverseDomain():void 0;if(p&&m!==p)throw new Error(`The configured universe domain (${m}) does not match the universe domain found in the credentials (${p}). If you haven't configured the universe domain explicitly, googleapis.com is the default.`);if(t.http2){let y=await i.getRequestHeaders(t.url),v=Object.assign({},t);return v.headers=kT.Gaxios.mergeHeaders(v.headers,y),pW.request(v)}else{let y=await i.request(t);return(0,$T.marshallGaxiosResponse)(y)}}else return new kT.Gaxios().request(t).then(p=>(0,$T.marshallGaxiosResponse)(p))}a(aN,"createAPIRequestAsync");var NT=class extends sN.Transform{static{a(this,"ProgressStream")}bytesRead=0;_transform(t,n,o){this.bytesRead+=t.length,this.emit("progress",this.bytesRead),this.push(t),o()}};function gW(e,t){(0,DT.isBrowser)()||(e["x-goog-api-client"]=`gdcl/${cN.version} gl-node/${process.versions.node}`),t&&(e["x-goog-api-version"]=t)}a(gW,"populateAPIHeader")});var uN=z(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.AuthPlus=void 0;var eo=Vu(),UT=class extends eo.GoogleAuth{static{a(this,"AuthPlus")}JWT=eo.JWT;Compute=eo.Compute;OAuth2=eo.OAuth2Client;GoogleAuth=eo.GoogleAuth;AwsClient=eo.AwsClient;IdentityPoolClient=eo.IdentityPoolClient;ExternalAccountClient=eo.ExternalAccountClient;_cachedAuth;async getClient(t){return this._cachedAuth=new eo.GoogleAuth(t),this._cachedAuth.getClient()}getProjectId(t){return t?this._cachedAuth?this._cachedAuth.getProjectId(t):super.getProjectId(t):this._cachedAuth?this._cachedAuth.getProjectId():super.getProjectId()}};ih.AuthPlus=UT});var LT=z(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});ah.Endpoint=void 0;var lN=oh(),MT=class{static{a(this,"Endpoint")}_options;google;constructor(t){this._options=t||{}}applySchema(t,n,o,r){if(this.applyMethodsFromSchema(t,n,o,r),o.resources){for(let i in o.resources)if(Object.prototype.hasOwnProperty.call(o.resources,i)){let s=o.resources[i];t[i]||(t[i]={}),this.applySchema(t[i],n,s,r)}}}applyMethodsFromSchema(t,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];t[i]=this.makeMethod(n,s,r)}}}makeMethod(t,n,o){return(r,i)=>{let s=typeof r=="function"?{}:r;i=typeof r=="function"?r:i;let u=dN(t.rootUrl+t.servicePath+n.path),d={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 f=dN(t.rootUrl+n.mediaUpload.protocols.simple.path);d.mediaUrl=f.substring(1,f.length-1)}if(!i)return(0,lN.createAPIRequest)(d);(0,lN.createAPIRequest)(d,i)}}getPathParams(t){let n=new Array;return typeof t!="object"&&(t={}),Object.keys(t).forEach(o=>{t[o].location==="path"&&n.push(o)}),n}};ah.Endpoint=MT;function dN(e){return e?`'${e}'`.replace(/([^:]\/)\/+/g,"$1"):""}a(dN,"buildurl")});var fN=z(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});sh.Discovery=void 0;var yW=require("fs"),vW=Pt(),_W=require("url"),pN=require("util"),bW=oh(),EW=LT(),SW=pN.promisify(yW.readFile),jT=class{static{a(this,"Discovery")}transporter=new vW.Gaxios;options;constructor(t){this.options=t||{}}makeEndpoint(t){return n=>{let o=new EW.Endpoint(n);return o.applySchema(o,t,t,o),o}}log(...t){this.options&&this.options.debug&&console.log(...t)}async discoverAllAPIs(t){let n=new Headers(this.options.includePrivate?{}:{"X-User-Ip":"0.0.0.0"}),r=(await this.transporter.request({url:t,headers:n})).data.items,i=await Promise.all(r.map(async d=>{let f=await this.discoverAPI(d.discoveryRestUrl);return{api:d,endpointCreator:f}})),s={},u={};for(let d of i)u[d.api.name]||(s[d.api.name]={},u[d.api.name]=f=>{let h=typeof f,g;if(h==="string")g=f,f={};else if(h==="object")g=f.version,delete f.version;else throw new Error("Argument error: Accepts only string or object");try{let m=d.endpointCreator(f,this);return Object.freeze(m)}catch(m){throw new Error(pN.format('Unable to load endpoint %s("%s"): %s',d.api.name,g,m.message))}}),s[d.api.name][d.api.version]=d.endpointCreator;return u}async discoverAPI(t){if(typeof t=="string"){let n=_W.parse(t);if(t&&!n.protocol){this.log("Reading from file "+t);let o=await SW(t,{encoding:"utf8"});return this.makeEndpoint(JSON.parse(o))}else{this.log("Requesting "+t);let o=await this.transporter.request({url:t});return this.makeEndpoint(o.data)}}else{let n=t;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,bW.createAPIRequest)(r);return this.makeEndpoint(i.data)}}};sh.Discovery=jT});var ch=z(De=>{"use strict";var TW=De&&De.__createBinding||(Object.create?(function(e,t,n,o){o===void 0&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,o,r)}):(function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]})),PW=De&&De.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&TW(t,e,n)};Object.defineProperty(De,"__esModule",{value:!0});De.Endpoint=De.Discovery=De.AuthPlus=De.createAPIRequest=De.getAPI=De.GaxiosError=De.Gaxios=De.AwsClient=De.IdentityPoolClient=De.BaseExternalAccountClient=De.ExternalAccountClient=De.GoogleAuth=De.UserRefreshClient=De.Compute=De.JWT=De.OAuth2Client=De.gaxios=De.googleAuthLibrary=void 0;De.googleAuthLibrary=Vu();De.gaxios=Pt();var to=Vu();Object.defineProperty(De,"OAuth2Client",{enumerable:!0,get:a(function(){return to.OAuth2Client},"get")});Object.defineProperty(De,"JWT",{enumerable:!0,get:a(function(){return to.JWT},"get")});Object.defineProperty(De,"Compute",{enumerable:!0,get:a(function(){return to.Compute},"get")});Object.defineProperty(De,"UserRefreshClient",{enumerable:!0,get:a(function(){return to.UserRefreshClient},"get")});Object.defineProperty(De,"GoogleAuth",{enumerable:!0,get:a(function(){return to.GoogleAuth},"get")});Object.defineProperty(De,"ExternalAccountClient",{enumerable:!0,get:a(function(){return to.ExternalAccountClient},"get")});Object.defineProperty(De,"BaseExternalAccountClient",{enumerable:!0,get:a(function(){return to.BaseExternalAccountClient},"get")});Object.defineProperty(De,"IdentityPoolClient",{enumerable:!0,get:a(function(){return to.IdentityPoolClient},"get")});Object.defineProperty(De,"AwsClient",{enumerable:!0,get:a(function(){return to.AwsClient},"get")});var mN=Pt();Object.defineProperty(De,"Gaxios",{enumerable:!0,get:a(function(){return mN.Gaxios},"get")});Object.defineProperty(De,"GaxiosError",{enumerable:!0,get:a(function(){return mN.GaxiosError},"get")});var wW=oD();Object.defineProperty(De,"getAPI",{enumerable:!0,get:a(function(){return wW.getAPI},"get")});var xW=oh();Object.defineProperty(De,"createAPIRequest",{enumerable:!0,get:a(function(){return xW.createAPIRequest},"get")});var AW=uN();Object.defineProperty(De,"AuthPlus",{enumerable:!0,get:a(function(){return AW.AuthPlus},"get")});var IW=fN();Object.defineProperty(De,"Discovery",{enumerable:!0,get:a(function(){return IW.Discovery},"get")});var RW=LT();Object.defineProperty(De,"Endpoint",{enumerable:!0,get:a(function(){return RW.Endpoint},"get")});PW(nh(),De)});var gN=z(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.calendar_v3=void 0;var de=ch(),hN;(function(e){class t{static{a(this,"Calendar")}context;acl;calendarList;calendars;channels;colors;events;freebusy;settings;constructor(g,m){this.context={_options:g||{},google:m},this.acl=new n(this.context),this.calendarList=new o(this.context),this.calendars=new r(this.context),this.channels=new i(this.context),this.colors=new s(this.context),this.events=new u(this.context),this.freebusy=new d(this.context),this.settings=new f(this.context)}}e.Calendar=t;class n{static{a(this,"Resource$Acl")}context;constructor(g){this.context=g}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/{ruleId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId","ruleId"],pathParams:["calendarId","ruleId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/acl/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Acl=n;class o{static{a(this,"Resource$Calendarlist")}context;constructor(g){this.context=g}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/calendarList/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Calendarlist=o;class r{static{a(this,"Resource$Calendars")}context;constructor(g){this.context=g}clear(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/clear").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Calendars=r;class i{static{a(this,"Resource$Channels")}context;constructor(g){this.context=g}stop(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/channels/stop").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Channels=i;class s{static{a(this,"Resource$Colors")}context;constructor(g){this.context=g}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/colors").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Colors=s;class u{static{a(this,"Resource$Events")}context;constructor(g){this.context=g}delete(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"DELETE",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}import(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/import").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}insert(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}instances(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/instances").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}move(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}/move").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId","destination"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}patch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PATCH",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}quickAdd(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/quickAdd").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId","text"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}update(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/{eventId}").replace(/([^:]\/)\/+/g,"$1"),method:"PUT",apiVersion:""},v),params:y,requiredParams:["calendarId","eventId"],pathParams:["calendarId","eventId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/calendars/{calendarId}/events/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:["calendarId"],pathParams:["calendarId"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Events=u;class d{static{a(this,"Resource$Freebusy")}context;constructor(g){this.context=g}query(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/freeBusy").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Freebusy=d;class f{static{a(this,"Resource$Settings")}context;constructor(g){this.context=g}get(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/{setting}").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:["setting"],pathParams:["setting"],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}list(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings").replace(/([^:]\/)\/+/g,"$1"),method:"GET",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}watch(g,m,p){let y=g||{},v=m||{};typeof g=="function"&&(p=g,y={},v={}),typeof m=="function"&&(p=m,v={});let E=v.rootUrl||"https://www.googleapis.com/",b={options:Object.assign({url:(E+"/calendar/v3/users/me/settings/watch").replace(/([^:]\/)\/+/g,"$1"),method:"POST",apiVersion:""},v),params:y,requiredParams:[],pathParams:[],context:this.context};if(p)(0,de.createAPIRequest)(b,p);else return(0,de.createAPIRequest)(b)}}e.Resource$Settings=f})(hN||(uh.calendar_v3=hN={}))});var ro=z(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.AuthPlus=Hr.calendar_v3=Hr.auth=Hr.VERSIONS=void 0;Hr.calendar=CW;var yN=ch(),vN=gN();Object.defineProperty(Hr,"calendar_v3",{enumerable:!0,get:a(function(){return vN.calendar_v3},"get")});Hr.VERSIONS={v3:vN.calendar_v3.Calendar};function CW(e){return(0,yN.getAPI)("calendar",e,Hr.VERSIONS,this)}a(CW,"calendar");var OW=new yN.AuthPlus;Hr.auth=OW;var kW=ch();Object.defineProperty(Hr,"AuthPlus",{enumerable:!0,get:a(function(){return kW.AuthPlus},"get")})});var GN=z((tP,rP)=>{(function(e,t){typeof tP=="object"&&typeof rP<"u"?rP.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(tP,(function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(o,r,i){var s=r.prototype;i.utc=function(p){var y={date:p,utc:!0,args:arguments};return new r(y)},s.utc=function(p){var y=i(this.toDate(),{locale:this.$L,utc:!0});return p?y.add(this.utcOffset(),e):y},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=s.parse;s.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),u.call(this,p)};var d=s.init;s.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else d.call(this)};var f=s.utcOffset;s.utcOffset=function(p,y){var v=this.$utils().u;if(v(p))return this.$u?0:v(this.$offset)?f.call(this):this.$offset;if(typeof p=="string"&&(p=(function(N){N===void 0&&(N="");var Z=N.match(t);if(!Z)return null;var H=(""+Z[0]).match(n)||["-",0,0],K=H[0],ee=60*+H[1]+ +H[2];return ee===0?0:K==="+"?ee:-ee})(p),p===null))return this;var E=Math.abs(p)<=16?60*p:p,b=this;if(y)return b.$offset=E,b.$u=p===0,b;if(p!==0){var k=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(E+k,e)).$offset=E,b.$x.$localOffset=k}else b=this.utc();return b};var h=s.format;s.format=function(p){var y=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,y)},s.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var g=s.toDate;s.toDate=function(p){return p==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var m=s.diff;s.diff=function(p,y,v){if(p&&this.$u===p.$u)return m.call(this,p,y,v);var E=this.local(),b=i(p).local();return m.call(E,b,y,v)}}}))});var qW={};hr(qW,{createGoogleClient:()=>At,getAccessToken:()=>$e,googleCalendar:()=>BW,googleCalendarAuth:()=>le});module.exports=iM(qW);var yr={};hr(yr,{$ZodAny:()=>Os,$ZodArray:()=>Ns,$ZodAsyncError:()=>Yr,$ZodBase64:()=>yd,$ZodBase64URL:()=>vd,$ZodBigInt:()=>oa,$ZodBigIntFormat:()=>Sd,$ZodBoolean:()=>Xo,$ZodCIDRv4:()=>hd,$ZodCIDRv6:()=>gd,$ZodCUID:()=>nd,$ZodCUID2:()=>od,$ZodCatch:()=>Md,$ZodCheck:()=>at,$ZodCheckBigIntFormat:()=>kg,$ZodCheckEndsWith:()=>Vg,$ZodCheckGreaterThan:()=>Hl,$ZodCheckIncludes:()=>Bg,$ZodCheckLengthEquals:()=>Mg,$ZodCheckLessThan:()=>Gl,$ZodCheckLowerCase:()=>jg,$ZodCheckMaxLength:()=>zg,$ZodCheckMaxSize:()=>$g,$ZodCheckMimeType:()=>Hg,$ZodCheckMinLength:()=>Ug,$ZodCheckMinSize:()=>Dg,$ZodCheckMultipleOf:()=>Cg,$ZodCheckNumberFormat:()=>Og,$ZodCheckOverwrite:()=>Zg,$ZodCheckProperty:()=>Gg,$ZodCheckRegex:()=>Lg,$ZodCheckSizeEquals:()=>Ng,$ZodCheckStartsWith:()=>qg,$ZodCheckStringFormat:()=>ra,$ZodCheckUpperCase:()=>Fg,$ZodCodec:()=>aa,$ZodCustom:()=>Vs,$ZodCustomStringFormat:()=>Ed,$ZodDate:()=>Ds,$ZodDefault:()=>Dd,$ZodDiscriminatedUnion:()=>zs,$ZodE164:()=>_d,$ZodEmail:()=>ed,$ZodEmoji:()=>td,$ZodEncodeError:()=>po,$ZodEnum:()=>Ls,$ZodError:()=>ws,$ZodExactOptional:()=>$d,$ZodFile:()=>kd,$ZodFunction:()=>Bd,$ZodGUID:()=>Xl,$ZodIPv4:()=>pd,$ZodIPv6:()=>fd,$ZodISODate:()=>ud,$ZodISODateTime:()=>cd,$ZodISODuration:()=>dd,$ZodISOTime:()=>ld,$ZodIntersection:()=>Rd,$ZodJWT:()=>bd,$ZodKSUID:()=>sd,$ZodLazy:()=>Vd,$ZodLiteral:()=>js,$ZodMAC:()=>md,$ZodMap:()=>Cd,$ZodNaN:()=>Ld,$ZodNanoID:()=>rd,$ZodNever:()=>xd,$ZodNonOptional:()=>zd,$ZodNull:()=>wd,$ZodNullable:()=>Bs,$ZodNumber:()=>na,$ZodNumberFormat:()=>Cs,$ZodObject:()=>Ad,$ZodObjectJIT:()=>Yg,$ZodOptional:()=>ia,$ZodPipe:()=>qs,$ZodPrefault:()=>Nd,$ZodPromise:()=>qd,$ZodReadonly:()=>jd,$ZodRealError:()=>rr,$ZodRecord:()=>Ms,$ZodRegistry:()=>Gd,$ZodSet:()=>Od,$ZodString:()=>Mn,$ZodStringFormat:()=>Qe,$ZodSuccess:()=>Ud,$ZodSymbol:()=>Td,$ZodTemplateLiteral:()=>Fd,$ZodTransform:()=>Fs,$ZodTuple:()=>Us,$ZodType:()=>xe,$ZodULID:()=>id,$ZodURL:()=>Rs,$ZodUUID:()=>Ql,$ZodUndefined:()=>Pd,$ZodUnion:()=>Qo,$ZodUnknown:()=>ks,$ZodVoid:()=>$s,$ZodXID:()=>ad,$ZodXor:()=>Id,$brand:()=>vs,$constructor:()=>A,$input:()=>Zd,$output:()=>Hd,Doc:()=>Is,JSONSchema:()=>ox,JSONSchemaGenerator:()=>Sp,NEVER:()=>Rl,TimePrecision:()=>Kd,_any:()=>Pc,_array:()=>Vy,_base64:()=>mc,_base64url:()=>hc,_bigint:()=>op,_boolean:()=>Ec,_catch:()=>dL,_check:()=>nx,_cidrv4:()=>pc,_cidrv6:()=>fc,_coercedBigint:()=>Tc,_coercedBoolean:()=>Sc,_coercedDate:()=>Ac,_coercedNumber:()=>_c,_coercedString:()=>Ys,_cuid:()=>ic,_cuid2:()=>ac,_custom:()=>$c,_date:()=>dp,_decode:()=>zl,_decodeAsync:()=>Ml,_default:()=>cL,_discriminatedUnion:()=>J1,_e164:()=>gc,_email:()=>Xs,_emoji:()=>nc,_encode:()=>Nl,_encodeAsync:()=>Ul,_endsWith:()=>ii,_enum:()=>rL,_file:()=>fp,_float32:()=>ep,_float64:()=>tp,_gt:()=>Qr,_gte:()=>Ct,_guid:()=>ua,_includes:()=>ni,_int:()=>bc,_int32:()=>rp,_int64:()=>ip,_intersection:()=>Y1,_ipv4:()=>lc,_ipv6:()=>dc,_isoDate:()=>Yd,_isoDateTime:()=>Jd,_isoDuration:()=>Qd,_isoTime:()=>Xd,_jwt:()=>yc,_ksuid:()=>uc,_lazy:()=>hL,_length:()=>_o,_literal:()=>oL,_lowercase:()=>ti,_lt:()=>Xr,_lte:()=>Jt,_mac:()=>Wd,_map:()=>eL,_max:()=>Jt,_maxLength:()=>vo,_maxSize:()=>jn,_mime:()=>ai,_min:()=>Ct,_minLength:()=>Tt,_minSize:()=>en,_multipleOf:()=>Ln,_nan:()=>pp,_nanoid:()=>oc,_nativeEnum:()=>nL,_negative:()=>Rc,_never:()=>lp,_nonnegative:()=>Oc,_nonoptional:()=>uL,_nonpositive:()=>Cc,_normalize:()=>si,_null:()=>up,_nullable:()=>sL,_number:()=>vc,_optional:()=>aL,_overwrite:()=>Nr,_parse:()=>Ji,_parseAsync:()=>Yi,_pipe:()=>pL,_positive:()=>Ic,_promise:()=>gL,_property:()=>kc,_readonly:()=>fL,_record:()=>Q1,_refine:()=>mp,_regex:()=>Ft,_safeDecode:()=>jl,_safeDecodeAsync:()=>Bl,_safeEncode:()=>Ll,_safeEncodeAsync:()=>Fl,_safeParse:()=>Xi,_safeParseAsync:()=>ea,_set:()=>tL,_size:()=>yo,_slugify:()=>la,_startsWith:()=>oi,_string:()=>Js,_stringFormat:()=>di,_stringbool:()=>vp,_success:()=>lL,_superRefine:()=>hp,_symbol:()=>sp,_templateLiteral:()=>mL,_toLowerCase:()=>ui,_toUpperCase:()=>li,_transform:()=>iL,_trim:()=>ci,_tuple:()=>X1,_uint32:()=>np,_uint64:()=>ap,_ulid:()=>sc,_undefined:()=>cp,_union:()=>W1,_unknown:()=>wc,_uppercase:()=>ri,_url:()=>ei,_uuid:()=>Qs,_uuidv4:()=>ec,_uuidv6:()=>tc,_uuidv7:()=>rc,_void:()=>xc,_xid:()=>cc,_xor:()=>K1,clone:()=>Dt,config:()=>yt,createStandardJSONSchemaMethod:()=>da,createToJSONSchemaMethod:()=>Gy,decode:()=>Pw,decodeAsync:()=>xw,describe:()=>gp,encode:()=>Tw,encodeAsync:()=>ww,extractDefs:()=>Eo,finalize:()=>So,flattenError:()=>Wi,formatError:()=>Ki,globalConfig:()=>ys,globalRegistry:()=>Nt,initializeContext:()=>bo,isValidBase64:()=>Jg,isValidBase64URL:()=>Ww,isValidJWT:()=>Kw,locales:()=>ca,meta:()=>yp,parse:()=>Ko,parseAsync:()=>Jo,prettifyError:()=>Dl,process:()=>et,regexes:()=>nr,registry:()=>Ks,safeDecode:()=>Iw,safeDecodeAsync:()=>Cw,safeEncode:()=>Aw,safeEncodeAsync:()=>Rw,safeParse:()=>Qi,safeParseAsync:()=>ta,toDotPath:()=>Sw,toJSONSchema:()=>Dc,treeifyError:()=>$l,util:()=>oe,version:()=>Wg});var Rl=Object.freeze({status:"aborted"});function A(e,t,n){function o(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);let f=s.prototype,h=Object.keys(f);for(let g=0;g<h.length;g++){let m=h[g];m in u||(u[m]=f[m].bind(u))}}a(o,"init");let r=n?.Parent??Object;class i extends r{static{a(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function s(u){var d;let f=n?.Parent?new i:this;o(f,u),(d=f._zod).deferred??(d.deferred=[]);for(let h of f._zod.deferred)h();return f}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(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}a(A,"$constructor");var vs=Symbol("zod_brand"),Yr=class extends Error{static{a(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},po=class extends Error{static{a(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},ys={};function yt(e){return e&&Object.assign(ys,e),ys}a(yt,"config");var oe={};hr(oe,{BIGINT_FORMAT_RANGES:()=>tg,Class:()=>Wh,NUMBER_FORMAT_RANGES:()=>eg,aborted:()=>go,allowsEval:()=>Yh,assert:()=>lM,assertEqual:()=>aM,assertIs:()=>cM,assertNever:()=>uM,assertNotEqual:()=>sM,assignProp:()=>mo,base64ToUint8Array:()=>_w,base64urlToUint8Array:()=>EM,cached:()=>Hi,captureStackTrace:()=>Ol,cleanEnum:()=>bM,cleanRegex:()=>Es,clone:()=>Dt,cloneDef:()=>pM,createTransparentProxy:()=>vM,defineLazy:()=>ze,esc:()=>Cl,escapeRegex:()=>Dr,extend:()=>hw,finalizeIssue:()=>tr,floatSafeRemainder:()=>Kh,getElementAtPath:()=>fM,getEnumValues:()=>bs,getLengthableOrigin:()=>Ps,getParsedType:()=>yM,getSizableOrigin:()=>Ts,hexToUint8Array:()=>TM,isObject:()=>Wo,isPlainObject:()=>ho,issue:()=>Zi,joinValues:()=>B,jsonStringifyReplacer:()=>Gi,merge:()=>_M,mergeDefs:()=>Un,normalizeParams:()=>te,nullish:()=>fo,numKeys:()=>gM,objectClone:()=>dM,omit:()=>mw,optionalKeys:()=>Qh,parsedType:()=>ie,partial:()=>yw,pick:()=>fw,prefixIssues:()=>gr,primitiveTypes:()=>Xh,promiseAllObject:()=>mM,propertyKeyTypes:()=>Ss,randomString:()=>hM,required:()=>vw,safeExtend:()=>gw,shallowClone:()=>kl,slugify:()=>Jh,stringifyPrimitive:()=>re,uint8ArrayToBase64:()=>bw,uint8ArrayToBase64url:()=>SM,uint8ArrayToHex:()=>PM,unwrapMessage:()=>_s});function aM(e){return e}a(aM,"assertEqual");function sM(e){return e}a(sM,"assertNotEqual");function cM(e){}a(cM,"assertIs");function uM(e){throw new Error("Unexpected value in exhaustive check")}a(uM,"assertNever");function lM(e){}a(lM,"assert");function bs(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}a(bs,"getEnumValues");function B(e,t="|"){return e.map(n=>re(n)).join(t)}a(B,"joinValues");function Gi(e,t){return typeof t=="bigint"?t.toString():t}a(Gi,"jsonStringifyReplacer");function Hi(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}a(Hi,"cached");function fo(e){return e==null}a(fo,"nullish");function Es(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}a(Es,"cleanRegex");function Kh(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let d=o.match(/\d?e-(\d?)/);d?.[1]&&(r=Number.parseInt(d[1]))}let i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return s%u/10**i}a(Kh,"floatSafeRemainder");var pw=Symbol("evaluating");function ze(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==pw)return o===void 0&&(o=pw,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}a(ze,"defineLazy");function dM(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}a(dM,"objectClone");function mo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}a(mo,"assignProp");function Un(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}a(Un,"mergeDefs");function pM(e){return Un(e._zod.def)}a(pM,"cloneDef");function fM(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}a(fM,"getElementAtPath");function mM(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}a(mM,"promiseAllObject");function hM(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}a(hM,"randomString");function Cl(e){return JSON.stringify(e)}a(Cl,"esc");function Jh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}a(Jh,"slugify");var Ol="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(Wo,"isObject");var Yh=Hi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ho(e){if(Wo(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Wo(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}a(ho,"isPlainObject");function kl(e){return ho(e)?{...e}:Array.isArray(e)?[...e]:e}a(kl,"shallowClone");function gM(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}a(gM,"numKeys");var yM=a(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),Ss=new Set(["string","number","symbol"]),Xh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Dr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(Dr,"escapeRegex");function Dt(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}a(Dt,"clone");function te(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:a(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:a(()=>t.error,"error")}:t}a(te,"normalizeParams");function vM(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}a(vM,"createTransparentProxy");function re(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}a(re,"stringifyPrimitive");function Qh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}a(Qh,"optionalKeys");var eg={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]},tg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fw(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Un(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return mo(this,"shape",s),s},checks:[]});return Dt(e,i)}a(fw,"pick");function mw(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Un(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return mo(this,"shape",s),s},checks:[]});return Dt(e,i)}a(mw,"omit");function hw(e,t){if(!ho(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Un(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return mo(this,"shape",i),i}});return Dt(e,r)}a(hw,"extend");function gw(e,t){if(!ho(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return mo(this,"shape",o),o}});return Dt(e,n)}a(gw,"safeExtend");function _M(e,t){let n=Un(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return mo(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Dt(e,n)}a(_M,"merge");function yw(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Un(t._zod.def,{get shape(){let u=t._zod.def.shape,d={...u};if(n)for(let f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(let f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return mo(this,"shape",d),d},checks:[]});return Dt(t,s)}a(yw,"partial");function vw(e,t,n){let o=Un(t._zod.def,{get shape(){let r=t._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 e({type:"nonoptional",innerType:r[s]}))}else for(let s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return mo(this,"shape",i),i}});return Dt(t,o)}a(vw,"required");function go(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}a(go,"aborted");function gr(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}a(gr,"prefixIssues");function _s(e){return typeof e=="string"?e:e?.message}a(_s,"unwrapMessage");function tr(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=_s(e.inst?._zod.def?.error?.(e))??_s(t?.error?.(e))??_s(n.customError?.(e))??_s(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}a(tr,"finalizeIssue");function Ts(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}a(Ts,"getSizableOrigin");function Ps(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}a(Ps,"getLengthableOrigin");function ie(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}a(ie,"parsedType");function Zi(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}a(Zi,"issue");function bM(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}a(bM,"cleanEnum");function _w(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}a(_w,"base64ToUint8Array");function bw(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}a(bw,"uint8ArrayToBase64");function EM(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return _w(t+n)}a(EM,"base64urlToUint8Array");function SM(e){return bw(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a(SM,"uint8ArrayToBase64url");function TM(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}a(TM,"hexToUint8Array");function PM(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}a(PM,"uint8ArrayToHex");var Wh=class{static{a(this,"Class")}constructor(...t){}};var Ew=a((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gi,2),Object.defineProperty(e,"toString",{value:a(()=>e.message,"value"),enumerable:!1})},"initializer"),ws=A("$ZodError",Ew),rr=A("$ZodError",Ew,{Parent:Error});function Wi(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}a(Wi,"flattenError");function Ki(e,t=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(t(i));else{let s=n,u=0;for(;u<i.path.length;){let d=i.path[u];u===i.path.length-1?(s[d]=s[d]||{_errors:[]},s[d]._errors.push(t(i))):s[d]=s[d]||{_errors:[]},s=s[d],u++}}},"processError");return o(e),n}a(Ki,"formatError");function $l(e,t=n=>n.message){let n={errors:[]},o=a((r,i=[])=>{var s,u;for(let d of r.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(f=>o({issues:f},d.path));else if(d.code==="invalid_key")o({issues:d.issues},d.path);else if(d.code==="invalid_element")o({issues:d.issues},d.path);else{let f=[...i,...d.path];if(f.length===0){n.errors.push(t(d));continue}let h=n,g=0;for(;g<f.length;){let m=f[g],p=g===f.length-1;typeof m=="string"?(h.properties??(h.properties={}),(s=h.properties)[m]??(s[m]={errors:[]}),h=h.properties[m]):(h.items??(h.items=[]),(u=h.items)[m]??(u[m]={errors:[]}),h=h.items[m]),p&&h.errors.push(t(d)),g++}}},"processError");return o(e),n}a($l,"treeifyError");function Sw(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}a(Sw,"toDotPath");function Dl(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Sw(o.path)}`);return t.join(`
69
+ `)}a(Dl,"prettifyError");var Ji=a(e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Yr;if(s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>tr(d,i,yt())));throw Ol(u,r?.callee),u}return s.value},"_parse"),Ko=Ji(rr),Yi=a(e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(r?.Err??e)(s.issues.map(d=>tr(d,i,yt())));throw Ol(u,r?.callee),u}return s.value},"_parseAsync"),Jo=Yi(rr),Xi=a(e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Yr;return i.issues.length?{success:!1,error:new(e??ws)(i.issues.map(s=>tr(s,r,yt())))}:{success:!0,data:i.value}},"_safeParse"),Qi=Xi(rr),ea=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>tr(s,r,yt())))}:{success:!0,data:i.value}},"_safeParseAsync"),ta=ea(rr),Nl=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ji(e)(t,n,r)},"_encode"),Tw=Nl(rr),zl=a(e=>(t,n,o)=>Ji(e)(t,n,o),"_decode"),Pw=zl(rr),Ul=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Yi(e)(t,n,r)},"_encodeAsync"),ww=Ul(rr),Ml=a(e=>async(t,n,o)=>Yi(e)(t,n,o),"_decodeAsync"),xw=Ml(rr),Ll=a(e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Xi(e)(t,n,r)},"_safeEncode"),Aw=Ll(rr),jl=a(e=>(t,n,o)=>Xi(e)(t,n,o),"_safeDecode"),Iw=jl(rr),Fl=a(e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ea(e)(t,n,r)},"_safeEncodeAsync"),Rw=Fl(rr),Bl=a(e=>async(t,n,o)=>ea(e)(t,n,o),"_safeDecodeAsync"),Cw=Bl(rr);var nr={};hr(nr,{base64:()=>yg,base64url:()=>ql,bigint:()=>Tg,boolean:()=>wg,browserEmail:()=>$M,cidrv4:()=>hg,cidrv6:()=>gg,cuid:()=>rg,cuid2:()=>ng,date:()=>_g,datetime:()=>Eg,domain:()=>zM,duration:()=>cg,e164:()=>vg,email:()=>lg,emoji:()=>dg,extendedDuration:()=>xM,guid:()=>ug,hex:()=>UM,hostname:()=>NM,html5Email:()=>CM,idnEmail:()=>kM,integer:()=>Pg,ipv4:()=>pg,ipv6:()=>fg,ksuid:()=>ag,lowercase:()=>Ig,mac:()=>mg,md5_base64:()=>LM,md5_base64url:()=>jM,md5_hex:()=>MM,nanoid:()=>sg,null:()=>xg,number:()=>Vl,rfc5322Email:()=>OM,sha1_base64:()=>BM,sha1_base64url:()=>qM,sha1_hex:()=>FM,sha256_base64:()=>GM,sha256_base64url:()=>HM,sha256_hex:()=>VM,sha384_base64:()=>WM,sha384_base64url:()=>KM,sha384_hex:()=>ZM,sha512_base64:()=>YM,sha512_base64url:()=>XM,sha512_hex:()=>JM,string:()=>Sg,time:()=>bg,ulid:()=>og,undefined:()=>Ag,unicodeEmail:()=>Ow,uppercase:()=>Rg,uuid:()=>Yo,uuid4:()=>AM,uuid6:()=>IM,uuid7:()=>RM,xid:()=>ig});var rg=/^[cC][^\s-]{8,}$/,ng=/^[0-9a-z]+$/,og=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ig=/^[0-9a-vA-V]{20}$/,ag=/^[A-Za-z0-9]{27}$/,sg=/^[a-zA-Z0-9_-]{21}$/,cg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xM=/^[-+]?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)?)??$/,ug=/^([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})$/,Yo=a(e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,"uuid"),AM=Yo(4),IM=Yo(6),RM=Yo(7),lg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CM=/^[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])?)*$/,OM=/^(([^<>()\[\]\\.,;:\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,}))$/,Ow=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,kM=Ow,$M=/^[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])?)*$/,DM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function dg(){return new RegExp(DM,"u")}a(dg,"emoji");var pg=/^(?:(?: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])$/,fg=/^(([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}|:))$/,mg=a(e=>{let t=Dr(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),hg=/^((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])$/,gg=/^(([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])$/,yg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ql=/^[A-Za-z0-9_-]*$/,NM=/^(?=.{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])?)*\.?$/,zM=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,vg=/^\+[1-9]\d{6,14}$/,kw="(?:(?:\\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])))",_g=new RegExp(`^${kw}$`);function $w(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}a($w,"timeSource");function bg(e){return new RegExp(`^${$w(e)}$`)}a(bg,"time");function Eg(e){let t=$w({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${kw}T(?:${o})$`)}a(Eg,"datetime");var Sg=a(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Tg=/^-?\d+n?$/,Pg=/^-?\d+$/,Vl=/^-?\d+(?:\.\d+)?$/,wg=/^(?:true|false)$/i,xg=/^null$/i;var Ag=/^undefined$/i;var Ig=/^[^A-Z]*$/,Rg=/^[^a-z]*$/,UM=/^[0-9a-fA-F]*$/;function xs(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}a(xs,"fixedBase64");function As(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}a(As,"fixedBase64url");var MM=/^[0-9a-fA-F]{32}$/,LM=xs(22,"=="),jM=As(22),FM=/^[0-9a-fA-F]{40}$/,BM=xs(27,"="),qM=As(27),VM=/^[0-9a-fA-F]{64}$/,GM=xs(43,"="),HM=As(43),ZM=/^[0-9a-fA-F]{96}$/,WM=xs(64,""),KM=As(64),JM=/^[0-9a-fA-F]{128}$/,YM=xs(86,"=="),XM=As(86);var at=A("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nw={number:"number",bigint:"bigint",object:"date"},Gl=A("$ZodCheckLessThan",(e,t)=>{at.init(e,t);let n=Nw[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hl=A("$ZodCheckGreaterThan",(e,t)=>{at.init(e,t);let n=Nw[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cg=A("$ZodCheckMultipleOf",(e,t)=>{at.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Kh(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Og=A("$ZodCheckNumberFormat",(e,t)=>{at.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=eg[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=r,u.maximum=i,n&&(u.pattern=Pg)}),e._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});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:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}u<r&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),kg=A("$ZodCheckBigIntFormat",(e,t)=>{at.init(e,t);let[n,o]=tg[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),$g=A("$ZodCheckMaxSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Ts(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dg=A("$ZodCheckMinSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Ts(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ng=A("$ZodCheckSizeEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Ts(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),zg=A("$ZodCheckMaxLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let s=Ps(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ug=A("$ZodCheckMinLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let s=Ps(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mg=A("$ZodCheckLengthEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!fo(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let s=Ps(r),u=i>t.length;o.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ra=A("$ZodCheckStringFormat",(e,t)=>{var n,o;at.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Lg=A("$ZodCheckRegex",(e,t)=>{ra.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),jg=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ig),ra.init(e,t)}),Fg=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Rg),ra.init(e,t)}),Bg=A("$ZodCheckIncludes",(e,t)=>{at.init(e,t);let n=Dr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),qg=A("$ZodCheckStartsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`^${Dr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Vg=A("$ZodCheckEndsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`.*${Dr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Dw(e,t,n){e.issues.length&&t.issues.push(...gr(n,e.issues))}a(Dw,"handleCheckPropertyResult");var Gg=A("$ZodCheckProperty",(e,t)=>{at.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>Dw(r,n,t.property));Dw(o,n,t.property)}}),Hg=A("$ZodCheckMimeType",(e,t)=>{at.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Zg=A("$ZodCheckOverwrite",(e,t)=>{at.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Is=class{static{a(this,"Doc")}constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.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 t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
71
+ `))}};var Wg={major:4,minor:3,patch:6};var xe=A("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Wg;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=a((s,u,d)=>{let f=go(s),h;for(let g of u){if(g._zod.def.when){if(!g._zod.def.when(s))continue}else if(f)continue;let m=s.issues.length,p=g._zod.check(s);if(p instanceof Promise&&d?.async===!1)throw new Yr;if(h||p instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await p,s.issues.length!==m&&(f||(f=go(s,m)))});else{if(s.issues.length===m)continue;f||(f=go(s,m))}}return h?h.then(()=>s):s},"runChecks"),i=a((s,u,d)=>{if(go(s))return s.aborted=!0,s;let f=r(u,o,d);if(f instanceof Promise){if(d.async===!1)throw new Yr;return f.then(h=>e._zod.parse(h,d))}return e._zod.parse(f,d)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let f=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(h=>i(h,s,u)):i(f,s,u)}let d=e._zod.parse(s,u);if(d instanceof Promise){if(u.async===!1)throw new Yr;return d.then(f=>r(f,o,u))}return r(d,o,u)}}ze(e,"~standard",()=>({validate:a(r=>{try{let i=Qi(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ta(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Mn=A("$ZodString",(e,t)=>{xe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Sg(e._zod.bag),e._zod.parse=(n,o)=>{if(t.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:e}),n}}),Qe=A("$ZodStringFormat",(e,t)=>{ra.init(e,t),Mn.init(e,t)}),Xl=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ug),Qe.init(e,t)}),Ql=A("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Yo(o))}else t.pattern??(t.pattern=Yo());Qe.init(e,t)}),ed=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lg),Qe.init(e,t)}),Rs=A("$ZodURL",(e,t)=>{Qe.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),td=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=dg()),Qe.init(e,t)}),rd=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=sg),Qe.init(e,t)}),nd=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rg),Qe.init(e,t)}),od=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ng),Qe.init(e,t)}),id=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=og),Qe.init(e,t)}),ad=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ig),Qe.init(e,t)}),sd=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ag),Qe.init(e,t)}),cd=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Eg(t)),Qe.init(e,t)}),ud=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=_g),Qe.init(e,t)}),ld=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bg(t)),Qe.init(e,t)}),dd=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cg),Qe.init(e,t)}),pd=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pg),Qe.init(e,t),e._zod.bag.format="ipv4"}),fd=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fg),Qe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),md=A("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=mg(t.delimiter)),Qe.init(e,t),e._zod.bag.format="mac"}),hd=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=hg),Qe.init(e,t)}),gd=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gg),Qe.init(e,t),e._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:e,continue:!t.abort})}}});function Jg(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}a(Jg,"isValidBase64");var yd=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=yg),Qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Jg(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ww(e){if(!ql.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Jg(n)}a(Ww,"isValidBase64URL");var vd=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ql),Qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ww(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_d=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=vg),Qe.init(e,t)});function Kw(e,t=null){try{let n=e.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||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}a(Kw,"isValidJWT");var bd=A("$ZodJWT",(e,t)=>{Qe.init(e,t),e._zod.check=n=>{Kw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ed=A("$ZodCustomStringFormat",(e,t)=>{Qe.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),na=A("$ZodNumber",(e,t)=>{xe.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vl,e._zod.parse=(n,o)=>{if(t.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:e,...i?{received:i}:{}}),n}}),Cs=A("$ZodNumberFormat",(e,t)=>{Og.init(e,t),na.init(e,t)}),Xo=A("$ZodBoolean",(e,t)=>{xe.init(e,t),e._zod.pattern=wg,e._zod.parse=(n,o)=>{if(t.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:e}),n}}),oa=A("$ZodBigInt",(e,t)=>{xe.init(e,t),e._zod.pattern=Tg,e._zod.parse=(n,o)=>{if(t.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:e}),n}}),Sd=A("$ZodBigIntFormat",(e,t)=>{kg.init(e,t),oa.init(e,t)}),Td=A("$ZodSymbol",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Pd=A("$ZodUndefined",(e,t)=>{xe.init(e,t),e._zod.pattern=Ag,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),wd=A("$ZodNull",(e,t)=>{xe.init(e,t),e._zod.pattern=xg,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Os=A("$ZodAny",(e,t)=>{xe.init(e,t),e._zod.parse=n=>n}),ks=A("$ZodUnknown",(e,t)=>{xe.init(e,t),e._zod.parse=n=>n}),xd=A("$ZodNever",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),$s=A("$ZodVoid",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Ds=A("$ZodDate",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{if(t.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:e}),n}});function Uw(e,t,n){e.issues.length&&t.issues.push(...gr(n,e.issues)),t.value[n]=e.value}a(Uw,"handleArrayResult");var Ns=A("$ZodArray",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let u=r[s],d=t.element._zod.run({value:u,issues:[]},o);d instanceof Promise?i.push(d.then(f=>Uw(f,n,s))):Uw(d,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Yl(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...gr(n,e.issues))}e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}a(Yl,"handlePropertyResult");function Jw(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Qh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}a(Jw,"normalizeDef");function Yw(e,t,n,o,r,i){let s=[],u=r.keySet,d=r.catchall._zod,f=d.def.type,h=d.optout==="optional";for(let g in t){if(u.has(g))continue;if(f==="never"){s.push(g);continue}let m=d.run({value:t[g],issues:[]},o);m instanceof Promise?e.push(m.then(p=>Yl(p,n,g,t,h))):Yl(m,n,g,t,h)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}a(Yw,"handleCatchall");var Ad=A("$ZodObject",(e,t)=>{if(xe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:a(()=>{let d={...u};return Object.defineProperty(t,"shape",{value:d}),d},"get")})}let o=Hi(()=>Jw(t));ze(e._zod,"propValues",()=>{let u=t.shape,d={};for(let f in u){let h=u[f]._zod;if(h.values){d[f]??(d[f]=new Set);for(let g of h.values)d[f].add(g)}}return d});let r=Wo,i=t.catchall,s;e._zod.parse=(u,d)=>{s??(s=o.value);let f=u.value;if(!r(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};let h=[],g=s.shape;for(let m of s.keys){let p=g[m],y=p._zod.optout==="optional",v=p._zod.run({value:f[m],issues:[]},d);v instanceof Promise?h.push(v.then(E=>Yl(E,u,m,f,y))):Yl(v,u,m,f,y)}return i?Yw(h,f,u,d,o.value,e):h.length?Promise.all(h).then(()=>u):u}}),Yg=A("$ZodObjectJIT",(e,t)=>{Ad.init(e,t);let n=e._zod.parse,o=Hi(()=>Jw(t)),r=a(m=>{let p=new Is(["shape","payload","ctx"]),y=o.value,v=a(N=>{let Z=Cl(N);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`},"parseStr");p.write("const input = payload.value;");let E=Object.create(null),b=0;for(let N of y.keys)E[N]=`key_${b++}`;p.write("const newResult = {};");for(let N of y.keys){let Z=E[N],H=Cl(N),ee=m[N]?._zod?.optout==="optional";p.write(`const ${Z} = ${v(N)};`),ee?p.write(`
72
+ if (${Z}.issues.length) {
73
+ if (${H} in input) {
74
+ payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
75
+ ...iss,
76
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
77
+ })));
78
+ }
79
+ }
80
+
81
+ if (${Z}.value === undefined) {
82
+ if (${H} in input) {
83
+ newResult[${H}] = undefined;
84
+ }
85
+ } else {
86
+ newResult[${H}] = ${Z}.value;
87
+ }
88
+
89
+ `):p.write(`
90
+ if (${Z}.issues.length) {
91
+ payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
92
+ ...iss,
93
+ path: iss.path ? [${H}, ...iss.path] : [${H}]
94
+ })));
95
+ }
96
+
97
+ if (${Z}.value === undefined) {
98
+ if (${H} in input) {
99
+ newResult[${H}] = undefined;
100
+ }
101
+ } else {
102
+ newResult[${H}] = ${Z}.value;
103
+ }
104
+
105
+ `)}p.write("payload.value = newResult;"),p.write("return payload;");let k=p.compile();return(N,Z)=>k(m,N,Z)},"generateFastpass"),i,s=Wo,u=!ys.jitless,f=u&&Yh.value,h=t.catchall,g;e._zod.parse=(m,p)=>{g??(g=o.value);let y=m.value;return s(y)?u&&f&&p?.async===!1&&p.jitless!==!0?(i||(i=r(t.shape)),m=i(m,p),h?Yw([],y,m,p,g,e):m):n(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),m)}});function Mw(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!go(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>tr(s,o,yt())))}),t)}a(Mw,"handleUnionResults");var Qo=A("$ZodUnion",(e,t)=>{xe.init(e,t),ze(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ze(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ze(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ze(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Es(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let d of t.options){let f=d._zod.run({value:r.value,issues:[]},i);if(f instanceof Promise)u.push(f),s=!0;else{if(f.issues.length===0)return f;u.push(f)}}return s?Promise.all(u).then(d=>Mw(d,r,e,i)):Mw(u,r,e,i)}});function Lw(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>tr(s,o,yt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}a(Lw,"handleExclusiveUnionResults");var Id=A("$ZodXor",(e,t)=>{Qo.init(e,t),t.inclusive=!1;let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let s=!1,u=[];for(let d of t.options){let f=d._zod.run({value:r.value,issues:[]},i);f instanceof Promise?(u.push(f),s=!0):u.push(f)}return s?Promise.all(u).then(d=>Lw(d,r,e,i)):Lw(u,r,e,i)}}),zs=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Qo.init(e,t);let n=e._zod.parse;ze(e._zod,"propValues",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,d]of Object.entries(s)){r[u]||(r[u]=new Set);for(let f of d)r[u].add(f)}}return r});let o=Hi(()=>{let r=t.options,i=new Map;for(let s of r){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,s)}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!Wo(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let u=o.value.get(s?.[t.discriminator]);return u?u._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),Rd=A("$ZodIntersection",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([d,f])=>jw(n,d,f)):jw(n,i,s)}});function Kg(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ho(e)&&ho(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=Kg(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=Kg(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(Kg,"mergeValues");function jw(e,t,n){let o=new Map,r;for(let u of t.issues)if(u.code==="unrecognized_keys"){r??(r=u);for(let d of u.keys)o.has(d)||o.set(d,{}),o.get(d).l=!0}else e.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let d of u.keys)o.has(d)||o.set(d,{}),o.get(d).r=!0;else e.issues.push(u);let i=[...o].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&r&&e.issues.push({...r,keys:i}),go(e))return e;let s=Kg(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}a(jw,"handleIntersectionResults");var Us=A("$ZodTuple",(e,t)=>{xe.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],u=[...n].reverse().findIndex(h=>h._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){let h=i.length>n.length,g=i.length<d-1;if(h||g)return o.issues.push({...h?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let f=-1;for(let h of n){if(f++,f>=i.length&&f>=d)continue;let g=h._zod.run({value:i[f],issues:[]},r);g instanceof Promise?s.push(g.then(m=>Zl(m,o,f))):Zl(g,o,f)}if(t.rest){let h=i.slice(n.length);for(let g of h){f++;let m=t.rest._zod.run({value:g,issues:[]},r);m instanceof Promise?s.push(m.then(p=>Zl(p,o,f))):Zl(m,o,f)}}return s.length?Promise.all(s).then(()=>o):o}});function Zl(e,t,n){e.issues.length&&t.issues.push(...gr(n,e.issues)),t.value[n]=e.value}a(Zl,"handleTupleResult");var Ms=A("$ZodRecord",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!ho(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let u=new Set;for(let f of s)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);let h=t.valueType._zod.run({value:r[f],issues:[]},o);h instanceof Promise?i.push(h.then(g=>{g.issues.length&&n.issues.push(...gr(f,g.issues)),n.value[f]=g.value})):(h.issues.length&&n.issues.push(...gr(f,h.issues)),n.value[f]=h.value)}let d;for(let f in r)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:d})}else{n.value={};for(let u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Vl.test(u)&&d.issues.length){let g=t.keyType._zod.run({value:Number(u),issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(d=g)}if(d.issues.length){t.mode==="loose"?n.value[u]=r[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>tr(g,o,yt())),input:u,path:[u],inst:e});continue}let h=t.valueType._zod.run({value:r[u],issues:[]},o);h instanceof Promise?i.push(h.then(g=>{g.issues.length&&n.issues.push(...gr(u,g.issues)),n.value[d.value]=g.value})):(h.issues.length&&n.issues.push(...gr(u,h.issues)),n.value[d.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Cd=A("$ZodMap",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,u]of r){let d=t.keyType._zod.run({value:s,issues:[]},o),f=t.valueType._zod.run({value:u,issues:[]},o);d instanceof Promise||f instanceof Promise?i.push(Promise.all([d,f]).then(([h,g])=>{Fw(h,g,n,s,r,e,o)})):Fw(d,f,n,s,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function Fw(e,t,n,o,r,i,s){e.issues.length&&(Ss.has(typeof o)?n.issues.push(...gr(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(u=>tr(u,s,yt()))})),t.issues.length&&(Ss.has(typeof o)?n.issues.push(...gr(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(u=>tr(u,s,yt()))})),n.value.set(e.value,t.value)}a(Fw,"handleMapResult");var Od=A("$ZodSet",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let u=t.valueType._zod.run({value:s,issues:[]},o);u instanceof Promise?i.push(u.then(d=>Bw(d,n))):Bw(u,n)}return i.length?Promise.all(i).then(()=>n):n}});function Bw(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}a(Bw,"handleSetResult");var Ls=A("$ZodEnum",(e,t)=>{xe.init(e,t);let n=bs(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>Ss.has(typeof r)).map(r=>typeof r=="string"?Dr(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),js=A("$ZodLiteral",(e,t)=>{if(xe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Dr(o):o?Dr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),kd=A("$ZodFile",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Fs=A("$ZodTransform",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new po(e.constructor.name);let r=t.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 Yr;return n.value=r,n}});function qw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}a(qw,"handleOptionalResult");var ia=A("$ZodOptional",(e,t)=>{xe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ze(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Es(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>qw(i,n.value)):qw(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),$d=A("$ZodExactOptional",(e,t)=>{ia.init(e,t),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),Bs=A("$ZodNullable",(e,t)=>{xe.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Es(n.source)}|null)$`):void 0}),ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),Dd=A("$ZodDefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Vw(i,t)):Vw(r,t)}});function Vw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}a(Vw,"handleDefaultResult");var Nd=A("$ZodPrefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),zd=A("$ZodNonOptional",(e,t)=>{xe.init(e,t),ze(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Gw(i,e)):Gw(r,e)}});function Gw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}a(Gw,"handleNonOptionalResult");var Ud=A("$ZodSuccess",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new po("ZodSuccess");let r=t.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)}}),Md=A("$ZodCatch",(e,t)=>{xe.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>tr(s,o,yt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>tr(i,o,yt()))},input:n.value}),n.issues=[]),n)}}),Ld=A("$ZodNaN",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),qs=A("$ZodPipe",(e,t)=>{xe.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Wl(s,t.in,o)):Wl(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Wl(i,t.out,o)):Wl(r,t.out,o)}});function Wl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}a(Wl,"handlePipeResult");var aa=A("$ZodCodec",(e,t)=>{xe.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(s=>Kl(s,t,o)):Kl(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Kl(s,t,o)):Kl(i,t,o)}}});function Kl(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>Jl(e,i,t.out,n)):Jl(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>Jl(e,i,t.in,n)):Jl(e,r,t.in,n)}}a(Kl,"handleCodecAResult");function Jl(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}a(Jl,"handleCodecTxResult");var jd=A("$ZodReadonly",(e,t)=>{xe.init(e,t),ze(e._zod,"propValues",()=>t.innerType._zod.propValues),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"optin",()=>t.innerType?._zod?.optin),ze(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(Hw):Hw(r)}});function Hw(e){return e.value=Object.freeze(e.value),e}a(Hw,"handleReadonlyResult");var Fd=A("$ZodTemplateLiteral",(e,t)=>{xe.init(e,t);let n=[];for(let o of t.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||Xh.has(typeof o))n.push(Dr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Bd=A("$ZodFunction",(e,t)=>(xe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Ko(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Ko(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Jo(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Jo(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Us({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),qd=A("$ZodPromise",(e,t)=>{xe.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),Vd=A("$ZodLazy",(e,t)=>{xe.init(e,t),ze(e._zod,"innerType",()=>t.getter()),ze(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ze(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ze(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ze(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Vs=A("$ZodCustom",(e,t)=>{at.init(e,t),xe.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>Zw(i,n,o,e));Zw(r,n,o,e)}});function Zw(e,t,n,o){if(!e){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),t.issues.push(Zi(r))}}a(Zw,"handleRefineResult");var ca={};hr(ca,{ar:()=>Xg,az:()=>Qg,be:()=>ey,bg:()=>ty,ca:()=>ry,cs:()=>ny,da:()=>oy,de:()=>iy,en:()=>Gs,eo:()=>ay,es:()=>sy,fa:()=>cy,fi:()=>uy,fr:()=>ly,frCA:()=>dy,he:()=>py,hu:()=>fy,hy:()=>my,id:()=>hy,is:()=>gy,it:()=>yy,ja:()=>vy,ka:()=>_y,kh:()=>by,km:()=>Hs,ko:()=>Ey,lt:()=>Sy,mk:()=>Ty,ms:()=>Py,nl:()=>wy,no:()=>xy,ota:()=>Ay,pl:()=>Ry,ps:()=>Iy,pt:()=>Cy,ru:()=>Oy,sl:()=>ky,sv:()=>$y,ta:()=>Dy,th:()=>Ny,tr:()=>zy,ua:()=>Uy,uk:()=>Ws,ur:()=>My,uz:()=>Ly,vi:()=>jy,yo:()=>qy,zhCN:()=>Fy,zhTW:()=>By});var e1=a(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Xg(){return{localeError:e1()}}a(Xg,"default");var t1=a(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Qg(){return{localeError:t1()}}a(Qg,"default");function Xw(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}a(Xw,"getBelarusianPlural");var r1=a(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(r.origin);if(s){let u=Number(r.maximum),d=Xw(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()} ${d}`}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=t(r.origin);if(s){let u=Number(r.minimum),d=Xw(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()} ${d}`}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 ey(){return{localeError:r1()}}a(ey,"default");var n1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 ty(){return{localeError:n1()}}a(ty,"default");var o1=a(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 ry(){return{localeError:o1()}}a(ry,"default");var i1=a(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 ny(){return{localeError:i1()}}a(ny,"default");var a1=a(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 oy(){return{localeError:a1()}}a(oy,"default");var s1=a(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 iy(){return{localeError:s1()}}a(iy,"default");var c1=a(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}a(t,"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=ie(r.input),u=o[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${re(r.values[0])}`:`Invalid option: expected one of ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 Gs(){return{localeError:c1()}}a(Gs,"default");var u1=a(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 ay(){return{localeError:u1()}}a(ay,"default");var l1=a(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 sy(){return{localeError:l1()}}a(sy,"default");var d1=a(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 cy(){return{localeError:d1()}}a(cy,"default");var p1=a(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 uy(){return{localeError:p1()}}a(uy,"default");var f1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}a(t,"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=ie(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 : ${re(r.values[0])} attendu`:`Option invalide : une valeur parmi ${B(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 ly(){return{localeError:f1()}}a(ly,"default");var m1=a(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",s=t(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=t(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 dy(){return{localeError:m1()}}a(dy,"default");var h1=a(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=a(f=>f?e[f]:void 0,"typeEntry"),o=a(f=>{let h=n(f);return h?h.label:f??e.unknown.label},"typeLabel"),r=a(f=>`\u05D4${o(f)}`,"withDefinite"),i=a(f=>(n(f)?.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(f=>f?t[f]??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"}},d={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{let h=f.expected,g=d[h??""]??o(h),m=ie(f.input),p=d[m]??e[m]?.label??m;return/^[A-Z]/.test(f.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${f.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(f.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 ${re(f.values[0])}`;let h=f.values.map(p=>re(p));if(f.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 ${h[0]} \u05D0\u05D5 ${h[1]}`;let g=h[h.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 ${h.slice(0,-1).join(", ")} \u05D0\u05D5 ${g}`}case"too_big":{let h=s(f.origin),g=r(f.origin??"value");if(f.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.maximum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(f.origin==="number"){let y=f.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${f.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}`}if(f.origin==="array"||f.origin==="set"){let y=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",v=f.inclusive?`${f.maximum} ${h?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${f.maximum} ${h?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let m=f.inclusive?"<=":"<",p=i(f.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.maximum.toString()}`}case"too_small":{let h=s(f.origin),g=r(f.origin??"value");if(f.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.minimum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(f.origin==="number"){let y=f.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${f.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}`}if(f.origin==="array"||f.origin==="set"){let y=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(f.minimum===1&&f.inclusive){let E=(f.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`}let v=f.inclusive?`${f.minimum} ${h?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${f.minimum} ${h?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let m=f.inclusive?">=":">",p=i(f.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${g} ${p} ${m}${f.minimum.toString()}`}case"invalid_format":{let h=f;if(h.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${h.prefix}"`;if(h.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${h.suffix}"`;if(h.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${h.includes}"`;if(h.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 ${h.pattern}`;let g=u[h.format],m=g?.label??h.format,y=(g?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${y}`}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 ${f.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${f.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${f.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${B(f.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(f.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function py(){return{localeError:h1()}}a(py,"default");var g1=a(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 fy(){return{localeError:g1()}}a(fy,"default");function Qw(e,t,n){return Math.abs(e)===1?t:n}a(Qw,"getArmenianPlural");function sa(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}a(sa,"withDefiniteArticle");var y1=a(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(r.origin);if(s){let u=Number(r.maximum),d=Qw(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 ${sa(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${d}`}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 ${sa(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let u=Number(r.minimum),d=Qw(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 ${sa(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${d}`}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 ${sa(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 ${sa(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 ${sa(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function my(){return{localeError:y1()}}a(my,"default");var v1=a(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 hy(){return{localeError:v1()}}a(hy,"default");var _1=a(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 gy(){return{localeError:_1()}}a(gy,"default");var b1=a(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Opzione non valida: atteso uno tra ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 yy(){return{localeError:b1()}}a(yy,"default");var E1=a(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}a(t,"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=ie(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: ${re(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=t(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=t(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 vy(){return{localeError:E1()}}a(vy,"default");var S1=a(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 _y(){return{localeError:S1()}}a(_y,"default");var T1=a(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Hs(){return{localeError:T1()}}a(Hs,"default");function by(){return Hs()}a(by,"default");var P1=a(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(r.origin),d=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${d} ${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=t(r.origin),d=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${d} ${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 Ey(){return{localeError:P1()}}a(Ey,"default");var Zs=a(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function ex(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}a(ex,"getUnitTypeFromNumber");var w1=a(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,i,s,u){let d=e[r]??null;return d===null?d:{unit:d.unit[i],verb:d.verb[u][s?"inclusive":"notInclusive"]}}a(t,"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=ie(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 ${re(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=t(r.origin,ex(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Zs(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`${Zs(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=t(r.origin,ex(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Zs(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`${Zs(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`${Zs(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Sy(){return{localeError:w1()}}a(Sy,"default");var x1=a(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Ty(){return{localeError:x1()}}a(Ty,"default");var A1=a(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 Py(){return{localeError:A1()}}a(Py,"default");var I1=a(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 wy(){return{localeError:I1()}}a(wy,"default");var R1=a(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Ugyldig valg: forventet en av ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 xy(){return{localeError:R1()}}a(xy,"default");var C1=a(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 Ay(){return{localeError:C1()}}a(Ay,"default");var O1=a(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Iy(){return{localeError:O1()}}a(Iy,"default");var k1=a(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 Ry(){return{localeError:k1()}}a(Ry,"default");var $1=a(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 Cy(){return{localeError:$1()}}a(Cy,"default");function tx(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}a(tx,"getRussianPlural");var D1=a(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(r.origin);if(s){let u=Number(r.maximum),d=tx(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()} ${d}`}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=t(r.origin);if(s){let u=Number(r.minimum),d=tx(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()} ${d}`}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 Oy(){return{localeError:D1()}}a(Oy,"default");var N1=a(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 ky(){return{localeError:N1()}}a(ky,"default");var z1=a(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 $y(){return{localeError:z1()}}a($y,"default");var U1=a(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Dy(){return{localeError:U1()}}a(Dy,"default");var M1=a(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Ny(){return{localeError:M1()}}a(Ny,"default");var L1=a(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 zy(){return{localeError:L1()}}a(zy,"default");var j1=a(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Ws(){return{localeError:j1()}}a(Ws,"default");function Uy(){return Ws()}a(Uy,"default");var F1=a(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}a(t,"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=ie(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: ${re(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=t(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=t(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:F1()}}a(My,"default");var B1=a(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${B(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",s=t(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=t(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 Ly(){return{localeError:B1()}}a(Ly,"default");var q1=a(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 jy(){return{localeError:q1()}}a(jy,"default");var V1=a(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 Fy(){return{localeError:V1()}}a(Fy,"default");var G1=a(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 By(){return{localeError:G1()}}a(By,"default");var H1=a(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}a(t,"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=ie(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 ${re(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=t(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=t(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 qy(){return{localeError:H1()}}a(qy,"default");var rx,Hd=Symbol("ZodOutput"),Zd=Symbol("ZodInput"),Gd=class{static{a(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ks(){return new Gd}a(Ks,"registry");(rx=globalThis).__zod_globalRegistry??(rx.__zod_globalRegistry=Ks());var Nt=globalThis.__zod_globalRegistry;function Js(e,t){return new e({type:"string",...te(t)})}a(Js,"_string");function Ys(e,t){return new e({type:"string",coerce:!0,...te(t)})}a(Ys,"_coercedString");function Xs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...te(t)})}a(Xs,"_email");function ua(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...te(t)})}a(ua,"_guid");function Qs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...te(t)})}a(Qs,"_uuid");function ec(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(t)})}a(ec,"_uuidv4");function tc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(t)})}a(tc,"_uuidv6");function rc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(t)})}a(rc,"_uuidv7");function ei(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...te(t)})}a(ei,"_url");function nc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...te(t)})}a(nc,"_emoji");function oc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(t)})}a(oc,"_nanoid");function ic(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...te(t)})}a(ic,"_cuid");function ac(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(t)})}a(ac,"_cuid2");function sc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...te(t)})}a(sc,"_ulid");function cc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...te(t)})}a(cc,"_xid");function uc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(t)})}a(uc,"_ksuid");function lc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(t)})}a(lc,"_ipv4");function dc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(t)})}a(dc,"_ipv6");function Wd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...te(t)})}a(Wd,"_mac");function pc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(t)})}a(pc,"_cidrv4");function fc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(t)})}a(fc,"_cidrv6");function mc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...te(t)})}a(mc,"_base64");function hc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...te(t)})}a(hc,"_base64url");function gc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...te(t)})}a(gc,"_e164");function yc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...te(t)})}a(yc,"_jwt");var Kd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Jd(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(t)})}a(Jd,"_isoDateTime");function Yd(e,t){return new e({type:"string",format:"date",check:"string_format",...te(t)})}a(Yd,"_isoDate");function Xd(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...te(t)})}a(Xd,"_isoTime");function Qd(e,t){return new e({type:"string",format:"duration",check:"string_format",...te(t)})}a(Qd,"_isoDuration");function vc(e,t){return new e({type:"number",checks:[],...te(t)})}a(vc,"_number");function _c(e,t){return new e({type:"number",coerce:!0,checks:[],...te(t)})}a(_c,"_coercedNumber");function bc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...te(t)})}a(bc,"_int");function ep(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...te(t)})}a(ep,"_float32");function tp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...te(t)})}a(tp,"_float64");function rp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...te(t)})}a(rp,"_int32");function np(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...te(t)})}a(np,"_uint32");function Ec(e,t){return new e({type:"boolean",...te(t)})}a(Ec,"_boolean");function Sc(e,t){return new e({type:"boolean",coerce:!0,...te(t)})}a(Sc,"_coercedBoolean");function op(e,t){return new e({type:"bigint",...te(t)})}a(op,"_bigint");function Tc(e,t){return new e({type:"bigint",coerce:!0,...te(t)})}a(Tc,"_coercedBigint");function ip(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...te(t)})}a(ip,"_int64");function ap(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...te(t)})}a(ap,"_uint64");function sp(e,t){return new e({type:"symbol",...te(t)})}a(sp,"_symbol");function cp(e,t){return new e({type:"undefined",...te(t)})}a(cp,"_undefined");function up(e,t){return new e({type:"null",...te(t)})}a(up,"_null");function Pc(e){return new e({type:"any"})}a(Pc,"_any");function wc(e){return new e({type:"unknown"})}a(wc,"_unknown");function lp(e,t){return new e({type:"never",...te(t)})}a(lp,"_never");function xc(e,t){return new e({type:"void",...te(t)})}a(xc,"_void");function dp(e,t){return new e({type:"date",...te(t)})}a(dp,"_date");function Ac(e,t){return new e({type:"date",coerce:!0,...te(t)})}a(Ac,"_coercedDate");function pp(e,t){return new e({type:"nan",...te(t)})}a(pp,"_nan");function Xr(e,t){return new Gl({check:"less_than",...te(t),value:e,inclusive:!1})}a(Xr,"_lt");function Jt(e,t){return new Gl({check:"less_than",...te(t),value:e,inclusive:!0})}a(Jt,"_lte");function Qr(e,t){return new Hl({check:"greater_than",...te(t),value:e,inclusive:!1})}a(Qr,"_gt");function Ct(e,t){return new Hl({check:"greater_than",...te(t),value:e,inclusive:!0})}a(Ct,"_gte");function Ic(e){return Qr(0,e)}a(Ic,"_positive");function Rc(e){return Xr(0,e)}a(Rc,"_negative");function Cc(e){return Jt(0,e)}a(Cc,"_nonpositive");function Oc(e){return Ct(0,e)}a(Oc,"_nonnegative");function Ln(e,t){return new Cg({check:"multiple_of",...te(t),value:e})}a(Ln,"_multipleOf");function jn(e,t){return new $g({check:"max_size",...te(t),maximum:e})}a(jn,"_maxSize");function en(e,t){return new Dg({check:"min_size",...te(t),minimum:e})}a(en,"_minSize");function yo(e,t){return new Ng({check:"size_equals",...te(t),size:e})}a(yo,"_size");function vo(e,t){return new zg({check:"max_length",...te(t),maximum:e})}a(vo,"_maxLength");function Tt(e,t){return new Ug({check:"min_length",...te(t),minimum:e})}a(Tt,"_minLength");function _o(e,t){return new Mg({check:"length_equals",...te(t),length:e})}a(_o,"_length");function Ft(e,t){return new Lg({check:"string_format",format:"regex",...te(t),pattern:e})}a(Ft,"_regex");function ti(e){return new jg({check:"string_format",format:"lowercase",...te(e)})}a(ti,"_lowercase");function ri(e){return new Fg({check:"string_format",format:"uppercase",...te(e)})}a(ri,"_uppercase");function ni(e,t){return new Bg({check:"string_format",format:"includes",...te(t),includes:e})}a(ni,"_includes");function oi(e,t){return new qg({check:"string_format",format:"starts_with",...te(t),prefix:e})}a(oi,"_startsWith");function ii(e,t){return new Vg({check:"string_format",format:"ends_with",...te(t),suffix:e})}a(ii,"_endsWith");function kc(e,t,n){return new Gg({check:"property",property:e,schema:t,...te(n)})}a(kc,"_property");function ai(e,t){return new Hg({check:"mime_type",mime:e,...te(t)})}a(ai,"_mime");function Nr(e){return new Zg({check:"overwrite",tx:e})}a(Nr,"_overwrite");function si(e){return Nr(t=>t.normalize(e))}a(si,"_normalize");function ci(){return Nr(e=>e.trim())}a(ci,"_trim");function ui(){return Nr(e=>e.toLowerCase())}a(ui,"_toLowerCase");function li(){return Nr(e=>e.toUpperCase())}a(li,"_toUpperCase");function la(){return Nr(e=>Jh(e))}a(la,"_slugify");function Vy(e,t,n){return new e({type:"array",element:t,...te(n)})}a(Vy,"_array");function W1(e,t,n){return new e({type:"union",options:t,...te(n)})}a(W1,"_union");function K1(e,t,n){return new e({type:"union",options:t,inclusive:!1,...te(n)})}a(K1,"_xor");function J1(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...te(o)})}a(J1,"_discriminatedUnion");function Y1(e,t,n){return new e({type:"intersection",left:t,right:n})}a(Y1,"_intersection");function X1(e,t,n,o){let r=n instanceof xe,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...te(i)})}a(X1,"_tuple");function Q1(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...te(o)})}a(Q1,"_record");function eL(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...te(o)})}a(eL,"_map");function tL(e,t,n){return new e({type:"set",valueType:t,...te(n)})}a(tL,"_set");function rL(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...te(n)})}a(rL,"_enum");function nL(e,t,n){return new e({type:"enum",entries:t,...te(n)})}a(nL,"_nativeEnum");function oL(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...te(n)})}a(oL,"_literal");function fp(e,t){return new e({type:"file",...te(t)})}a(fp,"_file");function iL(e,t){return new e({type:"transform",transform:t})}a(iL,"_transform");function aL(e,t){return new e({type:"optional",innerType:t})}a(aL,"_optional");function sL(e,t){return new e({type:"nullable",innerType:t})}a(sL,"_nullable");function cL(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():kl(n)}})}a(cL,"_default");function uL(e,t,n){return new e({type:"nonoptional",innerType:t,...te(n)})}a(uL,"_nonoptional");function lL(e,t){return new e({type:"success",innerType:t})}a(lL,"_success");function dL(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}a(dL,"_catch");function pL(e,t,n){return new e({type:"pipe",in:t,out:n})}a(pL,"_pipe");function fL(e,t){return new e({type:"readonly",innerType:t})}a(fL,"_readonly");function mL(e,t,n){return new e({type:"template_literal",parts:t,...te(n)})}a(mL,"_templateLiteral");function hL(e,t){return new e({type:"lazy",getter:t})}a(hL,"_lazy");function gL(e,t){return new e({type:"promise",innerType:t})}a(gL,"_promise");function $c(e,t,n){let o=te(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}a($c,"_custom");function mp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...te(n)})}a(mp,"_refine");function hp(e){let t=nx(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Zi(o,n.value,t._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=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Zi(r))}},e(n.value,n)));return t}a(hp,"_superRefine");function nx(e,t){let n=new at({check:"custom",...te(t)});return n._zod.check=e,n}a(nx,"_check");function gp(e){let t=new at({check:"describe"});return t._zod.onattach=[n=>{let o=Nt.get(n)??{};Nt.add(n,{...o,description:e})}],t._zod.check=()=>{},t}a(gp,"describe");function yp(e){let t=new at({check:"meta"});return t._zod.onattach=[n=>{let o=Nt.get(n)??{};Nt.add(n,{...o,...e})}],t._zod.check=()=>{},t}a(yp,"meta");function vp(e,t){let n=te(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(p=>typeof p=="string"?p.toLowerCase():p),r=r.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(o),s=new Set(r),u=e.Codec??aa,d=e.Boolean??Xo,f=e.String??Mn,h=new f({type:"string",error:n.error}),g=new d({type:"boolean",error:n.error}),m=new u({type:"pipe",in:h,out:g,transform:a(((p,y)=>{let v=p;return n.case!=="sensitive"&&(v=v.toLowerCase()),i.has(v)?!0:s.has(v)?!1:(y.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:y.value,inst:m,continue:!1}),{})}),"transform"),reverseTransform:a(((p,y)=>p===!0?o[0]||"true":r[0]||"false"),"reverseTransform"),error:n.error});return m}a(vp,"_stringbool");function di(e,t,n,o={}){let r=te(o),i={...te(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}a(di,"_stringFormat");function bo(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Nt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}a(bo,"initializeContext");function et(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,h);else{let m=s.schema,p=t.processors[r.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);p(e,t,m,h)}let g=e._zod.parent;g&&(s.ref||(s.ref=g),et(g,t,h),t.seen.get(g).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(s.schema,d),t.io==="input"&&Yt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}a(et,"process");function Eo(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let u=e.metadataRegistry.get(s[0])?.id;if(u){let d=o.get(u);if(d&&d!==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=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let g=e.external.registry.get(s[0])?.id,m=e.external.uri??(y=>y);if(g)return{ref:m(g)};let p=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=p,{defId:p,ref:`${m("__shared")}#/${u}/${p}`}}if(s[1]===n)return{ref:"#"};let f=`#/${u}/`,h=s[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},"makeURI"),i=a(s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:d,defId:f}=r(s);u.def={...u.schema},f&&(u.defId=f);let h=u.schema;for(let g in h)delete h[g];h.$ref=d},"extractToDef");if(e.cycles==="throw")for(let s of e.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 e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let f=e.external.registry.get(s[0])?.id;if(t!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}a(Eo,"extractDefs");function So(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a(s=>{let u=e.seen.get(s);if(u.ref===null)return;let d=u.def??u.schema,f={...d},h=u.ref;if(u.ref=null,h){o(h);let m=e.seen.get(h),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(p)):Object.assign(d,p),Object.assign(d,f),s._zod.parent===h)for(let v in d)v==="$ref"||v==="allOf"||v in f||delete d[v];if(p.$ref&&m.def)for(let v in d)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(d[v])===JSON.stringify(m.def[v])&&delete d[v]}let g=s._zod.parent;if(g&&g!==h){o(g);let m=e.seen.get(g);if(m?.schema.$ref&&(d.$ref=m.schema.$ref,m.def))for(let p in d)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(d[p])===JSON.stringify(m.def[p])&&delete d[p]}e.override({zodSchema:s,jsonSchema:d,path:u.path??[]})},"flattenRef");for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let u=s[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?r.$defs=i:r.definitions=i);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:da(t,"input",e.processors),output:da(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}a(So,"finalize");function Yt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Yt(o.element,n);if(o.type==="set")return Yt(o.valueType,n);if(o.type==="lazy")return Yt(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 Yt(o.innerType,n);if(o.type==="intersection")return Yt(o.left,n)||Yt(o.right,n);if(o.type==="record"||o.type==="map")return Yt(o.keyType,n)||Yt(o.valueType,n);if(o.type==="pipe")return Yt(o.in,n)||Yt(o.out,n);if(o.type==="object"){for(let r in o.shape)if(Yt(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(Yt(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(Yt(r,n))return!0;return!!(o.rest&&Yt(o.rest,n))}return!1}a(Yt,"isTransforming");var Gy=a((e,t={})=>n=>{let o=bo({...n,processors:t});return et(e,o),Eo(o,e),So(o,e)},"createToJSONSchemaMethod"),da=a((e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=bo({...r??{},target:i,io:t,processors:n});return et(e,s),Eo(s,e),So(s,e)},"createStandardJSONSchemaMethod");var yL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hy=a((e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),u&&(r.format=yL[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),f&&(r.contentEncoding=f),d&&d.size>0){let h=[...d];h.length===1?r.pattern=h[0].source:h.length>1&&(r.allOf=[...h.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},"stringProcessor"),Zy=a((e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=h,r.exclusiveMinimum=!0):r.exclusiveMinimum=h),typeof i=="number"&&(r.minimum=i,typeof h=="number"&&t.target!=="draft-04"&&(h>=i?delete r.minimum:delete r.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=f,r.exclusiveMaximum=!0):r.exclusiveMaximum=f),typeof s=="number"&&(r.maximum=s,typeof f=="number"&&t.target!=="draft-04"&&(f<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof d=="number"&&(r.multipleOf=d)},"numberProcessor"),Wy=a((e,t,n,o)=>{n.type="boolean"},"booleanProcessor"),Ky=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Jy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Yy=a((e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},"nullProcessor"),Xy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Qy=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),ev=a((e,t,n,o)=>{n.not={}},"neverProcessor"),tv=a((e,t,n,o)=>{},"anyProcessor"),rv=a((e,t,n,o)=>{},"unknownProcessor"),nv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),ov=a((e,t,n,o)=>{let r=e._zod.def,i=bs(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},"enumProcessor"),iv=a((e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");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,t.target==="draft-04"||t.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"),av=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),sv=a((e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},"templateLiteralProcessor"),cv=a((e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:d}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(r,i)},"fileProcessor"),uv=a((e,t,n,o)=>{n.type="boolean"},"successProcessor"),lv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),dv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),pv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),fv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),mv=a((e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),hv=a((e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof u=="number"&&(r.maxItems=u),r.type="array",r.items=et(i.element,t,{...o,path:[...o.path,"items"]})},"arrayProcessor"),gv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let f in s)r.properties[f]=et(s[f],t,{...o,path:[...o.path,"properties",f]});let u=new Set(Object.keys(s)),d=new Set([...u].filter(f=>{let h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));d.size>0&&(r.required=Array.from(d)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=et(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},"objectProcessor"),bp=a((e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,s=r.options.map((u,d)=>et(u,t,{...o,path:[...o.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=s:n.anyOf=s},"unionProcessor"),yv=a((e,t,n,o)=>{let r=e._zod.def,i=et(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=et(r.right,t,{...o,path:[...o.path,"allOf",1]}),u=a(f=>"allOf"in f&&Object.keys(f).length===1,"isSimpleIntersection"),d=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=d},"intersectionProcessor"),vv=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((m,p)=>et(m,t,{...o,path:[...o.path,s,p]})),f=i.rest?et(i.rest,t,{...o,path:[...o.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=d,f&&(r.items=f)):t.target==="openapi-3.0"?(r.items={anyOf:d},f&&r.items.anyOf.push(f),r.minItems=d.length,f||(r.maxItems=d.length)):(r.items=d,f&&(r.additionalItems=f));let{minimum:h,maximum:g}=e._zod.bag;typeof h=="number"&&(r.minItems=h),typeof g=="number"&&(r.maxItems=g)},"tupleProcessor"),_v=a((e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,d=s._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){let h=et(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let g of d)r.patternProperties[g.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=et(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=et(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(g=>typeof g=="string"||typeof g=="number");h.length>0&&(r.required=h)}},"recordProcessor"),bv=a((e,t,n,o)=>{let r=e._zod.def,i=et(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},"nullableProcessor"),Ev=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"nonoptionalProcessor"),Sv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},"defaultProcessor"),Tv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},"prefaultProcessor"),Pv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);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"),wv=a((e,t,n,o)=>{let r=e._zod.def,i=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;et(i,t,o);let s=t.seen.get(e);s.ref=i},"pipeProcessor"),xv=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},"readonlyProcessor"),Av=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"promiseProcessor"),Ep=a((e,t,n,o)=>{let r=e._zod.def;et(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},"optionalProcessor"),Iv=a((e,t,n,o)=>{let r=e._zod.innerType;et(r,t,o);let i=t.seen.get(e);i.ref=r},"lazyProcessor"),_p={string:Hy,number:Zy,boolean:Wy,bigint:Ky,symbol:Jy,null:Yy,undefined:Xy,void:Qy,never:ev,any:tv,unknown:rv,date:nv,enum:ov,literal:iv,nan:av,template_literal:sv,file:cv,success:uv,custom:lv,function:dv,transform:pv,map:fv,set:mv,array:hv,object:gv,union:bp,intersection:yv,tuple:vv,record:_v,nullable:bv,nonoptional:Ev,default:Sv,prefault:Tv,catch:Pv,pipe:wv,readonly:xv,promise:Av,optional:Ep,lazy:Iv};function Dc(e,t){if("_idmap"in e){let o=e,r=bo({...t,processors:_p}),i={};for(let d of o._idmap.entries()){let[f,h]=d;et(h,r)}let s={},u={registry:o,uri:t?.uri,defs:i};r.external=u;for(let d of o._idmap.entries()){let[f,h]=d;Eo(r,h),s[f]=So(r,h)}if(Object.keys(i).length>0){let d=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[d]:i}}return{schemas:s}}let n=bo({...t,processors:_p});return et(e,n),Eo(n,e),So(n,e)}a(Dc,"toJSONSchema");var Sp=class{static{a(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=bo({processors:_p,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return et(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Eo(this.ctx,t);let o=So(this.ctx,t),{"~standard":r,...i}=o;return i}};var ox={};var wt=A("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");xe.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Ko(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Qi(e,n,o),e.parseAsync=async(n,o)=>Jo(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>ta(e,n,o),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(n,o)=>Dt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.apply=n=>n(e)}),Tp=A("ZodMiniString",(e,t)=>{Mn.init(e,t),wt.init(e,t)});function S(e){return Js(Tp,e)}a(S,"string");var ix=A("ZodMiniStringFormat",(e,t)=>{Qe.init(e,t),Tp.init(e,t)});var bL=A("ZodMiniURL",(e,t)=>{Rs.init(e,t),ix.init(e,t)});function ax(e){return ei(bL,e)}a(ax,"url");var Pp=A("ZodMiniNumber",(e,t)=>{na.init(e,t),wt.init(e,t)});function zt(e){return vc(Pp,e)}a(zt,"number");var EL=A("ZodMiniNumberFormat",(e,t)=>{Cs.init(e,t),Pp.init(e,t)});function sx(e){return bc(EL,e)}a(sx,"int");var Rv=A("ZodMiniBoolean",(e,t)=>{Xo.init(e,t),wt.init(e,t)});function Ze(e){return Ec(Rv,e)}a(Ze,"boolean");var cx=A("ZodMiniBigInt",(e,t)=>{oa.init(e,t),wt.init(e,t)});var SL=A("ZodMiniAny",(e,t)=>{Os.init(e,t),wt.init(e,t)});function Nc(){return Pc(SL)}a(Nc,"any");var TL=A("ZodMiniUnknown",(e,t)=>{ks.init(e,t),wt.init(e,t)});function Re(){return wc(TL)}a(Re,"unknown");var PL=A("ZodMiniVoid",(e,t)=>{$s.init(e,t),wt.init(e,t)});function ux(e){return xc(PL,e)}a(ux,"_void");var lx=A("ZodMiniDate",(e,t)=>{Ds.init(e,t),wt.init(e,t)});var wL=A("ZodMiniArray",(e,t)=>{Ns.init(e,t),wt.init(e,t)});function we(e,t){return new wL({type:"array",element:e,...te(t)})}a(we,"array");var xL=A("ZodMiniObject",(e,t)=>{Ad.init(e,t),wt.init(e,t),ze(e,"shape",()=>t.shape)});function O(e,t){let n={type:"object",shape:e??{},...te(t)};return new xL(n)}a(O,"object");var AL=A("ZodMiniUnion",(e,t)=>{Qo.init(e,t),wt.init(e,t)});function Ue(e,t){return new AL({type:"union",options:e,...te(t)})}a(Ue,"union");var IL=A("ZodMiniDiscriminatedUnion",(e,t)=>{zs.init(e,t),wt.init(e,t)});function To(e,t,n){return new IL({type:"union",options:t,discriminator:e,...te(n)})}a(To,"discriminatedUnion");var RL=A("ZodMiniRecord",(e,t)=>{Ms.init(e,t),wt.init(e,t)});function Ce(e,t,n){return new RL({type:"record",keyType:e,valueType:t,...te(n)})}a(Ce,"record");var CL=A("ZodMiniEnum",(e,t)=>{Ls.init(e,t),wt.init(e,t),e.options=Object.values(t.entries)});function Se(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new CL({type:"enum",entries:n,...te(t)})}a(Se,"_enum");var OL=A("ZodMiniLiteral",(e,t)=>{js.init(e,t),wt.init(e,t)});function be(e,t){return new OL({type:"literal",values:Array.isArray(e)?e:[e],...te(t)})}a(be,"literal");var kL=A("ZodMiniTransform",(e,t)=>{Fs.init(e,t),wt.init(e,t)});function Po(e){return new kL({type:"transform",transform:e})}a(Po,"transform");var $L=A("ZodMiniOptional",(e,t)=>{ia.init(e,t),wt.init(e,t)});function q(e){return new $L({type:"optional",innerType:e})}a(q,"optional");var DL=A("ZodMiniNullable",(e,t)=>{Bs.init(e,t),wt.init(e,t)});function zc(e){return new DL({type:"nullable",innerType:e})}a(zc,"nullable");var NL=A("ZodMiniPipe",(e,t)=>{qs.init(e,t),wt.init(e,t)});function wo(e,t){return new NL({type:"pipe",in:e,out:t})}a(wo,"pipe");var zL=A("ZodMiniCustom",(e,t)=>{Vs.init(e,t),wt.init(e,t)});function wp(e,t){return $c(zL,e??(()=>!0),t)}a(wp,"custom");var Uc={};hr(Uc,{bigint:()=>FL,boolean:()=>jL,date:()=>BL,number:()=>LL,string:()=>ML});function ML(e){return Ys(Tp,e)}a(ML,"string");function LL(e){return _c(Pp,e)}a(LL,"number");function jL(e){return Sc(Rv,e)}a(jL,"boolean");function FL(e){return Tc(cx,e)}a(FL,"bigint");function BL(e){return Ac(lx,e)}a(BL,"date");var Ov=O({retryOnFailure:O({defaultValue:q(Ze()),hide:q(Ze())}),continueOnFailure:O({defaultValue:q(Ze()),hide:q(Ze())})}),Cv=class{constructor(t,n,o,r,i,s,u,d,f,h,g,m,p){this.name=t;this.displayName=n;this.description=o;this.props=r;this.propertyGroups=i;this.run=s;this.test=u;this.requireAuth=d;this.errorHandlingOptions=f;this.outputSchema=h;this.audience=g;this.aiMetadata=m;this.classification=p}static{a(this,"IAction")}},Pe=a(e=>new Cv(e.name,e.displayName,e.description,e.props,e.propertyGroups,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata,e.classification),"createAction");var Ge=O({displayName:S(),description:q(S()),advanced:q(Ze()),width:q(Se(["half","full"])),icon:q(S()),placeholder:q(S())}),Oe=a((e,t)=>O({type:be(t),required:Ze(),defaultValue:q(Nc())}),"TPropertyValue");var vr=O({...Ge.shape,...Oe(S(),"SHORT_TEXT").shape}),Fn=O({...Ge.shape,...Oe(S(),"LONG_TEXT").shape});var px=O({label:S(),value:Re(),description:q(S()),icon:q(S())}),xp=O({disabled:q(Ze()),placeholder:q(S()),options:we(px)});var VL=Se(["cards"]),_r=O({...Ge.shape,options:xp,display:q(VL),...Oe(Re(),"STATIC_DROPDOWN").shape}),Bn=O({...Ge.shape,options:xp,...Oe(we(Re()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var kv=O({...Ge.shape,...Oe(Re(),"DROPDOWN").shape,refreshers:we(S())}),Mc=O({...Ge.shape,...Oe(we(Re()),"MULTI_SELECT_DROPDOWN").shape,refreshers:we(S())});var qn=O({...Ge.shape,reveals:q(we(S())),...Oe(Ze(),"CHECKBOX").shape});var Vn=O({...Ge.shape,display:q(Se(["stepper"])),min:q(zt()),max:q(zt()),step:q(zt()),...Oe(zt(),"NUMBER").shape});var Lc=O({...Ge.shape,streaming:q(Ze()),...Oe(Re(),"FILE").shape});var jc=O({...Ge.shape,...Oe(S(),"DATE_TIME").shape});var fx=Ce(S(),Ue([vr,Fn,_r,Mc,Bn,qn,Vn,Lc,jc])),Fc=O({...Ge.shape,properties:fx,...Oe(we(Re()),"ARRAY").shape});var mx=Se(["any_time","last_24_hours","last_7_days","last_30_days","last_90_days","this_month","custom"]),hx=O({preset:q(mx),after:q(S()),before:q(S())}),$v=O({...Ge.shape,display:q(Se(["dropdown"])),...Oe(hx,"DATE_RANGE").shape});var Bc=O({...Ge.shape,...Oe(Ue([Ce(S(),Re())]),"JSON").shape});var gx=Ue([vr,_r,Bc,Fc,Bn]),GL=Ce(S(),gx),Dv=O({refreshers:we(S()),...Ge.shape,...Oe(Re(),"DYNAMIC").shape});var Ap=O({...Ge.shape,...Oe(ux(),"MARKDOWN").shape});var qc=(n=>(n.ARCHIVE="ARCHIVE",n.REGISTRY="REGISTRY",n))(qc||{}),pa=(n=>(n.CUSTOM="CUSTOM",n.OFFICIAL="OFFICIAL",n))(pa||{}),fa=(b=>(b.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",b.COMMUNICATION="COMMUNICATION",b.COMMERCE="COMMERCE",b.CORE="CORE",b.UNIVERSAL_AI="UNIVERSAL_AI",b.FLOW_CONTROL="FLOW_CONTROL",b.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",b.ACCOUNTING="ACCOUNTING",b.PRODUCTIVITY="PRODUCTIVITY",b.CONTENT_AND_FILES="CONTENT_AND_FILES",b.DEVELOPER_TOOLS="DEVELOPER_TOOLS",b.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",b.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",b.HUMAN_RESOURCES="HUMAN_RESOURCES",b.PAYMENT_PROCESSING="PAYMENT_PROCESSING",b.MARKETING="MARKETING",b.SALES_AND_CRM="SALES_AND_CRM",b))(fa||{});var Vc=(n=>(n.AUTHORIZATION_CODE="authorization_code",n.CLIENT_CREDENTIALS="client_credentials",n))(Vc||{}),Nv="both_client_credentials_and_authorization_code";var or=(r=>(r.POLLING="POLLING",r.WEBHOOK="WEBHOOK",r.APP_WEBHOOK="APP_WEBHOOK",r.MANUAL="MANUAL",r))(or||{}),Gc=(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))(Gc||{}),HL=O({strategy:Se(Gc),paramName:q(S())}),Hc=(n=>(n.SIMULATION="SIMULATION",n.TEST_FUNCTION="TEST_FUNCTION",n))(Hc||{});var Ip=(n=>(n.WEBSOCKET="WEBSOCKET",n.NONE="NONE",n))(Ip||{}),yx=O({status:q(zt()),body:q(Re()),headers:q(Ce(S(),S()))}),vx=O({type:be("DELAY"),resumeDateTime:S(),requestIdToReply:q(S()),handlerId:q(S()),streamStepProgress:q(Se(Ip))}),_x=O({type:be("WEBHOOK"),requestId:S(),requestIdToReply:q(S()),response:yx,handlerId:q(S()),streamStepProgress:q(Se(Ip))}),ZL=Ue([vx,_x]);var WL=O({body:Re(),rawBody:q(Re()),headers:Ce(S(),S()),queryParams:Ce(S(),S())});function dt(e){return e==null}a(dt,"isNil");function Zc(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}a(Zc,"isEmpty");function Rp(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}a(Rp,"assertNotNullOrUndefined");function zv(e){try{return{data:e(),error:null}}catch(t){return{data:null,error:t}}}a(zv,"tryCatchSync");var Uv=Ke(require("crypto"),1);var KL=128,xo,ma,JL=a(e=>{if(e<0)throw new RangeError("Wrong ID size");try{!xo||xo.length<e?(xo=Buffer.allocUnsafe(e*KL),Uv.default.randomFillSync(xo),ma=0):ma+e>xo.length&&(Uv.default.randomFillSync(xo),ma=0)}catch(t){throw xo=void 0,t}ma+=e},"fillPool"),YL=a(e=>(JL(e|=0),xo.subarray(ma-e,ma)),"random"),XL=a((e,t,n)=>{let o=(2<<31-Math.clz32(e.length-1|1))-1,r=Math.ceil(1.6*o*t/e.length);return(i=t)=>{if(i<=0)return"";let s="";for(;;){let u=n(r),d=r;for(;d--;)if(s+=e[u[d]&o]||"",s.length===i)return s}}},"customRandom"),Ex=a((e,t=21)=>XL(e,t,YL),"customAlphabet");var QL="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Sx=21,s9=S().check(Ft(new RegExp(`^[0-9a-zA-Z]{${Sx}}$`))),ej=Ex(QL,Sx);var Ao=wo(Po(e=>e instanceof Date?e.toISOString():e),S()),zr={id:S(),created:Ao,updated:Ao},vt=a(e=>q(zc(e)),"Nullable");function Mv(e){return q(zc(Se(e)))}a(Mv,"NullableEnum");var l9=wo(Po(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),q(Ze())),Cp=a(e=>wo(Po(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),q(we(e))),"OptionalArrayFromQuery");var f9=Ce(S(),Re());var ha=(b=>(b.OPENAI="openai",b.OPENROUTER="openrouter",b.ANTHROPIC="anthropic",b.AZURE="azure",b.GOOGLE="google",b.ACTIVEPIECES="activepieces",b.CLOUDFLARE_GATEWAY="cloudflare-gateway",b.CUSTOM="custom",b.BEDROCK="bedrock",b.VERTEX="vertex",b.MISTRAL="mistral",b.XAI="xai",b.DEEPSEEK="deepseek",b.ZAI="zai",b.QWEN="qwen",b.MINIMAX="minimax",b.MOONSHOT="moonshot",b))(ha||{});var x9=S().check(Ft(/^#[0-9A-Fa-f]{6}$/));var I9=O({filename:S(),data:Re(),type:be("file"),mimetype:q(S())});var tj=Ke(Px());var N9=O({...zr,name:S(),permissions:we(S()),platformId:vt(S()),type:S(),userCount:q(zt())});var pf={};hr(pf,{$brand:()=>vs,$input:()=>Zd,$output:()=>Hd,NEVER:()=>Rl,TimePrecision:()=>Kd,ZodAny:()=>c_,ZodArray:()=>p_,ZodBase64:()=>Xp,ZodBase64URL:()=>Qp,ZodBigInt:()=>Sa,ZodBigIntFormat:()=>rf,ZodBoolean:()=>Ea,ZodCIDRv4:()=>Jp,ZodCIDRv6:()=>Yp,ZodCUID:()=>qp,ZodCUID2:()=>Vp,ZodCatch:()=>D_,ZodCodec:()=>df,ZodCustom:()=>iu,ZodCustomStringFormat:()=>_a,ZodDate:()=>eu,ZodDefault:()=>I_,ZodDiscriminatedUnion:()=>m_,ZodE164:()=>ef,ZodEmail:()=>jp,ZodEmoji:()=>Fp,ZodEnum:()=>ya,ZodError:()=>rj,ZodExactOptional:()=>w_,ZodFile:()=>T_,ZodFirstPartyTypeKind:()=>H_,ZodFunction:()=>q_,ZodGUID:()=>Kc,ZodIPv4:()=>Wp,ZodIPv6:()=>Kp,ZodISODate:()=>Dp,ZodISODateTime:()=>$p,ZodISODuration:()=>zp,ZodISOTime:()=>Np,ZodIntersection:()=>h_,ZodIssueCode:()=>oj,ZodJWT:()=>tf,ZodKSUID:()=>Zp,ZodLazy:()=>j_,ZodLiteral:()=>S_,ZodMAC:()=>t_,ZodMap:()=>b_,ZodNaN:()=>z_,ZodNanoID:()=>Bp,ZodNever:()=>l_,ZodNonOptional:()=>uf,ZodNull:()=>a_,ZodNullable:()=>A_,ZodNumber:()=>ba,ZodNumberFormat:()=>fi,ZodObject:()=>ru,ZodOptional:()=>cf,ZodPipe:()=>lf,ZodPrefault:()=>C_,ZodPromise:()=>B_,ZodReadonly:()=>U_,ZodRealError:()=>ir,ZodRecord:()=>ou,ZodSet:()=>E_,ZodString:()=>va,ZodStringFormat:()=>st,ZodSuccess:()=>$_,ZodSymbol:()=>o_,ZodTemplateLiteral:()=>L_,ZodTransform:()=>P_,ZodTuple:()=>y_,ZodType:()=>Me,ZodULID:()=>Gp,ZodURL:()=>Qc,ZodUUID:()=>fn,ZodUndefined:()=>i_,ZodUnion:()=>nu,ZodUnknown:()=>u_,ZodVoid:()=>d_,ZodXID:()=>Hp,ZodXor:()=>f_,_ZodString:()=>Lp,_default:()=>R_,_function:()=>OA,any:()=>uA,array:()=>tu,base64:()=>Hx,base64url:()=>Zx,bigint:()=>oA,boolean:()=>n_,catch:()=>N_,check:()=>kA,cidrv4:()=>Vx,cidrv6:()=>Gx,clone:()=>Dt,codec:()=>IA,coerce:()=>Z_,config:()=>yt,core:()=>yr,cuid:()=>zx,cuid2:()=>Ux,custom:()=>$A,date:()=>dA,decode:()=>Wv,decodeAsync:()=>Jv,describe:()=>DA,discriminatedUnion:()=>yA,e164:()=>Wx,email:()=>xx,emoji:()=>Dx,encode:()=>Zv,encodeAsync:()=>Kv,endsWith:()=>ii,enum:()=>af,exactOptional:()=>x_,file:()=>PA,flattenError:()=>Wi,float32:()=>eA,float64:()=>tA,formatError:()=>Ki,fromJSONSchema:()=>FA,function:()=>OA,getErrorMap:()=>aj,globalRegistry:()=>Nt,gt:()=>Qr,gte:()=>Ct,guid:()=>Ax,hash:()=>Qx,hex:()=>Xx,hostname:()=>Yx,httpUrl:()=>$x,includes:()=>ni,instanceof:()=>zA,int:()=>Mp,int32:()=>rA,int64:()=>iA,intersection:()=>g_,ipv4:()=>Fx,ipv6:()=>qx,iso:()=>ga,json:()=>MA,jwt:()=>Kx,keyof:()=>pA,ksuid:()=>jx,lazy:()=>F_,length:()=>_o,literal:()=>TA,locales:()=>ca,looseObject:()=>hA,looseRecord:()=>_A,lowercase:()=>ti,lt:()=>Xr,lte:()=>Jt,mac:()=>Bx,map:()=>bA,maxLength:()=>vo,maxSize:()=>jn,meta:()=>NA,mime:()=>ai,minLength:()=>Tt,minSize:()=>en,multipleOf:()=>Ln,nan:()=>AA,nanoid:()=>Nx,nativeEnum:()=>SA,negative:()=>Rc,never:()=>nf,nonnegative:()=>Oc,nonoptional:()=>k_,nonpositive:()=>Cc,normalize:()=>si,null:()=>s_,nullable:()=>Yc,nullish:()=>wA,number:()=>r_,object:()=>fA,optional:()=>Jc,overwrite:()=>Nr,parse:()=>qv,parseAsync:()=>Vv,partialRecord:()=>vA,pipe:()=>Xc,positive:()=>Ic,prefault:()=>O_,preprocess:()=>LA,prettifyError:()=>Dl,promise:()=>CA,property:()=>kc,readonly:()=>M_,record:()=>__,refine:()=>V_,regex:()=>Ft,regexes:()=>nr,registry:()=>Ks,safeDecode:()=>Xv,safeDecodeAsync:()=>e_,safeEncode:()=>Yv,safeEncodeAsync:()=>Qv,safeParse:()=>Gv,safeParseAsync:()=>Hv,set:()=>EA,setErrorMap:()=>ij,size:()=>yo,slugify:()=>la,startsWith:()=>oi,strictObject:()=>mA,string:()=>Up,stringFormat:()=>Jx,stringbool:()=>UA,success:()=>xA,superRefine:()=>G_,symbol:()=>sA,templateLiteral:()=>RA,toJSONSchema:()=>Dc,toLowerCase:()=>ui,toUpperCase:()=>li,transform:()=>sf,treeifyError:()=>$l,trim:()=>ci,tuple:()=>v_,uint32:()=>nA,uint64:()=>aA,ulid:()=>Mx,undefined:()=>cA,union:()=>of,unknown:()=>pi,uppercase:()=>ri,url:()=>kx,util:()=>oe,uuid:()=>Ix,uuidv4:()=>Rx,uuidv6:()=>Cx,uuidv7:()=>Ox,void:()=>lA,xid:()=>Lx,xor:()=>gA});var Wc={};hr(Wc,{ZodAny:()=>c_,ZodArray:()=>p_,ZodBase64:()=>Xp,ZodBase64URL:()=>Qp,ZodBigInt:()=>Sa,ZodBigIntFormat:()=>rf,ZodBoolean:()=>Ea,ZodCIDRv4:()=>Jp,ZodCIDRv6:()=>Yp,ZodCUID:()=>qp,ZodCUID2:()=>Vp,ZodCatch:()=>D_,ZodCodec:()=>df,ZodCustom:()=>iu,ZodCustomStringFormat:()=>_a,ZodDate:()=>eu,ZodDefault:()=>I_,ZodDiscriminatedUnion:()=>m_,ZodE164:()=>ef,ZodEmail:()=>jp,ZodEmoji:()=>Fp,ZodEnum:()=>ya,ZodExactOptional:()=>w_,ZodFile:()=>T_,ZodFunction:()=>q_,ZodGUID:()=>Kc,ZodIPv4:()=>Wp,ZodIPv6:()=>Kp,ZodIntersection:()=>h_,ZodJWT:()=>tf,ZodKSUID:()=>Zp,ZodLazy:()=>j_,ZodLiteral:()=>S_,ZodMAC:()=>t_,ZodMap:()=>b_,ZodNaN:()=>z_,ZodNanoID:()=>Bp,ZodNever:()=>l_,ZodNonOptional:()=>uf,ZodNull:()=>a_,ZodNullable:()=>A_,ZodNumber:()=>ba,ZodNumberFormat:()=>fi,ZodObject:()=>ru,ZodOptional:()=>cf,ZodPipe:()=>lf,ZodPrefault:()=>C_,ZodPromise:()=>B_,ZodReadonly:()=>U_,ZodRecord:()=>ou,ZodSet:()=>E_,ZodString:()=>va,ZodStringFormat:()=>st,ZodSuccess:()=>$_,ZodSymbol:()=>o_,ZodTemplateLiteral:()=>L_,ZodTransform:()=>P_,ZodTuple:()=>y_,ZodType:()=>Me,ZodULID:()=>Gp,ZodURL:()=>Qc,ZodUUID:()=>fn,ZodUndefined:()=>i_,ZodUnion:()=>nu,ZodUnknown:()=>u_,ZodVoid:()=>d_,ZodXID:()=>Hp,ZodXor:()=>f_,_ZodString:()=>Lp,_default:()=>R_,_function:()=>OA,any:()=>uA,array:()=>tu,base64:()=>Hx,base64url:()=>Zx,bigint:()=>oA,boolean:()=>n_,catch:()=>N_,check:()=>kA,cidrv4:()=>Vx,cidrv6:()=>Gx,codec:()=>IA,cuid:()=>zx,cuid2:()=>Ux,custom:()=>$A,date:()=>dA,describe:()=>DA,discriminatedUnion:()=>yA,e164:()=>Wx,email:()=>xx,emoji:()=>Dx,enum:()=>af,exactOptional:()=>x_,file:()=>PA,float32:()=>eA,float64:()=>tA,function:()=>OA,guid:()=>Ax,hash:()=>Qx,hex:()=>Xx,hostname:()=>Yx,httpUrl:()=>$x,instanceof:()=>zA,int:()=>Mp,int32:()=>rA,int64:()=>iA,intersection:()=>g_,ipv4:()=>Fx,ipv6:()=>qx,json:()=>MA,jwt:()=>Kx,keyof:()=>pA,ksuid:()=>jx,lazy:()=>F_,literal:()=>TA,looseObject:()=>hA,looseRecord:()=>_A,mac:()=>Bx,map:()=>bA,meta:()=>NA,nan:()=>AA,nanoid:()=>Nx,nativeEnum:()=>SA,never:()=>nf,nonoptional:()=>k_,null:()=>s_,nullable:()=>Yc,nullish:()=>wA,number:()=>r_,object:()=>fA,optional:()=>Jc,partialRecord:()=>vA,pipe:()=>Xc,prefault:()=>O_,preprocess:()=>LA,promise:()=>CA,readonly:()=>M_,record:()=>__,refine:()=>V_,set:()=>EA,strictObject:()=>mA,string:()=>Up,stringFormat:()=>Jx,stringbool:()=>UA,success:()=>xA,superRefine:()=>G_,symbol:()=>sA,templateLiteral:()=>RA,transform:()=>sf,tuple:()=>v_,uint32:()=>nA,uint64:()=>aA,ulid:()=>Mx,undefined:()=>cA,union:()=>of,unknown:()=>pi,url:()=>kx,uuid:()=>Ix,uuidv4:()=>Rx,uuidv6:()=>Cx,uuidv7:()=>Ox,void:()=>lA,xid:()=>Lx,xor:()=>gA});var kp={};hr(kp,{endsWith:()=>ii,gt:()=>Qr,gte:()=>Ct,includes:()=>ni,length:()=>_o,lowercase:()=>ti,lt:()=>Xr,lte:()=>Jt,maxLength:()=>vo,maxSize:()=>jn,mime:()=>ai,minLength:()=>Tt,minSize:()=>en,multipleOf:()=>Ln,negative:()=>Rc,nonnegative:()=>Oc,nonpositive:()=>Cc,normalize:()=>si,overwrite:()=>Nr,positive:()=>Ic,property:()=>kc,regex:()=>Ft,size:()=>yo,slugify:()=>la,startsWith:()=>oi,toLowerCase:()=>ui,toUpperCase:()=>li,trim:()=>ci,uppercase:()=>ri});var ga={};hr(ga,{ZodISODate:()=>Dp,ZodISODateTime:()=>$p,ZodISODuration:()=>zp,ZodISOTime:()=>Np,date:()=>jv,datetime:()=>Lv,duration:()=>Bv,time:()=>Fv});var $p=A("ZodISODateTime",(e,t)=>{cd.init(e,t),st.init(e,t)});function Lv(e){return Jd($p,e)}a(Lv,"datetime");var Dp=A("ZodISODate",(e,t)=>{ud.init(e,t),st.init(e,t)});function jv(e){return Yd(Dp,e)}a(jv,"date");var Np=A("ZodISOTime",(e,t)=>{ld.init(e,t),st.init(e,t)});function Fv(e){return Xd(Np,e)}a(Fv,"time");var zp=A("ZodISODuration",(e,t)=>{dd.init(e,t),st.init(e,t)});function Bv(e){return Qd(zp,e)}a(Bv,"duration");var wx=a((e,t)=>{ws.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:a(n=>Ki(e,n),"value")},flatten:{value:a(n=>Wi(e,n),"value")},addIssue:{value:a(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Gi,2)},"value")},addIssues:{value:a(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Gi,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),rj=A("ZodError",wx),ir=A("ZodError",wx,{Parent:Error});var qv=Ji(ir),Vv=Yi(ir),Gv=Xi(ir),Hv=ea(ir),Zv=Nl(ir),Wv=zl(ir),Kv=Ul(ir),Jv=Ml(ir),Yv=Ll(ir),Xv=jl(ir),Qv=Fl(ir),e_=Bl(ir);var Me=A("ZodType",(e,t)=>(xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:da(e,"input"),output:da(e,"output")}}),e.toJSONSchema=Gy(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(oe.mergeDefs(t,{checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(n,o)=>Dt(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>qv(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Gv(e,n,o),e.parseAsync=async(n,o)=>Vv(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Hv(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Zv(e,n,o),e.decode=(n,o)=>Wv(e,n,o),e.encodeAsync=async(n,o)=>Kv(e,n,o),e.decodeAsync=async(n,o)=>Jv(e,n,o),e.safeEncode=(n,o)=>Yv(e,n,o),e.safeDecode=(n,o)=>Xv(e,n,o),e.safeEncodeAsync=async(n,o)=>Qv(e,n,o),e.safeDecodeAsync=async(n,o)=>e_(e,n,o),e.refine=(n,o)=>e.check(V_(n,o)),e.superRefine=n=>e.check(G_(n)),e.overwrite=n=>e.check(Nr(n)),e.optional=()=>Jc(e),e.exactOptional=()=>x_(e),e.nullable=()=>Yc(e),e.nullish=()=>Jc(Yc(e)),e.nonoptional=n=>k_(e,n),e.array=()=>tu(e),e.or=n=>of([e,n]),e.and=n=>g_(e,n),e.transform=n=>Xc(e,sf(n)),e.default=n=>R_(e,n),e.prefault=n=>O_(e,n),e.catch=n=>N_(e,n),e.pipe=n=>Xc(e,n),e.readonly=()=>M_(e),e.describe=n=>{let o=e.clone();return Nt.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Nt.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Nt.get(e);let o=e.clone();return Nt.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Lp=A("_ZodString",(e,t)=>{Mn.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Hy(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Ft(...o)),e.includes=(...o)=>e.check(ni(...o)),e.startsWith=(...o)=>e.check(oi(...o)),e.endsWith=(...o)=>e.check(ii(...o)),e.min=(...o)=>e.check(Tt(...o)),e.max=(...o)=>e.check(vo(...o)),e.length=(...o)=>e.check(_o(...o)),e.nonempty=(...o)=>e.check(Tt(1,...o)),e.lowercase=o=>e.check(ti(o)),e.uppercase=o=>e.check(ri(o)),e.trim=()=>e.check(ci()),e.normalize=(...o)=>e.check(si(...o)),e.toLowerCase=()=>e.check(ui()),e.toUpperCase=()=>e.check(li()),e.slugify=()=>e.check(la())}),va=A("ZodString",(e,t)=>{Mn.init(e,t),Lp.init(e,t),e.email=n=>e.check(Xs(jp,n)),e.url=n=>e.check(ei(Qc,n)),e.jwt=n=>e.check(yc(tf,n)),e.emoji=n=>e.check(nc(Fp,n)),e.guid=n=>e.check(ua(Kc,n)),e.uuid=n=>e.check(Qs(fn,n)),e.uuidv4=n=>e.check(ec(fn,n)),e.uuidv6=n=>e.check(tc(fn,n)),e.uuidv7=n=>e.check(rc(fn,n)),e.nanoid=n=>e.check(oc(Bp,n)),e.guid=n=>e.check(ua(Kc,n)),e.cuid=n=>e.check(ic(qp,n)),e.cuid2=n=>e.check(ac(Vp,n)),e.ulid=n=>e.check(sc(Gp,n)),e.base64=n=>e.check(mc(Xp,n)),e.base64url=n=>e.check(hc(Qp,n)),e.xid=n=>e.check(cc(Hp,n)),e.ksuid=n=>e.check(uc(Zp,n)),e.ipv4=n=>e.check(lc(Wp,n)),e.ipv6=n=>e.check(dc(Kp,n)),e.cidrv4=n=>e.check(pc(Jp,n)),e.cidrv6=n=>e.check(fc(Yp,n)),e.e164=n=>e.check(gc(ef,n)),e.datetime=n=>e.check(Lv(n)),e.date=n=>e.check(jv(n)),e.time=n=>e.check(Fv(n)),e.duration=n=>e.check(Bv(n))});function Up(e){return Js(va,e)}a(Up,"string");var st=A("ZodStringFormat",(e,t)=>{Qe.init(e,t),Lp.init(e,t)}),jp=A("ZodEmail",(e,t)=>{ed.init(e,t),st.init(e,t)});function xx(e){return Xs(jp,e)}a(xx,"email");var Kc=A("ZodGUID",(e,t)=>{Xl.init(e,t),st.init(e,t)});function Ax(e){return ua(Kc,e)}a(Ax,"guid");var fn=A("ZodUUID",(e,t)=>{Ql.init(e,t),st.init(e,t)});function Ix(e){return Qs(fn,e)}a(Ix,"uuid");function Rx(e){return ec(fn,e)}a(Rx,"uuidv4");function Cx(e){return tc(fn,e)}a(Cx,"uuidv6");function Ox(e){return rc(fn,e)}a(Ox,"uuidv7");var Qc=A("ZodURL",(e,t)=>{Rs.init(e,t),st.init(e,t)});function kx(e){return ei(Qc,e)}a(kx,"url");function $x(e){return ei(Qc,{protocol:/^https?$/,hostname:nr.domain,...oe.normalizeParams(e)})}a($x,"httpUrl");var Fp=A("ZodEmoji",(e,t)=>{td.init(e,t),st.init(e,t)});function Dx(e){return nc(Fp,e)}a(Dx,"emoji");var Bp=A("ZodNanoID",(e,t)=>{rd.init(e,t),st.init(e,t)});function Nx(e){return oc(Bp,e)}a(Nx,"nanoid");var qp=A("ZodCUID",(e,t)=>{nd.init(e,t),st.init(e,t)});function zx(e){return ic(qp,e)}a(zx,"cuid");var Vp=A("ZodCUID2",(e,t)=>{od.init(e,t),st.init(e,t)});function Ux(e){return ac(Vp,e)}a(Ux,"cuid2");var Gp=A("ZodULID",(e,t)=>{id.init(e,t),st.init(e,t)});function Mx(e){return sc(Gp,e)}a(Mx,"ulid");var Hp=A("ZodXID",(e,t)=>{ad.init(e,t),st.init(e,t)});function Lx(e){return cc(Hp,e)}a(Lx,"xid");var Zp=A("ZodKSUID",(e,t)=>{sd.init(e,t),st.init(e,t)});function jx(e){return uc(Zp,e)}a(jx,"ksuid");var Wp=A("ZodIPv4",(e,t)=>{pd.init(e,t),st.init(e,t)});function Fx(e){return lc(Wp,e)}a(Fx,"ipv4");var t_=A("ZodMAC",(e,t)=>{md.init(e,t),st.init(e,t)});function Bx(e){return Wd(t_,e)}a(Bx,"mac");var Kp=A("ZodIPv6",(e,t)=>{fd.init(e,t),st.init(e,t)});function qx(e){return dc(Kp,e)}a(qx,"ipv6");var Jp=A("ZodCIDRv4",(e,t)=>{hd.init(e,t),st.init(e,t)});function Vx(e){return pc(Jp,e)}a(Vx,"cidrv4");var Yp=A("ZodCIDRv6",(e,t)=>{gd.init(e,t),st.init(e,t)});function Gx(e){return fc(Yp,e)}a(Gx,"cidrv6");var Xp=A("ZodBase64",(e,t)=>{yd.init(e,t),st.init(e,t)});function Hx(e){return mc(Xp,e)}a(Hx,"base64");var Qp=A("ZodBase64URL",(e,t)=>{vd.init(e,t),st.init(e,t)});function Zx(e){return hc(Qp,e)}a(Zx,"base64url");var ef=A("ZodE164",(e,t)=>{_d.init(e,t),st.init(e,t)});function Wx(e){return gc(ef,e)}a(Wx,"e164");var tf=A("ZodJWT",(e,t)=>{bd.init(e,t),st.init(e,t)});function Kx(e){return yc(tf,e)}a(Kx,"jwt");var _a=A("ZodCustomStringFormat",(e,t)=>{Ed.init(e,t),st.init(e,t)});function Jx(e,t,n={}){return di(_a,e,t,n)}a(Jx,"stringFormat");function Yx(e){return di(_a,"hostname",nr.hostname,e)}a(Yx,"hostname");function Xx(e){return di(_a,"hex",nr.hex,e)}a(Xx,"hex");function Qx(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=nr[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return di(_a,o,r,t)}a(Qx,"hash");var ba=A("ZodNumber",(e,t)=>{na.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Zy(e,o,r,i),e.gt=(o,r)=>e.check(Qr(o,r)),e.gte=(o,r)=>e.check(Ct(o,r)),e.min=(o,r)=>e.check(Ct(o,r)),e.lt=(o,r)=>e.check(Xr(o,r)),e.lte=(o,r)=>e.check(Jt(o,r)),e.max=(o,r)=>e.check(Jt(o,r)),e.int=o=>e.check(Mp(o)),e.safe=o=>e.check(Mp(o)),e.positive=o=>e.check(Qr(0,o)),e.nonnegative=o=>e.check(Ct(0,o)),e.negative=o=>e.check(Xr(0,o)),e.nonpositive=o=>e.check(Jt(0,o)),e.multipleOf=(o,r)=>e.check(Ln(o,r)),e.step=(o,r)=>e.check(Ln(o,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function r_(e){return vc(ba,e)}a(r_,"number");var fi=A("ZodNumberFormat",(e,t)=>{Cs.init(e,t),ba.init(e,t)});function Mp(e){return bc(fi,e)}a(Mp,"int");function eA(e){return ep(fi,e)}a(eA,"float32");function tA(e){return tp(fi,e)}a(tA,"float64");function rA(e){return rp(fi,e)}a(rA,"int32");function nA(e){return np(fi,e)}a(nA,"uint32");var Ea=A("ZodBoolean",(e,t)=>{Xo.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wy(e,n,o,r)});function n_(e){return Ec(Ea,e)}a(n_,"boolean");var Sa=A("ZodBigInt",(e,t)=>{oa.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ky(e,o,r,i),e.gte=(o,r)=>e.check(Ct(o,r)),e.min=(o,r)=>e.check(Ct(o,r)),e.gt=(o,r)=>e.check(Qr(o,r)),e.gte=(o,r)=>e.check(Ct(o,r)),e.min=(o,r)=>e.check(Ct(o,r)),e.lt=(o,r)=>e.check(Xr(o,r)),e.lte=(o,r)=>e.check(Jt(o,r)),e.max=(o,r)=>e.check(Jt(o,r)),e.positive=o=>e.check(Qr(BigInt(0),o)),e.negative=o=>e.check(Xr(BigInt(0),o)),e.nonpositive=o=>e.check(Jt(BigInt(0),o)),e.nonnegative=o=>e.check(Ct(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Ln(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function oA(e){return op(Sa,e)}a(oA,"bigint");var rf=A("ZodBigIntFormat",(e,t)=>{Sd.init(e,t),Sa.init(e,t)});function iA(e){return ip(rf,e)}a(iA,"int64");function aA(e){return ap(rf,e)}a(aA,"uint64");var o_=A("ZodSymbol",(e,t)=>{Td.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jy(e,n,o,r)});function sA(e){return sp(o_,e)}a(sA,"symbol");var i_=A("ZodUndefined",(e,t)=>{Pd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xy(e,n,o,r)});function cA(e){return cp(i_,e)}a(cA,"_undefined");var a_=A("ZodNull",(e,t)=>{wd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yy(e,n,o,r)});function s_(e){return up(a_,e)}a(s_,"_null");var c_=A("ZodAny",(e,t)=>{Os.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tv(e,n,o,r)});function uA(){return Pc(c_)}a(uA,"any");var u_=A("ZodUnknown",(e,t)=>{ks.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rv(e,n,o,r)});function pi(){return wc(u_)}a(pi,"unknown");var l_=A("ZodNever",(e,t)=>{xd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ev(e,n,o,r)});function nf(e){return lp(l_,e)}a(nf,"never");var d_=A("ZodVoid",(e,t)=>{$s.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qy(e,n,o,r)});function lA(e){return xc(d_,e)}a(lA,"_void");var eu=A("ZodDate",(e,t)=>{Ds.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>nv(e,o,r,i),e.min=(o,r)=>e.check(Ct(o,r)),e.max=(o,r)=>e.check(Jt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function dA(e){return dp(eu,e)}a(dA,"date");var p_=A("ZodArray",(e,t)=>{Ns.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hv(e,n,o,r),e.element=t.element,e.min=(n,o)=>e.check(Tt(n,o)),e.nonempty=n=>e.check(Tt(1,n)),e.max=(n,o)=>e.check(vo(n,o)),e.length=(n,o)=>e.check(_o(n,o)),e.unwrap=()=>e.element});function tu(e,t){return Vy(p_,e,t)}a(tu,"array");function pA(e){let t=e._zod.def.shape;return af(Object.keys(t))}a(pA,"keyof");var ru=A("ZodObject",(e,t)=>{Yg.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gv(e,n,o,r),oe.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>af(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pi()}),e.loose=()=>e.clone({...e._zod.def,catchall:pi()}),e.strict=()=>e.clone({...e._zod.def,catchall:nf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>oe.extend(e,n),e.safeExtend=n=>oe.safeExtend(e,n),e.merge=n=>oe.merge(e,n),e.pick=n=>oe.pick(e,n),e.omit=n=>oe.omit(e,n),e.partial=(...n)=>oe.partial(cf,e,n[0]),e.required=(...n)=>oe.required(uf,e,n[0])});function fA(e,t){let n={type:"object",shape:e??{},...oe.normalizeParams(t)};return new ru(n)}a(fA,"object");function mA(e,t){return new ru({type:"object",shape:e,catchall:nf(),...oe.normalizeParams(t)})}a(mA,"strictObject");function hA(e,t){return new ru({type:"object",shape:e,catchall:pi(),...oe.normalizeParams(t)})}a(hA,"looseObject");var nu=A("ZodUnion",(e,t)=>{Qo.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bp(e,n,o,r),e.options=t.options});function of(e,t){return new nu({type:"union",options:e,...oe.normalizeParams(t)})}a(of,"union");var f_=A("ZodXor",(e,t)=>{nu.init(e,t),Id.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bp(e,n,o,r),e.options=t.options});function gA(e,t){return new f_({type:"union",options:e,inclusive:!1,...oe.normalizeParams(t)})}a(gA,"xor");var m_=A("ZodDiscriminatedUnion",(e,t)=>{nu.init(e,t),zs.init(e,t)});function yA(e,t,n){return new m_({type:"union",options:t,discriminator:e,...oe.normalizeParams(n)})}a(yA,"discriminatedUnion");var h_=A("ZodIntersection",(e,t)=>{Rd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yv(e,n,o,r)});function g_(e,t){return new h_({type:"intersection",left:e,right:t})}a(g_,"intersection");var y_=A("ZodTuple",(e,t)=>{Us.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vv(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function v_(e,t,n){let o=t instanceof xe,r=o?n:t,i=o?t:null;return new y_({type:"tuple",items:e,rest:i,...oe.normalizeParams(r)})}a(v_,"tuple");var ou=A("ZodRecord",(e,t)=>{Ms.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_v(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});function __(e,t,n){return new ou({type:"record",keyType:e,valueType:t,...oe.normalizeParams(n)})}a(__,"record");function vA(e,t,n){let o=Dt(e);return o._zod.values=void 0,new ou({type:"record",keyType:o,valueType:t,...oe.normalizeParams(n)})}a(vA,"partialRecord");function _A(e,t,n){return new ou({type:"record",keyType:e,valueType:t,mode:"loose",...oe.normalizeParams(n)})}a(_A,"looseRecord");var b_=A("ZodMap",(e,t)=>{Cd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fv(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(en(...n)),e.nonempty=n=>e.check(en(1,n)),e.max=(...n)=>e.check(jn(...n)),e.size=(...n)=>e.check(yo(...n))});function bA(e,t,n){return new b_({type:"map",keyType:e,valueType:t,...oe.normalizeParams(n)})}a(bA,"map");var E_=A("ZodSet",(e,t)=>{Od.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mv(e,n,o,r),e.min=(...n)=>e.check(en(...n)),e.nonempty=n=>e.check(en(1,n)),e.max=(...n)=>e.check(jn(...n)),e.size=(...n)=>e.check(yo(...n))});function EA(e,t){return new E_({type:"set",valueType:e,...oe.normalizeParams(t)})}a(EA,"set");var ya=A("ZodEnum",(e,t)=>{Ls.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(o,r,i)=>ov(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ya({...t,checks:[],...oe.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.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 ya({...t,checks:[],...oe.normalizeParams(r),entries:i})}});function af(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ya({type:"enum",entries:n,...oe.normalizeParams(t)})}a(af,"_enum");function SA(e,t){return new ya({type:"enum",entries:e,...oe.normalizeParams(t)})}a(SA,"nativeEnum");var S_=A("ZodLiteral",(e,t)=>{js.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>iv(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function TA(e,t){return new S_({type:"literal",values:Array.isArray(e)?e:[e],...oe.normalizeParams(t)})}a(TA,"literal");var T_=A("ZodFile",(e,t)=>{kd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cv(e,n,o,r),e.min=(n,o)=>e.check(en(n,o)),e.max=(n,o)=>e.check(jn(n,o)),e.mime=(n,o)=>e.check(ai(Array.isArray(n)?n:[n],o))});function PA(e){return fp(T_,e)}a(PA,"file");var P_=A("ZodTransform",(e,t)=>{Fs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pv(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new po(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(oe.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(oe.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function sf(e){return new P_({type:"transform",transform:e})}a(sf,"transform");var cf=A("ZodOptional",(e,t)=>{ia.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ep(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Jc(e){return new cf({type:"optional",innerType:e})}a(Jc,"optional");var w_=A("ZodExactOptional",(e,t)=>{$d.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ep(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function x_(e){return new w_({type:"optional",innerType:e})}a(x_,"exactOptional");var A_=A("ZodNullable",(e,t)=>{Bs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function Yc(e){return new A_({type:"nullable",innerType:e})}a(Yc,"nullable");function wA(e){return Jc(Yc(e))}a(wA,"nullish");var I_=A("ZodDefault",(e,t)=>{Dd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function R_(e,t){return new I_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():oe.shallowClone(t)}})}a(R_,"_default");var C_=A("ZodPrefault",(e,t)=>{Nd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function O_(e,t){return new C_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():oe.shallowClone(t)}})}a(O_,"prefault");var uf=A("ZodNonOptional",(e,t)=>{zd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ev(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function k_(e,t){return new uf({type:"nonoptional",innerType:e,...oe.normalizeParams(t)})}a(k_,"nonoptional");var $_=A("ZodSuccess",(e,t)=>{Ud.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function xA(e){return new $_({type:"success",innerType:e})}a(xA,"success");var D_=A("ZodCatch",(e,t)=>{Md.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Pv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function N_(e,t){return new D_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}a(N_,"_catch");var z_=A("ZodNaN",(e,t)=>{Ld.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>av(e,n,o,r)});function AA(e){return pp(z_,e)}a(AA,"nan");var lf=A("ZodPipe",(e,t)=>{qs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>wv(e,n,o,r),e.in=t.in,e.out=t.out});function Xc(e,t){return new lf({type:"pipe",in:e,out:t})}a(Xc,"pipe");var df=A("ZodCodec",(e,t)=>{lf.init(e,t),aa.init(e,t)});function IA(e,t,n){return new df({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}a(IA,"codec");var U_=A("ZodReadonly",(e,t)=>{jd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xv(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function M_(e){return new U_({type:"readonly",innerType:e})}a(M_,"readonly");var L_=A("ZodTemplateLiteral",(e,t)=>{Fd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sv(e,n,o,r)});function RA(e,t){return new L_({type:"template_literal",parts:e,...oe.normalizeParams(t)})}a(RA,"templateLiteral");var j_=A("ZodLazy",(e,t)=>{Vd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Iv(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});function F_(e){return new j_({type:"lazy",getter:e})}a(F_,"lazy");var B_=A("ZodPromise",(e,t)=>{qd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Av(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});function CA(e){return new B_({type:"promise",innerType:e})}a(CA,"promise");var q_=A("ZodFunction",(e,t)=>{Bd.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dv(e,n,o,r)});function OA(e){return new q_({type:"function",input:Array.isArray(e?.input)?v_(e?.input):e?.input??tu(pi()),output:e?.output??pi()})}a(OA,"_function");var iu=A("ZodCustom",(e,t)=>{Vs.init(e,t),Me.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lv(e,n,o,r)});function kA(e){let t=new at({check:"custom"});return t._zod.check=e,t}a(kA,"check");function $A(e,t){return $c(iu,e??(()=>!0),t)}a($A,"custom");function V_(e,t={}){return mp(iu,e,t)}a(V_,"refine");function G_(e){return hp(e)}a(G_,"superRefine");var DA=gp,NA=yp;function zA(e,t={}){let n=new iu({type:"custom",check:"custom",fn:a(o=>o instanceof e,"fn"),abort:!0,...oe.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}a(zA,"_instanceof");var UA=a((...e)=>vp({Codec:df,Boolean:Ea,String:va},...e),"stringbool");function MA(e){let t=F_(()=>of([Up(e),r_(),n_(),s_(),tu(t),__(Up(),t)]));return t}a(MA,"json");function LA(e,t){return Xc(sf(e),t)}a(LA,"preprocess");var oj={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 ij(e){yt({customError:e})}a(ij,"setErrorMap");function aj(){return yt().customError}a(aj,"getErrorMap");var H_;H_||(H_={});var ue={...Wc,...kp,iso:ga},sj=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 cj(e,t){let n=e.$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":t??"draft-2020-12"}a(cj,"detectVersion");function uj(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}a(uj,"resolveRef");function jA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ue.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return ue.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=uj(r,t),s=Gt(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return ue.null();if(r.length===0)return ue.never();if(r.length===1)return ue.literal(r[0]);if(r.every(s=>typeof s=="string"))return ue.enum(r);let i=r.map(s=>ue.literal(s));return i.length<2?i[0]:ue.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ue.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return jA(s,t)});return r.length===0?ue.never():r.length===1?r[0]:ue.union(r)}if(!n)return ue.any();let o;switch(n){case"string":{let r=ue.string();if(e.format){let i=e.format;i==="email"?r=r.check(ue.email()):i==="uri"||i==="uri-reference"?r=r.check(ue.url()):i==="uuid"||i==="guid"?r=r.check(ue.uuid()):i==="date-time"?r=r.check(ue.iso.datetime()):i==="date"?r=r.check(ue.iso.date()):i==="time"?r=r.check(ue.iso.time()):i==="duration"?r=r.check(ue.iso.duration()):i==="ipv4"?r=r.check(ue.ipv4()):i==="ipv6"?r=r.check(ue.ipv6()):i==="mac"?r=r.check(ue.mac()):i==="cidr"?r=r.check(ue.cidrv4()):i==="cidr-v6"?r=r.check(ue.cidrv6()):i==="base64"?r=r.check(ue.base64()):i==="base64url"?r=r.check(ue.base64url()):i==="e164"?r=r.check(ue.e164()):i==="jwt"?r=r.check(ue.jwt()):i==="emoji"?r=r.check(ue.emoji()):i==="nanoid"?r=r.check(ue.nanoid()):i==="cuid"?r=r.check(ue.cuid()):i==="cuid2"?r=r.check(ue.cuid2()):i==="ulid"?r=r.check(ue.ulid()):i==="xid"?r=r.check(ue.xid()):i==="ksuid"&&(r=r.check(ue.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?ue.number().int():ue.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=ue.boolean();break}case"null":{o=ue.null();break}case"object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[d,f]of Object.entries(i)){let h=Gt(f,t);r[d]=s.has(d)?h:h.optional()}if(e.propertyNames){let d=Gt(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?Gt(e.additionalProperties,t):ue.any();if(Object.keys(r).length===0){o=ue.record(d,f);break}let h=ue.object(r).passthrough(),g=ue.looseRecord(d,f);o=ue.intersection(h,g);break}if(e.patternProperties){let d=e.patternProperties,f=Object.keys(d),h=[];for(let m of f){let p=Gt(d[m],t),y=ue.string().regex(new RegExp(m));h.push(ue.looseRecord(y,p))}let g=[];if(Object.keys(r).length>0&&g.push(ue.object(r).passthrough()),g.push(...h),g.length===0)o=ue.object({}).passthrough();else if(g.length===1)o=g[0];else{let m=ue.intersection(g[0],g[1]);for(let p=2;p<g.length;p++)m=ue.intersection(m,g[p]);o=m}break}let u=ue.object(r);e.additionalProperties===!1?o=u.strict():typeof e.additionalProperties=="object"?o=u.catchall(Gt(e.additionalProperties,t)):o=u.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let s=r.map(d=>Gt(d,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?Gt(i,t):void 0;u?o=ue.tuple(s).rest(u):o=ue.tuple(s),typeof e.minItems=="number"&&(o=o.check(ue.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ue.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(d=>Gt(d,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?Gt(e.additionalItems,t):void 0;u?o=ue.tuple(s).rest(u):o=ue.tuple(s),typeof e.minItems=="number"&&(o=o.check(ue.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ue.maxLength(e.maxItems)))}else if(i!==void 0){let s=Gt(i,t),u=ue.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),o=u}else o=ue.array(ue.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}a(jA,"convertBaseSchema");function Gt(e,t){if(typeof e=="boolean")return e?ue.any():ue.never();let n=jA(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>Gt(f,t)),d=ue.union(u);n=o?ue.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>Gt(f,t)),d=ue.xor(u);n=o?ue.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:ue.any();else{let u=o?n:Gt(e.allOf[0],t),d=o?0:1;for(let f=d;f<e.allOf.length;f++)u=ue.intersection(u,Gt(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ue.nullable(n)),e.readOnly===!0&&(n=ue.readonly(n));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(r[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(r[u]=e[u]);for(let u of Object.keys(e))sj.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}a(Gt,"convertSchema");function FA(e,t){if(typeof e=="boolean")return e?ue.any():ue.never();let n=cj(e,t?.defaultTarget),o=e.$defs||e.definitions||{},r={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Nt};return Gt(e,r)}a(FA,"fromJSONSchema");var Z_={};hr(Z_,{bigint:()=>fj,boolean:()=>pj,date:()=>mj,number:()=>dj,string:()=>lj});function lj(e){return Ys(va,e)}a(lj,"string");function dj(e){return _c(ba,e)}a(dj,"number");function pj(e){return Sc(Ea,e)}a(pj,"boolean");function fj(e){return Tc(Sa,e)}a(fj,"bigint");function mj(e){return Ac(eu,e)}a(mj,"date");yt(Gs());var EY=pf.enum(["active","out_of_credits","rejected","unreachable"]);var BA=(o=>(o.AGENT_DECIDE="agent-decide",o.CHOOSE_YOURSELF="choose-yourself",o.LEAVE_EMPTY="leave-empty",o))(BA||{}),W_=(n=>(n.FILE="FILE",n.TABLE="TABLE",n))(W_||{}),K_=(o=>(o.SSE="sse",o.STREAMABLE_HTTP="streamable-http",o.SIMPLE_HTTP="http",o))(K_||{});var J_=(o=>(o.TEXT="text",o.NUMBER="number",o.BOOLEAN="boolean",o))(J_||{});var Y_=(n=>(n.IN_PROGRESS="in-progress",n.COMPLETED="completed",n))(Y_||{});var hj=O({mode:Se(BA),value:Re()}),gj=O({auth:q(S()),fields:Ce(S(),hj)}),yj=O({pieceName:S(),pieceVersion:S(),actionName:S(),predefinedInput:q(gj)}),vj=O({type:be("PIECE"),toolName:S().check(Tt(1)),pieceMetadata:yj}),_j=O({type:be("none")}),bj=O({type:be("access_token"),accessToken:S()}),Ej=O({type:be("api_key"),apiKey:S(),apiKeyHeader:S()}),Sj=O({type:be("headers"),headers:Ce(S(),S())}),Tj=To("type",[_j,bj,Ej,Sj]),qA=O({type:be("FLOW"),toolName:S().check(Tt(1)),externalFlowId:S(),flowDisplayName:q(S())}),VA=O({type:be("MCP"),toolName:S().check(Tt(1)),serverUrl:ax(),protocol:Se(K_),auth:Tj}),GA=O({type:be("KNOWLEDGE_BASE"),toolName:S().check(Tt(1)),sourceType:Se(W_),sourceId:S(),sourceName:S()}),Pj=To("type",[vj,qA,VA,GA]),wj=O({displayName:S(),description:q(S()),type:Se(J_)}),HA=O({type:be("MARKDOWN"),markdown:S()}),Ta={type:be("TOOL_CALL"),input:vt(Ce(S(),Re())),output:q(Re()),toolName:S(),status:Se(Y_),toolCallId:S(),startTime:S(),endTime:q(S())},KY=O(Ta),ZA=To("toolCallType",[O({...Ta,toolCallType:be("PIECE"),pieceName:S(),pieceVersion:S(),actionName:S()}),O({...Ta,toolCallType:be("FLOW"),displayName:S(),externalFlowId:S()}),O({...Ta,toolCallType:be("MCP"),displayName:S(),serverUrl:S()}),O({...Ta,toolCallType:be("KNOWLEDGE_BASE"),displayName:S(),sourceType:S()}),O({...Ta,toolCallType:be("UNKNOWN"),displayName:S()})]),xj=Ue([HA,ZA]);var Aj=10800*1e3,Ij=900*1e3;var Q_=(n=>(n.IMAGE="image",n.TEXT="text",n))(Q_||{}),Gn=O({apiKey:S()}),Cj=Gn,Oj=O({apiKey:S(),apiKeyHash:S()}),kj=Gn,$j=Gn,Dj=Gn,Nj=Gn,zj=Gn,Uj=Gn,Mj=Gn,YA=O({serviceAccountJson:S().check(Tt(1))}),XA=O({accessKeyId:S().check(Tt(1)),secretAccessKey:S().check(Tt(1))}),Lj=O({}),jj=O({}),Fj=O({}),Bj=O({}),qj=O({}),Vj=O({}),eb=O({modelId:S(),modelName:S(),modelType:Se(Q_)}),QA=O({apiKeyHeader:S(),baseUrl:S(),models:we(eb),defaultHeaders:q(Ce(S(),S())),apiStyle:q(Se(["chat","responses"]))}),eI=O({accountId:S(),gatewayId:S(),models:we(eb),vertexProject:q(S()),vertexRegion:q(S())}),tI=O({resourceName:S(),apiVersion:wo(Po(e=>typeof e=="string"&&e.trim().length===0?void 0:e),q(S()))}),rI=O({region:S().check(Tt(1))}),nI=O({project:S().check(Ft(/^[a-z0-9][a-z0-9-]{0,62}$/)),region:S().check(Ft(/^[a-z0-9][a-z0-9-]{0,62}$/)),models:we(eb)}),oI=O({}),Gj=Ue([Cj,Dj,Nj,zj,Uj,$j,kj,Oj,XA,YA,Mj]),iI=Ue([QA,eI,tI,nI,rI,Lj,Fj,Bj,qj,jj,Vj,oI]),Hj=O({id:S(),name:S(),type:Se(Q_)}),Zj=O({id:S(),name:S(),provider:Se(ha),config:iI,enabledForChat:Ze()}),Wj=O({provider:Se(ha),name:S(),enabledForChat:Ze(),keys:we(O({id:S(),name:S()}))}),Kj=O({provider:Se(ha),configId:S(),config:iI,auth:Gj,platformId:S()});var QY={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},WA=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Jj=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],aI=["claude-sonnet-4.6","claude-opus-4.7","claude-opus-4.8","claude-haiku-4.5"],X_=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.7-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Yj=["grok-4.20"],eX=aI.map(e=>`anthropic/${e}`),Xj={openai:WA,anthropic:Jj,google:X_,vertex:X_,activepieces:[...aI.map(e=>`anthropic/${e}`),...WA.map(e=>`openai/${e}`),...X_.map(e=>`google/${e}`),...Yj.map(e=>`x-ai/${e}`)]};var KA=128e3,Qj={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,vertex:1048576,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function eF({provider:e}){return e?Qj[e]??KA:KA}a(eF,"getMaxContextTokens");var JA={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"},tF={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},rF=new Set(["anthropic","mistral","xai","deepseek","zai","qwen","minimax","moonshot"]),nF={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 Bt(e){return{chatModels:Xj[e],maxContextTokens:eF({provider:e}),defaultEmbeddingModel:JA[e],supportsEmbedding:JA[e]!==void 0,supportsImageGeneration:!rF.has(e),webSearch:tF[e]}}a(Bt,"buildProviderCapabilities");var oF={openai:Bt("openai"),anthropic:Bt("anthropic"),openrouter:Bt("openrouter"),azure:Bt("azure"),google:Bt("google"),"cloudflare-gateway":Bt("cloudflare-gateway"),custom:Bt("custom"),bedrock:Bt("bedrock"),vertex:Bt("vertex"),mistral:Bt("mistral"),activepieces:Bt("activepieces"),xai:Bt("xai"),deepseek:Bt("deepseek"),zai:Bt("zai"),qwen:Bt("qwen"),minimax:Bt("minimax"),moonshot:Bt("moonshot")};var iF=O({base64Url:S(),fileName:S(),extension:q(S())}),aF=O({mimeType:S(),url:S(),fileName:q(S())}),tb=Ue([iF,aF]);var sF=Ue([O({type:be("file"),value:tb}),O({type:be("markdown"),value:S(),files:q(we(tb))})]),cF=O({sessionId:S(),message:S(),files:q(we(S()))});var cI=(n=>(n.ON_NEW_RECORD="ON_NEW_RECORD",n.ON_UPDATE_RECORD="ON_UPDATE_RECORD",n))(cI||{}),uI=(n=>(n.ENABLED="ENABLED",n.DISABLED="DISABLED",n))(uI||{}),rb=(o=>(o.RECORD_CREATED="RECORD_CREATED",o.RECORD_UPDATED="RECORD_UPDATED",o.RECORD_DELETED="RECORD_DELETED",o))(rb||{});var uF=Ue([O({...zr,name:S(),externalId:S(),type:be("STATIC_DROPDOWN"),tableId:S(),projectId:S(),data:O({options:we(O({value:S()}))})}),O({...zr,name:S(),externalId:S(),type:Ue([be("TEXT"),be("NUMBER"),be("DATE"),be("DATETIME")]),tableId:S(),projectId:S()})]),lF=O({...zr,name:S(),folderId:vt(S()),projectId:S(),externalId:S(),status:Mv(uI),trigger:Mv(cI)}),dF=O({...zr,tableId:S(),projectId:S(),cells:Ce(S(),O({updated:S(),created:S(),value:Re(),fieldName:S()}))}),pF=O({events:we(Se(rb)),webhookUrl:S(),flowId:S()}),fF=O({fields:we(O({id:S(),name:S()})),rows:we(Ce(S(),S())),name:S()}),mF=O({projectId:S(),limit:q(Uc.number()),cursor:q(S()),name:q(S()),externalIds:Cp(S()),folderId:q(S()),folderIds:Cp(S())}),hF=O({records:we(we(O({fieldId:S(),value:dI()}))),tableId:S()}),gF=O({cells:q(we(O({fieldId:S(),value:dI()}))),tableId:S(),agentUpdate:q(Ze())}),lI=To("operator",[mi("eq"),mi("neq"),mi("gt"),mi("gte"),mi("lt"),mi("lte"),mi("co"),sI("exists"),sI("not_exists")]),yF=O({tableId:S(),limit:q(Uc.number()),cursor:q(S()),filters:Cp(lI)});function dI(){return wo(Po(e=>e==null?e:String(e)),zc(S()))}a(dI,"coerceToString");function mi(e){return O({fieldId:S(),operator:be(e),value:S()})}a(mi,"valueFilter");function sI(e){return O({fieldId:S(),operator:be(e)})}a(sI,"existenceFilter");var vF=O({status:q(zt()),body:q(Re()),headers:q(Ce(S(),S()))}),_F=O({...zr,deleted:vt(Ao),ownerId:S(),displayName:S(),platformId:S(),externalId:vt(S())});var pI=O({name:S(),description:q(S()),type:S(),required:Ze()}),bF=O({pieceName:S(),triggerName:S(),input:O({toolName:S(),toolDescription:S(),inputSchema:we(pI),returnsResponse:Ze()})});var fI="^[0-9]+\\.[0-9]+\\.[0-9]+$",_X=new RegExp(fI),SF="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",bX=S().check(Ft(new RegExp(fI))),EX=S().check(Ft(new RegExp(SF))),TF=O({packageType:be("ARCHIVE"),pieceType:Se(pa),pieceName:S(),pieceVersion:S(),archiveId:S(),platformId:S()}),mI=O({packageType:be("REGISTRY"),pieceType:be("OFFICIAL"),pieceName:S(),pieceVersion:S()}),hI=O({packageType:be("REGISTRY"),pieceType:be("CUSTOM"),pieceName:S(),pieceVersion:S(),platformId:S()}),SX=Ue([mI,hI]),TX=Ue([TF,mI,hI]);var PF=To("type",[O({type:be("CRON_EXPRESSION"),cronExpression:S(),timezone:S()}),O({type:be("INTERVAL"),intervalMs:sx().check(Ct(6e4))})]),PX=O({...zr,type:Se(or),projectId:S(),flowId:S(),triggerName:S(),schedule:vt(PF),flowVersionId:S(),pieceName:S(),pieceVersion:S(),deleted:vt(S()),simulate:Ze()}),gI=(b=>(b.UNKNOWN="UNKNOWN",b.FLOW_RUN_LOG="FLOW_RUN_LOG",b.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",b.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",b.FLOW_STEP_FILE="FLOW_STEP_FILE",b.SAMPLE_DATA="SAMPLE_DATA",b.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",b.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",b.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",b.PROJECT_RELEASE="PROJECT_RELEASE",b.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",b.PLATFORM_ASSET="PLATFORM_ASSET",b.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",b.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",b.KNOWLEDGE_BASE="KNOWLEDGE_BASE",b.FLOW_BUNDLE="FLOW_BUNDLE",b.PREWARM_SCOPE="PREWARM_SCOPE",b))(gI||{}),yI=(n=>(n.NONE="NONE",n.ZSTD="ZSTD",n))(yI||{}),vI=(n=>(n.S3="S3",n.DB="DB",n))(vI||{}),wX=O({...zr,projectId:vt(S()),platformId:vt(S()),type:Se(gI),compression:Se(yI),data:q(Re()),location:Se(vI),size:vt(zt()),fileName:vt(S()),s3Key:vt(S()),metadata:vt(Ce(S(),S()))}),_I=(o=>(o.ADMIN="ADMIN",o.MEMBER="MEMBER",o.OPERATOR="OPERATOR",o))(_I||{}),bI=(n=>(n.ACTIVE="ACTIVE",n.INACTIVE="INACTIVE",n))(bI||{}),xX=O({id:S(),email:S(),firstName:S(),status:Se(bI),externalId:vt(S()),platformId:vt(S()),platformRole:Se(_I),lastName:S(),created:Ao,updated:Ao,lastActiveDate:vt(Ao),imageUrl:vt(S())});var ob=O({...Ge.shape,...Oe(Ce(S(),Re()),"OBJECT").shape});var ib=O({...Ge.shape,formatProperty:q(S()),...Oe(S(),"RICH_TEXT").shape});var TI=O({...Ge.shape,...Oe(S(),"COLOR").shape});var ab=Ue([vr,Fn,ib,Ap,qn,_r,Bn,kv,Mc,Dv,Vn,Fc,ob,Bc,jc,$v,Lc,TI]),V={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},RichText(e){return{...e,valueSchema:void 0,type:"RICH_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},DateRange(e){return{...e,valueSchema:void 0,type:"DATE_RANGE"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var mn=O({displayName:S(),description:q(S()),hasConnectionIdentifier:q(Ze())});var PI=O({username:S(),password:S()}),sb=O({...mn.shape,username:O({displayName:S(),description:q(S())}),password:O({displayName:S(),description:q(S())}),...Oe(PI,"BASIC_AUTH").shape});var IF=Ce(S(),Ue([vr,Fn,Vn,qn,_r])),cb=O({...mn.shape,props:IF,...Oe(Re(),"CUSTOM_AUTH").shape});var hi=O({...mn.shape,...Oe(O({auth:S()}),"SECRET_TEXT").shape});var RF=Ce(S(),Ue([vr,Fn,hi,Vn,qn,_r,Bn,Ap])),wI=O({...mn.shape,props:RF,...Oe(Re(),"OIDC").shape});var ub=(n=>(n.HEADER="HEADER",n.BODY="BODY",n))(ub||{}),xI=Ue([vr,hi,_r]),AI=Ce(S(),xI),CF=O({props:q(Ce(S(),xI)),authUrl:S(),tokenUrl:S(),scope:we(S()),prompt:q(Ue([be("none"),be("consent"),be("login"),be("omit")])),pkce:q(Ze()),pkceMethod:q(Ue([be("plain"),be("S256")])),authorizationMethod:q(Se(ub)),grantType:q(Ue([Se(Vc),be(Nv)])),extra:q(Ce(S(),S()))}),II=O({access_token:S(),props:q(AI),data:Ce(S(),Nc())}),lb=O({...mn.shape,...CF.shape,...Oe(II,"OAUTH2").shape});var Pa=Ue([sb,cb,wI,lb,hi]),au="Connection",ff={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||au}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||au,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||au}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||au}},None(){}};var uQ={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 OF=O({...Ge.shape,...Oe(Re(),"CUSTOM").shape,code:S()});var kF=Ue([ab,Pa]),db=Ce(S(),kF),CQ=Ce(S(),ab);var RI=Ue([O({strategy:be("CRON"),cronExpression:S()}),O({strategy:be("NONE")})]),wa=class{constructor(t,n,o,r,i,s,u,d,f,h,g,m,p,y,v,E,b,k,N,Z,H){this.name=t;this.displayName=n;this.description=o;this.requireAuth=r;this.props=i;this.type=s;this.handshakeConfiguration=u;this.onHandshake=d;this.renewConfiguration=f;this.onRenew=h;this.onEnable=g;this.onDisable=m;this.onStart=p;this.run=y;this.test=v;this.sampleData=E;this.testStrategy=b;this.outputSchema=k;this.aiMetadata=N;this.classification=Z;this.propertyGroups=H}static{a(this,"ITrigger")}},ar=a(e=>{switch(e.type){case"WEBHOOK":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"POLLING":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"MANUAL":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups);case"APP_WEBHOOK":return new wa(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,dt(e.sampleData)&&dt(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata,e.classification,e.propertyGroups)}},"createTrigger");var CI="2",mf="0.82.0";var pb=class{constructor(t,n,o,r,i,s,u,d,f=mf,h,g="",m){this.displayName=t;this.logoUrl=n;this.authors=o;this.events=r;this.categories=u;this.auth=d;this.minimumSupportedRelease=f;this.maximumSupportedRelease=h;this.description=g;this.deprecated=m;this._actions={};this._triggers={};this.getContextInfo=a(()=>({version:CI}),"getContextInfo");(!DF(f)||NF(f,mf))&&(this.minimumSupportedRelease=mf),i.forEach(p=>this._actions[p.name]=p),s.forEach(p=>this._triggers[p.name]=p)}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:$F(this.auth),minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},kI=a(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.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 pb(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function $F(e){if(e!==void 0)return Array.isArray(e)?e.map(OI):OI(e)}a($F,"withConnectionIdentifierFlag");function OI(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}a(OI,"flagConnectionIdentifier");function DF(e){return/^\d+\.\d+\.\d+$/.test(e)}a(DF,"isValidSimpleSemver");function NF(e,t){let[n,o,r]=e.split(".").map(Number),[i,s,u]=t.split(".").map(Number);return n!==i?n<i:o!==s?o<s:r<u}a(NF,"isSemverLessThan");var zF=q(Ce(S(),Ce(S(),S()))),$I=O({id:q(S()),name:S(),displayName:S(),logoUrl:S(),description:S(),authors:we(S()),platformId:q(S()),directoryPath:q(S()),auth:q(Ue([Pa,we(Pa)])),version:S(),categories:q(we(Se(fa))),minimumSupportedRelease:q(S()),maximumSupportedRelease:q(S()),deprecated:q(Ze()),i18n:zF}),UF=Se(["human","ai","both"]),DI=O({description:q(S()),idempotent:q(Ze())}),NI=Se(["READ","SEARCH","WRITE","DESTRUCTIVE"]);var MF=Se(["tabs","section","summary","builder","footer"]),zI=O({key:S(),display:MF,label:q(S()),description:q(S()),icon:q(S()),props:we(S())}),UI=O({name:S(),displayName:S(),description:S(),props:db,propertyGroups:q(we(zI)),requireAuth:Ze(),errorHandlingOptions:q(Ov),outputSchema:q(wp()),audience:q(UF),aiMetadata:q(DI),classification:q(NI)}),MI=O({name:S(),displayName:S(),description:S(),props:db,propertyGroups:q(we(zI)),errorHandlingOptions:q(Ov),type:Se(or),sampleData:Re(),handshakeConfiguration:q(wp()),renewConfiguration:q(RI),testStrategy:Se(Hc),outputSchema:q(wp()),aiMetadata:q(DI),classification:q(NI)}),LF=O({...$I.shape,actions:Ce(S(),UI),triggers:Ce(S(),MI)}),jF=O({...$I.shape,actions:zt(),triggers:zt(),suggestedActions:q(we(UI)),suggestedTriggers:q(we(MI))}),LI=O({projectUsage:zt(),pieceType:Se(pa),packageType:Se(qc),platformId:q(S()),archiveId:q(S())}),$ee=O({...LF.shape,...LI.shape}),Dee=O({...jF.shape,...LI.shape}),Nee=O({name:S(),version:S()});var FF=Ke(require("path")),BF=Ke(require("fs/promises"));var xa=require("node:stream");var hf=class{constructor(t,n){this.baseUrl=t;this.authenticationConverter=n}static{a(this,"BaseHttpClient")}getUrl(t){let n=new URL(`${this.baseUrl}${t.url}`),o=`${n.origin}${n.pathname}`,r=new URLSearchParams;return n.searchParams.forEach((i,s)=>{r.append(s,i)}),{urlWithoutQueryParams:o,queryParams:r}}getHeaders(t){let n={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,n),t.body&&(t.headers?.["Content-Type"]==="text/csv"?n["Content-Type"]="text/csv":n["Content-Type"]="application/json"),t.headers&&(n={...n,...t.headers}),n}populateAuthentication(t,n){this.authenticationConverter.convert(t,n)}};var gf=class{static{a(this,"DelegatingAuthenticationConverter")}constructor(t=new fb,n=new mb){this.converters={BEARER_TOKEN:t,BASIC:n}}convert(t,n){return this.converters[t.type].convert(t,n)}},fb=class{static{a(this,"BearerTokenAuthenticationConverter")}convert(t,n){return n.Authorization=`Bearer ${t.token}`,n}},mb=class{static{a(this,"BasicTokenAuthenticationConverter")}convert(t,n){let o=`${t.username}:${t.password}`,r=Buffer.from(o).toString("base64");return n.Authorization=`Basic ${r}`,n}};var su=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 jI({error:e,requestBody:t}){return e instanceof su?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}a(jI,"toFailsafeOutput");var Ht=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(Ht||{});var yf=class extends hf{static{a(this,"FetchHttpClient")}constructor(t="",n=new gf){super(t,n)}async sendRequest(t,n){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:o,queryParams:r}=this.getUrl(t),i=this.getHeaders(t),s=t.queryParams??{};for(let[N,Z]of Object.entries(s))r.append(N,Z);let u=r.toString(),d=u?`${o}?${u}`:o,f=t.responseType??"json",h=t.followRedirects??!0,g=t.retries??0,{body:m,extraHeaders:p,isStream:y}=vf(t.method)?qF(t.body,i):{body:void 0,extraHeaders:{},isStream:!1},v=GF({...i,...p}),E=await VF(async()=>{let N=new AbortController,Z=t.timeout&&t.timeout>0?setTimeout(()=>N.abort(),t.timeout):void 0;try{let H={method:t.method.toString(),headers:v,body:m,redirect:h?"follow":"manual",signal:N.signal};return y&&(H.duplex="half"),n?.dispatcher!==void 0&&(H.dispatcher=n.dispatcher),await fetch(d,H)}finally{Z!==void 0&&clearTimeout(Z)}},y?0:g),b=h?300:400;if(E.status<200||E.status>=b){let N=await FI(E,f==="stream"?"text":f),Z=new su(t.body,{status:E.status,responseBody:N});throw console.error("[HttpClient#(sanitized error message)] Request failed:",Z),Z}let k=await FI(E,f);return{status:E.status,headers:HF(E.headers),body:k}}};function vf(e){return e!=="GET"&&e!=="HEAD"}a(vf,"acceptsRequestBody");function qF(e,t){if(qI(e))return{body:void 0,extraHeaders:{},isStream:!1};if(WF(e)){let o=ZF(e);if(o!==null)return{body:o,extraHeaders:e.getHeaders(),isStream:!1};let r=new xa.PassThrough;return e.on("error",i=>r.destroy(i)),e.pipe(r),{body:r,extraHeaders:e.getHeaders(),isStream:!0}}return e instanceof xa.Readable?{body:e,extraHeaders:{},isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}a(qF,"serializeBody");async function FI(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"stream":return qI(e.body)?xa.Readable.from([]):xa.Readable.fromWeb(e.body);case"blob":return await e.blob();case"text":return await e.text();default:{let n=await e.text();if(n.length===0)return;try{return JSON.parse(n)}catch{return n}}}}a(FI,"parseResponseBody");async function VF(e,t){let n;for(let o=0;o<=t;o++)try{let r=await e();if(r.status>=500&&o<t){await BI(o);continue}return r}catch(r){if(n=r,o<t){await BI(o);continue}throw r}throw n}a(VF,"sendWithRetries");function BI(e){let t=Math.min(1e3*2**e,3e4);return new Promise(n=>setTimeout(n,t))}a(BI,"backoff");function GF(e){let t=new Map;for(let[n,o]of Object.entries(e))o!==void 0&&t.set(n.toLowerCase(),[n,Array.isArray(o)?o.join(", "):o]);return Object.fromEntries(t.values())}a(GF,"normalizeHeaders");function HF(e){let t={};return e.forEach((n,o)=>{t[o]=n}),t}a(HF,"toHttpHeaders");function ZF(e){if(!e.hasKnownLength()||e.getLengthSync()>KF)return null;let{data:t}=zv(()=>e.getBuffer());return t}a(ZF,"bufferFormDataIfSafe");function WF(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}a(WF,"isNodeFormData");function qI(e){return e==null}a(qI,"isNil");var KF=100*1024*1024;var Be=new yf;var zq=Ke(require("fs")),ZC=Ke(HC());var Uq={"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 Mq(e){let t=e.split(";")[0].trim().toLowerCase();return Uq[t]??""}a(Mq,"contentTypeToExtension");var Lq=a(({baseUrl:e,relativePath:t})=>{let n=e.endsWith("/")?e:`${e}/`,o=t.startsWith("/")?t.slice(1):t;return`${n}${o}`},"joinBaseUrlWithRelativePath"),jq=a((e,t)=>{let n="https://api.example.com";try{let o=t?e(t):void 0;return(o?.endsWith("/")?o.slice(0,-1):o)??n}catch{return n}},"getBaseUrlForDescription");function WC({auth:e,baseUrl:t,authMapping:n,description:o,displayName:r,name:i,props:s,extraProps:u,authLocation:d="headers",classification:f="WRITE"}){return Pe({audience:"human",name:i||"custom_api_call",classification:f,displayName:r||"Custom API Call",description:o||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:V.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:a(async({auth:h})=>({url:V.ShortText({displayName:"URL",description:`Full URL, or a path relative to ${jq(t,h)}`,required:!0,placeholder:"/resource",defaultValue:h?t(h):"",...s?.url??{}})}),"props")}),method:V.StaticDropdown({displayName:"Method",required:!0,defaultValue:"GET",options:{options:Object.values(Ht).map(h=>({label:h,value:h}))},...s?.method??{}}),headers:V.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!1,...s?.headers??{}}),queryParams:V.Object({displayName:"Query Parameters",description:"Appended to the URL as ?key=value.",required:!1,...s?.queryParams??{}}),body_type:V.Dropdown({auth:e,displayName:"Body Type",required:!1,defaultValue:"none",refreshers:["method"],options:a(async({method:h})=>vf(h)?{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:V.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type","method"],required:!1,props:a(async({body_type:h,method:g})=>{if(!h||!vf(g))return{};let m=h,p={};switch(m){case"none":break;case"json":p.data=V.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":p.data=V.LongText({displayName:"Raw Body",required:!0});break;case"form_data":p.data=V.Array({displayName:"Form Data",required:!0,properties:{fieldName:V.ShortText({displayName:"Field Name",required:!0}),fieldType:V.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:V.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:V.File({displayName:"File Field Value",required:!1})}});break}return p},"props")}),response_is_binary:V.Checkbox({displayName:"Response is Binary",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1,advanced:!0,...s?.response_is_binary??{}}),failsafe:V.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:V.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:V.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 h=>{let{method:g,url:m,headers:p,queryParams:y,body:v,body_type:E,failsafe:b,timeout:k,response_is_binary:N,followRedirects:Z}=h.propsValue;Rp(g,"Method"),Rp(m,"URL");let H=dt(n)?{}:await n(h.auth,h.propsValue),K=m.url,ee=K.startsWith("http://")||K.startsWith("https://")?K:Lq({baseUrl:t(h.auth),relativePath:K}),se={method:g,url:ee,headers:{...p??{},...d==="headers"||!dt(d)?H:{}},queryParams:{...d==="queryParams"?H:{},...y??{}},timeout:k?k*1e3:0,followRedirects:Z};if(N&&(se.responseType="arraybuffer"),v)if(E&&E!=="none"){let Q=v.data;if(E==="form_data"){let Le=Q,ce=new ZC.default;for(let{fieldName:J,fieldType:W,textFieldValue:ne,fileFieldValue:X}of Le)W==="text"&&!Zc(ne)?ce.append(J,ne):W==="file"&&!Zc(X)&&ce.append(J,X.data,{filename:X?.filename});se.body=ce,se.headers={...se.headers,...ce.getHeaders()}}else se.body=Q}else E||(se.body=v);try{let Q=await Be.sendRequest(se);return await Fq(h.files,Q.body,Q.status,Q.headers,N)}catch(Q){if(b)return jI({error:Q,requestBody:se.body});throw Q}},"run")})}a(WC,"createCustomApiCallAction");var Fq=a(async(e,t,n,o,r)=>{let i;if(r&&Bq(t)){let s=Array.isArray(o?.["content-type"])?o["content-type"][0]:o?.["content-type"],u=Mq(s??"")||"txt",d;t instanceof ArrayBuffer?d=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?d=t:d=Buffer.from(t),i=await e.write({fileName:`output.${u}`,data:d})}else i=t;return{status:n,headers:o,body:i}},"handleBinaryResponse"),Bq=a(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var nt={async poll(e,{store:t,auth:n,propsValue:o,maxItemsToPoll:r,files:i,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(dt(u))throw new Error("lastPoll doesn't exist in the store.");let d=await e.items({store:t,auth:n,propsValue:o,lastFetchEpochMS:u,server:s}),f=d.reduce((h,g)=>Math.max(h,g.epochMilliSeconds),u);return await t.put("lastPoll",f),d.filter(h=>h.epochMilliSeconds>u).map(h=>h.data)}case 1:{let u=await t.get("lastItem"),d=await e.items({store:t,auth:n,propsValue:o,lastItemId:u,files:i,server:s}),f=d.findIndex(m=>m.id===u),h=[];dt(u)||f==-1?h=d??[]:h=d?.slice(0,f)??[],dt(r)||(h=h.slice(-r));let g=h?.[0]?.id;return dt(g)||await t.put("lastItem",g),h.map(m=>m.data)}}},async onEnable(e,{store:t,auth:n,propsValue:o,server:r,isRepublish:i}){switch(e.strategy){case 0:{if(i&&!dt(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(i&&!dt(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:n,propsValue:o,lastItemId:null,server:r}))?.[0]?.id;dt(u)?await t.delete("lastItem"):await t.put("lastItem",u);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:n,store:o,files:r,server:i}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:o,auth:t,propsValue:n,lastFetchEpochMS:0,server:i});break}case 1:{s=await e.items({store:o,auth:t,propsValue:n,lastItemId:null,files:r,server:i});break}}return qq(s.map(u=>u.data))}};function qq(e){return e.length<=5?e:e.slice(0,5)}a(qq,"getFirstFiveOrAll");var KC=require("crypto");async function zb(e,t){let n={method:"POST",url:`${fe.baseUrl}/channels/stop`,body:{id:e?.id,resourceId:e?.resourceId},authentication:{type:"BEARER_TOKEN",token:await $e(t)}};await Be.sendRequest(n)}a(zb,"stopWatchEvent");async function Ub(e,t,n){let o=Date.now()+5184e5,r={method:"POST",url:`${fe.baseUrl}/calendars/${e}/events/watch`,body:{id:(0,KC.randomUUID)(),type:"web_hook",address:t,expiration:o.toString()},authentication:{type:"BEARER_TOKEN",token:await $e(n)}},{body:i}=await Be.sendRequest(r);return i}a(Ub,"watchEvent");async function Af({calendarId:e,authProp:t}){let n=await $e(t),o={singleEvents:"true",showDeleted:"true",maxResults:"2500"},r="",i;do{r&&(o.pageToken=r);let s={method:"GET",url:`${fe.baseUrl}/calendars/${e}/events`,queryParams:o,authentication:{type:"BEARER_TOKEN",token:n}},{body:u}=await Be.sendRequest(s);r=u.nextPageToken,i=u.nextSyncToken}while(r);return i}a(Af,"getInitialSyncToken");async function JC({calendarId:e,syncToken:t,authProp:n}){let o=await $e(n),r={syncToken:t,maxResults:"2500"},i="",s,u=[];do{i&&(r.pageToken=i);let d={method:"GET",url:`${fe.baseUrl}/calendars/${e}/events`,queryParams:r,authentication:{type:"BEARER_TOKEN",token:o}};try{let{body:f}=await Be.sendRequest(d);f.items?.length>0&&(u=[...u,...f.items]),i=f.nextPageToken,s=f.nextSyncToken}catch(f){if(f?.response?.status===410)return{items:[],nextSyncToken:void 0,syncTokenInvalid:!0};throw f}}while(i);return{items:u,nextSyncToken:s,syncTokenInvalid:!1}}a(JC,"listEventsWithSyncToken");async function Zt(e,t){let n={showDeleted:"false"};t&&(n.minAccessRole=t);let o={method:"GET",url:`${fe.baseUrl}/users/me/calendarList`,queryParams:n,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};return(await Be.sendRequest(o)).body.items}a(Zt,"getCalendars");async function If(e){let t={method:"GET",url:`${fe.baseUrl}/colors`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};return(await Be.sendRequest(t)).body}a(If,"getColors");async function pu(e,t,n,o){let r=new Date,i=new Date;i.setDate(r.getDate()-1);let s={updatedMin:o?.toISOString()??i.toISOString(),maxResults:"2500",orderBy:"updated",singleEvents:t?"true":"false",showDeleted:"true"},u=await $e(n),d={method:"GET",url:`${fe.baseUrl}/calendars/${e}/events`,queryParams:s,authentication:{type:"BEARER_TOKEN",token:u}},f=[],h="";do{s.pageToken=h;let{body:g}=await Be.sendRequest(d);g.items.length>0&&(f=[...f,...g.items]),h=g.nextPageToken}while(h);return f}a(pu,"getEvents");async function YC(e,t){return(await pu(e,!1,t)).pop()}a(YC,"getLatestEvent");async function XC(e,t,n=50){if(!t)return[];try{let o=new Date,r=new Date;r.setDate(o.getDate()+30);let i={singleEvents:"true",orderBy:"startTime",timeMin:o.toISOString(),timeMax:r.toISOString(),maxResults:n.toString(),showDeleted:"false"},s={method:"GET",url:`${fe.baseUrl}/calendars/${encodeURIComponent(t)}/events`,queryParams:i,authentication:{type:"BEARER_TOKEN",token:await $e(e)}},u=await Be.sendRequest(s);return!u.body.items||u.body.items.length===0?[]:u.body.items.map(d=>{let f=d.start?.dateTime||d.start?.date||"",h=f?new Date(f).toLocaleDateString():"",g=f?new Date(f).toLocaleTimeString():"",m=d.summary||"Untitled Event";return h&&(m+=` (${h}`,d.start?.dateTime&&(m+=` at ${g}`),m+=")"),{label:m,value:d.id||""}}).filter(d=>d.value!=="")}catch(o){return console.error("Error fetching events for dropdown:",o),[]}}a(XC,"getEventsForDropdown");var Gm=Ke(Vu());var rT=["https://www.googleapis.com/auth/calendar.events","https://www.googleapis.com/auth/calendar.readonly","email"],le=[ff.OAuth2({description:"",authUrl:"https://accounts.google.com/o/oauth2/auth",tokenUrl:"https://oauth2.googleapis.com/token",required:!0,pkce:!0,scope:rT}),ff.CustomAuth({displayName:"Service Account (Advanced)",description:"Authenticate via service account from https://console.cloud.google.com/ > IAM & Admin > Service Accounts > Create Service Account > Keys > Add key. <br> <br> You can optionally use domain-wide delegation (https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client) to access calendars without adding the service account to each one. <br> <br> **Note:** Without a user email, the service account only has access to calendars you explicitly share with it.",required:!0,props:{serviceAccount:V.ShortText({displayName:"Service Account JSON Key",required:!0}),userEmail:V.ShortText({displayName:"User Email",required:!1,description:"Email address of the user to impersonate for domain-wide delegation."})},validate:a(async({auth:e})=>{try{await $e({type:"CUSTOM_AUTH",props:{...e}})}catch(t){return{valid:!1,error:t.message}}return{valid:!0}},"validate")})];async function At(e){if(e.type==="CUSTOM_AUTH"){let n=JSON.parse(e.props.serviceAccount);return new Gm.JWT({email:n.client_email,key:n.private_key,scopes:rT,subject:e.props.userEmail})}let t=new Gm.OAuth2Client;return t.setCredentials(e),t}a(At,"createGoogleClient");var $e=a(async e=>{if(e.type==="CUSTOM_AUTH"){let n=await(await At(e)).getAccessToken();if(n.token)return n.token;throw new Error("Could not retrieve access token from service account json")}return e.access_token},"getAccessToken");var fe={baseUrl:"https://www.googleapis.com/calendar/v3",calendarDropdown:a(e=>V.Dropdown({auth:le,displayName:"Calendar",refreshers:[],required:!0,options:a(async({auth:t})=>t?{disabled:!1,options:(await Zt(t,e)).map(r=>({label:r.summary,value:r.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"calendarDropdown"),eventDropdown:a((e=!1)=>V.Dropdown({displayName:"Event",refreshers:["calendar_id"],required:e,auth:le,options:a(async({auth:t,calendar_id:n})=>t?n?{disabled:!1,options:await XC(t,n)}:{disabled:!0,placeholder:"Please select a calendar first",options:[]}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),"eventDropdown"),colorId:V.Dropdown({auth:le,displayName:"Color",refreshers:[],required:!1,options:a(async({auth:e})=>{if(!e)return{disabled:!0,placeholder:"Please connect your account first",options:[]};let t=await If(e);return{disabled:!1,options:Object.entries(t.event).map(([n,o])=>({label:o.background,value:n}))}},"options")})};var ph=Ke(Xn()),CN=Ke(ro()),ON=require("crypto");var tt={fields:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"start",label:"Start",children:[{key:"dateTime",label:"Start Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",children:[{key:"dateTime",label:"End Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]},_N={fields:[{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"id",label:"Calendar ID"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"isOwned",label:"Is Owned",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"isShared",label:"Is Shared",format:"boolean"},{key:"calendarType",label:"Calendar Type"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"},{key:"colorId",label:"Color ID"}]},lh={fields:[{key:"status",label:"Status Code"},{key:"summary",label:"Calendar Summary",value:"body.summary"},{key:"timeZone",label:"Time Zone",value:"body.timeZone"},{key:"accessRole",label:"Access Role",value:"body.accessRole"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"items",label:"Events",value:"body.items",labelKey:"summary",listItems:[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"eventType",label:"Event Type"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"creatorEmail",label:"Creator Email",value:"creator.email",format:"email"},{key:"organizerEmail",label:"Organizer Email",value:"organizer.email",format:"email"},{key:"created",label:"Created",format:"datetime"},{key:"updated",label:"Updated",format:"datetime"},{key:"iCalUID",label:"iCal UID"}]}]},bN={fields:[{key:"summary",label:"Summary",value:"body.summary"},{key:"status",label:"Status",value:"body.status"},{key:"id",label:"Event ID",value:"body.id"},{key:"htmlLink",label:"Event Link",value:"body.htmlLink",format:"url"},{key:"created",label:"Created",value:"body.created",format:"datetime"},{key:"updated",label:"Updated",value:"body.updated",format:"datetime"},{key:"start",label:"Start",value:"body.start",children:[{key:"dateTime",label:"Start Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"end",label:"End",value:"body.end",children:[{key:"dateTime",label:"End Date/Time",format:"datetime"},{key:"timeZone",label:"Time Zone"}]},{key:"creator",label:"Creator",value:"body.creator",children:[{key:"email",label:"Email",format:"email"}]},{key:"organizer",label:"Organizer",value:"body.organizer",children:[{key:"email",label:"Email",format:"email"}]},{key:"eventType",label:"Event Type",value:"body.eventType"},{key:"iCalUID",label:"iCal UID",value:"body.iCalUID"}]},EN={fields:[{key:"summary",label:"Name"},{key:"id",label:"Calendar ID"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"}]};var SN={fields:[{key:"calendar",label:"Calendar Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]},{key:"event",label:"Event Colors",dynamicKey:!0,children:[{key:"background",label:"Background Color"},{key:"foreground",label:"Foreground Color"}]}]},TN={fields:[{key:"calendars",label:"Calendars",labelKey:"summary",listItems:[{key:"id",label:"Calendar ID"},{key:"summary",label:"Name"},{key:"description",label:"Description"},{key:"location",label:"Location"},{key:"timeZone",label:"Time Zone"},{key:"accessRole",label:"Access Role"},{key:"primary",label:"Primary",format:"boolean"},{key:"selected",label:"Selected",format:"boolean"},{key:"backgroundColor",label:"Background Color"},{key:"foregroundColor",label:"Foreground Color"}]},{key:"count",label:"Count",format:"number"}]},PN={fields:[{key:"items",label:"Settings",labelKey:"id",listItems:[{key:"id",label:"Setting ID"},{key:"value",label:"Value"}]},{key:"count",label:"Count",format:"number"}]},wN={fields:[{key:"removed",label:"Removed",format:"boolean"},{key:"attendee_email",label:"Attendee Email",format:"email"},{key:"message",label:"Message"},{key:"event",label:"Event",children:tt.fields}]},xN={fields:[{key:"free_slots",label:"Free Slots",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"},{key:"duration_minutes",label:"Duration (Minutes)",format:"number"}]},{key:"count",label:"Count",format:"number"}]},$W=[{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Instance Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"},{key:"originalStartDateTime",label:"Original Start",value:"originalStartTime.dateTime",format:"datetime"}],AN={fields:[{key:"instances",label:"Instances",labelKey:"summary",listItems:$W},{key:"count",label:"Count",format:"number"},{key:"nextPageToken",label:"Next Page Token"}]},IN={fields:[{key:"moved",label:"Moved",format:"boolean"},{key:"already_in_destination",label:"Already in Destination",format:"boolean"},{key:"event",label:"Event",children:tt.fields}]},RN={fields:[{key:"events",label:"Events",labelKey:"summary",listItems:[{key:"calendarId",label:"Calendar ID"},{key:"summary",label:"Title"},{key:"status",label:"Status"},{key:"id",label:"Event ID"},{key:"htmlLink",label:"Event Link",format:"url"},{key:"startDateTime",label:"Start",value:"start.dateTime",format:"datetime"},{key:"endDateTime",label:"End",value:"end.dateTime",format:"datetime"}]},{key:"count",label:"Count",format:"number"},{key:"calendars_searched",label:"Calendars Searched",format:"number"},{key:"warning",label:"Warning"}]},dh={fields:[{key:"timeMin",label:"Time Min",format:"datetime"},{key:"timeMax",label:"Time Max",format:"datetime"},{key:"calendars",label:"Calendars",dynamicKey:!0,children:[{key:"busy",label:"Busy Periods",labelKey:"start",listItems:[{key:"start",label:"Start",format:"datetime"},{key:"end",label:"End",format:"datetime"}]}]}]};var FT={calendar_id:fe.calendarDropdown("writer"),title:V.ShortText({displayName:"Title of the event",required:!0}),start_date_time:V.DateTime({displayName:"Start date time of the event",required:!0}),end_date_time:V.DateTime({displayName:"End date time of the event",description:"By default it'll be 30 min post start time",required:!1}),location:V.ShortText({displayName:"Location",required:!1}),description:V.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:fe.colorId,attendees:V.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:V.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:V.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:V.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1}),send_notifications:V.StaticDropdown({displayName:"Send Notifications",defaultValue:"all",options:{options:[{label:"Yes, to everyone",value:"all"},{label:"To non-Google Calendar guests only",value:"externalOnly"},{label:"To no one",value:"none"}]},required:!0}),create_meet_link:V.Checkbox({displayName:"Create Google Meet Link",description:"Automatically create a Google Meet video conference link for this event",defaultValue:!1,required:!1})};async function BT(e){let{calendar_id:t,title:n,start_date_time:o,end_date_time:r,location:i,description:s,colorId:u,guests_can_modify:d,guests_can_invite_others:f,guests_can_see_other_guests:h,create_meet_link:g}=e.propsValue,m={dateTime:(0,ph.default)(o).format("YYYY-MM-DDTHH:mm:ss.sssZ")},p=r||(0,ph.default)(o).add(30,"m"),y={dateTime:(0,ph.default)(p).format("YYYY-MM-DDTHH:mm:ss.sssZ")},v=e.propsValue.attendees,E=e.propsValue.send_notifications,b=[];if(v)for(let K of v)b.push({email:K});let k=await At(e.auth),N=(0,CN.calendar)({version:"v3",auth:k}),Z={summary:n,start:m,end:y,colorId:u,location:i??"",description:s??"",attendees:b,guestsCanInviteOthers:f,guestsCanModify:d,guestsCanSeeOtherGuests:h};return g&&(Z.conferenceData={createRequest:{conferenceSolutionKey:{type:"hangoutsMeet"},requestId:(0,ON.randomUUID)()}}),(await N.events.insert({calendarId:t,sendUpdates:E,conferenceDataVersion:g?1:0,requestBody:Z})).data}a(BT,"runCreateEvent");var kN=Pe({auth:le,name:"create_google_calendar_event",classification:"WRITE",description:"Add Event",audience:"human",aiMetadata:{description:"Creates a Google Calendar event with structured fields (title, start/end times, location, description, attendees, color, guest permissions) and can optionally attach a Google Meet link. Use this when you have explicit event details; choose Create Quick Event instead when working from a single natural-language phrase. Requires a title and start time (end defaults to 30 minutes after start). Not idempotent: each call creates a new event.",idempotent:!1},displayName:"Create Event",props:FT,outputSchema:tt,run:BT});var $N=Pe({auth:le,name:"create_quick_event",classification:"WRITE",description:"Add Quick Calendar Event",audience:"both",aiMetadata:{description:`Creates a calendar event from a single natural-language phrase (e.g. "Lunch with Sam tomorrow at 1pm") via Google's quickAdd parsing, letting Google infer the time, title, and date. Use when you have free-form text rather than structured fields; prefer Create Event when you have explicit start/end times or attendees. Not idempotent: each call creates a new event.`,idempotent:!1},displayName:"Create Quick Event",props:{calendar_id:fe.calendarDropdown("writer"),text:V.LongText({displayName:"Summary",description:"The text describing the event to be created",required:!0}),send_updates:V.StaticDropdown({displayName:"Send Updates",description:"Guests who should receive notifications about the creation of the new event.",required:!1,options:{disabled:!1,options:[{label:"All",value:"all"},{label:"External Only",value:"externalOnly"},{label:"none",value:"none"}]}})},outputSchema:bN,async run(e){let t=e.propsValue.calendar_id,n=`${fe.baseUrl}/calendars/${t}/events/quickAdd`,o={text:e.propsValue.text,sendUpdates:e.propsValue.send_updates||"none"},r={method:"POST",url:n,body:{},authentication:{type:"BEARER_TOKEN",token:await $e(e.auth)},queryParams:o};return await Be.sendRequest(r)}});var DN=Ke(ro());var DW={calendar_id:fe.calendarDropdown("writer"),eventId:V.ShortText({displayName:"Event ID",required:!0})};async function qT(e){let t=await At(e.auth),n=e.propsValue.calendar_id,o=e.propsValue.eventId;return(await(0,DN.calendar)({version:"v3",auth:t}).events.delete({calendarId:n,eventId:o})).data}a(qT,"runDeleteEvent");var NN=Pe({displayName:"Delete Event",auth:le,name:"delete_event",classification:"DESTRUCTIVE",description:"Deletes an event from Google Calendar.",audience:"human",aiMetadata:{description:"Permanently removes an event from a Google Calendar, identified by calendar and event ID. Use to cancel or delete an existing event. Requires the event ID and cannot be undone. Idempotent: once the event is deleted, repeating the call leaves it absent (a second call may report it as already gone).",idempotent:!0},props:DW,run:qT});var VT=Ke(Xn());var GT={calendar_id:fe.calendarDropdown("writer"),event_types:V.StaticMultiSelectDropdown({displayName:"Event types",description:"Select event types",required:!0,defaultValue:["default","focusTime","outOfOffice"],options:{options:[{label:"Default",value:"default"},{label:"Out Of Office",value:"outOfOffice"},{label:"Focus Time",value:"focusTime"},{label:"Working Location",value:"workingLocation"}]}}),search:V.ShortText({displayName:"Search Term",required:!1}),start_date:V.DateTime({displayName:"Date from",required:!1}),end_date:V.DateTime({displayName:"Date to",required:!1}),singleEvents:V.Checkbox({displayName:"Expand Recurring Event?",description:"Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves.",required:!0,defaultValue:!1})};async function HT(e){let{calendar_id:t,start_date:n,end_date:o,search:r,event_types:i,singleEvents:s}=e.propsValue,u=await $e(e.auth),d={showDeleted:"false"},f=`${fe.baseUrl}/calendars/${t}/events`;s!==null&&(d.singleEvents=s?"true":"false"),r&&(d.q=`"${r}"`),n&&(d.timeMin=(0,VT.default)(n).format("YYYY-MM-DDTHH:mm:ss.sssZ")),n&&o&&(d.timeMax=(0,VT.default)(o).format("YYYY-MM-DDTHH:mm:ss.sssZ")),i.length>0&&(f+=`?${i.map(g=>`eventTypes=${g}`).join("&")}`);let h={method:"GET",url:f,queryParams:d,authentication:{type:"BEARER_TOKEN",token:u}};return await Be.sendRequest(h)}a(HT,"runGetEvents");var zN=Pe({auth:le,name:"google_calendar_get_events",classification:"SEARCH",description:"Get Events",audience:"human",aiMetadata:{description:"Lists events from a Google Calendar, optionally filtered by a date range, search term, and event types, and can expand recurring events into individual instances. Use to look up or browse multiple events when you do not already have a specific event ID; use Get Event by ID for a single known event. Read-only and idempotent.",idempotent:!0},displayName:"Get all Events",props:GT,outputSchema:lh,run:HT});var UN=Ke(ro());var ZT=Ke(Xn());var fh={calendar_id:fe.calendarDropdown("writer"),eventId:V.ShortText({displayName:"Event ID",required:!0}),title:V.ShortText({displayName:"Title of the event",required:!1}),start_date_time:V.DateTime({displayName:"Start date time of the event",required:!1}),end_date_time:V.DateTime({displayName:"End date time of the event",required:!1}),location:V.ShortText({displayName:"Location",required:!1}),description:V.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1}),colorId:fe.colorId,attendees:V.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!1}),guests_can_modify:V.Checkbox({displayName:"Guests can modify",defaultValue:!1,required:!1}),guests_can_invite_others:V.Checkbox({displayName:"Guests can invite others",defaultValue:!1,required:!1}),guests_can_see_other_guests:V.Checkbox({displayName:"Guests can see other guests",defaultValue:!1,required:!1})};async function WT(e){let{calendar_id:t,eventId:n,title:o,start_date_time:r,end_date_time:i,location:s,description:u,colorId:d,guests_can_invite_others:f,guests_can_modify:h,guests_can_see_other_guests:g}=e.propsValue,m=e.propsValue.attendees,p=await At(e.auth),y=(0,UN.calendar)({version:"v3",auth:p}),v=await y.events.get({calendarId:t,eventId:n}),E=[];return Array.isArray(m)&&m.length>0?E=m.map(k=>({email:k})):v.data.attendees&&Array.isArray(v.data.attendees)&&(E=v.data.attendees),(await y.events.update({calendarId:t,eventId:n,requestBody:{summary:o??v.data.summary,attendees:E,description:u??v.data.description,colorId:d,location:s??v.data.location,start:r?{dateTime:(0,ZT.default)(r).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.start,end:i?{dateTime:(0,ZT.default)(i).format("YYYY-MM-DDTHH:mm:ss.sssZ")}:v.data.end,guestsCanInviteOthers:f??v.data.guestsCanInviteOthers,guestsCanModify:h??v.data.guestsCanModify,guestsCanSeeOtherGuests:g??v.data.guestsCanSeeOtherGuests}})).data}a(WT,"runUpdateEvent");var MN=Pe({displayName:"Update Event",auth:le,name:"update_event",classification:"WRITE",description:"Updates an event in Google Calendar.",audience:"human",aiMetadata:{description:"Updates the fields of an existing Google Calendar event identified by calendar and event ID (title, times, location, description, color, attendees, guest permissions); unset fields retain their current values. Use to modify or reschedule an event that already exists rather than creating a new one. Requires the event ID. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:fh,outputSchema:tt,run:WT});var mh={strategy:0,items:a(async({auth:e,propsValue:{calendarId:t,expandRecurringEvent:n},lastFetchEpochMS:o})=>{let r=new Date(o);if(o===0){let u=new Date,d=new Date;d.setDate(u.getDate()-7),r=d}return(await pu(t,n,e,r)??[]).map(u=>({epochMilliSeconds:new Date(u.updated).getTime(),data:u}))},"items")},LN=ar({auth:le,name:"new_or_updated_event",classification:"READ",displayName:"New or Updated Event",description:"Triggers when an event is added or updated",aiMetadata:{description:"Fires when any event in the selected calendar is created or modified, polling by last-updated time. Each fired item is the affected event; can optionally expand recurring events so every occurrence fires separately."},props:{calendar_id:fe.calendarDropdown(),expandRecurringEvent:V.Checkbox({displayName:"Expand Recurring Event?",description:"If true, the trigger will activate for every occurrence of a recurring event.",required:!0,defaultValue:!1})},sampleData:{kind:"calendar#event",etag:"3350849506974000",id:"0nsfi5ttd2b17ac76ma2f37oi9",htmlLink:"https://www.google.com/calendar/event?eid=kgjb90uioj4klrgfmdsnjsjvlgkm",summary:"ap-event-test",created:"2023-02-03T11:36:36.000Z",updated:"2023-02-03T11:45:53.487Z",description:"Sample description",status:"canceled",creator:{email:"test@test.com",self:!0},organizer:{email:"test@test.com",self:!0},start:{dateTime:"2023-02-02T22:30:00+03:00",timeZone:"Asia/Amman"},end:{dateTime:"2023-02-02T23:30:00+03:00",timeZone:"Asia/Amman"},transparency:"transparent",iCalUID:"0nsfi5ttd2b17ac76ma2f37oi9@google.com",sequence:1,attendees:[{email:"attende@test.com",responseStatus:"needsAction"},{email:"test@test.com",organizer:!0,self:!0,responseStatus:"accepted"}],reminders:{useDefault:!0},eventType:"default"},outputSchema:tt,type:"POLLING",async test({store:e,auth:t,propsValue:n,files:o}){return await nt.test(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent},files:o})},async onEnable({store:e,auth:t,propsValue:n}){await nt.onEnable(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent}})},async onDisable({store:e,auth:t,propsValue:n}){await nt.onDisable(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent}})},async run({store:e,auth:t,propsValue:n,files:o}){return await nt.poll(mh,{store:e,auth:t,propsValue:{calendarId:n.calendar_id,expandRecurringEvent:n.expandRecurringEvent},files:o})}});var jN=Ke(ro());var FN=Pe({auth:le,name:"google-calendar-add-attendees",classification:"WRITE",displayName:"Add Attendees to Event",description:"Add one or more person to existing event.",audience:"both",aiMetadata:{description:"Adds one or more guests (by email) to an existing Google Calendar event, identified by calendar and event ID, preserving the current attendee list. Use to invite people to an event that already exists rather than recreating it. Not idempotent: re-running appends the same emails again, producing duplicate attendee entries.",idempotent:!1},props:{calendar_id:fe.calendarDropdown("writer"),eventId:V.ShortText({displayName:"Event ID",required:!0}),attendees:V.Array({displayName:"Attendees",description:"Emails of the attendees (guests)",required:!0})},outputSchema:tt,async run(e){let{calendar_id:t,eventId:n}=e.propsValue,o=e.propsValue.attendees,r=await At(e.auth),i=(0,jN.calendar)({version:"v3",auth:r}),s=await i.events.get({calendarId:t,eventId:n}),u=s.data.attendees??[],d=[];return d.push(...u),d.push(...o.map(h=>({email:h}))),(await i.events.update({calendarId:t,eventId:n,requestBody:{...s.data,attendees:d}})).data}});var KT=Ke(Xn());var JT={calendar_ids:V.MultiSelectDropdown({auth:le,displayName:"Calendars",description:"Select the calendars to check for busy periods.",required:!0,refreshers:[],options:a(async({auth:e})=>e?{disabled:!1,options:(await Zt(e)).map(o=>({label:o.summary,value:o.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:V.DateTime({displayName:"Start Time",description:"The start of the time range to check.",required:!0}),end_date:V.DateTime({displayName:"End Time",description:"The end of the time range to check.",required:!0})};async function YT(e){let{calendar_ids:t,start_date:n,end_date:o}=e.propsValue,r=await $e(e.auth),i={timeMin:(0,KT.default)(n).toISOString(),timeMax:(0,KT.default)(o).toISOString(),items:t.map(d=>({id:d}))},s={method:"POST",url:`${fe.baseUrl}/freeBusy`,body:i,authentication:{type:"BEARER_TOKEN",token:r}};return(await Be.sendRequest(s)).body}a(YT,"runFindFreeBusy");var BN=Pe({auth:le,name:"google_calendar_find_busy_free_periods",classification:"SEARCH",displayName:"Find Busy/Free Periods in Calendar",description:"Finds free/busy calendar details from Google Calendar.",audience:"human",aiMetadata:{description:"Queries one or more calendars for their busy time blocks within a given start/end window, without exposing event details. Use to check availability or find open slots before scheduling a meeting. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:JT,outputSchema:dh,run:YT});var XT={calendar_id:fe.calendarDropdown(),event_id:V.ShortText({displayName:"Event ID",description:'The unique ID of the event (e.g., "abc123def456"). You can find this in the event URL or from other calendar actions.',required:!0}),max_attendees:V.Number({displayName:"Max Attendees",description:"Maximum number of attendees to include in the response. If there are more attendees, only the participant is returned.",required:!1}),time_zone:V.ShortText({displayName:"Time Zone",description:`Time zone for the response (e.g., "America/New_York", "Europe/London"). Defaults to the calendar's time zone if not specified.`,required:!1})};async function QT(e){let{calendar_id:t,event_id:n,max_attendees:o,time_zone:r}=e.propsValue,i=await $e(e.auth);if(!t||typeof t!="string"||t.trim().length===0)throw new Error("Calendar ID is required");if(!n||typeof n!="string"||n.trim().length===0)throw new Error("Event ID cannot be empty");if(n.length<5||n.length>1024)throw new Error("Event ID must be between 5 and 1024 characters");let s={};o!==void 0&&o>0&&(s.maxAttendees=o.toString()),r&&typeof r=="string"&&r.trim().length>0&&(s.timeZone=r.trim());let u=`${fe.baseUrl}/calendars/${encodeURIComponent(t.trim())}/events/${encodeURIComponent(n.trim())}`,d={method:"GET",url:u,queryParams:s,authentication:{type:"BEARER_TOKEN",token:i}};try{return(await Be.sendRequest(d)).body}catch(f){throw f.response?.status===404?new Error(`Event with ID "${n}" not found in calendar "${t}". Please verify the event ID and calendar selection.`):f.response?.status===403?new Error(`Access denied to event "${n}" in calendar "${t}". Please check your permissions.`):f.response?.status===400?new Error("Invalid request parameters. Please check the event ID format and other parameters."):f.response?.status===401?new Error("Authentication failed. Please reconnect your Google Calendar account."):new Error(`Failed to fetch event: ${f.message||"Unknown error occurred"}`)}}a(QT,"runGetEventById");var qN=Pe({auth:le,name:"google_calendar_get_event_by_id",classification:"READ",displayName:"Get Event by ID",description:"Fetch event details by its unique ID from Google Calendar.",audience:"human",aiMetadata:{description:"Fetches the full details of a single Google Calendar event by its unique event ID within a given calendar. Use when you already have an event ID (e.g. from a trigger or a list action) and need its details; use Get all Events to search when you do not. Requires a valid event ID. Read-only and idempotent.",idempotent:!0},props:XT,outputSchema:tt,run:QT});var eP=Ke(Xn()),VN=Pe({auth:le,name:"google_calendar_search_events_all_calendars",classification:"SEARCH",displayName:"Search Events Across Calendars",description:"Searches every calendar the account can access for events matching a keyword within a required time window.",audience:"ai",aiMetadata:{description:"Search all of the user's calendars at once for events matching a text query within a required time window, returning each match tagged with its owning calendarId so you can then get/update/delete it. Use this instead of Get all Events when you know a keyword and time range but do NOT know which calendar the event lives in (Get all Events searches a single calendar). A start and end time are mandatory to bound the cross-calendar scan; matching uses Google's native q= filter, not semantic search. Read-only and idempotent.",idempotent:!0},props:{query:V.ShortText({displayName:"Search Term",description:`Free-text query matched against event fields (summary, description, location, attendee names/emails) using Google's native search. Example: "budget review".`,required:!0}),start_date:V.DateTime({displayName:"Start Time",description:`Lower bound (inclusive) for an event's end time, as an ISO 8601 timestamp (e.g. "2026-06-01T00:00:00Z"). Required to bound the cross-calendar scan.`,required:!0}),end_date:V.DateTime({displayName:"End Time",description:`Upper bound (exclusive) for an event's start time, as an ISO 8601 timestamp (e.g. "2026-06-30T23:59:59Z"). Required to bound the cross-calendar scan.`,required:!0}),single_events:V.Checkbox({displayName:"Expand Recurring Events?",description:"When enabled, recurring events are expanded into their individual instances instead of returning the underlying recurring event.",required:!1,defaultValue:!0})},outputSchema:RN,async run(e){let{query:t,start_date:n,end_date:o,single_events:r}=e.propsValue,i=await $e(e.auth),s=(0,eP.default)(n).toISOString(),u=(0,eP.default)(o).toISOString(),d=await Zt(e.auth),f=[],h=[];for(let g of d){let m="";do{let p={q:t,timeMin:s,timeMax:u,singleEvents:r?"true":"false",showDeleted:"false",maxResults:"250"};m&&(p.pageToken=m);let y={method:"GET",url:`${fe.baseUrl}/calendars/${encodeURIComponent(g.id)}/events`,queryParams:p,authentication:{type:"BEARER_TOKEN",token:i}};try{let v=await Be.sendRequest(y),E=v.body.items??[];for(let b of E)f.push({...b,calendarId:g.id});m=v.body.nextPageToken}catch(v){let E=v.response?.status;if(E===403||E===404){h.push({calendarId:g.id,status:E}),m="";continue}throw E===429?new Error("Google Calendar rate limit reached while searching calendars. Please retry shortly."):v}}while(m)}return{events:f,count:f.length,calendars_searched:d.length-h.length,...h.length>0?{skipped_calendars:h,warning:"Some calendars could not be searched (access denied or not found); a missing match may live in a skipped calendar. See skipped_calendars."}:{}}}});var Zr=Ke(Xn()),HN=Ke(GN());Zr.default.extend(HN.default);function NW(e){if(e.length===0)return[];let t=[...e].sort((o,r)=>o.start-r.start),n=[{...t[0]}];for(let o=1;o<t.length;o++){let r=n[n.length-1],i=t[o];i.start<=r.end?r.end=Math.max(r.end,i.end):n.push({...i})}return n}a(NW,"mergeIntervals");function zW(e,t,n){let o=[],r=t;for(let i of e)if(i.start>r&&o.push({start:r,end:Math.min(i.start,n)}),r=Math.max(r,i.end),r>=n)break;return r<n&&o.push({start:r,end:n}),o.filter(i=>i.end>i.start)}a(zW,"complement");function UW(e,t,n){let o=[];for(let r of e){let i=Zr.default.utc(r.start).startOf("day"),s=Zr.default.utc(r.end);for(;i.valueOf()<r.end;){let u=i.add(t,"hour"),d=i.add(n,"hour"),f=Math.max(r.start,u.valueOf()),h=Math.min(r.end,d.valueOf());if(h>f&&o.push({start:f,end:h}),i=i.add(1,"day"),i.valueOf()>s.valueOf())break}}return o}a(UW,"clipToWorkingHours");var ZN=Pe({auth:le,name:"google_calendar_find_free_slots",classification:"SEARCH",displayName:"Find Free Time Slots",description:"Computes open time slots shared across one or more calendars within a window, by inverting their busy blocks.",audience:"ai",aiMetadata:{description:'Return the OPEN time slots common to the selected calendars within a window \u2014 the inverse of their combined busy blocks, optionally filtered to a minimum duration and to working hours. Use this instead of Find Busy/Free Periods (which returns only busy blocks and forces you to invert and reconcile them yourself) when you need the actual free intervals to answer "when can everyone meet". Idempotent because it performs no writes, but the result depends entirely on the window: pass absolute start/end times, since a window relative to "now" yields a shifting set of slots.',idempotent:!0},props:{calendar_ids:V.MultiSelectDropdown({auth:le,displayName:"Calendars",description:"The calendars whose schedules must all be free. A slot is returned only when it is open on every selected calendar.",required:!0,refreshers:[],options:a(async({auth:e})=>e?{disabled:!1,options:(await Zt(e)).map(o=>({label:o.summary,value:o.id}))}:{disabled:!0,placeholder:"Connect your account first",options:[]},"options")}),start_date:V.DateTime({displayName:"Window Start",description:'Start of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z"). Prefer absolute times over relative ones.',required:!0}),end_date:V.DateTime({displayName:"Window End",description:'End of the search window, as an absolute ISO 8601 timestamp (e.g. "2026-06-05T18:00:00Z").',required:!0}),min_duration_minutes:V.Number({displayName:"Minimum Slot Duration (minutes)",description:"Discard any open slot shorter than this many minutes. Leave empty to return every open slot regardless of length.",required:!1}),working_hours_start:V.Number({displayName:"Working Hours Start (hour 0-23)",description:"If set together with Working Hours End, each day's open slots are clipped to this hour range, interpreted in UTC (not the calendar's local time zone). Example: 9 for 09:00 UTC. Leave both unset to return slots across the full window.",required:!1}),working_hours_end:V.Number({displayName:"Working Hours End (hour 0-23)",description:"Upper bound of the daily working-hours window. Example: 17 for 5 PM. Ignored unless Working Hours Start is also set.",required:!1})},outputSchema:xN,async run(e){let{calendar_ids:t,start_date:n,end_date:o,min_duration_minutes:r,working_hours_start:i,working_hours_end:s}=e.propsValue,u=await $e(e.auth),d=(0,Zr.default)(n).valueOf(),f=(0,Zr.default)(o).valueOf();if(f<=d)throw new Error("Window End must be after Window Start.");let h={method:"POST",url:`${fe.baseUrl}/freeBusy`,body:{timeMin:(0,Zr.default)(n).toISOString(),timeMax:(0,Zr.default)(o).toISOString(),items:t.map(b=>({id:b}))},authentication:{type:"BEARER_TOKEN",token:u}},g=await Be.sendRequest(h),m=[],p=[];for(let b of Object.keys(g.body.calendars)){let k=g.body.calendars[b];if(k.errors?.length){p.push({calendarId:b,errors:k.errors});continue}let N=k.busy??[];for(let Z of N)m.push({start:(0,Zr.default)(Z.start).valueOf(),end:(0,Zr.default)(Z.end).valueOf()})}if(p.length>0)throw new Error(`Could not read availability for calendar(s): ${p.map(b=>`${b.calendarId} (${b.errors.map(k=>k.reason).join(", ")})`).join("; ")}. A slot can only be marked free if every selected calendar is free, so free slots cannot be computed while any of them are unreadable. Verify the calendar IDs with List Calendars.`);let y=NW(m),v=zW(y,d,f);if(i!==void 0&&s!==void 0&&s>i&&(v=UW(v,i,s)),r!==void 0&&r>0){let b=r*60*1e3;v=v.filter(k=>k.end-k.start>=b)}let E=v.map(b=>({start:(0,Zr.default)(b.start).toISOString(),end:(0,Zr.default)(b.end).toISOString(),duration_minutes:Math.round((b.end-b.start)/6e4)}));return{free_slots:E,count:E.length}}});var WN=Ke(ro());var nP=Ke(Xn()),KN=Pe({auth:le,name:"google_calendar_list_recurring_event_instances",classification:"SEARCH",displayName:"List Recurring Event Instances",description:"Lists the individual occurrences of one recurring event series, each with its own instance event ID.",audience:"ai",aiMetadata:{description:"List the individual occurrences of a single recurring event series, identified by its recurring-event ID, each returned with its own distinct instance event ID. Use this when you need to inspect, reschedule, or cancel ONE occurrence of a series rather than the whole series; Get all Events expands recurring events only across a whole-calendar window and cannot target one series by ID. Requires the recurring series' event ID; optionally bound by a time range. Read-only and idempotent.",idempotent:!0},props:{calendar_id:fe.calendarDropdown(),event_id:V.ShortText({displayName:"Recurring Event ID",description:'The event ID of the recurring SERIES (the parent), e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events. Individual instance IDs will not work here.',required:!0}),time_min:V.DateTime({displayName:"Start Time",description:`Optional lower bound (inclusive) for an instance's end time, as an ISO 8601 timestamp with offset (e.g. "2026-06-01T00:00:00Z").`,required:!1}),time_max:V.DateTime({displayName:"End Time",description:`Optional upper bound (exclusive) for an instance's start time, as an ISO 8601 timestamp with offset (e.g. "2026-06-30T23:59:59Z").`,required:!1}),show_deleted:V.Checkbox({displayName:"Include Cancelled Instances",description:"Whether to include cancelled (deleted) instances of the series in the result. Defaults to false.",required:!1,defaultValue:!1}),max_results:V.Number({displayName:"Max Results",description:"Maximum number of instances to return per page (1-2500). Defaults to the API default of 250.",required:!1})},outputSchema:AN,async run(e){let{calendar_id:t,event_id:n,time_min:o,time_max:r,show_deleted:i,max_results:s}=e.propsValue,u=await At(e.auth),d=(0,WN.calendar)({version:"v3",auth:u});try{let f=await d.events.instances({calendarId:t,eventId:n,timeMin:o?(0,nP.default)(o).toISOString():void 0,timeMax:r?(0,nP.default)(r).toISOString():void 0,showDeleted:i??!1,maxResults:s}),h=f.data.items??[];return{instances:h,count:h.length,nextPageToken:f.data.nextPageToken??null}}catch(f){let h=f.response?.status??f.code;throw h===404?new Error(`Recurring event "${n}" not found in calendar "${t}". Verify the ID belongs to a recurring series.`):h===400?new Error(`Invalid request: "${n}" may not be a recurring event. The instances endpoint only works on recurring series.`):h===403?new Error(`Access denied to event "${n}" in calendar "${t}". Check your permissions.`):f}}});var JN=Ke(ro());var YN=Pe({auth:le,name:"google_calendar_move_event",classification:"WRITE",displayName:"Move Event to Another Calendar",description:"Moves an existing event from one calendar to another, preserving its event ID and metadata.",audience:"ai",aiMetadata:{description:"Move an existing event from a source calendar to a destination calendar in place, preserving the event ID, conferencing, and attendee state. Use this instead of deleting and recreating the event (which loses the ID and metadata) when you need to transfer an event between calendars. Idempotent: moving an event to the calendar it already lives on is treated as a no-op. The source and destination must be writable calendars.",idempotent:!0},props:{calendar_id:fe.calendarDropdown("writer"),event_id:V.ShortText({displayName:"Event ID",description:'The ID of the event to move, e.g. "abc123def456". Obtain it from Search Events Across Calendars or Get all Events.',required:!0}),destination_calendar_id:V.Dropdown({auth:le,displayName:"Destination Calendar",description:"The calendar to move the event to.",refreshers:[],required:!0,options:a(async({auth:e})=>e?{disabled:!1,options:(await Zt(e,"writer")).map(n=>({label:n.summary,value:n.id}))}:{disabled:!0,placeholder:"Please connect your account first",options:[]},"options")}),send_updates:V.StaticDropdown({displayName:"Send Notifications",description:"Who should receive notifications about the change of the event's organizer.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:IN,async run(e){let{calendar_id:t,event_id:n,destination_calendar_id:o,send_updates:r}=e.propsValue,i=await At(e.auth),s=(0,JN.calendar)({version:"v3",auth:i});if(t===o)return{moved:!1,already_in_destination:!0,event:(await s.events.get({calendarId:o,eventId:n})).data};try{return await s.events.move({calendarId:t,eventId:n,destination:o,sendUpdates:r??"none"}),{moved:!0,already_in_destination:!1,event:(await s.events.get({calendarId:o,eventId:n})).data}}catch(u){let d=u.response?.status??u.code;throw d===404?new Error(`Event "${n}" not found in source calendar "${t}". Verify the event ID and source calendar.`):d===403?new Error(`Access denied while moving event "${n}". Both the source and destination calendars must be writable.`):d===400?new Error(`Invalid move request for event "${n}". The destination must differ from the source and both must be valid calendars.`):u}}});var XN=Pe({auth:le,name:"google_calendar_create_event",classification:"WRITE",displayName:"Create Event",description:"Create a new event on a Google Calendar with structured fields (title, start/end, location, description, attendees, color) and an optional Google Meet link.",audience:"ai",aiMetadata:{description:'Create a new event on a calendar from explicit structured fields (title, start/end times, location, description, attendees, color, guest permissions) with an optional Google Meet link. Use this when you already have the event details; for a single natural-language phrase use the quick-add path instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Requires a title and start time; end defaults to 30 minutes after start. Not idempotent: each call creates a new event.',idempotent:!1},props:FT,outputSchema:tt,run:BT});var{eventId:gde,calendar_id:yde,guests_can_modify:vde,guests_can_invite_others:_de,guests_can_see_other_guests:bde,...MW}=fh;function oP(e){return V.StaticDropdown({displayName:e,description:"Leave unset to keep the event's current value.",required:!1,options:{options:[{label:"True",value:"true"},{label:"False",value:"false"}]}})}a(oP,"guestPermissionProp");function iP(e){return e===void 0?void 0:e==="true"}a(iP,"toOptionalBoolean");var LW={calendar_id:fh.calendar_id,event_id:V.ShortText({displayName:"Event ID",description:"The ID of the event to update. Resolve it via List Events or Search Events Across Calendars.",required:!0}),...MW,guests_can_modify:oP("Guests can modify"),guests_can_invite_others:oP("Guests can invite others"),guests_can_see_other_guests:oP("Guests can see other guests")},QN=Pe({auth:le,name:"google_calendar_update_event",classification:"WRITE",displayName:"Update Event",description:"Update fields of an existing Google Calendar event by ID using a safe get-then-merge; fields you leave unset keep their current values.",audience:"ai",aiMetadata:{description:"Update fields of an existing event (title, times, location, description, color, attendees, guest permissions) identified by calendar and event ID. It fetches the event first and merges, so unset fields keep their current values (it never blanks out attendees/recurrence/conferencing). Use this to edit or reschedule an existing event rather than recreating it. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: applying the same field values repeatedly leaves the event in the same state.",idempotent:!0},props:LW,outputSchema:tt,run:a(e=>WT({...e,propsValue:{...e.propsValue,eventId:e.propsValue.event_id,guests_can_modify:iP(e.propsValue.guests_can_modify),guests_can_invite_others:iP(e.propsValue.guests_can_invite_others),guests_can_see_other_guests:iP(e.propsValue.guests_can_see_other_guests)}}),"run")});var jW={calendar_id:fe.calendarDropdown("writer"),event_id:V.ShortText({displayName:"Event ID",description:"The ID of the event to delete. Resolve it via List Events or Search Events Across Calendars.",required:!0})},ez=Pe({auth:le,name:"google_calendar_delete_event",classification:"DESTRUCTIVE",displayName:"Delete Event",description:"Permanently delete an event from a Google Calendar by its event ID.",audience:"ai",aiMetadata:{description:"Permanently delete an event from a calendar, identified by calendar and event ID. Use to cancel or remove an existing event; this cannot be undone, so confirm the event ID first. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Idempotent: once deleted, re-running leaves the event absent (a repeat call may report it as already gone).",idempotent:!0},props:jW,run:a(e=>qT({...e,propsValue:{calendar_id:e.propsValue.calendar_id,eventId:e.propsValue.event_id}}),"run")});var tz=Pe({auth:le,name:"google_calendar_get_event",classification:"READ",displayName:"Get Event",description:"Fetch the full details of a single Google Calendar event by its event ID.",audience:"ai",aiMetadata:{description:"Fetch the full details of one event by its unique event ID within a calendar. Use this when you already have an event ID (from a trigger or a list action) and need its current details; to find an event when you do not have its ID, use google_calendar_list_events or google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Read-only and idempotent.",idempotent:!0},props:XT,outputSchema:tt,run:QT});var rz=Pe({auth:le,name:"google_calendar_list_events",classification:"SEARCH",displayName:"List Events",description:"List events from one Google Calendar, optionally filtered by date range, free-text search, and event types.",audience:"ai",aiMetadata:{description:`List events from one calendar, optionally narrowed by a date range, a free-text search term (matched with Google's native q= filter), and event types, optionally expanding recurring events into individual instances. Use this to browse or find events in a known calendar, including text search within that calendar; to search across every calendar when you do not know which one holds the event, use google_calendar_search_events_all_calendars instead. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:GT,outputSchema:lh,run:HT});var nz=Pe({auth:le,name:"google_calendar_find_busy_periods",classification:"SEARCH",displayName:"Find Busy Periods",description:"Return the raw busy time blocks of one or more calendars within a window, via the freebusy query.",audience:"ai",aiMetadata:{description:"Query one or more calendars for their raw busy time blocks within a start/end window, without exposing event details (the low-level freebusy primitive). Use this when you need the busy intervals themselves (e.g. across several shared calendars); to get the inverse open slots directly, use google_calendar_find_free_slots instead. Resolve calendarId values via google_calendar_list_calendars. Requires the calendars to check and a time range. Read-only and idempotent.",idempotent:!0},props:JT,outputSchema:dh,run:YT});var oz=Ke(ro());var iz=Pe({auth:le,name:"google_calendar_remove_attendee",classification:"WRITE",displayName:"Remove Attendee",description:"Remove one attendee (by email) from an existing Google Calendar event, preserving the rest of the guest list.",audience:"ai",aiMetadata:{description:"Remove a single attendee, matched by email, from an existing event by fetching the current attendee list, dropping that one guest, and patching the event. Use this to uninvite one person without disturbing the other guests; to add guests use the add-attendees action instead. Resolve calendarId via google_calendar_list_calendars and eventId via google_calendar_list_events / google_calendar_search_events_all_calendars. Not idempotent (notifications may fire), though re-removing an already-absent attendee is a no-op on state. It uses optimistic concurrency (If-Match on the event revision), so a simultaneous edit by someone else fails with a retry-able conflict instead of silently clobbering their change.",idempotent:!1},props:{calendar_id:fe.calendarDropdown("writer"),event_id:V.ShortText({displayName:"Event ID",description:"The ID of the event to remove the attendee from. Resolve it via List Events or Search Events Across Calendars.",required:!0}),attendee_email:V.ShortText({displayName:"Attendee Email",description:"Email address of the attendee to remove from the event.",required:!0}),send_updates:V.StaticDropdown({displayName:"Send Notifications",description:"Who should be notified about the attendee change.",required:!1,defaultValue:"none",options:{options:[{label:"To everyone",value:"all"},{label:"To external guests only",value:"externalOnly"},{label:"To no one",value:"none"}]}})},outputSchema:wN,async run(e){let{calendar_id:t,event_id:n,attendee_email:o,send_updates:r}=e.propsValue,i=await At(e.auth),s=(0,oz.calendar)({version:"v3",auth:i}),u=o.trim().toLowerCase();try{let d=await s.events.get({calendarId:t,eventId:n}),f=d.data.attendees??[],h=f.filter(p=>(p.email??"").trim().toLowerCase()!==u);if(h.length===f.length)return{removed:!1,attendee_email:o,message:`Attendee "${o}" was not on event "${n}"; nothing to remove.`,event:d.data};let g=d.data.etag??void 0,m=await s.events.patch({calendarId:t,eventId:n,sendUpdates:r??"none",requestBody:{attendees:h}},g?{headers:{"If-Match":g}}:{});return{removed:!0,attendee_email:o,event:m.data}}catch(d){let f=d.response?.status??d.code;throw f===412?new Error(`Event "${n}" changed since it was read (a concurrent edit). Re-run Remove Attendee to retry against the latest version.`):f===404?new Error(`Event "${n}" not found in calendar "${t}". Verify the event ID and calendar.`):f===403?new Error(`Access denied while editing event "${n}". The calendar must be writable.`):d}}});var az=Ke(ro());var aP=Ke(Xn()),sz=Pe({auth:le,name:"google_calendar_import_event",classification:"WRITE",displayName:"Import Event",description:"Import an existing event (by iCalUID) into a Google Calendar as a private copy, using events.import.",audience:"ai",aiMetadata:{description:'Import an existing event into a calendar as a private copy, keyed by its iCalUID with a start and end time (the events.import primitive, distinct from creating a brand-new event or moving one). Use this to copy or de-duplicate an event across calendars; re-importing the same iCalUID updates the existing copy rather than duplicating it. Resolve calendarId via google_calendar_list_calendars (default "primary"). Only default (non-special) events can be imported. Not idempotent: each import can create or mutate the destination copy.',idempotent:!1},props:{calendar_id:fe.calendarDropdown("writer"),ical_uid:V.ShortText({displayName:"iCal UID",description:`The event's iCalUID (its globally unique identifier, e.g. "abc123@google.com"). This is the dedup key: re-importing the same UID updates the existing copy.`,required:!0}),summary:V.ShortText({displayName:"Title",description:"Title (summary) of the imported event.",required:!0}),start_date_time:V.DateTime({displayName:"Start Time",description:'Event start as an ISO 8601 timestamp (e.g. "2026-06-01T09:00:00Z").',required:!0}),end_date_time:V.DateTime({displayName:"End Time",description:'Event end as an ISO 8601 timestamp (e.g. "2026-06-01T10:00:00Z").',required:!0}),location:V.ShortText({displayName:"Location",required:!1}),description:V.LongText({displayName:"Description",description:"Description of the event. You can use HTML tags here.",required:!1})},outputSchema:tt,async run(e){let{calendar_id:t,ical_uid:n,summary:o,start_date_time:r,end_date_time:i,location:s,description:u}=e.propsValue,d=await At(e.auth),f=(0,az.calendar)({version:"v3",auth:d});try{return(await f.events.import({calendarId:t,requestBody:{iCalUID:n,summary:o,location:s??void 0,description:u??void 0,start:{dateTime:(0,aP.default)(r).toISOString()},end:{dateTime:(0,aP.default)(i).toISOString()}}})).data}catch(h){let g=h.response?.status??h.code;throw g===403?new Error(`Access denied while importing into calendar "${t}". The calendar must be writable.`):g===400?new Error(`Invalid import request. Ensure iCalUID, start, and end are provided and that the event is a default (non-special) event. (${h.message})`):h}}});var cz=Pe({auth:le,name:"google_calendar_list_calendars",classification:"SEARCH",displayName:"List Calendars",description:"List every calendar in the user's calendar list, returning each calendar's id, summary, access role, time zone, and whether it is primary.",audience:"ai",aiMetadata:{description:`List all calendars on the user's calendar list, returning each one's calendarId, summary, accessRole, timeZone, and whether it is the primary calendar. This is the calendarId resolver: call it first to discover which calendars exist and obtain the calendarId that every event/freebusy atomic needs (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:TN,async run(e){await $e(e.auth);let t=await Zt(e.auth);return{calendars:t.map(n=>({id:n.id,summary:n.summary,description:n.description,location:n.location,timeZone:n.timeZone,accessRole:n.accessRole,primary:n.primary??!1,selected:n.selected??!1,backgroundColor:n.backgroundColor,foregroundColor:n.foregroundColor})),count:t.length}}});var uz=Pe({auth:le,name:"google_calendar_get_calendar",classification:"READ",displayName:"Get Calendar",description:"Fetch one calendar's metadata (summary, time zone, description, location) by its calendar ID.",audience:"ai",aiMetadata:{description:`Fetch one calendar's metadata \u2014 summary, timeZone, description, and location \u2014 by its calendar ID. Use this to read a calendar's time zone, which is load-bearing when constructing correct event start/end windows. Resolve calendarId via google_calendar_list_calendars (default "primary"). Read-only and idempotent.`,idempotent:!0},props:{calendar_id:fe.calendarDropdown()},outputSchema:EN,async run(e){let{calendar_id:t}=e.propsValue,n=await $e(e.auth),o={method:"GET",url:`${fe.baseUrl}/calendars/${encodeURIComponent(t)}`,authentication:{type:"BEARER_TOKEN",token:n}};try{return(await Be.sendRequest(o)).body}catch(r){let i=r.response?.status;throw i===404?new Error(`Calendar "${t}" not found. Verify the calendar ID via List Calendars.`):i===403?new Error(`Access denied to calendar "${t}". Check your permissions.`):r}}});var lz=Pe({auth:le,name:"google_calendar_get_colors",classification:"READ",displayName:"Get Colors",description:"Fetch the Google Calendar color palette mapping colorId values to their hex background/foreground colors.",audience:"ai",aiMetadata:{description:"Fetch the global color palette: the mapping from each colorId to its background/foreground hex color, for both events and calendars. Use this to resolve a colorId before setting the color on google_calendar_create_event or google_calendar_update_event. Read-only and idempotent.",idempotent:!0},props:{},outputSchema:SN,async run(e){return await If(e.auth)}});var dz=Pe({auth:le,name:"google_calendar_list_settings",classification:"SEARCH",displayName:"List Settings",description:"List the user's Google Calendar account settings (time zone, week start, date/time format, and more).",audience:"ai",aiMetadata:{description:`List all of the user's Google Calendar account settings as id/value pairs \u2014 including the account "timezone", "weekStart", and "format24HourTime". Use this to read the account time zone to anchor relative-date reasoning before building event windows, or to read a single setting (just pick its id from the returned list). Read-only and idempotent.`,idempotent:!0},props:{},outputSchema:PN,async run(e){let t=await $e(e.auth),n={method:"GET",url:`${fe.baseUrl}/users/me/settings`,authentication:{type:"BEARER_TOKEN",token:t}},r=(await Be.sendRequest(n)).body.items??[],i={};for(let s of r)i[s.id]=s.value;return{settings:i,items:r,count:r.length}}});var hh="google_calendar_watch",ss="google_calendar_sync_token",sP="google_calendar_seen_event_ids",FW=500;function pz(e,{event_types:t,search_filter:n,exclude_all_day:o}){if(t&&t.length>0){let r=e.eventType||"default";if(!t.includes(r))return!1}if(n&&n.trim()){let r=n.toLowerCase().trim(),i=(e.summary||"").toLowerCase(),s=(e.description||"").toLowerCase(),u=(e.location||"").toLowerCase();if(!(i.includes(r)||s.includes(r)||u.includes(r)))return!1}return!(o&&e.start?.date&&!e.start?.dateTime)}a(pz,"matchesFilters");var fz=ar({auth:le,name:"new_event",classification:"READ",displayName:"New Event",description:"Fires when a new event is created in a calendar.",aiMetadata:{description:"Fires when a brand-new event is created in the selected calendar (not on edits or cancellations), via Google push notifications. Each fired item is the new event; can be narrowed by event type, a text search across title/description/location, and an option to skip all-day events."},props:{calendar_id:fe.calendarDropdown("writer"),event_types:V.StaticMultiSelectDropdown({displayName:"Event Types to Monitor",description:"Filter by specific event types (leave empty to monitor all event types)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_filter:V.ShortText({displayName:"Search Filter",description:"Only trigger for events containing this text in title, description, or location (optional)",required:!1}),exclude_all_day:V.Checkbox({displayName:"Exclude All-Day Events",description:"Skip triggering for all-day events",required:!1,defaultValue:!1})},outputSchema:tt,type:"WEBHOOK",renewConfiguration:{strategy:"CRON",cronExpression:"0 */12 * * *"},sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_12345",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzEyMzQ1",created:"2025-08-15T11:02:27.000Z",updated:"2025-08-15T11:02:27.491Z",summary:"Team Sync",creator:{email:"creator@example.com"},organizer:{email:"creator@example.com",self:!0},start:{dateTime:"2025-08-18T10:00:00-07:00",timeZone:"America/Los_Angeles"},end:{dateTime:"2025-08-18T11:00:00-07:00",timeZone:"America/Los_Angeles"},iCalUID:"sample_event_id_12345@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(e){let t=e.propsValue.calendar_id,n=e.auth,o=await Ub(t,e.webhookUrl,n);await e.store.put(hh,o);let r=await Af({calendarId:t,authProp:n});dt(r)||await e.store.put(ss,r)},async onDisable(e){let t=e.auth,n=await e.store.get(hh);n&&await zb(n,t),await e.store.delete(ss),await e.store.delete(sP)},async onRenew(e){let t=e.propsValue.calendar_id,n=e.auth,o=await e.store.get(hh);o&&await zb(o,n);let r=await Ub(t,e.webhookUrl,n);await e.store.put(hh,r)},async run(e){let o=e.payload.headers["x-goog-resource-state"],r={event_types:e.propsValue.event_types,search_filter:e.propsValue.search_filter,exclude_all_day:e.propsValue.exclude_all_day};if(o==="sync")return[];if(o!=="exists")return[];let i=e.propsValue.calendar_id,s=e.auth,u=await e.store.get(ss);if(dt(u)){let y=await Af({calendarId:i,authProp:s});return dt(y)||await e.store.put(ss,y),[]}let{items:d,nextSyncToken:f,syncTokenInvalid:h}=await JC({calendarId:i,syncToken:u,authProp:s});if(h){let y=await Af({calendarId:i,authProp:s});return dt(y)||await e.store.put(ss,y),[]}dt(f)||await e.store.put(ss,f);let g=await e.store.get(sP),m=new Set(g??[]),p=[];for(let y of d)!y.id||y.status==="cancelled"||m.has(y.id)||(m.add(y.id),pz(y,r)&&p.push(y));if(m.size!==(g?.length??0)){let y=Array.from(m).slice(-FW);await e.store.put(sP,y)}return p},async test(e){let t=e.auth,n={event_types:e.propsValue.event_types,search_filter:e.propsValue.search_filter,exclude_all_day:e.propsValue.exclude_all_day},o=await YC(e.propsValue.calendar_id,t);return pz(o,n)?[o]:[]}});var gh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{if(n===0)return[];let{calendar_id:o,specific_event:r,event_id:i}=t;if(!o)return[];if(r&&!i)return[];let s=[];if(r&&i){let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events/${i}`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};try{let g=(await Be.sendRequest(f)).body,m=g.end?.dateTime??g.end?.date;m&&new Date(m).getTime()>n&&(s=[g])}catch(h){return console.error("Error fetching specific event:",h),[]}}else{let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events`,authentication:{type:"BEARER_TOKEN",token:await $e(e)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:new Date(n).toISOString()}};s=(await Be.sendRequest(f)).body.items}let u=[],d=Date.now();for(let f of s){let h=f.end?.dateTime??f.end?.date;if(!h)continue;let g=new Date(h).getTime();g>n&&g<=d&&u.push({epochMilliSeconds:g,data:f})}return u},"items")},mz=ar({auth:le,name:"event_ends",classification:"READ",displayName:"Event Ends",description:"Fires when an event ends.",aiMetadata:{description:"Fires once an event in the selected calendar reaches its end time, detected by polling. Each fired item is the event that just ended. Can watch all events in the calendar or be scoped to a single specific event."},props:{calendar_id:fe.calendarDropdown("writer"),specific_event:V.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:fe.eventDropdown(!1)},outputSchema:tt,type:"POLLING",sampleData:{kind:"calendar#event",etag:'"3419997894982000"',id:"sample_event_id_67890",status:"confirmed",htmlLink:"https://www.google.com/calendar/event?eid=c2FtcGxlX2V2ZW50X2lkXzY3ODkw",created:"2025-08-14T09:00:00.000Z",updated:"2025-08-14T09:00:00.000Z",summary:"Project Deadline",creator:{email:"manager@example.com"},organizer:{email:"manager@example.com",self:!0},start:{dateTime:"2025-08-14T14:30:00+05:30",timeZone:"Asia/Kolkata"},end:{dateTime:"2025-08-14T15:30:00+05:30",timeZone:"Asia/Kolkata"},iCalUID:"sample_event_id_67890@google.com",sequence:0,reminders:{useDefault:!0},eventType:"default"},async onEnable(e){await nt.onEnable(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(gh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var yh={strategy:0,items:a(async({auth:e,propsValue:t})=>{let{calendar_id:n,specific_event:o,event_id:r,time_value:i,time_unit:s}=t;if(!n||!i||!s)return[];if(o&&!r)return[];let u=i*60*1e3;s==="hours"?u=i*60*60*1e3:s==="days"&&(u=i*24*60*60*1e3);let d=Date.now(),f=300*1e3,h=new Date(d+u).toISOString(),g=new Date(d+u+f).toISOString(),m=[];if(o&&r){let p={method:"GET",url:`${fe.baseUrl}/calendars/${n}/events/${r}`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};try{let v=(await Be.sendRequest(p)).body,b=new Date(v.start?.dateTime??v.start?.date??0).getTime()-u;b>=d&&b<=d+f&&(m=[v])}catch(y){return console.error("Error fetching specific event:",y),[]}}else{let p={method:"GET",url:`${fe.baseUrl}/calendars/${n}/events`,authentication:{type:"BEARER_TOKEN",token:await $e(e)},queryParams:{singleEvents:"true",orderBy:"startTime",timeMin:h,timeMax:g}};m=(await Be.sendRequest(p)).body.items}return m.map(p=>({epochMilliSeconds:new Date(p.start?.dateTime??p.start?.date??0).getTime()-u,data:p}))},"items")},hz=ar({auth:le,name:"event_starts_in",classification:"READ",displayName:"Event Start (Time Before)",description:"Fires at a specified amount of time before an event starts (e.g., a reminder).",aiMetadata:{description:"Fires a configurable lead time (in minutes, hours, or days) before an event in the selected calendar begins, acting as a pre-event reminder. Each fired item is the upcoming event. Can watch all events or a single specific event."},props:{calendar_id:fe.calendarDropdown("writer"),specific_event:V.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:fe.eventDropdown(!1),time_value:V.Number({displayName:"Time Before",description:"The amount of time before the event starts.",required:!0,defaultValue:15}),time_unit:V.StaticDropdown({displayName:"Time Unit",required:!0,options:{options:[{label:"Minutes",value:"minutes"},{label:"Hours",value:"hours"},{label:"Days",value:"days"}]},defaultValue:"minutes"})},outputSchema:tt,type:"POLLING",sampleData:{},async onEnable(e){await nt.onEnable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(yh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var vh={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{calendar_id:o,search_term:r,event_types:i,search_fields:s}=t;if(!o||!r)return[];let u;n===0?(u=new Date,u.setDate(u.getDate()-1)):u=new Date(n);let d={singleEvents:"true",orderBy:"updated",updatedMin:u.toISOString(),q:r};i&&i.length>0&&i.forEach(p=>{d.eventTypes?d.eventTypes+="&eventTypes="+p:d.eventTypes=p});let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events`,authentication:{type:"BEARER_TOKEN",token:await $e(e)},queryParams:d};return(await Be.sendRequest(f)).body.items.filter(p=>{let y=new Date(p.created??0).getTime();if(!(new Date(p.updated??0).getTime()-y<5e3))return!1;if(s&&s.length>0){let b=r.toLowerCase();return s.some(k=>{switch(k){case"summary":return p.summary?.toLowerCase().includes(b)||!1;case"description":return p.description?.toLowerCase().includes(b)||!1;case"location":return p.location?.toLowerCase().includes(b)||!1;case"attendees":return p.attendees?.some(N=>N.email?.toLowerCase().includes(b)||N.displayName?.toLowerCase().includes(b))||!1;default:return!1}})}return!0}).map(p=>({epochMilliSeconds:new Date(p.updated).getTime(),data:p}))},"items")},gz=ar({auth:le,name:"new_event_matching_search",classification:"READ",displayName:"New Event Matching Search",description:"Fires when a new event is created that matches a specified search term.",aiMetadata:{description:"Fires when a newly created event in the selected calendar matches a required search term (matched across title, description, location, and attendees by default, or restricted to chosen fields). Each fired item is the matching new event; can also be filtered by event type."},props:{calendar_id:fe.calendarDropdown("writer"),search_term:V.ShortText({displayName:"Search Term",description:"The keyword(s) to search for in new events (searches across title, description, location, and attendees by default).",required:!0}),event_types:V.StaticMultiSelectDropdown({displayName:"Event Types",description:"Filter by specific event types (optional)",required:!1,options:{options:[{label:"Default Events",value:"default"},{label:"Birthday Events",value:"birthday"},{label:"Focus Time",value:"focusTime"},{label:"Out of Office",value:"outOfOffice"},{label:"Working Location",value:"workingLocation"},{label:"From Gmail",value:"fromGmail"}]}}),search_fields:V.StaticMultiSelectDropdown({displayName:"Search In Fields",description:"Specify which fields to search in (leave empty to use Google's default search across all fields)",required:!1,options:{options:[{label:"Event Title/Summary",value:"summary"},{label:"Event Description",value:"description"},{label:"Event Location",value:"location"},{label:"Attendee Names/Emails",value:"attendees"}]}})},outputSchema:tt,type:"POLLING",sampleData:{id:"abc123def456",summary:"Final Project Review",description:"Review of the Q3 final project deliverables.",status:"confirmed",created:"2025-08-14T09:05:00.000Z",updated:"2025-08-14T09:05:01.000Z",start:{dateTime:"2025-09-01T10:00:00-07:00"},end:{dateTime:"2025-09-01T11:30:00-07:00"},organizer:{email:"project.manager@example.com"}},async onEnable(e){await nt.onEnable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(vh,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var _h={strategy:0,items:a(async({auth:e,propsValue:t,lastFetchEpochMS:n})=>{let{calendar_id:o,specific_event:r,event_id:i,cancellation_reason:s}=t;if(!o)return[];if(r&&!i)return[];let u;n===0?(u=new Date,u.setDate(u.getDate()-1)):u=new Date(n);let d=[];if(r&&i){let f={method:"GET",url:`${fe.baseUrl}/calendars/${o}/events/${i}`,authentication:{type:"BEARER_TOKEN",token:await $e(e)}};try{let g=(await Be.sendRequest(f)).body;new Date(g.updated??0).getTime()>n&&g.status==="cancelled"&&(d=[g])}catch(h){return console.error("Error fetching specific event:",h),[]}}else d=(await pu(o,!0,e,u)).filter(h=>h.status==="cancelled");return s&&s.length>0&&(d=d.filter(f=>s.some(h=>{switch(h){case"deleted":return!f.summary||f.summary.includes("Deleted");case"declined":return f.attendees?.some(g=>g.responseStatus==="declined")||!1;case"rescheduled":return f.summary?.toLowerCase().includes("rescheduled")||f.description?.toLowerCase().includes("rescheduled")||!1;case"other":return!0;default:return!0}}))),d.map(f=>({epochMilliSeconds:new Date(f.updated).getTime(),data:f}))},"items")},yz=ar({auth:le,name:"event_cancelled",classification:"READ",displayName:"Event Cancelled",description:"Fires when an event is canceled or deleted.",aiMetadata:{description:"Fires when an event in the selected calendar transitions to a cancelled (or deleted) state, detected by polling. Each fired item is the cancelled event; can optionally be filtered by cancellation reason (deleted, attendee declined, rescheduled, other) and scoped to a single specific event."},props:{calendar_id:fe.calendarDropdown("writer"),specific_event:V.Checkbox({displayName:"Target Specific Event",description:"Enable to monitor a specific event instead of all events in the calendar.",required:!1,defaultValue:!1}),event_id:fe.eventDropdown(!1),cancellation_reason:V.StaticMultiSelectDropdown({displayName:"Cancellation Reasons",description:"Filter by specific types of cancellations (optional)",required:!1,options:{options:[{label:"Event Deleted",value:"deleted"},{label:"Attendee Declined",value:"declined"},{label:"Event Rescheduled",value:"rescheduled"},{label:"Other Cancellations",value:"other"}]}})},outputSchema:tt,type:"POLLING",sampleData:{id:"abc123def456_cancelled",summary:"Cancelled: Q3 Planning Session",status:"cancelled",created:"2025-07-20T10:00:00.000Z",updated:"2025-08-14T09:30:00.000Z",organizer:{email:"project.manager@example.com"},start:{dateTime:"2025-08-25T10:00:00-07:00"},end:{dateTime:"2025-08-25T11:30:00-07:00"}},async onEnable(e){await nt.onEnable(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return await nt.test(_h,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})}});var cP={strategy:1,items:a(async({auth:e,store:t,propsValue:n})=>{let{access_role_filter:o,calendar_name_filter:r,exclude_shared:i}=n,u=await Zt(e);if(o&&o.length>0&&(u=u.filter(m=>o.includes(m.accessRole))),r&&r.trim()){let m=r.toLowerCase().trim();u=u.filter(p=>p.summary?.toLowerCase().includes(m)||p.description?.toLowerCase().includes(m))}i&&(u=u.filter(m=>m.accessRole==="owner"||m.primary));let d=u.map(m=>m.id),f=await t.get("calendars")||[],h=new Set(f),g=u.filter(m=>!h.has(m.id));return await t.put("calendars",d),g.map(m=>({id:m.id,data:{...m,isOwned:m.accessRole==="owner"||m.primary,isShared:m.accessRole!=="owner"&&!m.primary,calendarType:m.primary?"primary":m.accessRole==="owner"?"owned":"shared"}}))},"items")},vz=ar({auth:le,name:"new_calendar",classification:"READ",displayName:"New Calendar",description:"Fires when a new calendar is created or becomes accessible.",aiMetadata:{description:"Fires when a calendar newly appears in the connected account's calendar list, whether created or shared in, detected by polling. Each fired item is the new calendar. Can be filtered by access role, a name/description text match, and an option to exclude shared calendars."},props:{access_role_filter:V.StaticMultiSelectDropdown({displayName:"Access Role Filter",description:"Only trigger for calendars with specific access roles (optional)",required:!1,options:{options:[{label:"Owner",value:"owner"},{label:"Writer",value:"writer"},{label:"Reader",value:"reader"},{label:"Free/Busy Reader",value:"freeBusyReader"}]}}),calendar_name_filter:V.ShortText({displayName:"Calendar Name Filter",description:"Only trigger for calendars containing this text in name or description (optional)",required:!1}),exclude_shared:V.Checkbox({displayName:"Exclude Shared Calendars",description:"Only trigger for calendars you own, not shared calendars",required:!1,defaultValue:!1})},outputSchema:_N,type:"POLLING",sampleData:{id:"sample_calendar_id@group.calendar.google.com",summary:"New Project Team Calendar",description:"A shared calendar for the new project team.",timeZone:"Asia/Kolkata",backgroundColor:"#9fe1e7",foregroundColor:"#000000",accessRole:"owner",isOwned:!0,isShared:!1,calendarType:"owned",primary:!1},async onEnable(e){let t=await Zt(e.auth),{access_role_filter:n,calendar_name_filter:o,exclude_shared:r}=e.propsValue,i=t;if(n&&n.length>0&&(i=i.filter(s=>n.includes(s.accessRole))),o&&o.trim()){let s=o.toLowerCase().trim();i=i.filter(u=>u.summary?.toLowerCase().includes(s)||u.description?.toLowerCase().includes(s))}r&&(i=i.filter(s=>s.accessRole==="owner"||s.primary)),await e.store.put("calendars",i.map(s=>s.id)),await nt.onEnable(cP,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async onDisable(e){await nt.onDisable(cP,{auth:e.auth,store:e.store,propsValue:e.propsValue})},async run(e){return await nt.poll(cP,{auth:e.auth,store:e.store,propsValue:e.propsValue,files:e.files})},async test(e){return(await Zt(e.auth)).slice(-1).map(o=>({id:o.id,data:{...o,isOwned:o.accessRole==="owner"||o.primary,isShared:o.accessRole!=="owner"&&!o.primary,calendarType:o.primary?"primary":o.accessRole==="owner"?"owned":"shared"}}))}});var BW=kI({minimumSupportedRelease:"0.86.4",logoUrl:"https://cdn.activepieces.com/pieces/google-calendar.png",categories:["PRODUCTIVITY"],displayName:"Google Calendar",description:"Get organized and stay on schedule",authors:["OsamaHaikal","bibhuty-did-this","Vitalini","pfernandez98","kishanprmr","MoShizzle","khaledmashaly","abuaboud","ikus060","Cloudieunnie","sanket-a11y","geekyme"],auth:le,actions:[FN,$N,kN,zN,MN,NN,BN,qN,VN,ZN,KN,YN,XN,QN,ez,tz,rz,nz,iz,sz,cz,uz,lz,dz,WC({auth:le,baseUrl(){return fe.baseUrl},authMapping:a(async e=>({Authorization:`Bearer ${await $e(e)}`}),"authMapping")})],triggers:[LN,fz,mz,hz,gz,yz,vz]});0&&(module.exports={createGoogleClient,getAccessToken,googleCalendar,googleCalendarAuth});
70
108
  /*! Bundled license information:
71
109
 
72
110
  mime-types/index.js: