diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..9c758cd --- /dev/null +++ b/dist/index.js @@ -0,0 +1,51 @@ +var JS=Object.create;var Ln=Object.defineProperty,KS=Object.defineProperties,VS=Object.getOwnPropertyDescriptor,YS=Object.getOwnPropertyDescriptors,XS=Object.getOwnPropertyNames,cl=Object.getOwnPropertySymbols,ZS=Object.getPrototypeOf,fl=Object.prototype.hasOwnProperty,QS=Object.prototype.propertyIsEnumerable;var ll=(t,r,i)=>r in t?Ln(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,M=(t,r)=>{for(var i in r||(r={}))fl.call(r,i)&&ll(t,i,r[i]);if(cl)for(var i of cl(r))QS.call(r,i)&&ll(t,i,r[i]);return t},qe=(t,r)=>KS(t,YS(r)),hl=t=>Ln(t,"__esModule",{value:!0});var F=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),eb=(t,r)=>{for(var i in r)Ln(t,i,{get:r[i],enumerable:!0})},dl=(t,r,i,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of XS(r))!fl.call(t,a)&&(i||a!=="default")&&Ln(t,a,{get:()=>r[a],enumerable:!(o=VS(r,a))||o.enumerable});return t},ur=(t,r)=>dl(hl(Ln(t!=null?JS(ZS(t)):{},"default",!r&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),tb=(t=>(r,i)=>t&&t.get(r)||(i=dl(hl({}),r,1),t&&t.set(r,i),i))(typeof WeakMap!="undefined"?new WeakMap:0);var Vi=F((Yr,Fn)=>{(function(){var t,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,g="__lodash_placeholder__",E=1,S=2,b=4,T=1,x=2,P=1,L=2,C=4,D=8,$=16,ee=32,Se=64,Pe=128,lt=256,nt=512,G=30,ne="...",ie=800,Re=16,Ce=1,Ae=2,be=3,_e=1/0,te=9007199254740991,Ye=17976931348623157e292,ye=0/0,bt=4294967295,sy=bt-1,oy=bt>>>1,ay=[["ary",Pe],["bind",P],["bindKey",L],["curry",D],["curryRight",$],["flip",nt],["partial",ee],["partialRight",Se],["rearg",lt]],Fr="[object Arguments]",ni="[object Array]",uy="[object AsyncFunction]",hn="[object Boolean]",dn="[object Date]",cy="[object DOMException]",ii="[object Error]",si="[object Function]",ku="[object GeneratorFunction]",xt="[object Map]",pn="[object Number]",fy="[object Null]",Mt="[object Object]",qu="[object Promise]",ly="[object Proxy]",mn="[object RegExp]",Tt="[object Set]",yn="[object String]",oi="[object Symbol]",hy="[object Undefined]",gn="[object WeakMap]",dy="[object WeakSet]",_n="[object ArrayBuffer]",Dr="[object DataView]",qs="[object Float32Array]",Is="[object Float64Array]",Ls="[object Int8Array]",Fs="[object Int16Array]",Ds="[object Int32Array]",Ns="[object Uint8Array]",Ms="[object Uint8ClampedArray]",Us="[object Uint16Array]",Hs="[object Uint32Array]",py=/\b__p \+= '';/g,my=/\b(__p \+=) '' \+/g,yy=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Iu=/&(?:amp|lt|gt|quot|#39);/g,Lu=/[&<>"']/g,gy=RegExp(Iu.source),_y=RegExp(Lu.source),vy=/<%-([\s\S]+?)%>/g,wy=/<%([\s\S]+?)%>/g,Fu=/<%=([\s\S]+?)%>/g,Ey=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sy=/^\w*$/,by=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bs=/[\\^$.*+?()[\]{}|]/g,xy=RegExp(Bs.source),$s=/^\s+/,Ty=/\s/,Cy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Py=/\{\n\/\* \[wrapped with (.+)\] \*/,Ry=/,? & /,Ay=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Oy=/[()=,{}\[\]\/\s]/,ky=/\\(\\)?/g,qy=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Du=/\w*$/,Iy=/^[-+]0x[0-9a-f]+$/i,Ly=/^0b[01]+$/i,Fy=/^\[object .+?Constructor\]$/,Dy=/^0o[0-7]+$/i,Ny=/^(?:0|[1-9]\d*)$/,My=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ai=/($^)/,Uy=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",Hy="\\u0300-\\u036f",By="\\ufe20-\\ufe2f",$y="\\u20d0-\\u20ff",Nu=Hy+By+$y,Mu="\\u2700-\\u27bf",Uu="a-z\\xdf-\\xf6\\xf8-\\xff",Wy="\\xac\\xb1\\xd7\\xf7",jy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",zy="\\u2000-\\u206f",Gy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Hu="A-Z\\xc0-\\xd6\\xd8-\\xde",Bu="\\ufe0e\\ufe0f",$u=Wy+jy+zy+Gy,Ws="['\u2019]",Jy="["+ui+"]",Wu="["+$u+"]",ci="["+Nu+"]",ju="\\d+",Ky="["+Mu+"]",zu="["+Uu+"]",Gu="[^"+ui+$u+ju+Mu+Uu+Hu+"]",js="\\ud83c[\\udffb-\\udfff]",Vy="(?:"+ci+"|"+js+")",Ju="[^"+ui+"]",zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Gs="[\\ud800-\\udbff][\\udc00-\\udfff]",Nr="["+Hu+"]",Ku="\\u200d",Vu="(?:"+zu+"|"+Gu+")",Yy="(?:"+Nr+"|"+Gu+")",Yu="(?:"+Ws+"(?:d|ll|m|re|s|t|ve))?",Xu="(?:"+Ws+"(?:D|LL|M|RE|S|T|VE))?",Zu=Vy+"?",Qu="["+Bu+"]?",Xy="(?:"+Ku+"(?:"+[Ju,zs,Gs].join("|")+")"+Qu+Zu+")*",Zy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ec=Qu+Zu+Xy,eg="(?:"+[Ky,zs,Gs].join("|")+")"+ec,tg="(?:"+[Ju+ci+"?",ci,zs,Gs,Jy].join("|")+")",rg=RegExp(Ws,"g"),ng=RegExp(ci,"g"),Js=RegExp(js+"(?="+js+")|"+tg+ec,"g"),ig=RegExp([Nr+"?"+zu+"+"+Yu+"(?="+[Wu,Nr,"$"].join("|")+")",Yy+"+"+Xu+"(?="+[Wu,Nr+Vu,"$"].join("|")+")",Nr+"?"+Vu+"+"+Yu,Nr+"+"+Xu,Qy,Zy,ju,eg].join("|"),"g"),sg=RegExp("["+Ku+ui+Nu+Bu+"]"),og=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ag=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ug=-1,pe={};pe[qs]=pe[Is]=pe[Ls]=pe[Fs]=pe[Ds]=pe[Ns]=pe[Ms]=pe[Us]=pe[Hs]=!0,pe[Fr]=pe[ni]=pe[_n]=pe[hn]=pe[Dr]=pe[dn]=pe[ii]=pe[si]=pe[xt]=pe[pn]=pe[Mt]=pe[mn]=pe[Tt]=pe[yn]=pe[gn]=!1;var he={};he[Fr]=he[ni]=he[_n]=he[Dr]=he[hn]=he[dn]=he[qs]=he[Is]=he[Ls]=he[Fs]=he[Ds]=he[xt]=he[pn]=he[Mt]=he[mn]=he[Tt]=he[yn]=he[oi]=he[Ns]=he[Ms]=he[Us]=he[Hs]=!0,he[ii]=he[si]=he[gn]=!1;var cg={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},fg={"&":"&","<":"<",">":">",'"':""","'":"'"},lg={"&":"&","<":"<",">":">",""":'"',"'":"'"},hg={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dg=parseFloat,pg=parseInt,tc=typeof global=="object"&&global&&global.Object===Object&&global,mg=typeof self=="object"&&self&&self.Object===Object&&self,Le=tc||mg||Function("return this")(),Ks=typeof Yr=="object"&&Yr&&!Yr.nodeType&&Yr,vr=Ks&&typeof Fn=="object"&&Fn&&!Fn.nodeType&&Fn,rc=vr&&vr.exports===Ks,Vs=rc&&tc.process,ht=function(){try{var v=vr&&vr.require&&vr.require("util").types;return v||Vs&&Vs.binding&&Vs.binding("util")}catch{}}(),nc=ht&&ht.isArrayBuffer,ic=ht&&ht.isDate,sc=ht&&ht.isMap,oc=ht&&ht.isRegExp,ac=ht&&ht.isSet,uc=ht&&ht.isTypedArray;function it(v,O,R){switch(R.length){case 0:return v.call(O);case 1:return v.call(O,R[0]);case 2:return v.call(O,R[0],R[1]);case 3:return v.call(O,R[0],R[1],R[2])}return v.apply(O,R)}function yg(v,O,R,H){for(var J=-1,ae=v==null?0:v.length;++J-1}function Ys(v,O,R){for(var H=-1,J=v==null?0:v.length;++H-1;);return R}function yc(v,O){for(var R=v.length;R--&&Mr(O,v[R],0)>-1;);return R}function Tg(v,O){for(var R=v.length,H=0;R--;)v[R]===O&&++H;return H}var Cg=eo(cg),Pg=eo(fg);function Rg(v){return"\\"+hg[v]}function Ag(v,O){return v==null?t:v[O]}function Ur(v){return sg.test(v)}function Og(v){return og.test(v)}function kg(v){for(var O,R=[];!(O=v.next()).done;)R.push(O.value);return R}function io(v){var O=-1,R=Array(v.size);return v.forEach(function(H,J){R[++O]=[J,H]}),R}function gc(v,O){return function(R){return v(O(R))}}function er(v,O){for(var R=-1,H=v.length,J=0,ae=[];++R-1}function __(e,n){var s=this.__data__,u=Pi(s,e);return u<0?(++this.size,s.push([e,n])):s[u][1]=n,this}Ut.prototype.clear=p_,Ut.prototype.delete=m_,Ut.prototype.get=y_,Ut.prototype.has=g_,Ut.prototype.set=__;function Ht(e){var n=-1,s=e==null?0:e.length;for(this.clear();++n=n?e:n)),e}function yt(e,n,s,u,l,p){var m,_=n&E,w=n&S,k=n&b;if(s&&(m=l?s(e,u,l,p):s(e)),m!==t)return m;if(!ve(e))return e;var q=K(e);if(q){if(m=Sv(e),!_)return Xe(e,m)}else{var I=Be(e),U=I==si||I==ku;if(ar(e))return Qc(e,_);if(I==Mt||I==Fr||U&&!l){if(m=w||U?{}:vf(e),!_)return w?lv(e,L_(m,e)):fv(e,Ac(m,e))}else{if(!he[I])return l?e:{};m=bv(e,I,_)}}p||(p=new Pt);var B=p.get(e);if(B)return B;p.set(e,m),Kf(e)?e.forEach(function(z){m.add(yt(z,n,s,z,e,p))}):Gf(e)&&e.forEach(function(z,Z){m.set(Z,yt(z,n,s,Z,e,p))});var j=k?w?ko:Oo:w?Qe:Fe,Y=q?t:j(e);return dt(Y||e,function(z,Z){Y&&(Z=z,z=e[Z]),Tn(m,Z,yt(z,n,s,Z,e,p))}),m}function F_(e){var n=Fe(e);return function(s){return Oc(s,e,n)}}function Oc(e,n,s){var u=s.length;if(e==null)return!u;for(e=fe(e);u--;){var l=s[u],p=n[l],m=e[l];if(m===t&&!(l in e)||!p(m))return!1}return!0}function kc(e,n,s){if(typeof e!="function")throw new pt(a);return qn(function(){e.apply(t,s)},n)}function Cn(e,n,s,u){var l=-1,p=fi,m=!0,_=e.length,w=[],k=n.length;if(!_)return w;s&&(n=ge(n,st(s))),u?(p=Ys,m=!1):n.length>=i&&(p=vn,m=!1,n=new Sr(n));e:for(;++l<_;){var q=e[l],I=s==null?q:s(q);if(q=u||q!==0?q:0,m&&I===I){for(var U=k;U--;)if(n[U]===I)continue e;w.push(q)}else p(n,I,u)||w.push(q)}return w}var nr=sf(It),qc=sf(ho,!0);function D_(e,n){var s=!0;return nr(e,function(u,l,p){return s=!!n(u,l,p),s}),s}function Ri(e,n,s){for(var u=-1,l=e.length;++ul?0:l+s),u=u===t||u>l?l:V(u),u<0&&(u+=l),u=s>u?0:Yf(u);s0&&s(_)?n>1?Ne(_,n-1,s,u,l):Qt(l,_):u||(l[l.length]=_)}return l}var lo=of(),Lc=of(!0);function It(e,n){return e&&lo(e,n,Fe)}function ho(e,n){return e&&Lc(e,n,Fe)}function Ai(e,n){return Zt(n,function(s){return zt(e[s])})}function xr(e,n){n=sr(n,e);for(var s=0,u=n.length;e!=null&&sn}function M_(e,n){return e!=null&&ce.call(e,n)}function U_(e,n){return e!=null&&n in fe(e)}function H_(e,n,s){return e>=He(n,s)&&e=120&&q.length>=120)?new Sr(m&&q):t}q=e[0];var I=-1,U=_[0];e:for(;++I-1;)_!==e&&wi.call(_,w,1),wi.call(e,w,1);return e}function zc(e,n){for(var s=e?n.length:0,u=s-1;s--;){var l=n[s];if(s==u||l!==p){var p=l;jt(l)?wi.call(e,l,1):bo(e,l)}}return e}function wo(e,n){return e+bi(Tc()*(n-e+1))}function Q_(e,n,s,u){for(var l=-1,p=ke(Si((n-e)/(s||1)),0),m=R(p);p--;)m[u?p:++l]=e,e+=s;return m}function Eo(e,n){var s="";if(!e||n<1||n>te)return s;do n%2&&(s+=e),n=bi(n/2),n&&(e+=e);while(n);return s}function X(e,n){return Mo(Sf(e,n,et),e+"")}function ev(e){return Rc(Vr(e))}function tv(e,n){var s=Vr(e);return Hi(s,br(n,0,s.length))}function An(e,n,s,u){if(!ve(e))return e;n=sr(n,e);for(var l=-1,p=n.length,m=p-1,_=e;_!=null&&++ll?0:l+n),s=s>l?l:s,s<0&&(s+=l),l=n>s?0:s-n>>>0,n>>>=0;for(var p=R(l);++u>>1,m=e[p];m!==null&&!at(m)&&(s?m<=n:m=i){var k=n?null:mv(e);if(k)return hi(k);m=!1,l=vn,w=new Sr}else w=n?[]:_;e:for(;++u=u?e:gt(e,n,s)}var Zc=Gg||function(e){return Le.clearTimeout(e)};function Qc(e,n){if(n)return e.slice();var s=e.length,u=wc?wc(s):new e.constructor(s);return e.copy(u),u}function Po(e){var n=new e.constructor(e.byteLength);return new _i(n).set(new _i(e)),n}function ov(e,n){var s=n?Po(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function av(e){var n=new e.constructor(e.source,Du.exec(e));return n.lastIndex=e.lastIndex,n}function uv(e){return xn?fe(xn.call(e)):{}}function ef(e,n){var s=n?Po(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function tf(e,n){if(e!==n){var s=e!==t,u=e===null,l=e===e,p=at(e),m=n!==t,_=n===null,w=n===n,k=at(n);if(!_&&!k&&!p&&e>n||p&&m&&w&&!_&&!k||u&&m&&w||!s&&w||!l)return 1;if(!u&&!p&&!k&&e=_)return w;var k=s[u];return w*(k=="desc"?-1:1)}}return e.index-n.index}function rf(e,n,s,u){for(var l=-1,p=e.length,m=s.length,_=-1,w=n.length,k=ke(p-m,0),q=R(w+k),I=!u;++_1?s[l-1]:t,m=l>2?s[2]:t;for(p=e.length>3&&typeof p=="function"?(l--,p):t,m&&ze(s[0],s[1],m)&&(p=l<3?t:p,l=1),n=fe(n);++u-1?l[p?n[m]:m]:t}}function cf(e){return Wt(function(n){var s=n.length,u=s,l=mt.prototype.thru;for(e&&n.reverse();u--;){var p=n[u];if(typeof p!="function")throw new pt(a);if(l&&!m&&Mi(p)=="wrapper")var m=new mt([],!0)}for(u=m?u:s;++u1&&re.reverse(),q&&w_))return!1;var k=p.get(e),q=p.get(n);if(k&&q)return k==n&&q==e;var I=-1,U=!0,B=s&x?new Sr:t;for(p.set(e,n),p.set(n,e);++I<_;){var j=e[I],Y=n[I];if(u)var z=m?u(Y,j,I,n,e,p):u(j,Y,I,e,n,p);if(z!==t){if(z)continue;U=!1;break}if(B){if(!Zs(n,function(Z,re){if(!vn(B,re)&&(j===Z||l(j,Z,s,u,p)))return B.push(re)})){U=!1;break}}else if(!(j===Y||l(j,Y,s,u,p))){U=!1;break}}return p.delete(e),p.delete(n),U}function gv(e,n,s,u,l,p,m){switch(s){case Dr:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case _n:return!(e.byteLength!=n.byteLength||!p(new _i(e),new _i(n)));case hn:case dn:case pn:return Rt(+e,+n);case ii:return e.name==n.name&&e.message==n.message;case mn:case yn:return e==n+"";case xt:var _=io;case Tt:var w=u&T;if(_||(_=hi),e.size!=n.size&&!w)return!1;var k=m.get(e);if(k)return k==n;u|=x,m.set(e,n);var q=yf(_(e),_(n),u,l,p,m);return m.delete(e),q;case oi:if(xn)return xn.call(e)==xn.call(n)}return!1}function _v(e,n,s,u,l,p){var m=s&T,_=Oo(e),w=_.length,k=Oo(n),q=k.length;if(w!=q&&!m)return!1;for(var I=w;I--;){var U=_[I];if(!(m?U in n:ce.call(n,U)))return!1}var B=p.get(e),j=p.get(n);if(B&&j)return B==n&&j==e;var Y=!0;p.set(e,n),p.set(n,e);for(var z=m;++I1?"& ":"")+n[u],n=n.join(s>2?", ":" "),e.replace(Cy,`{ +/* [wrapped with `+n+`] */ +`)}function Tv(e){return K(e)||Pr(e)||!!(bc&&e&&e[bc])}function jt(e,n){var s=typeof e;return n=n==null?te:n,!!n&&(s=="number"||s!="symbol"&&Ny.test(e))&&e>-1&&e%1==0&&e0){if(++n>=ie)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Hi(e,n){var s=-1,u=e.length,l=u-1;for(n=n===t?u:n;++s1?e[n-1]:t;return s=typeof s=="function"?(e.pop(),s):t,Lf(e,s)});function Ff(e){var n=h(e);return n.__chain__=!0,n}function Dw(e,n){return n(e),e}function Bi(e,n){return n(e)}var Nw=Wt(function(e){var n=e.length,s=n?e[0]:0,u=this.__wrapped__,l=function(p){return fo(p,e)};return n>1||this.__actions__.length||!(u instanceof Q)||!jt(s)?this.thru(l):(u=u.slice(s,+s+(n?1:0)),u.__actions__.push({func:Bi,args:[l],thisArg:t}),new mt(u,this.__chain__).thru(function(p){return n&&!p.length&&p.push(t),p}))});function Mw(){return Ff(this)}function Uw(){return new mt(this.value(),this.__chain__)}function Hw(){this.__values__===t&&(this.__values__=Vf(this.value()));var e=this.__index__>=this.__values__.length,n=e?t:this.__values__[this.__index__++];return{done:e,value:n}}function Bw(){return this}function $w(e){for(var n,s=this;s instanceof Ci;){var u=Rf(s);u.__index__=0,u.__values__=t,n?l.__wrapped__=u:n=u;var l=u;s=s.__wrapped__}return l.__wrapped__=e,n}function Ww(){var e=this.__wrapped__;if(e instanceof Q){var n=e;return this.__actions__.length&&(n=new Q(this)),n=n.reverse(),n.__actions__.push({func:Bi,args:[Uo],thisArg:t}),new mt(n,this.__chain__)}return this.thru(Uo)}function jw(){return Yc(this.__wrapped__,this.__actions__)}var zw=Ii(function(e,n,s){ce.call(e,s)?++e[s]:Bt(e,s,1)});function Gw(e,n,s){var u=K(e)?cc:D_;return s&&ze(e,n,s)&&(n=t),u(e,W(n,3))}function Jw(e,n){var s=K(e)?Zt:Ic;return s(e,W(n,3))}var Kw=uf(Af),Vw=uf(Of);function Yw(e,n){return Ne($i(e,n),1)}function Xw(e,n){return Ne($i(e,n),_e)}function Zw(e,n,s){return s=s===t?1:V(s),Ne($i(e,n),s)}function Df(e,n){var s=K(e)?dt:nr;return s(e,W(n,3))}function Nf(e,n){var s=K(e)?gg:qc;return s(e,W(n,3))}var Qw=Ii(function(e,n,s){ce.call(e,s)?e[s].push(n):Bt(e,s,[n])});function e0(e,n,s,u){e=Ze(e)?e:Vr(e),s=s&&!u?V(s):0;var l=e.length;return s<0&&(s=ke(l+s,0)),Ji(e)?s<=l&&e.indexOf(n,s)>-1:!!l&&Mr(e,n,s)>-1}var t0=X(function(e,n,s){var u=-1,l=typeof n=="function",p=Ze(e)?R(e.length):[];return nr(e,function(m){p[++u]=l?it(n,m,s):Pn(m,n,s)}),p}),r0=Ii(function(e,n,s){Bt(e,s,n)});function $i(e,n){var s=K(e)?ge:Uc;return s(e,W(n,3))}function n0(e,n,s,u){return e==null?[]:(K(n)||(n=n==null?[]:[n]),s=u?t:s,K(s)||(s=s==null?[]:[s]),Wc(e,n,s))}var i0=Ii(function(e,n,s){e[s?0:1].push(n)},function(){return[[],[]]});function s0(e,n,s){var u=K(e)?Xs:dc,l=arguments.length<3;return u(e,W(n,4),s,l,nr)}function o0(e,n,s){var u=K(e)?_g:dc,l=arguments.length<3;return u(e,W(n,4),s,l,qc)}function a0(e,n){var s=K(e)?Zt:Ic;return s(e,zi(W(n,3)))}function u0(e){var n=K(e)?Rc:ev;return n(e)}function c0(e,n,s){(s?ze(e,n,s):n===t)?n=1:n=V(n);var u=K(e)?k_:tv;return u(e,n)}function f0(e){var n=K(e)?q_:nv;return n(e)}function l0(e){if(e==null)return 0;if(Ze(e))return Ji(e)?Hr(e):e.length;var n=Be(e);return n==xt||n==Tt?e.size:go(e).length}function h0(e,n,s){var u=K(e)?Zs:iv;return s&&ze(e,n,s)&&(n=t),u(e,W(n,3))}var d0=X(function(e,n){if(e==null)return[];var s=n.length;return s>1&&ze(e,n[0],n[1])?n=[]:s>2&&ze(n[0],n[1],n[2])&&(n=[n[0]]),Wc(e,Ne(n,1),[])}),Wi=Jg||function(){return Le.Date.now()};function p0(e,n){if(typeof n!="function")throw new pt(a);return e=V(e),function(){if(--e<1)return n.apply(this,arguments)}}function Mf(e,n,s){return n=s?t:n,n=e&&n==null?e.length:n,$t(e,Pe,t,t,t,t,n)}function Uf(e,n){var s;if(typeof n!="function")throw new pt(a);return e=V(e),function(){return--e>0&&(s=n.apply(this,arguments)),e<=1&&(n=t),s}}var Bo=X(function(e,n,s){var u=P;if(s.length){var l=er(s,Jr(Bo));u|=ee}return $t(e,u,n,s,l)}),Hf=X(function(e,n,s){var u=P|L;if(s.length){var l=er(s,Jr(Hf));u|=ee}return $t(n,u,e,s,l)});function Bf(e,n,s){n=s?t:n;var u=$t(e,D,t,t,t,t,t,n);return u.placeholder=Bf.placeholder,u}function $f(e,n,s){n=s?t:n;var u=$t(e,$,t,t,t,t,t,n);return u.placeholder=$f.placeholder,u}function Wf(e,n,s){var u,l,p,m,_,w,k=0,q=!1,I=!1,U=!0;if(typeof e!="function")throw new pt(a);n=vt(n)||0,ve(s)&&(q=!!s.leading,I="maxWait"in s,p=I?ke(vt(s.maxWait)||0,n):p,U="trailing"in s?!!s.trailing:U);function B(Te){var At=u,Jt=l;return u=l=t,k=Te,m=e.apply(Jt,At),m}function j(Te){return k=Te,_=qn(Z,n),q?B(Te):m}function Y(Te){var At=Te-w,Jt=Te-k,ul=n-At;return I?He(ul,p-Jt):ul}function z(Te){var At=Te-w,Jt=Te-k;return w===t||At>=n||At<0||I&&Jt>=p}function Z(){var Te=Wi();if(z(Te))return re(Te);_=qn(Z,Y(Te))}function re(Te){return _=t,U&&u?B(Te):(u=l=t,m)}function ut(){_!==t&&Zc(_),k=0,u=w=l=_=t}function Ge(){return _===t?m:re(Wi())}function ct(){var Te=Wi(),At=z(Te);if(u=arguments,l=this,w=Te,At){if(_===t)return j(w);if(I)return Zc(_),_=qn(Z,n),B(w)}return _===t&&(_=qn(Z,n)),m}return ct.cancel=ut,ct.flush=Ge,ct}var m0=X(function(e,n){return kc(e,1,n)}),y0=X(function(e,n,s){return kc(e,vt(n)||0,s)});function g0(e){return $t(e,nt)}function ji(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new pt(a);var s=function(){var u=arguments,l=n?n.apply(this,u):u[0],p=s.cache;if(p.has(l))return p.get(l);var m=e.apply(this,u);return s.cache=p.set(l,m)||p,m};return s.cache=new(ji.Cache||Ht),s}ji.Cache=Ht;function zi(e){if(typeof e!="function")throw new pt(a);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function _0(e){return Uf(2,e)}var v0=sv(function(e,n){n=n.length==1&&K(n[0])?ge(n[0],st(W())):ge(Ne(n,1),st(W()));var s=n.length;return X(function(u){for(var l=-1,p=He(u.length,s);++l=n}),Pr=Dc(function(){return arguments}())?Dc:function(e){return Ee(e)&&ce.call(e,"callee")&&!Sc.call(e,"callee")},K=R.isArray,L0=nc?st(nc):$_;function Ze(e){return e!=null&&Gi(e.length)&&!zt(e)}function xe(e){return Ee(e)&&Ze(e)}function F0(e){return e===!0||e===!1||Ee(e)&&je(e)==hn}var ar=Vg||Qo,D0=ic?st(ic):W_;function N0(e){return Ee(e)&&e.nodeType===1&&!In(e)}function M0(e){if(e==null)return!0;if(Ze(e)&&(K(e)||typeof e=="string"||typeof e.splice=="function"||ar(e)||Kr(e)||Pr(e)))return!e.length;var n=Be(e);if(n==xt||n==Tt)return!e.size;if(kn(e))return!go(e).length;for(var s in e)if(ce.call(e,s))return!1;return!0}function U0(e,n){return Rn(e,n)}function H0(e,n,s){s=typeof s=="function"?s:t;var u=s?s(e,n):t;return u===t?Rn(e,n,t,s):!!u}function Wo(e){if(!Ee(e))return!1;var n=je(e);return n==ii||n==cy||typeof e.message=="string"&&typeof e.name=="string"&&!In(e)}function B0(e){return typeof e=="number"&&xc(e)}function zt(e){if(!ve(e))return!1;var n=je(e);return n==si||n==ku||n==uy||n==ly}function zf(e){return typeof e=="number"&&e==V(e)}function Gi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=te}function ve(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function Ee(e){return e!=null&&typeof e=="object"}var Gf=sc?st(sc):z_;function $0(e,n){return e===n||yo(e,n,Io(n))}function W0(e,n,s){return s=typeof s=="function"?s:t,yo(e,n,Io(n),s)}function j0(e){return Jf(e)&&e!=+e}function z0(e){if(Rv(e))throw new J(o);return Nc(e)}function G0(e){return e===null}function J0(e){return e==null}function Jf(e){return typeof e=="number"||Ee(e)&&je(e)==pn}function In(e){if(!Ee(e)||je(e)!=Mt)return!1;var n=vi(e);if(n===null)return!0;var s=ce.call(n,"constructor")&&n.constructor;return typeof s=="function"&&s instanceof s&&mi.call(s)==Wg}var jo=oc?st(oc):G_;function K0(e){return zf(e)&&e>=-te&&e<=te}var Kf=ac?st(ac):J_;function Ji(e){return typeof e=="string"||!K(e)&&Ee(e)&&je(e)==yn}function at(e){return typeof e=="symbol"||Ee(e)&&je(e)==oi}var Kr=uc?st(uc):K_;function V0(e){return e===t}function Y0(e){return Ee(e)&&Be(e)==gn}function X0(e){return Ee(e)&&je(e)==dy}var Z0=Ni(_o),Q0=Ni(function(e,n){return e<=n});function Vf(e){if(!e)return[];if(Ze(e))return Ji(e)?Ct(e):Xe(e);if(wn&&e[wn])return kg(e[wn]());var n=Be(e),s=n==xt?io:n==Tt?hi:Vr;return s(e)}function Gt(e){if(!e)return e===0?e:0;if(e=vt(e),e===_e||e===-_e){var n=e<0?-1:1;return n*Ye}return e===e?e:0}function V(e){var n=Gt(e),s=n%1;return n===n?s?n-s:n:0}function Yf(e){return e?br(V(e),0,bt):0}function vt(e){if(typeof e=="number")return e;if(at(e))return ye;if(ve(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ve(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=pc(e);var s=Ly.test(e);return s||Dy.test(e)?pg(e.slice(2),s?2:8):Iy.test(e)?ye:+e}function Xf(e){return Lt(e,Qe(e))}function eE(e){return e?br(V(e),-te,te):e===0?e:0}function ue(e){return e==null?"":ot(e)}var tE=zr(function(e,n){if(kn(n)||Ze(n)){Lt(n,Fe(n),e);return}for(var s in n)ce.call(n,s)&&Tn(e,s,n[s])}),Zf=zr(function(e,n){Lt(n,Qe(n),e)}),Ki=zr(function(e,n,s,u){Lt(n,Qe(n),e,u)}),rE=zr(function(e,n,s,u){Lt(n,Fe(n),e,u)}),nE=Wt(fo);function iE(e,n){var s=jr(e);return n==null?s:Ac(s,n)}var sE=X(function(e,n){e=fe(e);var s=-1,u=n.length,l=u>2?n[2]:t;for(l&&ze(n[0],n[1],l)&&(u=1);++s1),p}),Lt(e,ko(e),s),u&&(s=yt(s,E|S|b,yv));for(var l=n.length;l--;)bo(s,n[l]);return s});function bE(e,n){return el(e,zi(W(n)))}var xE=Wt(function(e,n){return e==null?{}:X_(e,n)});function el(e,n){if(e==null)return{};var s=ge(ko(e),function(u){return[u]});return n=W(n),jc(e,s,function(u,l){return n(u,l[0])})}function TE(e,n,s){n=sr(n,e);var u=-1,l=n.length;for(l||(l=1,e=t);++un){var u=e;e=n,n=u}if(s||e%1||n%1){var l=Tc();return He(e+l*(n-e+dg("1e-"+((l+"").length-1))),n)}return wo(e,n)}var DE=Gr(function(e,n,s){return n=n.toLowerCase(),e+(s?nl(n):n)});function nl(e){return Jo(ue(e).toLowerCase())}function il(e){return e=ue(e),e&&e.replace(My,Cg).replace(ng,"")}function NE(e,n,s){e=ue(e),n=ot(n);var u=e.length;s=s===t?u:br(V(s),0,u);var l=s;return s-=n.length,s>=0&&e.slice(s,l)==n}function ME(e){return e=ue(e),e&&_y.test(e)?e.replace(Lu,Pg):e}function UE(e){return e=ue(e),e&&xy.test(e)?e.replace(Bs,"\\$&"):e}var HE=Gr(function(e,n,s){return e+(s?"-":"")+n.toLowerCase()}),BE=Gr(function(e,n,s){return e+(s?" ":"")+n.toLowerCase()}),$E=af("toLowerCase");function WE(e,n,s){e=ue(e),n=V(n);var u=n?Hr(e):0;if(!n||u>=n)return e;var l=(n-u)/2;return Di(bi(l),s)+e+Di(Si(l),s)}function jE(e,n,s){e=ue(e),n=V(n);var u=n?Hr(e):0;return n&&u>>0,s?(e=ue(e),e&&(typeof n=="string"||n!=null&&!jo(n))&&(n=ot(n),!n&&Ur(e))?or(Ct(e),0,s):e.split(n,s)):[]}var XE=Gr(function(e,n,s){return e+(s?" ":"")+Jo(n)});function ZE(e,n,s){return e=ue(e),s=s==null?0:br(V(s),0,e.length),n=ot(n),e.slice(s,s+n.length)==n}function QE(e,n,s){var u=h.templateSettings;s&&ze(e,n,s)&&(n=t),e=ue(e),n=Ki({},n,u,pf);var l=Ki({},n.imports,u.imports,pf),p=Fe(l),m=no(l,p),_,w,k=0,q=n.interpolate||ai,I="__p += '",U=so((n.escape||ai).source+"|"+q.source+"|"+(q===Fu?qy:ai).source+"|"+(n.evaluate||ai).source+"|$","g"),B="//# sourceURL="+(ce.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ug+"]")+` +`;e.replace(U,function(z,Z,re,ut,Ge,ct){return re||(re=ut),I+=e.slice(k,ct).replace(Uy,Rg),Z&&(_=!0,I+=`' + +__e(`+Z+`) + +'`),Ge&&(w=!0,I+=`'; +`+Ge+`; +__p += '`),re&&(I+=`' + +((__t = (`+re+`)) == null ? '' : __t) + +'`),k=ct+z.length,z}),I+=`'; +`;var j=ce.call(n,"variable")&&n.variable;if(!j)I=`with (obj) { +`+I+` +} +`;else if(Oy.test(j))throw new J(c);I=(w?I.replace(py,""):I).replace(my,"$1").replace(yy,"$1;"),I="function("+(j||"obj")+`) { +`+(j?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(w?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+I+`return __p +}`;var Y=ol(function(){return ae(p,B+"return "+I).apply(t,m)});if(Y.source=I,Wo(Y))throw Y;return Y}function eS(e){return ue(e).toLowerCase()}function tS(e){return ue(e).toUpperCase()}function rS(e,n,s){if(e=ue(e),e&&(s||n===t))return pc(e);if(!e||!(n=ot(n)))return e;var u=Ct(e),l=Ct(n),p=mc(u,l),m=yc(u,l)+1;return or(u,p,m).join("")}function nS(e,n,s){if(e=ue(e),e&&(s||n===t))return e.slice(0,_c(e)+1);if(!e||!(n=ot(n)))return e;var u=Ct(e),l=yc(u,Ct(n))+1;return or(u,0,l).join("")}function iS(e,n,s){if(e=ue(e),e&&(s||n===t))return e.replace($s,"");if(!e||!(n=ot(n)))return e;var u=Ct(e),l=mc(u,Ct(n));return or(u,l).join("")}function sS(e,n){var s=G,u=ne;if(ve(n)){var l="separator"in n?n.separator:l;s="length"in n?V(n.length):s,u="omission"in n?ot(n.omission):u}e=ue(e);var p=e.length;if(Ur(e)){var m=Ct(e);p=m.length}if(s>=p)return e;var _=s-Hr(u);if(_<1)return u;var w=m?or(m,0,_).join(""):e.slice(0,_);if(l===t)return w+u;if(m&&(_+=w.length-_),jo(l)){if(e.slice(_).search(l)){var k,q=w;for(l.global||(l=so(l.source,ue(Du.exec(l))+"g")),l.lastIndex=0;k=l.exec(q);)var I=k.index;w=w.slice(0,I===t?_:I)}}else if(e.indexOf(ot(l),_)!=_){var U=w.lastIndexOf(l);U>-1&&(w=w.slice(0,U))}return w+u}function oS(e){return e=ue(e),e&&gy.test(e)?e.replace(Iu,Fg):e}var aS=Gr(function(e,n,s){return e+(s?" ":"")+n.toUpperCase()}),Jo=af("toUpperCase");function sl(e,n,s){return e=ue(e),n=s?t:n,n===t?Og(e)?Mg(e):Eg(e):e.match(n)||[]}var ol=X(function(e,n){try{return it(e,t,n)}catch(s){return Wo(s)?s:new J(s)}}),uS=Wt(function(e,n){return dt(n,function(s){s=Ft(s),Bt(e,s,Bo(e[s],e))}),e});function cS(e){var n=e==null?0:e.length,s=W();return e=n?ge(e,function(u){if(typeof u[1]!="function")throw new pt(a);return[s(u[0]),u[1]]}):[],X(function(u){for(var l=-1;++lte)return[];var s=bt,u=He(e,bt);n=W(n),e-=bt;for(var l=ro(u,n);++s0||n<0)?new Q(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),n!==t&&(n=V(n),s=n<0?s.dropRight(-n):s.take(n-e)),s)},Q.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Q.prototype.toArray=function(){return this.take(bt)},It(Q.prototype,function(e,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),u=/^(?:head|last)$/.test(n),l=h[u?"take"+(n=="last"?"Right":""):n],p=u||/^find/.test(n);!l||(h.prototype[n]=function(){var m=this.__wrapped__,_=u?[1]:arguments,w=m instanceof Q,k=_[0],q=w||K(m),I=function(Z){var re=l.apply(h,Qt([Z],_));return u&&U?re[0]:re};q&&s&&typeof k=="function"&&k.length!=1&&(w=q=!1);var U=this.__chain__,B=!!this.__actions__.length,j=p&&!U,Y=w&&!B;if(!p&&q){m=Y?m:new Q(this);var z=e.apply(m,_);return z.__actions__.push({func:Bi,args:[I],thisArg:t}),new mt(z,U)}return j&&Y?e.apply(this,_):(z=this.thru(I),j?u?z.value()[0]:z.value():z)})}),dt(["pop","push","shift","sort","splice","unshift"],function(e){var n=di[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);h.prototype[e]=function(){var l=arguments;if(u&&!this.__chain__){var p=this.value();return n.apply(K(p)?p:[],l)}return this[s](function(m){return n.apply(K(m)?m:[],l)})}}),It(Q.prototype,function(e,n){var s=h[n];if(s){var u=s.name+"";ce.call(Wr,u)||(Wr[u]=[]),Wr[u].push({name:n,func:s})}}),Wr[Li(t,L).name]=[{name:"wrapper",func:t}],Q.prototype.clone=o_,Q.prototype.reverse=a_,Q.prototype.value=u_,h.prototype.at=Nw,h.prototype.chain=Mw,h.prototype.commit=Uw,h.prototype.next=Hw,h.prototype.plant=$w,h.prototype.reverse=Ww,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=jw,h.prototype.first=h.prototype.head,wn&&(h.prototype[wn]=Bw),h},tr=Ug();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Le._=tr,define(function(){return tr})):vr?((vr.exports=tr)._=tr,Ks._=tr):Le._=tr}).call(Yr)});var Vt=F((Kt,Yi)=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});var yl=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function rb(t){return yl.includes(t)}var nb=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...yl];function ib(t){return nb.includes(t)}var sb=["null","undefined","string","number","bigint","boolean","symbol"];function ob(t){return sb.includes(t)}function Xr(t){return r=>typeof r===t}var{toString:gl}=Object.prototype,Dn=t=>{let r=gl.call(t).slice(8,-1);if(/HTML\w+Element/.test(r)&&y.domElement(t))return"HTMLElement";if(ib(r))return r},de=t=>r=>Dn(r)===t;function y(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(y.observable(t))return"Observable";if(y.array(t))return"Array";if(y.buffer(t))return"Buffer";let r=Dn(t);if(r)return r;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}y.undefined=Xr("undefined");y.string=Xr("string");var ab=Xr("number");y.number=t=>ab(t)&&!y.nan(t);y.bigint=Xr("bigint");y.function_=Xr("function");y.null_=t=>t===null;y.class_=t=>y.function_(t)&&t.toString().startsWith("class ");y.boolean=t=>t===!0||t===!1;y.symbol=Xr("symbol");y.numericString=t=>y.string(t)&&!y.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));y.array=(t,r)=>Array.isArray(t)?y.function_(r)?t.every(r):!0:!1;y.buffer=t=>{var r,i,o,a;return(a=(o=(i=(r=t)===null||r===void 0?void 0:r.constructor)===null||i===void 0?void 0:i.isBuffer)===null||o===void 0?void 0:o.call(i,t))!==null&&a!==void 0?a:!1};y.nullOrUndefined=t=>y.null_(t)||y.undefined(t);y.object=t=>!y.null_(t)&&(typeof t=="object"||y.function_(t));y.iterable=t=>{var r;return y.function_((r=t)===null||r===void 0?void 0:r[Symbol.iterator])};y.asyncIterable=t=>{var r;return y.function_((r=t)===null||r===void 0?void 0:r[Symbol.asyncIterator])};y.generator=t=>y.iterable(t)&&y.function_(t.next)&&y.function_(t.throw);y.asyncGenerator=t=>y.asyncIterable(t)&&y.function_(t.next)&&y.function_(t.throw);y.nativePromise=t=>de("Promise")(t);var ub=t=>{var r,i;return y.function_((r=t)===null||r===void 0?void 0:r.then)&&y.function_((i=t)===null||i===void 0?void 0:i.catch)};y.promise=t=>y.nativePromise(t)||ub(t);y.generatorFunction=de("GeneratorFunction");y.asyncGeneratorFunction=t=>Dn(t)==="AsyncGeneratorFunction";y.asyncFunction=t=>Dn(t)==="AsyncFunction";y.boundFunction=t=>y.function_(t)&&!t.hasOwnProperty("prototype");y.regExp=de("RegExp");y.date=de("Date");y.error=de("Error");y.map=t=>de("Map")(t);y.set=t=>de("Set")(t);y.weakMap=t=>de("WeakMap")(t);y.weakSet=t=>de("WeakSet")(t);y.int8Array=de("Int8Array");y.uint8Array=de("Uint8Array");y.uint8ClampedArray=de("Uint8ClampedArray");y.int16Array=de("Int16Array");y.uint16Array=de("Uint16Array");y.int32Array=de("Int32Array");y.uint32Array=de("Uint32Array");y.float32Array=de("Float32Array");y.float64Array=de("Float64Array");y.bigInt64Array=de("BigInt64Array");y.bigUint64Array=de("BigUint64Array");y.arrayBuffer=de("ArrayBuffer");y.sharedArrayBuffer=de("SharedArrayBuffer");y.dataView=de("DataView");y.directInstanceOf=(t,r)=>Object.getPrototypeOf(t)===r.prototype;y.urlInstance=t=>de("URL")(t);y.urlString=t=>{if(!y.string(t))return!1;try{return new URL(t),!0}catch{return!1}};y.truthy=t=>Boolean(t);y.falsy=t=>!t;y.nan=t=>Number.isNaN(t);y.primitive=t=>y.null_(t)||ob(typeof t);y.integer=t=>Number.isInteger(t);y.safeInteger=t=>Number.isSafeInteger(t);y.plainObject=t=>{if(gl.call(t)!=="[object Object]")return!1;let r=Object.getPrototypeOf(t);return r===null||r===Object.getPrototypeOf({})};y.typedArray=t=>rb(Dn(t));var cb=t=>y.safeInteger(t)&&t>=0;y.arrayLike=t=>!y.nullOrUndefined(t)&&!y.function_(t)&&cb(t.length);y.inRange=(t,r)=>{if(y.number(r))return t>=Math.min(0,r)&&t<=Math.max(r,0);if(y.array(r)&&r.length===2)return t>=Math.min(...r)&&t<=Math.max(...r);throw new TypeError(`Invalid range: ${JSON.stringify(r)}`)};var fb=1,lb=["innerHTML","ownerDocument","style","attributes","nodeValue"];y.domElement=t=>y.object(t)&&t.nodeType===fb&&y.string(t.nodeName)&&!y.plainObject(t)&&lb.every(r=>r in t);y.observable=t=>{var r,i,o,a;return t?t===((i=(r=t)[Symbol.observable])===null||i===void 0?void 0:i.call(r))||t===((a=(o=t)["@@observable"])===null||a===void 0?void 0:a.call(o)):!1};y.nodeStream=t=>y.object(t)&&y.function_(t.pipe)&&!y.observable(t);y.infinite=t=>t===1/0||t===-1/0;var _l=t=>r=>y.integer(r)&&Math.abs(r%2)===t;y.evenInteger=_l(0);y.oddInteger=_l(1);y.emptyArray=t=>y.array(t)&&t.length===0;y.nonEmptyArray=t=>y.array(t)&&t.length>0;y.emptyString=t=>y.string(t)&&t.length===0;y.nonEmptyString=t=>y.string(t)&&t.length>0;var hb=t=>y.string(t)&&!/\S/.test(t);y.emptyStringOrWhitespace=t=>y.emptyString(t)||hb(t);y.emptyObject=t=>y.object(t)&&!y.map(t)&&!y.set(t)&&Object.keys(t).length===0;y.nonEmptyObject=t=>y.object(t)&&!y.map(t)&&!y.set(t)&&Object.keys(t).length>0;y.emptySet=t=>y.set(t)&&t.size===0;y.nonEmptySet=t=>y.set(t)&&t.size>0;y.emptyMap=t=>y.map(t)&&t.size===0;y.nonEmptyMap=t=>y.map(t)&&t.size>0;y.propertyKey=t=>y.any([y.string,y.number,y.symbol],t);y.formData=t=>de("FormData")(t);y.urlSearchParams=t=>de("URLSearchParams")(t);var vl=(t,r,i)=>{if(!y.function_(r))throw new TypeError(`Invalid predicate: ${JSON.stringify(r)}`);if(i.length===0)throw new TypeError("Invalid number of values");return t.call(i,r)};y.any=(t,...r)=>(y.array(t)?t:[t]).some(o=>vl(Array.prototype.some,o,r));y.all=(t,...r)=>vl(Array.prototype.every,t,r);var N=(t,r,i,o={})=>{if(!t){let{multipleValues:a}=o,c=a?`received values of types ${[...new Set(i.map(f=>`\`${y(f)}\``))].join(", ")}`:`received value of type \`${y(i)}\``;throw new TypeError(`Expected value which is \`${r}\`, ${c}.`)}};Kt.assert={undefined:t=>N(y.undefined(t),"undefined",t),string:t=>N(y.string(t),"string",t),number:t=>N(y.number(t),"number",t),bigint:t=>N(y.bigint(t),"bigint",t),function_:t=>N(y.function_(t),"Function",t),null_:t=>N(y.null_(t),"null",t),class_:t=>N(y.class_(t),"Class",t),boolean:t=>N(y.boolean(t),"boolean",t),symbol:t=>N(y.symbol(t),"symbol",t),numericString:t=>N(y.numericString(t),"string with a number",t),array:(t,r)=>{N(y.array(t),"Array",t),r&&t.forEach(r)},buffer:t=>N(y.buffer(t),"Buffer",t),nullOrUndefined:t=>N(y.nullOrUndefined(t),"null or undefined",t),object:t=>N(y.object(t),"Object",t),iterable:t=>N(y.iterable(t),"Iterable",t),asyncIterable:t=>N(y.asyncIterable(t),"AsyncIterable",t),generator:t=>N(y.generator(t),"Generator",t),asyncGenerator:t=>N(y.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>N(y.nativePromise(t),"native Promise",t),promise:t=>N(y.promise(t),"Promise",t),generatorFunction:t=>N(y.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>N(y.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>N(y.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>N(y.boundFunction(t),"Function",t),regExp:t=>N(y.regExp(t),"RegExp",t),date:t=>N(y.date(t),"Date",t),error:t=>N(y.error(t),"Error",t),map:t=>N(y.map(t),"Map",t),set:t=>N(y.set(t),"Set",t),weakMap:t=>N(y.weakMap(t),"WeakMap",t),weakSet:t=>N(y.weakSet(t),"WeakSet",t),int8Array:t=>N(y.int8Array(t),"Int8Array",t),uint8Array:t=>N(y.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>N(y.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>N(y.int16Array(t),"Int16Array",t),uint16Array:t=>N(y.uint16Array(t),"Uint16Array",t),int32Array:t=>N(y.int32Array(t),"Int32Array",t),uint32Array:t=>N(y.uint32Array(t),"Uint32Array",t),float32Array:t=>N(y.float32Array(t),"Float32Array",t),float64Array:t=>N(y.float64Array(t),"Float64Array",t),bigInt64Array:t=>N(y.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>N(y.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>N(y.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>N(y.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>N(y.dataView(t),"DataView",t),urlInstance:t=>N(y.urlInstance(t),"URL",t),urlString:t=>N(y.urlString(t),"string with a URL",t),truthy:t=>N(y.truthy(t),"truthy",t),falsy:t=>N(y.falsy(t),"falsy",t),nan:t=>N(y.nan(t),"NaN",t),primitive:t=>N(y.primitive(t),"primitive",t),integer:t=>N(y.integer(t),"integer",t),safeInteger:t=>N(y.safeInteger(t),"integer",t),plainObject:t=>N(y.plainObject(t),"plain object",t),typedArray:t=>N(y.typedArray(t),"TypedArray",t),arrayLike:t=>N(y.arrayLike(t),"array-like",t),domElement:t=>N(y.domElement(t),"HTMLElement",t),observable:t=>N(y.observable(t),"Observable",t),nodeStream:t=>N(y.nodeStream(t),"Node.js Stream",t),infinite:t=>N(y.infinite(t),"infinite number",t),emptyArray:t=>N(y.emptyArray(t),"empty array",t),nonEmptyArray:t=>N(y.nonEmptyArray(t),"non-empty array",t),emptyString:t=>N(y.emptyString(t),"empty string",t),nonEmptyString:t=>N(y.nonEmptyString(t),"non-empty string",t),emptyStringOrWhitespace:t=>N(y.emptyStringOrWhitespace(t),"empty string or whitespace",t),emptyObject:t=>N(y.emptyObject(t),"empty object",t),nonEmptyObject:t=>N(y.nonEmptyObject(t),"non-empty object",t),emptySet:t=>N(y.emptySet(t),"empty set",t),nonEmptySet:t=>N(y.nonEmptySet(t),"non-empty set",t),emptyMap:t=>N(y.emptyMap(t),"empty map",t),nonEmptyMap:t=>N(y.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>N(y.propertyKey(t),"PropertyKey",t),formData:t=>N(y.formData(t),"FormData",t),urlSearchParams:t=>N(y.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>N(y.evenInteger(t),"even integer",t),oddInteger:t=>N(y.oddInteger(t),"odd integer",t),directInstanceOf:(t,r)=>N(y.directInstanceOf(t,r),"T",t),inRange:(t,r)=>N(y.inRange(t,r),"in range",t),any:(t,...r)=>N(y.any(t,...r),"predicate returns truthy for any value",r,{multipleValues:!0}),all:(t,...r)=>N(y.all(t,...r),"predicate returns truthy for all values",r,{multipleValues:!0})};Object.defineProperties(y,{class:{value:y.class_},function:{value:y.function_},null:{value:y.null_}});Object.defineProperties(Kt.assert,{class:{value:Kt.assert.class_},function:{value:Kt.assert.function_},null:{value:Kt.assert.null_}});Kt.default=y;Yi.exports=y;Yi.exports.default=y;Yi.exports.assert=Kt.assert});var wl=F((vP,ta)=>{"use strict";var ea=class extends Error{constructor(r){super(r||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}},Nn=class{static fn(r){return(...i)=>new Nn((o,a,c)=>{i.push(c),r(...i).then(o,a)})}constructor(r){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((i,o)=>{this._reject=o;let a=d=>{(!this._isCanceled||!f.shouldReject)&&(this._isPending=!1,i(d))},c=d=>{this._isPending=!1,o(d)},f=d=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(d)};return Object.defineProperties(f,{shouldReject:{get:()=>this._rejectOnCancel,set:d=>{this._rejectOnCancel=d}}}),r(a,c,f)})}then(r,i){return this._promise.then(r,i)}catch(r){return this._promise.catch(r)}finally(r){return this._promise.finally(r)}cancel(r){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let i of this._cancelHandlers)i()}catch(i){this._reject(i);return}this._rejectOnCancel&&this._reject(new ea(r))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Nn.prototype,Promise.prototype);ta.exports=Nn;ta.exports.CancelError=ea});var El=F((na,ia)=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});function db(t){return t.encrypted}var ra=(t,r)=>{let i;typeof r=="function"?i={connect:r}:i=r;let o=typeof i.connect=="function",a=typeof i.secureConnect=="function",c=typeof i.close=="function",f=()=>{o&&i.connect(),db(t)&&a&&(t.authorized?i.secureConnect():t.authorizationError||t.once("secureConnect",i.secureConnect)),c&&t.once("close",i.close)};t.writable&&!t.connecting?f():t.connecting?t.once("connect",f):t.destroyed&&c&&i.close(t._hadError)};na.default=ra;ia.exports=ra;ia.exports.default=ra});var Sl=F((oa,aa)=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});var pb=El(),mb=require("util"),yb=Number(process.versions.node.split(".")[0]),sa=t=>{if(t.timings)return t.timings;let r={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=r;let i=d=>{let g=d.emit.bind(d);d.emit=(E,...S)=>(E==="error"&&(r.error=Date.now(),r.phases.total=r.error-r.start,d.emit=g),g(E,...S))};i(t);let o=()=>{r.abort=Date.now(),(!r.response||yb>=13)&&(r.phases.total=Date.now()-r.start)};t.prependOnceListener("abort",o);let a=d=>{if(r.socket=Date.now(),r.phases.wait=r.socket-r.start,mb.types.isProxy(d))return;let g=()=>{r.lookup=Date.now(),r.phases.dns=r.lookup-r.socket};d.prependOnceListener("lookup",g),pb.default(d,{connect:()=>{r.connect=Date.now(),r.lookup===void 0&&(d.removeListener("lookup",g),r.lookup=r.connect,r.phases.dns=r.lookup-r.socket),r.phases.tcp=r.connect-r.lookup},secureConnect:()=>{r.secureConnect=Date.now(),r.phases.tls=r.secureConnect-r.connect}})};t.socket?a(t.socket):t.prependOnceListener("socket",a);let c=()=>{var d;r.upload=Date.now(),r.phases.request=r.upload-((d=r.secureConnect)!==null&&d!==void 0?d:r.connect)};return(()=>typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))()?c():t.prependOnceListener("finish",c),t.prependOnceListener("response",d=>{r.response=Date.now(),r.phases.firstByte=r.response-r.upload,d.timings=r,i(d),d.prependOnceListener("end",()=>{r.end=Date.now(),r.phases.download=r.end-r.response,r.phases.total=r.end-r.start}),d.prependOnceListener("aborted",o)}),r};oa.default=sa;aa.exports=sa;aa.exports.default=sa});var Al=F((wP,la)=>{"use strict";var{V4MAPPED:gb,ADDRCONFIG:_b,ALL:bl,promises:{Resolver:xl},lookup:vb}=require("dns"),{promisify:ua}=require("util"),wb=require("os"),Zr=Symbol("cacheableLookupCreateConnection"),ca=Symbol("cacheableLookupInstance"),Tl=Symbol("expires"),Eb=typeof bl=="number",Cl=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Sb=t=>{for(let r of t)r.family!==6&&(r.address=`::ffff:${r.address}`,r.family=6)},Pl=()=>{let t=!1,r=!1;for(let i of Object.values(wb.networkInterfaces()))for(let o of i)if(!o.internal&&(o.family==="IPv6"?r=!0:t=!0,t&&r))return{has4:t,has6:r};return{has4:t,has6:r}},bb=t=>Symbol.iterator in t,Rl={ttl:!0},xb={all:!0},fa=class{constructor({cache:r=new Map,maxTtl:i=1/0,fallbackDuration:o=3600,errorTtl:a=.15,resolver:c=new xl,lookup:f=vb}={}){if(this.maxTtl=i,this.errorTtl=a,this._cache=r,this._resolver=c,this._dnsLookup=ua(f),this._resolver instanceof xl?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=ua(this._resolver.resolve4.bind(this._resolver)),this._resolve6=ua(this._resolver.resolve6.bind(this._resolver))),this._iface=Pl(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,o<1)this._fallback=!1;else{this._fallback=!0;let d=setInterval(()=>{this._hostnamesToFallback.clear()},o*1e3);d.unref&&d.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(r){this.clear(),this._resolver.setServers(r)}get servers(){return this._resolver.getServers()}lookup(r,i,o){if(typeof i=="function"?(o=i,i={}):typeof i=="number"&&(i={family:i}),!o)throw new Error("Callback must be a function.");this.lookupAsync(r,i).then(a=>{i.all?o(null,a):o(null,a.address,a.family,a.expires,a.ttl)},o)}async lookupAsync(r,i={}){typeof i=="number"&&(i={family:i});let o=await this.query(r);if(i.family===6){let a=o.filter(c=>c.family===6);i.hints&gb&&(Eb&&i.hints&bl||a.length===0)?Sb(o):o=a}else i.family===4&&(o=o.filter(a=>a.family===4));if(i.hints&_b){let{_iface:a}=this;o=o.filter(c=>c.family===6?a.has6:a.has4)}if(o.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${r}`);throw a.code="ENOTFOUND",a.hostname=r,a}return i.all?o:o[0]}async query(r){let i=await this._cache.get(r);if(!i){let o=this._pending[r];if(o)i=await o;else{let a=this.queryAndCache(r);this._pending[r]=a;try{i=await a}finally{delete this._pending[r]}}}return i=i.map(o=>M({},o)),i}async _resolve(r){let i=async E=>{try{return await E}catch(S){if(S.code==="ENODATA"||S.code==="ENOTFOUND")return[];throw S}},[o,a]=await Promise.all([this._resolve4(r,Rl),this._resolve6(r,Rl)].map(E=>i(E))),c=0,f=0,d=0,g=Date.now();for(let E of o)E.family=4,E.expires=g+E.ttl*1e3,c=Math.max(c,E.ttl);for(let E of a)E.family=6,E.expires=g+E.ttl*1e3,f=Math.max(f,E.ttl);return o.length>0?a.length>0?d=Math.min(c,f):d=c:d=f,{entries:[...o,...a],cacheTtl:d}}async _lookup(r){try{return{entries:await this._dnsLookup(r,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(r,i,o){if(this.maxTtl>0&&o>0){o=Math.min(o,this.maxTtl)*1e3,i[Tl]=Date.now()+o;try{await this._cache.set(r,i,o)}catch(a){this.lookupAsync=async()=>{let c=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw c.cause=a,c}}bb(this._cache)&&this._tick(o)}}async queryAndCache(r){if(this._hostnamesToFallback.has(r))return this._dnsLookup(r,xb);let i=await this._resolve(r);i.entries.length===0&&this._fallback&&(i=await this._lookup(r),i.entries.length!==0&&this._hostnamesToFallback.add(r));let o=i.entries.length===0?this.errorTtl:i.cacheTtl;return await this._set(r,i.entries,o),i.entries}_tick(r){let i=this._nextRemovalTime;(!i||r{this._nextRemovalTime=!1;let o=1/0,a=Date.now();for(let[c,f]of this._cache){let d=f[Tl];a>=d?this._cache.delete(c):d("lookup"in i||(i.lookup=this.lookup),r[Zr](i,o))}uninstall(r){if(Cl(r),r[Zr]){if(r[ca]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");r.createConnection=r[Zr],delete r[Zr],delete r[ca]}}updateInterfaceInfo(){let{_iface:r}=this;this._iface=Pl(),(r.has4&&!this._iface.has4||r.has6&&!this._iface.has6)&&this._cache.clear()}clear(r){if(r){this._cache.delete(r);return}this._cache.clear()}};la.exports=fa;la.exports.default=fa});var ql=F((EP,kl)=>{"use strict";var Tb="text/plain",Cb="us-ascii",Ol=(t,r)=>r.some(i=>i instanceof RegExp?i.test(t):i===t),Pb=(t,{stripHash:r})=>{let i=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(t);if(!i)throw new Error(`Invalid URL: ${t}`);let{type:o,data:a,hash:c}=i.groups,f=o.split(";");c=r?"":c;let d=!1;f[f.length-1]==="base64"&&(f.pop(),d=!0);let g=(f.shift()||"").toLowerCase(),S=[...f.map(b=>{let[T,x=""]=b.split("=").map(P=>P.trim());return T==="charset"&&(x=x.toLowerCase(),x===Cb)?"":`${T}${x?`=${x}`:""}`}).filter(Boolean)];return d&&S.push("base64"),(S.length!==0||g&&g!==Tb)&&S.unshift(g),`data:${S.join(";")},${d?a.trim():a}${c?`#${c}`:""}`},Rb=(t,r)=>{if(r=M({defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},r),t=t.trim(),/^data:/i.test(t))return Pb(t,r);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let i=t.startsWith("//");!i&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,r.defaultProtocol));let a=new URL(t);if(r.forceHttp&&r.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(r.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),r.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),r.stripAuthentication&&(a.username="",a.password=""),r.stripHash?a.hash="":r.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname&&(a.pathname=a.pathname.replace(/(?0){let f=a.pathname.split("/"),d=f[f.length-1];Ol(d,r.removeDirectoryIndex)&&(f=f.slice(0,f.length-1),a.pathname=f.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),r.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(r.removeQueryParameters))for(let f of[...a.searchParams.keys()])Ol(f,r.removeQueryParameters)&&a.searchParams.delete(f);r.removeQueryParameters===!0&&(a.search=""),r.sortQueryParameters&&a.searchParams.sort(),r.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,""));let c=t;return t=a.toString(),!r.removeSingleSlash&&a.pathname==="/"&&!c.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(r.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&r.removeSingleSlash&&(t=t.replace(/\/$/,"")),i&&!r.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),r.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};kl.exports=Rb});var Fl=F((SP,Ll)=>{Ll.exports=Il;function Il(t,r){if(t&&r)return Il(t)(r);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(o){i[o]=t[o]}),i;function i(){for(var o=new Array(arguments.length),a=0;a{var Dl=Fl();ha.exports=Dl(Xi);ha.exports.strict=Dl(Nl);Xi.proto=Xi(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Xi(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Nl(this)},configurable:!0})});function Xi(t){var r=function(){return r.called?r.value:(r.called=!0,r.value=t.apply(this,arguments))};return r.called=!1,r}function Nl(t){var r=function(){if(r.called)throw new Error(r.onceError);return r.called=!0,r.value=t.apply(this,arguments)},i=t.name||"Function wrapped with `once`";return r.onceError=i+" shouldn't be called more than once",r.called=!1,r}});var Hl=F((xP,Ul)=>{var Ab=da(),Ob=function(){},kb=function(t){return t.setHeader&&typeof t.abort=="function"},qb=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},Ml=function(t,r,i){if(typeof r=="function")return Ml(t,null,r);r||(r={}),i=Ab(i||Ob);var o=t._writableState,a=t._readableState,c=r.readable||r.readable!==!1&&t.readable,f=r.writable||r.writable!==!1&&t.writable,d=!1,g=function(){t.writable||E()},E=function(){f=!1,c||i.call(t)},S=function(){c=!1,f||i.call(t)},b=function(C){i.call(t,C?new Error("exited with error code: "+C):null)},T=function(C){i.call(t,C)},x=function(){process.nextTick(P)},P=function(){if(!d){if(c&&!(a&&a.ended&&!a.destroyed))return i.call(t,new Error("premature close"));if(f&&!(o&&o.ended&&!o.destroyed))return i.call(t,new Error("premature close"))}},L=function(){t.req.on("finish",E)};return kb(t)?(t.on("complete",E),t.on("abort",x),t.req?L():t.on("request",L)):f&&!o&&(t.on("end",g),t.on("close",g)),qb(t)&&t.on("exit",b),t.on("end",S),t.on("finish",E),r.error!==!1&&t.on("error",T),t.on("close",x),function(){d=!0,t.removeListener("complete",E),t.removeListener("abort",x),t.removeListener("request",L),t.req&&t.req.removeListener("finish",E),t.removeListener("end",g),t.removeListener("close",g),t.removeListener("finish",E),t.removeListener("exit",b),t.removeListener("end",S),t.removeListener("error",T),t.removeListener("close",x)}};Ul.exports=Ml});var Wl=F((TP,$l)=>{var Ib=da(),Lb=Hl(),pa=require("fs"),Mn=function(){},Fb=/^v?\.0/.test(process.version),Zi=function(t){return typeof t=="function"},Db=function(t){return!Fb||!pa?!1:(t instanceof(pa.ReadStream||Mn)||t instanceof(pa.WriteStream||Mn))&&Zi(t.close)},Nb=function(t){return t.setHeader&&Zi(t.abort)},Mb=function(t,r,i,o){o=Ib(o);var a=!1;t.on("close",function(){a=!0}),Lb(t,{readable:r,writable:i},function(f){if(f)return o(f);a=!0,o()});var c=!1;return function(f){if(!a&&!c){if(c=!0,Db(t))return t.close(Mn);if(Nb(t))return t.abort();if(Zi(t.destroy))return t.destroy();o(f||new Error("stream was destroyed"))}}},Bl=function(t){t()},Ub=function(t,r){return t.pipe(r)},Hb=function(){var t=Array.prototype.slice.call(arguments),r=Zi(t[t.length-1]||Mn)&&t.pop()||Mn;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var i,o=t.map(function(a,c){var f=c0;return Mb(a,f,d,function(g){i||(i=g),g&&o.forEach(Bl),!f&&(o.forEach(Bl),r(i))})});return t.reduce(Ub)};$l.exports=Hb});var zl=F((CP,jl)=>{"use strict";var{PassThrough:Bb}=require("stream");jl.exports=t=>{t=M({},t);let{array:r}=t,{encoding:i}=t,o=i==="buffer",a=!1;r?a=!(i||o):i=i||"utf8",o&&(i=null);let c=new Bb({objectMode:a});i&&c.setEncoding(i);let f=0,d=[];return c.on("data",g=>{d.push(g),a?f=d.length:f+=g.length}),c.getBufferedValue=()=>r?d:o?Buffer.concat(d,f):d.join(""),c.getBufferedLength=()=>f,c}});var Gl=F((PP,Qr)=>{"use strict";var{constants:$b}=require("buffer"),Wb=Wl(),jb=zl(),ma=class extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}};async function Qi(t,r){if(!t)return Promise.reject(new Error("Expected a stream"));r=M({maxBuffer:1/0},r);let{maxBuffer:i}=r,o;return await new Promise((a,c)=>{let f=d=>{d&&o.getBufferedLength()<=$b.MAX_LENGTH&&(d.bufferedData=o.getBufferedValue()),c(d)};o=Wb(t,jb(r),d=>{if(d){f(d);return}a()}),o.on("data",()=>{o.getBufferedLength()>i&&f(new ma)})}),o.getBufferedValue()}Qr.exports=Qi;Qr.exports.default=Qi;Qr.exports.buffer=(t,r)=>Qi(t,qe(M({},r),{encoding:"buffer"}));Qr.exports.array=(t,r)=>Qi(t,qe(M({},r),{array:!0}));Qr.exports.MaxBufferError=ma});var Kl=F((AP,Jl)=>{"use strict";var zb=new Set([200,203,204,206,300,301,404,405,410,414,501]),Gb=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),Jb=new Set([500,502,503,504]),Kb={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},Vb={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Or(t){let r=parseInt(t,10);return isFinite(r)?r:0}function Yb(t){return t?Jb.has(t.status):!0}function ya(t){let r={};if(!t)return r;let i=t.trim().split(/\s*,\s*/);for(let o of i){let[a,c]=o.split(/\s*=\s*/,2);r[a]=c===void 0?!0:c.replace(/^"|"$/g,"")}return r}function Xb(t){let r=[];for(let i in t){let o=t[i];r.push(o===!0?i:i+"="+o)}if(!!r.length)return r.join(", ")}Jl.exports=class{constructor(r,i,{shared:o,cacheHeuristic:a,immutableMinTimeToLive:c,ignoreCargoCult:f,_fromObject:d}={}){if(d){this._fromObject(d);return}if(!i||!i.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(r),this._responseTime=this.now(),this._isShared=o!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=c!==void 0?c:24*3600*1e3,this._status="status"in i?i.status:200,this._resHeaders=i.headers,this._rescc=ya(i.headers["cache-control"]),this._method="method"in r?r.method:"GET",this._url=r.url,this._host=r.headers.host,this._noAuthorization=!r.headers.authorization,this._reqHeaders=i.headers.vary?r.headers:null,this._reqcc=ya(r.headers["cache-control"]),f&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":Xb(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),i.headers["cache-control"]==null&&/no-cache/.test(i.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&Gb.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||zb.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(r){if(!r||!r.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(r){this._assertRequestHasHeaders(r);let i=ya(r.headers["cache-control"]);return i["no-cache"]||/no-cache/.test(r.headers.pragma)||i["max-age"]&&this.age()>i["max-age"]||i["min-fresh"]&&this.timeToLive()<1e3*i["min-fresh"]||this.stale()&&!(i["max-stale"]&&!this._rescc["must-revalidate"]&&(i["max-stale"]===!0||i["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(r,!1)}_requestMatches(r,i){return(!this._url||this._url===r.url)&&this._host===r.headers.host&&(!r.method||this._method===r.method||i&&r.method==="HEAD")&&this._varyMatches(r)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(r){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let i=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let o of i)if(r.headers[o]!==this._reqHeaders[o])return!1;return!0}_copyWithoutHopByHopHeaders(r){let i={};for(let o in r)Kb[o]||(i[o]=r[o]);if(r.connection){let o=r.connection.trim().split(/\s*,\s*/);for(let a of o)delete i[a]}if(i.warning){let o=i.warning.split(/,/).filter(a=>!/^\s*1[0-9][0-9]/.test(a));o.length?i.warning=o.join(",").trim():delete i.warning}return i}responseHeaders(){let r=this._copyWithoutHopByHopHeaders(this._resHeaders),i=this.age();return i>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(r.warning=(r.warning?`${r.warning}, `:"")+'113 - "rfc7234 5.5.4"'),r.age=`${Math.round(i)}`,r.date=new Date(this.now()).toUTCString(),r}date(){let r=Date.parse(this._resHeaders.date);return isFinite(r)?r:this._responseTime}age(){let r=this._ageValue(),i=(this.now()-this._responseTime)/1e3;return r+i}_ageValue(){return Or(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Or(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Or(this._rescc["max-age"]);let r=this._rescc.immutable?this._immutableMinTtl:0,i=this.date();if(this._resHeaders.expires){let o=Date.parse(this._resHeaders.expires);return Number.isNaN(o)||oo)return Math.max(r,(i-o)/1e3*this._cacheHeuristic)}return r}timeToLive(){let r=this.maxAge()-this.age(),i=r+Or(this._rescc["stale-if-error"]),o=r+Or(this._rescc["stale-while-revalidate"]);return Math.max(0,r,i,o)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Or(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Or(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(r){return new this(void 0,void 0,{_fromObject:r})}_fromObject(r){if(this._responseTime)throw Error("Reinitialized");if(!r||r.v!==1)throw Error("Invalid serialization");this._responseTime=r.t,this._isShared=r.sh,this._cacheHeuristic=r.ch,this._immutableMinTtl=r.imm!==void 0?r.imm:24*3600*1e3,this._status=r.st,this._resHeaders=r.resh,this._rescc=r.rescc,this._method=r.m,this._url=r.u,this._host=r.h,this._noAuthorization=r.a,this._reqHeaders=r.reqh,this._reqcc=r.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(r){this._assertRequestHasHeaders(r);let i=this._copyWithoutHopByHopHeaders(r.headers);if(delete i["if-range"],!this._requestMatches(r,!0)||!this.storable())return delete i["if-none-match"],delete i["if-modified-since"],i;if(this._resHeaders.etag&&(i["if-none-match"]=i["if-none-match"]?`${i["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),i["accept-ranges"]||i["if-match"]||i["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete i["if-modified-since"],i["if-none-match"]){let a=i["if-none-match"].split(/,/).filter(c=>!/^\s*W\//.test(c));a.length?i["if-none-match"]=a.join(",").trim():delete i["if-none-match"]}}else this._resHeaders["last-modified"]&&!i["if-modified-since"]&&(i["if-modified-since"]=this._resHeaders["last-modified"]);return i}revalidatedPolicy(r,i){if(this._assertRequestHasHeaders(r),this._useStaleIfError()&&Yb(i))return{modified:!1,matches:!1,policy:this};if(!i||!i.headers)throw Error("Response headers missing");let o=!1;if(i.status!==void 0&&i.status!=304?o=!1:i.headers.etag&&!/^\s*W\//.test(i.headers.etag)?o=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===i.headers.etag:this._resHeaders.etag&&i.headers.etag?o=this._resHeaders.etag.replace(/^\s*W\//,"")===i.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?o=this._resHeaders["last-modified"]===i.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!i.headers.etag&&!i.headers["last-modified"]&&(o=!0),!o)return{policy:new this.constructor(r,i),modified:i.status!=304,matches:!1};let a={};for(let f in this._resHeaders)a[f]=f in i.headers&&!Vb[f]?i.headers[f]:this._resHeaders[f];let c=Object.assign({},i,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(r,c,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var es=F((OP,Vl)=>{"use strict";Vl.exports=t=>{let r={};for(let[i,o]of Object.entries(t))r[i.toLowerCase()]=o;return r}});var Zl=F((kP,Xl)=>{"use strict";var Zb=require("stream").Readable,Qb=es(),Yl=class extends Zb{constructor(r,i,o,a){if(typeof r!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof i!="object")throw new TypeError("Argument `headers` should be an object");if(!(o instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof a!="string")throw new TypeError("Argument `url` should be a string");super();this.statusCode=r,this.headers=Qb(i),this.body=o,this.url=a}_read(){this.push(this.body),this.push(null)}};Xl.exports=Yl});var eh=F((qP,Ql)=>{"use strict";var ex=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];Ql.exports=(t,r)=>{let i=new Set(Object.keys(t).concat(ex));for(let o of i)o in r||(r[o]=typeof t[o]=="function"?t[o].bind(t):t[o])}});var rh=F((IP,th)=>{"use strict";var tx=require("stream").PassThrough,rx=eh(),nx=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let r=new tx;return rx(t,r),t.pipe(r)};th.exports=nx});var nh=F(ga=>{ga.stringify=function t(r){if(typeof r=="undefined")return r;if(r&&Buffer.isBuffer(r))return JSON.stringify(":base64:"+r.toString("base64"));if(r&&r.toJSON&&(r=r.toJSON()),r&&typeof r=="object"){var i="",o=Array.isArray(r);i=o?"[":"{";var a=!0;for(var c in r){var f=typeof r[c]=="function"||!o&&typeof r[c]=="undefined";Object.hasOwnProperty.call(r,c)&&!f&&(a||(i+=","),a=!1,o?r[c]==null?i+="null":i+=t(r[c]):r[c]!==void 0&&(i+=t(c)+":"+t(r[c])))}return i+=o?"]":"}",i}else return typeof r=="string"?JSON.stringify(/^:/.test(r)?":"+r:r):typeof r=="undefined"?"null":JSON.stringify(r)};ga.parse=function(t){return JSON.parse(t,function(r,i){return typeof i=="string"?/^:base64:/.test(i)?Buffer.from(i.substring(8),"base64"):/^:/.test(i)?i.substring(1):i:i})}});var ah=F((FP,oh)=>{"use strict";var ix=require("events"),ih=nh(),sx=t=>{let r={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(t.adapter||t.uri){let i=t.adapter||/^[^:]*/.exec(t.uri)[0];return new(require(r[i]))(t)}return new Map},sh=class extends ix{constructor(r,i){super();if(this.opts=Object.assign({namespace:"keyv",serialize:ih.stringify,deserialize:ih.parse},typeof r=="string"?{uri:r}:r,i),!this.opts.store){let o=Object.assign({},this.opts);this.opts.store=sx(o)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",o=>this.emit("error",o)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(r){return`${this.opts.namespace}:${r}`}get(r,i){let o=this._getKeyPrefix(r),{store:a}=this.opts;return Promise.resolve().then(()=>a.get(o)).then(c=>typeof c=="string"?this.opts.deserialize(c):c).then(c=>{if(c!==void 0){if(typeof c.expires=="number"&&Date.now()>c.expires){this.delete(r);return}return i&&i.raw?c:c.value}})}set(r,i,o){let a=this._getKeyPrefix(r);typeof o=="undefined"&&(o=this.opts.ttl),o===0&&(o=void 0);let{store:c}=this.opts;return Promise.resolve().then(()=>{let f=typeof o=="number"?Date.now()+o:null;return i={value:i,expires:f},this.opts.serialize(i)}).then(f=>c.set(a,f,o)).then(()=>!0)}delete(r){let i=this._getKeyPrefix(r),{store:o}=this.opts;return Promise.resolve().then(()=>o.delete(i))}clear(){let{store:r}=this.opts;return Promise.resolve().then(()=>r.clear())}};oh.exports=sh});var fh=F((DP,ch)=>{"use strict";var ox=require("events"),ts=require("url"),ax=ql(),ux=Gl(),_a=Kl(),uh=Zl(),cx=es(),fx=rh(),lx=ah(),Dt=class{constructor(r,i){if(typeof r!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new lx({uri:typeof i=="string"&&i,store:typeof i!="string"&&i,namespace:"cacheable-request"}),this.createCacheableRequest(r)}createCacheableRequest(r){return(i,o)=>{let a;if(typeof i=="string")a=va(ts.parse(i)),i={};else if(i instanceof ts.URL)a=va(ts.parse(i.toString())),i={};else{let[b,...T]=(i.path||"").split("?"),x=T.length>0?`?${T.join("?")}`:"";a=va(qe(M({},i),{pathname:b,search:x}))}i=M(M({headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1},i),hx(a)),i.headers=cx(i.headers);let c=new ox,f=ax(ts.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),d=`${i.method}:${f}`,g=!1,E=!1,S=b=>{E=!0;let T=!1,x,P=new Promise(C=>{x=()=>{T||(T=!0,C())}}),L=C=>{if(g&&!b.forceRefresh){C.status=C.statusCode;let $=_a.fromObject(g.cachePolicy).revalidatedPolicy(b,C);if(!$.modified){let ee=$.policy.responseHeaders();C=new uh(g.statusCode,ee,g.body,g.url),C.cachePolicy=$.policy,C.fromCache=!0}}C.fromCache||(C.cachePolicy=new _a(b,C,b),C.fromCache=!1);let D;b.cache&&C.cachePolicy.storable()?(D=fx(C),(async()=>{try{let $=ux.buffer(C);if(await Promise.race([P,new Promise(lt=>C.once("end",lt))]),T)return;let ee=await $,Se={cachePolicy:C.cachePolicy.toObject(),url:C.url,statusCode:C.fromCache?g.statusCode:C.statusCode,body:ee},Pe=b.strictTtl?C.cachePolicy.timeToLive():void 0;b.maxTtl&&(Pe=Pe?Math.min(Pe,b.maxTtl):b.maxTtl),await this.cache.set(d,Se,Pe)}catch($){c.emit("error",new Dt.CacheError($))}})()):b.cache&&g&&(async()=>{try{await this.cache.delete(d)}catch($){c.emit("error",new Dt.CacheError($))}})(),c.emit("response",D||C),typeof o=="function"&&o(D||C)};try{let C=r(b,L);C.once("error",x),C.once("abort",x),c.emit("request",C)}catch(C){c.emit("error",new Dt.RequestError(C))}};return(async()=>{let b=async x=>{await Promise.resolve();let P=x.cache?await this.cache.get(d):void 0;if(typeof P=="undefined")return S(x);let L=_a.fromObject(P.cachePolicy);if(L.satisfiesWithoutRevalidation(x)&&!x.forceRefresh){let C=L.responseHeaders(),D=new uh(P.statusCode,C,P.body,P.url);D.cachePolicy=L,D.fromCache=!0,c.emit("response",D),typeof o=="function"&&o(D)}else g=P,x.headers=L.revalidationHeaders(x),S(x)},T=x=>c.emit("error",new Dt.CacheError(x));this.cache.once("error",T),c.on("response",()=>this.cache.removeListener("error",T));try{await b(i)}catch(x){i.automaticFailover&&!E&&S(i),c.emit("error",new Dt.CacheError(x))}})(),c}}};function hx(t){let r=M({},t);return r.path=`${t.pathname||"/"}${t.search||""}`,delete r.pathname,delete r.search,r}function va(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}Dt.RequestError=class extends Error{constructor(t){super(t.message);this.name="RequestError",Object.assign(this,t)}};Dt.CacheError=class extends Error{constructor(t){super(t.message);this.name="CacheError",Object.assign(this,t)}};ch.exports=Dt});var hh=F((NP,lh)=>{"use strict";var dx=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];lh.exports=(t,r)=>{if(r._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let i=new Set(Object.keys(t).concat(dx)),o={};for(let a of i)a in r||(o[a]={get(){let c=t[a];return typeof c=="function"?c.bind(t):c},set(c){t[a]=c},enumerable:!0,configurable:!1});return Object.defineProperties(r,o),t.once("aborted",()=>{r.destroy(),r.emit("aborted")}),t.once("close",()=>{t.complete&&r.readable?r.once("end",()=>{r.emit("close")}):r.emit("close")}),r}});var ph=F((MP,dh)=>{"use strict";var{Transform:px,PassThrough:mx}=require("stream"),wa=require("zlib"),yx=hh();dh.exports=t=>{let r=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(r))return t;let i=r==="br";if(i&&typeof wa.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let o=!0,a=new px({transform(d,g,E){o=!1,E(null,d)},flush(d){d()}}),c=new mx({autoDestroy:!1,destroy(d,g){t.destroy(),g(d)}}),f=i?wa.createBrotliDecompress():wa.createUnzip();return f.once("error",d=>{if(o&&!t.readable){c.end();return}c.destroy(d)}),yx(t,c),t.pipe(a).pipe(f).pipe(c),c}});var Ea=F((UP,yh)=>{"use strict";var mh=class{constructor(r={}){if(!(r.maxSize&&r.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=r.maxSize,this.onEviction=r.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(r,i){if(this.cache.set(r,i),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[o,a]of this.oldCache.entries())this.onEviction(o,a);this.oldCache=this.cache,this.cache=new Map}}get(r){if(this.cache.has(r))return this.cache.get(r);if(this.oldCache.has(r)){let i=this.oldCache.get(r);return this.oldCache.delete(r),this._set(r,i),i}}set(r,i){return this.cache.has(r)?this.cache.set(r,i):this._set(r,i),this}has(r){return this.cache.has(r)||this.oldCache.has(r)}peek(r){if(this.cache.has(r))return this.cache.get(r);if(this.oldCache.has(r))return this.oldCache.get(r)}delete(r){let i=this.cache.delete(r);return i&&this._size--,this.oldCache.delete(r)||i}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[r]of this)yield r}*values(){for(let[,r]of this)yield r}*[Symbol.iterator](){for(let r of this.cache)yield r;for(let r of this.oldCache){let[i]=r;this.cache.has(i)||(yield r)}}get size(){let r=0;for(let i of this.oldCache.keys())this.cache.has(i)||r++;return Math.min(this._size+r,this.maxSize)}};yh.exports=mh});var ba=F((HP,wh)=>{"use strict";var gx=require("events"),_x=require("tls"),vx=require("http2"),wx=Ea(),Je=Symbol("currentStreamsCount"),gh=Symbol("request"),wt=Symbol("cachedOriginSet"),en=Symbol("gracefullyClosing"),Ex=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],Sx=(t,r,i)=>{let o=0,a=t.length;for(;o>>1;i(t[c],r)?o=c+1:a=c}return o},bx=(t,r)=>t.remoteSettings.maxConcurrentStreams>r.remoteSettings.maxConcurrentStreams,Sa=(t,r)=>{for(let i of t)i[wt].lengthr[wt].includes(o))&&i[Je]+r[Je]<=r.remoteSettings.maxConcurrentStreams&&vh(i)},xx=(t,r)=>{for(let i of t)r[wt].lengthi[wt].includes(o))&&r[Je]+i[Je]<=i.remoteSettings.maxConcurrentStreams&&vh(r)},_h=({agent:t,isFree:r})=>{let i={};for(let o in t.sessions){let c=t.sessions[o].filter(f=>{let d=f[Yt.kCurrentStreamsCount]{t[en]=!0,t[Je]===0&&t.close()},Yt=class extends gx{constructor({timeout:r=6e4,maxSessions:i=1/0,maxFreeSessions:o=10,maxCachedTlsSessions:a=100}={}){super();this.sessions={},this.queue={},this.timeout=r,this.maxSessions=i,this.maxFreeSessions=o,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new wx({maxSize:a})}static normalizeOrigin(r,i){return typeof r=="string"&&(r=new URL(r)),i&&r.hostname!==i&&(r.hostname=i),r.origin}normalizeOptions(r){let i="";if(r)for(let o of Ex)r[o]&&(i+=`:${r[o]}`);return i}_tryToCreateNewSession(r,i){if(!(r in this.queue)||!(i in this.queue[r]))return;let o=this.queue[r][i];this._sessionsCount{Array.isArray(o)?(o=[...o],a()):o=[{resolve:a,reject:c}];let f=this.normalizeOptions(i),d=Yt.normalizeOrigin(r,i&&i.servername);if(d===void 0){for(let{reject:S}of o)S(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(f in this.sessions){let S=this.sessions[f],b=-1,T=-1,x;for(let P of S){let L=P.remoteSettings.maxConcurrentStreams;if(L=L||P[en]||P.destroyed)continue;x||(b=L),C>T&&(x=P,T=C)}}if(x){if(o.length!==1){for(let{reject:P}of o){let L=new Error(`Expected the length of listeners to be 1, got ${o.length}. +Please report this to https://github.com/szmarczak/http2-wrapper/`);P(L)}return}o[0].resolve(x);return}}if(f in this.queue){if(d in this.queue[f]){this.queue[f][d].listeners.push(...o),this._tryToCreateNewSession(f,d);return}}else this.queue[f]={};let g=()=>{f in this.queue&&this.queue[f][d]===E&&(delete this.queue[f][d],Object.keys(this.queue[f]).length===0&&delete this.queue[f])},E=()=>{let S=`${d}:${f}`,b=!1;try{let T=vx.connect(r,M({createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(S)},i));T[Je]=0,T[en]=!1;let x=()=>T[Je]{this.tlsSessionCache.set(S,C)}),T.once("error",C=>{for(let{reject:D}of o)D(C);this.tlsSessionCache.delete(S)}),T.setTimeout(this.timeout,()=>{T.destroy()}),T.once("close",()=>{if(b){P&&this._freeSessionsCount--,this._sessionsCount--;let C=this.sessions[f];C.splice(C.indexOf(T),1),C.length===0&&delete this.sessions[f]}else{let C=new Error("Session closed without receiving a SETTINGS frame");C.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:D}of o)D(C);g()}this._tryToCreateNewSession(f,d)});let L=()=>{if(!(!(f in this.queue)||!x())){for(let C of T[wt])if(C in this.queue[f]){let{listeners:D}=this.queue[f][C];for(;D.length!==0&&x();)D.shift().resolve(T);let $=this.queue[f];if($[C].listeners.length===0&&(delete $[C],Object.keys($).length===0)){delete this.queue[f];break}if(!x())break}}};T.on("origin",()=>{T[wt]=T.originSet,!!x()&&(L(),Sa(this.sessions[f],T))}),T.once("remoteSettings",()=>{if(T.ref(),T.unref(),this._sessionsCount++,E.destroyed){let C=new Error("Agent has been destroyed");for(let D of o)D.reject(C);T.destroy();return}T[wt]=T.originSet;{let C=this.sessions;if(f in C){let D=C[f];D.splice(Sx(D,T,bx),0,T)}else C[f]=[T]}this._freeSessionsCount+=1,b=!0,this.emit("session",T),L(),g(),T[Je]===0&&this._freeSessionsCount>this.maxFreeSessions&&T.close(),o.length!==0&&(this.getSession(d,i,o),o.length=0),T.on("remoteSettings",()=>{L(),Sa(this.sessions[f],T)})}),T[gh]=T.request,T.request=(C,D)=>{if(T[en])throw new Error("The session is gracefully closing. No new streams are allowed.");let $=T[gh](C,D);return T.ref(),++T[Je],T[Je]===T.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,$.once("close",()=>{if(P=x(),--T[Je],!T.destroyed&&!T.closed&&(xx(this.sessions[f],T),x()&&!T.closed)){P||(this._freeSessionsCount++,P=!0);let ee=T[Je]===0;ee&&T.unref(),ee&&(this._freeSessionsCount>this.maxFreeSessions||T[en])?T.close():(Sa(this.sessions[f],T),L())}}),$}}catch(T){for(let x of o)x.reject(T);g()}};E.listeners=o,E.completed=!1,E.destroyed=!1,this.queue[f][d]=E,this._tryToCreateNewSession(f,d)})}request(r,i,o,a){return new Promise((c,f)=>{this.getSession(r,i,[{reject:f,resolve:d=>{try{c(d.request(o,a))}catch(g){f(g)}}}])})}createConnection(r,i){return Yt.connect(r,i)}static connect(r,i){i.ALPNProtocols=["h2"];let o=r.port||443,a=r.hostname||r.host;return typeof i.servername=="undefined"&&(i.servername=a),_x.connect(o,a,i)}closeFreeSessions(){for(let r of Object.values(this.sessions))for(let i of r)i[Je]===0&&i.close()}destroy(r){for(let i of Object.values(this.sessions))for(let o of i)o.destroy(r);for(let i of Object.values(this.queue))for(let o of Object.values(i))o.destroyed=!0;this.queue={}}get freeSessions(){return _h({agent:this,isFree:!0})}get busySessions(){return _h({agent:this,isFree:!1})}};Yt.kCurrentStreamsCount=Je;Yt.kGracefullyClosing=en;wh.exports={Agent:Yt,globalAgent:new Yt}});var xa=F((BP,Sh)=>{"use strict";var{Readable:Tx}=require("stream"),Eh=class extends Tx{constructor(r,i){super({highWaterMark:i,autoDestroy:!1});this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=r,this.connection=r,this._dumped=!1}_destroy(r){this.req._request.destroy(r)}setTimeout(r,i){return this.req.setTimeout(r,i),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Sh.exports=Eh});var Ta=F(($P,bh)=>{"use strict";bh.exports=t=>{let r={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(r.port=Number(t.port)),(t.username||t.password)&&(r.auth=`${t.username||""}:${t.password||""}`),r}});var Th=F((WP,xh)=>{"use strict";xh.exports=(t,r,i)=>{for(let o of i)t.on(o,(...a)=>r.emit(o,...a))}});var Ph=F((jP,Ch)=>{"use strict";Ch.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Ah=F((GP,Rh)=>{"use strict";var tn=(t,r,i)=>{Rh.exports[r]=class extends t{constructor(...a){super(typeof i=="string"?i:i(a));this.name=`${super.name} [${r}]`,this.code=r}}};tn(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let r=t[0].includes(".")?"property":"argument",i=t[1],o=Array.isArray(i);return o&&(i=`${i.slice(0,-1).join(", ")} or ${i.slice(-1)}`),`The "${t[0]}" ${r} must be ${o?"one of":"of"} type ${i}. Received ${typeof t[2]}`});tn(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);tn(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);tn(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);tn(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);tn(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var Aa=F((JP,Nh)=>{"use strict";var Cx=require("http2"),{Writable:Px}=require("stream"),{Agent:Oh,globalAgent:Rx}=ba(),Ax=xa(),Ox=Ta(),kx=Th(),qx=Ph(),{ERR_INVALID_ARG_TYPE:Ca,ERR_INVALID_PROTOCOL:Ix,ERR_HTTP_HEADERS_SENT:kh,ERR_INVALID_HTTP_TOKEN:Lx,ERR_HTTP_INVALID_HEADER_VALUE:Fx,ERR_INVALID_CHAR:Dx}=Ah(),{HTTP2_HEADER_STATUS:qh,HTTP2_HEADER_METHOD:Ih,HTTP2_HEADER_PATH:Lh,HTTP2_METHOD_CONNECT:Nx}=Cx.constants,$e=Symbol("headers"),Pa=Symbol("origin"),Ra=Symbol("session"),Fh=Symbol("options"),rs=Symbol("flushedHeaders"),Un=Symbol("jobs"),Mx=/^[\^`\-\w!#$%&*+.|~]+$/,Ux=/[^\t\u0020-\u007E\u0080-\u00FF]/,Dh=class extends Px{constructor(r,i,o){super({autoDestroy:!1});let a=typeof r=="string"||r instanceof URL;if(a&&(r=Ox(r instanceof URL?r:new URL(r))),typeof i=="function"||i===void 0?(o=i,i=a?r:M({},r)):i=M(M({},r),i),i.h2session)this[Ra]=i.h2session;else if(i.agent===!1)this.agent=new Oh({maxFreeSessions:0});else if(typeof i.agent=="undefined"||i.agent===null)typeof i.createConnection=="function"?(this.agent=new Oh({maxFreeSessions:0}),this.agent.createConnection=i.createConnection):this.agent=Rx;else if(typeof i.agent.request=="function")this.agent=i.agent;else throw new Ca("options.agent",["Agent-like Object","undefined","false"],i.agent);if(i.protocol&&i.protocol!=="https:")throw new Ix(i.protocol,"https:");let c=i.port||i.defaultPort||this.agent&&this.agent.defaultPort||443,f=i.hostname||i.host||"localhost";delete i.hostname,delete i.host,delete i.port;let{timeout:d}=i;if(i.timeout=void 0,this[$e]=Object.create(null),this[Un]=[],this.socket=null,this.connection=null,this.method=i.method||"GET",this.path=i.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,i.headers)for(let[g,E]of Object.entries(i.headers))this.setHeader(g,E);i.auth&&!("authorization"in this[$e])&&(this[$e].authorization="Basic "+Buffer.from(i.auth).toString("base64")),i.session=i.tlsSession,i.path=i.socketPath,this[Fh]=i,c===443?(this[Pa]=`https://${f}`,":authority"in this[$e]||(this[$e][":authority"]=f)):(this[Pa]=`https://${f}:${c}`,":authority"in this[$e]||(this[$e][":authority"]=`${f}:${c}`)),d&&this.setTimeout(d),o&&this.once("response",o),this[rs]=!1}get method(){return this[$e][Ih]}set method(r){r&&(this[$e][Ih]=r.toUpperCase())}get path(){return this[$e][Lh]}set path(r){r&&(this[$e][Lh]=r)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(r,i,o){if(this._mustNotHaveABody){o(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let a=()=>this._request.write(r,i,o);this._request?a():this[Un].push(a)}_final(r){if(this.destroyed)return;this.flushHeaders();let i=()=>{if(this._mustNotHaveABody){r();return}this._request.end(r)};this._request?i():this[Un].push(i)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(r,i){this.res&&this.res._dump(),this._request&&this._request.destroy(),i(r)}async flushHeaders(){if(this[rs]||this.destroyed)return;this[rs]=!0;let r=this.method===Nx,i=o=>{if(this._request=o,this.destroyed){o.destroy();return}r||kx(o,this,["timeout","continue","close","error"]);let a=f=>(...d)=>{!this.writable&&!this.destroyed?f(...d):this.once("finish",()=>{f(...d)})};o.once("response",a((f,d,g)=>{let E=new Ax(this.socket,o.readableHighWaterMark);this.res=E,E.req=this,E.statusCode=f[qh],E.headers=f,E.rawHeaders=g,E.once("end",()=>{this.aborted?(E.aborted=!0,E.emit("aborted")):(E.complete=!0,E.socket=null,E.connection=null)}),r?(E.upgrade=!0,this.emit("connect",E,o,Buffer.alloc(0))?this.emit("close"):o.destroy()):(o.on("data",S=>{!E._dumped&&!E.push(S)&&o.pause()}),o.once("end",()=>{E.push(null)}),this.emit("response",E)||E._dump())})),o.once("headers",a(f=>this.emit("information",{statusCode:f[qh]}))),o.once("trailers",a((f,d,g)=>{let{res:E}=this;E.trailers=f,E.rawTrailers=g}));let{socket:c}=o.session;this.socket=c,this.connection=c;for(let f of this[Un])f();this.emit("socket",this.socket)};if(this[Ra])try{i(this[Ra].request(this[$e]))}catch(o){this.emit("error",o)}else{this.reusedSocket=!0;try{i(await this.agent.request(this[Pa],this[Fh],this[$e]))}catch(o){this.emit("error",o)}}}getHeader(r){if(typeof r!="string")throw new Ca("name","string",r);return this[$e][r.toLowerCase()]}get headersSent(){return this[rs]}removeHeader(r){if(typeof r!="string")throw new Ca("name","string",r);if(this.headersSent)throw new kh("remove");delete this[$e][r.toLowerCase()]}setHeader(r,i){if(this.headersSent)throw new kh("set");if(typeof r!="string"||!Mx.test(r)&&!qx(r))throw new Lx("Header name",r);if(typeof i=="undefined")throw new Fx(i,r);if(Ux.test(i))throw new Dx("header content",r);this[$e][r.toLowerCase()]=i}setNoDelay(){}setSocketKeepAlive(){}setTimeout(r,i){let o=()=>this._request.setTimeout(r,i);return this._request?o():this[Un].push(o),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(r){}};Nh.exports=Dh});var Uh=F((KP,Mh)=>{"use strict";var Hx=require("tls");Mh.exports=(t={},r=Hx.connect)=>new Promise((i,o)=>{let a=!1,c,f=async()=>{await g,c.off("timeout",d),c.off("error",o),t.resolveSocket?(i({alpnProtocol:c.alpnProtocol,socket:c,timeout:a}),a&&(await Promise.resolve(),c.emit("timeout"))):(c.destroy(),i({alpnProtocol:c.alpnProtocol,timeout:a}))},d=async()=>{a=!0,f()},g=(async()=>{try{c=await r(t,f),c.on("error",o),c.once("timeout",d)}catch(E){o(E)}})()})});var Bh=F((VP,Hh)=>{"use strict";var Bx=require("net");Hh.exports=t=>{let r=t.host,i=t.headers&&t.headers.host;return i&&(i.startsWith("[")?i.indexOf("]")===-1?r=i:r=i.slice(1,-1):r=i.split(":",1)[0]),Bx.isIP(r)?"":r}});var jh=F((YP,ka)=>{"use strict";var $h=require("http"),Oa=require("https"),$x=Uh(),Wx=Ea(),jx=Aa(),zx=Bh(),Gx=Ta(),ns=new Wx({maxSize:100}),Hn=new Map,Wh=(t,r,i)=>{r._httpMessage={shouldKeepAlive:!0};let o=()=>{t.emit("free",r,i)};r.on("free",o);let a=()=>{t.removeSocket(r,i)};r.on("close",a);let c=()=>{t.removeSocket(r,i),r.off("close",a),r.off("free",o),r.off("agentRemove",c)};r.on("agentRemove",c),t.emit("free",r,i)},Jx=async t=>{let r=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!ns.has(r)){if(Hn.has(r))return(await Hn.get(r)).alpnProtocol;let{path:i,agent:o}=t;t.path=t.socketPath;let a=$x(t);Hn.set(r,a);try{let{socket:c,alpnProtocol:f}=await a;if(ns.set(r,f),t.path=i,f==="h2")c.destroy();else{let{globalAgent:d}=Oa,g=Oa.Agent.prototype.createConnection;o?o.createConnection===g?Wh(o,c,t):c.destroy():d.createConnection===g?Wh(d,c,t):c.destroy()}return Hn.delete(r),f}catch(c){throw Hn.delete(r),c}}return ns.get(r)};ka.exports=async(t,r,i)=>{if((typeof t=="string"||t instanceof URL)&&(t=Gx(new URL(t))),typeof r=="function"&&(i=r,r=void 0),r=qe(M(M({ALPNProtocols:["h2","http/1.1"]},t),r),{resolveSocket:!0}),!Array.isArray(r.ALPNProtocols)||r.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");r.protocol=r.protocol||"https:";let o=r.protocol==="https:";r.host=r.hostname||r.host||"localhost",r.session=r.tlsSession,r.servername=r.servername||zx(r),r.port=r.port||(o?443:80),r._defaultAgent=o?Oa.globalAgent:$h.globalAgent;let a=r.agent;if(a){if(a.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");r.agent=a[o?"https":"http"]}return o&&await Jx(r)==="h2"?(a&&(r.agent=a.http2),new jx(r,i)):$h.request(r,i)};ka.exports.protocolCache=ns});var Gh=F((XP,zh)=>{"use strict";var Kx=require("http2"),Vx=ba(),qa=Aa(),Yx=xa(),Xx=jh(),Zx=(t,r,i)=>new qa(t,r,i),Qx=(t,r,i)=>{let o=new qa(t,r,i);return o.end(),o};zh.exports=qe(M(qe(M({},Kx),{ClientRequest:qa,IncomingMessage:Yx}),Vx),{request:Zx,get:Qx,auto:Xx})});var La=F(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var Jh=Vt();Ia.default=t=>Jh.default.nodeStream(t)&&Jh.default.function_(t.getBoundary)});var Xh=F(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});var Kh=require("fs"),Vh=require("util"),Yh=Vt(),e1=La(),t1=Vh.promisify(Kh.stat);Fa.default=async(t,r)=>{if(r&&"content-length"in r)return Number(r["content-length"]);if(!t)return 0;if(Yh.default.string(t))return Buffer.byteLength(t);if(Yh.default.buffer(t))return t.length;if(e1.default(t))return Vh.promisify(t.getLength.bind(t))();if(t instanceof Kh.ReadStream){let{size:i}=await t1(t.path);return i===0?void 0:i}}});var Na=F(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});function r1(t,r,i){let o={};for(let a of i)o[a]=(...c)=>{r.emit(a,...c)},t.on(a,o[a]);return()=>{for(let a of i)t.off(a,o[a])}}Da.default=r1});var Zh=F(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.default=()=>{let t=[];return{once(r,i,o){r.once(i,o),t.push({origin:r,event:i,fn:o})},unhandleAll(){for(let r of t){let{origin:i,event:o,fn:a}=r;i.removeListener(o,a)}t.length=0}}}});var ed=F(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.TimeoutError=void 0;var n1=require("net"),i1=Zh(),Qh=Symbol("reentry"),s1=()=>{},Ua=class extends Error{constructor(r,i){super(`Timeout awaiting '${i}' for ${r}ms`);this.event=i,this.name="TimeoutError",this.code="ETIMEDOUT"}};Bn.TimeoutError=Ua;Bn.default=(t,r,i)=>{if(Qh in t)return s1;t[Qh]=!0;let o=[],{once:a,unhandleAll:c}=i1.default(),f=(b,T,x)=>{var P;let L=setTimeout(T,b,b,x);(P=L.unref)===null||P===void 0||P.call(L);let C=()=>{clearTimeout(L)};return o.push(C),C},{host:d,hostname:g}=i,E=(b,T)=>{t.destroy(new Ua(b,T))},S=()=>{for(let b of o)b();c()};if(t.once("error",b=>{if(S(),t.listenerCount("error")===0)throw b}),t.once("close",S),a(t,"response",b=>{a(b,"end",S)}),typeof r.request!="undefined"&&f(r.request,E,"request"),typeof r.socket!="undefined"){let b=()=>{E(r.socket,"socket")};t.setTimeout(r.socket,b),o.push(()=>{t.removeListener("timeout",b)})}return a(t,"socket",b=>{var T;let{socketPath:x}=t;if(b.connecting){let P=Boolean(x!=null?x:n1.isIP((T=g!=null?g:d)!==null&&T!==void 0?T:"")!==0);if(typeof r.lookup!="undefined"&&!P&&typeof b.address().address=="undefined"){let L=f(r.lookup,E,"lookup");a(b,"lookup",L)}if(typeof r.connect!="undefined"){let L=()=>f(r.connect,E,"connect");P?a(b,"connect",L()):a(b,"lookup",C=>{C===null&&a(b,"connect",L())})}typeof r.secureConnect!="undefined"&&i.protocol==="https:"&&a(b,"connect",()=>{let L=f(r.secureConnect,E,"secureConnect");a(b,"secureConnect",L)})}if(typeof r.send!="undefined"){let P=()=>f(r.send,E,"send");b.connecting?a(b,"connect",()=>{a(t,"upload-complete",P())}):a(t,"upload-complete",P())}}),typeof r.response!="undefined"&&a(t,"upload-complete",()=>{let b=f(r.response,E,"response");a(t,"response",b)}),S}});var rd=F(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var td=Vt();Ha.default=t=>{t=t;let r={protocol:t.protocol,hostname:td.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return td.default.string(t.port)&&t.port.length>0&&(r.port=Number(t.port)),(t.username||t.password)&&(r.auth=`${t.username||""}:${t.password||""}`),r}});var nd=F(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var o1=require("url"),a1=["protocol","host","hostname","port","pathname","search"];Ba.default=(t,r)=>{var i,o;if(r.path){if(r.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(r.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(r.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(r.search&&r.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!r.protocol)throw new TypeError("No URL protocol specified");t=`${r.protocol}//${(o=(i=r.hostname)!==null&&i!==void 0?i:r.host)!==null&&o!==void 0?o:""}`}let a=new o1.URL(t);if(r.path){let c=r.path.indexOf("?");c===-1?r.pathname=r.path:(r.pathname=r.path.slice(0,c),r.search=r.path.slice(c+1)),delete r.path}for(let c of a1)r[c]&&(a[c]=r[c].toString());return a}});var sd=F($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var id=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(r,i){typeof r=="object"?this.weakMap.set(r,i):this.map.set(r,i)}get(r){return typeof r=="object"?this.weakMap.get(r):this.map.get(r)}has(r){return typeof r=="object"?this.weakMap.has(r):this.map.has(r)}};$a.default=id});var ja=F(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var u1=async t=>{let r=[],i=0;for await(let o of t)r.push(o),i+=Buffer.byteLength(o);return Buffer.isBuffer(r[0])?Buffer.concat(r,i):Buffer.from(r.join(""))};Wa.default=u1});var ad=F(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.dnsLookupIpVersionToFamily=kr.isDnsLookupIpVersion=void 0;var od={auto:0,ipv4:4,ipv6:6};kr.isDnsLookupIpVersion=t=>t in od;kr.dnsLookupIpVersionToFamily=t=>{if(kr.isDnsLookupIpVersion(t))return od[t];throw new Error("Invalid DNS lookup IP version")}});var za=F(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.isResponseOk=void 0;is.isResponseOk=t=>{let{statusCode:r}=t,i=t.request.options.followRedirect?299:399;return r>=200&&r<=i||r===304}});var cd=F(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var ud=new Set;Ga.default=t=>{ud.has(t)||(ud.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var fd=F(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var me=Vt(),c1=(t,r)=>{if(me.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");me.assert.any([me.default.string,me.default.undefined],t.encoding),me.assert.any([me.default.boolean,me.default.undefined],t.resolveBodyOnly),me.assert.any([me.default.boolean,me.default.undefined],t.methodRewriting),me.assert.any([me.default.boolean,me.default.undefined],t.isStream),me.assert.any([me.default.string,me.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:i}=t;if(r?t.retry=M({},r.retry):t.retry={calculateDelay:o=>o.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},me.default.object(i)?(t.retry=M(M({},t.retry),i),t.retry.methods=[...new Set(t.retry.methods.map(o=>o.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):me.default.number(i)&&(t.retry.limit=i),me.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(me.default.number))),me.default.object(t.pagination)){r&&(t.pagination=M(M({},r.pagination),t.pagination));let{pagination:o}=t;if(!me.default.function_(o.transform))throw new Error("`options.pagination.transform` must be implemented");if(!me.default.function_(o.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!me.default.function_(o.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!me.default.function_(o.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};Ja.default=c1});var ld=F($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.retryAfterStatusCodes=void 0;$n.retryAfterStatusCodes=new Set([413,429,503]);var f1=({attemptCount:t,retryOptions:r,error:i,retryAfter:o})=>{if(t>r.limit)return 0;let a=r.methods.includes(i.options.method),c=r.errorCodes.includes(i.code),f=i.response&&r.statusCodes.includes(i.response.statusCode);if(!a||!c&&!f)return 0;if(i.response){if(o)return r.maxRetryAfter===void 0||o>r.maxRetryAfter?0:o;if(i.response.statusCode===413)return 0}let d=Math.random()*100;return 2**(t-1)*1e3+d};$n.default=f1});var jn=F(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.UnsupportedProtocolError=oe.ReadError=oe.TimeoutError=oe.UploadError=oe.CacheError=oe.HTTPError=oe.MaxRedirectsError=oe.RequestError=oe.setNonEnumerableProperties=oe.knownHookEvents=oe.withoutBody=oe.kIsNormalizedAlready=void 0;var hd=require("util"),dd=require("stream"),l1=require("fs"),cr=require("url"),pd=require("http"),Ka=require("http"),h1=require("https"),d1=Sl(),p1=Al(),md=fh(),m1=ph(),y1=Gh(),g1=es(),A=Vt(),_1=Xh(),yd=La(),v1=Na(),gd=ed(),w1=rd(),_d=nd(),E1=sd(),S1=ja(),vd=ad(),b1=za(),fr=cd(),x1=fd(),T1=ld(),Va,Me=Symbol("request"),ss=Symbol("response"),rn=Symbol("responseSize"),nn=Symbol("downloadedSize"),sn=Symbol("bodySize"),on=Symbol("uploadedSize"),os=Symbol("serverResponsesPiped"),wd=Symbol("unproxyEvents"),Ed=Symbol("isFromCache"),Ya=Symbol("cancelTimeouts"),Sd=Symbol("startedReading"),an=Symbol("stopReading"),as=Symbol("triggerRead"),lr=Symbol("body"),Wn=Symbol("jobs"),bd=Symbol("originalResponse"),xd=Symbol("retryTimeout");oe.kIsNormalizedAlready=Symbol("isNormalizedAlready");var C1=A.default.string(process.versions.brotli);oe.withoutBody=new Set(["GET","HEAD"]);oe.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function P1(t){for(let r in t){let i=t[r];if(!A.default.string(i)&&!A.default.number(i)&&!A.default.boolean(i)&&!A.default.null_(i)&&!A.default.undefined(i))throw new TypeError(`The \`searchParams\` value '${String(i)}' must be a string, number, boolean or null`)}}function R1(t){return A.default.object(t)&&!("statusCode"in t)}var Xa=new E1.default,A1=async t=>new Promise((r,i)=>{let o=a=>{i(a)};t.pending||r(),t.once("error",o),t.once("ready",()=>{t.off("error",o),r()})}),O1=new Set([300,301,302,303,304,307,308]),k1=["context","body","json","form"];oe.setNonEnumerableProperties=(t,r)=>{let i={};for(let o of t)if(!!o)for(let a of k1)a in o&&(i[a]={writable:!0,configurable:!0,enumerable:!1,value:o[a]});Object.defineProperties(r,i)};var Ie=class extends Error{constructor(r,i,o){var a,c;super(r);if(Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(a=i.code)!==null&&a!==void 0?a:"ERR_GOT_REQUEST_ERROR",o instanceof iu?(Object.defineProperty(this,"request",{enumerable:!1,value:o}),Object.defineProperty(this,"response",{enumerable:!1,value:o[ss]}),Object.defineProperty(this,"options",{enumerable:!1,value:o.options})):Object.defineProperty(this,"options",{enumerable:!1,value:o}),this.timings=(c=this.request)===null||c===void 0?void 0:c.timings,A.default.string(i.stack)&&A.default.string(this.stack)){let f=this.stack.indexOf(this.message)+this.message.length,d=this.stack.slice(f).split(` +`).reverse(),g=i.stack.slice(i.stack.indexOf(i.message)+i.message.length).split(` +`).reverse();for(;g.length!==0&&g[0]===d[0];)d.shift();this.stack=`${this.stack.slice(0,f)}${d.reverse().join(` +`)}${g.reverse().join(` +`)}`}}};oe.RequestError=Ie;var Za=class extends Ie{constructor(r){super(`Redirected ${r.options.maxRedirects} times. Aborting.`,{},r);this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}};oe.MaxRedirectsError=Za;var Qa=class extends Ie{constructor(r){super(`Response code ${r.statusCode} (${r.statusMessage})`,{},r.request);this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}};oe.HTTPError=Qa;var eu=class extends Ie{constructor(r,i){super(r.message,r,i);this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}};oe.CacheError=eu;var tu=class extends Ie{constructor(r,i){super(r.message,r,i);this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}};oe.UploadError=tu;var ru=class extends Ie{constructor(r,i,o){super(r.message,r,o);this.name="TimeoutError",this.event=r.event,this.timings=i}};oe.TimeoutError=ru;var us=class extends Ie{constructor(r,i){super(r.message,r,i);this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}};oe.ReadError=us;var nu=class extends Ie{constructor(r){super(`Unsupported protocol "${r.url.protocol}"`,{},r);this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}};oe.UnsupportedProtocolError=nu;var q1=["socket","connect","continue","information","upgrade","timeout"],iu=class extends dd.Duplex{constructor(r,i={},o){super({autoDestroy:!1,highWaterMark:0});this[nn]=0,this[on]=0,this.requestInitialized=!1,this[os]=new Set,this.redirects=[],this[an]=!1,this[as]=!1,this[Wn]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),c=()=>this._lockWrite();this.on("pipe",E=>{E.prependListener("data",a),E.on("data",c),E.prependListener("end",a),E.on("end",c)}),this.on("unpipe",E=>{E.off("data",a),E.off("data",c),E.off("end",a),E.off("end",c)}),this.on("pipe",E=>{E instanceof Ka.IncomingMessage&&(this.options.headers=M(M({},E.headers),this.options.headers))});let{json:f,body:d,form:g}=i;if((f||d||g)&&this._lockWrite(),oe.kIsNormalizedAlready in i)this.options=i;else try{this.options=this.constructor.normalizeArguments(r,i,o)}catch(E){A.default.nodeStream(i.body)&&i.body.destroy(),this.destroy(E);return}(async()=>{var E;try{this.options.body instanceof l1.ReadStream&&await A1(this.options.body);let{url:S}=this.options;if(!S)throw new TypeError("Missing `url` property");if(this.requestUrl=S.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(E=this[Me])===null||E===void 0||E.destroy();return}for(let b of this[Wn])b();this[Wn].length=0,this.requestInitialized=!0}catch(S){if(S instanceof Ie){this._beforeError(S);return}this.destroyed||this.destroy(S)}})()}static normalizeArguments(r,i,o){var a,c,f,d,g;let E=i;if(A.default.object(r)&&!A.default.urlInstance(r))i=M(M(M({},o),r),i);else{if(r&&i&&i.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");i=M(M({},o),i),r!==void 0&&(i.url=r),A.default.urlInstance(i.url)&&(i.url=new cr.URL(i.url.toString()))}if(i.cache===!1&&(i.cache=void 0),i.dnsCache===!1&&(i.dnsCache=void 0),A.assert.any([A.default.string,A.default.undefined],i.method),A.assert.any([A.default.object,A.default.undefined],i.headers),A.assert.any([A.default.string,A.default.urlInstance,A.default.undefined],i.prefixUrl),A.assert.any([A.default.object,A.default.undefined],i.cookieJar),A.assert.any([A.default.object,A.default.string,A.default.undefined],i.searchParams),A.assert.any([A.default.object,A.default.string,A.default.undefined],i.cache),A.assert.any([A.default.object,A.default.number,A.default.undefined],i.timeout),A.assert.any([A.default.object,A.default.undefined],i.context),A.assert.any([A.default.object,A.default.undefined],i.hooks),A.assert.any([A.default.boolean,A.default.undefined],i.decompress),A.assert.any([A.default.boolean,A.default.undefined],i.ignoreInvalidCookies),A.assert.any([A.default.boolean,A.default.undefined],i.followRedirect),A.assert.any([A.default.number,A.default.undefined],i.maxRedirects),A.assert.any([A.default.boolean,A.default.undefined],i.throwHttpErrors),A.assert.any([A.default.boolean,A.default.undefined],i.http2),A.assert.any([A.default.boolean,A.default.undefined],i.allowGetBody),A.assert.any([A.default.string,A.default.undefined],i.localAddress),A.assert.any([vd.isDnsLookupIpVersion,A.default.undefined],i.dnsLookupIpVersion),A.assert.any([A.default.object,A.default.undefined],i.https),A.assert.any([A.default.boolean,A.default.undefined],i.rejectUnauthorized),i.https&&(A.assert.any([A.default.boolean,A.default.undefined],i.https.rejectUnauthorized),A.assert.any([A.default.function_,A.default.undefined],i.https.checkServerIdentity),A.assert.any([A.default.string,A.default.object,A.default.array,A.default.undefined],i.https.certificateAuthority),A.assert.any([A.default.string,A.default.object,A.default.array,A.default.undefined],i.https.key),A.assert.any([A.default.string,A.default.object,A.default.array,A.default.undefined],i.https.certificate),A.assert.any([A.default.string,A.default.undefined],i.https.passphrase),A.assert.any([A.default.string,A.default.buffer,A.default.array,A.default.undefined],i.https.pfx)),A.assert.any([A.default.object,A.default.undefined],i.cacheOptions),A.default.string(i.method)?i.method=i.method.toUpperCase():i.method="GET",i.headers===(o==null?void 0:o.headers)?i.headers=M({},i.headers):i.headers=g1(M(M({},o==null?void 0:o.headers),i.headers)),"slashes"in i)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in i)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in i&&i.searchParams&&i.searchParams!==(o==null?void 0:o.searchParams)){let x;if(A.default.string(i.searchParams)||i.searchParams instanceof cr.URLSearchParams)x=new cr.URLSearchParams(i.searchParams);else{P1(i.searchParams),x=new cr.URLSearchParams;for(let P in i.searchParams){let L=i.searchParams[P];L===null?x.append(P,""):L!==void 0&&x.append(P,L)}}(a=o==null?void 0:o.searchParams)===null||a===void 0||a.forEach((P,L)=>{x.has(L)||x.append(L,P)}),i.searchParams=x}if(i.username=(c=i.username)!==null&&c!==void 0?c:"",i.password=(f=i.password)!==null&&f!==void 0?f:"",A.default.undefined(i.prefixUrl)?i.prefixUrl=(d=o==null?void 0:o.prefixUrl)!==null&&d!==void 0?d:"":(i.prefixUrl=i.prefixUrl.toString(),i.prefixUrl!==""&&!i.prefixUrl.endsWith("/")&&(i.prefixUrl+="/")),A.default.string(i.url)){if(i.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");i.url=_d.default(i.prefixUrl+i.url,i)}else(A.default.undefined(i.url)&&i.prefixUrl!==""||i.protocol)&&(i.url=_d.default(i.prefixUrl,i));if(i.url){"port"in i&&delete i.port;let{prefixUrl:x}=i;Object.defineProperty(i,"prefixUrl",{set:L=>{let C=i.url;if(!C.href.startsWith(L))throw new Error(`Cannot change \`prefixUrl\` from ${x} to ${L}: ${C.href}`);i.url=new cr.URL(L+C.href.slice(x.length)),x=L},get:()=>x});let{protocol:P}=i.url;if(P==="unix:"&&(P="http:",i.url=new cr.URL(`http://unix${i.url.pathname}${i.url.search}`)),i.searchParams&&(i.url.search=i.searchParams.toString()),P!=="http:"&&P!=="https:")throw new nu(i);i.username===""?i.username=i.url.username:i.url.username=i.username,i.password===""?i.password=i.url.password:i.url.password=i.password}let{cookieJar:S}=i;if(S){let{setCookie:x,getCookieString:P}=S;A.assert.function_(x),A.assert.function_(P),x.length===4&&P.length===0&&(x=hd.promisify(x.bind(i.cookieJar)),P=hd.promisify(P.bind(i.cookieJar)),i.cookieJar={setCookie:x,getCookieString:P})}let{cache:b}=i;if(b&&(Xa.has(b)||Xa.set(b,new md((x,P)=>{let L=x[Me](x,P);return A.default.promise(L)&&(L.once=(C,D)=>{if(C==="error")L.catch(D);else if(C==="abort")(async()=>{try{(await L).once("abort",D)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${C}`);return L}),L},b))),i.cacheOptions=M({},i.cacheOptions),i.dnsCache===!0)Va||(Va=new p1.default),i.dnsCache=Va;else if(!A.default.undefined(i.dnsCache)&&!i.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${A.default(i.dnsCache)}`);A.default.number(i.timeout)?i.timeout={request:i.timeout}:o&&i.timeout!==o.timeout?i.timeout=M(M({},o.timeout),i.timeout):i.timeout=M({},i.timeout),i.context||(i.context={});let T=i.hooks===(o==null?void 0:o.hooks);i.hooks=M({},i.hooks);for(let x of oe.knownHookEvents)if(x in i.hooks)if(A.default.array(i.hooks[x]))i.hooks[x]=[...i.hooks[x]];else throw new TypeError(`Parameter \`${x}\` must be an Array, got ${A.default(i.hooks[x])}`);else i.hooks[x]=[];if(o&&!T)for(let x of oe.knownHookEvents)o.hooks[x].length>0&&(i.hooks[x]=[...o.hooks[x],...i.hooks[x]]);if("family"in i&&fr.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(o==null?void 0:o.https)&&(i.https=M(M({},o.https),i.https)),"rejectUnauthorized"in i&&fr.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in i&&fr.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in i&&fr.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in i&&fr.default('"options.key" was never documented, please use "options.https.key"'),"cert"in i&&fr.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in i&&fr.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in i&&fr.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in i)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(i.agent){for(let x in i.agent)if(x!=="http"&&x!=="https"&&x!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${x}\``)}return i.maxRedirects=(g=i.maxRedirects)!==null&&g!==void 0?g:0,oe.setNonEnumerableProperties([o,E],i),x1.default(i,o)}_lockWrite(){let r=()=>{throw new TypeError("The payload has been already provided")};this.write=r,this.end=r}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:r}=this,{headers:i}=r,o=!A.default.undefined(r.form),a=!A.default.undefined(r.json),c=!A.default.undefined(r.body),f=o||a||c,d=oe.withoutBody.has(r.method)&&!(r.method==="GET"&&r.allowGetBody);if(this._cannotHaveBody=d,f){if(d)throw new TypeError(`The \`${r.method}\` method cannot be used with a body`);if([c,o,a].filter(g=>g).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(c&&!(r.body instanceof dd.Readable)&&!A.default.string(r.body)&&!A.default.buffer(r.body)&&!yd.default(r.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(o&&!A.default.object(r.form))throw new TypeError("The `form` option must be an Object");{let g=!A.default.string(i["content-type"]);c?(yd.default(r.body)&&g&&(i["content-type"]=`multipart/form-data; boundary=${r.body.getBoundary()}`),this[lr]=r.body):o?(g&&(i["content-type"]="application/x-www-form-urlencoded"),this[lr]=new cr.URLSearchParams(r.form).toString()):(g&&(i["content-type"]="application/json"),this[lr]=r.stringifyJson(r.json));let E=await _1.default(this[lr],r.headers);A.default.undefined(i["content-length"])&&A.default.undefined(i["transfer-encoding"])&&!d&&!A.default.undefined(E)&&(i["content-length"]=String(E))}}else d?this._lockWrite():this._unlockWrite();this[sn]=Number(i["content-length"])||void 0}async _onResponseBase(r){let{options:i}=this,{url:o}=i;this[bd]=r,i.decompress&&(r=m1(r));let a=r.statusCode,c=r;c.statusMessage=c.statusMessage?c.statusMessage:pd.STATUS_CODES[a],c.url=i.url.toString(),c.requestUrl=this.requestUrl,c.redirectUrls=this.redirects,c.request=this,c.isFromCache=r.fromCache||!1,c.ip=this.ip,c.retryCount=this.retryCount,this[Ed]=c.isFromCache,this[rn]=Number(r.headers["content-length"])||void 0,this[ss]=r,r.once("end",()=>{this[rn]=this[nn],this.emit("downloadProgress",this.downloadProgress)}),r.once("error",d=>{r.destroy(),this._beforeError(new us(d,this))}),r.once("aborted",()=>{this._beforeError(new us({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let f=r.headers["set-cookie"];if(A.default.object(i.cookieJar)&&f){let d=f.map(async g=>i.cookieJar.setCookie(g,o.toString()));i.ignoreInvalidCookies&&(d=d.map(async g=>g.catch(()=>{})));try{await Promise.all(d)}catch(g){this._beforeError(g);return}}if(i.followRedirect&&r.headers.location&&O1.has(a)){if(r.resume(),this[Me]&&(this[Ya](),delete this[Me],this[wd]()),(a===303&&i.method!=="GET"&&i.method!=="HEAD"||!i.methodRewriting)&&(i.method="GET","body"in i&&delete i.body,"json"in i&&delete i.json,"form"in i&&delete i.form,this[lr]=void 0,delete i.headers["content-length"]),this.redirects.length>=i.maxRedirects){this._beforeError(new Za(this));return}try{let g=Buffer.from(r.headers.location,"binary").toString(),E=new cr.URL(g,o),S=E.toString();decodeURI(S),E.hostname!==o.hostname||E.port!==o.port?("host"in i.headers&&delete i.headers.host,"cookie"in i.headers&&delete i.headers.cookie,"authorization"in i.headers&&delete i.headers.authorization,(i.username||i.password)&&(i.username="",i.password="")):(E.username=i.username,E.password=i.password),this.redirects.push(S),i.url=E;for(let b of i.hooks.beforeRedirect)await b(i,c);this.emit("redirect",c,i),await this._makeRequest()}catch(g){this._beforeError(g);return}return}if(i.isStream&&i.throwHttpErrors&&!b1.isResponseOk(c)){this._beforeError(new Qa(c));return}r.on("readable",()=>{this[as]&&this._read()}),this.on("resume",()=>{r.resume()}),this.on("pause",()=>{r.pause()}),r.once("end",()=>{this.push(null)}),this.emit("response",r);for(let d of this[os])if(!d.headersSent){for(let g in r.headers){let E=i.decompress?g!=="content-encoding":!0,S=r.headers[g];E&&d.setHeader(g,S)}d.statusCode=a}}async _onResponse(r){try{await this._onResponseBase(r)}catch(i){this._beforeError(i)}}_onRequest(r){let{options:i}=this,{timeout:o,url:a}=i;d1.default(r),this[Ya]=gd.default(r,o,a);let c=i.cache?"cacheableResponse":"response";r.once(c,g=>{this._onResponse(g)}),r.once("error",g=>{var E;r.destroy(),(E=r.res)===null||E===void 0||E.removeAllListeners("end"),g=g instanceof gd.TimeoutError?new ru(g,this.timings,this):new Ie(g.message,g,this),this._beforeError(g)}),this[wd]=v1.default(r,this,q1),this[Me]=r,this.emit("uploadProgress",this.uploadProgress);let f=this[lr],d=this.redirects.length===0?this:r;A.default.nodeStream(f)?(f.pipe(d),f.once("error",g=>{this._beforeError(new tu(g,this))})):(this._unlockWrite(),A.default.undefined(f)?(this._cannotHaveBody||this._noPipe)&&(d.end(),this._lockWrite()):(this._writeRequest(f,void 0,()=>{}),d.end(),this._lockWrite())),this.emit("request",r)}async _createCacheableRequest(r,i){return new Promise((o,a)=>{Object.assign(i,w1.default(r)),delete i.url;let c,f=Xa.get(i.cache)(i,async d=>{d._readableState.autoDestroy=!1,c&&(await c).emit("cacheableResponse",d),o(d)});i.url=r,f.once("error",a),f.once("request",async d=>{c=d,o(c)})})}async _makeRequest(){var r,i,o,a,c;let{options:f}=this,{headers:d}=f;for(let D in d)if(A.default.undefined(d[D]))delete d[D];else if(A.default.null_(d[D]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${D}\` header`);if(f.decompress&&A.default.undefined(d["accept-encoding"])&&(d["accept-encoding"]=C1?"gzip, deflate, br":"gzip, deflate"),f.cookieJar){let D=await f.cookieJar.getCookieString(f.url.toString());A.default.nonEmptyString(D)&&(f.headers.cookie=D)}for(let D of f.hooks.beforeRequest){let $=await D(f);if(!A.default.undefined($)){f.request=()=>$;break}}f.body&&this[lr]!==f.body&&(this[lr]=f.body);let{agent:g,request:E,timeout:S,url:b}=f;if(f.dnsCache&&!("lookup"in f)&&(f.lookup=f.dnsCache.lookup),b.hostname==="unix"){let D=/(?.+?):(?.+)/.exec(`${b.pathname}${b.search}`);if(D==null?void 0:D.groups){let{socketPath:$,path:ee}=D.groups;Object.assign(f,{socketPath:$,path:ee,host:""})}}let T=b.protocol==="https:",x;f.http2?x=y1.auto:x=T?h1.request:pd.request;let P=(r=f.request)!==null&&r!==void 0?r:x,L=f.cache?this._createCacheableRequest:P;g&&!f.http2&&(f.agent=g[T?"https":"http"]),f[Me]=P,delete f.request,delete f.timeout;let C=f;if(C.shared=(i=f.cacheOptions)===null||i===void 0?void 0:i.shared,C.cacheHeuristic=(o=f.cacheOptions)===null||o===void 0?void 0:o.cacheHeuristic,C.immutableMinTimeToLive=(a=f.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,C.ignoreCargoCult=(c=f.cacheOptions)===null||c===void 0?void 0:c.ignoreCargoCult,f.dnsLookupIpVersion!==void 0)try{C.family=vd.dnsLookupIpVersionToFamily(f.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}f.https&&("rejectUnauthorized"in f.https&&(C.rejectUnauthorized=f.https.rejectUnauthorized),f.https.checkServerIdentity&&(C.checkServerIdentity=f.https.checkServerIdentity),f.https.certificateAuthority&&(C.ca=f.https.certificateAuthority),f.https.certificate&&(C.cert=f.https.certificate),f.https.key&&(C.key=f.https.key),f.https.passphrase&&(C.passphrase=f.https.passphrase),f.https.pfx&&(C.pfx=f.https.pfx));try{let D=await L(b,C);A.default.undefined(D)&&(D=x(b,C)),f.request=E,f.timeout=S,f.agent=g,f.https&&("rejectUnauthorized"in f.https&&delete C.rejectUnauthorized,f.https.checkServerIdentity&&delete C.checkServerIdentity,f.https.certificateAuthority&&delete C.ca,f.https.certificate&&delete C.cert,f.https.key&&delete C.key,f.https.passphrase&&delete C.passphrase,f.https.pfx&&delete C.pfx),R1(D)?this._onRequest(D):this.writable?(this.once("finish",()=>{this._onResponse(D)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(D)}catch(D){throw D instanceof md.CacheError?new eu(D,this):new Ie(D.message,D,this)}}async _error(r){try{for(let i of this.options.hooks.beforeError)r=await i(r)}catch(i){r=new Ie(i.message,i,this)}this.destroy(r)}_beforeError(r){if(this[an])return;let{options:i}=this,o=this.retryCount+1;this[an]=!0,r instanceof Ie||(r=new Ie(r.message,r,this));let a=r,{response:c}=a;(async()=>{if(c&&!c.body){c.setEncoding(this._readableState.encoding);try{c.rawBody=await S1.default(c),c.body=c.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let f;try{let d;c&&"retry-after"in c.headers&&(d=Number(c.headers["retry-after"]),Number.isNaN(d)?(d=Date.parse(c.headers["retry-after"])-Date.now(),d<=0&&(d=1)):d*=1e3),f=await i.retry.calculateDelay({attemptCount:o,retryOptions:i.retry,error:a,retryAfter:d,computedValue:T1.default({attemptCount:o,retryOptions:i.retry,error:a,retryAfter:d,computedValue:0})})}catch(d){this._error(new Ie(d.message,d,this));return}if(f){let d=async()=>{try{for(let g of this.options.hooks.beforeRetry)await g(this.options,a,o)}catch(g){this._error(new Ie(g.message,r,this));return}this.destroyed||(this.destroy(),this.emit("retry",o,r))};this[xd]=setTimeout(d,f);return}}this._error(a)})()}_read(){this[as]=!0;let r=this[ss];if(r&&!this[an]){r.readableLength&&(this[as]=!1);let i;for(;(i=r.read())!==null;){this[nn]+=i.length,this[Sd]=!0;let o=this.downloadProgress;o.percent<1&&this.emit("downloadProgress",o),this.push(i)}}}_write(r,i,o){let a=()=>{this._writeRequest(r,i,o)};this.requestInitialized?a():this[Wn].push(a)}_writeRequest(r,i,o){this[Me].destroyed||(this._progressCallbacks.push(()=>{this[on]+=Buffer.byteLength(r,i);let a=this.uploadProgress;a.percent<1&&this.emit("uploadProgress",a)}),this[Me].write(r,i,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),o(a)}))}_final(r){let i=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(Me in this)){r();return}if(this[Me].destroyed){r();return}this[Me].end(o=>{o||(this[sn]=this[on],this.emit("uploadProgress",this.uploadProgress),this[Me].emit("upload-complete")),r(o)})};this.requestInitialized?i():this[Wn].push(i)}_destroy(r,i){var o;this[an]=!0,clearTimeout(this[xd]),Me in this&&(this[Ya](),((o=this[ss])===null||o===void 0?void 0:o.complete)||this[Me].destroy()),r!==null&&!A.default.undefined(r)&&!(r instanceof Ie)&&(r=new Ie(r.message,r,this)),i(r)}get _isAboutToError(){return this[an]}get ip(){var r;return(r=this.socket)===null||r===void 0?void 0:r.remoteAddress}get aborted(){var r,i,o;return((i=(r=this[Me])===null||r===void 0?void 0:r.destroyed)!==null&&i!==void 0?i:this.destroyed)&&!((o=this[bd])===null||o===void 0?void 0:o.complete)}get socket(){var r,i;return(i=(r=this[Me])===null||r===void 0?void 0:r.socket)!==null&&i!==void 0?i:void 0}get downloadProgress(){let r;return this[rn]?r=this[nn]/this[rn]:this[rn]===this[nn]?r=1:r=0,{percent:r,transferred:this[nn],total:this[rn]}}get uploadProgress(){let r;return this[sn]?r=this[on]/this[sn]:this[sn]===this[on]?r=1:r=0,{percent:r,transferred:this[on],total:this[sn]}}get timings(){var r;return(r=this[Me])===null||r===void 0?void 0:r.timings}get isFromCache(){return this[Ed]}pipe(r,i){if(this[Sd])throw new Error("Failed to pipe. The response has been emitted already.");return r instanceof Ka.ServerResponse&&this[os].add(r),super.pipe(r,i)}unpipe(r){return r instanceof Ka.ServerResponse&&this[os].delete(r),super.unpipe(r),this}};oe.default=iu});var zn=F(Ot=>{"use strict";var I1=Ot&&Ot.__createBinding||(Object.create?function(t,r,i,o){o===void 0&&(o=i),Object.defineProperty(t,o,{enumerable:!0,get:function(){return r[i]}})}:function(t,r,i,o){o===void 0&&(o=i),t[o]=r[i]}),L1=Ot&&Ot.__exportStar||function(t,r){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&I1(r,t,i)};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.CancelError=Ot.ParseError=void 0;var Td=jn(),Cd=class extends Td.RequestError{constructor(r,i){let{options:o}=i.request;super(`${r.message} in "${o.url.toString()}"`,r,i.request);this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}};Ot.ParseError=Cd;var Pd=class extends Td.RequestError{constructor(r){super("Promise was canceled",{},r);this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};Ot.CancelError=Pd;L1(jn(),Ot)});var Ad=F(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var Rd=zn(),F1=(t,r,i,o)=>{let{rawBody:a}=t;try{if(r==="text")return a.toString(o);if(r==="json")return a.length===0?"":i(a.toString());if(r==="buffer")return a;throw new Rd.ParseError({message:`Unknown body type '${r}'`,name:"Error"},t)}catch(c){throw new Rd.ParseError(c,t)}};su.default=F1});var ou=F(hr=>{"use strict";var D1=hr&&hr.__createBinding||(Object.create?function(t,r,i,o){o===void 0&&(o=i),Object.defineProperty(t,o,{enumerable:!0,get:function(){return r[i]}})}:function(t,r,i,o){o===void 0&&(o=i),t[o]=r[i]}),N1=hr&&hr.__exportStar||function(t,r){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&D1(r,t,i)};Object.defineProperty(hr,"__esModule",{value:!0});var M1=require("events"),U1=Vt(),H1=wl(),cs=zn(),Od=Ad(),kd=jn(),B1=Na(),$1=ja(),qd=za(),W1=["request","response","redirect","uploadProgress","downloadProgress"];function Id(t){let r,i,o=new M1.EventEmitter,a=new H1((f,d,g)=>{let E=S=>{let b=new kd.default(void 0,t);b.retryCount=S,b._noPipe=!0,g(()=>b.destroy()),g.shouldReject=!1,g(()=>d(new cs.CancelError(b))),r=b,b.once("response",async P=>{var L;if(P.retryCount=S,P.request.aborted)return;let C;try{C=await $1.default(b),P.rawBody=C}catch{return}if(b._isAboutToError)return;let D=((L=P.headers["content-encoding"])!==null&&L!==void 0?L:"").toLowerCase(),$=["gzip","deflate","br"].includes(D),{options:ee}=b;if($&&!ee.decompress)P.body=C;else try{P.body=Od.default(P,ee.responseType,ee.parseJson,ee.encoding)}catch(Se){if(P.body=C.toString(),qd.isResponseOk(P)){b._beforeError(Se);return}}try{for(let[Se,Pe]of ee.hooks.afterResponse.entries())P=await Pe(P,async lt=>{let nt=kd.default.normalizeArguments(void 0,qe(M({},lt),{retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1}),ee);nt.hooks.afterResponse=nt.hooks.afterResponse.slice(0,Se);for(let ne of nt.hooks.beforeRetry)await ne(nt);let G=Id(nt);return g(()=>{G.catch(()=>{}),G.cancel()}),G})}catch(Se){b._beforeError(new cs.RequestError(Se.message,Se,b));return}if(!qd.isResponseOk(P)){b._beforeError(new cs.HTTPError(P));return}i=P,f(b.options.resolveBodyOnly?P.body:P)});let T=P=>{if(a.isCanceled)return;let{options:L}=b;if(P instanceof cs.HTTPError&&!L.throwHttpErrors){let{response:C}=P;f(b.options.resolveBodyOnly?C.body:C);return}d(P)};b.once("error",T);let x=b.options.body;b.once("retry",(P,L)=>{var C,D;if(x===((C=L.request)===null||C===void 0?void 0:C.options.body)&&U1.default.nodeStream((D=L.request)===null||D===void 0?void 0:D.options.body)){T(L);return}E(P)}),B1.default(b,o,W1)};E(0)});a.on=(f,d)=>(o.on(f,d),a);let c=f=>{let d=(async()=>{await a;let{options:g}=i.request;return Od.default(i,f,g.parseJson,g.encoding)})();return Object.defineProperties(d,Object.getOwnPropertyDescriptors(a)),d};return a.json=()=>{let{headers:f}=r.options;return!r.writableFinished&&f.accept===void 0&&(f.accept="application/json"),c("json")},a.buffer=()=>c("buffer"),a.text=()=>c("text"),a}hr.default=Id;N1(zn(),hr)});var Ld=F(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var j1=zn();function z1(t,...r){let i=(async()=>{if(t instanceof j1.RequestError)try{for(let a of r)if(a)for(let c of a)t=await c(t)}catch(a){t=a}throw t})(),o=()=>i;return i.json=o,i.text=o,i.buffer=o,i.on=o,i}au.default=z1});var Nd=F(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var Fd=Vt();function Dd(t){for(let r of Object.values(t))(Fd.default.plainObject(r)||Fd.default.array(r))&&Dd(r);return Object.freeze(t)}uu.default=Dd});var Ud=F(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0})});var cu=F(St=>{"use strict";var G1=St&&St.__createBinding||(Object.create?function(t,r,i,o){o===void 0&&(o=i),Object.defineProperty(t,o,{enumerable:!0,get:function(){return r[i]}})}:function(t,r,i,o){o===void 0&&(o=i),t[o]=r[i]}),J1=St&&St.__exportStar||function(t,r){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&G1(r,t,i)};Object.defineProperty(St,"__esModule",{value:!0});St.defaultHandler=void 0;var Hd=Vt(),Et=ou(),K1=Ld(),fs=jn(),V1=Nd(),Y1={RequestError:Et.RequestError,CacheError:Et.CacheError,ReadError:Et.ReadError,HTTPError:Et.HTTPError,MaxRedirectsError:Et.MaxRedirectsError,TimeoutError:Et.TimeoutError,ParseError:Et.ParseError,CancelError:Et.CancelError,UnsupportedProtocolError:Et.UnsupportedProtocolError,UploadError:Et.UploadError},X1=async t=>new Promise(r=>{setTimeout(r,t)}),{normalizeArguments:ls}=fs.default,Bd=(...t)=>{let r;for(let i of t)r=ls(void 0,i,r);return r},Z1=t=>t.isStream?new fs.default(void 0,t):Et.default(t),Q1=t=>"defaults"in t&&"options"in t.defaults,eT=["get","post","put","patch","head","delete"];St.defaultHandler=(t,r)=>r(t);var $d=(t,r)=>{if(t)for(let i of t)i(r)},Wd=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(o=>(a,c)=>{let f,d=o(a,g=>(f=c(g),f));if(d!==f&&!a.isStream&&f){let g=d,{then:E,catch:S,finally:b}=g;Object.setPrototypeOf(g,Object.getPrototypeOf(f)),Object.defineProperties(g,Object.getOwnPropertyDescriptors(f)),g.then=E,g.catch=S,g.finally=b}return d});let r=(o,a={},c)=>{var f,d;let g=0,E=S=>t.handlers[g++](S,g===t.handlers.length?Z1:E);if(Hd.default.plainObject(o)){let S=M(M({},o),a);fs.setNonEnumerableProperties([o,a],S),a=S,o=void 0}try{let S;try{$d(t.options.hooks.init,a),$d((f=a.hooks)===null||f===void 0?void 0:f.init,a)}catch(T){S=T}let b=ls(o,a,c!=null?c:t.options);if(b[fs.kIsNormalizedAlready]=!0,S)throw new Et.RequestError(S.message,S,b);return E(b)}catch(S){if(a.isStream)throw S;return K1.default(S,t.options.hooks.beforeError,(d=a.hooks)===null||d===void 0?void 0:d.beforeError)}};r.extend=(...o)=>{let a=[t.options],c=[...t._rawHandlers],f;for(let d of o)Q1(d)?(a.push(d.defaults.options),c.push(...d.defaults._rawHandlers),f=d.defaults.mutableDefaults):(a.push(d),"handlers"in d&&c.push(...d.handlers),f=d.mutableDefaults);return c=c.filter(d=>d!==St.defaultHandler),c.length===0&&c.push(St.defaultHandler),Wd({options:Bd(...a),handlers:c,mutableDefaults:Boolean(f)})};let i=async function*(o,a){let c=ls(o,a,t.options);c.resolveBodyOnly=!1;let f=c.pagination;if(!Hd.default.object(f))throw new TypeError("`options.pagination` must be implemented");let d=[],{countLimit:g}=f,E=0;for(;E{let c=[];for await(let f of i(o,a))c.push(f);return c},r.paginate.each=i,r.stream=(o,a)=>r(o,qe(M({},a),{isStream:!0}));for(let o of eT)r[o]=(a,c)=>r(a,qe(M({},c),{method:o})),r.stream[o]=(a,c)=>r(a,qe(M({},c),{method:o,isStream:!0}));return Object.assign(r,Y1),Object.defineProperty(r,"defaults",{value:t.mutableDefaults?t:V1.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),r.mergeOptions=Bd,r};St.default=Wd;J1(Ud(),St)});var Gd=F((Xt,hs)=>{"use strict";var tT=Xt&&Xt.__createBinding||(Object.create?function(t,r,i,o){o===void 0&&(o=i),Object.defineProperty(t,o,{enumerable:!0,get:function(){return r[i]}})}:function(t,r,i,o){o===void 0&&(o=i),t[o]=r[i]}),jd=Xt&&Xt.__exportStar||function(t,r){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&tT(r,t,i)};Object.defineProperty(Xt,"__esModule",{value:!0});var rT=require("url"),zd=cu(),nT={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let r=t.headers.link.split(","),i;for(let o of r){let a=o.split(";");if(a[1].includes("next")){i=a[0].trimStart().trim(),i=i.slice(1,-1);break}}return i?{url:new rT.URL(i)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[zd.defaultHandler],mutableDefaults:!1},fu=zd.default(nT);Xt.default=fu;hs.exports=fu;hs.exports.default=fu;hs.exports.__esModule=!0;jd(cu(),Xt);jd(ou(),Xt)});var tt=F(lu=>{"use strict";lu.fromCallback=function(t){return Object.defineProperty(function(...r){if(typeof r[r.length-1]=="function")t.apply(this,r);else return new Promise((i,o)=>{t.call(this,...r,(a,c)=>a!=null?o(a):i(c))})},"name",{value:t.name})};lu.fromPromise=function(t){return Object.defineProperty(function(...r){let i=r[r.length-1];if(typeof i!="function")return t.apply(this,r);t.apply(this,r.slice(0,-1)).then(o=>i(null,o),i)},"name",{value:t.name})}});var Kd=F((ER,Jd)=>{var dr=require("constants"),iT=process.cwd,ds=null,sT=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return ds||(ds=iT.call(process)),ds};try{process.cwd()}catch{}typeof process.chdir=="function"&&(hu=process.chdir,process.chdir=function(t){ds=null,hu.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,hu));var hu;Jd.exports=oT;function oT(t){dr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&r(t),t.lutimes||i(t),t.chown=c(t.chown),t.fchown=c(t.fchown),t.lchown=c(t.lchown),t.chmod=o(t.chmod),t.fchmod=o(t.fchmod),t.lchmod=o(t.lchmod),t.chownSync=f(t.chownSync),t.fchownSync=f(t.fchownSync),t.lchownSync=f(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=d(t.stat),t.fstat=d(t.fstat),t.lstat=d(t.lstat),t.statSync=g(t.statSync),t.fstatSync=g(t.fstatSync),t.lstatSync=g(t.lstatSync),t.lchmod||(t.lchmod=function(S,b,T){T&&process.nextTick(T)},t.lchmodSync=function(){}),t.lchown||(t.lchown=function(S,b,T,x){x&&process.nextTick(x)},t.lchownSync=function(){}),sT==="win32"&&(t.rename=function(S){return function(b,T,x){var P=Date.now(),L=0;S(b,T,function C(D){if(D&&(D.code==="EACCES"||D.code==="EPERM")&&Date.now()-P<6e4){setTimeout(function(){t.stat(T,function($,ee){$&&$.code==="ENOENT"?S(b,T,C):x(D)})},L),L<100&&(L+=10);return}x&&x(D)})}}(t.rename)),t.read=function(S){function b(T,x,P,L,C,D){var $;if(D&&typeof D=="function"){var ee=0;$=function(Se,Pe,lt){if(Se&&Se.code==="EAGAIN"&&ee<10)return ee++,S.call(t,T,x,P,L,C,$);D.apply(this,arguments)}}return S.call(t,T,x,P,L,C,$)}return Object.setPrototypeOf&&Object.setPrototypeOf(b,S),b}(t.read),t.readSync=function(S){return function(b,T,x,P,L){for(var C=0;;)try{return S.call(t,b,T,x,P,L)}catch(D){if(D.code==="EAGAIN"&&C<10){C++;continue}throw D}}}(t.readSync);function r(S){S.lchmod=function(b,T,x){S.open(b,dr.O_WRONLY|dr.O_SYMLINK,T,function(P,L){if(P){x&&x(P);return}S.fchmod(L,T,function(C){S.close(L,function(D){x&&x(C||D)})})})},S.lchmodSync=function(b,T){var x=S.openSync(b,dr.O_WRONLY|dr.O_SYMLINK,T),P=!0,L;try{L=S.fchmodSync(x,T),P=!1}finally{if(P)try{S.closeSync(x)}catch{}else S.closeSync(x)}return L}}function i(S){dr.hasOwnProperty("O_SYMLINK")?(S.lutimes=function(b,T,x,P){S.open(b,dr.O_SYMLINK,function(L,C){if(L){P&&P(L);return}S.futimes(C,T,x,function(D){S.close(C,function($){P&&P(D||$)})})})},S.lutimesSync=function(b,T,x){var P=S.openSync(b,dr.O_SYMLINK),L,C=!0;try{L=S.futimesSync(P,T,x),C=!1}finally{if(C)try{S.closeSync(P)}catch{}else S.closeSync(P)}return L}):(S.lutimes=function(b,T,x,P){P&&process.nextTick(P)},S.lutimesSync=function(){})}function o(S){return S&&function(b,T,x){return S.call(t,b,T,function(P){E(P)&&(P=null),x&&x.apply(this,arguments)})}}function a(S){return S&&function(b,T){try{return S.call(t,b,T)}catch(x){if(!E(x))throw x}}}function c(S){return S&&function(b,T,x,P){return S.call(t,b,T,x,function(L){E(L)&&(L=null),P&&P.apply(this,arguments)})}}function f(S){return S&&function(b,T,x){try{return S.call(t,b,T,x)}catch(P){if(!E(P))throw P}}}function d(S){return S&&function(b,T,x){typeof T=="function"&&(x=T,T=null);function P(L,C){C&&(C.uid<0&&(C.uid+=4294967296),C.gid<0&&(C.gid+=4294967296)),x&&x.apply(this,arguments)}return T?S.call(t,b,T,P):S.call(t,b,P)}}function g(S){return S&&function(b,T){var x=T?S.call(t,b,T):S.call(t,b);return x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.gid+=4294967296),x}}function E(S){if(!S||S.code==="ENOSYS")return!0;var b=!process.getuid||process.getuid()!==0;return!!(b&&(S.code==="EINVAL"||S.code==="EPERM"))}}});var Xd=F((SR,Yd)=>{var Vd=require("stream").Stream;Yd.exports=aT;function aT(t){return{ReadStream:r,WriteStream:i};function r(o,a){if(!(this instanceof r))return new r(o,a);Vd.call(this);var c=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var f=Object.keys(a),d=0,g=f.length;dthis.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){c._read()});return}t.open(this.path,this.flags,this.mode,function(S,b){if(S){c.emit("error",S),c.readable=!1;return}c.fd=b,c.emit("open",b),c._read()})}function i(o,a){if(!(this instanceof i))return new i(o,a);Vd.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var c=Object.keys(a),f=0,d=c.length;f= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Qd=F((bR,Zd)=>{"use strict";Zd.exports=cT;var uT=Object.getPrototypeOf||function(t){return t.__proto__};function cT(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var r={__proto__:uT(t)};else var r=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))}),r}});var Ke=F((xR,mu)=>{var we=require("fs"),fT=Kd(),lT=Xd(),hT=Qd(),ps=require("util"),Ue,ms;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),ms=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",ms="___graceful-fs.previous");function dT(){}function ep(t,r){Object.defineProperty(t,Ue,{get:function(){return r}})}var qr=dT;ps.debuglog?qr=ps.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(qr=function(){var t=ps.format.apply(ps,arguments);t="GFS4: "+t.split(/\n/).join(` +GFS4: `),console.error(t)});we[Ue]||(tp=global[Ue]||[],ep(we,tp),we.close=function(t){function r(i,o){return t.call(we,i,function(a){a||rp(),typeof o=="function"&&o.apply(this,arguments)})}return Object.defineProperty(r,ms,{value:t}),r}(we.close),we.closeSync=function(t){function r(i){t.apply(we,arguments),rp()}return Object.defineProperty(r,ms,{value:t}),r}(we.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){qr(we[Ue]),require("assert").equal(we[Ue].length,0)}));var tp;global[Ue]||ep(global,we[Ue]);mu.exports=du(hT(we));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!we.__patched&&(mu.exports=du(we),we.__patched=!0);function du(t){fT(t),t.gracefulify=du,t.createReadStream=Se,t.createWriteStream=Pe;var r=t.readFile;t.readFile=i;function i(G,ne,ie){return typeof ne=="function"&&(ie=ne,ne=null),Re(G,ne,ie);function Re(Ce,Ae,be,_e){return r(Ce,Ae,function(te){te&&(te.code==="EMFILE"||te.code==="ENFILE")?un([Re,[Ce,Ae,be],te,_e||Date.now(),Date.now()]):typeof be=="function"&&be.apply(this,arguments)})}}var o=t.writeFile;t.writeFile=a;function a(G,ne,ie,Re){return typeof ie=="function"&&(Re=ie,ie=null),Ce(G,ne,ie,Re);function Ce(Ae,be,_e,te,Ye){return o(Ae,be,_e,function(ye){ye&&(ye.code==="EMFILE"||ye.code==="ENFILE")?un([Ce,[Ae,be,_e,te],ye,Ye||Date.now(),Date.now()]):typeof te=="function"&&te.apply(this,arguments)})}}var c=t.appendFile;c&&(t.appendFile=f);function f(G,ne,ie,Re){return typeof ie=="function"&&(Re=ie,ie=null),Ce(G,ne,ie,Re);function Ce(Ae,be,_e,te,Ye){return c(Ae,be,_e,function(ye){ye&&(ye.code==="EMFILE"||ye.code==="ENFILE")?un([Ce,[Ae,be,_e,te],ye,Ye||Date.now(),Date.now()]):typeof te=="function"&&te.apply(this,arguments)})}}var d=t.copyFile;d&&(t.copyFile=g);function g(G,ne,ie,Re){return typeof ie=="function"&&(Re=ie,ie=0),Ce(G,ne,ie,Re);function Ce(Ae,be,_e,te,Ye){return d(Ae,be,_e,function(ye){ye&&(ye.code==="EMFILE"||ye.code==="ENFILE")?un([Ce,[Ae,be,_e,te],ye,Ye||Date.now(),Date.now()]):typeof te=="function"&&te.apply(this,arguments)})}}var E=t.readdir;t.readdir=S;function S(G,ne,ie){return typeof ne=="function"&&(ie=ne,ne=null),Re(G,ne,ie);function Re(Ce,Ae,be,_e){return E(Ce,Ae,function(te,Ye){te&&(te.code==="EMFILE"||te.code==="ENFILE")?un([Re,[Ce,Ae,be],te,_e||Date.now(),Date.now()]):(Ye&&Ye.sort&&Ye.sort(),typeof be=="function"&&be.call(this,te,Ye))})}}if(process.version.substr(0,4)==="v0.8"){var b=lT(t);C=b.ReadStream,$=b.WriteStream}var T=t.ReadStream;T&&(C.prototype=Object.create(T.prototype),C.prototype.open=D);var x=t.WriteStream;x&&($.prototype=Object.create(x.prototype),$.prototype.open=ee),Object.defineProperty(t,"ReadStream",{get:function(){return C},set:function(G){C=G},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return $},set:function(G){$=G},enumerable:!0,configurable:!0});var P=C;Object.defineProperty(t,"FileReadStream",{get:function(){return P},set:function(G){P=G},enumerable:!0,configurable:!0});var L=$;Object.defineProperty(t,"FileWriteStream",{get:function(){return L},set:function(G){L=G},enumerable:!0,configurable:!0});function C(G,ne){return this instanceof C?(T.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function D(){var G=this;nt(G.path,G.flags,G.mode,function(ne,ie){ne?(G.autoClose&&G.destroy(),G.emit("error",ne)):(G.fd=ie,G.emit("open",ie),G.read())})}function $(G,ne){return this instanceof $?(x.apply(this,arguments),this):$.apply(Object.create($.prototype),arguments)}function ee(){var G=this;nt(G.path,G.flags,G.mode,function(ne,ie){ne?(G.destroy(),G.emit("error",ne)):(G.fd=ie,G.emit("open",ie))})}function Se(G,ne){return new t.ReadStream(G,ne)}function Pe(G,ne){return new t.WriteStream(G,ne)}var lt=t.open;t.open=nt;function nt(G,ne,ie,Re){return typeof ie=="function"&&(Re=ie,ie=null),Ce(G,ne,ie,Re);function Ce(Ae,be,_e,te,Ye){return lt(Ae,be,_e,function(ye,bt){ye&&(ye.code==="EMFILE"||ye.code==="ENFILE")?un([Ce,[Ae,be,_e,te],ye,Ye||Date.now(),Date.now()]):typeof te=="function"&&te.apply(this,arguments)})}}return t}function un(t){qr("ENQUEUE",t[0].name,t[1]),we[Ue].push(t),pu()}var ys;function rp(){for(var t=Date.now(),r=0;r2&&(we[Ue][r][3]=t,we[Ue][r][4]=t);pu()}function pu(){if(clearTimeout(ys),ys=void 0,we[Ue].length!==0){var t=we[Ue].shift(),r=t[0],i=t[1],o=t[2],a=t[3],c=t[4];if(a===void 0)qr("RETRY",r.name,i),r.apply(null,i);else if(Date.now()-a>=6e4){qr("TIMEOUT",r.name,i);var f=i.pop();typeof f=="function"&&f.call(null,o)}else{var d=Date.now()-c,g=Math.max(c-a,1),E=Math.min(g*1.2,100);d>=E?(qr("RETRY",r.name,i),r.apply(null,i.concat([a]))):we[Ue].push(t)}ys===void 0&&(ys=setTimeout(pu,0))}}});var Ir=F(pr=>{"use strict";var np=tt().fromCallback,ft=Ke(),pT=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof ft[t]=="function");Object.assign(pr,ft);pT.forEach(t=>{pr[t]=np(ft[t])});pr.realpath.native=np(ft.realpath.native);pr.exists=function(t,r){return typeof r=="function"?ft.exists(t,r):new Promise(i=>ft.exists(t,i))};pr.read=function(t,r,i,o,a,c){return typeof c=="function"?ft.read(t,r,i,o,a,c):new Promise((f,d)=>{ft.read(t,r,i,o,a,(g,E,S)=>{if(g)return d(g);f({bytesRead:E,buffer:S})})})};pr.write=function(t,r,...i){return typeof i[i.length-1]=="function"?ft.write(t,r,...i):new Promise((o,a)=>{ft.write(t,r,...i,(c,f,d)=>{if(c)return a(c);o({bytesWritten:f,buffer:d})})})};typeof ft.writev=="function"&&(pr.writev=function(t,r,...i){return typeof i[i.length-1]=="function"?ft.writev(t,r,...i):new Promise((o,a)=>{ft.writev(t,r,...i,(c,f,d)=>{if(c)return a(c);o({bytesWritten:f,buffers:d})})})})});var sp=F((CR,ip)=>{"use strict";var mT=require("path");ip.exports.checkPath=function(r){if(process.platform==="win32"&&/[<>:"|?*]/.test(r.replace(mT.parse(r).root,""))){let o=new Error(`Path contains invalid characters: ${r}`);throw o.code="EINVAL",o}}});var cp=F((PR,yu)=>{"use strict";var op=Ir(),{checkPath:ap}=sp(),up=t=>{let r={mode:511};return typeof t=="number"?t:M(M({},r),t).mode};yu.exports.makeDir=async(t,r)=>(ap(t),op.mkdir(t,{mode:up(r),recursive:!0}));yu.exports.makeDirSync=(t,r)=>(ap(t),op.mkdirSync(t,{mode:up(r),recursive:!0}))});var kt=F((RR,fp)=>{"use strict";var yT=tt().fromPromise,{makeDir:gT,makeDirSync:gu}=cp(),_u=yT(gT);fp.exports={mkdirs:_u,mkdirsSync:gu,mkdirp:_u,mkdirpSync:gu,ensureDir:_u,ensureDirSync:gu}});var vu=F((AR,lp)=>{"use strict";var cn=Ke();function _T(t,r,i,o){cn.open(t,"r+",(a,c)=>{if(a)return o(a);cn.futimes(c,r,i,f=>{cn.close(c,d=>{o&&o(f||d)})})})}function vT(t,r,i){let o=cn.openSync(t,"r+");return cn.futimesSync(o,r,i),cn.closeSync(o)}lp.exports={utimesMillis:_T,utimesMillisSync:vT}});var Lr=F((OR,pp)=>{"use strict";var fn=Ir(),De=require("path"),wT=require("util");function ET(t,r,i){let o=i.dereference?a=>fn.stat(a,{bigint:!0}):a=>fn.lstat(a,{bigint:!0});return Promise.all([o(t),o(r).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,c])=>({srcStat:a,destStat:c}))}function ST(t,r,i){let o,a=i.dereference?f=>fn.statSync(f,{bigint:!0}):f=>fn.lstatSync(f,{bigint:!0}),c=a(t);try{o=a(r)}catch(f){if(f.code==="ENOENT")return{srcStat:c,destStat:null};throw f}return{srcStat:c,destStat:o}}function bT(t,r,i,o,a){wT.callbackify(ET)(t,r,o,(c,f)=>{if(c)return a(c);let{srcStat:d,destStat:g}=f;if(g){if(Gn(d,g)){let E=De.basename(t),S=De.basename(r);return i==="move"&&E!==S&&E.toLowerCase()===S.toLowerCase()?a(null,{srcStat:d,destStat:g,isChangingCase:!0}):a(new Error("Source and destination must not be the same."))}if(d.isDirectory()&&!g.isDirectory())return a(new Error(`Cannot overwrite non-directory '${r}' with directory '${t}'.`));if(!d.isDirectory()&&g.isDirectory())return a(new Error(`Cannot overwrite directory '${r}' with non-directory '${t}'.`))}return d.isDirectory()&&wu(t,r)?a(new Error(gs(t,r,i))):a(null,{srcStat:d,destStat:g})})}function xT(t,r,i,o){let{srcStat:a,destStat:c}=ST(t,r,o);if(c){if(Gn(a,c)){let f=De.basename(t),d=De.basename(r);if(i==="move"&&f!==d&&f.toLowerCase()===d.toLowerCase())return{srcStat:a,destStat:c,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!c.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${t}'.`);if(!a.isDirectory()&&c.isDirectory())throw new Error(`Cannot overwrite directory '${r}' with non-directory '${t}'.`)}if(a.isDirectory()&&wu(t,r))throw new Error(gs(t,r,i));return{srcStat:a,destStat:c}}function hp(t,r,i,o,a){let c=De.resolve(De.dirname(t)),f=De.resolve(De.dirname(i));if(f===c||f===De.parse(f).root)return a();fn.stat(f,{bigint:!0},(d,g)=>d?d.code==="ENOENT"?a():a(d):Gn(r,g)?a(new Error(gs(t,i,o))):hp(t,r,f,o,a))}function dp(t,r,i,o){let a=De.resolve(De.dirname(t)),c=De.resolve(De.dirname(i));if(c===a||c===De.parse(c).root)return;let f;try{f=fn.statSync(c,{bigint:!0})}catch(d){if(d.code==="ENOENT")return;throw d}if(Gn(r,f))throw new Error(gs(t,i,o));return dp(t,r,c,o)}function Gn(t,r){return r.ino&&r.dev&&r.ino===t.ino&&r.dev===t.dev}function wu(t,r){let i=De.resolve(t).split(De.sep).filter(a=>a),o=De.resolve(r).split(De.sep).filter(a=>a);return i.reduce((a,c,f)=>a&&o[f]===c,!0)}function gs(t,r,i){return`Cannot ${i} '${t}' to a subdirectory of itself, '${r}'.`}pp.exports={checkPaths:bT,checkPathsSync:xT,checkParentPaths:hp,checkParentPathsSync:dp,isSrcSubdir:wu,areIdentical:Gn}});var vp=F((kR,_p)=>{"use strict";var We=Ke(),Jn=require("path"),TT=kt().mkdirsSync,CT=vu().utimesMillisSync,Kn=Lr();function PT(t,r,i){typeof i=="function"&&(i={filter:i}),i=i||{},i.clobber="clobber"in i?!!i.clobber:!0,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; + + see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:o,destStat:a}=Kn.checkPathsSync(t,r,"copy",i);return Kn.checkParentPathsSync(t,o,r,"copy"),RT(a,t,r,i)}function RT(t,r,i,o){if(o.filter&&!o.filter(r,i))return;let a=Jn.dirname(i);return We.existsSync(a)||TT(a),mp(t,r,i,o)}function AT(t,r,i,o){if(!(o.filter&&!o.filter(r,i)))return mp(t,r,i,o)}function mp(t,r,i,o){let c=(o.dereference?We.statSync:We.lstatSync)(r);if(c.isDirectory())return DT(c,t,r,i,o);if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return OT(c,t,r,i,o);if(c.isSymbolicLink())return UT(t,r,i,o);throw c.isSocket()?new Error(`Cannot copy a socket file: ${r}`):c.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${r}`):new Error(`Unknown file: ${r}`)}function OT(t,r,i,o,a){return r?kT(t,i,o,a):yp(t,i,o,a)}function kT(t,r,i,o){if(o.overwrite)return We.unlinkSync(i),yp(t,r,i,o);if(o.errorOnExist)throw new Error(`'${i}' already exists`)}function yp(t,r,i,o){return We.copyFileSync(r,i),o.preserveTimestamps&&qT(t.mode,r,i),Eu(i,t.mode)}function qT(t,r,i){return IT(t)&<(i,t),FT(r,i)}function IT(t){return(t&128)===0}function LT(t,r){return Eu(t,r|128)}function Eu(t,r){return We.chmodSync(t,r)}function FT(t,r){let i=We.statSync(t);return CT(r,i.atime,i.mtime)}function DT(t,r,i,o,a){return r?gp(i,o,a):NT(t.mode,i,o,a)}function NT(t,r,i,o){return We.mkdirSync(i),gp(r,i,o),Eu(i,t)}function gp(t,r,i){We.readdirSync(t).forEach(o=>MT(o,t,r,i))}function MT(t,r,i,o){let a=Jn.join(r,t),c=Jn.join(i,t),{destStat:f}=Kn.checkPathsSync(a,c,"copy",o);return AT(f,a,c,o)}function UT(t,r,i,o){let a=We.readlinkSync(r);if(o.dereference&&(a=Jn.resolve(process.cwd(),a)),t){let c;try{c=We.readlinkSync(i)}catch(f){if(f.code==="EINVAL"||f.code==="UNKNOWN")return We.symlinkSync(a,i);throw f}if(o.dereference&&(c=Jn.resolve(process.cwd(),c)),Kn.isSrcSubdir(a,c))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${c}'.`);if(We.statSync(i).isDirectory()&&Kn.isSrcSubdir(c,a))throw new Error(`Cannot overwrite '${c}' with '${a}'.`);return HT(a,i)}else return We.symlinkSync(a,i)}function HT(t,r){return We.unlinkSync(r),We.symlinkSync(t,r)}_p.exports=PT});var Su=F((qR,wp)=>{"use strict";wp.exports={copySync:vp()}});var mr=F((IR,Sp)=>{"use strict";var BT=tt().fromPromise,Ep=Ir();function $T(t){return Ep.access(t).then(()=>!0).catch(()=>!1)}Sp.exports={pathExists:BT($T),pathExistsSync:Ep.existsSync}});var Op=F((LR,Ap)=>{"use strict";var rt=Ke(),Vn=require("path"),WT=kt().mkdirs,jT=mr().pathExists,zT=vu().utimesMillis,Yn=Lr();function GT(t,r,i,o){typeof i=="function"&&!o?(o=i,i={}):typeof i=="function"&&(i={filter:i}),o=o||function(){},i=i||{},i.clobber="clobber"in i?!!i.clobber:!0,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; + + see https://github.com/jprichardson/node-fs-extra/issues/269`),Yn.checkPaths(t,r,"copy",i,(a,c)=>{if(a)return o(a);let{srcStat:f,destStat:d}=c;Yn.checkParentPaths(t,f,r,"copy",g=>g?o(g):i.filter?xp(bp,d,t,r,i,o):bp(d,t,r,i,o))})}function bp(t,r,i,o,a){let c=Vn.dirname(i);jT(c,(f,d)=>{if(f)return a(f);if(d)return _s(t,r,i,o,a);WT(c,g=>g?a(g):_s(t,r,i,o,a))})}function xp(t,r,i,o,a,c){Promise.resolve(a.filter(i,o)).then(f=>f?t(r,i,o,a,c):c(),f=>c(f))}function JT(t,r,i,o,a){return o.filter?xp(_s,t,r,i,o,a):_s(t,r,i,o,a)}function _s(t,r,i,o,a){(o.dereference?rt.stat:rt.lstat)(r,(f,d)=>f?a(f):d.isDirectory()?eC(d,t,r,i,o,a):d.isFile()||d.isCharacterDevice()||d.isBlockDevice()?KT(d,t,r,i,o,a):d.isSymbolicLink()?nC(t,r,i,o,a):d.isSocket()?a(new Error(`Cannot copy a socket file: ${r}`)):d.isFIFO()?a(new Error(`Cannot copy a FIFO pipe: ${r}`)):a(new Error(`Unknown file: ${r}`)))}function KT(t,r,i,o,a,c){return r?VT(t,i,o,a,c):Tp(t,i,o,a,c)}function VT(t,r,i,o,a){if(o.overwrite)rt.unlink(i,c=>c?a(c):Tp(t,r,i,o,a));else return o.errorOnExist?a(new Error(`'${i}' already exists`)):a()}function Tp(t,r,i,o,a){rt.copyFile(r,i,c=>c?a(c):o.preserveTimestamps?YT(t.mode,r,i,a):vs(i,t.mode,a))}function YT(t,r,i,o){return XT(t)?ZT(i,t,a=>a?o(a):Cp(t,r,i,o)):Cp(t,r,i,o)}function XT(t){return(t&128)===0}function ZT(t,r,i){return vs(t,r|128,i)}function Cp(t,r,i,o){QT(r,i,a=>a?o(a):vs(i,t,o))}function vs(t,r,i){return rt.chmod(t,r,i)}function QT(t,r,i){rt.stat(t,(o,a)=>o?i(o):zT(r,a.atime,a.mtime,i))}function eC(t,r,i,o,a,c){return r?Pp(i,o,a,c):tC(t.mode,i,o,a,c)}function tC(t,r,i,o,a){rt.mkdir(i,c=>{if(c)return a(c);Pp(r,i,o,f=>f?a(f):vs(i,t,a))})}function Pp(t,r,i,o){rt.readdir(t,(a,c)=>a?o(a):Rp(c,t,r,i,o))}function Rp(t,r,i,o,a){let c=t.pop();return c?rC(t,c,r,i,o,a):a()}function rC(t,r,i,o,a,c){let f=Vn.join(i,r),d=Vn.join(o,r);Yn.checkPaths(f,d,"copy",a,(g,E)=>{if(g)return c(g);let{destStat:S}=E;JT(S,f,d,a,b=>b?c(b):Rp(t,i,o,a,c))})}function nC(t,r,i,o,a){rt.readlink(r,(c,f)=>{if(c)return a(c);if(o.dereference&&(f=Vn.resolve(process.cwd(),f)),t)rt.readlink(i,(d,g)=>d?d.code==="EINVAL"||d.code==="UNKNOWN"?rt.symlink(f,i,a):a(d):(o.dereference&&(g=Vn.resolve(process.cwd(),g)),Yn.isSrcSubdir(f,g)?a(new Error(`Cannot copy '${f}' to a subdirectory of itself, '${g}'.`)):t.isDirectory()&&Yn.isSrcSubdir(g,f)?a(new Error(`Cannot overwrite '${g}' with '${f}'.`)):iC(f,i,a)));else return rt.symlink(f,i,a)})}function iC(t,r,i){rt.unlink(r,o=>o?i(o):rt.symlink(t,r,i))}Ap.exports=GT});var bu=F((FR,kp)=>{"use strict";var sC=tt().fromCallback;kp.exports={copy:sC(Op())}});var Hp=F((DR,Up)=>{"use strict";var qp=Ke(),Ip=require("path"),le=require("assert"),Xn=process.platform==="win32";function Lp(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(i=>{t[i]=t[i]||qp[i],i=i+"Sync",t[i]=t[i]||qp[i]}),t.maxBusyTries=t.maxBusyTries||3}function xu(t,r,i){let o=0;typeof r=="function"&&(i=r,r={}),le(t,"rimraf: missing path"),le.strictEqual(typeof t,"string","rimraf: path should be a string"),le.strictEqual(typeof i,"function","rimraf: callback function required"),le(r,"rimraf: invalid options argument provided"),le.strictEqual(typeof r,"object","rimraf: options should be object"),Lp(r),Fp(t,r,function a(c){if(c){if((c.code==="EBUSY"||c.code==="ENOTEMPTY"||c.code==="EPERM")&&oFp(t,r,a),f)}c.code==="ENOENT"&&(c=null)}i(c)})}function Fp(t,r,i){le(t),le(r),le(typeof i=="function"),r.lstat(t,(o,a)=>{if(o&&o.code==="ENOENT")return i(null);if(o&&o.code==="EPERM"&&Xn)return Dp(t,r,o,i);if(a&&a.isDirectory())return ws(t,r,o,i);r.unlink(t,c=>{if(c){if(c.code==="ENOENT")return i(null);if(c.code==="EPERM")return Xn?Dp(t,r,c,i):ws(t,r,c,i);if(c.code==="EISDIR")return ws(t,r,c,i)}return i(c)})})}function Dp(t,r,i,o){le(t),le(r),le(typeof o=="function"),r.chmod(t,438,a=>{a?o(a.code==="ENOENT"?null:i):r.stat(t,(c,f)=>{c?o(c.code==="ENOENT"?null:i):f.isDirectory()?ws(t,r,i,o):r.unlink(t,o)})})}function Np(t,r,i){let o;le(t),le(r);try{r.chmodSync(t,438)}catch(a){if(a.code==="ENOENT")return;throw i}try{o=r.statSync(t)}catch(a){if(a.code==="ENOENT")return;throw i}o.isDirectory()?Es(t,r,i):r.unlinkSync(t)}function ws(t,r,i,o){le(t),le(r),le(typeof o=="function"),r.rmdir(t,a=>{a&&(a.code==="ENOTEMPTY"||a.code==="EEXIST"||a.code==="EPERM")?oC(t,r,o):a&&a.code==="ENOTDIR"?o(i):o(a)})}function oC(t,r,i){le(t),le(r),le(typeof i=="function"),r.readdir(t,(o,a)=>{if(o)return i(o);let c=a.length,f;if(c===0)return r.rmdir(t,i);a.forEach(d=>{xu(Ip.join(t,d),r,g=>{if(!f){if(g)return i(f=g);--c===0&&r.rmdir(t,i)}})})})}function Mp(t,r){let i;r=r||{},Lp(r),le(t,"rimraf: missing path"),le.strictEqual(typeof t,"string","rimraf: path should be a string"),le(r,"rimraf: missing options"),le.strictEqual(typeof r,"object","rimraf: options should be object");try{i=r.lstatSync(t)}catch(o){if(o.code==="ENOENT")return;o.code==="EPERM"&&Xn&&Np(t,r,o)}try{i&&i.isDirectory()?Es(t,r,null):r.unlinkSync(t)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM")return Xn?Np(t,r,o):Es(t,r,o);if(o.code!=="EISDIR")throw o;Es(t,r,o)}}function Es(t,r,i){le(t),le(r);try{r.rmdirSync(t)}catch(o){if(o.code==="ENOTDIR")throw i;if(o.code==="ENOTEMPTY"||o.code==="EEXIST"||o.code==="EPERM")aC(t,r);else if(o.code!=="ENOENT")throw o}}function aC(t,r){if(le(t),le(r),r.readdirSync(t).forEach(i=>Mp(Ip.join(t,i),r)),Xn){let i=Date.now();do try{return r.rmdirSync(t,r)}catch{}while(Date.now()-i<500)}else return r.rmdirSync(t,r)}Up.exports=xu;xu.sync=Mp});var Zn=F((NR,$p)=>{"use strict";var Ss=Ke(),uC=tt().fromCallback,Bp=Hp();function cC(t,r){if(Ss.rm)return Ss.rm(t,{recursive:!0,force:!0},r);Bp(t,r)}function fC(t){if(Ss.rmSync)return Ss.rmSync(t,{recursive:!0,force:!0});Bp.sync(t)}$p.exports={remove:uC(cC),removeSync:fC}});var Yp=F((MR,Vp)=>{"use strict";var lC=tt().fromPromise,Wp=Ir(),jp=require("path"),zp=kt(),Gp=Zn(),Jp=lC(async function(r){let i;try{i=await Wp.readdir(r)}catch{return zp.mkdirs(r)}return Promise.all(i.map(o=>Gp.remove(jp.join(r,o))))});function Kp(t){let r;try{r=Wp.readdirSync(t)}catch{return zp.mkdirsSync(t)}r.forEach(i=>{i=jp.join(t,i),Gp.removeSync(i)})}Vp.exports={emptyDirSync:Kp,emptydirSync:Kp,emptyDir:Jp,emptydir:Jp}});var em=F((UR,Qp)=>{"use strict";var hC=tt().fromCallback,Xp=require("path"),yr=Ke(),Zp=kt();function dC(t,r){function i(){yr.writeFile(t,"",o=>{if(o)return r(o);r()})}yr.stat(t,(o,a)=>{if(!o&&a.isFile())return r();let c=Xp.dirname(t);yr.stat(c,(f,d)=>{if(f)return f.code==="ENOENT"?Zp.mkdirs(c,g=>{if(g)return r(g);i()}):r(f);d.isDirectory()?i():yr.readdir(c,g=>{if(g)return r(g)})})})}function pC(t){let r;try{r=yr.statSync(t)}catch{}if(r&&r.isFile())return;let i=Xp.dirname(t);try{yr.statSync(i).isDirectory()||yr.readdirSync(i)}catch(o){if(o&&o.code==="ENOENT")Zp.mkdirsSync(i);else throw o}yr.writeFileSync(t,"")}Qp.exports={createFile:hC(dC),createFileSync:pC}});var sm=F((HR,im)=>{"use strict";var mC=tt().fromCallback,tm=require("path"),gr=Ke(),rm=kt(),yC=mr().pathExists,{areIdentical:nm}=Lr();function gC(t,r,i){function o(a,c){gr.link(a,c,f=>{if(f)return i(f);i(null)})}gr.lstat(r,(a,c)=>{gr.lstat(t,(f,d)=>{if(f)return f.message=f.message.replace("lstat","ensureLink"),i(f);if(c&&nm(d,c))return i(null);let g=tm.dirname(r);yC(g,(E,S)=>{if(E)return i(E);if(S)return o(t,r);rm.mkdirs(g,b=>{if(b)return i(b);o(t,r)})})})})}function _C(t,r){let i;try{i=gr.lstatSync(r)}catch{}try{let c=gr.lstatSync(t);if(i&&nm(c,i))return}catch(c){throw c.message=c.message.replace("lstat","ensureLink"),c}let o=tm.dirname(r);return gr.existsSync(o)||rm.mkdirsSync(o),gr.linkSync(t,r)}im.exports={createLink:mC(gC),createLinkSync:_C}});var am=F((BR,om)=>{"use strict";var _r=require("path"),Qn=Ke(),vC=mr().pathExists;function wC(t,r,i){if(_r.isAbsolute(t))return Qn.lstat(t,o=>o?(o.message=o.message.replace("lstat","ensureSymlink"),i(o)):i(null,{toCwd:t,toDst:t}));{let o=_r.dirname(r),a=_r.join(o,t);return vC(a,(c,f)=>c?i(c):f?i(null,{toCwd:a,toDst:t}):Qn.lstat(t,d=>d?(d.message=d.message.replace("lstat","ensureSymlink"),i(d)):i(null,{toCwd:t,toDst:_r.relative(o,t)})))}}function EC(t,r){let i;if(_r.isAbsolute(t)){if(i=Qn.existsSync(t),!i)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let o=_r.dirname(r),a=_r.join(o,t);if(i=Qn.existsSync(a),i)return{toCwd:a,toDst:t};if(i=Qn.existsSync(t),!i)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:_r.relative(o,t)}}}om.exports={symlinkPaths:wC,symlinkPathsSync:EC}});var fm=F(($R,cm)=>{"use strict";var um=Ke();function SC(t,r,i){if(i=typeof r=="function"?r:i,r=typeof r=="function"?!1:r,r)return i(null,r);um.lstat(t,(o,a)=>{if(o)return i(null,"file");r=a&&a.isDirectory()?"dir":"file",i(null,r)})}function bC(t,r){let i;if(r)return r;try{i=um.lstatSync(t)}catch{return"file"}return i&&i.isDirectory()?"dir":"file"}cm.exports={symlinkType:SC,symlinkTypeSync:bC}});var _m=F((WR,gm)=>{"use strict";var xC=tt().fromCallback,lm=require("path"),qt=Ir(),hm=kt(),TC=hm.mkdirs,CC=hm.mkdirsSync,dm=am(),PC=dm.symlinkPaths,RC=dm.symlinkPathsSync,pm=fm(),AC=pm.symlinkType,OC=pm.symlinkTypeSync,kC=mr().pathExists,{areIdentical:mm}=Lr();function qC(t,r,i,o){o=typeof i=="function"?i:o,i=typeof i=="function"?!1:i,qt.lstat(r,(a,c)=>{!a&&c.isSymbolicLink()?Promise.all([qt.stat(t),qt.stat(r)]).then(([f,d])=>{if(mm(f,d))return o(null);ym(t,r,i,o)}):ym(t,r,i,o)})}function ym(t,r,i,o){PC(t,r,(a,c)=>{if(a)return o(a);t=c.toDst,AC(c.toCwd,i,(f,d)=>{if(f)return o(f);let g=lm.dirname(r);kC(g,(E,S)=>{if(E)return o(E);if(S)return qt.symlink(t,r,d,o);TC(g,b=>{if(b)return o(b);qt.symlink(t,r,d,o)})})})})}function IC(t,r,i){let o;try{o=qt.lstatSync(r)}catch{}if(o&&o.isSymbolicLink()){let d=qt.statSync(t),g=qt.statSync(r);if(mm(d,g))return}let a=RC(t,r);t=a.toDst,i=OC(a.toCwd,i);let c=lm.dirname(r);return qt.existsSync(c)||CC(c),qt.symlinkSync(t,r,i)}gm.exports={createSymlink:xC(qC),createSymlinkSync:IC}});var wm=F((jR,vm)=>{"use strict";var bs=em(),xs=sm(),Ts=_m();vm.exports={createFile:bs.createFile,createFileSync:bs.createFileSync,ensureFile:bs.createFile,ensureFileSync:bs.createFileSync,createLink:xs.createLink,createLinkSync:xs.createLinkSync,ensureLink:xs.createLink,ensureLinkSync:xs.createLinkSync,createSymlink:Ts.createSymlink,createSymlinkSync:Ts.createSymlinkSync,ensureSymlink:Ts.createSymlink,ensureSymlinkSync:Ts.createSymlinkSync}});var Cs=F((zR,Em)=>{function LC(t,{EOL:r=` +`,finalEOL:i=!0,replacer:o=null,spaces:a}={}){let c=i?r:"";return JSON.stringify(t,o,a).replace(/\n/g,r)+c}function FC(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Em.exports={stringify:LC,stripBom:FC}});var Tm=F((GR,xm)=>{var ln;try{ln=Ke()}catch{ln=require("fs")}var Ps=tt(),{stringify:Sm,stripBom:bm}=Cs();async function DC(t,r={}){typeof r=="string"&&(r={encoding:r});let i=r.fs||ln,o="throws"in r?r.throws:!0,a=await Ps.fromCallback(i.readFile)(t,r);a=bm(a);let c;try{c=JSON.parse(a,r?r.reviver:null)}catch(f){if(o)throw f.message=`${t}: ${f.message}`,f;return null}return c}var NC=Ps.fromPromise(DC);function MC(t,r={}){typeof r=="string"&&(r={encoding:r});let i=r.fs||ln,o="throws"in r?r.throws:!0;try{let a=i.readFileSync(t,r);return a=bm(a),JSON.parse(a,r.reviver)}catch(a){if(o)throw a.message=`${t}: ${a.message}`,a;return null}}async function UC(t,r,i={}){let o=i.fs||ln,a=Sm(r,i);await Ps.fromCallback(o.writeFile)(t,a,i)}var HC=Ps.fromPromise(UC);function BC(t,r,i={}){let o=i.fs||ln,a=Sm(r,i);return o.writeFileSync(t,a,i)}var $C={readFile:NC,readFileSync:MC,writeFile:HC,writeFileSync:BC};xm.exports=$C});var Pm=F((JR,Cm)=>{"use strict";var Rs=Tm();Cm.exports={readJson:Rs.readFile,readJsonSync:Rs.readFileSync,writeJson:Rs.writeFile,writeJsonSync:Rs.writeFileSync}});var As=F((KR,Om)=>{"use strict";var WC=tt().fromCallback,ei=Ke(),Rm=require("path"),Am=kt(),jC=mr().pathExists;function zC(t,r,i,o){typeof i=="function"&&(o=i,i="utf8");let a=Rm.dirname(t);jC(a,(c,f)=>{if(c)return o(c);if(f)return ei.writeFile(t,r,i,o);Am.mkdirs(a,d=>{if(d)return o(d);ei.writeFile(t,r,i,o)})})}function GC(t,...r){let i=Rm.dirname(t);if(ei.existsSync(i))return ei.writeFileSync(t,...r);Am.mkdirsSync(i),ei.writeFileSync(t,...r)}Om.exports={outputFile:WC(zC),outputFileSync:GC}});var qm=F((VR,km)=>{"use strict";var{stringify:JC}=Cs(),{outputFile:KC}=As();async function VC(t,r,i={}){let o=JC(r,i);await KC(t,o,i)}km.exports=VC});var Lm=F((YR,Im)=>{"use strict";var{stringify:YC}=Cs(),{outputFileSync:XC}=As();function ZC(t,r,i){let o=YC(r,i);XC(t,o,i)}Im.exports=ZC});var Dm=F((XR,Fm)=>{"use strict";var QC=tt().fromPromise,Ve=Pm();Ve.outputJson=QC(qm());Ve.outputJsonSync=Lm();Ve.outputJSON=Ve.outputJson;Ve.outputJSONSync=Ve.outputJsonSync;Ve.writeJSON=Ve.writeJson;Ve.writeJSONSync=Ve.writeJsonSync;Ve.readJSON=Ve.readJson;Ve.readJSONSync=Ve.readJsonSync;Fm.exports=Ve});var Bm=F((ZR,Hm)=>{"use strict";var Nm=Ke(),Tu=require("path"),eP=Su().copySync,Mm=Zn().removeSync,tP=kt().mkdirpSync,Um=Lr();function rP(t,r,i){i=i||{};let o=i.overwrite||i.clobber||!1,{srcStat:a,isChangingCase:c=!1}=Um.checkPathsSync(t,r,"move",i);return Um.checkParentPathsSync(t,a,r,"move"),nP(r)||tP(Tu.dirname(r)),iP(t,r,o,c)}function nP(t){let r=Tu.dirname(t);return Tu.parse(r).root===r}function iP(t,r,i,o){if(o)return Cu(t,r,i);if(i)return Mm(r),Cu(t,r,i);if(Nm.existsSync(r))throw new Error("dest already exists.");return Cu(t,r,i)}function Cu(t,r,i){try{Nm.renameSync(t,r)}catch(o){if(o.code!=="EXDEV")throw o;return sP(t,r,i)}}function sP(t,r,i){return eP(t,r,{overwrite:i,errorOnExist:!0}),Mm(t)}Hm.exports=rP});var Wm=F((QR,$m)=>{"use strict";$m.exports={moveSync:Bm()}});var Km=F((eA,Jm)=>{"use strict";var oP=Ke(),Pu=require("path"),aP=bu().copy,jm=Zn().remove,uP=kt().mkdirp,cP=mr().pathExists,zm=Lr();function fP(t,r,i,o){typeof i=="function"&&(o=i,i={});let a=i.overwrite||i.clobber||!1;zm.checkPaths(t,r,"move",i,(c,f)=>{if(c)return o(c);let{srcStat:d,isChangingCase:g=!1}=f;zm.checkParentPaths(t,d,r,"move",E=>{if(E)return o(E);if(lP(r))return Gm(t,r,a,g,o);uP(Pu.dirname(r),S=>S?o(S):Gm(t,r,a,g,o))})})}function lP(t){let r=Pu.dirname(t);return Pu.parse(r).root===r}function Gm(t,r,i,o,a){if(o)return Ru(t,r,i,a);if(i)return jm(r,c=>c?a(c):Ru(t,r,i,a));cP(r,(c,f)=>c?a(c):f?a(new Error("dest already exists.")):Ru(t,r,i,a))}function Ru(t,r,i,o){oP.rename(t,r,a=>a?a.code!=="EXDEV"?o(a):hP(t,r,i,o):o())}function hP(t,r,i,o){aP(t,r,{overwrite:i,errorOnExist:!0},c=>c?o(c):jm(t,o))}Jm.exports=fP});var Ym=F((tA,Vm)=>{"use strict";var dP=tt().fromCallback;Vm.exports={move:dP(Km())}});var Zm=F((rA,Xm)=>{"use strict";Xm.exports=M(M(M(M(M(M(M(M(M(M(M(M({},Ir()),Su()),bu()),Yp()),wm()),Dm()),kt()),Wm()),Ym()),As()),mr()),Zn())});var pP={};eb(pP,{default:()=>Ou});var iy=ur(Vi()),Nt=ur(require("@serverless-devs/core"));var Rr=require("@serverless-devs/core"),Ar=class{static setContent(r){Ar.CONTENT=r}static log(r,i){Rr.Logger.log(r,i)}static info(r){Rr.Logger.info(Ar.CONTENT,r)}static debug(r){Rr.Logger.debug(Ar.CONTENT,r)}static error(r){Rr.Logger.error(Ar.CONTENT,r)}static warning(r){Rr.Logger.warn(Ar.CONTENT,r)}static success(r){Rr.Logger.log(r,"green")}},se=Ar;se.CONTENT="FC-REMOTE-INVOKE";var pl=[{header:"Invoke",content:"Invoke/trigger online functions."},{header:"Usage",content:"$ s invoke "},{header:"Options",optionList:[{name:"invocation-type",description:'Invocation type: optional value "async"|"sync", default value "sync" (default: "sync")',type:String},{name:"event",description:'Event data (strings) passed to the function during invocation (default: "").Http function format refers to [https://github.com/devsapp/fc-remote-invoke#\u7279\u522B\u8BF4\u660E]',type:String},{name:"event-file",description:"Event funtion: A file containing event data passed to the function during invoke. Http function: A file containing http request options sent to http trigger. Format refers to [https://github.com/devsapp/fc-remote-invoke#\u7279\u522B\u8BF4\u660E]",alias:"f",type:String},{name:"event-stdin",description:"Read from standard input, to support script pipeline.Http function format refers to [https://github.com/devsapp/fc-remote-invoke#\u7279\u522B\u8BF4\u660E]",type:Boolean},{name:"region",description:"Specify region in cli mode",type:String},{name:"service-name",description:"Specify service name in cli mode",type:String},{name:"function-name",description:"Specify function name in cli mode",type:String},{name:"domain-name",description:"Specify custom domain name in cli mode",type:String}]},{header:"Global Options",optionList:[{name:"access",description:"Specify key alias.",alias:"a",type:Boolean},{name:"help",description:"fc-remote-invoke help for command.",alias:"h",type:Boolean}]},{header:"Examples with Yaml",content:["$ s invoke","$ s invoke","$ s invoke --invocation-type sync --event ","$ s invoke --event-file ","$ s invoke --event-stdin"]},{header:"Examples with CLI",content:[{example:"$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event "},{example:"$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-file "},{example:"$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-stdin"},{example:` +You also can refer to the usage of fc-api and execute [s cli fc-api -h] for help. $ s cli fc-api invokeFunction -h`}]}];function ml(t){return t?t.domainName||t.region&&t.serviceName&&t.functionName:!1}var ri=ur(Vi()),ny=ur(Gd());var Qm=ur(require("path")),ey=ur(Zm()),ty=ur(Vi()),ry=ur(require("readline"));var{stdin:ti}=process;async function Au(){let t="";if(ti.isTTY)return t;ti.setEncoding("utf8");for await(let r of ti)t+=r;return t}Au.buffer=async()=>{let t=[],r=0;if(ti.isTTY)return Buffer.concat([]);for await(let i of ti)t.push(i),r+=i.length;return Buffer.concat(t,r)};var Os=class{static async getEvent(r){let i=await Au();return r?await new Promise((o,a)=>{let c;r==="-"?(se.log("Reading event data from stdin, which can be ended with Enter then Ctrl+D"),c=process.stdin):(se.log("Reading event file content:"),c=ey.default.createReadStream(r,{encoding:"utf-8"}));let f=ry.default.createInterface({input:c,output:process.stdout});i="",f.on("line",d=>{i+=d}),f.on("close",()=>{se.log(""),o(i)}),f.on("SIGINT",()=>a(new Error("^C")))}):i}static async eventPriority(r){let i;return(0,ty.isString)(r.event)?r.event:(r.eventStdin?i="-":r.eventFile&&(i=Qm.default.resolve(process.cwd(),r.eventFile)),await this.getEvent(i))}};var ks=class{constructor(r,i){this.fcClient=r,this.accountId=i}async invoke(r,i,{invocationType:o,statefulAsyncInvocationId:a}){let c=await Os.eventPriority(i);se.debug(`event: ${c}`);let{region:f,serviceName:d,functionName:g,domainName:E,qualifier:S}=r;if(E)return this.requestDomain(E,c);let b=await this.getHttpTrigger(d,g),T={event:c,serviceName:d,functionName:g,qualifier:S};ri.default.isEmpty(b)?(T.invocationType=o,T.statefulAsyncInvocationId=a,T.event=c,await this.eventInvoke(T)):(T.region=f,T.event=this.getJsonEvent(c),await this.httpInvoke(T))}async requestDomain(r,i){let o=this.getJsonEvent(i);ri.default.isEmpty(o.headers)&&(o.headers={}),o.headers["X-Fc-Log-Type"]="Tail";let{body:a,headers:c}=await(0,ny.default)(r,o);this.showLog(c["x-fc-log-result"]),se.log(` +FC Invoke Result:`,"green"),console.log(a),se.log(` +`)}async getHttpTrigger(r,i){let{data:o}=await this.fcClient.listTriggers(r,i);if(se.debug(`get listTriggers: ${JSON.stringify(o)}`),ri.default.isEmpty(o.triggers))return[];let a=o.triggers.filter(c=>c.triggerType==="http"||c.triggerType==="https");return ri.default.isEmpty(a)?[]:a}async eventInvoke({serviceName:r,functionName:i,event:o,qualifier:a="LATEST",invocationType:c,statefulAsyncInvocationId:f}){if(c==="Sync"){let d=await this.fcClient.invokeFunction(r,i,o,{"X-Fc-Log-Type":"Tail","X-Fc-Invocation-Type":c},a);this.showLog(d.headers["x-fc-log-result"]),se.log(` +FC Invoke Result:`,"green"),console.log(d.data),console.log(` +`)}else{se.debug(`Stateful async invocation id: ${f}`);let{headers:d}=await this.fcClient.invokeFunction(r,i,o,{"X-Fc-Invocation-Type":c,"X-Fc-Stateful-Async-Invocation-Id":f},a),g=d["x-fc-request-id"];se.log(` +${r}/${i} async invoke success. +${g?`request id: ${g} +`:""}`,"green")}}async httpInvoke({region:r,serviceName:i,functionName:o,event:a,qualifier:c}){let f=c?`.${c}`:"";a.path=`/proxy/${i}${f}/${o}/${a.path||""}`,se.log(`Request url: https://${this.accountId}.${r}.fc.aliyuncs.com/2016-08-15/proxy/${i}${f}/${o}/`),await this.request(a)}async request(r){let{headers:i={},queries:o,method:a="GET",path:c,body:f}=r;i["X-Fc-Log-Type"]||(i["X-Fc-Log-Type"]="Tail");let d;try{let g=a.toLocaleUpperCase();se.debug(`method is ${g}.`),se.debug("start invoke."),g==="GET"?d=await this.fcClient.costom_request("GET",c,o,null,i):g==="POST"?d=await this.fcClient.costom_request("POST",c,o,f,i):g==="PUT"?d=await this.fcClient.costom_request("PUT",c,null,f,i):g==="DELETE"?d=await this.fcClient.costom_request("DELETE",c,o,null,i):a.toLocaleUpperCase()==="PATCH"?d=await this.fcClient.costom_request("PATCH",c,o,f,i):a.toLocaleUpperCase()==="HEAD"?d=await this.fcClient.costom_request("HEAD",c,o,f,i):se.error(`Does not support ${a} requests temporarily.`)}catch(g){throw se.debug(g),g.message==="Unexpected token r in JSON at position 0"&&g.stack.includes("/fc2/lib/client.js")&&g.stack.includes("at Client.request")?new Error("The body in http responss is not in json format, but the content-type in response header is application/json. We recommend that you make the format of the response body be consistent with the content-type in response header."):g}se.debug("end invoke."),(d==null?void 0:d.err)?(this.showLog(d.headers["x-fc-log-result"]),se.log(` +FC Invoke Result[Code: ${d.code}]:`,"red"),console.log(d.data),console.log(` +`)):d&&(this.showLog(d.headers["x-fc-log-result"]),se.log(` +FC Invoke Result[Code: ${d.code}]:`,"green"),console.log(d.data),console.log(` +`))}showLog(r){if(r){se.log("========= FC invoke Logs begin =========","yellow");let i=Buffer.from(r,"base64");se.log(i.toString()),se.log("========= FC invoke Logs end =========","yellow")}}getJsonEvent(r){try{return r?JSON.parse(r):{}}catch(i){throw se.debug(i),new Error("handler event error. Example: https://github.com/devsapp/fc-remote-invoke/blob/master/example/http.json")}}};var Ou=class{async invoke(r){let{props:i,eventPayload:o,credentials:a,isHelp:c,invocationType:f,statefulAsyncInvocationId:d}=await this.handlerInputs(r);if(await this.report("fc-remote-invoke","invoke",a==null?void 0:a.AccountID),c){Nt.help(pl);return}let g;i.domainName||(g=await(await Nt.loadComponent("devsapp/fc-common")).makeFcClient(qe(M({},r),{props:{region:i.region}}))),await new ks(g,a.AccountID).invoke(i,o,{invocationType:f,statefulAsyncInvocationId:d})}async report(r,i,o){Nt.reportComponent(r,{command:i,uid:o})}async handlerInputs(r){var P,L,C,D,$,ee;let i=((r==null?void 0:r.args)||"").replace(/(^\s*)|(\s*$)/g,"");se.debug(`input args: ${i}`);let o=Nt.commandParse(qe(M({},r),{args:i}),{boolean:["help","event-stdin"],string:["invocation-type","event","event-file","region","domain-name","service-name","function-name","qualifier","stateful-async-invocation-id"],alias:{help:"h",event:"e","event-file":"f","event-stdin":"s"}}),a=(o==null?void 0:o.data)||{};if(se.debug(`command parse: ${JSON.stringify(a)}`),a.help)return{credentials:r.credentials,isHelp:!0};let{e:c,f,"event-stdin":d,"invocation-type":g="sync","domain-name":E,"stateful-async-invocation-id":S}=a,b={event:c,eventFile:f,eventStdin:d},T=!!c+!!f+!!d;if(T>1)throw new Error("event | event-file | event-stdin must choose one.");if(T===0&&(b.event=""),!["sync","async"].includes(g))throw new Error("invocation-type enum value sync, async.");!E&&!(r==null?void 0:r.credentials)&&(r.credentials=await Nt.getCredential((P=r==null?void 0:r.project)==null?void 0:P.access)),se.debug(`input props: ${JSON.stringify(r.props)}`);let x={region:a.region||((L=r.props)==null?void 0:L.region),serviceName:a["service-name"]||((C=r.props)==null?void 0:C.serviceName),functionName:a["function-name"]||((D=r.props)==null?void 0:D.functionName),domainName:E||(($=r.props)==null?void 0:$.domainName),qualifier:a.qualifier||((ee=r.props)==null?void 0:ee.qualifier)};if(se.debug(`input args props: ${JSON.stringify(x)}`),!ml(x))throw new Error("region/serviceName(service-name)/functionName(function-name) can not be empty.");return{props:x,credentials:r.credentials,eventPayload:b,isHelp:!1,invocationType:iy.default.upperFirst(g),statefulAsyncInvocationId:S}}};module.exports=tb(pP);0&&(module.exports={}); +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ diff --git a/lib/common/help.d.ts b/lib/common/help.d.ts deleted file mode 100644 index f5a0817..0000000 --- a/lib/common/help.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -declare const _default: ({ - header: string; - content: string; - optionList?: undefined; -} | { - header: string; - optionList: ({ - name: string; - description: string; - type: StringConstructor; - alias?: undefined; - } | { - name: string; - description: string; - alias: string; - type: StringConstructor; - } | { - name: string; - description: string; - type: BooleanConstructor; - alias?: undefined; - })[]; - content?: undefined; -} | { - header: string; - optionList: { - name: string; - description: string; - alias: string; - type: BooleanConstructor; - }[]; - content?: undefined; -} | { - header: string; - content: string[]; - optionList?: undefined; -} | { - header: string; - content: { - example: string; - }[]; - optionList?: undefined; -})[]; -export default _default; diff --git a/lib/common/logger.d.ts b/lib/common/logger.d.ts deleted file mode 100644 index bc1962b..0000000 --- a/lib/common/logger.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default class ComponentLogger { - static CONTENT: string; - static setContent(content: any): void; - static log(m: any, color?: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'whiteBright' | 'gray'): void; - static info(m: any): void; - static debug(m: any): void; - static error(m: any): void; - static warning(m: any): void; - static success(m: any): void; -} diff --git a/lib/common/stdout-formatter.d.ts b/lib/common/stdout-formatter.d.ts deleted file mode 100644 index 5fa1786..0000000 --- a/lib/common/stdout-formatter.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default class StdoutFormatter { - static stdoutFormatter: any; - static initStdout(): Promise; -} diff --git a/lib/index.d.ts b/lib/index.d.ts deleted file mode 100644 index 25233b0..0000000 --- a/lib/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { InputProps } from './interface/entity'; -export default class FcRemoteInvoke { - /** - * event 函数本地调试 - * @param inputs - * @returns - */ - invoke(inputs: InputProps): Promise; - private report; - private handlerInputs; -} diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index eb1f37f..0000000 --- a/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports=(()=>{var e={7678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function isTypedArrayName(e){return r.includes(e)}const n=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function isObjectTypeName(e){return n.includes(e)}const i=["null","undefined","string","number","bigint","boolean","symbol"];function isPrimitiveTypeName(e){return i.includes(e)}function isOfType(e){return t=>typeof t===e}const{toString:s}=Object.prototype;const o=e=>{const t=s.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&is.domElement(e)){return"HTMLElement"}if(isObjectTypeName(t)){return t}return undefined};const a=e=>t=>o(t)===e;function is(e){if(e===null){return"null"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(is.observable(e)){return"Observable"}if(is.array(e)){return"Array"}if(is.buffer(e)){return"Buffer"}const t=o(e);if(t){return t}if(e instanceof String||e instanceof Boolean||e instanceof Number){throw new TypeError("Please don't use object wrappers for primitive types")}return"Object"}is.undefined=isOfType("undefined");is.string=isOfType("string");const c=isOfType("number");is.number=(e=>c(e)&&!is.nan(e));is.bigint=isOfType("bigint");is.function_=isOfType("function");is.null_=(e=>e===null);is.class_=(e=>is.function_(e)&&e.toString().startsWith("class "));is.boolean=(e=>e===true||e===false);is.symbol=isOfType("symbol");is.numericString=(e=>is.string(e)&&!is.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)));is.array=((e,t)=>{if(!Array.isArray(e)){return false}if(!is.function_(t)){return true}return e.every(t)});is.buffer=(e=>{var t,r,n,i;return(i=(n=(r=(t=e)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.isBuffer)===null||n===void 0?void 0:n.call(r,e))!==null&&i!==void 0?i:false});is.nullOrUndefined=(e=>is.null_(e)||is.undefined(e));is.object=(e=>!is.null_(e)&&(typeof e==="object"||is.function_(e)));is.iterable=(e=>{var t;return is.function_((t=e)===null||t===void 0?void 0:t[Symbol.iterator])});is.asyncIterable=(e=>{var t;return is.function_((t=e)===null||t===void 0?void 0:t[Symbol.asyncIterator])});is.generator=(e=>is.iterable(e)&&is.function_(e.next)&&is.function_(e.throw));is.asyncGenerator=(e=>is.asyncIterable(e)&&is.function_(e.next)&&is.function_(e.throw));is.nativePromise=(e=>a("Promise")(e));const u=e=>{var t,r;return is.function_((t=e)===null||t===void 0?void 0:t.then)&&is.function_((r=e)===null||r===void 0?void 0:r.catch)};is.promise=(e=>is.nativePromise(e)||u(e));is.generatorFunction=a("GeneratorFunction");is.asyncGeneratorFunction=(e=>o(e)==="AsyncGeneratorFunction");is.asyncFunction=(e=>o(e)==="AsyncFunction");is.boundFunction=(e=>is.function_(e)&&!e.hasOwnProperty("prototype"));is.regExp=a("RegExp");is.date=a("Date");is.error=a("Error");is.map=(e=>a("Map")(e));is.set=(e=>a("Set")(e));is.weakMap=(e=>a("WeakMap")(e));is.weakSet=(e=>a("WeakSet")(e));is.int8Array=a("Int8Array");is.uint8Array=a("Uint8Array");is.uint8ClampedArray=a("Uint8ClampedArray");is.int16Array=a("Int16Array");is.uint16Array=a("Uint16Array");is.int32Array=a("Int32Array");is.uint32Array=a("Uint32Array");is.float32Array=a("Float32Array");is.float64Array=a("Float64Array");is.bigInt64Array=a("BigInt64Array");is.bigUint64Array=a("BigUint64Array");is.arrayBuffer=a("ArrayBuffer");is.sharedArrayBuffer=a("SharedArrayBuffer");is.dataView=a("DataView");is.directInstanceOf=((e,t)=>Object.getPrototypeOf(e)===t.prototype);is.urlInstance=(e=>a("URL")(e));is.urlString=(e=>{if(!is.string(e)){return false}try{new URL(e);return true}catch(e){return false}});is.truthy=(e=>Boolean(e));is.falsy=(e=>!e);is.nan=(e=>Number.isNaN(e));is.primitive=(e=>is.null_(e)||isPrimitiveTypeName(typeof e));is.integer=(e=>Number.isInteger(e));is.safeInteger=(e=>Number.isSafeInteger(e));is.plainObject=(e=>{if(s.call(e)!=="[object Object]"){return false}const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})});is.typedArray=(e=>isTypedArrayName(o(e)));const l=e=>is.safeInteger(e)&&e>=0;is.arrayLike=(e=>!is.nullOrUndefined(e)&&!is.function_(e)&&l(e.length));is.inRange=((e,t)=>{if(is.number(t)){return e>=Math.min(0,t)&&e<=Math.max(t,0)}if(is.array(t)&&t.length===2){return e>=Math.min(...t)&&e<=Math.max(...t)}throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)});const f=1;const h=["innerHTML","ownerDocument","style","attributes","nodeValue"];is.domElement=(e=>{return is.object(e)&&e.nodeType===f&&is.string(e.nodeName)&&!is.plainObject(e)&&h.every(t=>t in e)});is.observable=(e=>{var t,r,n,i;if(!e){return false}if(e===((r=(t=e)[Symbol.observable])===null||r===void 0?void 0:r.call(t))){return true}if(e===((i=(n=e)["@@observable"])===null||i===void 0?void 0:i.call(n))){return true}return false});is.nodeStream=(e=>is.object(e)&&is.function_(e.pipe)&&!is.observable(e));is.infinite=(e=>e===Infinity||e===-Infinity);const d=e=>t=>is.integer(t)&&Math.abs(t%2)===e;is.evenInteger=d(0);is.oddInteger=d(1);is.emptyArray=(e=>is.array(e)&&e.length===0);is.nonEmptyArray=(e=>is.array(e)&&e.length>0);is.emptyString=(e=>is.string(e)&&e.length===0);is.nonEmptyString=(e=>is.string(e)&&e.length>0);const p=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=(e=>is.emptyString(e)||p(e));is.emptyObject=(e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length===0);is.nonEmptyObject=(e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length>0);is.emptySet=(e=>is.set(e)&&e.size===0);is.nonEmptySet=(e=>is.set(e)&&e.size>0);is.emptyMap=(e=>is.map(e)&&e.size===0);is.nonEmptyMap=(e=>is.map(e)&&e.size>0);is.propertyKey=(e=>is.any([is.string,is.number,is.symbol],e));is.formData=(e=>a("FormData")(e));is.urlSearchParams=(e=>a("URLSearchParams")(e));const y=(e,t,r)=>{if(!is.function_(t)){throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`)}if(r.length===0){throw new TypeError("Invalid number of values")}return e.call(r,t)};is.any=((e,...t)=>{const r=is.array(e)?e:[e];return r.some(e=>y(Array.prototype.some,e,t))});is.all=((e,...t)=>y(Array.prototype.every,e,t));const m=(e,t,r,n={})=>{if(!e){const{multipleValues:e}=n;const i=e?`received values of types ${[...new Set(r.map(e=>`\`${is(e)}\``))].join(", ")}`:`received value of type \`${is(r)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${i}.`)}};t.assert={undefined:e=>m(is.undefined(e),"undefined",e),string:e=>m(is.string(e),"string",e),number:e=>m(is.number(e),"number",e),bigint:e=>m(is.bigint(e),"bigint",e),function_:e=>m(is.function_(e),"Function",e),null_:e=>m(is.null_(e),"null",e),class_:e=>m(is.class_(e),"Class",e),boolean:e=>m(is.boolean(e),"boolean",e),symbol:e=>m(is.symbol(e),"symbol",e),numericString:e=>m(is.numericString(e),"string with a number",e),array:(e,t)=>{const r=m;r(is.array(e),"Array",e);if(t){e.forEach(t)}},buffer:e=>m(is.buffer(e),"Buffer",e),nullOrUndefined:e=>m(is.nullOrUndefined(e),"null or undefined",e),object:e=>m(is.object(e),"Object",e),iterable:e=>m(is.iterable(e),"Iterable",e),asyncIterable:e=>m(is.asyncIterable(e),"AsyncIterable",e),generator:e=>m(is.generator(e),"Generator",e),asyncGenerator:e=>m(is.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>m(is.nativePromise(e),"native Promise",e),promise:e=>m(is.promise(e),"Promise",e),generatorFunction:e=>m(is.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>m(is.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>m(is.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>m(is.boundFunction(e),"Function",e),regExp:e=>m(is.regExp(e),"RegExp",e),date:e=>m(is.date(e),"Date",e),error:e=>m(is.error(e),"Error",e),map:e=>m(is.map(e),"Map",e),set:e=>m(is.set(e),"Set",e),weakMap:e=>m(is.weakMap(e),"WeakMap",e),weakSet:e=>m(is.weakSet(e),"WeakSet",e),int8Array:e=>m(is.int8Array(e),"Int8Array",e),uint8Array:e=>m(is.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>m(is.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>m(is.int16Array(e),"Int16Array",e),uint16Array:e=>m(is.uint16Array(e),"Uint16Array",e),int32Array:e=>m(is.int32Array(e),"Int32Array",e),uint32Array:e=>m(is.uint32Array(e),"Uint32Array",e),float32Array:e=>m(is.float32Array(e),"Float32Array",e),float64Array:e=>m(is.float64Array(e),"Float64Array",e),bigInt64Array:e=>m(is.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>m(is.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>m(is.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>m(is.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>m(is.dataView(e),"DataView",e),urlInstance:e=>m(is.urlInstance(e),"URL",e),urlString:e=>m(is.urlString(e),"string with a URL",e),truthy:e=>m(is.truthy(e),"truthy",e),falsy:e=>m(is.falsy(e),"falsy",e),nan:e=>m(is.nan(e),"NaN",e),primitive:e=>m(is.primitive(e),"primitive",e),integer:e=>m(is.integer(e),"integer",e),safeInteger:e=>m(is.safeInteger(e),"integer",e),plainObject:e=>m(is.plainObject(e),"plain object",e),typedArray:e=>m(is.typedArray(e),"TypedArray",e),arrayLike:e=>m(is.arrayLike(e),"array-like",e),domElement:e=>m(is.domElement(e),"HTMLElement",e),observable:e=>m(is.observable(e),"Observable",e),nodeStream:e=>m(is.nodeStream(e),"Node.js Stream",e),infinite:e=>m(is.infinite(e),"infinite number",e),emptyArray:e=>m(is.emptyArray(e),"empty array",e),nonEmptyArray:e=>m(is.nonEmptyArray(e),"non-empty array",e),emptyString:e=>m(is.emptyString(e),"empty string",e),nonEmptyString:e=>m(is.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>m(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>m(is.emptyObject(e),"empty object",e),nonEmptyObject:e=>m(is.nonEmptyObject(e),"non-empty object",e),emptySet:e=>m(is.emptySet(e),"empty set",e),nonEmptySet:e=>m(is.nonEmptySet(e),"non-empty set",e),emptyMap:e=>m(is.emptyMap(e),"empty map",e),nonEmptyMap:e=>m(is.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>m(is.propertyKey(e),"PropertyKey",e),formData:e=>m(is.formData(e),"FormData",e),urlSearchParams:e=>m(is.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>m(is.evenInteger(e),"even integer",e),oddInteger:e=>m(is.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>m(is.directInstanceOf(e,t),"T",e),inRange:(e,t)=>m(is.inRange(e,t),"in range",e),any:(e,...t)=>{return m(is.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:true})},all:(e,...t)=>m(is.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:true})};Object.defineProperties(is,{class:{value:is.class_},function:{value:is.function_},null:{value:is.null_}});Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}});t.default=is;e.exports=is;e.exports.default=is;e.exports.assert=t.assert},8097:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(6214);const i=r(1669);const s=Number(process.versions.node.split(".")[0]);const o=e=>{if(e.timings){return e.timings}const t={start:Date.now(),socket:undefined,lookup:undefined,connect:undefined,secureConnect:undefined,upload:undefined,response:undefined,end:undefined,error:undefined,abort:undefined,phases:{wait:undefined,dns:undefined,tcp:undefined,tls:undefined,request:undefined,firstByte:undefined,download:undefined,total:undefined}};e.timings=t;const r=e=>{const r=e.emit.bind(e);e.emit=((n,...i)=>{if(n==="error"){t.error=Date.now();t.phases.total=t.error-t.start;e.emit=r}return r(n,...i)})};r(e);const o=()=>{t.abort=Date.now();if(!t.response||s>=13){t.phases.total=Date.now()-t.start}};e.prependOnceListener("abort",o);const a=e=>{t.socket=Date.now();t.phases.wait=t.socket-t.start;if(i.types.isProxy(e)){return}const r=()=>{t.lookup=Date.now();t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",r);n.default(e,{connect:()=>{t.connect=Date.now();if(t.lookup===undefined){e.removeListener("lookup",r);t.lookup=t.connect;t.phases.dns=t.lookup-t.socket}t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now();t.phases.tls=t.secureConnect-t.connect}})};if(e.socket){a(e.socket)}else{e.prependOnceListener("socket",a)}const c=()=>{var e;t.upload=Date.now();t.phases.request=t.upload-((e=t.secureConnect)!==null&&e!==void 0?e:t.connect)};const u=()=>{if(typeof e.writableFinished==="boolean"){return e.writableFinished}return e.finished&&e.outputSize===0&&(!e.socket||e.socket.writableLength===0)};if(u()){c()}else{e.prependOnceListener("finish",c)}e.prependOnceListener("response",e=>{t.response=Date.now();t.phases.firstByte=t.response-t.upload;e.timings=t;r(e);e.prependOnceListener("end",()=>{t.end=Date.now();t.phases.download=t.end-t.response;t.phases.total=t.end-t.start});e.prependOnceListener("aborted",o)});return t};t.default=o;e.exports=o;e.exports.default=o},2286:(e,t,r)=>{"use strict";const{V4MAPPED:n,ADDRCONFIG:i,ALL:s,promises:{Resolver:o},lookup:a}=r(881);const{promisify:c}=r(1669);const u=r(2087);const l=Symbol("cacheableLookupCreateConnection");const f=Symbol("cacheableLookupInstance");const h=Symbol("expires");const d=typeof s==="number";const p=e=>{if(!(e&&typeof e.createConnection==="function")){throw new Error("Expected an Agent instance as the first argument")}};const y=e=>{for(const t of e){if(t.family===6){continue}t.address=`::ffff:${t.address}`;t.family=6}};const m=()=>{let e=false;let t=false;for(const r of Object.values(u.networkInterfaces())){for(const n of r){if(n.internal){continue}if(n.family==="IPv6"){t=true}else{e=true}if(e&&t){return{has4:e,has6:t}}}}return{has4:e,has6:t}};const g=e=>{return Symbol.iterator in e};const v={ttl:true};const b={all:true};class CacheableLookup{constructor({cache:e=new Map,maxTtl:t=Infinity,fallbackDuration:r=3600,errorTtl:n=.15,resolver:i=new o,lookup:s=a}={}){this.maxTtl=t;this.errorTtl=n;this._cache=e;this._resolver=i;this._dnsLookup=c(s);if(this._resolver instanceof o){this._resolve4=this._resolver.resolve4.bind(this._resolver);this._resolve6=this._resolver.resolve6.bind(this._resolver)}else{this._resolve4=c(this._resolver.resolve4.bind(this._resolver));this._resolve6=c(this._resolver.resolve6.bind(this._resolver))}this._iface=m();this._pending={};this._nextRemovalTime=false;this._hostnamesToFallback=new Set;if(r<1){this._fallback=false}else{this._fallback=true;const e=setInterval(()=>{this._hostnamesToFallback.clear()},r*1e3);if(e.unref){e.unref()}}this.lookup=this.lookup.bind(this);this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear();this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if(typeof t==="function"){r=t;t={}}else if(typeof t==="number"){t={family:t}}if(!r){throw new Error("Callback must be a function.")}this.lookupAsync(e,t).then(e=>{if(t.all){r(null,e)}else{r(null,e.address,e.family,e.expires,e.ttl)}},r)}async lookupAsync(e,t={}){if(typeof t==="number"){t={family:t}}let r=await this.query(e);if(t.family===6){const e=r.filter(e=>e.family===6);if(t.hints&n){if(d&&t.hints&s||e.length===0){y(r)}else{r=e}}else{r=e}}else if(t.family===4){r=r.filter(e=>e.family===4)}if(t.hints&i){const{_iface:e}=this;r=r.filter(t=>t.family===6?e.has6:e.has4)}if(r.length===0){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);t.code="ENOTFOUND";t.hostname=e;throw t}if(t.all){return r}return r[0]}async query(e){let t=await this._cache.get(e);if(!t){const r=this._pending[e];if(r){t=await r}else{const r=this.queryAndCache(e);this._pending[e]=r;try{t=await r}finally{delete this._pending[e]}}}t=t.map(e=>{return{...e}});return t}async _resolve(e){const t=async e=>{try{return await e}catch(e){if(e.code==="ENODATA"||e.code==="ENOTFOUND"){return[]}throw e}};const[r,n]=await Promise.all([this._resolve4(e,v),this._resolve6(e,v)].map(e=>t(e)));let i=0;let s=0;let o=0;const a=Date.now();for(const e of r){e.family=4;e.expires=a+e.ttl*1e3;i=Math.max(i,e.ttl)}for(const e of n){e.family=6;e.expires=a+e.ttl*1e3;s=Math.max(s,e.ttl)}if(r.length>0){if(n.length>0){o=Math.min(i,s)}else{o=i}}else{o=s}return{entries:[...r,...n],cacheTtl:o}}async _lookup(e){try{const t=await this._dnsLookup(e,{all:true});return{entries:t,cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=Math.min(r,this.maxTtl)*1e3;t[h]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=(async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");t.cause=e;throw t})}if(g(this._cache)){this._tick(r)}}}async queryAndCache(e){if(this._hostnamesToFallback.has(e)){return this._dnsLookup(e,b)}let t=await this._resolve(e);if(t.entries.length===0&&this._fallback){t=await this._lookup(e);if(t.entries.length!==0){this._hostnamesToFallback.add(e)}}const r=t.entries.length===0?this.errorTtl:t.cacheTtl;await this._set(e,t.entries,r);return t.entries}_tick(e){const t=this._nextRemovalTime;if(!t||e{this._nextRemovalTime=false;let e=Infinity;const t=Date.now();for(const[r,n]of this._cache){const i=n[h];if(t>=i){this._cache.delete(r)}else if(i{if(!("lookup"in t)){t.lookup=this.lookup}return e[l](t,r)})}uninstall(e){p(e);if(e[l]){if(e[f]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[f]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=m();if(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6){this._cache.clear()}}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}e.exports=CacheableLookup;e.exports.default=CacheableLookup},8116:(e,t,r)=>{"use strict";const n=r(8614);const i=r(8835);const s=r(7952);const o=r(1766);const a=r(1002);const c=r(9004);const u=r(9662);const l=r(1312);const f=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new f({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let f;if(typeof t==="string"){f=normalizeUrlObject(i.parse(t));t={}}else if(t instanceof i.URL){f=normalizeUrlObject(i.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const n=r.length>0?`?${r.join("?")}`:"";f=normalizeUrlObject({...t,pathname:e,search:n})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(f)};t.headers=u(t.headers);const h=new n;const d=s(i.format(f),{stripWWW:false,removeTrailingSlash:false,stripAuthentication:false});const p=`${t.method}:${d}`;let y=false;let m=false;const g=t=>{m=true;let n=false;let i;const s=new Promise(e=>{i=(()=>{if(!n){n=true;e()}})});const u=e=>{if(y&&!t.forceRefresh){e.status=e.statusCode;const r=a.fromObject(y.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();e=new c(y.statusCode,t,y.body,y.url);e.cachePolicy=r.policy;e.fromCache=true}}if(!e.fromCache){e.cachePolicy=new a(t,e,t);e.fromCache=false}let i;if(t.cache&&e.cachePolicy.storable()){i=l(e);(async()=>{try{const r=o.buffer(e);await Promise.race([s,new Promise(t=>e.once("end",t))]);if(n){return}const i=await r;const a={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?y.statusCode:e.statusCode,body:i};let c=t.strictTtl?e.cachePolicy.timeToLive():undefined;if(t.maxTtl){c=c?Math.min(c,t.maxTtl):t.maxTtl}await this.cache.set(p,a,c)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(p)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.emit("response",i||e);if(typeof r==="function"){r(i||e)}};try{const r=e(t,u);r.once("error",i);r.once("abort",i);h.emit("request",r)}catch(e){h.emit("error",new CacheableRequest.RequestError(e))}};(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(p):undefined;if(typeof t==="undefined"){return g(e)}const n=a.fromObject(t.cachePolicy);if(n.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=n.responseHeaders();const i=new c(t.statusCode,e,t.body,t.url);i.cachePolicy=n;i.fromCache=true;h.emit("response",i);if(typeof r==="function"){r(i)}}else{y=t;e.headers=n.revalidationHeaders(e);g(e)}};const n=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",n);h.on("response",()=>this.cache.removeListener("error",n));try{await e(t)}catch(e){if(t.automaticFailover&&!m){g(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}function urlObjectToRequestOptions(e){const t={...e};t.path=`${e.pathname||"/"}${e.search||""}`;delete t.pathname;delete t.search;return t}function normalizeUrlObject(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}CacheableRequest.RequestError=class extends Error{constructor(e){super(e.message);this.name="RequestError";Object.assign(this,e)}};CacheableRequest.CacheError=class extends Error{constructor(e){super(e.message);this.name="CacheError";Object.assign(this,e)}};e.exports=CacheableRequest},1312:(e,t,r)=>{"use strict";const n=r(2413).PassThrough;const i=r(2610);const s=e=>{if(!(e&&e.pipe)){throw new TypeError("Parameter `response` must be a response stream.")}const t=new n;i(e,t);return e.pipe(t)};e.exports=s},2391:(e,t,r)=>{"use strict";const{Transform:n,PassThrough:i}=r(2413);const s=r(8761);const o=r(3877);e.exports=(e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t)){return e}const r=t==="br";if(r&&typeof s.createBrotliDecompress!=="function"){e.destroy(new Error("Brotli is not supported on Node.js < 12"));return e}let a=true;const c=new n({transform(e,t,r){a=false;r(null,e)},flush(e){e()}});const u=new i({autoDestroy:false,destroy(t,r){e.destroy();r(t)}});const l=r?s.createBrotliDecompress():s.createUnzip();l.once("error",t=>{if(a&&!e.readable){u.end();return}u.destroy(t)});o(e,u);e.pipe(c).pipe(l).pipe(u);return u})},3877:e=>{"use strict";const t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=((e,r)=>{if(r._readableState.autoDestroy){throw new Error("The second stream must have the `autoDestroy` option set to `false`")}const n=new Set(Object.keys(e).concat(t));const i={};for(const t of n){if(t in r){continue}i[t]={get(){const r=e[t];const n=typeof r==="function";return n?r.bind(e):r},set(r){e[t]=r},enumerable:true,configurable:false}}Object.defineProperties(r,i);e.once("aborted",()=>{r.destroy();r.emit("aborted")});e.once("close",()=>{if(e.complete){if(r.readable){r.once("end",()=>{r.emit("close")})}else{r.emit("close")}}else{r.emit("close")}});return r})},6214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isTLSSocket(e){return e.encrypted}const r=(e,t)=>{let r;if(typeof t==="function"){const e=t;r={connect:e}}else{r=t}const n=typeof r.connect==="function";const i=typeof r.secureConnect==="function";const s=typeof r.close==="function";const o=()=>{if(n){r.connect()}if(isTLSSocket(e)&&i){if(e.authorized){r.secureConnect()}else if(!e.authorizationError){e.once("secureConnect",r.secureConnect)}}if(s){e.once("close",r.close)}};if(e.writable&&!e.connecting){o()}else if(e.connecting){e.once("connect",o)}else if(e.destroyed&&s){r.close(e._hadError)}};t.default=r;e.exports=r;e.exports.default=r},1205:(e,t,r)=>{var n=r(1223);var i=function(){};var s=function(e){return e.setHeader&&typeof e.abort==="function"};var o=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,t,r){if(typeof t==="function")return a(e,null,t);if(!t)t={};r=n(r||i);var c=e._writableState;var u=e._readableState;var l=t.readable||t.readable!==false&&e.readable;var f=t.writable||t.writable!==false&&e.writable;var h=false;var d=function(){if(!e.writable)p()};var p=function(){f=false;if(!l)r.call(e)};var y=function(){l=false;if(!f)r.call(e)};var m=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var g=function(t){r.call(e,t)};var v=function(){process.nextTick(b)};var b=function(){if(h)return;if(l&&!(u&&(u.ended&&!u.destroyed)))return r.call(e,new Error("premature close"));if(f&&!(c&&(c.ended&&!c.destroyed)))return r.call(e,new Error("premature close"))};var _=function(){e.req.on("finish",p)};if(s(e)){e.on("complete",p);e.on("abort",v);if(e.req)_();else e.on("request",_)}else if(f&&!c){e.on("end",d);e.on("close",d)}if(o(e))e.on("exit",m);e.on("end",y);e.on("finish",p);if(t.error!==false)e.on("error",g);e.on("close",v);return function(){h=true;e.removeListener("complete",p);e.removeListener("abort",v);e.removeListener("request",_);if(e.req)e.req.removeListener("finish",p);e.removeListener("end",d);e.removeListener("close",d);e.removeListener("finish",p);e.removeListener("exit",m);e.removeListener("end",y);e.removeListener("error",g);e.removeListener("close",v)}};e.exports=a},3338:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const s=r(2915).mkdirsSync;const o=r(2548).utimesMillisSync;const a=r(3901);function copySync(e,t,r){if(typeof r==="function"){r={filter:r}}r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}const{srcStat:n,destStat:i}=a.checkPathsSync(e,t,"copy",r);a.checkParentPathsSync(e,n,t,"copy");return handleFilterAndCopy(i,e,t,r)}function handleFilterAndCopy(e,t,r,o){if(o.filter&&!o.filter(t,r))return;const a=i.dirname(r);if(!n.existsSync(a))s(a);return getStats(e,t,r,o)}function startCopy(e,t,r,n){if(n.filter&&!n.filter(t,r))return;return getStats(e,t,r,n)}function getStats(e,t,r,i){const s=i.dereference?n.statSync:n.lstatSync;const o=s(t);if(o.isDirectory())return onDir(o,e,t,r,i);else if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return onFile(o,e,t,r,i);else if(o.isSymbolicLink())return onLink(e,t,r,i);else if(o.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);else if(o.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function onFile(e,t,r,n,i){if(!t)return copyFile(e,r,n,i);return mayCopyFile(e,r,n,i)}function mayCopyFile(e,t,r,i){if(i.overwrite){n.unlinkSync(r);return copyFile(e,t,r,i)}else if(i.errorOnExist){throw new Error(`'${r}' already exists`)}}function copyFile(e,t,r,i){n.copyFileSync(t,r);if(i.preserveTimestamps)handleTimestamps(e.mode,t,r);return setDestMode(r,e.mode)}function handleTimestamps(e,t,r){if(fileIsNotWritable(e))makeFileWritable(r,e);return setDestTimestamps(t,r)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t){return setDestMode(e,t|128)}function setDestMode(e,t){return n.chmodSync(e,t)}function setDestTimestamps(e,t){const r=n.statSync(e);return o(t,r.atime,r.mtime)}function onDir(e,t,r,n,i){if(!t)return mkDirAndCopy(e.mode,r,n,i);return copyDir(r,n,i)}function mkDirAndCopy(e,t,r,i){n.mkdirSync(r);copyDir(t,r,i);return setDestMode(r,e)}function copyDir(e,t,r){n.readdirSync(e).forEach(n=>copyDirItem(n,e,t,r))}function copyDirItem(e,t,r,n){const s=i.join(t,e);const o=i.join(r,e);const{destStat:c}=a.checkPathsSync(s,o,"copy",n);return startCopy(c,s,o,n)}function onLink(e,t,r,s){let o=n.readlinkSync(t);if(s.dereference){o=i.resolve(process.cwd(),o)}if(!e){return n.symlinkSync(o,r)}else{let e;try{e=n.readlinkSync(r)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return n.symlinkSync(o,r);throw e}if(s.dereference){e=i.resolve(process.cwd(),e)}if(a.isSrcSubdir(o,e)){throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`)}if(n.statSync(r).isDirectory()&&a.isSrcSubdir(e,o)){throw new Error(`Cannot overwrite '${e}' with '${o}'.`)}return copyLink(o,r)}}function copyLink(e,t){n.unlinkSync(t);return n.symlinkSync(e,t)}e.exports=copySync},1135:(e,t,r)=>{"use strict";e.exports={copySync:r(3338)}},8834:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const s=r(2915).mkdirs;const o=r(3835).pathExists;const a=r(2548).utimesMillis;const c=r(3901);function copy(e,t,r,n){if(typeof r==="function"&&!n){n=r;r={}}else if(typeof r==="function"){r={filter:r}}n=n||function(){};r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}c.checkPaths(e,t,"copy",r,(i,s)=>{if(i)return n(i);const{srcStat:o,destStat:a}=s;c.checkParentPaths(e,o,t,"copy",i=>{if(i)return n(i);if(r.filter)return handleFilter(checkParentDir,a,e,t,r,n);return checkParentDir(a,e,t,r,n)})})}function checkParentDir(e,t,r,n,a){const c=i.dirname(r);o(c,(i,o)=>{if(i)return a(i);if(o)return getStats(e,t,r,n,a);s(c,i=>{if(i)return a(i);return getStats(e,t,r,n,a)})})}function handleFilter(e,t,r,n,i,s){Promise.resolve(i.filter(r,n)).then(o=>{if(o)return e(t,r,n,i,s);return s()},e=>s(e))}function startCopy(e,t,r,n,i){if(n.filter)return handleFilter(getStats,e,t,r,n,i);return getStats(e,t,r,n,i)}function getStats(e,t,r,i,s){const o=i.dereference?n.stat:n.lstat;o(t,(n,o)=>{if(n)return s(n);if(o.isDirectory())return onDir(o,e,t,r,i,s);else if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return onFile(o,e,t,r,i,s);else if(o.isSymbolicLink())return onLink(e,t,r,i,s);else if(o.isSocket())return s(new Error(`Cannot copy a socket file: ${t}`));else if(o.isFIFO())return s(new Error(`Cannot copy a FIFO pipe: ${t}`));return s(new Error(`Unknown file: ${t}`))})}function onFile(e,t,r,n,i,s){if(!t)return copyFile(e,r,n,i,s);return mayCopyFile(e,r,n,i,s)}function mayCopyFile(e,t,r,i,s){if(i.overwrite){n.unlink(r,n=>{if(n)return s(n);return copyFile(e,t,r,i,s)})}else if(i.errorOnExist){return s(new Error(`'${r}' already exists`))}else return s()}function copyFile(e,t,r,i,s){n.copyFile(t,r,n=>{if(n)return s(n);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,t,r,s);return setDestMode(r,e.mode,s)})}function handleTimestampsAndMode(e,t,r,n){if(fileIsNotWritable(e)){return makeFileWritable(r,e,i=>{if(i)return n(i);return setDestTimestampsAndMode(e,t,r,n)})}return setDestTimestampsAndMode(e,t,r,n)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t,r){return setDestMode(e,t|128,r)}function setDestTimestampsAndMode(e,t,r,n){setDestTimestamps(t,r,t=>{if(t)return n(t);return setDestMode(r,e,n)})}function setDestMode(e,t,r){return n.chmod(e,t,r)}function setDestTimestamps(e,t,r){n.stat(e,(e,n)=>{if(e)return r(e);return a(t,n.atime,n.mtime,r)})}function onDir(e,t,r,n,i,s){if(!t)return mkDirAndCopy(e.mode,r,n,i,s);return copyDir(r,n,i,s)}function mkDirAndCopy(e,t,r,i,s){n.mkdir(r,n=>{if(n)return s(n);copyDir(t,r,i,t=>{if(t)return s(t);return setDestMode(r,e,s)})})}function copyDir(e,t,r,i){n.readdir(e,(n,s)=>{if(n)return i(n);return copyDirItems(s,e,t,r,i)})}function copyDirItems(e,t,r,n,i){const s=e.pop();if(!s)return i();return copyDirItem(e,s,t,r,n,i)}function copyDirItem(e,t,r,n,s,o){const a=i.join(r,t);const u=i.join(n,t);c.checkPaths(a,u,"copy",s,(t,i)=>{if(t)return o(t);const{destStat:c}=i;startCopy(c,a,u,s,t=>{if(t)return o(t);return copyDirItems(e,r,n,s,o)})})}function onLink(e,t,r,s,o){n.readlink(t,(t,a)=>{if(t)return o(t);if(s.dereference){a=i.resolve(process.cwd(),a)}if(!e){return n.symlink(a,r,o)}else{n.readlink(r,(t,u)=>{if(t){if(t.code==="EINVAL"||t.code==="UNKNOWN")return n.symlink(a,r,o);return o(t)}if(s.dereference){u=i.resolve(process.cwd(),u)}if(c.isSrcSubdir(a,u)){return o(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${u}'.`))}if(e.isDirectory()&&c.isSrcSubdir(u,a)){return o(new Error(`Cannot overwrite '${u}' with '${a}'.`))}return copyLink(a,r,o)})}})}function copyLink(e,t,r){n.unlink(t,i=>{if(i)return r(i);return n.symlink(e,t,r)})}e.exports=copy},1335:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;e.exports={copy:n(r(8834))}},6970:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const i=r(1176);const s=r(5622);const o=r(2915);const a=r(7357);const c=n(async function emptyDir(e){let t;try{t=await i.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map(t=>a.remove(s.join(e,t))))});function emptyDirSync(e){let t;try{t=i.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach(t=>{t=s.join(e,t);a.removeSync(t)})}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:c,emptydir:c}},2164:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(5622);const s=r(7758);const o=r(2915);function createFile(e,t){function makeFile(){s.writeFile(e,"",e=>{if(e)return t(e);t()})}s.stat(e,(r,n)=>{if(!r&&n.isFile())return t();const a=i.dirname(e);s.stat(a,(e,r)=>{if(e){if(e.code==="ENOENT"){return o.mkdirs(a,e=>{if(e)return t(e);makeFile()})}return t(e)}if(r.isDirectory())makeFile();else{s.readdir(a,e=>{if(e)return t(e)})}})})}function createFileSync(e){let t;try{t=s.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{if(!s.statSync(r).isDirectory()){s.readdirSync(r)}}catch(e){if(e&&e.code==="ENOENT")o.mkdirsSync(r);else throw e}s.writeFileSync(e,"")}e.exports={createFile:n(createFile),createFileSync:createFileSync}},55:(e,t,r)=>{"use strict";const n=r(2164);const i=r(3797);const s=r(2549);e.exports={createFile:n.createFile,createFileSync:n.createFileSync,ensureFile:n.createFile,ensureFileSync:n.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:s.createSymlink,createSymlinkSync:s.createSymlinkSync,ensureSymlink:s.createSymlink,ensureSymlinkSync:s.createSymlinkSync}},3797:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(5622);const s=r(7758);const o=r(2915);const a=r(3835).pathExists;const{areIdentical:c}=r(3901);function createLink(e,t,r){function makeLink(e,t){s.link(e,t,e=>{if(e)return r(e);r(null)})}s.lstat(t,(n,u)=>{s.lstat(e,(n,s)=>{if(n){n.message=n.message.replace("lstat","ensureLink");return r(n)}if(u&&c(s,u))return r(null);const l=i.dirname(t);a(l,(n,i)=>{if(n)return r(n);if(i)return makeLink(e,t);o.mkdirs(l,n=>{if(n)return r(n);makeLink(e,t)})})})})}function createLinkSync(e,t){let r;try{r=s.lstatSync(t)}catch{}try{const t=s.lstatSync(e);if(r&&c(t,r))return}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const n=i.dirname(t);const a=s.existsSync(n);if(a)return s.linkSync(e,t);o.mkdirsSync(n);return s.linkSync(e,t)}e.exports={createLink:n(createLink),createLinkSync:createLinkSync}},3727:(e,t,r)=>{"use strict";const n=r(5622);const i=r(7758);const s=r(3835).pathExists;function symlinkPaths(e,t,r){if(n.isAbsolute(e)){return i.lstat(e,t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:e})})}else{const o=n.dirname(t);const a=n.join(o,e);return s(a,(t,s)=>{if(t)return r(t);if(s){return r(null,{toCwd:a,toDst:e})}else{return i.lstat(e,t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:n.relative(o,e)})})}})}}function symlinkPathsSync(e,t){let r;if(n.isAbsolute(e)){r=i.existsSync(e);if(!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const s=n.dirname(t);const o=n.join(s,e);r=i.existsSync(o);if(r){return{toCwd:o,toDst:e}}else{r=i.existsSync(e);if(!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(s,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},8254:(e,t,r)=>{"use strict";const n=r(7758);function symlinkType(e,t,r){r=typeof t==="function"?t:r;t=typeof t==="function"?false:t;if(t)return r(null,t);n.lstat(e,(e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file";r(null,t)})}function symlinkTypeSync(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},2549:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(5622);const s=r(1176);const o=r(2915);const a=o.mkdirs;const c=o.mkdirsSync;const u=r(3727);const l=u.symlinkPaths;const f=u.symlinkPathsSync;const h=r(8254);const d=h.symlinkType;const p=h.symlinkTypeSync;const y=r(3835).pathExists;const{areIdentical:m}=r(3901);function createSymlink(e,t,r,n){n=typeof r==="function"?r:n;r=typeof r==="function"?false:r;s.lstat(t,(i,o)=>{if(!i&&o.isSymbolicLink()){Promise.all([s.stat(e),s.stat(t)]).then(([i,s])=>{if(m(i,s))return n(null);_createSymlink(e,t,r,n)})}else _createSymlink(e,t,r,n)})}function _createSymlink(e,t,r,n){l(e,t,(o,c)=>{if(o)return n(o);e=c.toDst;d(c.toCwd,r,(r,o)=>{if(r)return n(r);const c=i.dirname(t);y(c,(r,i)=>{if(r)return n(r);if(i)return s.symlink(e,t,o,n);a(c,r=>{if(r)return n(r);s.symlink(e,t,o,n)})})})})}function createSymlinkSync(e,t,r){let n;try{n=s.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=s.statSync(e);const n=s.statSync(t);if(m(r,n))return}const o=f(e,t);e=o.toDst;r=p(o.toCwd,r);const a=i.dirname(t);const u=s.existsSync(a);if(u)return s.symlinkSync(e,t,r);c(a);return s.symlinkSync(e,t,r)}e.exports={createSymlink:n(createSymlink),createSymlinkSync:createSymlinkSync}},1176:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(7758);const s=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>{return typeof i[e]==="function"});Object.assign(t,i);s.forEach(e=>{t[e]=n(i[e])});t.realpath.native=n(i.realpath.native);t.exists=function(e,t){if(typeof t==="function"){return i.exists(e,t)}return new Promise(t=>{return i.exists(e,t)})};t.read=function(e,t,r,n,s,o){if(typeof o==="function"){return i.read(e,t,r,n,s,o)}return new Promise((o,a)=>{i.read(e,t,r,n,s,(e,t,r)=>{if(e)return a(e);o({bytesRead:t,buffer:r})})})};t.write=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.write(e,t,...r)}return new Promise((n,s)=>{i.write(e,t,...r,(e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffer:r})})})};if(typeof i.writev==="function"){t.writev=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.writev(e,t,...r)}return new Promise((n,s)=>{i.writev(e,t,...r,(e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffers:r})})})}}},5630:(e,t,r)=>{"use strict";e.exports={...r(1176),...r(1135),...r(1335),...r(6970),...r(55),...r(213),...r(2915),...r(9665),...r(1497),...r(6570),...r(3835),...r(7357)}},213:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const i=r(8970);i.outputJson=n(r(531));i.outputJsonSync=r(9421);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},8970:(e,t,r)=>{"use strict";const n=r(6160);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},9421:(e,t,r)=>{"use strict";const{stringify:n}=r(5902);const{outputFileSync:i}=r(6570);function outputJsonSync(e,t,r){const s=n(t,r);i(e,s,r)}e.exports=outputJsonSync},531:(e,t,r)=>{"use strict";const{stringify:n}=r(5902);const{outputFile:i}=r(6570);async function outputJson(e,t,r={}){const s=n(t,r);await i(e,s,r)}e.exports=outputJson},2915:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const{makeDir:i,makeDirSync:s}=r(2751);const o=n(i);e.exports={mkdirs:o,mkdirsSync:s,mkdirp:o,mkdirpSync:s,ensureDir:o,ensureDirSync:s}},2751:(e,t,r)=>{"use strict";const n=r(1176);const{checkPath:i}=r(9907);const s=e=>{const t={mode:511};if(typeof e==="number")return e;return{...t,...e}.mode};e.exports.makeDir=(async(e,t)=>{i(e);return n.mkdir(e,{mode:s(t),recursive:true})});e.exports.makeDirSync=((e,t)=>{i(e);return n.mkdirSync(e,{mode:s(t),recursive:true})})},9907:(e,t,r)=>{"use strict";const n=r(5622);e.exports.checkPath=function checkPath(e){if(process.platform==="win32"){const t=/[<>:"|?*]/.test(e.replace(n.parse(e).root,""));if(t){const t=new Error(`Path contains invalid characters: ${e}`);t.code="EINVAL";throw t}}}},9665:(e,t,r)=>{"use strict";e.exports={moveSync:r(6445)}},6445:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const s=r(1135).copySync;const o=r(7357).removeSync;const a=r(2915).mkdirpSync;const c=r(3901);function moveSync(e,t,r){r=r||{};const n=r.overwrite||r.clobber||false;const{srcStat:s,isChangingCase:o=false}=c.checkPathsSync(e,t,"move",r);c.checkParentPathsSync(e,s,t,"move");if(!isParentRoot(t))a(i.dirname(t));return doRename(e,t,n,o)}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,i){if(i)return rename(e,t,r);if(r){o(t);return rename(e,t,r)}if(n.existsSync(t))throw new Error("dest already exists.");return rename(e,t,r)}function rename(e,t,r){try{n.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return moveAcrossDevice(e,t,r)}}function moveAcrossDevice(e,t,r){const n={overwrite:r,errorOnExist:true};s(e,t,n);return o(e)}e.exports=moveSync},1497:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;e.exports={move:n(r(2231))}},2231:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const s=r(1335).copy;const o=r(7357).remove;const a=r(2915).mkdirp;const c=r(3835).pathExists;const u=r(3901);function move(e,t,r,n){if(typeof r==="function"){n=r;r={}}const s=r.overwrite||r.clobber||false;u.checkPaths(e,t,"move",r,(r,o)=>{if(r)return n(r);const{srcStat:c,isChangingCase:l=false}=o;u.checkParentPaths(e,c,t,"move",r=>{if(r)return n(r);if(isParentRoot(t))return doRename(e,t,s,l,n);a(i.dirname(t),r=>{if(r)return n(r);return doRename(e,t,s,l,n)})})})}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,n,i){if(n)return rename(e,t,r,i);if(r){return o(t,n=>{if(n)return i(n);return rename(e,t,r,i)})}c(t,(n,s)=>{if(n)return i(n);if(s)return i(new Error("dest already exists."));return rename(e,t,r,i)})}function rename(e,t,r,i){n.rename(e,t,n=>{if(!n)return i();if(n.code!=="EXDEV")return i(n);return moveAcrossDevice(e,t,r,i)})}function moveAcrossDevice(e,t,r,n){const i={overwrite:r,errorOnExist:true};s(e,t,i,t=>{if(t)return n(t);return o(e,n)})}e.exports=move},6570:(e,t,r)=>{"use strict";const n=r(9046).fromCallback;const i=r(7758);const s=r(5622);const o=r(2915);const a=r(3835).pathExists;function outputFile(e,t,r,n){if(typeof r==="function"){n=r;r="utf8"}const c=s.dirname(e);a(c,(s,a)=>{if(s)return n(s);if(a)return i.writeFile(e,t,r,n);o.mkdirs(c,s=>{if(s)return n(s);i.writeFile(e,t,r,n)})})}function outputFileSync(e,...t){const r=s.dirname(e);if(i.existsSync(r)){return i.writeFileSync(e,...t)}o.mkdirsSync(r);i.writeFileSync(e,...t)}e.exports={outputFile:n(outputFile),outputFileSync:outputFileSync}},3835:(e,t,r)=>{"use strict";const n=r(9046).fromPromise;const i=r(1176);function pathExists(e){return i.access(e).then(()=>true).catch(()=>false)}e.exports={pathExists:n(pathExists),pathExistsSync:i.existsSync}},7357:(e,t,r)=>{"use strict";const n=r(7758);const i=r(9046).fromCallback;const s=r(7247);function remove(e,t){if(n.rm)return n.rm(e,{recursive:true,force:true},t);s(e,t)}function removeSync(e){if(n.rmSync)return n.rmSync(e,{recursive:true,force:true});s.sync(e)}e.exports={remove:i(remove),removeSync:removeSync}},7247:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const s=r(2357);const o=process.platform==="win32";function defaults(e){const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(t=>{e[t]=e[t]||n[t];t=t+"Sync";e[t]=e[t]||n[t]});e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,t,r){let n=0;if(typeof t==="function"){r=t;t={}}s(e,"rimraf: missing path");s.strictEqual(typeof e,"string","rimraf: path should be a string");s.strictEqual(typeof r,"function","rimraf: callback function required");s(t,"rimraf: invalid options argument provided");s.strictEqual(typeof t,"object","rimraf: options should be object");defaults(t);rimraf_(e,t,function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&nrimraf_(e,t,CB),r)}if(i.code==="ENOENT")i=null}r(i)})}function rimraf_(e,t,r){s(e);s(t);s(typeof r==="function");t.lstat(e,(n,i)=>{if(n&&n.code==="ENOENT"){return r(null)}if(n&&n.code==="EPERM"&&o){return fixWinEPERM(e,t,n,r)}if(i&&i.isDirectory()){return rmdir(e,t,n,r)}t.unlink(e,n=>{if(n){if(n.code==="ENOENT"){return r(null)}if(n.code==="EPERM"){return o?fixWinEPERM(e,t,n,r):rmdir(e,t,n,r)}if(n.code==="EISDIR"){return rmdir(e,t,n,r)}}return r(n)})})}function fixWinEPERM(e,t,r,n){s(e);s(t);s(typeof n==="function");t.chmod(e,438,i=>{if(i){n(i.code==="ENOENT"?null:r)}else{t.stat(e,(i,s)=>{if(i){n(i.code==="ENOENT"?null:r)}else if(s.isDirectory()){rmdir(e,t,r,n)}else{t.unlink(e,n)}})}})}function fixWinEPERMSync(e,t,r){let n;s(e);s(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}try{n=t.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}if(n.isDirectory()){rmdirSync(e,t,r)}else{t.unlinkSync(e)}}function rmdir(e,t,r,n){s(e);s(t);s(typeof n==="function");t.rmdir(e,i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,t,n)}else if(i&&i.code==="ENOTDIR"){n(r)}else{n(i)}})}function rmkids(e,t,r){s(e);s(t);s(typeof r==="function");t.readdir(e,(n,s)=>{if(n)return r(n);let o=s.length;let a;if(o===0)return t.rmdir(e,r);s.forEach(n=>{rimraf(i.join(e,n),t,n=>{if(a){return}if(n)return r(a=n);if(--o===0){t.rmdir(e,r)}})})})}function rimrafSync(e,t){let r;t=t||{};defaults(t);s(e,"rimraf: missing path");s.strictEqual(typeof e,"string","rimraf: path should be a string");s(t,"rimraf: missing options");s.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if(r.code==="ENOENT"){return}if(r.code==="EPERM"&&o){fixWinEPERMSync(e,t,r)}}try{if(r&&r.isDirectory()){rmdirSync(e,t,null)}else{t.unlinkSync(e)}}catch(r){if(r.code==="ENOENT"){return}else if(r.code==="EPERM"){return o?fixWinEPERMSync(e,t,r):rmdirSync(e,t,r)}else if(r.code!=="EISDIR"){throw r}rmdirSync(e,t,r)}}function rmdirSync(e,t,r){s(e);s(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR"){throw r}else if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"){rmkidsSync(e,t)}else if(n.code!=="ENOENT"){throw n}}}function rmkidsSync(e,t){s(e);s(t);t.readdirSync(e).forEach(r=>rimrafSync(i.join(e,r),t));if(o){const r=Date.now();do{try{const r=t.rmdirSync(e,t);return r}catch{}}while(Date.now()-r<500)}else{const r=t.rmdirSync(e,t);return r}}e.exports=rimraf;rimraf.sync=rimrafSync},3901:(e,t,r)=>{"use strict";const n=r(1176);const i=r(5622);const s=r(1669);function getStats(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:true}):e=>n.lstat(e,{bigint:true});return Promise.all([i(e),i(t).catch(e=>{if(e.code==="ENOENT")return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function getStatsSync(e,t,r){let i;const s=r.dereference?e=>n.statSync(e,{bigint:true}):e=>n.lstatSync(e,{bigint:true});const o=s(e);try{i=s(t)}catch(e){if(e.code==="ENOENT")return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}function checkPaths(e,t,r,n,o){s.callbackify(getStats)(e,t,n,(n,s)=>{if(n)return o(n);const{srcStat:a,destStat:c}=s;if(c){if(areIdentical(a,c)){const n=i.basename(e);const s=i.basename(t);if(r==="move"&&n!==s&&n.toLowerCase()===s.toLowerCase()){return o(null,{srcStat:a,destStat:c,isChangingCase:true})}return o(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!c.isDirectory()){return o(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`))}if(!a.isDirectory()&&c.isDirectory()){return o(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}}if(a.isDirectory()&&isSrcSubdir(e,t)){return o(new Error(errMsg(e,t,r)))}return o(null,{srcStat:a,destStat:c})})}function checkPathsSync(e,t,r,n){const{srcStat:s,destStat:o}=getStatsSync(e,t,n);if(o){if(areIdentical(s,o)){const n=i.basename(e);const a=i.basename(t);if(r==="move"&&n!==a&&n.toLowerCase()===a.toLowerCase()){return{srcStat:s,destStat:o,isChangingCase:true}}throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!o.isDirectory()){throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`)}if(!s.isDirectory()&&o.isDirectory()){throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}}if(s.isDirectory()&&isSrcSubdir(e,t)){throw new Error(errMsg(e,t,r))}return{srcStat:s,destStat:o}}function checkParentPaths(e,t,r,s,o){const a=i.resolve(i.dirname(e));const c=i.resolve(i.dirname(r));if(c===a||c===i.parse(c).root)return o();n.stat(c,{bigint:true},(n,i)=>{if(n){if(n.code==="ENOENT")return o();return o(n)}if(areIdentical(t,i)){return o(new Error(errMsg(e,r,s)))}return checkParentPaths(e,t,c,s,o)})}function checkParentPathsSync(e,t,r,s){const o=i.resolve(i.dirname(e));const a=i.resolve(i.dirname(r));if(a===o||a===i.parse(a).root)return;let c;try{c=n.statSync(a,{bigint:true})}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(t,c)){throw new Error(errMsg(e,r,s))}return checkParentPathsSync(e,t,a,s)}function areIdentical(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function isSrcSubdir(e,t){const r=i.resolve(e).split(i.sep).filter(e=>e);const n=i.resolve(t).split(i.sep).filter(e=>e);return r.reduce((e,t,r)=>e&&n[r]===t,true)}function errMsg(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir,areIdentical:areIdentical}},2548:(e,t,r)=>{"use strict";const n=r(7758);function utimesMillis(e,t,r,i){n.open(e,"r+",(e,s)=>{if(e)return i(e);n.futimes(s,t,r,e=>{n.close(s,t=>{if(i)i(e||t)})})})}function utimesMillisSync(e,t,r){const i=n.openSync(e,"r+");n.futimesSync(i,t,r);return n.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},1585:(e,t,r)=>{"use strict";const{PassThrough:n}=r(2413);e.exports=(e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const i=r==="buffer";let s=false;if(t){s=!(r||i)}else{r=r||"utf8"}if(i){r=null}const o=new n({objectMode:s});if(r){o.setEncoding(r)}let a=0;const c=[];o.on("data",e=>{c.push(e);if(s){a=c.length}else{a+=e.length}});o.getBufferedValue=(()=>{if(t){return c}return i?Buffer.concat(c,a):c.join("")});o.getBufferedLength=(()=>a);return o})},1766:(e,t,r)=>{"use strict";const{constants:n}=r(4293);const i=r(8341);const s=r(1585);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){return Promise.reject(new Error("Expected a stream"))}t={maxBuffer:Infinity,...t};const{maxBuffer:r}=t;let o;await new Promise((a,c)=>{const u=e=>{if(e&&o.getBufferedLength()<=n.MAX_LENGTH){e.bufferedData=o.getBufferedValue()}c(e)};o=i(e,s(t),e=>{if(e){u(e);return}a()});o.on("data",()=>{if(o.getBufferedLength()>r){u(new MaxBufferError)}})});return o.getBufferedValue()}e.exports=getStream;e.exports.default=getStream;e.exports.buffer=((e,t)=>getStream(e,{...t,encoding:"buffer"}));e.exports.array=((e,t)=>getStream(e,{...t,array:true}));e.exports.MaxBufferError=MaxBufferError},6457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4597);function createRejection(e,...t){const r=(async()=>{if(e instanceof n.RequestError){try{for(const r of t){if(r){for(const t of r){e=await t(e)}}}}catch(t){e=t}}throw e})();const i=()=>r;r.json=i;r.text=i;r.buffer=i;r.on=i;return r}t.default=createRejection},6056:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});const s=r(8614);const o=r(7678);const a=r(9072);const c=r(4597);const u=r(8220);const l=r(94);const f=r(3021);const h=r(4500);const d=r(9298);const p=["request","response","redirect","uploadProgress","downloadProgress"];function asPromise(e){let t;let r;const n=new s.EventEmitter;const i=new a((s,a,y)=>{const m=g=>{const v=new l.default(undefined,e);v.retryCount=g;v._noPipe=true;y(()=>v.destroy());y.shouldReject=false;y(()=>a(new c.CancelError(v)));t=v;v.once("response",async e=>{var t;e.retryCount=g;if(e.request.aborted){return}let n;try{n=await h.default(v);e.rawBody=n}catch(e){return}if(v._isAboutToError){return}const i=((t=e.headers["content-encoding"])!==null&&t!==void 0?t:"").toLowerCase();const o=["gzip","deflate","br"].includes(i);const{options:a}=v;if(o&&!a.decompress){e.body=n}else{try{e.body=u.default(e,a.responseType,a.parseJson,a.encoding)}catch(t){e.body=n.toString();if(d.isResponseOk(e)){v._beforeError(t);return}}}try{for(const[t,r]of a.hooks.afterResponse.entries()){e=await r(e,async e=>{const r=l.default.normalizeArguments(undefined,{...e,retry:{calculateDelay:()=>0},throwHttpErrors:false,resolveBodyOnly:false},a);r.hooks.afterResponse=r.hooks.afterResponse.slice(0,t);for(const e of r.hooks.beforeRetry){await e(r)}const n=asPromise(r);y(()=>{n.catch(()=>{});n.cancel()});return n})}}catch(e){v._beforeError(new c.RequestError(e.message,e,v));return}if(!d.isResponseOk(e)){v._beforeError(new c.HTTPError(e));return}r=e;s(v.options.resolveBodyOnly?e.body:e)});const b=e=>{if(i.isCanceled){return}const{options:t}=v;if(e instanceof c.HTTPError&&!t.throwHttpErrors){const{response:t}=e;s(v.options.resolveBodyOnly?t.body:t);return}a(e)};v.once("error",b);const _=v.options.body;v.once("retry",(e,t)=>{var r,n;if(_===((r=t.request)===null||r===void 0?void 0:r.options.body)&&o.default.nodeStream((n=t.request)===null||n===void 0?void 0:n.options.body)){b(t);return}m(e)});f.default(v,n,p)};m(0)});i.on=((e,t)=>{n.on(e,t);return i});const y=e=>{const t=(async()=>{await i;const{options:t}=r.request;return u.default(r,e,t.parseJson,t.encoding)})();Object.defineProperties(t,Object.getOwnPropertyDescriptors(i));return t};i.json=(()=>{const{headers:e}=t.options;if(!t.writableFinished&&e.accept===undefined){e.accept="application/json"}return y("json")});i.buffer=(()=>y("buffer"));i.text=(()=>y("text"));return i}t.default=asPromise;i(r(4597),t)},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7678);const i=(e,t)=>{if(n.default.null_(e.encoding)){throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead")}n.assert.any([n.default.string,n.default.undefined],e.encoding);n.assert.any([n.default.boolean,n.default.undefined],e.resolveBodyOnly);n.assert.any([n.default.boolean,n.default.undefined],e.methodRewriting);n.assert.any([n.default.boolean,n.default.undefined],e.isStream);n.assert.any([n.default.string,n.default.undefined],e.responseType);if(e.responseType===undefined){e.responseType="text"}const{retry:r}=e;if(t){e.retry={...t.retry}}else{e.retry={calculateDelay:e=>e.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:undefined}}if(n.default.object(r)){e.retry={...e.retry,...r};e.retry.methods=[...new Set(e.retry.methods.map(e=>e.toUpperCase()))];e.retry.statusCodes=[...new Set(e.retry.statusCodes)];e.retry.errorCodes=[...new Set(e.retry.errorCodes)]}else if(n.default.number(r)){e.retry.limit=r}if(n.default.undefined(e.retry.maxRetryAfter)){e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter(n.default.number))}if(n.default.object(e.pagination)){if(t){e.pagination={...t.pagination,...e.pagination}}const{pagination:r}=e;if(!n.default.function_(r.transform)){throw new Error("`options.pagination.transform` must be implemented")}if(!n.default.function_(r.shouldContinue)){throw new Error("`options.pagination.shouldContinue` must be implemented")}if(!n.default.function_(r.filter)){throw new TypeError("`options.pagination.filter` must be implemented")}if(!n.default.function_(r.paginate)){throw new Error("`options.pagination.paginate` must be implemented")}}if(e.responseType==="json"&&e.headers.accept===undefined){e.headers.accept="application/json"}return e};t.default=i},8220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4597);const i=(e,t,r,i)=>{const{rawBody:s}=e;try{if(t==="text"){return s.toString(i)}if(t==="json"){return s.length===0?"":r(s.toString())}if(t==="buffer"){return s}throw new n.ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)}catch(t){throw new n.ParseError(t,e)}};t.default=i},4597:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});t.CancelError=t.ParseError=void 0;const s=r(94);class ParseError extends s.RequestError{constructor(e,t){const{options:r}=t.request;super(`${e.message} in "${r.url.toString()}"`,e,t.request);this.name="ParseError"}}t.ParseError=ParseError;class CancelError extends s.RequestError{constructor(e){super("Promise was canceled",{},e);this.name="CancelError"}get isCanceled(){return true}}t.CancelError=CancelError;i(r(94),t)},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.retryAfterStatusCodes=void 0;t.retryAfterStatusCodes=new Set([413,429,503]);const r=({attemptCount:e,retryOptions:t,error:r,retryAfter:n})=>{if(e>t.limit){return 0}const i=t.methods.includes(r.options.method);const s=t.errorCodes.includes(r.code);const o=r.response&&t.statusCodes.includes(r.response.statusCode);if(!i||!s&&!o){return 0}if(r.response){if(n){if(t.maxRetryAfter===undefined||n>t.maxRetryAfter){return 0}return n}if(r.response.statusCode===413){return 0}}const a=Math.random()*100;return 2**(e-1)*1e3+a};t.default=r},94:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const n=r(1669);const i=r(2413);const s=r(5747);const o=r(8835);const a=r(8605);const c=r(8605);const u=r(7211);const l=r(8097);const f=r(2286);const h=r(8116);const d=r(2391);const p=r(4645);const y=r(9662);const m=r(7678);const g=r(4564);const v=r(40);const b=r(3021);const _=r(2454);const w=r(8026);const S=r(9219);const E=r(7288);const x=r(4500);const k=r(4993);const O=r(9298);const I=r(397);const C=r(1048);const P=r(3462);let A;const R=Symbol("request");const T=Symbol("response");const j=Symbol("responseSize");const L=Symbol("downloadedSize");const F=Symbol("bodySize");const D=Symbol("uploadedSize");const M=Symbol("serverResponsesPiped");const N=Symbol("unproxyEvents");const q=Symbol("isFromCache");const W=Symbol("cancelTimeouts");const U=Symbol("startedReading");const H=Symbol("stopReading");const $=Symbol("triggerRead");const z=Symbol("body");const B=Symbol("jobs");const G=Symbol("originalResponse");const K=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const J=m.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]);t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function validateSearchParameters(e){for(const t in e){const r=e[t];if(!m.default.string(r)&&!m.default.number(r)&&!m.default.boolean(r)&&!m.default.null_(r)&&!m.default.undefined(r)){throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}}function isClientRequest(e){return m.default.object(e)&&!("statusCode"in e)}const Y=new E.default;const Z=async e=>new Promise((t,r)=>{const n=e=>{r(e)};if(!e.pending){t()}e.once("error",n);e.once("ready",()=>{e.off("error",n);t()})});const X=new Set([300,301,302,303,304,307,308]);const Q=["context","body","json","form"];t.setNonEnumerableProperties=((e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of Q){if(!(e in t)){continue}r[e]={writable:true,configurable:true,enumerable:false,value:t[e]}}}Object.defineProperties(t,r)});class RequestError extends Error{constructor(e,t,r){var n;super(e);Error.captureStackTrace(this,this.constructor);this.name="RequestError";this.code=t.code;if(r instanceof Request){Object.defineProperty(this,"request",{enumerable:false,value:r});Object.defineProperty(this,"response",{enumerable:false,value:r[T]});Object.defineProperty(this,"options",{enumerable:false,value:r.options})}else{Object.defineProperty(this,"options",{enumerable:false,value:r})}this.timings=(n=this.request)===null||n===void 0?void 0:n.timings;if(m.default.string(t.stack)&&m.default.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length;const r=this.stack.slice(e).split("\n").reverse();const n=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();while(n.length!==0&&n[0]===r[0]){r.shift()}this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${n.reverse().join("\n")}`}}}t.RequestError=RequestError;class MaxRedirectsError extends RequestError{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError"}}t.MaxRedirectsError=MaxRedirectsError;class HTTPError extends RequestError{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError"}}t.HTTPError=HTTPError;class CacheError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="CacheError"}}t.CacheError=CacheError;class UploadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="UploadError"}}t.UploadError=UploadError;class TimeoutError extends RequestError{constructor(e,t,r){super(e.message,e,r);this.name="TimeoutError";this.event=e.event;this.timings=t}}t.TimeoutError=TimeoutError;class ReadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="ReadError"}}t.ReadError=ReadError;class UnsupportedProtocolError extends RequestError{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}}t.UnsupportedProtocolError=UnsupportedProtocolError;const V=["socket","connect","continue","information","upgrade","timeout"];class Request extends i.Duplex{constructor(e,r={},n){super({autoDestroy:false,highWaterMark:0});this[L]=0;this[D]=0;this.requestInitialized=false;this[M]=new Set;this.redirects=[];this[H]=false;this[$]=false;this[B]=[];this.retryCount=0;this._progressCallbacks=[];const i=()=>this._unlockWrite();const o=()=>this._lockWrite();this.on("pipe",e=>{e.prependListener("data",i);e.on("data",o);e.prependListener("end",i);e.on("end",o)});this.on("unpipe",e=>{e.off("data",i);e.off("data",o);e.off("end",i);e.off("end",o)});this.on("pipe",e=>{if(e instanceof c.IncomingMessage){this.options.headers={...e.headers,...this.options.headers}}});const{json:a,body:u,form:l}=r;if(a||u||l){this._lockWrite()}if(t.kIsNormalizedAlready in r){this.options=r}else{try{this.options=this.constructor.normalizeArguments(e,r,n)}catch(e){if(m.default.nodeStream(r.body)){r.body.destroy()}this.destroy(e);return}}(async()=>{var e;try{if(this.options.body instanceof s.ReadStream){await Z(this.options.body)}const{url:t}=this.options;if(!t){throw new TypeError("Missing `url` property")}this.requestUrl=t.toString();decodeURI(this.requestUrl);await this._finalizeBody();await this._makeRequest();if(this.destroyed){(e=this[R])===null||e===void 0?void 0:e.destroy();return}for(const e of this[B]){e()}this[B].length=0;this.requestInitialized=true}catch(e){if(e instanceof RequestError){this._beforeError(e);return}if(!this.destroyed){this.destroy(e)}}})()}static normalizeArguments(e,r,i){var s,a,c,u,l;const d=r;if(m.default.object(e)&&!m.default.urlInstance(e)){r={...i,...e,...r}}else{if(e&&r&&r.url!==undefined){throw new TypeError("The `url` option is mutually exclusive with the `input` argument")}r={...i,...r};if(e!==undefined){r.url=e}if(m.default.urlInstance(r.url)){r.url=new o.URL(r.url.toString())}}if(r.cache===false){r.cache=undefined}if(r.dnsCache===false){r.dnsCache=undefined}m.assert.any([m.default.string,m.default.undefined],r.method);m.assert.any([m.default.object,m.default.undefined],r.headers);m.assert.any([m.default.string,m.default.urlInstance,m.default.undefined],r.prefixUrl);m.assert.any([m.default.object,m.default.undefined],r.cookieJar);m.assert.any([m.default.object,m.default.string,m.default.undefined],r.searchParams);m.assert.any([m.default.object,m.default.string,m.default.undefined],r.cache);m.assert.any([m.default.object,m.default.number,m.default.undefined],r.timeout);m.assert.any([m.default.object,m.default.undefined],r.context);m.assert.any([m.default.object,m.default.undefined],r.hooks);m.assert.any([m.default.boolean,m.default.undefined],r.decompress);m.assert.any([m.default.boolean,m.default.undefined],r.ignoreInvalidCookies);m.assert.any([m.default.boolean,m.default.undefined],r.followRedirect);m.assert.any([m.default.number,m.default.undefined],r.maxRedirects);m.assert.any([m.default.boolean,m.default.undefined],r.throwHttpErrors);m.assert.any([m.default.boolean,m.default.undefined],r.http2);m.assert.any([m.default.boolean,m.default.undefined],r.allowGetBody);m.assert.any([m.default.string,m.default.undefined],r.localAddress);m.assert.any([k.isDnsLookupIpVersion,m.default.undefined],r.dnsLookupIpVersion);m.assert.any([m.default.object,m.default.undefined],r.https);m.assert.any([m.default.boolean,m.default.undefined],r.rejectUnauthorized);if(r.https){m.assert.any([m.default.boolean,m.default.undefined],r.https.rejectUnauthorized);m.assert.any([m.default.function_,m.default.undefined],r.https.checkServerIdentity);m.assert.any([m.default.string,m.default.object,m.default.array,m.default.undefined],r.https.certificateAuthority);m.assert.any([m.default.string,m.default.object,m.default.array,m.default.undefined],r.https.key);m.assert.any([m.default.string,m.default.object,m.default.array,m.default.undefined],r.https.certificate);m.assert.any([m.default.string,m.default.undefined],r.https.passphrase);m.assert.any([m.default.string,m.default.buffer,m.default.array,m.default.undefined],r.https.pfx)}m.assert.any([m.default.object,m.default.undefined],r.cacheOptions);if(m.default.string(r.method)){r.method=r.method.toUpperCase()}else{r.method="GET"}if(r.headers===(i===null||i===void 0?void 0:i.headers)){r.headers={...r.headers}}else{r.headers=y({...i===null||i===void 0?void 0:i.headers,...r.headers})}if("slashes"in r){throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.")}if("auth"in r){throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.")}if("searchParams"in r){if(r.searchParams&&r.searchParams!==(i===null||i===void 0?void 0:i.searchParams)){let e;if(m.default.string(r.searchParams)||r.searchParams instanceof o.URLSearchParams){e=new o.URLSearchParams(r.searchParams)}else{validateSearchParameters(r.searchParams);e=new o.URLSearchParams;for(const t in r.searchParams){const n=r.searchParams[t];if(n===null){e.append(t,"")}else if(n!==undefined){e.append(t,n)}}}(s=i===null||i===void 0?void 0:i.searchParams)===null||s===void 0?void 0:s.forEach((t,r)=>{if(!e.has(r)){e.append(r,t)}});r.searchParams=e}}r.username=(a=r.username)!==null&&a!==void 0?a:"";r.password=(c=r.password)!==null&&c!==void 0?c:"";if(m.default.undefined(r.prefixUrl)){r.prefixUrl=(u=i===null||i===void 0?void 0:i.prefixUrl)!==null&&u!==void 0?u:""}else{r.prefixUrl=r.prefixUrl.toString();if(r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")){r.prefixUrl+="/"}}if(m.default.string(r.url)){if(r.url.startsWith("/")){throw new Error("`input` must not start with a slash when using `prefixUrl`")}r.url=S.default(r.prefixUrl+r.url,r)}else if(m.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol){r.url=S.default(r.prefixUrl,r)}if(r.url){if("port"in r){delete r.port}let{prefixUrl:e}=r;Object.defineProperty(r,"prefixUrl",{set:t=>{const n=r.url;if(!n.href.startsWith(t)){throw new Error(`Cannot change \`prefixUrl\` from ${e} to ${t}: ${n.href}`)}r.url=new o.URL(t+n.href.slice(e.length));e=t},get:()=>e});let{protocol:t}=r.url;if(t==="unix:"){t="http:";r.url=new o.URL(`http://unix${r.url.pathname}${r.url.search}`)}if(r.searchParams){r.url.search=r.searchParams.toString()}if(t!=="http:"&&t!=="https:"){throw new UnsupportedProtocolError(r)}if(r.username===""){r.username=r.url.username}else{r.url.username=r.username}if(r.password===""){r.password=r.url.password}else{r.url.password=r.password}}const{cookieJar:p}=r;if(p){let{setCookie:e,getCookieString:t}=p;m.assert.function_(e);m.assert.function_(t);if(e.length===4&&t.length===0){e=n.promisify(e.bind(r.cookieJar));t=n.promisify(t.bind(r.cookieJar));r.cookieJar={setCookie:e,getCookieString:t}}}const{cache:g}=r;if(g){if(!Y.has(g)){Y.set(g,new h((e,t)=>{const r=e[R](e,t);if(m.default.promise(r)){r.once=((e,t)=>{if(e==="error"){r.catch(t)}else if(e==="abort"){(async()=>{try{const e=await r;e.once("abort",t)}catch(e){}})()}else{throw new Error(`Unknown HTTP2 promise event: ${e}`)}return r})}return r},g))}}r.cacheOptions={...r.cacheOptions};if(r.dnsCache===true){if(!A){A=new f.default}r.dnsCache=A}else if(!m.default.undefined(r.dnsCache)&&!r.dnsCache.lookup){throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${m.default(r.dnsCache)}`)}if(m.default.number(r.timeout)){r.timeout={request:r.timeout}}else if(i&&r.timeout!==i.timeout){r.timeout={...i.timeout,...r.timeout}}else{r.timeout={...r.timeout}}if(!r.context){r.context={}}const v=r.hooks===(i===null||i===void 0?void 0:i.hooks);r.hooks={...r.hooks};for(const e of t.knownHookEvents){if(e in r.hooks){if(m.default.array(r.hooks[e])){r.hooks[e]=[...r.hooks[e]]}else{throw new TypeError(`Parameter \`${e}\` must be an Array, got ${m.default(r.hooks[e])}`)}}else{r.hooks[e]=[]}}if(i&&!v){for(const e of t.knownHookEvents){const t=i.hooks[e];if(t.length>0){r.hooks[e]=[...i.hooks[e],...r.hooks[e]]}}}if("family"in r){I.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"')}if(i===null||i===void 0?void 0:i.https){r.https={...i.https,...r.https}}if("rejectUnauthorized"in r){I.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){I.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){I.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){I.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){I.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){I.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){I.default('"options.pfx" was never documented, please use "options.https.pfx"')}if("followRedirects"in r){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}if(r.agent){for(const e in r.agent){if(e!=="http"&&e!=="https"&&e!=="http2"){throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${e}\``)}}}r.maxRedirects=(l=r.maxRedirects)!==null&&l!==void 0?l:0;t.setNonEnumerableProperties([i,d],r);return C.default(r,i)}_lockWrite(){const e=()=>{throw new TypeError("The payload has been already provided")};this.write=e;this.end=e}_unlockWrite(){this.write=super.write;this.end=super.end}async _finalizeBody(){const{options:e}=this;const{headers:r}=e;const n=!m.default.undefined(e.form);const s=!m.default.undefined(e.json);const a=!m.default.undefined(e.body);const c=n||s||a;const u=t.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);this._cannotHaveBody=u;if(c){if(u){throw new TypeError(`The \`${e.method}\` method cannot be used with a body`)}if([a,n,s].filter(e=>e).length>1){throw new TypeError("The `body`, `json` and `form` options are mutually exclusive")}if(a&&!(e.body instanceof i.Readable)&&!m.default.string(e.body)&&!m.default.buffer(e.body)&&!v.default(e.body)){throw new TypeError("The `body` option must be a stream.Readable, string or Buffer")}if(n&&!m.default.object(e.form)){throw new TypeError("The `form` option must be an Object")}{const t=!m.default.string(r["content-type"]);if(a){if(v.default(e.body)&&t){r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`}this[z]=e.body}else if(n){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[z]=new o.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[z]=e.stringifyJson(e.json)}const i=await g.default(this[z],e.headers);if(m.default.undefined(r["content-length"])&&m.default.undefined(r["transfer-encoding"])){if(!u&&!m.default.undefined(i)){r["content-length"]=String(i)}}}}else if(u){this._lockWrite()}else{this._unlockWrite()}this[F]=Number(r["content-length"])||undefined}async _onResponseBase(e){const{options:t}=this;const{url:r}=t;this[G]=e;if(t.decompress){e=d(e)}const n=e.statusCode;const i=e;i.statusMessage=i.statusMessage?i.statusMessage:a.STATUS_CODES[n];i.url=t.url.toString();i.requestUrl=this.requestUrl;i.redirectUrls=this.redirects;i.request=this;i.isFromCache=e.fromCache||false;i.ip=this.ip;i.retryCount=this.retryCount;this[q]=i.isFromCache;this[j]=Number(e.headers["content-length"])||undefined;this[T]=e;e.once("end",()=>{this[j]=this[L];this.emit("downloadProgress",this.downloadProgress)});e.once("error",t=>{e.destroy();this._beforeError(new ReadError(t,this))});e.once("aborted",()=>{this._beforeError(new ReadError({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))});this.emit("downloadProgress",this.downloadProgress);const s=e.headers["set-cookie"];if(m.default.object(t.cookieJar)&&s){let e=s.map(async e=>t.cookieJar.setCookie(e,r.toString()));if(t.ignoreInvalidCookies){e=e.map(async e=>e.catch(()=>{}))}try{await Promise.all(e)}catch(e){this._beforeError(e);return}}if(t.followRedirect&&e.headers.location&&X.has(n)){e.resume();if(this[R]){this[W]();delete this[R];this[N]()}const s=n===303&&t.method!=="GET"&&t.method!=="HEAD";if(s||!t.methodRewriting){t.method="GET";if("body"in t){delete t.body}if("json"in t){delete t.json}if("form"in t){delete t.form}this[z]=undefined;delete t.headers["content-length"]}if(this.redirects.length>=t.maxRedirects){this._beforeError(new MaxRedirectsError(this));return}try{const n=Buffer.from(e.headers.location,"binary").toString();const s=new o.URL(n,r);const a=s.toString();decodeURI(a);if(s.hostname!==r.hostname||s.port!==r.port){if("host"in t.headers){delete t.headers.host}if("cookie"in t.headers){delete t.headers.cookie}if("authorization"in t.headers){delete t.headers.authorization}if(t.username||t.password){t.username="";t.password=""}}else{s.username=t.username;s.password=t.password}this.redirects.push(a);t.url=s;for(const e of t.hooks.beforeRedirect){await e(t,i)}this.emit("redirect",i,t);await this._makeRequest()}catch(e){this._beforeError(e);return}return}if(t.isStream&&t.throwHttpErrors&&!O.isResponseOk(i)){this._beforeError(new HTTPError(i));return}e.on("readable",()=>{if(this[$]){this._read()}});this.on("resume",()=>{e.resume()});this.on("pause",()=>{e.pause()});e.once("end",()=>{this.push(null)});this.emit("response",e);for(const r of this[M]){if(r.headersSent){continue}for(const n in e.headers){const i=t.decompress?n!=="content-encoding":true;const s=e.headers[n];if(i){r.setHeader(n,s)}}r.statusCode=n}}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this;const{timeout:r,url:n}=t;l.default(e);this[W]=_.default(e,r,n);const i=t.cache?"cacheableResponse":"response";e.once(i,e=>{void this._onResponse(e)});e.once("error",t=>{var r;e.destroy();(r=e.res)===null||r===void 0?void 0:r.removeAllListeners("end");t=t instanceof _.TimeoutError?new TimeoutError(t,this.timings,this):new RequestError(t.message,t,this);this._beforeError(t)});this[N]=b.default(e,this,V);this[R]=e;this.emit("uploadProgress",this.uploadProgress);const s=this[z];const o=this.redirects.length===0?this:e;if(m.default.nodeStream(s)){s.pipe(o);s.once("error",e=>{this._beforeError(new UploadError(e,this))})}else{this._unlockWrite();if(!m.default.undefined(s)){this._writeRequest(s,undefined,()=>{});o.end();this._lockWrite()}else if(this._cannotHaveBody||this._noPipe){o.end();this._lockWrite()}}this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise((r,n)=>{Object.assign(t,w.default(e));delete t.url;let i;const s=Y.get(t.cache)(t,async e=>{e._readableState.autoDestroy=false;if(i){(await i).emit("cacheableResponse",e)}r(e)});t.url=e;s.once("error",n);s.once("request",async e=>{i=e;r(i)})})}async _makeRequest(){var e,t,r,n,i;const{options:s}=this;const{headers:o}=s;for(const e in o){if(m.default.undefined(o[e])){delete o[e]}else if(m.default.null_(o[e])){throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`)}}if(s.decompress&&m.default.undefined(o["accept-encoding"])){o["accept-encoding"]=J?"gzip, deflate, br":"gzip, deflate"}if(s.cookieJar){const e=await s.cookieJar.getCookieString(s.url.toString());if(m.default.nonEmptyString(e)){s.headers.cookie=e}}for(const e of s.hooks.beforeRequest){const t=await e(s);if(!m.default.undefined(t)){s.request=(()=>t);break}}if(s.body&&this[z]!==s.body){this[z]=s.body}const{agent:c,request:l,timeout:f,url:d}=s;if(s.dnsCache&&!("lookup"in s)){s.lookup=s.dnsCache.lookup}if(d.hostname==="unix"){const e=/(?.+?):(?.+)/.exec(`${d.pathname}${d.search}`);if(e===null||e===void 0?void 0:e.groups){const{socketPath:t,path:r}=e.groups;Object.assign(s,{socketPath:t,path:r,host:""})}}const y=d.protocol==="https:";let g;if(s.http2){g=p.auto}else{g=y?u.request:a.request}const v=(e=s.request)!==null&&e!==void 0?e:g;const b=s.cache?this._createCacheableRequest:v;if(c&&!s.http2){s.agent=c[y?"https":"http"]}s[R]=v;delete s.request;delete s.timeout;const _=s;_.shared=(t=s.cacheOptions)===null||t===void 0?void 0:t.shared;_.cacheHeuristic=(r=s.cacheOptions)===null||r===void 0?void 0:r.cacheHeuristic;_.immutableMinTimeToLive=(n=s.cacheOptions)===null||n===void 0?void 0:n.immutableMinTimeToLive;_.ignoreCargoCult=(i=s.cacheOptions)===null||i===void 0?void 0:i.ignoreCargoCult;if(s.dnsLookupIpVersion!==undefined){try{_.family=k.dnsLookupIpVersionToFamily(s.dnsLookupIpVersion)}catch(e){throw new Error("Invalid `dnsLookupIpVersion` option value")}}if(s.https){if("rejectUnauthorized"in s.https){_.rejectUnauthorized=s.https.rejectUnauthorized}if(s.https.checkServerIdentity){_.checkServerIdentity=s.https.checkServerIdentity}if(s.https.certificateAuthority){_.ca=s.https.certificateAuthority}if(s.https.certificate){_.cert=s.https.certificate}if(s.https.key){_.key=s.https.key}if(s.https.passphrase){_.passphrase=s.https.passphrase}if(s.https.pfx){_.pfx=s.https.pfx}}try{let e=await b(d,_);if(m.default.undefined(e)){e=g(d,_)}s.request=l;s.timeout=f;s.agent=c;if(s.https){if("rejectUnauthorized"in s.https){delete _.rejectUnauthorized}if(s.https.checkServerIdentity){delete _.checkServerIdentity}if(s.https.certificateAuthority){delete _.ca}if(s.https.certificate){delete _.cert}if(s.https.key){delete _.key}if(s.https.passphrase){delete _.passphrase}if(s.https.pfx){delete _.pfx}}if(isClientRequest(e)){this._onRequest(e)}else if(this.writable){this.once("finish",()=>{void this._onResponse(e)});this._unlockWrite();this.end();this._lockWrite()}else{void this._onResponse(e)}}catch(e){if(e instanceof h.CacheError){throw new CacheError(e,this)}throw new RequestError(e.message,e,this)}}async _error(e){try{for(const t of this.options.hooks.beforeError){e=await t(e)}}catch(t){e=new RequestError(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[H]){return}const{options:t}=this;const r=this.retryCount+1;this[H]=true;if(!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}const n=e;const{response:i}=n;void(async()=>{if(i&&!i.body){i.setEncoding(this._readableState.encoding);try{i.rawBody=await x.default(i);i.body=i.rawBody.toString()}catch(e){}}if(this.listenerCount("retry")!==0){let s;try{let e;if(i&&"retry-after"in i.headers){e=Number(i.headers["retry-after"]);if(Number.isNaN(e)){e=Date.parse(i.headers["retry-after"])-Date.now();if(e<=0){e=1}}else{e*=1e3}}s=await t.retry.calculateDelay({attemptCount:r,retryOptions:t.retry,error:n,retryAfter:e,computedValue:P.default({attemptCount:r,retryOptions:t.retry,error:n,retryAfter:e,computedValue:0})})}catch(e){void this._error(new RequestError(e.message,e,this));return}if(s){const t=async()=>{try{for(const e of this.options.hooks.beforeRetry){await e(this.options,n,r)}}catch(t){void this._error(new RequestError(t.message,e,this));return}if(this.destroyed){return}this.destroy();this.emit("retry",r,e)};this[K]=setTimeout(t,s);return}}void this._error(n)})()}_read(){this[$]=true;const e=this[T];if(e&&!this[H]){if(e.readableLength){this[$]=false}let t;while((t=e.read())!==null){this[L]+=t.length;this[U]=true;const e=this.downloadProgress;if(e.percent<1){this.emit("downloadProgress",e)}this.push(t)}}}_write(e,t,r){const n=()=>{this._writeRequest(e,t,r)};if(this.requestInitialized){n()}else{this[B].push(n)}}_writeRequest(e,t,r){if(this[R].destroyed){return}this._progressCallbacks.push(()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}});this[R].write(e,t,e=>{if(!e&&this._progressCallbacks.length>0){this._progressCallbacks.shift()()}r(e)})}_final(e){const t=()=>{while(this._progressCallbacks.length!==0){this._progressCallbacks.shift()()}if(!(R in this)){e();return}if(this[R].destroyed){e();return}this[R].end(t=>{if(!t){this[F]=this[D];this.emit("uploadProgress",this.uploadProgress);this[R].emit("upload-complete")}e(t)})};if(this.requestInitialized){t()}else{this[B].push(t)}}_destroy(e,t){var r;this[H]=true;clearTimeout(this[K]);if(R in this){this[W]();if(!((r=this[T])===null||r===void 0?void 0:r.complete)){this[R].destroy()}}if(e!==null&&!m.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[H]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,t,r;return((t=(e=this[R])===null||e===void 0?void 0:e.destroyed)!==null&&t!==void 0?t:this.destroyed)&&!((r=this[G])===null||r===void 0?void 0:r.complete)}get socket(){var e,t;return(t=(e=this[R])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[j]){e=this[L]/this[j]}else if(this[j]===this[L]){e=1}else{e=0}return{percent:e,transferred:this[L],total:this[j]}}get uploadProgress(){let e;if(this[F]){e=this[D]/this[F]}else if(this[F]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[F]}}get timings(){var e;return(e=this[R])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[q]}pipe(e,t){if(this[U]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[M].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[M].delete(e)}super.unpipe(e);return this}}t.default=Request},4993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const r={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=(e=>{return e in r});t.dnsLookupIpVersionToFamily=(e=>{if(t.isDnsLookupIpVersion(e)){return r[e]}throw new Error("Invalid DNS lookup IP version")})},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5747);const i=r(1669);const s=r(7678);const o=r(40);const a=i.promisify(n.stat);t.default=(async(e,t)=>{if(t&&"content-length"in t){return Number(t["content-length"])}if(!e){return 0}if(s.default.string(e)){return Buffer.byteLength(e)}if(s.default.buffer(e)){return e.length}if(o.default(e)){return i.promisify(e.getLength.bind(e))()}if(e instanceof n.ReadStream){const{size:t}=await a(e.path);if(t===0){return undefined}return t}return undefined})},4500:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=async e=>{const t=[];let r=0;for await(const n of e){t.push(n);r+=Buffer.byteLength(n)}if(Buffer.isBuffer(t[0])){return Buffer.concat(t,r)}return Buffer.from(t.join(""))};t.default=r},40:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7678);t.default=(e=>n.default.nodeStream(e)&&n.default.function_(e.getBoundary))},9298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isResponseOk=void 0;t.isResponseOk=(e=>{const{statusCode:t}=e;const r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||t===304})},9219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8835);const i=["protocol","host","hostname","port","pathname","search"];t.default=((e,t)=>{var r,s;if(t.path){if(t.pathname){throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.")}if(t.search){throw new TypeError("Parameters `path` and `search` are mutually exclusive.")}if(t.searchParams){throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}}if(t.search&&t.searchParams){throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.")}if(!e){if(!t.protocol){throw new TypeError("No URL protocol specified")}e=`${t.protocol}//${(s=(r=t.hostname)!==null&&r!==void 0?r:t.host)!==null&&s!==void 0?s:""}`}const o=new n.URL(e);if(t.path){const e=t.path.indexOf("?");if(e===-1){t.pathname=t.path}else{t.pathname=t.path.slice(0,e);t.search=t.path.slice(e+1)}delete t.path}for(const e of i){if(t[e]){o[e]=t[e].toString()}}return o})},3021:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function default_1(e,t,r){const n={};for(const i of r){n[i]=((...e)=>{t.emit(i,...e)});e.on(i,n[i])}return()=>{for(const t of r){e.off(t,n[t])}}}t.default=default_1},2454:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TimeoutError=void 0;const n=r(1631);const i=r(1593);const s=Symbol("reentry");const o=()=>{};class TimeoutError extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`);this.event=t;this.name="TimeoutError";this.code="ETIMEDOUT"}}t.TimeoutError=TimeoutError;t.default=((e,t,r)=>{if(s in e){return o}e[s]=true;const a=[];const{once:c,unhandleAll:u}=i.default();const l=(e,t,r)=>{var n;const i=setTimeout(t,e,e,r);(n=i.unref)===null||n===void 0?void 0:n.call(i);const s=()=>{clearTimeout(i)};a.push(s);return s};const{host:f,hostname:h}=r;const d=(t,r)=>{e.destroy(new TimeoutError(t,r))};const p=()=>{for(const e of a){e()}u()};e.once("error",t=>{p();if(e.listenerCount("error")===0){throw t}});e.once("close",p);c(e,"response",e=>{c(e,"end",p)});if(typeof t.request!=="undefined"){l(t.request,d,"request")}if(typeof t.socket!=="undefined"){const r=()=>{d(t.socket,"socket")};e.setTimeout(t.socket,r);a.push(()=>{e.removeListener("timeout",r)})}c(e,"socket",i=>{var s;const{socketPath:o}=e;if(i.connecting){const e=Boolean(o!==null&&o!==void 0?o:n.isIP((s=h!==null&&h!==void 0?h:f)!==null&&s!==void 0?s:"")!==0);if(typeof t.lookup!=="undefined"&&!e&&typeof i.address().address==="undefined"){const e=l(t.lookup,d,"lookup");c(i,"lookup",e)}if(typeof t.connect!=="undefined"){const r=()=>l(t.connect,d,"connect");if(e){c(i,"connect",r())}else{c(i,"lookup",e=>{if(e===null){c(i,"connect",r())}})}}if(typeof t.secureConnect!=="undefined"&&r.protocol==="https:"){c(i,"connect",()=>{const e=l(t.secureConnect,d,"secureConnect");c(i,"secureConnect",e)})}}if(typeof t.send!=="undefined"){const r=()=>l(t.send,d,"send");if(i.connecting){c(i,"connect",()=>{c(e,"upload-complete",r())})}else{c(e,"upload-complete",r())}}});if(typeof t.response!=="undefined"){c(e,"upload-complete",()=>{const r=l(t.response,d,"response");c(e,"response",r)})}return p})},1593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=(()=>{const e=[];return{once(t,r,n){t.once(r,n);e.push({origin:t,event:r,fn:n})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:n}=t;e.removeListener(r,n)}e.length=0}}})},8026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7678);t.default=(e=>{e=e;const t={protocol:e.protocol,hostname:n.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(n.default.string(e.port)&&e.port.length>0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t})},7288:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class WeakableMap{constructor(){this.weakMap=new WeakMap;this.map=new Map}set(e,t){if(typeof e==="object"){this.weakMap.set(e,t)}else{this.map.set(e,t)}}get(e){if(typeof e==="object"){return this.weakMap.get(e)}return this.map.get(e)}has(e){if(typeof e==="object"){return this.weakMap.has(e)}return this.map.has(e)}}t.default=WeakableMap},4337:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});t.defaultHandler=void 0;const s=r(7678);const o=r(6056);const a=r(6457);const c=r(94);const u=r(285);const l={RequestError:o.RequestError,CacheError:o.CacheError,ReadError:o.ReadError,HTTPError:o.HTTPError,MaxRedirectsError:o.MaxRedirectsError,TimeoutError:o.TimeoutError,ParseError:o.ParseError,CancelError:o.CancelError,UnsupportedProtocolError:o.UnsupportedProtocolError,UploadError:o.UploadError};const f=async e=>new Promise(t=>{setTimeout(t,e)});const{normalizeArguments:h}=c.default;const d=(...e)=>{let t;for(const r of e){t=h(undefined,r,t)}return t};const p=e=>e.isStream?new c.default(undefined,e):o.default(e);const y=e=>"defaults"in e&&"options"in e.defaults;const m=["get","post","put","patch","head","delete"];t.defaultHandler=((e,t)=>t(e));const g=(e,t)=>{if(e){for(const r of e){r(t)}}};const v=e=>{e._rawHandlers=e.handlers;e.handlers=e.handlers.map(e=>(t,r)=>{let n;const i=e(t,e=>{n=r(e);return n});if(i!==n&&!t.isStream&&n){const e=i;const{then:t,catch:r,finally:s}=e;Object.setPrototypeOf(e,Object.getPrototypeOf(n));Object.defineProperties(e,Object.getOwnPropertyDescriptors(n));e.then=t;e.catch=r;e.finally=s}return i});const r=(t,r={},n)=>{var i,u;let l=0;const f=t=>{return e.handlers[l++](t,l===e.handlers.length?p:f)};if(s.default.plainObject(t)){const e={...t,...r};c.setNonEnumerableProperties([t,r],e);r=e;t=undefined}try{let s;try{g(e.options.hooks.init,r);g((i=r.hooks)===null||i===void 0?void 0:i.init,r)}catch(e){s=e}const l=h(t,r,n!==null&&n!==void 0?n:e.options);l[c.kIsNormalizedAlready]=true;if(s){throw new o.RequestError(s.message,s,l)}return f(l)}catch(t){if(r.isStream){throw t}else{return a.default(t,e.options.hooks.beforeError,(u=r.hooks)===null||u===void 0?void 0:u.beforeError)}}};r.extend=((...r)=>{const n=[e.options];let i=[...e._rawHandlers];let s;for(const e of r){if(y(e)){n.push(e.defaults.options);i.push(...e.defaults._rawHandlers);s=e.defaults.mutableDefaults}else{n.push(e);if("handlers"in e){i.push(...e.handlers)}s=e.mutableDefaults}}i=i.filter(e=>e!==t.defaultHandler);if(i.length===0){i.push(t.defaultHandler)}return v({options:d(...n),handlers:i,mutableDefaults:Boolean(s)})});const n=async function*(t,n){let i=h(t,n,e.options);i.resolveBodyOnly=false;const o=i.pagination;if(!s.default.object(o)){throw new TypeError("`options.pagination` must be implemented")}const a=[];let{countLimit:c}=o;let u=0;while(u{const r=[];for await(const i of n(e,t)){r.push(i)}return r});r.paginate.each=n;r.stream=((e,t)=>r(e,{...t,isStream:true}));for(const e of m){r[e]=((t,n)=>r(t,{...n,method:e}));r.stream[e]=((t,n)=>{return r(t,{...n,method:e,isStream:true})})}Object.assign(r,l);Object.defineProperty(r,"defaults",{value:e.mutableDefaults?e:u.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:true});r.mergeOptions=d;return r};t.default=v;i(r(2613),t)},3061:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});const s=r(8835);const o=r(4337);const a={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:undefined,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:undefined,dnsCache:undefined,decompress:true,throwHttpErrors:true,followRedirect:true,isStream:false,responseType:"text",resolveBodyOnly:false,maxRedirects:10,prefixUrl:"",methodRewriting:true,ignoreInvalidCookies:false,context:{},http2:false,allowGetBody:false,https:undefined,pagination:{transform:e=>{if(e.request.options.responseType==="json"){return e.body}return JSON.parse(e.body)},paginate:e=>{if(!Reflect.has(e.headers,"link")){return false}const t=e.headers.link.split(",");let r;for(const e of t){const t=e.split(";");if(t[1].includes("next")){r=t[0].trimStart().trim();r=r.slice(1,-1);break}}if(r){const e={url:new s.URL(r)};return e}return false},filter:()=>true,shouldContinue:()=>true,countLimit:Infinity,backoff:0,requestLimit:1e4,stackAllItems:true},parseJson:e=>JSON.parse(e),stringifyJson:e=>JSON.stringify(e),cacheOptions:{}},handlers:[o.defaultHandler],mutableDefaults:false};const c=o.default(a);t.default=c;e.exports=c;e.exports.default=c;e.exports.__esModule=true;i(r(4337),t);i(r(6056),t)},2613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7678);function deepFreeze(e){for(const t of Object.values(e)){if(n.default.plainObject(t)||n.default.array(t)){deepFreeze(t)}}return Object.freeze(e)}t.default=deepFreeze},397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new Set;t.default=(e=>{if(r.has(e)){return}r.add(e);process.emitWarning(`Got: ${e}`,{type:"DeprecationWarning"})})},7356:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))});return r}},7758:(e,t,r)=>{var n=r(5747);var i=r(263);var s=r(3086);var o=r(7356);var a=r(1669);var c;var u;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){c=Symbol.for("graceful-fs.queue");u=Symbol.for("graceful-fs.previous")}else{c="___graceful-fs.queue";u="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var l=noop;if(a.debuglog)l=a.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))l=function(){var e=a.format.apply(a,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!n[c]){var f=global[c]||[];publishQueue(n,f);n.close=function(e){function close(t,r){return e.call(n,t,function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)})}Object.defineProperty(close,u,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);resetQueue()}Object.defineProperty(closeSync,u,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){l(n[c]);r(2357).equal(n[c].length,0)})}}if(!global[c]){publishQueue(global,n[c])}e.exports=patch(o(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n,i){return t(e,r,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n],t,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}})}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i,s){return r(e,t,n,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i],r,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}})}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i,s){return n(e,t,r,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i],n,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}})}}var o=e.copyFile;if(o)e.copyFile=copyFile;function copyFile(e,t,r,n){if(typeof r==="function"){n=r;r=0}return go$copyFile(e,t,r,n);function go$copyFile(e,t,r,n,i){return o(e,t,r,function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}})}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;return go$readdir(e,t,r);function go$readdir(e,t,r,n){return a(e,t,function(i,s){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$readdir,[e,t,r],i,n||Date.now(),Date.now()]);else{if(s&&s.sort)s.sort();if(typeof r==="function")r.call(this,i,s)}})}}if(process.version.substr(0,4)==="v0.8"){var c=s(e);ReadStream=c.ReadStream;WriteStream=c.WriteStream}var u=e.ReadStream;if(u){ReadStream.prototype=Object.create(u.prototype);ReadStream.prototype.open=ReadStream$open}var l=e.WriteStream;if(l){WriteStream.prototype=Object.create(l.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:true,configurable:true});var h=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return h},set:function(e){h=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return u.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}})}function WriteStream(e,t){if(this instanceof WriteStream)return l.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}})}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var d=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n,i){return d(e,t,r,function(s,o){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$open,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}})}}return e}function enqueue(e){l("ENQUEUE",e[0].name,e[1]);n[c].push(e);retry()}var h;function resetQueue(){var e=Date.now();for(var t=0;t2){n[c][t][3]=e;n[c][t][4]=e}}retry()}function retry(){clearTimeout(h);h=undefined;if(n[c].length===0)return;var e=n[c].shift();var t=e[0];var r=e[1];var i=e[2];var s=e[3];var o=e[4];if(s===undefined){l("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-s>=6e4){l("TIMEOUT",t.name,r);var a=r.pop();if(typeof a==="function")a.call(null,i)}else{var u=Date.now()-o;var f=Math.max(o-s,1);var d=Math.min(f*1.2,100);if(u>=d){l("RETRY",t.name,r);t.apply(null,r.concat([s]))}else{n[c].push(e)}}if(h===undefined){h=setTimeout(retry,0)}}},3086:(e,t,r)=>{var n=r(2413).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var s=Object.keys(r);for(var o=0,a=s.length;othis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()})}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var s=0,o=i.length;s= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(e,t,r)=>{var n=r(7619);var i=process.cwd;var s=null;var o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=i.call(process);return s};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var a=process.chdir;process.chdir=function(e){s=null;a.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,a)}e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(o==="win32"){e.rename=function(t){return function(r,n,i){var s=Date.now();var o=0;t(r,n,function CB(a){if(a&&(a.code==="EACCES"||a.code==="EPERM")&&Date.now()-s<6e4){setTimeout(function(){e.stat(n,function(e,s){if(e&&e.code==="ENOENT")t(r,n,CB);else i(a)})},o);if(o<100)o+=10;return}if(i)i(a)})}}(e.rename)}e.read=function(t){function read(r,n,i,s,o,a){var c;if(a&&typeof a==="function"){var u=0;c=function(l,f,h){if(l&&l.code==="EAGAIN"&&u<10){u++;return t.call(e,r,n,i,s,o,c)}a.apply(this,arguments)}}return t.call(e,r,n,i,s,o,c)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=function(t){return function(r,n,i,s,o){var a=0;while(true){try{return t.call(e,r,n,i,s,o)}catch(e){if(e.code==="EAGAIN"&&a<10){a++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){if(i)i(t||e)})})})};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var s=true;var o;try{o=e.fchmodSync(i,r);s=false}finally{if(s){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return o}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,function(t,n){if(t){if(s)s(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){if(s)s(t||e)})})})};e.lutimesSync=function(t,r,i){var s=e.openSync(t,n.O_SYMLINK);var o;var a=true;try{o=e.futimesSync(s,r,i);a=false}finally{if(a){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return o}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,s){return t.call(e,r,n,i,function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296;return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},1002:e=>{"use strict";const t=new Set([200,203,204,206,300,301,404,405,410,414,501]);const r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]);const n=new Set([500,502,503,504]);const i={date:true,connection:true,"keep-alive":true,"proxy-authenticate":true,"proxy-authorization":true,te:true,trailer:true,"transfer-encoding":true,upgrade:true};const s={"content-length":true,"content-encoding":true,"transfer-encoding":true,"content-range":true};function toNumberOrZero(e){const t=parseInt(e,10);return isFinite(t)?t:0}function isErrorResponse(e){if(!e){return true}return n.has(e.status)}function parseCacheControl(e){const t={};if(!e)return t;const r=e.trim().split(/\s*,\s*/);for(const e of r){const[r,n]=e.split(/\s*=\s*/,2);t[r]=n===undefined?true:n.replace(/^"|"$/g,"")}return t}function formatCacheControl(e){let t=[];for(const r in e){const n=e[r];t.push(n===true?r:r+"="+n)}if(!t.length){return undefined}return t.join(", ")}e.exports=class CachePolicy{constructor(e,t,{shared:r,cacheHeuristic:n,immutableMinTimeToLive:i,ignoreCargoCult:s,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!t||!t.headers){throw Error("Response headers missing")}this._assertRequestHasHeaders(e);this._responseTime=this.now();this._isShared=r!==false;this._cacheHeuristic=undefined!==n?n:.1;this._immutableMinTtl=undefined!==i?i:24*3600*1e3;this._status="status"in t?t.status:200;this._resHeaders=t.headers;this._rescc=parseCacheControl(t.headers["cache-control"]);this._method="method"in e?e.method:"GET";this._url=e.url;this._host=e.headers.host;this._noAuthorization=!e.headers.authorization;this._reqHeaders=t.headers.vary?e.headers:null;this._reqcc=parseCacheControl(e.headers["cache-control"]);if(s&&"pre-check"in this._rescc&&"post-check"in this._rescc){delete this._rescc["pre-check"];delete this._rescc["post-check"];delete this._rescc["no-cache"];delete this._rescc["no-store"];delete this._rescc["must-revalidate"];this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":formatCacheControl(this._rescc)});delete this._resHeaders.expires;delete this._resHeaders.pragma}if(t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)){this._rescc["no-cache"]=true}}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())&&r.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers){throw Error("Request headers missing")}}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=parseCacheControl(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma)){return false}if(t["max-age"]&&this.age()>t["max-age"]){return false}if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]){return false}if(this.stale()){const e=t["max-stale"]&&!this._rescc["must-revalidate"]&&(true===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge());if(!e){return false}}return this._requestMatches(e,false)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary){return true}if(this._resHeaders.vary==="*"){return false}const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t){if(e.headers[r]!==this._reqHeaders[r])return false}return true}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e){if(i[r])continue;t[r]=e[r]}if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r){delete t[e]}}if(t.warning){const e=t.warning.split(/,/).filter(e=>{return!/^\s*1[0-9][0-9]/.test(e)});if(!e.length){delete t.warning}else{t.warning=e.join(",").trim()}}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders);const t=this.age();if(t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24){e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'}e.age=`${Math.round(t)}`;e.date=new Date(this.now()).toUTCString();return e}date(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){return e}return this._responseTime}age(){let e=this._ageValue();const t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return toNumberOrZero(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]){return 0}if(this._isShared&&(this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)){return 0}if(this._resHeaders.vary==="*"){return 0}if(this._isShared){if(this._rescc["proxy-revalidate"]){return 0}if(this._rescc["s-maxage"]){return toNumberOrZero(this._rescc["s-maxage"])}}if(this._rescc["max-age"]){return toNumberOrZero(this._rescc["max-age"])}const e=this._rescc.immutable?this._immutableMinTtl:0;const t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);if(Number.isNaN(r)||rr){return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}}return e}timeToLive(){const e=this.maxAge()-this.age();const t=e+toNumberOrZero(this._rescc["stale-if-error"]);const r=e+toNumberOrZero(this._rescc["stale-while-revalidate"]);return Math.max(0,e,t,r)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+toNumberOrZero(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+toNumberOrZero(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(undefined,undefined,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t;this._isShared=e.sh;this._cacheHeuristic=e.ch;this._immutableMinTtl=e.imm!==undefined?e.imm:24*3600*1e3;this._status=e.st;this._resHeaders=e.resh;this._rescc=e.rescc;this._method=e.m;this._url=e.u;this._host=e.h;this._noAuthorization=e.a;this._reqHeaders=e.reqh;this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);delete t["if-range"];if(!this._requestMatches(e,true)||!this.storable()){delete t["if-none-match"];delete t["if-modified-since"];return t}if(this._resHeaders.etag){t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag}const r=t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET";if(r){delete t["if-modified-since"];if(t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter(e=>{return!/^\s*W\//.test(e)});if(!e.length){delete t["if-none-match"]}else{t["if-none-match"]=e.join(",").trim()}}}else if(this._resHeaders["last-modified"]&&!t["if-modified-since"]){t["if-modified-since"]=this._resHeaders["last-modified"]}return t}revalidatedPolicy(e,t){this._assertRequestHasHeaders(e);if(this._useStaleIfError()&&isErrorResponse(t)){return{modified:false,matches:false,policy:this}}if(!t||!t.headers){throw Error("Response headers missing")}let r=false;if(t.status!==undefined&&t.status!=304){r=false}else if(t.headers.etag&&!/^\s*W\//.test(t.headers.etag)){r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag}else if(this._resHeaders.etag&&t.headers.etag){r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,"")}else if(this._resHeaders["last-modified"]){r=this._resHeaders["last-modified"]===t.headers["last-modified"]}else{if(!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]){r=true}}if(!r){return{policy:new this.constructor(e,t),modified:t.status!=304,matches:false}}const n={};for(const e in this._resHeaders){n[e]=e in t.headers&&!s[e]?t.headers[e]:this._resHeaders[e]}const i=Object.assign({},t,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,i,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:false,matches:true}}}},9898:(e,t,r)=>{"use strict";const n=r(8614);const i=r(4016);const s=r(7565);const o=r(9273);const a=Symbol("currentStreamsCount");const c=Symbol("request");const u=Symbol("cachedOriginSet");const l=Symbol("gracefullyClosing");const f=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"];const h=(e,t,r)=>{let n=0;let i=e.length;while(n>>1;if(r(e[s],t)){n=s+1}else{i=s}}return n};const d=(e,t)=>{return e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams};const p=(e,t)=>{for(const r of e){if(r[u].lengtht[u].includes(e))&&r[a]+t[a]<=t.remoteSettings.maxConcurrentStreams){g(r)}}};const y=(e,t)=>{for(const r of e){if(t[u].lengthr[u].includes(e))&&t[a]+r[a]<=r.remoteSettings.maxConcurrentStreams){g(t)}}};const m=({agent:e,isFree:t})=>{const r={};for(const n in e.sessions){const i=e.sessions[n];const s=i.filter(e=>{const r=e[Agent.kCurrentStreamsCount]{e[l]=true;if(e[a]===0){e.close()}};class Agent extends n{constructor({timeout:e=6e4,maxSessions:t=Infinity,maxFreeSessions:r=10,maxCachedTlsSessions:n=100}={}){super();this.sessions={};this.queue={};this.timeout=e;this.maxSessions=t;this.maxFreeSessions=r;this._freeSessionsCount=0;this._sessionsCount=0;this.settings={enablePush:false};this.tlsSessionCache=new o({maxSize:n})}static normalizeOrigin(e,t){if(typeof e==="string"){e=new URL(e)}if(t&&e.hostname!==t){e.hostname=t}return e.origin}normalizeOptions(e){let t="";if(e){for(const r of f){if(e[r]){t+=`:${e[r]}`}}}return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e])){return}const r=this.queue[e][t];if(this._sessionsCount{if(Array.isArray(r)){r=[...r];n()}else{r=[{resolve:n,reject:i}]}const o=this.normalizeOptions(t);const f=Agent.normalizeOrigin(e,t&&t.servername);if(f===undefined){for(const{reject:e}of r){e(new TypeError("The `origin` argument needs to be a string or an URL object"))}return}if(o in this.sessions){const e=this.sessions[o];let t=-1;let n=-1;let i;for(const r of e){const e=r.remoteSettings.maxConcurrentStreams;if(e=e||r[l]||r.destroyed){continue}if(!i){t=e}if(s>n){i=r;n=s}}}if(i){if(r.length!==1){for(const{reject:e}of r){const t=new Error(`Expected the length of listeners to be 1, got ${r.length}.\n`+"Please report this to https://github.com/szmarczak/http2-wrapper/");e(t)}return}r[0].resolve(i);return}}if(o in this.queue){if(f in this.queue[o]){this.queue[o][f].listeners.push(...r);this._tryToCreateNewSession(o,f);return}}else{this.queue[o]={}}const m=()=>{if(o in this.queue&&this.queue[o][f]===g){delete this.queue[o][f];if(Object.keys(this.queue[o]).length===0){delete this.queue[o]}}};const g=()=>{const n=`${f}:${o}`;let i=false;try{const v=s.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(n),...t});v[a]=0;v[l]=false;const b=()=>v[a]{this.tlsSessionCache.set(n,e)});v.once("error",e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(n)});v.setTimeout(this.timeout,()=>{v.destroy()});v.once("close",()=>{if(i){if(_){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[o];e.splice(e.indexOf(v),1);if(e.length===0){delete this.sessions[o]}}else{const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:t}of r){t(e)}m()}this._tryToCreateNewSession(o,f)});const w=()=>{if(!(o in this.queue)||!b()){return}for(const e of v[u]){if(e in this.queue[o]){const{listeners:t}=this.queue[o][e];while(t.length!==0&&b()){t.shift().resolve(v)}const r=this.queue[o];if(r[e].listeners.length===0){delete r[e];if(Object.keys(r).length===0){delete this.queue[o];break}}if(!b()){break}}}};v.on("origin",()=>{v[u]=v.originSet;if(!b()){return}w();p(this.sessions[o],v)});v.once("remoteSettings",()=>{v.ref();v.unref();this._sessionsCount++;if(g.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}v.destroy();return}v[u]=v.originSet;{const e=this.sessions;if(o in e){const t=e[o];t.splice(h(t,v,d),0,v)}else{e[o]=[v]}}this._freeSessionsCount+=1;i=true;this.emit("session",v);w();m();if(v[a]===0&&this._freeSessionsCount>this.maxFreeSessions){v.close()}if(r.length!==0){this.getSession(f,t,r);r.length=0}v.on("remoteSettings",()=>{w();p(this.sessions[o],v)})});v[c]=v.request;v.request=((e,t)=>{if(v[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=v[c](e,t);v.ref();++v[a];if(v[a]===v.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",()=>{_=b();--v[a];if(!v.destroyed&&!v.closed){y(this.sessions[o],v);if(b()&&!v.closed){if(!_){this._freeSessionsCount++;_=true}const e=v[a]===0;if(e){v.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||v[l])){v.close()}else{p(this.sessions[o],v);w()}}}});return r})}catch(e){for(const t of r){t.reject(e)}m()}};g.listeners=r;g.completed=false;g.destroyed=false;this.queue[o][f]=g;this._tryToCreateNewSession(o,f)})}request(e,t,r,n){return new Promise((i,s)=>{this.getSession(e,t,[{reject:s,resolve:e=>{try{i(e.request(r,n))}catch(e){s(e)}}}])})}createConnection(e,t){return Agent.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443;const n=e.hostname||e.host;if(typeof t.servername==="undefined"){t.servername=n}return i.connect(r,n,t)}closeFreeSessions(){for(const e of Object.values(this.sessions)){for(const t of e){if(t[a]===0){t.close()}}}}destroy(e){for(const t of Object.values(this.sessions)){for(const r of t){r.destroy(e)}}for(const e of Object.values(this.queue)){for(const t of Object.values(e)){t.destroyed=true}}this.queue={}}get freeSessions(){return m({agent:this,isFree:true})}get busySessions(){return m({agent:this,isFree:false})}}Agent.kCurrentStreamsCount=a;Agent.kGracefullyClosing=l;e.exports={Agent:Agent,globalAgent:new Agent}},7167:(e,t,r)=>{"use strict";const n=r(8605);const i=r(7211);const s=r(6624);const o=r(9273);const a=r(9632);const c=r(1982);const u=r(2686);const l=new o({maxSize:100});const f=new Map;const h=(e,t,r)=>{t._httpMessage={shouldKeepAlive:true};const n=()=>{e.emit("free",t,r)};t.on("free",n);const i=()=>{e.removeSocket(t,r)};t.on("close",i);const s=()=>{e.removeSocket(t,r);t.off("close",i);t.off("free",n);t.off("agentRemove",s)};t.on("agentRemove",s);e.emit("free",t,r)};const d=async e=>{const t=`${e.host}:${e.port}:${e.ALPNProtocols.sort()}`;if(!l.has(t)){if(f.has(t)){const e=await f.get(t);return e.alpnProtocol}const{path:r,agent:n}=e;e.path=e.socketPath;const o=s(e);f.set(t,o);try{const{socket:s,alpnProtocol:a}=await o;l.set(t,a);e.path=r;if(a==="h2"){s.destroy()}else{const{globalAgent:t}=i;const r=i.Agent.prototype.createConnection;if(n){if(n.createConnection===r){h(n,s,e)}else{s.destroy()}}else if(t.createConnection===r){h(t,s,e)}else{s.destroy()}}f.delete(t);return a}catch(e){f.delete(t);throw e}}return l.get(t)};e.exports=(async(e,t,r)=>{if(typeof e==="string"||e instanceof URL){e=u(new URL(e))}if(typeof t==="function"){r=t;t=undefined}t={ALPNProtocols:["h2","http/1.1"],...e,...t,resolveSocket:true};if(!Array.isArray(t.ALPNProtocols)||t.ALPNProtocols.length===0){throw new Error("The `ALPNProtocols` option must be an Array with at least one entry")}t.protocol=t.protocol||"https:";const s=t.protocol==="https:";t.host=t.hostname||t.host||"localhost";t.session=t.tlsSession;t.servername=t.servername||c(t);t.port=t.port||(s?443:80);t._defaultAgent=s?i.globalAgent:n.globalAgent;const o=t.agent;if(o){if(o.addRequest){throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties")}t.agent=o[s?"https":"http"]}if(s){const e=await d(t);if(e==="h2"){if(o){t.agent=o.http2}return new a(t,r)}}return n.request(t,r)});e.exports.protocolCache=l},9632:(e,t,r)=>{"use strict";const n=r(7565);const{Writable:i}=r(2413);const{Agent:s,globalAgent:o}=r(9898);const a=r(2575);const c=r(2686);const u=r(1818);const l=r(1199);const{ERR_INVALID_ARG_TYPE:f,ERR_INVALID_PROTOCOL:h,ERR_HTTP_HEADERS_SENT:d,ERR_INVALID_HTTP_TOKEN:p,ERR_HTTP_INVALID_HEADER_VALUE:y,ERR_INVALID_CHAR:m}=r(7087);const{HTTP2_HEADER_STATUS:g,HTTP2_HEADER_METHOD:v,HTTP2_HEADER_PATH:b,HTTP2_METHOD_CONNECT:_}=n.constants;const w=Symbol("headers");const S=Symbol("origin");const E=Symbol("session");const x=Symbol("options");const k=Symbol("flushedHeaders");const O=Symbol("jobs");const I=/^[\^`\-\w!#$%&*+.|~]+$/;const C=/[^\t\u0020-\u007E\u0080-\u00FF]/;class ClientRequest extends i{constructor(e,t,r){super({autoDestroy:false});const n=typeof e==="string"||e instanceof URL;if(n){e=c(e instanceof URL?e:new URL(e))}if(typeof t==="function"||t===undefined){r=t;t=n?e:{...e}}else{t={...e,...t}}if(t.h2session){this[E]=t.h2session}else if(t.agent===false){this.agent=new s({maxFreeSessions:0})}else if(typeof t.agent==="undefined"||t.agent===null){if(typeof t.createConnection==="function"){this.agent=new s({maxFreeSessions:0});this.agent.createConnection=t.createConnection}else{this.agent=o}}else if(typeof t.agent.request==="function"){this.agent=t.agent}else{throw new f("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(t.protocol,"https:")}const i=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443;const a=t.hostname||t.host||"localhost";delete t.hostname;delete t.host;delete t.port;const{timeout:u}=t;t.timeout=undefined;this[w]=Object.create(null);this[O]=[];this.socket=null;this.connection=null;this.method=t.method||"GET";this.path=t.path;this.res=null;this.aborted=false;this.reusedSocket=false;if(t.headers){for(const[e,r]of Object.entries(t.headers)){this.setHeader(e,r)}}if(t.auth&&!("authorization"in this[w])){this[w].authorization="Basic "+Buffer.from(t.auth).toString("base64")}t.session=t.tlsSession;t.path=t.socketPath;this[x]=t;if(i===443){this[S]=`https://${a}`;if(!(":authority"in this[w])){this[w][":authority"]=a}}else{this[S]=`https://${a}:${i}`;if(!(":authority"in this[w])){this[w][":authority"]=`${a}:${i}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[k]=false}get method(){return this[w][v]}set method(e){if(e){this[w][v]=e.toUpperCase()}}get path(){return this[w][b]}set path(e){if(e){this[w][b]=e}}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,t,r){if(this._mustNotHaveABody){r(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const n=()=>this._request.write(e,t,r);if(this._request){n()}else{this[O].push(n)}}_final(e){if(this.destroyed){return}this.flushHeaders();const t=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};if(this._request){t()}else{this[O].push(t)}}abort(){if(this.res&&this.res.complete){return}if(!this.aborted){process.nextTick(()=>this.emit("abort"))}this.aborted=true;this.destroy()}_destroy(e,t){if(this.res){this.res._dump()}if(this._request){this._request.destroy()}t(e)}async flushHeaders(){if(this[k]||this.destroyed){return}this[k]=true;const e=this.method===_;const t=t=>{this._request=t;if(this.destroyed){t.destroy();return}if(!e){u(t,this,["timeout","continue","close","error"])}const r=e=>{return(...t)=>{if(!this.writable&&!this.destroyed){e(...t)}else{this.once("finish",()=>{e(...t)})}}};t.once("response",r((r,n,i)=>{const s=new a(this.socket,t.readableHighWaterMark);this.res=s;s.req=this;s.statusCode=r[g];s.headers=r;s.rawHeaders=i;s.once("end",()=>{if(this.aborted){s.aborted=true;s.emit("aborted")}else{s.complete=true;s.socket=null;s.connection=null}});if(e){s.upgrade=true;if(this.emit("connect",s,t,Buffer.alloc(0))){this.emit("close")}else{t.destroy()}}else{t.on("data",e=>{if(!s._dumped&&!s.push(e)){t.pause()}});t.once("end",()=>{s.push(null)});if(!this.emit("response",s)){s._dump()}}}));t.once("headers",r(e=>this.emit("information",{statusCode:e[g]})));t.once("trailers",r((e,t,r)=>{const{res:n}=this;n.trailers=e;n.rawTrailers=r}));const{socket:n}=t.session;this.socket=n;this.connection=n;for(const e of this[O]){e()}this.emit("socket",this.socket)};if(this[E]){try{t(this[E].request(this[w]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{t(await this.agent.request(this[S],this[x],this[w]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new f("name","string",e)}return this[w][e.toLowerCase()]}get headersSent(){return this[k]}removeHeader(e){if(typeof e!=="string"){throw new f("name","string",e)}if(this.headersSent){throw new d("remove")}delete this[w][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new d("set")}if(typeof e!=="string"||!I.test(e)&&!l(e)){throw new p("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(C.test(t)){throw new m("header content",e)}this[w][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const r=()=>this._request.setTimeout(e,t);if(this._request){r()}else{this[O].push(r)}return this}get maxHeadersCount(){if(!this.destroyed&&this._request){return this._request.session.localSettings.maxHeaderListSize}return undefined}set maxHeadersCount(e){}}e.exports=ClientRequest},2575:(e,t,r)=>{"use strict";const{Readable:n}=r(2413);class IncomingMessage extends n{constructor(e,t){super({highWaterMark:t,autoDestroy:false});this.statusCode=null;this.statusMessage="";this.httpVersion="2.0";this.httpVersionMajor=2;this.httpVersionMinor=0;this.headers={};this.trailers={};this.req=null;this.aborted=false;this.complete=false;this.upgrade=null;this.rawHeaders=[];this.rawTrailers=[];this.socket=e;this.connection=e;this._dumped=false}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){this.req.setTimeout(e,t);return this}_dump(){if(!this._dumped){this._dumped=true;this.removeAllListeners("data");this.resume()}}_read(){if(this.req){this.req._request.resume()}}}e.exports=IncomingMessage},4645:(e,t,r)=>{"use strict";const n=r(7565);const i=r(9898);const s=r(9632);const o=r(2575);const a=r(7167);const c=(e,t,r)=>{return new s(e,t,r)};const u=(e,t,r)=>{const n=new s(e,t,r);n.end();return n};e.exports={...n,ClientRequest:s,IncomingMessage:o,...i,request:c,get:u,auto:a}},1982:(e,t,r)=>{"use strict";const n=r(1631);e.exports=(e=>{let t=e.host;const r=e.headers&&e.headers.host;if(r){if(r.startsWith("[")){const e=r.indexOf("]");if(e===-1){t=r}else{t=r.slice(1,-1)}}else{t=r.split(":",1)[0]}}if(n.isIP(t)){return""}return t})},7087:e=>{"use strict";const t=(t,r,n)=>{e.exports[r]=class NodeError extends t{constructor(...e){super(typeof n==="string"?n:n(e));this.name=`${super.name} [${r}]`;this.code=r}}};t(TypeError,"ERR_INVALID_ARG_TYPE",e=>{const t=e[0].includes(".")?"property":"argument";let r=e[1];const n=Array.isArray(r);if(n){r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`}return`The "${e[0]}" ${t} must be ${n?"one of":"of"} type ${r}. Received ${typeof e[2]}`});t(TypeError,"ERR_INVALID_PROTOCOL",e=>{return`Protocol "${e[0]}" not supported. Expected "${e[1]}"`});t(Error,"ERR_HTTP_HEADERS_SENT",e=>{return`Cannot ${e[0]} headers after they are sent to the client`});t(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>{return`${e[0]} must be a valid HTTP token [${e[1]}]`});t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>{return`Invalid value "${e[0]} for header "${e[1]}"`});t(TypeError,"ERR_INVALID_CHAR",e=>{return`Invalid character in ${e[0]} [${e[1]}]`})},1199:e=>{"use strict";e.exports=(e=>{switch(e){case":method":case":scheme":case":authority":case":path":return true;default:return false}})},1818:e=>{"use strict";e.exports=((e,t,r)=>{for(const n of r){e.on(n,(...e)=>t.emit(n,...e))}})},2686:e=>{"use strict";e.exports=(e=>{const t={protocol:e.protocol,hostname:typeof e.hostname==="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(typeof e.port==="string"&&e.port.length!==0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t})},2820:(e,t)=>{t.stringify=function stringify(e){if("undefined"==typeof e)return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON)e=e.toJSON();if(e&&"object"===typeof e){var t="";var r=Array.isArray(e);t=r?"[":"{";var n=true;for(var i in e){var s="function"==typeof e[i]||!r&&"undefined"===typeof e[i];if(Object.hasOwnProperty.call(e,i)&&!s){if(!n)t+=",";n=false;if(r){if(e[i]==undefined)t+="null";else t+=stringify(e[i])}else if(e[i]!==void 0){t+=stringify(i)+":"+stringify(e[i])}}}t+=r?"]":"}";return t}else if("string"===typeof e){return JSON.stringify(/^:/.test(e)?":"+e:e)}else if("undefined"===typeof e){return"null"}else return JSON.stringify(e)};t.parse=function(e){return JSON.parse(e,function(e,t){if("string"===typeof t){if(/^:base64:/.test(t))return Buffer.from(t.substring(8),"base64");else return/^:/.test(t)?t.substring(1):t}return t})}},6160:(e,t,r)=>{let n;try{n=r(7758)}catch(e){n=r(5747)}const i=r(9046);const{stringify:s,stripBom:o}=r(5902);async function _readFile(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const s="throws"in t?t.throws:true;let a=await i.fromCallback(r.readFile)(e,t);a=o(a);let c;try{c=JSON.parse(a,t?t.reviver:null)}catch(t){if(s){t.message=`${e}: ${t.message}`;throw t}else{return null}}return c}const a=i.fromPromise(_readFile);function readFileSync(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const i="throws"in t?t.throws:true;try{let n=r.readFileSync(e,t);n=o(n);return JSON.parse(n,t.reviver)}catch(t){if(i){t.message=`${e}: ${t.message}`;throw t}else{return null}}}async function _writeFile(e,t,r={}){const o=r.fs||n;const a=s(t,r);await i.fromCallback(o.writeFile)(e,a,r)}const c=i.fromPromise(_writeFile);function writeFileSync(e,t,r={}){const i=r.fs||n;const o=s(t,r);return i.writeFileSync(e,o,r)}const u={readFile:a,readFileSync:readFileSync,writeFile:c,writeFileSync:writeFileSync};e.exports=u},5902:e=>{function stringify(e,{EOL:t="\n",finalEOL:r=true,replacer:n=null,spaces:i}={}){const s=r?t:"";const o=JSON.stringify(e,n,i);return o.replace(/\n/g,t)+s}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},1531:(e,t,r)=>{"use strict";const n=r(8614);const i=r(2820);const s=e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};class Keyv extends n{constructor(e,t){super();this.opts=Object.assign({namespace:"keyv",serialize:i.stringify,deserialize:i.parse},typeof e==="string"?{uri:e}:e,t);if(!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=s(e)}if(typeof this.opts.store.on==="function"){this.opts.store.on("error",e=>this.emit("error",e))}this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){const r=this._getKeyPrefix(e);const{store:n}=this.opts;return Promise.resolve().then(()=>n.get(r)).then(e=>typeof e==="string"?this.opts.deserialize(e):e).then(r=>{if(r===undefined){return undefined}if(typeof r.expires==="number"&&Date.now()>r.expires){this.delete(e);return undefined}return t&&t.raw?r:r.value})}set(e,t,r){const n=this._getKeyPrefix(e);if(typeof r==="undefined"){r=this.opts.ttl}if(r===0){r=undefined}const{store:i}=this.opts;return Promise.resolve().then(()=>{const e=typeof r==="number"?Date.now()+r:null;t={value:t,expires:e};return this.opts.serialize(t)}).then(e=>i.set(n,e,r)).then(()=>true)}delete(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then(()=>r.delete(t))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}}e.exports=Keyv},250:function(e,t,r){e=r.nmd(e);(function(){var r;var n="4.17.21";var i=200;var s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`";var c="__lodash_hash_undefined__";var u=500;var l="__lodash_placeholder__";var f=1,h=2,d=4;var p=1,y=2;var m=1,g=2,v=4,b=8,_=16,w=32,S=64,E=128,x=256,k=512;var O=30,I="...";var C=800,P=16;var A=1,R=2,T=3;var j=1/0,L=9007199254740991,F=1.7976931348623157e308,D=0/0;var M=4294967295,N=M-1,q=M>>>1;var W=[["ary",E],["bind",m],["bindKey",g],["curry",b],["curryRight",_],["flip",k],["partial",w],["partialRight",S],["rearg",x]];var U="[object Arguments]",H="[object Array]",$="[object AsyncFunction]",z="[object Boolean]",B="[object Date]",G="[object DOMException]",K="[object Error]",J="[object Function]",Y="[object GeneratorFunction]",Z="[object Map]",X="[object Number]",Q="[object Null]",V="[object Object]",ee="[object Promise]",te="[object Proxy]",re="[object RegExp]",ne="[object Set]",ie="[object String]",se="[object Symbol]",oe="[object Undefined]",ae="[object WeakMap]",ce="[object WeakSet]";var ue="[object ArrayBuffer]",le="[object DataView]",fe="[object Float32Array]",he="[object Float64Array]",de="[object Int8Array]",pe="[object Int16Array]",ye="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ve="[object Uint16Array]",be="[object Uint32Array]";var _e=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,Se=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var Ee=/&(?:amp|lt|gt|quot|#39);/g,xe=/[&<>"']/g,ke=RegExp(Ee.source),Oe=RegExp(xe.source);var Ie=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Pe=/<%=([\s\S]+?)%>/g;var Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Re=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var je=/[\\^$.*+?()[\]{}|]/g,Le=RegExp(je.source);var Fe=/^\s+/;var De=/\s/;var Me=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,qe=/,? & /;var We=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ue=/[()=,{}\[\]\/\s]/;var He=/\\(\\)?/g;var $e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var ze=/\w*$/;var Be=/^[-+]0x[0-9a-f]+$/i;var Ge=/^0b[01]+$/i;var Ke=/^\[object .+?Constructor\]$/;var Je=/^0o[0-7]+$/i;var Ye=/^(?:0|[1-9]\d*)$/;var Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var Xe=/($^)/;var Qe=/['\n\r\u2028\u2029\\]/g;var Ve="\\ud800-\\udfff",et="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",rt="\\u20d0-\\u20ff",nt=et+tt+rt,it="\\u2700-\\u27bf",st="a-z\\xdf-\\xf6\\xf8-\\xff",ot="\\xac\\xb1\\xd7\\xf7",at="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ct="\\u2000-\\u206f",ut=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lt="A-Z\\xc0-\\xd6\\xd8-\\xde",ft="\\ufe0e\\ufe0f",ht=ot+at+ct+ut;var dt="['’]",pt="["+Ve+"]",yt="["+ht+"]",mt="["+nt+"]",gt="\\d+",vt="["+it+"]",bt="["+st+"]",_t="[^"+Ve+ht+gt+it+st+lt+"]",wt="\\ud83c[\\udffb-\\udfff]",St="(?:"+mt+"|"+wt+")",Et="[^"+Ve+"]",xt="(?:\\ud83c[\\udde6-\\uddff]){2}",kt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ot="["+lt+"]",It="\\u200d";var Ct="(?:"+bt+"|"+_t+")",Pt="(?:"+Ot+"|"+_t+")",At="(?:"+dt+"(?:d|ll|m|re|s|t|ve))?",Rt="(?:"+dt+"(?:D|LL|M|RE|S|T|VE))?",Tt=St+"?",jt="["+ft+"]?",Lt="(?:"+It+"(?:"+[Et,xt,kt].join("|")+")"+jt+Tt+")*",Ft="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Mt=jt+Tt+Lt,Nt="(?:"+[vt,xt,kt].join("|")+")"+Mt,qt="(?:"+[Et+mt+"?",mt,xt,kt,pt].join("|")+")";var Wt=RegExp(dt,"g");var Ut=RegExp(mt,"g");var Ht=RegExp(wt+"(?="+wt+")|"+qt+Mt,"g");var $t=RegExp([Ot+"?"+bt+"+"+At+"(?="+[yt,Ot,"$"].join("|")+")",Pt+"+"+Rt+"(?="+[yt,Ot+Ct,"$"].join("|")+")",Ot+"?"+Ct+"+"+At,Ot+"+"+Rt,Dt,Ft,gt,Nt].join("|"),"g");var zt=RegExp("["+It+Ve+nt+ft+"]");var Bt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Gt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"];var Kt=-1;var Jt={};Jt[fe]=Jt[he]=Jt[de]=Jt[pe]=Jt[ye]=Jt[me]=Jt[ge]=Jt[ve]=Jt[be]=true;Jt[U]=Jt[H]=Jt[ue]=Jt[z]=Jt[le]=Jt[B]=Jt[K]=Jt[J]=Jt[Z]=Jt[X]=Jt[V]=Jt[re]=Jt[ne]=Jt[ie]=Jt[ae]=false;var Yt={};Yt[U]=Yt[H]=Yt[ue]=Yt[le]=Yt[z]=Yt[B]=Yt[fe]=Yt[he]=Yt[de]=Yt[pe]=Yt[ye]=Yt[Z]=Yt[X]=Yt[V]=Yt[re]=Yt[ne]=Yt[ie]=Yt[se]=Yt[me]=Yt[ge]=Yt[ve]=Yt[be]=true;Yt[K]=Yt[J]=Yt[ae]=false;var Zt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var Xt={"&":"&","<":"<",">":">",'"':""","'":"'"};var Qt={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Vt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var er=parseFloat,tr=parseInt;var rr=typeof global=="object"&&global&&global.Object===Object&&global;var nr=typeof self=="object"&&self&&self.Object===Object&&self;var ir=rr||nr||Function("return this")();var sr=true&&t&&!t.nodeType&&t;var or=sr&&"object"=="object"&&e&&!e.nodeType&&e;var ar=or&&or.exports===sr;var cr=ar&&rr.process;var ur=function(){try{var e=or&&or.require&&or.require("util").types;if(e){return e}return cr&&cr.binding&&cr.binding("util")}catch(e){}}();var lr=ur&&ur.isArrayBuffer,fr=ur&&ur.isDate,hr=ur&&ur.isMap,dr=ur&&ur.isRegExp,pr=ur&&ur.isSet,yr=ur&&ur.isTypedArray;function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function arrayAggregator(e,t,r,n){var i=-1,s=e==null?0:e.length;while(++i-1}function arrayIncludesWith(e,t,r){var n=-1,i=e==null?0:e.length;while(++n-1){}return r}function charsEndIndex(e,t){var r=e.length;while(r--&&baseIndexOf(t,e[r],0)>-1){}return r}function countHolders(e,t){var r=e.length,n=0;while(r--){if(e[r]===t){++n}}return n}var gr=basePropertyOf(Zt);var vr=basePropertyOf(Xt);function escapeStringChar(e){return"\\"+Vt[e]}function getValue(e,t){return e==null?r:e[t]}function hasUnicode(e){return zt.test(e)}function hasUnicodeWord(e){return Bt.test(e)}function iteratorToArray(e){var t,r=[];while(!(t=e.next()).done){r.push(t.value)}return r}function mapToArray(e){var t=-1,r=Array(e.size);e.forEach(function(e,n){r[++t]=[n,e]});return r}function overArg(e,t){return function(r){return e(t(r))}}function replaceHolders(e,t){var r=-1,n=e.length,i=0,s=[];while(++r-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);if(n<0){++this.size;r.push([e,t])}else{r[n][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t=t?e:t}}return e}function baseClone(e,t,n,i,s,o){var a,c=t&f,u=t&h,l=t&d;if(n){a=s?n(e,i,s,o):n(e)}if(a!==r){return a}if(!isObject(e)){return e}var p=Rn(e);if(p){a=initCloneArray(e);if(!c){return copyArray(e,a)}}else{var y=Wr(e),m=y==J||y==Y;if(jn(e)){return cloneBuffer(e,c)}if(y==V||y==U||m&&!s){a=u||m?{}:initCloneObject(e);if(!c){return u?copySymbolsIn(e,baseAssignIn(a,e)):copySymbols(e,baseAssign(a,e))}}else{if(!Yt[y]){return s?e:{}}a=initCloneByTag(e,y,c)}}o||(o=new Stack);var g=o.get(e);if(g){return g}o.set(e,a);if(Mn(e)){e.forEach(function(r){a.add(baseClone(r,t,n,r,e,o))})}else if(Fn(e)){e.forEach(function(r,i){a.set(i,baseClone(r,t,n,i,e,o))})}var v=l?u?getAllKeysIn:getAllKeys:u?keysIn:keys;var b=p?r:v(e);arrayEach(b||e,function(r,i){if(b){i=r;r=e[i]}assignValue(a,i,baseClone(r,t,n,i,e,o))});return a}function baseConforms(e){var t=keys(e);return function(r){return baseConformsTo(r,e,t)}}function baseConformsTo(e,t,n){var i=n.length;if(e==null){return!i}e=tt(e);while(i--){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a)){return false}}return true}function baseDelay(e,t,n){if(typeof e!="function"){throw new it(o)}return $r(function(){e.apply(r,n)},t)}function baseDifference(e,t,r,n){var s=-1,o=arrayIncludes,a=true,c=e.length,u=[],l=t.length;if(!c){return u}if(r){t=arrayMap(t,baseUnary(r))}if(n){o=arrayIncludesWith;a=false}else if(t.length>=i){o=cacheHas;a=false;t=new SetCache(t)}e:while(++ss?0:s+n}i=i===r||i>s?s:toInteger(i);if(i<0){i+=s}i=n>i?0:toLength(i);while(n0&&r(a)){if(t>1){baseFlatten(a,t-1,r,n,i)}else{arrayPush(i,a)}}else if(!n){i[i.length]=a}}return i}var Ar=createBaseFor();var Rr=createBaseFor(true);function baseForOwn(e,t){return e&&Ar(e,t,keys)}function baseForOwnRight(e,t){return e&&Rr(e,t,keys)}function baseFunctions(e,t){return arrayFilter(t,function(t){return isFunction(e[t])})}function baseGet(e,t){t=castPath(t,e);var n=0,i=t.length;while(e!=null&&nt}function baseHas(e,t){return e!=null&<.call(e,t)}function baseHasIn(e,t){return e!=null&&t in tt(e)}function baseInRange(e,t,r){return e>=Ht(t,r)&&e=120&&h.length>=120)?new SetCache(c&&h):r}h=e[0];var d=-1,p=u[0];e:while(++d-1){if(a!==e){xt.call(a,c,1)}xt.call(e,c,1)}}return e}function basePullAt(e,t){var r=e?t.length:0,n=r-1;while(r--){var i=t[r];if(r==n||i!==s){var s=i;if(isIndex(i)){xt.call(e,i,1)}else{baseUnset(e,i)}}}return e}function baseRandom(e,t){return e+jt(Bt()*(t-e+1))}function baseRange(e,r,n,i){var s=-1,o=qt(Tt((r-e)/(n||1)),0),a=t(o);while(o--){a[i?o:++s]=e;e+=n}return a}function baseRepeat(e,t){var r="";if(!e||t<1||t>L){return r}do{if(t%2){r+=e}t=jt(t/2);if(t){e+=e}}while(t);return r}function baseRest(e,t){return zr(overRest(e,t,identity),e+"")}function baseSample(e){return arraySample(values(e))}function baseSampleSize(e,t){var r=values(e);return shuffleSelf(r,baseClamp(t,0,r.length))}function baseSet(e,t,n,i){if(!isObject(e)){return e}t=castPath(t,e);var s=-1,o=t.length,a=o-1,c=e;while(c!=null&&++ss?0:s+r}n=n>s?s:n;if(n<0){n+=s}s=r>n?0:n-r>>>0;r>>>=0;var o=t(s);while(++i>>1,o=e[s];if(o!==null&&!isSymbol(o)&&(r?o<=t:o=i){var l=t?null:Dr(e);if(l){return setToArray(l)}a=false;s=cacheHas;u=new SetCache}else{u=t?[]:c}e:while(++n=i?e:baseSlice(e,t,n)}var Fr=Pt||function(e){return ir.clearTimeout(e)};function cloneBuffer(e,t){if(t){return e.slice()}var r=e.length,n=_t?_t(r):new e.constructor(r);e.copy(n);return n}function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);new bt(t).set(new bt(e));return t}function cloneDataView(e,t){var r=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function cloneRegExp(e){var t=new e.constructor(e.source,ze.exec(e));t.lastIndex=e.lastIndex;return t}function cloneSymbol(e){return kr?tt(kr.call(e)):{}}function cloneTypedArray(e,t){var r=t?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function compareAscending(e,t){if(e!==t){var n=e!==r,i=e===null,s=e===e,o=isSymbol(e);var a=t!==r,c=t===null,u=t===t,l=isSymbol(t);if(!c&&!l&&!o&&e>t||o&&a&&u&&!c&&!l||i&&a&&u||!n&&u||!s){return 1}if(!i&&!o&&!l&&e=a){return c}var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}function composeArgs(e,r,n,i){var s=-1,o=e.length,a=n.length,c=-1,u=r.length,l=qt(o-a,0),f=t(u+l),h=!i;while(++c1?n[s-1]:r,a=s>2?n[2]:r;o=e.length>3&&typeof o=="function"?(s--,o):r;if(a&&isIterateeCall(n[0],n[1],a)){o=s<3?r:o;s=1}t=tt(t);while(++i-1?s[o?t[a]:a]:r}}function createFlow(e){return flatRest(function(t){var n=t.length,i=n,s=LodashWrapper.prototype.thru;if(e){t.reverse()}while(i--){var a=t[i];if(typeof a!="function"){throw new it(o)}if(s&&!c&&getFuncName(a)=="wrapper"){var c=new LodashWrapper([],true)}}i=c?i:n;while(++i1){m.reverse()}if(h&&lc)){return false}var l=o.get(e);var f=o.get(t);if(l&&f){return l==t&&f==e}var h=-1,d=true,m=n&y?new SetCache:r;o.set(e,t);o.set(t,e);while(++h1?"& ":"")+t[n];t=t.join(r>2?", ":" ");return e.replace(Me,"{\n/* [wrapped with "+t+"] */\n")}function isFlattenable(e){return Rn(e)||An(e)||!!(kt&&e&&e[kt])}function isIndex(e,t){var r=typeof e;t=t==null?L:t;return!!t&&(r=="number"||r!="symbol"&&Ye.test(e))&&(e>-1&&e%1==0&&e0){if(++t>=C){return arguments[0]}}else{t=0}return e.apply(r,arguments)}}function shuffleSelf(e,t){var n=-1,i=e.length,s=i-1;t=t===r?i:t;while(++n1?e[t-1]:r;n=typeof n=="function"?(e.pop(),n):r;return unzipWith(e,n)});function chain(e){var t=lodash(e);t.__chain__=true;return t}function tap(e,t){t(e);return e}function thru(e,t){return t(e)}var ln=flatRest(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return baseAt(t,e)};if(t>1||this.__actions__.length||!(i instanceof LazyWrapper)||!isIndex(n)){return this.thru(s)}i=i.slice(n,+n+(t?1:0));i.__actions__.push({func:thru,args:[s],thisArg:r});return new LodashWrapper(i,this.__chain__).thru(function(e){if(t&&!e.length){e.push(r)}return e})});function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){if(this.__values__===r){this.__values__=toArray(this.value())}var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function wrapperToIterator(){return this}function wrapperPlant(e){var t,n=this;while(n instanceof baseLodash){var i=wrapperClone(n);i.__index__=0;i.__values__=r;if(t){s.__wrapped__=i}else{t=i}var s=i;n=n.__wrapped__}s.__wrapped__=e;return t}function wrapperReverse(){var e=this.__wrapped__;if(e instanceof LazyWrapper){var t=e;if(this.__actions__.length){t=new LazyWrapper(this)}t=t.reverse();t.__actions__.push({func:thru,args:[reverse],thisArg:r});return new LodashWrapper(t,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var fn=createAggregator(function(e,t,r){if(lt.call(e,r)){++e[r]}else{baseAssignValue(e,r,1)}});function every(e,t,n){var i=Rn(e)?arrayEvery:baseEvery;if(n&&isIterateeCall(e,t,n)){t=r}return i(e,getIteratee(t,3))}function filter(e,t){var r=Rn(e)?arrayFilter:baseFilter;return r(e,getIteratee(t,3))}var hn=createFind(findIndex);var dn=createFind(findLastIndex);function flatMap(e,t){return baseFlatten(map(e,t),1)}function flatMapDeep(e,t){return baseFlatten(map(e,t),j)}function flatMapDepth(e,t,n){n=n===r?1:toInteger(n);return baseFlatten(map(e,t),n)}function forEach(e,t){var r=Rn(e)?arrayEach:Cr;return r(e,getIteratee(t,3))}function forEachRight(e,t){var r=Rn(e)?arrayEachRight:Pr;return r(e,getIteratee(t,3))}var pn=createAggregator(function(e,t,r){if(lt.call(e,r)){e[r].push(t)}else{baseAssignValue(e,r,[t])}});function includes(e,t,r,n){e=isArrayLike(e)?e:values(e);r=r&&!n?toInteger(r):0;var i=e.length;if(r<0){r=qt(i+r,0)}return isString(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&baseIndexOf(e,t,r)>-1}var yn=baseRest(function(e,r,n){var i=-1,s=typeof r=="function",o=isArrayLike(e)?t(e.length):[];Cr(e,function(e){o[++i]=s?apply(r,e,n):baseInvoke(e,r,n)});return o});var mn=createAggregator(function(e,t,r){baseAssignValue(e,r,t)});function map(e,t){var r=Rn(e)?arrayMap:baseMap;return r(e,getIteratee(t,3))}function orderBy(e,t,n,i){if(e==null){return[]}if(!Rn(t)){t=t==null?[]:[t]}n=i?r:n;if(!Rn(n)){n=n==null?[]:[n]}return baseOrderBy(e,t,n)}var gn=createAggregator(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function reduce(e,t,r){var n=Rn(e)?arrayReduce:baseReduce,i=arguments.length<3;return n(e,getIteratee(t,4),r,i,Cr)}function reduceRight(e,t,r){var n=Rn(e)?arrayReduceRight:baseReduce,i=arguments.length<3;return n(e,getIteratee(t,4),r,i,Pr)}function reject(e,t){var r=Rn(e)?arrayFilter:baseFilter;return r(e,negate(getIteratee(t,3)))}function sample(e){var t=Rn(e)?arraySample:baseSample;return t(e)}function sampleSize(e,t,n){if(n?isIterateeCall(e,t,n):t===r){t=1}else{t=toInteger(t)}var i=Rn(e)?arraySampleSize:baseSampleSize;return i(e,t)}function shuffle(e){var t=Rn(e)?arrayShuffle:baseShuffle;return t(e)}function size(e){if(e==null){return 0}if(isArrayLike(e)){return isString(e)?stringSize(e):e.length}var t=Wr(e);if(t==Z||t==ne){return e.size}return baseKeys(e).length}function some(e,t,n){var i=Rn(e)?arraySome:baseSome;if(n&&isIterateeCall(e,t,n)){t=r}return i(e,getIteratee(t,3))}var vn=baseRest(function(e,t){if(e==null){return[]}var r=t.length;if(r>1&&isIterateeCall(e,t[0],t[1])){t=[]}else if(r>2&&isIterateeCall(t[0],t[1],t[2])){t=[t[0]]}return baseOrderBy(e,baseFlatten(t,1),[])});var bn=At||function(){return ir.Date.now()};function after(e,t){if(typeof t!="function"){throw new it(o)}e=toInteger(e);return function(){if(--e<1){return t.apply(this,arguments)}}}function ary(e,t,n){t=n?r:t;t=e&&t==null?e.length:t;return createWrap(e,E,r,r,r,r,t)}function before(e,t){var n;if(typeof t!="function"){throw new it(o)}e=toInteger(e);return function(){if(--e>0){n=t.apply(this,arguments)}if(e<=1){t=r}return n}}var _n=baseRest(function(e,t,r){var n=m;if(r.length){var i=replaceHolders(r,getHolder(_n));n|=w}return createWrap(e,n,t,r,i)});var wn=baseRest(function(e,t,r){var n=m|g;if(r.length){var i=replaceHolders(r,getHolder(wn));n|=w}return createWrap(t,n,e,r,i)});function curry(e,t,n){t=n?r:t;var i=createWrap(e,b,r,r,r,r,r,t);i.placeholder=curry.placeholder;return i}function curryRight(e,t,n){t=n?r:t;var i=createWrap(e,_,r,r,r,r,r,t);i.placeholder=curryRight.placeholder;return i}function debounce(e,t,n){var i,s,a,c,u,l,f=0,h=false,d=false,p=true;if(typeof e!="function"){throw new it(o)}t=toNumber(t)||0;if(isObject(n)){h=!!n.leading;d="maxWait"in n;a=d?qt(toNumber(n.maxWait)||0,t):a;p="trailing"in n?!!n.trailing:p}function invokeFunc(t){var n=i,o=s;i=s=r;f=t;c=e.apply(o,n);return c}function leadingEdge(e){f=e;u=$r(timerExpired,t);return h?invokeFunc(e):c}function remainingWait(e){var r=e-l,n=e-f,i=t-r;return d?Ht(i,a-n):i}function shouldInvoke(e){var n=e-l,i=e-f;return l===r||n>=t||n<0||d&&i>=a}function timerExpired(){var e=bn();if(shouldInvoke(e)){return trailingEdge(e)}u=$r(timerExpired,remainingWait(e))}function trailingEdge(e){u=r;if(p&&i){return invokeFunc(e)}i=s=r;return c}function cancel(){if(u!==r){Fr(u)}f=0;i=l=s=u=r}function flush(){return u===r?c:trailingEdge(bn())}function debounced(){var e=bn(),n=shouldInvoke(e);i=arguments;s=this;l=e;if(n){if(u===r){return leadingEdge(l)}if(d){Fr(u);u=$r(timerExpired,t);return invokeFunc(l)}}if(u===r){u=$r(timerExpired,t)}return c}debounced.cancel=cancel;debounced.flush=flush;return debounced}var Sn=baseRest(function(e,t){return baseDelay(e,1,t)});var En=baseRest(function(e,t,r){return baseDelay(e,toNumber(t)||0,r)});function flip(e){return createWrap(e,k)}function memoize(e,t){if(typeof e!="function"||t!=null&&typeof t!="function"){throw new it(o)}var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i)){return s.get(i)}var o=e.apply(this,n);r.cache=s.set(i,o)||s;return o};r.cache=new(memoize.Cache||MapCache);return r}memoize.Cache=MapCache;function negate(e){if(typeof e!="function"){throw new it(o)}return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function once(e){return before(2,e)}var xn=Lr(function(e,t){t=t.length==1&&Rn(t[0])?arrayMap(t[0],baseUnary(getIteratee())):arrayMap(baseFlatten(t,1),baseUnary(getIteratee()));var r=t.length;return baseRest(function(n){var i=-1,s=Ht(n.length,r);while(++i=t});var An=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&<.call(e,"callee")&&!Et.call(e,"callee")};var Rn=t.isArray;var Tn=lr?baseUnary(lr):baseIsArrayBuffer;function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function isBoolean(e){return e===true||e===false||isObjectLike(e)&&baseGetTag(e)==z}var jn=Ft||stubFalse;var Ln=fr?baseUnary(fr):baseIsDate;function isElement(e){return isObjectLike(e)&&e.nodeType===1&&!isPlainObject(e)}function isEmpty(e){if(e==null){return true}if(isArrayLike(e)&&(Rn(e)||typeof e=="string"||typeof e.splice=="function"||jn(e)||Nn(e)||An(e))){return!e.length}var t=Wr(e);if(t==Z||t==ne){return!e.size}if(isPrototype(e)){return!baseKeys(e).length}for(var r in e){if(lt.call(e,r)){return false}}return true}function isEqual(e,t){return baseIsEqual(e,t)}function isEqualWith(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?baseIsEqual(e,t,r,n):!!i}function isError(e){if(!isObjectLike(e)){return false}var t=baseGetTag(e);return t==K||t==G||typeof e.message=="string"&&typeof e.name=="string"&&!isPlainObject(e)}function isFinite(e){return typeof e=="number"&&Dt(e)}function isFunction(e){if(!isObject(e)){return false}var t=baseGetTag(e);return t==J||t==Y||t==$||t==te}function isInteger(e){return typeof e=="number"&&e==toInteger(e)}function isLength(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=L}function isObject(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function isObjectLike(e){return e!=null&&typeof e=="object"}var Fn=hr?baseUnary(hr):baseIsMap;function isMatch(e,t){return e===t||baseIsMatch(e,t,getMatchData(t))}function isMatchWith(e,t,n){n=typeof n=="function"?n:r;return baseIsMatch(e,t,getMatchData(t),n)}function isNaN(e){return isNumber(e)&&e!=+e}function isNative(e){if(Ur(e)){throw new We(s)}return baseIsNative(e)}function isNull(e){return e===null}function isNil(e){return e==null}function isNumber(e){return typeof e=="number"||isObjectLike(e)&&baseGetTag(e)==X}function isPlainObject(e){if(!isObjectLike(e)||baseGetTag(e)!=V){return false}var t=wt(e);if(t===null){return true}var r=lt.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ut.call(r)==pt}var Dn=dr?baseUnary(dr):baseIsRegExp;function isSafeInteger(e){return isInteger(e)&&e>=-L&&e<=L}var Mn=pr?baseUnary(pr):baseIsSet;function isString(e){return typeof e=="string"||!Rn(e)&&isObjectLike(e)&&baseGetTag(e)==ie}function isSymbol(e){return typeof e=="symbol"||isObjectLike(e)&&baseGetTag(e)==se}var Nn=yr?baseUnary(yr):baseIsTypedArray;function isUndefined(e){return e===r}function isWeakMap(e){return isObjectLike(e)&&Wr(e)==ae}function isWeakSet(e){return isObjectLike(e)&&baseGetTag(e)==ce}var qn=createRelationalOperation(baseLt);var Wn=createRelationalOperation(function(e,t){return e<=t});function toArray(e){if(!e){return[]}if(isArrayLike(e)){return isString(e)?stringToArray(e):copyArray(e)}if(Ot&&e[Ot]){return iteratorToArray(e[Ot]())}var t=Wr(e),r=t==Z?mapToArray:t==ne?setToArray:values;return r(e)}function toFinite(e){if(!e){return e===0?e:0}e=toNumber(e);if(e===j||e===-j){var t=e<0?-1:1;return t*F}return e===e?e:0}function toInteger(e){var t=toFinite(e),r=t%1;return t===t?r?t-r:t:0}function toLength(e){return e?baseClamp(toInteger(e),0,M):0}function toNumber(e){if(typeof e=="number"){return e}if(isSymbol(e)){return D}if(isObject(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=isObject(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=baseTrim(e);var r=Ge.test(e);return r||Je.test(e)?tr(e.slice(2),r?2:8):Be.test(e)?D:+e}function toPlainObject(e){return copyObject(e,keysIn(e))}function toSafeInteger(e){return e?baseClamp(toInteger(e),-L,L):e===0?e:0}function toString(e){return e==null?"":baseToString(e)}var Un=createAssigner(function(e,t){if(isPrototype(t)||isArrayLike(t)){copyObject(t,keys(t),e);return}for(var r in t){if(lt.call(t,r)){assignValue(e,r,t[r])}}});var Hn=createAssigner(function(e,t){copyObject(t,keysIn(t),e)});var $n=createAssigner(function(e,t,r,n){copyObject(t,keysIn(t),e,n)});var zn=createAssigner(function(e,t,r,n){copyObject(t,keys(t),e,n)});var Bn=flatRest(baseAt);function create(e,t){var r=Ir(e);return t==null?r:baseAssign(r,t)}var Gn=baseRest(function(e,t){e=tt(e);var n=-1;var i=t.length;var s=i>2?t[2]:r;if(s&&isIterateeCall(t[0],t[1],s)){i=1}while(++n1);return t});copyObject(e,getAllKeysIn(e),r);if(n){r=baseClone(r,f|h|d,customOmitClone)}var i=t.length;while(i--){baseUnset(r,t[i])}return r});function omitBy(e,t){return pickBy(e,negate(getIteratee(t)))}var ei=flatRest(function(e,t){return e==null?{}:basePick(e,t)});function pickBy(e,t){if(e==null){return{}}var r=arrayMap(getAllKeysIn(e),function(e){return[e]});t=getIteratee(t);return basePickBy(e,r,function(e,r){return t(e,r[0])})}function result(e,t,n){t=castPath(t,e);var i=-1,s=t.length;if(!s){s=1;e=r}while(++it){var i=e;e=t;t=i}if(n||e%1||t%1){var s=Bt();return Ht(e+s*(t-e+er("1e-"+((s+"").length-1))),t)}return baseRandom(e,t)}var ni=createCompounder(function(e,t,r){t=t.toLowerCase();return e+(r?capitalize(t):t)});function capitalize(e){return li(toString(e).toLowerCase())}function deburr(e){e=toString(e);return e&&e.replace(Ze,gr).replace(Ut,"")}function endsWith(e,t,n){e=toString(e);t=baseToString(t);var i=e.length;n=n===r?i:baseClamp(toInteger(n),0,i);var s=n;n-=t.length;return n>=0&&e.slice(n,s)==t}function escape(e){e=toString(e);return e&&Oe.test(e)?e.replace(xe,vr):e}function escapeRegExp(e){e=toString(e);return e&&Le.test(e)?e.replace(je,"\\$&"):e}var ii=createCompounder(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});var si=createCompounder(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()});var oi=createCaseFirst("toLowerCase");function pad(e,t,r){e=toString(e);t=toInteger(t);var n=t?stringSize(e):0;if(!t||n>=t){return e}var i=(t-n)/2;return createPadding(jt(i),r)+e+createPadding(Tt(i),r)}function padEnd(e,t,r){e=toString(e);t=toInteger(t);var n=t?stringSize(e):0;return t&&n>>0;if(!n){return[]}e=toString(e);if(e&&(typeof t=="string"||t!=null&&!Dn(t))){t=baseToString(t);if(!t&&hasUnicode(e)){return castSlice(stringToArray(e),0,n)}}return e.split(t,n)}var ci=createCompounder(function(e,t,r){return e+(r?" ":"")+li(t)});function startsWith(e,t,r){e=toString(e);r=r==null?0:baseClamp(toInteger(r),0,e.length);t=baseToString(t);return e.slice(r,r+t.length)==t}function template(e,t,n){var i=lodash.templateSettings;if(n&&isIterateeCall(e,t,n)){t=r}e=toString(e);t=$n({},t,i,customDefaultsAssignIn);var s=$n({},t.imports,i.imports,customDefaultsAssignIn),o=keys(s),c=baseValues(s,o);var u,l,f=0,h=t.interpolate||Xe,d="__p += '";var p=rt((t.escape||Xe).source+"|"+h.source+"|"+(h===Pe?$e:Xe).source+"|"+(t.evaluate||Xe).source+"|$","g");var y="//# sourceURL="+(lt.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Kt+"]")+"\n";e.replace(p,function(t,r,n,i,s,o){n||(n=i);d+=e.slice(f,o).replace(Qe,escapeStringChar);if(r){u=true;d+="' +\n__e("+r+") +\n'"}if(s){l=true;d+="';\n"+s+";\n__p += '"}if(n){d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}f=o+t.length;return t});d+="';\n";var m=lt.call(t,"variable")&&t.variable;if(!m){d="with (obj) {\n"+d+"\n}\n"}else if(Ue.test(m)){throw new We(a)}d=(l?d.replace(_e,""):d).replace(we,"$1").replace(Se,"$1;");d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(l?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=fi(function(){return Ve(o,y+"return "+d).apply(r,c)});g.source=d;if(isError(g)){throw g}return g}function toLower(e){return toString(e).toLowerCase()}function toUpper(e){return toString(e).toUpperCase()}function trim(e,t,n){e=toString(e);if(e&&(n||t===r)){return baseTrim(e)}if(!e||!(t=baseToString(t))){return e}var i=stringToArray(e),s=stringToArray(t),o=charsStartIndex(i,s),a=charsEndIndex(i,s)+1;return castSlice(i,o,a).join("")}function trimEnd(e,t,n){e=toString(e);if(e&&(n||t===r)){return e.slice(0,trimmedEndIndex(e)+1)}if(!e||!(t=baseToString(t))){return e}var i=stringToArray(e),s=charsEndIndex(i,stringToArray(t))+1;return castSlice(i,0,s).join("")}function trimStart(e,t,n){e=toString(e);if(e&&(n||t===r)){return e.replace(Fe,"")}if(!e||!(t=baseToString(t))){return e}var i=stringToArray(e),s=charsStartIndex(i,stringToArray(t));return castSlice(i,s).join("")}function truncate(e,t){var n=O,i=I;if(isObject(t)){var s="separator"in t?t.separator:s;n="length"in t?toInteger(t.length):n;i="omission"in t?baseToString(t.omission):i}e=toString(e);var o=e.length;if(hasUnicode(e)){var a=stringToArray(e);o=a.length}if(n>=o){return e}var c=n-stringSize(i);if(c<1){return i}var u=a?castSlice(a,0,c).join(""):e.slice(0,c);if(s===r){return u+i}if(a){c+=u.length-c}if(Dn(s)){if(e.slice(c).search(s)){var l,f=u;if(!s.global){s=rt(s.source,toString(ze.exec(s))+"g")}s.lastIndex=0;while(l=s.exec(f)){var h=l.index}u=u.slice(0,h===r?c:h)}}else if(e.indexOf(baseToString(s),c)!=c){var d=u.lastIndexOf(s);if(d>-1){u=u.slice(0,d)}}return u+i}function unescape(e){e=toString(e);return e&&ke.test(e)?e.replace(Ee,br):e}var ui=createCompounder(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()});var li=createCaseFirst("toUpperCase");function words(e,t,n){e=toString(e);t=n?r:t;if(t===r){return hasUnicodeWord(e)?unicodeWords(e):asciiWords(e)}return e.match(t)||[]}var fi=baseRest(function(e,t){try{return apply(e,r,t)}catch(e){return isError(e)?e:new We(e)}});var hi=flatRest(function(e,t){arrayEach(t,function(t){t=toKey(t);baseAssignValue(e,t,_n(e[t],e))});return e});function cond(e){var t=e==null?0:e.length,r=getIteratee();e=!t?[]:arrayMap(e,function(e){if(typeof e[1]!="function"){throw new it(o)}return[r(e[0]),e[1]]});return baseRest(function(r){var n=-1;while(++nL){return[]}var r=M,n=Ht(e,M);t=getIteratee(t);e-=M;var i=baseTimes(n,t);while(++r0||t<0)){return new LazyWrapper(n)}if(e<0){n=n.takeRight(-e)}else if(e){n=n.drop(e)}if(t!==r){t=toInteger(t);n=t<0?n.dropRight(-t):n.take(t-e)}return n};LazyWrapper.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};LazyWrapper.prototype.toArray=function(){return this.take(M)};baseForOwn(LazyWrapper.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=lodash[i?"take"+(t=="last"?"Right":""):t],o=i||/^find/.test(t);if(!s){return}lodash.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof LazyWrapper,u=a[0],l=c||Rn(t);var f=function(e){var t=s.apply(lodash,arrayPush([e],a));return i&&h?t[0]:t};if(l&&n&&typeof u=="function"&&u.length!=1){c=l=false}var h=this.__chain__,d=!!this.__actions__.length,p=o&&!h,y=c&&!d;if(!o&&l){t=y?t:new LazyWrapper(this);var m=e.apply(t,a);m.__actions__.push({func:thru,args:[f],thisArg:r});return new LodashWrapper(m,h)}if(p&&y){return e.apply(this,a)}m=this.thru(f);return p?i?m.value()[0]:m.value():m}});arrayEach(["pop","push","shift","sort","splice","unshift"],function(e){var t=st[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);lodash.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Rn(i)?i:[],e)}return this[r](function(r){return t.apply(Rn(r)?r:[],e)})}});baseForOwn(LazyWrapper.prototype,function(e,t){var r=lodash[t];if(r){var n=r.name+"";if(!lt.call(cr,n)){cr[n]=[]}cr[n].push({name:t,func:r})}});cr[createHybrid(r,g).name]=[{name:"wrapper",func:r}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.at=ln;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.next=wrapperNext;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.first=lodash.prototype.head;if(Ot){lodash.prototype[Ot]=wrapperToIterator}return lodash};var wr=_r();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){ir._=wr;define(function(){return wr})}else if(or){(or.exports=wr)._=wr;sr._=wr}else{ir._=wr}}).call(this)},9662:e=>{"use strict";e.exports=(e=>{const t={};for(const[r,n]of Object.entries(e)){t[r.toLowerCase()]=n}return t})},2610:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=((e,r)=>{const n=new Set(Object.keys(e).concat(t));for(const t of n){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}})},7952:e=>{"use strict";const t="text/plain";const r="us-ascii";const n=(e,t)=>{return t.some(t=>t instanceof RegExp?t.test(e):t===e)};const i=(e,{stripHash:n})=>{const i=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(e);if(!i){throw new Error(`Invalid URL: ${e}`)}let{type:s,data:o,hash:a}=i.groups;const c=s.split(";");a=n?"":a;let u=false;if(c[c.length-1]==="base64"){c.pop();u=true}const l=(c.shift()||"").toLowerCase();const f=c.map(e=>{let[t,n=""]=e.split("=").map(e=>e.trim());if(t==="charset"){n=n.toLowerCase();if(n===r){return""}}return`${t}${n?`=${n}`:""}`}).filter(Boolean);const h=[...f];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.join(";")},${u?o.trim():o}${a?`#${a}`:""}`};const s=(e,t)=>{t={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripTextFragment:true,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeSingleSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...t};e=e.trim();if(/^data:/i.test(e)){return i(e,t)}if(/^view-source:/i.test(e)){throw new Error("`view-source:` is not supported as it is a non-standard protocol")}const r=e.startsWith("//");const s=!r&&/^\.*\//.test(e);if(!s){e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol)}const o=new URL(e);if(t.forceHttp&&t.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(t.forceHttp&&o.protocol==="https:"){o.protocol="http:"}if(t.forceHttps&&o.protocol==="http:"){o.protocol="https:"}if(t.stripAuthentication){o.username="";o.password=""}if(t.stripHash){o.hash=""}else if(t.stripTextFragment){o.hash=o.hash.replace(/#?:~:text.*?$/i,"")}if(o.pathname){o.pathname=o.pathname.replace(/(?0){let e=o.pathname.split("/");const r=e[e.length-1];if(n(r,t.removeDirectoryIndex)){e=e.slice(0,e.length-1);o.pathname=e.slice(1).join("/")+"/"}}if(o.hostname){o.hostname=o.hostname.replace(/\.$/,"");if(t.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(o.hostname)){o.hostname=o.hostname.replace(/^www\./,"")}}if(Array.isArray(t.removeQueryParameters)){for(const e of[...o.searchParams.keys()]){if(n(e,t.removeQueryParameters)){o.searchParams.delete(e)}}}if(t.removeQueryParameters===true){o.search=""}if(t.sortQueryParameters){o.searchParams.sort()}if(t.removeTrailingSlash){o.pathname=o.pathname.replace(/\/$/,"")}const a=e;e=o.toString();if(!t.removeSingleSlash&&o.pathname==="/"&&!a.endsWith("/")&&o.hash===""){e=e.replace(/\/$/,"")}if((t.removeTrailingSlash||o.pathname==="/")&&o.hash===""&&t.removeSingleSlash){e=e.replace(/\/$/,"")}if(r&&!t.normalizeProtocol){e=e.replace(/^http:\/\//,"//")}if(t.stripProtocol){e=e.replace(/^(?:https?:)?\/\//,"")}return e};e.exports=s},1223:(e,t,r)=>{var n=r(2940);e.exports=n(once);e.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var r=e.name||"Function wrapped with `once`";t.onceError=r+" shouldn't be called more than once";t.called=false;return t}},9072:e=>{"use strict";class CancelError extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return(...t)=>{return new PCancelable((r,n,i)=>{t.push(i);e(...t).then(r,n)})}}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._rejectOnCancel=true;this._promise=new Promise((t,r)=>{this._reject=r;const n=e=>{if(!this._isCanceled||!s.shouldReject){this._isPending=false;t(e)}};const i=e=>{this._isPending=false;r(e)};const s=e=>{if(!this._isPending){throw new Error("The `onCancel` handler was attached after the promise settled.")}this._cancelHandlers.push(e)};Object.defineProperties(s,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}});return e(n,i,s)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!this._isPending||this._isCanceled){return}this._isCanceled=true;if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e);return}}if(this._rejectOnCancel){this._reject(new CancelError(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);e.exports=PCancelable;e.exports.CancelError=CancelError},8341:(e,t,r)=>{var n=r(1223);var i=r(1205);var s=r(5747);var o=function(){};var a=/^v?\.0/.test(process.version);var c=function(e){return typeof e==="function"};var u=function(e){if(!a)return false;if(!s)return false;return(e instanceof(s.ReadStream||o)||e instanceof(s.WriteStream||o))&&c(e.close)};var l=function(e){return e.setHeader&&c(e.abort)};var f=function(e,t,r,s){s=n(s);var a=false;e.on("close",function(){a=true});i(e,{readable:t,writable:r},function(e){if(e)return s(e);a=true;s()});var f=false;return function(t){if(a)return;if(f)return;f=true;if(u(e))return e.close(o);if(l(e))return e.abort();if(c(e.destroy))return e.destroy();s(t||new Error("stream was destroyed"))}};var h=function(e){e()};var d=function(e,t){return e.pipe(t)};var p=function(){var e=Array.prototype.slice.call(arguments);var t=c(e[e.length-1]||o)&&e.pop()||o;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var n=e.map(function(i,s){var o=s0;return f(i,o,a,function(e){if(!r)r=e;if(e)n.forEach(h);if(o)return;n.forEach(h);t(r)})});return e.reduce(d)};e.exports=p},9273:e=>{"use strict";class QuickLRU{constructor(e={}){if(!(e.maxSize&&e.maxSize>0)){throw new TypeError("`maxSize` must be a number greater than 0")}this.maxSize=e.maxSize;this.onEviction=e.onEviction;this.cache=new Map;this.oldCache=new Map;this._size=0}_set(e,t){this.cache.set(e,t);this._size++;if(this._size>=this.maxSize){this._size=0;if(typeof this.onEviction==="function"){for(const[e,t]of this.oldCache.entries()){this.onEviction(e,t)}}this.oldCache=this.cache;this.cache=new Map}}get(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);this.oldCache.delete(e);this._set(e,t);return t}}set(e,t){if(this.cache.has(e)){this.cache.set(e,t)}else{this._set(e,t)}return this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){return this.oldCache.get(e)}}delete(e){const t=this.cache.delete(e);if(t){this._size--}return this.oldCache.delete(e)||t}clear(){this.cache.clear();this.oldCache.clear();this._size=0}*keys(){for(const[e]of this){yield e}}*values(){for(const[,e]of this){yield e}}*[Symbol.iterator](){for(const e of this.cache){yield e}for(const e of this.oldCache){const[t]=e;if(!this.cache.has(t)){yield e}}}get size(){let e=0;for(const t of this.oldCache.keys()){if(!this.cache.has(t)){e++}}return Math.min(this._size+e,this.maxSize)}}e.exports=QuickLRU},6624:(e,t,r)=>{"use strict";const n=r(4016);e.exports=((e={},t=n.connect)=>new Promise((r,n)=>{let i=false;let s;const o=async()=>{await c;s.off("timeout",a);s.off("error",n);if(e.resolveSocket){r({alpnProtocol:s.alpnProtocol,socket:s,timeout:i});if(i){await Promise.resolve();s.emit("timeout")}}else{s.destroy();r({alpnProtocol:s.alpnProtocol,timeout:i})}};const a=async()=>{i=true;o()};const c=(async()=>{try{s=await t(e,o);s.on("error",n);s.once("timeout",a)}catch(e){n(e)}})()}))},9004:(e,t,r)=>{"use strict";const n=r(2413).Readable;const i=r(9662);class Response extends n{constructor(e,t,r,n){if(typeof e!=="number"){throw new TypeError("Argument `statusCode` should be a number")}if(typeof t!=="object"){throw new TypeError("Argument `headers` should be an object")}if(!(r instanceof Buffer)){throw new TypeError("Argument `body` should be a buffer")}if(typeof n!=="string"){throw new TypeError("Argument `url` should be a string")}super();this.statusCode=e;this.headers=i(t);this.body=r;this.url=n}_read(){this.push(this.body);this.push(null)}}e.exports=Response},9046:(e,t)=>{"use strict";t.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise((r,n)=>{e.call(this,...t,(e,t)=>e!=null?n(e):r(t))})}},"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty(function(...t){const r=t[t.length-1];if(typeof r!=="function")return e.apply(this,t);else e.apply(this,t.slice(0,-1)).then(e=>r(null,e),r)},"name",{value:e.name})}},2940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(t){wrapper[t]=e[t]});return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=[{header:"Invoke",content:"Invoke/trigger online functions."},{header:"Usage",content:"$ s invoke "},{header:"Options",optionList:[{name:"invocation-type",description:'Invocation type: optional value "async"|"sync", default value "sync" (default: "sync")',type:String},{name:"event",description:'Event data (strings) passed to the function during invocation (default: "").Http function format refers to [https://github.com/devsapp/fc-remote-invoke#特别说明]',type:String},{name:"event-file",description:"Event funtion: A file containing event data passed to the function during invoke. Http function: A file containing http request options sent to http trigger. Format refers to [https://github.com/devsapp/fc-remote-invoke#特别说明]",alias:"f",type:String},{name:"event-stdin",description:"Read from standard input, to support script pipeline.Http function format refers to [https://github.com/devsapp/fc-remote-invoke#特别说明]",type:Boolean},{name:"region",description:"Specify region in cli mode",type:String},{name:"service-name",description:"Specify service name in cli mode",type:String},{name:"function-name",description:"Specify function name in cli mode",type:String},{name:"domain-name",description:"Specify custom domain name in cli mode",type:String}]},{header:"Global Options",optionList:[{name:"access",description:"Specify key alias.",alias:"a",type:Boolean},{name:"help",description:"fc-remote-invoke help for command.",alias:"h",type:Boolean}]},{header:"Examples with Yaml",content:["$ s invoke","$ s invoke","$ s invoke --invocation-type sync --event ","$ s invoke --event-file ","$ s invoke --event-stdin"]},{header:"Examples with CLI",content:[{example:"$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event "},{example:"$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-file "},{example:"$ s cli fc-remote-invoke invoke --region * --service-name * --function-name * --event-stdin"},{example:"\nYou also can refer to the usage of fc-api and execute [s cli fc-api -h] for help. $ s cli fc-api invokeFunction -h"}]}]},8989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(7782);class ComponentLogger{static setContent(e){ComponentLogger.CONTENT=e}static log(e,t){n.Logger.log(e,t)}static info(e){n.Logger.info(ComponentLogger.CONTENT,e)}static debug(e){n.Logger.debug(ComponentLogger.CONTENT,e)}static error(e){n.Logger.error(ComponentLogger.CONTENT,e)}static warning(e){n.Logger.warn(ComponentLogger.CONTENT,e)}static success(e){n.Logger.log(e,"green")}}t.default=ComponentLogger;ComponentLogger.CONTENT="FC-REMOTE-INVOKE"},6144:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const c=a(r(250));const u=s(r(7782));const l=a(r(8989));const f=a(r(465));const h=r(8107);const d=a(r(1093));class FcRemoteInvoke{invoke(e){return o(this,void 0,void 0,function*(){const{props:t,eventPayload:r,credentials:n,isHelp:i,invocationType:s}=yield this.handlerInputs(e);yield this.report("fc-remote-invoke","invoke",n===null||n===void 0?void 0:n.AccountID);if(i){u.help(f.default);return}let o;if(!t.domainName){const r=yield u.loadComponent("devsapp/fc-common");o=yield r.makeFcClient(Object.assign(Object.assign({},e),{props:{region:t.region}}))}const a=new d.default(o,n.AccountID);yield a.invoke(t,r,{invocationType:s})})}report(e,t,r){return o(this,void 0,void 0,function*(){u.reportComponent(e,{command:t,uid:r})})}handlerInputs(e){var t,r,n,i,s,a;return o(this,void 0,void 0,function*(){const o=((e===null||e===void 0?void 0:e.args)||"").replace(/(^\s*)|(\s*$)/g,"");l.default.debug(`input args: ${o}`);const f=u.commandParse(Object.assign(Object.assign({},e),{args:o}),{boolean:["help","event-stdin"],string:["invocation-type","event","event-file","region","domain-name","service-name","function-name","qualifier"],alias:{help:"h",event:"e","event-file":"f"}});const d=(f===null||f===void 0?void 0:f.data)||{};l.default.debug(`command parse: ${JSON.stringify(d)}`);if(d.help){return{credentials:e.credentials,isHelp:true}}const{e:p,f:y,"event-stdin":m,"invocation-type":g="sync","domain-name":v}=d;const b={event:p,eventFile:y,eventStdin:m};const _=!!p+!!y+!!m;if(_>1){throw new Error("event | event-file | event-stdin must choose one.")}else if(_===0){b.event=""}if(!["sync","async"].includes(g)){throw new Error("invocation-type enum value sync, async.")}if(!v&&!(e===null||e===void 0?void 0:e.credentials)){e.credentials=yield u.getCredential((t=e===null||e===void 0?void 0:e.project)===null||t===void 0?void 0:t.access)}l.default.debug(`input props: ${JSON.stringify(e.props)}`);const w={region:d.region||((r=e.props)===null||r===void 0?void 0:r.region),serviceName:d["service-name"]||((n=e.props)===null||n===void 0?void 0:n.serviceName),functionName:d["function-name"]||((i=e.props)===null||i===void 0?void 0:i.functionName),domainName:v||((s=e.props)===null||s===void 0?void 0:s.domainName),qualifier:d.qualifier||((a=e.props)===null||a===void 0?void 0:a.qualifier)};l.default.debug(`input args props: ${JSON.stringify(w)}`);if(!h.isProperties(w)){throw new Error("region/serviceName(service-name)/functionName(function-name) can not be empty.")}return{props:w,credentials:e.credentials,eventPayload:b,isHelp:false,invocationType:c.default.upperFirst(g)}})}}t.default=FcRemoteInvoke},8107:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isProperties=void 0;function isProperties(e){if(!e){return false}return e.domainName||e.region&&e.serviceName&&e.functionName}t.isProperties=isProperties},9009:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(5622));const o=i(r(5630));const a=r(250);const c=i(r(1058));const u=i(r(8989));const l=r(7776);class File{static getEvent(e){return n(this,void 0,void 0,function*(){let t=yield l.getStdin();if(!e)return t;return yield new Promise((r,n)=>{let i;if(e==="-"){u.default.log("Reading event data from stdin, which can be ended with Enter then Ctrl+D");i=process.stdin}else{u.default.log("Reading event file content:");i=o.default.createReadStream(e,{encoding:"utf-8"})}const s=c.default.createInterface({input:i,output:process.stdout});t="";s.on("line",e=>{t+=e});s.on("close",()=>{u.default.log("");r(t)});s.on("SIGINT",()=>n(new Error("^C")))})})}static eventPriority(e){return n(this,void 0,void 0,function*(){let t;if(a.isString(e.event)){return e.event}else if(e.eventStdin){t="-"}else if(e.eventFile){t=s.default.resolve(process.cwd(),e.eventFile)}return yield this.getEvent(t)})}}t.default=File},1093:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(250));const o=i(r(3061));const a=i(r(9009));const c=i(r(8989));class RemoteInvoke{constructor(e,t){this.fcClient=e;this.accountId=t}invoke(e,t,{invocationType:r}){return n(this,void 0,void 0,function*(){const n=yield a.default.eventPriority(t);c.default.debug(`event: ${n}`);const{region:i,serviceName:o,functionName:u,domainName:l,qualifier:f}=e;if(l){return this.requestDomain(l,n)}const h=yield this.getHttpTrigger(o,u);const d={event:n,serviceName:o,functionName:u,qualifier:f};if(s.default.isEmpty(h)){d.invocationType=r;d.event=n;yield this.eventInvoke(d)}else{d.region=i;d.event=this.getJsonEvent(n);yield this.httpInvoke(d)}})}requestDomain(e,t){return n(this,void 0,void 0,function*(){const r=this.getJsonEvent(t);if(s.default.isEmpty(r.headers)){r.headers={}}r.headers["X-Fc-Log-Type"]="Tail";const{body:n,headers:i}=yield o.default(e,r);this.showLog(i["x-fc-log-result"]);c.default.log("\nFC Invoke Result:","green");console.log(n);c.default.log("\n")})}getHttpTrigger(e,t){return n(this,void 0,void 0,function*(){const{data:r}=yield this.fcClient.listTriggers(e,t);c.default.debug(`get listTriggers: ${JSON.stringify(r)}`);if(s.default.isEmpty(r.triggers)){return[]}const n=r.triggers.filter(e=>e.triggerType==="http"||e.triggerType==="https");if(s.default.isEmpty(n)){return[]}return n})}eventInvoke({serviceName:e,functionName:t,event:r,qualifier:i="LATEST",invocationType:s}){return n(this,void 0,void 0,function*(){if(s==="Sync"){const n=yield this.fcClient.invokeFunction(e,t,r,{"X-Fc-Log-Type":"Tail","X-Fc-Invocation-Type":s},i);this.showLog(n.headers["x-fc-log-result"]);c.default.log("\nFC Invoke Result:","green");console.log(n.data);console.log("\n")}else{const{headers:n}=yield this.fcClient.invokeFunction(e,t,r,{"X-Fc-Invocation-Type":s},i);const o=n["x-fc-request-id"];c.default.log(`\n${e}/${t} async invoke success.\n${o?`request id: ${o}\n`:""}`,"green")}})}httpInvoke({region:e,serviceName:t,functionName:r,event:i,qualifier:s}){return n(this,void 0,void 0,function*(){const n=s?`.${s}`:"";i.path=`/proxy/${t}${n}/${r}/${i.path||""}`;c.default.log(`Request url: https://${this.accountId}.${e}.fc.aliyuncs.com/2016-08-15/proxy/${t}${n}/${r}/`);yield this.request(i)})}request(e){return n(this,void 0,void 0,function*(){const{headers:t={},queries:r,method:n="GET",path:i,body:s}=e;if(!t["X-Fc-Log-Type"]){t["X-Fc-Log-Type"]="Tail"}let o;try{const e=n.toLocaleUpperCase();c.default.debug(`method is ${e}.`);c.default.debug(`start invoke.`);if(e==="GET"){o=yield this.fcClient.costom_request("GET",i,r,null,t)}else if(e==="POST"){o=yield this.fcClient.costom_request("POST",i,r,s,t)}else if(e==="PUT"){o=yield this.fcClient.costom_request("PUT",i,null,s,t)}else if(e==="DELETE"){o=yield this.fcClient.costom_request("DELETE",i,r,null,t)}else if(n.toLocaleUpperCase()==="PATCH"){o=yield this.fcClient.costom_request("PATCH",i,r,s,t)}else if(n.toLocaleUpperCase()==="HEAD"){o=yield this.fcClient.costom_request("HEAD",i,r,s,t)}else{c.default.error(`Does not support ${n} requests temporarily.`)}}catch(e){c.default.debug(e);if(e.message==="Unexpected token r in JSON at position 0"&&e.stack.includes("/fc2/lib/client.js")&&e.stack.includes("at Client.request")){throw new Error("The body in http responss is not in json format, but the content-type in response header is application/json. We recommend that you make the format of the response body be consistent with the content-type in response header.")}throw e}c.default.debug(`end invoke.`);if(o===null||o===void 0?void 0:o.err){this.showLog(o.headers["x-fc-log-result"]);c.default.log(`\nFC Invoke Result[Code: ${o.code}]:`,"red");console.log(o.data);console.log("\n")}else{if(o){this.showLog(o.headers["x-fc-log-result"]);c.default.log(`\nFC Invoke Result[Code: ${o.code}]:`,"green");console.log(o.data);console.log("\n")}}})}showLog(e){if(e){c.default.log("========= FC invoke Logs begin =========","yellow");const t=Buffer.from(e,"base64");c.default.log(t.toString());c.default.log("========= FC invoke Logs end =========","yellow")}}getJsonEvent(e){try{return e?JSON.parse(e):{}}catch(e){c.default.debug(e);throw new Error("handler event error. Example: https://github.com/devsapp/fc-remote-invoke/blob/master/example/http.json")}}}t.default=RemoteInvoke},7776:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(t){r[t]=e[t]&&function(r){return new Promise(function(n,i){r=e[t](r),settle(n,i,r.done,r.value)})}}function settle(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}};Object.defineProperty(t,"__esModule",{value:true});t.getStdin=void 0;const{stdin:i}=process;function getStdin(){var e,t;return r(this,void 0,void 0,function*(){let r="";if(i.isTTY){return r}i.setEncoding("utf8");try{for(var s=n(i),o;o=yield s.next(),!o.done;){const e=o.value;r+=e}}catch(t){e={error:t}}finally{try{if(o&&!o.done&&(t=s.return))yield t.call(s)}finally{if(e)throw e.error}}return r})}t.getStdin=getStdin;getStdin.buffer=(()=>r(void 0,void 0,void 0,function*(){var e,t;const r=[];let s=0;if(i.isTTY){return Buffer.concat([])}try{for(var o=n(i),a;a=yield o.next(),!a.done;){const e=a.value;r.push(e);s+=e.length}}catch(t){e={error:t}}finally{try{if(a&&!a.done&&(t=o.return))yield t.call(o)}finally{if(e)throw e.error}}return Buffer.concat(r,s)}))},7782:e=>{"use strict";e.exports=require("@serverless-devs/core")},2357:e=>{"use strict";e.exports=require("assert")},4293:e=>{"use strict";e.exports=require("buffer")},7619:e=>{"use strict";e.exports=require("constants")},881:e=>{"use strict";e.exports=require("dns")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7565:e=>{"use strict";e.exports=require("http2")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},1058:e=>{"use strict";e.exports=require("readline")},2413:e=>{"use strict";e.exports=require("stream")},4016:e=>{"use strict";e.exports=require("tls")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={id:r,loaded:false,exports:{}};var i=true;try{e[r].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete t[r]}n.loaded=true;return n.exports}(()=>{__webpack_require__.nmd=(e=>{e.paths=[];if(!e.children)e.children=[];return e})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(6144)})(); \ No newline at end of file diff --git a/lib/interface/entity.d.ts b/lib/interface/entity.d.ts deleted file mode 100644 index 6c07118..0000000 --- a/lib/interface/entity.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export interface ICredentials { - AccountID?: string; - AccessKeyID?: string; - AccessKeySecret?: string; - SecurityToken?: string; -} -export interface InputProps { - props?: IProperties; - credentials: ICredentials; - appName: string; - project: { - component: string; - access: string; - projectName: string; - }; - command: string; - args: string; - path: { - configPath: string; - }; -} -export interface IProperties { - region: string; - serviceName: string; - functionName: string; - qualifier?: string; - domainName?: string; -} -export declare function isProperties(args: any): args is IProperties; -export interface IEventPayload { - event?: string; - eventFile?: string; - eventStdin?: boolean; -} diff --git a/lib/lib/event.d.ts b/lib/lib/event.d.ts deleted file mode 100644 index 26aa5f3..0000000 --- a/lib/lib/event.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default class File { - static getEvent(eventFile: any): Promise; - static eventPriority(eventPriority: any): Promise; -} diff --git a/lib/lib/handler-body.d.ts b/lib/lib/handler-body.d.ts deleted file mode 100644 index 1510928..0000000 --- a/lib/lib/handler-body.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function handlerBody(contentType: string, body: any): any; diff --git a/lib/lib/remote-invoke.d.ts b/lib/lib/remote-invoke.d.ts deleted file mode 100644 index 6147873..0000000 --- a/lib/lib/remote-invoke.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { IProperties, IEventPayload } from '../interface/entity'; -export default class RemoteInvoke { - fcClient: any; - accountId: string; - constructor(fcClient: any, accountId: string); - invoke(props: IProperties, eventPayload: IEventPayload, { invocationType }: { - invocationType: any; - }): Promise; - requestDomain(url: string, event: string): Promise; - getHttpTrigger(serviceName: any, functionName: any): Promise; - eventInvoke({ serviceName, functionName, event, qualifier, invocationType }: { - serviceName: any; - functionName: any; - event: any; - qualifier?: string; - invocationType: any; - }): Promise; - httpInvoke({ region, serviceName, functionName, event, qualifier }: { - region: any; - serviceName: any; - functionName: any; - event: any; - qualifier: any; - }): Promise; - /** - * @param event: { body, headers, method, queries, path } - * path 组装后的路径 /proxy/serviceName/functionName/path , - */ - request(event: any): Promise; - private showLog; - private getJsonEvent; -} diff --git a/lib/lib/stdin.d.ts b/lib/lib/stdin.d.ts deleted file mode 100644 index ed45d22..0000000 --- a/lib/lib/stdin.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -export declare function getStdin(): Promise; -export declare namespace getStdin { - var buffer: () => Promise; -} diff --git a/package.json b/package.json index 312f8ba..de4134e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "author": "Serverless-Devs", "contributors": [], "license": "MIT", - "main": "./lib/index.js", + "main": "./dist/index.js", "publishConfig": { "access": "public" }, @@ -24,11 +24,12 @@ "scripts": { "start": "npm run watch", "watch": "tsc -w", - "prebuild": "rm -rf node_modules && rm -rf package-lock.json && npm i && rimraf lib", - "build": "ncc build src/index.ts -m -e @serverless-devs/core -o lib" + "prebuild": "rm -rf node_modules && rm -rf package-lock.json && npm i && rimraf dist", + "esbuild": "esbuild src/index.ts --bundle --log-level=error --minify --platform=node --format=cjs --target=node10.4 --external:@serverless-devs/core --outfile=dist/index.js", + "build": "npm run esbuild" }, "dependencies": { - "@serverless-devs/core": "^0.0.*", + "@serverless-devs/core": "latest", "form-data": "^4.0.0", "fs-extra": "^10.0.0", "got": "^11.8.2", @@ -46,6 +47,6 @@ "ts-node": "^8.10.2", "typedoc": "^0.20.35", "typescript": "^3.9.7", - "@vercel/ncc": "^0.24.0" + "esbuild": "^0.14.0" } } diff --git a/publish.yaml b/publish.yaml index 897f5ff..e55f8ee 100644 --- a/publish.yaml +++ b/publish.yaml @@ -2,7 +2,7 @@ Type: Component Name: fc-remote-invoke Provider: - 其它 -Version: 0.0.20 +Version: dev Description: 初始化component模板 HomePage: https://www.serverless-devs.com Tags: #标签详情 diff --git a/tsconfig.json b/tsconfig.json index 1a32774..d54c709 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,7 @@ "./node_modules/@types" ], "rootDir": "src", - "outDir": "lib" + "outDir": "dist" }, "exclude": [ "**/node_modules/**",